diff -Nru sumo-1.1.0+dfsg1/aclocal.m4 sumo-1.2.0+dfsg1/aclocal.m4 --- sumo-1.1.0+dfsg1/aclocal.m4 2018-12-17 23:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/aclocal.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,10475 +0,0 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- - -# Copyright (C) 1996-2017 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. - -# 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. - -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.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'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# 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. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 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. - -# GNU Libtool 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 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -]) - -# serial 58 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_PREPARE_CC_BASENAME -# ----------------------- -m4_defun([_LT_PREPARE_CC_BASENAME], [ -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} -])# _LT_PREPARE_CC_BASENAME - - -# _LT_CC_BASENAME(CC) -# ------------------- -# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -# but that macro is also expanded into generated libtool script, which -# arranges for $SED and $ECHO to be set by different means. -m4_defun([_LT_CC_BASENAME], -[m4_require([_LT_PREPARE_CC_BASENAME])dnl -AC_REQUIRE([_LT_DECL_SED])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -func_cc_basename $1 -cc_basename=$func_cc_basename_result -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -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 -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl -m4_require([_LT_CMD_TRUNCATE])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from 'configure', and 'config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# 'config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain=$ac_aux_dir/ltmain.sh -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the 'libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to 'config.status' so that its -# declaration there will have the same value as in 'configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags='_LT_TAGS'dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into 'config.status', and then the shell code to quote escape them in -# for loops in 'config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# '#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test 0 = "$lt_write_fail" && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -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." - -while test 0 != $[#] -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -_LT_COPYING -_LT_LIBTOOL_TAGS - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -_LT_PREPARE_MUNGE_PATH_LIST -_LT_PREPARE_CC_BASENAME - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -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)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _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], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - 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)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # 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 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - 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 - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [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 -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - 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 -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test yes = "$lt_cv_ld_force_load"; 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 - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script that will find a shell with a builtin -# printf (that we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case $ECHO in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - 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*) - case $host in - i?86-*-solaris*|x86_64-*-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" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS -]) - -if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # 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`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes = "$cross_compiling"; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links=nottested -if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test no = "$hard_links"; then - AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", - [Define to the sub-directory where libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then - - # We can hardcode non-existent directories. - if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && - test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || - test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_PREPARE_MUNGE_PATH_LIST -# --------------------------- -# Make sure func_munge_path_list() is defined correctly. -m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -[[# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} -]])# _LT_PREPARE_PATH_LIST - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -[User-defined run-time library search path.]) - -case $host_os in -aix3*) - 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 - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a[(]lib.so.V[)]' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - 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 - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - 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" - 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=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - 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 - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - 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 - ;; - -*nto* | *qnx*) - version_type=qnx - 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 - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - 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=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - 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 - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - 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 - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/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' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - 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 - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], - [Detected run-time system search path for libraries]) -_LT_DECL([], [configure_time_lt_sys_library_path], [2], - [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program that can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program that can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi]) -rm -f conftest.i conftest2.i conftest.out]) -])# _LT_PATH_DD - - -# _LT_CMD_TRUNCATE -# ---------------- -# find command to truncate a binary pipe -m4_defun([_LT_CMD_TRUNCATE], -[m4_require([_LT_PATH_DD]) -AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], - [Command to truncate a binary pipe]) -])# _LT_CMD_TRUNCATE - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# _LT_DLL_DEF_P([FILE]) -# --------------------- -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with func_dll_def_p in the libtool script -AC_DEFUN([_LT_DLL_DEF_P], -[dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -])# _LT_DLL_DEF_P - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # 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};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], - [Transform the output of nm into a list of symbols to manually relocate]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], - [The name lister interface]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _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 ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test yes = "$GCC"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - 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 - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C 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' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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 - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - 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'] - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _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'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' - ;; - 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)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # 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' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $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 - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - 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 - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS=$save_LDFLAGS]) - if test yes = "$lt_cv_irix_exported_symbol"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(ld_shlibs, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - osf3*) - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_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_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting $shlibpath_var if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC=$CC -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -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_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report what library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC=$lt_save_CC -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # 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_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # 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 - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - - _LT_TAGVAR(GCC, $1)=$GXX - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_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 -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)=$prev$p - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)=$p - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)=$p - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # 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_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$G77 - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # 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_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# 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=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# GCJ 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_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 -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code=$lt_simple_compile_test_code - -# 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= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -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], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f "$lt_ac_sed" && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test 10 -lt "$lt_ac_count" && break - lt_ac_count=`expr $lt_ac_count + 1` - if test "$lt_ac_count" -gt "$lt_ac_max"; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine what file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# 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 8 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option '$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl 'shared' nor 'disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], - [_LT_WITH_AIX_SONAME([aix])]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the 'shared' and -# 'disable-shared' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the 'static' and -# 'disable-static' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the 'fast-install' -# and 'disable-fast-install' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_AIX_SONAME([DEFAULT]) -# ---------------------------------- -# implement the --with-aix-soname flag, and support the `aix-soname=aix' -# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -m4_define([_LT_WITH_AIX_SONAME], -[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[[5-9]]*,yes) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - AC_ARG_WITH([aix-soname], - [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], - [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], - [case $withval in - aix|svr4|both) - ;; - *) - AC_MSG_ERROR([Unknown argument to --with-aix-soname]) - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname], - [AC_CACHE_VAL([lt_cv_with_aix_soname], - [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) - with_aix_soname=$lt_cv_with_aix_soname]) - AC_MSG_RESULT([$with_aix_soname]) - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - -_LT_DECL([], [shared_archive_member_spec], [0], - [Shared archive member basename, for filename based shared library versioning on AIX])dnl -])# _LT_WITH_AIX_SONAME - -LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' -# LT_INIT options. -# 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@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [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=m4_default([$1], [default])]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# 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 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59, which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# 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. - -# @configure_input@ - -# serial 4179 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# 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 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl -dnl Copyright © 2004 Scott James Remnant . -dnl Copyright © 2012-2015 Dan Nicholson -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. - -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ - -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -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]) - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])dnl PKG_PROG_PKG_CONFIG - -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl have to call PKG_CHECK_EXISTS manually -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])dnl _PKG_CONFIG - -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])dnl _PKG_SHORT_ERRORS_SUPPORTED - - -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - 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 --cflags --libs "$2" 2>&1` - else - $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 - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])dnl PKG_CHECK_MODULES - - -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl 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 - - -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --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 - - -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl 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 -])dnl PKG_CHECK_VAR - -# Copyright (C) 2002-2017 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_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# 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.15' -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.15.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# 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.15.1])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-2017 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/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# 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 -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2017 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_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[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 -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2017 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. - - -# 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 -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# 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 -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -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], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # 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". - 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. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > 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 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" - # 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. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # 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 - ;; - 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} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# 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 -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[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-2017 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_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # 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 - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # 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 - # 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. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # 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 - am__quote=`sed -n 's/^am__quote = //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'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# 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 -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2017 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. - -# 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. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# 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.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 -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[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], [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 - -# 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]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])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 (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_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])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_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 - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) - -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], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2017 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_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2017 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. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2017 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_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# 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 - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2017 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_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# 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 -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2017 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_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])]) - -# _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)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2017 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_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2017 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_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2017 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_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# 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 ( - 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 - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -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) 2009-2017 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-2017 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_INSTALL_STRIP -# --------------------- -# 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 -# 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 -# 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'. -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-2017 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_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -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-2017 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_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# 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 -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# 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. 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' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [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 - - 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-1.1.0+dfsg1/AUTHORS sumo-1.2.0+dfsg1/AUTHORS --- sumo-1.1.0+dfsg1/AUTHORS 2018-07-26 22:00:20.000000000 +0000 +++ sumo-1.2.0+dfsg1/AUTHORS 2019-04-15 14:11:30.000000000 +0000 @@ -66,3 +66,4 @@ Leonhard Luecken luecken Martin Taraz martintaraz Lara Codeca +Matthias Schwamborn diff -Nru sumo-1.1.0+dfsg1/bin/Makefile.in sumo-1.2.0+dfsg1/bin/Makefile.in --- sumo-1.1.0+dfsg1/bin/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/bin/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,523 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = bin -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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) -am__DIST_COMMON = $(srcdir)/Makefile.in -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -@WITH_GUI_TRUE@GUI_APP = sumo-gui -@WITH_GUI_TRUE@NETEDIT_APP = netedit -CLEANFILES = sumo sumoD sumo-gui sumo-guiD \ -dfrouter dfrouterD duarouter duarouterD \ -jtrrouter jtrrouterD marouter marouterD \ -netconvert netconvertD netedit neteditD \ -netgenerate netgenerateD od2trips od2tripsD \ -polyconvert polyconvertD activitygen activitygenD \ -TraCITestClient TraCITestClientD sumo-unittest sumo-unittestD \ -emissionsDrivingCycle emissionsDrivingCycleD emissionsMap emissionsMapD - -all: all-am - -.SUFFIXES: -$(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) --foreign bin/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign bin/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -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 -installdirs: -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: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - 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 - -.PRECIOUS: Makefile - - -install: all -all: sumo dfrouter duarouter jtrrouter netconvert netgenerate od2trips polyconvert activitygen emissionsDrivingCycle emissionsMap marouter TraCITestClient $(GUI_APP) $(NETEDIT_APP) -sumo: ../src/sumo - cp ../src/sumo ./`echo sumo | sed '$(transform)'` - if [ ! -e sumo -a -e sumoD ]; then ln -s sumoD sumo; fi -dfrouter: ../src/dfrouter/dfrouter - cp ../src/dfrouter/dfrouter ./`echo dfrouter | sed '$(transform)'` - if [ ! -e dfrouter -a -e dfrouterD ]; then ln -s dfrouterD dfrouter; fi -duarouter: ../src/duarouter/duarouter - cp ../src/duarouter/duarouter ./`echo duarouter | sed '$(transform)'` - if [ ! -e duarouter -a -e duarouterD ]; then ln -s duarouterD duarouter; fi -jtrrouter: ../src/jtrrouter/jtrrouter - cp ../src/jtrrouter/jtrrouter ./`echo jtrrouter | sed '$(transform)'` - if [ ! -e jtrrouter -a -e jtrrouterD ]; then ln -s jtrrouterD jtrrouter; fi -netconvert: ../src/netconvert - cp ../src/netconvert ./`echo netconvert | sed '$(transform)'` - if [ ! -e netconvert -a -e netconvertD ]; then ln -s netconvertD netconvert; fi -netgenerate: ../src/netgen/netgenerate - cp ../src/netgen/netgenerate ./`echo netgenerate | sed '$(transform)'` - if [ ! -e netgenerate -a -e netgenerateD ]; then ln -s netgenerateD netgenerate; fi -od2trips: ../src/od2trips - cp ../src/od2trips ./`echo od2trips | sed '$(transform)'` - if [ ! -e od2trips -a -e od2tripsD ]; then ln -s od2tripsD od2trips; fi -polyconvert: ../src/polyconvert/polyconvert - cp ../src/polyconvert/polyconvert ./`echo polyconvert | sed '$(transform)'` - if [ ! -e polyconvert -a -e polyconvertD ]; then ln -s polyconvertD polyconvert; fi -activitygen: ../src/activitygen/activitygen - cp ../src/activitygen/activitygen ./`echo activitygen | sed '$(transform)'` - if [ ! -e activitygen -a -e activitygenD ]; then ln -s activitygenD activitygen; fi -emissionsDrivingCycle: ../src/tools/emissionsDrivingCycle - cp ../src/tools/emissionsDrivingCycle ./`echo emissionsDrivingCycle | sed '$(transform)'` - if [ ! -e emissionsDrivingCycle -a -e emissionsDrivingCycleD ]; then ln -s emissionsDrivingCycleD emissionsDrivingCycle; fi -emissionsMap: ../src/tools/emissionsMap - cp ../src/tools/emissionsMap ./`echo emissionsMap | sed '$(transform)'` - if [ ! -e emissionsMap -a -e emissionsMapD ]; then ln -s emissionsMapD emissionsMap; fi -marouter: ../src/marouter/marouter - cp ../src/marouter/marouter ./`echo marouter | sed '$(transform)'` - if [ ! -e marouter -a -e marouterD ]; then ln -s marouterD marouter; fi -$(GUI_APP): ../src/$(GUI_APP) - cp ../src/$(GUI_APP) ./`echo $(GUI_APP) | sed '$(transform)'` - if [ ! -e $(GUI_APP) -a -e $(GUI_APP)D ]; then ln -s $(GUI_APP)D $(GUI_APP); fi -$(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 -TraCITestClient: ../src/traci_testclient/TraCITestClient - cp ../src/traci_testclient/TraCITestClient ./`echo TraCITestClient | sed '$(transform)'` - if [ ! -e TraCITestClient -a -e TraCITestClientD ]; then ln -s TraCITestClientD TraCITestClient; fi - -# 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-1.1.0+dfsg1/bin/start-command-line.bat sumo-1.2.0+dfsg1/bin/start-command-line.bat --- sumo-1.1.0+dfsg1/bin/start-command-line.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/bin/start-command-line.bat 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,14 @@ +@echo off +SET mypath=%~dp0 + +rem change the following line to customize the location of your sumo installation +SET sumo_home=%mypath:~0,-5% + +rem change the following line to customize the location of your python installation +SET python_dir=C:\Python27 + +rem change the following line to set a new working dir: +set default_dir=%USERPROFILE%\Sumo +IF NOT EXIST %default_dir%\ mkdir %default_dir% + +cmd /K "set PATH=%PATH%;%sumo_home%\bin;%python_dir%;%sumo_home%\tools& set PYTHONPATH=%PYTHONPATH%;%sumo_home%\tools& set SUMO_HOME=%sumo_home%& cd /d %default_dir%& echo info: added location of sumo, tools and python to the search path& echo info: variable SUMO_HOME is set to %SUMO_HOME%& echo.& echo use the 'cd /d' command to change directory& echo example usage:& echo cd /d c:\foo\bar diff -Nru sumo-1.1.0+dfsg1/build/clang_memleak_suppressions.txt sumo-1.2.0+dfsg1/build/clang_memleak_suppressions.txt --- sumo-1.1.0+dfsg1/build/clang_memleak_suppressions.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/clang_memleak_suppressions.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,2 @@ +leak:libfontconfig.so +leak:libc.so diff -Nru sumo-1.1.0+dfsg1/build/clang_sanitize_blacklist.txt sumo-1.2.0+dfsg1/build/clang_sanitize_blacklist.txt --- sumo-1.1.0+dfsg1/build/clang_sanitize_blacklist.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/clang_sanitize_blacklist.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,2 @@ +fun:*_Ios_Fmtflags* +src:/usr/bin/\.\./lib/gcc/x86_64-linux-gnu/5\.4\.0/\.\./\.\./\.\./\.\./include/c\+\+/5\.4\.0/bits/random\.tcc diff -Nru sumo-1.1.0+dfsg1/build/cmake_modules/FindFFMPEG.cmake sumo-1.2.0+dfsg1/build/cmake_modules/FindFFMPEG.cmake --- sumo-1.1.0+dfsg1/build/cmake_modules/FindFFMPEG.cmake 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/cmake_modules/FindFFMPEG.cmake 2019-04-15 14:11:30.000000000 +0000 @@ -216,30 +216,41 @@ if(FFMPEG_avformat_LIBRARY) if(FFMPEG_avcodec_LIBRARY) if(FFMPEG_avutil_LIBRARY) - set(FFMPEG_FOUND "YES") - set(FFMPEG_LIBRARIES ${FFMPEG_avformat_LIBRARY} - ${FFMPEG_avcodec_LIBRARY} - ${FFMPEG_avutil_LIBRARY} - ) - if(FFMPEG_swscale_LIBRARY) - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} - ${FFMPEG_swscale_LIBRARY} - ) - endif() - if(FFMPEG_avdevice_LIBRARY) - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} - ${FFMPEG_avdevice_LIBRARY} - ) - endif() - if(_FFMPEG_z_LIBRARY_) - set( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} - ${_FFMPEG_z_LIBRARY_} - ) + file(STRINGS ${FFMPEG_INCLUDE_DIR2}/libavutil/ffversion.h _version_line REGEX "^[ \t]*#define FFMPEG_VERSION.*") + if(_version_line) + string(REGEX REPLACE ".*#define FFMPEG_VERSION[ \t]+\"([0-9\.]+).*" "\\1" FFMPEG_VERSION "${_version_line}") + if("${FFMPEG_VERSION}" VERSION_LESS "3.4") + message(STATUS "Unsuitable FFmpeg version found ${FFMPEG_VERSION}") + else() + set(FFMPEG_FOUND "YES") + set(FFMPEG_LIBRARIES ${FFMPEG_avformat_LIBRARY} + ${FFMPEG_avcodec_LIBRARY} + ${FFMPEG_avutil_LIBRARY} + ) + if(FFMPEG_swscale_LIBRARY) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} + ${FFMPEG_swscale_LIBRARY} + ) + endif() + if(FFMPEG_avdevice_LIBRARY) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} + ${FFMPEG_avdevice_LIBRARY} + ) + endif() + if(_FFMPEG_z_LIBRARY_) + set( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} + ${_FFMPEG_z_LIBRARY_} + ) + endif() + endif() endif() endif() endif() endif() endif() +if (NOT FFMPEG_FOUND) + message(STATUS "Could NOT find suitable FFmpeg.") +endif() mark_as_advanced( FFMPEG_INCLUDE_DIR diff -Nru sumo-1.1.0+dfsg1/build/cmake_modules/FindProj.cmake sumo-1.2.0+dfsg1/build/cmake_modules/FindProj.cmake --- sumo-1.1.0+dfsg1/build/cmake_modules/FindProj.cmake 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/cmake_modules/FindProj.cmake 2019-04-15 14:11:30.000000000 +0000 @@ -34,6 +34,7 @@ # If it's found it sets PROJ_FOUND to TRUE # and following variables are set: # PROJ_INCLUDE_DIR +# PROJ_API_FILE # PROJ_LIBRARY # FIND_PATH and FIND_LIBRARY normally search standard locations @@ -61,7 +62,7 @@ ENDIF () ENDIF (APPLE) -FIND_PATH(PROJ_INCLUDE_DIR proj_api.h +FIND_PATH(PROJ_INCLUDE_DIR NAMES proj.h proj_api.h PATHS "$ENV{INCLUDE}" "$ENV{LIB_DIR}/include" "$ENV{GDAL_DIR}/include" @@ -75,6 +76,11 @@ IF (PROJ_INCLUDE_DIR AND PROJ_LIBRARY) SET(PROJ_FOUND TRUE) + IF (EXISTS "${PROJ_INCLUDE_DIR}/proj.h") + SET(PROJ_API_FILE "proj.h") + ELSE () + SET(PROJ_API_FILE "proj_api.h") + ENDIF () IF (NOT PROJ_FIND_QUIETLY) MESSAGE(STATUS "Found Proj: ${PROJ_LIBRARY}") ENDIF (NOT PROJ_FIND_QUIETLY) diff -Nru sumo-1.1.0+dfsg1/build/debian/changelog sumo-1.2.0+dfsg1/build/debian/changelog --- sumo-1.1.0+dfsg1/build/debian/changelog 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/changelog 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,266 @@ +sumo (1.1.0+dfsg1-2) bionic; urgency=medium + + * added data dir + * added profile scripts + * using upstream desktop and icon file + * license update + + -- Michael Behrisch Sun, 06 Jan 2019 18:26:58 +0000 + +sumo (1.1.0+dfsg1-1) bionic; urgency=medium + + * New version + + -- Michael Behrisch Sat, 05 Jan 2019 12:10:02 +0100 + +sumo (0.32.0+dfsg1-1) unstable; urgency=medium + + * New version + + -- Anton Gladky Sun, 24 Dec 2017 22:10:02 +0100 + +sumo (0.30.0+dfsg1-1) unstable; urgency=medium + + * New version + + -- Anton Gladky Sun, 23 Jul 2017 18:18:21 +0200 + +sumo (0.25.0+dfsg1-2) unstable; urgency=medium + + * [e0c661b] Add marouter and netedit to usr/bin. + Thanks to Jakob Erdmann + + -- Anton Gladky Thu, 14 Jan 2016 19:30:02 +0100 + +sumo (0.25.0+dfsg1-1) unstable; urgency=medium + + * [c4a28a0] Imported Upstream version 0.25.0+dfsg1. (Closes: #802470) + * [cf1cc2a] Refresh patches. + * [f37c4fd] Refresh d/rules. + * [566cd3b] Apply cme fix dpkg. + * [8c9ea7f] Drop menu-file. + * [05ad9d7] Add proper python-dependencies. + * [21a0ed4] Update d/copyright. + * [5e839de] Use system packaged OpenLayers.js. + + -- Anton Gladky Tue, 12 Jan 2016 22:29:34 +0100 + +sumo (0.24.0+dfsg1-1) unstable; urgency=medium + + * [420b439] Update d/watch. + * [f72c31b] Refresh patches. + * [c21b7b2] Remove old scripts. + * [227569e] Imported Upstream version 0.24.0+dfsg1 + + -- Anton Gladky Sat, 12 Sep 2015 21:38:47 +0200 + +sumo (0.23.0+dfsg1-2) unstable; urgency=medium + + * Move package from experimental to unstable + + -- Anton Gladky Mon, 04 May 2015 21:26:14 +0200 + +sumo (0.23.0+dfsg1-2~exp1) experimental; urgency=medium + + * [de8037f] Drop msse2 buildfpags, unsupported by some platforms + + -- Anton Gladky Mon, 20 Apr 2015 21:00:43 +0200 + +sumo (0.23.0+dfsg1-1~exp1) experimental; urgency=medium + + * [aad3ecb] Update d/copyright. + * [f68572e] Imported Upstream version 0.23.0+dfsg1 + * [006ec0e] Refresh patches. + * [d6fdb64] Apply cme fix for d/control. + * [51222ad] Update d/copyright. + + -- Anton Gladky Fri, 17 Apr 2015 17:38:22 +0200 + +sumo (0.22.0+dfsg-1~exp1) experimental; urgency=medium + + * [08bef65] Add Files-Excluded to d/copyright. + * [01c89e5] Imported Upstream version 0.22.0+dfsg + * [f73a708] Remove gl2ps from d/copyright. + * [785774f] Refresh patches. + * [b196497] Set Standards-Version: 3.9.6. No changes. + * [923a4d9] Update homepage. + * [34a84c3] Move d/upstream to d/upstream/metadata. Update it. + * [b0c3f64] Fix lintian warnings in d/copyright. + + -- Anton Gladky Thu, 20 Nov 2014 22:02:45 +0100 + +sumo (0.21.0+dfsg-1) unstable; urgency=medium + + * [d7097c6] Imported Upstream version 0.21.0+dfsg + * [655607d] Refresh patches. + * [04454ca] Add autopkgtest. + + -- Anton Gladky Fri, 20 Jun 2014 23:03:11 +0200 + +sumo (0.20.0+dfsg-1) unstable; urgency=medium + + * [83c56d0] Remove debian/README.source + * [fd5408c] Imported Upstream version 0.20.0+dfsg + * [0c91c63] Refresh patches. + + -- Anton Gladky Sat, 15 Mar 2014 16:50:07 +0100 + +sumo (0.19.0+dfsg-2) unstable; urgency=medium + + * [b7da9b1] Replace libxerces-c2-dev by libxerces-c-dev. (Closes: #732217) + + -- Anton Gladky Sun, 15 Dec 2013 20:25:55 +0100 + +sumo (0.19.0+dfsg-1) unstable; urgency=low + + * [24595ef] Imported Upstream version 0.19.0+dfsg + * [a2ba852] Refresh patch. + * [0dc4baf] Set Standards-Version: 3.9.5. No changes. + + -- Anton Gladky Sat, 30 Nov 2013 19:18:43 +0100 + +sumo (0.18.0+repack+dfsg-1) unstable; urgency=high + + * [4da44c5] Add script, which removes *.jar files. (Closes: #728777) + * [7870538] Imported Upstream version 0.18.0+repack+dfsg + * [401d451] Enable eulerspiral, as it was relicensed under LGPL. + + -- Anton Gladky Mon, 18 Nov 2013 19:38:03 +0100 + +sumo (0.18~dfsg-1) unstable; urgency=low + + * [3a366bf] Use hardening=+all parameter on all archs except mips. + * [d014241] Update homepage. + * [23e6778] Imported Upstream version 0.18~dfsg + * [5b43e89] Refresh patches. + * [b27582b] Minor fix in debian/rules. + * [6b5053e] Change section for sumo-tools package from "doc" to "science". + (Closes: #717393) + + -- Anton Gladky Fri, 30 Aug 2013 21:58:58 +0200 + +sumo (0.17.1~dfsg-6) unstable; urgency=low + + * [0f04b59] Use autotools-dev again on all platforms. + + -- Anton Gladky Sun, 16 Jun 2013 01:00:29 +0200 + +sumo (0.17.1~dfsg-5) unstable; urgency=low + + * [bff2b7d] Do not use autoreconf on mips. + + -- Anton Gladky Sat, 15 Jun 2013 09:35:16 +0200 + +sumo (0.17.1~dfsg-4) unstable; urgency=low + + * [3a52bc9] Add freeglut3-dev to BD to fix FTBFS on mips*. + * [2d47a7a] Add keyword-entry into desktop-file. + + -- Anton Gladky Thu, 13 Jun 2013 23:14:32 +0200 + +sumo (0.17.1~dfsg-3) unstable; urgency=low + + * [f7f8e0d] Use autoreconf. + + -- Anton Gladky Wed, 12 Jun 2013 23:41:45 +0200 + +sumo (0.17.1~dfsg-2) unstable; urgency=low + + [ Daniel T Chen ] + * [1ff46ca] Added missing libs to link, fixing FTBFS. + + [ Julian Taylor ] + * [5961f4c] Fix FTBFS with ld --no-add-needed. (Closes: #710373) + + [ Anton Gladky ] + * [ec4054e] Use canonical VCS-field. + * [ec9218d] Update fix_scripts_headers.patch. + * [431de9e] Do not install .gitignore file. + * [c45ac64] Add autotools-dev to BD. + * [891e775] Update fix_headers-patch. + * [ff138d5] Use wrap-and-sort. + + -- Anton Gladky Mon, 10 Jun 2013 22:37:01 +0200 + +sumo (0.17.1~dfsg-1) unstable; urgency=low + + * [1a2a17f] Imported Upstream version 0.17.1~dfsg + * [1543af7] Remove obsolete DM-Upload-Allowed flag. + * [f4521cb] Minor update in copyright file. + * [74e45db] Bumper Standards-Version 3.9.4 (no changes). + * [d29e6e2] Refresh patches. + + -- Anton Gladky Wed, 08 May 2013 23:32:58 +0200 + +sumo (0.16.0~dfsg-1~exp1) experimental; urgency=low + + * [771d69c] Imported Upstream version 0.16.0~dfsg + * [5da3835] Update/remove patches. + * [caa9ffa] Rename netgensumo to netgenerate (upstream decision). + + -- Anton Gladky Tue, 04 Dec 2012 18:53:26 +0100 + +sumo (0.15.0~dfsg-3) unstable; urgency=low + + * [6ae8190] Use compat level 9. Apply hardening of buildflags. + * [daa56b5] Remove from compilation embedded copy of gl2ps, + use packaged version instead. + * [8c08de0] Add upstream file + + -- Anton Gladky Wed, 18 Jul 2012 21:04:34 +0200 + +sumo (0.15.0~dfsg-2) unstable; urgency=low + + * [5813a09] Update fix_headers_of_scripts.patch. + * [956cf12] Replace /usr/bin/netgen binary on /usr/bin/netgensumo. + (Closes: #673931) + + -- Anton Gladky Sun, 27 May 2012 16:28:54 +0200 + +sumo (0.15.0~dfsg-1) unstable; urgency=low + + * Initial packaging in Debian. (Closes: #669160) + + -- Anton Gladky Mon, 23 Apr 2012 19:17:01 +0200 + +sumo (0.14.0-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Thu, 12 Jan 2012 23:46:43 +0100 + +sumo (0.13.1-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Tue, 01 Nov 2011 10:24:24 +0100 + +sumo (0.13.0-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Wed, 13 Jul 2011 16:58:57 +0200 + +sumo (0.12.3-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Wed, 13 Apr 2011 19:28:57 +0200 + +sumo (0.10.2-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Mon, 16 Mar 2009 22:00:47 +0100 + +sumo (0.10.1-1) unstable; urgency=low + + * Update + + -- Michael Behrisch Sun, 15 Feb 2009 22:34:33 +0200 + +sumo (0.9.10-1) unstable; urgency=low + + * Initial Release + + -- Michael Behrisch Thu, 23 Oct 2008 23:04:33 +0200 diff -Nru sumo-1.1.0+dfsg1/build/debian/compat sumo-1.2.0+dfsg1/build/debian/compat --- sumo-1.1.0+dfsg1/build/debian/compat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/compat 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +9 diff -Nru sumo-1.1.0+dfsg1/build/debian/control sumo-1.2.0+dfsg1/build/debian/control --- sumo-1.1.0+dfsg1/build/debian/control 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/control 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,64 @@ +Source: sumo +Maintainer: Debian Science Maintainers +Uploaders: Anton Gladky +Section: science +Testsuite: autopkgtest +Priority: optional +Build-Depends: autotools-dev, + debhelper (>= 9), + dh-autoreconf, + dpkg-dev (>= 1.16.1~), + freeglut3-dev, + help2man, + libbz2-dev, + libcups2-dev, + libfox-1.6-dev, + libgdal-dev, + libgl2ps-dev, + libproj-dev, + libxerces-c-dev | libxerces-c2-dev, + libxrandr-dev +Build-Depends-Indep: doxygen, + python-matplotlib, + python +Standards-Version: 3.9.6 +Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/sumo.git +Vcs-Git: git://anonscm.debian.org/debian-science/packages/sumo.git +Homepage: https://sumo.dlr.de/ + +Package: sumo +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends} +Recommends: sumo-tools +Description: Simulation of Urban MObility (SUMO) + SUMO is an open source, + highly portable, microscopic road traffic simulation package + designed to handle large road networks. + Main binary. + +Package: sumo-doc +Architecture: all +Section: doc +Depends: libjs-underscore, + ${misc:Depends} +Recommends: sumo +Description: Simulation of Urban MObility (SUMO), documentation and examples + SUMO is an open source, + highly portable, microscopic road traffic simulation package + designed to handle large road networks. + The binary contatins documentation and examples. + +Package: sumo-tools +Architecture: all +Depends: jarwrapper, + libjs-openlayers, + python, + python3, + ${misc:Depends} +Recommends: sumo +Description: Simulation of Urban MObility (SUMO), tools and scripts + SUMO is an open source, + highly portable, microscopic road traffic simulation package + designed to handle large road networks. + The binary contatins different tools and scripts. diff -Nru sumo-1.1.0+dfsg1/build/debian/copyright sumo-1.2.0+dfsg1/build/debian/copyright --- sumo-1.1.0+dfsg1/build/debian/copyright 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/copyright 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,326 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: SUMO +Upstream-Contact: sumo@dlr.de +Source: https://sumo.dlr.de/ +Files-Excluded: + *.pdf + build + +Files: * +Copyright: 2001-2018, DLR (http://www.dlr.de/) and contributors +License: EPL-2.0 + +Files: ./src/activitygen/* +Copyright: 2001-2018, DLR (http://www.dlr.de/) and contributors + 2010, TUM (Technische Universitaet Muenchen, http://www.tum.de/) +License: EPL-2.0 + +Files: tools/contributed/traci4matlab/* +Copyright: 2015, Andres Acosta, Jairo Espinosa, Jorge Espinosa +License: BSD-2-clause + +Files: tools/game/sounds/* +Copyright: unknown +License: public-domain + All sounds are licensed as CC0 (public domain). + +License: EPL-2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. diff -Nru sumo-1.1.0+dfsg1/build/debian/files sumo-1.2.0+dfsg1/build/debian/files --- sumo-1.1.0+dfsg1/build/debian/files 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/files 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +sumo_1.1.0+dfsg1-2~xenial_source.buildinfo science optional diff -Nru sumo-1.1.0+dfsg1/build/debian/patches/30_add_missing_link.patch sumo-1.2.0+dfsg1/build/debian/patches/30_add_missing_link.patch --- sumo-1.1.0+dfsg1/build/debian/patches/30_add_missing_link.patch 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/patches/30_add_missing_link.patch 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Added missing libs to link, fixing FTBFS. +Bug-Debian: https://bugs.debian.org/710373 +Author: Daniel T Chen , Julian Taylor +Origin: https://launchpadlibrarian.net/137511659/sumo_0.16.0~dfsg-1~exp1_0.16.0~dfsg-1~exp1ubuntu1.diff.gz +Reviewed-by: Anton Gladky +Last-Update: 2015-04-16 +Index: sumo-0.32.0/src/Makefile.am +=================================================================== +--- sumo-0.32.0.orig/src/Makefile.am ++++ sumo-0.32.0/src/Makefile.am +@@ -1,4 +1,4 @@ +-XERCES_LIBS = -l$(LIB_XERCES) ++XERCES_LIBS = -l$(LIB_XERCES) -lpthread -lGLU -lGL + + if WITH_GUI + GUI_APPS = sumo-gui +Index: sumo-0.32.0/src/Makefile.in +=================================================================== +--- sumo-0.32.0.orig/src/Makefile.in ++++ sumo-0.32.0/src/Makefile.in +@@ -383,7 +383,7 @@ STRIP = @STRIP@ + VERSION = @VERSION@ + XERCES_CFLAGS = @XERCES_CFLAGS@ + XERCES_LDFLAGS = @XERCES_LDFLAGS@ +-XERCES_LIBS = -l$(LIB_XERCES) ++XERCES_LIBS = -l$(LIB_XERCES) -lpthread -lGLU -lGL + abs_builddir = @abs_builddir@ + abs_srcdir = @abs_srcdir@ + abs_top_builddir = @abs_top_builddir@ diff -Nru sumo-1.1.0+dfsg1/build/debian/patches/40_drop_some_buildflags.patch sumo-1.2.0+dfsg1/build/debian/patches/40_drop_some_buildflags.patch --- sumo-1.1.0+dfsg1/build/debian/patches/40_drop_some_buildflags.patch 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/patches/40_drop_some_buildflags.patch 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,20 @@ +Description: drop msse2 buildfpags, unsupported by some platforms +Author: Anton Gladky +Last-Update: 2015-04-20 + +Index: sumo-0.32.0/configure.ac +=================================================================== +--- sumo-0.32.0.orig/configure.ac ++++ sumo-0.32.0/configure.ac +@@ -96,11 +96,6 @@ dnl - - - - - - - - - - - - - - - - - - + case "$host" in + x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux*) + dnl Make sure we are on architecture that supports SIMD +- if test x$CXX = xclang++; then +- CXXFLAGS="-msse2 $CXXFLAGS" +- else +- CXXFLAGS="-msse2 -mfpmath=sse $CXXFLAGS" +- fi + ;; + *-cygwin*) + AC_DEFINE([HAVE_CYGWIN], [1], [Define if compiling under cygwin]) diff -Nru sumo-1.1.0+dfsg1/build/debian/patches/series sumo-1.2.0+dfsg1/build/debian/patches/series --- sumo-1.1.0+dfsg1/build/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/patches/series 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,2 @@ +30_add_missing_link.patch +40_drop_some_buildflags.patch diff -Nru sumo-1.1.0+dfsg1/build/debian/rules sumo-1.2.0+dfsg1/build/debian/rules --- sumo-1.1.0+dfsg1/build/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/rules 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +%: + dh $@ --parallel --with autoreconf + +no_hardening_all_archs = mips mipsel + +ifeq (,$(filter $(DEB_HOST_ARCH),$(no_hardening_all_archs))) + export DEB_BUILD_MAINT_OPTIONS = hardening=+all +endif + +DPKG_EXPORT_BUILDFLAGS = 1 + +export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +export LIBS := -lgl2ps -lGL -lGLU -lglut + +include /usr/share/dpkg/buildflags.mk + +override_dh_auto_configure: + dh_auto_configure -- --prefix=/usr + +override_dh_auto_build-indep: + $(MAKE) doxygen + $(MAKE) pydoc + #Clean some unneeded files and fix permissions + find ./tools -name '*.pyc' -print0 | xargs -0 rm -f + rm -rf ./tools/contributed/traci4j/COPYING + rm -rf ./tools/contributed/trafficmodeler/src/resources/icons/Thumbs.db + rm -rf ./tools/contributed/traci4j/.gitignore + rm -rf ./tools/contributed/traas/license.txt + rm -rf ./tools/contributed/traci4matlab/license.txt + rm -rf ./tools/contributed/trafficmodeler/LICENSE.txt + rm -rf ./tools/game/sounds/license.txt + +override_dh_auto_build-arch: + dh_auto_build -a + $(MAKE) man + +override_dh_auto_install: + dh_auto_install + find . -type d -name "__pycache__" -delete + +override_dh_auto_test-arch: + mkdir $(CURDIR)/tests_auto + cd $(CURDIR)/tests_auto; cp ../docs/examples/sumo/hokkaido/* ./; ../bin/sumo -b 0 -e 10000 -n net.net.xml -r input_routes.rou.xml -c hokkaido.sumocfg --summary-output sum.out + cat $(CURDIR)/tests_auto/sum.out + rm -rf $(CURDIR)/tests_auto diff -Nru sumo-1.1.0+dfsg1/build/debian/source/format sumo-1.2.0+dfsg1/build/debian/source/format --- sumo-1.1.0+dfsg1/build/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/source/format 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo-doc.doc-base.doxygen sumo-1.2.0+dfsg1/build/debian/sumo-doc.doc-base.doxygen --- sumo-1.1.0+dfsg1/build/debian/sumo-doc.doc-base.doxygen 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo-doc.doc-base.doxygen 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,8 @@ +Document: sumo-doxygen +Title: Sumo (doxygen documentation) +Author: Sumo's authors +Section: Science/Engineering + +Format: HTML +Index: /usr/share/doc/sumo-doc/doxygen/index.html +Files: /usr/share/doc/sumo-doc/doxygen/* diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo-doc.doc-base.pydoc sumo-1.2.0+dfsg1/build/debian/sumo-doc.doc-base.pydoc --- sumo-1.1.0+dfsg1/build/debian/sumo-doc.doc-base.pydoc 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo-doc.doc-base.pydoc 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,8 @@ +Document: sumo-pydoc +Title: Sumo (Python documentation) +Author: Sumo's authors +Section: Science/Engineering + +Format: HTML +Index: /usr/share/doc/sumo-doc/pydoc/sumolib.net.html +Files: /usr/share/doc/sumo-doc/pydoc/* diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo-doc.docs sumo-1.2.0+dfsg1/build/debian/sumo-doc.docs --- sumo-1.1.0+dfsg1/build/debian/sumo-doc.docs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo-doc.docs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,4 @@ +docs/doxygen +docs/pydoc +docs/tutorial + diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo-doc.examples sumo-1.2.0+dfsg1/build/debian/sumo-doc.examples --- sumo-1.1.0+dfsg1/build/debian/sumo-doc.examples 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo-doc.examples 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +docs/examples/* diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo-doc.links sumo-1.2.0+dfsg1/build/debian/sumo-doc.links --- sumo-1.1.0+dfsg1/build/debian/sumo-doc.links 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo-doc.links 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +usr/share/javascript/underscore/underscore.js usr/share/doc/sumo-doc/doxygen/jquery.js diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo.install sumo-1.2.0+dfsg1/build/debian/sumo.install --- sumo-1.1.0+dfsg1/build/debian/sumo.install 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo.install 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,18 @@ +build/package/sumo.*sh etc/profile.d +data/ usr/share/sumo +build/package/sumo.png usr/share/pixmaps +build/package/sumo.desktop usr/share/applications +build/package/sumo.xml usr/share/mime/application +usr/bin/TraCITestClient +usr/bin/activitygen +usr/bin/dfrouter +usr/bin/duarouter +usr/bin/jtrrouter +usr/bin/netconvert +usr/bin/netgenerate +usr/bin/od2trips +usr/bin/polyconvert +usr/bin/sumo +usr/bin/sumo-gui +usr/bin/marouter +usr/bin/netedit diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo.links sumo-1.2.0+dfsg1/build/debian/sumo.links --- sumo-1.1.0+dfsg1/build/debian/sumo.links 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo.links 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,2 @@ +usr/share/man/man1/sumo.1.gz usr/share/man/man1/sumo-gui.1.gz +usr/bin usr/share/sumo/bin diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo.manpages sumo-1.2.0+dfsg1/build/debian/sumo.manpages --- sumo-1.1.0+dfsg1/build/debian/sumo.manpages 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo.manpages 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +docs/man/* diff -Nru sumo-1.1.0+dfsg1/build/debian/sumo-tools.install sumo-1.2.0+dfsg1/build/debian/sumo-tools.install --- sumo-1.1.0+dfsg1/build/debian/sumo-tools.install 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/sumo-tools.install 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +tools/ usr/share/sumo diff -Nru sumo-1.1.0+dfsg1/build/debian/tests/control sumo-1.2.0+dfsg1/build/debian/tests/control --- sumo-1.1.0+dfsg1/build/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/tests/control 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,2 @@ +Tests: parade +Depends: sumo diff -Nru sumo-1.1.0+dfsg1/build/debian/tests/parade sumo-1.2.0+dfsg1/build/debian/tests/parade --- sumo-1.1.0+dfsg1/build/debian/tests/parade 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/tests/parade 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/sh +# autopkgtest check +# (C) 2014 Anton Gladky + +set -e + +export OMPI_MCA_orte_rsh_agent=/bin/false + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cp docs/examples/sumo/visualization/parade/* $WORKDIR/ +cd $WORKDIR + +sumo -b 0 -e 10000 -n net.net.xml -r input_routes.rou.xml -c parade.sumocfg --summary-output sum.out +cat sum.out +echo "run: OK" diff -Nru sumo-1.1.0+dfsg1/build/debian/upstream/metadata sumo-1.2.0+dfsg1/build/debian/upstream/metadata --- sumo-1.1.0+dfsg1/build/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/upstream/metadata 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,12 @@ +Reference: + Author: P. Alvarez Lopez and M. Behrisch and L. Bieker-Walz and J. Erdmann and Y.-P. Floetteroed and R. Hilbrich and L. Luecken and J. Rummel and P. Wagner and E. Wiessner + Title: "Microscopic Traffic Simulation using SUMO" + Journal: ITSC 2018, The 21st IEEE International Conference on Intelligent Transportation Systems + Year: 2018 + Type: INPROCEEDINGS + eprint: https://elib.dlr.de/124092/ +Bug-Database: https://github.com/eclipse/sumo/issues +Screenshots: https://sumo.dlr.de/wiki/Screenshots +FAQ: https://sumo.dlr.de/wiki +Homepage: https://sumo.dlr.de/ +Name: SUMO - Simulation of Urban MObility diff -Nru sumo-1.1.0+dfsg1/build/debian/watch sumo-1.2.0+dfsg1/build/debian/watch --- sumo-1.1.0+dfsg1/build/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/debian/watch 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,4 @@ +version=3 +opts=repacksuffix=+dfsg1,uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb|-dfsg)\d*$// \ +http://sf.net/sumo/sumo-src-([\d.]+)\.tar\.gz debian uupdate + diff -Nru sumo-1.1.0+dfsg1/build/docker/Dockerfile.fedora sumo-1.2.0+dfsg1/build/docker/Dockerfile.fedora --- sumo-1.1.0+dfsg1/build/docker/Dockerfile.fedora 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/docker/Dockerfile.fedora 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,10 @@ +FROM fedora:rawhide + +RUN dnf -y upgrade +RUN dnf -y install proj-devel xerces-c-devel git cmake make gcc-c++ +RUN dnf -y install fox-devel freetype-devel fontconfig-devel libXft-devel libXcursor-devel libXrandr-devel libXi-devel libjpeg-devel libtiff-devel libGLU-devel +# optional libs +RUN dnf -y install gdal-devel swig python-devel java-devel gl2ps-devel OpenSceneGraph-devel gtest-devel +RUN git clone https://github.com/eclipse/sumo +RUN cd sumo; mkdir cmake-build; cd cmake-build; cmake .. && make -j && make install + diff -Nru sumo-1.1.0+dfsg1/build/docker/Dockerfile.opensuse sumo-1.2.0+dfsg1/build/docker/Dockerfile.opensuse --- sumo-1.1.0+dfsg1/build/docker/Dockerfile.opensuse 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/docker/Dockerfile.opensuse 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,6 @@ +FROM opensuse:latest + +ENV LANG=en_US.UTF-8 + +RUN zypper -n ar -G http://download.opensuse.org/repositories/home:/behrisch/openSUSE_Leap_42.3/ nightly +RUN zypper -n in sumo-git diff -Nru sumo-1.1.0+dfsg1/build/package/debian.changelog sumo-1.2.0+dfsg1/build/package/debian.changelog --- sumo-1.1.0+dfsg1/build/package/debian.changelog 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/debian.changelog 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,35 @@ +sumo (0.13.1-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Tue, 01 Nov 2011 10:24:24 +0100 + +sumo (0.13.0-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Wed, 13 Jul 2011 16:58:57 +0200 + +sumo (0.12.3-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Wed, 13 Apr 2011 19:28:57 +0200 + +sumo (0.10.2-1) unstable; urgency=low + + * New upstream release. + + -- Michael Behrisch Mon, 16 Mar 2009 22:00:47 +0100 + +sumo (0.10.1-1) unstable; urgency=low + + * Update + + -- Michael Behrisch Sun, 15 Feb 2009 22:34:33 +0200 + +sumo (0.9.10-1) unstable; urgency=low + + * Initial Release + + -- Michael Behrisch Thu, 23 Oct 2008 23:04:33 +0200 diff -Nru sumo-1.1.0+dfsg1/build/package/debian.control sumo-1.2.0+dfsg1/build/package/debian.control --- sumo-1.1.0+dfsg1/build/package/debian.control 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/debian.control 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,13 @@ +Source: sumo +Section: unknown +Priority: optional +Maintainer: Michael Behrisch +Build-Depends: debhelper (>= 4.1.16), g++, libxerces-c-dev | libxerces-c2-dev, libgdal1-1.3.2-dev | libgdal1-dev, libproj-dev | proj, libfox-1.6-dev, libxrandr-dev, libbz2-dev, libcupsys2-dev + +Package: sumo +Architecture: any +Depends: ${shlibs:Depends} +Description: Simulation of Urban MObility (SUMO) + SUMO is an open source, + highly portable, microscopic road traffic simulation package + designed to handle large road networks. diff -Nru sumo-1.1.0+dfsg1/build/package/debian.rules sumo-1.2.0+dfsg1/build/package/debian.rules --- sumo-1.1.0+dfsg1/build/package/debian.rules 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/debian.rules 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,87 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=4 + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + ./configure --prefix=/usr + make all + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. +# make clean + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/debian/ + make install DESTDIR=/usr/src/packages/BUILD/debian/sumo + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install + Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/build/package/netedit.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/build/package/netedit.png differ diff -Nru sumo-1.1.0+dfsg1/build/package/obs_config sumo-1.2.0+dfsg1/build/package/obs_config --- sumo-1.1.0+dfsg1/build/package/obs_config 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/obs_config 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,19 @@ +%if 0%{?mandriva_version} + Substitute: libnetcdf-devel netcdf-devel + Substitute: hdf-devel HDF-devel +%endif +%if 0%{?suse_version} == 1020 || 0%{?fedora_version} + Substitute: libnetcdf-devel netcdf +%endif +%if 0%{?fedora_version} + Substitute: libgdal-devel gdal-devel blas lapack + Substitute: libproj-devel proj-devel +%endif +%if 0%{?centos_version} || 0%{?rhel_version} + Substitute: gcc-fortran gcc-gfortran +%endif +%if 0%{?fedora_version} || 0%{?mandriva_version} + Substitute: Xerces-c-devel xerces-c-devel + Substitute: Xerces-c xerces-c +%endif + diff -Nru sumo-1.1.0+dfsg1/build/package/sumo.changes sumo-1.2.0+dfsg1/build/package/sumo.changes --- sumo-1.1.0+dfsg1/build/package/sumo.changes 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/sumo.changes 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Dec 19 23:21:36 CET 2011 - behrisch@users.sf.net + +- Initial package creation with changelog. diff -Nru sumo-1.1.0+dfsg1/build/package/sumo.dsc sumo-1.2.0+dfsg1/build/package/sumo.dsc --- sumo-1.1.0+dfsg1/build/package/sumo.dsc 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/sumo.dsc 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,9 @@ +Format: 1.0 +Source: sumo +Version: svn-1 +Binary: sumo +Maintainer: Michael Behrisch +Architecture: any +Build-Depends: debhelper (>= 4.1.16), g++, libxerces-c-dev | libxerces-c2-dev, libgdal1-1.3.2-dev | libgdal1-dev, libproj-dev | proj, libfox-1.6-dev, libxrandr-dev, libbz2-dev, libcupsys2-dev +Files: + d57283ebb8157ae919762c58419353c8 133282 sumo_5.6.orig.tar.gz Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/build/package/sumo.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/build/package/sumo.png differ diff -Nru sumo-1.1.0+dfsg1/build/package/sumo.sh sumo-1.2.0+dfsg1/build/package/sumo.sh --- sumo-1.1.0+dfsg1/build/package/sumo.sh 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/sumo.sh 2019-04-15 14:11:30.000000000 +0000 @@ -1,3 +1,2 @@ -#!/bin/bash # set a global environment variable for finding data and tools export SUMO_HOME=/usr/share/sumo diff -Nru sumo-1.1.0+dfsg1/build/package/sumo.spec sumo-1.2.0+dfsg1/build/package/sumo.spec --- sumo-1.1.0+dfsg1/build/package/sumo.spec 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/sumo.spec 2019-04-15 14:11:30.000000000 +0000 @@ -2,7 +2,7 @@ # spec file for package sumo # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (c) 2001-2018 DLR (http://www.dlr.de/) and contributors +# Copyright (c) 2001-2019 DLR (http://www.dlr.de/) and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,15 +20,17 @@ Name: sumo Version: git Release: 0 +# The Epoch line makes sure the nightly build is always considered newer than a release build. +# It should be removed for release builds. Epoch: 2 Summary: Eclipse Simulation of Urban Mobility - A Microscopic Traffic Simulation License: EPL-2.0 Group: Productivity/Scientific/Other URL: http://sumo.dlr.de/ -Source0: sumo-src-%{version}.tar.gz -Source1: sumo-doc-%{version}.zip -Source2: %{name}.xml +Source0: sumo-all-%{version}.tar.gz BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: python BuildRequires: help2man BuildRequires: pkgconfig BuildRequires: unzip @@ -59,10 +61,12 @@ highly portable, microscopic traffic simulation package designed to handle large road networks. +%if 0%{?fedora_version} +%global debug_package %{nil} +%endif + %prep %setup -q -unzip -o %{SOURCE1} -d .. -mv docs/tutorial docs/examples # Use real shebang %if 0%{?fedora_version} > 28 find . -name "*.py" -o -name "*.pyw" | xargs sed -i 's,^#!%{_bindir}/env python$,#!%{_bindir}/python2,' @@ -71,14 +75,17 @@ %endif %build -%configure +mkdir cmake-build +cd cmake-build +cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. make %{?_smp_mflags} make %{?_smp_mflags} man %install +cd cmake-build %make_install mkdir -p %{buildroot}%{_datadir}/sumo -cp -a tools data %{buildroot}%{_datadir}/sumo +cp -a ../tools ../data %{buildroot}%{_datadir}/sumo mkdir -p %{buildroot}%{_bindir} ln -s %{_bindir} %{buildroot}%{_datadir}/sumo/bin ln -s %{_datadir}/sumo/tools/assign/duaIterate.py %{buildroot}%{_bindir}/duaIterate.py @@ -86,15 +93,16 @@ ln -s %{_datadir}/sumo/tools/randomTrips.py %{buildroot}%{_bindir}/randomTrips.py ln -s %{_datadir}/sumo/tools/traceExporter.py %{buildroot}%{_bindir}/traceExporter.py install -d -m 755 %{buildroot}%{_mandir}/man1 -install -p -m 644 docs/man/*.1 %{buildroot}%{_mandir}/man1 +install -p -m 644 ../docs/man/*.1 %{buildroot}%{_mandir}/man1 install -d -m 755 %{buildroot}%{_sysconfdir}/profile.d -install -p -m 644 build/package/*sh %{buildroot}%{_sysconfdir}/profile.d +install -p -m 644 ../build/package/*sh %{buildroot}%{_sysconfdir}/profile.d install -d -m 755 %{buildroot}%{_datadir}/applications -install -p -m 644 build/package/%{name}.desktop %{buildroot}%{_datadir}/applications +install -p -m 644 ../build/package/%{name}.desktop %{buildroot}%{_datadir}/applications install -d -m 755 %{buildroot}%{_datadir}/pixmaps -install -p -m 644 build/package/%{name}.png %{buildroot}%{_datadir}/pixmaps +install -p -m 644 ../build/package/%{name}.png %{buildroot}%{_datadir}/pixmaps %if 0%{?suse_version} -install -Dm644 %{SOURCE2} %{buildroot}%{_datadir}/mime/application/%{name}.xml +install -d -m 755 %{buildroot}%{_datadir}/mime/application +install -p -m 644 ../build/package/%{name}.xml %{buildroot}%{_datadir}/mime/application/%{name}.xml %fdupes -s docs %fdupes %{buildroot} %endif @@ -103,7 +111,12 @@ %defattr(-,root,root) %{_bindir}/* %{_datadir}/sumo -%doc AUTHORS LICENSE README.md ChangeLog CONTRIBUTING.md NOTICE.md docs/pydoc docs/userdoc docs/examples +%doc AUTHORS README.md ChangeLog CONTRIBUTING.md NOTICE.md docs/pydoc docs/userdoc docs/examples docs/tutorial +%if 0%{?suse_version} < 1500 +%doc LICENSE +%else +%license LICENSE +%endif %{_mandir}/man1/* %{_sysconfdir}/profile.d/%{name}.*sh %{_datadir}/applications/%{name}.desktop diff -Nru sumo-1.1.0+dfsg1/build/package/sumo.xml sumo-1.2.0+dfsg1/build/package/sumo.xml --- sumo-1.1.0+dfsg1/build/package/sumo.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/package/sumo.xml 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,9 @@ + + + + + Sumo Configuration File + Sumo Konfigurationsdatei + + + Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/build/wix/bannrbmp.bmp and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/build/wix/bannrbmp.bmp differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/build/wix/dlgbmp.bmp and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/build/wix/dlgbmp.bmp differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/build/wix/dlgbmp.pxm and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/build/wix/dlgbmp.pxm differ diff -Nru sumo-1.1.0+dfsg1/build/wix/License.rtf sumo-1.2.0+dfsg1/build/wix/License.rtf --- sumo-1.1.0+dfsg1/build/wix/License.rtf 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/wix/License.rtf 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,328 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1031\deflangfe1031\themelang1031\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;} +{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f375\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\f376\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f378\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f379\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f380\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f381\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f382\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f383\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f715\fbidi \froman\fcharset238\fprq2 Cambria Math CE;} +{\f716\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f718\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f719\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f722\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;} +{\f723\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;} +{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} +{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0; +\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp +\fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 \snext0 \sqformat \spriority0 Normal;}{ +\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 +\sbasedon0 \snext0 \slink15 \sqformat \spriority9 heading 1;}{\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 +\fs24\lang1033\langfe1031\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 \sbasedon0 \snext0 \slink16 \sqformat heading 2;}{\s3\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 +\ltrch\fcs0 \fs24\lang1033\langfe1031\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 \sbasedon0 \snext0 \slink17 \sqformat heading 3;}{\s4\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel3\rin0\lin0\itap0 \rtlch\fcs1 +\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 \sbasedon0 \snext0 \slink18 \sqformat heading 4;}{\s5\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel4\rin0\lin0\itap0 +\rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 \sbasedon0 \snext0 \slink19 \sqformat heading 5;}{ +\s6\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel5\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 \sbasedon0 \snext0 \slink20 \sqformat +heading 6;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 \snext11 \ssemihidden \sunhideused +Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\kerning32\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink1 \slocked \spriority9 \'dcberschrift 1 Zchn;}{\*\cs16 \additive \rtlch\fcs1 \ab\ai\af0\afs28 \ltrch\fcs0 +\b\i\fs28\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink2 \slocked \ssemihidden \spriority9 \'dcberschrift 2 Zchn;}{\*\cs17 \additive \rtlch\fcs1 \ab\af0\afs26 \ltrch\fcs0 \b\fs26\loch\f31502\hich\af31502\dbch\af31501 +\sbasedon10 \slink3 \slocked \ssemihidden \spriority9 \'dcberschrift 3 Zchn;}{\*\cs18 \additive \rtlch\fcs1 \ab\af0\afs28 \ltrch\fcs0 \b\fs28 \sbasedon10 \slink4 \slocked \ssemihidden \spriority9 \'dcberschrift 4 Zchn;}{\*\cs19 \additive \rtlch\fcs1 +\ab\ai\af0\afs26 \ltrch\fcs0 \b\i\fs26 \sbasedon10 \slink5 \slocked \ssemihidden \spriority9 \'dcberschrift 5 Zchn;}{\*\cs20 \additive \rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b \sbasedon10 \slink6 \slocked \ssemihidden \spriority9 \'dcberschrift 6 Zchn;}} +{\*\pgptbl {\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp1\itap0\li720\ri720\sb100\sa100}}{\*\rsidtbl \rsid3874418\rsid9765201\rsid11224964}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0 +\mnaryLim1}{\info{\doccomm Created by the \\'abHTML to RTF .Net\\'bb 5.8.8.17}{\operator Michael Behrisch}{\creatim\yr2017\mo10\dy6\hr18\min52}{\revtim\yr2017\mo10\dy6\hr19\min9}{\version3}{\edmins0}{\nofpages3}{\nofwords1912}{\nofchars12048} +{\nofcharsws13933}{\vern49167}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw11907\paperh16839\margl567\margr567\margt283\margb567\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120 +\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale162\viewzk2\viewnobound1\rsidroot9765201 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1 +\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5 +\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\s1\ql \li540\ri540\sb100\sa100\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 +\ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 Eclipse Public License - v 2.0 +\par }\pard\plain \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 +\f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid273565 \'93AGREEMENT\'94}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 1. DEFINITIONS +\par }\pard\plain \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid273565 \'93Contribution\'94}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 + means: +\par }\pard \ltrpar\ql \li1260\ri540\sb100\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +a) in the case of the initial Contributor, the initial content Distributed under this Agreement, a\hich\af0\dbch\af31505\loch\f0 nd +\par }\pard \ltrpar\ql \li1260\ri540\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +b) in the case of each subsequent Contributor: +\par }\pard \ltrpar\ql \li1980\ri540\sb100\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1980\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +i) changes to the Program, and +\par }\pard \ltrpar\ql \li1980\ri540\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1980\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +ii) additions to the Program; +\par }\pard \ltrpar\ql \li1260\ri540\nowidctlpar\wrapdefault\faauto\rin540\lin1260\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid273565 \'93originates +\'94}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 + from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. +\par }\pard \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0\pararsid11224964 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid11224964 \loch\af0\dbch\af31505\hich\f0 \'93 +\loch\f0 \hich\f0 Contributor\'94\loch\f0 means any person or entity that Distributes the Program. +\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Licensed Patents\'94\loch\f0 mean patent claims licensable by a Contributor wh\hich\af0\dbch\af31505\loch\f0 +ich are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. +\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Program\'94\loch\f0 means the Contributions Distributed in accordance with this Agreement. +\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Recipient\'94\loch\f0 means anyone who receives the Program under this Ag\hich\af0\dbch\af31505\loch\f0 reement or any Secondary License (as applicable), including Contributors. +\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Derivative Works\'94\loch\f0 shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elab +\hich\af0\dbch\af31505\loch\f0 orations, or other modifications represent, as a whole, an original work of authorship. +\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Modified Works\'94\loch\f0 shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, incl +\hich\af0\dbch\af31505\loch\f0 +uding, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in eac +\hich\af0\dbch\af31505\loch\f0 h\hich\af0\dbch\af31505\loch\f0 case in order to link to, bind by name, or subclass the Program or Modified Works thereof. }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 +\f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid11224964 +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid11224964 \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Distribute\'94\loch\f0 + means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. +\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Source Code\'94\loch\f0 means the form of a Program\hich\af0\dbch\af31505\loch\f0 + preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. +\par \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 \hich\f0 Secondary License\'94\loch\f0 means either the GNU General Public License, Version 2.0, or any later versions of that license, inc\hich\af0\dbch\af31505\loch\f0 +luding any exceptions or additional permissions as identified by }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 the }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 +\f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 initial Contributor. +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 2. GRANT OF RIGHTS +\par }\pard\plain \ltrpar\ql \li1260\ri540\sb100\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +a) Subject to the terms of\hich\af0\dbch\af31505\loch\f0 + this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contribu +\hich\af0\dbch\af31505\loch\f0 t\hich\af0\dbch\af31505\loch\f0 or, if any, and such Derivative Works. +\par }\pard \ltrpar\ql \li1260\ri540\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwi\hich\af0\dbch\af31505\loch\f0 +se transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of t +\hich\af0\dbch\af31505\loch\f0 h\hich\af0\dbch\af31505\loch\f0 +e Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. +\par \hich\af0\dbch\af31505\loch\f0 c) Recipient understands that although eac\hich\af0\dbch\af31505\loch\f0 +h Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any +\hich\af0\dbch\af31505\loch\f0 l\hich\af0\dbch\af31505\loch\f0 +iability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to s +\hich\af0\dbch\af31505\loch\f0 e\hich\af0\dbch\af31505\loch\f0 +cure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +\par \hich\af0\dbch\af31505\loch\f0 d)\hich\af0\dbch\af31505\loch\f0 Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. +\par \hich\af0\dbch\af31505\loch\f0 e) Notwithstanding the terms of any Secondary License, no Contributor makes addi\hich\af0\dbch\af31505\loch\f0 +tional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 3. REQUIREMENTS +\par }\pard\plain \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 3.1 If a Contributor Distributes the Program in any form, then: +\par }\pard \ltrpar\ql \li1260\ri540\sb100\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program \hich\af0\dbch\af31505\loch\f0 +is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and +\par }\pard \ltrpar\ql \li1260\ri540\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +b) the Contributor may Distribute the Program under a license different than this Agreemen\hich\af0\dbch\af31505\loch\f0 t, provided that such license: +\par }\pard \ltrpar\ql \li1980\ri540\sb100\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1980\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merch\hich\af0\dbch\af31505\loch\f0 +antability and fitness for a particular purpose; +\par }\pard \ltrpar\ql \li1980\ri540\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1980\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +\par \hich\af0\dbch\af31505\loch\f0 iii) does not attemp\hich\af0\dbch\af31505\loch\f0 t to limit or alter the recipients' rights in the Source Code under section 3.2; and +\par \hich\af0\dbch\af31505\loch\f0 iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. +\par }\pard \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +3.2 When the Program is Dis\hich\af0\dbch\af31505\loch\f0 tributed as Source Code: +\par }\pard \ltrpar\ql \li1260\ri540\sb100\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source +\hich\af0\dbch\af31505\loch\f0 Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and +\par }\pard \ltrpar\ql \li1260\ri540\nowidctlpar\wrapdefault\faauto\ilvl12\rin540\lin1260\itap0\pararsid9765201 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +b) a copy of this Agreement must be included with each copy of the Program. +\par }\pard \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +3.3 Contributors may not remove or\hich\af0\dbch\af31505\loch\f0 \hich\f0 alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (\'e2\'80\'98\loch\f0 \hich\f0 notices\'e2\'80\'99\loch\f0 +) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their ow\hich\af0\dbch\af31505\loch\f0 n\hich\af0\dbch\af31505\loch\f0 appropriate notices. +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 4. COMMERCIAL DISTRIBUTION +\par }\pard\plain \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilit\hich\af0\dbch\af31505\loch\f0 +ate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in +\hich\af0\dbch\af31505\loch\f0 \hich\af0\dbch\af31505\loch\f0 a commercial product offering, such Contributor }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid273565 (\'93Commercial Contributor\'94 +) hereby agrees to defend and indemnify every other Contributor (\'93Indemnified Contributor\'94) against any losses, damages and costs (collectively \'93Losses\'94) }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 +\f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 arising from claims, lawsuits\hich\af0\dbch\af31505\loch\f0 + and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obl +\hich\af0\dbch\af31505\loch\f0 i\hich\af0\dbch\af31505\loch\f0 +gations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim +,\hich\af0\dbch\af31505\loch\f0 + and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. +\par \hich\af0\dbch\af31505\loch\f0 For example, a Co\hich\af0\dbch\af31505\loch\f0 +ntributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance +\hich\af0\dbch\af31505\loch\f0 c\hich\af0\dbch\af31505\loch\f0 +laims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requi +\hich\af0\dbch\af31505\loch\f0 r\hich\af0\dbch\af31505\loch\f0 es any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 5. NO WARRANTY +\par }\pard\plain \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN }{ +\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid9765201\charrsid11224964 \loch\af0\dbch\af31505\hich\f0 \'84}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 +\hich\af0\dbch\af31505\loch\f0 AS IS}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid9765201\charrsid11224964 \loch\af0\dbch\af31505\hich\f0 \'93}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 +\f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsib +\hich\af0\dbch\af31505\loch\f0 +le for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable +\hich\af0\dbch\af31505\loch\f0 l\hich\af0\dbch\af31505\loch\f0 aws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 6. DISCLAIMER OF LIABILITY +\par }\pard\plain \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING W +\hich\af0\dbch\af31505\loch\f0 I\hich\af0\dbch\af31505\loch\f0 +THOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHT +\hich\af0\dbch\af31505\loch\f0 S\hich\af0\dbch\af31505\loch\f0 GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 7. GENERAL +\par }\pard\plain \ltrpar\ql \li540\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of thi\hich\af0\dbch\af31505\loch\f0 +s Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +\par \hich\af0\dbch\af31505\loch\f0 If Recipient institutes patent litigation against any entity (including a cross-c\hich\af0\dbch\af31505\loch\f0 +laim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of +\hich\af0\dbch\af31505\loch\f0 \hich\af0\dbch\af31505\loch\f0 the date such litigation is filed. +\par \hich\af0\dbch\af31505\loch\f0 All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becomin +\hich\af0\dbch\af31505\loch\f0 +g aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any license +\hich\af0\dbch\af31505\loch\f0 s\hich\af0\dbch\af31505\loch\f0 granted by Recipient relating to the Program shall continue and survive. +\par \hich\af0\dbch\af31505\loch\f0 Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following man\hich\af0\dbch\af31505\loch\f0 +ner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreemen +\hich\af0\dbch\af31505\loch\f0 t\hich\af0\dbch\af31505\loch\f0 + Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may alwa +\hich\af0\dbch\af31505\loch\f0 y\hich\af0\dbch\af31505\loch\f0 +s be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. + +\par \hich\af0\dbch\af31505\loch\f0 Exce\hich\af0\dbch\af31505\loch\f0 +pt as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not +\hich\af0\dbch\af31505\loch\f0 e\hich\af0\dbch\af31505\loch\f0 +xpressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. +\par }\pard\plain \ltrpar\s2\ql \li540\ri540\sb180\sa90\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin540\lin540\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1031\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1031 { +\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid9765201\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 Exhibit A -}{\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 Form of Secon +\hich\af0\dbch\af31505\loch\f0 dary Licenses Notice +\par }\pard\plain \ltrpar\ql \li600\ri540\sb90\sa90\nowidctlpar\wrapdefault\faauto\rin540\lin600\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031 {\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid11224964\charrsid11224964 \loch\af0\dbch\af31505\hich\f0 \'93\loch\f0 +This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: \{n\hich\af0\dbch\af31505\loch\f0 +ame license(s), version(s), and exceptions or\hich\af0\dbch\af31505\loch\f0 additional permissions here\}\hich\f0 .\'94 +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1033\langfe1031\langnp1033\insrsid3874418\charrsid11224964 \hich\af0\dbch\af31505\loch\f0 +Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. +\par \hich\af0\dbch\af31505\loch\f0 If it is not possible or desirable to put the notice in a particular file, then Yo\hich\af0\dbch\af31505\loch\f0 +u may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. +\par \hich\af0\dbch\af31505\loch\f0 You may add additional accurate notices of copyright ownership. +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210060ffbff5a4060000a21b0000160000007468656d652f7468656d652f +7468656d65312e786d6cec594f6f1b4514bf23f11d467b6f6327761a4775aad8b11b6852a2d82dea71bc3bde9d66766735334eea1b6a8f484888823850891b07 +04546a252ee5d3048aa048fd0abc99d95defc46b92b411ada039b4f6ec6fdefff79b37ebabd7eec50c1d1221294fda5efd72cd4324f1794093b0eddd1af62fad +79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607f22d771db8b944ad79796a40fcb585ee62949e0d9988b182bf82ac2a540e023901bb3a5e55a6d +7529c634f150826310bb830595127b1bb9dc1e03e189927ac16762a0a5920a707050d71039955d26d021666d0f7404fc6848ee290f312c153c687b35f3e72d6d +5c5dc2ebd926a616ec2dedeb9bbf6c5fb6213858363a45382a94d6fb8dd695ad42be0130358febf57add5ebd906700d8f7c1556b4b5966a3bf56efe4324b20fb +715e76b7d6ac355c7c49feca9ccdad4ea7d36c65b658a106643f36e6f06bb5d5c6e6b28337208b6fcee11b9dcd6e77d5c11b90c5afcee1fb575aab0d176f4011 +a3c9c11c5a27b4dfcfa417903167db95f03580afd532f80c05d55094975631e6895a586c31becb451f101ac9b0a20952d3948cb10f25dcc5f14850ac35e07582 +4b4fec922fe796b432247d4153d5f63e4c31b4c34cdecb673fbc7cf6041ddf7f7a7cffe7e3070f8eefff640539bbb671129677bdf8eef3bf1e7d82fe7cf2ed8b +875f56e36519ffdb8f9ffefacb17d540e89f9939cfbf7afcfbd3c7cfbffeec8fef1f56c037051e95e1431a13896e9223b4cf6370cc44c5b59c8cc4f9760c234c +cb3b369350e2046b2d15f27b2a72d037a79865d971ece8103782b705f04715f0fae4ae63f0201213452b34df886207b8cb39eb705119851b5a5729ccc3491256 +2b1793326e1fe3c32add5d9c38f9ed4d5260cebc2c1dc7bb1171ccdc63385138240951483fe30784547877875227aebbd4175cf2b1427728ea605a1992211d39 +d534dbb44d63c8cbb4ca67c8b7139bdddba8c35995d75be4d0454257605661fc9030278cd7f144e1b84ae410c7ac1cf01daca22a230753e197713da920d32161 +1cf502a2cfb4f9d2ff4880bfa5a4dfc040599569df65d3d8450a450faa64ee60cecbc82d7ed08d709c5661073489cad80fe4019428467b5c55c177b9db21fa3b +e401270bd37d9b1227dda7b3c12d1a3a26cd0a443f99888a285e27dca9dfc1948d31315403acee70754c937f226e4681b9ad868b236ea0cae7df3caab0fb6da5 +ec4d38bdaa7a66fb04512fc29da4e72e17017dfbd9790b4f923d020d31dfa7efc8f91d397bff79725ed4cf174fc933160682d6b3889db4cddc1d2f1ebbc794b1 +819a32b223cde42de1f009fab0a8379afb2629ee6169041f752b830607170a6cf620c1d5c754458308a730b5d73d2d249499e850a2944bb82e9ae54ad91a0f93 +bfb297cda6be8658ea9058edf2c02eafe8e5fcb65188315685e64e9b2b5ad102ceaa6ce54a26147c7b1565756dd499b5d58d6986151d6d85cb3ac4e65e0e212f +5c83c5229a30d520988520caab70e3d7aae1b683190974dc6d8ef2b4982c5c648a64840392e548fb3d9fa3ba49525e2b738e683f6c31e8abe329512b696b69b1 +afa1ed2c492aab6b2c509767ef75b29457f02c4b20ed643bb2a4dc9c2c41476dafd55c6e7ac8c769db1bc345193ec629645dea4112b3105e35f94ad8b23fb599 +4d97cfb2d9ca1d739ba00e2f3f6cdce71c76782015526d6119d9d2308fb2126089d664ed5f6e42582fca810a363a9b152b6b500c6fcc0a88a39b5a321e135f95 +935d5ad1b1b35f332ae51345c4200a8ed0884dc43e86f4eb52057f022ae17d876104fd05decee9689b472e39674d577e276670761db334c219ddea16cd3bd9c2 +0d211536986f25f3c0b74adb8d73e777c5b4fc05b9522ee3ff992bfa3c81d70f2b81ce800f2f860546ba53da1e172ae2c0426944fdbe80c9c17007540bbce185 +c75054f07adafc2fc8a1fedff69c9561da1a6e916a9f864850388f542408d9035a32d5778ab07a767659912c13642aaa64ae4cadd9237248d85073e0aa3edb3d +1441a91b36c968c0e04ed69ffb3deba051a8879c72bf394c569cbdb607feedc9c7363338e5f2b01968f2f8172616e3c1ec54b5fbcdf6fcec2d3ba21fccc6ac46 +de15a0ac7414b4b2b67f4513ce79d45ac69af378b9991b07599cf718168b812885974848ff03e71f153e23a68cf5813ae4fbc0ad087ebed0c2a06ca0aa2fd9c1 +036982b48b23189ceca22d262dca86361b9d74d4f2c3fa8227dd42ef89606bcbce92ef7306bb18ce5c754e2f5e64b0b3083bb1b66b0b430d993dd9a2b034ce6f +322631e647b2f28f597c741712bd053f1a4c9892a698e0972a8161861e983e80e6b71acdd68dbf010000ffff0300504b0304140006000800000021000dd1909f +b60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f +6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b0 +60828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509a +ffb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000 +001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c000 +0000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c +00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210060ffbf +f5a4060000a21b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021 +000dd1909fb60000001b0100002700000000000000000000000000ae0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000a90a00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 2;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 3; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 4;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 5;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4; +\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid; +\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography; +\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000007032 +22dac53ed301feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/build/wix/SUMOInstallDirDlg.wxs sumo-1.2.0+dfsg1/build/wix/SUMOInstallDirDlg.wxs --- sumo-1.1.0+dfsg1/build/wix/SUMOInstallDirDlg.wxs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/wix/SUMOInstallDirDlg.wxs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,33 @@ + + + + + + + + + + 1 + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/build/wix/SUMOWixUI_InstallDir.wxs sumo-1.2.0+dfsg1/build/wix/SUMOWixUI_InstallDir.wxs --- sumo-1.1.0+dfsg1/build/wix/SUMOWixUI_InstallDir.wxs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/wix/SUMOWixUI_InstallDir.wxs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + "1"]]> + + 1 + + NOT Installed + Installed AND PATCH + + 1 + LicenseAccepted = "1" + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + 1 + 1 + + NOT Installed + Installed AND NOT PATCH + Installed AND PATCH + + 1 + + 1 + 1 + 1 + + + + + + + \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/build/wix/sumo.wxs sumo-1.2.0+dfsg1/build/wix/sumo.wxs --- sumo-1.1.0+dfsg1/build/wix/sumo.wxs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/build/wix/sumo.wxs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + MODIFYENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MODIFYENV + + + + + MODIFYENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/CMakeLists.txt sumo-1.2.0+dfsg1/CMakeLists.txt --- sumo-1.1.0+dfsg1/CMakeLists.txt 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -3,7 +3,9 @@ option(MULTITHREADED_BUILD "Use all available cores for building (applies to Visual Studio only)" true) option(PROFILING "Enable output of profiling data (applies to gcc/clang builds only)" false) option(COVERAGE "Enable output of coverage data (applies to gcc/clang builds only)" false) +option(SUMO_UTILS "Enable generation of a shared library for the utility functions for option handling, XML parsing etc." false) set(BINARY_SUFFIX "" CACHE STRING "Append the suffix to every generated binary") +set(COMPILE_DEFINITIONS "" CACHE STRING "Macros or defines to add when compiling") # Set a default build type if none was specified # you may use -DCMAKE_BUILD_TYPE:STRING=Debug from the command line @@ -18,7 +20,7 @@ endif() project(SUMO) -set(PACKAGE_VERSION "1.1.0") +set(PACKAGE_VERSION "1.2.0") cmake_minimum_required(VERSION 3.1) # do not expand quoted variables in if statements cmake_policy(SET CMP0054 NEW) @@ -28,10 +30,14 @@ set(ENABLED_FEATURES "${CMAKE_SYSTEM} ${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}") +if(COMPILE_DEFINITIONS) + add_compile_definitions(${COMPILE_DEFINITIONS}) +endif() + # compiler specific flags if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wall -pedantic -Wextra") set(ENABLED_FEATURES "${ENABLED_FEATURES} ${CMAKE_BUILD_TYPE}") if (PROFILING) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") @@ -56,7 +62,13 @@ # special debug flags set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -stdlib=libstdc++ -fsanitize=undefined,address,integer,unsigned-integer-overflow -fno-omit-frame-pointer -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/build/clang_sanitize_blacklist.txt") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined,address,integer,unsigned-integer-overflow -fno-omit-frame-pointer -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/build/clang_sanitize_blacklist.txt") +endif () + +# we need to build position independent code when generating a shared library +if (SUMO_UTILS) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + set(ENABLED_FEATURES "${ENABLED_FEATURES} SumoUtilsLibrary") endif () set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) @@ -120,7 +132,7 @@ if (NOT SUMO_LIBRARIES AND EXISTS "${CMAKE_SOURCE_DIR}/../SUMOLibraries") set(SUMO_LIBRARIES "${CMAKE_SOURCE_DIR}/../SUMOLibraries") endif () -if (SUMO_LIBRARIES) +if (SUMO_LIBRARIES AND WIN32) # Special option for MinGW32 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND WIN32) if(USE_MINGW_64BITS) @@ -130,7 +142,7 @@ message(STATUS "Using 32 bit libraries from SUMO_LIBRARIES placed in " ${SUMO_LIBRARIES} " for MinGW compilation") set(CHECK_OPTIONAL_LIBS false) endif() - elseif(${CMAKE_MODULE_LINKER_FLAGS} STREQUAL "/machine:x64") + elseif("${CMAKE_MODULE_LINKER_FLAGS}" STREQUAL "/machine:x64") message(STATUS "Using 64 bit libraries from SUMO_LIBRARIES placed in " ${SUMO_LIBRARIES}) set(LIB_VERSION "_64") else() @@ -152,19 +164,17 @@ "${SUMO_LIBRARIES}/3rdPartyLibs/libpng-?.?.??${LIB_VERSION}/*/*.dll" "${SUMO_LIBRARIES}/3rdPartyLibs/tiff-?.?.?${LIB_VERSION}/libtiff/*/*.dll" "${SUMO_LIBRARIES}/3rdPartyLibs/zlib-?.?.??${LIB_VERSION}/*/*.dll") + file(GLOB GTEST_ROOT "${SUMO_LIBRARIES}/googletest-?.?.?/googletest") # set GoogleTest only if compiler isn't mingw32 - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND WIN32) - if(USE_MINGW_64BITS) - # Prevent GoogleTest from overriding our compiler/linker options - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - add_subdirectory("${SUMO_LIBRARIES}/googletest-1.8.0/googletest" - "${CMAKE_BINARY_DIR}/googletest-build") - include_directories("${SUMO_LIBRARIES}/googletest-1.8.0/googletest/include") - set(GTEST_BOTH_LIBRARIES "gtest" "gtest_main") - set(GTEST_FOUND true) - else() - message(STATUS "Disabled Google Test in Mingw32") - endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND WIN32 AND NOT USE_MINGW_64BITS) + message(STATUS "Disabled Google Test in Mingw32") + else() + # Prevent GoogleTest from overriding our compiler/linker options + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + add_subdirectory("${GTEST_ROOT}" "${CMAKE_BINARY_DIR}/googletest-build") + include_directories("${GTEST_ROOT}/include") + set(GTEST_BOTH_LIBRARIES "gtest" "gtest_main") + set(GTEST_FOUND true) endif() file(GLOB FFMPEG_PATH "${SUMO_LIBRARIES}/FFMPEG-?.?.?${LIB_VERSION}") file(GLOB OSG_PATH "${SUMO_LIBRARIES}/OSG-?.?.?${LIB_VERSION}") @@ -188,10 +198,10 @@ set(Protobuf_PROTOC_EXECUTABLE "${SUMO_LIBRARIES}/3rdPartyLibs/protobuf-3.5.1${LIB_VERSION}/cmake/Release/protoc.exe") set(Protobuf_LIBRARY_DEBUG "${CMAKE_LIBRARY_PATH};${SUMO_LIBRARIES}/protobuf-3.5.1${LIB_VERSION}/cmake/Debug/libprotobufd.lib") set(Protobuf_LIBRARY "${CMAKE_LIBRARY_PATH};${SUMO_LIBRARIES}/protobuf-3.5.1${LIB_VERSION}/cmake/Release/libprotobuf.lib") -else (SUMO_LIBRARIES) +else () # for Linux and Mac only find_package(GTest) -endif (SUMO_LIBRARIES) +endif () find_package(XercesC REQUIRED) if (XercesC_FOUND) @@ -201,7 +211,6 @@ find_package(Proj) if (PROJ_FOUND) include_directories(${PROJ_INCLUDE_DIR}) - set(HAVE_PROJ 1) set(ENABLED_FEATURES "${ENABLED_FEATURES} Proj") endif (PROJ_FOUND) @@ -226,6 +235,8 @@ include_directories(${GDAL_INCLUDE_DIR}) set(HAVE_GDAL 1) set(ENABLED_FEATURES "${ENABLED_FEATURES} GDAL") + else (GDAL_FOUND) + set(GDAL_LIBRARY "") endif (GDAL_FOUND) find_package(FFMPEG) @@ -251,9 +262,7 @@ find_package(SWIG 3.0) if (SWIG_FOUND) - if (NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - endif () + set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(ENABLED_FEATURES "${ENABLED_FEATURES} SWIG") endif () @@ -293,6 +302,7 @@ # installation install(DIRECTORY data/ DESTINATION share/sumo/data) install(DIRECTORY tools/ DESTINATION share/sumo/tools + USE_SOURCE_PERMISSIONS PATTERN "calibration" EXCLUDE PATTERN "lisum-core" EXCLUDE PATTERN "lisum-gui" EXCLUDE @@ -380,6 +390,32 @@ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) endif() +# java targets +find_program(MVN_EXECUTABLE mvn) +find_program(ANT_EXECUTABLE ant) +if (MVN_EXECUTABLE AND ANT_EXECUTABLE) + add_custom_target(cadyts + COMMAND ${MVN_EXECUTABLE} --batch-mode -f tools/contributed/calibration/pom.xml clean install + COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/calibration/utilities/target/floetteroed-utilities-1.0.0.jar bin + COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/calibration/cadyts/target/cadyts-1.3.0-SNAPSHOT.jar bin + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + add_custom_target(traas + COMMAND ${ANT_EXECUTABLE} -f tools/contributed/traas/build.xml clean release + COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/traas/dist/TraaS.jar bin + COMMAND ${MVN_EXECUTABLE} install:install-file -Dfile=bin/TraaS.jar -DgroupId=de.tudresden -DartifactId=traas -Dversion=1.0 -Dpackaging=jar + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + add_custom_target(lisum-core DEPENDS traas + COMMAND ${MVN_EXECUTABLE} --batch-mode -f tools/contributed/lisum-core/pom.xml clean install + COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/lisum-core/target/lisum-core-1.0.1-SNAPSHOT.jar bin + COMMAND ${MVN_EXECUTABLE} install:install-file -Dfile=bin/lisum-core-1.0.1-SNAPSHOT.jar -DgroupId=de.dlr.ts -DartifactId=lisum-core -Dversion=1.0.1 -Dpackaging=jar + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + add_custom_target(lisum-gui DEPENDS lisum-core + COMMAND ${MVN_EXECUTABLE} --batch-mode -f tools/contributed/lisum-gui/pom.xml clean install + COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/lisum-gui/target/lisum-gui-1.0.jar bin + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + set(JAVA_TARGETS cadyts lisum-gui) +endif() + # example and dist targets add_custom_target(examples DEPENDS sumo netconvert dfrouter duarouter jtrrouter COMMAND ${PYTHON_EXECUTABLE} tools/extractTest.py -x -f tests/examples.txt -p docs/examples/runAll.py @@ -389,14 +425,15 @@ add_test(exampletest ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/docs/examples/runAll.py) find_package(Git) if (GIT_FOUND) - add_custom_target(dist DEPENDS examples doc - COMMAND rm -rf sumo-${PACKAGE_VERSION} sumo-${PACKAGE_VERSION}.zip sumo-src-${PACKAGE_VERSION}.tar.gz + add_custom_target(dist DEPENDS examples doc ${JAVA_TARGETS} + COMMAND rm -rf sumo-${PACKAGE_VERSION} sumo-${PACKAGE_VERSION}.zip sumo-src-${PACKAGE_VERSION}.tar.gz sumo-src-${PACKAGE_VERSION}.zip sumo-all-${PACKAGE_VERSION}.tar.gz sumo-all-${PACKAGE_VERSION}.zip COMMAND ${GIT_EXECUTABLE} archive --prefix sumo-${PACKAGE_VERSION}/ -o sumo-${PACKAGE_VERSION}.zip HEAD COMMAND unzip sumo-${PACKAGE_VERSION}.zip - COMMAND cp -a docs/tutorial docs/examples docs/userdoc docs/pydoc docs/javadoc docs/man sumo-${PACKAGE_VERSION}/docs + COMMAND cp -a docs/tutorial docs/examples sumo-${PACKAGE_VERSION}/docs COMMAND zip -r sumo-src-${PACKAGE_VERSION}.zip sumo-${PACKAGE_VERSION} COMMAND tar czf sumo-src-${PACKAGE_VERSION}.tar.gz sumo-${PACKAGE_VERSION} - COMMAND cp -a docs/doxygen sumo-${PACKAGE_VERSION}/docs + COMMAND cp -a docs/userdoc docs/pydoc docs/javadoc docs/man docs/doxygen sumo-${PACKAGE_VERSION}/docs + COMMAND cp bin/*.jar bin/*.bat sumo-${PACKAGE_VERSION}/bin COMMAND cp -a tests sumo-${PACKAGE_VERSION} COMMAND zip -r sumo-all-${PACKAGE_VERSION}.zip sumo-${PACKAGE_VERSION} COMMAND tar czf sumo-all-${PACKAGE_VERSION}.tar.gz sumo-${PACKAGE_VERSION} @@ -422,29 +459,4 @@ set_property(TARGET distcheck PROPERTY FOLDER "CMake") set_property(TARGET distcheck PROPERTY EXCLUDE_FROM_DEFAULT_BUILD TRUE) endif () - -# java targets -find_program(MVN_EXECUTABLE mvn) -find_program(ANT_EXECUTABLE ant) -if (MVN_EXECUTABLE AND ANT_EXECUTABLE) - add_custom_target(cadyts - COMMAND ${MVN_EXECUTABLE} --batch-mode -f tools/contributed/calibration/pom.xml clean install - COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/calibration/utilities/target/floetteroed-utilities-1.0.0.jar bin - COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/calibration/cadyts/target/cadyts-1.3.0-SNAPSHOT.jar bin - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - add_custom_target(traas - COMMAND ${ANT_EXECUTABLE} -f tools/contributed/traas/build.xml clean release - COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/traas/dist/TraaS.jar bin - COMMAND ${MVN_EXECUTABLE} install:install-file -Dfile=bin/TraaS.jar -DgroupId=de.tudresden -DartifactId=traas -Dversion=1.0 -Dpackaging=jar - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - add_custom_target(lisum-core DEPENDS traas - COMMAND ${MVN_EXECUTABLE} --batch-mode -f tools/contributed/lisum-core/pom.xml clean install - COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/lisum-core/target/lisum-core-1.0.1-SNAPSHOT.jar bin - COMMAND ${MVN_EXECUTABLE} install:install-file -Dfile=bin/lisum-core-1.0.1-SNAPSHOT.jar -DgroupId=de.dlr.ts -DartifactId=lisum-core -Dversion=1.0.1 -Dpackaging=jar - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - add_custom_target(lisum-gui DEPENDS lisum-core - COMMAND ${MVN_EXECUTABLE} --batch-mode -f tools/contributed/lisum-gui/pom.xml clean install - COMMAND ${CMAKE_COMMAND} -E copy tools/contributed/lisum-gui/target/lisum-gui-1.0.jar bin - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -endif() message(STATUS "Enabled features: ${ENABLED_FEATURES}") diff -Nru sumo-1.1.0+dfsg1/compile sumo-1.2.0+dfsg1/compile --- sumo-1.1.0+dfsg1/compile 2018-04-10 22:00:14.000000000 +0000 +++ sumo-1.2.0+dfsg1/compile 1970-01-01 00:00:00.000000000 +0000 @@ -1,347 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2012-10-14.11; # UTC - -# Copyright (C) 1999-2014 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program 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, 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 the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru sumo-1.1.0+dfsg1/config.guess sumo-1.2.0+dfsg1/config.guess --- sumo-1.1.0+dfsg1/config.guess 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/config.guess 1970-01-01 00:00:00.000000000 +0000 @@ -1,1480 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-02-24' - -# This file 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. -# -# 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 the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -# -# Please send patches to . - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2018 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." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "$UNAME_SYSTEM" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval "$set_cc_for_build" - cat <<-EOF > "$dummy.c" - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` - case "$UNAME_MACHINE_ARCH" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown - ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; - *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; - *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; - *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; - *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; - mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" - ;; - sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] - then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] - then - echo m88k-dg-dgux"$UNAME_RELEASE" - else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" - fi - else - echo i586-dg-dgux"$UNAME_RELEASE" - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ "$HP_ARCH" = hppa2.0w ] - then - eval "$set_cc_for_build" - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; - 3050*:HI-UX:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk - else - echo "$UNAME_MACHINE"-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; - *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; - *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; - *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; - i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; - *:Interix*:*) - case "$UNAME_MACHINE" in - x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; - IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; - esac ;; - i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - *:GNU:*:*) - # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; - aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arm*:Linux:*:*) - eval "$set_cc_for_build" - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi - else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } - ;; - mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; - sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; - x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - fi - exit ;; - xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; - i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; - i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" - else - echo mips-unknown-sysv"$UNAME_RELEASE" - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; - *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; - i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; -esac - -echo "$0: unable to guess system type" >&2 - -case "$UNAME_MACHINE:$UNAME_SYSTEM" in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru sumo-1.1.0+dfsg1/config.sub sumo-1.2.0+dfsg1/config.sub --- sumo-1.1.0+dfsg1/config.sub 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/config.sub 1970-01-01 00:00:00.000000000 +0000 @@ -1,1801 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-02-22' - -# This file 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. -# -# 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 the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2018 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." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - x64) - basic_machine=x86_64-pc - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4*) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $basic_machine in - arm*) - os=-eabi - ;; - *) - os=-elf - ;; - esac - ;; - -nacl*) - ;; - -ios) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - pru-*) - os=-elf - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` - ;; -esac - -echo "$basic_machine$os" -exit - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru sumo-1.1.0+dfsg1/configure sumo-1.2.0+dfsg1/configure --- sumo-1.1.0+dfsg1/configure 2018-12-17 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,20921 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sumo 1.1.0. -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# 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 - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -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'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - 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 : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # 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 -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - 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). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... 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 -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -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'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='sumo' -PACKAGE_TARNAME='sumo' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='sumo 1.1.0' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -ac_unique_file="src/sumo_main.cpp" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -ALLOCA -AM_CXXFLAGS -AM_CPPFLAGS -FFMPEG_LIBS -OSG_LIBS -PYTHON_LIBS -WITH_GTEST_FALSE -WITH_GTEST_TRUE -GTEST_LDFLAGS -GTEST_CONFIG -WITH_GUI_FALSE -WITH_GUI_TRUE -FOX_LDFLAGS -FOX_CONFIG -GDAL_LDFLAGS -GDAL_CONFIG -PROJ_LDFLAGS -LIB_XERCES -XERCES_LDFLAGS -XERCES_LIBS -XERCES_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -WITH_VERSION_H_FALSE -WITH_VERSION_H_TRUE -CXXCPP -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -ac_ct_AR -AR -DLLTOOL -OBJDUMP -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -RANLIB -LN_S -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -AR_FLAGS -ARFLAGS -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_debug -enable_profiling -enable_coverage -enable_pic -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -with_xerces -with_xerces_libraries -with_xerces_includes -with_proj_gdal -with_proj_libraries -with_proj_includes -with_gdal_config -with_fox_config -with_gtest_config -with_python -with_osg -with_ffmpeg -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -LT_SYS_LIBRARY_PATH -CXXCPP -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -XERCES_CFLAGS -XERCES_LIBS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # 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 1.1.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/sumo] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of sumo 1.1.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --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]. - --enable-coverage enable compilation of gcov coverage code - [default=no]. - --enable-pic enable compilation of position-independent code - [default=no], - --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] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - --with-xerces=DIR where Xerces-C is installed (libraries in DIR/lib, - headers in DIR/include). - --with-xerces-libraries=DIR - where the Xerces-C library is installed. - --with-xerces-includes=DIR - where the Xerces-C includes are. - --with-proj-gdal=DIR where PROJ and GDAL are installed (libraries in - DIR/lib, headers in DIR/include). - --with-proj-libraries=DIR - where the PROJ library is installed (overrides - previous settings). - --with-proj-includes=DIR - where the PROJ includes are (overrides previous - settings). - --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. - --with-osg enable OpenSceneGraph rendering. - --with-ffmpeg enable ffmpeg-based features. - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - CXXCPP C++ preprocessor - PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path - XERCES_CFLAGS - C compiler flags for XERCES, overriding pkg-config - XERCES_LIBS linker flags for XERCES, overriding pkg-config - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -sumo configure 1.1.0 -generated by GNU Autoconf 2.69 - -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 - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -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_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -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_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - 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>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - 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_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - 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. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext 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_c_check_header_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_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_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_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_c_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_c_check_func - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - 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>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - 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_link - -# 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_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $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 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -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;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $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 - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_cxx_check_header_mongrel - -# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES -# --------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -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 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext 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_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 1.1.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -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_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if ${ac_cv_target+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - -ac_config_headers="$ac_config_headers src/config.h" - - -am__api_version='1.15' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - 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. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# 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 ( - 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 - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -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. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -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;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# 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. -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. -set dummy ${ac_tool_prefix}strip; 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_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -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_prog_STRIP="${ac_tool_prefix}strip" - $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 - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; 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_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -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_prog_ac_ct_STRIP="strip" - $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 - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - 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) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -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. -set dummy $ac_prog; 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_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -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_prog_AWK="$ac_prog" - $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 - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -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." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='sumo' - VERSION='1.1.0' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -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 (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# 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}' - - -# 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_n "checking how to create a ustar tar archive... " >&6; } - - # 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 - - # 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 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { 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 : - $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 "$am_cv_prog_tar_ustar" >&6; } - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - -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 - - -# avoiding warnings on ubuntu 16.04, there seem to be two variants of the ARFLAGS, one for automake, one for libttol -ARFLAGS=cr - -AR_FLAGS=cr - - - -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; -fi - -if test x$enable_debug = xyes; then - -$as_echo "#define _DEBUG 1" >>confdefs.h - - CXXFLAGS="-std=c++11 -g -pthread $CXXFLAGS" - ac_enabled="$ac_enabled Debug" - program_transform_name="s,\$\$,D,; $program_transform_name" -else - CXXFLAGS="-std=c++11 -O2 -DNDEBUG $CXXFLAGS" - ac_disabled="$ac_disabled Debug" -fi - -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then : - enableval=$enable_profiling; -fi - -if test x$enable_profiling = xyes; then - CXXFLAGS="-pg $CXXFLAGS" - ac_enabled="$ac_enabled Profiling" -else - ac_disabled="$ac_disabled Profiling" -fi - -# Check whether --enable-coverage was given. -if test "${enable_coverage+set}" = set; then : - enableval=$enable_coverage; -fi - -if test x$enable_coverage = xyes; then - CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS -O0" - ac_enabled="$ac_enabled Coverage" -else - ac_disabled="$ac_disabled Coverage" -fi - -# Check whether --enable-pic was given. -if test "${enable_pic+set}" = set; then : - enableval=$enable_pic; -fi - -if test x$enable_pic = xyes; then - CXXFLAGS="-fPIC $CXXFLAGS" - ac_enabled="$ac_enabled PIC" -else - ac_disabled="$ac_disabled PIC" -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 -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; 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_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -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_prog_CC="${ac_tool_prefix}gcc" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; 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_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -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_prog_ac_ct_CC="gcc" - $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 - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; 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_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -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_prog_CC="${ac_tool_prefix}cc" - $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 - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; 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_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; 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_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -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_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 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -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_prog_ac_ct_CC="$ac_prog" - $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 - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -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_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -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_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -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; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { 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; } - if { ac_try='./conftest$ac_cv_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 - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -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_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#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); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -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=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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -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" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# 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 - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -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= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # 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". - 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. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > 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 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" - # 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. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # 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 - ;; - 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} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -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' -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 -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; 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_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -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_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 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -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_prog_ac_ct_CXX="$ac_prog" - $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 - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -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_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -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= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # 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". - 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. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > 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 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" - # 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. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # 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 - ;; - 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} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; 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, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -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_prog_RANLIB="${ac_tool_prefix}ranlib" - $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 - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -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_prog_ac_ct_RANLIB="ranlib" - $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 - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - 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_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - 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 -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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" - 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 -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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" - 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 -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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" - 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 -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; 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_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -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_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 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -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_prog_ac_ct_DUMPBIN="$ac_prog" - $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 - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # 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`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; 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_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -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_prog_OBJDUMP="${ac_tool_prefix}objdump" - $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 - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; 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_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -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_prog_ac_ct_OBJDUMP="objdump" - $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 - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; 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_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -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_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $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 - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; 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_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -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_prog_ac_ct_DLLTOOL="dlltool" - $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 - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; 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_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -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_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 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -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_prog_ac_ct_AR="$ac_prog" - $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 - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -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 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -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. -set dummy ${ac_tool_prefix}strip; 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_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -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_prog_STRIP="${ac_tool_prefix}strip" - $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 - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; 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_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -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_prog_ac_ct_STRIP="strip" - $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 - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -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_prog_RANLIB="${ac_tool_prefix}ranlib" - $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 - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -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_prog_ac_ct_RANLIB="ranlib" - $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 - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # 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};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - 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_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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 - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - 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 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-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" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; 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_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -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_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 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; 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_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -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_prog_ac_ct_MANIFEST_TOOL="mt" - $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 - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; 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_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -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_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $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 - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; 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_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -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_prog_ac_ct_DSYMUTIL="dsymutil" - $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 - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; 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_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -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_prog_NMEDIT="${ac_tool_prefix}nmedit" - $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 - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; 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_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -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_prog_ac_ct_NMEDIT="nmedit" - $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 - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; 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_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -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_prog_LIPO="${ac_tool_prefix}lipo" - $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 - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; 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_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -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_prog_ac_ct_LIPO="lipo" - $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 - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; 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_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -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_prog_OTOOL="${ac_tool_prefix}otool" - $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 - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; 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_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -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_prog_ac_ct_OTOOL="otool" - $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 - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; 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_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -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_prog_OTOOL64="${ac_tool_prefix}otool64" - $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 - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; 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_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -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_prog_ac_ct_OTOOL64="otool64" - $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 - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # 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 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -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 : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -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 : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - 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 -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$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 - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -func_stripname_cnf () -{ - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; - esac -} # func_stripname_cnf - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - 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 - - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -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 - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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,' - ;; - *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 - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$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='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - 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='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # 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' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; 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 - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=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 - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - link_all_deplibs=no - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - 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 - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - 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 - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - 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" - 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=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - 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 - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - 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 - ;; - -*nto* | *qnx*) - version_type=qnx - 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 - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - 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=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - 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 - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - 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 - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/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' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - 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 - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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 dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $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; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -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 - - if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -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 -fi - -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 - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_CXX=no - hardcode_direct_absolute_CXX=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec_CXX='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - no_undefined_flag_CXX='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' $wl-bernotok' - allow_undefined_flag_CXX=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='$wl--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test yes = "$lt_cv_ld_force_load"; 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 - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - if test yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - os2*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_minus_L_CXX=yes - allow_undefined_flag_CXX=unsupported - shrext_cmds=.dll - archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_CXX=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='$wl-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='$wl-E' - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - no_undefined_flag_CXX=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='$wl-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='$wl-z,text' - allow_undefined_flag_CXX='$wl-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test no = "$ld_shlibs_CXX" && can_build_shared=no - - GCC_CXX=$GXX - LD_CXX=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_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 - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX=$prev$p - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX=$prev$p - else - postdeps_CXX="${postdeps_CXX} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX=$p - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX=$p - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - - - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - lt_prog_compiler_pic_CXX='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_CXX='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - 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' - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test no = "$ld_shlibs_CXX" && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - 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 - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - 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 - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - 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" - 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=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec_CXX='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - 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 - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - 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 - ;; - -*nto* | *qnx*) - version_type=qnx - 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 - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - 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=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - 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 - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - 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 - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/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' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - 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 - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test yes = "$hardcode_automatic_CXX"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_CXX" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && - test no != "$hardcode_minus_L_CXX"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test relink = "$hardcode_action_CXX" || - test yes = "$inherit_rpath_CXX"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -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_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - - -$as_echo "#define POSITION_EPS 0.1" >>confdefs.h - - -$as_echo "#define NUMERICAL_EPS 0.001" >>confdefs.h - - - if test -d .git; then - WITH_VERSION_H_TRUE= - WITH_VERSION_H_FALSE='#' -else - WITH_VERSION_H_TRUE='#' - WITH_VERSION_H_FALSE= -fi - -if test -d .git || test x$PACKAGE_VERSION == xgit -a -f src/version.h; then - -$as_echo "#define HAVE_VERSION_H 1" >>confdefs.h - -else - -cat >>confdefs.h <<_ACEOF -#define VERSION_STRING "$PACKAGE_VERSION" -_ACEOF - -fi - - -case "$host" in - x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux*) - if test x$CXX = xclang++; then - CXXFLAGS="-msse2 $CXXFLAGS" - else - CXXFLAGS="-msse2 -mfpmath=sse $CXXFLAGS" - fi - ;; - *-cygwin*) - -$as_echo "#define HAVE_CYGWIN 1" >>confdefs.h - - -$as_echo "#define WIN32 1" >>confdefs.h - - -$as_echo "#define NOMINMAX 1" >>confdefs.h - - ;; - *-darwin*) - AM_CPPFLAGS="-I/opt/X11/include -I/opt/local/include -I/usr/local/include $AM_CPPFLAGS" - ;; -esac - - - - - - - - - - -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. -set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_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_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 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-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_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_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_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 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } - PKG_CONFIG="" - fi -fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XERCES" >&5 -$as_echo_n "checking for XERCES... " >&6; } - -if test -n "$XERCES_CFLAGS"; then - pkg_cv_XERCES_CFLAGS="$XERCES_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xerces-c >= 3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xerces-c >= 3.0") 2>&5 - ac_status=$? - $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 - else - pkg_failed=untried -fi -if test -n "$XERCES_LIBS"; then - pkg_cv_XERCES_LIBS="$XERCES_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xerces-c >= 3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xerces-c >= 3.0") 2>&5 - ac_status=$? - $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 - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - 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 --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 - - -$as_echo "#define XERCES3_SIZE_t unsigned int" >>confdefs.h - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define XERCES3_SIZE_t unsigned int" >>confdefs.h - -else - XERCES_CFLAGS=$pkg_cv_XERCES_CFLAGS - XERCES_LIBS=$pkg_cv_XERCES_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define XERCES3_SIZE_t XMLSize_t" >>confdefs.h - -fi - - -# Check whether --with-xerces was given. -if test "${with_xerces+set}" = set; then : - withval=$with_xerces; -fi - -if test x"$with_xerces" != x; then - if test x"$with_xerces_libraries" = x; then - with_xerces_libraries=$with_xerces/lib - fi - if test x"$with_xerces_includes" = x; then - with_xerces_includes=$with_xerces/include - fi -fi - -LIB_XERCES="xerces-c" - -# Check whether --with-xerces-libraries was given. -if test "${with_xerces_libraries+set}" = set; then : - withval=$with_xerces_libraries; -fi - -if test x"$with_xerces_libraries" = x; then - LDFLAGS="$LDFLAGS -L/usr/local/lib" - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_XERCES''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_XERCES" >&5 -$as_echo_n "checking for main in -l$LIB_XERCES... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_XERCES $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_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 : - true -else - as_fn_error $? "xerces-lib not found. Specify path with option --with-xerces-libraries=DIR." "$LINENO" 5 -fi - -else - save_ldflags=$LDFLAGS - LDFLAGS="-L$with_xerces_libraries" - export LDFLAGS - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_XERCES''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_XERCES" >&5 -$as_echo_n "checking for main in -l$LIB_XERCES... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_XERCES $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_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 : - XERCES_LDFLAGS=$LDFLAGS -else - as_fn_error $? "xerces-lib not found in \"$with_xerces_libraries\"." "$LINENO" 5 -fi - - LDFLAGS=$save_ldflags - -fi - - - -# Check whether --with-xerces-includes was given. -if test "${with_xerces_includes+set}" = set; then : - withval=$with_xerces_includes; -fi - -save_cppflags=$CPPFLAGS -if test x"$with_xerces_includes" = x; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/include" - export CPPFLAGS - -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 - as_fn_error $? "xerces-includes not found. Specify path with option --with-xerces-includes=DIR." "$LINENO" 5 -fi - - -else - CPPFLAGS="-I$with_xerces_includes" - export CPPFLAGS - 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 - as_fn_error $? "xerces-includes not found in \"$with_xerces_includes\"." "$LINENO" 5 -fi - - -fi -CPPFLAGS=$save_cppflags - - -# Check whether --with-proj-gdal was given. -if test "${with_proj_gdal+set}" = set; then : - withval=$with_proj_gdal; -fi - -if test x"$with_proj_gdal" != xno; then -if test x"$with_proj_gdal" != x; then - if test x"$with_proj_libraries" = x; then - with_proj_libraries=$with_proj_gdal/lib - fi - if test x"$with_proj_includes" = x; then - with_proj_includes=$with_proj_gdal/include - fi - if test x"$with_gdal_libraries" = x; then - with_gdal_libraries=$with_proj_gdal/lib - fi - if test x"$with_gdal_includes" = x; then - with_gdal_includes=$with_proj_gdal/include - fi -fi - - -# Check whether --with-proj-libraries was given. -if test "${with_proj_libraries+set}" = set; then : - withval=$with_proj_libraries; -fi - -if test x"$with_proj_libraries" = x; 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="-lproj $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_proj_main=yes -else - 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 -{ $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;} -fi - -else - save_ldflags=$LDFLAGS - LDFLAGS="-L$with_proj_libraries" - export LDFLAGS - { $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="-lproj $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_proj_main=yes -else - 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 -{ $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 - - - -# Check whether --with-proj-includes was given. -if test "${with_proj_includes+set}" = set; then : - withval=$with_proj_includes; -fi - -if test x"$with_proj_includes" = x; then - 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: proj-includes not found. Specify path with option --with-proj-includes=DIR." >&5 -$as_echo "$as_me: WARNING: proj-includes not found. Specify path with option --with-proj-includes=DIR." >&2;} -fi - - -else - save_cppflags=$CPPFLAGS - CPPFLAGS="-I$with_proj_includes" - export CPPFLAGS - 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 - as_fn_error $? "proj-includes not found in \"$with_proj_includes\"." "$LINENO" 5 -fi - - - CPPFLAGS=$save_cppflags -fi -fi -if test x"$with_proj_includes" != x && test x"$PROJ_LDFLAGS" != x; then - -$as_echo "#define HAVE_PROJ 1" >>confdefs.h - - ac_enabled="$ac_enabled PROJ" -else - ac_disabled="$ac_disabled PROJ" -fi - - - -# Check whether --with-gdal-config was given. -if test "${with_gdal_config+set}" = set; then : - withval=$with_gdal_config; GDAL_CONFIG="$withval" -else - GDAL_CONFIG="" -fi - -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 - 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 - - ;; -esac -fi -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_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 - - if test -z $GDAL_CONFIG; then - ac_disabled="$ac_disabled GDAL" - else - GDAL_CFLAGS="`$GDAL_CONFIG --cflags`" - GDAL_LDFLAGS="`$GDAL_CONFIG --libs`" - - - 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." "$LINENO" 5 -fi - - - CPPFLAGS=$save_cppflags - -$as_echo "#define HAVE_GDAL 1" >>confdefs.h - - ac_enabled="$ac_enabled GDAL" - fi -else - ac_disabled="$ac_disabled GDAL" -fi - - - -# Check whether --with-fox-config was given. -if test "${with_fox_config+set}" = set; then : - withval=$with_fox_config; FOX_CONFIG="$withval" -else - FOX_CONFIG="" -fi - -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 - 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 - - ;; -esac -fi -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_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - 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` -L/opt/X11/lib" - - - save_cppflags=$CPPFLAGS - CPPFLAGS="$FOX_CFLAGS" - export CPPFLAGS - 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" -else - as_fn_error $? "fox-includes not found." "$LINENO" 5 -fi - - - CPPFLAGS=$save_cppflags - -$as_echo "#define HAVE_FOX 1" >>confdefs.h - - ac_enabled="$ac_enabled GUI" - fi -else - ac_disabled="$ac_disabled GUI" -fi - if test x"$FOX_CONFIG" != x && test x"$with_fox_config" != xno; then - WITH_GUI_TRUE= - WITH_GUI_FALSE='#' -else - WITH_GUI_TRUE='#' - WITH_GUI_FALSE= -fi - - - - -# Check whether --with-gtest-config was given. -if test "${with_gtest_config+set}" = set; then : - withval=$with_gtest_config; GTEST_CONFIG="$withval" -else - 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 - - ;; -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 - { $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`" - - - 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 - - - CPPFLAGS=$save_cppflags - ac_enabled="$ac_enabled UnitTests" - fi -else - ac_disabled="$ac_disabled UnitTests" -fi - if test x"$GTEST_CONFIG" != x && test x"$with_gtest_config" != xno; then - WITH_GTEST_TRUE= - WITH_GTEST_FALSE='#' -else - WITH_GTEST_TRUE='#' - WITH_GTEST_FALSE= -fi - - - - -# Check whether --with-python was given. -if test "${with_python+set}" = set; then : - withval=$with_python; -fi - -if test x"$with_python" == x; then - with_python=no -fi -if test x"$with_python" != xno; then - PYTHON_LIBS=`python -c "import distutils.sysconfig; bl = distutils.sysconfig.get_config_var('BLDLIBRARY'); print(bl if bl else '-lpython2.7')"` - - save_cppflags=$CPPFLAGS - PYTHON_INCLUDES=`python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'))"` - CPPFLAGS="$CPPFLAGS -I$PYTHON_INCLUDES" - export CPPFLAGS - 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 - as_fn_error $? "Python.h not found. Please install the devel package." "$LINENO" 5 -fi - - - CPPFLAGS=$save_cppflags - -$as_echo "#define HAVE_PYTHON 1" >>confdefs.h - - ac_enabled="$ac_enabled Python" -else - ac_disabled="$ac_disabled Python" -fi - - -# Check whether --with-osg was given. -if test "${with_osg+set}" = set; then : - withval=$with_osg; -fi - -if test x"$with_osg" == x; then - with_osg=no -fi -if test x"$with_osg" != xno; then - 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 : - OSG_LIBS="-losg -losgGA -losgViewer -losgUtil -losgDB -lOpenThreads -losgText" -else - as_fn_error $? "osg/Config not found. Please install the devel package." "$LINENO" 5 -fi - - - -$as_echo "#define HAVE_OSG 1" >>confdefs.h - - ac_enabled="$ac_enabled OSG" -else - ac_disabled="$ac_disabled OSG" -fi - - -# Check whether --with-ffmpeg was given. -if test "${with_ffmpeg+set}" = set; then : - withval=$with_ffmpeg; -fi - -if test x"$with_ffmpeg" == x; then - with_ffmpeg=no -fi -if test x$with_ffmpeg != xno; then - save_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I/usr/include/ffmpeg -I/usr/local/include" - export CPPFLAGS - ac_fn_cxx_check_header_mongrel "$LINENO" "libavformat/version.h" "ac_cv_header_libavformat_version_h" "$ac_includes_default" -if test "x$ac_cv_header_libavformat_version_h" = xyes; then : - AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" - -$as_echo "#define HAVE_FFMPEG 1" >>confdefs.h - - FFMPEG_LIBS="-lavformat -lavcodec -lavutil -lswscale" - ac_enabled="$ac_enabled ffmpeg" - found_ffmpeg=yes -else - ac_disabled="$ac_disabled ffmpeg" - found_ffmpeg=no -fi - - - if test x$with_ffmpeg = xyes && test x$found_ffmpeg = xno; then - as_fn_error $? "ffmpeg libraries (libavcodec, libavformat, libavutil, libswscale) not found." "$LINENO" 5 - fi - - CPPFLAGS=$save_cppflags -else - ac_disabled="$ac_disabled ffmpeg" -fi - -AM_CPPFLAGS="-I$PWD/$srcdir/src $AM_CPPFLAGS" - - - -cat >>confdefs.h <<_ACEOF -#define HAVE_ENABLED "$host$ac_enabled" -_ACEOF - - - -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 - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes -else - ac_cv_working_alloca_h=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes -else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -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_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction (int *addr, int depth) -{ - 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 (int argc, char **argv) -{ - return find_stack_direction (0, argc + !argv + 20) < 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -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_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 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if ${ac_cv_header_stdbool_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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; - -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); - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes -else - ac_cv_header_stdbool_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -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_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 -#define HAVE__BOOL 1 -_ACEOF - - -fi - - -if test $ac_cv_header_stdbool_h = yes; then - -$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* 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; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* 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]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -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 - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -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 - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_c_volatile=yes -else - ac_cv_c_volatile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -$as_echo "#define volatile /**/" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 -$as_echo_n "checking for error_at_line... " >&6; } -if ${ac_cv_lib_error_at_line+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -error_at_line (0, 0, "", 0, "an error occurred"); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_error_at_line=yes -else - ac_cv_lib_error_at_line=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 -$as_echo "$ac_cv_lib_error_at_line" >&6; } -if test $ac_cv_lib_error_at_line = no; then - case " $LIBOBJS " in - *" error.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS error.$ac_objext" - ;; -esac - -fi - -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_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 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 -$as_echo_n "checking types of arguments for select... " >&6; } -if ${ac_cv_func_select_args+:} false; then : - $as_echo_n "(cached) " >&6 -else - for ac_arg234 in 'fd_set *' 'int *' 'void *'; do - for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do - for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - -int -main () -{ -extern int select ($ac_arg1, - $ac_arg234, $ac_arg234, $ac_arg234, - $ac_arg5); - ; - return 0; -} -_ACEOF -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 - done - done -done -# Provide a safe default value. -: "${ac_cv_func_select_args=int,int *,struct timeval *}" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 -$as_echo "$ac_cv_func_select_args" >&6; } -ac_save_IFS=$IFS; IFS=',' -set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` -IFS=$ac_save_IFS -shift - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG1 $1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG234 ($2) -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG5 ($3) -_ACEOF - -rm -f conftest* - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f conftest.sym conftest.file -echo >conftest.file -if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - ac_cv_func_lstat_dereferences_slashed_symlink=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by POSIX. - That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ; - return 0; -} -_ACEOF -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 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -else - # If the `ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f conftest.sym conftest.file - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } - -test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF - - -if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then - case " $LIBOBJS " in - *" lstat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lstat.$ac_objext" - ;; -esac - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -$as_echo_n "checking whether stat accepts an empty string... " >&6; } -if ${ac_cv_func_stat_empty_string_bug+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_stat_empty_string_bug=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - return stat ("", &sbuf) == 0; - ; - return 0; -} -_ACEOF -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 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } -if test $ac_cv_func_stat_empty_string_bug = yes; then - case " $LIBOBJS " in - *" stat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS stat.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<_ACEOF -#define HAVE_STAT_EMPTY_STRING_BUG 1 -_ACEOF - -fi - -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_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 -_ACEOF - -fi -done - - - -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/fontstash/Makefile src/foreign/PHEMlight/Makefile src/foreign/PHEMlight/cpp/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/netedit/additionals/Makefile src/netedit/changes/Makefile src/netedit/dialogs/Makefile src/netedit/frames/Makefile src/netedit/netelements/Makefile src/netedit/Makefile src/mesogui/Makefile src/mesosim/Makefile src/osgview/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/libsumo/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/cursors/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 -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -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='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_VERSION_H_TRUE}" && test -z "${WITH_VERSION_H_FALSE}"; then - 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_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 -fi -if test -z "${WITH_GTEST_TRUE}" && test -z "${WITH_GTEST_FALSE}"; then - as_fn_error $? "conditional \"WITH_GTEST\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... 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 -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# 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'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# 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 1.1.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -_ACEOF -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 1.1.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -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." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_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 - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $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"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -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_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"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -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_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"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -reload_flag_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_separator_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path \ -reload_cmds_CXX \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX \ -postlink_cmds_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "src/activitygen/Makefile") CONFIG_FILES="$CONFIG_FILES src/activitygen/Makefile" ;; - "src/activitygen/activities/Makefile") CONFIG_FILES="$CONFIG_FILES src/activitygen/activities/Makefile" ;; - "src/activitygen/city/Makefile") CONFIG_FILES="$CONFIG_FILES src/activitygen/city/Makefile" ;; - "src/foreign/Makefile") CONFIG_FILES="$CONFIG_FILES src/foreign/Makefile" ;; - "src/foreign/eulerspiral/Makefile") CONFIG_FILES="$CONFIG_FILES src/foreign/eulerspiral/Makefile" ;; - "src/foreign/fontstash/Makefile") CONFIG_FILES="$CONFIG_FILES src/foreign/fontstash/Makefile" ;; - "src/foreign/PHEMlight/Makefile") CONFIG_FILES="$CONFIG_FILES src/foreign/PHEMlight/Makefile" ;; - "src/foreign/PHEMlight/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES src/foreign/PHEMlight/cpp/Makefile" ;; - "src/foreign/rtree/Makefile") CONFIG_FILES="$CONFIG_FILES src/foreign/rtree/Makefile" ;; - "src/foreign/tcpip/Makefile") CONFIG_FILES="$CONFIG_FILES src/foreign/tcpip/Makefile" ;; - "src/gui/Makefile") CONFIG_FILES="$CONFIG_FILES src/gui/Makefile" ;; - "src/gui/dialogs/Makefile") CONFIG_FILES="$CONFIG_FILES src/gui/dialogs/Makefile" ;; - "src/guinetload/Makefile") CONFIG_FILES="$CONFIG_FILES src/guinetload/Makefile" ;; - "src/guisim/Makefile") CONFIG_FILES="$CONFIG_FILES src/guisim/Makefile" ;; - "src/microsim/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/Makefile" ;; - "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/netedit/additionals/Makefile") CONFIG_FILES="$CONFIG_FILES src/netedit/additionals/Makefile" ;; - "src/netedit/changes/Makefile") CONFIG_FILES="$CONFIG_FILES src/netedit/changes/Makefile" ;; - "src/netedit/dialogs/Makefile") CONFIG_FILES="$CONFIG_FILES src/netedit/dialogs/Makefile" ;; - "src/netedit/frames/Makefile") CONFIG_FILES="$CONFIG_FILES src/netedit/frames/Makefile" ;; - "src/netedit/netelements/Makefile") CONFIG_FILES="$CONFIG_FILES src/netedit/netelements/Makefile" ;; - "src/netedit/Makefile") CONFIG_FILES="$CONFIG_FILES src/netedit/Makefile" ;; - "src/mesogui/Makefile") CONFIG_FILES="$CONFIG_FILES src/mesogui/Makefile" ;; - "src/mesosim/Makefile") CONFIG_FILES="$CONFIG_FILES src/mesosim/Makefile" ;; - "src/osgview/Makefile") CONFIG_FILES="$CONFIG_FILES src/osgview/Makefile" ;; - "src/netgen/Makefile") CONFIG_FILES="$CONFIG_FILES src/netgen/Makefile" ;; - "src/netimport/Makefile") CONFIG_FILES="$CONFIG_FILES src/netimport/Makefile" ;; - "src/netimport/vissim/Makefile") CONFIG_FILES="$CONFIG_FILES src/netimport/vissim/Makefile" ;; - "src/netimport/vissim/tempstructs/Makefile") CONFIG_FILES="$CONFIG_FILES src/netimport/vissim/tempstructs/Makefile" ;; - "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/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/libsumo/Makefile") CONFIG_FILES="$CONFIG_FILES src/libsumo/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" ;; - "src/utils/gui/div/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/div/Makefile" ;; - "src/utils/gui/events/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/events/Makefile" ;; - "src/utils/gui/globjects/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/globjects/Makefile" ;; - "src/utils/gui/images/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/images/Makefile" ;; - "src/utils/gui/cursors/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/cursors/Makefile" ;; - "src/utils/gui/settings/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/settings/Makefile" ;; - "src/utils/gui/tracker/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/tracker/Makefile" ;; - "src/utils/gui/windows/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/windows/Makefile" ;; - "src/utils/importio/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/importio/Makefile" ;; - "src/utils/iodevices/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/iodevices/Makefile" ;; - "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" ;; - "unittest/src/microsim/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/microsim/Makefile" ;; - "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" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # 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 - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # 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 - # 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. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # 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 - am__quote=`sed -n 's/^am__quote = //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'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 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. - -# GNU Libtool 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 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='CXX ' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Optional features summary" >&5 -$as_echo "Optional features summary" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------" >&5 -$as_echo "-------------------------" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabled:$ac_enabled" >&5 -$as_echo "Enabled:$ac_enabled" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabled:$ac_disabled" >&5 -$as_echo "Disabled:$ac_disabled" >&6; } diff -Nru sumo-1.1.0+dfsg1/configure.ac sumo-1.2.0+dfsg1/configure.ac --- sumo-1.1.0+dfsg1/configure.ac 2018-12-17 23:00:33.000000000 +0000 +++ sumo-1.2.0+dfsg1/configure.ac 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(sumo, 1.1.0) +AC_INIT(sumo, 1.2.0) AC_CONFIG_SRCDIR(src/sumo_main.cpp) AC_CANONICAL_SYSTEM @@ -11,7 +11,7 @@ AC_LANG([C++]) -# avoiding warnings on ubuntu 16.04, there seem to be two variants of the ARFLAGS, one for automake, one for libttol +# avoiding warnings on ubuntu 16.04, there seem to be two variants of the ARFLAGS, one for automake, one for libtool ARFLAGS=cr AC_SUBST(ARFLAGS) AR_FLAGS=cr @@ -208,7 +208,7 @@ fi fi if test x"$with_proj_includes" != x && test x"$PROJ_LDFLAGS" != x; then - AC_DEFINE([HAVE_PROJ], [1], [defined if PROJ is available]) + AC_DEFINE([PROJ_API_FILE], ["proj_api.h"], [defined if PROJ is available]) ac_enabled="$ac_enabled PROJ" else ac_disabled="$ac_disabled PROJ" @@ -451,6 +451,7 @@ src/microsim/actions/Makefile src/microsim/cfmodels/Makefile src/microsim/devices/Makefile +src/microsim/engine/Makefile src/microsim/lcmodels/Makefile src/microsim/logging/Makefile src/microsim/output/Makefile @@ -464,6 +465,7 @@ src/netedit/dialogs/Makefile src/netedit/frames/Makefile src/netedit/netelements/Makefile +src/netedit/demandelements/Makefile src/netedit/Makefile src/mesogui/Makefile src/mesosim/Makefile @@ -497,12 +499,14 @@ src/utils/gui/globjects/Makefile src/utils/gui/images/Makefile src/utils/gui/cursors/Makefile +src/utils/gui/shortcuts/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/router/Makefile src/utils/shapes/Makefile src/utils/traci/Makefile src/utils/vehicle/Makefile @@ -528,3 +532,5 @@ AC_MSG_RESULT([-------------------------]) AC_MSG_RESULT([Enabled:$ac_enabled]) AC_MSG_RESULT([Disabled:$ac_disabled]) +AC_MSG_WARN([Please note that using the autotools process (configure && make) is considered deprecated and does not support the libsumo build.]) +AC_MSG_WARN([You should strongly consider using cmake.]) Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/data/logo/netedit-application-icon.ico and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/data/logo/netedit-application-icon.ico differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/data/logo/sumo-128x138.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/data/logo/sumo-128x138.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/data/logo/sumo-145x50.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/data/logo/sumo-145x50.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/data/logo/sumo-application-icon.ico and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/data/logo/sumo-application-icon.ico differ diff -Nru sumo-1.1.0+dfsg1/data/typemap/opendriveNetconvert.typ.xml sumo-1.2.0+dfsg1/data/typemap/opendriveNetconvert.typ.xml --- sumo-1.1.0+dfsg1/data/typemap/opendriveNetconvert.typ.xml 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/typemap/opendriveNetconvert.typ.xml 2019-04-15 14:11:30.000000000 +0000 @@ -1,7 +1,7 @@ - + diff -Nru sumo-1.1.0+dfsg1/data/typemap/osmNetconvertShips.typ.xml sumo-1.2.0+dfsg1/data/typemap/osmNetconvertShips.typ.xml --- sumo-1.1.0+dfsg1/data/typemap/osmNetconvertShips.typ.xml 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/typemap/osmNetconvertShips.typ.xml 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ - - - + + + diff -Nru sumo-1.1.0+dfsg1/data/typemap/osmNetconvert.typ.xml sumo-1.2.0+dfsg1/data/typemap/osmNetconvert.typ.xml --- sumo-1.1.0+dfsg1/data/typemap/osmNetconvert.typ.xml 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/typemap/osmNetconvert.typ.xml 2019-04-15 14:11:30.000000000 +0000 @@ -1,18 +1,18 @@ - - - - - - - + + + + + + + + - - - - - + + + + @@ -27,13 +27,13 @@ - + - - - - - + + + + + diff -Nru sumo-1.1.0+dfsg1/data/xsd/additional_file.xsd sumo-1.2.0+dfsg1/data/xsd/additional_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/additional_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/additional_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -217,6 +217,7 @@ + @@ -364,6 +365,7 @@ + diff -Nru sumo-1.1.0+dfsg1/data/xsd/baseTypes.xsd sumo-1.2.0+dfsg1/data/xsd/baseTypes.xsd --- sumo-1.1.0+dfsg1/data/xsd/baseTypes.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/baseTypes.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -103,6 +103,14 @@ + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/data/xsd/det_e1_file.xsd sumo-1.2.0+dfsg1/data/xsd/det_e1_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/det_e1_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/det_e1_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -19,6 +19,7 @@ + @@ -33,6 +34,7 @@ + diff -Nru sumo-1.1.0+dfsg1/data/xsd/duarouterConfiguration.xsd sumo-1.2.0+dfsg1/data/xsd/duarouterConfiguration.xsd --- sumo-1.1.0+dfsg1/data/xsd/duarouterConfiguration.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/duarouterConfiguration.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ - @@ -45,6 +45,8 @@ + + @@ -61,10 +63,12 @@ + + diff -Nru sumo-1.1.0+dfsg1/data/xsd/edgediff_file.xsd sumo-1.2.0+dfsg1/data/xsd/edgediff_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/edgediff_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/edgediff_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -59,17 +59,18 @@ - + + - + - + @@ -88,4 +89,11 @@ + + + + + + + diff -Nru sumo-1.1.0+dfsg1/data/xsd/jtrrouterConfiguration.xsd sumo-1.2.0+dfsg1/data/xsd/jtrrouterConfiguration.xsd --- sumo-1.1.0+dfsg1/data/xsd/jtrrouterConfiguration.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/jtrrouterConfiguration.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ - @@ -55,6 +55,7 @@ + diff -Nru sumo-1.1.0+dfsg1/data/xsd/netconvertConfiguration.xsd sumo-1.2.0+dfsg1/data/xsd/netconvertConfiguration.xsd --- sumo-1.1.0+dfsg1/data/xsd/netconvertConfiguration.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/netconvertConfiguration.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ - @@ -38,6 +38,7 @@ + @@ -76,6 +77,7 @@ + @@ -229,6 +231,7 @@ + diff -Nru sumo-1.1.0+dfsg1/data/xsd/net_file.xsd sumo-1.2.0+dfsg1/data/xsd/net_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/net_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/net_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -146,6 +146,15 @@ + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/data/xsd/netgenerateConfiguration.xsd sumo-1.2.0+dfsg1/data/xsd/netgenerateConfiguration.xsd --- sumo-1.1.0+dfsg1/data/xsd/netgenerateConfiguration.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/netgenerateConfiguration.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ - @@ -190,6 +190,7 @@ + diff -Nru sumo-1.1.0+dfsg1/data/xsd/nodes_file.xsd sumo-1.2.0+dfsg1/data/xsd/nodes_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/nodes_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/nodes_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -29,11 +29,10 @@ - + - @@ -52,6 +51,23 @@ + + + + + + + + + + + + + + + + + @@ -59,7 +75,12 @@ - + + + + + + diff -Nru sumo-1.1.0+dfsg1/data/xsd/routes_file.xsd sumo-1.2.0+dfsg1/data/xsd/routes_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/routes_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/routes_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -16,6 +16,7 @@ + diff -Nru sumo-1.1.0+dfsg1/data/xsd/routeTypes.xsd sumo-1.2.0+dfsg1/data/xsd/routeTypes.xsd --- sumo-1.1.0+dfsg1/data/xsd/routeTypes.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/routeTypes.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -393,6 +393,12 @@ + + + + + + @@ -570,6 +576,7 @@ + @@ -599,6 +606,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -645,7 +673,6 @@ - diff -Nru sumo-1.1.0+dfsg1/data/xsd/state_file.xsd sumo-1.2.0+dfsg1/data/xsd/state_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/state_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/state_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -19,7 +19,7 @@ - + @@ -57,6 +57,7 @@ + diff -Nru sumo-1.1.0+dfsg1/data/xsd/sumoConfiguration.xsd sumo-1.2.0+dfsg1/data/xsd/sumoConfiguration.xsd --- sumo-1.1.0+dfsg1/data/xsd/sumoConfiguration.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/sumoConfiguration.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ - @@ -82,6 +82,7 @@ + @@ -106,6 +107,7 @@ + @@ -129,6 +131,7 @@ + @@ -147,6 +150,7 @@ + @@ -164,6 +168,10 @@ + + + + @@ -274,6 +282,7 @@ + @@ -292,6 +301,10 @@ + + + + @@ -325,6 +338,7 @@ + @@ -333,8 +347,10 @@ + + diff -Nru sumo-1.1.0+dfsg1/data/xsd/tllogic_file.xsd sumo-1.2.0+dfsg1/data/xsd/tllogic_file.xsd --- sumo-1.1.0+dfsg1/data/xsd/tllogic_file.xsd 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/data/xsd/tllogic_file.xsd 2019-04-15 14:11:30.000000000 +0000 @@ -26,7 +26,7 @@ - + diff -Nru sumo-1.1.0+dfsg1/debian/changelog sumo-1.2.0+dfsg1/debian/changelog --- sumo-1.1.0+dfsg1/debian/changelog 2019-01-11 09:37:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/changelog 2019-04-16 11:20:33.000000000 +0000 @@ -1,20 +1,9 @@ -sumo (1.1.0+dfsg1-5~cosmic) cosmic; urgency=medium +sumo (1.2.0+dfsg1-14~cosmic) cosmic; urgency=medium - * added new icons + * New upstream version + * Using cmake build - -- Michael Behrisch Fri, 11 Jan 2019 09:37:48 +0000 - -sumo (1.1.0+dfsg1-4) bionic; urgency=medium - - * added mime type file - - -- Michael Behrisch Thu, 10 Jan 2019 15:20:39 +0000 - -sumo (1.1.0+dfsg1-3) bionic; urgency=medium - - * added mime type and link to bin dir - - -- Michael Behrisch Mon, 07 Jan 2019 17:05:00 +0000 + -- Michael Behrisch Tue, 16 Apr 2019 13:20:33 +0200 sumo (1.1.0+dfsg1-2) bionic; urgency=medium diff -Nru sumo-1.1.0+dfsg1/debian/control sumo-1.2.0+dfsg1/debian/control --- sumo-1.1.0+dfsg1/debian/control 2019-01-05 13:04:55.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/control 2019-04-16 11:20:33.000000000 +0000 @@ -4,7 +4,8 @@ Section: science Testsuite: autopkgtest Priority: optional -Build-Depends: autotools-dev, +Build-Depends: cmake, + python, debhelper (>= 9), dh-autoreconf, dpkg-dev (>= 1.16.1~), @@ -19,12 +20,14 @@ libxerces-c-dev | libxerces-c2-dev, libxrandr-dev Build-Depends-Indep: doxygen, + ant, + openjdk-8-jdk, python-matplotlib, python Standards-Version: 3.9.6 Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/sumo.git Vcs-Git: git://anonscm.debian.org/debian-science/packages/sumo.git -Homepage: http://sumo.dlr.de/ +Homepage: https://sumo.dlr.de/ Package: sumo Architecture: any @@ -33,7 +36,7 @@ Recommends: sumo-tools Description: Simulation of Urban MObility (SUMO) SUMO is an open source, - highly portable, microscopic road traffic simulation package + highly portable, microscopic traffic simulation package designed to handle large road networks. Main binary. @@ -45,9 +48,9 @@ Recommends: sumo Description: Simulation of Urban MObility (SUMO), documentation and examples SUMO is an open source, - highly portable, microscopic road traffic simulation package + highly portable, microscopic traffic simulation package designed to handle large road networks. - The binary contatins documentation and examples. + The binary contains documentation and examples. Package: sumo-tools Architecture: all @@ -59,6 +62,6 @@ Recommends: sumo Description: Simulation of Urban MObility (SUMO), tools and scripts SUMO is an open source, - highly portable, microscopic road traffic simulation package + highly portable, microscopic traffic simulation package designed to handle large road networks. - The binary contatins different tools and scripts. + The binary contains different tools and scripts. diff -Nru sumo-1.1.0+dfsg1/debian/copyright sumo-1.2.0+dfsg1/debian/copyright --- sumo-1.1.0+dfsg1/debian/copyright 2019-01-06 18:39:07.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/copyright 2019-04-03 11:36:48.000000000 +0000 @@ -1,7 +1,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: SUMO Upstream-Contact: sumo@dlr.de -Source: http://sumo.dlr.de/ +Source: https://sumo.dlr.de/ Files-Excluded: *.pdf build diff -Nru sumo-1.1.0+dfsg1/debian/patches/10_remove_embedded_gl2ps.patch sumo-1.2.0+dfsg1/debian/patches/10_remove_embedded_gl2ps.patch --- sumo-1.1.0+dfsg1/debian/patches/10_remove_embedded_gl2ps.patch 2019-01-05 13:04:55.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/patches/10_remove_embedded_gl2ps.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ -Description: Remove from compilation embedded copy of gl2ps, use packaged version instead. -Author: Anton Gladky -Last-Update: 2015-04-16 - -Index: sumo-0.32.0/src/foreign/Makefile.am -=================================================================== ---- sumo-0.32.0.orig/src/foreign/Makefile.am -+++ sumo-0.32.0/src/foreign/Makefile.am -@@ -1,5 +1,5 @@ - if WITH_GUI --GUIDIRS = gl2ps rtree fontstash -+GUIDIRS = rtree fontstash - endif - - SUBDIRS = eulerspiral tcpip PHEMlight $(GUIDIRS) -Index: sumo-0.32.0/src/foreign/Makefile.in -=================================================================== ---- sumo-0.32.0.orig/src/foreign/Makefile.in -+++ sumo-0.32.0/src/foreign/Makefile.in -@@ -152,7 +152,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags --DIST_SUBDIRS = eulerspiral tcpip PHEMlight gl2ps rtree fontstash -+DIST_SUBDIRS = eulerspiral tcpip PHEMlight rtree fontstash - am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ -@@ -327,7 +327,7 @@ target_vendor = @target_vendor@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --@WITH_GUI_TRUE@GUIDIRS = gl2ps rtree fontstash -+@WITH_GUI_TRUE@GUIDIRS = rtree fontstash - SUBDIRS = eulerspiral tcpip PHEMlight $(GUIDIRS) - all: all-recursive - -Index: sumo-0.32.0/src/utils/gui/windows/GUISUMOAbstractView.cpp -=================================================================== ---- sumo-0.32.0.orig/src/utils/gui/windows/GUISUMOAbstractView.cpp -+++ sumo-0.32.0/src/utils/gui/windows/GUISUMOAbstractView.cpp -@@ -37,7 +37,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: sumo-0.32.0/src/netedit/Makefile.am -=================================================================== ---- sumo-0.32.0.orig/src/netedit/Makefile.am -+++ sumo-0.32.0/src/netedit/Makefile.am -@@ -112,7 +112,6 @@ netedit_LDADD = ../netimport/libnetimpor - ../utils/gui/tracker/libguiutilstracker.a \ - ../utils/foxtools/libfoxtools.a \ - ../utils/distribution/libdistribution.a \ --../foreign/gl2ps/libgl2ps.a \ - ../foreign/eulerspiral/libeulerspiral.a \ - ../utils/geom/libgeom.a \ - ../utils/shapes/libshapes.a \ -Index: sumo-0.32.0/src/netedit/Makefile.in -=================================================================== ---- sumo-0.32.0.orig/src/netedit/Makefile.in -+++ sumo-0.32.0/src/netedit/Makefile.in -@@ -251,7 +251,6 @@ am__DEPENDENCIES_1 = - @WITH_GUI_TRUE@ ../utils/gui/tracker/libguiutilstracker.a \ - @WITH_GUI_TRUE@ ../utils/foxtools/libfoxtools.a \ - @WITH_GUI_TRUE@ ../utils/distribution/libdistribution.a \ --@WITH_GUI_TRUE@ ../foreign/gl2ps/libgl2ps.a \ - @WITH_GUI_TRUE@ ../foreign/eulerspiral/libeulerspiral.a \ - @WITH_GUI_TRUE@ ../utils/geom/libgeom.a \ - @WITH_GUI_TRUE@ ../utils/shapes/libshapes.a \ -@@ -598,7 +597,6 @@ EXTRA_DIST = netedit64.ico netedit.rc - @WITH_GUI_TRUE@../utils/gui/tracker/libguiutilstracker.a \ - @WITH_GUI_TRUE@../utils/foxtools/libfoxtools.a \ - @WITH_GUI_TRUE@../utils/distribution/libdistribution.a \ --@WITH_GUI_TRUE@../foreign/gl2ps/libgl2ps.a \ - @WITH_GUI_TRUE@../foreign/eulerspiral/libeulerspiral.a \ - @WITH_GUI_TRUE@../utils/geom/libgeom.a \ - @WITH_GUI_TRUE@../utils/shapes/libshapes.a \ -Index: sumo-0.32.0/src/Makefile.am -=================================================================== ---- sumo-0.32.0.orig/src/Makefile.am -+++ sumo-0.32.0/src/Makefile.am -@@ -85,7 +85,6 @@ sumo_gui_LDADD = ./gui/libgui.a \ - ./mesogui/libmesogui.a \ - ./osgview/libosgview.a \ - $(sumo_LDADD) \ --./foreign/gl2ps/libgl2ps.a \ - ./gui/GUIManipulator.o \ - ./gui/GUITLLogicPhasesTrackerWindow.o \ - $(OSG_LIBS) $(FFMPEG_LIBS) \ -Index: sumo-0.32.0/src/Makefile.in -=================================================================== ---- sumo-0.32.0.orig/src/Makefile.in -+++ sumo-0.32.0/src/Makefile.in -@@ -178,7 +178,6 @@ am__DEPENDENCIES_3 = ./netload/libnetloa - @WITH_GUI_TRUE@ ./utils/foxtools/libfoxtools.a \ - @WITH_GUI_TRUE@ ./mesogui/libmesogui.a ./osgview/libosgview.a \ - @WITH_GUI_TRUE@ $(am__DEPENDENCIES_3) \ --@WITH_GUI_TRUE@ ./foreign/gl2ps/libgl2ps.a \ - @WITH_GUI_TRUE@ ./gui/GUIManipulator.o \ - @WITH_GUI_TRUE@ ./gui/GUITLLogicPhasesTrackerWindow.o \ - @WITH_GUI_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ -@@ -510,7 +509,6 @@ $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ - @WITH_GUI_TRUE@./mesogui/libmesogui.a \ - @WITH_GUI_TRUE@./osgview/libosgview.a \ - @WITH_GUI_TRUE@$(sumo_LDADD) \ --@WITH_GUI_TRUE@./foreign/gl2ps/libgl2ps.a \ - @WITH_GUI_TRUE@./gui/GUIManipulator.o \ - @WITH_GUI_TRUE@./gui/GUITLLogicPhasesTrackerWindow.o \ - @WITH_GUI_TRUE@$(OSG_LIBS) $(FFMPEG_LIBS) \ -Index: sumo-0.32.0/configure.ac -=================================================================== ---- sumo-0.32.0.orig/configure.ac -+++ sumo-0.32.0/configure.ac -@@ -450,7 +450,6 @@ src/activitygen/city/Makefile - src/foreign/Makefile - src/foreign/eulerspiral/Makefile - src/foreign/fontstash/Makefile --src/foreign/gl2ps/Makefile - src/foreign/PHEMlight/Makefile - src/foreign/PHEMlight/cpp/Makefile - src/foreign/rtree/Makefile diff -Nru sumo-1.1.0+dfsg1/debian/patches/10_run_all_examples.patch sumo-1.2.0+dfsg1/debian/patches/10_run_all_examples.patch --- sumo-1.1.0+dfsg1/debian/patches/10_run_all_examples.patch 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/patches/10_run_all_examples.patch 2019-04-16 11:20:33.000000000 +0000 @@ -0,0 +1,123 @@ +--- sumo-1.1.0/docs/examples/runAll.py 2019-04-22 08:55:42.318616913 +0200 ++++ sumo-1.2.0/docs/examples/runAll.py 2019-04-23 11:40:07.470776705 +0200 +@@ -1,60 +1,64 @@ +-import subprocess,sys ++import subprocess, sys, os ++from os.path import abspath, dirname, join ++THIS_DIR = abspath(dirname(__file__)) ++SUMO_HOME = os.environ.get("SUMO_HOME", dirname(dirname(THIS_DIR))) ++os.environ["SUMO_HOME"] = SUMO_HOME + for p in [ +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/dfrouter", r"--write-license", r"--include-unused-routes", r"--measure-files", r"input_tri_flows.txt", r"--keep-longer-routes", r"--net-file=input_tri.net.xml", r"--detector-files=input_tri.det.xml", r"--routes-output", r"routes.rou.xml", r"--emitters-output", r"emitters.add.xml", r"-e", r"60"], cwd=r"/home/delphi/gcc/sumo/docs/examples/dfrouter"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes_100s_interval"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes_100s_interval_ext"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes_200s_interval"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_trips.trips.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/trips2routes"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/jtrrouter", r"--no-step-log", r"--write-license", r"--output-file=routes.rou.xml", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"--sinks=end", r"--turns=input_turns.turns.xml", r"--ignore-errors"], cwd=r"/home/delphi/gcc/sumo/docs/examples/jtrrouter/turns"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/jtrrouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"--output-file=routes.rou.xml", r"--turn-defaults=0,100,0,0", r"--sinks=end", r"--ignore-errors"], cwd=r"/home/delphi/gcc/sumo/docs/examples/jtrrouter/straight_only_sinks"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--connection-files", r"input_connections.con.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_edge2edge_conns"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--connection-files=input_connections.con.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_lane2lane_conns"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh", r"--no-turnarounds"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_no_turnarounds"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--connection-files", r"input_connections.con.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_prohibitions"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_unconstrained"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--plain-output=plain", r"--plain.extend-edge-shape"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/hokkaido"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--connection-files=input_connections.con.xml", r"--output=net.net.xml", r"--no-turnarounds"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/dlr-testtrack"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--type-files=input_types.typ.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/types/cross_notypes"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--type-files=input_types.typ.xml", r"--output=net.net.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/types/cross_usingtypes"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--no-internal-links", r"--osm-files", r"osm.xml", r"-v", r"--proj.utm", r"--output.street-names", r"--plain-output-prefix", r"plain", r"--proj.plain-geo", r"--output", r"net.net.xml", r"--tls.red.time", r"10"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/OSM/adlershof_dlr"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"-b", r"0", r"-e", r"10000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/hokkaido"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"-b", r"0", r"-e", r"1000", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"-a", r"input_additional.add.xml,input_additional2.add.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/variable_speed_signs"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"--vehroute-output", r"vehroutes.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/vehicle_stops"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-a=input_additional.add.xml", r"--vehroutes=vehroutes.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/busses"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"-n", r"net.net.xml", r"--route-files=input_routes.rou.xml", r"--additional-files=input_additional.add.xml", r"--fcd-output", r"fcd.xml", r"--fcd-output.signals"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/angled_roadside_parking"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"--time-to-teleport", r"-1"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/visualization/parade"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--emission-output=emissions.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_emission"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--fcd-output=fcd.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_fcd"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--full-output=full.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_full"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_inductloops"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_meandata_constrained"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_meandata_edges"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_meandata_lanes"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--queue-output=queue.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"200"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_queue"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--netstate-dump=rawdump.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"90", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_rawdump"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"--summary=summary.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_summary"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--tripinfo-output=tripinfos.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_tripinfo"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--vehroute-output=vehroutes.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_vehroutes"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"220"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_vtypeprobe"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross1ltl"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"-v", r"--no-step-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross1l"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross3ltl"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross3l"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box1l"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box2l"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box3l"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box4l"), +- subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"--lateral-resolution", r"0.64", r"--tripinfo-output", r"tripinfos.xml", r"--duration-log.statistics"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/sublane_model"), +- subprocess.Popen([r"python", r"/home/delphi/gcc/sumo/tools/assign/duaIterate.py", r"-n", r"input_net.net.xml", r"-t", r"input_trips.trips.xml", r"-l", r"5"], cwd=r"/home/delphi/gcc/sumo/docs/examples/tools/dua-iterate"), +- subprocess.Popen([r"python", r"/home/delphi/gcc/sumo/tools/detector/flowrouter.py", r"-n", r"input_net.net.xml", r"-d", r"input_detectors.det.xml", r"-f", r"input_flows.txt", r"--verbose"], cwd=r"/home/delphi/gcc/sumo/docs/examples/tools/flowrouter"), +- subprocess.Popen([r"python", r"/home/delphi/gcc/sumo/tools/traceExporter.py", r"-i", r"fcd.xml", r"-n", r"net.net.xml", r"--ns2mobility-output", r"mobilityfile.tcl"], cwd=r"/home/delphi/gcc/sumo/docs/examples/tools/traceExporter"), +- subprocess.Popen([r"python", r"./runner.py"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/quickstart"), +- subprocess.Popen([r"python", r"./runner.py"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/hello"), +- subprocess.Popen([r"python", r"./runner.py", r"--nogui"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/traci_tls"), +- subprocess.Popen([r"python", r"./runner.py"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/manhattan"), ++ subprocess.Popen([join(SUMO_HOME, "bin", "dfrouter"), "--write-license", "--include-unused-routes", "--measure-files", "input_tri_flows.txt", "--keep-longer-routes", "--net-file=input_tri.net.xml", "--detector-files=input_tri.det.xml", "--routes-output", "routes.rou.xml", "--emitters-output", "emitters.add.xml", "-e", "60"], cwd=join(THIS_DIR, r"dfrouter")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "duarouter"), "--no-step-log", "--write-license", "--net-file=input_net.net.xml", "--route-files=input_flows.flows.xml", "-o", "routes.rou.xml"], cwd=join(THIS_DIR, r"duarouter/flows2routes")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "duarouter"), "--no-step-log", "--write-license", "--net-file=input_net.net.xml", "--route-files=input_flows.flows.xml", "-o", "routes.rou.xml"], cwd=join(THIS_DIR, r"duarouter/flows2routes_100s_interval")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "duarouter"), "--no-step-log", "--write-license", "--net-file=input_net.net.xml", "--route-files=input_flows.flows.xml", "-o", "routes.rou.xml"], cwd=join(THIS_DIR, r"duarouter/flows2routes_100s_interval_ext")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "duarouter"), "--no-step-log", "--write-license", "--net-file=input_net.net.xml", "--route-files=input_flows.flows.xml", "-o", "routes.rou.xml"], cwd=join(THIS_DIR, r"duarouter/flows2routes_200s_interval")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "duarouter"), "--no-step-log", "--write-license", "--net-file=input_net.net.xml", "--route-files=input_trips.trips.xml", "-o", "routes.rou.xml"], cwd=join(THIS_DIR, r"duarouter/trips2routes")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "jtrrouter"), "--no-step-log", "--write-license", "--output-file=routes.rou.xml", "--net-file=input_net.net.xml", "--route-files=input_flows.flows.xml", "--sinks=end", "--turns=input_turns.turns.xml", "--ignore-errors"], cwd=join(THIS_DIR, r"jtrrouter/turns")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "jtrrouter"), "--no-step-log", "--write-license", "--net-file=input_net.net.xml", "--route-files=input_flows.flows.xml", "--output-file=routes.rou.xml", "--turn-defaults=0,100,0,0", "--sinks=end", "--ignore-errors"], cwd=join(THIS_DIR, r"jtrrouter/straight_only_sinks")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--connection-files", "input_connections.con.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml", "--speed-in-kmh"], cwd=join(THIS_DIR, r"netconvert/connections/cross3l_edge2edge_conns")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--connection-files=input_connections.con.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml", "--speed-in-kmh"], cwd=join(THIS_DIR, r"netconvert/connections/cross3l_lane2lane_conns")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml", "--speed-in-kmh", "--no-turnarounds"], cwd=join(THIS_DIR, r"netconvert/connections/cross3l_no_turnarounds")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--connection-files", "input_connections.con.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml", "--speed-in-kmh"], cwd=join(THIS_DIR, r"netconvert/connections/cross3l_prohibitions")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml", "--speed-in-kmh"], cwd=join(THIS_DIR, r"netconvert/connections/cross3l_unconstrained")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml", "--plain-output=plain", "--plain.extend-edge-shape"], cwd=join(THIS_DIR, r"netconvert/hokkaido")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--connection-files=input_connections.con.xml", "--output=net.net.xml", "--no-turnarounds"], cwd=join(THIS_DIR, r"netconvert/dlr-testtrack")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml", "--speed-in-kmh"], cwd=join(THIS_DIR, r"netconvert/speed_in_kmh/cross_notypes_kmh")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--type-files=input_types.typ.xml", "--output=net.net.xml", "--speed-in-kmh"], cwd=join(THIS_DIR, r"netconvert/speed_in_kmh/cross_usingtypes_kmh")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--output=net.net.xml"], cwd=join(THIS_DIR, r"netconvert/types/cross_notypes")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--edge-files=input_edges.edg.xml", "--node-files=input_nodes.nod.xml", "--type-files=input_types.typ.xml", "--output=net.net.xml"], cwd=join(THIS_DIR, r"netconvert/types/cross_usingtypes")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "netconvert"), "--write-license", "--no-internal-links", "--osm-files", "osm.xml", "-v", "--proj.utm", "--output.street-names", "--plain-output-prefix", "plain", "--proj.plain-geo", "--output", "net.net.xml", "--tls.red.time", "10"], cwd=join(THIS_DIR, r"netconvert/OSM/adlershof_dlr")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml", "-b", "0", "-e", "10000"], cwd=join(THIS_DIR, r"sumo/hokkaido")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "-b", "0", "-e", "1000", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml", "-a", "input_additional.add.xml,input_additional2.add.xml"], cwd=join(THIS_DIR, r"sumo/variable_speed_signs")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml", "--vehroute-output", "vehroutes.xml"], cwd=join(THIS_DIR, r"sumo/vehicle_stops")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "-a=input_additional.add.xml", "--vehroutes=vehroutes.xml"], cwd=join(THIS_DIR, r"sumo/busses")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "-n", "net.net.xml", "--route-files=input_routes.rou.xml", "--additional-files=input_additional.add.xml", "--fcd-output", "fcd.xml", "--fcd-output.signals"], cwd=join(THIS_DIR, r"sumo/angled_roadside_parking")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml", "--time-to-teleport", "-1"], cwd=join(THIS_DIR, r"sumo/visualization/parade")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--emission-output=emissions.xml", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-b", "0", "-e", "120"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_emission")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--fcd-output=fcd.xml", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-b", "0", "-e", "120"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_fcd")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--full-output=full.xml", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-b", "0", "-e", "120"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_full")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-a", "input_additional.add.xml", "-b", "0", "-e", "1000"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_inductloops")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-a", "input_additional.add.xml", "-b", "0", "-e", "1000"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_meandata_constrained")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-a", "input_additional.add.xml", "-b", "0", "-e", "1000"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_meandata_edges")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-a", "input_additional.add.xml", "-b", "0", "-e", "1000"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_meandata_lanes")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--queue-output=queue.xml", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-b", "0", "-e", "200"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_queue")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--netstate-dump=rawdump.xml", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-b", "90", "-e", "120"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_rawdump")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "--summary=summary.xml", "-b", "0", "-e", "1000"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_summary")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--tripinfo-output=tripinfos.xml", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-b", "0", "-e", "1000"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_tripinfo")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--vehroute-output=vehroutes.xml", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-b", "0", "-e", "1000"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_vehroutes")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "-r", "input_routes.rou.xml", "-a", "input_additional.add.xml", "-b", "0", "-e", "220"], cwd=join(THIS_DIR, r"sumo/output/cross3ltl_vtypeprobe")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/cross/cross1ltl")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "-v", "--no-step-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/cross/cross1l")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/cross/cross3ltl")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/cross/cross3l")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/box/box1l")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/box/box2l")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/box/box3l")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--time-to-teleport", "-1", "--no-step-log", "--no-duration-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml"], cwd=join(THIS_DIR, r"sumo/simple_nets/box/box4l")), ++ subprocess.Popen([join(SUMO_HOME, "bin", "sumo"), "--write-license", "--default.speeddev", "0", "--no-step-log", "--net-file=net.net.xml", "--routes=input_routes.rou.xml", "--lateral-resolution", "0.64", "--tripinfo-output", "tripinfos.xml", "--duration-log.statistics"], cwd=join(THIS_DIR, r"sumo/sublane_model")), ++ subprocess.Popen(["python", join(SUMO_HOME, "tools/assign/duaIterate.py"), "-n", "input_net.net.xml", "-t", "input_trips.trips.xml", "-l", "5"], cwd=join(THIS_DIR, r"tools/dua-iterate")), ++ subprocess.Popen(["python", join(SUMO_HOME, "tools/detector/flowrouter.py"), "-n", "input_net.net.xml", "-d", "input_detectors.det.xml", "-f", "input_flows.txt", "--verbose"], cwd=join(THIS_DIR, r"tools/flowrouter")), ++ subprocess.Popen(["python", join(SUMO_HOME, "tools/traceExporter.py"), "-i", "fcd.xml", "-n", "net.net.xml", "--ns2mobility-output", "mobilityfile.tcl"], cwd=join(THIS_DIR, r"tools/traceExporter")), ++ subprocess.Popen(["python", "./runner.py"], cwd=join(THIS_DIR, r"../tutorial/quickstart")), ++ subprocess.Popen(["python", "./runner.py"], cwd=join(THIS_DIR, r"../tutorial/hello")), ++ subprocess.Popen(["python", "./runner.py", "--nogui"], cwd=join(THIS_DIR, r"../tutorial/traci_tls")), ++ subprocess.Popen(["python", "./runner.py"], cwd=join(THIS_DIR, r"../tutorial/manhattan")), + ]: + if p.wait() != 0: + sys.exit(1) diff -Nru sumo-1.1.0+dfsg1/debian/patches/20_fix_scripts_headers.patch sumo-1.2.0+dfsg1/debian/patches/20_fix_scripts_headers.patch --- sumo-1.1.0+dfsg1/debian/patches/20_fix_scripts_headers.patch 2019-01-05 13:04:55.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/patches/20_fix_scripts_headers.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,817 +0,0 @@ -Description: fixes headers of scripts -Author: Anton Gladky -Last-Update: 2015-04-16 - -Index: sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/analysis/Taxi.py -=================================================================== ---- sumo-0.32.0.orig/tools/projects/TaxiFCD_Krieg/src/analysis/Taxi.py -+++ sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/analysis/Taxi.py -@@ -1,3 +1,4 @@ -+#!/usr/bin/env python - # -*- coding: Latin-1 -*- - # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo - # Copyright (C) 2008-2017 German Aerospace Center (DLR) and others. -Index: sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/Path.py -=================================================================== ---- sumo-0.32.0.orig/tools/projects/TaxiFCD_Krieg/src/util/Path.py -+++ sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/Path.py -@@ -1,3 +1,4 @@ -+#!/usr/bin/env python - # -*- coding: Latin-1 -*- - # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo - # Copyright (C) 2008-2017 German Aerospace Center (DLR) and others. -Index: sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/ProgressBar.py -=================================================================== ---- sumo-0.32.0.orig/tools/projects/TaxiFCD_Krieg/src/util/ProgressBar.py -+++ sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/ProgressBar.py -@@ -1,3 +1,4 @@ -+#!/usr/bin/env python - # -*- coding: Latin-1 -*- - # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo - # Copyright (C) 2008-2017 German Aerospace Center (DLR) and others. -Index: sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/CalcTime.py -=================================================================== ---- sumo-0.32.0.orig/tools/projects/TaxiFCD_Krieg/src/util/CalcTime.py -+++ sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/CalcTime.py -@@ -1,3 +1,4 @@ -+#!/usr/bin/env python - # -*- coding: Latin-1 -*- - # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo - # Copyright (C) 2008-2017 German Aerospace Center (DLR) and others. -Index: sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/Reader.py -=================================================================== ---- sumo-0.32.0.orig/tools/projects/TaxiFCD_Krieg/src/util/Reader.py -+++ sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/Reader.py -@@ -1,3 +1,4 @@ -+#!/usr/bin/env python - # -*- coding: Latin-1 -*- - # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo - # Copyright (C) 2008-2017 German Aerospace Center (DLR) and others. -Index: sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/BinarySearch.py -=================================================================== ---- sumo-0.32.0.orig/tools/projects/TaxiFCD_Krieg/src/util/BinarySearch.py -+++ sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/util/BinarySearch.py -@@ -1,3 +1,4 @@ -+#!/usr/bin/env python - # -*- coding: Latin-1 -*- - # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo - # Copyright (C) 2008-2017 German Aerospace Center (DLR) and others. -Index: sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/fcdToRoutes/GenerateTaxiRoutes.py -=================================================================== ---- sumo-0.32.0.orig/tools/projects/TaxiFCD_Krieg/src/fcdToRoutes/GenerateTaxiRoutes.py -+++ sumo-0.32.0/tools/projects/TaxiFCD_Krieg/src/fcdToRoutes/GenerateTaxiRoutes.py -@@ -1,3 +1,4 @@ -+#!/usr/bin/env python - # -*- coding: Latin-1 -*- - # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo - # Copyright (C) 2008-2017 German Aerospace Center (DLR) and others. -Index: sumo-0.32.0/docs/examples/sumo/variable_speed_signs/aggregated_25.xml -=================================================================== ---- /dev/null -+++ sumo-0.32.0/docs/examples/sumo/variable_speed_signs/aggregated_25.xml -@@ -0,0 +1,113 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -Index: sumo-0.32.0/docs/examples/sumo/output/cross3ltl_emissions/summary.xml -=================================================================== ---- /dev/null -+++ sumo-0.32.0/docs/examples/sumo/output/cross3ltl_emissions/summary.xml -@@ -0,0 +1,470 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -Index: sumo-0.32.0/docs/examples/sumo/output/cross3ltl_tripinfo/tripinfos.xml -=================================================================== ---- /dev/null -+++ sumo-0.32.0/docs/examples/sumo/output/cross3ltl_tripinfo/tripinfos.xml -@@ -0,0 +1,78 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -Index: sumo-0.32.0/docs/examples/sumo/busses/vehroutes.xml -=================================================================== ---- /dev/null -+++ sumo-0.32.0/docs/examples/sumo/busses/vehroutes.xml -@@ -0,0 +1,38 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -Index: sumo-0.32.0/docs/examples/sumo/vehicle_stops/vehroutes.xml -=================================================================== ---- /dev/null -+++ sumo-0.32.0/docs/examples/sumo/vehicle_stops/vehroutes.xml -@@ -0,0 +1,26 @@ -+ -+ -+ -+ -+ -+ diff -Nru sumo-1.1.0+dfsg1/debian/patches/30_add_missing_link.patch sumo-1.2.0+dfsg1/debian/patches/30_add_missing_link.patch --- sumo-1.1.0+dfsg1/debian/patches/30_add_missing_link.patch 2019-01-05 13:04:55.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/patches/30_add_missing_link.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -Description: Added missing libs to link, fixing FTBFS. -Bug-Debian: https://bugs.debian.org/710373 -Author: Daniel T Chen , Julian Taylor -Origin: https://launchpadlibrarian.net/137511659/sumo_0.16.0~dfsg-1~exp1_0.16.0~dfsg-1~exp1ubuntu1.diff.gz -Reviewed-by: Anton Gladky -Last-Update: 2015-04-16 -Index: sumo-0.32.0/src/Makefile.am -=================================================================== ---- sumo-0.32.0.orig/src/Makefile.am -+++ sumo-0.32.0/src/Makefile.am -@@ -1,4 +1,4 @@ --XERCES_LIBS = -l$(LIB_XERCES) -+XERCES_LIBS = -l$(LIB_XERCES) -lpthread -lGLU -lGL - - if WITH_GUI - GUI_APPS = sumo-gui -Index: sumo-0.32.0/src/Makefile.in -=================================================================== ---- sumo-0.32.0.orig/src/Makefile.in -+++ sumo-0.32.0/src/Makefile.in -@@ -383,7 +383,7 @@ STRIP = @STRIP@ - VERSION = @VERSION@ - XERCES_CFLAGS = @XERCES_CFLAGS@ - XERCES_LDFLAGS = @XERCES_LDFLAGS@ --XERCES_LIBS = -l$(LIB_XERCES) -+XERCES_LIBS = -l$(LIB_XERCES) -lpthread -lGLU -lGL - abs_builddir = @abs_builddir@ - abs_srcdir = @abs_srcdir@ - abs_top_builddir = @abs_top_builddir@ diff -Nru sumo-1.1.0+dfsg1/debian/patches/40_drop_some_buildflags.patch sumo-1.2.0+dfsg1/debian/patches/40_drop_some_buildflags.patch --- sumo-1.1.0+dfsg1/debian/patches/40_drop_some_buildflags.patch 2019-01-05 13:04:55.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/patches/40_drop_some_buildflags.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Description: drop msse2 buildfpags, unsupported by some platforms -Author: Anton Gladky -Last-Update: 2015-04-20 - -Index: sumo-0.32.0/configure.ac -=================================================================== ---- sumo-0.32.0.orig/configure.ac -+++ sumo-0.32.0/configure.ac -@@ -96,11 +96,6 @@ dnl - - - - - - - - - - - - - - - - - - - case "$host" in - x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux*) - dnl Make sure we are on architecture that supports SIMD -- if test x$CXX = xclang++; then -- CXXFLAGS="-msse2 $CXXFLAGS" -- else -- CXXFLAGS="-msse2 -mfpmath=sse $CXXFLAGS" -- fi - ;; - *-cygwin*) - AC_DEFINE([HAVE_CYGWIN], [1], [Define if compiling under cygwin]) diff -Nru sumo-1.1.0+dfsg1/debian/patches/50_use_system_openlayers.patch sumo-1.2.0+dfsg1/debian/patches/50_use_system_openlayers.patch --- sumo-1.1.0+dfsg1/debian/patches/50_use_system_openlayers.patch 2019-01-05 13:04:55.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/patches/50_use_system_openlayers.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Description: Use system packaged OpenLayers.js -Author: Anton Gladky -Last-Update: 2015-01-12 - -Index: sumo-0.32.0/tools/webWizard/index.html -=================================================================== ---- sumo-0.32.0.orig/tools/webWizard/index.html -+++ sumo-0.32.0/tools/webWizard/index.html -@@ -5,7 +5,7 @@ - - - -- -+ - - - diff -Nru sumo-1.1.0+dfsg1/debian/patches/series sumo-1.2.0+dfsg1/debian/patches/series --- sumo-1.1.0+dfsg1/debian/patches/series 2019-01-05 14:07:30.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/patches/series 2019-04-16 11:20:33.000000000 +0000 @@ -1,2 +1 @@ -30_add_missing_link.patch -40_drop_some_buildflags.patch +10_run_all_examples.patch diff -Nru sumo-1.1.0+dfsg1/debian/rules sumo-1.2.0+dfsg1/debian/rules --- sumo-1.1.0+dfsg1/debian/rules 2019-01-05 13:04:55.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/rules 2019-04-16 11:20:33.000000000 +0000 @@ -1,7 +1,9 @@ #!/usr/bin/make -f +BUILDDIR = $(CURDIR)/cmake-build + %: - dh $@ --parallel --with autoreconf + dh $@ --buildsystem=cmake --parallel --builddirectory=$(BUILDDIR) no_hardening_all_archs = mips mipsel @@ -18,32 +20,20 @@ include /usr/share/dpkg/buildflags.mk -override_dh_auto_configure: - dh_auto_configure -- --prefix=/usr - override_dh_auto_build-indep: - $(MAKE) doxygen - $(MAKE) pydoc + $(MAKE) --directory=$(BUILDDIR) doxygen + $(MAKE) --directory=$(BUILDDIR) userdoc || true + $(MAKE) --directory=$(BUILDDIR) javadoc #Clean some unneeded files and fix permissions find ./tools -name '*.pyc' -print0 | xargs -0 rm -f - rm -rf ./tools/contributed/traci4j/COPYING - rm -rf ./tools/contributed/trafficmodeler/src/resources/icons/Thumbs.db - rm -rf ./tools/contributed/traci4j/.gitignore rm -rf ./tools/contributed/traas/license.txt rm -rf ./tools/contributed/traci4matlab/license.txt - rm -rf ./tools/contributed/trafficmodeler/LICENSE.txt rm -rf ./tools/game/sounds/license.txt override_dh_auto_build-arch: dh_auto_build -a - $(MAKE) man + $(MAKE) --directory=$(BUILDDIR) man override_dh_auto_install: dh_auto_install find . -type d -name "__pycache__" -delete - -override_dh_auto_test-arch: - mkdir $(CURDIR)/tests_auto - cd $(CURDIR)/tests_auto; cp ../docs/examples/sumo/hokkaido/* ./; ../bin/sumo -b 0 -e 10000 -n net.net.xml -r input_routes.rou.xml -c hokkaido.sumocfg --summary-output sum.out - cat $(CURDIR)/tests_auto/sum.out - rm -rf $(CURDIR)/tests_auto diff -Nru sumo-1.1.0+dfsg1/debian/sumo.install sumo-1.2.0+dfsg1/debian/sumo.install --- sumo-1.1.0+dfsg1/debian/sumo.install 2019-01-11 09:37:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/sumo.install 2019-04-16 11:20:33.000000000 +0000 @@ -1,9 +1,8 @@ build/package/sumo.*sh etc/profile.d data/ usr/share/sumo -debian/sumo.xpm usr/share/pixmaps +build/package/sumo.png usr/share/pixmaps build/package/sumo.desktop usr/share/applications -debian/sumo.xml usr/share/mime/application -usr/bin/TraCITestClient +build/package/sumo.xml usr/share/mime/application usr/bin/activitygen usr/bin/dfrouter usr/bin/duarouter diff -Nru sumo-1.1.0+dfsg1/debian/sumo.xml sumo-1.2.0+dfsg1/debian/sumo.xml --- sumo-1.1.0+dfsg1/debian/sumo.xml 2018-04-11 07:27:07.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/sumo.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - Sumo Configuration File - Sumo Konfigurationsdatei - - - diff -Nru sumo-1.1.0+dfsg1/debian/sumo.xpm sumo-1.2.0+dfsg1/debian/sumo.xpm --- sumo-1.1.0+dfsg1/debian/sumo.xpm 2019-01-11 09:37:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/debian/sumo.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,493 +0,0 @@ -/* XPM */ -static char *sumo[] = { -/* columns rows colors chars-per-pixel */ -"256 256 231 2 ", -" c #338033", -". c #348134", -"X c #358235", -"o c #368236", -"O c #378337", -"+ c #388338", -"@ c #388438", -"# c #398439", -"$ c #3A853A", -"% c #3B853B", -"& c #3C863C", -"* c #3D873D", -"= c #3E873E", -"- c #3F883F", -"; c #408840", -": c #408940", -"> c #418941", -", c #428A42", -"< c #438A43", -"1 c #448B44", -"2 c #458C45", -"3 c #468C46", -"4 c #478D47", -"5 c #488D48", -"6 c #488E48", -"7 c #498E49", -"8 c #4A8F4A", -"9 c #4B8F4B", -"0 c #4C904C", -"q c #4D914D", -"w c #4E914E", -"e c #4F924F", -"r c #509250", -"t c #509350", -"y c #519351", -"u c #529452", -"i c #539453", -"p c #549554", -"a c #559655", -"s c #569656", -"d c #579757", -"f c #589758", -"g c #589858", -"h c #599859", -"j c #5A995A", -"k c #5B995B", -"l c #5C9A5C", -"z c #5D9B5D", -"x c #5E9B5E", -"c c #5F9C5F", -"v c #609C60", -"b c #609D60", -"n c #619D61", -"m c #629E62", -"M c #639E63", -"N c #649F64", -"B c #65A065", -"V c #66A066", -"C c #67A167", -"Z c #68A168", -"A c #69A269", -"S c #6AA36A", -"D c #6BA36B", -"F c #6CA46C", -"G c #6DA46D", -"H c #6DA56D", -"J c #6EA56E", -"K c #6FA66F", -"L c #70A670", -"P c #71A771", -"I c #72A872", -"U c #73A873", -"Y c #74A974", -"T c #75A975", -"R c #75AA75", -"E c #76AA76", -"W c #77AB77", -"Q c #78AB78", -"! c #79AC79", -"~ c #7AAD7A", -"^ c #7BAD7B", -"/ c #7CAE7C", -"( c #7DAE7D", -") c #7DAF7D", -"_ c #7EAF7E", -"` c #7FB07F", -"' c #80B080", -"] c #81B181", -"[ c #82B282", -"{ c #83B283", -"} c #84B384", -"| c #85B385", -" . c #85B485", -".. c #86B486", -"X. c #87B587", -"o. c #88B588", -"O. c #89B689", -"+. c #8AB78A", -"@. c #8BB78B", -"#. c #8CB88C", -"$. c #8DB88D", -"%. c #8DB98D", -"&. c #8EB98E", -"*. c #8FBA8F", -"=. c #90BA90", -"-. c #91BB91", -";. c #92BC92", -":. c #93BC93", -">. c #94BD94", -",. c #95BD95", -"<. c #95BE95", -"1. c #96BE96", -"2. c #97BF97", -"3. c #98BF98", -"4. c #99C099", -"5. c #9AC09A", -"6. c #9AC19A", -"7. c #9BC19B", -"8. c #9CC29C", -"9. c #9DC29D", -"0. c #9EC39E", -"q. c #9FC49F", -"w. c #A0C4A0", -"e. c #A1C5A1", -"r. c #A2C5A2", -"t. c #A2C6A2", -"y. c #A3C6A3", -"u. c #A4C7A4", -"i. c #A5C7A5", -"p. c #A6C8A6", -"a. c #A7C9A7", -"s. c #A8C9A8", -"d. c #A9CAA9", -"f. c #AACAAA", -"g. c #AACBAA", -"h. c #ABCBAB", -"j. c #ACCCAC", -"k. c #ADCCAD", -"l. c #AECDAE", -"z. c #AFCEAF", -"x. c #B0CEB0", -"c. c #B1CFB1", -"v. c #B2CFB2", -"b. c #B2D0B2", -"n. c #B3D0B3", -"m. c #B4D1B4", -"M. c #B5D1B5", -"N. c #B6D2B6", -"B. c #B7D3B7", -"V. c #B8D3B8", -"C. c #B9D4B9", -"Z. c #BAD4BA", -"A. c #BAD5BA", -"S. c #BBD5BB", -"D. c #BCD6BC", -"F. c #BDD6BD", -"G. c #BED7BE", -"H. c #BFD8BF", -"J. c #C0D8C0", -"K. c #C1D9C1", -"L. c #C2D9C2", -"P. c #C2DAC2", -"I. c #C3DAC3", -"U. c #C4DBC4", -"Y. c #C5DBC5", -"T. c #C6DCC6", -"R. c #C7DDC7", -"E. c #C8DDC8", -"W. c #C9DEC9", -"Q. c #CADECA", -"!. c #CADFCA", -"~. c #CBDFCB", -"^. c #CCE0CC", -"/. c #CDE0CD", -"(. c #CEE1CE", -"). c #CFE1CF", -"_. c #CFE2CF", -"`. c #D0E2D0", -"'. c #D1E3D1", -"]. c #D2E3D2", -"[. c #D3E4D3", -"{. c #D4E5D4", -"}. c #D5E5D5", -"|. c #D6E6D6", -" X c #D7E6D7", -".X c #D7E7D7", -"XX c #D8E7D8", -"oX c #D9E8D9", -"OX c #DAE8DA", -"+X c #DBE9DB", -"@X c #DCEADC", -"#X c #DDEADD", -"$X c #DEEBDE", -"%X c #DFEBDF", -"&X c #DFECDF", -"*X c #E0ECE0", -"=X c #E1EDE1", -"-X c #E2EDE2", -";X c #E3EEE3", -":X c #E4EFE4", -">X c #E5EFE5", -",X c #E6F0E6", -" A.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXsX2.= G -XkXB.1 , B.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX4X! . ^ 8XkXx.: = n.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX{.z . X.aXkXs.@ % k.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXC.7 @ ,.kXdX0.X # a.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuX8.$ : i.kXuX:.O + u.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX,X^ 5 N.kXiXO.O o r.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX{.x 0 Y.kXaX_ . . 8.hXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXjXS.3 s |.kXwXT X <.jXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXrX0.+ N *XkX2XK -.fXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX>X/ T 2XkX;XA %.fXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX}.x ' wXkX-Xc +.aXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXpXpXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXjXD.1 X *.fXkX@Xa | iXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX(.L L i.).:XaXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXtX7.+ = 0.kXkX].i ` rXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX1X<.; . f ' p.R.3XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX Y 8XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuXm.9 . $ z >.E.,XtXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhXp.$ l &XkXjXz.= J 3XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX}.~ 2 Y r.Y.&XfXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXpXR.5.T l , G :XkXhXp.= A :XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXwX0.0 O d ! 9.I.6XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX,XT.p.| x $ ( 5XkXjX9.& N :XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX!.V , d Y y.|.jXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXfX1X}.b.} a . #.eXkXjX;.+ m -XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXqX-.& X * e ' N..+XgXkXkXkXkXsX2XP.| 5 X & 7 b ;.W.tXhXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX3X&.# O z u.+XeXkXkXkXkXkXpXT.} i ; X > P p.|.5XsXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXaXZ.g $ J a.].yXkXkXkXkXkXuXP.$.B 1 a } z.(.4XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXoX_ O 3 I q.].kXkXkXkXkXkXrXE.q.P > > N .f.'.sXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXgXi.q 8 C w.-XkXkXkXkXkXkXwXoXl.P $ X 7 x { M.XX.: i Q j.1XkXkXkXkXkXkXkX,XY.5.b . 1 x ^ p.[.hXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhXN.i @ 9 T A.rXkXkXkXkXkXkXkX8X X9.l O O 1 a ] B.3XgXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX*X^ . . 1 [ Y.4XgXkXkXkXkXkXkXgX#X9.v 3 X . $ c <.W.,XtXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXwXf.7 y &.K.:XkXkXkXkXkXkXkXkXXXw.P t 3 R t.Y.*XfXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXW.L . z o.C.8XkXkXkXkXkXkXkXhXXXx.[ u O g ~ 9.Y.7XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX.B o @ u.kXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX1XJ.R $ 0 S i.:XkXkXkXkXkXkXkXkXkXkX5X`.e.m X j tXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXsX*X<.q + o : D n.6XdXkXkXkXkXkXkXkXkXkXuX#Xt.b - X . V.kXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuXb.J 5 - / Z.&XdXkXkXkXkXkXkXkXkXkXkX&Xt.D w X B gXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX).;.x w [ b.%XkXkXkXkXkXkXkXkXkXkXkXOXf._ p # E.kXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX>XC.^ % a ~ x.5XkXkXkXkXkXkXkXkXkXkXjX$XD.@.i / fXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuX+X3.0 . $ 0 W G.tXkXkXkXkXkXkXkXkXkXkXfX4XQ.%.w o < ^.kXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuXN.A 1 X 6 .W.5XhXkXkXkXkXkXkXkXkXkXkXdX_.#.d , } jXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX'.$.k X p -.P..A 6 5 }.kXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX>Xn.! * o v @.S.qXkXkXkXkXkXkXkXkXkXkXkXpX(.p.W 4 . +.kXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXyX|.4.e = h ..E.fXkXkXkXkXkXkXkXkXkXkXkXtX+XM.! ; 3 3XkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXqXA.V * & y -. XyXkXkXkXkXkXkXkXkXkXkXkXsX7XA.W 4 # 0.kXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX{.O.s o l 0.].8XkXkXkXkXkXkXkXkXkXkXkXkXwXA.) f = u qXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX4Xh.Y < # S 9.W.tXkXkXkXkXkXkXkXkXkXkXkXkX6XS.$.B & . x.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXiX).3.u 1 C <._.kXkXkXkXkXkXkXkXkXkXkXkXkX5XQ.w.A O B 9XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX,Xl.3XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX4XZ.S O 1 z 0.*XgXkXkXkXkXkXkXkXkXkXkXkXkXqX+Xp.N $ . @ M.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX`.j . : +.}.tXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhXOX..e + # B g.*XtXkXkXkXkXkXkXkXkXkXkXkXkXgX;Xp.C 6 O D uXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXm.8 @ Y C.2XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX5Xd.H < & T l.}.aXkXkXkXkXkXkXkXkXkXkXkXkXkX&Xa.W a . % J.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuX>.$ m 5.oXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXfXR.;.d 8 E i.XXkXkXkXkXkXkXkXkXkXkXkXkXkXkX$XM.+.f I gXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX,XE q ^ !.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX;XV.G o q H d.1XkXkXkXkXkXkXkXkXkXkXkXkXkXjX:XR.;.p @ |.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX'.j & m Z.wXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXpXXX+.4 o o , J V.6XdXkXkXkXkXkXkXkXkXkXkXkXkXhXrX[.-.p & .kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhXN.2 u q.+XfXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXwXd.Z 1 > ` F.*XfXkXkXkXkXkXkXkXkXkXkXkXkXkXjX`.:.m 5 < $XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXrX3.+ 3 .K.uXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXgXT.@.f t .N.=XkXkXkXkXkXkXkXkXkXkXkXkXkXkXfX).q.Y 8 4.fXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX;XW = A p.3XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX&Xb.P O X f ( m.0XkXkXkXkXkXkXkXkXkXkXkXkXkXkXuX}.9XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX[.j o >.jXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXrX}.%.2 . % q / P.uXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXgXC., . } tXkXkXkXiXtXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXeXj.n > X 8 O.^.5XjXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXwX3.O # -.gXkXkXkX5X^ T D.2XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXjXW.} s f >.T.2XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX;XE = r.hXkXkXkX4XL . M 6.+XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX&Xh.I + @ m %.H.rXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX].j : z.hXkXkXkX3XK e _ !.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXeX`.*.6 : j x.jXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhXN.< 1 G.kXkXkXkX4XL & n B.wXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhX6Xx.x & H.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXrX<.+ w ~.kXkXkXkX4XP t w.+XfXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX!.] u W rXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX>X! h }.kXkXkXkX3XJ 3 } G.tXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX-Xu.J & ; I.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX(.l M %XkXkXkXkXXS g $XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhX&Xz.N . q =XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXiX3.+ & n.kXkXkXkXkXXA w ~.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXpXG.| t O 9.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXn.6 d {.kXkXkXkXkX-XC 8 U.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXOXj.Z d 7XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXsX<.& c -XkXkXkXkXkX;XC , S.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXqX_.{ ; X d.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX4XR F 3XkXkXkXkXkX:XA & M.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX5Xr.k - f sXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX`.l ! 5XkXkXkXkXkX:XZ * j.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXT.Q < . A.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXb.9 O.0XkXkXkXkXkX=XN & p.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuX;X_.G.h.5.*.( 4 A iXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXfX-.* 4.pXkXkXkXkXkX*XN + 9.fXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXjX = U.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXb.0 4 A.kXkXkXkXkXkX=XM .dXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX0X XG.u.O.G p @ ! dXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXaX-.& w Q.kXkXkXkXkXkX#Xm ] yXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX&XA.2.Q M e % - '.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX3XT . d {.kXkXkXkXkXkX%Xn E rXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXhXsXoXg.^ a 6 * ' kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX].l M #XkXkXkXkXkXkX&XM K wXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXuX3X[.u.Y 4 O . * -XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXm.7 K ;XkXkXkXkXkXkX&Xn A 6XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXjX;XR.u.~ e ;.jXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXyX<.$ ( 6XkXkXkXkXkXkX+Xv C 1XkXkXkXkXkXkXkXkXkXkXkXkXkXkXyX!.r.) k @ q =XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX I.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXrX1.@ + =.hXkXkXkXkXkXkXkXoXj W jXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkX>X! * 0.kXkXkXkXkXkXkXkX.Xf - '.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkX(.l , l.kXkXkXkXkXkXkXkX].d ] kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXb.5 2 S.kXkXkXkXkXkXkXkX}.d * -XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXuX1.+ 0 !.kXkXkXkXkXkXkXkX Xd >.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXeXQ d {.kXkXkXkXkXkXkXkX Xa 9 -XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkX8XX.$ M #XkXkXkXkXkXkXkXkX].p 0.hXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXfXD.t D XqXfXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX/.0 @ 3 p ~ f.+XdXjXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX/.0 . 0 V { j..XhXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXW.0 , A *.m.[.rXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXT.7 i o.A.oX7XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX|.l # < A y.+XrXfXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXwX@.; 1 l [ V.5XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXA.k 9 P 5.R.tXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX;X{ . 5 ` n.}.tXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXaXM.3 . 1 ) H. & K B.hXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXP.z o W G.pXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX1XO.+ F T.tXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXaX%XtXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX ", -" dXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXdX ", -" 0XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX0X ", -" +XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX+X ", -" D.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXD. ", -" ;.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX;. ", -"lX z kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXz lX", -"lX . 1XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX1X. lX", -"lX 9.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX9. lX", -"lX 4 sXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXsX4 lX", -"lXlX a.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXa. lXlX", -"lXlX ; 7XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX7X; lXlX", -"lXlXlX Y kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXY lXlXlX", -"lXlXlX p.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXp. lXlXlX", -"lXlXlXlX X G.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXG.X lXlXlXlX", -"lXlXlXlX # G.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXG.# lXlXlXlX", -"lXlXlXlXlX X a.kXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXa.X lXlXlXlXlX", -"lXlXlXlXlXlX R 8XkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkX8XR lXlXlXlXlXlX", -"lXlXlXlXlXlXlX : a.sXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXkXsXa.: lXlXlXlXlXlXlX", -"lXlXlXlXlXlXlXlX 4 9.. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputting dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -# Get the directory component of the given path, and save it in the -# global variables '$dir'. Note that this directory component will -# be either empty or ending with a '/' character. This is deliberate. -set_dir_from () -{ - case $1 in - */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; - *) dir=;; - esac -} - -# Get the suffix-stripped basename of the given path, and save it the -# global variable '$base'. -set_base_from () -{ - base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` -} - -# If no dependency file was actually created by the compiler invocation, -# we still have to create a dummy depfile, to avoid errors with the -# Makefile "include basename.Plo" scheme. -make_dummy_depfile () -{ - echo "#dummy" > "$depfile" -} - -# Factor out some common post-processing of the generated depfile. -# Requires the auxiliary global variable '$tmpdepfile' to be set. -aix_post_process_depfile () -{ - # If the compiler actually managed to produce a dependency file, - # post-process it. - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependency.h'. - # Do two passes, one to just change these to - # $object: dependency.h - # and one to simply output - # dependency.h: - # which is needed to avoid the deleted-header problem. - { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" - sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" - } > "$depfile" - rm -f "$tmpdepfile" - else - make_dummy_depfile - fi -} - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' -# Character ranges might be problematic outside the C locale. -# These definitions help. -upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ -lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 -alpha=${upper}${lower} - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Avoid interferences from the environment. -gccflag= dashmflag= - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp -fi - -if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 -fi - -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. -## (see the conditional assignment to $gccflag above). -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). Also, it might not be -## supported by the other compilers which use the 'gcc' depmode. -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The second -e expression handles DOS-style file names with drive - # letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. -## Some versions of gcc put a space before the ':'. On the theory -## that the space means something, we add a space to the output as -## well. hp depmode also adds that space, but also prefixes the VPATH -## to the object. Take care to not repeat it in the output. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ - | tr "$nl" ' ' >> "$depfile" - echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" - ;; - -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - aix_post_process_depfile - ;; - -tcc) - # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 - # FIXME: That version still under development at the moment of writing. - # Make that this statement remains true also for stable, released - # versions. - # It will wrap lines (doesn't matter whether long or short) with a - # trailing '\', as in: - # - # foo.o : \ - # foo.c \ - # foo.h \ - # - # It will put a trailing '\' even on the last line, and will use leading - # spaces rather than leading tabs (at least since its commit 0394caf7 - # "Emit spaces for -MD"). - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. - # We have to change lines of the first kind to '$object: \'. - sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" - # And for each line of the second kind, we have to emit a 'dep.h:' - # dummy dependency, to avoid the deleted-header problem. - sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" - rm -f "$tmpdepfile" - ;; - -## The order of this option in the case statement is important, since the -## shell code in configure will try each of these formats in the order -## listed in this file. A plain '-MD' option would be understood by many -## compilers, so we must ensure this comes after the gcc and icc options. -pgcc) - # Portland's C compiler understands '-MD'. - # Will always output deps to 'file.d' where file is the root name of the - # source file under compilation, even if file resides in a subdirectory. - # The object file name does not affect the name of the '.d' file. - # pgcc 10.2 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\' : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - set_dir_from "$object" - # Use the source, not the object, to determine the base name, since - # that's sadly what pgcc will do too. - set_base_from "$source" - tmpdepfile=$base.d - - # For projects that build the same source file twice into different object - # files, the pgcc approach of using the *source* file root name can cause - # problems in parallel builds. Use a locking strategy to avoid stomping on - # the same $tmpdepfile. - lockdir=$base.d-lock - trap " - echo '$0: caught signal, cleaning up...' >&2 - rmdir '$lockdir' - exit 1 - " 1 2 13 15 - numtries=100 - i=$numtries - while test $i -gt 0; do - # mkdir is a portable test-and-set. - if mkdir "$lockdir" 2>/dev/null; then - # This process acquired the lock. - "$@" -MD - stat=$? - # Release the lock. - rmdir "$lockdir" - break - else - # If the lock is being held by a different process, wait - # until the winning process is done or we timeout. - while test -d "$lockdir" && test $i -gt 0; do - sleep 1 - i=`expr $i - 1` - done - fi - i=`expr $i - 1` - done - trap - 1 2 13 15 - if test $i -le 0; then - echo "$0: failed to acquire lock after $numtries attempts" >&2 - echo "$0: check lockdir '$lockdir'" >&2 - exit 1 - fi - - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - set_dir_from "$object" - set_base_from "$object" - - if test "$libtool" = yes; then - # Libtool generates 2 separate objects for the 2 libraries. These - # two compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir$base.o.d # libtool 1.5 - tmpdepfile2=$dir.libs/$base.o.d # Likewise. - tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - # Same post-processing that is required for AIX mode. - aix_post_process_depfile - ;; - -msvc7) - if test "$libtool" = yes; then - showIncludes=-Wc,-showIncludes - else - showIncludes=-showIncludes - fi - "$@" $showIncludes > "$tmpdepfile" - stat=$? - grep -v '^Note: including file: ' "$tmpdepfile" - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The first sed program below extracts the file names and escapes - # backslashes for cygpath. The second sed program outputs the file - # name when reading, but also accumulates all include files in the - # hold buffer in order to output them again at the end. This only - # works with sed implementations that can handle large buffers. - sed < "$tmpdepfile" -n ' -/^Note: including file: *\(.*\)/ { - s//\1/ - s/\\/\\\\/g - p -}' | $cygpath_u | sort -u | sed -n ' -s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p -s/.\(.*\) \\/\1:/ -H -$ { - s/.*/'"$tab"'/ - G - p -}' >> "$depfile" - echo >> "$depfile" # make sure the fragment doesn't end with a backslash - rm -f "$tmpdepfile" - ;; - -msvc7msys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. - "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this sed invocation - # correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - # makedepend may prepend the VPATH from the source file name to the object. - # No need to regex-escape $object, excess matching of '.' is harmless. - sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process the last invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed '1,2d' "$tmpdepfile" \ - | tr ' ' "$nl" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E \ - | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - | sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff -Nru sumo-1.1.0+dfsg1/docs/examples/dfrouter/dfrouter.dfrocfg sumo-1.2.0+dfsg1/docs/examples/dfrouter/dfrouter.dfrocfg --- sumo-1.1.0+dfsg1/docs/examples/dfrouter/dfrouter.dfrocfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/dfrouter/dfrouter.dfrocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/dfrouter/emitters.add.xml sumo-1.2.0+dfsg1/docs/examples/dfrouter/emitters.add.xml --- sumo-1.1.0+dfsg1/docs/examples/dfrouter/emitters.add.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/dfrouter/emitters.add.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/dfrouter/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/dfrouter/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/dfrouter/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/dfrouter/routes.rou.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,41 @@ + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/dfrouter/test.dfrocfg sumo-1.2.0+dfsg1/docs/examples/dfrouter/test.dfrocfg --- sumo-1.1.0+dfsg1/docs/examples/dfrouter/test.dfrocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/dfrouter/test.dfrocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.alt.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/routes.rou.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/test.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/test.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes/test.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes/test.duarcfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.alt.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/routes.rou.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/test.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/test.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/test.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval/test.duarcfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.alt.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/routes.rou.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/test.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/test.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/test.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_100s_interval_ext/test.duarcfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.alt.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/routes.rou.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/test.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/test.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/test.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/flows2routes_200s_interval/test.duarcfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.alt.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/routes.rou.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/test.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/test.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/test.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/test.duarcfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/routes.rou.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg sumo-1.2.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg --- sumo-1.1.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/test.jtrrcfg sumo-1.2.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/test.jtrrcfg --- sumo-1.1.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/test.jtrrcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/jtrrouter/straight_only_sinks/test.jtrrcfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/jtrrouter/turns/routes.rou.xml sumo-1.2.0+dfsg1/docs/examples/jtrrouter/turns/routes.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/jtrrouter/turns/routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/jtrrouter/turns/routes.rou.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/jtrrouter/turns/test.jtrrcfg sumo-1.2.0+dfsg1/docs/examples/jtrrouter/turns/test.jtrrcfg --- sumo-1.1.0+dfsg1/docs/examples/jtrrouter/turns/test.jtrrcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/jtrrouter/turns/test.jtrrcfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/jtrrouter/turns/turns.jtrrcfg sumo-1.2.0+dfsg1/docs/examples/jtrrouter/turns/turns.jtrrcfg --- sumo-1.1.0+dfsg1/docs/examples/jtrrouter/turns/turns.jtrrcfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/jtrrouter/turns/turns.jtrrcfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_no_turnarounds/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_prohibitions/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/connections/cross3l_unconstrained/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/dlr-testtrack/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/dlr-testtrack/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/dlr-testtrack/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/dlr-testtrack/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,576 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/dlr-testtrack/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/dlr-testtrack/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/dlr-testtrack/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/dlr-testtrack/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/hokkaido.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/hokkaido.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/hokkaido.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/hokkaido.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.con.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.con.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.con.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.con.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.edg.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.edg.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.edg.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.edg.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,34 @@ + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.nod.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.nod.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.nod.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.nod.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,36 @@ + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.tll.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.tll.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/plain.tll.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/plain.tll.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,30 @@ + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/hokkaido/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/hokkaido/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,1673 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.con.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.con.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.con.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.con.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,624 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.edg.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.edg.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.edg.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.edg.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.nod.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.nod.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.nod.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.nod.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.tll.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.tll.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.tll.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.tll.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.typ.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.typ.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/plain.typ.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/OSM/adlershof_dlr/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_notypes/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_notypes/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_notypes/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_notypes/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_notypes/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_notypes/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_notypes/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_notypes/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/net.net.xml sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/net.net.xml --- sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/test.netccfg sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/test.netccfg --- sumo-1.1.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/test.netccfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/netconvert/types/cross_usingtypes/test.netccfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/runAll.py sumo-1.2.0+dfsg1/docs/examples/runAll.py --- sumo-1.1.0+dfsg1/docs/examples/runAll.py 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/runAll.py 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,60 @@ +import subprocess,sys +for p in [ + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/dfrouter", r"--write-license", r"--include-unused-routes", r"--measure-files", r"input_tri_flows.txt", r"--keep-longer-routes", r"--net-file=input_tri.net.xml", r"--detector-files=input_tri.det.xml", r"--routes-output", r"routes.rou.xml", r"--emitters-output", r"emitters.add.xml", r"-e", r"60"], cwd=r"/home/delphi/gcc/sumo/docs/examples/dfrouter"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes_100s_interval"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes_100s_interval_ext"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/flows2routes_200s_interval"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/duarouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_trips.trips.xml", r"-o", r"routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/duarouter/trips2routes"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/jtrrouter", r"--no-step-log", r"--write-license", r"--output-file=routes.rou.xml", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"--sinks=end", r"--turns=input_turns.turns.xml", r"--ignore-errors"], cwd=r"/home/delphi/gcc/sumo/docs/examples/jtrrouter/turns"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/jtrrouter", r"--no-step-log", r"--write-license", r"--net-file=input_net.net.xml", r"--route-files=input_flows.flows.xml", r"--output-file=routes.rou.xml", r"--turn-defaults=0,100,0,0", r"--sinks=end", r"--ignore-errors"], cwd=r"/home/delphi/gcc/sumo/docs/examples/jtrrouter/straight_only_sinks"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--connection-files", r"input_connections.con.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_edge2edge_conns"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--connection-files=input_connections.con.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_lane2lane_conns"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh", r"--no-turnarounds"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_no_turnarounds"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--connection-files", r"input_connections.con.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_prohibitions"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/connections/cross3l_unconstrained"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--plain-output=plain", r"--plain.extend-edge-shape"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/hokkaido"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--connection-files=input_connections.con.xml", r"--output=net.net.xml", r"--no-turnarounds"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/dlr-testtrack"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--type-files=input_types.typ.xml", r"--output=net.net.xml", r"--speed-in-kmh"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--output=net.net.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/types/cross_notypes"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--edge-files=input_edges.edg.xml", r"--node-files=input_nodes.nod.xml", r"--type-files=input_types.typ.xml", r"--output=net.net.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/types/cross_usingtypes"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/netconvert", r"--write-license", r"--no-internal-links", r"--osm-files", r"osm.xml", r"-v", r"--proj.utm", r"--output.street-names", r"--plain-output-prefix", r"plain", r"--proj.plain-geo", r"--output", r"net.net.xml", r"--tls.red.time", r"10"], cwd=r"/home/delphi/gcc/sumo/docs/examples/netconvert/OSM/adlershof_dlr"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"-b", r"0", r"-e", r"10000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/hokkaido"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"-b", r"0", r"-e", r"1000", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"-a", r"input_additional.add.xml,input_additional2.add.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/variable_speed_signs"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"--vehroute-output", r"vehroutes.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/vehicle_stops"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-a=input_additional.add.xml", r"--vehroutes=vehroutes.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/busses"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"-n", r"net.net.xml", r"--route-files=input_routes.rou.xml", r"--additional-files=input_additional.add.xml", r"--fcd-output", r"fcd.xml", r"--fcd-output.signals"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/angled_roadside_parking"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"--time-to-teleport", r"-1"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/visualization/parade"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--emission-output=emissions.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_emission"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--fcd-output=fcd.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_fcd"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--full-output=full.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_full"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_inductloops"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_meandata_constrained"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_meandata_edges"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_meandata_lanes"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--queue-output=queue.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"200"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_queue"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--netstate-dump=rawdump.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"90", r"-e", r"120"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_rawdump"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"--summary=summary.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_summary"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--tripinfo-output=tripinfos.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_tripinfo"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--vehroute-output=vehroutes.xml", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-b", r"0", r"-e", r"1000"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_vehroutes"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"-r", r"input_routes.rou.xml", r"-a", r"input_additional.add.xml", r"-b", r"0", r"-e", r"220"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/output/cross3ltl_vtypeprobe"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross1ltl"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"-v", r"--no-step-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross1l"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross3ltl"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/cross/cross3l"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box1l"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box2l"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box3l"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--time-to-teleport", r"-1", r"--no-step-log", r"--no-duration-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/simple_nets/box/box4l"), + subprocess.Popen([r"/home/delphi/gcc/sumo/bin/sumo", r"--write-license", r"--default.speeddev", r"0", r"--no-step-log", r"--net-file=net.net.xml", r"--routes=input_routes.rou.xml", r"--lateral-resolution", r"0.64", r"--tripinfo-output", r"tripinfos.xml", r"--duration-log.statistics"], cwd=r"/home/delphi/gcc/sumo/docs/examples/sumo/sublane_model"), + subprocess.Popen([r"python", r"/home/delphi/gcc/sumo/tools/assign/duaIterate.py", r"-n", r"input_net.net.xml", r"-t", r"input_trips.trips.xml", r"-l", r"5"], cwd=r"/home/delphi/gcc/sumo/docs/examples/tools/dua-iterate"), + subprocess.Popen([r"python", r"/home/delphi/gcc/sumo/tools/detector/flowrouter.py", r"-n", r"input_net.net.xml", r"-d", r"input_detectors.det.xml", r"-f", r"input_flows.txt", r"--verbose"], cwd=r"/home/delphi/gcc/sumo/docs/examples/tools/flowrouter"), + subprocess.Popen([r"python", r"/home/delphi/gcc/sumo/tools/traceExporter.py", r"-i", r"fcd.xml", r"-n", r"net.net.xml", r"--ns2mobility-output", r"mobilityfile.tcl"], cwd=r"/home/delphi/gcc/sumo/docs/examples/tools/traceExporter"), + subprocess.Popen([r"python", r"./runner.py"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/quickstart"), + subprocess.Popen([r"python", r"./runner.py"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/hello"), + subprocess.Popen([r"python", r"./runner.py", r"--nogui"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/traci_tls"), + subprocess.Popen([r"python", r"./runner.py"], cwd=r"/home/delphi/gcc/sumo/docs/tutorial/manhattan"), +]: + if p.wait() != 0: + sys.exit(1) diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/angled_roadside_parking/angled_roadside_parking.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/angled_roadside_parking/angled_roadside_parking.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/angled_roadside_parking/angled_roadside_parking.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/angled_roadside_parking/angled_roadside_parking.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/angled_roadside_parking/fcd.xml sumo-1.2.0+dfsg1/docs/examples/sumo/angled_roadside_parking/fcd.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/angled_roadside_parking/fcd.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/angled_roadside_parking/fcd.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/angled_roadside_parking/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/angled_roadside_parking/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/angled_roadside_parking/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/angled_roadside_parking/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/busses/busses.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/busses/busses.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/busses/busses.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/busses/busses.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/busses/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/busses/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/busses/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/busses/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/busses/vehroutes.xml sumo-1.2.0+dfsg1/docs/examples/sumo/busses/vehroutes.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/busses/vehroutes.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/busses/vehroutes.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/hokkaido/hokkaido.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/hokkaido/hokkaido.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/hokkaido/hokkaido.sumocfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/hokkaido/hokkaido.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/hokkaido/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/hokkaido/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/hokkaido/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/hokkaido/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/emissions.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/emissions.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/emissions.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/emissions.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_emission/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/fcd.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/fcd.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/fcd.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/fcd.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_fcd/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/full.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/full.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/full.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/full.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,18893 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_full/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/detector.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/detector.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/detector.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/detector.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,16039 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_inductloops/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_15.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_15.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_15.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_15.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,617 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_300.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_300.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_300.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_300.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_60.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_60.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_60.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_60.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_900.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_900.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/aggregated_900.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_constrained/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_300.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_300.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_300.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_300.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_60.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_60.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_60.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_60.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_900.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_900.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/aggregated_900.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_edges/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_300.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_300.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_300.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_300.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_60.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_60.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_60.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_60.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,821 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_900.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_900.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/aggregated_900.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_meandata_lanes/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/queue.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/queue.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/queue.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/queue.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,802 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_queue/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/rawdump.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/rawdump.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/rawdump.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/rawdump.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_rawdump/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/summary.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/summary.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/summary.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/summary.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,1039 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_summary/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/tripinfos.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/tripinfos.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/tripinfos.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_tripinfo/tripinfos.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/vehroutes.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/vehroutes.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/vehroutes.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vehroutes/vehroutes.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,763 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/vtypeprobe.xml sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/vtypeprobe.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/vtypeprobe.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/output/cross3ltl_vtypeprobe/vtypeprobe.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box1l/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box2l/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box3l/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/box/box4l/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1l/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross1ltl/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3l/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/simple_nets/cross/cross3ltl/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/sublane_model/sublane_model.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/sublane_model/sublane_model.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/sublane_model/sublane_model.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/sublane_model/sublane_model.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/sublane_model/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/sublane_model/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/sublane_model/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/sublane_model/test.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/sublane_model/tripinfos.xml sumo-1.2.0+dfsg1/docs/examples/sumo/sublane_model/tripinfos.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/sublane_model/tripinfos.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/sublane_model/tripinfos.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/variable_speed_signs/aggregated_25.xml sumo-1.2.0+dfsg1/docs/examples/sumo/variable_speed_signs/aggregated_25.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/variable_speed_signs/aggregated_25.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/variable_speed_signs/aggregated_25.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/variable_speed_signs/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/variable_speed_signs/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/variable_speed_signs/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/variable_speed_signs/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/vehicle_stops/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/vehicle_stops/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/vehicle_stops/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/vehicle_stops/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg 2018-12-18 09:58:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/vehicle_stops/vehroutes.xml sumo-1.2.0+dfsg1/docs/examples/sumo/vehicle_stops/vehroutes.xml --- sumo-1.1.0+dfsg1/docs/examples/sumo/vehicle_stops/vehroutes.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/vehicle_stops/vehroutes.xml 2019-04-15 22:14:40.000000000 +0000 @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/visualization/parade/parade.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/visualization/parade/parade.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/visualization/parade/parade.sumocfg 2018-12-18 09:58:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/visualization/parade/parade.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/examples/sumo/visualization/parade/test.sumocfg sumo-1.2.0+dfsg1/docs/examples/sumo/visualization/parade/test.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/sumo/visualization/parade/test.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/sumo/visualization/parade/test.sumocfg 2019-04-15 22:19:19.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_000.add.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_000.add.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_000.add.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_000.add.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_001.add.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_001.add.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_001.add.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_001.add.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_002.add.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_002.add.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_002.add.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_002.add.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_003.add.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_003.add.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_003.add.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_003.add.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_004.add.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_004.add.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_004.add.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua_dump_004.add.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.bat sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.bat --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.bat 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.bat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -%SUMO_HOME%/5 tools/assign/duaIterate.py -n input_net.net.xml -t input_trips.trips.xml -l \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.sh sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.sh --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.sh 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua-iterate.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -$SUMO_HOME/5 tools/assign/duaIterate.py -n input_net.net.xml -t input_trips.trips.xml -l \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua.log sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua.log --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dua.log 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dua.log 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,110 @@ +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/duarouter', '-c', 'iteration_000_input_trips.duarcfg'] +Loading configuration... done. +Success. +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/sumo', '-c', 'iteration_000.sumocfg'] +Loading configuration... done. +Loading net-file from 'input_net.net.xml'... done (0ms). +Loading additional-files from 'dua_dump_000.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 244.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20333.3 + UPS: 116166.666667 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/duarouter', '-c', 'iteration_001_input_trips_000.duarcfg'] +Loading configuration... done. +Success. +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/sumo', '-c', 'iteration_001.sumocfg'] +Loading configuration... done. +Loading net-file from 'input_net.net.xml'... done (0ms). +Loading additional-files from 'dua_dump_001.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20250 + UPS: 114333.333333 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/duarouter', '-c', 'iteration_002_input_trips_001.duarcfg'] +Loading configuration... done. +Success. +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/sumo', '-c', 'iteration_002.sumocfg'] +Loading configuration... done. +Loading net-file from 'input_net.net.xml'... done (1ms). +Loading additional-files from 'dua_dump_002.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 13ms + Real time factor: 18692.3 + UPS: 105538.461538 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/duarouter', '-c', 'iteration_003_input_trips_002.duarcfg'] +Loading configuration... done. +Success. +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/sumo', '-c', 'iteration_003.sumocfg'] +Loading configuration... done. +Loading net-file from 'input_net.net.xml'... done (0ms). +Loading additional-files from 'dua_dump_003.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20250 + UPS: 114333.333333 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/duarouter', '-c', 'iteration_004_input_trips_003.duarcfg'] +Loading configuration... done. +Success. +------------------------------------------------------------------------------- +['/home/delphi/gcc/sumo/bin/sumo', '-c', 'iteration_004.sumocfg'] +Loading configuration... done. +Loading net-file from 'input_net.net.xml'... done (1ms). +Loading additional-files from 'dua_dump_004.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20250 + UPS: 114333.333333 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_000_900.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_000_900.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_000_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_000_900.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,50 @@ + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_001_900.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_001_900.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_001_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_001_900.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_002_900.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_002_900.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_002_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_002_900.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_003_900.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_003_900.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_003_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_003_900.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_004_900.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_004_900.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/dump_004_900.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/dump_004_900.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.alt.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_000.rou.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.alt.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_001.rou.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.alt.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_002.rou.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.alt.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_003.rou.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.alt.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.alt.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.alt.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.alt.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/input_trips_004.rou.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000_input_trips.duarcfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000_input_trips.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000_input_trips.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000_input_trips.duarcfg 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumocfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumocfg 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumo.log sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumo.log --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumo.log 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_000.sumo.log 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,15 @@ +Loading net-file from 'input_net.net.xml'... done (0ms). +Loading additional-files from 'dua_dump_000.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 244.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20333.3 + UPS: 116166.666667 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001_input_trips_000.duarcfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001_input_trips_000.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001_input_trips_000.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001_input_trips_000.duarcfg 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumocfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumocfg 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumo.log sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumo.log --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumo.log 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_001.sumo.log 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,15 @@ +Loading net-file from 'input_net.net.xml'... done (0ms). +Loading additional-files from 'dua_dump_001.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20250 + UPS: 114333.333333 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002_input_trips_001.duarcfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002_input_trips_001.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002_input_trips_001.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002_input_trips_001.duarcfg 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumocfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumocfg 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumo.log sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumo.log --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumo.log 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_002.sumo.log 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,15 @@ +Loading net-file from 'input_net.net.xml'... done (1ms). +Loading additional-files from 'dua_dump_002.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 13ms + Real time factor: 18692.3 + UPS: 105538.461538 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003_input_trips_002.duarcfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003_input_trips_002.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003_input_trips_002.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003_input_trips_002.duarcfg 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumocfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumocfg 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumo.log sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumo.log --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumo.log 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_003.sumo.log 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,15 @@ +Loading net-file from 'input_net.net.xml'... done (0ms). +Loading additional-files from 'dua_dump_003.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20250 + UPS: 114333.333333 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004_input_trips_003.duarcfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004_input_trips_003.duarcfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004_input_trips_003.duarcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004_input_trips_003.duarcfg 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumocfg sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumocfg --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumocfg 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumo.log sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumo.log --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumo.log 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/iteration_004.sumo.log 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,15 @@ +Loading net-file from 'input_net.net.xml'... done (1ms). +Loading additional-files from 'dua_dump_004.add.xml'... done (0ms). +Loading done. +Simulation version 1.2.0 started with time: 0.00 +Simulation ended at time: 243.00 +Reason: All vehicles have left the simulation. +Performance: + Duration: 12ms + Real time factor: 20250 + UPS: 114333.333333 +Vehicles: + Inserted: 10 + Running: 0 + Waiting: 0 + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/stdout.log sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/stdout.log --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/stdout.log 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/stdout.log 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,71 @@ +> Executing step 0 +>> Running router on input_trips.trips.xml +>>> Begin time: 2019-04-16 00:14:41.518628 +>>> End time: 2019-04-16 00:14:41.588525 +>>> Duration: 0:00:00.069897 +<< +>> Running simulation +>>> Begin time: 2019-04-16 00:14:41.588597 +>>> End time: 2019-04-16 00:14:41.644842 +>>> Duration: 0:00:00.056245 +<< +< Step 0 ended (duration: 0:00:00.126330) +------------------ + +> Executing step 1 +>> Running router on input_trips_000.rou.alt.xml +>>> Begin time: 2019-04-16 00:14:41.647488 +>>> End time: 2019-04-16 00:14:41.706564 +>>> Duration: 0:00:00.059076 +<< +>> Running simulation +>>> Begin time: 2019-04-16 00:14:41.706637 +>>> End time: 2019-04-16 00:14:41.762180 +>>> Duration: 0:00:00.055543 +<< +< Step 1 ended (duration: 0:00:00.114816) +------------------ + +> Executing step 2 +>> Running router on input_trips_001.rou.alt.xml +>>> Begin time: 2019-04-16 00:14:41.824855 +>>> End time: 2019-04-16 00:14:41.874556 +>>> Duration: 0:00:00.049701 +<< +>> Running simulation +>>> Begin time: 2019-04-16 00:14:41.874629 +>>> End time: 2019-04-16 00:14:41.943555 +>>> Duration: 0:00:00.068926 +<< +< Step 2 ended (duration: 0:00:00.118844) +------------------ + +> Executing step 3 +>> Running router on input_trips_002.rou.alt.xml +>>> Begin time: 2019-04-16 00:14:41.945316 +>>> End time: 2019-04-16 00:14:41.991062 +>>> Duration: 0:00:00.045746 +<< +>> Running simulation +>>> Begin time: 2019-04-16 00:14:41.991131 +>>> End time: 2019-04-16 00:14:42.044598 +>>> Duration: 0:00:00.053467 +<< +< Step 3 ended (duration: 0:00:00.099407) +------------------ + +> Executing step 4 +>> Running router on input_trips_003.rou.alt.xml +>>> Begin time: 2019-04-16 00:14:42.046641 +>>> End time: 2019-04-16 00:14:42.091729 +>>> Duration: 0:00:00.045088 +<< +>> Running simulation +>>> Begin time: 2019-04-16 00:14:42.091799 +>>> End time: 2019-04-16 00:14:42.146069 +>>> Duration: 0:00:00.054270 +<< +< Step 4 ended (duration: 0:00:00.099545) +------------------ + +dua-iterate ended (duration: 0:00:00.635987) diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_000.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_000.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_000.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_000.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_001.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_001.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_001.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_001.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_002.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_002.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_002.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_002.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_003.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_003.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_003.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_003.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_004.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_004.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/summary_004.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/summary_004.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/test.bat sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/test.bat --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/test.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/test.bat 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1 @@ +%SUMO_HOME%/5 tools/assign/duaIterate.py -n input_net.net.xml -t input_trips.trips.xml -l \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/test.sh sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/test.sh --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/test.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/test.sh 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1 @@ +$SUMO_HOME/5 tools/assign/duaIterate.py -n input_net.net.xml -t input_trips.trips.xml -l \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_000.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_000.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_000.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_000.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_001.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_001.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_001.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_001.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_002.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_002.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_002.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_002.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_003.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_003.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_003.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_003.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_004.xml sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_004.xml --- sumo-1.1.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_004.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/dua-iterate/tripinfo_004.xml 2019-04-15 22:14:42.000000000 +0000 @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.bat sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.bat --- sumo-1.1.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.bat 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.bat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -%SUMO_HOME%/--verbose 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-1.1.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.sh sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.sh --- sumo-1.1.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.sh 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/flowrouter.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -$SUMO_HOME/--verbose 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-1.1.0+dfsg1/docs/examples/tools/flowrouter/test.bat sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/test.bat --- sumo-1.1.0+dfsg1/docs/examples/tools/flowrouter/test.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/test.bat 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1 @@ +%SUMO_HOME%/--verbose 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-1.1.0+dfsg1/docs/examples/tools/flowrouter/test.sh sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/test.sh --- sumo-1.1.0+dfsg1/docs/examples/tools/flowrouter/test.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/flowrouter/test.sh 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1 @@ +$SUMO_HOME/--verbose 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-1.1.0+dfsg1/docs/examples/tools/traceExporter/mobilityfile.tcl sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/mobilityfile.tcl --- sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/mobilityfile.tcl 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/mobilityfile.tcl 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,264 @@ +$node_(0) set X_ 516.45 +$node_(0) set Y_ 498.35 +$node_(0) set Z_ 0 +$ns_ at 10.0 "$node_(0) setdest 516.45 498.35 11.11" +$ns_ at 11.0 "$node_(0) setdest 527.56 498.35 11.11" +$ns_ at 12.0 "$node_(0) setdest 538.67 498.35 11.11" +$ns_ at 13.0 "$node_(0) setdest 549.78 498.35 11.11" +$ns_ at 14.0 "$node_(0) setdest 560.89 498.35 11.11" +$ns_ at 15.0 "$node_(0) setdest 572.0 498.35 11.11" +$ns_ at 16.0 "$node_(0) setdest 583.11 498.35 11.11" +$ns_ at 17.0 "$node_(0) setdest 594.22 498.35 11.11" +$ns_ at 18.0 "$node_(0) setdest 605.33 498.35 11.11" +$ns_ at 19.0 "$node_(0) setdest 616.44 498.35 11.11" +$ns_ at 20.0 "$node_(0) setdest 627.55 498.35 11.11" +$node_(1) set X_ 498.35 +$node_(1) set Y_ 483.55 +$node_(1) set Z_ 0 +$ns_ at 20.0 "$node_(1) setdest 498.35 483.55 11.11" +$ns_ at 21.0 "$node_(0) setdest 638.66 498.35 11.11" +$ns_ at 21.0 "$node_(1) setdest 498.35 472.44 11.11" +$ns_ at 22.0 "$node_(0) setdest 649.77 498.35 11.11" +$ns_ at 22.0 "$node_(1) setdest 498.35 461.33 11.11" +$ns_ at 23.0 "$node_(0) setdest 660.88 498.35 11.11" +$ns_ at 23.0 "$node_(1) setdest 498.35 450.22 11.11" +$ns_ at 24.0 "$node_(0) setdest 671.99 498.35 11.11" +$ns_ at 24.0 "$node_(1) setdest 498.35 439.11 11.11" +$ns_ at 25.0 "$node_(0) setdest 683.1 498.35 11.11" +$ns_ at 25.0 "$node_(1) setdest 498.35 428.0 11.11" +$ns_ at 26.0 "$node_(0) setdest 694.21 498.35 11.11" +$ns_ at 26.0 "$node_(1) setdest 498.35 416.89 11.11" +$ns_ at 27.0 "$node_(0) setdest 705.32 498.35 11.11" +$ns_ at 27.0 "$node_(1) setdest 498.35 405.78 11.11" +$ns_ at 28.0 "$node_(0) setdest 716.43 498.35 11.11" +$ns_ at 28.0 "$node_(1) setdest 498.35 394.67 11.11" +$ns_ at 29.0 "$node_(0) setdest 727.54 498.35 11.11" +$ns_ at 29.0 "$node_(1) setdest 498.35 383.56 11.11" +$ns_ at 30.0 "$node_(0) setdest 738.65 498.35 11.11" +$node_(2) set X_ 516.45 +$node_(2) set Y_ 498.35 +$node_(2) set Z_ 0 +$ns_ at 30.0 "$node_(2) setdest 516.45 498.35 11.11" +$ns_ at 30.0 "$node_(1) setdest 498.35 372.45 11.11" +$ns_ at 31.0 "$node_(0) setdest 749.76 498.35 11.11" +$ns_ at 31.0 "$node_(2) setdest 527.56 498.35 11.11" +$ns_ at 31.0 "$node_(1) setdest 498.35 361.34 11.11" +$ns_ at 32.0 "$node_(0) setdest 760.87 498.35 11.11" +$ns_ at 32.0 "$node_(2) setdest 538.67 498.35 11.11" +$ns_ at 32.0 "$node_(1) setdest 498.35 350.23 11.11" +$ns_ at 33.0 "$node_(0) setdest 771.98 498.35 11.11" +$ns_ at 33.0 "$node_(2) setdest 549.78 498.35 11.11" +$ns_ at 33.0 "$node_(1) setdest 498.35 339.12 11.11" +$ns_ at 34.0 "$node_(0) setdest 783.09 498.35 11.11" +$ns_ at 34.0 "$node_(2) setdest 560.89 498.35 11.11" +$ns_ at 34.0 "$node_(1) setdest 498.35 328.01 11.11" +$ns_ at 35.0 "$node_(0) setdest 794.2 498.35 11.11" +$ns_ at 35.0 "$node_(2) setdest 572.0 498.35 11.11" +$ns_ at 35.0 "$node_(1) setdest 498.35 316.9 11.11" +$ns_ at 36.0 "$node_(0) setdest 805.31 498.35 11.11" +$ns_ at 36.0 "$node_(2) setdest 583.11 498.35 11.11" +$ns_ at 36.0 "$node_(1) setdest 498.35 305.79 11.11" +$ns_ at 37.0 "$node_(0) setdest 816.42 498.35 11.11" +$ns_ at 37.0 "$node_(2) setdest 594.22 498.35 11.11" +$ns_ at 37.0 "$node_(1) setdest 498.35 294.68 11.11" +$ns_ at 38.0 "$node_(0) setdest 827.53 498.35 11.11" +$ns_ at 38.0 "$node_(2) setdest 605.33 498.35 11.11" +$ns_ at 38.0 "$node_(1) setdest 498.35 283.57 11.11" +$ns_ at 39.0 "$node_(0) setdest 838.64 498.35 11.11" +$ns_ at 39.0 "$node_(2) setdest 616.44 498.35 11.11" +$ns_ at 39.0 "$node_(1) setdest 498.35 272.46 11.11" +$ns_ at 40.0 "$node_(0) setdest 849.75 498.35 11.11" +$ns_ at 40.0 "$node_(2) setdest 627.55 498.35 11.11" +$ns_ at 40.0 "$node_(1) setdest 498.35 261.35 11.11" +$ns_ at 41.0 "$node_(0) setdest 860.86 498.35 11.11" +$ns_ at 41.0 "$node_(2) setdest 638.66 498.35 11.11" +$ns_ at 41.0 "$node_(1) setdest 498.35 250.24 11.11" +$ns_ at 42.0 "$node_(0) setdest 871.97 498.35 11.11" +$ns_ at 42.0 "$node_(2) setdest 649.77 498.35 11.11" +$ns_ at 42.0 "$node_(1) setdest 498.35 239.13 11.11" +$ns_ at 43.0 "$node_(0) setdest 883.08 498.35 11.11" +$ns_ at 43.0 "$node_(2) setdest 660.88 498.35 11.11" +$ns_ at 43.0 "$node_(1) setdest 498.35 228.02 11.11" +$ns_ at 44.0 "$node_(0) setdest 894.19 498.35 11.11" +$ns_ at 44.0 "$node_(2) setdest 671.99 498.35 11.11" +$ns_ at 44.0 "$node_(1) setdest 498.35 216.91 11.11" +$ns_ at 45.0 "$node_(0) setdest 905.3 498.35 11.11" +$ns_ at 45.0 "$node_(2) setdest 683.1 498.35 11.11" +$ns_ at 45.0 "$node_(1) setdest 498.35 205.8 11.11" +$ns_ at 46.0 "$node_(0) setdest 916.41 498.35 11.11" +$ns_ at 46.0 "$node_(2) setdest 694.21 498.35 11.11" +$ns_ at 46.0 "$node_(1) setdest 498.35 194.69 11.11" +$ns_ at 47.0 "$node_(0) setdest 927.52 498.35 11.11" +$ns_ at 47.0 "$node_(2) setdest 705.32 498.35 11.11" +$ns_ at 47.0 "$node_(1) setdest 498.35 183.58 11.11" +$ns_ at 48.0 "$node_(0) setdest 938.63 498.35 11.11" +$ns_ at 48.0 "$node_(2) setdest 716.43 498.35 11.11" +$ns_ at 48.0 "$node_(1) setdest 498.35 172.47 11.11" +$ns_ at 49.0 "$node_(0) setdest 949.74 498.35 11.11" +$ns_ at 49.0 "$node_(2) setdest 727.54 498.35 11.11" +$ns_ at 49.0 "$node_(1) setdest 498.35 161.36 11.11" +$ns_ at 50.0 "$node_(0) setdest 960.85 498.35 11.11" +$ns_ at 50.0 "$node_(2) setdest 738.65 498.35 11.11" +$ns_ at 50.0 "$node_(1) setdest 498.35 150.25 11.11" +$ns_ at 51.0 "$node_(0) setdest 971.96 498.35 11.11" +$ns_ at 51.0 "$node_(2) setdest 749.76 498.35 11.11" +$ns_ at 51.0 "$node_(1) setdest 498.35 139.14 11.11" +$ns_ at 52.0 "$node_(0) setdest 983.07 498.35 11.11" +$ns_ at 52.0 "$node_(2) setdest 760.87 498.35 11.11" +$ns_ at 52.0 "$node_(1) setdest 498.35 128.03 11.11" +$ns_ at 53.0 "$node_(0) setdest 994.18 498.35 11.11" +$ns_ at 53.0 "$node_(2) setdest 771.98 498.35 11.11" +$ns_ at 53.0 "$node_(1) setdest 498.35 116.92 11.11" +$ns_ at 54.0 "$node_(0) setdest 999.53 501.65 11.11" +$ns_ at 54.0 "$node_(2) setdest 783.09 498.35 11.11" +$ns_ at 54.0 "$node_(1) setdest 498.35 105.81 11.11" +$ns_ at 55.0 "$node_(0) setdest 988.42 501.65 11.11" +$ns_ at 55.0 "$node_(2) setdest 794.2 498.35 11.11" +$ns_ at 55.0 "$node_(1) setdest 498.35 94.7 11.11" +$ns_ at 56.0 "$node_(0) setdest 977.31 501.65 11.11" +$ns_ at 56.0 "$node_(2) setdest 805.31 498.35 11.11" +$ns_ at 56.0 "$node_(1) setdest 498.35 83.59 11.11" +$ns_ at 57.0 "$node_(0) setdest 966.2 501.65 11.11" +$ns_ at 57.0 "$node_(2) setdest 816.42 498.35 11.11" +$ns_ at 57.0 "$node_(1) setdest 498.35 72.48 11.11" +$ns_ at 58.0 "$node_(0) setdest 955.09 501.65 11.11" +$ns_ at 58.0 "$node_(2) setdest 827.53 498.35 11.11" +$ns_ at 58.0 "$node_(1) setdest 498.35 61.37 11.11" +$ns_ at 59.0 "$node_(0) setdest 943.98 501.65 11.11" +$ns_ at 59.0 "$node_(2) setdest 838.64 498.35 11.11" +$ns_ at 59.0 "$node_(1) setdest 498.35 50.26 11.11" +$ns_ at 60.0 "$node_(0) setdest 932.87 501.65 11.11" +$ns_ at 60.0 "$node_(2) setdest 849.75 498.35 11.11" +$ns_ at 60.0 "$node_(1) setdest 498.35 39.15 11.11" +$ns_ at 61.0 "$node_(0) setdest 921.76 501.65 11.11" +$ns_ at 61.0 "$node_(2) setdest 860.86 498.35 11.11" +$ns_ at 61.0 "$node_(1) setdest 498.35 28.04 11.11" +$ns_ at 62.0 "$node_(0) setdest 910.65 501.65 11.11" +$ns_ at 62.0 "$node_(2) setdest 871.97 498.35 11.11" +$ns_ at 62.0 "$node_(1) setdest 498.35 16.93 11.11" +$ns_ at 63.0 "$node_(0) setdest 899.54 501.65 11.11" +$ns_ at 63.0 "$node_(2) setdest 883.08 498.35 11.11" +$ns_ at 63.0 "$node_(1) setdest 498.35 5.82 11.11" +$ns_ at 64.0 "$node_(0) setdest 888.43 501.65 11.11" +$ns_ at 64.0 "$node_(2) setdest 894.19 498.35 11.11" +$ns_ at 64.0 "$node_(1) setdest 501.65 0.47 11.11" +$ns_ at 65.0 "$node_(0) setdest 877.32 501.65 11.11" +$ns_ at 65.0 "$node_(2) setdest 905.3 498.35 11.11" +$ns_ at 65.0 "$node_(1) setdest 501.65 11.58 11.11" +$ns_ at 66.0 "$node_(0) setdest 866.21 501.65 11.11" +$ns_ at 66.0 "$node_(2) setdest 916.41 498.35 11.11" +$ns_ at 66.0 "$node_(1) setdest 501.65 22.69 11.11" +$ns_ at 67.0 "$node_(0) setdest 855.1 501.65 11.11" +$ns_ at 67.0 "$node_(2) setdest 927.52 498.35 11.11" +$ns_ at 67.0 "$node_(1) setdest 501.65 33.8 11.11" +$ns_ at 68.0 "$node_(0) setdest 843.99 501.65 11.11" +$ns_ at 68.0 "$node_(2) setdest 938.63 498.35 11.11" +$ns_ at 68.0 "$node_(1) setdest 501.65 44.91 11.11" +$ns_ at 69.0 "$node_(0) setdest 832.88 501.65 11.11" +$ns_ at 69.0 "$node_(2) setdest 949.74 498.35 11.11" +$ns_ at 69.0 "$node_(1) setdest 501.65 56.02 11.11" +$ns_ at 70.0 "$node_(0) setdest 821.77 501.65 11.11" +$ns_ at 70.0 "$node_(2) setdest 960.85 498.35 11.11" +$ns_ at 70.0 "$node_(1) setdest 501.65 67.13 11.11" +$ns_ at 71.0 "$node_(0) setdest 810.66 501.65 11.11" +$ns_ at 71.0 "$node_(2) setdest 971.96 498.35 11.11" +$ns_ at 71.0 "$node_(1) setdest 501.65 78.24 11.11" +$ns_ at 72.0 "$node_(0) setdest 799.55 501.65 11.11" +$ns_ at 72.0 "$node_(2) setdest 983.07 498.35 11.11" +$ns_ at 72.0 "$node_(1) setdest 501.65 89.35 11.11" +$ns_ at 73.0 "$node_(0) setdest 788.44 501.65 11.11" +$ns_ at 73.0 "$node_(2) setdest 994.18 498.35 11.11" +$ns_ at 73.0 "$node_(1) setdest 501.65 100.46 11.11" +$ns_ at 74.0 "$node_(0) setdest 777.33 501.65 11.11" +$ns_ at 74.0 "$node_(2) setdest 999.53 501.65 11.11" +$ns_ at 74.0 "$node_(1) setdest 501.65 111.57 11.11" +$ns_ at 75.0 "$node_(0) setdest 766.22 501.65 11.11" +$ns_ at 75.0 "$node_(2) setdest 988.42 501.65 11.11" +$ns_ at 75.0 "$node_(1) setdest 501.65 122.68 11.11" +$ns_ at 76.0 "$node_(0) setdest 755.11 501.65 11.11" +$ns_ at 76.0 "$node_(2) setdest 977.31 501.65 11.11" +$ns_ at 76.0 "$node_(1) setdest 501.65 133.79 11.11" +$ns_ at 77.0 "$node_(0) setdest 748.25 508.25 11.11" +$ns_ at 77.0 "$node_(2) setdest 966.2 501.65 11.11" +$ns_ at 77.0 "$node_(1) setdest 501.65 144.9 11.11" +$ns_ at 78.0 "$node_(0) setdest 736.34 508.25 11.91" +$ns_ at 78.0 "$node_(2) setdest 955.09 501.65 11.11" +$ns_ at 78.0 "$node_(1) setdest 501.65 156.01 11.11" +$ns_ at 79.0 "$node_(0) setdest 723.63 508.25 12.71" +$ns_ at 79.0 "$node_(2) setdest 943.98 501.65 11.11" +$ns_ at 79.0 "$node_(1) setdest 501.65 167.12 11.11" +$ns_ at 80.0 "$node_(0) setdest 710.12 508.25 13.51" +$ns_ at 80.0 "$node_(2) setdest 932.87 501.65 11.11" +$ns_ at 80.0 "$node_(1) setdest 501.65 178.23 11.11" +$ns_ at 81.0 "$node_(0) setdest 696.23 508.25 13.89" +$ns_ at 81.0 "$node_(2) setdest 921.76 501.65 11.11" +$ns_ at 81.0 "$node_(1) setdest 501.65 189.34 11.11" +$ns_ at 82.0 "$node_(0) setdest 682.34 508.25 13.89" +$ns_ at 82.0 "$node_(2) setdest 910.65 501.65 11.11" +$ns_ at 82.0 "$node_(1) setdest 501.65 200.45 11.11" +$ns_ at 83.0 "$node_(0) setdest 668.45 508.25 13.89" +$ns_ at 83.0 "$node_(2) setdest 899.54 501.65 11.11" +$ns_ at 83.0 "$node_(1) setdest 501.65 211.56 11.11" +$ns_ at 84.0 "$node_(0) setdest 654.56 508.25 13.89" +$ns_ at 84.0 "$node_(2) setdest 888.43 501.65 11.11" +$ns_ at 84.0 "$node_(1) setdest 501.65 222.67 11.11" +$ns_ at 85.0 "$node_(0) setdest 640.67 508.25 13.89" +$ns_ at 85.0 "$node_(2) setdest 877.32 501.65 11.11" +$ns_ at 85.0 "$node_(1) setdest 501.65 233.78 11.11" +$ns_ at 86.0 "$node_(0) setdest 626.78 508.25 13.89" +$ns_ at 86.0 "$node_(2) setdest 866.21 501.65 11.11" +$ns_ at 86.0 "$node_(1) setdest 501.65 244.89 11.11" +$ns_ at 87.0 "$node_(0) setdest 612.89 508.25 13.89" +$ns_ at 87.0 "$node_(2) setdest 855.1 501.65 11.11" +$ns_ at 87.0 "$node_(1) setdest 508.25 251.75 11.11" +$ns_ at 88.0 "$node_(0) setdest 599.0 508.25 13.89" +$ns_ at 88.0 "$node_(2) setdest 843.99 501.65 11.11" +$ns_ at 88.0 "$node_(1) setdest 508.25 263.66 11.91" +$ns_ at 89.0 "$node_(0) setdest 585.11 508.25 13.89" +$ns_ at 89.0 "$node_(2) setdest 832.88 501.65 11.11" +$ns_ at 89.0 "$node_(1) setdest 508.25 276.37 12.71" +$ns_ at 90.0 "$node_(0) setdest 571.22 508.25 13.89" +$ns_ at 90.0 "$node_(2) setdest 821.77 501.65 11.11" +$ns_ at 90.0 "$node_(1) setdest 508.25 289.88 13.51" +$ns_ at 91.0 "$node_(0) setdest 557.33 508.25 13.89" +$ns_ at 91.0 "$node_(2) setdest 810.66 501.65 11.11" +$ns_ at 91.0 "$node_(1) setdest 508.25 303.77 13.89" +$ns_ at 92.0 "$node_(0) setdest 543.44 508.25 13.89" +$ns_ at 92.0 "$node_(2) setdest 799.55 501.65 11.11" +$ns_ at 92.0 "$node_(1) setdest 508.25 317.66 13.89" +$ns_ at 93.0 "$node_(0) setdest 529.55 508.25 13.89" +$ns_ at 93.0 "$node_(2) setdest 788.44 501.65 11.11" +$ns_ at 93.0 "$node_(1) setdest 508.25 331.55 13.89" +$ns_ at 94.0 "$node_(0) setdest 515.66 508.25 13.89" +$ns_ at 94.0 "$node_(2) setdest 777.33 501.65 11.11" +$ns_ at 94.0 "$node_(1) setdest 508.25 345.44 13.89" +$ns_ at 95.0 "$node_(2) setdest 766.22 501.65 11.11" +$ns_ at 95.0 "$node_(1) setdest 508.25 359.33 13.89" +$ns_ at 96.0 "$node_(2) setdest 755.11 501.65 11.11" +$ns_ at 96.0 "$node_(1) setdest 508.25 373.22 13.89" +$ns_ at 97.0 "$node_(2) setdest 748.25 508.25 11.11" +$ns_ at 97.0 "$node_(1) setdest 508.25 387.11 13.89" +$ns_ at 98.0 "$node_(2) setdest 736.34 508.25 11.91" +$ns_ at 98.0 "$node_(1) setdest 508.25 401.0 13.89" +$ns_ at 99.0 "$node_(2) setdest 723.63 508.25 12.71" +$ns_ at 99.0 "$node_(1) setdest 508.25 414.89 13.89" +$ns_ at 100.0 "$node_(2) setdest 710.12 508.25 13.51" +$ns_ at 100.0 "$node_(1) setdest 508.25 428.78 13.89" +$ns_ at 101.0 "$node_(2) setdest 696.23 508.25 13.89" +$ns_ at 101.0 "$node_(1) setdest 508.25 442.67 13.89" +$ns_ at 102.0 "$node_(2) setdest 682.34 508.25 13.89" +$ns_ at 102.0 "$node_(1) setdest 508.25 456.56 13.89" +$ns_ at 103.0 "$node_(2) setdest 668.45 508.25 13.89" +$ns_ at 103.0 "$node_(1) setdest 508.25 470.45 13.89" +$ns_ at 104.0 "$node_(2) setdest 654.56 508.25 13.89" +$ns_ at 104.0 "$node_(1) setdest 508.25 484.34 13.89" +$ns_ at 105.0 "$node_(2) setdest 640.67 508.25 13.89" +$ns_ at 106.0 "$node_(2) setdest 626.78 508.25 13.89" +$ns_ at 107.0 "$node_(2) setdest 612.89 508.25 13.89" +$ns_ at 108.0 "$node_(2) setdest 599.0 508.25 13.89" +$ns_ at 109.0 "$node_(2) setdest 585.11 508.25 13.89" +$ns_ at 110.0 "$node_(2) setdest 571.22 508.25 13.89" +$ns_ at 111.0 "$node_(2) setdest 557.33 508.25 13.89" +$ns_ at 112.0 "$node_(2) setdest 543.44 508.25 13.89" +$ns_ at 113.0 "$node_(2) setdest 529.55 508.25 13.89" +$ns_ at 114.0 "$node_(2) setdest 515.66 508.25 13.89" diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/test.bat sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/test.bat --- sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/test.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/test.bat 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1 @@ +%SUMO_HOME%/mobilityfile.tcl tools/traceExporter.py -i fcd.xml -n net.net.xml --ns2mobility-output \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/test.sh sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/test.sh --- sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/test.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/test.sh 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1 @@ +$SUMO_HOME/mobilityfile.tcl tools/traceExporter.py -i fcd.xml -n net.net.xml --ns2mobility-output \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.bat sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.bat --- sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.bat 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.bat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -%SUMO_HOME%/mobilityfile.tcl tools/traceExporter.py -i fcd.xml -n net.net.xml --ns2mobility-output \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.sh sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.sh --- sumo-1.1.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.sh 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/examples/tools/traceExporter/traceExporter.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -$SUMO_HOME/mobilityfile.tcl tools/traceExporter.py -i fcd.xml -n net.net.xml --ns2mobility-output \ No newline at end of file Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/dev/DetectorCollaboration.dia and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/dev/DetectorCollaboration.dia differ diff -Nru sumo-1.1.0+dfsg1/docs/gfx/dev/DetectorCollaboration.eps sumo-1.2.0+dfsg1/docs/gfx/dev/DetectorCollaboration.eps --- sumo-1.1.0+dfsg1/docs/gfx/dev/DetectorCollaboration.eps 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/gfx/dev/DetectorCollaboration.eps 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,413 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: DetektorKollaboration +%%Creator: Dia v0.90 +%%CreationDate: Mon Jun 16 13:29:48 2003 +%%For: a user +%%Magnification: 1.0000 +%%Orientation: Portrait +%%BoundingBox: 0 0 1546 1253 +%%Pages: 1 +%%EndComments +%%BeginProlog +/cp {closepath} bind def +/c {curveto} bind def +/f {fill} bind def +/a {arc} bind def +/ef {eofill} bind def +/ex {exch} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth pop} bind def +/tr {translate} bind def + +/ellipsedict 8 dict def +ellipsedict /mtrx matrix put +/ellipse +{ ellipsedict begin + /endangle exch def + /startangle exch def + /yrad exch def + /xrad exch def + /y exch def + /x exch def /savematrix mtrx currentmatrix def + x y tr xrad yrad sc + 0 0 1 startangle endangle arc + savematrix setmatrix + end +} def + +/mergeprocs { +dup length +3 -1 roll +dup +length +dup +5 1 roll +3 -1 roll +add +array cvx +dup +3 -1 roll +0 exch +putinterval +dup +4 2 roll +putinterval +} bind def +%%EndProlog + +%%BeginSetup +%%EndSetup +28.346000 -28.346000 scale +10.050000 -35.120721 translate + +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n -10.000000 3.000000 m -10.000000 4.400000 l 10.611200 4.400000 l 10.611200 3.000000 l f +0.000000 0.000000 0.000000 srgb +n -10.000000 3.000000 m -10.000000 4.400000 l 10.611200 4.400000 l 10.611200 3.000000 l cp s + [ /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /M /S /L /a /n /e /hyphen /m /xi /xi /o /v /R /i /d /r + /s /colon /space /C /t /plus /parenleft /asterisk /parenright /g /V /h /c /l /y /O + /w /k /P /u /b /comma /p /equal /B /T /H /E /F /A /D /ampersand + /f /one /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi +] /e0 exch def +/Helvetica-Bold_e0 undefinefont +/Helvetica-Bold_e0 + /Helvetica-Bold findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end +definefont pop +/Helvetica-Bold_e0 ff 1.000000 scf sf +( !"#$%) sw +2 div 0.305600 ex sub 4.000000 m ( !"#$%) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n -10.000000 4.400000 m -10.000000 5.400000 l 10.611200 5.400000 l 10.611200 4.400000 l f +0.000000 0.000000 0.000000 srgb +n -10.000000 4.400000 m -10.000000 5.400000 l 10.611200 5.400000 l 10.611200 4.400000 l cp s +-9.850000 5.112903 m /Helvetica-Narrow_e0 undefinefont +/Helvetica-Narrow_e0 + /Helvetica-Narrow findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end +definefont pop +/Helvetica-Narrow_e0 ff 0.800000 scf sf +(&'*+%,%'-$.%/0 12 *+%,%'-$.%/3*$4) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n -10.000000 5.400000 m -10.000000 7.200000 l 10.611200 7.200000 l 10.611200 5.400000 l f +0.000000 0.000000 0.000000 srgb +n -10.000000 5.400000 m -10.000000 7.200000 l 10.611200 7.200000 l 10.611200 5.400000 l cp s +-9.850000 6.112903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5#.. *+%,%'-$.%/6/%'1 ! *+%,%'-$.%/7812+*-.) + gs 1 -1 sc sh gr +-9.850000 6.912903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(59%4 *+%,%'-$.%/06812 *+%,%'-$.%/3*$4) + gs 1 -1 sc sh gr +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n -10.000000 -9.000000 m -10.000000 -7.600000 l 44.412001 -7.600000 l 44.412001 -9.000000 l f +0.000000 0.000000 0.000000 srgb +n -10.000000 -9.000000 m -10.000000 -7.600000 l 44.412001 -7.600000 l 44.412001 -9.000000 l cp s +/Helvetica-Bold_e0 ff 1.000000 scf sf +( !:%;-<=%) sw +2 div 17.206000 ex sub -8.000000 m ( !:%;-<=%) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n -10.000000 -7.600000 m -10.000000 -5.800000 l 44.412001 -5.800000 l 44.412001 -7.600000 l f +0.000000 0.000000 0.000000 srgb +n -10.000000 -7.600000 m -10.000000 -5.800000 l 44.412001 -5.800000 l 44.412001 -7.600000 l cp s +-9.850000 -6.887097 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(&'> *+%,%'-$.%/012 *+%,%'-$.%/3*$4) + gs 1 -1 sc sh gr +-9.850000 -6.087097 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(&'>?=."#$% *+%,%'-$.%/012 *+%,%'-$.%/3*$4) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n -10.000000 -5.800000 m -10.000000 0.000000 l 44.412001 0.000000 l 44.412001 -5.800000 l f +0.000000 0.000000 0.000000 srgb +n -10.000000 -5.800000 m -10.000000 0.000000 l 44.412001 0.000000 l 44.412001 -5.800000 l cp s +-9.850000 -5.087097 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(&@*/A?$ *+%,%'-$.%/06*=.B*01.*CD=%E$%@B*01.*CD=%E$%@!F%%.1.*CD=%E *+%?$,%'-$.%/ *.%1 *+%?$,%'-$.%/ *.%GH?IJ812+*-.) + gs 1 -1 sc sh gr +-9.850000 -4.287097 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(&#<4-+#4%,%'-$.%/0H>K'-4?/"#$%3;#$9%6812+*-.) + gs 1 -1 sc sh gr +-9.850000 -3.487097 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5'*+%6=#$%1 !"#$%7EF/%.1 !:%;-<=%7E$%-9;1 !:%;-<=%7812+*-.) + gs 1 -1 sc sh gr +-9.850000 -2.687097 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5'*+%L-/043;% *+%6+%;1 !:%;-<=%OE%$4%/I-'%04%FL/#<4-*$1.*CD=%812+*-.) + gs 1 -1 sc sh gr +-9.850000 24.112903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5%$4%/N%4%<4*/H>K'-4?/"#$%3;#$9%6+%;1 !:%;-<=%O812+*-.) + gs 1 -1 sc sh gr +-9.850000 24.912903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5=%#+%N%4%<4*/H> *+%6+%;1 !:%;-<=%OE=%#+%I-'%04%FL/#<4-*$1.*CD=%812+*-.) + gs 1 -1 sc sh gr +-9.850000 25.712903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5=%#+%N%4%<4*/H>"#$%3;#$9%6+%;1 !:%;-<=%O812+*-.) + gs 1 -1 sc sh gr +-9.850000 26.512903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5#<4-*$0H%P*/% *+%M$.K'-46812+*-.) + gs 1 -1 sc sh gr +0.050000 slw +n -9.850000 26.592903 m 4.168400 26.592903 l s +0.100000 slw +-9.850000 27.312903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5#<4-*$0MP4%/ *+%M$.K'-46812+*-.) + gs 1 -1 sc sh gr +0.050000 slw +n -9.850000 27.392903 m 3.429200 27.392903 l s +0.100000 slw +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n 1.858557 30.070721 m 1.858557 31.470721 l 36.136158 31.470721 l 36.136158 30.070721 l f +0.000000 0.000000 0.000000 srgb +n 1.858557 30.070721 m 1.858557 31.470721 l 36.136158 31.470721 l 36.136158 30.070721 l cp s +/Helvetica-BoldOblique_e0 undefinefont +/Helvetica-BoldOblique_e0 + /Helvetica-BoldOblique findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end +definefont pop +/Helvetica-BoldOblique_e0 ff 1.000000 scf sf +( ! *+%,%'-$.%/) sw +2 div 18.997358 ex sub 31.070721 m ( ! *+%,%'-$.%/) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n 1.858557 31.470721 m 1.858557 32.470721 l 36.136158 32.470721 l 36.136158 31.470721 l f +0.000000 0.000000 0.000000 srgb +n 1.858557 31.470721 m 1.858557 32.470721 l 36.136158 32.470721 l 36.136158 31.470721 l cp s +2.008557 32.183625 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5=#$% 12 !"#$%7) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n 1.858557 32.470721 m 1.858557 35.070721 l 36.136158 35.070721 l 36.136158 32.470721 l f +0.000000 0.000000 0.000000 srgb +n 1.858557 32.470721 m 1.858557 35.070721 l 36.136158 35.070721 l 36.136158 32.470721 l cp s +2.008557 33.188608 m /Helvetica-Narrow-Oblique_e0 undefinefont +/Helvetica-Narrow-Oblique_e0 + /Helvetica-Narrow-Oblique findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end +definefont pop +/Helvetica-Narrow-Oblique_e0 ff 0.800000 scf sf +(5-0!4-==M<4-+%6+%;1 !:%;-<=%OE*=.B*01.*CD=%E$%@B*01.*CD=%E$%@!F%%.1.*CD=%812D**=) + gs 1 -1 sc sh gr +2.008557 33.988608 m /Helvetica-Narrow-Oblique_e0 ff 0.800000 scf sf +(5.-0'-00H>"#$%3;#$9%6+%;1 !:%;-<=%O812+*-.) + gs 1 -1 sc sh gr +2.008557 34.788608 m /Helvetica-Narrow-Oblique_e0 ff 0.800000 scf sf +(5-0M<4-+#4%.H>K'-4?/"#$%3;#$9%6+%;1 !:%;-<=%O812D**=) + gs 1 -1 sc sh gr +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n 2.000000 10.000000 m 2.000000 11.400000 l 36.172001 11.400000 l 36.172001 10.000000 l f +0.000000 0.000000 0.000000 srgb +n 2.000000 10.000000 m 2.000000 11.400000 l 36.172001 11.400000 l 36.172001 10.000000 l cp s +/Helvetica-Bold_e0 ff 1.000000 scf sf +( !"#$%!4#4%,%'-$.%/) sw +2 div 19.086000 ex sub 11.000000 m ( !"#$%!4#4%,%'-$.%/) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n 2.000000 11.400000 m 2.000000 14.000000 l 36.172001 14.000000 l 36.172001 11.400000 l f +0.000000 0.000000 0.000000 srgb +n 2.000000 11.400000 m 2.000000 14.000000 l 36.172001 14.000000 l 36.172001 11.400000 l cp s +2.150000 12.112903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(&04#/4B*012.*CD=%) + gs 1 -1 sc sh gr +2.150000 12.912903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(&%$.B*012.*CD=%) + gs 1 -1 sc sh gr +2.150000 13.712903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(&=#$%!4#4% 12 !"#$%!4#4%7) + gs 1 -1 sc sh gr +1.000000 1.000000 1.000000 srgb +n 2.000000 14.000000 m 2.000000 16.600000 l 36.172001 16.600000 l 36.172001 14.000000 l f +0.000000 0.000000 0.000000 srgb +n 2.000000 14.000000 m 2.000000 16.600000 l 36.172001 16.600000 l 36.172001 14.000000 l cp s +2.150000 14.712903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5-0!4-==M<4-+%6+%;1 !:%;-<=%OE*=.B*01.*CD=%E$%@B*01.*CD=%E$%@!F%%.1.*CD=%812D**=) + gs 1 -1 sc sh gr +2.150000 15.512903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5.-0'-00H>"#$%3;#$9%6+%;1 !:%;-<=%O812+*-.) + gs 1 -1 sc sh gr +2.150000 16.312903 m /Helvetica-Narrow_e0 ff 0.800000 scf sf +(5-0M<4-+#4%.H>K'-4?/"#$%3;#$9%6+%;1 !:%;-<=%O812D**=) + gs 1 -1 sc sh gr +0.100000 slw +[] 0 sd +0 slj +0 slc +n 36.136158 30.070721 m 36.136158 29.025057 l 36.172001 29.025057 l 36.172001 16.600000 l s +0 slj +1.000000 1.000000 1.000000 srgb +n 35.736158 29.270721 m 36.136158 30.070721 l 36.536158 29.270721 l f +0.100000 slw +[] 0 sd +0 slj +0.000000 0.000000 0.000000 srgb +n 35.736158 29.270721 m 36.136158 30.070721 l 36.536158 29.270721 l cp s +0.100000 slw +[] 0 sd +0 slj +0 slc +n 6.355600 20.000000 m 6.355600 18.699738 l 19.086000 18.699738 l 19.086000 16.600000 l s +[] 0 sd +0 slj +0 slc +n 6.355600 20.000000 m 6.115600 19.300000 l 6.355600 18.600000 l 6.595600 19.300000 l f +n 12.520800 18.516881 m 12.520800 18.116881 l 12.120800 18.316881 l f +19.086000 17.217143 m /Courier_e0 undefinefont +/Courier_e0 + /Courier findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end +definefont pop +/Courier_e0 ff 0.800000 scf sf +(Q) + gs 1 -1 sc sh gr +0.100000 slw +[] 0 sd +0 slj +0 slc +n 17.206000 0.000000 m 17.206000 5.121237 l 19.086000 5.121237 l 19.086000 10.000000 l s +[] 0 sd +0 slj +0 slc +1.000000 1.000000 1.000000 srgb +n 17.206000 0.000000 m 17.446000 0.700000 l 17.206000 1.400000 l 16.966000 0.700000 l f +0.100000 slw +[] 0 sd +0 slj +0 slc +0.000000 0.000000 0.000000 srgb +n 17.206000 0.000000 m 17.446000 0.700000 l 17.206000 1.400000 l 16.966000 0.700000 l cp s +n 18.246000 4.938380 m 18.246000 4.538380 l 18.646000 4.738380 l f +17.206000 0.617143 m /Courier_e0 ff 0.800000 scf sf +(7) + gs 1 -1 sc sh gr +19.086000 9.817143 m (7) + gs 1 -1 sc sh gr +0.100000 slw +[] 0 sd +0 slj +0 slc +n 2.000000 13.500000 m 2.000000 13.395636 l 0.305600 13.395636 l 0.305600 7.200000 l s +[] 0 sd +0 slj +0 slc +1.000000 1.000000 1.000000 srgb +n 0.305600 7.200000 m 0.545600 7.900000 l 0.305600 8.600000 l 0.065600 7.900000 l f +0.100000 slw +[] 0 sd +0 slj +0 slc +0.000000 0.000000 0.000000 srgb +n 0.305600 7.200000 m 0.545600 7.900000 l 0.305600 8.600000 l 0.065600 7.900000 l cp s +n 1.252800 13.212779 m 1.252800 12.812779 l 1.652800 13.012779 l f +2.000000 14.117143 m /Courier_e0 ff 0.800000 scf sf +(Q) + gs 1 -1 sc sh gr +0.305600 7.817143 m (7) + gs 1 -1 sc sh gr +0.100000 slw +[] 0 sd +0 slj +0 slc +n 0.305600 3.000000 m 0.305600 1.207320 l -10.000000 1.207320 l -10.000000 0.000000 l s +[] 0 sd +0 slj +0 slc +1.000000 1.000000 1.000000 srgb +n 0.305600 3.000000 m 0.065600 2.300000 l 0.305600 1.600000 l 0.545600 2.300000 l f +0.100000 slw +[] 0 sd +0 slj +0 slc +0.000000 0.000000 0.000000 srgb +n 0.305600 3.000000 m 0.065600 2.300000 l 0.305600 1.600000 l 0.545600 2.300000 l cp s +0.305600 3.617143 m /Courier_e0 ff 0.800000 scf sf +(Q) + gs 1 -1 sc sh gr +-10.000000 0.617143 m (7) + gs 1 -1 sc sh gr +showpage Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/dev/DetectorCollaboration.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/dev/DetectorCollaboration.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/dev/mainflow.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/dev/mainflow.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/dev/MainFlowofCommandLineApplications.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/dev/MainFlowofCommandLineApplications.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/dev/OptionsParsing.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/dev/OptionsParsing.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/dev/SUMOLoading.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/dev/SUMOLoading.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/dev/SUMOpackagehierarchy.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/dev/SUMOpackagehierarchy.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/in_progress/bulb.psd and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/in_progress/bulb.psd differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/in_progress/simcontrols.psd and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/in_progress/simcontrols.psd differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/CD_Junctions.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/CD_Junctions.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/CD_Junctions_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/CD_Junctions_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/CD_TrafficLights.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/CD_TrafficLights.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/CD_TrafficLights_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/CD_TrafficLights_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/ended_time1.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/ended_time1.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/ended_time1_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/ended_time1_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/magdeburg.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/magdeburg.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/magdeburg_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/magdeburg_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/magdeburg_sumo.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/magdeburg_sumo.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meantraveltime_time1.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meantraveltime_time1.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meantraveltime_time1_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meantraveltime_time1_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meantraveltime_time2.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meantraveltime_time2.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meantraveltime_time2_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meantraveltime_time2_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meantraveltime_time3.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meantraveltime_time3.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meantraveltime_time3_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meantraveltime_time3_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meanwaitingtime_time1.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meanwaitingtime_time1.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/meanwaitingtime_time1_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/meanwaitingtime_time1_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/veh_time1.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/veh_time1.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/veh_time1_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/veh_time1_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/veh_time2.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/veh_time2.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/veh_time2_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/veh_time2_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/veh_time3.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/veh_time3.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/veh_time3_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/veh_time3_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/waiting_time1.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/waiting_time1.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/more/waiting_time1_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/more/waiting_time1_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/allow_rotation.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/allow_rotation.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/attention_small.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/attention_small.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/basic_coordinates.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/basic_coordinates.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/bulb.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/bulb.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/bus_stop1.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/bus_stop1.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/colour_lane.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/colour_lane.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/colour_vehicle.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/colour_vehicle.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/contdisc.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/contdisc.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/cross3l_no_turnarounds.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/cross3l_no_turnarounds.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/cross3l_no_turnarounds_small.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/cross3l_no_turnarounds_small.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/dua_step1.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/dua_step1.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/dua_steps.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/dua_steps.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_complete.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_complete.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_complete_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_complete_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_network.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_network.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_network_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_network_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_network_xml.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_network_xml.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_network_xml_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_network_xml_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_routes.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_routes.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/flow_routes_small.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/flow_routes_small.png differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/ivf.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/ivf.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/locate_edge.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/locate_edge.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/locate_junction.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/locate_junction.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/locate_vehicle.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/locate_vehicle.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/manip.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/manip.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/new_window.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/new_window.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/no.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/no.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/ok.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/ok.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/parameter_window.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/parameter_window.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/play.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/play.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/recenter_view.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/recenter_view.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/reload.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/reload.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/show_geometry.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/show_geometry.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/show_grid.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/show_grid.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/show_legend.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/show_legend.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/show_tooltips.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/show_tooltips.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/simcontrols.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/simcontrols.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/simparts.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/simparts.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/simple_vs_full_geom.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/simple_vs_full_geom.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/simsteps-od2trips.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/simsteps-od2trips.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/step.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/step.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/stop.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/stop.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/tlstracker.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/tlstracker.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/tracker_agg.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/tracker_agg.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/tracker_example.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/tracker_example.gif differ Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/gfx/user/under_construction_small.gif and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/gfx/user/under_construction_small.gif differ diff -Nru sumo-1.1.0+dfsg1/docs/graphviz/flow_complete.txt sumo-1.2.0+dfsg1/docs/graphviz/flow_complete.txt --- sumo-1.1.0+dfsg1/docs/graphviz/flow_complete.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/graphviz/flow_complete.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,59 @@ +digraph complete { + node [shape=ellipse fontname="Arial" fillcolor="olivedrab2" style="filled"]; network; + node [shape=ellipse fontname="Arial" fillcolor="goldenrod1" style="filled"]; routes; + + subgraph cluster_0 { + style=filled; + color=lightgrey; + label = "network generation" + + node [shape=octagon fontname="Arial" fillcolor="olivedrab2" style="filled"]; "network description"; + + node [shape=box fontname="Arial" fillcolor="olivedrab3" style="filled"]; NETCONVERT; + node [shape=box fontname="Arial" fillcolor="olivedrab" style="filled"]; NETGEN; + + "network description" -> NETCONVERT [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + + NETCONVERT -> network [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + NETGEN -> network [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + } + + + subgraph cluster_1 { + + graph [ rankdir="TB" rank=same]; + style=filled; + color=lightgrey; + label = "demand generation" + + + node [shape=box fontname="Arial" fillcolor="goldenrod" style="filled"]; DUAROUTER; + node [shape=box fontname="Arial" fillcolor="goldenrod1" style="filled"]; DFROUTER; + node [shape=box fontname="Arial" fillcolor="goldenrod2" style="filled"]; JTRROUTER; + node [shape=octagon fontname="Arial" fillcolor="goldenrod" style="filled"]; "demand description"; + node [shape=box fontname="Arial" fillcolor="indianred1" style="filled"]; OD2TRIPS; + + "demand description" -> DFROUTER [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + "demand description" -> JTRROUTER [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + "demand description" -> DUAROUTER [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + OD2TRIPS -> "demand description" [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + "demand description" -> OD2TRIPS [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + + DUAROUTER -> routes [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + JTRROUTER -> routes [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + + } + + node [shape=Mcircle fontname="Arial" fillcolor="yellow1" style="filled"]; USER; + node [shape=box fontname="Arial" fillcolor="lightskyblue" style="filled"]; "SUMO/GUISIM"; + + node [shape=ellipse fontname="Arial" fillcolor="lightblue1" style="filled"]; "simulation output"; + node [shape=octagon fontname="Arial" fillcolor="lightcyan" style="filled"]; "additional definitions"; + + USER -> "additional definitions" [arrowhead="normal" fontname="Arial" fontsize="10"]; + network -> "SUMO/GUISIM" [arrowhead="normal" label="--net-file" fontname="Arial" fontsize="10"]; + routes -> "SUMO/GUISIM" [arrowhead="normal" label="--route-files" fontname="Arial" fontsize="10"]; + "additional definitions" -> "SUMO/GUISIM" [arrowhead="normal" label="--additional-files" fontname="Arial" fontsize="10"]; + "SUMO/GUISIM" -> "simulation output" [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + +} diff -Nru sumo-1.1.0+dfsg1/docs/graphviz/flow_network.txt sumo-1.2.0+dfsg1/docs/graphviz/flow_network.txt --- sumo-1.1.0+dfsg1/docs/graphviz/flow_network.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/graphviz/flow_network.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,47 @@ +digraph complete { + graph [rankdir = "TB"]; + + + node [shape=box fontname="Arial" fillcolor="olivedrab3" style="filled"]; NETCONVERT; + node [shape=box fontname="Arial" fillcolor="olivedrab" style="filled"]; NETGEN; + + subgraph cluster_0 { + graph [rankdir = "LR"]; + style=filled; + color=lightgrey; + label = "(Additional)\nuser descriptions" + shape = ellipse + + node [shape=record fontname="Arial" fillcolor="olivedrab3" style="filled" label="{ XML edges files | XML nodes files | XML connections files}"]; "XML Descriptions"; + + } + + + subgraph cluster_2 { + graph [rankdir = "LR"]; + style=filled; + color=lightgrey; + label = "Foreign formats" + shape = ellipse + + node [shape=record fontname="Arial" fillcolor="olivedrab3" style="filled" label="{ VISUM network | Vissim network | Cell network | ArcView/ArcGIS database | Tiger map | ARTEMIS network | Elmar map}"]; "Foreign formats"; + + } + + graph [rankdir = "TB"]; + + + "XML Descriptions" -> NETCONVERT [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + "Foreign formats" -> NETCONVERT [arrowhead="normal" label="<...>" fontname="Arial" fontsize="10"]; + + + node [shape=ellipse fontname="Arial" fillcolor="olivedrab2" style="filled"]; network; + + NETCONVERT -> network [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + NETGEN -> network [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + + + node [shape=box fontname="Arial" fillcolor="lightskyblue" style="filled"]; "SUMO/GUISIM"; + network -> "SUMO/GUISIM" [arrowhead="normal" label="--net-file" fontname="Arial" fontsize="10"]; + +} diff -Nru sumo-1.1.0+dfsg1/docs/graphviz/flow_routes.txt sumo-1.2.0+dfsg1/docs/graphviz/flow_routes.txt --- sumo-1.1.0+dfsg1/docs/graphviz/flow_routes.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/graphviz/flow_routes.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,51 @@ +graph G { + node [shape=Mcircle fontname="Arial" fillcolor="yellow1" style="filled"]; USER; + node [shape=box fontname="Arial" fillcolor="indianred1" style="filled"]; OD2TRIPS; + node [shape=box fontname="Arial" fillcolor="lightskyblue" style="filled"]; "SUMO/GUISIM"; + + subgraph T0 { + rank=same + node [shape=box fontname="Arial" fillcolor="goldenrod" style="filled"]; DUAROUTER; + node [shape=box fontname="Arial" fillcolor="goldenrod1" style="filled"]; DFROUTER; + node [shape=box fontname="Arial" fillcolor="goldenrod2" style="filled"]; JTRROUTER; + } + + subgraph T1 { + rank=same + node [shape=ellipse fontname="Arial" fillcolor="goldenrod" style="filled"]; trips; + node [shape=ellipse fontname="Arial" fillcolor="goldenrod" style="filled"]; flows; + node [shape=ellipse fontname="Arial" fillcolor="goldenrod" style="filled"]; cell_routes; + node [shape=ellipse fontname="Arial" fillcolor="goldenrod" style="filled"]; artemis_routes; + } + + subgraph T2 { + rank=same + node [shape=ellipse fontname="Arial" fillcolor="goldenrod1" style="filled"]; routes; + node [shape=ellipse fontname="Arial" fillcolor="goldenrod2" style="filled"]; route_alternatives; + node [shape=octagon fontname="Arial" fillcolor="lightcyan" style="filled"]; "emitter definitions"; + } + + + USER -- trips [arrowhead="normal" fontname="Arial" fontsize="10"]; + USER -- flows [arrowhead="normal" fontname="Arial" fontsize="10"]; + USER -- routes [arrowhead="normal" fontname="Arial" fontsize="10"]; + + OD2TRIPS -- trips [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + + trips -- DUAROUTER [arrowhead="normal" label="--trip-defs" fontname="Arial" fontsize="10"]; + cell_routes -- DUAROUTER [arrowhead="normal" label="--cell-input" fontname="Arial" fontsize="10"]; + artemis_routes -- DUAROUTER [arrowhead="normal" label="--artemis-input" fontname="Arial" fontsize="10"]; + flows -- DUAROUTER [arrowhead="normal" label="--flow-definition" fontname="Arial" fontsize="10"]; + flows -- JTRROUTER [arrowhead="normal" label="--flow-definition" fontname="Arial" fontsize="10"]; + + DUAROUTER -- routes [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + DUAROUTER -- route_alternatives [arrowhead="normal" label="--output (+.alt)" fontname="Arial" fontsize="10"]; + JTRROUTER -- routes [arrowhead="normal" label="--output" fontname="Arial" fontsize="10"]; + DFROUTER -- "emitter definitions" [arrowhead="normal" label="--emitters-output" fontname="Arial" fontsize="10"]; + + routes -- "SUMO/GUISIM" [arrowhead="normal" label="--route-files" fontname="Arial" fontsize="10"]; + "emitter definitions" -- "SUMO/GUISIM" [arrowhead="normal" label="--additional-files" fontname="Arial" fontsize="10"]; + routes -- DUAROUTER [arrowhead="normal" label="--sumo-input" fontname="Arial" fontsize="10"]; + + route_alternatives -- DUAROUTER [arrowhead="normal" label="--alternatives" fontname="Arial" fontsize="10"]; +} diff -Nru sumo-1.1.0+dfsg1/docs/modules/simulation/length_vs_minGap.svg sumo-1.2.0+dfsg1/docs/modules/simulation/length_vs_minGap.svg --- sumo-1.1.0+dfsg1/docs/modules/simulation/length_vs_minGap.svg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/simulation/length_vs_minGap.svg 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,647 @@ + + + + + + image/svg+xml + + D:\t1.svg + + + + + D:\t1.svg + +Creator: GL2PS 1.3.6, (C) 1999-2011 C. Geuzaine +For: sumo-gui; http://sumo.sf.net +CreationDate: Mon Sep 26 12:23:32 2011 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + length + minGap + } + } + diff -Nru sumo-1.1.0+dfsg1/docs/modules/simulation/vehicleStates_sm.uxf sumo-1.2.0+dfsg1/docs/modules/simulation/vehicleStates_sm.uxf --- sumo-1.1.0+dfsg1/docs/modules/simulation/vehicleStates_sm.uxf 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/simulation/vehicleStates_sm.uxf 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,203 @@ + + + 10 + + com.umlet.element.custom.InitialState + + 410 + 750 + 20 + 20 + + + + + + com.umlet.element.custom.FinalState + + 410 + 120 + 20 + 20 + + + + + + com.umlet.element.custom.State + + 640 + 260 + 190 + 130 + + teleporting +-- +For any reason, the vehicle +was temporarily removed +from the network. +-. +isOnNet()==false +held in MSVehicleTransfer + + + + com.umlet.element.custom.State + + 320 + 190 + 190 + 130 + + loaded +-- +The vehicle is loaded, but +not inserted into the network, +yet. +-. +isOnNet()==false +held in MSInsertionControl + + + + com.umlet.element.custom.State + + 320 + 380 + 190 + 130 + + running +-- +The vehicle was inserted +into the network. +-. +isOnNet()==true +held in his MSLane + + + + com.umlet.element.custom.State + + 320 + 570 + 190 + 130 + + arrived +-- +The vehicle has reached its +destination and was removed +from the network. +-. +isOnNet()==false +removed + + + + com.umlet.element.custom.State + + 640 + 420 + 190 + 120 + + parking +-- +The vehicle halts besides +the road network. +-. +isOnNet()==false +held in MSVehicleTransfer + + + + + com.umlet.element.Relation + + 390 + 110 + 50 + 100 + + lt=<- + 30;80;30;30 + + + com.umlet.element.Relation + + 390 + 290 + 50 + 110 + + lt=<- + 30;90;30;30 + + + com.umlet.element.Relation + + 390 + 480 + 50 + 110 + + lt=<- + 30;90;30;30 + + + com.umlet.element.Relation + + 480 + 270 + 180 + 150 + + lt=<- + 160;30;30;130 + + + com.umlet.element.Relation + + 480 + 290 + 180 + 150 + + lt=<- + 30;130;160;30 + + + com.umlet.element.Relation + + 480 + 410 + 180 + 70 + + lt=<- + 160;50;30;30 + + + com.umlet.element.Relation + + 480 + 430 + 180 + 70 + + lt=<- + 30;30;160;50 + + + com.umlet.element.Relation + + 390 + 670 + 50 + 100 + + lt=<- + 30;80;30;30 + + diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/128033 sumo-1.2.0+dfsg1/docs/modules/sumo/128033 --- sumo-1.1.0+dfsg1/docs/modules/sumo/128033 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/128033 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,77 @@ +format 55 +"polyconvert" // polyconvert + revision 1 + modified_by 33 "Daniel" + // class settings + //class diagram settings + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //component diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + draw_component_as_icon default show_component_req_prov default show_component_rea default + //deployment diagram settings + package_name_in_tab default show_context default write_horizontally default auto_label_position default draw_all_relations default shadow default + draw_component_as_icon default show_component_req_prov default show_component_rea default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + + usecaseview 128161 "polyconvert" + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + class 128033 "user" + visibility package stereotype "actor" + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + + usecasediagram 128033 "polyconvert" + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + size A4 + end + + usecase 128033 "PC01: import shapes for an imported network" + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + end + end +end diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/128033.diagram sumo-1.2.0+dfsg1/docs/modules/sumo/128033.diagram --- sumo-1.1.0+dfsg1/docs/modules/sumo/128033.diagram 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/128033.diagram 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,10 @@ +format 55 + +classcanvas 128033 class_ref 128033 // user + class_drawing_mode default show_context_mode default + xyz 51 82 2000 +usecasecanvas 128161 usecase_ref 128033 // PC01: import shapes for an imported network + xyzwh 243 99 3005 64 32 label_xy 166 131 +line 128289 ---- + from ref 128033 z 1999 to ref 128161 +end diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/128048 sumo-1.2.0+dfsg1/docs/modules/sumo/128048 --- sumo-1.1.0+dfsg1/docs/modules/sumo/128048 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/128048 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,111 @@ +format 55 +"netgen" // netgen + revision 1 + modified_by 48 "Daniel" + // class settings + //class diagram settings + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //component diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + draw_component_as_icon default show_component_req_prov default show_component_rea default + //deployment diagram settings + package_name_in_tab default show_context default write_horizontally default auto_label_position default draw_all_relations default shadow default + draw_component_as_icon default show_component_req_prov default show_component_rea default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + + usecaseview 128048 "netgen" + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + usecasediagram 128048 "netgen" + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + size A4 + end + + class 128048 "user" + visibility package stereotype "actor" + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + + usecase 128176 "NG01: generate a grid network" + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + end + + usecase 128304 "NG03: generate a random network" + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + end + + usecase 128432 "NG02: generate a spider-net network" + //use case diagram settings + package_name_in_tab default show_context default auto_label_position default draw_all_relations default class_drawing_mode default shadow default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default + end + end +end diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/128048.diagram sumo-1.2.0+dfsg1/docs/modules/sumo/128048.diagram --- sumo-1.1.0+dfsg1/docs/modules/sumo/128048.diagram 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/128048.diagram 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,18 @@ +format 55 + +classcanvas 128048 class_ref 128048 // user + class_drawing_mode default show_context_mode default + xyz 93 112 2000 +usecasecanvas 128176 usecase_ref 128176 // NG01: generate a grid network + xyzwh 286 45 3005 64 32 label_xy 244 77 +usecasecanvas 128304 usecase_ref 128304 // NG03: generate a random network + xyzwh 286 208 3005 64 32 label_xy 235 240 +usecasecanvas 128432 usecase_ref 128432 // NG02: generate a spider-net network + xyzwh 286 123 3005 64 32 label_xy 229 155 +line 128816 ---- + from ref 128048 z 1999 to ref 128176 +line 129200 ---- + from ref 128048 z 1999 to ref 128432 +line 129328 ---- + from ref 128048 z 1999 to ref 128304 +end diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/cpp_includes sumo-1.2.0+dfsg1/docs/modules/sumo/cpp_includes --- sumo-1.1.0+dfsg1/docs/modules/sumo/cpp_includes 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/cpp_includes 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,13 @@ +// "a type" "needed cpp_includes" +"vector" "#include +using namespace std;" + +"list" "#include +using namespace std;" + +"map" "#include +using namespace std;" + +"string" "#include +using namespace std;" + diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/generation_settings sumo-1.2.0+dfsg1/docs/modules/sumo/generation_settings --- sumo-1.1.0+dfsg1/docs/modules/sumo/generation_settings 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/generation_settings 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,304 @@ + + + cpp_h_extension "h" cpp_src_extension "cpp" java_extension "java" php_extension "php" python_extension "py" idl_extension "idl" + + type_forms 15 // uml cpp java idl cpp_in cpp_out cpp_inout cpp_return + "void" "void" "void" "void" "${type}" "${type} &" "${type}" "${type}" + "any" "void *" "Object" "any" "const ${type}" "${type}" "${type} &" "${type}" + "bool" "bool" "boolean" "boolean" "${type}" "${type} &" "${type} &" "${type}" + "char" "char" "char" "char" "${type}" "${type} &" "${type} &" "${type}" + "uchar" "unsigned char" "char" "octet" "${type}" "${type} &" "${type} &" "${type}" + "byte" "unsigned char" "byte" "octet" "${type}" "${type} &" "${type} &" "${type}" + "short" "short" "short" "short" "${type}" "${type} &" "${type} &" "${type}" + "ushort" "unsigned short" "short" "unsigned short" "${type}" "${type} &" "${type} &" "${type}" + "int" "int" "int" "long" "${type}" "${type} &" "${type} &" "${type}" + "uint" "unsigned int" "int" "unsigned long" "${type}" "${type} &" "${type} &" "${type}" + "long" "long" "long" "long" "${type}" "${type} &" "${type} &" "${type}" + "ulong" "unsigned long" "long" "unsigned long" "${type}" "${type} &" "${type} &" "${type}" + "float" "float" "float" "float" "${type}" "${type} &" "${type} &" "${type}" + "double" "double" "double" "double" "${type}" "${type} &" "${type} &" "${type}" + "string" "string" "String" "string" "${type}" "${type} &" "${type} &" "${type}" + + relations_stereotypes 5 // uml cpp java pythonidl + "sequence" "vector" "Vector" "list" "sequence" + "vector" "vector" "Vector" "list" "sequence" + "list" "list" "List" "list" "sequence" + "set" "set" "Set" "set" "sequence" + "map" "map" "Map" "dict" "sequence" + + classes_stereotypes 13 // uml cpp java php python idl + "class" "class" "class" "class" "class" "valuetype" + "interface" "class" "interface" "interface" "class" "interface" + "exception" "class" "class" "class" "class" "exception" + "enum" "enum" "enum" "enum" "enum" "enum" + "enum_pattern" "enum" "enum_pattern" "enum" "enum" "enum" + "struct" "struct" "class" "class" "class" "struct" + "union" "union" "class" "class" "class" "union" + "typedef" "typedef" "ignored" "ignored" "ignored" "typedef" + "boundary" "class" "class" "class" "class" "interface" + "control" "class" "class" "class" "class" "valuetype" + "entity" "class" "class" "class" "class" "valuetype" + "actor" "ignored" "ignored" "ignored" "ignored" "ignored" + "@interface" "ignored" "@interface" "ignored" "ignored" "ignored" + + cpp_enum_default_type_forms "${type}" "${type} &" "${type} &" "${type}" // in out inout return + other_cpp_types_default_type_forms "const ${type} &" "${type} &" "${type} &" "${type}" // in out inout return + + cpp_default_h_content "#ifndef ${NAMESPACE}_${NAME}_H +#define ${NAMESPACE}_${NAME}_H + +${comment} +${includes} +${declarations} +${namespace_start} +${definition} +${namespace_end} +#endif +" + cpp_default_src_content "${comment} +${includes} +${namespace_start} +${members} +${namespace_end}" + cpp_default_class_decl "${comment}${template}class ${name}${inherit} { +${members}}; +${inlines} +" + cpp_default_external_class_decl "${name} +#include <${name}.h> +" + cpp_default_struct_decl "${comment}${template}struct ${name}${inherit} { +${members}}; +${inlines} +" + cpp_default_union_decl "${comment}${template}union ${name} { +${members}}; +${inlines} +" + cpp_default_enum_decl "${comment}enum ${name} { +${items} +}; +" + cpp_default_typedef_decl "${comment}typedef ${type} ${name}; +" + cpp_default_attribute_declaration " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value}; +" // multiplicity [..] + cpp_default_enum_item_declaration " ${name}${value},${comment}" + cpp_association_aggregation_declaration + " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${value}; +" // multiplicity 1 + " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type} *> ${name}${value}; +" // multiplicity * a..b + " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${multiplicity}${value}; +" // multiplicity [..] + cpp_aggregation_by_value_declaration + " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value}; +" // multiplicity [..] + cpp_get "get_${name}" inline const value_const public + cpp_set "set_${name}" public + cpp_default_operation_declaration " ${comment}${friend}${static}${inline}${virtual}${type} ${name}${(}${)}${const}${volatile}${throw}${abstract}; +" + cpp_default_operation_definition "${comment}${inline}${type} ${class}::${name}${(}${)}${const}${volatile}${throw}${staticnl}{ + ${body}} +" + java_default_src_content "${comment} +${package} +${imports} +${definition}" + java_default_class_decl "${comment}${@}${visibility}${final}${abstract}class ${name}${extends}${implements} { +${members}} +" + java_default_external_class_decl "${name}" + java_default_interface_decl "${comment}${@}${visibility}interface ${name}${extends} { +${members}} +" + java5_default_enum_decl "${comment}${@}${visibility}${final}${abstract}enum ${name}${implements} { +${items}; +${members}} +" + java_default_enum_decl "${comment}${@}${visibility}final class ${name} { +${members} + private final int value; + + public int value() { + return value; + } + + public static ${name} fromInt(int value) { + switch (value) { +${cases} default: throw new Error(); + } + + } + private ${name}(int v) { value = v; }; +} +" + java_default_attribute_declaration " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value}; +" // multiplicity N + java5_default_enum_item_declaration " ${@}${name}${value},${comment}" + java_default_enum_item_declaration " ${comment}${@}public static final int _${name}${value}; +public static final ${class} ${name} = new ${class}(_${name}); +" + java_default_enum_case " case _${name}: return ${name}; +" + java_association_aggregation_declaration + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value}; +" // multiplicity N + java_get "get${Name}" final public + java_set "set${Name}" public + java_default_operation_definition " ${comment}${@}${visibility}${final}${static}${abstract}${synchronized}${type} ${name}${(}${)}${throws}${staticnl}{ + ${body}} +" + php_default_src_content " +" + php_default_class_decl "${comment}${final}${visibility}${abstract}class ${name}${extends}${implements} { +${members}} +" + php_default_enum_decl "${comment}${visibility}final class ${name} { +${items}} +" + php_default_external_class_decl "${name}" + php_default_interface_decl "${comment}${visibility}interface ${name} { +${members}} +" + php_default_attribute_declaration " ${comment}${visibility}${const}${static}${var}${name}${value}; +" + php_default_enum_item_decl " const ${name}${value};${comment} +" + php_default_relation_declaration" ${comment}${visibility}${const}${static}${var}${name}${value}; +" + php_get "get${Name}" final + php_set "set${Name}" + php_default_operation_definition " ${comment}${final}${visibility}${abstract}${static}function ${name}${(}${)} +{ + ${body}} +" + python_2_2 + python_indent_step " " + python_default_src_content "${comment} +${import} +${definition}" + python_default_class_decl "class ${name}${inherit}: +${docstring}${members} +" + python_default_enum_decl "class ${name}: +${docstring}${members} +" + python_default_external_class_decl "${name}" + python_default_attribute_declaration "${comment}${self}${name} = ${value} +" // multiplicity 1 + "${comment}${self}${name} = ${stereotype}() +" // multiplicity != 1 + python_default_enum_item_decl "${comment}${self}${name} = ${value} +" + python_default_relation_declaration"${comment}${self}${name} = ${value} +" // multiplicity 1 + "${comment}${self}${name} = ${stereotype}() +" // multiplicity != 1 + python_default_composition_declaration"${comment}${self}${name} = ${type}() +" // multiplicity 1 + "${comment}${self}${name} = ${stereotype}() +" // multiplicity != 1 + python_default_operation_definition "${@}${static}${abstract}def ${name}${(}${)}: +${docstring}${body} +" + python_get "get${Name}" + python_set "set${Name}" + idl_default_src_content "#ifndef ${MODULE}_${NAME}_H +#define ${MODULE}_${NAME}_H + +${comment} +${includes} +${module_start} +${definition} +${module_end} +#endif +" + idl_default_interface_decl "${comment}${abstract}${local}interface ${name}${inherit} { +${members}}; +" + idl_default_valuetype_decl "${comment}${abstract}${custom}valuetype ${name}${inherit} { +${members}}; +" + idl_default_struct_decl "${comment}struct ${name} { +${members}}; +" + idl_default_typedef_decl "${comment}typedef ${type} ${name}; +" + idl_default_exception_decl "${comment}exception ${name} { +${members}}; +" + idl_default_union_decl "${comment}union ${name} switch(${switch}) { +${members}}; +" + idl_default_enum_decl "${comment}enum ${name} { +${items}}; +" + idl_default_external_class_decl "${name} +#include \"${name}.idl\" +" + idl_default_attribute_declaration " ${comment}${readonly}${attribute}${type} ${name}; +" // multiplicity 1 + " ${comment}${readonly}${attribute}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_default_valuetype_attribute_declaration " ${comment}${visibility}${type} ${name}; +" // multiplicity 1 + " ${comment}${visibility}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_default_const_declaration " ${comment}const ${type} ${name}${value}; +" // multiplicity 1 + " ${comment}const ${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}const ${stereotype}<${type},${multiplicity}> ${name}${value}; +" // multiplicity N + idl_default_enum_item_declaration " ${name},${comment}" + idl_default_union_item_declaration " ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1 + " ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b + " ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N + idl_association_aggregation_declaration + " ${comment}${readonly}${attribute}${type} ${name}; +" // multiplicity 1 + " ${comment}${readonly}${attribute}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_valuetype_association_aggregation_declaration + " ${comment}${visibility}${type} ${name}; +" // multiplicity 1 + " ${comment}${visibility}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_union_association_aggregation_declaration + " ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1 + " ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b + " ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N + idl_get "get_${name}" + idl_set "set_${name}" twoways + idl_default_operation_declaration " ${comment}${oneway}${type} ${name}${(}${)}${raisesnl}${raises}; +" + uml_get_name uml uml_set_name uml +end diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/idl_includes sumo-1.2.0+dfsg1/docs/modules/sumo/idl_includes --- sumo-1.1.0+dfsg1/docs/modules/sumo/idl_includes 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/idl_includes 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +// "a type" "needed idl_includes" diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/java_imports sumo-1.2.0+dfsg1/docs/modules/sumo/java_imports --- sumo-1.1.0+dfsg1/docs/modules/sumo/java_imports 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/java_imports 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +// "a type" "needed java_imports" diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/python_imports sumo-1.2.0+dfsg1/docs/modules/sumo/python_imports --- sumo-1.1.0+dfsg1/docs/modules/sumo/python_imports 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/python_imports 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +// "a type" "needed python_imports" diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/stereotypes sumo-1.2.0+dfsg1/docs/modules/sumo/stereotypes --- sumo-1.1.0+dfsg1/docs/modules/sumo/stereotypes 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/stereotypes 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,56 @@ + + package_stereotypes 5 "facade" "framework" "model library" "stub" "toplevel" + -_-> 3 "access" "import" "from" + end + + class_stereotypes 18 "actor" "auxiliary" "boundary" "control" "entity" "enum" "enum_pattern" "exception" "focus" "implementation class" "interface" "@interface" "metaclass" "struct" "type" "typedef" "union" "utility" + ---- 4 "list" "set" "vector" "map" + ---> 4 "list" "set" "vector" "map" + ---|> 4 "{complete,disjoint}" "{incomplete,disjoint}" "{complete,overlapping}" "{incomplete,overlapping}" + o--- 4 "list" "set" "vector" "map" + *--- 4 "list" "set" "vector" "map" + o--> 4 "list" "set" "vector" "map" + *--> 4 "list" "set" "vector" "map" + -_-> 3 "friend" "import" "from" + -_-|> 1 "bind" + end + + use_case_stereotypes 1 "realization" + + ---|> 4 "{complete,disjoint}" "{incomplete,disjoint}" "{complete,overlapping}" "{incomplete,overlapping}" + -_-> 2 "include" "extend" + end + + artifact_stereotypes 7 "document" "file" "script" "source" "text" "library" "executable" + -_-> 4 "deploy" "manifest" "import" "from" + end + + attribute_stereotypes 4 "list" "set" "vector" "map" + operation_stereotypes 0 + state_stereotypes 3 "machine" "submachine" "top" + activity_stereotypes 0 + flow_stereotypes 3 "interrupt" "multicast" "multireceive" + interruptibleactivityregion_stereotypes 0 + pseudostate_stereotypes 0 + stateaction_stereotypes 2 "send-signal" "receive-signal" + parameter_stereotypes 0 + parameterset_stereotypes 0 + activitynode_stereotypes 0 + activityaction_stereotypes 0 + activityobject_stereotypes 2 "datastore" "centralBuffer" + pin_stereotypes 0 + component_stereotypes 6 "build component" "entity" "implement" "process" "service" "subsystem" + deploymentnode_stereotypes 3 "cpu" "device" "executionEnvironment" + classview_stereotypes 0 + usecaseview_stereotypes 0 + componentview_stereotypes 0 + deploymentview_stereotypes 0 + classdiagram_stereotypes 0 + seqdiagram_stereotypes 0 + coldiagram_stereotypes 0 + usecasediagram_stereotypes 0 + statediagram_stereotypes 0 + activitydiagram_stereotypes 0 + componentdiagram_stereotypes 0 + deploymentdiagram_stereotypes 0 +end diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/sumo.prj sumo-1.2.0+dfsg1/docs/modules/sumo/sumo.prj --- sumo-1.1.0+dfsg1/docs/modules/sumo/sumo.prj 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/sumo.prj 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,44 @@ +format 55 +"sumo" + revision 3 + modified_by 17 "Daniel" + + + + // class settings + default_attribute_visibility protected default_relation_visibility protected default_operation_visibility public + //class diagram settings + draw_all_relations yes hide_attributes no hide_operations no show_members_full_definition no show_members_visibility no show_members_stereotype no show_members_multiplicity no show_members_initialization no member_max_width 127 show_parameter_dir yes show_parameter_name yes package_name_in_tab no class_drawing_mode natural drawing_language uml show_context_mode no auto_label_position yes show_infonote no shadow yes + //use case diagram settings + package_name_in_tab no show_context no auto_label_position yes draw_all_relations yes class_drawing_mode actor shadow yes + //sequence diagram settings + show_full_operations_definition no write_horizontally yes class_drawing_mode natural drawing_language uml draw_all_relations yes shadow yes + //collaboration diagram settings + show_full_operations_definition no show_hierarchical_rank no write_horizontally yes drawing_language uml package_name_in_tab no show_context no draw_all_relations yes shadow yes + //object diagram settings + write_horizontally yes package_name_in_tab no show_context no auto_label_position yes draw_all_relations yes shadow yes + //component diagram settings + package_name_in_tab no show_context no auto_label_position yes draw_all_relations yes shadow yes + draw_component_as_icon no show_component_req_prov no show_component_rea no + //deployment diagram settings + package_name_in_tab no show_context no write_horizontally yes auto_label_position yes draw_all_relations yes shadow yes + draw_component_as_icon no show_component_req_prov no show_component_rea no + //state diagram settings + package_name_in_tab no show_context no auto_label_position yes write_trans_label_horizontally yes show_trans_definition no draw_all_relations yes shadow yes + show_activities yes region_horizontally yes drawing_language uml + //activity diagram settings + package_name_in_tab no show_context no show_opaque_action_definition no auto_label_position yes write_flow_label_horizontally no draw_all_relations yes shadow yes + show_infonote yes drawing_language uml + + class_color yellow duration_color transparent continuation_color gray note_color blue fragment_color transparent subject_color transparent usecase_color yellow package_color transparent component_color green artifact_color green deploymentnode_color gray state_color yellow stateaction_color transparent activity_color transparent activityregion_color transparent activityaction_color transparent parameterpin_color white + font_size 8 + diagram_format A4 + + mark_for_import + + ncouples 1 + key "html dir" value "d:/projects/sumo/rbuild/sumo/docs/uml/" + package_ref 128033 // polyconvert + + package_ref 128048 // netgen +end diff -Nru sumo-1.1.0+dfsg1/docs/modules/sumo/tools sumo-1.2.0+dfsg1/docs/modules/sumo/tools --- sumo-1.1.0+dfsg1/docs/modules/sumo/tools 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/sumo/tools 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,18 @@ +// 'tool' "the executable" "displayed string" {target}+ +tool "HTML documentation" "ghtml" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "HTML doc. (flat)" "ghtml -flat" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "HTML doc. (svg)" "ghtml -svg" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "HTML doc. (flat, svg)" "ghtml -flat -svg" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "Generate .pro" "gpro" Artifact +tool "Import Rose" "irose" Project Package +tool "C++ utilities" "cpp_util" Class +tool "Generate XMI 1.2" "gxmi" Project +tool "Generate XMI 2.1" "gxmi2" Project +tool "Import XMI 2.1" "ixmi2" Project Package +tool "C++ state machine" "stmgen" State +tool "Use case wizard" "usecasewizard" UseCase +tool "Check-in" "file_control ci" Project Package +tool "Check-out" "file_control co" Project Package +tool "Deploy classes" "deplcl" ClassView +tool "Global Change" "global_change" Class Project Package ClassView DeploymentView +tool "Uml projection" "uml_proj" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue Project Package ClassView Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/modules/traci/traciClose_sequence.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/modules/traci/traciClose_sequence.png differ diff -Nru sumo-1.1.0+dfsg1/docs/modules/traci/traciClose_sequence.uxf sumo-1.2.0+dfsg1/docs/modules/traci/traciClose_sequence.uxf --- sumo-1.1.0+dfsg1/docs/modules/traci/traciClose_sequence.uxf 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/traci/traciClose_sequence.uxf 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,61 @@ + + + // Uncomment the following line to change the fontsize: +// fontsize=14 + + +////////////////////////////////////////////////////////////////////////////////////////////// +// Welcome to UMLet! +// +// Double-click on UML elements to add them to the diagram, or to copy them +// Edit elements by modifying the text in this panel +// Hold Ctrl to select multiple elements +// Use Ctrl+mouse to select via lasso +// +// Use ± or Ctrl+mouse wheel to zoom +// Drag a whole relation at its central square icon +// +// Press Ctrl+C to copy the whole diagram to the system clipboard (then just paste it to, eg, Word) +// Edit the files in the "palettes" directory to create your own element palettes +// +// Select "Custom Elements > New..." to create new element types +////////////////////////////////////////////////////////////////////////////////////////////// + + +// This text will be stored with each diagram; use it for notes. + 10 + + com.umlet.element.SequenceDiagram + + 0 + 100 + 320 + 230 + + title: TraCI close +Client~client|SUMO~sumo +1->>>2:client,sumo:cmdClose() +2->>>2:client,sumo:closes connection +2->>>1:client,sumo:OK +2->>>2:client,sumo:clean up + + + + + + + + + + + com.umlet.element.custom.SeqDestroyMark + + 150 + 300 + 20 + 20 + + + + + Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/modules/traci/traciConnect_sequence.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/modules/traci/traciConnect_sequence.png differ diff -Nru sumo-1.1.0+dfsg1/docs/modules/traci/traciConnect_sequence.uxf sumo-1.2.0+dfsg1/docs/modules/traci/traciConnect_sequence.uxf --- sumo-1.1.0+dfsg1/docs/modules/traci/traciConnect_sequence.uxf 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/traci/traciConnect_sequence.uxf 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,47 @@ + + + // Uncomment the following line to change the fontsize: +// fontsize=14 + + +////////////////////////////////////////////////////////////////////////////////////////////// +// Welcome to UMLet! +// +// Double-click on UML elements to add them to the diagram, or to copy them +// Edit elements by modifying the text in this panel +// Hold Ctrl to select multiple elements +// Use Ctrl+mouse to select via lasso +// +// Use ± or Ctrl+mouse wheel to zoom +// Drag a whole relation at its central square icon +// +// Press Ctrl+C to copy the whole diagram to the system clipboard (then just paste it to, eg, Word) +// Edit the files in the "palettes" directory to create your own element palettes +// +// Select "Custom Elements > New..." to create new element types +////////////////////////////////////////////////////////////////////////////////////////////// + + +// This text will be stored with each diagram; use it for notes. + 10 + + com.umlet.element.SequenceDiagram + + 0 + 20 + 350 + 260 + + title: TraCI connect +Client~client|SUMO~sumo +2->>>2:sumo:loads scenario +2->>>2:sumo:starts to listen +1->>>2:client,sumo:connect() +2->>>2:client,sumo:establishes connection +2->1:client,sumo:accept() + + + + + + Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/modules/traci/vehicle_angle.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/modules/traci/vehicle_angle.png differ diff -Nru sumo-1.1.0+dfsg1/docs/modules/traci/vehicle_angle.svg sumo-1.2.0+dfsg1/docs/modules/traci/vehicle_angle.svg --- sumo-1.1.0+dfsg1/docs/modules/traci/vehicle_angle.svg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/modules/traci/vehicle_angle.svg 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + 0° + -90° + 90° + 180°/-180° + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/simLoop.uxf sumo-1.2.0+dfsg1/docs/simLoop.uxf --- sumo-1.1.0+dfsg1/docs/simLoop.uxf 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/simLoop.uxf 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,41 @@ +// Uncomment the following line to change the fontsize: +// fontsize=14 + + +////////////////////////////////////////////////////////////////////////////////////////////// +// Welcome to UMLet! +// +// Double-click on UML elements to add them to the diagram, or to copy them +// Edit elements by modifying the text in this panel +// Hold Ctrl to select multiple elements +// Use Ctrl+mouse to select via lasso +// +// Use ± or Ctrl+mouse wheel to zoom +// Drag a whole relation at its central square icon +// +// Press Ctrl+C to copy the whole diagram to the system clipboard (then just paste it to, eg, Word) +// Edit the files in the "palettes" directory to create your own element palettes +// +// Select "Custom Elements > New..." to create new element types +////////////////////////////////////////////////////////////////////////////////////////////// + + +// This text will be stored with each diagram; use it for notes.10com.umlet.element.custom.SeqObjectActive16501702060com.umlet.element.base.SequenceDiagram2020770590title: MSNet::simulationStep +MSNet~net|MSEdgeControl~ec|MSLane~lane|MSVehicle~veh +1->>>2:net,ec:patchActiveLanes() +2->1:net,ec +1->>>2:net,ec:moveCritical(t) +2->>>3:net,ec,lane:moveCritical(t) +3->>>4:net,ec,lane,veh:moveRegardingCritical(t) +4->>>4:net,ec,lane,veh:vsafeCriticalCont(t) +4->3:net,ec,veh,lane +3->2:net,ec,lane,ec +2->1:ec,net +1->>>2:net,ec:moveFirst(t) +2->>>3:net,ec,lane:setCritical(t) +3->>>4:net,ec,lane,veh:moveFirstChecked(t) +3->>>3:net,ec,lane,lane:pop(veh) +3->>>3:net,ec,lane,lane:push(veh) +2->>>3:net,ec,lane:integrateNewVehicle(t) +1->>>2:net,ec:changeLanes(t) + \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/sumo.bib sumo-1.2.0+dfsg1/docs/sumo.bib --- sumo-1.1.0+dfsg1/docs/sumo.bib 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/sumo.bib 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,3500 @@ +% This file was created with JabRef 2.8.1. +% Encoding: Cp1252 + +@INPROCEEDINGS{Bajpai2011, + author = {Ashutosh Bajpai and Tom V Mathew}, + title = {Development of an Interface between Signal Controller and Traffic + Simulator}, + booktitle = {1st Conference of Transportation Research Group of India}, + year = {2011}, + month = {12}, + organization = {Transportation Research Group of India}, + abstract = {Adaptive Traffic Control algorithm is an important strategy to manage + traffic at an intersection. These are an improvement of vehicle actuated + signal control, where explicitly strategies are formulated to compute + the signal timing considering the current traffic state obtained + from sensors. However, field evaluation of these strategies is cumbersome + and expensive and hence simulators which model traffic system can + be a good alternative. The main challenge in this is a good interface + between the signal control system and the traffic simulators. The + signal control system needs the state of the junction in terms of + vehicle occupancy at every instant. On the other hand, traffic simulator + needs information on whether the signal state has changed. This two + way communication requires an efficient interface which is similar + to client-server architecture. The simulator acts as the server where + as the adaptive control strategy act like client. This paper proposes + an efficient interface to couple adaptive control strategy and traffic + simulator. This interface mediates between traffic control system + and traffic simulator and provides online interaction to simulation + from the control strategy. This interface facilitates pure procedural + routines to communicate and is written in C language along with Python/C + API. Additionally, a module to estimate the vehicular delay due to + the control strategy is developed. This delay is estimated by defining + effective length of queue, which is provided as a user input. + + + This interface is tested using SUMO (Simulation for Urban Mobility), + which is an open source, microscopic, space continuous and time discrete + simulator developed by German Aerospace Centre. The traffic control + strategy is analogous to the HCM vehicle actuated traffic control + except that there is a queue prediction model which computes upper + limits on the maximum green time. An isolated four arm junction having + four phases is simulated for various flow conditions. The simulator + supplied the state of the downstream detector to the traffic control + algorithm at every simulation step and the control algorithm determines + the signal time strategies (phase termination, green extension, and + maximum green time). These strategies are communicated to the simulator. + These communications were facilitated by the proposed interface. + The average stopped delay is computed as the performance parameter. + The interface was also coupled with another traffic simulator (VISSIM) + and the results are compared. This interface justifies the concept + of reusability by the evaluation of number of control strategy.}, + file = {:https\://sumo.dlr.de/pdf/CTRG_Interface-SUMO.pdf:URL}, + keywords = {Traffic simulator, Signal controller, Procedural Interface, SUMO (Simulation + of Urban Mobility), VISSIM (Verkehr In Städten - SIMulationsmodell)}, + owner = {dkrajzew}, + timestamp = {2012.02.07} +} + +@INPROCEEDINGS{Bamberger2010, + author = {Walter Bamberger and Josef Schlittenlacher and Klaus Diepold}, + title = {A Trust Model for Intervehicular Communication Based on Belief Theory}, + booktitle = {Social Computing (SocialCom), 2010 IEEE Second International Conference + on}, + year = {2010}, + pages = {73-80}, + publisher = {IEEE Computer Society}, + note = {Best SocialCom Conference Paper Award}, + abstract = {Vehicles will exchange much information in the future in order to + efficiently maintain their inner model of the environment. Before + they can belief received pieces of information, they must evaluate + their reliability. Trust is a mechanism to estimate this reliability + based on the sender. As cars often drive the same route, they meet + each other again and again. They can establish friendship-like relations + and thus are embedded in a social structure. A trust model depends + on this social structure. For this reason, we simulate the driving + pattern of a small town. Within this simulation, all cars are equipped + with a trust model that continuously monitors the experiences made + with others. The developed model focuses on direct experiences of + the individual and not on a system-wide reputation which would depend + on a central unit. It continuously evaluates the performance and + reputation of other cars and includes a feedback loop to faster adapt + to changes in the other’s behaviour. To make a decision out of the + collected data, the model uses the capacity of the binary error and + erasure channel from information theory. This capacity provides a + better decision criterion than the traditional expectation value. + The proposed trust model is an individual-level model; nonetheless + it can be connected to a system-wide reputation mechanism.}, + doi = {10.1109/SocialCom.2010.20}, + keywords = {V2X, sumo, Technische Universität München, Fidens, automobiles, road + traffic, security of data, telecommunication security, belief theory, + cars, driving pattern, vehicular network, social structure, trust + model}, + url = {http://mediatum.ub.tum.de/node?id=997457} +} + +@MASTERSTHESIS{Barber2011, + author = {Anthony Barber}, + title = {SHARING THE ROADS USING ROUTE INFORMATION SHARING}, + school = {University of Tulsa}, + year = {2011}, + file = {:https\://sumo.dlr.de/pdf/BarberThesis.pdf:URL}, + keywords = {University of Tulsa, sumo}, + owner = {dkrajzew}, + timestamp = {2011.09.19} +} + +@ARTICLE{Barlovic2001, + author = {R. Barlovic and Elmar Brockfeld and A. Schadschneider and M. Schreckenberg}, + title = {Optimizing traffic lights in a cellular automaton model for city + traffic}, + journal = {Physical Review E}, + year = {2001}, + volume = {64}, + pages = {056132}, + number = {64, 056132}, + month = {Oct}, + note = { LIDO-Berichtsjahr=2003,}, + abstract = {We study the impact of global traffic light control strategies in + a recently proposed cellular automaton model for vehicular traffic + in city networks. The model combines basic ideas of the Biham-Middleton-Levine + model for city traffic and the Nagel-Schreckenberg model for highway + traffic. The city network has a simple square lattice geometry. All + streets and intersections are treated equally, i.e., there are no + dominant streets. Starting from a simple synchronized strategy, we + show that the capacity of the network strongly depends on the cycle + times of the traffic lights. Moreover, we point out that the optimal + time periods are determined by the geometric characteristics of the + network, i.e., the distance between the intersections. In the case + of synchronized traffic lights, the derivation of the optimal cycle + times in the network can be reduced to a simpler problem, the flow + optimization of a single street with one traffic light operating + as a bottleneck. In order to obtain an enhanced throughput in the + model, improved global strategies are tested, e.g., green wave and + random switching strategies, which lead to surprising results.}, + doi = {10.1103/PhysRevE.64.056132}, + keywords = {DLR/TS/VM}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6570/} +} + +@INPROCEEDINGS{Bauza2008, + author = {Bauza, R. and Gozalvez, J. and Sepulcre, M.}, + title = {Operation and Performance of Vehicular Ad-Hoc Routing Protocols in + Realistic Environments}, + booktitle = {Vehicular Technology Conference, 2008. VTC 2008-Fall. IEEE 68th}, + year = {2008}, + pages = {1 -5}, + month = {sept.}, + doi = {10.1109/VETECF.2008.450}, + issn = {1090-3038}, + keywords = {information dissemination;multihop communications;vehicle-to-infrastructure + wireless communications;vehicle-to-vehicle communications;vehicular + ad-hoc routing protocols;ad hoc networks;mobile radio;routing protocols;, + V2X, UMH, sumo}, + owner = {dkrajzew}, + timestamp = {2011.09.19} +} + +@INPROCEEDINGS{Behrisch2011, + author = {Michael Behrisch and Laura Bieker and Jakob Erdmann and Daniel Krajzewicz}, + title = {SUMO - Simulation of Urban MObility: An Overview}, + booktitle = {SIMUL 2011, The Third International Conference on Advances in System + Simulation}, + year = {2011}, + editor = {SINTEF \& University of Oslo Aida Omerovic and RTI International + - Research Triangle Park Diglio A. Simoni and RTI International - + Research Triangle Park Georgiy Bobashev}, + pages = {63-68}, + address = {Barcelona, Spain}, + month = {October}, + publisher = {ThinkMind}, + abstract = {SUMO is an open source traffic simulation package including net import + and demand modeling components. We describe the current state of + the package as well as future developments and extensions. SUMO helps + to investigate several research topics e.g. route choice and traffic + light algorithm or simulating vehicular communication. Therefore + the framework is used in different projects to simulate automatic + driving or traffic management strategies.}, + journal = {Proceedings of SIMUL 2011, The Third International Conference on + Advances in System Simulation}, + keywords = {microscopic traffic simulation, software, open source}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/71460/} +} + +@INPROCEEDINGS{Behrisch2008, + author = {Michael Behrisch and Michael Bonert and Elmar Brockfeld and Daniel + Krajzewicz and Peter Wagner}, + title = {Event traffic forecast for metropolitan areas based on microscopic + simulation}, + booktitle = {Third International Symposium of Transport Simulation 2008 (ISTS08)}, + year = {2008}, + month = {Januar}, + abstract = {It is shown that a traditional travel demand forecast combined with + a simulationbased approach can serve as a short-term forecast for + the traffic situation. The approach presented was developed and tested + during the Soccer World Cup 2006 in the city of Cologne as a service + for the action forces to react as fast as possible to developing + aberrations. This paper discusses the merits and the short-comings + of the approach.}, + file = {:http\://elib.dlr.de/55176/1/eventtrafficSubmitted.pdf:URL}, + keywords = {traffic simulation, event traffic, urban traffic}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/55176/} +} + +@INPROCEEDINGS{Behrisch2009a, + author = {Michael Behrisch and Michael Bonert and Daniel Hinkeldein and Daniel + Krajzewicz and G\"unter Kuhns and Yun-Pang Wang}, + title = {DELPHI - a joint web decision support application for real time traffic + situation analysis and prognosis, information exchange and cooperation}, + booktitle = {ITS World Congress 2009}, + year = {2009}, + abstract = {This paper describes DELPHI, a pilot version of a joint web decision + support application for real time traffic situation and prognosis, + information exchange and cooperation between the Traffic Management + Center, Emergency Rescue Services, the Police and the Emergency Call + Center. In two demonstration regions in Germany, Cologne and Munich + the R&D project started in 2007. The main purpose is to handle major + incidents that affect the transportation situation in conurbation + areas. The web application is intended to help task force members + at different stakeholders to obtain a common and joint overview. + DELPHI also allows to coordinate tactical measures among the task + forces.}, + keywords = {decision support, TMC, Traffic Management Center, incident management, + ITS, Intelligent Transportation System}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62187/} +} + +@INPROCEEDINGS{Behrisch2010a, + author = {Michael Behrisch and Jakob Erdmann and Daniel Krajzewicz}, + title = {Adding intermodality to the microscopic simulation package SUMO}, + booktitle = {MESM 2010}, + year = {2010}, + month = {Dezember}, + abstract = {It is shown how the traffc simulation SUMO which traditionally focused + on individual road traffc could be extended to serve the purpose + of a general traffic simulation (including transport of individual + persons) while retaining most of in- and output formats and the performance + of the original system.}, + file = {:http\://elib.dlr.de/65964/1/intermodalSumo.pdf:URL}, + keywords = {Traffic, Microsimulation, Intermodal, SUMO}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/65964/} +} + +@UNPUBLISHED{dlr76186, + author = {Michael Behrisch and Yun-Pang Fl\"otter\"od and Daniel Krajzewicz + and Peter Wagner}, + title = {Ecological User Equilibrium in Traffic Management (TM)?}, + note = {Der Eintrag wurde auf der DTA 2012 vorgestellt.}, + month = {Februar}, + year = {2012}, + abstract = {With increasing environmental sustainability awareness significant + attention on ecological traffic management (eco-TM) has come into + the focus of researchers and practitioners. While different approaches + have been applied to reach minimal pollutant production, the classic + user equilibrium calculation with the pollutant production as travel + costs instead of using travel times remains in the center of attention. + However, the validity of such a direct transformation to find a user + equilibrium is questionable. In this paper, a simplified analytical + approach to examine the above aforementioned validity has been carried + out, followed by a simulation approach to verify the results of the + analytical approach. The result shows that the pollutant production + function violates the usual assumption of a monotonous function (typically, + emission has a minimum at travel speeds around 60 km/h). It also + indicates that the respective algorithms to compute the user equilibrium + must deal with the fact, that the equilibrium solution is not unique + and is dependent on the initial solution. This means that substantial + modifications to the algorithms that compute the user equilibrium + have to be discussed since they do not work as intended when pollutant + production is used as travel costs, especially in a transportation + system with mixed speeds that cover a range around the minimum emission + speed.}, + institution = {Institut f\"ur Verkehrssystemtechnik}, + keywords = {ecological traffic management, traffic simulation, user equilibrium}, + owner = {dkrajzew}, + timestamp = {2012.09.18}, + url = {http://elib.dlr.de/76186/} +} + +@INPROCEEDINGS{dlr71870, + author = {Michael Behrisch and Yun-Pang Fl\"otter\"od and Daniel Krajzewicz + and Peter Wagner}, + title = {Ecological User Equilibrium?}, + booktitle = {DTA 2012}, + year = {2011}, + month = {November}, + abstract = {With increasing environmental sustainability awareness significant + attention on ecological traffic management (eco-TM) has come into + the focus of researchers and practitioners. While different approaches + have been applied to reach minimal pollutant production, the classic + user equilibrium calculation with the pollutant production as travel + costs instead of using travel times remains in the center of attention. + However, the validity of such a direct transformation to find a user + equilibrium is questionable. In this paper, a simplified analytical + approach to examine the above aforementioned validity has been carried + out, followed by a simulation approach to verify the results of the + analytical approach. The initial result shows that the pollutant + production function violates the usual assumption of a monotonous + function (typically, emission has a minimum at travel speeds around + \unit[60]{km/h} ). This means that substantial modifications to the + algorithms that compute the user equilibrium have to be discussed + since they do not work as intended when pollutant production is used + as travel costs, especially in a transportation system with mixed + speeds that cover a range around the minimum emission speed.}, + keywords = {eco traffic management, dynamic traffic assignment, user equilibrium}, + owner = {dkrajzew}, + timestamp = {2012.09.18}, + url = {http://elib.dlr.de/71870/} +} + +@INPROCEEDINGS{Behrisch2010, + author = {Michael Behrisch and Marc Hohloch and Marek Junghans and G\"unter + Kuhns and Daniel Krajzewicz and Yun-Pang Wang}, + title = {Traffic Management Decision Support based on on-line Data}, + booktitle = {2010 POLIS CONFERENCE - 'Innovation in transport for sustainable + cities and regions'}, + year = {2010}, + month = {November}, + abstract = {Natural disasters, industrial accidents, technological disasters as + well as terrorist attacks have raised a great attention to road traffic + management in emergencies and disasters worldwide. The road system + is the essential infrastructure for mobility and accessibility. It + is important in daily life and especially in disasters and emergencies. + Therefore, a successful road traffic management in such situations + should minimize losses in life and goods as well as economical losses + and assets through incident prevention, mitigation, preparedness, + response and recovery. + + Based on this concern, the German Aerospace Center has been continuously + undertaking the development of a real-time web-based decision support + system within four R&D projects, WJT2005, Soccer2006, DELPHI and + VABENE, since 2005. A pilot version of the new portal has already + been established in the demonstration region Munich in 2007. + + This system mainly aims to - establish a shared online traffic information + platform and decision-making support tool for the law enforcement + and emergency services - use available traffic information as best + as possible for online traffic monitoring and evaluation, and - provide + accurate traffic forecasting for supporting the decision-making in + traffic management.}, + keywords = {online traffic management, decision support system}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/65965/} +} + +@INPROCEEDINGS{Behrisch2009, + author = {Michael Behrisch and Daniel Krajzewicz and Ronald Nippold and Yun-Pang + Wang}, + title = {Simulation of Urban MObility}, + booktitle = {2nd NEARCTIS workshop 2009}, + year = {2009}, + keywords = {traffic simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62188/} +} + +@INCOLLECTION{dlr81244, + author = {Michael Behrisch and Daniel Krajzewicz and Peter Wagner and Yun-Pang + Wang}, + title = {Comparing Performance and Quality of Traffic Assignments for Microscopic + Simulation}, + publisher = {Edward Elgar Publishing Limited}, + year = {2010}, + editor = {Chris M.J. Tampere and Francesco Viti and Lambertus H. (Ben) Immers}, + pages = {361--386}, + journal = {New Developments in Transport Planning - Advances in Dynamic Traffic + Assignment}, + keywords = {dynamic traffic assignment, traffic simulation}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/81244/} +} + +@INPROCEEDINGS{Behrisch2008b, + author = {Michael Behrisch and Daniel Krajzewicz and Peter Wagner and Yun-Pang + Wang}, + title = {Comparison of Methods for Increasing the Performance of a DUA Computation}, + booktitle = {DTA2008 International Symposium on Dynamic Traffic Assignment}, + year = {2008}, + month = {Mai}, + abstract = {Computing realistic routes for a given road network and a known demand + of vehicles is one of the most important steps when preparing a road + traffic simulation. The approach developed by Christian Gawron in + 1998 which we use for this purpose computes a dynamic user equilibrium + by iteratively performing the simulation and computing new vehicle + routes. The results are valid, but the computation is very time consuming + due to the need to perform both the complete simulation and rerouting + of all vehicles within each iteration step. Herein, we want to discuss + some approaches to reduce the needed time and memory consumption. + The results show that this can be achieved without reducing the algorithm?s + quality.}, + journal = {Proceedings of DTA2008}, + keywords = {microscopic simulation, traffic assignment, SUE, DUA}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/55173/} +} + +@INPROCEEDINGS{Behrisch2008a, + author = {Michael Behrisch and Daniel Krajzewicz and Yun-Pang Wang}, + title = {Comparing performance and quality of traffic assignment techniques + for microscopic road traffic simulations}, + booktitle = {DTA2008 International Symposium on Dynamic Traffic Assignment}, + year = {2008}, + month = {Mai}, + abstract = {Focusing on the tradeoff between accuracy of the assignment and computation + time this paper proposes different traffic assignment methods targeting + at microscopic traffic simulation. The corresponding network-wide + performance indices, the generated route sets and the respective + significance tests are analyzed and compared. The results indicate + that the saving on computa-tion time is significant with use of macroscopic + assignments. However, the deficiency of ne-glecting turning behaviors + in macroscopic assignments results in worse assignment results. Moreover, + the used computation time of some microscopic methods (e.g. the one-shot + method) is competitive with that of the macroscopic assignments. + While the exact parameteri-zation as well as the sensitivity of the + methods to the size of the scenarios still need further investigation, + it seems favorable to employ microscopic assignment techniques or + hybrid methods for producing a good traffic assignment for a microscopic + simulation.}, + journal = {Proceedings of DTA2008}, + keywords = {microscopic simulation, traffic assignment, SUE, DUA, route set similarity}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/55172/} +} + +@INPROCEEDINGS{Bieker2011a, + author = {Laura Bieker}, + title = {Emergency Vehicle Prioritization using Vehicle-To-Vehicle Communication}, + booktitle = {Young Researchers Seminar}, + year = {2011}, + month = {Juni}, + abstract = {Emergency vehicles need to reach their destination as fast as possible. + They deserve the highest priority at intersections. Therefore, they + are allowed to use bus lanes and pass red lights at traffic light + systems. Nevertheless, for emergency vehicles it is still quicker + and safer to get priority at the approaching intersection. This paper + analyses how the travel time of emergency vehicles can be improved + by using vehicle-to-infrastructure (V2I) communication. Emergency + vehicles are sending messages with their route information and their + current position. The traffic lights which have to be passed can + switch to green for emergency vehicles and to red for all other streets. + The traffic lights continue the normal operation after the emergency + vehicle has passed the intersection. Simulation results show that + emergency vehicles can reach their destination faster.}, + keywords = {V2I communication, Emergency vehicle, traffic management, traffic + simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/70219/} +} + +@INPROCEEDINGS{Bieker2011, + author = {Laura Bieker and Daniel Krajzewicz}, + title = {Evaluation of opening Bus Lanes for private Traffic triggered via + V2X Communication}, + booktitle = {First Forum on Integrated and Sustainable Transportation Systems + (FISTS)}, + year = {2011}, + month = {Juni}, + abstract = {Within the EC project ?iTETRIS?, an architecture for simulating traffic + management applications based on vehicular communications (V2X) was + designed and implemented. The work was based on evaluating the needs + of a real city ? the city of Bologna. Applications which try to solve + the detected problems were defined and evaluated in subsequent steps. + This report describes the evaluation of one of the developed applications, + namely ?Bus Lane Management?. It was analyzed whether it is possible + to detect the traffic demand via V2X communication and open bus lanes + for private vehicles. It turned out that this could be done efficiently: + dedicating the free space on the bus lanes improves the average travel + times and route lengths of all vehicles. However, this is true only + if the penetration rates stay well below 50%. If more vehicles try + to benefit, the situation deteriorates readily.}, + keywords = {traffc simulation, bus lane management, V2V communication}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/70220/} +} + +@INPROCEEDINGS{Bieker2010, + author = {Laura Bieker and Daniel Krajzewicz and Matthias R\"ockl and Hans + Capelle}, + title = {Derivation of a fast, approximating 802.11p simulation model}, + booktitle = {Intelligent Transport Systems Telecommunications (ITST2010)}, + year = {2010}, + month = {November}, + abstract = {This paper gives an overview of the development of a fast, approximating + model of vehicle-to-vehicle (V2V) and vehicle-to-infrastructure (V2X) + communication. Large-scale traffic simulations need to be fast, and + the lack of supporting this feature by common communication simulators + makes the development of a new one necessary. In a vehicular system, + packet error rate can be significant; hence models that consider + error characteristics are desirable. Our work considers communication + models that approximate the radio propagation characteristics in + a realistic way without compromising simulation speed.}, + keywords = {V2X communication, Traffic simulation, Radio Propagation, Packet Error + Rate}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/66094/} +} + +@INPROCEEDINGS{Blokpoel2010, + author = {Robbin Blokpoel and Daniel Krajzewicz and Ronald Nippold}, + title = {Unambiguous metrics for evaluation of traffic networks}, + booktitle = {13th International IEEE Conference on Intelligent Transportation + Systems (ITSC)}, + year = {2010}, + month = {September}, + abstract = {This paper presents an extensive set of unambiguous metrics that can + be used for evaluation of new ITS applications. Currently in the + literature most authors define their own metrics and small differences + in definitions can lead to confusion when comparing the results. + To derive the set of metrics presented in this paper, several steps + have been taken. First, a list has been made with all metrics known + by the research partners. Afterwards, a set of base measures has + been defined. Using that set, clear formulas for all metrics have + been derived and are reported in this paper. Finally, an application + example about a cooperative traffic light controller is given.}, + keywords = {simulation, performance indicators, performance metrics, traffic science, + traffic management}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/67734/} +} + +@INPROCEEDINGS{Bonert2006, + author = {Michael Bonert and Elmar Brockfeld and Ines Ernst and Daniel Krajzewicz + and Martin Ruh\'e and Peter Wagner}, + title = {SOCCER Verkehrslageerfassung und ?prognose w\"ahrend der Fu\ssball-WM}, + booktitle = {IMA 2006 Informationssysteme f\"ur mobile Anwendungen}, + year = {2006}, + month = {Oktober}, + abstract = {W?hrend der FIFA?Fu?ballweltmeisterschaft 2006 wurde im Rahmen des + vom BMWi ge-f?rderten Projektes SOCCER an drei Spielst?tten (Berlin, + K?ln, Stuttgart) ein integriertes Sys-tem getestet, das Verkehrsdaten + aus unterschiedlichen Quellen zu einer Verkehrslageerfas-sung und + anschlie?ender Prognose fusionieren konnte. Die beiden Systeme in + Berlin und K?ln setzten dabei jeweils auf eine Simulation der gesamten + Stadt auf, w?hrend das Stuttgar-ter System im Wesentlichen auf einer + ganglinienbasierten Prognose basierte. Die verwendeten Inputdaten + waren in allen F?llen eine Kombination aus (nicht in allen St?dten + gleich) luft-gest?tzter Verkehrslageerfassung an ausgesuchten Brennpunkten + (Zeppelin in K?ln, Flugzeug in Berlin und Hubschrauber in Stuttgart), + vorhandenen Z?hlschleifendaten (alle Orte) und den Reisezeitinformationen + aus den Taxi?FCD Projekten Stuttgart und Berlin des DLR (siehe www.cityrouter.com). + Dieser Beitrag beschreibt den Aufbau der Systeme und stellt erste + Er-gebnisse dar, mit denen die Prognoseg?te beurteilt werden kann.}, + keywords = {Verkehrsmanagement von Gro?ereignissen, Verkehrssimulation, luftgest?tzte + Verkehrslageerfassung}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/50197/} +} + +@ARTICLE{Brockfeld2003a, + author = {Elmar Brockfeld and Reinhart K\"uhne and Alexander Skabardonis and + Peter Wagner}, + title = {Towards a benchmarking of Microscopic Traffic Flow Models}, + journal = {Transportation Research Records}, + year = {2003}, + volume = {1852}, + pages = {124--129}, + number = {TRB2003-001164}, + abstract = {Several microscopic traffic models have been tested with a publicly + available data set. The task was to predict the travel times between + sever observers along a one-lane rural road, given as boundary conditions + the flow into this road and the flow out of it. By using nonlinear + optimization, for each of the models the best matching set of parameters + have been estimated. For this particular data set, the models that + performed best are the ones with the smalles number of parameters. + The average error rate of the models is about 16 %, however, this + value is not very reliable: the error rate fluctuates between 2.5 + and 25 % for different parts of the data set.}, + booktitle = {82nd Annual Meeting Transportation Research Board}, + editor = { Transportation Research Board}, + keywords = {calibration, validation, simulation, models, microscopic flow models, + DLR/TS/VM, model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6646/} +} + +@ARTICLE{Brockfeld2005a, + author = {Elmar Brockfeld and Reinhart K\"uhne and Peter Wagner}, + title = {Calibration and Validation of Microscopic Traffic Flow Models}, + journal = {Transportation Research Records}, + year = {2005}, + volume = {1934}, + pages = {179--187}, + month = {Januar}, + abstract = {Since microscopic models are being heavily used in applications, the + appropriate calibration and validation have been a recent concern. + The contribution of this paper is to compare some of these models + by calibrating and validating them with data from double-loop detectors + on a multilane freeway. To simplify this task, the test of the models + is done by simplifying the multilane reality to a simulation of only + single lane. The results show that by simulating the multilane road + with single lane models, calibration errors (Theil?s U, root mean + squared error) of 14 % to 16 % can be obtained. A validation of the + models ?which means taking calibrated parameters of one data set + to reproduce the other data sets? gives additional errors of about + 0.5 to 2.5 percentage points. This is in good agreement with other + calibration/validation approaches performed recently.}, + booktitle = {Transportation Research Board 2005}, + editor = { Transportation Research Board}, + keywords = {microscopic traffic flow models, calibration/validation, freeway data, + DLR/TS/VM, model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/20987/} +} + +@INPROCEEDINGS{Brockfeld2004c, + author = {Elmar Brockfeld and Reinhart K\"uhne and Peter Wagner}, + title = {Calibration and Validation of Microscopic Traffic Flow Models}, + booktitle = {TRB Annual Meeting}, + year = {2004}, + editor = { Transportation Research Board}, + volume = {1876}, + number = {TRB2004-001743}, + pages = {62--70}, + abstract = {Microscopic simulation models are becoming increasingly important + tools in modeling transport systems. There are a large number of + available models used in many countries. the most difficult stage + in the development and use of such models is the calibration and + validation of the microscopic sub-models describing the traffic flow, + such as the car following, lane changing and gap acceptance models. + This difficulty is due to the lack of suitable methods for adapting + models to empirical data. The aim of this paper is to present recent + progress in calibratin a number of microscopic traffic flow models. + By calibrating and validating various models using the same data + sets, the models are directly comparable to each other. This sets + the basis for a transparent benchmarking of those models. Furthermore, + the advantages and disadvantages of each model can be analyzed better + to develop a more realistic behavior of the simulated vehicles In + this work various microscopic traffic flow models have been tested + from a very microscopic point of view concerning the car-follwing + behavior and gap-acceptance. The data used for calibration and validation + is from car-following experiments performed in Japan in October 2001. + The data have been collected by letting nine DGPS-equipped cars follow + a lead car driving along a 3 km test track for about 15-30 minutes. + So one gets the positions and speeds of each car in time intervals + of 0.1 seconds. The experiment was repeated eight times letting the + leading driver perform various driving in waves and emulating many + acceleations/decelerations as they are typical at intersections. + To minimize driver-dependent correlations between the data sets, + the drivers were exchanged between the cars regularly after each + experiment}, + journal = {TRB 2004 Annual Meeting}, + keywords = {calibration, validation, traffic flow models, microscopic, GPS, DGPS, + DLR/TS/VM, model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6652/} +} + +@INPROCEEDINGS{Brockfeld2002a, + author = {Elmar Brockfeld and Reinhart K\"uhne and Peter Wagner}, + title = {Towards Benchmarking Microscopic Traffic Flow Models}, + booktitle = {Networks for Mobility, International Symposium}, + year = {2002}, + volume = {I}, + pages = {321--331}, + note = { LIDO-Berichtsjahr=2003,}, + journal = {Proceedings of Networks for Mobility}, + keywords = {microscopic simulation, benchmarking, traffic flow models, DLR/TS/VM, + model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6506/} +} + +@INPROCEEDINGS{Brockfeld2004b, + author = {Elmar Brockfeld and Rene Kelpin and Peter Wagner}, + title = {Performance of car following behaviour in microscopic traffic flow + models}, + booktitle = {2nd International Symposium "Networks for Mobility"}, + year = {2004}, + editor = {W. M\"ohlenbrink and F.C. Englmann and M. Friedrich and U. Martin + and U. Hangleiter}, + pages = {43--43}, + publisher = {Universit\"at Stuttgart}, + abstract = {Microscopic simulation models are becoming increasingly important + tools in modelling transport systems. They are applied in simulation + programs for transport planning, traffic forecasting and advanced + vehicle control and safety systems (AVCSS). An important part of + the models are the microscopic sub-models which describe the interaction + between adjacent vehicles. For that purpose rules and equations are + defined describing the car-following and lane changing behaviour + of the vehicles. An essential problem is the calibration and validation + of the parameters used in these rules. In this paper ten microscopic + traffic flow models of very different kind are analysed concerning + the correct reproduction of the car-following behaviour on single + lane roads. The models are calibrated and validated with data collected + via DGPS-equipped cars (Differential Global Positioning System) on + a test track in Japan. The positions of the cars are delivered every + 0.1 second with very high accuracy, which is perfect for analysing + the car following behaviour. To calibrate the models, in each case + one driver pair is under consideration. The measured data of a leading + car are fed into the model under consideration and the model is used + to compute the behaviour of a following car. In the analysis the + resulting simulated time series of headways are carried out and the + deviations to the measured headways are calculated to calibrate the + models. To find the optimal parameters an automated optimisation + technique is used which tries to minimise the deviations. For validation + purposes the resulting optimal parameter sets for single data sets + are taken to reproduce some other data sets by simulation. At first, + this is done in a driver independent way, where the drivers in the + data set used for the calibration are different from those used for + the validation. Secondly, to investigate whether individual driver + behaviour can be reproduced better a driver-special validation is + conducted, where the calibrated parameter sets obtained for each + driver are taken to validate the behaviour of the same driver in + other situations. Main results of the analyses are that all models + produce nearly the same errors, thus sophisticated models with up + to 15 parameters seem not to be better than simple models with only + 4 or 6 parameters. In total it is found that the differences in the + driver behaviour are much bigger than the diversity of the models. + At last, the validation with special driver pairs produces slightly + better results than the driver-independent validation. Thus, the + behaviour of individual drivers can be reproduced a bit more accurately + than trying to transfer optimal parameter results from one driver + to another.}, + journal = {Networks for Mobility 2004, Proceedings - Abstracts and CD-ROM}, + keywords = {simulation,model,microscopic models,calibration,validation,GPS,DGPS,car + following, DLR/TS/VM}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/21349/} +} + +@INPROCEEDINGS{Brockfeld2005, + author = {Elmar Brockfeld and Stefan Lorkowski}, + title = {Calibration of car-following models using Kalman filters}, + booktitle = {ISTTT 16}, + year = {2005}, + abstract = {Calibration and validation, especially of microscopic traffic flow + models is a challenging task. Currently, ther is a renewed interest + in results of those efforts [1, 2] as well as in developing the right + tools to actually perform the calibration. The approach developed + in [1] will be refined, extended and compared to an approach based + on the recent development of a so called unscented Kalman filter + [3]. These methods will be used to calibrate a couple of microscopic + traffic flow models to two sets of freeway data, one US-American + (the I-880 FSP-dataset) and an European dataset, data from the German + freeway A100.}, + keywords = {calibration, validation, Kalman filter, , DLR/TS/VM, model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/22391/} +} + +@INPROCEEDINGS{Brockfeld2003, + author = {Elmar Brockfeld and Peter Wagner}, + title = {Calibration and Validation of Microscopic Traffic Flow Models}, + booktitle = {Traffic and Granular Flow '03}, + year = {2003}, + editor = {P. H. L. Bovy and S. P. Hoogendoorn and M. Schreckenberg and D. E. + Wolf}, + publisher = {Springer}, + abstract = {Microscopic simulation models are becoming increasingly important + tools in modeling transport systems. There are a large number of + available models used in many countries. The most difficult stage + in the development and use of such models is the calibration and + validation of the microscopic sub-models describing the traffic flow, + such as the car following, lane changing and gap acceptance models. + This difficulty is due to the lack of suitable methods for adapting + models to empirical data. The aim of this paper is to present recent + progress in calibrating a number of microscopic traffic flow models. + By calibrating and validating various models using the same data + sets, the models are directly comparable to each other. This sets + the basis for a transparent benchmarking of those models. Furthermore, + the advantages and disadvantages of each model can be analyzed better + to develop a more realistic behavior of the simulated vehicles. + + + In this work various microscopic traffic flow models have been tested + from a very microscopic point of view concerning the car-following + behavior and gap-acceptance. The data used for calibration and validation + is from car-following experiments performed in Japan in October 2001. + The data have been collected by letting nine DGPS-equipped cars follow + a lead car driving along a 3 km test track for about 15-30 minutes. + So one gets the positions and speeds of each car in time intervals + of 0.1 seconds. The experiment was repeated eight times letting the + leading driver perform various driving patterns as there are constant + speeds of 20, 40, 60 and 80 km/h for some time, driving in waves + and emulating many accelerations/decelerations as they are typical + at intersections. To minimize driver-dependent correlations between + the data sets, the drivers were exchanged between the cars regularly + after each experiment. + + + In this paper we present analyses concerning four of the experiments, + namely the patterns mostly with intervals of constant speeds and + wave-performing. For each of the four experiments one gets the ten + trajectories of the cars in form of the DGPS-positions and speeds. + From these the accelerations and distances/gaps between the cars + have been calculated, which are used then for the simulation runs.
+ + The study was done analyzing the time-development of the gaps between + the cars. For the simulation setup only two cars are considered at + a time. The leading car is updated as the speeds in the recorded + data sets tell and the following car is updated as defined by the + equations and rules of the used model, respectively. The absolute + error a model produces is calculated via the simple quadratic distance + between the recorded gaps and the simulated gaps. To get a percentage + error it is additionally related to the mean average gap in each + data set. Altogether 36 vehicle pairs (4 experiments * 9 vehicle + pairs) were used as data sets for the analyses. + + + Each model has been calibrated with each of the 36 different constellations + separately gaining optimal parameter sets for each ?model - data + set? combination. To find the optimal parameter constellations a + gradient-free optimization method was used and started several times + with different initialization values for each ?model - data set? + pair. The variation in initialization is done to avoid sticking with + a local minimum, which of course can occur because getting a global + minimum can not be guaranteed by those type of optimization algorithms. + Subsequently, the validation was performed by determining the error + of a given model on all the data sets which have not been used to + calibrate the model. + + + By now, ten microscopic models of a very different kind using 3 to + 14 parameters have been tested. The most basic parameters used by + the models are the car length, a maximum velocity, an acceleration + and mostly a deceleration rate. The acceleration and deceleration + rates are specified in more detail in some models depending on the + recent speed or traffic states (indicated by density for example). + Furthermore, some models use a parameter for random braking or another + kind of stochastic parameter describing individual driver behavior. + Finally, few models use much more parameters to describe the driver?s + behavior, which will be briefly described in the final paper. As + the time step for the models is 0.1 seconds according to the recorded + data, some models with a traditional time step of 1 second ? as for + example used for simple cellular automatons - have been modified + to adopt for an arbitrarily small time-step. So far the models tested + are as follows (more will be added): - CA (cellular automaton model + by K. Nagel, M. Schreckenberg), - SK-model (model by S. Krauss), + - OVM (?Optimal Velocity Model?, Bando, Hasebe), - IDM (?Intelligent + Driver Model?, Helbing), - IDMM (?Intelligent Driver Model with Memory?, + Helbing, Treiber), - CATauT (CA model with more variable acceleration + and deceleration, own development), - GIPPSLIKE (basic model by P.G. + Gipps), - Aerde (model used in the simulation package INTEGRATION), + - FRITZSCHE (model used in the british software PARAMICS; it is similar + to what is used in the german software VISSIM by PTV), - MitSim (model + by Yang, Koutsopulus, used in the software MitSim). + + + The error rates of the models in comparison to the data sets during + the calibration for each model reach from 9 to 24 %. But no model + appears to be significantly the best one since every model has the + same problems with distinct data sets and other data sets can be + simulated quite good with each model. Interestingly, it can be stated + that models with more parameters than others do not necessarily reproduce + the real data better. The results of the validation process draw + a similar picture. The produced errors in these cases are about 12 + to 30 %, sometimes up to 40 or 60%, which is of course much bigger + than in the simple calibration cases. All in all the results after + the calibration agree with some results that have been obtained before. + But the results of the validation are in parts very bad which probably + calls for the development of much better models. The other way to + interpret the results is that ? from this microscopic point of view + ? errors of about 12-30 % can probably not be suppressed no matter + what a model is used. This would be due to the different behavior + of each driver.}, + journal = {Traffic and Granular Flow '03}, + keywords = {calibration, validation, models, traffic flow models, microscopic, + DLR/TS/VM, model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6653/} +} + +@INPROCEEDINGS{Brockfeld2004, + author = {Elmar Brockfeld and Peter Wagner}, + title = {Testing and Benchmarking of Microscopic Traffic Flow Models}, + booktitle = {WCTR04 - 10th World Conference on Transport Research}, + year = {2004}, + volume = {abstract book I}, + number = {A-D}, + pages = {775--776}, + abstract = {Microscopic simulation models are becoming increasingly important + tools in modelling transport systems. There are large number of available + models used in many countries. The important difficult stage in the + development and use of such models is the calibration and validation + of the microscopic sub-models describing the traffic flow, such as + the car following models for example. The aim of this paper is to + present recent progress in calibrating more than a dozen microscopic + traffic flow models with very different data sets conducted by DGPS-equipped + cars (Differential Global Positioning System), loop detectors and + human observers. Different approaches to measure the errors the models + produce in comparison to reality are compared. It can be stated that + from a microscopic point of view errors of about 15-20 % in headway- + and travel time-estimation and about 2-7 % in speed-estimation of + individual vehicles in the car following process seem to be the minimal + reachable level. Furthermore, the larger the simulation horizon is, + the smaller the diversity of the analyzed models become in comparison + to the diversity in the driver behaviour. Most interesting, no model + cold be denoted to be the best and especially highly sophisticated + models did not produce better results than very simple ones.}, + journal = {Proceedings of the 10th World Conference on Transport Research}, + keywords = {traffic flow modeling, benchmarking, simulation, GPS, DLR/TS/VM, model + calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6709/} +} + +@UNPUBLISHED{Brockfeld2004a, + author = {Elmar Brockfeld and Peter Wagner}, + title = {Kalibrierung und Validierung von mikroskopischen Verkehrsflussmodellen}, + year = {2004}, + abstract = {Mikroskopische Verkehrsmodelle entwickeln sich zu immer wichtigeren + Hilfsmitteln bei der Modellierung von Transportsystemen. Sie helfen + bei der Infrastrukturplanung und beim Design von kleinr?umigen Bereichen + wie etwa Ampelkreuzungen bis hin zu gro?en Verkehrsnetzen. Auch im + Bereich der Verkehrsprognose, speziell der Kurzfristprognose und + bei der Entwicklung von Fahrerassistenzsystemen werde sie immer h?ufiger + eingesetzt. Von diesen Modellen gibt es eine sehr gro?e Anzahl, die + in vielen verschiedenen L?ndern eingesetzt werden. Oft ist jedoch + nicht hinreichend klar, welches Modell welche Verkehrsph?nomene und + Fahrerverhalten wie genau abbildet. Der schwierigste Schritt bei + der Entwicklung und Nutzung solcher Modelle ist der Abgleich der + mikroskopischen Teilmodelle, die den Verkehrsfluss beschreiben, mit + realen Daten - also die Kalibrierung und Validierung. Diese Teilmodelle + sind z. B. Fahrzeugfolgemodelle, Spurwechselmodelle und Abstands-Akzeptanz-Modelle. + Die Schwierigkeit der Kalibrierung liegt vor allem darin, dass derzeit + noch keine Methoden etabliert sind, wie die Modell mikroskopisch + mit realen Daten verglichen werden sollten. Im Vortrag werden methoden + hierf?r vorgeschlagen und aktuelle Forschungsergebnisse bzgl. des + Vergleichs verschiedener Verkehrsflussmodelle anhand realer Daten + vorgestellt. Die Modell wurden alle mit denselben ?ffentlich zug?nglichen + Datens?tzen kalibriert und validiert, wodurch vor allem Vergleichbarkeit + und Transparenz der ERgebnisse hergestellt wird. Ein wesentliches + Ergebnis ist bisher, dass komplexere Modelle nicht notwendigerweise + besser sein m?ssen als sehr einfach strukturierte. Ferner geben die + Ergebnisse Hinweise auf eine bisher unzureichende Abbildung des Fahrerverhaltens + in den Modellen.}, + booktitle = {Braunschweiger Verkehrskolloquium des Zentrumf f\"ur Verkehr (ZVB)}, + keywords = {Kalibrierung, Validierung, Fahrzeugdaten, Modelle, Simulation, DLR/TS/VM, + model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6706/} +} + +@INPROCEEDINGS{Brockfeld2002, + author = {Elmar Brockfeld and Peter Wagner}, + title = {Testing traffic flow models}, + booktitle = {Computional Physics Conference}, + year = {2002}, + note = { LIDO-Berichtsjahr=2003,}, + journal = {Proceedings of the Computional Physics Conference}, + keywords = {DLR/TS/VM, model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30}, + url = {http://elib.dlr.de/6505/} +} + +@ARTICLE{Chao-Qun2008, + author = {Mei Chao-Qun and Huang Hai-Jun and Tang Tie-Qiao}, + title = {Improving Urban Traffic by Velocity Guidance}, + journal = {Intelligent Computation Technology and Automation, International + Conference on}, + year = {2008}, + volume = {2}, + pages = {383-387}, + __markedentry = {[dkrajzew:6]}, + address = {Los Alamitos, CA, USA}, + doi = {http://doi.ieeecomputersociety.org/10.1109/ICICTA.2008.288}, + isbn = {978-0-7695-3357-5}, + owner = {dkrajzew}, + publisher = {IEEE Computer Society}, + timestamp = {2012.01.26} +} + +@ARTICLE{Chowdhury2000, + author = {Debashish Chowdhury and Ludger Santen and Andreas Schadschneider}, + title = {Statistical physics of vehicular traffic and some related systems}, + journal = {Physics Reports}, + year = {2000}, + volume = {329}, + pages = {199 - 329}, + number = {4-6}, + doi = {10.1016/S0370-1573(99)00117-9}, + issn = {0370-1573}, + keywords = {Cellular automata, Models}, + owner = {dkrajzew}, + timestamp = {2011.09.19}, + url = {http://arxiv.org/abs/cond-mat/0007053} +} + +@INPROCEEDINGS{Cottingham2005, + author = {David N. Cottingham AND Jonathan J. Davies AND Alastair R. Beresford}, + title = {{Congestion-Aware Vehicular Traffic Routing Using WiFi Hotspots}}, + booktitle = {{Communications Innovation Institute Workshop}}, + year = {2005}, + month = apr, + organization = {Cambridge-MIT Institute}, + note = {Conference Paper}, + keywords = {V2X, Assignment, University of Cambridge}, + owner = {Jonathan Davies (jjd27)}, + timestamp = {2011.09.19}, + url = {http://www.cl.cam.ac.uk/research/dtg/www/files/publications/public/jjd27/ciiHandout.pdf} +} + +@MISC{Duering2011, + author = {Michael Düring}, + title = {Simulative Untersuchung und Bewertung Vehicle-to-Infrastructure basierter + Anfahrstrategien an Lichtsignalanlagen}, + month = {07}, + year = {2011}, + abstract = {Das Institut für Verkehrssystemtechnik im Deutschen Zentrum für Luft- + und Raumfahrt e.V. + + (DLR) beschäftigt sich, unter anderem, mit der Entwicklung und Evaluation + von Fahrerassistenzsystemen. + + In diesem Zusammenhang ist das DLR Mitglied im Car-2-Car Communication + + Consortium, welches eine führende Rolle bei der Erarbeitung von Standards + (IEEE + + 802.11p) für die drahtlose Übertragung von Informationen zwischen + Fahrzeugen sowie + + Fahrzeugen und kooperativer Verkehrsinfrastruktur definiert. Erste + Demonstrationen zeigen + + den sinnvollen Einsatz dieser Technologie für künftige Fahrerassistenzsysteme. + Das + + Ziel dieser Systeme ist es die Sicherheit und die Effizienz im Straßenverkehr + weiter zu + + erhöhen. + + + Im Entwicklungsprozess von Assistenz- und Automationssystemen werden + verschiedene + + Schritte, beginnend bei Simulationsstudien zur Abschätzung der Auswirkungen + eines neuartigen + + Systems im Verkehr bis hin zur Evaluation von Prototypen in Feldversuchen, + + durchlaufen. In der vorliegenden Arbeit wird das Anfahrverhalten von + 50 Fahrzeugen simuliert, + + die sich in einem Rückstau vor einer Lichtsignalanlage (LSA) befinden. + Der Aufbau + + der Simulation besteht aus einer LSA gesteuerten Kreuzung, deren einzige + Fahrtrichtung + + jeweils die Geradeausfahrt ist. Als Simulationsumgebung wird SUMO + verwendet. + + + Das Ziel der Arbeit ist die Untersuchung und Auswertung von drei unterschiedlichen + Anfahrszenarien. + + Zum einen wird das derzeitige Anfahrverhalten abgebildet. Zum anderen + + werden zwei Fahrerassistenzsysteme betrachtet. Ein Assistenzsystem + unterstützt den + + Fahrer, indem ihm die Restzeit der Rotphase angezeigt wird bzw. indem + der Assistent den + + Fahrer beim Beschleunigungsvorgang unterstützt. Der andere Assistent + übernimmt vollautomatisch + + die Längsführung der Fahrzeuge. Für die beiden Assistenten wird die + Vehicleto- + + X Technologie mit einer Durchdringungsrate von 100% vorausgesetzt. + + + Es wird gezeigt, dass durch die Variation der Anfahrstrategie sowohl + eine Verringerung + + der Aufenthaltsdauer des letzten Fahrzeugs in der Simulation (im Folgenden + Simulationszeit) + + von 25% bis 85% als auch die Reduzierung der Anzahl der Grünphasen + der LSA zum + + Räumen der Kreuzung von 14 auf 4 möglich ist. Die Einsparungsmöglichkeiten + hinsichtlich + + des Kraftstoffverbrauchs liegen zwischen 21% und 94%. Weiterhin wurden + mit der Grünphasendauer + + und dem Beschleunigungswert zwei Parameter identifiziert, die bedeutenden + + Einfluss auf den Ablauf der Simulation und das Potential zur Reduzierung + der Simulationszeit + + und des Kraftstoffverbrauchs bzw. der Emission haben.}, + file = {pdf:http\://elib.dlr.de/70524/1/Studienarbeit_Michael_D%C3%BCring_110726.pdf:URL}, + keywords = {Lichtsignalanlagen, Anfahren, V2X, TLS, DLR/TS/VM}, + owner = {dkrajzew}, + timestamp = {2011.11.23}, + url = {http://elib.dlr.de/70524/} +} + +@INPROCEEDINGS{Figueiredo2001, + author = {Figueiredo, L. and Jesus, I. and Machado, J.A.T. and Ferreira, J.R. + and Martins de Carvalho, J.L.}, + title = {Towards the development of intelligent transportation systems}, + booktitle = {Intelligent Transportation Systems, 2001. Proceedings. 2001 IEEE}, + year = {2001}, + pages = {1206 -1211}, + __markedentry = {[dkrajzew:6]}, + abstract = {This paper presents a review of the state of the art on intelligent + transportation systems. ITS involves a large number of research areas + and, therefore, this paper focus on those we believe to be the most + relevant. The main purpose is to study the achievements attained + in the last years and to give an overview of possible directions + towards future research}, + doi = {10.1109/ITSC.2001.948835}, + keywords = {intelligent transportation system development;automated highways;reviews;}, + owner = {dkrajzew}, + timestamp = {2012.01.26} +} + +@INPROCEEDINGS{dlr65966, + author = {Gunnar Fl{\"o}tter{\"o}d and Yun-Pang Fl{\"o}tter{\"o}d}, + title = {A method to resolve non-unique flows in deterministic macroscopic + intersection models}, + booktitle = {Transportation Research Board 92nd Annaul Meeting}, + year = {2013}, + abstract = {The modeling of complex urban road intersections with deterministic + macroscopic models of traffic flow is known to suffer from non-unique + solutions. This article proposes a new method to deal with this problem.}, + keywords = {deterministic macroscopic traffic model, traffic simulation}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/65966/} +} + +@INPROCEEDINGS{dlr62189, + author = {Gunnar Fl{\"o}tter{\"o}d and Daniel Krajzewicz and Yun-Pang Wang + and Michael Behrisch and Peter Wagner}, + title = {Disaggregate route choice estimation for the SUMO traffic microsimulator + with the Cadyts calibration tool for improved traffic management}, + booktitle = {2nd NEARCTIS workshop 2009}, + year = {2009}, + keywords = {route choice}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/62189/} +} + +@INPROCEEDINGS{dlr72232, + author = {Gunnar Fl{\"o}tter{\"o}d and Peter Wagner and Yun-Pang Wang}, + title = {Identifiability and practical relevance of complex car-following + models}, + booktitle = {Traffic And Granular Flow}, + year = {2011}, + month = {September}, + abstract = {This article looks at car-following models with a deliberately pragmatic + perspective: What information about driver behavior can be extracted + from a given data set without more or less speculative assumptions + about underlying behavioral laws. The objective of this exercise + is not to invalidate existing models but to obtain a better understanding + of how much (complex) model structure can be revealed/validated from + real data.}, + keywords = {car following models, ARIMA, calibration}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/72232/} +} + +@INPROCEEDINGS{dlr71871, + author = {Yun-Pang Fl{\"o}tter{\"o}d and Laura Bieker}, + title = {Demand-oriented traffic management for incidents and disasters}, + booktitle = {ICEM 2012}, + year = {2012}, + abstract = {Traffic simulation has been extensively used as a decision support + tool for efficient traffic management in daily life. During disasters + and incidents, traffic simulation can further help rescue teams to + understand the current traffic state and the possible impacts of + proposed strategies and then to make proper decisions. At this point, + the changes in traffic demand should also be considered in the simulation + to reflect the latest traffic state. In this paper, a demand-oriented + traffic management system for disasters and incidents with a web-based + portal is introduced. In this system, not only the real-time data + from loop and wireless detectors but also traffic simulation are + used for reconstructing and predicting the traffic state. Furthermore, + four traffic demand categories for disasters and incidents are proposed + in the system. Some respective demand characteristics are collected + according to historical cases, such as departure pattern and people?s + perception about evacuation. Such characteristics will be used in + the system, since they have a great influence on the simulated traffic + state and the effectiveness of applied strategies. Finally, the approach + how to generate the respective special demands for disasters and + incidents with consideration of the normal traffic demand is proposed + as well. }, + keywords = {traffic management; disaster; SUMO;VABENE; traffic simulation}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/71871/} +} + +@INPROCEEDINGS{dlr80610, + author = {Yun-Pang Fl{\"o}tter{\"o}d and Peter Wagner and Michael Behrisch + and Daniel Krajzewicz}, + title = {Simulated-based Validity Analysis of Ecological User Equilibrium}, + booktitle = {2012 Winter Simulation Conference}, + year = {2012}, + month = {Dezember}, + abstract = {Microscopic traffic simulation models are applied in the analysis + of transportation systems for years. Nevertheless, calibration (and + validation) of microscopic sub-models such as car-following and gap-acceptance + models is still a recent matter. The objective of the calibration + is to adapt the simulation output to empirical data by adjusting + the model's parameters. However, simulation results may vary from + the underlying real-world data, despite the calibration. To analyze + these deviations the present paper compares two different approaches + of calibration using data from a single-lane car-following experiment + on a Japanese test track. It is demonstrated that the results of + the two methods differ significantly. A recommendation for the more + appropriate method to use is given.}, + journal = {Winter Simulation Conference Archive}, + keywords = {traffic simulation, user equilibrium, ecology}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/80610/} +} + +@INPROCEEDINGS{Flotterod2009, + author = {Gunnar Fl\"otter\"od and Daniel Krajzewicz and Yun-Pang Wang and + Michael Behrisch and Peter Wagner}, + title = {Disaggregate route choice estimation for the SUMO traffic microsimulator + with the Cadyts calibration tool for improved traffic management}, + booktitle = {2nd NEARCTIS workshop 2009}, + year = {2009}, + file = {poster:http\://elib.dlr.de/62189/1/Nearctis_RouteChoiceEstimation_poster.pdf:URL}, + keywords = {route choice}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62189/} +} + +@TECHREPORT{Furian2013, + author = {Furian, Nikolaus and Hausberger, Stefan and Krajzewicz, Daniel}, + title = {Extended Simulation Tool PHEM coupled to SUMO with User Guide (Draft)}, + institution = {COLOMBO consortium}, + year = {2013}, + type = {Deliverable to the European Commission}, + month = {October}, + owner = {dkrajzew}, + timestamp = {2014.01.08} +} + +@PHDTHESIS{Gawron1999, + author = {Gawron, Christian}, + title = {Simulation-Based Traffic Assignment -- Computing User Equilibria + in Large Street Networks}, + school = {Universit\"{a}t zu K\"{o}ln}, + year = {1999}, + citeulike-article-id = {8937803}, + file = {:https\://sumo.dlr.de/pdf/GawronDiss.pdf:URL}, + institution = {Informatik, Universit\"{a}t zu K\"{o}ln}, + keywords = {equilibrium, learning, simulation, sumo, Assignment, ZAIK}, + number = {366}, + owner = {dkrajzew}, + pages = {113}, + posted-at = {2011-03-04 07:57:16}, + priority = {2}, + timestamp = {2011.09.19} +} + +@INPROCEEDINGS{GOZALVEZ2009, + author = {Javier GOZALVEZ and Siebe TURKSMA and Lan LIN and Oscar LAZARO and + Fabio CARTOLANO and Eric ROBERT and Daniel KRAJZEWICZ and Ramon BAUZA + and Fethi FILALI and Matthias R\"OCKL and Jeremie LEGUAY and Carlo + MICHELACCI and Jaap VREESWIJK and Julen MANEROS and Ainara GONZALEZ + and Massimiliano LENARDI}, + title = {iTETRIS: the Framework for Large-Scale Research on the Impact of + Cooperative Wireless Vehicular Communications Systems in Traffic + Efficiency}, + booktitle = {ICT-MobileSummit 2009}, + year = {2009}, + abstract = {Cooperative vehicular ICT systems have been identified as an attractive + technology to improve traffic management and safety, while providing + Internet on the move. To achieve these objectives, cooperative vehicular + communication systems allow the dynamic exchange of messages between + vehicles, and between vehicles and infrastructure. To ensure the + efficiency of cooperative vehicular ICT systems, it is crucial that + the communication protocols are adequately designed and optimised, + and that the applications using such communication capabilities are + tested under realistic conditions. In this context, this paper presents + the EU-funded iTETRIS platform that is being created to allow for + a realistic and accurate evaluation of the design and impact of cooperative + vehicular communication systems and traffic management policies under + realistic large-scale scenarios.}, + keywords = {Cooperative vehicular ICT, wireless communications, heterogeneous + systems, simulation platform, traffic management.}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62037/} +} + +@INPROCEEDINGS{Greenwood:2009:GDT:1558109.1558322, + author = {Dominic Greenwood and Branislav Burdiliak and Ivan Trencansky and + Hartmut Armbruster and Christian Dannegger}, + title = {GreenWave distributed traffic intersection control}, + booktitle = {Proceedings of The 8th International Conference on Autonomous Agents + and Multiagent Systems - Volume 2}, + year = {2009}, + series = {AAMAS '09}, + pages = {1413--1414}, + address = {Richland, SC}, + publisher = {International Foundation for Autonomous Agents and Multiagent Systems}, + acmid = {1558322}, + isbn = {978-0-9817381-7-8}, + keywords = {distributed multiagent traffic intersection phase control, emergent + green wave, video camera sensor}, + location = {Budapest, Hungary}, + numpages = {2}, + url = {http://dl.acm.org/citation.cfm?id=1558109.1558322} +} + +@INPROCEEDINGS{Harri2011, + author = {J\'er\^ome H\"arri and Pasquale Cataldi and Daniel Krajzewicz and + Robbin J. Blokpoel and Yoann Lopez and Jeremie Leguay}, + title = {Modeling and Simulating ITS Applications with iTETRIS}, + booktitle = {MSWiM'11, 14th ACM International Conference on Modeling, Analysis + and Simulation of Wireless and Mobile Systems}, + year = {2011}, + month = {Oktober}, + abstract = {his work presents the modeling methodology of the iTETRIS platform + to integrate and simulate ITS applications. iTETRIS is a modular + and open-source simulation platform composed of four key modules: + the network simulator ns-3, the traffic simulator SUMO, an ITS (Intelligent + Transportation System) application simulator, and a central federating + module called iCS. Our contribution is twofold: First, we propose + a methodology to model and simulate ITS applications with iTETRIS + around three main mechanisms: (i) message management with generic + open APIs based on subscription/result container mechanisms (ii) + data management with the integration of an application facilities + layer in the iCS, including a local dynamic map (LDM), (iii) application + management with an ITS application simulator including one or more + application logics. Second, we apply this methodology to implement + the following four ITS applications: dynamic route planning, bus + lane management, emergency vehicle, and contextual speed adaptation. + We describe their integrations in iTETRIS, including a characterization + of their interactions with the iCS, and illustrate the benefits of + these ITS applications on traffic efficiency, gasoline consumption, + or air pollutant emissions.}, + keywords = {Intelligent Transportation Systems (ITS), Simulation Platform, ITS + Application, iTETRIS, Performance Evaluation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/70969/} +} + +@INPROCEEDINGS{Hopfner2007, + author = {Marcus H\"opfner and Ingmar Ehrenpfordt and Eric Nicolay and Benjamin + Maier and Elmar Brockfeld and Daniel Krajzewicz}, + title = {Simulation und Feldtest f\"ur die Validation mobilfunkbasierter Verkehrsdaten}, + booktitle = {CeBIT in Motion - Forum for Telematics and Navigation}, + year = {2007}, + editor = { Deutsche Messe AG}, + month = {M\"arz}, + abstract = {Im Rahmen des vom BMBF gef?rderten Forschungsprojektes ?TrafficOnline + ? Online Verkehrsdatenerfassung ?ber Mobilfunknetze? wird ein Verfahren + zur Erfassung von Verkehrsdaten entwickelt, welches auf der Beobachtung + von im Stra?enverkehr mitgef?hrten Mobiltelefonen basiert. Hierbei + wird insbesondere der im Verkehrsnetz zur?ckgelegte Weg mobiler Telefonate, + welche den Bereich mehrerer Mobilfunkzellen passieren, in anonymer + Art und Weise ausgewertet und daraus eine durchschnittliche Reisegeschwindigkeit + ermittelt. Das Institut f?r Verkehrsf?hrung und Fahrzeugsteuerung + hat eine Testmethodik aufgebaut, auf deren Basis die ?berpr?fung + der Einsatzgrenzen und Qualit?t des TrafficOnline-Verfahrens erfolgt. + F?r die Validation des Verfahrens fand im Gro?raum Berlin ein Feldtest + statt. Hierf?r wurden im GSM-Netz spezielle Erfassungsrechner installiert, + welche f?r einen l?ngeren Zeitraum s?mtliche an der Abis-Schnittstelle + auflaufenden Mobilfunkdaten aufzeichneten. Das Testgebiet erstreckte + sich dabei ?ber den s?dwestlichen Teil Berlins, ausgehend vom Zentrum + bis zum Autobahnring BAB A10. Damit umfasste es neben den ?bergeordneten + Bundesfernstra?en auch Teile des nachgeordneten Stra?ennetzes im + Zentrum Berlins. Im Rahmen der Auswertung des Feldtestes erfolgt + ein Abgleich der mittels des TrafficOnline-Verfahrens generierten + Verkehrsdaten mit lokalen Verkehrsdetektoren. Als Referenzdaten werden + dabei unter anderem die Induktionsschleifen und Passivinfrarotdetektoren + der Verkehrsmanagementzentrale Berlin verwendet. Neben diesem Feldtest + kommt als zweiter Teil der Validation eine Simulation zum Einsatz. + Als Simulationstool wurde das Programm "Simulation of Urban MObility" + (SUMO) gew?hlt. Es handelt sich dabei um eine mikroskopische Verkehrssimulation, + welche vom Zentrum f?r Angewandte Informatik K?ln und dem Institut + f?r Verkehrsforschung Berlin entwickelt wurde. Mit diesem Simulationstool + wird vor allem die ?bertragbarkeit des TrafficOnline-Verfahrens auf + verschiedenste r?umliche Gegebenheiten und unterschiedliche Mobilfunknetze + gepr?ft wird. Um diese Pr?fung durchf?hren zu k?nnen, wurde das Tool + SUMO an die speziellen Anforderungen angepasst und um notwendige + Funktionalit?ten erg?nzt.}, + journal = {CeBIT in Motion - Forum for Telematics and Navigation}, + keywords = {Verkehrsdatenerfassung, Floating Phone Data, Verkehrssimulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/48868/} +} + +@MASTERSTHESIS{Heppner2010, + author = {Matthias Heppner}, + title = {Einführung von Unit Tests in das bestehende C++ Softwaresystem SUMO}, + school = {Humboldt-Universität zu Berlin}, + year = {2010}, + month = {January}, + owner = {behr_mi}, + timestamp = {2011.12.05}, + url = {http://www2.informatik.hu-berlin.de/swt/dipl/MatthiasHeppner.2010.pdf} +} + +@ARTICLE{joerer2012towards, + author = {Joerer, Stefan and Sommer, Christoph and Dressler, Falko}, + title = {{Towards Reproducibility and Comparability of IVC Simulation Studies + - A Literature Survey}}, + journal = {IEEE Communications Magazine}, + year = {2012}, + note = {to appear}, + publisher = {IEEE} +} + +@UNPUBLISHED{Kuhne2006, + author = {Reinhart K\"uhne and Marius Schlingelhof and Daniel Krajzewicz}, + title = {NEW GLOBAL NAVIGATION SATELLITE SYSTEM BASED APPROACHES FOR ADVANCED + DRIVER ASSISTANCE}, + note = {Probably duplicate}, + month = {Januar}, + year = {2006}, + booktitle = {TRB 2006 (85. Annual Meeting)}, + keywords = {Navigation, Satellite System, Driver Assistance}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/44423/} +} + +@INPROCEEDINGS{Karnadi2007, + author = {Karnadi, F.K. and Zhi Hai Mo and Kun-chan Lan}, + title = {Rapid Generation of Realistic Mobility Models for VANET}, + booktitle = {Wireless Communications and Networking Conference, 2007.WCNC 2007. + IEEE}, + year = {2007}, + pages = {2506 -2511}, + month = {march}, + abstract = {One emerging, new type of ad-hoc network is the vehicular ad-hoc network + (VANET), in which vehicles constitute the mobile nodes in the network. + Due to the prohibitive cost of deploying and implementing such a + system in real world, most research in VANET relies on simulations + for evaluation. A key component for VANET simulations is a realistic + vehicular mobility model that ensures conclusions drawn from simulation + experiments will carry through to real deployments. In this work, + we introduce a tool MOVE that allows users to rapidly generate realistic + mobility models for VANET simulations. MOVE is built on top of an + open source micro-traffic simulator SUMO. The output of MOVE is a + realistic mobility model and can be immediately used by popular network + simulators such as ns-2 and qualnet. We evaluate and compare ad-hoc + routing performance for vehicular nodes using MOVE to that using + the random waypoint model. We show that the simulation results obtained + when nodes moving according to a realistic mobility model is significantly + different from that of the commonly used random waypoint model.}, + doi = {10.1109/WCNC.2007.467}, + issn = {1525-3511}, + keywords = {MOVE tool;SUMO;VANET simulations;ad-hoc routing performance;mobile + nodes;network simulators;open source microtraffic simulator;random + waypoint model;realistic vehicular mobility model;vehicular ad-hoc + network;vehicular nodes;ad hoc networks;public domain software;telecommunication + network routing;traffic engineering computing;, V2X, New South Wales + University}, + owner = {dkrajzew}, + timestamp = {2011.09.19} +} + +@INPROCEEDINGS{Katsaros2011b, + author = {Katsaros, Konstantinos and Dianati, Mehrdad and Tafazolli, Rahim + and Kernchen, Ralf}, + title = {{CLWPR - A Novel Cross-Layer Optimized Position Based Routing Protocol + for VANETs}}, + booktitle = {2011 IEEE Vehicular Networking Conference (VNC) (VNC 2011)}, + year = {2011}, + pages = {200--207}, + __markedentry = {[dkrajzew:]}, + abstract = {In this paper, we propose a novel position-based routing protocol + designed to anticipate the characteristics of an urban VANET environment. + The proposed algorithm utilizes the prediction of the node's position + and navigation information to improve the efficiency of routing protocol + in a vehicular network. In addition, we use the information about + link layer quality in terms of SNIR and MAC frame error rate to further + improve the efficiency of the proposed routing protocol. This in + particular helps to decrease end-to-end delay. Finally, carry-n-forward + mechanism is employed as a repair strategy in sparse networks. It + is shown that use of this technique increases packet delivery ratio, + but increases end-to-end delay as well and is not recommended for + QoS constraint services. Our results suggest that compared with GPSR, + our proposal demonstrates better performance in the urban environment.}, + file = {:http\://info.ee.surrey.ac.uk/Personal/K.Katsaros/papers/KK_CLWPR_VNC_11.pdf:URL}, + keywords = {vehicular ad-hoc networks, position based routing, cross-layer.}, + owner = {dkrajzew}, + timestamp = {2012.01.25} +} + +@INPROCEEDINGS{Katsaros2011a, + author = {Katsaros, Konstantinos and Kernchen, Ralf and Dianati, Mehrdad and + Rieck, David}, + title = {{Performance study of a Green Light Optimized Speed Advisory ( GLOSA + ) Application Using an Integrated Cooperative ITS Simulation Platform}}, + booktitle = {International Wireless Communications and Mobile Computing Conference + (IWCMC)}, + year = {2011}, + pages = {918--923}, + __markedentry = {[dkrajzew:]}, + abstract = {This paper proposes a Green Light Optimized Speed Advisory (GLOSA) + application implementation in a typical reference area, and presents + the results of its performance analysis using an integrated cooperative + ITS simulation platform. Our interest was to monitor the impacts + of GLOSA on fuel and traffic efficiency by introducing metrics for + average fuel consumption and average stop time behind a traffic light, + respectively. For gathering the results we implemented a traffic + scenario defining a single route through an urban area including + two traffic lights. The simulations are varied for different penetration + rates of GLOSA-equipped vehicles and traffic density. Our results + indicate that GLOSA systems could improve fuel consumption and reduce + traffic congestion in junctions.}, + doi = {10.1109/IWCMC.2011.5982524}, + file = {:http\://info.ee.surrey.ac.uk/Personal/K.Katsaros/papers/KK_GLOSA_IWCMC_11.pdf:URL}, + keywords = {GLOSA,fuel consumption,traffic congestion,traffic light advisory,vehicular + communications}, + mendeley-tags = {GLOSA}, + owner = {dkrajzew}, + timestamp = {2012.01.25} +} + +@ARTICLE{Katsaros2011, + author = {Katsaros, Konstantinos and Kernchen, Ralf and Dianati, Mehrdad and + Rieck, David and Zinoviou, Charalambos}, + title = {{Application of Vehicular Communications for Improving the Efficiency + of Traffic in Urban Areas}}, + journal = {Wireless Communications and Mobile Computing}, + year = {2011}, + volume = {11}, + pages = {1657--1667}, + number = {12}, + __markedentry = {[dkrajzew:]}, + abstract = {This paper studies the impacts of vehicular communications on efficiency + of traffic in urban areas. We consider a Green Light Optimized Speed + Advisory (GLOSA) application implementation in a typical reference + area, and present the results of its performance analysis using an + integrated cooperative ITS simulation platform. In addition, we study + route alternation using Vehicle to Infrastructure (V2I) and Vehicle + to Vehicle (V2V) communications. Our interest was to monitor the + impacts of these applications on fuel and traffic efficiency by introducing + metrics for average fuel consumption, average stop time behind a + traffic light and average trip time, respectively. For gathering + the results we implemented two traffic scenarios defining routes + through an urban area including traffic lights. The simulations are + varied for different penetration rates of application-equipped vehicles, + drivers compliance to the advised speed and traffic density. Our + results indicate that GLOSA systems could improve fuel consumption, + reduce traffic congestion in junctions and the total trip time.}, + doi = {10.1002/wcm.1233}, + file = {:http\://info.ee.surrey.ac.uk/Personal/K.Katsaros/papers/KK_GLOSA_SI_WCMC_11.pdf:URL}, + keywords = {fuel consumption,traffic congestion,traffic light advisory,vehicular + communications, alternative route}, + owner = {dkrajzew}, + timestamp = {2012.01.25} +} + +@INPROCEEDINGS{Kerekes2009, + author = {{Kerekes}, J.~P. and {Presnar}, M.~D. and {Fourspring}, K.~D. and + {Ninkov}, Z. and {Pogorzala}, D.~R. and {Raisanen}, A.~D. and {Rice}, + A.~C. and {Vasquez}, J.~R. and {Patel}, J.~P. and {MacIntyre}, R.~T. + and {Brown}, S.~D.}, + title = {{Sensor modeling and demonstration of a multi-object spectrometer + for performance-driven sensing}}, + booktitle = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference + Series}, + year = {2009}, + volume = {7334}, + series = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference + Series}, + month = may, + adsnote = {Provided by the SAO/NASA Astrophysics Data System}, + adsurl = {http://adsabs.harvard.edu/abs/2009SPIE.7334E..17K}, + doi = {10.1117/12.819265}, + keywords = {surveillance, Numerica Corporation, Air Force Institute of Technology, + Rochester Institute of Technology}, + owner = {dkrajzew}, + timestamp = {2011.09.19} +} + +@INBOOK{Krajzewicz2010b, + pages = {269--294}, + title = {Traffic Simulation with SUMO - Simulation of Urban Mobility}, + publisher = {Springer}, + year = {2010}, + editor = {Jaume Barcel\'o}, + author = {Daniel Krajzewicz}, + series = {International Series in Operations Research and Management Science}, + month = {October}, + journal = {Fundamentals of Traffic Simulation}, + keywords = {traffic simulation, sumo}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/66135/} +} + +@MISC{Krajzewicz2009a, + author = {Daniel Krajzewicz}, + title = {Kombination von taktischen und strategischen Einfl\"ussen in einer + mikroskopischen Verkehrsflusssimulation}, + year = {2009}, + abstract = {Eine mikroskopische Verkehrsflusssimulation gro?er Areale kann nur + realit?tsnah durchge-f?hrt werden, wenn der Algorithmus zur Spurwahl + sowohl taktische als auch strategische Ent-scheidungen des Fahrers + umsetzt. Innerhalb dieser Arbeit wird das aktuell (Stand Juni 2008) + in der freien, mikroskopischen Verkehrsflusssimulation ?SUMO? implementierte + Modell vorgestellt und besprochen, welches beide Ebenen vereint.}, + editor = {Thomas J\"urgensohn and Harald Kolrep}, + journal = {Fahrermodellierung in Wissenschaft und Wirtschaft, 2. Berliner Fachtagung + f\"ur Fahrermodellierung}, + keywords = {mikroskopische Verkehrsflusssimulation, Spurwechsel}, + number = {28}, + owner = {Daniel}, + pages = {104--115}, + publisher = {VDI-Verlag}, + series = {Verein Deutscher Ingenieure [Fortschritt-Berichte VDI / 22]: Fortschritt-Berichte + / VDI ; Nr. 28 : Reihe 22, Mensch-Maschine-Systeme}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/58663/} +} + +@INPROCEEDINGS{Krajzewicz2003c, + author = {Daniel Krajzewicz}, + title = {A Cognitive Driver Model}, + booktitle = {ECTRI 2003 - Young Researcher Seminar}, + year = {2003}, + abstract = {many different approaches to understand the process of driving a car + exist, we try to simulate it within this project. This methodology + fits wll into our institute?s work where traffic simulations play + an important role. We not only hope to gain some information about + the most concerned topics on driver related problems - issues on + ergonomics and traffic security - but also some knowledge about traffic + itself. We hope this knowledge will help us to improve microscopic + traffic models used for large area simulations. Herein, som basic + concepts the model incorporates and the main problems during the + research and implementation are described.}, + file = {:http\://elib.dlr.de/6718/1/YRS2003_dkrajzew_mod.pdf:URL}, + journal = {ECTRI Report 2003-03}, + keywords = {simulation, cognitive car driver model}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6718/} +} + +@INPROCEEDINGS{Krajzewicz2010a, + author = {Daniel Krajzewicz and Laura Bieker}, + title = {Investigating Ecological Impacts on selected Traffic Management Methods}, + booktitle = {NEARCTIS 3rd Workshop}, + year = {2010}, + month = {Juni}, + abstract = {Within the iTETRIS project, the used SUMO traffic simulation was extended + by models for computing the emissions of pollutants CO, CO2, HC, + PMx, and NOx, as well as for computing the fuel consumption on a + microscopic, per-vehicle, base. The emission model was based on the + HBEFA (?Handbuch der Emissionsfaktoren?) database which covers a + large variety of vehicle types, considering differences between passenger + and heavy duty vehicles, the engine displacement, the fuel type, + and the EURO emission norm of the vehicles. This database was reformulated + into a microscopic model which uses the vehicle class, the vehicle?s + speed and the vehicle?s acceleration for computing the amount of + a certain pollutant?s emission within one discrete time step. The + kind of this model?s embedding within SUMO allows to collect and + to evaluate the ecological impacts of traffic management strategies + on per-vehicle, per-lane, and per-road base. Using this information, + two sub-topics of traffic management were addressed: ecological routing + and the ecological impacts of traffic lights.}, + keywords = {traffic management, ecological issues, navigation, traffic lights}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/64840/} +} + +@INPROCEEDINGS{Krajzewicz2011, + author = {Daniel Krajzewicz and Laura Bieker and Elmar Brockfeld and Ronald + Nippold and Julia Ringel}, + title = {\"Okologische Einfl\"usse ausgew\"ahlter Verkehrsmanagementans\"atze}, + booktitle = {Heureka '11}, + year = {2011}, + month = {M\"arz}, + abstract = {Eine der Aufgaben innerhalb des von der Europ?ischen Kommission kofinanzierten + Projektes ?iTETRIS? war die Betrachtung der ?kologischen Auswirkungen + von Verkehrsmanagementma?nahmen. Um diese Aufgabe erf?llen zu k?nnen + wurde die innerhalb dieses Projektes benutzte Verkehrsflusssimulation + SUMO um ein Modell der Schadstoffemission und des Kraftstoffverbrauchs + erweitert. Mit Hilfe der so erhaltenen Anwendung wurden Versuche + durchgef?hrt, die die Abh?ngigkeit zwischen konventionellen Kenngr??en + des Verkehrsmanagements und den neu errechenbaren ?kologischen Kenngr??en + aufdecken sollten. Innerhalb dieses Berichts werden neben dem Emissionsmodell + die Ergebnisse dieser Untersuchungen vorgestellt, wobei ein starker + Zusammenhang zwischen konventionellen und ?kologischen Kenngr??en + festgestellt wird.}, + keywords = {Schadstoffemission, Routenwahl, Verkehrsmanagement}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/69859/} +} + +@ARTICLE{Krajzewicz20121482, + author = {Daniel Krajzewicz and Laura Bieker and Jérôme Härri and Robbin Blokpoel}, + title = {Simulation of V2X Applications with the iTETRIS System}, + journal = {Procedia - Social and Behavioral Sciences}, + year = {2012}, + volume = {48}, + pages = {1482 - 1492}, + number = {0}, + note = {Transport Research Arena 2012}, + abstract = {The main task of the “iTETRIS” project which was co-funded by the + European Commission was the development of a software system for + the simulation of large-scale traffic management solutions based + on vehicular communication (V2X). Several steps were taken to assure + that the developed simulation system fits the current research and + engineering needs, including the evaluation of a city’s traffic problems, + definition of performance metrics, development of V2X-enabled traffic + management applications, and the extension of the simulators used + within the developed simulation architecture. Within this report, + the major results of the project will be presented. Most of these + results were made freely available after the project’s end.}, + doi = {10.1016/j.sbspro.2012.06.1124}, + issn = {1877-0428}, + keywords = {traffic management}, + url = {http://www.sciencedirect.com/science/article/pii/S1877042812028601} +} + +@INPROCEEDINGS{Krajzewicz2010, + author = {Daniel Krajzewicz and Robbin Blokpoel and Fabio Cartolano and Pasquale + Cataldi and Ainara Gonzalez and Oscar Lazaro and J\'er\'emie Leguay + and Lan Lin and Julen Maneros and Michele Rondinone}, + title = {iTETRIS - A System for the Evaluation of Cooperative Traffic Management + Solutions}, + booktitle = {AMAA 2010}, + year = {2010}, + editor = {Gereon Meyer and J\"urgen Valldorf}, + series = {VDI-Buch}, + pages = {399--410}, + month = {Mai}, + publisher = {Springer}, + abstract = {V2X communication - communication between vehicles (V2V) and between + vehicles and infrastructure (V2I) - promises new methods for traffic + management by supplying new data and by opening new ways to inform + drivers about the current situation on the roads. Currently, V2X + cooperative systems are under development, forced by both the industry + and by the European Commission which supports the development as + a part of its Intelligent Car Initiative. Within this publication, + "iTETRIS", a new system for simulating V2X-based traffic management + applications is described which aims on high-quality simulations + of large areas. This is achieved by coupling two well-known open + source simulators. The sustainability of the project is guaranteed + by making the whole also available as an open source tool.}, + journal = {Advanced Microsystems for Automotive Applications 2010}, + keywords = {V2X communication, simulation, traffic management}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/64340/} +} + +@INPROCEEDINGS{Krajzewicz2006, + author = {Daniel Krajzewicz and Michael Bonert and Peter Wagner}, + title = {The Open Source Traffic Simulation Package SUMO}, + booktitle = {RoboCup 2006}, + year = {2006}, + month = {Juni}, + abstract = {Since the year 2000, the Institute of Transportation Research (IVF) + at the German Aerospace Centre (DLR) is developing a microscopic, + traffic simulation package. The complete package is offered as open + source to establish the software as a common testbed for algorithms + and models from traffic research. Since the year 2003 the IVF also + works on a virtual traffic management centre and in conjunction with + this on traffic management. Several large-scale projects have been + done since this time, most importantly INVENT where modern traffic + management methods have been evaluated and the online-simulation + and prediction of traffic during the world youth day (Weltjugendtag) + 2005 in Cologne/Germany. This publication briefly describes the simulation + package together with the projects mentioned above to show how SUMO + can be used to simulate largescale traffic scenarios. Additionally, + it is pointed out how SUMO may be used as a testbed for automatic + management algorithms with minor effort in developing extensions.}, + journal = {RoboCup 2006}, + keywords = {Simulation, Traffic Management, Disaster & Event Management}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/46740/} +} + +@INPROCEEDINGS{Krajzewicz2007, + author = {Daniel Krajzewicz and Danilot Teta Boyom and Peter Wagner}, + title = {Untersuchungen der Performanz einer auf C2C-Kommunikation basierenden, + autonomen Routenwahl bei Stauszenarien}, + booktitle = {Heureka '08}, + year = {2007}, + month = {Juli}, + abstract = {Neben m?glichem Einsatz bei der Warnung und Unterst?tzung des Fahrers, + der Vorbereitung des Fahrzeugs auf einen kurz bevorstehenden Unfall + oder der Realisierung eines Zugangs zum Internet innerhalb von Fahrzeugen + ([6]) wird der Kommunikation zwischen Fahrzeugen auch die M?glichkeit + Staus zu reduzieren zugesprochen. F?r diese Funktion sollen die von + anderen Fahrzeugen erhaltenen Informationen ?ber den Zustand im Stra?ennetz + in angepasste Navigationssysteme einflie?en, so dass diese in der + Lage sind, auf realem und aktuellem Stra?enzustand basierend, Routen + f?r das jeweilige, sie tragende Fahrzeug vorherzusagen. Die hier + vorgestellte Untersuchung soll aufzeigen, inwiefern eine solche zwischen + den Fahrzeugen innerhalb des Systems unkoordinierte Routenwahl tats?chlich + in der Lage ist, die Auswirkungen von Staus zu reduzieren. + + + F?r die Untersuchung wurde die freie Verkehrsflusssimulation SUMO + ([1, 2]) um eine C2C-Komponente erweitert. Als Datengrundlage wurde + ein Stra?ennetz der Stadt Magdeburg benutzt, f?r das eine validierte + Nachfrage existiert. Dieses Dokument beschreibt die Erweiterung der + Simulation um die C2C-Kommunikation, den Aufbau des simulierten Stauszenarios + sowie die Ergebnisse der Untersuchung.}, + keywords = {car2car-Kommunikation, Verkehrsmanagement, Simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/50466/} +} + +@INPROCEEDINGS{Krajzewicz2007a, + author = {Daniel Krajzewicz and Danilot Teta Boyom and Peter Wagner}, + title = {Evaluation of the Performance of city-wide, autonomous Route Choice + based on Vehicle-to-vehicle-Communictaion + + }, + booktitle = {TRB 2008 (87. Annual Meeting)}, + year = {2007}, + month = {Juli}, + abstract = {The sharing of information between vehicles via vehicle-to-vehicle + communication has a great potential for future traffic surveillance + and management applications. One possible use case is the communication + of information about the state of the road network, for example by + transferring travel times into the navigation devices enabling them + to compute routes using this knowledge. + + + This work reports about a set of simulation results where the benefit + of using information exchanged between vehicles was evaluated for + a city scenario using an extended microscopic traffic flow simulation. + The scenario is based on validated real-life data for a normal weekday + within a middle-sized German city. Contrary to other approaches, + the used model of vehicle-to-vehicle communication was implemented + directly into the traffic simulation. It was kept as simple as possible + in order to allow a fast execution needed for evaluating the effects + on a large scale and was calibrated using data from the real life. + This simulation study evaluates the influences of the model?s parameters + and of the amount of vehicles equipped with vehicle-to-vehicle devices + on the mean travel time within the simulated city.}, + keywords = {Vehicle-to-vehicle communication, traffic management, simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/50464/} +} + +@INPROCEEDINGS{Krajzewicz2007b, + author = {Daniel Krajzewicz and Danilot Teta Boyom and Peter Wagner}, + title = {Auswirkungen einer auf Car2Car-Kommunikation basierenden, dynamischen + Routenwahl bei Beeintr\"achtigungen im Stadtverkehr}, + booktitle = {21. Verkehrswissenschaftliche Tage}, + year = {2007}, + month = {Juli}, + abstract = {Die Kommunikation zwischen Fahrzeugen, die in K?rze im Rahmen des + Projektes SIM-TD praxisnah demonstriert werden soll, birgt ein gro?es + Potential f?r eine zuk?nftige Verkehrslageerfassung wie auch f?r + neue Verfahren beim Management von Verkehrssystemen. Beispielsweise + k?nnen Fahrzeuge Informationen ?ber von einem Normalfall abweichende + Reisezeiten an andere Fahrzeuge weiter geben, die ihrem Fahrer dann + eine neue, am Stau vorbei f?hrende, Route vorschlagen. + + + Im Rahmen der hier vorgestellten Untersuchung wurde ein solches Szenario + per Simulation evaluiert, um die Effizienz einer solchen Routenwahl + zu demonstrieren. Ausgegangen wurde hierbei von der Simulation einer + ganzen Stadt, die um Staus erweitert worden ist. Neben den Auswirkungen + unterschiedlicher Ausstattungsgrade wurden auch die Einfl?sse weiterer + Kommunikationsparameter untersucht.}, + journal = {21. Verkehrswissenschaftliche Tage}, + keywords = {Car2Car-Kommunikation, Verkehrsflusssimulation, Verkehrsmanagement}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/50463/} +} + +@INPROCEEDINGS{Krajzewicz2005a, + author = {Daniel Krajzewicz and Elmar Brockfeld and J\"urgen Mikat and Julia + Ringel and C. R\"ossel and Wolfram Tuchscheerer and Peter Wagner + and Richard W\"osler}, + title = {Simulation of modern Traffic Lights Control Systems using the open + source Traffic Simulation SUMO}, + booktitle = {3rd Industrial Simulation Conference 2005}, + year = {2005}, + editor = {J. Kr\"uger and A. Lisounkin and G. Schreck}, + pages = {299--302}, + month = {Juni}, + publisher = {EUROSIS-ETI}, + abstract = {Within the project ?OIS? (optical information systems) new traffic + control mechanisms had to be invented and tested. One of the most + important topics was to optimize the flow over a junction using information + from the OIS sensors which can not be measured using normal sensors + such as induct loops. For this purpose, an ?agentbased? traffic lights + logic algorithm was used, which uses the length of a jam in front + of a traffic light as input. As we had no possibility to test the + traffic lights control within the reality, the improvement of the + flow throughput of such junctions was shown using the open source + traffic Simulation ?SUMO? (Simulation of Urban MObility) [1, 2]. + This publication describes the algorithm itself and how it was embedded + within the simulation. Furthermore, the simulation results are given.}, + journal = {Proceedings of the 3rd Industrial Simulation Conference 2005}, + keywords = {Microscopic traffic simulation, open source, traffic lights, traffic + research}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/21012/} +} + +@INPROCEEDINGS{dlr81834, + author = {Daniel Krajzewicz and Yun-Pang Fl{\"o}tter{\"o}d}, + title = {Simulative Untersuchung abstrakter und realer Verkehrsmanagementans{\"a}tze + zur Emissionsreduktion}, + booktitle = {Kolloquium "Luftqualit{\"a}t an Stra{\ss}en 2013"}, + year = {2013}, + pages = {42--57}, + month = {M{\"a}rz}, + publisher = {Bundesanstalt f{\"u}r Stra{\ss}enwesen}, + abstract = {Verkehrsflusssimulationen sind ein etabliertes Werkzeug des Verkehrsmanagements, + die auch zur Bewertung von schadstoffreduzierenden Verkehrsmanagementma{\ss}nahmen + herangezogen werden k{\"o}nnen. Vorgestellt werden abgeschlossene + und laufende Arbeiten zur simulationsgest{\"u}tzten Entwicklung und + Bewertung solcher Ma{\ss}nahmen.}, + journal = {Kolloquium Luftqualit{\"a}t an Stra{\ss}en 2013}, + keywords = {Simulation, Schadstoffemission, Verkehrsmanagementma{\ss}nahmen}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/81834/} +} + +@INPROCEEDINGS{Krajzewicz2003b, + author = {Daniel Krajzewicz and Markus Hartinger and Georg Hertkorn and Peter + Mieth and Christian R\"ossel and Julia Zimmer and Peter Wagner}, + title = {Using the Road Traffic Simulation ``SUMO'' for educational Purposes}, + booktitle = {Traffic and Granular Flow (TGF)}, + year = {2003}, + note = {LIDO-Berichtsjahr=2004}, + abstract = {Since the year 2000, the Centre of Apllied Informatics and the Institute + f?r Transport Research at the German Aerospace Centre devops a microscopic + road traffic simulation package named "SUMO" - an acronym + for "Simulation of Urban MObility". Meanwhile, the simulation + is capable to deal with realistic scenarios such as large cities + and is used for these purposes within the Institute?s projects. The + idea was to support the traffic research community with a common + platform to test new ideas and models without the need to reimplement + a framework that handles road data, vehicle routes, traffic light + steering etc. To achieve this goal, the simulation code is available + as open source. Within this publication, we would like to demonstrate + how most attributes of traffic flow can be simulated. This should + be mainly intersting for educational purposes.}, + file = {:http\://elib.dlr.de/6719/1/dkrajzew_TGF03Poster_SUMOEducation.pdf:URL}, + keywords = {traffic simulation, road traffic, car follwing, microscopic, continous, + multimodal, open source, car-driver model, traffic research, education}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6719/} +} + +@INPROCEEDINGS{Krajzewicz2003a, + author = {Daniel Krajzewicz and Markus Hartinger and Georg Hertkorn and Peter + Mieth and Julia Ringel and Christian R\"ossel and Peter Wagner}, + title = {The "Simulation of Urban MObility" package: An open source traffic + simulation}, + booktitle = {2003 European Simulation and Modelling Conference}, + year = {2003}, + abstract = {SUMO is the acronym for "Simulation of Urban MObility", an open source + project concerned with the development and usage of a traffic simulation. + The project is a part of our scientific work concerned with the verification + of different microscopic models of traffic, and their comparison + ([1]). Further, the traffic science community often involves ideas + where each of them needs a traffic simulation to be validated. Over + the time, many more or less sophisticated simulations have been developed + to do this job. They mostly stay unknown. This approach is not only + very inefficient as a traffic simulation has many things to regard; + also, the results are often not replicable or at least hard to compare. + When a common platform is supplied, such problems should not occur. + Within this publication, we would like to introduce our package to + the public in the hope to gain some further interest.}, + journal = {Proceedings of the 2003 European Simulation and Modelling Conference}, + keywords = {traffic simulation, road traffic, open source, car-driver model, traffic + research}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/21385/} +} + +@INPROCEEDINGS{Krajzewicz2004b, + author = {Daniel Krajzewicz and Markus Hartinger and Georg Hertkorn and Eric + Nicolay and Christian R\"ossel and Julia Ringel and Peter Wagner}, + title = {Recent Extensions to the open source Traffic Simulation SUMO}, + booktitle = {WCTR04 - 10th World Conference on Transport Research}, + year = {2004}, + abstract = {"SUMO" is the acronym for "Simulation of Urban MObility", an open + source simulation package developed since 2000 at the Institute for + Transportation Research at the German Aerospace Centre (DLR) and + the Centre for Applied Informatics, Cologne (ZAIK). This quite ambitious + project has recently entered his version 0.8 and we will describe + some of the new features herein. Some of them are a new visualisation + module, an extension of the junction concept, simulation of actuated + traffic lights and many more. We hope this information to be interesting + for the traffic science community as the software may be downloaded + and extended for free.}, + journal = {Proceedings of the 10th World Conference on Transport Research (on + CD)}, + keywords = {SUMO}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/19475/} +} + +@INPROCEEDINGS{Krajzewicz2002a, + author = {Daniel Krajzewicz and Georg Hertkorn and C. R\"ossel and Peter Wagner}, + title = {SUMO (Simulation of Urban MObility) - an open-source traffic simulation}, + booktitle = {4th Middle East Symposium on Simulation and Modelling}, + year = {2002}, + editor = {A. Al-Akaidi}, + pages = {183--187}, + note = { LIDO-Berichtsjahr=2004,}, + abstract = {As no exact model of traffic flow exists due to its high complexity + and chaotic organisation, researchers mainly try to predict traffic + using simulations. Within this field, many simulation packages exist + and differ in their software architecture paradigm as well as in + the models that describe traffic itself. We will introduce yet another + system which, in contrast to most of the other simulation software + packages, is available as on open-source programm and may therfore + be extended in order to fit a researcher?s own needs and also be + used as a reference testbed for new traffic models.}, + journal = {Proceedings of the 4th Middle East Symposium on Simulation and Modelling + (MESM20002)}, + keywords = {traffic simulation, microscopic, continous, multimodal, open source, + car-driver model, traffic research, road traffic}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6661/} +} + +@INPROCEEDINGS{Krajzewicz2002b, + author = {Daniel Krajzewicz and Georg Hertkorn and C. R\"ossel and Peter Wagner}, + title = {An Example of Microscopic Car Models Validation using the open source + Traffic Simulation SUMO}, + booktitle = {14th European Simulation Symposium}, + year = {2002}, + volume = {Jahrgang 2002}, + series = {SCS European Publishing House}, + pages = {318--322}, + note = { LIDO-Berichtsjahr=2004,}, + abstract = {In SUMO (Simulation of Urban MObility; An open-source traffic simulation) + we presented an open source simulation software for road traffic + simulation. Now we show one possible field of application, the validation + of microscopic car/car-driver models. Our motivation is to awake + the interest in using and extending the software, so this report + will describe the software?s usability but will not go into depth + in interpreting the results.}, + journal = {Proceedings of Simulation in Industry, 14th European Simulation Symposium}, + keywords = {traffic simulation, road traffic, car following, model validation, + microscopic, continuous, multimodal, open source, car-driver-model, + traffic research, validation, calibration}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6657/} +} + +@INPROCEEDINGS{Krajzewicz2005, + author = {Daniel Krajzewicz and Georg Hertkorn and Julia Ringel and Peter Wagner}, + title = {Preparation of Digital Maps for Traffic Simulation; Part 1: Approach + and Algorithms}, + booktitle = {3rd Industrial Simulation Conference 2005}, + year = {2005}, + editor = {J. Kr\"uger and A. Lisounkin and G. Schreck}, + pages = {285--290}, + month = {Juni}, + publisher = {EUROSIS-ETI}, + abstract = {Traffic simulations are an accepted tool for investigations on road + traffic and used widely within the traffic science community. Modern + computer systems are fast enough to model and simulate traffic within + large areas at a microscopic scale regarding each vehicle, replacing + macroscopic simulations in most cases. Although microscopic traffic + simulations offer better quality than macroscopic ones, they also + need additional data to describe the modelled road networks. A street?s + lanes are modelled explicitly within microscopic simulations and + in most cases also the connections between their lanes over junctions. + If one wants to model large areas, the best source to get the description + about their road network is the usage of digital maps. Unfortunately, + most of these are used for routing purposes and do not contain the + fine-grained information mentioned above that is needed by microscopic + simulations. This document describes an algorithm for the computation + of the needed information from simple road networks.}, + journal = {Proceedings of the 3rd Industrial Simulation Conference 2005}, + keywords = {Microscopic traffic simulation, digital road maps, open source, traffic + research}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/21013/} +} + +@INPROCEEDINGS{Krajzewicz2004a, + author = {Daniel Krajzewicz and Reinhart K\"uhne and Peter Wagner}, + title = {A Car Driver's Cognition Model}, + booktitle = {ITS Safety and Security Conference}, + year = {2004}, + volume = {CD}, + abstract = {There is a basic need in transportation planning and traffic engineering + for developing and testing traffic models of different granularity. + Although our major intrest is the replication of traffic within larger + areas, both the current research on traffic safety and the desire + to improve the quality of microscopic simulations makes it necessary + to deal with the car driver?s cognition on a finer scale. This paper + presents our model assumptions for such sub-microscopic simulations, + which are based on results from cognitive psychology. Although some + preliminary work of this type is available, most of these applications + are not open to the public, which makes them useless for scientific + purposes. the cognition simulations availabele up to now mostly deal + withmemory processes and are not easily extendable by further structures + such as vehickles with their dynamics or a representation of the + simulated environment. These considerations motivated us to develop + the above mentioned model from scratch. The design of the model described + herein includes sub-models of a human being?s perception, visual + attention, internal environment representation and decision making + as well as the execution of actions in a simulated vehicle. Results + both from cognitive psychology and the research on human-machine + interaction are incorporated. This paper reveals our premises for + a driver?s cognition model and describes the model itself, followed + by a discussion of the model?s restrictions. As the implementation + process is not yet closed, only some basic results are presented + and a look into the furture of the model is given.}, + file = {:http\://elib.dlr.de/6671/2/ITS_dkrajzew_ss25-29.pdf:URL}, + journal = {Proceedings of Intelligent Transportation Systems Safety and Security + Conference}, + keywords = {driver modeling, cognition, sub-microscopic traffic flow modelling, + model, lane-changing, Verkehrsmodellierung, Simulation, Anwendungen, + Modelle, Programme, Verkehrssicherheit, Verkehrstr?ger Stra?e}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6671/} +} + +@INPROCEEDINGS{Krajzewicz2009, + author = {Daniel Krajzewicz and Ronald Nippold}, + title = {iTETRIS: An integrated tool set for evaluation of large-scale traffic + management application based on vehicular communication}, + booktitle = {2nd NEARCTIS workshop 2009}, + year = {2009}, + keywords = {traffic simulation, network (communication) simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62588/} +} + +@TECHREPORT{Krajzewicz2009b, + author = {Krajzewicz, Daniel and Nippold, Ronald and Lazaro, Oscar}, + title = {Traffic Modelling: Environmental Factors}, + institution = {iTETRIS consortium}, + year = {2009}, + type = {Deliverable to the European Commission}, + month = {February}, + owner = {dkrajzew}, + timestamp = {2014.01.08} +} + +@INPROCEEDINGS{Krajzewicz2002, + author = {Daniel Krajzewicz and Peter Wagner}, + title = {ACME (A Common Mental Environment)-Driver - A Cognitive Car Driver + Model}, + booktitle = {16th Simulation Mulitconference "Modelling and Simulation 2002"}, + year = {2002}, + editor = {Krzysztof Amborski and Hermann Meuth}, + pages = {689--693}, + note = { LIDO-Berichtsjahr=2004,}, + abstract = {When working on large-scale traffic observation projects very often + simulations and therefore, models of the behavior of the molecular + simulation elements (the car-driver-units) are needed. Most of the + models for traffic simulations are based on approximations of statistical + real-world data. While fast in computation, they sometimes fail to + show real-world phenomena. Our project uses a different approach. + We try to model a human driver?s behaviour by modelling her or his + cognitive information processing in a simulated environment. While + several papers about experiments concerning single phenomena exist, + this approach is meant to describe the wohle information processing + of a driver on a high abstraction level. This paper will show some + topics of interest for a human cognition model. Possible applications + are listed, too.}, + journal = {Proceedings of the 16th Simulation Multiconference "Modelling and + Simulation 2002"}, + keywords = {cognitive modelling, artificial interlligence, psychology, simulation, + traffic simulation, short term memory, reception}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6658/} +} + +@INPROCEEDINGS{Krajzewicz2003, + author = {Daniel Krajzewicz and Peter Wagner}, + title = {Gestalten, Archetypen, Symbole und Signale: Herausforderungen an + und Vorteile f\"ur die Modellierung}, + booktitle = {Modellierung und Simulation menschlichen Verhaltens}, + year = {2003}, + editor = {H.-D. Burkhard and T. Uthmann and G. Lindemann}, + number = {163}, + series = {Informatik-Bericht}, + pages = {54--67}, + publisher = {TU-Berlin}, + note = {LIDO-Berichtsjahr=2004, monograph\verb1_1id=Nr. 163}, + abstract = {Die im Titel genannten, komplexen und abstrakten Gebilde der Psychologie + wurden bislang selten modelliert und formal beschrieben. Unter Betrachtung + des Themengebietes eines unserer Projekte - der Modellierung eines + kognitiven Modells des Autofahrers - m?chten wir hier eine kurze + ?bersicht ?ber unsere Idee zu diesen Themen geben, Probleme aufdecken + und einige Potentiale f?r die Modellierung der Kognition aufzeigen, + die einen einfachen Umgang mit diesen Strukturen erm?glichen und + sich tlw. positiv auf die Ausf?hrungsgeschwindigkeiten von Simulationen + auswirken. Zus?tzlich zeigen wir Modelle, die in unsere Arbeit aufgrund + ihrer hohen Ressourcenbeanspruchung, bedingt durch eine konnektionistischen + Herangehensweise, nicht direkt einflie?en k?nnen.}, + journal = {Modellierung und Simulation menschlichen Verhaltens}, + keywords = {Fahrermodellierung, Kognition, Wahrnehmung, Simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6659/} +} + +@ARTICLE{Krajzewicz2004, + author = {Daniel Krajzewicz and Peter Wagner}, + title = {Ans\"atze zur kognitiven Simulation eines Autofahrers}, + journal = {MMI-Interaktiv}, + year = {2004}, + pages = {84--97}, + number = {7}, + abstract = {Das Institut f?r Verkehrsforschung am Deutschen Zentrum f?r Luft- + und Raumfahrt (IVF/DLR) setzt in vielen Projekten Simulationen des + Stra?enverkehrs ein, z. B. um Schwachstellen in Verkehrsnetzen zu + finden oder um Ger?te zur Verkehrskontrolle oder -beeinflussung w?hrend + ihrer Entwicklung zu bewerten. In der Regel kommen dabei sogenannte + mikroskopische Simulationen zum Einsatz, deren betrachtete Gr??e + ein Fahrer-Fahrzeug-Objekt ist, das die Bewegung eines Fahrzeugs + im Verkehrsnetz durch wenige Gleichungen beschreibt. Solche Modell + erlauben die Simulation des Stra?enverkehrs gro?er St?dte in Echtzeit, + allerdings bilden sie den Przess des Fahrzeugf?hrens nur vereinfacht + ab. Innerhalb eines der Projekte des IVF soll das Verhalten eines + einzelnen Autofahrers genauer untersucht und modelliert werden. W?hrend + solche Modelle auch f?r andere Gebiete der Verkehrsforschung interessant + sind, z. B. der Forschung zu Fahrsicherheit oder zu Fahrerassistenzsystemen, + erhoffen wir uns, so R?ckschl?sse auf den Verkehrsfluss ziehen und + somit die Qualit?t mikroskopischer Modell erh?hen zu k?nnen. Im Rahmen + dieses Berichts sollen nach einer kurzen Einf?hrung in die Thematik + "Verkehrssimulation" unsere ersten Ans?tze zum Aufbau einer + in ein simuliertes Verkehrsgeschehen integrierten Simulation der + Fahrerkognition gegeben werden.}, + editor = {S. Leuchter and M. C. Kindsm\"uller and D. Schulze-Kissing and L. + Urbas}, + file = {:http\://elib.dlr.de/6721/2/zmms_krajzewicz_wagner.pdf:URL}, + keywords = {Fahrermodellierung, Verkehrssimulationen, Verkehrsmodelle, Kognition}, + owner = {Daniel}, + publisher = {Technische Universit\"at Berlin}, + series = {Modellierung und Simulation in Mensch-Maschine-Systemen}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/6721/} +} + +@INPROCEEDINGS{Krajzewicz2011a, + author = {Daniel Krajzewicz and Peter Wagner}, + title = {Large-scale Vehicle Routing Scenarios based on Pollutant Emission}, + booktitle = {AMAA 2011}, + year = {2011}, + editor = {Gereon Meyer and J\"urgen Valldorf}, + pages = {237--246}, + month = {Juni}, + publisher = {Springer}, + abstract = {This paper describes simulation-based investigations on route choice + based on pollutant emission. A microscopic simulation enhanced by + a pollutant emission model was used to evaluate whether a vehicle?s + pollutant emission can be used as an edge weight during route computation + and which effects can be observed in such cases. For each of the + pollutants CO, CO2, NOx, PMx, and HC and for the fuel consumption, + a dynamic user assignment has been performed. The investigations + have been performed twice, using two scenarios of different size. + Large discrepancies for route computation using pollutants have been + observed when comparing inner-city and suburban traffic networks.}, + journal = {Advanced Microsystems for Automotive Applications 2011}, + keywords = {pollutant emission, traffic management, route choice, assignment}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/70322/} +} + +@PHDTHESIS{Krauss1998, + author = {Stefan Krauß}, + title = {Microscopic Modeling of Traffic Flow: Investigation of Collision + Free Vehicle Dynamics}, + school = {Universit\"{a}t zu K\"{o}ln}, + year = {1998}, + file = {:https\://sumo.dlr.de/pdf/KraussDiss.pdf:URL}, + institution = {Mathematisches Institut, Universit\"at zu K\"oln}, + keywords = {highway traffic, interacting random processes, statistical mechanics + type modells, statistical processes; 60K30, 60K35, 90B20, Models, + ZAIK}, + number = {319}, + owner = {dkrajzew}, + pages = {116}, + timestamp = {2011.09.19} +} + +@ARTICLE{Krauss1997, + author = {Krauss, S. and Wagner, P. and Gawron, C.}, + title = {Metastable states in a microscopic model of traffic flow }, + journal = {Phys. Rev. E}, + year = {1997}, + volume = {55}, + pages = {5597--5602}, + month = {May}, + doi = {10.1103/PhysRevE.55.5597}, + file = {:https\://sumo.dlr.de/pdf/sk.pdf:URL}, + issue = {5}, + keywords = {Models, ZAIK}, + owner = {dkrajzew}, + publisher = {American Physical Society}, + timestamp = {2011.09.19}, + url = {http://link.aps.org/doi/10.1103/PhysRevE.55.5597} +} + +@INPROCEEDINGS{Lazaro2008, + author = {Oscar Lazaro and Eric Robert and Lin Lan and Javier Gozalvez and + Siebe Turksma and Fethi Filali and Fabio Cartolano and M. A. Urrutia + and Daniel Krajzewicz}, + title = {iTETRIS: An Integrated Wireless and Traffic Platform for Real-Time + Road Traffic Management Solutions}, + booktitle = {21st WWRF 2008}, + year = {2008}, + month = {Oktober}, + abstract = {Wireless vehicular cooperative systems have been identified as an + attractive solution to improve road traffic management, thereby contributing + to the European goal of safer, cleaner, and more efficient and sustainable + traffic solutions. V2V-V2I communication technologies can improve + traffic management through real-time exchange of data among vehicles + and with road infrastructure. It is also of great importance to investigate + the adequate combination of V2V and V2I technologies to ensure the + continuous and costefficient operation of traffic management solutions + based on wireless vehicular cooperative solutions. However, to adequately + design and optimize these communication protocols and analyze the + potential of wireless vehicular cooperative systems to improve road + traffic management, adequate testbeds and field operational tests + need to be conducted. + + + Despite the potential of Field Operational Tests to get the first + insights into the benefits and problems faced in the development + of wireless vehicular cooperative systems, there is yet the need + to evaluate in the long term and large dimension the true potential + benefits of wireless vehicular cooperative systems to improve traffic + efficiency. To this aim, iTETRIS is devoted to the development of + advanced tools coupling traffic and wireless communication simulators.}, + keywords = {V2x communications, Simulation Platforms, Wireless Communications}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62607/} +} + +@MASTERSTHESIS{Lehr2005, + author = {Sebastian Lehr}, + title = {Optimierung der Kommunikation zwischen am Verkehr beteiligten Strukturen}, + school = {Fachhochschule für Technik und Wirtschaft Berlin}, + year = {2005}, + month = {January}, + file = {:https\://sumo.dlr.de/pdf/DiplomarbeitSebastianLehr.pdf:URL}, + keywords = {Fachhochschule für Technik und Wirtschaft Berlin, DLR/TS/VM, sumo}, + owner = {dkrajzew}, + timestamp = {2011.09.19}, + url = {https://sumo.dlr.de/pdf/DiplomarbeitSebastianLehr.pdf} +} + +@INPROCEEDINGS{Maneros2009, + author = {Julen Maneros and Michele Rondinone and Ainara Gonzalez and Ramon + Bauza and Daniel Krajzewicz}, + title = {iTETRIS Platform Architecture for the Integration of Cooperative + Traffic and Wireless Simulations}, + booktitle = {ITS-T 2009}, + year = {2009}, + abstract = {The use of cooperative wireless communications can support driving + through dynamic exchange of Vehicle-to-Vehicle (V2V) and Vehicle-to-Infrastructure + (V2I) messages. Traffic applications based on such systems will be + able to generate a safer, faster, cheaper and cleaner way for people + and goods to move. In this context, the iTERIS project aims at providing + the framework to combine traffic mobility and wireless communication + simulations for large scale testing of traffic management solutions + based on cooperative systems. This paper addresses the description + and explanation of the implementation choices taken to build a modular + and interoperable architecture integrating heterogeneous traffic + and wireless simulators, and application algorithms supporting traffic + management strategies. The functions of an ?in-between? control system + for managing correct simulation executions over the platform are + presented. The inter-block interaction procedures identified to ensure + optimum data transfer for simulation efficiency are also introduced.}, + journal = {Proceedings of the 9th IEEE International Conference on ITS Telecommunications}, + keywords = {simulation platform, architecture, vehicular communications, traffic, + modularity}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62604/} +} + +@MASTERSTHESIS{Morenz2007, + author = {Tino Morenz}, + title = {iTranSIM - Simulation-based Vehicle Location}, + school = {University of Dublin}, + year = {2007}, + keywords = {University of Dublin, sumo}, + owner = {dkrajzew}, + timestamp = {2011.09.19} +} + +@ARTICLE{Niebel2008, + author = {Wolfgang Niebel and Michael Bonert and Elmar Brockfeld and Daniel + Krajzewicz and Peter Wagner}, + title = {TRAFFIC SURVEILLANCE AND FORECAST FOR LARGE-SCALE EVENTS, Monitoring + and Simulating the World Youth Day 2005 and the Soccer World Cup + 2006}, + journal = {PROM: list studenata Fakulteta prometnih znanosti}, + year = {2008}, + pages = {64--66}, + number = {21}, + month = {Dezember}, + editor = { Fakultet prometnih znanosti Zagreb}, + keywords = {ANTAR, Traffic Finder, SUMO, SOCCER, Weltjugendtag, Gro?ereignis, + Verkehrsmanagement, K?ln, Stuttgart, Berlin}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/55012/} +} + +@INPROCEEDINGS{dlr54498, + author = {Wolfgang Niebel and Gunnar Fl{\"o}tter{\"o}d}, + title = {SOCCER - TRAFFIC SURVEILLANCE AND FORECAST FOR LARGE-SCALE EVENTS, + Monitoring and Simulating the World Youth Day 2005 and the Soccer + World Cup 2006}, + booktitle = {6th Conference of European Students of Traffic and Transportation + Sciences}, + year = {2008}, + editor = { University of {\vZ}ilina, Faculty of Operation and Economics of + Tran}, + month = {Juni}, + note = {Datentr{\"a}ger CD-ROM}, + abstract = {It could be demonstrated, that this novel surveillance system integrating + airborne traffic surveillance with traditional ground detection of + traffic flow can yield valuable information needed for a better management + of big events. The combination with a simulation-based ap-proach + to integrate a traditional travel demand forecast and the on-line + data generated during the event itself leads not only to an almost + complete coverage of the traffic system, it also delivers a short-term + forecast for the action forces to react fast to developing aberrations. + Still the methods need to be improved, e.g., data fusion between + simulation and reality.}, + journal = {6th Conference of European Students of Traffic and Transportation + Sciences}, + keywords = {ANTAR, Traffic Finder, SUMO, SOCCER, Weltjugendtag, Gro{\ss}ereignis, + Verkehrsmanagement, K{\"o}ln, Stuttgart, Berlin}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/54498/} +} + +@MASTERSTHESIS{Pereira2011, + author = {José Luis Ferrás Pereira}, + title = {An Integrated Architecture for Autonomous Vehicles Simulation}, + school = {Faculdade de Engenharia da Universidade do Porto}, + year = {2011}, + month = {June}, + abstract = {Research on autonomous vehicles has come a long way since first findings, + and its software tools + + are increasingly acclaimed by the research community. Particularly + with robotics simulators, autonomous + + vehicles were provided with a suitable test-bed for experimentation + of new methodologies + + such as long-term navigation algorithms, map building and intelligent + reasoning. However, + + when it concerns the deployment and validation of such vehicles in + a larger urban traffic scenario, + + robotics simulators do not seem to provide the required functionality + for road traffic analysis, or + + inter-vehicular communication infrastructure as they seem present + in today’s traffic simulators. + + The improvement of such features is the key for the successful practical + deployment of such a + + critical system. + + + The main objective of this dissertation is the integration of two + types of simulators, namely a + + robotics and a traffic simulator. This integration will enable autonomous + vehicles to be deployed + + in a rather realistic traffic flow as an agent entity (on the traffic + simulator), at the same time it + + simulates all its sensors and actuators (on the robotics counterpart). + Also, the statistical tools + + available in the traffic simulator will allow practitioners to infer + what kind of advantages such a + + novel technology will bring to our everyday’s lives. Furthermore, + the current features and issues on + + current robotics and traffic simulators are presented and a taxonomy + for selecting these simulators + + is proposed. An architecture for the integration of the aforementioned + simulators is proposed and + + implemented in the light of the most desired features of such software + environments. + + + To assess the usefulness of the platform architecture towards the + expected realistic simulation + + facility, a comprehensive system evaluation is also performed and + critically reviewed, leveraging + + the feasibility of the integration. Further developments and future + perspectives are pinpointed up + + in the end.}, + file = {:https\://sumo.dlr.de/pdf/mieec1.pdf:URL}, + keywords = {autonomous driving, SUMO, driver modelling, Universidade de Porto, + Models}, + owner = {dkrajzew}, + timestamp = {2011.09.30} +} + +@ARTICLE{Piorkowski2008, + author = {Piorkowski, Michal and Raya, Maxim and Lugo, Ada and Papadimitratos, + Panos and Grossglauser, Matthias and Hubaux, Jean-Pierre}, + title = {Tra{NS}: {R}ealistic {J}oint {T}raffic and {N}etwork {S}imulator + for {VANET}s}, + journal = {{ACM} {SIGMOBILE} {M}obile {C}omputing and {C}ommunications {R}eview}, + year = {2008}, + volume = {12}, + pages = {31--33}, + number = {1}, + abstract = {Realistic simulation is a necessary tool for the proper evaluation + of newly developed protocols for Vehicular Ad Hoc Networks (VANETs). + Several recent efforts focus on achieving this goal. Yet, to this + date, none of the proposed solutions fulfill all the requirements + of the VANET environment. This is so mainly because road traffic + and communication network simulators evolve in disjoint research + communities. We are developing TraNS, an open-source simulation environment, + as a step towards bridging this gap. This short paper describes the + TraNS architecture and our ongoing development efforts.}, + affiliation = {EPFL}, + details = {http://infoscience.epfl.ch/record/113879}, + documenturl = {http://infoscience.epfl.ch/record/113879/files/trans_mc2r_2007.pdf}, + doi = {10.1145/1374512.1374522}, + keywords = {VANET; Inter Vehicular Communication; Vehicular; applications; realistic + mobility models; simulation; performance evaluation; NCCR-MICS; NCCR-MICS/CL3, + V2X, EPFL Lausanne, sumo}, + oai-id = {oai:infoscience.epfl.ch:113879}, + oai-set = {fulltext-public}, + owner = {dkrajzew}, + review = {REVIEWED}, + status = {PUBLISHED}, + timestamp = {2011.09.19}, + unit = {LCA} +} + +@INPROCEEDINGS{Rondinone2009, + author = {Michele Rondinone and Oscar Lazaro and Carlo Michelacci and Daniel + Krajzewicz and Robbin Blokpoel and Julen Maneros and Lan Lin and + Fatma Hrizi and J\'er\'emie Leguay and Matthias R\"ockl}, + title = {Investigating the Efficiency of ITS Cooperative Systems for a Better + Use of Urban Transport Infrastructures: The iTETRIS Simulation Platform}, + booktitle = {POLIS 2009}, + year = {2009}, + month = {Dezember}, + abstract = {The use of cooperative ITS communication systems, supporting driving + through the dynamic exchange of Vehicle-to- Vehicle (V2V) and Vehicle-to-Infrastructure + (V2I) messages, is a potential candidate to improve the economical + and societal welfare. The application of such systems for novel cooperative + traffic management strategies can introduce a lot of beneficial effects + not only for road safety, but also for the economy related to transportation + systems and the environmental impact. Despite this apparent set of + promising features, City Road Authorities, which hold a key-role + in determining the final adoption of such systems, still look at + cooperative systems without sharing a clear opinion. This is mainly + due to the current lack of definitive and solid evidences of the + effectiveness of such systems when applied in the real world. In + order to fill this gap and let Road Authorities estimate the usefulness + of such technologies in achieving the objectives dictated by cities? + traffic management policies, the EU consortium iTETRIS is developing + a simulation platform for large scale testing of traffic management + solutions making use of cooperative ITS systems. Thanks to its own + distinguishing features, iTETRIS aims at becoming a good supporting + tool for Road Authorities to implement preliminary tests on the effectiveness + of ITS solutions prior to investing money for the physical deployment + of the communication infrastructures allowing their functioning.}, + journal = {Proceedings of the Polis Conference 2009 - European Cities and Regions + Networking for Innovative Transport Solutions}, + keywords = {vehicular communication, simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/62610/} +} + +@INPROCEEDINGS{Rosenbaum2011, + author = {Dominik Rosenbaum and Michael Behrisch and Jens Leitloff and Franz + Kurz and Oliver Meynberg and Tanja Reize and Peter Reinartz}, + title = {An airborne camera system for rapid mapping in case of disaster and + mass events}, + booktitle = {EOGC 2011}, + year = {2011}, + month = {April}, + abstract = {Here we present an airborne optical camera system with an extended + image processing unit onboard the aircraft and a radio data downlink. + With all these components the system is well suited for rapid mapping + applications in case of mass events and disaster. The image processing + unit provides the possibility of direct orthorectification/georeferencing + of the aerial images by the use of an IMU/GPS real-time navigation + system without the use of ground control points. Furthermore thematic + processing algorithms implemented to the image processing unit can + analyse orthoimages e.g. for road traffic data content, people density + and movement during mass events or DSM generation and 3D analysis + directly onboard the aircraft. Resulting data and images can be transmitted + to the ground via radio data downlink immediately. Road traffic data + is used at the ground station in a traffic simulation for filling + coverage gaps and traffic forecast. All in all, the system forms + a powerful tool to operation controllers of security authorities + and organizations in case of mass events or disasters.}, + journal = {Proceedings of the Earth Observation for Global Change 2011 - EOGC + 2011 (Munich, Germany, 2011-04-13 to 2011-04-15)}, + keywords = {Rapid Mapping, Monitoring, Recognition, Orthorectification, Georeferencing, + Image, Pattern, Sequences}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/70510/} +} + +@INPROCEEDINGS{Sanchez2006, + author = {Miguel Sanchez and Juan-Carlos Cano and Dongkyun Kim}, + title = {Predicting Traffic lights to Improve Urban Traffic Fuel Consumption}, + booktitle = {ITS Telecommunications Proceedings, 2006 6th International Conference + on}, + year = {2006}, + pages = {331 -336}, + month = {june }, + __markedentry = {[dkrajzew:6]}, + abstract = {Modern traffic control systems include smart feedback into the traffic + light control system. New ways of improving our transit systems fuel + efficiency are now more than welcome due to global warming and oil + high price. This paper presents a new approach on how drivers and + traffic lights can interact to save fuel. Our preliminary results + show that 25% savings are within range in urban circuits}, + doi = {10.1109/ITST.2006.288906}, + keywords = {global warming;light control system;traffic control system;urban traffic + fuel consumption;road traffic;traffic control;}, + owner = {dkrajzew}, + timestamp = {2012.01.26} +} + +@INPROCEEDINGS{Schlingelhof2006, + author = {Marius Schlingelhof and Reinhart K\"uhne and Daniel Krajzewicz}, + title = {NEW GNSS-BASED APPROACHES FOR ADVANCED DRIVER ASSISTANCE SYSTEMS}, + booktitle = {TRB 2006 (85th Annual Meeting)}, + year = {2006}, + month = {Januar}, + abstract = {The enhancement of road safety and traffic efficiency are the focus + of many endeavours in science, economy and politics. A traditional + approach is to increase vehicle safety by advanced and intelligent + onboard systems using high developed sensors for the monitoring of + the vehicle?s surrounding. However, these technologies are vehicle-autonomous + solutions that only consider information coming from onboard sensors. + These sensors are normally based on optical, ultra-sonic, radar or + video camera systems and can only detect other vehicles or other + objects along a line-of-sight up to the next obstacle. The view beyond + a truck cruising just in front of the vehicle, for example, is not + possible. + + + New approaches are now dealing with co-operative technologies that + enable the exchange of important information between vehicles and + infrastructures for updated traffic data acquisition, recognition + of traffic congestion due to accidents or other sudden incidents, + local dynamic map data updates and driver warning. One key technology + within such co-operative systems is the highly precise relative positioning + between vehicles and the monitoring of the broader vehicle environment + using ad-hoc data networks. These technologies can be primarily based + on satellite systems like GPS or GALILEO supplemented by other onboard + sensor data, whereby unprocessed sensor data and satellite pseudo + range information will be exchanged between the vehicles within a + dedicated radio range. These data, when compared with the onboard + data, will finally enable the creation of virtual images of a vehicle?s + surrounding using special microscopic traffic modelling algorithms. + Future applications are road safety and Advanced Driver Assistance + Systems (ADAS).}, + keywords = {GPS, Galileo, GNSS, ADAS, Road Safety, Relative Positioning, Surrounding + Monitoring}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/21758/} +} + +@ARTICLE{Smilowitz1999, + author = {Karen R. Smilowitz and Karen R. Smilowitz and Carlos F. Daganzo and + Carlos F. Daganzo and Michael J. Cassidy and Michael J. Cassidy and + Robert L. Bertini and Robert L. Bertini}, + title = {Some Observations of Highway Traffic in Long Queues}, + journal = {Transportation Research Records}, + year = {1999}, + volume = {1678}, + pages = {225-233}, + keywords = {real-world data, model calibration}, + owner = {dkrajzew}, + timestamp = {2011.09.30} +} + +@INPROCEEDINGS{Sommer:2008:NBC:1374688.1374697, + author = {Christoph Sommer and Zheng Yao and Reinhard German and Falko Dressler}, + title = {On the need for bidirectional coupling of road traffic microsimulation + and network simulation}, + booktitle = {Proceedings of the 1st ACM SIGMOBILE workshop on Mobility models}, + year = {2008}, + series = {MobilityModels '08}, + pages = {41--48}, + address = {New York, NY, USA}, + publisher = {ACM}, + acmid = {1374697}, + doi = {10.1145/1374688.1374697}, + isbn = {978-1-60558-111-8}, + keywords = {network simulation, road traffic microsimulation, vehicular ad hoc + networks}, + location = {Hong Kong, Hong Kong, China}, + numpages = {8}, + url = {http://doi.acm.org/10.1145/1374688.1374697} +} + +@INPROCEEDINGS{Tielert2010, + author = {Tielert, T. and Killat, M. and Hartenstein, H. and Luz, R. and Hausberger, + S. and Benz, T.}, + title = {The impact of traffic-light-to-vehicle communication on fuel consumption + and emissions}, + booktitle = {Internet of Things (IOT), 2010}, + year = {2010}, + pages = {1 -8}, + month = {29 2010-dec. 1}, + __markedentry = {[dkrajzew:6]}, + abstract = {#x201C;Smart #x201D; vehicles of the future are envisioned to aid + their drivers in reducing fuel consumption and emissions by wirelessly + receiving phase-shifting information of the traffic lights in their + vicinity and computing an optimized speed in order to avoid braking + and acceleration maneuvers. Previous studies have demonstrated the + potential environmental benefit in small-scale simulation scenarios. + To assess the overall benefit, large-scale simulations are required. + In order to ensure computational feasibility, the applied simulation + models need to be simplified as far as possible without sacrificing + credibility. Therefore this work presents the results of a sensitivity + analysis and identifies gear choice and the distance from the traffic + light at which vehicles are informed as key influencing factors. + Our results indicate that a suboptimal gear choice can void the benefits + of the speed adaptation. Furthermore, we present first results of + a scale-up simulation using a real-world inner-city road network + and discuss the range in which we expect the saving in fuel consumption + to be in reality.}, + doi = {10.1109/IOT.2010.5678454}, + file = {:http\://www.caad.arch.ethz.ch/noolab/files/external/conferences/IoT2010_proceedings/pdf/Conference/GreenIoT/C3.pdf:URL}, + keywords = {fuel consumption;phase shifting information;smart vehicles;traffic + lights;traffic-light-to-vehicle communication;mobile communication;phase + shifters;}, + owner = {dkrajzew}, + timestamp = {2012.01.26} +} + +@ARTICLE{Treiber2000, + author = {Martin Treiber and Ansgar Hennecke and Dirk Helbing}, + title = {Congested Traffic States in Empirical Observations and Microscopic + Simulations}, + journal = {PHYSICAL REVIEW E}, + year = {2000}, + volume = {62}, + pages = {1805}, + __markedentry = {[dkrajzew:6]}, + file = {:http\://arxiv.org/pdf/cond-mat/0002177v2.pdf:URL}, + owner = {dkrajzew}, + timestamp = {2012.01.26}, + url = {doi:10.1103/PhysRevE.62.1805} +} + +@INPROCEEDINGS{SandeshFiore2011, + author = {Sandesh Uppoor and Marco Fiore}, + title = {Large-scale Urban Vehicular Mobility for Networking Research}, + booktitle = {IEEE Vehicular Networking Conference (VNC)}, + year = {2011}, + address = {Amsterdam, The Netherlands}, + month = {11}, + abstract = {Simulation is the tool of choice for the largescale + + performance evaluation of upcoming telecommunication + + networking paradigms that involve users aboard vehicles, such + + as next-generation cellular networks for vehicular access, pure + + vehicular ad hoc networks, and opportunistic disruption-tolerant + + networks. The single most distinguishing feature of vehicular + + networks simulation lies in the mobility of users, which is the + + result of the interaction of complex macroscopic and microscopic + + dynamics. Notwithstanding the improvements that vehicular mobility + + modeling has undergone during the past few years, no car + + traffic trace is available today that captures both macroscopic and + + microscopic behaviors of drivers over a large urban region, and + + does so with the level of detail required for networking research. + + In this paper, we present a realistic synthetic dataset of the car + + traffic over a typical 24 hours in a 400-km2 region around the city + + of K¨oln, in Germany. We outline how our mobility description + + improves today’s existing traces and show the potential impact + + that a comprehensive representation of vehicular mobility can + + have one the evaluation of networking technologies.}, + file = {:http\://kolntrace.project.citi-lab.fr/data/uppoor_vnc11.pdf:URL}, + owner = {dkrajzew}, + timestamp = {2011.12.01} +} + +@INPROCEEDINGS{Varschen2006, + author = {Christian Varschen and Peter Wagner}, + title = {Mikroskopische Modellierung der Personenverkehrsnachfrage auf Basis + von Zeitverwendungstageb\"uchern}, + booktitle = {AMUS 2006 (7. Aachener Kolloqium "Mobilit\"at und Stadt")}, + year = {2006}, + editor = {Klaus J. Beckmann}, + volume = {81}, + series = {Stadt Region Land}, + pages = {63--69}, + publisher = {Institut f\"ur Stadtbauwesen und Stadtverkehr, RWTH Aachen}, + abstract = {Die wachsende Verkehrsleistung und die hieraus resultierenden Verkehrsprobleme + f?hren verst?rkt zu der Frage, mit welchen Konzepten der zuk?nftige + Verkehrsbedarf erf?llt werden kann. Wichtige Werkzeuge im Rahmen + von Verkehrsplanung und Verkehrsmanagement sind Verkehrsmodelle, + mit denen Prognosen des zu erwartenden Verkehrsaufkommens erstellt + werden k?nnen und die damit Ansatzpunkte f?r seine verbesserte Lenkung + liefern. Im Rahmen mehrerer Projekte wird das am DLR-IVF entwickelte + agentenbasierte Personennachfragemodell TAPAS (Travel and Activity + PAtterns Simulation) genutzt. In diesem Modell wird ein aktivit?ten-basierter + Ansatz verwendet, welcher auf der Analyse von Zeitverwendungsdaten + beruht. Daher sind die zur Verf?gung stehenden Aktivit?tenmuster + auf die in den Zeitverwendungsdaten enthaltenen beschr?nkt, was f?r + Prognosen eine starke Einschr?nkung darstellt. Die hier beschriebene + Erweiterung des Modells erm?glicht das Einf?gen neuer Aktivit?tenkategorien; + TAPAS beschreibt jede Aktivit?t durch vier Parameter, die sich alle + aus Erhebungen sch?tzen lassen: Anteil und Umfang der Nutzung der + (f?r TAPAS neuen) Aktivit?t sowie die zeitliche Variabilit?t der + Aktivit?t hinsichtlich Anfangszeitpunkt und Dauer. Die ersten beiden + Parameter werden direkt aus den empirischen Daten gewonnen, w?hrend + die letzten beiden sich aus der statistischen Variation der Erhebungen + ergeben. Die Weiterentwicklung des Modells pr?zisiert die Absch?tzung + der Personenverkehrsnachfrage unter besonderer Ber?cksichtigung spezifischer + wissenschaftlicher und politischer Fragestellungen. Die enge Verkn?pfung + mit empirischen Daten erh?ht zudem eine hohe Zuverl?ssigkeit von + Prognosen.}, + journal = {Integrierte Mikro-Simulation von Raum- und Verkehrsentwicklung. Theorie, + Konzepte, Modelle, Praxis}, + keywords = {Personenverkehrsnachfrage, Modellierung, aktivit?ten-basiert, Zeitbudget, + TAPAS}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/45058/} +} + +@MASTERSTHESIS{Verges2013, + author = {Vergés, Josep Tomàs}, + title = {Analysis and simulation of traffic management actions for traffic + emission reduction}, + school = {TU Berlin}, + year = {2013}, + type = {Master Thesis}, + month = {July}, + owner = {dkrajzew}, + timestamp = {2014.01.08} +} + +@INPROCEEDINGS{dlr72224, + author = {Peter Wagner and Gunnar Fl{\"o}tter{\"o}d and Ronald Nippold and + Yun-Pang Fl{\"o}tter{\"o}d}, + title = {Simplified car-following models}, + booktitle = {Transportation Research Board 91st Annaul Meeting}, + year = {2012}, + month = {Januar}, + abstract = {This work presents strong evidence that human car-following behaviour + can be described by a linear model with no more than three parameters + to an amazing degree of precision. From this result it can be inferred + that any microscopic traffic flow model can be composed of the car-following + behaviour plus a couple of rules that fixes boundaries of the behaviour + in terms of limitations to speed, acceleration, and safety. These + limitations, however, usually have a clear physical meaning and understanding + and are the only non-linearities needed to built a microscopic traffic + flow model.}, + keywords = {car-following, simple traffic flow models, ARIMA, calibration of traffic + flow models}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/72224/} +} + +@INPROCEEDINGS{dlr71872, + author = {Yun-Pang Wang and Gunnar Fl{\"o}tter{\"o}d}, + title = {Route choice calibration from multi-point vehicle stream measurements}, + booktitle = {MT-ITS 2011}, + year = {2011}, + month = {Juni}, + abstract = {To better und more precisely assess different transporta-tion design + alternatives and traffic management strategies, microscopic traffic + simulation models are extensively applied. The respective calibration + and validation works are getting more and more important. Nowadays, + GPS-based systems are broadly applied. More and more route related + information can be collected, which promises great improvements of + calibra-tion accuracy. An approach using multi-point vehicle stream + measurements is proposed in this paper and is shown to work well + in synthetic experiments.}, + keywords = {route choice, vehicle reidentification, traffic simulation SUMO, CADYTS}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/71872/} +} + +@MISC{dlr56995, + author = {Yun-Pang Wang and Bernhard Friedrich}, + title = {Optimierung der Matrixsch{\"a}tzung durch Elimination redundanter + Informationen}, + month = {M{\"a}rz}, + year = {2008}, + abstract = {Mit den zunehmenden M{\"o}glichkeiten der automatischen Verkehrsdatenerfassung + stellt sich die Frage, welchen Einfluss die Kenntnis von Abbiegestr{\"o}men + und daraus folgende redun-dante Informationen auf die Sch{\"a}tzung + von Herkunft-/ Zielbeziehungen haben und wie m{\"o}g-liche negative + Effekte auf die G{\"u}te der Sch{\"a}tzung bei bestehenden Erfassungsstellen + ver-mieden werden k{\"o}nnen. Deshalb wurde in dieser Arbeit vor + allem der Einfluss redundanter Informationen analysiert. Ein geeignetes + Eliminationsverfahren (MERI) wurde entwickelt. Es wurde nachgewiesen, + dass die negative Auswirkung redundanter Informationen im Informa-tions-Minimierungs-Modell + (IM-Modell) durch MERI beseitigt werden konnte und die Sch{\"a}tz-g{\"u}te + besser als die des Verbesserten IM-Modells (VIM-Modell) ist.}, + booktitle = {HEUREKA 2008}, + editor = { Forschungsgesellschaft f{\"u}r Stra{\ss}en- und Verkehrswesen}, + keywords = {Matrixsch{\"a}tzung, Matrixanpassung, redundante Information}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/56995/} +} + +@INPROCEEDINGS{dlr62716, + author = {Yun-Pang Wang and Bernhard Friedrich}, + title = {Improving matrix estimation pertaining to detailed traffic information + and sophisticated traffic state}, + booktitle = {Transportation Research Board 2009 Annual Meeting}, + year = {2009}, + month = {Januar}, + publisher = {Transportation Research Board}, + abstract = {Technical innovation and extensive application of adaptive signal + control at intersections have made turning flow information that + provide more precise constraints for Origin-Destination matrix (O-D + matrix) estimation easily available in great quantity and more accurate + than ever. However, the influence of turning flow and duplication + of information on the existing matrix estimation models and on the + accuracy of O-D matrix estimation has not been broadly investigated. + Also, traffic phenomenon in networks becomes complicated and difficult + to explain with the increase in number of vehicles, variety of daily + activities and sophisticated travel behaviors. As such, general congested + traffic state as well as diverse travelers? perception about travel + time should be taken into consideration in O-D matrix estimation + models. In this paper, the influence of applying finer and duplicated + flow information as well as route choice proportion estimates on + the performance of the Information minimization (IM) and the modified + IM models were examined. It has shown that duplicate information + has adverse effect on the accuracy of matrix estimation, whereas + additional turning flow information can improve estimation accuracy. + Based on the examination results a methodology using the IM model, + the stochastic user equilibrium (SUE) assignment and the information + screening process, was proposed to optimize the goodness of estimation + and enhance the IM model to deal with the traffic situation more + realistically. The respective convergence and required computation + time were also examined. Furthermore, an empirical route choice study + was conducted in order to help determining the size of a route set + used in the SUE assignment model.}, + journal = {Compendium of TRB 88th Annual Meeting}, + keywords = {matrix estimation, SUE, information minimization, entropy maximization}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/62716/} +} + +@INPROCEEDINGS{dlr77309, + author = {Yun-Pang Wang and Peter Wagner and Michael Behrisch}, + title = {Ann{\"a}herung an das dynamische Systemoptimum mit Hilfe von Einzelfahrzeuginformationen}, + booktitle = {HEUREKA 2011}, + year = {2011}, + month = {M{\"a}rz}, + abstract = {Der Verkehr in einem gegebenen Untersuchungsgebiet organisiert sich + selbst in eine Ann{\"a}herung an das sogenannte Nutzeroptimum. Im + Widerspruch dazu steht die Forderung von Verkehrsmanagern, ein Systemoptimum + zur besten Nutzung der vorhandenen verkehrlichen Ressourcen anzustreben. + In der Praxis ist es wegen der sich st{\"a}ndig ver{\"a}ndernden + Verkehrszust{\"a}nde schwierig, Kantenwiderstandsfunktionen zu bestimmen. + Heutzutage k{\"o}nnen viele Verkehrsinformationen mittlerweile direkt + von Meldefahrzeugen erfasst werden. Daraus k{\"o}nnen viele zeitabh{\"a}ngige + Informationen abgeleitet werden. In dieser Arbeit wird untersucht, + ob und wie man auf einfache Weise ein Systemoptimum mit Hilfe einer + mikroskopischen Simulation berechnen kann und welches Ausma{\ss} + an Informationen zur Ann{\"a}herung an ein Systemoptimum erforderlich + ist.}, + keywords = {dynamische Systemoptimum, mikroskopische Verkehrssimulation}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/77309/} +} + +@INPROCEEDINGS{dlr65940, + author = {Yun-Pang Wang and Peter Wagner and Michael Behrisch}, + title = {Towards a dynamic system optimum based on the simulated traffic data + in the microscopic traffic simulation}, + booktitle = {3rd NEARCTIS workshop}, + year = {2010}, + month = {Juni}, + abstract = {Microscopic traffic simulation has been applied since decades in order + to better describing both drivers? behaviors and interactive effects + among network infrastructure, drivers and traffic control applications. + Furthermore, it is also used as an evaluation tool for analyzing + influences of proposed management strategies and traffic-related + telematics technologies on network performances, such as efficiency + and safety. Achieving a system optimum in a road network is the main + concern of traffic managers at all times, although most road users + tend to make the route choice decision which is best suitable for + their journeys in practice. The main difference between system optimum + and user equilibrium is the marginal total travel costs, i.e. travel + times, which are the costs that an additional road user causes to + the other road users already in the network during the analysis period. + + Generally, travel times can be determined, i.e. approximated, by given + link travel time functions, which are functions of link flows. The + functional forms and respective parameters of the most travel time + functions are derived from empirical data. This approach has been + extensively applied in the macroscopic traffic modeling and the dynamic + traffic assignment modeling. Therefore, respective marginal costs + can be obtained by calculating the corresponding derivatives. However, + such travel time functions and their derivates are not required and + also not applied in a microscopic simulation, since the travel time, + travel flows and other parameters are directly measured in a simulation. + In this study, how to define and calculate marginal costs with use + of the simulated data is investigated.}, + keywords = {system optimum, SUMO, microscopic traffic simulation}, + owner = {dkrajzew}, + timestamp = {2014.01.08}, + url = {http://elib.dlr.de/65940/} +} + +@INPROCEEDINGS{Wang2010, + author = {Yun-Pang Wang and Peter Wagner and Michael Behrisch}, + title = {Towards a dynamic system optimum based on the simulated traffic data + in the microscopic traffic simulation}, + booktitle = {3rd NEARCTIS workshop}, + year = {2010}, + month = {Juni}, + abstract = {Microscopic traffic simulation has been applied since decades in order + to better describing both drivers? behaviors and interactive effects + among network infrastructure, drivers and traffic control applications. + Furthermore, it is also used as an evaluation tool for analyzing + influences of proposed management strategies and traffic-related + telematics technologies on network performances, such as efficiency + and safety. Achieving a system optimum in a road network is the main + concern of traffic managers at all times, although most road users + tend to make the route choice decision which is best suitable for + their journeys in practice. The main difference between system optimum + and user equilibrium is the marginal total travel costs, i.e. travel + times, which are the costs that an additional road user causes to + the other road users already in the network during the analysis period. + + + Generally, travel times can be determined, i.e. approximated, by given + link travel time functions, which are functions of link flows. The + functional forms and respective parameters of the most travel time + functions are derived from empirical data. This approach has been + extensively applied in the macroscopic traffic modeling and the dynamic + traffic assignment modeling. Therefore, respective marginal costs + can be obtained by calculating the corresponding derivatives. However, + such travel time functions and their derivates are not required and + also not applied in a microscopic simulation, since the travel time, + travel flows and other parameters are directly measured in a simulation. + In this study, how to define and calculate marginal costs with use + of the simulated data is investigated.}, + keywords = {system optimum, SUMO, microscopic traffic simulation}, + owner = {Daniel}, + timestamp = {2011.12.02}, + url = {http://elib.dlr.de/65940/} +} + +@PHDTHESIS{Wegener2009, + author = {Axel Wegener}, + title = {Organic-Computing-Konzepte und deren Umsetzung für dezentrale Anwendungen + im Straßenverkehr}, + school = {Universit\"at zu L\"ubeck}, + year = {2009}, + file = {:http\://d-nb.info/997885203/34:URL}, + owner = {dkrajzew}, + timestamp = {2012.01.23} +} + +@INPROCEEDINGS{Wegener2008, + author = {Wegener, A. and Hellbr\"uck, H. and Wewetzer, C. and L\"ubke, A.}, + title = {VANET Simulation Environment with Feedback Loop and its Application + to Traffic Light Assistance}, + booktitle = {GLOBECOM Workshops, 2008 IEEE}, + year = {2008}, + pages = {1 -7}, + month = {30 2008-dec. 4}, + abstract = {Traffic applications, in which vehicles are equipped with a radio + interface and communicate directly with each other and the road traffic + infrastructure are a promising field for ad-hoc network technology. + Vehicular applications reach from entertainment to traffic information + systems, including safety aspects where warning messages can inform + drivers about dangerous situations in advance. As performance tests + of the real system are very expensive and not comprehensive, today's + evaluations are based on analysis and simulation via traffic simulators. + In order to investigate the impact of traffic information systems + there are two options: First, traffic simulators can be extended + by application code and a simplified model for wireless communication. + Second, existing network simulators can be coupled with existing + traffic simulators. We favor the coupling of existing and well known + simulators as we believe that the wireless communication characteristics + influence the data transfer significantly and an oversimplified transmission + model can lead to flawed results. In this paper we describe the feedback + loop between traffic and network simulators named traffic control + interface (TraCI) and outline its versatility. We explain its use + to determine possible energy consumption reduction when traffic lights + send their phase schedules to vehicles.}, + doi = {10.1109/GLOCOMW.2008.ECP.67}, + keywords = {TraCI;VANET simulation environment;ad-hoc network technology;feedback + loop;oversimplified transmission model;radio interface;road traffic + infrastructure;safety aspects;traffic control interface;traffic information + systems;traffic light assistance;traffic simulators;wireless communication;ad + hoc networks;mobile radio;road safety;road traffic;traffic information + systems;, V2X, TU Lübeck, sumo}, + owner = {dkrajzew}, + timestamp = {2011.09.19} +} + +@INPROCEEDINGS{Wegener2008a, + author = {Axel Wegener and Micha\l Pi\'{o}rkowski and Maxim Raya and Horst + Hellbr\"{u}ck and Stefan Fischer and Jean-Pierre Hubaux}, + title = {Tra{CI}: {A}n {I}nterface for {C}oupling {R}oad {T}raffic and {N}etwork + {S}imulators}, + booktitle = {11{t}h {C}ommunications and {N}etworking {S}imulation {S}ymposium + ({CNS})}, + year = {2008}, + series = {CNS '08}, + pages = {155--163}, + address = {New York, NY, USA}, + publisher = {ACM}, + abstract = {Vehicular Ad-Hoc Networks (VANETs) enable communication among vehicles + as well as between vehicles and roadside infrastructures. Currently + available software tools for VANET research still lack the ability + to asses the usability of vehicular applications. In this article, + we present Traffic Control Interface (TraCI) a technique for interlinking + road traffic and network simulators. It permits us to control the + behavior of vehicles during simulation runtime, and consequently + to better understand the influence of VANET applications on traffic + patterns. In contrast to the existing approaches, i.e., generating + mobility traces that are fed to a network simulator as static input + files, the online coupling allows the adaptation of drivers' behavior + during simulation runtime. This technique is not limited to a special + traffic simulator or to a special network simulator. We introduce + a general framework for controlling the mobility which is adaptable + towards other research areas. We describe the basic concept, design + decisions and the message format of this open-source architecture. + Additionally, we provide implementations for non-commercial traffic + and network simulators namely SUMO and ns2, respectively. This coupling + enables for the first time systematic evaluations of VANET applications + in realistic settings.}, + acmid = {1400740}, + affiliation = {EPFL}, + details = {http://infoscience.epfl.ch/record/115106}, + doi = {10.1145/1400713.1400740}, + isbn = {1-56555-318-7}, + keywords = {network simulation, node mobility, vehicular ad-hoc networks (VANETs)}, + location = {Ottawa, Canada}, + numpages = {9}, + url = {http://doi.acm.org/10.1145/1400713.1400740} +} + +@INPROCEEDINGS{Widodo2000, + author = {Widodo, S. and Hasegawa, T. and Tsugawa, S.}, + title = {Vehicle fuel consumption and emission estimation in environment-adaptive + driving with or without inter-vehicle communications}, + booktitle = {Intelligent Vehicles Symposium, 2000. IV 2000. Proceedings of the + IEEE}, + year = {2000}, + pages = {382 -386}, + __markedentry = {[dkrajzew:6]}, + abstract = {In this paper, the vehicle fuel consumption and emission rates of + environment-adaptive driving with or without inter-vehicle communications + are estimated using an autonomous running traffic flow simulator. + In this study, a microscopic fuel consumption and emission model + is used. Simulation results show that environment-adaptive driving + can reduce both of the average fuel consumption and vehicle emission. + It also shows that inter-vehicle communications can improve these + impacts under high vehicle densities and long traffic light cycle + times}, + doi = {10.1109/IVS.2000.898373}, + keywords = {autonomous running traffic flow simulator;environment-adaptive driving;high + vehicle densities;inter-vehicle communications;long traffic light + cycle times;microscopic model;vehicle emission estimation;vehicle + fuel consumption estimation;air pollution;automated highways;environmental + factors;mobile communication;road vehicles;}, + owner = {dkrajzew}, + timestamp = {2012.01.26} +} + +@comment{jabref-meta: selector_review:} + +@comment{jabref-meta: selector_publisher:} + +@comment{jabref-meta: selector_author:} + +@comment{jabref-meta: selector_journal:} + +@comment{jabref-meta: selector_keywords:} + +@comment{jabref-meta: groupsversion:3;} + +@comment{jabref-meta: groupstree: +0 AllEntriesGroup:; +1 ExplicitGroup:sumo\;0\;; +2 ExplicitGroup:used\;0\;Bajpai2011\;Barber2011\;Bauza2008\;Behrisch20 +08\;Behrisch2008a\;Behrisch2008b\;Behrisch2009a\;Behrisch2010\;Bieker2 +010\;Bieker2011\;Bieker2011a\;Bonert2006\;Duering2011\;Flotterod2009\; +Hopfner2007\;Karnadi2007\;Katsaros2011\;Katsaros2011a\;Kerekes2009\;Kr +ajzewicz2002b\;Krajzewicz2003b\;Krajzewicz2005a\;Krajzewicz2007\;Krajz +ewicz2007a\;Krajzewicz2007b\;Krajzewicz2010a\;Krajzewicz2011\;Krajzewi +cz2011a\;Morenz2007\;Piorkowski2008\;Rosenbaum2011\;SandeshFiore2011\; +Wegener2008\;Wegener2008a\;Wegener2009\;; +2 ExplicitGroup:mentioned\;0\;GOZALVEZ2009\;Harri2011\;Krajzewicz2002\ +;Krajzewicz2003\;Krajzewicz2003c\;Krajzewicz2004\;Krajzewicz2009\;Kraj +zewicz2010\;Lazaro2008\;Maneros2009\;Niebel2008\;Rondinone2009\;Wang20 +10\;; +2 ExplicitGroup:compared\;0\;; +2 ExplicitGroup:presentation\;0\;Behrisch2009\;Behrisch2010a\;Behrisch +2011\;Hopfner2007\;Karnadi2007\;Krajzewicz2002a\;Krajzewicz2003a\;Kraj +zewicz2003b\;Krajzewicz2004b\;Krajzewicz2005\;Krajzewicz2006\;Krajzewi +cz2009a\;Krajzewicz2009b\;Krajzewicz2010b\;; +1 ExplicitGroup:projects\;0\;; +2 ExplicitGroup:OIS\;0\;Krajzewicz2005a\;; +2 ExplicitGroup:INVENT\;0\;; +2 ExplicitGroup:TAPAS\;0\;SandeshFiore2011\;Varschen2006\;; +2 ExplicitGroup:GF4BOS\;2\;Behrisch2010\;Niebel2008\;; +3 ExplicitGroup:WJT2005\;0\;; +3 ExplicitGroup:Soccer2006\;0\;Behrisch2008\;Bonert2006\;; +3 ExplicitGroup:DELPHI\;0\;Behrisch2009a\;; +3 ExplicitGroup:VABENE\;0\;Rosenbaum2011\;; +2 ExplicitGroup:small\;0\;; +3 ExplicitGroup:ACMEDriver\;0\;Krajzewicz2002\;Krajzewicz2003\;Krajzew +icz2003c\;Krajzewicz2004\;Krajzewicz2004a\;; +2 ExplicitGroup:theses\;2\;; +3 ExplicitGroup:DanilotTeteBoyom\;0\;Krajzewicz2007\;Krajzewicz2007a\; +Krajzewicz2007b\;; +2 ExplicitGroup:TrafficOnline\;0\;Hopfner2007\;; +2 ExplicitGroup:iTETRIS\;0\;Bauza2008\;Bieker2011\;Bieker2011a\;Blokpo +el2010\;Furian2013\;GOZALVEZ2009\;Harri2011\;Krajzewicz2009\;Krajzewic +z2009b\;Krajzewicz2010\;Krajzewicz2010a\;Krajzewicz2011\;Lazaro2008\;M +aneros2009\;Rondinone2009\;; +2 ExplicitGroup:Pre-Drive C2X\;0\;Bieker2010\;; +1 ExplicitGroup:topics\;0\;; +2 ExplicitGroup:V2X\;2\;Figueiredo2001\;; +3 ExplicitGroup:communication models\;2\;Bieker2010\;Harri2011\;Krajze +wicz2007\;Krajzewicz2007a\;Krajzewicz2007b\;; +3 ExplicitGroup:applications\;2\;Krajzewicz2010\;; +4 ExplicitGroup:emergency\;0\;Bieker2011a\;; +4 ExplicitGroup:TLS\;0\;Bieker2011a\;Duering2011\;; +4 ExplicitGroup:public transport\;0\;Bieker2011\;; +4 ExplicitGroup:surveillance\;0\;Bieker2011\;Wegener2009\;; +4 ExplicitGroup:navigation\;0\;Barber2011\;Katsaros2011\;Krajzewicz200 +7\;Krajzewicz2007a\;Krajzewicz2007b\;Wegener2009\;; +4 ExplicitGroup:ADAS\;0\;Duering2011\;; +4 ExplicitGroup:GLOSA\;0\;Chao-Qun2008\;Katsaros2011\;Katsaros2011a\;S +anchez2006\;Tielert2010\;Treiber2000\;Wegener2008\;Wegener2009\;Widodo +2000\;; +3 ExplicitGroup:simulation packages\;2\;Wegener2008a\;; +4 ExplicitGroup:iTETRIS\;0\;Bauza2008\;GOZALVEZ2009\;Harri2011\;Krajze +wicz2009\;Krajzewicz2010\;Lazaro2008\;Maneros2009\;Rondinone2009\;; +4 ExplicitGroup:MOVE\;0\;Karnadi2007\;; +4 ExplicitGroup:TraNS\;0\;Piorkowski2008\;; +4 ExplicitGroup:VSimRTI\;0\;Katsaros2011\;Katsaros2011a\;; +3 ExplicitGroup:network simulator\;0\;; +4 ExplicitGroup:ns-3\;0\;GOZALVEZ2009\;Harri2011\;Krajzewicz2009\;Kraj +zewicz2010\;Lazaro2008\;Maneros2009\;Rondinone2009\;; +4 ExplicitGroup:own (DLR)\;0\;Bieker2010\;Krajzewicz2007\;Krajzewicz20 +07a\;Krajzewicz2007b\;; +4 ExplicitGroup:ns-2\;0\;Karnadi2007\;Piorkowski2008\;Wegener2008\;Weg +ener2009\;; +4 ExplicitGroup:JiST/SWANS\;0\;Katsaros2011\;Katsaros2011a\;; +3 ExplicitGroup:routing protocols\;0\;Bauza2008\;Katsaros2011b\;; +3 ExplicitGroup:connectivity\;0\;SandeshFiore2011\;; +2 ExplicitGroup:TLS\;2\;Bajpai2011\;Barlovic2001\;Krajzewicz2005a\;Kra +jzewicz2010a\;Krajzewicz2011\;; +2 ExplicitGroup:demand\;2\;; +3 ExplicitGroup:generation\;2\;Behrisch2008\;SandeshFiore2011\;Varsche +n2006\;; +3 ExplicitGroup:assignment\;2\;Behrisch2008a\;Behrisch2008b\;Gawron199 +9\;Krajzewicz2003b\;Krajzewicz2011\;Krajzewicz2011a\;SandeshFiore2011\ +;Wang2010\;; +3 ExplicitGroup:calibration\;2\;Flotterod2009\;; +3 ExplicitGroup:event traffic\;2\;Behrisch2008\;; +2 ExplicitGroup:driver modelling\;2\;; +3 ExplicitGroup:submicro\;0\;Krajzewicz2002\;Krajzewicz2003\;Krajzewic +z2003c\;Krajzewicz2004\;Krajzewicz2004a\;; +3 ExplicitGroup:car-following\;0\;Krajzewicz2003b\;Krajzewicz2010b\;Kr +auss1997\;Krauss1998\;; +3 ExplicitGroup:mesoscopic\;0\;Behrisch2008\;; +3 ExplicitGroup:lane changing\;0\;Krajzewicz2009a\;Krajzewicz2010b\;; +2 ExplicitGroup:metrics\;2\;Blokpoel2010\;Krajzewicz2010a\;Krajzewicz2 +011a\;; +2 ExplicitGroup:pollution\;2\;Blokpoel2010\;Krajzewicz2009b\;Krajzewic +z2010a\;Krajzewicz2010b\;Krajzewicz2011\;Krajzewicz2011a\;Verges2013\; +dlr54498\;dlr55172\;dlr55173\;dlr56995\;dlr62187\;dlr62188\;dlr62189\; +dlr62716\;dlr65940\;dlr65965\;dlr65966\;dlr65967\;dlr71870\;dlr71871\; +dlr71872\;dlr72224\;dlr72232\;dlr76186\;dlr77309\;dlr80610\;dlr81244\; +dlr81834\;; +2 ExplicitGroup:simulation packages\;2\;Behrisch2009\;Behrisch2010\;Be +hrisch2011\;Krajzewicz2002a\;Krajzewicz2003a\;Krajzewicz2004b\;Krajzew +icz2006\;Krajzewicz2010b\;; +2 ExplicitGroup:calibration&validation\;2\;Brockfeld2002\;Brockfeld200 +2a\;Brockfeld2003\;Brockfeld2003a\;Brockfeld2004\;Brockfeld2004a\;Broc +kfeld2004b\;Brockfeld2004c\;Brockfeld2005\;Brockfeld2005a\;Krajzewicz2 +002b\;Krajzewicz2003b\;Morenz2007\;; +2 ExplicitGroup:inter-modality\;2\;Behrisch2010a\;; +2 ExplicitGroup:surveillance\;2\;Behrisch2009a\;Behrisch2010\;Bonert20 +06\;Hopfner2007\;Kerekes2009\;Kuhne2006\;Morenz2007\;Niebel2008\;Rosen +baum2011\;Schlingelhof2006\;; +3 ExplicitGroup:airborne\;0\;Behrisch2009a\;Behrisch2010\;Bonert2006\; +Niebel2008\;Rosenbaum2011\;; +3 ExplicitGroup:inductive loops\;0\;; +3 ExplicitGroup:cameras\;0\;Behrisch2009a\;Behrisch2010\;Bonert2006\;K +erekes2009\;Niebel2008\;Rosenbaum2011\;; +3 ExplicitGroup:mobile phones\;0\;Hopfner2007\;; +2 ExplicitGroup:forecast\;0\;Behrisch2008\;Behrisch2009a\;Behrisch2010 +\;Bonert2006\;Morenz2007\;Niebel2008\;Rosenbaum2011\;; +2 ExplicitGroup:road networks\;0\;Karnadi2007\;Krajzewicz2005\;Sandesh +Fiore2011\;; +2 ExplicitGroup:TraCI\;0\;Wegener2008\;Wegener2008a\;Wegener2009\;; +2 ExplicitGroup:public transport\;0\;Bieker2011\;Morenz2007\;; +2 ExplicitGroup:ITS\;0\;Figueiredo2001\;; +1 ExplicitGroup:institutions\;0\;; +2 ExplicitGroup:DLR\;2\;Kuhne2006\;; +3 ExplicitGroup:TS\;2\;Barlovic2001\;Behrisch2008\;Behrisch2008a\;Behr +isch2008b\;Behrisch2009\;Behrisch2009a\;Behrisch2010\;Behrisch2010a\;B +ehrisch2011\;Bieker2010\;Bieker2011\;Bieker2011a\;Blokpoel2010\;Brockf +eld2002\;Brockfeld2002a\;Brockfeld2003\;Brockfeld2003a\;Brockfeld2004\ +;Brockfeld2004a\;Brockfeld2004b\;Brockfeld2004c\;Brockfeld2005\;Brockf +eld2005a\;Duering2011\;Flotterod2009\;GOZALVEZ2009\;Harri2011\;Hopfner +2007\;Krajzewicz2002\;Krajzewicz2002a\;Krajzewicz2002b\;Krajzewicz2003 +\;Krajzewicz2003a\;Krajzewicz2003b\;Krajzewicz2003c\;Krajzewicz2004\;K +rajzewicz2004a\;Krajzewicz2004b\;Krajzewicz2005\;Krajzewicz2005a\;Kraj +zewicz2006\;Krajzewicz2007\;Krajzewicz2007a\;Krajzewicz2007b\;Krajzewi +cz2009\;Krajzewicz2009a\;Krajzewicz2009b\;Krajzewicz2010\;Krajzewicz20 +10a\;Krajzewicz2010b\;Krajzewicz2011\;Krajzewicz2011a\;Krauss1997\;Laz +aro2008\;Maneros2009\;Niebel2008\;Rosenbaum2011\;Schlingelhof2006\;Var +schen2006\;Wang2010\;; +3 ExplicitGroup:VF\;2\;Varschen2006\;; +3 ExplicitGroup:MF\;2\;Rosenbaum2011\;; +2 ExplicitGroup:Switzerland\;2\;; +3 ExplicitGroup:EPFL\;2\;; +4 ExplicitGroup:Transport and Mobility Laboratory\;0\;Flotterod2009\;; +4 ExplicitGroup:LCA (Laboratory for computer Communications and Applic +ations)\;0\;Piorkowski2008\;Wegener2008a\;; +2 ExplicitGroup:Netherlands\;2\;; +3 ExplicitGroup:Peek Traffic\;0\;Blokpoel2010\;GOZALVEZ2009\;Harri2011 +\;Krajzewicz2010\;Lazaro2008\;; +2 ExplicitGroup:Belgium\;2\;; +3 ExplicitGroup:IMEC\;0\;Bieker2010\;; +2 ExplicitGroup:France\;2\;; +3 ExplicitGroup:EURECOM\;0\;GOZALVEZ2009\;Harri2011\;Krajzewicz2010\;L +azaro2008\;Rondinone2009\;; +3 ExplicitGroup:HITACHI\;0\;GOZALVEZ2009\;Krajzewicz2010\;Lazaro2008\; +Rondinone2009\;; +3 ExplicitGroup:Thales\;0\;GOZALVEZ2009\;Harri2011\;Krajzewicz2010\;La +zaro2008\;Rondinone2009\;; +3 ExplicitGroup:Universit´e de Lyon\;0\;; +4 ExplicitGroup:INRIA\;0\;SandeshFiore2011\;; +2 ExplicitGroup:Germany\;2\;; +3 ExplicitGroup:TU BS\;2\;Duering2011\;; +3 ExplicitGroup:VW\;0\;Wegener2008\;; +3 ExplicitGroup:TU L\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ +\\\\\\\\\\\\\\"ubeck\;2\;; +4 ExplicitGroup:Institute of Telematics\;0\;Wegener2008\;Wegener2008a\ +;Wegener2009\;; +3 ExplicitGroup:University of Applied Sciences L\\\\\\\\\\\\\\\\\\\\\\ +\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ubeck\;2\;; +4 ExplicitGroup:Department of Electrical Engineering\;0\;Wegener2008\; +; +3 ExplicitGroup:Universit\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ +\\\\\\\\\\\\\\\\\\\"at zu K\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ +\\\\\\\\\\\\\\\\\\\\\"oln\;0\;Gawron1999\;Krauss1997\;Krauss1998\;; +3 ExplicitGroup:Fraunhofer\;2\;; +4 ExplicitGroup:FOKUS\;0\;Katsaros2011a\;Kerekes2009\;; +2 ExplicitGroup:Spain\;2\;; +3 ExplicitGroup:UMH\;0\;Bauza2008\;GOZALVEZ2009\;Krajzewicz2010\;Lazar +o2008\;Maneros2009\;Rondinone2009\;; +3 ExplicitGroup:Innovalia Association\;0\;GOZALVEZ2009\;Krajzewicz2009 +b\;Krajzewicz2010\;Lazaro2008\;Maneros2009\;Rondinone2009\;; +3 ExplicitGroup:CBT\;0\;GOZALVEZ2009\;Krajzewicz2010\;Lazaro2008\;Mane +ros2009\;Rondinone2009\;; +2 ExplicitGroup:Italy\;2\;; +3 ExplicitGroup:COBO\;0\;GOZALVEZ2009\;Krajzewicz2010\;Lazaro2008\;Ron +dinone2009\;; +2 ExplicitGroup:USA\;0\;; +3 ExplicitGroup:University of Tulsa\;0\;Barber2011\;; +3 ExplicitGroup:Rochester Institute of Technology\;0\;Kerekes2009\;; +3 ExplicitGroup:Air Force Institute of Technology\;0\;Kerekes2009\;; +3 ExplicitGroup:Numerica Corp.\;0\;Kerekes2009\;; +2 ExplicitGroup:Australia\;2\;; +3 ExplicitGroup:University of New South Wales\;0\;Karnadi2007\;; +3 ExplicitGroup:National ICT Australia Ltd\;0\;Karnadi2007\;; +2 ExplicitGroup:Ireland\;2\;; +3 ExplicitGroup:University of Dublin\;0\;Morenz2007\;; +2 ExplicitGroup:UK\;2\;; +3 ExplicitGroup:University of Surrey\;0\;Katsaros2011\;Katsaros2011a\; +Katsaros2011b\;; +2 ExplicitGroup:India\;2\;; +3 ExplicitGroup:IIT Bombay\;0\;Bajpai2011\;; +1 ExplicitGroup:meta\;0\;; +2 ExplicitGroup:assigned2groups\;0\;Bajpai2011\;Barber2011\;Barlovic20 +01\;Bauza2008\;Behrisch2008\;Behrisch2008a\;Behrisch2008b\;Behrisch200 +9\;Behrisch2009a\;Behrisch2010\;Behrisch2010a\;Behrisch2011\;Bieker201 +0\;Bieker2011\;Bieker2011a\;Blokpoel2010\;Bonert2006\;Brockfeld2002\;B +rockfeld2002a\;Brockfeld2003\;Brockfeld2003a\;Brockfeld2004\;Brockfeld +2004a\;Brockfeld2004b\;Brockfeld2004c\;Brockfeld2005\;Brockfeld2005a\; +Chao-Qun2008\;Duering2011\;Figueiredo2001\;Flotterod2009\;GOZALVEZ2009 +\;Gawron1999\;Harri2011\;Hopfner2007\;Karnadi2007\;Katsaros2011\;Katsa +ros2011a\;Katsaros2011b\;Kerekes2009\;Krajzewicz2002\;Krajzewicz2002a\ +;Krajzewicz2002b\;Krajzewicz2003\;Krajzewicz2003a\;Krajzewicz2003b\;Kr +ajzewicz2003c\;Krajzewicz2004\;Krajzewicz2004a\;Krajzewicz2004b\;Krajz +ewicz2005\;Krajzewicz2005a\;Krajzewicz2006\;Krajzewicz2007\;Krajzewicz +2007a\;Krajzewicz2007b\;Krajzewicz2009\;Krajzewicz2009a\;Krajzewicz201 +0\;Krajzewicz2010a\;Krajzewicz2010b\;Krajzewicz2011\;Krajzewicz2011a\; +Krauss1997\;Krauss1998\;Kuhne2006\;Lazaro2008\;Maneros2009\;Morenz2007 +\;Niebel2008\;Piorkowski2008\;Rondinone2009\;Rosenbaum2011\;Sanchez200 +6\;SandeshFiore2011\;Schlingelhof2006\;Tielert2010\;Treiber2000\;Varsc +hen2006\;Wang2010\;Wegener2008\;Wegener2008a\;Wegener2009\;Widodo2000\ +;; +2 ExplicitGroup:documentAssigned\;0\;Katsaros2011\;Katsaros2011a\;Kats +aros2011b\;Tielert2010\;Treiber2000\;Wegener2009\;; +} + Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/sumo.zuml and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/sumo.zuml differ diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.add.xml sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.add.xml --- sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.add.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.add.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.net.xml sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.net.xml --- sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.net.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.net.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.rou.xml sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.rou.xml --- sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.rou.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.rou.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.sumocfg sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.sumocfg --- sumo-1.1.0+dfsg1/docs/tutorial/circles/data/circles.sumocfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/circles/data/circles.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/circles/runner.py sumo-1.2.0+dfsg1/docs/tutorial/circles/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/circles/runner.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/circles/runner.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file runner.py -# @author Daniel Krajzewicz -# @author Michael Behrisch -# @date 2007-10-25 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function - - -import os -import subprocess -import sys -if 'SUMO_HOME' in os.environ: - tools = os.path.join(os.environ['SUMO_HOME'], 'tools') - sys.path.append(tools) -else: - sys.exit("please declare environment variable 'SUMO_HOME'") -from sumolib import checkBinary # noqa -sumoBinary = checkBinary('sumo') -# run simulation -retcode = subprocess.call( - [sumoBinary, "-c", "data/circles.sumocfg", "--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) -print(">> Simulation closed with status %s" % retcode) -sys.stdout.flush() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/agentManager.py sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/agentManager.py --- sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/agentManager.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/agentManager.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file agentManager.py -# @author Michael Behrisch -# @author Daniel Krajzewicz -# @date 2008-10-09 -# @version $Id$ - -from __future__ import absolute_import -import vehicleControl -import statistics -from constants import INFINITY, DOUBLE_ROWS, ROW_DIST, CYBER_SPEED, WAIT_PER_PERSON - - -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) - if (cost < minCost): - if minCar: - minCar.reject(self) - minCar = car - minCost = cost - else: - 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 - self.pending = {} - self.tasks = [] - self.running = [] - self.costMatrix = {} - self.totalEstimatedCost = 0 - self.position = None - self.broken = False - - def request(self, person, source, target): - if self.broken: - estCost = INFINITY - elif (source, target) in self.costMatrix: - estCost = self.costMatrix[(source, target)] - else: - estCost = 2 * DOUBLE_ROWS * ROW_DIST / CYBER_SPEED - self.pending[person] = Task(person, source, target, estCost) - return self.totalEstimatedCost + estCost - - def accept(self, person): - task = self.pending[person] - self.tasks.append(task) - self.totalEstimatedCost += task.estCost - del self.pending[person] - - def reject(self, person): - del self.pending[person] - - def _findNextTarget(self, wait): - minTarget = "z" - minDownstreamTarget = "z" - minSource = "z" - minDownstreamSource = "z" - edge = vehicleControl.getPosition(self.id) - if edge == "cyberin": - edge = "cyber" - for task in self.running: - if task.target < minTarget: - minTarget = task.target - if task.target < minDownstreamTarget and task.target > edge: - minDownstreamTarget = task.target - for task in self.tasks[:vehicleControl.getCapacity() - self.load]: - if task.source < minSource: - minSource = task.source - if task.source < minDownstreamSource and task.source > edge: - minDownstreamSource = task.source - if minDownstreamTarget != "z": - minTarget = minDownstreamTarget - elif minDownstreamSource < minTarget: - minTarget = minDownstreamSource - elif minTarget < edge and minSource < minTarget: - minTarget = minSource - if minTarget == "z": - minTarget = "cyberin" - if minTarget != vehicleControl.getPosition(self.id): - vehicleControl.leaveStop(self.id, delay=wait) - vehicleControl.stopAt(self.id, minTarget) - - def setPosition(self, edge): - self.position = edge - self.broken = False - - def checkBoarding(self): - step = vehicleControl.getStep() - wait = 0 - running = [] - for task in self.running: - if task.target == self.position: - statistics.personUnloaded(task.person.id, step) - self.load -= 1 - wait += WAIT_PER_PERSON - 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(): - tasks = [] - for task in self.tasks: - if task.source == self.position and self.load < vehicleControl.getCapacity(): - vehicleControl.leaveStop(task.person.id) - statistics.personLoaded(task.person.id, step) - self.load += 1 - wait += WAIT_PER_PERSON - task.startStep = step - self.running.append(task) - else: - tasks.append(task) - self.tasks = tasks - self._findNextTarget(wait) - - def reallocateTasks(self, cybers): - self.broken = True - tasks = self.tasks - self.tasks = [] - for task in tasks: - task.person.startRequest(task.source, task.target, cybers) - - -class AgentManager(vehicleControl.Manager): - - def __init__(self): - self.agents = {} - self.cyberCars = [] - - def personArrived(self, personID, edge, target): - if personID not in self.agents: - person = PersonAgent(personID) - self.agents[personID] = person - person.startRequest(edge.replace("footmain", "cyber"), - target.replace("footmain", "cyber"), self.cyberCars) - - def cyberCarArrived(self, vehicleID, edge): - if vehicleID in self.agents: - cyberCar = self.agents[vehicleID] - else: - cyberCar = CyberAgent(vehicleID) - self.agents[vehicleID] = cyberCar - self.cyberCars.append(cyberCar) - cyberCar.setPosition(edge) - - def cyberCarBroken(self, vehicleID, edge): - self.agents[vehicleID].reallocateTasks(self.cyberCars) - - def setNewTargets(self): - for car in self.cyberCars: - if not car.broken: - car.checkBoarding() - - -if __name__ == "__main__": - vehicleControl.init(AgentManager()) diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/constants.py sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/constants.py --- sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/constants.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/constants.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file constants.py -# @author Michael Behrisch -# @author Daniel Krajzewicz -# @date 2008-07-21 -# @version $Id$ - -from __future__ import absolute_import -import os -import sys - -INFINITY = 1e400 - -PREFIX = "park" -DOUBLE_ROWS = 8 -ROW_DIST = 35 -STOP_POS = ROW_DIST - 12 -SLOTS_PER_ROW = 10 -SLOT_WIDTH = 5 -SLOT_LENGTH = 9 -SLOT_FOOT_LENGTH = 5 -CAR_CAPACITY = 3 -CYBER_CAPACITY = 20 -BUS_CAPACITY = 30 -TOTAL_CAPACITY = 60 -CYBER_SPEED = 5 -CYBER_LENGTH = 9 -WAIT_PER_PERSON = 5 -OCCUPATION_PROBABILITY = 0.5 -BREAK_DELAY = 1200 - -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 # noqa -except ImportError: - def checkBinary(name): - return name -NETCONVERT = checkBinary("netconvert") -SUMO = checkBinary("sumo") -SUMOGUI = checkBinary("sumo-gui") diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/createNet.py sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/createNet.py --- sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/createNet.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/createNet.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,303 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file createNet.py -# @author Michael Behrisch -# @author Daniel Krajzewicz -# @date 2008-07-04 -# @version $Id$ - -""" -Create the XML input files for the generation of the SUMO network -of the CityMobil parking lot. -""" -from __future__ import absolute_import -from __future__ import print_function -import random -import subprocess -import os -import sys -from constants import PREFIX, DOUBLE_ROWS, ROW_DIST, STOP_POS, SLOTS_PER_ROW, SLOT_WIDTH -from constants import SLOT_LENGTH, SLOT_FOOT_LENGTH, CAR_CAPACITY, CYBER_CAPACITY, BUS_CAPACITY, TOTAL_CAPACITY -from constants import CYBER_SPEED, CYBER_LENGTH, OCCUPATION_PROBABILITY, PORT - -if 'SUMO_HOME' in os.environ: - tools = os.path.join(os.environ['SUMO_HOME'], 'tools') - sys.path.append(tools) -else: - sys.exit("please declare environment variable 'SUMO_HOME'") - -import sumolib # noqa - -occupied = 0 -nodes = open("%s.nod.xml" % PREFIX, "w") -print("", file=nodes) -edges = open("%s.edg.xml" % PREFIX, "w") -print("", file=edges) -connections = open("%s.con.xml" % PREFIX, "w") -print("", file=connections) -routes = open("%s.rou.xml" % PREFIX, "w") -print((""" - - - """) % (CYBER_LENGTH, CYBER_SPEED), file=routes) -# streets -nodeID = "main-0" -print('', file=nodes) -print('' % nodeID, file=nodes) -print('' % - nodeID, file=edges) -for row in range(DOUBLE_ROWS): - nextNodeID = "main%s-%s" % (row, row + 1) - if row + 1 == DOUBLE_ROWS: - nextNodeID = "main%s-" % row - x = (row + 1) * ROW_DIST - print('' % (nextNodeID, x), file=nodes) - print('' % ( - row, nodeID, nextNodeID), file=edges) - nodeID = nextNodeID -print('' % (x + 100), file=nodes) -print('' % - nodeID, file=edges) -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('' % ( - partID, idx * ROW_DIST, (slot + 1) * SLOT_WIDTH), file=nodes) - print('' % ( - partID, nodeID, partID), file=edges) - print('' % ( - partID, partID, nodeID), file=edges) - 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('' % ( - slotID, row * ROW_DIST + SLOT_LENGTH, (slot + 1) * SLOT_WIDTH), file=nodes) - print('' % ( - slotID, source, slotID), file=edges) - print('' % ( - slotID, slotID, source), file=edges) - slotID = "slot%s-%sr" % (row, slot) - source = "%s-%st" % (roads[row + 1], slot) - print('' % ( - slotID, (row + 1) * ROW_DIST - SLOT_LENGTH, (slot + 1) * SLOT_WIDTH), file=nodes) - print('' % ( - slotID, source, slotID), file=edges) - print('' % ( - slotID, slotID, source), file=edges) -# footpaths -y = (SLOTS_PER_ROW + 1) * SLOT_WIDTH -print('' % y, file=nodes) -print( - '', file=edges) -for row in range(DOUBLE_ROWS): - nodeID = "foot%s" % row - x = row * ROW_DIST + ROW_DIST / 2 - print('' % (nodeID, x, y), file=nodes) - if row > 0: - edgeID = "footmain%sto%s" % (row - 1, row) - print('' % ( - edgeID, row - 1, row), file=edges) - for slot in reversed(range(SLOTS_PER_ROW)): - slotID = "foot%s-%s" % (row, slot) - print('' % ( - slotID, x, (slot + 1) * SLOT_WIDTH), file=nodes) - print('' % ( - nodeID, slot, nodeID, slotID), file=edges) - print('' % ( - nodeID, slot, slotID, nodeID), file=edges) - print('' % ( - slotID, x + SLOT_FOOT_LENGTH, (slot + 1) * SLOT_WIDTH), file=nodes) - print('' % ( - slotID, slotID, slotID), file=edges) - print('' % ( - slotID, slotID, slotID), file=edges) - print('' % ( - slotID, x - SLOT_FOOT_LENGTH, (slot + 1) * SLOT_WIDTH), file=nodes) - print('' % ( - slotID, slotID, slotID), file=edges) - print('' % ( - slotID, slotID, slotID), file=edges) - nodeID = slotID - vSlot = slotID.replace("foot", "slot") - if random.uniform(0, 1) < OCCUPATION_PROBABILITY: - occupied += 1 - print("""\ - - - """ % (vSlot, vSlot, vSlot), file=routes) - else: - print("""\ - - - """ % (slotID, CAR_CAPACITY, slotID, slotID), file=routes) - if random.uniform(0, 1) < OCCUPATION_PROBABILITY: - occupied += 1 - print("""\ - - - """ % (vSlot, vSlot, vSlot), file=routes) - else: - print("""\ - - - """ % (slotID, CAR_CAPACITY, slotID, slotID), file=routes) -x = DOUBLE_ROWS * ROW_DIST + ROW_DIST / 2 -print('' % (DOUBLE_ROWS, x, y), file=nodes) -edgeID = "footmain%sto%s" % (DOUBLE_ROWS - 1, DOUBLE_ROWS) -print('' % ( - edgeID, DOUBLE_ROWS - 1, DOUBLE_ROWS), file=edges) -print('' % (x + 100, y), file=nodes) -print('' % - DOUBLE_ROWS, file=edges) -print('' % (x + 100, y - 10), file=nodes) -print('' % - DOUBLE_ROWS, file=edges) - -# cybercar (automated bus) -y = (SLOTS_PER_ROW + 3) * SLOT_WIDTH -print('' % y, file=nodes) -print( - '', file=edges) -print( - '', file=edges) -for row in range(DOUBLE_ROWS + 1): - nodeID = "cyber%s" % row - x = row * ROW_DIST + ROW_DIST / 2 - print('' % (nodeID, x, y), file=nodes) - if row > 0: - edgeID = "cyber%sto%s" % (row - 1, row) - print('' % ( - edgeID, row - 1, row), file=edges) - print('' % ( - edgeID, row, row - 1), file=edges) - if row < DOUBLE_ROWS: - print('' % ( - edgeID, row, row + 1), file=connections) - print('' % ( - row, row + 1, edgeID), file=connections) - else: - print('' % - edgeID, file=connections) - print('' % - edgeID, file=connections) -print('' % (x + 100, y), file=nodes) -print('' % - row, file=edges) -print('' % - row, file=edges) - - -print("", file=nodes) -nodes.close() -print("", file=edges) -edges.close() -print("", file=connections) -connections.close() - -NETCONVERT = os.environ.get( - "NETCONVERT_BINARY", os.path.join(os.environ["SUMO_HOME"], 'bin', 'netconvert')) -subprocess.call([NETCONVERT, - '--no-internal-links', - '-n', '%s.nod.xml' % PREFIX, - '-e', '%s.edg.xml' % PREFIX, - '-x', '%s.con.xml' % PREFIX, - '-o', '%s.net.xml' % PREFIX]) - -numBusses = TOTAL_CAPACITY // BUS_CAPACITY -print(""" - - -""" % numBusses, file=routes) -routes.close() - -routes = open("%s_cyber.rou.xml" % PREFIX, "w") -print(""" - - - -""" % (TOTAL_CAPACITY / CYBER_CAPACITY - numBusses), file=routes) -routes.close() - -stops = open("%s.add.xml" % PREFIX, "w") -print("", file=stops) -for row in range(DOUBLE_ROWS): - edgeID = "cyber%sto%s" % (row, row + 1) - print(' ' % ( - STOP_POS - 2 * CYBER_LENGTH - 1, STOP_POS), file=stops) -for edge in ["cyberin", "cyberout"]: - print(' ' % ( - 90 - 2 * CYBER_LENGTH - 1, 90), file=stops) -print( - ' ', file=stops) -print("", file=stops) -stops.close() - -totalSlots = 2 * DOUBLE_ROWS * SLOTS_PER_ROW -bat = open("%s.bat" % PREFIX, "w") -breakbat = open("%s_break.bat" % PREFIX, "w") - -for period in range(5, 50, 5): - routes = open("%s_demand%02i.rou.xml" % (PREFIX, period), "w") - print("", file=routes) - if occupied < totalSlots: - print(""" - - """ % (period, totalSlots - occupied), file=routes) - if occupied > 0: - print(""" - - """ % (period, occupied * CAR_CAPACITY), file=routes) - print("", file=routes) - routes.close() - - config = open("%s%02i.sumocfg" % (PREFIX, period), "w") - print(""" - - - - - - - - -""" % (PREFIX, PREFIX, PREFIX, period, PREFIX, PORT), file=config) - config.close() - print("simpleManager.py -d %s" % period, file=bat) - print("simpleManager.py -b 120 -d %s" % period, file=breakbat) - - config = open("%s%02i_cyber.sumocfg" % (PREFIX, period), "w") - print(""" - - - - - - - - -""" % (PREFIX, PREFIX, PREFIX, PREFIX, period, PREFIX, PORT), file=config) - config.close() - print("agentManager.py -c -d %s" % period, file=bat) - print("agentManager.py -c -b 120 -d %s" % period, file=breakbat) -bat.close() -breakbat.close() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/runner.py sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/runner.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/runner.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file runner.py -# @author Michael Behrisch -# @author Daniel Krajzewicz -# @date 2011-10-28 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function - - -import shutil -import vehicleControl -import simpleManager -import agentManager - -# build/check network -import createNet # noqa -# perform simple scenario -vehicleControl.init(simpleManager.SimpleManager(), True) -# perform agent scenario -vehicleControl.init(agentManager.AgentManager(), True) -try: - shutil.copy("all-the-results.txt", "../result2") -except IOError: - print("Missing 'all-the-results.txt'") diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/simpleManager.py sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/simpleManager.py --- sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/simpleManager.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/simpleManager.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file simpleManager.py -# @author Michael Behrisch -# @author Daniel Krajzewicz -# @date 2008-10-09 -# @version $Id$ - -from __future__ import absolute_import -import vehicleControl -import statistics -from constants import DOUBLE_ROWS, WAIT_PER_PERSON - - -class SimpleManager(vehicleControl.Manager): - - def __init__(self): - self.cyberCarLoad = {} - self.personsWaitingAt = {} - - def personArrived(self, personID, edge, target): - if edge not in self.personsWaitingAt: - self.personsWaitingAt[edge] = [] - self.personsWaitingAt[edge].append((personID, target)) - - def cyberCarArrived(self, vehicleID, edge): - step = vehicleControl.getStep() - footEdge = edge.replace("cyber", "footmain") - wait = 0 - load = [] - for person, target in self.cyberCarLoad.get(vehicleID, []): - if target == footEdge: - statistics.personUnloaded(person, step) - wait += WAIT_PER_PERSON - else: - load.append((person, target)) - while self.personsWaitingAt.get(footEdge, []) and len(load) < vehicleControl.getCapacity(): - person, target = self.personsWaitingAt[footEdge].pop(0) - vehicleControl.leaveStop(person) - statistics.personLoaded(person, step) - load.append((person, target)) - wait += WAIT_PER_PERSON - vehicleControl.leaveStop(vehicleID, delay=wait) - if edge == "cyberout" or edge == "cyberin": - row = -1 - else: - row = int(edge[5]) - if row < DOUBLE_ROWS - 1: - vehicleControl.stopAt( - vehicleID, "cyber%sto%s" % (row + 1, row + 2)) - else: - vehicleControl.stopAt(vehicleID, "cyberout") - self.cyberCarLoad[vehicleID] = load - - -if __name__ == "__main__": - vehicleControl.init(SimpleManager()) diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/statistics.py sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/statistics.py --- sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/statistics.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/statistics.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,150 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file statistics.py -# @author Michael Behrisch -# @author Daniel Krajzewicz -# @date 2008-10-17 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function -import sys -persons = {} -personsRunning = 0 - - -class Person: - - def __init__(self, id, source, target, step): - self.id = id - self.source = source - self.target = target - self.waitStart = step - 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 - import math - except ImportError: - print("No numpy available, skipping statistics") - return - waitTimes = [] - routeTimes = {} - for person in persons.values(): - waitTimes.append(person.depart - person.waitStart) - route = (person.source, person.target) - if route not in routeTimes: - 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.items()): - timeArray = numpy.array(times) - if forTest: - print(route, timeArray.max() < 1000, timeArray.mean() < 1000, math.sqrt(timeArray.var()) < 100) - else: - print(route, timeArray.max(), timeArray.mean(), - math.sqrt(timeArray.var())) - - co2 = 0. - for line in open("aggregated.xml"): - if "cyber" in line: - pos = line.find('CO2_abs="') + 9 - if pos >= 9: - endpos = line.find('"', pos) - co2 += float(line[pos:endpos]) - - if forTest: - print("CO2:", co2 < 10000000) - else: - print("CO2:", co2) - - -if __name__ == "__main__": - from pylab import figure, errorbar, legend, savefig, show, title, xlabel, xlim, ylabel, ylim - stats = open(sys.argv[1]) - demand = [] - simpleWaitMean = [] - agentWaitMean = [] - simpleWaitDev = [] - agentWaitDev = [] - simpleRouteMean = [] - agentRouteMean = [] - simpleRouteDev = [] - agentRouteDev = [] - for line in stats: - if "simple" in line: - mean = simpleWaitMean - dev = simpleWaitDev - rmean = simpleRouteMean - rdev = simpleRouteDev - demand.append(int(line.split()[-1])) - if "agent" in line: - mean = agentWaitMean - dev = agentWaitDev - rmean = agentRouteMean - rdev = agentRouteDev - if "waiting" in line: - mean.append(float(line.split()[-2])) - dev.append(float(line.split()[-1])) - if line.startswith("('footmain0to1'"): - rmean.append(float(line.split()[-2])) - 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') - xlim(0, 50) - ylim(0, 3300) - xlabel('Repeater interval (s)') - ylabel('Waiting time (s)') - title('Mean and standard deviation of waiting time') - 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') - xlim(0, 50) - ylim(0, 300) - xlabel('Repeater interval (s)') - ylabel('Travel time (s)') - title('Mean and standard deviation of travel time on the longest route') - legend(numpoints=1) - savefig("traveltime.png") - show() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/vehicleControl.py sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/vehicleControl.py --- sumo-1.1.0+dfsg1/docs/tutorial/city_mobil/vehicleControl.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/city_mobil/vehicleControl.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,250 +0,0 @@ -# -*- coding: utf-8 -*- -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file vehicleControl.py -# @author Michael Behrisch -# @author Daniel Krajzewicz -# @author Lena Kalleske -# @date 2008-07-21 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function -import subprocess -import random -import sys -import os -from optparse import OptionParser - -from constants import PREFIX, DOUBLE_ROWS, STOP_POS, SLOTS_PER_ROW, SLOT_LENGTH, BUS_CAPACITY, BREAK_DELAY -from constants import CYBER_CAPACITY, PORT -import statistics - -if 'SUMO_HOME' in os.environ: - tools = os.path.join(os.environ['SUMO_HOME'], 'tools') - sys.path.append(tools) -else: - sys.exit("please declare environment variable 'SUMO_HOME'") - -import traci # noqa -import traci.constants as tc # noqa -import sumolib # noqa - - -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): - self.edge = edge - self.pos = pos - self.parking = False - self.target = None - self.targetPos = None - self.slot = None - self.delay = None - - def __repr__(self): - return "%s,%s" % (self.edge, self.pos) - - -class Setting: - step = 0 - manager = None - verbose = False - cyber = False - - -setting = Setting() -occupancy = {} -vehicleStatus = {} -persons = {} -waiting = {} - - -def init(manager, forTest=False): - optParser = OptionParser() - optParser.add_option("-v", "--verbose", action="store_true", dest="verbose", - default=False, help="tell me what you are doing") - optParser.add_option("-g", "--gui", action="store_true", dest="gui", - default=False, help="run with GUI") - optParser.add_option("-c", "--cyber", action="store_true", dest="cyber", - default=False, help="use small cybercars instead of big busses") - optParser.add_option("-d", "--demand", type="int", dest="demand", - default=15, help="period with which the persons are emitted") - optParser.add_option("-b", "--break", type="int", dest="breakstep", metavar="TIMESTEP", - help="let a vehicle break for %s seconds at TIMESTEP" % BREAK_DELAY) - (options, args) = optParser.parse_args() - sumoExe = os.environ.get("SUMO_BINARY", os.path.join(os.environ['SUMO_HOME'], 'bin', 'sumo')) - if options.gui: - sumoExe = os.environ.get("GUISIM_BINARY", os.path.join(os.environ['SUMO_HOME'], 'bin', 'sumo-gui')) - 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) - traci.init(PORT) - traci.simulation.subscribe() - setting.manager = manager - setting.verbose = options.verbose - setting.cyber = options.cyber - setting.breakstep = options.breakstep - try: - while setting.step < 100 or statistics.personsRunning > 0: - doStep() - statistics.evaluate(forTest) - finally: - 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 is None: - pos = STOP_POS - if edge.endswith("out") or edge.endswith("in"): - pos = 90. - traci.vehicle.changeTarget(vehicleID, edge) - if setting.verbose: - print("stopAt", vehicleID, edge, pos) -# print vehicleStatus[vehicleID] -# print traci.vehicle.getRoute(vehicleID) - traci.vehicle.setStop(vehicleID, edge, pos) - vehicleStatus[vehicleID].target = edge - vehicleStatus[vehicleID].targetPos = pos - - -def leaveStop(vehicleID, newTarget=None, delay=0): - v = vehicleStatus[vehicleID] - if newTarget: - traci.vehicle.changeTarget(vehicleID, newTarget) - traci.vehicle.setStop(vehicleID, v.target, v.targetPos, 0, delay) - v.target = None - v.targetPos = None - v.parking = False - - -def _rerouteCar(vehicleID): - slotEdge = "" - for rowIdx in range(DOUBLE_ROWS): - for idx in range(SLOTS_PER_ROW): - for dir in ["l", "r"]: - slotEdge = "slot%s-%s%s" % (rowIdx, idx, dir) - if slotEdge not in occupancy: - occupancy[slotEdge] = vehicleID - 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) - stopAt(person, targetEdge) - vehicleStatus[person].parking = False - vehicleStatus[person].slot = edge - - -def _checkInitialPositions(vehicleID, edge, pos): - if vehicleID in vehicleStatus: - vehicleStatus[vehicleID].edge = edge - vehicleStatus[vehicleID].pos = pos - else: - vehicleStatus[vehicleID] = Status(edge, pos) - if edge == "mainin": - _rerouteCar(vehicleID) - elif edge == "cyberin": - stopAt(vehicleID, "cyberin") - elif edge == "footfairin": - stopAt(vehicleID, "footmainout") - elif "foot" in edge: - traci.vehicle.setStop(vehicleID, "-" + edge) - parkEdge = edge.replace("foot", "slot") - if parkEdge not in persons: - persons[parkEdge] = [] - persons[parkEdge].append(vehicleID) - vehicleStatus[vehicleID].parking = True - elif edge.startswith("slot"): - stopAt(vehicleID, edge, SLOT_LENGTH - 5.) - occupancy[edge] = vehicleID - _reroutePersons(edge) - - -def doStep(): - setting.step += 1 - if setting.verbose: - print("step", setting.step) - traci.simulationStep() - moveNodes = [] - for veh, subs in traci.vehicle.getAllSubscriptionResults().items(): - 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) - moveNodes.append((v, subs[tc.VAR_ROAD_ID], subs[tc.VAR_LANEPOSITION])) - for vehicleID, edge, pos in moveNodes: - _checkInitialPositions(vehicleID, edge, pos) - vehicle = vehicleStatus[vehicleID] - if edge == vehicle.target and not vehicle.parking: - if edge.startswith("footmain"): - vehicle.parking = True - target = "footmainout" - if edge == "footmainout": - row = random.randrange(0, DOUBLE_ROWS) - target = "footmain%sto%s" % (row, row + 1) - statistics.personArrived(vehicleID, edge, target, setting.step) - setting.manager.personArrived(vehicleID, edge, target) - if edge.startswith("cyber"): - if vehicle.delay: - vehicle.delay -= 1 - elif setting.breakstep and setting.step >= setting.breakstep and edge != "cyberin": - if setting.verbose: - print("broken", vehicleID, edge) - setting.breakstep = None - setting.manager.cyberCarBroken(vehicleID, edge) - vehicle.delay = BREAK_DELAY - else: - if setting.verbose: - print("arrived", vehicleID, edge) - vehicle.parking = True - setting.manager.cyberCarArrived(vehicleID, edge) - setting.manager.setNewTargets() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/hello/net.net.xml sumo-1.2.0+dfsg1/docs/tutorial/hello/net.net.xml --- sumo-1.1.0+dfsg1/docs/tutorial/hello/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/hello/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/hello/runner.py sumo-1.2.0+dfsg1/docs/tutorial/hello/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/hello/runner.py 2018-07-06 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/hello/runner.py 2019-01-23 23:00:20.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/manhattan/data/manhattan.jtrrcfg sumo-1.2.0+dfsg1/docs/tutorial/manhattan/data/manhattan.jtrrcfg --- sumo-1.1.0+dfsg1/docs/tutorial/manhattan/data/manhattan.jtrrcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/manhattan/data/manhattan.jtrrcfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/manhattan/data/manhattan.netgcfg sumo-1.2.0+dfsg1/docs/tutorial/manhattan/data/manhattan.netgcfg --- sumo-1.1.0+dfsg1/docs/tutorial/manhattan/data/manhattan.netgcfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/manhattan/data/manhattan.netgcfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/manhattan/data/manhattan.sumocfg sumo-1.2.0+dfsg1/docs/tutorial/manhattan/data/manhattan.sumocfg --- sumo-1.1.0+dfsg1/docs/tutorial/manhattan/data/manhattan.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/manhattan/data/manhattan.sumocfg 2019-04-15 22:19:20.000000000 +0000 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/manhattan/runner.py sumo-1.2.0+dfsg1/docs/tutorial/manhattan/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/manhattan/runner.py 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/manhattan/runner.py 2019-04-12 22:00:11.000000000 +0000 @@ -0,0 +1,47 @@ +#!/usr/bin/env python +# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v20.html +# SPDX-License-Identifier: EPL-2.0 + +# @file runner.py +# @author Daniel Krajzewicz +# @author Michael Behrisch +# @date 2007-10-25 +# @version $Id$ + +from __future__ import absolute_import +from __future__ import print_function + + +import os +from subprocess import call +import sys +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 + from sumolib import checkBinary # noqa +except ImportError: + sys.exit("please declare environment variable 'SUMO_HOME'") + +netgenBinary = checkBinary('netgenerate') +jtrrouterBinary = checkBinary('jtrrouter') +sumoBinary = checkBinary('sumo') +import randomTrips # noqa + +call([netgenBinary, '-c', 'data/manhattan.netgcfg']) +randomTrips.main(randomTrips.get_options([ + '--flows', '100', + '-b', '0', + '-e', '1', + '-n', 'data/net.net.xml', + '-o', 'data/flows.xml', + '--jtrrouter', + '--trip-attributes', 'departPos="random" departSpeed="max"'])) +call([jtrrouterBinary, '-c', 'data/manhattan.jtrrcfg']) +call([sumoBinary, '-c', 'data/manhattan.sumocfg', '--duration-log.statistics', '-e' '1000']) diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.net.xml sumo-1.2.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.net.xml --- sumo-1.1.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.net.xml 2018-12-18 09:58:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.net.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,28915 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.osm sumo-1.2.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.osm --- sumo-1.1.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.osm 2018-12-18 09:58:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/osm_activitygen/eichstaett.osm 1970-01-01 00:00:00.000000000 +0000 @@ -1,8120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.add.xml sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.add.xml --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.add.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.add.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.edg.xml sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.edg.xml --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.edg.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.edg.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.netccfg sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.netccfg --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.netccfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.nod.xml sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.nod.xml --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.nod.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.nod.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.rou.xml sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.rou.xml --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.rou.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.rou.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.typ.xml sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.typ.xml --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/circular.typ.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/circular.typ.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/output_file.sumocfg sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/output_file.sumocfg --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/output_file.sumocfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/output_file.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/output_socket.sumocfg sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/output_socket.sumocfg --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/data/output_socket.sumocfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/data/output_socket.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/runner.py sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/output_parsing/runner.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/output_parsing/runner.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file runner.py -# @author Michael Behrisch -# @date 2012-12-09 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function - - -import os -import subprocess -import sys -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")) -from sumolib import checkBinary # noqa - - -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 IOError: - 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) -print(">> Simulation closed with status %s" % retcode) -sys.stdout.flush() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/quickstart/net.net.xml sumo-1.2.0+dfsg1/docs/tutorial/quickstart/net.net.xml --- sumo-1.1.0+dfsg1/docs/tutorial/quickstart/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/quickstart/net.net.xml 2019-04-15 22:14:41.000000000 +0000 @@ -0,0 +1,579 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/quickstart/runner.py sumo-1.2.0+dfsg1/docs/tutorial/quickstart/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/quickstart/runner.py 2018-06-27 22:00:28.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/quickstart/runner.py 2019-01-23 23:00:20.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/analyzeData.py sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/analyzeData.py --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/analyzeData.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/analyzeData.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file analyzeData.py -# @author Daniel Krajzewicz -# @author Laura Bieker -# @date 2011-09-30 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function - -import sys -import os -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] - -# this is from here: http://code.activestate.com/recipes/389639 - - -class Ddict(dict): - - def __init__(self, default=None): - self.default = default - - def __getitem__(self, key): - if key not in self: - self[key] = self.default() - return dict.__getitem__(self, key) - -# os.system('run-an-external-command') -# os.getcwd() -# os.chdir() - - -f = open(sys.argv[1], 'r') -data = f.readlines() -f.close() - -dd = Ddict(lambda: Ddict(lambda: 0)) -# f1 = open('raw-results.txt','w') -f1 = open('tmp.txt', 'w') - -for i in range(1, len(data)): - if data[i].find(' 0: - print(tt, lane, nn, ll[9], ll[11], ll[13], ll[15], file=f1) - 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) -vecIndx = 0 - -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 lane in dd[t]: - 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(s, file=f) -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) - # 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') - # try: - # import pyemf - # plt.savefig('shares-over-time.emf') - # except : - # 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.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.show() - plt.close() -except ImportError: - print('no matplotlib, falling back to gnuplot') - os.system('gnuplot do-some-plots.gnu') diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_det.add.xml sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_det.add.xml --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_det.add.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_det.add.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_1.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_1.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_1.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_1.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2298 +0,0 @@ -06:47:46 -06:47:51 -06:47:52 -06:47:53 -06:47:54 -06:47:56 -06:47:57 -06:47:58 -06:48:00 -06:48:01 -06:48:02 -06:48:05 -06:48:06 -06:48:09 -06:48:14 -06:48:15 -06:48:16 -06:48:19 -06:48:22 -06:48:23 -06:48:25 -06:48:27 -06:48:28 -06:48:30 -06:48:31 -06:48:32 -06:48:34 -06:48:37 -06:48:38 -06:48:40 -06:48:41 -06:48:42 -06:48:44 -06:48:45 -06:48:47 -06:48:49 -06:48:51 -06:48:52 -06:48:53 -06:48:54 -06:48:55 -06:49:00 -06:49:05 -06:49:11 -06:49:13 -06:49:16 -06:49:19 -06:49:21 -06:49:22 -06:49:24 -06:49:25 -06:49:29 -06:49:31 -06:49:33 -06:49:34 -06:49:39 -06:49:40 -06:49:42 -06:49:44 -06:50:05 -06:50:07 -06:50:09 -06:50:11 -06:50:13 -06:50:14 -06:50:16 -06:50:18 -06:50:19 -06:50:24 -06:50:24 -06:50:27 -06:50:31 -06:50:33 -06:50:34 -06:50:35 -06:50:37 -06:50:40 -06:50:45 -06:50:58 -06:51:00 -06:51:03 -06:51:04 -06:51:05 -06:51:06 -06:51:07 -06:51:09 -06:51:15 -06:51:16 -06:51:17 -06:51:19 -06:51:21 -06:51:22 -06:51:24 -06:51:25 -06:51:27 -06:51:28 -06:51:34 -06:51:34 -06:51:36 -06:51:41 -06:51:43 -06:51:44 -06:51:45 -06:51:47 -06:51:48 -06:51:50 -06:51:52 -06:51:53 -06:51:55 -06:51:56 -06:51:59 -06:52:01 -06:52:02 -06:52:04 -06:52:13 -06:52:22 -06:52:23 -06:52:24 -06:52:25 -06:52:25 -06:52:26 -06:52:27 -06:52:28 -06:52:30 -06:52:35 -06:52:39 -06:52:41 -06:52:43 -06:53:11 -06:53:13 -06:53:14 -06:53:15 -06:53:17 -06:53:18 -06:53:20 -06:53:23 -06:53:24 -06:53:25 -06:53:26 -06:53:27 -06:53:28 -06:53:30 -06:53:31 -06:53:32 -06:53:33 -06:53:34 -06:53:35 -06:53:38 -06:53:40 -06:53:42 -06:53:44 -06:53:46 -06:53:56 -06:53:58 -06:54:03 -06:54:04 -06:54:09 -06:54:11 -06:54:13 -06:54:16 -06:54:19 -06:54:21 -06:54:22 -06:54:22 -06:54:24 -06:54:26 -06:54:27 -06:54:28 -06:54:30 -06:54:32 -06:54:33 -06:54:35 -06:54:37 -06:54:38 -06:54:40 -06:54:41 -06:54:42 -06:54:43 -06:54:44 -06:54:46 -06:54:47 -06:54:51 -06:54:53 -06:54:54 -06:54:55 -06:54:57 -06:55:00 -06:55:02 -06:55:07 -06:55:20 -06:55:22 -06:55:23 -06:55:26 -06:55:27 -06:55:28 -06:55:29 -06:55:30 -06:55:32 -06:55:34 -06:55:35 -06:55:38 -06:55:39 -06:55:42 -06:55:44 -06:55:47 -06:55:47 -06:55:50 -06:55:56 -06:55:58 -06:55:59 -06:56:00 -06:56:02 -06:56:03 -06:56:05 -06:56:07 -06:56:12 -06:56:14 -06:56:15 -06:56:17 -06:56:19 -06:56:20 -06:56:22 -06:56:24 -06:56:26 -06:56:28 -06:56:30 -06:56:44 -06:56:46 -06:56:49 -06:56:50 -06:56:51 -06:56:53 -06:56:57 -06:57:00 -06:57:01 -06:57:08 -06:57:10 -06:57:15 -06:57:16 -06:57:18 -06:57:21 -06:57:23 -06:57:51 -06:57:54 -06:57:55 -06:57:57 -06:57:58 -06:58:00 -06:58:02 -06:58:03 -06:58:05 -06:58:07 -06:58:08 -06:58:09 -06:58:10 -06:58:14 -06:58:15 -06:58:17 -06:58:18 -06:58:20 -06:58:21 -06:58:23 -06:58:26 -06:58:28 -06:58:31 -06:58:32 -06:58:35 -06:58:36 -06:58:37 -06:58:39 -06:58:41 -06:58:44 -06:58:45 -06:58:46 -06:58:47 -06:58:49 -06:58:50 -06:58:53 -06:58:55 -06:58:56 -06:58:57 -06:59:09 -06:59:11 -06:59:13 -06:59:16 -06:59:20 -06:59:21 -06:59:23 -06:59:24 -06:59:27 -06:59:29 -06:59:30 -06:59:31 -06:59:33 -06:59:34 -06:59:36 -06:59:38 -06:59:40 -06:59:41 -06:59:42 -06:59:49 -06:59:49 -06:59:52 -06:59:55 -06:59:55 -06:59:57 -07:00:05 -07:00:07 -07:00:08 -07:00:10 -07:00:12 -07:00:13 -07:00:18 -07:00:19 -07:00:20 -07:00:23 -07:00:28 -07:00:34 -07:00:35 -07:00:36 -07:00:38 -07:00:42 -07:00:43 -07:00:44 -07:00:48 -07:00:50 -07:00:51 -07:00:58 -07:01:01 -07:01:03 -07:01:22 -07:01:24 -07:01:26 -07:01:33 -07:01:39 -07:01:40 -07:01:42 -07:01:44 -07:01:45 -07:01:47 -07:01:48 -07:01:49 -07:01:50 -07:01:52 -07:01:53 -07:01:54 -07:01:56 -07:01:57 -07:01:58 -07:02:00 -07:02:05 -07:02:08 -07:02:09 -07:02:10 -07:02:11 -07:02:13 -07:02:15 -07:02:17 -07:02:18 -07:02:20 -07:02:22 -07:02:25 -07:02:27 -07:02:30 -07:02:33 -07:02:33 -07:02:35 -07:02:38 -07:02:39 -07:02:41 -07:02:42 -07:02:44 -07:02:54 -07:02:54 -07:02:58 -07:02:59 -07:03:01 -07:03:03 -07:03:04 -07:03:06 -07:03:07 -07:03:08 -07:03:10 -07:03:12 -07:03:13 -07:03:15 -07:03:16 -07:03:18 -07:03:20 -07:03:22 -07:03:24 -07:03:26 -07:03:29 -07:03:31 -07:03:32 -07:03:34 -07:03:35 -07:03:37 -07:03:42 -07:03:43 -07:03:44 -07:04:06 -07:04:07 -07:04:09 -07:04:10 -07:04:11 -07:04:13 -07:04:14 -07:04:15 -07:04:17 -07:04:19 -07:04:21 -07:04:30 -07:04:32 -07:04:33 -07:04:34 -07:04:38 -07:04:44 -07:04:52 -07:04:53 -07:04:54 -07:04:55 -07:04:57 -07:04:58 -07:05:00 -07:05:02 -07:05:05 -07:05:06 -07:05:08 -07:05:10 -07:05:16 -07:05:18 -07:05:20 -07:05:21 -07:05:22 -07:05:24 -07:05:25 -07:05:28 -07:05:31 -07:05:36 -07:05:39 -07:05:40 -07:05:43 -07:05:45 -07:05:46 -07:05:48 -07:05:50 -07:05:52 -07:06:03 -07:06:04 -07:06:07 -07:06:09 -07:06:11 -07:06:12 -07:06:13 -07:06:14 -07:06:24 -07:06:26 -07:06:28 -07:06:31 -07:06:35 -07:06:38 -07:06:40 -07:06:41 -07:06:43 -07:06:48 -07:06:50 -07:06:51 -07:06:53 -07:06:55 -07:07:04 -07:07:05 -07:07:07 -07:07:09 -07:07:11 -07:07:13 -07:07:14 -07:07:15 -07:07:17 -07:07:21 -07:07:26 -07:07:28 -07:07:29 -07:07:31 -07:07:32 -07:07:33 -07:07:36 -07:07:37 -07:07:38 -07:07:45 -07:07:46 -07:07:48 -07:07:51 -07:07:52 -07:08:07 -07:08:08 -07:08:10 -07:08:11 -07:08:12 -07:08:14 -07:08:16 -07:08:17 -07:08:21 -07:08:22 -07:08:23 -07:08:26 -07:08:28 -07:08:29 -07:08:32 -07:08:35 -07:08:36 -07:08:40 -07:08:41 -07:08:43 -07:08:44 -07:08:47 -07:08:48 -07:08:49 -07:08:51 -07:08:53 -07:08:59 -07:09:01 -07:09:07 -07:09:09 -07:09:12 -07:09:18 -07:09:20 -07:09:23 -07:09:24 -07:09:28 -07:09:30 -07:09:34 -07:09:36 -07:09:39 -07:09:42 -07:09:52 -07:09:54 -07:09:55 -07:09:57 -07:09:59 -07:10:01 -07:10:06 -07:10:08 -07:10:12 -07:10:13 -07:10:16 -07:10:20 -07:10:21 -07:10:22 -07:10:29 -07:10:31 -07:10:32 -07:10:34 -07:10:35 -07:10:38 -07:10:39 -07:10:42 -07:10:43 -07:10:44 -07:10:45 -07:10:48 -07:10:50 -07:10:52 -07:10:54 -07:10:55 -07:10:57 -07:10:59 -07:11:02 -07:11:04 -07:11:06 -07:11:09 -07:11:10 -07:11:15 -07:11:17 -07:11:18 -07:11:19 -07:11:24 -07:11:26 -07:11:28 -07:11:33 -07:11:35 -07:11:36 -07:11:42 -07:11:43 -07:11:44 -07:11:46 -07:11:50 -07:11:52 -07:11:55 -07:11:57 -07:11:59 -07:12:07 -07:12:09 -07:12:12 -07:12:14 -07:12:16 -07:12:19 -07:12:22 -07:12:24 -07:12:26 -07:12:27 -07:12:28 -07:12:29 -07:12:30 -07:12:33 -07:12:34 -07:12:36 -07:12:37 -07:12:40 -07:12:44 -07:12:47 -07:12:49 -07:12:52 -07:12:53 -07:12:54 -07:12:55 -07:12:57 -07:12:59 -07:13:00 -07:13:01 -07:13:02 -07:13:04 -07:13:05 -07:13:12 -07:13:15 -07:13:17 -07:13:23 -07:13:24 -07:13:26 -07:13:27 -07:13:29 -07:13:30 -07:13:31 -07:13:35 -07:13:36 -07:13:38 -07:13:39 -07:13:41 -07:13:44 -07:13:45 -07:13:56 -07:13:57 -07:14:02 -07:14:05 -07:14:06 -07:14:07 -07:14:10 -07:14:11 -07:14:12 -07:14:14 -07:14:15 -07:14:17 -07:14:17 -07:14:19 -07:14:20 -07:14:21 -07:14:25 -07:14:29 -07:14:30 -07:14:32 -07:14:33 -07:14:35 -07:14:36 -07:14:40 -07:14:42 -07:14:43 -07:14:45 -07:14:47 -07:14:56 -07:14:57 -07:15:00 -07:15:01 -07:15:03 -07:15:04 -07:15:06 -07:15:09 -07:15:10 -07:15:11 -07:15:12 -07:15:13 -07:15:21 -07:15:23 -07:15:25 -07:15:29 -07:15:30 -07:15:51 -07:15:54 -07:15:57 -07:15:58 -07:15:59 -07:16:01 -07:16:04 -07:16:05 -07:16:07 -07:16:08 -07:16:10 -07:16:11 -07:16:13 -07:16:14 -07:16:32 -07:16:34 -07:16:35 -07:16:36 -07:16:38 -07:16:39 -07:16:40 -07:16:43 -07:16:44 -07:16:45 -07:16:47 -07:17:03 -07:17:03 -07:17:05 -07:17:08 -07:17:10 -07:17:11 -07:17:13 -07:17:14 -07:17:16 -07:17:16 -07:17:19 -07:17:21 -07:17:22 -07:17:24 -07:17:24 -07:17:27 -07:17:30 -07:17:45 -07:17:47 -07:17:49 -07:17:51 -07:17:53 -07:17:55 -07:17:57 -07:17:58 -07:18:00 -07:18:02 -07:18:03 -07:18:05 -07:18:09 -07:18:10 -07:18:12 -07:18:13 -07:18:14 -07:18:23 -07:18:24 -07:18:25 -07:18:27 -07:18:30 -07:18:32 -07:18:33 -07:18:36 -07:18:37 -07:18:38 -07:18:40 -07:18:42 -07:18:47 -07:18:48 -07:18:49 -07:18:50 -07:18:51 -07:18:53 -07:18:54 -07:18:56 -07:18:58 -07:19:00 -07:19:02 -07:19:06 -07:19:09 -07:19:11 -07:19:13 -07:19:15 -07:19:17 -07:19:18 -07:19:20 -07:19:21 -07:19:26 -07:19:32 -07:19:33 -07:19:35 -07:19:36 -07:19:38 -07:19:39 -07:19:40 -07:19:41 -07:19:43 -07:19:44 -07:19:47 -07:19:48 -07:20:08 -07:20:09 -07:20:11 -07:20:13 -07:20:14 -07:20:16 -07:20:17 -07:20:18 -07:20:20 -07:20:23 -07:20:26 -07:20:27 -07:20:28 -07:20:29 -07:20:31 -07:20:32 -07:20:34 -07:20:37 -07:20:42 -07:20:44 -07:20:47 -07:20:48 -07:20:50 -07:20:51 -07:20:52 -07:21:00 -07:21:01 -07:21:06 -07:21:07 -07:21:09 -07:21:11 -07:21:14 -07:21:16 -07:21:18 -07:21:19 -07:21:24 -07:21:26 -07:21:27 -07:21:28 -07:21:30 -07:21:31 -07:21:34 -07:21:34 -07:21:36 -07:21:38 -07:21:40 -07:21:41 -07:21:42 -07:21:43 -07:21:53 -07:21:54 -07:22:10 -07:22:11 -07:22:13 -07:22:15 -07:22:16 -07:22:18 -07:22:21 -07:22:22 -07:22:23 -07:22:24 -07:22:25 -07:22:27 -07:22:28 -07:22:31 -07:22:46 -07:22:47 -07:22:58 -07:23:01 -07:23:03 -07:23:08 -07:23:10 -07:23:11 -07:23:14 -07:23:16 -07:23:19 -07:23:21 -07:23:22 -07:23:23 -07:23:24 -07:23:26 -07:23:27 -07:23:29 -07:23:30 -07:23:31 -07:23:31 -07:23:33 -07:23:34 -07:23:35 -07:23:38 -07:23:40 -07:23:41 -07:23:42 -07:23:50 -07:23:51 -07:23:54 -07:23:55 -07:23:56 -07:23:57 -07:24:02 -07:24:04 -07:24:05 -07:24:07 -07:24:10 -07:24:16 -07:24:19 -07:24:26 -07:24:28 -07:24:30 -07:24:31 -07:24:32 -07:24:34 -07:24:35 -07:24:38 -07:24:40 -07:24:44 -07:24:47 -07:24:49 -07:24:50 -07:24:51 -07:24:52 -07:25:13 -07:25:15 -07:25:17 -07:25:20 -07:25:21 -07:25:23 -07:25:27 -07:25:29 -07:25:31 -07:25:32 -07:25:36 -07:25:38 -07:25:43 -07:25:44 -07:25:46 -07:25:47 -07:25:50 -07:25:51 -07:25:52 -07:25:54 -07:25:55 -07:25:56 -07:26:00 -07:26:02 -07:26:05 -07:26:07 -07:26:08 -07:26:09 -07:26:10 -07:26:11 -07:26:13 -07:26:15 -07:26:17 -07:26:19 -07:26:20 -07:26:22 -07:26:23 -07:26:27 -07:26:43 -07:26:44 -07:26:45 -07:26:47 -07:26:49 -07:26:53 -07:27:44 -07:27:46 -07:27:48 -07:27:50 -07:27:53 -07:27:54 -07:27:55 -07:27:57 -07:27:58 -07:27:59 -07:28:01 -07:28:04 -07:28:05 -07:28:07 -07:28:11 -07:28:19 -07:28:20 -07:28:21 -07:28:23 -07:28:25 -07:28:26 -07:28:27 -07:28:29 -07:28:30 -07:28:32 -07:28:33 -07:28:35 -07:28:39 -07:28:42 -07:28:44 -07:28:47 -07:28:50 -07:28:51 -07:28:52 -07:28:53 -07:28:55 -07:29:00 -07:29:01 -07:29:03 -07:29:05 -07:29:06 -07:29:07 -07:29:08 -07:29:11 -07:29:12 -07:29:14 -07:29:16 -07:29:19 -07:29:21 -07:29:22 -07:29:24 -07:29:41 -07:29:44 -07:29:50 -07:29:53 -07:30:07 -07:30:19 -07:30:27 -07:30:31 -07:30:36 -07:30:38 -07:30:39 -07:30:44 -07:30:46 -07:30:56 -07:30:58 -07:30:59 -07:31:01 -07:31:03 -07:31:05 -07:31:07 -07:31:08 -07:31:09 -07:31:10 -07:31:12 -07:31:13 -07:31:15 -07:31:17 -07:31:20 -07:31:21 -07:31:23 -07:31:25 -07:31:27 -07:31:31 -07:31:32 -07:31:37 -07:31:39 -07:31:43 -07:31:46 -07:31:47 -07:31:49 -07:31:54 -07:31:55 -07:31:59 -07:32:00 -07:32:02 -07:32:03 -07:32:05 -07:32:05 -07:32:08 -07:32:11 -07:32:16 -07:32:18 -07:32:19 -07:32:21 -07:32:23 -07:32:26 -07:32:32 -07:32:33 -07:32:37 -07:32:39 -07:32:41 -07:32:43 -07:32:45 -07:32:46 -07:32:48 -07:32:50 -07:32:57 -07:32:59 -07:33:03 -07:33:06 -07:33:08 -07:33:09 -07:33:11 -07:33:12 -07:33:14 -07:33:15 -07:33:16 -07:33:17 -07:33:19 -07:33:21 -07:33:23 -07:33:24 -07:33:35 -07:33:36 -07:33:44 -07:33:45 -07:33:47 -07:33:51 -07:34:01 -07:34:03 -07:34:15 -07:34:18 -07:34:19 -07:34:28 -07:34:30 -07:34:31 -07:34:32 -07:34:33 -07:34:35 -07:34:36 -07:34:42 -07:34:44 -07:34:45 -07:34:46 -07:34:48 -07:34:50 -07:34:51 -07:35:01 -07:35:05 -07:35:07 -07:35:13 -07:35:14 -07:35:16 -07:35:17 -07:35:18 -07:35:20 -07:35:25 -07:35:27 -07:35:28 -07:35:29 -07:35:31 -07:35:38 -07:35:38 -07:35:42 -07:35:44 -07:35:51 -07:35:58 -07:36:04 -07:36:06 -07:36:10 -07:36:12 -07:36:13 -07:36:27 -07:36:29 -07:36:30 -07:36:31 -07:36:33 -07:36:34 -07:36:36 -07:36:38 -07:36:39 -07:36:51 -07:36:52 -07:37:02 -07:37:03 -07:37:09 -07:37:11 -07:37:14 -07:37:18 -07:37:20 -07:37:26 -07:37:40 -07:37:43 -07:37:44 -07:37:48 -07:37:55 -07:37:58 -07:38:00 -07:38:02 -07:38:05 -07:38:08 -07:38:11 -07:38:12 -07:38:14 -07:38:16 -07:38:33 -07:38:36 -07:38:37 -07:38:38 -07:38:43 -07:38:44 -07:38:46 -07:38:47 -07:38:48 -07:38:49 -07:38:52 -07:39:02 -07:39:04 -07:39:05 -07:39:06 -07:39:10 -07:39:18 -07:39:19 -07:39:19 -07:39:23 -07:39:23 -07:39:24 -07:39:54 -07:39:58 -07:40:00 -07:40:04 -07:40:05 -07:40:09 -07:40:24 -07:40:26 -07:40:28 -07:40:37 -07:40:42 -07:40:43 -07:40:48 -07:40:49 -07:40:54 -07:40:59 -07:41:02 -07:41:04 -07:41:16 -07:41:17 -07:41:19 -07:41:23 -07:41:27 -07:41:29 -07:41:30 -07:42:29 -07:42:31 -07:42:32 -07:42:34 -07:42:35 -07:42:37 -07:42:38 -07:42:40 -07:42:40 -07:42:41 -07:42:42 -07:42:43 -07:42:44 -07:42:46 -07:42:47 -07:42:51 -07:42:53 -07:42:55 -07:42:56 -07:43:00 -07:43:01 -07:43:04 -07:43:06 -07:43:08 -07:43:09 -07:43:10 -07:43:12 -07:43:13 -07:43:21 -07:43:22 -07:43:23 -07:43:24 -07:43:26 -07:43:29 -07:43:30 -07:43:32 -07:43:38 -07:43:40 -07:43:50 -07:43:52 -07:43:53 -07:43:55 -07:43:57 -07:43:59 -07:44:02 -07:44:16 -07:44:18 -07:44:21 -07:44:22 -07:44:25 -07:44:27 -07:44:28 -07:44:29 -07:44:32 -07:44:34 -07:44:49 -07:44:50 -07:44:51 -07:44:53 -07:45:20 -07:45:20 -07:45:22 -07:45:23 -07:45:24 -07:45:26 -07:45:29 -07:45:39 -07:45:43 -07:45:48 -07:45:48 -07:45:49 -07:46:03 -07:46:04 -07:46:04 -07:46:06 -07:46:07 -07:46:09 -07:46:13 -07:46:19 -07:46:21 -07:46:33 -07:46:47 -07:46:49 -07:46:50 -07:46:53 -07:46:56 -07:46:58 -07:47:26 -07:47:27 -07:47:29 -07:47:36 -07:47:38 -07:47:41 -07:47:57 -07:48:33 -07:48:34 -07:48:38 -07:48:40 -07:48:55 -07:48:57 -07:49:25 -07:49:27 -07:49:29 -07:49:31 -07:49:33 -07:49:34 -07:49:36 -07:49:37 -07:49:40 -07:49:41 -07:49:42 -07:49:44 -07:49:46 -07:49:48 -07:49:49 -07:49:50 -07:49:51 -07:49:52 -07:49:53 -07:49:55 -07:49:58 -07:50:00 -07:50:02 -07:50:05 -07:50:06 -07:50:09 -07:50:12 -07:50:26 -07:50:38 -07:50:39 -07:50:40 -07:50:42 -07:50:43 -07:50:46 -07:50:48 -07:50:51 -07:50:57 -07:51:01 -07:51:02 -07:51:03 -07:51:12 -07:51:13 -07:51:15 -07:51:16 -07:51:52 -07:51:54 -07:51:55 -07:51:58 -07:52:00 -07:52:01 -07:52:02 -07:52:22 -07:52:24 -07:52:25 -07:52:26 -07:52:29 -07:52:30 -07:52:33 -07:52:39 -07:52:46 -07:52:48 -07:52:51 -07:52:54 -07:52:55 -07:53:01 -07:53:03 -07:53:05 -07:53:09 -07:53:11 -07:53:12 -07:53:13 -07:53:16 -07:53:17 -07:53:19 -07:53:20 -07:53:25 -07:53:46 -07:53:58 -07:54:04 -07:54:04 -07:54:06 -07:54:07 -07:54:08 -07:54:09 -07:54:11 -07:54:14 -07:54:15 -07:54:17 -07:54:19 -07:54:19 -07:54:20 -07:54:22 -07:54:25 -07:54:27 -07:54:28 -07:54:30 -07:54:32 -07:54:43 -07:54:44 -07:54:45 -07:54:46 -07:54:47 -07:54:48 -07:54:53 -07:55:15 -07:55:17 -07:55:18 -07:55:19 -07:55:20 -07:55:23 -07:55:24 -07:55:26 -07:55:27 -07:55:29 -07:55:44 -07:55:47 -07:55:48 -07:55:50 -07:55:51 -07:55:58 -07:56:00 -07:56:04 -07:56:05 -07:56:24 -07:56:35 -07:56:41 -07:56:43 -07:56:59 -07:57:12 -07:57:14 -07:57:15 -07:57:16 -07:57:17 -07:57:19 -07:57:20 -07:57:21 -07:57:23 -07:57:24 -07:57:26 -07:57:27 -07:57:29 -07:57:30 -07:57:32 -07:57:33 -07:57:35 -07:57:36 -07:57:37 -07:57:39 -07:57:40 -07:57:41 -07:57:43 -07:57:44 -07:57:45 -07:57:48 -07:57:49 -07:57:55 -07:58:00 -07:58:01 -07:58:04 -07:58:06 -07:58:19 -07:58:22 -07:58:25 -07:58:29 -07:58:30 -07:58:35 -07:58:36 -07:58:38 -07:58:39 -07:58:43 -07:58:45 -07:58:48 -07:58:49 -07:58:51 -07:59:01 -07:59:06 -07:59:08 -07:59:10 -07:59:13 -07:59:15 -07:59:26 -07:59:28 -07:59:30 -07:59:39 -07:59:40 -07:59:42 -07:59:43 -07:59:45 -07:59:47 -07:59:49 -07:59:51 -07:59:52 -07:59:54 -07:59:56 -07:59:57 -08:00:03 -08:00:18 -08:00:21 -08:00:23 -08:00:25 -08:00:26 -08:00:27 -08:00:31 -08:00:41 -08:00:45 -08:00:47 -08:00:50 -08:00:52 -08:00:53 -08:01:00 -08:01:01 -08:01:38 -08:01:44 -08:01:46 -08:01:47 -08:01:50 -08:02:51 -08:02:54 -08:02:56 -08:02:58 -08:03:00 -08:03:02 -08:03:03 -08:03:05 -08:03:07 -08:03:08 -08:03:10 -08:03:12 -08:03:14 -08:03:15 -08:03:17 -08:03:19 -08:03:22 -08:03:25 -08:03:29 -08:03:30 -08:03:32 -08:03:36 -08:03:37 -08:03:38 -08:03:40 -08:03:43 -08:03:44 -08:03:45 -08:03:48 -08:04:01 -08:04:02 -08:04:04 -08:04:07 -08:04:16 -08:04:17 -08:04:19 -08:04:20 -08:04:22 -08:04:23 -08:04:24 -08:04:26 -08:04:27 -08:04:28 -08:04:35 -08:04:36 -08:04:46 -08:04:48 -08:04:54 -08:04:56 -08:04:57 -08:04:59 -08:05:01 -08:05:21 -08:05:22 -08:05:30 -08:05:31 -08:05:32 -08:05:33 -08:05:34 -08:05:35 -08:05:43 -08:05:53 -08:06:39 -08:06:41 -08:06:42 -08:06:44 -08:06:45 -08:06:46 -08:06:47 -08:06:48 -08:06:49 -08:06:55 -08:06:56 -08:06:57 -08:07:04 -08:07:42 -08:07:43 -08:07:47 -08:07:48 -08:07:51 -08:07:57 -08:07:58 -08:07:59 -08:08:00 -08:08:02 -08:08:03 -08:08:10 -08:08:20 -08:08:26 -08:08:29 -08:08:42 -08:08:43 -08:08:44 -08:09:09 -08:09:16 -08:09:18 -08:09:49 -08:09:50 -08:09:52 -08:09:53 -08:09:56 -08:09:57 -08:09:59 -08:10:00 -08:10:01 -08:10:05 -08:10:06 -08:10:08 -08:10:09 -08:10:12 -08:10:13 -08:10:15 -08:10:30 -08:10:33 -08:10:36 -08:10:40 -08:10:41 -08:10:43 -08:10:45 -08:10:46 -08:10:49 -08:10:50 -08:10:51 -08:10:55 -08:10:57 -08:10:58 -08:11:25 -08:11:29 -08:11:31 -08:11:32 -08:11:47 -08:11:49 -08:11:52 -08:11:54 -08:11:55 -08:11:59 -08:12:03 -08:12:10 -08:12:20 -08:12:25 -08:12:29 -08:12:34 -08:12:45 -08:12:47 -08:12:50 -08:12:52 -08:12:53 -08:12:54 -08:12:55 -08:12:57 -08:12:58 -08:13:00 -08:13:27 -08:13:29 -08:13:32 -08:13:33 -08:13:36 -08:13:37 -08:13:38 -08:13:39 -08:13:40 -08:13:43 -08:13:44 -08:13:46 -08:13:47 -08:13:49 -08:13:50 -08:14:01 -08:14:01 -08:14:03 -08:14:05 -08:14:06 -08:14:14 -08:14:15 -08:14:17 -08:14:17 -08:14:23 -08:14:26 -08:14:27 -08:14:28 -08:14:30 -08:14:44 -08:14:46 -08:14:48 -08:14:48 -08:14:50 -08:14:52 -08:14:56 -08:14:58 -08:15:14 -08:15:18 -08:15:20 -08:15:21 -08:15:26 -08:15:27 -08:15:29 -08:15:37 -08:15:39 -08:15:41 -08:15:42 -08:15:48 -08:15:55 -08:16:05 -08:16:07 -08:16:10 -08:16:11 -08:16:24 -08:16:27 -08:16:29 -08:16:30 -08:16:31 -08:16:46 -08:16:47 -08:16:48 -08:16:52 -08:16:54 -08:16:55 -08:16:57 -08:16:59 -08:17:01 -08:17:03 -08:17:05 -08:17:08 -08:17:16 -08:17:18 -08:17:20 -08:17:22 -08:17:30 -08:17:34 -08:17:35 -08:17:41 -08:17:42 -08:17:44 -08:17:52 -08:17:54 -08:17:58 -08:18:01 -08:18:07 -08:18:12 -08:18:13 -08:18:16 -08:18:17 -08:18:18 -08:18:20 -08:18:23 -08:18:25 -08:18:27 -08:18:29 -08:18:36 -08:18:43 -08:18:46 -08:18:50 -08:18:55 -08:18:56 -08:18:57 -08:19:01 -08:19:02 -08:19:05 -08:19:07 -08:19:08 -08:19:10 -08:19:11 -08:19:13 -08:19:15 -08:19:38 -08:19:44 -08:19:45 -08:19:46 -08:19:47 -08:19:48 -08:19:49 -08:19:51 -08:19:52 -08:19:54 -08:19:55 -08:19:59 -08:20:00 -08:20:18 -08:20:21 -08:20:22 -08:20:24 -08:20:26 -08:20:27 -08:20:29 -08:20:31 -08:20:32 -08:20:33 -08:20:35 -08:20:39 -08:20:48 -08:21:05 -08:21:07 -08:21:09 -08:21:10 -08:21:11 -08:21:12 -08:21:14 -08:21:15 -08:21:17 -08:21:24 -08:21:26 -08:21:27 -08:21:51 -08:21:57 -08:21:58 -08:22:00 -08:22:09 -08:22:12 -08:22:13 -08:22:15 -08:22:29 -08:22:31 -08:22:33 -08:22:34 -08:22:38 -08:22:49 -08:22:50 -08:22:52 -08:22:55 -08:22:56 -08:22:59 -08:23:13 -08:23:14 -08:23:16 -08:24:24 -08:24:25 -08:24:29 -08:24:33 -08:24:34 -08:24:36 -08:24:38 -08:24:39 -08:24:43 -08:24:47 -08:24:50 -08:24:54 -08:24:56 -08:25:09 -08:25:11 -08:25:13 -08:25:15 -08:25:16 -08:25:19 -08:25:23 -08:25:25 -08:25:26 -08:25:28 -08:25:29 -08:25:32 -08:25:33 -08:25:35 -08:25:36 -08:25:38 -08:25:47 -08:25:49 -08:25:50 -08:25:51 -08:25:53 -08:25:57 -08:26:03 -08:26:04 -08:26:10 -08:26:11 -08:26:14 -08:26:15 -08:26:16 -08:26:18 -08:26:20 -08:26:22 -08:26:24 -08:26:27 -08:26:28 -08:26:29 -08:26:33 -08:26:34 -08:26:37 -08:26:43 -08:27:09 -08:27:11 -08:27:13 -08:27:15 -08:27:16 -08:27:17 -08:27:19 -08:27:21 -08:27:23 -08:27:26 -08:27:27 -08:27:28 -08:27:29 -08:27:31 -08:27:32 -08:27:33 -08:27:38 -08:27:40 -08:27:41 -08:27:43 -08:27:44 -08:27:47 -08:27:59 -08:28:06 -08:28:18 -08:28:19 -08:28:31 -08:28:34 -08:28:38 -08:28:40 -08:28:42 -08:28:46 -08:28:47 -08:28:49 -08:28:53 -08:28:55 -08:28:57 -08:29:05 -08:29:06 -08:29:09 -08:29:10 -08:29:12 -08:29:14 -08:29:16 -08:29:32 -08:29:41 -08:29:43 -08:29:44 -08:29:46 -08:29:49 -08:29:50 -08:29:51 -08:29:52 -08:29:53 -08:29:59 -08:30:01 -08:30:07 -08:30:09 -08:30:20 -08:30:28 -08:30:29 -08:30:30 -08:30:46 -08:30:48 -08:30:50 -08:30:51 -08:30:52 -08:30:53 -08:30:55 -08:31:02 -08:31:03 -08:31:04 -08:31:06 -08:31:08 -08:31:10 -08:31:14 -08:31:15 -08:31:22 -08:31:23 -08:31:25 -08:31:26 -08:31:27 -08:31:31 -08:31:33 -08:31:35 -08:31:36 -08:31:41 -08:31:42 -08:31:47 -08:31:49 -08:31:52 -08:31:55 -08:32:57 -08:33:01 -08:33:02 -08:33:03 -08:33:05 -08:33:07 -08:33:09 -08:33:11 -08:33:12 -08:33:13 -08:33:15 -08:33:16 -08:33:29 -08:33:30 -08:33:32 -08:33:34 -08:33:38 -08:33:40 -08:33:41 -08:33:55 -08:33:58 -08:34:00 -08:34:00 -08:34:02 -08:34:06 -08:34:08 -08:34:09 -08:34:32 -08:34:33 -08:34:38 -08:34:40 -08:34:44 -08:34:47 -08:34:49 -08:34:50 -08:34:53 -08:34:57 -08:34:59 -08:35:04 -08:35:06 -08:35:07 -08:35:09 -08:35:14 -08:35:16 -08:35:17 -08:35:20 -08:35:26 -08:35:27 -08:35:47 -08:35:49 -08:35:52 -08:35:54 -08:35:55 -08:35:58 -08:36:08 -08:36:21 -08:36:31 -08:36:32 -08:36:35 -08:36:36 -08:36:43 -08:36:45 -08:36:46 -08:36:49 -08:36:50 -08:36:51 -08:36:54 -08:36:56 -08:37:04 -08:37:05 -08:37:06 -08:37:16 -08:37:17 -08:37:21 -08:37:23 -08:37:25 -08:37:27 -08:37:29 -08:37:41 -08:37:51 -08:37:52 -08:37:57 -08:38:01 -08:38:05 -08:38:12 -08:38:13 -08:38:16 -08:38:19 -08:38:21 -08:38:22 -08:38:35 -08:38:40 -08:38:41 -08:38:58 -08:39:00 -08:39:02 -08:39:04 -08:39:10 -08:39:12 -08:39:13 -08:39:15 -08:39:17 -08:39:28 -08:39:29 -08:39:31 -08:39:44 -08:39:46 -08:40:00 -08:40:02 -08:40:13 -08:40:17 -08:40:18 -08:40:19 -08:40:20 -08:40:22 -08:40:23 -08:40:28 -08:40:29 -08:40:30 -08:40:32 -08:41:05 -08:41:07 -08:41:17 -08:41:28 -08:41:29 -08:41:52 -08:41:54 -08:42:08 -08:42:13 -08:42:17 -08:42:38 -08:42:40 -08:42:41 -08:42:43 -08:42:44 -08:42:46 -08:42:48 -08:42:49 -08:42:50 -08:42:59 -08:43:01 -08:43:02 -08:43:06 -08:43:58 -08:43:59 -08:44:00 -08:44:01 -08:44:03 -08:44:04 -08:44:34 -08:44:36 -08:44:37 -08:44:51 -08:44:58 -08:45:00 -08:45:01 -08:45:04 -08:45:06 -08:45:10 -08:45:12 -08:45:13 -08:45:16 -08:45:18 -08:45:22 -08:45:23 -08:45:26 -08:45:38 -08:45:42 -08:45:43 -08:45:44 -08:45:46 -08:45:47 -08:45:50 -08:46:01 -08:46:02 -08:46:04 -08:46:28 -08:46:29 -08:46:30 -08:46:42 -08:46:43 -08:46:56 -08:47:04 -08:47:08 -08:47:09 -08:47:21 -08:47:22 -08:47:23 -08:47:25 -08:47:26 -08:47:30 -08:47:50 -08:47:52 -08:47:55 -08:47:56 -08:47:58 -08:48:12 -08:48:17 -08:48:18 -08:48:24 -08:48:47 -08:48:49 -08:48:55 -08:49:00 -08:49:26 -08:49:27 -08:49:30 -08:49:34 -08:49:50 -08:49:53 -08:49:54 -08:49:56 -08:49:58 -08:49:59 -08:50:02 -08:50:03 -08:50:09 -08:50:11 -08:50:13 -08:50:18 -08:50:29 -08:50:31 -08:50:32 -08:50:33 -08:50:43 -08:50:46 -08:50:53 -08:50:54 -08:51:14 -08:51:17 -08:51:18 -08:51:20 -08:51:22 -08:51:23 -08:51:30 -08:51:32 -08:51:33 -08:51:44 -08:51:46 -08:51:49 -08:51:55 -08:51:57 -08:51:58 -08:52:08 -08:52:09 -08:52:15 -08:52:19 -08:52:21 -08:52:25 -08:52:27 -08:52:28 -08:52:52 -08:52:56 -08:52:57 -08:53:09 -08:53:17 -08:54:02 -08:54:05 -08:54:06 -08:54:07 -08:54:12 -08:54:14 -08:54:15 -08:54:16 -08:54:17 -08:54:18 -08:54:21 -08:54:23 -08:54:25 -08:54:26 -08:54:27 -08:54:28 -08:54:30 -08:54:31 -08:54:41 -08:54:42 -08:54:44 -08:54:45 -08:54:47 -08:54:48 -08:54:58 -08:55:11 -08:55:16 -08:55:26 -08:55:29 -08:55:33 -08:55:45 -08:55:58 -08:56:07 -08:56:09 -08:56:12 -08:56:53 -08:56:59 -08:57:03 -08:57:12 -08:57:15 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_2.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_2.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_2.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_2.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2298 +0,0 @@ -06:49:57 -06:50:01 -06:50:03 -06:50:04 -06:50:05 -06:50:09 -06:50:11 -06:50:13 -06:50:15 -06:50:16 -06:50:19 -06:50:22 -06:50:23 -06:50:26 -06:50:34 -06:50:35 -06:50:36 -06:50:38 -06:50:42 -06:50:43 -06:50:45 -06:50:48 -06:50:49 -06:50:50 -06:50:51 -06:50:53 -06:50:54 -06:50:57 -06:50:58 -06:50:59 -06:51:00 -06:51:01 -06:51:02 -06:51:05 -06:51:07 -06:51:08 -06:51:10 -06:51:12 -06:51:13 -06:51:15 -06:51:16 -06:51:20 -06:51:24 -06:51:27 -06:51:28 -06:51:31 -06:51:32 -06:51:34 -06:51:35 -06:51:37 -06:51:38 -06:51:40 -06:51:42 -06:51:43 -06:51:44 -06:51:45 -06:51:47 -06:51:48 -06:51:49 -06:52:25 -06:52:28 -06:52:29 -06:52:31 -06:52:33 -06:52:34 -06:52:36 -06:52:37 -06:52:39 -06:52:41 -06:52:42 -06:52:44 -06:52:46 -06:52:47 -06:52:49 -06:52:50 -06:52:52 -06:52:54 -06:52:56 -06:52:59 -06:53:01 -06:53:09 -06:53:10 -06:53:11 -06:53:12 -06:53:13 -06:53:14 -06:53:17 -06:53:19 -06:53:21 -06:53:22 -06:53:26 -06:53:28 -06:53:30 -06:53:32 -06:53:33 -06:53:35 -06:53:36 -06:53:37 -06:53:38 -06:53:40 -06:53:44 -06:53:45 -06:53:46 -06:53:49 -06:53:52 -06:53:54 -06:53:56 -06:53:58 -06:53:58 -06:54:01 -06:54:02 -06:54:07 -06:54:09 -06:54:10 -06:54:14 -06:54:15 -06:54:33 -06:54:33 -06:54:35 -06:54:35 -06:54:37 -06:54:37 -06:54:38 -06:54:40 -06:54:42 -06:54:43 -06:54:44 -06:54:45 -06:54:48 -06:55:28 -06:55:29 -06:55:30 -06:55:31 -06:55:33 -06:55:37 -06:55:40 -06:55:42 -06:55:45 -06:55:46 -06:55:47 -06:55:49 -06:55:51 -06:55:52 -06:55:53 -06:55:55 -06:55:56 -06:55:58 -06:56:02 -06:56:03 -06:56:04 -06:56:06 -06:56:07 -06:56:11 -06:56:12 -06:56:15 -06:56:16 -06:56:18 -06:56:20 -06:56:22 -06:56:23 -06:56:32 -06:56:35 -06:56:35 -06:56:37 -06:56:39 -06:56:39 -06:56:42 -06:56:44 -06:56:45 -06:56:47 -06:56:48 -06:56:50 -06:56:51 -06:56:56 -06:56:57 -06:56:59 -06:57:00 -06:57:01 -06:57:02 -06:57:04 -06:57:07 -06:57:08 -06:57:09 -06:57:11 -06:57:13 -06:57:15 -06:57:16 -06:57:20 -06:57:24 -06:57:25 -06:57:27 -06:57:31 -06:57:32 -06:57:33 -06:57:34 -06:57:36 -06:57:37 -06:57:39 -06:57:40 -06:57:44 -06:57:46 -06:57:49 -06:57:51 -06:57:53 -06:57:54 -06:57:56 -06:58:01 -06:58:02 -06:58:03 -06:58:05 -06:58:06 -06:58:07 -06:58:08 -06:58:10 -06:58:14 -06:58:16 -06:58:18 -06:58:19 -06:58:21 -06:58:22 -06:58:23 -06:58:27 -06:58:28 -06:58:31 -06:58:31 -06:58:53 -06:58:55 -06:58:58 -06:58:59 -06:59:00 -06:59:02 -06:59:05 -06:59:07 -06:59:09 -06:59:22 -06:59:23 -06:59:25 -06:59:27 -06:59:29 -06:59:31 -06:59:32 -06:59:33 -06:59:58 -07:00:01 -07:00:02 -07:00:06 -07:00:07 -07:00:09 -07:00:11 -07:00:14 -07:00:16 -07:00:19 -07:00:20 -07:00:22 -07:00:25 -07:00:27 -07:00:28 -07:00:29 -07:00:32 -07:00:34 -07:00:37 -07:00:39 -07:00:43 -07:00:45 -07:00:46 -07:00:48 -07:00:53 -07:00:54 -07:00:55 -07:00:57 -07:00:59 -07:01:01 -07:01:02 -07:01:03 -07:01:07 -07:01:08 -07:01:09 -07:01:13 -07:01:15 -07:01:17 -07:01:18 -07:01:21 -07:01:24 -07:01:25 -07:01:29 -07:01:31 -07:01:32 -07:01:34 -07:01:35 -07:01:39 -07:01:40 -07:01:41 -07:01:43 -07:01:44 -07:01:45 -07:01:47 -07:01:49 -07:01:51 -07:01:52 -07:01:56 -07:01:58 -07:02:00 -07:02:03 -07:02:05 -07:02:06 -07:02:07 -07:02:11 -07:02:13 -07:02:14 -07:02:16 -07:02:18 -07:02:19 -07:02:21 -07:02:22 -07:02:23 -07:02:25 -07:02:26 -07:02:36 -07:02:38 -07:02:39 -07:02:43 -07:02:50 -07:02:51 -07:02:52 -07:02:56 -07:02:58 -07:02:59 -07:03:03 -07:03:04 -07:03:06 -07:03:30 -07:03:31 -07:03:33 -07:03:35 -07:03:48 -07:03:49 -07:03:51 -07:03:52 -07:03:55 -07:03:58 -07:04:00 -07:04:02 -07:04:03 -07:04:05 -07:04:07 -07:04:08 -07:04:10 -07:04:12 -07:04:13 -07:04:15 -07:04:20 -07:04:23 -07:04:24 -07:04:26 -07:04:27 -07:04:30 -07:04:32 -07:04:33 -07:04:34 -07:04:37 -07:04:39 -07:04:42 -07:04:44 -07:04:49 -07:04:50 -07:04:51 -07:04:54 -07:04:58 -07:04:59 -07:05:00 -07:05:02 -07:05:04 -07:05:06 -07:05:07 -07:05:09 -07:05:13 -07:05:15 -07:05:16 -07:05:17 -07:05:19 -07:05:20 -07:05:20 -07:05:22 -07:05:25 -07:05:27 -07:05:28 -07:05:29 -07:05:31 -07:05:33 -07:05:35 -07:05:37 -07:05:38 -07:05:40 -07:05:42 -07:05:43 -07:05:45 -07:05:46 -07:05:47 -07:05:49 -07:05:50 -07:05:51 -07:06:13 -07:06:15 -07:06:16 -07:06:17 -07:06:19 -07:06:21 -07:06:22 -07:06:24 -07:06:27 -07:06:28 -07:06:33 -07:06:34 -07:06:35 -07:06:36 -07:06:38 -07:06:43 -07:06:46 -07:06:57 -07:06:58 -07:07:00 -07:07:01 -07:07:04 -07:07:06 -07:07:07 -07:07:10 -07:07:17 -07:07:19 -07:07:21 -07:07:23 -07:07:26 -07:07:30 -07:07:33 -07:07:35 -07:07:37 -07:07:40 -07:07:42 -07:07:45 -07:07:47 -07:07:48 -07:07:52 -07:07:54 -07:07:57 -07:07:59 -07:08:02 -07:08:03 -07:08:06 -07:08:07 -07:08:10 -07:08:11 -07:08:13 -07:08:14 -07:08:15 -07:08:18 -07:08:36 -07:08:37 -07:08:39 -07:08:41 -07:08:45 -07:08:49 -07:08:51 -07:08:52 -07:08:54 -07:08:56 -07:08:58 -07:08:59 -07:09:00 -07:09:02 -07:09:07 -07:09:09 -07:09:12 -07:09:14 -07:09:19 -07:09:21 -07:09:22 -07:09:23 -07:09:26 -07:09:30 -07:09:32 -07:09:34 -07:09:35 -07:09:39 -07:09:40 -07:09:41 -07:09:43 -07:09:45 -07:09:46 -07:09:49 -07:09:50 -07:09:52 -07:09:53 -07:09:55 -07:10:18 -07:10:19 -07:10:22 -07:10:23 -07:10:24 -07:10:25 -07:10:26 -07:10:28 -07:10:31 -07:10:32 -07:10:33 -07:10:35 -07:10:37 -07:10:38 -07:10:41 -07:10:46 -07:10:47 -07:10:48 -07:10:50 -07:10:52 -07:10:54 -07:10:55 -07:10:56 -07:10:57 -07:10:59 -07:11:02 -07:11:03 -07:11:06 -07:11:08 -07:11:10 -07:11:12 -07:11:19 -07:11:23 -07:11:28 -07:11:29 -07:11:31 -07:11:32 -07:11:43 -07:11:46 -07:11:49 -07:11:52 -07:11:55 -07:11:59 -07:12:01 -07:12:03 -07:12:09 -07:12:10 -07:12:16 -07:12:18 -07:12:23 -07:12:24 -07:12:26 -07:12:31 -07:12:33 -07:12:34 -07:12:42 -07:12:43 -07:12:44 -07:12:46 -07:12:50 -07:12:52 -07:12:54 -07:12:56 -07:12:57 -07:12:58 -07:12:59 -07:13:02 -07:13:04 -07:13:07 -07:13:09 -07:13:11 -07:13:12 -07:13:14 -07:13:17 -07:13:21 -07:13:23 -07:13:26 -07:13:27 -07:13:30 -07:13:31 -07:13:33 -07:13:34 -07:13:38 -07:13:39 -07:13:43 -07:13:45 -07:13:46 -07:13:49 -07:13:50 -07:13:52 -07:13:55 -07:13:58 -07:14:00 -07:14:02 -07:14:03 -07:14:04 -07:14:06 -07:14:12 -07:14:13 -07:14:15 -07:14:17 -07:14:18 -07:14:19 -07:14:23 -07:14:26 -07:14:27 -07:14:28 -07:14:29 -07:14:30 -07:14:30 -07:14:33 -07:14:34 -07:14:37 -07:14:37 -07:14:39 -07:14:43 -07:14:45 -07:14:49 -07:14:54 -07:14:55 -07:14:56 -07:14:58 -07:15:00 -07:15:01 -07:15:02 -07:15:05 -07:15:06 -07:15:08 -07:15:09 -07:15:12 -07:15:15 -07:15:17 -07:15:18 -07:15:19 -07:15:23 -07:15:25 -07:15:26 -07:15:27 -07:15:31 -07:15:40 -07:15:40 -07:15:43 -07:15:44 -07:15:47 -07:15:49 -07:15:50 -07:15:59 -07:16:01 -07:16:07 -07:16:09 -07:16:10 -07:16:13 -07:16:17 -07:16:19 -07:16:22 -07:16:24 -07:16:25 -07:16:27 -07:16:29 -07:16:30 -07:16:32 -07:16:33 -07:16:36 -07:16:42 -07:16:43 -07:16:45 -07:16:46 -07:16:48 -07:16:49 -07:16:50 -07:16:53 -07:16:56 -07:16:57 -07:17:02 -07:17:05 -07:17:06 -07:17:08 -07:17:10 -07:17:11 -07:17:12 -07:17:14 -07:17:15 -07:17:16 -07:17:18 -07:17:19 -07:17:20 -07:17:26 -07:17:28 -07:17:29 -07:17:31 -07:17:32 -07:18:02 -07:18:04 -07:18:05 -07:18:12 -07:18:13 -07:18:14 -07:18:16 -07:18:20 -07:18:23 -07:18:24 -07:18:26 -07:18:29 -07:18:30 -07:18:32 -07:18:33 -07:18:39 -07:18:41 -07:18:42 -07:18:44 -07:18:49 -07:18:50 -07:18:52 -07:18:54 -07:18:55 -07:18:57 -07:19:00 -07:19:01 -07:19:03 -07:19:04 -07:19:08 -07:19:10 -07:19:13 -07:19:17 -07:19:23 -07:19:26 -07:19:29 -07:19:32 -07:19:36 -07:19:38 -07:19:40 -07:19:43 -07:19:46 -07:19:50 -07:19:52 -07:19:56 -07:19:57 -07:20:00 -07:20:02 -07:20:05 -07:20:07 -07:20:08 -07:20:10 -07:20:13 -07:20:15 -07:20:16 -07:20:19 -07:20:20 -07:20:23 -07:20:25 -07:20:27 -07:20:33 -07:20:38 -07:20:39 -07:20:41 -07:20:43 -07:20:44 -07:20:46 -07:20:49 -07:20:52 -07:20:54 -07:20:56 -07:20:59 -07:21:04 -07:21:07 -07:21:10 -07:21:12 -07:21:15 -07:21:17 -07:21:19 -07:21:22 -07:21:26 -07:21:28 -07:21:31 -07:21:33 -07:21:34 -07:21:36 -07:21:39 -07:21:41 -07:21:44 -07:21:46 -07:21:48 -07:21:52 -07:21:55 -07:21:58 -07:22:02 -07:22:04 -07:22:05 -07:22:07 -07:22:11 -07:22:13 -07:22:16 -07:22:17 -07:22:19 -07:22:24 -07:22:26 -07:22:28 -07:22:31 -07:22:33 -07:22:37 -07:22:41 -07:22:42 -07:22:45 -07:22:48 -07:22:51 -07:22:52 -07:22:56 -07:23:02 -07:23:05 -07:23:07 -07:23:09 -07:23:12 -07:23:15 -07:23:16 -07:23:19 -07:23:22 -07:23:27 -07:23:29 -07:23:31 -07:23:33 -07:23:36 -07:23:39 -07:23:42 -07:23:45 -07:23:47 -07:23:49 -07:23:52 -07:23:54 -07:23:55 -07:23:59 -07:24:01 -07:24:03 -07:24:07 -07:24:09 -07:24:11 -07:24:22 -07:24:24 -07:24:25 -07:24:29 -07:24:31 -07:24:33 -07:24:36 -07:24:39 -07:24:40 -07:24:41 -07:24:43 -07:24:48 -07:24:49 -07:24:55 -07:24:57 -07:24:58 -07:25:01 -07:25:04 -07:25:06 -07:25:08 -07:25:10 -07:25:11 -07:25:13 -07:25:15 -07:25:18 -07:25:20 -07:25:23 -07:25:27 -07:25:30 -07:25:33 -07:25:35 -07:25:37 -07:25:38 -07:25:40 -07:25:41 -07:25:44 -07:25:47 -07:25:50 -07:25:53 -07:25:54 -07:25:56 -07:25:59 -07:26:01 -07:26:03 -07:26:06 -07:26:07 -07:26:08 -07:26:09 -07:26:12 -07:26:17 -07:26:19 -07:26:23 -07:26:26 -07:26:27 -07:26:30 -07:26:32 -07:26:34 -07:26:35 -07:26:38 -07:26:40 -07:26:42 -07:26:52 -07:26:57 -07:27:00 -07:27:02 -07:27:04 -07:27:07 -07:27:10 -07:27:14 -07:27:18 -07:27:20 -07:27:23 -07:27:27 -07:27:29 -07:27:31 -07:27:35 -07:27:38 -07:27:40 -07:27:43 -07:27:48 -07:27:49 -07:27:52 -07:27:58 -07:28:01 -07:28:04 -07:28:11 -07:28:14 -07:28:17 -07:28:20 -07:28:23 -07:28:28 -07:28:33 -07:28:36 -07:28:40 -07:28:46 -07:28:51 -07:28:56 -07:28:59 -07:29:02 -07:29:05 -07:29:07 -07:29:09 -07:29:12 -07:29:14 -07:29:16 -07:29:18 -07:29:20 -07:29:23 -07:29:30 -07:29:36 -07:29:38 -07:29:40 -07:29:43 -07:29:52 -07:30:03 -07:30:04 -07:30:07 -07:30:09 -07:30:11 -07:30:16 -07:30:22 -07:30:24 -07:30:26 -07:30:36 -07:30:38 -07:30:39 -07:30:43 -07:30:47 -07:30:52 -07:30:55 -07:30:57 -07:31:00 -07:31:03 -07:31:06 -07:31:08 -07:31:10 -07:31:12 -07:31:14 -07:31:17 -07:31:20 -07:31:23 -07:31:27 -07:31:29 -07:31:32 -07:31:34 -07:31:36 -07:31:41 -07:31:42 -07:31:44 -07:31:48 -07:31:49 -07:31:53 -07:31:55 -07:31:57 -07:32:01 -07:32:04 -07:32:07 -07:32:12 -07:32:14 -07:32:15 -07:32:17 -07:32:20 -07:32:24 -07:32:26 -07:32:28 -07:32:30 -07:32:36 -07:32:38 -07:32:40 -07:32:43 -07:32:45 -07:32:48 -07:32:53 -07:32:56 -07:33:00 -07:33:03 -07:33:06 -07:33:09 -07:33:10 -07:33:13 -07:33:16 -07:33:19 -07:33:21 -07:33:22 -07:33:28 -07:33:35 -07:33:38 -07:33:42 -07:33:47 -07:33:49 -07:33:52 -07:33:55 -07:34:02 -07:34:05 -07:34:08 -07:34:13 -07:34:16 -07:34:18 -07:34:21 -07:34:23 -07:34:26 -07:34:28 -07:34:30 -07:34:35 -07:34:37 -07:34:42 -07:34:45 -07:34:47 -07:34:50 -07:34:52 -07:34:56 -07:34:58 -07:35:00 -07:35:03 -07:35:06 -07:35:12 -07:35:17 -07:35:20 -07:35:24 -07:35:26 -07:35:30 -07:35:32 -07:35:34 -07:35:38 -07:35:41 -07:35:44 -07:35:47 -07:35:50 -07:35:53 -07:35:57 -07:36:01 -07:36:06 -07:36:13 -07:36:18 -07:36:24 -07:36:28 -07:36:31 -07:36:35 -07:36:39 -07:36:42 -07:36:46 -07:36:50 -07:36:55 -07:37:00 -07:37:04 -07:37:08 -07:37:13 -07:37:18 -07:37:24 -07:37:27 -07:37:31 -07:37:38 -07:37:43 -07:37:46 -07:37:53 -07:37:58 -07:38:05 -07:38:12 -07:38:15 -07:38:19 -07:38:23 -07:38:30 -07:38:35 -07:38:39 -07:38:44 -07:38:49 -07:38:52 -07:38:55 -07:39:01 -07:39:06 -07:39:10 -07:39:15 -07:39:20 -07:39:24 -07:39:27 -07:39:29 -07:39:35 -07:39:40 -07:39:46 -07:39:51 -07:39:54 -07:39:56 -07:40:00 -07:40:04 -07:40:08 -07:40:12 -07:40:21 -07:40:24 -07:40:28 -07:40:31 -07:40:35 -07:40:39 -07:40:43 -07:40:46 -07:40:55 -07:40:58 -07:41:03 -07:41:07 -07:41:12 -07:41:16 -07:41:22 -07:41:27 -07:41:33 -07:41:38 -07:41:43 -07:41:46 -07:41:50 -07:41:54 -07:41:57 -07:42:01 -07:42:05 -07:42:13 -07:42:17 -07:42:20 -07:42:24 -07:42:28 -07:42:31 -07:42:34 -07:42:42 -07:42:55 -07:42:58 -07:43:02 -07:43:07 -07:43:11 -07:43:17 -07:43:20 -07:43:27 -07:43:31 -07:43:34 -07:43:38 -07:43:42 -07:43:49 -07:43:56 -07:44:08 -07:44:13 -07:44:16 -07:44:19 -07:44:24 -07:44:26 -07:44:29 -07:44:32 -07:44:34 -07:44:38 -07:44:44 -07:44:47 -07:44:51 -07:44:54 -07:44:59 -07:45:03 -07:45:05 -07:45:08 -07:45:10 -07:45:13 -07:45:14 -07:45:22 -07:45:25 -07:45:28 -07:45:34 -07:45:38 -07:45:40 -07:45:42 -07:45:44 -07:45:47 -07:45:51 -07:45:53 -07:45:55 -07:45:59 -07:46:02 -07:46:04 -07:46:10 -07:46:12 -07:46:16 -07:46:20 -07:46:25 -07:46:28 -07:46:35 -07:46:38 -07:46:39 -07:46:43 -07:46:47 -07:46:54 -07:47:01 -07:47:02 -07:47:05 -07:47:08 -07:47:10 -07:47:14 -07:47:20 -07:47:24 -07:47:26 -07:47:29 -07:47:35 -07:47:38 -07:47:43 -07:47:47 -07:47:50 -07:47:53 -07:47:55 -07:47:59 -07:48:00 -07:48:03 -07:48:07 -07:48:09 -07:48:10 -07:48:14 -07:48:17 -07:48:21 -07:48:23 -07:48:25 -07:48:28 -07:48:31 -07:48:33 -07:48:35 -07:48:39 -07:48:42 -07:48:44 -07:48:46 -07:48:52 -07:48:56 -07:49:01 -07:49:04 -07:49:06 -07:49:10 -07:49:15 -07:49:19 -07:49:25 -07:49:29 -07:49:32 -07:49:35 -07:49:39 -07:49:45 -07:49:47 -07:49:49 -07:49:52 -07:49:56 -07:50:00 -07:50:04 -07:50:07 -07:50:11 -07:50:15 -07:50:20 -07:50:26 -07:50:30 -07:50:33 -07:50:36 -07:50:39 -07:50:46 -07:50:48 -07:50:52 -07:50:55 -07:51:20 -07:51:24 -07:51:28 -07:51:33 -07:51:37 -07:51:40 -07:51:46 -07:51:53 -07:51:56 -07:52:05 -07:52:17 -07:52:20 -07:52:25 -07:52:31 -07:52:33 -07:52:38 -07:52:42 -07:52:46 -07:52:50 -07:52:59 -07:53:06 -07:53:12 -07:53:17 -07:53:23 -07:53:28 -07:53:35 -07:53:39 -07:53:46 -07:53:49 -07:53:53 -07:53:57 -07:54:01 -07:54:06 -07:54:10 -07:54:15 -07:54:21 -07:54:24 -07:54:29 -07:54:36 -07:54:42 -07:54:50 -07:54:58 -07:55:03 -07:55:12 -07:55:14 -07:55:19 -07:55:24 -07:55:28 -07:55:34 -07:55:37 -07:55:42 -07:55:48 -07:55:52 -07:55:56 -07:56:01 -07:56:04 -07:56:08 -07:56:10 -07:56:13 -07:56:18 -07:56:21 -07:56:25 -07:56:30 -07:56:33 -07:56:39 -07:56:42 -07:56:47 -07:56:54 -07:56:57 -07:57:00 -07:57:05 -07:57:07 -07:57:13 -07:57:18 -07:57:22 -07:57:26 -07:57:30 -07:57:37 -07:57:41 -07:57:42 -07:57:45 -07:57:48 -07:57:52 -07:57:57 -07:58:02 -07:58:07 -07:58:13 -07:58:18 -07:58:22 -07:58:26 -07:58:29 -07:58:33 -07:58:37 -07:58:41 -07:58:42 -07:58:46 -07:58:49 -07:58:52 -07:58:55 -07:59:00 -07:59:03 -07:59:06 -07:59:08 -07:59:12 -07:59:17 -07:59:19 -07:59:23 -07:59:28 -07:59:31 -07:59:33 -07:59:36 -07:59:39 -07:59:41 -07:59:44 -07:59:46 -07:59:50 -07:59:52 -07:59:55 -08:00:00 -08:00:02 -08:00:04 -08:00:09 -08:00:11 -08:00:13 -08:00:17 -08:00:19 -08:00:21 -08:00:22 -08:00:28 -08:00:31 -08:00:33 -08:00:38 -08:00:42 -08:00:44 -08:00:46 -08:00:48 -08:00:50 -08:00:53 -08:00:56 -08:00:59 -08:01:00 -08:01:03 -08:01:10 -08:01:12 -08:01:14 -08:01:16 -08:01:19 -08:01:21 -08:01:23 -08:01:26 -08:01:28 -08:01:32 -08:01:35 -08:01:37 -08:01:45 -08:01:49 -08:01:51 -08:01:53 -08:01:55 -08:01:58 -08:02:00 -08:02:03 -08:02:04 -08:02:07 -08:02:09 -08:02:12 -08:02:14 -08:02:18 -08:02:26 -08:02:29 -08:02:32 -08:02:36 -08:02:39 -08:02:42 -08:02:45 -08:02:49 -08:02:51 -08:02:55 -08:02:57 -08:02:59 -08:03:01 -08:03:04 -08:03:05 -08:03:07 -08:03:09 -08:03:11 -08:03:15 -08:03:18 -08:03:21 -08:03:24 -08:03:25 -08:03:34 -08:03:37 -08:03:37 -08:03:41 -08:03:42 -08:03:46 -08:03:48 -08:03:50 -08:03:53 -08:03:55 -08:03:57 -08:04:00 -08:04:04 -08:04:06 -08:04:11 -08:04:13 -08:04:17 -08:04:20 -08:04:22 -08:04:26 -08:04:29 -08:04:34 -08:04:35 -08:04:37 -08:04:40 -08:04:44 -08:04:46 -08:04:47 -08:04:49 -08:04:52 -08:04:56 -08:04:59 -08:05:01 -08:05:04 -08:05:08 -08:05:12 -08:05:16 -08:05:19 -08:05:23 -08:05:24 -08:05:26 -08:05:32 -08:05:33 -08:05:35 -08:05:39 -08:05:41 -08:05:48 -08:05:51 -08:05:54 -08:05:57 -08:05:59 -08:06:00 -08:06:03 -08:06:08 -08:06:11 -08:06:13 -08:06:15 -08:06:17 -08:06:22 -08:06:28 -08:06:29 -08:06:31 -08:06:35 -08:06:37 -08:06:40 -08:06:43 -08:06:47 -08:06:51 -08:06:57 -08:07:00 -08:07:05 -08:07:09 -08:07:10 -08:07:14 -08:07:16 -08:07:19 -08:07:23 -08:07:27 -08:07:30 -08:07:32 -08:07:38 -08:07:42 -08:07:47 -08:07:51 -08:07:54 -08:07:57 -08:08:01 -08:08:04 -08:08:08 -08:08:12 -08:08:15 -08:08:17 -08:08:20 -08:08:23 -08:08:28 -08:08:30 -08:08:33 -08:08:36 -08:08:40 -08:08:42 -08:08:46 -08:08:49 -08:08:51 -08:08:54 -08:08:57 -08:09:00 -08:09:05 -08:09:07 -08:09:11 -08:09:13 -08:09:15 -08:09:18 -08:09:22 -08:09:25 -08:09:28 -08:09:30 -08:09:31 -08:09:36 -08:09:40 -08:09:42 -08:09:45 -08:09:47 -08:09:49 -08:09:52 -08:09:54 -08:09:57 -08:10:02 -08:10:09 -08:10:15 -08:10:21 -08:10:25 -08:10:30 -08:10:34 -08:10:38 -08:10:41 -08:10:50 -08:10:54 -08:10:57 -08:11:01 -08:11:04 -08:11:12 -08:11:22 -08:11:33 -08:11:38 -08:11:58 -08:12:02 -08:12:06 -08:12:10 -08:12:16 -08:12:21 -08:12:30 -08:12:36 -08:12:42 -08:12:57 -08:13:06 -08:13:13 -08:13:17 -08:13:23 -08:13:30 -08:13:36 -08:13:41 -08:13:45 -08:13:50 -08:13:54 -08:13:58 -08:14:05 -08:14:08 -08:14:12 -08:14:16 -08:14:20 -08:14:29 -08:14:32 -08:14:35 -08:14:39 -08:14:45 -08:14:50 -08:14:54 -08:15:01 -08:15:06 -08:15:13 -08:15:15 -08:15:20 -08:15:24 -08:15:26 -08:15:29 -08:15:34 -08:15:39 -08:15:44 -08:15:49 -08:15:52 -08:15:53 -08:15:57 -08:16:03 -08:16:06 -08:16:08 -08:16:15 -08:16:18 -08:16:23 -08:16:28 -08:16:33 -08:16:40 -08:16:45 -08:16:48 -08:16:51 -08:16:56 -08:17:00 -08:17:04 -08:17:07 -08:17:09 -08:17:11 -08:17:14 -08:17:17 -08:17:19 -08:17:21 -08:17:26 -08:17:29 -08:17:31 -08:17:36 -08:17:39 -08:17:44 -08:17:48 -08:17:58 -08:18:01 -08:18:05 -08:18:07 -08:18:10 -08:18:13 -08:18:15 -08:18:18 -08:18:21 -08:18:24 -08:18:33 -08:18:37 -08:18:40 -08:18:42 -08:18:45 -08:18:49 -08:18:55 -08:18:57 -08:18:59 -08:19:02 -08:19:07 -08:19:10 -08:19:13 -08:19:15 -08:19:17 -08:19:19 -08:19:22 -08:19:25 -08:19:28 -08:19:32 -08:19:35 -08:19:38 -08:19:40 -08:19:43 -08:19:50 -08:19:53 -08:19:55 -08:20:03 -08:20:05 -08:20:08 -08:20:11 -08:20:14 -08:20:18 -08:20:21 -08:20:24 -08:20:31 -08:20:34 -08:20:42 -08:20:44 -08:20:46 -08:20:52 -08:20:56 -08:21:00 -08:21:02 -08:21:04 -08:21:07 -08:21:10 -08:21:12 -08:21:17 -08:21:20 -08:21:21 -08:21:23 -08:21:27 -08:21:30 -08:21:33 -08:21:37 -08:21:42 -08:21:50 -08:21:53 -08:21:55 -08:21:58 -08:22:00 -08:22:03 -08:22:05 -08:22:10 -08:22:14 -08:22:17 -08:22:21 -08:22:24 -08:22:28 -08:22:30 -08:22:32 -08:22:36 -08:22:39 -08:22:42 -08:22:45 -08:22:47 -08:22:49 -08:22:51 -08:22:54 -08:22:56 -08:23:01 -08:23:05 -08:23:08 -08:23:10 -08:23:13 -08:23:18 -08:23:22 -08:23:25 -08:23:27 -08:23:28 -08:23:33 -08:23:36 -08:23:39 -08:23:40 -08:23:42 -08:23:43 -08:23:45 -08:23:48 -08:23:53 -08:23:55 -08:23:56 -08:23:58 -08:24:01 -08:24:02 -08:24:07 -08:24:10 -08:24:12 -08:24:13 -08:24:17 -08:24:20 -08:24:23 -08:24:26 -08:24:28 -08:24:31 -08:24:34 -08:24:35 -08:24:35 -08:24:38 -08:24:41 -08:24:42 -08:24:44 -08:24:46 -08:24:50 -08:24:52 -08:24:56 -08:24:58 -08:24:59 -08:25:02 -08:25:04 -08:25:05 -08:25:08 -08:25:11 -08:25:15 -08:25:16 -08:25:19 -08:25:22 -08:25:28 -08:25:30 -08:25:32 -08:25:34 -08:25:39 -08:25:40 -08:25:42 -08:25:44 -08:25:47 -08:25:50 -08:25:51 -08:25:55 -08:25:59 -08:26:01 -08:26:03 -08:26:05 -08:26:08 -08:26:12 -08:26:15 -08:26:17 -08:26:19 -08:26:32 -08:26:34 -08:26:37 -08:26:39 -08:26:41 -08:26:43 -08:26:46 -08:26:48 -08:26:52 -08:26:57 -08:27:01 -08:27:03 -08:27:06 -08:27:18 -08:27:19 -08:27:20 -08:27:21 -08:27:22 -08:27:23 -08:27:27 -08:27:32 -08:27:33 -08:27:35 -08:27:36 -08:27:41 -08:27:42 -08:27:44 -08:27:47 -08:27:50 -08:27:57 -08:28:00 -08:28:02 -08:28:03 -08:28:06 -08:28:11 -08:28:16 -08:28:17 -08:28:20 -08:28:21 -08:28:23 -08:28:25 -08:28:26 -08:28:35 -08:28:38 -08:28:40 -08:28:42 -08:28:45 -08:28:47 -08:28:48 -08:28:50 -08:28:51 -08:28:53 -08:28:56 -08:29:26 -08:29:29 -08:29:31 -08:29:33 -08:29:34 -08:29:36 -08:29:37 -08:29:40 -08:29:41 -08:29:45 -08:29:47 -08:29:48 -08:29:50 -08:29:52 -08:29:53 -08:29:55 -08:30:02 -08:30:04 -08:30:06 -08:30:07 -08:30:09 -08:30:14 -08:30:16 -08:30:17 -08:30:19 -08:30:20 -08:30:37 -08:30:38 -08:30:41 -08:30:46 -08:30:48 -08:30:50 -08:30:52 -08:30:54 -08:30:56 -08:30:58 -08:30:58 -08:31:04 -08:31:05 -08:31:07 -08:31:08 -08:31:13 -08:31:16 -08:31:22 -08:31:30 -08:31:49 -08:31:51 -08:31:51 -08:31:55 -08:31:56 -08:31:58 -08:31:59 -08:32:01 -08:32:05 -08:32:07 -08:32:10 -08:32:15 -08:32:16 -08:32:21 -08:32:33 -08:32:34 -08:32:40 -08:32:57 -08:32:59 -08:33:01 -08:33:02 -08:33:03 -08:33:04 -08:33:06 -08:33:11 -08:33:11 -08:33:12 -08:33:14 -08:33:17 -08:33:22 -08:33:24 -08:33:25 -08:33:28 -08:33:29 -08:33:30 -08:33:31 -08:33:33 -08:33:42 -08:33:44 -08:33:46 -08:33:47 -08:33:50 -08:33:51 -08:33:58 -08:33:59 -08:34:00 -08:34:01 -08:35:16 -08:35:26 -08:35:28 -08:35:29 -08:35:31 -08:35:33 -08:35:35 -08:35:36 -08:35:38 -08:35:39 -08:35:40 -08:35:42 -08:35:46 -08:35:48 -08:35:49 -08:35:50 -08:35:52 -08:35:55 -08:35:57 -08:35:59 -08:36:01 -08:36:04 -08:36:05 -08:36:09 -08:36:12 -08:36:13 -08:36:14 -08:36:38 -08:36:39 -08:36:43 -08:36:45 -08:36:46 -08:36:49 -08:36:50 -08:36:52 -08:36:53 -08:36:55 -08:36:57 -08:37:01 -08:37:03 -08:37:08 -08:37:08 -08:37:12 -08:37:14 -08:37:16 -08:37:24 -08:37:33 -08:37:35 -08:37:45 -08:37:50 -08:37:57 -08:37:59 -08:38:04 -08:38:06 -08:38:11 -08:38:39 -08:38:48 -08:38:51 -08:38:53 -08:38:55 -08:38:56 -08:38:56 -08:38:58 -08:38:59 -08:39:02 -08:39:03 -08:39:04 -08:39:06 -08:39:08 -08:39:12 -08:39:13 -08:39:15 -08:39:18 -08:39:24 -08:39:26 -08:39:29 -08:39:30 -08:39:37 -08:39:40 -08:39:47 -08:39:52 -08:39:53 -08:39:58 -08:40:03 -08:40:04 -08:40:07 -08:40:08 -08:40:13 -08:40:16 -08:40:17 -08:40:18 -08:40:42 -08:40:45 -08:40:46 -08:41:08 -08:41:11 -08:41:13 -08:41:15 -08:41:20 -08:41:22 -08:41:23 -08:41:24 -08:41:26 -08:41:34 -08:41:36 -08:41:37 -08:41:43 -08:41:46 -08:42:00 -08:42:03 -08:42:21 -08:42:23 -08:42:24 -08:42:25 -08:42:28 -08:42:30 -08:42:31 -08:42:35 -08:42:36 -08:42:38 -08:42:39 -08:42:53 -08:42:58 -08:43:21 -08:43:33 -08:43:59 -08:44:00 -08:44:02 -08:44:16 -08:44:19 -08:44:41 -08:44:43 -08:44:44 -08:44:47 -08:44:49 -08:44:52 -08:44:54 -08:44:55 -08:44:56 -08:45:00 -08:45:01 -08:45:02 -08:45:04 -08:45:07 -08:45:59 -08:46:00 -08:46:02 -08:46:03 -08:46:08 -08:46:10 -08:46:48 -08:46:49 -08:46:50 -08:46:56 -08:47:04 -08:47:05 -08:47:08 -08:47:11 -08:47:13 -08:47:16 -08:47:18 -08:47:20 -08:47:22 -08:47:25 -08:47:29 -08:47:30 -08:47:32 -08:47:49 -08:47:51 -08:47:52 -08:47:53 -08:47:56 -08:47:58 -08:48:02 -08:48:05 -08:48:06 -08:48:07 -08:48:35 -08:48:35 -08:48:36 -08:48:38 -08:48:39 -08:48:51 -08:49:01 -08:49:05 -08:49:06 -08:49:19 -08:49:23 -08:49:24 -08:49:26 -08:49:29 -08:49:32 -08:49:49 -08:49:53 -08:50:01 -08:50:04 -08:50:11 -08:50:12 -08:50:15 -08:50:17 -08:50:27 -08:50:51 -08:50:55 -08:50:58 -08:51:01 -08:51:31 -08:51:32 -08:51:35 -08:51:46 -08:51:54 -08:52:10 -08:52:11 -08:52:14 -08:52:15 -08:52:18 -08:52:24 -08:52:27 -08:52:29 -08:52:31 -08:52:33 -08:52:36 -08:52:37 -08:52:39 -08:52:41 -08:52:45 -08:52:49 -08:53:02 -08:53:04 -08:53:27 -08:53:28 -08:53:29 -08:53:31 -08:53:34 -08:53:36 -08:53:38 -08:53:40 -08:53:42 -08:53:52 -08:53:53 -08:53:56 -08:53:58 -08:54:00 -08:54:00 -08:54:04 -08:54:05 -08:54:06 -08:54:14 -08:54:44 -08:54:50 -08:54:51 -08:54:53 -08:54:55 -08:54:57 -08:55:07 -08:55:10 -08:56:09 -08:56:25 -08:56:26 -08:56:27 -08:56:28 -08:56:31 -08:56:33 -08:56:34 -08:56:35 -08:56:37 -08:56:38 -08:56:41 -08:56:42 -08:56:44 -08:56:45 -08:56:46 -08:56:47 -08:56:49 -08:56:50 -08:56:54 -08:56:55 -08:56:58 -08:56:59 -08:57:00 -08:57:02 -08:57:03 -08:57:04 -08:57:05 -08:57:30 -08:57:31 -08:57:36 -08:57:43 -08:58:02 -08:58:07 -08:58:12 -08:58:18 -08:58:49 -08:58:58 -08:59:02 -08:59:05 -08:59:14 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_3.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_3.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_3.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_3.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2298 +0,0 @@ -06:50:27 -06:50:31 -06:50:32 -06:50:33 -06:50:35 -06:50:38 -06:50:39 -06:50:42 -06:50:44 -06:50:45 -06:50:47 -06:50:50 -06:50:52 -06:50:55 -06:51:06 -06:51:07 -06:51:08 -06:51:10 -06:51:13 -06:51:15 -06:51:17 -06:51:21 -06:51:21 -06:51:22 -06:51:23 -06:51:25 -06:51:26 -06:51:29 -06:51:30 -06:51:31 -06:51:32 -06:51:33 -06:51:34 -06:51:37 -06:51:38 -06:51:40 -06:51:41 -06:51:43 -06:51:45 -06:51:47 -06:51:47 -06:51:52 -06:51:56 -06:51:56 -06:51:59 -06:52:01 -06:52:02 -06:52:05 -06:52:06 -06:52:07 -06:52:08 -06:52:13 -06:52:14 -06:52:16 -06:52:18 -06:52:20 -06:52:21 -06:52:23 -06:52:24 -06:52:58 -06:52:59 -06:53:01 -06:53:04 -06:53:09 -06:53:10 -06:53:12 -06:53:14 -06:53:15 -06:53:18 -06:53:19 -06:53:20 -06:53:21 -06:53:23 -06:53:24 -06:53:28 -06:53:30 -06:53:32 -06:53:34 -06:53:37 -06:53:38 -06:53:40 -06:53:41 -06:53:42 -06:53:43 -06:53:46 -06:53:48 -06:53:49 -06:53:50 -06:53:55 -06:53:57 -06:53:59 -06:54:01 -06:54:02 -06:54:04 -06:54:04 -06:54:06 -06:54:06 -06:54:14 -06:54:15 -06:54:16 -06:54:19 -06:54:21 -06:54:23 -06:54:24 -06:54:25 -06:54:26 -06:54:30 -06:54:34 -06:54:36 -06:54:38 -06:54:41 -06:54:45 -06:55:00 -06:55:02 -06:55:03 -06:55:04 -06:55:05 -06:55:06 -06:55:06 -06:55:09 -06:55:10 -06:55:11 -06:55:12 -06:55:14 -06:55:16 -06:55:58 -06:56:00 -06:56:01 -06:56:02 -06:56:03 -06:56:06 -06:56:07 -06:56:07 -06:56:09 -06:56:12 -06:56:13 -06:56:14 -06:56:15 -06:56:19 -06:56:21 -06:56:21 -06:56:23 -06:56:25 -06:56:26 -06:56:31 -06:56:33 -06:56:34 -06:56:36 -06:56:37 -06:56:42 -06:56:44 -06:56:46 -06:56:49 -06:56:51 -06:56:53 -06:56:55 -06:57:03 -06:57:04 -06:57:05 -06:57:06 -06:57:08 -06:57:09 -06:57:11 -06:57:13 -06:57:14 -06:57:16 -06:57:19 -06:57:21 -06:57:22 -06:57:25 -06:57:27 -06:57:29 -06:57:30 -06:57:31 -06:57:32 -06:57:33 -06:57:37 -06:57:38 -06:57:39 -06:57:41 -06:57:42 -06:57:43 -06:57:43 -06:57:46 -06:57:49 -06:57:52 -06:57:56 -06:57:57 -06:58:01 -06:58:02 -06:58:03 -06:58:04 -06:58:06 -06:58:07 -06:58:09 -06:58:10 -06:58:13 -06:58:15 -06:58:17 -06:58:19 -06:58:21 -06:58:22 -06:58:24 -06:58:30 -06:58:32 -06:58:33 -06:58:34 -06:58:35 -06:58:36 -06:58:39 -06:58:41 -06:58:44 -06:58:47 -06:58:48 -06:58:50 -06:58:51 -06:58:52 -06:58:53 -06:58:57 -06:58:58 -06:59:00 -06:59:00 -06:59:01 -06:59:23 -06:59:24 -06:59:27 -06:59:29 -06:59:31 -06:59:33 -06:59:38 -06:59:39 -06:59:41 -06:59:51 -06:59:53 -06:59:56 -06:59:57 -06:59:59 -07:00:01 -07:00:02 -07:00:04 -07:00:26 -07:00:28 -07:00:30 -07:00:34 -07:00:35 -07:00:36 -07:00:40 -07:00:43 -07:00:45 -07:00:47 -07:00:48 -07:00:50 -07:00:52 -07:00:55 -07:00:56 -07:00:58 -07:01:01 -07:01:03 -07:01:05 -07:01:08 -07:01:13 -07:01:16 -07:01:17 -07:01:19 -07:01:24 -07:01:25 -07:01:26 -07:01:29 -07:01:31 -07:01:33 -07:01:34 -07:01:35 -07:01:37 -07:01:39 -07:01:40 -07:01:43 -07:01:45 -07:01:47 -07:01:49 -07:01:53 -07:01:55 -07:01:58 -07:02:00 -07:02:02 -07:02:03 -07:02:05 -07:02:06 -07:02:10 -07:02:11 -07:02:13 -07:02:14 -07:02:15 -07:02:17 -07:02:19 -07:02:21 -07:02:23 -07:02:26 -07:02:27 -07:02:30 -07:02:31 -07:02:34 -07:02:36 -07:02:37 -07:02:38 -07:02:40 -07:02:43 -07:02:46 -07:02:48 -07:02:49 -07:02:50 -07:02:50 -07:02:52 -07:02:53 -07:02:54 -07:02:55 -07:02:56 -07:03:03 -07:03:06 -07:03:07 -07:03:11 -07:03:19 -07:03:20 -07:03:21 -07:03:24 -07:03:26 -07:03:27 -07:03:32 -07:03:33 -07:03:35 -07:03:57 -07:03:59 -07:04:01 -07:04:02 -07:04:15 -07:04:16 -07:04:18 -07:04:21 -07:04:23 -07:04:26 -07:04:28 -07:04:30 -07:04:32 -07:04:34 -07:04:35 -07:04:36 -07:04:38 -07:04:40 -07:04:42 -07:04:44 -07:04:47 -07:04:52 -07:04:54 -07:04:55 -07:04:56 -07:05:00 -07:05:02 -07:05:04 -07:05:05 -07:05:08 -07:05:09 -07:05:11 -07:05:13 -07:05:19 -07:05:20 -07:05:22 -07:05:25 -07:05:30 -07:05:31 -07:05:32 -07:05:33 -07:05:35 -07:05:36 -07:05:38 -07:05:41 -07:05:46 -07:05:47 -07:05:49 -07:05:52 -07:05:54 -07:05:55 -07:05:56 -07:05:58 -07:06:00 -07:06:02 -07:06:03 -07:06:05 -07:06:06 -07:06:08 -07:06:10 -07:06:14 -07:06:16 -07:06:18 -07:06:21 -07:06:22 -07:06:25 -07:06:25 -07:06:28 -07:06:30 -07:06:31 -07:06:31 -07:06:33 -07:06:40 -07:06:42 -07:06:43 -07:06:44 -07:06:45 -07:06:47 -07:06:49 -07:06:51 -07:06:53 -07:06:56 -07:06:57 -07:07:01 -07:07:03 -07:07:06 -07:07:07 -07:07:08 -07:07:11 -07:07:16 -07:07:25 -07:07:26 -07:07:28 -07:07:30 -07:07:33 -07:07:34 -07:07:35 -07:07:38 -07:07:45 -07:07:48 -07:07:50 -07:07:52 -07:07:55 -07:08:00 -07:08:03 -07:08:04 -07:08:05 -07:08:07 -07:08:09 -07:08:11 -07:08:12 -07:08:16 -07:08:18 -07:08:19 -07:08:21 -07:08:24 -07:08:26 -07:08:28 -07:08:30 -07:08:31 -07:08:34 -07:08:36 -07:08:40 -07:08:40 -07:08:42 -07:08:43 -07:08:44 -07:08:46 -07:09:05 -07:09:06 -07:09:08 -07:09:10 -07:09:14 -07:09:19 -07:09:22 -07:09:23 -07:09:25 -07:09:27 -07:09:28 -07:09:30 -07:09:31 -07:09:33 -07:09:37 -07:09:38 -07:09:40 -07:09:43 -07:09:49 -07:09:52 -07:09:53 -07:09:55 -07:09:56 -07:10:01 -07:10:02 -07:10:04 -07:10:05 -07:10:10 -07:10:11 -07:10:12 -07:10:14 -07:10:15 -07:10:16 -07:10:20 -07:10:21 -07:10:24 -07:10:26 -07:10:27 -07:10:49 -07:10:50 -07:10:52 -07:10:53 -07:10:54 -07:10:56 -07:10:57 -07:10:58 -07:11:01 -07:11:02 -07:11:03 -07:11:06 -07:11:08 -07:11:09 -07:11:13 -07:11:17 -07:11:18 -07:11:20 -07:11:22 -07:11:23 -07:11:27 -07:11:28 -07:11:29 -07:11:31 -07:11:32 -07:11:34 -07:11:35 -07:11:38 -07:11:39 -07:11:42 -07:11:45 -07:11:48 -07:11:50 -07:11:54 -07:11:56 -07:11:58 -07:12:00 -07:12:12 -07:12:14 -07:12:17 -07:12:19 -07:12:22 -07:12:27 -07:12:28 -07:12:32 -07:12:38 -07:12:40 -07:12:46 -07:12:49 -07:12:54 -07:12:55 -07:12:57 -07:13:00 -07:13:01 -07:13:03 -07:13:12 -07:13:13 -07:13:15 -07:13:18 -07:13:20 -07:13:23 -07:13:24 -07:13:26 -07:13:27 -07:13:30 -07:13:33 -07:13:35 -07:13:38 -07:13:40 -07:13:41 -07:13:43 -07:13:46 -07:13:48 -07:13:50 -07:13:53 -07:13:57 -07:13:58 -07:14:01 -07:14:02 -07:14:03 -07:14:04 -07:14:09 -07:14:12 -07:14:15 -07:14:17 -07:14:19 -07:14:21 -07:14:23 -07:14:25 -07:14:29 -07:14:32 -07:14:34 -07:14:35 -07:14:36 -07:14:37 -07:14:39 -07:14:46 -07:14:47 -07:14:52 -07:14:54 -07:14:56 -07:14:58 -07:14:59 -07:15:01 -07:15:02 -07:15:03 -07:15:04 -07:15:05 -07:15:06 -07:15:09 -07:15:10 -07:15:12 -07:15:13 -07:15:17 -07:15:21 -07:15:24 -07:15:26 -07:15:28 -07:15:30 -07:15:32 -07:15:34 -07:15:37 -07:15:39 -07:15:43 -07:15:48 -07:15:52 -07:15:56 -07:16:01 -07:16:05 -07:16:08 -07:16:13 -07:16:19 -07:16:32 -07:16:35 -07:16:39 -07:16:42 -07:16:45 -07:16:48 -07:16:53 -07:16:55 -07:16:58 -07:17:01 -07:17:06 -07:17:09 -07:17:13 -07:17:19 -07:17:23 -07:17:28 -07:17:33 -07:17:36 -07:17:39 -07:17:43 -07:17:46 -07:17:48 -07:17:50 -07:17:52 -07:17:55 -07:17:57 -07:17:59 -07:18:02 -07:18:04 -07:18:06 -07:18:09 -07:18:11 -07:18:14 -07:18:16 -07:18:18 -07:18:20 -07:18:23 -07:18:26 -07:18:29 -07:18:31 -07:18:36 -07:18:38 -07:18:40 -07:18:44 -07:18:45 -07:18:47 -07:18:49 -07:18:51 -07:18:53 -07:18:56 -07:18:59 -07:19:01 -07:19:04 -07:19:09 -07:19:10 -07:19:12 -07:19:13 -07:19:18 -07:19:22 -07:19:24 -07:19:28 -07:19:29 -07:19:32 -07:19:35 -07:19:37 -07:19:41 -07:19:43 -07:19:45 -07:19:49 -07:19:50 -07:19:52 -07:19:54 -07:19:59 -07:20:02 -07:20:03 -07:20:05 -07:20:10 -07:20:11 -07:20:13 -07:20:14 -07:20:16 -07:20:18 -07:20:20 -07:20:24 -07:20:25 -07:20:27 -07:20:30 -07:20:35 -07:20:37 -07:20:39 -07:20:42 -07:20:44 -07:20:47 -07:20:50 -07:20:52 -07:20:54 -07:20:57 -07:21:00 -07:21:04 -07:21:06 -07:21:14 -07:21:17 -07:21:19 -07:21:21 -07:21:25 -07:21:27 -07:21:29 -07:21:30 -07:21:33 -07:21:34 -07:21:36 -07:21:38 -07:21:39 -07:21:41 -07:21:44 -07:21:46 -07:21:48 -07:21:51 -07:21:53 -07:21:56 -07:21:59 -07:22:00 -07:22:02 -07:22:04 -07:22:07 -07:22:09 -07:22:13 -07:22:16 -07:22:20 -07:22:26 -07:22:28 -07:22:30 -07:22:33 -07:22:34 -07:22:38 -07:22:41 -07:22:47 -07:22:50 -07:22:53 -07:22:56 -07:22:58 -07:23:02 -07:23:04 -07:23:07 -07:23:09 -07:23:12 -07:23:15 -07:23:18 -07:23:21 -07:23:24 -07:23:26 -07:23:28 -07:23:32 -07:23:36 -07:23:38 -07:23:40 -07:23:42 -07:23:46 -07:23:48 -07:23:50 -07:23:52 -07:23:55 -07:23:58 -07:24:00 -07:24:03 -07:24:05 -07:24:08 -07:24:11 -07:24:14 -07:24:17 -07:24:24 -07:24:27 -07:24:29 -07:24:31 -07:24:34 -07:24:36 -07:24:38 -07:24:40 -07:24:43 -07:24:48 -07:24:51 -07:24:54 -07:24:56 -07:24:58 -07:25:01 -07:25:03 -07:25:06 -07:25:09 -07:25:12 -07:25:15 -07:25:18 -07:25:20 -07:25:23 -07:25:27 -07:25:29 -07:25:34 -07:25:37 -07:25:41 -07:25:43 -07:25:56 -07:25:58 -07:26:00 -07:26:03 -07:26:06 -07:26:07 -07:26:09 -07:26:11 -07:26:13 -07:26:14 -07:26:16 -07:26:20 -07:26:23 -07:26:27 -07:26:30 -07:26:33 -07:26:37 -07:26:39 -07:26:41 -07:26:43 -07:26:44 -07:26:46 -07:26:48 -07:26:51 -07:26:56 -07:26:58 -07:27:04 -07:27:07 -07:27:09 -07:27:11 -07:27:15 -07:27:17 -07:27:19 -07:27:21 -07:27:22 -07:27:25 -07:27:29 -07:27:30 -07:27:34 -07:27:35 -07:27:38 -07:27:41 -07:27:43 -07:27:48 -07:27:53 -07:27:54 -07:27:55 -07:28:04 -07:28:08 -07:28:11 -07:28:14 -07:28:16 -07:28:18 -07:28:22 -07:28:24 -07:28:28 -07:28:30 -07:28:33 -07:28:39 -07:28:41 -07:28:48 -07:28:52 -07:28:53 -07:28:56 -07:28:59 -07:29:03 -07:29:06 -07:29:09 -07:29:10 -07:29:14 -07:29:15 -07:29:18 -07:29:21 -07:29:23 -07:29:24 -07:29:28 -07:29:31 -07:29:33 -07:29:39 -07:29:40 -07:29:45 -07:29:47 -07:29:51 -07:29:54 -07:29:58 -07:30:01 -07:30:03 -07:30:05 -07:30:08 -07:30:13 -07:30:17 -07:30:21 -07:30:24 -07:30:31 -07:30:35 -07:30:38 -07:30:40 -07:30:43 -07:30:47 -07:30:48 -07:30:51 -07:30:54 -07:30:55 -07:30:57 -07:31:00 -07:31:02 -07:31:04 -07:31:10 -07:31:16 -07:31:18 -07:31:20 -07:31:22 -07:31:25 -07:31:28 -07:31:36 -07:31:38 -07:31:39 -07:31:42 -07:31:44 -07:31:49 -07:31:58 -07:32:00 -07:32:01 -07:32:06 -07:32:08 -07:32:09 -07:32:10 -07:32:17 -07:32:21 -07:32:25 -07:32:31 -07:32:35 -07:32:37 -07:32:43 -07:32:47 -07:32:49 -07:32:51 -07:33:06 -07:33:11 -07:33:15 -07:33:19 -07:33:22 -07:33:26 -07:33:31 -07:33:35 -07:33:37 -07:33:41 -07:33:44 -07:33:46 -07:33:48 -07:33:52 -07:33:55 -07:34:00 -07:34:03 -07:34:06 -07:34:09 -07:34:13 -07:34:17 -07:34:27 -07:34:30 -07:34:32 -07:34:35 -07:34:38 -07:34:42 -07:34:47 -07:34:49 -07:34:51 -07:34:53 -07:34:55 -07:34:58 -07:35:02 -07:35:04 -07:35:07 -07:35:14 -07:35:17 -07:35:24 -07:35:30 -07:35:36 -07:35:41 -07:35:44 -07:35:48 -07:35:51 -07:35:56 -07:36:02 -07:36:10 -07:36:26 -07:36:38 -07:36:43 -07:36:47 -07:36:51 -07:36:55 -07:37:01 -07:37:07 -07:37:14 -07:37:18 -07:37:22 -07:37:26 -07:37:30 -07:37:36 -07:37:39 -07:37:42 -07:37:46 -07:37:49 -07:37:52 -07:37:56 -07:38:00 -07:38:05 -07:38:08 -07:38:10 -07:38:13 -07:38:16 -07:38:19 -07:38:23 -07:38:26 -07:38:29 -07:38:32 -07:38:37 -07:38:41 -07:38:44 -07:38:48 -07:38:51 -07:38:55 -07:38:59 -07:39:01 -07:39:05 -07:39:08 -07:39:11 -07:39:14 -07:39:17 -07:39:21 -07:39:24 -07:39:28 -07:39:32 -07:39:34 -07:39:38 -07:39:40 -07:39:44 -07:39:46 -07:39:49 -07:39:52 -07:39:54 -07:39:58 -07:40:01 -07:40:05 -07:40:08 -07:40:13 -07:40:16 -07:40:19 -07:40:22 -07:40:29 -07:40:30 -07:40:33 -07:40:36 -07:40:40 -07:40:43 -07:40:46 -07:40:51 -07:41:00 -07:41:04 -07:41:07 -07:41:10 -07:41:13 -07:41:18 -07:41:21 -07:41:24 -07:41:27 -07:41:30 -07:41:32 -07:41:34 -07:41:37 -07:41:40 -07:41:45 -07:41:59 -07:42:01 -07:42:04 -07:42:06 -07:42:08 -07:42:09 -07:42:17 -07:42:21 -07:42:26 -07:42:28 -07:42:30 -07:42:33 -07:42:37 -07:42:39 -07:42:43 -07:42:55 -07:42:57 -07:42:58 -07:43:00 -07:43:02 -07:43:05 -07:43:07 -07:43:12 -07:43:16 -07:43:17 -07:43:21 -07:43:24 -07:43:26 -07:43:31 -07:43:35 -07:43:42 -07:43:47 -07:43:51 -07:43:54 -07:43:58 -07:44:02 -07:44:04 -07:44:07 -07:44:11 -07:44:15 -07:44:20 -07:44:29 -07:44:37 -07:44:41 -07:44:46 -07:44:50 -07:44:54 -07:44:58 -07:45:06 -07:45:10 -07:45:12 -07:45:15 -07:45:22 -07:45:33 -07:45:37 -07:45:42 -07:45:47 -07:45:52 -07:45:59 -07:46:03 -07:46:08 -07:46:11 -07:46:15 -07:46:22 -07:46:26 -07:46:29 -07:46:42 -07:46:48 -07:46:51 -07:46:58 -07:47:08 -07:47:11 -07:47:15 -07:47:22 -07:47:27 -07:47:31 -07:47:35 -07:47:38 -07:47:42 -07:47:45 -07:47:50 -07:47:53 -07:47:56 -07:47:58 -07:48:04 -07:48:07 -07:48:11 -07:48:16 -07:48:18 -07:48:22 -07:48:25 -07:48:32 -07:48:37 -07:48:42 -07:48:48 -07:48:52 -07:49:12 -07:49:17 -07:49:19 -07:49:23 -07:49:27 -07:49:31 -07:49:36 -07:49:40 -07:49:45 -07:49:55 -07:50:08 -07:50:11 -07:50:19 -07:50:25 -07:50:31 -07:50:36 -07:50:40 -07:50:43 -07:50:47 -07:50:51 -07:50:55 -07:50:59 -07:51:03 -07:51:06 -07:51:10 -07:51:17 -07:51:39 -07:51:43 -07:51:47 -07:51:52 -07:51:56 -07:51:59 -07:52:04 -07:52:06 -07:52:11 -07:52:15 -07:52:18 -07:52:21 -07:52:25 -07:52:28 -07:52:33 -07:52:36 -07:52:39 -07:52:44 -07:52:48 -07:52:52 -07:52:54 -07:52:58 -07:53:01 -07:53:03 -07:53:06 -07:53:09 -07:53:11 -07:53:19 -07:53:23 -07:53:26 -07:53:30 -07:53:35 -07:53:37 -07:53:39 -07:53:43 -07:53:54 -07:53:58 -07:54:03 -07:54:06 -07:54:10 -07:54:12 -07:54:14 -07:54:17 -07:54:20 -07:54:24 -07:54:27 -07:54:31 -07:54:33 -07:54:35 -07:54:42 -07:54:44 -07:54:47 -07:54:50 -07:54:53 -07:54:57 -07:55:00 -07:55:04 -07:55:07 -07:55:12 -07:55:14 -07:55:17 -07:55:18 -07:55:21 -07:55:23 -07:55:27 -07:55:29 -07:55:33 -07:55:36 -07:55:38 -07:55:40 -07:55:43 -07:55:47 -07:55:49 -07:55:52 -07:55:57 -07:55:59 -07:56:02 -07:56:13 -07:56:18 -07:56:21 -07:56:23 -07:56:25 -07:56:28 -07:56:31 -07:56:33 -07:56:42 -07:56:44 -07:56:47 -07:56:49 -07:56:53 -07:56:56 -07:57:01 -07:57:07 -07:57:11 -07:57:12 -07:57:15 -07:57:18 -07:57:21 -07:57:24 -07:57:28 -07:57:32 -07:57:38 -07:57:40 -07:57:42 -07:57:46 -07:57:48 -07:57:53 -07:57:54 -07:57:59 -07:58:02 -07:58:04 -07:58:06 -07:58:07 -07:58:09 -07:58:12 -07:58:12 -07:58:14 -07:58:17 -07:58:18 -07:58:21 -07:58:25 -07:58:28 -07:58:37 -07:58:38 -07:58:42 -07:58:45 -07:58:47 -07:58:49 -07:58:52 -07:58:52 -07:58:55 -07:58:58 -07:59:00 -07:59:04 -07:59:07 -07:59:11 -07:59:13 -07:59:20 -07:59:21 -07:59:22 -07:59:25 -07:59:29 -07:59:32 -07:59:34 -07:59:35 -07:59:38 -07:59:40 -07:59:42 -07:59:43 -07:59:48 -07:59:50 -07:59:52 -07:59:56 -07:59:57 -07:59:59 -08:00:01 -08:00:03 -08:00:08 -08:00:10 -08:00:11 -08:00:14 -08:00:21 -08:00:23 -08:00:25 -08:00:30 -08:00:32 -08:00:36 -08:00:38 -08:00:41 -08:00:43 -08:00:45 -08:00:46 -08:00:51 -08:00:53 -08:00:55 -08:00:59 -08:01:01 -08:01:02 -08:01:12 -08:01:12 -08:01:14 -08:01:18 -08:01:20 -08:01:21 -08:01:23 -08:01:26 -08:01:28 -08:01:30 -08:01:32 -08:01:36 -08:01:40 -08:01:43 -08:01:45 -08:01:48 -08:01:52 -08:01:55 -08:01:58 -08:02:00 -08:02:03 -08:02:06 -08:02:10 -08:02:12 -08:02:15 -08:02:18 -08:02:22 -08:02:39 -08:02:43 -08:02:47 -08:02:51 -08:02:54 -08:02:57 -08:03:02 -08:03:07 -08:03:10 -08:03:13 -08:03:15 -08:03:20 -08:03:24 -08:03:27 -08:03:30 -08:03:34 -08:03:37 -08:03:41 -08:03:44 -08:03:46 -08:03:55 -08:04:00 -08:04:06 -08:04:08 -08:04:11 -08:04:13 -08:04:16 -08:04:19 -08:04:22 -08:04:26 -08:04:28 -08:04:31 -08:04:34 -08:04:38 -08:04:45 -08:04:53 -08:04:58 -08:05:03 -08:05:05 -08:05:09 -08:05:11 -08:05:14 -08:05:18 -08:05:22 -08:05:24 -08:05:26 -08:05:31 -08:05:33 -08:05:37 -08:05:40 -08:05:42 -08:05:46 -08:05:48 -08:05:51 -08:05:54 -08:05:58 -08:06:01 -08:06:03 -08:06:07 -08:06:09 -08:06:13 -08:06:15 -08:06:20 -08:06:23 -08:06:26 -08:06:29 -08:06:31 -08:06:33 -08:06:37 -08:06:39 -08:06:40 -08:06:42 -08:06:45 -08:06:51 -08:06:55 -08:06:57 -08:07:01 -08:07:04 -08:07:08 -08:07:11 -08:07:14 -08:07:16 -08:07:18 -08:07:20 -08:07:28 -08:07:33 -08:07:36 -08:07:39 -08:07:40 -08:07:45 -08:07:49 -08:07:52 -08:07:59 -08:08:01 -08:08:03 -08:08:06 -08:08:11 -08:08:15 -08:08:18 -08:08:23 -08:08:41 -08:08:49 -08:08:56 -08:08:59 -08:09:03 -08:09:10 -08:09:14 -08:09:39 -08:09:47 -08:10:02 -08:10:18 -08:10:27 -08:10:34 -08:10:43 -08:10:45 -08:10:48 -08:10:52 -08:10:57 -08:11:00 -08:11:03 -08:11:07 -08:11:10 -08:11:14 -08:11:18 -08:11:22 -08:11:26 -08:11:30 -08:11:32 -08:11:34 -08:11:37 -08:11:40 -08:11:43 -08:11:48 -08:11:50 -08:11:54 -08:11:56 -08:12:00 -08:12:06 -08:12:08 -08:12:10 -08:12:13 -08:12:15 -08:12:18 -08:12:22 -08:12:27 -08:12:30 -08:12:32 -08:12:34 -08:12:37 -08:12:42 -08:12:46 -08:12:51 -08:12:54 -08:12:58 -08:13:03 -08:13:07 -08:13:13 -08:13:16 -08:13:20 -08:13:23 -08:13:29 -08:13:32 -08:13:36 -08:13:36 -08:13:39 -08:13:41 -08:13:42 -08:13:47 -08:13:51 -08:13:54 -08:13:57 -08:13:59 -08:14:03 -08:14:05 -08:14:05 -08:14:08 -08:14:11 -08:14:14 -08:14:16 -08:14:20 -08:14:27 -08:14:31 -08:14:33 -08:14:33 -08:14:36 -08:14:38 -08:14:40 -08:14:45 -08:14:51 -08:14:55 -08:15:00 -08:15:01 -08:15:04 -08:15:07 -08:15:10 -08:15:16 -08:15:20 -08:15:25 -08:15:30 -08:15:36 -08:15:40 -08:15:44 -08:15:47 -08:15:52 -08:15:56 -08:16:00 -08:16:06 -08:16:27 -08:16:33 -08:16:36 -08:16:39 -08:16:44 -08:16:47 -08:16:50 -08:16:53 -08:16:57 -08:17:01 -08:17:06 -08:17:08 -08:17:11 -08:17:14 -08:17:19 -08:17:22 -08:17:24 -08:17:31 -08:17:34 -08:17:37 -08:17:40 -08:17:43 -08:17:46 -08:17:49 -08:17:51 -08:17:55 -08:18:00 -08:18:04 -08:18:07 -08:18:09 -08:18:12 -08:18:14 -08:18:17 -08:18:20 -08:18:24 -08:18:29 -08:18:31 -08:18:34 -08:18:38 -08:18:40 -08:18:44 -08:18:48 -08:18:50 -08:18:52 -08:18:55 -08:19:02 -08:19:05 -08:19:08 -08:19:11 -08:19:12 -08:19:16 -08:19:18 -08:19:20 -08:19:22 -08:19:26 -08:19:28 -08:19:31 -08:19:33 -08:19:37 -08:19:41 -08:19:43 -08:19:48 -08:19:51 -08:19:55 -08:19:59 -08:20:01 -08:20:02 -08:20:04 -08:20:07 -08:20:09 -08:20:12 -08:20:18 -08:20:20 -08:20:23 -08:20:24 -08:20:26 -08:20:30 -08:20:36 -08:20:38 -08:20:39 -08:20:42 -08:20:47 -08:20:49 -08:20:51 -08:20:54 -08:20:55 -08:20:57 -08:20:59 -08:21:02 -08:21:05 -08:21:07 -08:21:09 -08:21:12 -08:21:13 -08:21:15 -08:21:22 -08:21:24 -08:21:26 -08:21:31 -08:21:32 -08:21:37 -08:21:39 -08:21:42 -08:21:44 -08:21:48 -08:21:53 -08:21:58 -08:22:02 -08:22:04 -08:22:06 -08:22:08 -08:22:13 -08:22:18 -08:22:20 -08:22:22 -08:22:24 -08:22:30 -08:22:32 -08:22:35 -08:22:37 -08:22:40 -08:22:43 -08:22:45 -08:22:53 -08:22:56 -08:22:59 -08:23:02 -08:23:06 -08:23:09 -08:23:12 -08:23:15 -08:23:17 -08:23:21 -08:23:24 -08:23:32 -08:23:36 -08:23:41 -08:23:45 -08:23:48 -08:23:53 -08:23:55 -08:23:57 -08:24:01 -08:24:04 -08:24:07 -08:24:09 -08:24:12 -08:24:14 -08:24:16 -08:24:19 -08:24:21 -08:24:26 -08:24:29 -08:24:34 -08:24:36 -08:24:41 -08:24:46 -08:24:49 -08:24:52 -08:24:55 -08:24:57 -08:24:59 -08:25:03 -08:25:05 -08:25:07 -08:25:09 -08:25:11 -08:25:14 -08:25:18 -08:25:21 -08:25:23 -08:25:25 -08:25:27 -08:25:29 -08:25:32 -08:25:34 -08:25:36 -08:25:38 -08:25:40 -08:25:43 -08:25:45 -08:25:49 -08:25:51 -08:25:54 -08:25:58 -08:26:02 -08:26:04 -08:26:06 -08:26:08 -08:26:10 -08:26:12 -08:26:14 -08:26:18 -08:26:21 -08:26:24 -08:26:26 -08:26:27 -08:26:30 -08:26:33 -08:26:35 -08:26:37 -08:26:41 -08:26:42 -08:26:44 -08:26:47 -08:26:51 -08:26:55 -08:26:57 -08:26:59 -08:27:01 -08:27:05 -08:27:07 -08:27:09 -08:27:10 -08:27:14 -08:27:16 -08:27:18 -08:27:22 -08:27:24 -08:27:26 -08:27:27 -08:27:30 -08:27:33 -08:27:35 -08:27:39 -08:27:41 -08:27:42 -08:27:46 -08:27:52 -08:27:54 -08:27:57 -08:27:59 -08:28:05 -08:28:10 -08:28:14 -08:28:17 -08:28:19 -08:28:23 -08:28:26 -08:28:28 -08:28:31 -08:28:34 -08:28:36 -08:28:38 -08:28:40 -08:28:42 -08:28:46 -08:28:50 -08:28:53 -08:28:56 -08:28:59 -08:29:01 -08:29:04 -08:29:06 -08:29:09 -08:29:12 -08:29:15 -08:29:19 -08:29:22 -08:29:24 -08:29:26 -08:29:28 -08:29:31 -08:29:35 -08:29:38 -08:29:39 -08:29:42 -08:29:44 -08:29:46 -08:29:57 -08:29:59 -08:30:03 -08:30:06 -08:30:11 -08:30:13 -08:30:15 -08:30:17 -08:30:19 -08:30:22 -08:30:26 -08:30:29 -08:30:32 -08:30:35 -08:30:37 -08:30:40 -08:30:44 -08:30:47 -08:30:50 -08:30:54 -08:30:57 -08:30:59 -08:31:01 -08:31:03 -08:31:05 -08:31:07 -08:31:13 -08:31:17 -08:31:19 -08:31:21 -08:31:23 -08:31:28 -08:31:31 -08:31:34 -08:31:36 -08:31:39 -08:31:42 -08:31:45 -08:31:50 -08:31:54 -08:31:56 -08:31:59 -08:32:02 -08:32:04 -08:32:08 -08:32:11 -08:32:13 -08:32:18 -08:32:21 -08:32:24 -08:32:27 -08:32:32 -08:32:36 -08:32:40 -08:32:44 -08:32:47 -08:32:49 -08:32:52 -08:32:55 -08:32:58 -08:33:01 -08:33:04 -08:33:06 -08:33:09 -08:33:12 -08:33:14 -08:33:17 -08:33:22 -08:33:28 -08:33:30 -08:33:33 -08:33:39 -08:33:41 -08:33:46 -08:33:48 -08:33:51 -08:33:54 -08:33:57 -08:34:00 -08:34:02 -08:34:05 -08:34:06 -08:34:09 -08:34:11 -08:34:14 -08:34:16 -08:34:19 -08:34:22 -08:34:25 -08:34:27 -08:34:29 -08:34:32 -08:34:39 -08:34:42 -08:34:45 -08:34:47 -08:34:53 -08:34:55 -08:35:01 -08:35:06 -08:35:10 -08:35:12 -08:35:47 -08:35:59 -08:36:00 -08:36:00 -08:36:03 -08:36:05 -08:36:07 -08:36:09 -08:36:10 -08:36:12 -08:36:14 -08:36:15 -08:36:19 -08:36:22 -08:36:23 -08:36:24 -08:36:27 -08:36:31 -08:36:32 -08:36:34 -08:36:35 -08:36:37 -08:36:39 -08:36:42 -08:36:47 -08:36:48 -08:36:50 -08:37:07 -08:37:08 -08:37:13 -08:37:15 -08:37:17 -08:37:18 -08:37:19 -08:37:21 -08:37:23 -08:37:25 -08:37:27 -08:37:30 -08:37:31 -08:37:34 -08:37:36 -08:37:40 -08:37:44 -08:37:45 -08:38:04 -08:38:06 -08:38:10 -08:38:16 -08:38:20 -08:38:29 -08:38:34 -08:38:41 -08:38:44 -08:39:11 -08:39:17 -08:39:17 -08:39:22 -08:39:25 -08:39:27 -08:39:28 -08:39:29 -08:39:31 -08:39:33 -08:39:35 -08:39:37 -08:39:39 -08:39:42 -08:39:47 -08:39:50 -08:39:52 -08:39:54 -08:39:55 -08:40:00 -08:40:03 -08:40:05 -08:40:08 -08:40:12 -08:40:19 -08:40:22 -08:40:26 -08:40:30 -08:40:39 -08:40:42 -08:40:43 -08:40:46 -08:40:48 -08:40:49 -08:40:50 -08:41:10 -08:41:13 -08:41:14 -08:41:40 -08:41:42 -08:41:46 -08:41:50 -08:41:53 -08:41:55 -08:41:57 -08:41:58 -08:42:00 -08:42:07 -08:42:09 -08:42:11 -08:42:14 -08:42:16 -08:42:29 -08:42:33 -08:42:52 -08:42:53 -08:42:55 -08:42:55 -08:42:58 -08:43:00 -08:43:01 -08:43:06 -08:43:07 -08:43:08 -08:43:10 -08:43:18 -08:43:25 -08:43:53 -08:44:02 -08:44:30 -08:44:32 -08:44:33 -08:44:47 -08:44:50 -08:45:12 -08:45:15 -08:45:16 -08:45:18 -08:45:19 -08:45:23 -08:45:25 -08:45:26 -08:45:27 -08:45:31 -08:45:33 -08:45:34 -08:45:35 -08:45:36 -08:46:27 -08:46:28 -08:46:31 -08:46:32 -08:46:38 -08:46:40 -08:47:20 -08:47:22 -08:47:23 -08:47:26 -08:47:34 -08:47:36 -08:47:38 -08:47:44 -08:47:46 -08:47:49 -08:47:51 -08:47:53 -08:47:55 -08:47:58 -08:48:01 -08:48:03 -08:48:05 -08:48:22 -08:48:24 -08:48:25 -08:48:26 -08:48:30 -08:48:31 -08:48:35 -08:48:38 -08:48:39 -08:48:41 -08:49:05 -08:49:06 -08:49:07 -08:49:08 -08:49:09 -08:49:20 -08:49:30 -08:49:35 -08:49:37 -08:49:48 -08:49:52 -08:49:54 -08:49:56 -08:49:59 -08:50:02 -08:50:17 -08:50:24 -08:50:32 -08:50:37 -08:50:42 -08:50:43 -08:50:45 -08:50:48 -08:50:54 -08:51:22 -08:51:26 -08:51:29 -08:51:33 -08:52:02 -08:52:03 -08:52:08 -08:52:18 -08:52:24 -08:52:43 -08:52:44 -08:52:47 -08:52:49 -08:52:49 -08:52:50 -08:52:55 -08:52:59 -08:53:02 -08:53:05 -08:53:06 -08:53:10 -08:53:12 -08:53:13 -08:53:15 -08:53:17 -08:53:19 -08:53:33 -08:53:35 -08:53:59 -08:54:01 -08:54:02 -08:54:03 -08:54:07 -08:54:08 -08:54:10 -08:54:12 -08:54:14 -08:54:24 -08:54:26 -08:54:28 -08:54:32 -08:54:33 -08:54:35 -08:54:36 -08:54:36 -08:54:37 -08:54:43 -08:55:16 -08:55:23 -08:55:24 -08:55:26 -08:55:29 -08:55:30 -08:55:37 -08:55:42 -08:56:39 -08:57:01 -08:57:03 -08:57:03 -08:57:04 -08:57:07 -08:57:08 -08:57:09 -08:57:11 -08:57:12 -08:57:14 -08:57:16 -08:57:19 -08:57:21 -08:57:22 -08:57:23 -08:57:24 -08:57:26 -08:57:27 -08:57:30 -08:57:31 -08:57:32 -08:57:33 -08:57:36 -08:57:37 -08:57:39 -08:57:39 -08:57:41 -08:58:01 -08:58:02 -08:58:09 -08:58:12 -08:58:34 -08:58:36 -08:58:43 -08:58:47 -08:59:18 -08:59:27 -08:59:31 -08:59:33 -08:59:47 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_4.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_4.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_4.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_4.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2298 +0,0 @@ -06:51:07 -06:51:08 -06:51:12 -06:51:13 -06:51:14 -06:51:18 -06:51:18 -06:51:21 -06:51:23 -06:51:24 -06:51:27 -06:51:29 -06:51:30 -06:51:36 -06:51:47 -06:51:49 -06:51:50 -06:51:52 -06:51:57 -06:51:58 -06:51:59 -06:52:01 -06:52:03 -06:52:04 -06:52:05 -06:52:06 -06:52:07 -06:52:09 -06:52:10 -06:52:12 -06:52:13 -06:52:15 -06:52:16 -06:52:18 -06:52:21 -06:52:22 -06:52:25 -06:52:26 -06:52:28 -06:52:30 -06:52:31 -06:52:33 -06:52:38 -06:52:40 -06:52:42 -06:52:44 -06:52:46 -06:52:47 -06:52:50 -06:52:51 -06:52:52 -06:52:56 -06:52:59 -06:53:00 -06:53:01 -06:53:03 -06:53:05 -06:53:06 -06:53:07 -06:53:39 -06:53:42 -06:53:43 -06:53:46 -06:53:47 -06:53:49 -06:53:50 -06:53:52 -06:53:54 -06:53:56 -06:53:57 -06:53:59 -06:54:02 -06:54:04 -06:54:05 -06:54:06 -06:54:08 -06:54:10 -06:54:14 -06:54:17 -06:54:19 -06:54:21 -06:54:23 -06:54:24 -06:54:25 -06:54:26 -06:54:30 -06:54:32 -06:54:33 -06:54:34 -06:54:36 -06:54:38 -06:54:41 -06:54:43 -06:54:45 -06:54:46 -06:54:47 -06:54:48 -06:54:49 -06:54:51 -06:54:53 -06:54:56 -06:54:57 -06:55:00 -06:55:01 -06:55:03 -06:55:05 -06:55:06 -06:55:07 -06:55:09 -06:55:11 -06:55:14 -06:55:16 -06:55:17 -06:55:20 -06:55:23 -06:55:39 -06:55:40 -06:55:41 -06:55:42 -06:55:43 -06:55:44 -06:55:44 -06:55:47 -06:55:49 -06:55:52 -06:55:53 -06:55:54 -06:55:55 -06:56:27 -06:56:40 -06:56:42 -06:56:43 -06:56:44 -06:56:46 -06:56:48 -06:56:50 -06:56:53 -06:56:55 -06:56:56 -06:56:58 -06:56:59 -06:57:00 -06:57:02 -06:57:02 -06:57:03 -06:57:04 -06:57:07 -06:57:07 -06:57:13 -06:57:14 -06:57:15 -06:57:17 -06:57:18 -06:57:22 -06:57:25 -06:57:27 -06:57:28 -06:57:31 -06:57:33 -06:57:35 -06:57:37 -06:57:44 -06:57:46 -06:57:47 -06:57:48 -06:57:50 -06:57:51 -06:57:52 -06:57:55 -06:57:56 -06:57:57 -06:58:00 -06:58:01 -06:58:02 -06:58:05 -06:58:06 -06:58:08 -06:58:09 -06:58:11 -06:58:12 -06:58:13 -06:58:17 -06:58:18 -06:58:20 -06:58:23 -06:58:25 -06:58:28 -06:58:29 -06:58:33 -06:58:37 -06:58:39 -06:58:40 -06:58:43 -06:58:46 -06:58:47 -06:58:49 -06:58:50 -06:58:51 -06:58:53 -06:58:55 -06:58:57 -06:58:58 -06:58:59 -06:59:01 -06:59:03 -06:59:04 -06:59:06 -06:59:11 -06:59:12 -06:59:14 -06:59:15 -06:59:16 -06:59:17 -06:59:19 -06:59:21 -06:59:24 -06:59:28 -06:59:29 -06:59:32 -06:59:34 -06:59:36 -06:59:37 -06:59:40 -06:59:41 -06:59:42 -06:59:43 -07:00:03 -07:00:05 -07:00:09 -07:00:10 -07:00:12 -07:00:14 -07:00:19 -07:00:22 -07:00:23 -07:00:33 -07:00:34 -07:00:38 -07:00:39 -07:00:40 -07:00:44 -07:00:45 -07:01:06 -07:01:08 -07:01:10 -07:01:12 -07:01:14 -07:01:15 -07:01:17 -07:01:22 -07:01:25 -07:01:27 -07:01:29 -07:01:30 -07:01:32 -07:01:35 -07:01:36 -07:01:37 -07:01:42 -07:01:43 -07:01:45 -07:01:48 -07:01:52 -07:01:53 -07:01:56 -07:01:59 -07:02:07 -07:02:08 -07:02:08 -07:02:11 -07:02:13 -07:02:15 -07:02:16 -07:02:17 -07:02:20 -07:02:22 -07:02:23 -07:02:27 -07:02:29 -07:02:30 -07:02:32 -07:02:37 -07:02:38 -07:02:40 -07:02:44 -07:02:45 -07:02:47 -07:02:49 -07:02:50 -07:02:52 -07:02:53 -07:02:54 -07:02:56 -07:02:57 -07:02:59 -07:03:01 -07:03:03 -07:03:04 -07:03:08 -07:03:09 -07:03:13 -07:03:16 -07:03:19 -07:03:21 -07:03:23 -07:03:24 -07:03:25 -07:03:28 -07:03:30 -07:03:32 -07:03:35 -07:03:37 -07:03:39 -07:03:41 -07:03:43 -07:03:45 -07:03:47 -07:03:51 -07:03:54 -07:03:56 -07:03:58 -07:04:07 -07:04:10 -07:04:11 -07:04:13 -07:04:15 -07:04:17 -07:04:21 -07:04:24 -07:04:26 -07:04:39 -07:04:40 -07:04:43 -07:04:44 -07:04:56 -07:04:56 -07:04:58 -07:05:00 -07:05:03 -07:05:07 -07:05:08 -07:05:10 -07:05:11 -07:05:13 -07:05:14 -07:05:15 -07:05:16 -07:05:20 -07:05:22 -07:05:23 -07:05:26 -07:05:32 -07:05:34 -07:05:35 -07:05:36 -07:05:39 -07:05:42 -07:05:44 -07:05:46 -07:05:49 -07:05:51 -07:05:53 -07:05:55 -07:06:01 -07:06:04 -07:06:05 -07:06:07 -07:06:16 -07:06:17 -07:06:18 -07:06:20 -07:06:21 -07:06:23 -07:06:24 -07:06:27 -07:06:31 -07:06:33 -07:06:34 -07:06:36 -07:06:38 -07:06:39 -07:06:40 -07:06:42 -07:06:44 -07:06:46 -07:06:48 -07:06:50 -07:06:52 -07:06:54 -07:06:57 -07:07:04 -07:07:08 -07:07:10 -07:07:13 -07:07:15 -07:07:17 -07:07:18 -07:07:21 -07:07:23 -07:07:25 -07:07:27 -07:07:38 -07:07:42 -07:07:44 -07:07:45 -07:07:47 -07:07:49 -07:07:51 -07:07:53 -07:07:55 -07:07:57 -07:08:01 -07:08:04 -07:08:06 -07:08:08 -07:08:09 -07:08:12 -07:08:13 -07:08:18 -07:08:20 -07:08:21 -07:08:23 -07:08:25 -07:08:28 -07:08:29 -07:08:31 -07:08:34 -07:08:36 -07:08:37 -07:08:40 -07:08:41 -07:08:45 -07:08:48 -07:08:51 -07:08:53 -07:08:55 -07:08:57 -07:08:58 -07:09:00 -07:09:03 -07:09:05 -07:09:06 -07:09:10 -07:09:11 -07:09:15 -07:09:17 -07:09:19 -07:09:20 -07:09:23 -07:09:26 -07:09:28 -07:09:30 -07:09:31 -07:09:32 -07:09:34 -07:09:46 -07:09:50 -07:09:52 -07:09:54 -07:09:56 -07:09:59 -07:10:02 -07:10:04 -07:10:07 -07:10:09 -07:10:11 -07:10:13 -07:10:14 -07:10:17 -07:10:21 -07:10:22 -07:10:27 -07:10:29 -07:10:31 -07:10:32 -07:10:34 -07:10:36 -07:10:38 -07:10:44 -07:10:47 -07:10:48 -07:10:51 -07:10:53 -07:10:55 -07:10:57 -07:11:00 -07:11:01 -07:11:07 -07:11:08 -07:11:10 -07:11:14 -07:11:17 -07:11:21 -07:11:35 -07:11:37 -07:11:40 -07:11:43 -07:11:51 -07:11:55 -07:12:00 -07:12:06 -07:12:13 -07:12:16 -07:12:19 -07:12:23 -07:12:27 -07:12:30 -07:12:35 -07:12:39 -07:12:42 -07:12:45 -07:12:50 -07:12:54 -07:13:00 -07:13:03 -07:13:05 -07:13:09 -07:13:11 -07:13:16 -07:13:19 -07:13:22 -07:13:24 -07:13:29 -07:13:37 -07:13:42 -07:13:45 -07:13:47 -07:13:50 -07:13:53 -07:13:55 -07:13:58 -07:14:04 -07:14:07 -07:14:12 -07:14:13 -07:14:16 -07:14:21 -07:14:26 -07:14:30 -07:14:34 -07:14:37 -07:14:40 -07:14:45 -07:14:47 -07:14:51 -07:14:58 -07:15:01 -07:15:02 -07:15:06 -07:15:08 -07:15:10 -07:15:13 -07:15:15 -07:15:18 -07:15:20 -07:15:22 -07:15:25 -07:15:26 -07:15:27 -07:15:30 -07:15:35 -07:15:37 -07:15:39 -07:15:41 -07:15:43 -07:15:44 -07:15:47 -07:15:50 -07:15:52 -07:15:56 -07:15:58 -07:16:02 -07:16:03 -07:16:05 -07:16:06 -07:16:10 -07:16:15 -07:16:18 -07:16:21 -07:16:26 -07:16:29 -07:16:31 -07:16:35 -07:16:48 -07:16:51 -07:16:53 -07:16:55 -07:16:57 -07:16:59 -07:17:01 -07:17:10 -07:17:12 -07:17:14 -07:17:17 -07:17:20 -07:17:22 -07:17:23 -07:17:25 -07:17:28 -07:17:29 -07:17:31 -07:17:33 -07:17:35 -07:17:39 -07:17:41 -07:17:43 -07:17:44 -07:17:45 -07:17:48 -07:17:50 -07:17:52 -07:17:55 -07:17:56 -07:17:58 -07:18:00 -07:18:02 -07:18:05 -07:18:06 -07:18:09 -07:18:10 -07:18:12 -07:18:13 -07:18:15 -07:18:17 -07:18:19 -07:18:22 -07:18:24 -07:18:27 -07:18:30 -07:18:31 -07:18:32 -07:18:39 -07:18:43 -07:18:44 -07:18:46 -07:18:48 -07:18:50 -07:18:52 -07:18:53 -07:18:59 -07:19:02 -07:19:06 -07:19:08 -07:19:10 -07:19:11 -07:19:14 -07:19:17 -07:19:19 -07:19:23 -07:19:24 -07:19:26 -07:19:28 -07:19:30 -07:19:34 -07:19:35 -07:19:37 -07:19:40 -07:19:43 -07:19:45 -07:19:47 -07:19:49 -07:19:50 -07:19:54 -07:19:57 -07:19:58 -07:20:00 -07:20:08 -07:20:12 -07:20:13 -07:20:18 -07:20:20 -07:20:22 -07:20:24 -07:20:26 -07:20:27 -07:20:30 -07:20:32 -07:20:33 -07:20:39 -07:20:43 -07:20:44 -07:20:47 -07:20:48 -07:20:54 -07:20:59 -07:21:01 -07:21:06 -07:21:08 -07:21:10 -07:21:12 -07:21:17 -07:21:19 -07:21:21 -07:21:24 -07:21:26 -07:21:28 -07:21:29 -07:21:32 -07:21:34 -07:21:35 -07:21:38 -07:21:43 -07:21:45 -07:21:47 -07:21:48 -07:21:50 -07:21:50 -07:21:51 -07:21:53 -07:21:57 -07:21:58 -07:22:00 -07:22:02 -07:22:05 -07:22:06 -07:22:08 -07:22:11 -07:22:12 -07:22:15 -07:22:19 -07:22:22 -07:22:25 -07:22:26 -07:22:28 -07:22:32 -07:22:41 -07:22:49 -07:22:54 -07:22:57 -07:22:58 -07:23:01 -07:23:02 -07:23:05 -07:23:07 -07:23:09 -07:23:12 -07:23:14 -07:23:15 -07:23:18 -07:23:21 -07:23:22 -07:23:24 -07:23:26 -07:23:31 -07:23:32 -07:23:34 -07:23:37 -07:23:39 -07:23:40 -07:23:43 -07:23:46 -07:23:48 -07:23:51 -07:23:51 -07:23:53 -07:23:59 -07:24:01 -07:24:03 -07:24:05 -07:24:08 -07:24:09 -07:24:11 -07:24:14 -07:24:19 -07:24:20 -07:24:23 -07:24:25 -07:24:28 -07:24:32 -07:24:35 -07:24:39 -07:24:42 -07:24:44 -07:24:50 -07:24:59 -07:25:05 -07:25:11 -07:25:16 -07:25:19 -07:25:26 -07:25:29 -07:25:33 -07:25:36 -07:25:38 -07:25:41 -07:25:44 -07:25:47 -07:25:51 -07:25:55 -07:26:00 -07:26:03 -07:26:07 -07:26:10 -07:26:13 -07:26:17 -07:26:19 -07:26:22 -07:26:25 -07:26:28 -07:26:30 -07:26:32 -07:26:36 -07:26:38 -07:26:40 -07:26:43 -07:26:45 -07:26:52 -07:26:54 -07:26:57 -07:26:58 -07:27:02 -07:27:05 -07:27:06 -07:27:09 -07:27:13 -07:27:15 -07:27:17 -07:27:21 -07:27:23 -07:27:25 -07:27:29 -07:27:31 -07:27:35 -07:27:38 -07:27:41 -07:27:43 -07:27:59 -07:28:01 -07:28:02 -07:28:06 -07:28:08 -07:28:11 -07:28:13 -07:28:15 -07:28:16 -07:28:18 -07:28:19 -07:28:25 -07:28:27 -07:28:33 -07:28:35 -07:28:37 -07:28:41 -07:28:45 -07:28:48 -07:28:51 -07:28:54 -07:28:57 -07:29:00 -07:29:02 -07:29:06 -07:29:08 -07:29:13 -07:29:17 -07:29:20 -07:29:24 -07:29:27 -07:29:32 -07:29:33 -07:29:37 -07:29:40 -07:29:43 -07:29:48 -07:29:50 -07:29:54 -07:29:57 -07:30:01 -07:30:07 -07:30:09 -07:30:13 -07:30:18 -07:30:20 -07:30:22 -07:30:24 -07:30:27 -07:30:30 -07:30:32 -07:30:38 -07:30:41 -07:30:43 -07:30:47 -07:30:50 -07:30:53 -07:30:56 -07:31:01 -07:31:04 -07:31:07 -07:31:16 -07:31:22 -07:31:26 -07:31:31 -07:31:34 -07:31:39 -07:31:45 -07:31:49 -07:31:53 -07:31:57 -07:32:02 -07:32:10 -07:33:03 -07:33:06 -07:33:10 -07:33:13 -07:33:16 -07:33:18 -07:33:22 -07:33:25 -07:33:28 -07:33:33 -07:33:38 -07:33:40 -07:33:44 -07:33:47 -07:33:50 -07:33:52 -07:33:54 -07:34:00 -07:34:03 -07:34:07 -07:34:10 -07:34:14 -07:34:17 -07:34:22 -07:34:24 -07:34:31 -07:34:33 -07:34:35 -07:34:37 -07:34:38 -07:34:40 -07:34:43 -07:34:46 -07:34:49 -07:34:52 -07:34:55 -07:35:00 -07:35:02 -07:35:06 -07:35:08 -07:35:11 -07:35:19 -07:35:27 -07:35:29 -07:35:31 -07:35:33 -07:35:34 -07:35:37 -07:35:42 -07:35:44 -07:35:46 -07:35:52 -07:35:56 -07:35:57 -07:36:02 -07:36:06 -07:36:10 -07:36:13 -07:36:16 -07:36:18 -07:36:22 -07:36:25 -07:36:26 -07:36:27 -07:36:30 -07:36:33 -07:36:36 -07:36:39 -07:36:43 -07:36:47 -07:36:52 -07:36:55 -07:36:57 -07:37:07 -07:37:08 -07:37:11 -07:37:13 -07:37:17 -07:37:20 -07:37:23 -07:37:26 -07:37:30 -07:37:30 -07:37:34 -07:37:38 -07:37:48 -07:37:52 -07:37:53 -07:37:55 -07:37:58 -07:38:02 -07:38:04 -07:38:06 -07:38:09 -07:38:14 -07:38:18 -07:38:20 -07:38:23 -07:38:24 -07:38:28 -07:38:36 -07:38:39 -07:38:43 -07:38:44 -07:38:47 -07:38:50 -07:38:53 -07:38:55 -07:38:58 -07:39:00 -07:39:02 -07:39:05 -07:39:09 -07:39:13 -07:39:16 -07:39:21 -07:39:27 -07:39:30 -07:39:34 -07:39:38 -07:39:46 -07:39:59 -07:40:20 -07:40:25 -07:40:30 -07:40:34 -07:40:38 -07:40:41 -07:40:47 -07:40:50 -07:40:50 -07:40:54 -07:41:00 -07:41:05 -07:41:11 -07:41:15 -07:41:20 -07:41:28 -07:41:35 -07:41:41 -07:41:46 -07:41:51 -07:41:54 -07:41:59 -07:42:05 -07:42:10 -07:42:14 -07:42:20 -07:42:25 -07:42:31 -07:42:35 -07:42:39 -07:42:43 -07:42:48 -07:42:51 -07:42:55 -07:43:00 -07:43:08 -07:43:12 -07:43:14 -07:43:18 -07:43:31 -07:43:34 -07:43:38 -07:43:41 -07:43:46 -07:43:52 -07:43:57 -07:43:59 -07:44:03 -07:44:08 -07:44:11 -07:44:17 -07:44:22 -07:44:24 -07:44:29 -07:44:32 -07:44:39 -07:44:41 -07:44:44 -07:44:48 -07:44:53 -07:44:56 -07:45:02 -07:45:06 -07:45:13 -07:45:17 -07:45:21 -07:45:25 -07:45:32 -07:45:37 -07:45:43 -07:45:49 -07:45:54 -07:46:00 -07:46:04 -07:46:13 -07:46:19 -07:46:23 -07:46:45 -07:46:48 -07:46:50 -07:46:54 -07:46:57 -07:47:01 -07:47:08 -07:47:12 -07:47:18 -07:47:21 -07:47:24 -07:47:29 -07:47:34 -07:47:38 -07:47:43 -07:47:51 -07:47:54 -07:47:58 -07:48:01 -07:48:03 -07:48:07 -07:48:11 -07:48:16 -07:48:23 -07:48:25 -07:48:29 -07:48:32 -07:48:35 -07:48:39 -07:48:47 -07:48:53 -07:48:58 -07:49:05 -07:49:08 -07:49:10 -07:49:14 -07:49:17 -07:49:20 -07:49:25 -07:49:30 -07:49:34 -07:49:37 -07:49:45 -07:49:48 -07:49:52 -07:49:54 -07:49:58 -07:50:12 -07:50:14 -07:50:20 -07:50:28 -07:50:32 -07:50:37 -07:50:39 -07:50:46 -07:50:49 -07:50:51 -07:50:54 -07:50:57 -07:51:00 -07:51:10 -07:51:17 -07:51:21 -07:51:25 -07:51:30 -07:51:32 -07:51:34 -07:51:36 -07:51:38 -07:51:40 -07:51:42 -07:51:48 -07:51:52 -07:51:55 -07:51:56 -07:51:58 -07:52:00 -07:52:03 -07:52:06 -07:52:08 -07:52:09 -07:52:10 -07:52:12 -07:52:17 -07:52:19 -07:52:21 -07:52:24 -07:52:28 -07:52:31 -07:52:33 -07:52:35 -07:52:37 -07:52:39 -07:52:40 -07:52:44 -07:52:47 -07:52:49 -07:52:51 -07:52:54 -07:52:57 -07:53:02 -07:53:03 -07:53:06 -07:53:09 -07:53:13 -07:53:14 -07:53:17 -07:53:19 -07:53:27 -07:53:27 -07:53:34 -07:53:36 -07:53:38 -07:53:40 -07:53:41 -07:53:43 -07:53:49 -07:53:51 -07:53:52 -07:53:54 -07:53:56 -07:54:00 -07:54:03 -07:54:05 -07:54:10 -07:54:12 -07:54:14 -07:54:15 -07:54:17 -07:54:19 -07:54:21 -07:54:22 -07:54:24 -07:54:25 -07:54:27 -07:54:29 -07:54:32 -07:54:35 -07:54:38 -07:54:47 -07:54:49 -07:54:52 -07:54:55 -07:54:56 -07:54:59 -07:55:00 -07:55:03 -07:55:06 -07:55:13 -07:55:15 -07:55:16 -07:55:19 -07:55:22 -07:55:24 -07:55:29 -07:55:31 -07:55:32 -07:55:35 -07:55:44 -07:55:48 -07:55:50 -07:55:52 -07:55:54 -07:55:56 -07:55:58 -07:56:02 -07:56:09 -07:56:13 -07:56:14 -07:56:16 -07:56:21 -07:56:22 -07:56:24 -07:56:25 -07:56:26 -07:56:30 -07:56:32 -07:56:36 -07:56:37 -07:56:41 -07:56:42 -07:56:45 -07:56:47 -07:56:49 -07:56:51 -07:56:54 -07:56:59 -07:57:04 -07:57:07 -07:57:09 -07:57:10 -07:57:12 -07:57:17 -07:57:19 -07:57:21 -07:57:25 -07:57:28 -07:57:31 -07:57:47 -07:57:50 -07:57:58 -07:58:01 -07:58:04 -07:58:08 -07:58:18 -07:58:24 -07:58:31 -07:58:36 -07:58:42 -07:58:45 -07:58:50 -07:58:54 -07:58:57 -07:59:04 -07:59:09 -07:59:15 -07:59:18 -07:59:21 -07:59:26 -07:59:31 -07:59:37 -07:59:44 -07:59:47 -07:59:55 -07:59:58 -08:00:02 -08:00:05 -08:00:09 -08:00:14 -08:00:18 -08:00:26 -08:00:30 -08:00:33 -08:00:35 -08:00:39 -08:00:42 -08:00:45 -08:00:48 -08:00:50 -08:00:54 -08:00:58 -08:01:06 -08:01:08 -08:01:12 -08:01:16 -08:01:18 -08:01:22 -08:01:25 -08:01:28 -08:01:32 -08:01:35 -08:01:39 -08:01:43 -08:01:48 -08:01:55 -08:01:59 -08:02:03 -08:02:07 -08:02:11 -08:02:13 -08:02:16 -08:02:21 -08:02:27 -08:02:30 -08:02:33 -08:02:35 -08:02:38 -08:02:41 -08:02:45 -08:02:49 -08:02:56 -08:02:59 -08:03:02 -08:03:07 -08:03:09 -08:03:11 -08:03:14 -08:03:18 -08:03:20 -08:03:24 -08:03:27 -08:03:32 -08:03:36 -08:03:40 -08:03:41 -08:03:45 -08:03:49 -08:03:49 -08:03:52 -08:03:54 -08:03:57 -08:03:59 -08:04:02 -08:04:05 -08:04:08 -08:04:11 -08:04:13 -08:04:18 -08:04:21 -08:04:23 -08:04:27 -08:04:31 -08:04:38 -08:04:40 -08:04:42 -08:04:45 -08:04:48 -08:04:52 -08:04:55 -08:04:57 -08:05:01 -08:05:05 -08:05:09 -08:05:11 -08:05:15 -08:05:20 -08:05:24 -08:05:28 -08:05:32 -08:05:39 -08:06:05 -08:06:11 -08:06:15 -08:06:29 -08:06:35 -08:06:39 -08:06:49 -08:06:53 -08:06:57 -08:07:01 -08:07:04 -08:07:07 -08:07:11 -08:07:14 -08:07:18 -08:07:21 -08:07:22 -08:07:29 -08:07:32 -08:07:35 -08:07:39 -08:07:42 -08:07:44 -08:07:47 -08:07:50 -08:07:54 -08:07:58 -08:08:02 -08:08:07 -08:08:09 -08:08:11 -08:08:13 -08:08:18 -08:08:21 -08:08:25 -08:08:28 -08:08:30 -08:08:32 -08:08:35 -08:08:39 -08:08:42 -08:08:45 -08:08:47 -08:08:51 -08:08:55 -08:09:01 -08:09:05 -08:09:09 -08:09:14 -08:09:19 -08:09:23 -08:09:26 -08:09:31 -08:09:35 -08:09:41 -08:09:44 -08:09:47 -08:09:51 -08:09:53 -08:09:55 -08:09:58 -08:10:01 -08:10:04 -08:10:07 -08:10:11 -08:10:14 -08:10:19 -08:10:22 -08:10:28 -08:10:31 -08:10:38 -08:10:41 -08:10:43 -08:10:45 -08:10:51 -08:10:54 -08:10:58 -08:11:03 -08:11:06 -08:11:12 -08:11:18 -08:11:20 -08:11:25 -08:11:28 -08:11:31 -08:11:36 -08:11:40 -08:11:44 -08:11:47 -08:11:50 -08:11:58 -08:12:02 -08:12:04 -08:12:07 -08:12:10 -08:12:23 -08:12:33 -08:12:38 -08:12:43 -08:12:48 -08:12:51 -08:12:55 -08:12:59 -08:13:03 -08:13:05 -08:13:08 -08:13:12 -08:13:16 -08:13:20 -08:13:23 -08:13:26 -08:13:29 -08:13:31 -08:13:33 -08:13:35 -08:13:45 -08:13:49 -08:13:56 -08:14:02 -08:14:06 -08:14:12 -08:14:13 -08:14:18 -08:14:21 -08:14:23 -08:14:25 -08:14:27 -08:14:30 -08:14:32 -08:14:38 -08:14:41 -08:14:45 -08:14:48 -08:14:50 -08:14:53 -08:14:56 -08:14:59 -08:15:02 -08:15:06 -08:15:09 -08:15:11 -08:15:13 -08:15:17 -08:15:24 -08:15:27 -08:15:27 -08:15:29 -08:15:32 -08:15:34 -08:15:37 -08:15:40 -08:15:42 -08:15:45 -08:15:47 -08:15:50 -08:15:51 -08:15:59 -08:16:02 -08:16:04 -08:16:06 -08:16:09 -08:16:13 -08:16:16 -08:16:18 -08:16:20 -08:16:25 -08:16:26 -08:16:30 -08:16:33 -08:16:36 -08:16:38 -08:16:40 -08:16:42 -08:16:45 -08:16:48 -08:16:50 -08:16:54 -08:16:58 -08:17:01 -08:17:03 -08:17:05 -08:17:07 -08:17:10 -08:17:13 -08:17:15 -08:17:19 -08:17:22 -08:17:24 -08:17:26 -08:17:28 -08:17:32 -08:17:36 -08:17:39 -08:17:42 -08:17:46 -08:17:47 -08:17:49 -08:17:51 -08:17:54 -08:17:56 -08:17:58 -08:18:01 -08:18:14 -08:18:18 -08:18:20 -08:18:22 -08:18:23 -08:18:25 -08:18:27 -08:18:29 -08:18:32 -08:18:36 -08:18:39 -08:18:42 -08:18:45 -08:18:50 -08:18:51 -08:18:54 -08:18:56 -08:18:58 -08:19:06 -08:19:08 -08:19:11 -08:19:13 -08:19:16 -08:19:18 -08:19:21 -08:19:26 -08:19:29 -08:19:31 -08:19:32 -08:19:34 -08:19:36 -08:19:38 -08:19:39 -08:19:42 -08:19:46 -08:19:47 -08:19:51 -08:19:52 -08:19:54 -08:19:56 -08:19:59 -08:20:02 -08:20:06 -08:20:14 -08:20:17 -08:20:19 -08:20:24 -08:20:26 -08:20:31 -08:20:38 -08:20:40 -08:20:42 -08:20:44 -08:20:48 -08:20:50 -08:20:53 -08:20:55 -08:20:57 -08:20:59 -08:21:03 -08:21:05 -08:21:07 -08:21:09 -08:21:11 -08:21:13 -08:21:15 -08:21:18 -08:21:23 -08:21:25 -08:21:32 -08:21:35 -08:21:38 -08:21:41 -08:21:44 -08:21:45 -08:21:47 -08:21:49 -08:21:51 -08:21:54 -08:22:05 -08:22:07 -08:22:10 -08:22:12 -08:22:13 -08:22:18 -08:22:23 -08:22:24 -08:22:29 -08:22:30 -08:22:35 -08:22:37 -08:22:39 -08:22:42 -08:22:42 -08:22:43 -08:22:46 -08:22:48 -08:22:51 -08:22:53 -08:22:55 -08:22:58 -08:23:00 -08:23:01 -08:23:03 -08:23:08 -08:23:09 -08:23:11 -08:23:17 -08:23:19 -08:23:22 -08:23:25 -08:23:26 -08:23:29 -08:23:32 -08:23:35 -08:23:37 -08:23:41 -08:23:48 -08:23:49 -08:23:50 -08:23:58 -08:24:02 -08:24:04 -08:24:05 -08:24:07 -08:24:14 -08:24:15 -08:24:18 -08:24:24 -08:24:27 -08:24:28 -08:24:30 -08:24:34 -08:24:36 -08:24:40 -08:24:46 -08:24:48 -08:24:54 -08:24:56 -08:24:57 -08:24:59 -08:25:05 -08:25:06 -08:25:07 -08:25:14 -08:25:16 -08:25:18 -08:25:22 -08:25:29 -08:25:33 -08:25:34 -08:25:36 -08:25:39 -08:25:43 -08:25:46 -08:25:47 -08:25:48 -08:25:51 -08:25:53 -08:25:56 -08:25:58 -08:26:06 -08:26:09 -08:26:12 -08:26:15 -08:26:18 -08:26:19 -08:26:22 -08:26:23 -08:26:26 -08:26:27 -08:26:30 -08:26:33 -08:26:36 -08:26:38 -08:26:39 -08:26:40 -08:26:43 -08:26:45 -08:26:50 -08:26:54 -08:26:55 -08:26:56 -08:26:58 -08:27:00 -08:27:04 -08:27:07 -08:27:09 -08:27:11 -08:27:15 -08:27:16 -08:27:20 -08:27:25 -08:27:26 -08:27:28 -08:27:30 -08:27:31 -08:27:35 -08:27:36 -08:27:37 -08:27:39 -08:27:41 -08:27:47 -08:27:50 -08:27:53 -08:27:56 -08:27:58 -08:28:00 -08:28:03 -08:28:05 -08:28:08 -08:28:11 -08:28:13 -08:28:15 -08:28:19 -08:28:22 -08:28:29 -08:28:31 -08:28:33 -08:28:36 -08:28:43 -08:28:46 -08:28:56 -08:29:03 -08:29:08 -08:29:12 -08:29:16 -08:29:23 -08:29:28 -08:29:32 -08:29:35 -08:29:37 -08:29:41 -08:29:45 -08:29:50 -08:29:53 -08:29:56 -08:29:59 -08:30:03 -08:30:06 -08:30:08 -08:30:12 -08:30:14 -08:30:20 -08:30:24 -08:30:25 -08:30:29 -08:30:32 -08:30:35 -08:30:37 -08:30:41 -08:30:44 -08:30:46 -08:30:48 -08:30:49 -08:30:53 -08:30:57 -08:31:01 -08:31:03 -08:31:05 -08:31:07 -08:31:10 -08:31:12 -08:31:13 -08:31:16 -08:31:18 -08:31:22 -08:31:24 -08:31:27 -08:31:30 -08:31:36 -08:31:40 -08:31:44 -08:31:46 -08:31:49 -08:31:50 -08:31:53 -08:31:55 -08:31:56 -08:32:03 -08:32:07 -08:32:10 -08:32:12 -08:32:16 -08:32:17 -08:32:19 -08:32:20 -08:32:24 -08:32:26 -08:32:28 -08:32:31 -08:32:34 -08:32:36 -08:32:40 -08:32:42 -08:32:45 -08:32:48 -08:32:52 -08:32:56 -08:32:59 -08:33:01 -08:33:02 -08:33:04 -08:33:07 -08:33:10 -08:33:12 -08:33:15 -08:33:19 -08:33:22 -08:33:24 -08:33:28 -08:33:37 -08:33:43 -08:33:46 -08:33:50 -08:33:56 -08:34:03 -08:34:08 -08:34:14 -08:34:23 -08:34:42 -08:34:50 -08:34:54 -08:34:58 -08:35:02 -08:35:07 -08:35:09 -08:35:14 -08:35:19 -08:35:22 -08:35:25 -08:35:28 -08:35:37 -08:35:41 -08:35:47 -08:35:50 -08:35:53 -08:35:55 -08:35:56 -08:35:59 -08:36:03 -08:36:05 -08:36:08 -08:36:12 -08:36:15 -08:36:20 -08:36:24 -08:36:26 -08:36:36 -08:36:37 -08:36:39 -08:36:45 -08:36:47 -08:36:50 -08:36:53 -08:36:54 -08:36:57 -08:36:59 -08:37:02 -08:37:05 -08:37:07 -08:37:11 -08:37:12 -08:37:17 -08:37:21 -08:37:23 -08:37:25 -08:37:27 -08:37:29 -08:37:32 -08:37:35 -08:37:39 -08:37:42 -08:37:45 -08:37:48 -08:37:50 -08:37:53 -08:37:55 -08:38:04 -08:38:08 -08:38:10 -08:38:12 -08:38:22 -08:38:32 -08:38:33 -08:38:35 -08:38:38 -08:38:42 -08:38:44 -08:38:44 -08:38:49 -08:38:53 -08:38:55 -08:38:58 -08:39:02 -08:39:07 -08:39:10 -08:39:13 -08:39:15 -08:39:20 -08:39:25 -08:39:30 -08:39:35 -08:39:39 -08:39:45 -08:39:49 -08:40:01 -08:40:04 -08:40:05 -08:40:08 -08:40:12 -08:40:18 -08:40:21 -08:40:25 -08:40:27 -08:40:30 -08:40:33 -08:40:36 -08:40:38 -08:40:41 -08:40:43 -08:40:45 -08:40:49 -08:40:51 -08:40:55 -08:40:58 -08:41:01 -08:41:04 -08:41:07 -08:41:08 -08:41:15 -08:41:20 -08:41:24 -08:41:28 -08:41:32 -08:41:34 -08:41:38 -08:41:43 -08:41:48 -08:41:51 -08:41:54 -08:41:57 -08:41:58 -08:42:01 -08:42:04 -08:42:07 -08:42:12 -08:42:16 -08:42:20 -08:42:25 -08:42:30 -08:42:33 -08:42:35 -08:42:39 -08:42:42 -08:42:46 -08:42:49 -08:42:53 -08:42:59 -08:43:06 -08:43:11 -08:43:30 -08:43:33 -08:43:38 -08:43:42 -08:43:45 -08:43:48 -08:43:52 -08:43:55 -08:43:59 -08:44:02 -08:44:07 -08:44:11 -08:44:15 -08:44:19 -08:44:22 -08:44:25 -08:44:28 -08:44:32 -08:44:40 -08:44:42 -08:44:45 -08:44:49 -08:44:54 -08:44:56 -08:45:00 -08:45:03 -08:45:10 -08:45:12 -08:45:18 -08:45:22 -08:45:25 -08:45:27 -08:45:30 -08:45:33 -08:45:36 -08:45:42 -08:45:45 -08:45:49 -08:45:52 -08:45:55 -08:46:00 -08:46:03 -08:46:07 -08:46:10 -08:46:15 -08:46:18 -08:46:21 -08:46:25 -08:46:32 -08:46:35 -08:46:39 -08:46:43 -08:46:48 -08:46:53 -08:46:58 -08:47:07 -08:47:11 -08:47:14 -08:47:19 -08:47:23 -08:47:28 -08:47:32 -08:47:35 -08:47:40 -08:47:44 -08:47:48 -08:47:54 -08:48:02 -08:48:17 -08:48:23 -08:48:29 -08:48:33 -08:48:37 -08:48:42 -08:48:46 -08:48:50 -08:48:53 -08:48:56 -08:48:59 -08:49:06 -08:49:11 -08:49:15 -08:49:20 -08:49:25 -08:49:29 -08:49:34 -08:49:36 -08:49:41 -08:49:43 -08:49:48 -08:49:54 -08:49:57 -08:50:02 -08:50:09 -08:50:18 -08:50:34 -08:50:40 -08:50:46 -08:50:53 -08:51:00 -08:51:16 -08:51:21 -08:51:27 -08:51:34 -08:51:41 -08:51:47 -08:51:52 -08:51:55 -08:51:59 -08:52:02 -08:52:05 -08:52:08 -08:52:13 -08:52:23 -08:52:25 -08:52:31 -08:52:35 -08:52:38 -08:52:40 -08:52:45 -08:52:49 -08:52:52 -08:52:54 -08:52:58 -08:53:05 -08:53:12 -08:53:14 -08:53:17 -08:53:20 -08:53:22 -08:53:24 -08:53:31 -08:53:32 -08:53:35 -08:53:39 -08:53:56 -08:53:58 -08:54:01 -08:54:03 -08:54:04 -08:54:06 -08:54:08 -08:54:11 -08:54:13 -08:54:16 -08:54:18 -08:54:22 -08:54:24 -08:54:27 -08:54:34 -08:54:42 -08:54:45 -08:54:46 -08:54:48 -08:54:49 -08:54:52 -08:54:55 -08:54:59 -08:55:01 -08:55:07 -08:55:10 -08:55:13 -08:55:21 -08:55:27 -08:55:32 -08:55:45 -08:55:50 -08:56:07 -08:56:12 -08:56:17 -08:56:22 -08:56:25 -08:56:31 -08:56:35 -08:56:38 -08:56:45 -08:56:48 -08:57:13 -08:57:42 -08:57:43 -08:57:44 -08:57:47 -08:57:49 -08:57:51 -08:57:52 -08:57:53 -08:57:55 -08:57:57 -08:58:00 -08:58:04 -08:58:08 -08:58:09 -08:58:10 -08:58:12 -08:58:13 -08:58:16 -08:58:18 -08:58:20 -08:58:23 -08:58:25 -08:58:30 -08:58:32 -08:58:35 -08:58:38 -08:58:42 -08:58:45 -08:58:50 -08:58:51 -08:59:11 -08:59:12 -08:59:16 -08:59:18 -08:59:47 -09:00:00 -09:00:03 -09:00:05 -09:00:23 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_6.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_6.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_6.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_6.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2298 +0,0 @@ -06:51:45 -06:51:45 -06:51:50 -06:51:52 -06:51:53 -06:51:57 -06:51:58 -06:52:00 -06:52:01 -06:52:02 -06:52:05 -06:52:07 -06:52:08 -06:52:14 -06:52:26 -06:52:27 -06:52:29 -06:52:31 -06:52:37 -06:52:39 -06:52:40 -06:52:43 -06:52:45 -06:52:47 -06:52:48 -06:52:49 -06:52:51 -06:52:53 -06:52:54 -06:52:56 -06:52:57 -06:52:59 -06:53:00 -06:53:02 -06:53:04 -06:53:06 -06:53:08 -06:53:10 -06:53:11 -06:53:14 -06:53:15 -06:53:17 -06:53:21 -06:53:23 -06:53:24 -06:53:26 -06:53:28 -06:53:29 -06:53:32 -06:53:33 -06:53:36 -06:53:38 -06:53:39 -06:53:40 -06:53:42 -06:53:43 -06:53:46 -06:53:47 -06:54:17 -06:54:20 -06:54:21 -06:54:25 -06:54:27 -06:54:28 -06:54:30 -06:54:32 -06:54:33 -06:54:36 -06:54:38 -06:54:40 -06:54:41 -06:54:43 -06:54:44 -06:54:46 -06:54:48 -06:54:52 -06:54:54 -06:54:56 -06:54:58 -06:55:00 -06:55:01 -06:55:03 -06:55:04 -06:55:05 -06:55:06 -06:55:10 -06:55:12 -06:55:13 -06:55:15 -06:55:17 -06:55:19 -06:55:20 -06:55:23 -06:55:25 -06:55:27 -06:55:28 -06:55:30 -06:55:31 -06:55:32 -06:55:35 -06:55:36 -06:55:38 -06:55:41 -06:55:42 -06:55:44 -06:55:47 -06:55:48 -06:55:50 -06:55:52 -06:55:54 -06:55:59 -06:56:00 -06:56:02 -06:56:04 -06:56:06 -06:56:19 -06:56:20 -06:56:21 -06:56:22 -06:56:24 -06:56:26 -06:56:27 -06:56:30 -06:56:33 -06:56:37 -06:56:41 -06:56:44 -06:56:47 -06:56:50 -06:57:19 -06:57:20 -06:57:21 -06:57:23 -06:57:24 -06:57:29 -06:57:33 -06:57:36 -06:57:37 -06:57:38 -06:57:40 -06:57:41 -06:57:44 -06:57:45 -06:57:47 -06:57:48 -06:57:50 -06:57:51 -06:57:55 -06:57:57 -06:57:59 -06:58:01 -06:58:03 -06:58:07 -06:58:09 -06:58:14 -06:58:16 -06:58:19 -06:58:22 -06:58:25 -06:58:28 -06:58:31 -06:58:34 -06:58:36 -06:58:40 -06:58:43 -06:58:47 -06:58:50 -06:58:54 -06:58:57 -06:59:00 -06:59:03 -06:59:06 -06:59:08 -06:59:11 -06:59:13 -06:59:16 -06:59:19 -06:59:21 -06:59:23 -06:59:26 -06:59:30 -06:59:34 -06:59:37 -06:59:41 -06:59:43 -06:59:47 -06:59:50 -06:59:54 -06:59:57 -06:59:59 -07:00:01 -07:00:03 -07:00:07 -07:00:09 -07:00:11 -07:00:16 -07:00:18 -07:00:22 -07:00:25 -07:00:28 -07:00:32 -07:00:34 -07:00:38 -07:00:40 -07:00:43 -07:00:46 -07:00:50 -07:00:53 -07:00:55 -07:00:57 -07:00:59 -07:01:04 -07:01:06 -07:01:08 -07:01:11 -07:01:16 -07:01:19 -07:01:22 -07:01:25 -07:01:27 -07:01:30 -07:01:34 -07:01:37 -07:01:41 -07:01:44 -07:01:47 -07:01:52 -07:01:56 -07:01:58 -07:02:00 -07:02:02 -07:02:05 -07:02:07 -07:02:09 -07:02:11 -07:02:14 -07:02:17 -07:02:19 -07:02:22 -07:02:24 -07:02:25 -07:02:29 -07:02:35 -07:02:36 -07:02:39 -07:02:42 -07:02:44 -07:02:46 -07:02:49 -07:02:53 -07:02:57 -07:03:01 -07:03:03 -07:03:05 -07:03:06 -07:03:09 -07:03:11 -07:03:14 -07:03:17 -07:03:19 -07:03:21 -07:03:23 -07:03:27 -07:03:31 -07:03:33 -07:03:36 -07:03:40 -07:03:41 -07:03:43 -07:03:45 -07:03:49 -07:03:51 -07:03:54 -07:03:56 -07:03:58 -07:04:01 -07:04:04 -07:04:08 -07:04:10 -07:04:13 -07:04:15 -07:04:18 -07:04:21 -07:04:23 -07:04:27 -07:04:30 -07:04:31 -07:04:34 -07:04:36 -07:04:38 -07:04:40 -07:04:42 -07:04:45 -07:04:48 -07:04:49 -07:04:51 -07:04:53 -07:04:55 -07:04:58 -07:05:01 -07:05:03 -07:05:06 -07:05:09 -07:05:11 -07:05:13 -07:05:15 -07:05:17 -07:05:20 -07:05:22 -07:05:25 -07:05:27 -07:05:29 -07:05:31 -07:05:34 -07:05:35 -07:05:37 -07:05:39 -07:05:41 -07:05:44 -07:05:46 -07:05:48 -07:05:51 -07:05:53 -07:05:55 -07:05:58 -07:06:00 -07:06:02 -07:06:05 -07:06:07 -07:06:09 -07:06:12 -07:06:14 -07:06:16 -07:06:18 -07:06:25 -07:06:27 -07:06:30 -07:06:32 -07:06:35 -07:06:37 -07:06:39 -07:06:40 -07:06:42 -07:06:44 -07:06:46 -07:06:48 -07:06:51 -07:06:54 -07:06:56 -07:06:58 -07:07:02 -07:07:04 -07:07:06 -07:07:08 -07:07:10 -07:07:12 -07:07:17 -07:07:20 -07:07:22 -07:07:25 -07:07:27 -07:07:30 -07:07:32 -07:07:35 -07:07:38 -07:07:39 -07:07:42 -07:07:46 -07:07:48 -07:07:50 -07:07:52 -07:07:54 -07:07:57 -07:07:58 -07:08:01 -07:08:03 -07:08:05 -07:08:07 -07:08:10 -07:08:12 -07:08:15 -07:08:18 -07:08:21 -07:08:23 -07:08:26 -07:08:28 -07:08:31 -07:08:33 -07:08:36 -07:08:39 -07:08:41 -07:08:44 -07:08:47 -07:08:50 -07:08:53 -07:08:57 -07:08:59 -07:09:03 -07:09:07 -07:09:11 -07:09:14 -07:09:22 -07:09:26 -07:09:32 -07:09:36 -07:09:40 -07:09:43 -07:09:47 -07:09:52 -07:09:56 -07:10:01 -07:10:04 -07:10:07 -07:10:11 -07:10:15 -07:10:19 -07:10:21 -07:10:26 -07:10:29 -07:10:33 -07:10:35 -07:10:38 -07:10:41 -07:10:44 -07:10:47 -07:10:50 -07:10:53 -07:10:56 -07:10:59 -07:11:02 -07:11:06 -07:11:08 -07:11:13 -07:11:17 -07:11:19 -07:11:20 -07:11:23 -07:11:27 -07:11:30 -07:11:34 -07:11:38 -07:11:40 -07:11:43 -07:11:46 -07:11:49 -07:11:52 -07:11:55 -07:11:59 -07:12:01 -07:12:03 -07:12:06 -07:12:10 -07:12:13 -07:12:16 -07:12:18 -07:12:21 -07:12:26 -07:12:28 -07:12:31 -07:12:33 -07:12:37 -07:12:39 -07:12:41 -07:12:44 -07:12:45 -07:12:49 -07:12:52 -07:12:54 -07:12:57 -07:12:59 -07:13:02 -07:13:04 -07:13:06 -07:13:10 -07:13:12 -07:13:14 -07:13:18 -07:13:22 -07:13:25 -07:13:29 -07:13:33 -07:13:36 -07:13:40 -07:13:45 -07:13:50 -07:13:53 -07:13:55 -07:13:57 -07:13:58 -07:14:01 -07:14:04 -07:14:07 -07:14:09 -07:14:11 -07:14:14 -07:14:16 -07:14:20 -07:14:24 -07:14:26 -07:14:28 -07:14:30 -07:14:32 -07:14:34 -07:14:36 -07:14:37 -07:14:40 -07:14:46 -07:14:49 -07:14:50 -07:14:53 -07:14:57 -07:14:58 -07:15:00 -07:15:04 -07:15:06 -07:15:09 -07:15:12 -07:15:14 -07:15:17 -07:15:19 -07:15:23 -07:15:25 -07:15:28 -07:15:31 -07:15:34 -07:15:38 -07:15:41 -07:15:44 -07:15:47 -07:15:49 -07:15:51 -07:15:54 -07:15:57 -07:16:01 -07:16:03 -07:16:06 -07:16:09 -07:16:11 -07:16:15 -07:16:17 -07:16:21 -07:16:23 -07:16:26 -07:16:29 -07:16:31 -07:16:34 -07:16:36 -07:16:41 -07:16:43 -07:16:44 -07:16:47 -07:16:50 -07:16:53 -07:16:55 -07:16:57 -07:17:00 -07:17:02 -07:17:04 -07:17:05 -07:17:08 -07:17:10 -07:17:12 -07:17:15 -07:17:18 -07:17:21 -07:17:23 -07:17:25 -07:17:27 -07:17:30 -07:17:35 -07:17:37 -07:17:39 -07:17:42 -07:17:45 -07:17:46 -07:17:48 -07:17:51 -07:17:53 -07:17:58 -07:18:01 -07:18:03 -07:18:06 -07:18:08 -07:18:10 -07:18:12 -07:18:15 -07:18:24 -07:18:27 -07:18:29 -07:18:30 -07:18:32 -07:18:33 -07:18:35 -07:18:42 -07:18:43 -07:18:45 -07:18:47 -07:18:49 -07:18:50 -07:18:52 -07:18:54 -07:18:55 -07:18:57 -07:19:00 -07:19:02 -07:19:04 -07:19:07 -07:19:10 -07:19:12 -07:19:14 -07:19:16 -07:19:19 -07:19:22 -07:19:23 -07:19:26 -07:19:28 -07:19:30 -07:19:32 -07:19:34 -07:19:37 -07:19:39 -07:19:41 -07:19:42 -07:19:44 -07:19:46 -07:19:48 -07:19:51 -07:19:53 -07:19:56 -07:19:57 -07:20:00 -07:20:02 -07:20:04 -07:20:07 -07:20:09 -07:20:13 -07:20:15 -07:20:17 -07:20:20 -07:20:22 -07:20:26 -07:20:28 -07:20:32 -07:20:36 -07:20:39 -07:20:42 -07:20:46 -07:20:50 -07:20:55 -07:20:58 -07:21:01 -07:21:04 -07:21:06 -07:21:10 -07:21:13 -07:21:15 -07:21:20 -07:21:25 -07:21:27 -07:21:31 -07:21:35 -07:21:38 -07:21:42 -07:21:44 -07:21:47 -07:21:52 -07:21:56 -07:22:00 -07:22:03 -07:22:08 -07:22:11 -07:22:14 -07:22:19 -07:22:22 -07:22:24 -07:22:27 -07:22:30 -07:22:32 -07:22:36 -07:22:39 -07:22:42 -07:22:47 -07:22:51 -07:22:54 -07:22:57 -07:23:01 -07:23:06 -07:23:12 -07:23:15 -07:23:17 -07:23:21 -07:23:24 -07:23:28 -07:23:31 -07:23:34 -07:23:37 -07:23:40 -07:23:45 -07:23:48 -07:23:51 -07:23:54 -07:23:57 -07:24:00 -07:24:03 -07:24:06 -07:24:08 -07:24:10 -07:24:12 -07:24:15 -07:24:17 -07:24:20 -07:24:22 -07:24:24 -07:24:27 -07:24:30 -07:24:33 -07:24:36 -07:24:39 -07:24:42 -07:24:45 -07:24:48 -07:24:51 -07:24:54 -07:24:57 -07:24:59 -07:25:02 -07:25:05 -07:25:11 -07:25:14 -07:25:18 -07:25:24 -07:25:30 -07:25:32 -07:25:34 -07:25:37 -07:25:39 -07:25:41 -07:25:43 -07:25:46 -07:25:49 -07:25:54 -07:26:01 -07:26:17 -07:26:22 -07:26:26 -07:26:30 -07:26:33 -07:26:37 -07:26:40 -07:26:42 -07:26:45 -07:26:48 -07:26:51 -07:26:55 -07:26:58 -07:27:02 -07:27:06 -07:27:09 -07:27:12 -07:27:15 -07:27:18 -07:27:21 -07:27:24 -07:27:28 -07:27:31 -07:27:36 -07:27:38 -07:27:41 -07:27:45 -07:27:47 -07:27:50 -07:27:53 -07:27:56 -07:28:00 -07:28:04 -07:28:08 -07:28:12 -07:28:16 -07:28:19 -07:28:22 -07:28:26 -07:28:30 -07:28:34 -07:28:39 -07:28:59 -07:29:21 -07:29:25 -07:29:27 -07:29:33 -07:29:35 -07:29:40 -07:29:44 -07:29:47 -07:29:51 -07:29:54 -07:29:56 -07:30:00 -07:30:02 -07:30:05 -07:30:08 -07:30:10 -07:30:13 -07:30:16 -07:30:18 -07:30:22 -07:30:26 -07:30:30 -07:30:33 -07:30:36 -07:30:38 -07:30:41 -07:30:46 -07:30:48 -07:30:50 -07:30:53 -07:30:56 -07:30:59 -07:31:01 -07:31:03 -07:31:06 -07:31:09 -07:31:11 -07:31:14 -07:31:16 -07:31:20 -07:31:24 -07:31:39 -07:31:41 -07:31:43 -07:31:47 -07:31:50 -07:31:52 -07:31:56 -07:31:58 -07:32:01 -07:32:03 -07:32:06 -07:32:09 -07:32:11 -07:32:15 -07:32:18 -07:32:21 -07:32:24 -07:32:26 -07:32:30 -07:32:34 -07:32:36 -07:32:39 -07:32:43 -07:32:46 -07:32:50 -07:32:52 -07:32:56 -07:33:00 -07:33:03 -07:33:07 -07:33:10 -07:33:13 -07:33:16 -07:33:18 -07:33:21 -07:33:26 -07:33:30 -07:33:32 -07:33:35 -07:33:38 -07:33:43 -07:33:46 -07:33:53 -07:34:06 -07:34:10 -07:34:15 -07:34:17 -07:34:20 -07:34:22 -07:34:25 -07:34:28 -07:34:33 -07:34:36 -07:34:39 -07:34:42 -07:34:45 -07:34:47 -07:34:50 -07:34:53 -07:34:56 -07:34:58 -07:35:05 -07:35:11 -07:35:14 -07:35:16 -07:35:19 -07:35:22 -07:35:25 -07:35:28 -07:35:30 -07:35:33 -07:35:35 -07:35:38 -07:35:39 -07:35:42 -07:35:44 -07:35:48 -07:35:51 -07:35:53 -07:35:57 -07:36:00 -07:36:04 -07:36:06 -07:36:10 -07:36:13 -07:36:16 -07:36:19 -07:36:23 -07:36:26 -07:36:49 -07:36:53 -07:36:58 -07:37:03 -07:37:08 -07:37:25 -07:37:31 -07:37:38 -07:37:42 -07:37:50 -07:37:56 -07:38:08 -07:38:11 -07:38:14 -07:38:17 -07:38:21 -07:38:28 -07:38:32 -07:38:35 -07:38:39 -07:38:44 -07:38:48 -07:38:53 -07:39:00 -07:39:06 -07:39:10 -07:39:15 -07:39:19 -07:39:23 -07:39:27 -07:39:30 -07:39:46 -07:39:50 -07:39:57 -07:40:00 -07:40:04 -07:40:14 -07:40:17 -07:40:20 -07:40:27 -07:40:31 -07:40:35 -07:40:38 -07:40:42 -07:40:47 -07:40:50 -07:40:53 -07:40:55 -07:40:58 -07:41:00 -07:41:04 -07:41:08 -07:41:10 -07:41:15 -07:41:18 -07:41:23 -07:41:25 -07:41:29 -07:41:33 -07:41:35 -07:41:38 -07:41:41 -07:41:45 -07:41:48 -07:41:51 -07:41:56 -07:42:00 -07:42:04 -07:42:13 -07:42:29 -07:42:35 -07:42:38 -07:42:40 -07:43:05 -07:43:10 -07:43:20 -07:43:23 -07:43:26 -07:43:31 -07:43:34 -07:43:38 -07:43:42 -07:43:45 -07:43:48 -07:43:53 -07:43:56 -07:44:00 -07:44:03 -07:44:09 -07:44:11 -07:44:15 -07:44:17 -07:44:21 -07:44:24 -07:44:27 -07:44:30 -07:44:35 -07:44:37 -07:44:40 -07:44:42 -07:44:46 -07:44:49 -07:44:55 -07:45:00 -07:45:03 -07:45:07 -07:45:09 -07:45:12 -07:45:15 -07:45:18 -07:45:19 -07:45:21 -07:45:24 -07:45:27 -07:45:30 -07:45:33 -07:45:36 -07:45:38 -07:45:40 -07:45:43 -07:45:46 -07:45:49 -07:45:52 -07:45:54 -07:45:57 -07:46:00 -07:46:16 -07:46:22 -07:46:27 -07:46:32 -07:46:34 -07:46:38 -07:46:41 -07:46:44 -07:46:47 -07:46:51 -07:46:53 -07:46:56 -07:46:59 -07:47:01 -07:47:04 -07:47:07 -07:47:10 -07:47:14 -07:47:16 -07:47:19 -07:47:21 -07:47:23 -07:47:27 -07:47:30 -07:47:32 -07:47:35 -07:47:38 -07:47:42 -07:47:46 -07:47:50 -07:47:52 -07:47:56 -07:47:58 -07:48:01 -07:48:03 -07:48:05 -07:48:08 -07:48:11 -07:48:13 -07:48:17 -07:48:22 -07:48:26 -07:48:29 -07:48:31 -07:48:34 -07:48:37 -07:48:40 -07:48:45 -07:48:51 -07:48:54 -07:49:04 -07:49:16 -07:49:21 -07:49:25 -07:49:30 -07:49:35 -07:49:38 -07:49:41 -07:49:54 -07:49:55 -07:49:58 -07:50:01 -07:50:05 -07:50:08 -07:50:11 -07:50:14 -07:50:16 -07:50:18 -07:50:21 -07:50:25 -07:50:28 -07:50:32 -07:50:37 -07:50:40 -07:50:44 -07:50:46 -07:50:49 -07:50:52 -07:50:56 -07:50:59 -07:51:03 -07:51:06 -07:51:08 -07:51:12 -07:51:16 -07:51:19 -07:51:25 -07:51:28 -07:51:31 -07:51:35 -07:51:40 -07:51:43 -07:51:45 -07:51:48 -07:51:52 -07:51:54 -07:51:58 -07:52:02 -07:52:05 -07:52:08 -07:52:12 -07:52:16 -07:52:18 -07:52:21 -07:52:23 -07:52:33 -07:52:35 -07:52:38 -07:52:44 -07:52:47 -07:52:51 -07:52:53 -07:52:58 -07:53:01 -07:53:04 -07:53:07 -07:53:10 -07:53:14 -07:53:17 -07:53:21 -07:53:26 -07:53:28 -07:53:31 -07:53:34 -07:53:37 -07:53:39 -07:53:42 -07:53:45 -07:53:47 -07:53:51 -07:53:58 -07:54:02 -07:54:05 -07:54:07 -07:54:11 -07:54:15 -07:54:17 -07:54:20 -07:54:23 -07:54:26 -07:54:28 -07:54:31 -07:54:34 -07:54:38 -07:54:41 -07:54:44 -07:54:48 -07:54:51 -07:54:54 -07:54:58 -07:55:03 -07:55:12 -07:55:17 -07:55:21 -07:55:27 -07:55:41 -07:55:45 -07:55:48 -07:55:52 -07:55:58 -07:56:02 -07:56:08 -07:56:12 -07:56:15 -07:56:18 -07:56:22 -07:56:29 -07:56:36 -07:56:39 -07:56:43 -07:56:47 -07:56:50 -07:56:55 -07:56:59 -07:57:03 -07:57:07 -07:57:11 -07:57:16 -07:57:22 -07:57:27 -07:57:35 -07:57:36 -07:57:40 -07:57:44 -07:57:47 -07:57:51 -07:57:55 -07:57:58 -07:58:01 -07:58:05 -07:58:07 -07:58:10 -07:58:15 -07:58:19 -07:58:23 -07:58:27 -07:58:30 -07:58:33 -07:58:34 -07:58:37 -07:58:40 -07:58:42 -07:58:45 -07:58:49 -07:58:51 -07:58:56 -07:58:59 -07:59:01 -07:59:04 -07:59:08 -07:59:12 -07:59:16 -07:59:19 -07:59:23 -07:59:28 -07:59:32 -07:59:36 -07:59:41 -07:59:42 -07:59:45 -07:59:48 -07:59:51 -07:59:55 -07:59:57 -08:00:00 -08:00:03 -08:00:06 -08:00:12 -08:00:15 -08:00:15 -08:00:17 -08:00:20 -08:00:20 -08:00:22 -08:00:27 -08:00:29 -08:00:33 -08:00:36 -08:00:40 -08:00:42 -08:00:45 -08:00:49 -08:00:51 -08:00:54 -08:00:57 -08:01:00 -08:01:04 -08:01:11 -08:01:14 -08:01:17 -08:01:21 -08:01:26 -08:01:28 -08:01:32 -08:01:37 -08:01:40 -08:01:42 -08:01:48 -08:01:52 -08:01:55 -08:02:00 -08:02:03 -08:02:07 -08:02:11 -08:02:15 -08:02:18 -08:02:28 -08:02:32 -08:02:58 -08:03:02 -08:03:05 -08:03:08 -08:03:12 -08:03:15 -08:03:21 -08:03:24 -08:03:29 -08:03:34 -08:03:41 -08:03:47 -08:03:56 -08:04:00 -08:04:05 -08:04:08 -08:04:10 -08:04:16 -08:04:20 -08:04:25 -08:04:27 -08:04:31 -08:04:33 -08:04:36 -08:04:39 -08:04:43 -08:04:45 -08:04:49 -08:04:52 -08:04:54 -08:04:57 -08:05:01 -08:05:03 -08:05:06 -08:05:10 -08:05:14 -08:05:16 -08:05:20 -08:05:24 -08:05:27 -08:05:30 -08:05:33 -08:05:36 -08:05:40 -08:05:44 -08:05:49 -08:05:53 -08:05:59 -08:06:01 -08:06:04 -08:06:05 -08:06:24 -08:06:28 -08:06:31 -08:06:35 -08:06:38 -08:06:43 -08:06:46 -08:06:51 -08:06:54 -08:06:57 -08:07:02 -08:07:06 -08:07:10 -08:07:12 -08:07:17 -08:07:21 -08:07:24 -08:07:27 -08:07:30 -08:07:34 -08:07:39 -08:07:41 -08:07:46 -08:07:51 -08:07:54 -08:07:57 -08:08:01 -08:08:03 -08:08:06 -08:08:09 -08:08:11 -08:08:14 -08:08:18 -08:08:20 -08:08:24 -08:08:28 -08:08:31 -08:08:37 -08:08:41 -08:08:44 -08:08:47 -08:08:50 -08:09:07 -08:09:10 -08:09:13 -08:09:17 -08:09:20 -08:09:25 -08:09:28 -08:09:30 -08:09:33 -08:09:37 -08:09:40 -08:09:42 -08:09:45 -08:09:49 -08:09:52 -08:09:55 -08:09:57 -08:10:01 -08:10:04 -08:10:07 -08:10:10 -08:10:12 -08:10:16 -08:10:18 -08:10:21 -08:10:24 -08:10:27 -08:10:29 -08:10:33 -08:10:35 -08:10:38 -08:10:41 -08:10:45 -08:10:48 -08:10:52 -08:10:58 -08:11:01 -08:11:04 -08:11:07 -08:11:10 -08:11:13 -08:11:17 -08:11:30 -08:11:35 -08:11:39 -08:11:46 -08:11:50 -08:11:53 -08:11:57 -08:12:00 -08:12:03 -08:12:06 -08:12:10 -08:12:12 -08:12:15 -08:12:18 -08:12:23 -08:12:26 -08:12:29 -08:12:32 -08:12:35 -08:12:37 -08:12:40 -08:12:43 -08:12:45 -08:12:48 -08:12:52 -08:12:56 -08:13:01 -08:13:04 -08:13:06 -08:13:09 -08:13:11 -08:13:13 -08:13:16 -08:13:19 -08:13:21 -08:13:25 -08:13:27 -08:13:30 -08:13:32 -08:13:35 -08:13:37 -08:13:40 -08:13:42 -08:13:45 -08:13:47 -08:13:51 -08:13:53 -08:13:55 -08:13:59 -08:14:01 -08:14:03 -08:14:05 -08:14:07 -08:14:09 -08:14:14 -08:14:18 -08:14:20 -08:14:23 -08:14:25 -08:14:28 -08:14:31 -08:14:33 -08:14:35 -08:14:37 -08:14:38 -08:14:40 -08:14:42 -08:14:44 -08:14:50 -08:14:51 -08:15:02 -08:15:06 -08:15:10 -08:15:13 -08:15:15 -08:15:16 -08:15:18 -08:15:20 -08:15:22 -08:15:24 -08:15:26 -08:15:28 -08:15:32 -08:15:35 -08:15:37 -08:15:39 -08:15:43 -08:15:45 -08:15:48 -08:15:50 -08:15:56 -08:15:59 -08:16:03 -08:16:09 -08:16:12 -08:16:17 -08:16:19 -08:16:22 -08:16:24 -08:16:25 -08:16:29 -08:16:30 -08:16:32 -08:16:34 -08:16:38 -08:16:40 -08:16:43 -08:16:47 -08:16:49 -08:16:51 -08:16:54 -08:16:56 -08:16:59 -08:17:01 -08:17:04 -08:17:05 -08:17:08 -08:17:11 -08:17:20 -08:17:21 -08:17:24 -08:17:27 -08:17:30 -08:17:34 -08:17:43 -08:17:54 -08:17:56 -08:17:59 -08:18:02 -08:18:07 -08:18:17 -08:18:20 -08:18:24 -08:18:27 -08:18:29 -08:18:33 -08:18:37 -08:18:40 -08:18:42 -08:18:45 -08:18:46 -08:18:50 -08:18:52 -08:18:54 -08:18:56 -08:18:58 -08:19:00 -08:19:01 -08:19:04 -08:19:06 -08:19:09 -08:19:12 -08:19:15 -08:19:17 -08:19:19 -08:19:21 -08:19:24 -08:19:27 -08:19:28 -08:19:30 -08:19:33 -08:19:35 -08:19:38 -08:19:40 -08:19:43 -08:19:46 -08:19:50 -08:19:52 -08:19:55 -08:19:57 -08:19:58 -08:20:00 -08:20:03 -08:20:05 -08:20:07 -08:20:10 -08:20:14 -08:20:17 -08:20:20 -08:20:22 -08:20:24 -08:20:26 -08:20:28 -08:20:31 -08:20:34 -08:20:36 -08:20:39 -08:20:42 -08:20:46 -08:20:48 -08:20:50 -08:20:52 -08:20:54 -08:20:57 -08:21:01 -08:21:03 -08:21:06 -08:21:09 -08:21:12 -08:21:15 -08:21:18 -08:21:21 -08:21:24 -08:21:27 -08:21:30 -08:21:33 -08:21:35 -08:21:38 -08:21:41 -08:21:44 -08:21:48 -08:21:51 -08:21:53 -08:21:55 -08:21:59 -08:22:02 -08:22:04 -08:22:06 -08:22:11 -08:22:14 -08:22:16 -08:22:19 -08:22:22 -08:22:24 -08:22:27 -08:22:30 -08:22:32 -08:22:35 -08:22:38 -08:22:42 -08:22:44 -08:22:46 -08:22:49 -08:22:52 -08:22:54 -08:22:57 -08:22:59 -08:23:02 -08:23:05 -08:23:07 -08:23:13 -08:23:24 -08:23:29 -08:23:33 -08:23:39 -08:23:42 -08:23:45 -08:23:49 -08:23:53 -08:23:56 -08:23:58 -08:24:03 -08:24:05 -08:24:08 -08:24:12 -08:24:15 -08:24:19 -08:24:22 -08:24:24 -08:24:29 -08:24:35 -08:24:37 -08:24:40 -08:24:43 -08:24:45 -08:24:48 -08:24:51 -08:24:54 -08:24:57 -08:25:00 -08:25:02 -08:25:07 -08:25:09 -08:25:12 -08:25:15 -08:25:18 -08:25:20 -08:25:22 -08:25:28 -08:25:30 -08:25:33 -08:25:37 -08:25:41 -08:25:44 -08:25:47 -08:25:49 -08:25:52 -08:25:56 -08:26:00 -08:26:00 -08:26:04 -08:26:11 -08:26:15 -08:26:17 -08:26:20 -08:26:23 -08:26:27 -08:26:33 -08:26:35 -08:26:37 -08:26:41 -08:26:46 -08:26:48 -08:26:51 -08:26:56 -08:26:58 -08:27:01 -08:27:03 -08:27:07 -08:27:11 -08:27:14 -08:27:18 -08:27:19 -08:27:24 -08:27:27 -08:27:30 -08:27:33 -08:27:35 -08:27:38 -08:27:40 -08:27:42 -08:27:45 -08:27:48 -08:27:51 -08:27:55 -08:28:00 -08:28:02 -08:28:04 -08:28:08 -08:28:10 -08:28:13 -08:28:19 -08:28:21 -08:28:23 -08:28:27 -08:28:29 -08:28:31 -08:28:35 -08:28:39 -08:28:43 -08:28:46 -08:28:49 -08:28:51 -08:28:54 -08:28:57 -08:29:00 -08:29:02 -08:29:04 -08:29:06 -08:29:10 -08:29:14 -08:29:17 -08:29:19 -08:29:23 -08:29:25 -08:29:28 -08:29:31 -08:29:33 -08:29:36 -08:29:40 -08:29:43 -08:29:46 -08:29:48 -08:29:51 -08:29:55 -08:29:59 -08:30:02 -08:30:06 -08:30:11 -08:30:13 -08:30:16 -08:30:20 -08:30:23 -08:30:26 -08:30:29 -08:30:32 -08:30:36 -08:30:40 -08:30:44 -08:30:48 -08:30:52 -08:30:57 -08:31:01 -08:31:34 -08:31:38 -08:31:42 -08:31:46 -08:31:49 -08:31:52 -08:31:54 -08:31:57 -08:32:01 -08:32:06 -08:32:09 -08:32:11 -08:32:14 -08:32:17 -08:32:21 -08:32:23 -08:32:26 -08:32:29 -08:32:31 -08:32:34 -08:32:38 -08:32:41 -08:32:44 -08:32:46 -08:32:48 -08:32:52 -08:32:54 -08:32:57 -08:32:59 -08:33:01 -08:33:03 -08:33:05 -08:33:08 -08:33:10 -08:33:12 -08:33:16 -08:33:18 -08:33:21 -08:33:24 -08:33:26 -08:33:28 -08:33:30 -08:33:32 -08:33:35 -08:33:37 -08:33:39 -08:33:41 -08:33:43 -08:33:46 -08:33:48 -08:33:52 -08:33:54 -08:33:56 -08:33:58 -08:34:01 -08:34:03 -08:34:06 -08:34:08 -08:34:13 -08:34:17 -08:34:21 -08:34:24 -08:34:27 -08:34:33 -08:34:58 -08:35:04 -08:35:08 -08:35:13 -08:35:15 -08:35:19 -08:35:22 -08:35:26 -08:35:29 -08:35:32 -08:35:38 -08:35:43 -08:35:47 -08:35:53 -08:36:06 -08:36:10 -08:36:14 -08:36:17 -08:36:21 -08:36:23 -08:36:29 -08:36:31 -08:36:35 -08:36:40 -08:36:44 -08:36:48 -08:36:52 -08:36:57 -08:37:01 -08:37:05 -08:37:09 -08:37:12 -08:37:14 -08:37:17 -08:37:20 -08:37:23 -08:37:25 -08:37:29 -08:37:33 -08:37:35 -08:37:38 -08:37:41 -08:37:44 -08:37:47 -08:37:49 -08:37:51 -08:37:53 -08:37:56 -08:38:00 -08:38:02 -08:38:06 -08:38:09 -08:38:11 -08:38:14 -08:38:16 -08:38:19 -08:38:21 -08:38:24 -08:38:27 -08:38:29 -08:38:31 -08:38:33 -08:38:35 -08:38:39 -08:38:42 -08:38:44 -08:38:47 -08:38:51 -08:38:54 -08:38:56 -08:39:00 -08:39:03 -08:39:07 -08:39:08 -08:39:15 -08:39:20 -08:39:23 -08:39:27 -08:39:56 -08:40:00 -08:40:03 -08:40:07 -08:40:10 -08:40:17 -08:40:22 -08:40:25 -08:40:28 -08:40:33 -08:40:38 -08:40:43 -08:40:48 -08:40:52 -08:40:59 -08:41:03 -08:41:06 -08:41:10 -08:41:14 -08:41:19 -08:41:22 -08:41:25 -08:41:27 -08:41:30 -08:41:35 -08:41:39 -08:41:42 -08:41:46 -08:41:52 -08:41:55 -08:42:02 -08:42:06 -08:42:09 -08:42:13 -08:42:21 -08:42:26 -08:42:30 -08:42:33 -08:42:37 -08:42:40 -08:42:44 -08:42:51 -08:42:55 -08:43:00 -08:43:03 -08:43:07 -08:43:11 -08:43:16 -08:43:19 -08:43:24 -08:43:41 -08:43:45 -08:43:50 -08:43:54 -08:43:58 -08:44:02 -08:44:06 -08:44:12 -08:44:18 -08:44:28 -08:44:32 -08:44:35 -08:44:39 -08:44:43 -08:44:48 -08:44:51 -08:44:54 -08:44:57 -08:45:01 -08:45:04 -08:45:07 -08:45:11 -08:45:13 -08:45:16 -08:45:19 -08:45:24 -08:45:28 -08:45:31 -08:45:35 -08:45:39 -08:45:42 -08:45:53 -08:46:08 -08:46:13 -08:46:17 -08:46:24 -08:46:28 -08:46:30 -08:46:35 -08:46:39 -08:46:49 -08:46:54 -08:47:28 -08:47:40 -08:47:44 -08:47:49 -08:47:53 -08:47:57 -08:48:01 -08:48:05 -08:48:11 -08:48:13 -08:48:18 -08:48:20 -08:48:23 -08:48:27 -08:48:31 -08:48:35 -08:48:38 -08:48:42 -08:48:45 -08:48:48 -08:48:52 -08:48:55 -08:49:00 -08:49:03 -08:49:07 -08:49:10 -08:49:14 -08:49:17 -08:49:21 -08:49:25 -08:49:28 -08:49:33 -08:49:37 -08:49:41 -08:49:45 -08:49:48 -08:49:50 -08:49:53 -08:49:58 -08:50:01 -08:50:04 -08:50:07 -08:50:11 -08:50:13 -08:50:18 -08:50:21 -08:50:24 -08:50:28 -08:50:32 -08:50:35 -08:50:38 -08:50:41 -08:50:44 -08:50:47 -08:50:50 -08:50:55 -08:50:57 -08:51:00 -08:51:03 -08:51:07 -08:51:11 -08:51:14 -08:51:17 -08:51:21 -08:51:24 -08:51:26 -08:51:30 -08:51:33 -08:51:39 -08:51:43 -08:51:46 -08:51:50 -08:51:54 -08:51:57 -08:52:03 -08:52:25 -08:52:29 -08:52:31 -08:52:34 -08:52:37 -08:52:40 -08:52:42 -08:52:45 -08:52:48 -08:52:51 -08:52:57 -08:53:12 -08:53:16 -08:53:20 -08:53:31 -08:53:35 -08:53:39 -08:53:44 -08:53:50 -08:53:53 -08:53:57 -08:54:01 -08:54:04 -08:54:10 -08:54:14 -08:54:20 -08:54:24 -08:54:29 -08:54:33 -08:54:36 -08:54:40 -08:54:43 -08:54:48 -08:54:50 -08:54:57 -08:55:00 -08:55:03 -08:55:08 -08:55:11 -08:55:15 -08:55:20 -08:55:25 -08:55:32 -08:55:36 -08:55:40 -08:55:43 -08:55:46 -08:55:51 -08:55:58 -08:56:02 -08:56:06 -08:56:09 -08:56:12 -08:56:14 -08:56:17 -08:56:21 -08:56:23 -08:56:28 -08:56:37 -08:56:40 -08:56:44 -08:56:47 -08:56:49 -08:56:51 -08:56:55 -08:56:58 -08:57:01 -08:57:05 -08:57:09 -08:57:14 -08:57:18 -08:57:23 -08:57:25 -08:57:29 -08:57:32 -08:57:35 -08:57:41 -08:57:44 -08:57:47 -08:57:51 -08:57:55 -08:57:59 -08:58:02 -08:58:07 -08:58:12 -08:58:14 -08:58:20 -08:58:23 -08:58:27 -08:58:29 -08:58:33 -08:58:36 -08:58:39 -08:58:41 -08:58:43 -08:58:46 -08:58:48 -08:58:51 -08:58:54 -08:58:56 -08:58:59 -08:59:02 -08:59:05 -08:59:08 -08:59:10 -08:59:13 -08:59:18 -08:59:20 -08:59:23 -08:59:26 -08:59:27 -08:59:32 -08:59:34 -08:59:37 -08:59:39 -08:59:42 -08:59:45 -08:59:47 -08:59:48 -08:59:55 -08:59:56 -08:59:58 -09:00:02 -09:00:04 -09:00:06 -09:00:08 -09:00:10 -09:00:13 -09:00:14 -09:00:16 -09:00:19 -09:00:22 -09:00:24 -09:00:26 -09:00:30 -09:00:33 -09:00:35 -09:00:37 -09:00:39 -09:00:40 -09:00:43 -09:00:44 -09:00:47 -09:00:49 -09:00:51 -09:00:53 -09:00:55 -09:00:57 -09:01:00 -09:01:02 -09:01:04 -09:01:07 -09:01:09 -09:01:12 -09:01:14 -09:01:18 -09:01:20 -09:01:24 -09:01:26 -09:01:29 -09:01:30 -09:01:32 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_7.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_7.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_7.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_7.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2298 +0,0 @@ -06:52:26 -06:52:29 -06:52:32 -06:52:33 -06:52:35 -06:52:37 -06:52:39 -06:52:41 -06:52:42 -06:52:45 -06:52:47 -06:52:48 -06:52:50 -06:52:52 -06:52:54 -06:52:57 -06:53:00 -06:53:04 -06:53:06 -06:53:07 -06:53:10 -06:53:12 -06:53:14 -06:53:16 -06:53:18 -06:53:20 -06:53:23 -06:53:25 -06:53:26 -06:53:28 -06:53:30 -06:53:31 -06:53:33 -06:53:35 -06:53:36 -06:53:39 -06:53:42 -06:53:44 -06:53:46 -06:53:47 -06:53:50 -06:53:54 -06:53:57 -06:53:58 -06:54:01 -06:54:03 -06:54:05 -06:54:07 -06:54:10 -06:54:12 -06:54:15 -06:54:16 -06:54:18 -06:54:19 -06:54:22 -06:54:23 -06:54:26 -06:54:29 -06:54:37 -06:54:38 -06:54:40 -06:54:43 -06:54:45 -06:54:47 -06:54:50 -06:54:52 -06:54:54 -06:54:56 -06:54:58 -06:55:01 -06:55:02 -06:55:05 -06:55:07 -06:55:09 -06:55:11 -06:55:15 -06:55:19 -06:55:24 -06:55:40 -06:55:44 -06:55:46 -06:55:48 -06:55:52 -06:55:55 -06:55:59 -06:56:04 -06:56:08 -06:56:12 -06:56:15 -06:56:19 -06:56:22 -06:56:26 -06:56:29 -06:56:32 -06:56:34 -06:56:36 -06:56:39 -06:56:41 -06:56:43 -06:56:46 -06:56:48 -06:56:50 -06:56:53 -06:56:55 -06:56:58 -06:57:00 -06:57:01 -06:57:03 -06:57:05 -06:57:09 -06:57:11 -06:57:13 -06:57:15 -06:57:19 -06:57:23 -06:57:25 -06:57:27 -06:57:29 -06:57:32 -06:57:34 -06:57:35 -06:57:38 -06:57:41 -06:57:44 -06:57:48 -06:57:51 -06:57:53 -06:57:56 -06:57:58 -06:58:01 -06:58:04 -06:58:06 -06:58:06 -06:58:08 -06:58:10 -06:58:13 -06:58:18 -06:58:21 -06:58:24 -06:58:27 -06:58:29 -06:58:33 -06:58:35 -06:58:38 -06:58:40 -06:58:42 -06:58:44 -06:58:47 -06:58:50 -06:58:55 -06:58:59 -06:59:04 -06:59:07 -06:59:08 -06:59:10 -06:59:12 -06:59:18 -06:59:20 -06:59:23 -06:59:26 -06:59:28 -06:59:31 -06:59:37 -06:59:40 -06:59:42 -06:59:46 -06:59:48 -06:59:50 -06:59:53 -06:59:55 -06:59:58 -07:00:00 -07:00:03 -07:00:05 -07:00:07 -07:00:09 -07:00:11 -07:00:12 -07:00:14 -07:00:16 -07:00:18 -07:00:20 -07:00:24 -07:00:28 -07:00:29 -07:00:33 -07:00:35 -07:00:37 -07:00:40 -07:00:44 -07:00:46 -07:00:48 -07:00:50 -07:00:54 -07:00:57 -07:00:59 -07:01:01 -07:01:06 -07:01:08 -07:01:10 -07:01:12 -07:01:15 -07:01:20 -07:01:21 -07:01:24 -07:01:26 -07:01:28 -07:01:30 -07:01:35 -07:01:37 -07:01:39 -07:01:40 -07:01:43 -07:01:46 -07:01:48 -07:01:51 -07:01:54 -07:01:58 -07:02:01 -07:02:06 -07:02:09 -07:02:11 -07:02:13 -07:02:17 -07:02:19 -07:02:23 -07:02:25 -07:02:32 -07:02:37 -07:02:39 -07:02:41 -07:02:44 -07:02:48 -07:02:50 -07:02:52 -07:02:55 -07:02:57 -07:03:00 -07:03:02 -07:03:04 -07:03:06 -07:03:08 -07:03:10 -07:03:15 -07:03:17 -07:03:19 -07:03:21 -07:03:23 -07:03:25 -07:03:27 -07:03:31 -07:03:34 -07:03:36 -07:03:39 -07:03:41 -07:03:42 -07:03:45 -07:03:48 -07:03:50 -07:03:52 -07:03:53 -07:03:55 -07:03:58 -07:04:03 -07:04:05 -07:04:07 -07:04:14 -07:04:15 -07:04:17 -07:04:19 -07:04:22 -07:04:25 -07:04:27 -07:04:30 -07:04:33 -07:04:35 -07:04:37 -07:04:41 -07:04:44 -07:04:47 -07:04:49 -07:04:54 -07:04:59 -07:05:02 -07:05:06 -07:05:09 -07:05:12 -07:05:15 -07:05:17 -07:05:20 -07:05:22 -07:05:24 -07:05:26 -07:05:29 -07:05:30 -07:05:32 -07:05:34 -07:05:35 -07:05:38 -07:05:40 -07:05:42 -07:05:44 -07:05:47 -07:05:49 -07:05:50 -07:05:52 -07:05:55 -07:05:57 -07:05:59 -07:06:01 -07:06:03 -07:06:05 -07:06:07 -07:06:10 -07:06:11 -07:06:13 -07:06:14 -07:06:17 -07:06:20 -07:06:21 -07:06:23 -07:06:28 -07:06:30 -07:06:31 -07:06:33 -07:06:35 -07:06:36 -07:06:40 -07:06:42 -07:06:44 -07:06:48 -07:06:49 -07:06:51 -07:06:53 -07:07:00 -07:07:02 -07:07:04 -07:07:07 -07:07:09 -07:07:12 -07:07:14 -07:07:16 -07:07:18 -07:07:20 -07:07:23 -07:07:25 -07:07:28 -07:07:32 -07:07:36 -07:07:43 -07:07:53 -07:07:57 -07:08:02 -07:08:09 -07:08:15 -07:08:20 -07:08:25 -07:08:28 -07:08:31 -07:08:37 -07:08:40 -07:08:43 -07:08:46 -07:08:50 -07:08:52 -07:08:55 -07:08:58 -07:09:03 -07:09:07 -07:09:09 -07:09:12 -07:09:15 -07:09:19 -07:09:21 -07:09:24 -07:09:27 -07:09:30 -07:09:32 -07:09:34 -07:09:39 -07:09:41 -07:09:43 -07:09:45 -07:09:48 -07:09:51 -07:09:53 -07:09:56 -07:09:59 -07:10:02 -07:10:06 -07:10:10 -07:10:12 -07:10:15 -07:10:18 -07:10:20 -07:10:22 -07:10:25 -07:10:28 -07:10:30 -07:10:30 -07:10:32 -07:10:36 -07:10:42 -07:10:46 -07:10:49 -07:10:52 -07:10:53 -07:10:57 -07:10:59 -07:11:02 -07:11:03 -07:11:05 -07:11:10 -07:11:11 -07:11:16 -07:11:18 -07:11:20 -07:11:24 -07:11:27 -07:11:31 -07:11:32 -07:11:36 -07:11:37 -07:11:39 -07:11:41 -07:11:43 -07:11:45 -07:11:48 -07:11:50 -07:11:52 -07:11:55 -07:11:56 -07:12:01 -07:12:06 -07:12:07 -07:12:09 -07:12:11 -07:12:13 -07:12:16 -07:12:18 -07:12:23 -07:12:27 -07:12:28 -07:12:30 -07:12:33 -07:12:35 -07:12:38 -07:12:40 -07:12:41 -07:12:43 -07:12:46 -07:12:50 -07:12:52 -07:12:54 -07:12:56 -07:12:57 -07:13:01 -07:13:03 -07:13:05 -07:13:07 -07:13:11 -07:13:12 -07:13:15 -07:13:16 -07:13:18 -07:13:23 -07:13:26 -07:13:28 -07:13:29 -07:13:31 -07:13:32 -07:13:35 -07:13:37 -07:13:41 -07:13:42 -07:13:44 -07:13:47 -07:13:49 -07:13:52 -07:13:56 -07:14:01 -07:14:05 -07:14:08 -07:14:13 -07:14:20 -07:14:22 -07:14:24 -07:14:27 -07:14:28 -07:14:32 -07:14:35 -07:14:37 -07:14:40 -07:14:42 -07:14:45 -07:14:49 -07:14:53 -07:15:03 -07:15:06 -07:15:10 -07:15:13 -07:15:16 -07:15:20 -07:15:28 -07:15:30 -07:15:33 -07:15:37 -07:15:39 -07:15:41 -07:15:44 -07:15:47 -07:15:49 -07:15:51 -07:15:55 -07:15:57 -07:16:02 -07:16:04 -07:16:07 -07:16:09 -07:16:11 -07:16:13 -07:16:16 -07:16:18 -07:16:20 -07:16:22 -07:16:24 -07:16:26 -07:16:28 -07:16:31 -07:16:33 -07:16:36 -07:16:38 -07:16:41 -07:16:46 -07:16:49 -07:16:51 -07:16:54 -07:16:57 -07:16:59 -07:17:02 -07:17:05 -07:17:07 -07:17:10 -07:17:13 -07:17:16 -07:17:19 -07:17:21 -07:17:26 -07:17:28 -07:17:30 -07:17:33 -07:17:35 -07:17:38 -07:17:40 -07:17:43 -07:17:45 -07:17:48 -07:17:51 -07:17:55 -07:17:58 -07:18:01 -07:18:03 -07:18:07 -07:18:09 -07:18:11 -07:18:13 -07:18:14 -07:18:16 -07:18:20 -07:18:22 -07:18:24 -07:18:28 -07:18:30 -07:18:32 -07:18:33 -07:18:34 -07:18:36 -07:18:39 -07:18:42 -07:18:45 -07:18:48 -07:18:49 -07:18:51 -07:18:53 -07:18:58 -07:19:05 -07:19:08 -07:19:11 -07:19:13 -07:19:15 -07:19:18 -07:19:20 -07:19:25 -07:19:30 -07:19:33 -07:19:38 -07:19:42 -07:19:46 -07:19:49 -07:19:53 -07:19:57 -07:20:00 -07:20:04 -07:20:07 -07:20:10 -07:20:14 -07:20:17 -07:20:19 -07:20:21 -07:20:23 -07:20:27 -07:20:28 -07:20:31 -07:20:34 -07:20:36 -07:20:38 -07:20:41 -07:20:42 -07:20:45 -07:20:47 -07:20:50 -07:20:52 -07:20:54 -07:20:56 -07:20:57 -07:21:00 -07:21:03 -07:21:04 -07:21:08 -07:21:10 -07:21:13 -07:21:15 -07:21:20 -07:21:27 -07:21:29 -07:21:32 -07:21:35 -07:21:39 -07:21:42 -07:21:47 -07:21:52 -07:21:57 -07:22:01 -07:22:08 -07:22:11 -07:22:14 -07:22:17 -07:22:20 -07:22:24 -07:22:26 -07:22:29 -07:22:31 -07:22:33 -07:22:35 -07:22:39 -07:22:41 -07:22:43 -07:22:47 -07:22:50 -07:22:52 -07:22:54 -07:22:56 -07:22:58 -07:23:02 -07:23:04 -07:23:08 -07:23:10 -07:23:13 -07:23:16 -07:23:18 -07:23:21 -07:23:23 -07:23:25 -07:23:27 -07:23:28 -07:23:30 -07:23:33 -07:23:36 -07:23:37 -07:23:41 -07:23:46 -07:23:48 -07:23:51 -07:23:53 -07:23:57 -07:24:05 -07:24:07 -07:24:12 -07:24:14 -07:24:18 -07:24:25 -07:24:30 -07:24:38 -07:24:44 -07:24:49 -07:25:11 -07:25:13 -07:25:17 -07:25:19 -07:25:22 -07:25:25 -07:25:27 -07:25:30 -07:25:34 -07:25:37 -07:25:39 -07:25:41 -07:25:44 -07:25:48 -07:25:50 -07:25:53 -07:25:55 -07:25:57 -07:26:00 -07:26:03 -07:26:05 -07:26:07 -07:26:10 -07:26:13 -07:26:15 -07:26:18 -07:26:22 -07:26:24 -07:26:27 -07:26:29 -07:26:33 -07:26:41 -07:26:46 -07:26:52 -07:26:55 -07:26:59 -07:27:04 -07:27:12 -07:27:15 -07:27:20 -07:27:26 -07:28:02 -07:28:06 -07:28:09 -07:28:13 -07:28:17 -07:28:19 -07:28:21 -07:28:23 -07:28:27 -07:28:29 -07:28:32 -07:28:36 -07:28:37 -07:28:40 -07:28:42 -07:28:45 -07:28:47 -07:28:52 -07:28:53 -07:28:57 -07:29:01 -07:29:05 -07:29:07 -07:29:09 -07:29:11 -07:29:12 -07:29:16 -07:29:19 -07:29:22 -07:29:25 -07:29:28 -07:29:30 -07:29:33 -07:29:34 -07:29:37 -07:29:39 -07:29:41 -07:29:45 -07:29:48 -07:29:50 -07:29:53 -07:29:55 -07:29:58 -07:30:00 -07:30:03 -07:30:07 -07:30:08 -07:30:09 -07:30:12 -07:30:13 -07:30:15 -07:30:16 -07:30:20 -07:30:23 -07:30:25 -07:30:28 -07:30:29 -07:30:32 -07:30:34 -07:30:36 -07:30:39 -07:30:44 -07:30:46 -07:30:48 -07:30:50 -07:30:54 -07:30:57 -07:31:00 -07:31:02 -07:31:05 -07:31:08 -07:31:13 -07:31:18 -07:31:37 -07:31:42 -07:31:49 -07:32:05 -07:32:08 -07:32:17 -07:32:21 -07:32:26 -07:32:30 -07:32:39 -07:32:42 -07:32:45 -07:32:48 -07:32:50 -07:32:54 -07:32:57 -07:32:59 -07:33:01 -07:33:03 -07:33:05 -07:33:08 -07:33:10 -07:33:13 -07:33:15 -07:33:17 -07:33:19 -07:33:21 -07:33:22 -07:33:25 -07:33:29 -07:33:37 -07:33:39 -07:33:42 -07:33:45 -07:33:47 -07:33:49 -07:33:51 -07:33:53 -07:33:54 -07:33:56 -07:33:58 -07:33:59 -07:34:02 -07:34:07 -07:34:11 -07:34:13 -07:34:18 -07:34:22 -07:34:24 -07:34:26 -07:34:28 -07:34:30 -07:34:33 -07:34:39 -07:34:41 -07:34:44 -07:34:46 -07:34:49 -07:34:55 -07:35:12 -07:35:18 -07:35:53 -07:35:58 -07:36:01 -07:36:04 -07:36:12 -07:36:19 -07:36:23 -07:36:30 -07:36:36 -07:36:40 -07:36:45 -07:36:51 -07:36:56 -07:37:01 -07:37:05 -07:37:08 -07:37:11 -07:37:17 -07:37:26 -07:37:36 -07:37:41 -07:37:45 -07:37:52 -07:37:57 -07:38:02 -07:38:15 -07:38:19 -07:38:22 -07:38:25 -07:38:28 -07:38:30 -07:38:34 -07:38:36 -07:38:38 -07:38:41 -07:38:43 -07:38:45 -07:38:49 -07:38:51 -07:38:54 -07:38:57 -07:39:00 -07:39:04 -07:39:07 -07:39:08 -07:39:11 -07:39:14 -07:39:17 -07:39:21 -07:39:24 -07:39:32 -07:39:34 -07:39:41 -07:39:43 -07:39:47 -07:39:50 -07:39:53 -07:39:55 -07:39:57 -07:39:59 -07:40:02 -07:40:04 -07:40:07 -07:40:11 -07:40:17 -07:40:22 -07:40:27 -07:40:33 -07:40:35 -07:40:42 -07:40:48 -07:40:57 -07:41:02 -07:41:06 -07:41:12 -07:41:18 -07:42:06 -07:42:10 -07:42:14 -07:42:16 -07:42:18 -07:42:25 -07:42:27 -07:42:32 -07:42:36 -07:42:40 -07:42:43 -07:42:45 -07:42:48 -07:42:51 -07:42:55 -07:42:56 -07:42:58 -07:42:59 -07:43:01 -07:43:03 -07:43:04 -07:43:08 -07:43:10 -07:43:14 -07:43:16 -07:43:18 -07:43:20 -07:43:25 -07:43:27 -07:43:29 -07:43:33 -07:43:37 -07:43:40 -07:43:43 -07:43:45 -07:43:48 -07:43:53 -07:43:57 -07:44:09 -07:44:12 -07:44:16 -07:44:18 -07:44:22 -07:44:26 -07:44:31 -07:44:34 -07:44:37 -07:44:58 -07:45:02 -07:45:08 -07:45:10 -07:45:13 -07:45:15 -07:45:18 -07:45:21 -07:45:24 -07:45:26 -07:45:30 -07:45:32 -07:45:35 -07:45:37 -07:45:39 -07:45:42 -07:45:45 -07:45:48 -07:45:52 -07:45:53 -07:45:57 -07:45:59 -07:46:02 -07:46:05 -07:46:10 -07:46:13 -07:46:16 -07:46:21 -07:46:23 -07:46:26 -07:46:31 -07:46:34 -07:46:36 -07:46:38 -07:46:39 -07:46:42 -07:46:42 -07:46:44 -07:46:46 -07:46:49 -07:46:51 -07:46:53 -07:46:56 -07:46:59 -07:47:03 -07:47:08 -07:47:12 -07:47:16 -07:47:20 -07:47:26 -07:47:30 -07:47:36 -07:47:42 -07:47:48 -07:47:54 -07:47:56 -07:48:00 -07:48:04 -07:48:10 -07:48:16 -07:48:22 -07:48:28 -07:48:35 -07:48:39 -07:48:47 -07:48:51 -07:48:55 -07:48:58 -07:49:02 -07:49:05 -07:49:08 -07:49:13 -07:49:16 -07:49:19 -07:49:22 -07:49:25 -07:49:27 -07:49:29 -07:49:33 -07:49:35 -07:49:39 -07:49:41 -07:49:44 -07:49:46 -07:49:48 -07:49:51 -07:49:53 -07:49:55 -07:49:58 -07:50:03 -07:50:07 -07:50:10 -07:50:12 -07:50:14 -07:50:17 -07:50:21 -07:50:25 -07:50:28 -07:50:31 -07:50:34 -07:50:36 -07:50:38 -07:50:40 -07:50:43 -07:50:46 -07:50:51 -07:50:53 -07:51:04 -07:51:06 -07:51:08 -07:51:10 -07:51:13 -07:51:16 -07:51:18 -07:51:22 -07:51:26 -07:51:29 -07:51:32 -07:51:36 -07:51:38 -07:51:44 -07:51:49 -07:51:52 -07:51:56 -07:52:00 -07:52:02 -07:52:05 -07:52:09 -07:52:13 -07:52:17 -07:52:20 -07:52:24 -07:52:27 -07:52:31 -07:52:36 -07:52:41 -07:52:44 -07:52:48 -07:52:52 -07:52:55 -07:52:58 -07:53:01 -07:53:04 -07:53:08 -07:53:14 -07:53:18 -07:53:22 -07:53:28 -07:53:32 -07:53:39 -07:53:44 -07:53:48 -07:53:52 -07:53:57 -07:54:12 -07:54:15 -07:54:19 -07:54:26 -07:54:31 -07:54:38 -07:54:41 -07:54:44 -07:54:49 -07:54:53 -07:54:58 -07:55:04 -07:55:09 -07:55:14 -07:55:18 -07:55:24 -07:55:28 -07:55:31 -07:55:34 -07:55:38 -07:55:41 -07:55:45 -07:55:48 -07:55:51 -07:55:55 -07:56:02 -07:56:05 -07:56:07 -07:56:09 -07:56:13 -07:56:17 -07:56:20 -07:56:23 -07:56:25 -07:56:27 -07:56:29 -07:56:34 -07:56:37 -07:56:41 -07:56:44 -07:56:48 -07:56:51 -07:56:53 -07:56:58 -07:57:01 -07:57:04 -07:57:09 -07:57:12 -07:57:17 -07:57:22 -07:57:25 -07:57:29 -07:57:33 -07:57:35 -07:57:40 -07:57:45 -07:57:49 -07:57:56 -07:57:59 -07:58:03 -07:58:03 -07:58:07 -07:58:10 -07:58:15 -07:58:19 -07:58:22 -07:58:24 -07:58:28 -07:58:30 -07:58:34 -07:58:39 -07:58:41 -07:58:44 -07:58:46 -07:58:50 -07:58:54 -07:58:57 -07:59:00 -07:59:02 -07:59:05 -07:59:08 -07:59:10 -07:59:12 -07:59:16 -07:59:19 -07:59:21 -07:59:25 -07:59:28 -07:59:32 -07:59:35 -07:59:38 -07:59:44 -07:59:51 -07:59:55 -07:59:58 -08:00:02 -08:00:07 -08:00:11 -08:00:14 -08:00:17 -08:00:19 -08:00:25 -08:00:29 -08:00:31 -08:00:34 -08:00:37 -08:00:41 -08:00:45 -08:00:50 -08:00:54 -08:00:59 -08:01:07 -08:01:14 -08:01:24 -08:01:30 -08:01:48 -08:01:56 -08:02:02 -08:02:07 -08:02:11 -08:02:14 -08:02:16 -08:02:19 -08:02:24 -08:02:27 -08:02:30 -08:02:32 -08:02:34 -08:02:37 -08:02:41 -08:02:43 -08:02:45 -08:02:49 -08:02:51 -08:02:53 -08:02:56 -08:02:58 -08:03:00 -08:03:03 -08:03:05 -08:03:08 -08:03:10 -08:03:12 -08:03:13 -08:03:16 -08:03:19 -08:03:21 -08:03:23 -08:03:28 -08:03:30 -08:03:32 -08:03:38 -08:03:42 -08:03:44 -08:03:47 -08:03:52 -08:03:56 -08:03:59 -08:04:03 -08:04:08 -08:04:16 -08:04:34 -08:04:40 -08:04:51 -08:05:07 -08:05:10 -08:05:15 -08:05:17 -08:05:22 -08:05:24 -08:05:30 -08:05:35 -08:05:40 -08:05:43 -08:05:47 -08:05:50 -08:05:54 -08:05:56 -08:05:58 -08:06:00 -08:06:03 -08:06:07 -08:06:08 -08:06:15 -08:06:19 -08:06:21 -08:06:23 -08:06:27 -08:06:29 -08:06:32 -08:06:33 -08:06:34 -08:06:40 -08:06:42 -08:06:45 -08:06:51 -08:06:54 -08:07:00 -08:07:02 -08:07:08 -08:07:12 -08:07:20 -08:07:25 -08:07:29 -08:07:33 -08:07:47 -08:07:51 -08:07:55 -08:08:01 -08:08:05 -08:08:09 -08:08:11 -08:08:14 -08:08:16 -08:08:21 -08:08:24 -08:08:26 -08:08:29 -08:08:32 -08:08:35 -08:08:37 -08:08:39 -08:08:44 -08:08:46 -08:08:48 -08:08:51 -08:08:53 -08:08:56 -08:08:58 -08:09:02 -08:09:04 -08:09:07 -08:09:09 -08:09:13 -08:09:16 -08:09:19 -08:09:21 -08:09:26 -08:09:26 -08:09:29 -08:09:33 -08:09:35 -08:09:37 -08:09:39 -08:09:43 -08:09:46 -08:09:50 -08:09:54 -08:10:08 -08:10:15 -08:10:18 -08:10:22 -08:10:29 -08:10:32 -08:10:35 -08:10:40 -08:10:44 -08:10:47 -08:10:50 -08:10:53 -08:10:57 -08:11:00 -08:11:02 -08:11:05 -08:11:08 -08:11:11 -08:11:14 -08:11:16 -08:11:21 -08:11:24 -08:11:27 -08:11:28 -08:11:31 -08:11:34 -08:11:36 -08:11:38 -08:11:41 -08:11:46 -08:11:49 -08:11:49 -08:11:52 -08:11:54 -08:11:56 -08:11:58 -08:11:59 -08:12:01 -08:12:03 -08:12:07 -08:12:10 -08:12:12 -08:12:15 -08:12:17 -08:12:20 -08:12:22 -08:12:24 -08:12:26 -08:12:28 -08:12:30 -08:12:32 -08:12:35 -08:12:38 -08:12:40 -08:12:41 -08:12:43 -08:12:45 -08:12:47 -08:12:49 -08:12:51 -08:12:53 -08:12:54 -08:12:56 -08:13:00 -08:13:01 -08:13:04 -08:13:09 -08:13:10 -08:13:13 -08:13:15 -08:13:18 -08:13:20 -08:13:25 -08:13:27 -08:13:32 -08:13:34 -08:13:37 -08:13:39 -08:13:42 -08:13:44 -08:13:47 -08:13:50 -08:13:52 -08:13:57 -08:14:01 -08:14:03 -08:14:05 -08:14:08 -08:14:12 -08:14:14 -08:14:17 -08:14:21 -08:14:23 -08:14:26 -08:14:29 -08:14:31 -08:14:33 -08:14:35 -08:14:37 -08:14:38 -08:14:40 -08:14:44 -08:14:47 -08:14:52 -08:14:53 -08:14:57 -08:14:59 -08:15:02 -08:15:04 -08:15:05 -08:15:09 -08:15:12 -08:15:13 -08:15:16 -08:15:20 -08:15:23 -08:15:26 -08:15:28 -08:15:43 -08:15:45 -08:15:47 -08:15:53 -08:15:56 -08:15:58 -08:16:01 -08:16:04 -08:16:06 -08:16:08 -08:16:18 -08:16:24 -08:16:36 -08:16:41 -08:16:46 -08:16:51 -08:16:54 -08:16:58 -08:17:02 -08:17:06 -08:17:18 -08:17:22 -08:17:27 -08:17:30 -08:17:33 -08:17:36 -08:17:37 -08:17:41 -08:17:44 -08:17:46 -08:17:47 -08:17:53 -08:17:55 -08:17:56 -08:17:59 -08:18:04 -08:18:06 -08:18:09 -08:18:10 -08:18:13 -08:18:15 -08:18:18 -08:18:21 -08:18:23 -08:18:25 -08:18:27 -08:18:28 -08:18:31 -08:18:38 -08:18:39 -08:18:39 -08:18:42 -08:18:45 -08:18:47 -08:18:50 -08:18:52 -08:18:54 -08:18:55 -08:18:57 -08:18:59 -08:19:01 -08:19:06 -08:19:09 -08:19:14 -08:19:17 -08:19:20 -08:19:24 -08:19:27 -08:19:29 -08:19:31 -08:19:33 -08:19:35 -08:19:39 -08:19:42 -08:19:44 -08:19:46 -08:19:48 -08:19:50 -08:19:52 -08:19:54 -08:19:55 -08:19:58 -08:20:00 -08:20:03 -08:20:05 -08:20:06 -08:20:08 -08:20:10 -08:20:11 -08:20:13 -08:20:14 -08:20:17 -08:20:19 -08:20:20 -08:20:22 -08:20:25 -08:20:27 -08:20:30 -08:20:33 -08:20:35 -08:20:37 -08:20:38 -08:20:41 -08:20:43 -08:20:45 -08:20:47 -08:20:49 -08:20:56 -08:20:59 -08:21:02 -08:21:05 -08:21:07 -08:21:09 -08:21:14 -08:21:21 -08:21:26 -08:21:33 -08:21:39 -08:21:44 -08:21:49 -08:21:51 -08:21:54 -08:21:58 -08:22:00 -08:22:03 -08:22:07 -08:22:09 -08:22:12 -08:22:15 -08:22:19 -08:22:23 -08:22:25 -08:22:29 -08:22:33 -08:22:35 -08:22:39 -08:22:44 -08:22:48 -08:22:52 -08:22:57 -08:23:00 -08:23:05 -08:23:10 -08:23:14 -08:23:17 -08:23:23 -08:23:27 -08:23:31 -08:23:34 -08:23:37 -08:23:42 -08:23:45 -08:23:49 -08:23:52 -08:23:55 -08:23:58 -08:23:59 -08:24:01 -08:24:03 -08:24:06 -08:24:08 -08:24:12 -08:24:14 -08:24:17 -08:24:19 -08:24:21 -08:24:23 -08:24:25 -08:24:28 -08:24:30 -08:24:32 -08:24:34 -08:24:37 -08:24:41 -08:24:43 -08:24:47 -08:24:49 -08:24:53 -08:24:57 -08:24:57 -08:25:00 -08:25:02 -08:25:04 -08:25:07 -08:25:10 -08:25:13 -08:25:15 -08:25:18 -08:25:20 -08:25:22 -08:25:25 -08:25:28 -08:25:32 -08:25:36 -08:25:38 -08:25:43 -08:25:48 -08:25:53 -08:25:57 -08:26:01 -08:26:05 -08:26:08 -08:26:11 -08:26:13 -08:26:17 -08:26:20 -08:26:24 -08:26:27 -08:26:29 -08:26:31 -08:26:34 -08:26:40 -08:26:43 -08:26:45 -08:26:48 -08:26:54 -08:26:56 -08:26:59 -08:27:02 -08:27:07 -08:27:10 -08:27:14 -08:27:17 -08:27:21 -08:27:25 -08:27:27 -08:27:29 -08:27:34 -08:27:38 -08:27:39 -08:27:42 -08:27:44 -08:27:47 -08:27:49 -08:27:53 -08:27:58 -08:28:00 -08:28:03 -08:28:05 -08:28:08 -08:28:10 -08:28:16 -08:28:19 -08:28:21 -08:28:25 -08:28:28 -08:28:32 -08:28:35 -08:28:37 -08:28:39 -08:28:42 -08:28:45 -08:28:48 -08:28:50 -08:28:55 -08:28:58 -08:29:01 -08:29:07 -08:29:12 -08:29:15 -08:29:25 -08:29:28 -08:29:32 -08:29:38 -08:29:43 -08:30:22 -08:30:29 -08:30:32 -08:30:35 -08:30:38 -08:30:42 -08:30:46 -08:30:51 -08:30:53 -08:30:56 -08:30:59 -08:31:02 -08:31:05 -08:31:09 -08:31:12 -08:31:14 -08:31:17 -08:31:18 -08:31:21 -08:31:24 -08:31:26 -08:31:27 -08:31:29 -08:31:31 -08:31:32 -08:31:35 -08:31:37 -08:31:38 -08:31:40 -08:31:43 -08:31:44 -08:31:47 -08:31:49 -08:31:51 -08:31:53 -08:31:54 -08:31:56 -08:31:56 -08:31:58 -08:32:00 -08:32:02 -08:32:04 -08:32:05 -08:32:09 -08:32:11 -08:32:14 -08:32:16 -08:32:17 -08:32:21 -08:32:23 -08:32:26 -08:32:28 -08:32:30 -08:32:31 -08:32:33 -08:32:35 -08:32:40 -08:32:47 -08:32:49 -08:32:52 -08:32:54 -08:32:59 -08:33:01 -08:33:04 -08:33:08 -08:33:12 -08:33:16 -08:33:21 -08:33:25 -08:33:32 -08:33:37 -08:33:53 -08:33:59 -08:34:06 -08:34:15 -08:34:23 -08:34:28 -08:34:33 -08:34:42 -08:34:47 -08:34:50 -08:34:53 -08:34:56 -08:35:01 -08:35:04 -08:35:07 -08:35:09 -08:35:12 -08:35:16 -08:35:19 -08:35:22 -08:35:26 -08:35:31 -08:35:34 -08:35:36 -08:35:38 -08:35:44 -08:35:48 -08:35:54 -08:35:57 -08:36:00 -08:36:04 -08:36:07 -08:36:10 -08:36:12 -08:36:14 -08:36:18 -08:36:22 -08:36:26 -08:36:30 -08:36:32 -08:36:34 -08:36:37 -08:36:40 -08:36:44 -08:36:45 -08:36:47 -08:36:48 -08:36:52 -08:36:53 -08:36:55 -08:37:01 -08:37:06 -08:37:09 -08:37:12 -08:37:14 -08:37:17 -08:37:18 -08:37:20 -08:37:23 -08:37:25 -08:37:27 -08:37:29 -08:37:33 -08:37:37 -08:37:42 -08:37:45 -08:37:48 -08:37:52 -08:37:59 -08:38:03 -08:38:07 -08:38:21 -08:38:29 -08:38:51 -08:38:57 -08:39:01 -08:39:05 -08:39:10 -08:39:14 -08:39:18 -08:39:20 -08:39:24 -08:39:27 -08:39:32 -08:39:34 -08:39:39 -08:39:42 -08:39:46 -08:39:46 -08:39:51 -08:39:55 -08:39:59 -08:40:03 -08:40:08 -08:40:12 -08:40:15 -08:40:18 -08:40:22 -08:40:25 -08:40:29 -08:40:32 -08:40:34 -08:40:36 -08:40:39 -08:40:49 -08:40:52 -08:40:55 -08:40:59 -08:41:03 -08:41:06 -08:41:13 -08:41:17 -08:41:20 -08:41:24 -08:41:30 -08:41:34 -08:41:39 -08:41:43 -08:41:50 -08:41:54 -08:41:58 -08:42:08 -08:42:15 -08:42:19 -08:42:26 -08:42:32 -08:42:37 -08:42:43 -08:42:51 -08:43:05 -08:43:08 -08:43:13 -08:43:15 -08:43:18 -08:43:23 -08:43:26 -08:43:29 -08:43:33 -08:43:38 -08:43:41 -08:43:44 -08:43:46 -08:43:49 -08:43:52 -08:43:55 -08:43:59 -08:44:02 -08:44:08 -08:44:11 -08:44:19 -08:44:23 -08:44:27 -08:44:31 -08:44:38 -08:44:46 -08:44:47 -08:44:52 -08:44:59 -08:45:04 -08:45:09 -08:45:16 -08:45:23 -08:45:42 -08:46:07 -08:46:10 -08:46:14 -08:46:18 -08:46:20 -08:46:23 -08:46:31 -08:46:34 -08:46:36 -08:46:38 -08:46:41 -08:46:43 -08:46:46 -08:46:57 -08:47:00 -08:47:04 -08:47:07 -08:47:10 -08:47:13 -08:47:16 -08:47:18 -08:47:21 -08:47:23 -08:47:26 -08:47:29 -08:47:33 -08:47:36 -08:47:40 -08:47:43 -08:47:51 -08:47:54 -08:48:00 -08:48:04 -08:48:07 -08:48:11 -08:48:13 -08:48:15 -08:48:17 -08:48:21 -08:48:26 -08:48:32 -08:48:36 -08:48:44 -08:48:47 -08:48:50 -08:48:55 -08:48:55 -08:49:02 -08:49:07 -08:49:09 -08:49:13 -08:49:16 -08:49:19 -08:49:24 -08:49:27 -08:49:29 -08:49:32 -08:49:35 -08:49:38 -08:49:41 -08:49:44 -08:49:47 -08:49:50 -08:49:58 -08:50:02 -08:50:06 -08:50:08 -08:50:13 -08:50:16 -08:50:19 -08:50:22 -08:50:44 -08:50:47 -08:50:51 -08:50:55 -08:51:02 -08:51:08 -08:51:13 -08:51:17 -08:51:22 -08:51:29 -08:51:32 -08:51:36 -08:51:41 -08:51:43 -08:51:46 -08:51:50 -08:51:57 -08:52:00 -08:52:05 -08:52:10 -08:52:15 -08:52:20 -08:52:24 -08:52:28 -08:52:31 -08:52:44 -08:52:48 -08:52:51 -08:52:56 -08:53:02 -08:53:08 -08:53:12 -08:53:16 -08:53:20 -08:53:23 -08:53:26 -08:53:31 -08:53:33 -08:53:37 -08:53:40 -08:53:44 -08:53:49 -08:53:53 -08:53:56 -08:54:01 -08:54:06 -08:54:12 -08:54:12 -08:54:15 -08:54:17 -08:54:20 -08:54:23 -08:54:27 -08:54:31 -08:54:37 -08:54:41 -08:54:45 -08:54:48 -08:54:51 -08:54:54 -08:54:58 -08:55:03 -08:55:09 -08:55:12 -08:55:15 -08:55:19 -08:55:23 -08:55:26 -08:55:28 -08:55:31 -08:55:34 -08:55:38 -08:55:42 -08:55:45 -08:55:48 -08:55:50 -08:55:53 -08:55:56 -08:56:00 -08:56:04 -08:56:08 -08:56:12 -08:56:14 -08:56:17 -08:56:20 -08:56:24 -08:56:26 -08:56:28 -08:56:30 -08:56:35 -08:56:38 -08:56:40 -08:56:41 -08:56:44 -08:56:46 -08:56:54 -08:56:55 -08:56:58 -08:57:01 -08:57:04 -08:57:05 -08:57:07 -08:57:09 -08:57:14 -08:57:16 -08:57:18 -08:57:20 -08:57:23 -08:57:25 -08:57:32 -08:57:34 -08:57:37 -08:57:42 -08:57:47 -08:57:50 -08:57:54 -08:57:57 -08:58:00 -08:58:02 -08:58:02 -08:58:04 -08:58:09 -08:58:11 -08:58:15 -08:58:19 -08:58:21 -08:58:25 -08:58:27 -08:58:31 -08:58:40 -08:58:42 -08:58:44 -08:58:47 -08:58:50 -08:58:54 -08:58:59 -08:59:04 -08:59:08 -08:59:11 -08:59:16 -08:59:18 -08:59:21 -08:59:24 -08:59:26 -08:59:28 -08:59:31 -08:59:34 -08:59:37 -08:59:40 -08:59:43 -08:59:45 -08:59:47 -08:59:50 -08:59:53 -08:59:55 -08:59:57 -08:59:59 -09:00:01 -09:00:04 -09:00:06 -09:00:08 -09:00:10 -09:00:14 -09:00:17 -09:00:19 -09:00:22 -09:00:25 -09:00:27 -09:00:30 -09:00:32 -09:00:34 -09:00:38 -09:00:40 -09:00:44 -09:00:47 -09:00:51 -09:00:53 -09:00:55 -09:00:58 -09:01:01 -09:01:05 -09:01:08 -09:01:10 -09:01:12 -09:01:15 -09:01:18 -09:01:21 -09:01:25 -09:01:28 -09:01:30 -09:01:31 -09:01:31 -09:01:33 -09:01:38 -09:01:40 -09:01:42 -09:01:46 -09:01:47 -09:01:50 -09:01:51 -09:01:53 -09:01:55 -09:01:58 -09:02:01 -09:02:03 -09:02:06 -09:02:07 -09:02:10 -09:02:14 -09:02:18 -09:02:24 -09:02:27 -09:02:30 -09:02:33 -09:02:35 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_8.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_8.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_8.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_1_8.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2298 +0,0 @@ -06:52:50 -06:52:54 -06:52:58 -06:52:59 -06:53:01 -06:53:03 -06:53:05 -06:53:06 -06:53:07 -06:53:10 -06:53:11 -06:53:13 -06:53:17 -06:53:19 -06:53:22 -06:53:23 -06:53:26 -06:53:30 -06:53:32 -06:53:35 -06:53:37 -06:53:38 -06:53:40 -06:53:41 -06:53:43 -06:53:45 -06:53:48 -06:53:52 -06:53:55 -06:53:57 -06:54:00 -06:54:01 -06:54:04 -06:54:06 -06:54:08 -06:54:11 -06:54:14 -06:54:16 -06:54:19 -06:54:21 -06:54:23 -06:54:28 -06:54:31 -06:54:36 -06:54:42 -06:54:50 -06:55:05 -06:55:07 -06:55:10 -06:55:13 -06:55:16 -06:55:19 -06:55:21 -06:55:22 -06:55:24 -06:55:26 -06:55:28 -06:55:30 -06:55:33 -06:55:35 -06:55:36 -06:55:40 -06:55:42 -06:55:44 -06:55:46 -06:55:48 -06:55:52 -06:55:55 -06:55:56 -06:55:59 -06:56:00 -06:56:03 -06:56:04 -06:56:06 -06:56:11 -06:56:15 -06:56:19 -06:56:22 -06:56:25 -06:56:29 -06:56:32 -06:56:35 -06:56:40 -06:56:44 -06:56:48 -06:56:51 -06:56:54 -06:56:57 -06:56:59 -06:57:01 -06:57:03 -06:57:05 -06:57:08 -06:57:09 -06:57:13 -06:57:15 -06:57:17 -06:57:19 -06:57:21 -06:57:25 -06:57:27 -06:57:28 -06:57:30 -06:57:31 -06:57:33 -06:57:35 -06:57:36 -06:57:38 -06:57:39 -06:57:42 -06:57:46 -06:57:48 -06:57:50 -06:57:52 -06:57:55 -06:57:59 -06:58:01 -06:58:06 -06:58:10 -06:58:13 -06:58:15 -06:58:22 -06:58:34 -06:58:38 -06:58:42 -06:58:44 -06:58:45 -06:58:47 -06:58:49 -06:58:52 -06:58:55 -06:58:57 -06:58:59 -06:59:01 -06:59:03 -06:59:07 -06:59:08 -06:59:13 -06:59:15 -06:59:16 -06:59:18 -06:59:20 -06:59:22 -06:59:24 -06:59:25 -06:59:27 -06:59:28 -06:59:30 -06:59:34 -06:59:36 -06:59:41 -06:59:42 -06:59:44 -06:59:46 -06:59:48 -06:59:52 -06:59:54 -06:59:56 -06:59:59 -07:00:05 -07:00:21 -07:00:26 -07:00:28 -07:00:31 -07:00:34 -07:00:37 -07:00:39 -07:00:41 -07:00:43 -07:00:45 -07:00:47 -07:00:49 -07:00:52 -07:00:53 -07:00:55 -07:00:57 -07:00:59 -07:01:01 -07:01:02 -07:01:04 -07:01:05 -07:01:10 -07:01:11 -07:01:13 -07:01:16 -07:01:18 -07:01:21 -07:01:24 -07:01:29 -07:01:33 -07:01:37 -07:01:39 -07:01:42 -07:01:44 -07:01:45 -07:01:47 -07:01:49 -07:01:51 -07:01:54 -07:01:57 -07:02:00 -07:02:02 -07:02:03 -07:02:05 -07:02:07 -07:02:08 -07:02:11 -07:02:14 -07:02:16 -07:02:17 -07:02:20 -07:02:22 -07:02:24 -07:02:26 -07:02:28 -07:02:32 -07:02:34 -07:02:37 -07:02:39 -07:02:40 -07:02:42 -07:02:46 -07:02:47 -07:02:51 -07:02:52 -07:02:57 -07:02:59 -07:03:02 -07:03:05 -07:03:06 -07:03:08 -07:03:12 -07:03:15 -07:03:17 -07:03:21 -07:03:23 -07:03:27 -07:03:30 -07:03:34 -07:03:37 -07:03:40 -07:03:58 -07:04:04 -07:04:07 -07:04:10 -07:04:12 -07:04:15 -07:04:17 -07:04:20 -07:04:24 -07:04:26 -07:04:29 -07:04:31 -07:04:34 -07:04:36 -07:04:39 -07:04:40 -07:04:41 -07:04:44 -07:04:45 -07:04:48 -07:04:51 -07:04:54 -07:04:57 -07:04:59 -07:05:01 -07:05:03 -07:05:03 -07:05:05 -07:05:06 -07:05:08 -07:05:09 -07:05:12 -07:05:14 -07:05:16 -07:05:17 -07:05:21 -07:05:24 -07:05:25 -07:05:27 -07:05:29 -07:05:32 -07:05:34 -07:05:37 -07:05:39 -07:05:40 -07:05:42 -07:05:44 -07:05:47 -07:05:48 -07:05:50 -07:05:52 -07:05:54 -07:05:55 -07:05:56 -07:05:58 -07:05:59 -07:06:02 -07:06:04 -07:06:06 -07:06:09 -07:06:11 -07:06:14 -07:06:15 -07:06:16 -07:06:19 -07:06:22 -07:06:24 -07:06:27 -07:06:31 -07:06:36 -07:07:02 -07:07:24 -07:07:26 -07:07:28 -07:07:30 -07:07:33 -07:07:35 -07:07:37 -07:07:39 -07:07:40 -07:07:42 -07:07:44 -07:07:46 -07:07:49 -07:07:50 -07:07:54 -07:07:56 -07:07:59 -07:08:02 -07:08:06 -07:08:08 -07:08:10 -07:08:15 -07:08:17 -07:08:23 -07:08:27 -07:08:31 -07:08:36 -07:08:41 -07:08:45 -07:08:48 -07:08:51 -07:08:53 -07:08:56 -07:08:57 -07:09:00 -07:09:02 -07:09:04 -07:09:08 -07:09:10 -07:09:12 -07:09:13 -07:09:15 -07:09:17 -07:09:19 -07:09:21 -07:09:22 -07:09:27 -07:09:28 -07:09:32 -07:09:34 -07:09:37 -07:09:39 -07:09:41 -07:09:43 -07:09:50 -07:09:53 -07:09:56 -07:09:59 -07:10:08 -07:10:11 -07:10:14 -07:10:17 -07:10:18 -07:10:21 -07:10:23 -07:10:25 -07:10:27 -07:10:28 -07:10:30 -07:10:32 -07:10:35 -07:10:38 -07:10:40 -07:10:42 -07:10:44 -07:10:48 -07:10:51 -07:10:53 -07:10:57 -07:10:59 -07:11:01 -07:11:03 -07:11:06 -07:11:07 -07:11:08 -07:11:11 -07:11:13 -07:11:13 -07:11:14 -07:11:18 -07:11:23 -07:11:26 -07:11:28 -07:11:29 -07:11:31 -07:11:33 -07:11:35 -07:11:37 -07:11:38 -07:11:40 -07:11:42 -07:11:44 -07:11:46 -07:11:48 -07:11:49 -07:11:52 -07:11:57 -07:12:01 -07:12:02 -07:12:04 -07:12:05 -07:12:07 -07:12:09 -07:12:10 -07:12:13 -07:12:15 -07:12:18 -07:12:19 -07:12:21 -07:12:24 -07:12:27 -07:12:30 -07:12:31 -07:12:33 -07:12:34 -07:12:36 -07:12:39 -07:12:42 -07:12:45 -07:12:49 -07:12:50 -07:12:53 -07:12:56 -07:12:57 -07:12:58 -07:13:02 -07:13:04 -07:13:07 -07:13:10 -07:13:14 -07:13:17 -07:13:18 -07:13:20 -07:13:23 -07:13:25 -07:13:28 -07:13:30 -07:13:34 -07:13:53 -07:14:25 -07:14:27 -07:14:30 -07:14:32 -07:14:35 -07:14:37 -07:14:39 -07:14:40 -07:14:43 -07:14:44 -07:14:46 -07:14:49 -07:14:51 -07:14:53 -07:14:57 -07:15:00 -07:15:03 -07:15:05 -07:15:08 -07:15:12 -07:15:14 -07:15:17 -07:15:20 -07:15:21 -07:15:23 -07:15:25 -07:15:26 -07:15:28 -07:15:30 -07:15:32 -07:15:36 -07:15:38 -07:15:40 -07:15:42 -07:15:45 -07:15:47 -07:15:49 -07:15:51 -07:15:53 -07:15:55 -07:15:56 -07:15:59 -07:16:00 -07:16:01 -07:16:06 -07:16:09 -07:16:10 -07:16:12 -07:16:19 -07:16:21 -07:16:23 -07:16:26 -07:16:29 -07:16:34 -07:16:37 -07:16:40 -07:16:44 -07:16:48 -07:16:52 -07:16:54 -07:16:56 -07:16:59 -07:17:01 -07:17:04 -07:17:06 -07:17:09 -07:17:11 -07:17:14 -07:17:16 -07:17:18 -07:17:20 -07:17:24 -07:17:27 -07:17:29 -07:17:31 -07:17:34 -07:17:36 -07:17:37 -07:17:40 -07:17:43 -07:17:46 -07:17:48 -07:17:52 -07:17:55 -07:17:58 -07:18:00 -07:18:03 -07:18:04 -07:18:06 -07:18:09 -07:18:12 -07:18:14 -07:18:19 -07:18:23 -07:18:26 -07:18:30 -07:18:38 -07:18:57 -07:18:59 -07:19:02 -07:19:05 -07:19:07 -07:19:10 -07:19:11 -07:19:13 -07:19:16 -07:19:21 -07:19:24 -07:19:26 -07:19:30 -07:19:31 -07:19:33 -07:19:35 -07:19:37 -07:19:38 -07:19:41 -07:19:44 -07:19:49 -07:19:50 -07:19:52 -07:19:54 -07:19:57 -07:20:00 -07:20:03 -07:20:04 -07:20:08 -07:20:10 -07:20:12 -07:20:14 -07:20:16 -07:20:21 -07:20:25 -07:20:27 -07:20:31 -07:20:33 -07:20:37 -07:21:11 -07:21:14 -07:21:16 -07:21:18 -07:21:20 -07:21:23 -07:21:26 -07:21:29 -07:21:31 -07:21:33 -07:21:35 -07:21:36 -07:21:37 -07:21:39 -07:21:41 -07:21:42 -07:21:44 -07:21:47 -07:21:49 -07:21:51 -07:21:55 -07:21:56 -07:21:57 -07:21:58 -07:22:00 -07:22:01 -07:22:02 -07:22:04 -07:22:06 -07:22:08 -07:22:10 -07:22:12 -07:22:14 -07:22:15 -07:22:16 -07:22:19 -07:22:22 -07:22:24 -07:22:25 -07:22:27 -07:22:28 -07:22:30 -07:22:32 -07:22:36 -07:22:38 -07:22:43 -07:22:45 -07:22:48 -07:22:51 -07:22:54 -07:22:57 -07:22:59 -07:23:05 -07:23:11 -07:23:16 -07:24:05 -07:24:08 -07:24:11 -07:24:13 -07:24:16 -07:24:19 -07:24:21 -07:24:23 -07:24:27 -07:24:28 -07:24:30 -07:24:33 -07:24:35 -07:24:36 -07:24:38 -07:24:40 -07:24:42 -07:24:43 -07:24:47 -07:24:49 -07:24:50 -07:24:52 -07:24:53 -07:24:56 -07:24:59 -07:25:01 -07:25:02 -07:25:04 -07:25:08 -07:25:10 -07:25:13 -07:25:14 -07:25:22 -07:25:23 -07:25:25 -07:25:29 -07:25:31 -07:25:34 -07:25:37 -07:25:40 -07:25:45 -07:25:52 -07:27:00 -07:27:03 -07:27:06 -07:27:09 -07:27:11 -07:27:14 -07:27:16 -07:27:18 -07:27:21 -07:27:22 -07:27:24 -07:27:26 -07:27:28 -07:27:31 -07:27:33 -07:27:36 -07:27:40 -07:27:41 -07:27:43 -07:27:45 -07:27:49 -07:27:51 -07:27:53 -07:27:56 -07:27:58 -07:28:00 -07:28:05 -07:28:10 -07:28:12 -07:28:12 -07:28:14 -07:28:16 -07:28:20 -07:28:24 -07:28:27 -07:28:31 -07:28:33 -07:28:36 -07:28:39 -07:28:41 -07:28:43 -07:28:45 -07:28:47 -07:28:49 -07:28:50 -07:28:53 -07:28:54 -07:28:57 -07:28:59 -07:29:00 -07:29:03 -07:29:08 -07:29:09 -07:29:11 -07:29:12 -07:29:14 -07:29:16 -07:29:18 -07:29:21 -07:29:23 -07:29:25 -07:29:27 -07:29:27 -07:29:31 -07:29:35 -07:29:38 -07:29:39 -07:29:42 -07:29:44 -07:29:46 -07:29:49 -07:29:52 -07:29:55 -07:29:58 -07:30:01 -07:30:05 -07:30:09 -07:30:14 -07:31:23 -07:31:26 -07:31:28 -07:31:31 -07:31:33 -07:31:36 -07:31:38 -07:31:41 -07:31:42 -07:31:46 -07:31:48 -07:31:49 -07:31:51 -07:31:53 -07:31:55 -07:31:58 -07:32:00 -07:32:06 -07:32:08 -07:32:09 -07:32:12 -07:32:13 -07:32:15 -07:32:17 -07:32:19 -07:32:20 -07:32:22 -07:32:25 -07:32:28 -07:32:31 -07:32:34 -07:32:37 -07:32:39 -07:32:43 -07:32:47 -07:32:51 -07:32:53 -07:32:55 -07:32:58 -07:33:00 -07:33:02 -07:33:04 -07:33:08 -07:33:13 -07:33:15 -07:33:18 -07:33:20 -07:33:22 -07:33:25 -07:33:27 -07:33:32 -07:33:36 -07:33:41 -07:33:47 -07:33:51 -07:33:56 -07:34:00 -07:35:03 -07:35:06 -07:35:08 -07:35:10 -07:35:14 -07:35:15 -07:35:17 -07:35:19 -07:35:21 -07:35:22 -07:35:28 -07:35:31 -07:35:33 -07:35:35 -07:35:38 -07:35:42 -07:35:44 -07:35:48 -07:35:53 -07:35:58 -07:36:57 -07:37:04 -07:37:07 -07:37:10 -07:37:13 -07:37:15 -07:37:18 -07:37:21 -07:37:24 -07:37:26 -07:37:27 -07:37:29 -07:37:33 -07:37:38 -07:37:44 -07:37:45 -07:37:47 -07:37:49 -07:37:52 -07:37:54 -07:37:55 -07:37:58 -07:37:59 -07:38:00 -07:38:01 -07:38:04 -07:38:06 -07:38:09 -07:38:11 -07:38:15 -07:38:17 -07:38:23 -07:38:25 -07:38:31 -07:38:36 -07:38:41 -07:38:43 -07:38:44 -07:38:48 -07:38:51 -07:38:54 -07:38:57 -07:39:00 -07:39:03 -07:39:05 -07:39:09 -07:39:11 -07:39:16 -07:39:22 -07:39:26 -07:39:30 -07:39:35 -07:39:49 -07:40:56 -07:40:59 -07:41:02 -07:41:04 -07:41:06 -07:41:08 -07:41:11 -07:41:15 -07:41:17 -07:41:21 -07:41:23 -07:41:26 -07:41:27 -07:41:29 -07:41:31 -07:41:33 -07:41:36 -07:41:38 -07:41:42 -07:41:44 -07:41:48 -07:41:50 -07:41:52 -07:41:54 -07:41:57 -07:41:58 -07:41:59 -07:42:01 -07:42:03 -07:42:05 -07:42:08 -07:42:10 -07:42:12 -07:42:13 -07:42:15 -07:42:17 -07:42:19 -07:42:22 -07:42:25 -07:42:29 -07:42:30 -07:42:32 -07:42:34 -07:42:37 -07:42:40 -07:42:46 -07:42:49 -07:42:51 -07:42:56 -07:43:02 -07:43:53 -07:43:57 -07:44:03 -07:44:06 -07:44:09 -07:44:12 -07:44:14 -07:44:16 -07:44:18 -07:44:19 -07:44:21 -07:44:22 -07:44:24 -07:44:26 -07:44:28 -07:44:31 -07:44:33 -07:44:36 -07:44:38 -07:44:39 -07:44:41 -07:44:43 -07:44:46 -07:44:47 -07:44:50 -07:44:54 -07:44:56 -07:44:57 -07:44:59 -07:45:02 -07:45:04 -07:45:06 -07:45:10 -07:45:12 -07:45:13 -07:45:15 -07:45:17 -07:45:20 -07:45:24 -07:45:25 -07:45:28 -07:45:32 -07:45:36 -07:45:38 -07:45:41 -07:45:45 -07:45:50 -07:45:54 -07:46:27 -07:46:31 -07:46:34 -07:46:38 -07:46:40 -07:46:42 -07:46:45 -07:46:49 -07:46:50 -07:46:54 -07:46:56 -07:46:59 -07:47:01 -07:47:06 -07:47:09 -07:47:13 -07:47:20 -07:47:45 -07:47:54 -07:47:59 -07:48:03 -07:48:05 -07:48:09 -07:48:09 -07:48:12 -07:48:14 -07:48:16 -07:48:18 -07:48:21 -07:48:22 -07:48:25 -07:48:27 -07:48:29 -07:48:31 -07:48:32 -07:48:34 -07:48:35 -07:48:38 -07:48:39 -07:48:41 -07:48:43 -07:48:45 -07:48:48 -07:48:49 -07:48:52 -07:48:55 -07:48:56 -07:48:58 -07:48:59 -07:49:01 -07:49:03 -07:49:05 -07:49:07 -07:49:08 -07:49:12 -07:49:15 -07:49:17 -07:49:18 -07:49:20 -07:49:22 -07:49:25 -07:49:27 -07:49:30 -07:49:32 -07:49:35 -07:49:39 -07:49:43 -07:49:44 -07:49:47 -07:49:51 -07:49:54 -07:49:59 -07:50:05 -07:50:17 -07:50:52 -07:50:55 -07:50:57 -07:50:59 -07:51:01 -07:51:04 -07:51:05 -07:51:08 -07:51:11 -07:51:14 -07:51:18 -07:51:20 -07:51:23 -07:51:24 -07:51:27 -07:51:31 -07:51:34 -07:51:36 -07:51:38 -07:51:41 -07:51:43 -07:51:47 -07:51:49 -07:51:52 -07:51:55 -07:51:59 -07:52:02 -07:52:09 -07:52:53 -07:52:56 -07:52:58 -07:53:00 -07:53:03 -07:53:04 -07:53:07 -07:53:08 -07:53:11 -07:53:14 -07:53:15 -07:53:17 -07:53:20 -07:53:25 -07:53:27 -07:53:33 -07:53:37 -07:53:39 -07:53:43 -07:53:50 -07:54:02 -07:54:23 -07:54:27 -07:54:30 -07:54:33 -07:54:35 -07:54:37 -07:54:41 -07:54:44 -07:54:47 -07:54:48 -07:54:51 -07:54:53 -07:54:54 -07:54:56 -07:55:00 -07:55:01 -07:55:05 -07:55:07 -07:55:09 -07:55:10 -07:55:15 -07:55:17 -07:55:19 -07:55:21 -07:55:23 -07:55:28 -07:55:29 -07:55:32 -07:55:34 -07:55:36 -07:55:40 -07:55:43 -07:55:48 -07:55:54 -07:55:59 -07:56:06 -07:56:40 -07:56:40 -07:56:44 -07:56:46 -07:56:51 -07:56:52 -07:56:54 -07:56:58 -07:57:00 -07:57:04 -07:57:06 -07:57:08 -07:57:09 -07:57:11 -07:57:14 -07:57:18 -07:57:20 -07:57:22 -07:57:24 -07:57:25 -07:57:26 -07:57:28 -07:57:29 -07:57:31 -07:57:33 -07:57:34 -07:57:41 -07:57:44 -07:57:47 -07:57:48 -07:57:51 -07:57:53 -07:57:56 -07:57:58 -07:58:01 -07:58:03 -07:58:07 -07:58:09 -07:58:12 -07:58:16 -07:58:22 -07:58:35 -07:58:39 -07:58:45 -07:58:50 -07:59:04 -07:59:08 -07:59:11 -07:59:14 -07:59:16 -07:59:19 -07:59:23 -07:59:28 -07:59:31 -07:59:34 -07:59:36 -07:59:43 -07:59:46 -07:59:50 -07:59:57 -08:00:48 -08:00:53 -08:00:56 -08:00:59 -08:01:02 -08:01:05 -08:01:07 -08:01:09 -08:01:11 -08:01:13 -08:01:17 -08:01:19 -08:01:21 -08:01:23 -08:01:25 -08:01:26 -08:01:28 -08:01:30 -08:01:33 -08:01:36 -08:01:38 -08:01:39 -08:01:43 -08:01:44 -08:01:46 -08:01:48 -08:01:50 -08:01:52 -08:01:54 -08:01:55 -08:01:59 -08:02:01 -08:02:03 -08:02:05 -08:02:08 -08:02:10 -08:02:12 -08:02:14 -08:02:17 -08:02:20 -08:02:24 -08:02:28 -08:02:31 -08:02:33 -08:02:35 -08:02:38 -08:02:41 -08:02:47 -08:02:52 -08:03:42 -08:03:57 -08:04:00 -08:04:05 -08:04:07 -08:04:08 -08:04:10 -08:04:13 -08:04:16 -08:04:18 -08:04:23 -08:04:25 -08:04:28 -08:04:30 -08:04:32 -08:04:34 -08:04:37 -08:04:39 -08:04:41 -08:04:42 -08:04:45 -08:04:47 -08:04:49 -08:04:50 -08:04:51 -08:04:54 -08:04:55 -08:04:56 -08:04:56 -08:04:59 -08:05:01 -08:05:02 -08:05:08 -08:05:10 -08:05:12 -08:05:16 -08:05:17 -08:05:19 -08:05:22 -08:05:25 -08:05:26 -08:05:30 -08:05:39 -08:05:42 -08:05:46 -08:05:50 -08:05:56 -08:06:45 -08:06:49 -08:06:51 -08:06:53 -08:06:56 -08:06:58 -08:07:00 -08:07:04 -08:07:07 -08:07:10 -08:07:12 -08:07:16 -08:07:17 -08:07:19 -08:07:21 -08:07:24 -08:07:25 -08:07:32 -08:07:36 -08:07:38 -08:07:43 -08:07:45 -08:07:48 -08:07:50 -08:07:51 -08:07:54 -08:07:57 -08:07:59 -08:08:01 -08:08:04 -08:08:05 -08:08:07 -08:08:10 -08:08:12 -08:08:19 -08:08:21 -08:08:23 -08:08:26 -08:08:28 -08:08:35 -08:08:39 -08:08:44 -08:09:24 -08:09:27 -08:09:29 -08:09:31 -08:09:33 -08:09:34 -08:09:38 -08:09:40 -08:09:41 -08:09:43 -08:09:46 -08:09:48 -08:09:51 -08:09:55 -08:10:02 -08:10:05 -08:10:09 -08:10:20 -08:10:23 -08:10:25 -08:10:27 -08:10:31 -08:10:33 -08:10:35 -08:10:38 -08:10:44 -08:10:45 -08:10:47 -08:10:50 -08:10:52 -08:10:54 -08:10:57 -08:10:59 -08:11:01 -08:11:02 -08:11:03 -08:11:06 -08:11:07 -08:11:09 -08:11:12 -08:11:14 -08:11:15 -08:11:17 -08:11:18 -08:11:20 -08:11:21 -08:11:23 -08:11:24 -08:11:27 -08:11:29 -08:11:31 -08:11:32 -08:11:34 -08:11:35 -08:11:37 -08:11:39 -08:11:40 -08:11:41 -08:11:45 -08:11:47 -08:11:49 -08:11:50 -08:11:52 -08:11:55 -08:11:58 -08:12:01 -08:12:02 -08:12:06 -08:12:09 -08:12:10 -08:12:13 -08:12:16 -08:12:19 -08:12:23 -08:12:27 -08:12:27 -08:12:43 -08:12:45 -08:12:49 -08:12:52 -08:12:54 -08:12:57 -08:13:00 -08:13:03 -08:13:04 -08:13:07 -08:13:08 -08:13:11 -08:13:14 -08:13:17 -08:13:19 -08:13:23 -08:13:24 -08:13:27 -08:13:28 -08:13:31 -08:13:33 -08:13:35 -08:13:37 -08:13:39 -08:13:42 -08:13:43 -08:13:46 -08:13:48 -08:13:50 -08:13:52 -08:13:54 -08:13:57 -08:14:00 -08:14:04 -08:14:07 -08:14:09 -08:14:14 -08:14:16 -08:14:18 -08:14:20 -08:14:22 -08:14:25 -08:14:27 -08:14:30 -08:14:33 -08:14:35 -08:14:37 -08:14:39 -08:14:43 -08:14:45 -08:14:47 -08:14:51 -08:14:53 -08:14:55 -08:14:57 -08:15:05 -08:15:07 -08:15:10 -08:15:15 -08:15:18 -08:15:22 -08:16:08 -08:16:12 -08:16:13 -08:16:15 -08:16:17 -08:16:22 -08:16:26 -08:16:29 -08:16:31 -08:16:32 -08:16:34 -08:16:36 -08:16:38 -08:16:41 -08:16:43 -08:16:45 -08:16:47 -08:16:49 -08:16:54 -08:16:56 -08:16:57 -08:17:00 -08:17:03 -08:17:05 -08:17:06 -08:17:07 -08:17:08 -08:17:11 -08:17:13 -08:17:15 -08:17:17 -08:17:18 -08:17:20 -08:17:23 -08:17:25 -08:17:27 -08:17:31 -08:17:32 -08:17:34 -08:17:36 -08:18:00 -08:18:06 -08:18:12 -08:18:17 -08:18:22 -08:18:26 -08:18:27 -08:18:31 -08:18:33 -08:18:35 -08:18:37 -08:18:38 -08:18:41 -08:18:43 -08:18:45 -08:18:49 -08:18:51 -08:18:54 -08:18:55 -08:18:57 -08:18:59 -08:19:01 -08:19:02 -08:19:04 -08:19:06 -08:19:07 -08:19:08 -08:19:10 -08:19:15 -08:19:16 -08:19:18 -08:19:21 -08:19:24 -08:19:26 -08:19:28 -08:19:28 -08:19:30 -08:19:31 -08:19:32 -08:19:34 -08:19:36 -08:19:39 -08:19:40 -08:19:45 -08:19:47 -08:19:50 -08:19:56 -08:19:58 -08:20:00 -08:20:04 -08:20:07 -08:20:10 -08:20:14 -08:20:38 -08:20:40 -08:20:42 -08:20:44 -08:20:46 -08:20:48 -08:20:50 -08:20:53 -08:20:58 -08:21:01 -08:21:03 -08:21:05 -08:21:07 -08:21:08 -08:21:11 -08:21:13 -08:21:15 -08:21:18 -08:21:20 -08:21:21 -08:21:23 -08:21:26 -08:21:28 -08:21:34 -08:21:36 -08:21:41 -08:21:54 -08:22:14 -08:22:17 -08:22:21 -08:22:23 -08:22:25 -08:22:27 -08:22:30 -08:22:32 -08:22:35 -08:22:37 -08:22:39 -08:22:40 -08:22:42 -08:22:43 -08:22:45 -08:22:46 -08:22:52 -08:22:55 -08:22:57 -08:22:58 -08:23:01 -08:23:03 -08:23:06 -08:23:07 -08:23:10 -08:23:12 -08:23:15 -08:23:17 -08:23:19 -08:23:20 -08:23:25 -08:23:28 -08:23:29 -08:23:32 -08:23:33 -08:23:35 -08:23:38 -08:23:39 -08:23:42 -08:23:44 -08:23:45 -08:23:48 -08:23:52 -08:23:54 -08:23:58 -08:23:59 -08:24:01 -08:24:04 -08:24:06 -08:24:08 -08:24:09 -08:24:14 -08:24:18 -08:24:23 -08:24:27 -08:24:31 -08:24:36 -08:24:42 -08:25:03 -08:25:06 -08:25:09 -08:25:12 -08:25:14 -08:25:17 -08:25:19 -08:25:21 -08:25:23 -08:25:25 -08:25:26 -08:25:29 -08:25:30 -08:25:31 -08:25:38 -08:25:39 -08:25:41 -08:25:46 -08:25:50 -08:25:51 -08:25:51 -08:25:57 -08:25:59 -08:26:01 -08:26:05 -08:26:08 -08:26:11 -08:26:15 -08:26:18 -08:26:22 -08:26:26 -08:26:29 -08:26:32 -08:26:33 -08:26:36 -08:26:38 -08:26:43 -08:26:45 -08:26:48 -08:26:50 -08:26:54 -08:26:57 -08:27:01 -08:27:03 -08:27:06 -08:27:08 -08:27:11 -08:27:15 -08:27:16 -08:27:18 -08:27:20 -08:27:23 -08:27:24 -08:27:27 -08:27:30 -08:27:33 -08:27:36 -08:27:39 -08:27:42 -08:27:45 -08:27:48 -08:27:50 -08:27:52 -08:27:55 -08:27:57 -08:28:02 -08:28:09 -08:28:16 -08:28:22 -08:28:28 -08:29:31 -08:29:35 -08:29:38 -08:29:41 -08:29:43 -08:29:44 -08:29:47 -08:29:48 -08:29:50 -08:29:53 -08:29:54 -08:29:56 -08:30:00 -08:30:02 -08:30:04 -08:30:05 -08:30:08 -08:30:10 -08:30:12 -08:30:14 -08:30:16 -08:30:18 -08:30:21 -08:30:22 -08:30:25 -08:30:27 -08:30:30 -08:30:32 -08:30:34 -08:30:39 -08:30:41 -08:30:43 -08:30:46 -08:30:51 -08:30:54 -08:30:55 -08:30:57 -08:30:58 -08:31:02 -08:31:03 -08:31:05 -08:31:09 -08:31:11 -08:31:13 -08:31:15 -08:31:17 -08:31:20 -08:31:22 -08:31:24 -08:31:26 -08:31:29 -08:31:31 -08:31:35 -08:31:39 -08:31:42 -08:31:44 -08:31:47 -08:31:49 -08:31:52 -08:31:57 -08:31:59 -08:32:01 -08:32:04 -08:32:07 -08:32:12 -08:32:17 -08:32:21 -08:32:24 -08:32:29 -08:32:35 -08:33:26 -08:33:31 -08:33:34 -08:33:34 -08:33:36 -08:33:38 -08:33:41 -08:33:42 -08:33:44 -08:33:46 -08:33:48 -08:33:50 -08:33:52 -08:33:55 -08:33:57 -08:34:01 -08:34:04 -08:34:05 -08:34:08 -08:34:10 -08:34:13 -08:34:16 -08:34:18 -08:34:22 -08:34:24 -08:34:28 -08:34:41 -08:34:46 -08:34:48 -08:34:51 -08:34:55 -08:34:56 -08:34:59 -08:35:01 -08:35:04 -08:35:06 -08:35:08 -08:35:10 -08:35:17 -08:35:23 -08:35:26 -08:35:27 -08:35:29 -08:35:32 -08:35:34 -08:35:37 -08:35:39 -08:35:41 -08:35:43 -08:35:45 -08:35:47 -08:35:49 -08:35:51 -08:35:54 -08:35:58 -08:36:00 -08:36:03 -08:36:05 -08:36:07 -08:36:09 -08:36:11 -08:36:15 -08:36:18 -08:36:19 -08:36:22 -08:36:23 -08:36:26 -08:36:31 -08:36:35 -08:36:38 -08:36:42 -08:36:47 -08:37:48 -08:37:50 -08:37:53 -08:37:57 -08:38:02 -08:38:06 -08:38:09 -08:38:12 -08:38:16 -08:38:20 -08:38:22 -08:38:29 -08:38:32 -08:38:34 -08:38:39 -08:38:43 -08:38:46 -08:38:50 -08:38:55 -08:39:04 -08:39:10 -08:39:16 -08:39:19 -08:39:26 -08:39:31 -08:39:34 -08:39:38 -08:39:44 -08:39:48 -08:39:51 -08:39:55 -08:39:58 -08:40:00 -08:40:03 -08:40:07 -08:40:12 -08:40:15 -08:40:21 -08:40:25 -08:40:28 -08:40:31 -08:40:33 -08:40:36 -08:40:39 -08:40:42 -08:40:46 -08:40:50 -08:40:55 -08:41:53 -08:41:57 -08:42:00 -08:42:01 -08:42:05 -08:42:05 -08:42:09 -08:42:11 -08:42:14 -08:42:17 -08:42:20 -08:42:22 -08:42:25 -08:42:27 -08:42:33 -08:42:35 -08:42:38 -08:42:40 -08:42:43 -08:42:45 -08:42:47 -08:42:53 -08:42:55 -08:42:59 -08:43:02 -08:43:07 -08:43:10 -08:43:13 -08:43:17 -08:43:30 -08:43:33 -08:43:37 -08:43:41 -08:43:46 -08:43:49 -08:43:53 -08:44:05 -08:44:12 -08:44:56 -08:44:58 -08:45:02 -08:45:06 -08:45:09 -08:45:11 -08:45:14 -08:45:16 -08:45:20 -08:45:23 -08:45:25 -08:45:28 -08:45:30 -08:45:32 -08:45:38 -08:45:40 -08:45:42 -08:45:45 -08:45:49 -08:45:51 -08:45:53 -08:45:55 -08:45:57 -08:46:01 -08:46:03 -08:46:05 -08:46:08 -08:46:11 -08:46:14 -08:46:23 -08:46:27 -08:46:31 -08:46:38 -08:46:46 -08:46:54 -08:47:00 -08:47:03 -08:47:06 -08:47:08 -08:47:11 -08:47:15 -08:47:26 -08:47:30 -08:47:33 -08:47:36 -08:47:40 -08:47:44 -08:47:47 -08:47:50 -08:47:57 -08:48:01 -08:48:05 -08:48:09 -08:48:12 -08:48:15 -08:48:19 -08:48:26 -08:48:29 -08:48:31 -08:48:33 -08:48:35 -08:48:39 -08:48:41 -08:48:43 -08:48:46 -08:48:48 -08:48:51 -08:48:54 -08:48:55 -08:48:57 -08:49:00 -08:49:01 -08:49:09 -08:49:13 -08:50:09 -08:50:12 -08:50:13 -08:50:16 -08:50:18 -08:50:20 -08:50:23 -08:50:25 -08:50:28 -08:50:31 -08:50:34 -08:50:38 -08:50:42 -08:50:46 -08:50:52 -08:50:55 -08:50:59 -08:51:02 -08:51:06 -08:51:10 -08:51:17 -08:51:20 -08:51:26 -08:51:32 -08:51:36 -08:51:41 -08:51:45 -08:51:51 -08:51:55 -08:52:01 -08:52:04 -08:52:09 -08:52:13 -08:52:17 -08:52:20 -08:52:23 -08:52:26 -08:52:29 -08:52:31 -08:52:34 -08:52:36 -08:52:39 -08:52:40 -08:52:44 -08:52:46 -08:52:50 -08:52:52 -08:52:56 -08:53:00 -08:53:04 -08:53:11 -08:53:34 -08:53:44 -08:53:46 -08:53:49 -08:53:52 -08:53:55 -08:53:57 -08:53:59 -08:54:02 -08:54:04 -08:54:06 -08:54:08 -08:54:11 -08:54:13 -08:54:16 -08:54:18 -08:54:21 -08:54:26 -08:54:29 -08:54:33 -08:54:36 -08:54:42 -08:54:48 -08:54:52 -08:54:58 -08:55:01 -08:55:07 -08:55:10 -08:55:13 -08:55:15 -08:55:17 -08:55:19 -08:55:22 -08:55:25 -08:55:28 -08:55:30 -08:55:32 -08:55:34 -08:55:35 -08:55:38 -08:55:40 -08:55:44 -08:55:47 -08:55:51 -08:55:56 -08:55:58 -08:56:00 -08:56:03 -08:56:04 -08:56:06 -08:56:08 -08:56:09 -08:56:12 -08:56:13 -08:56:15 -08:56:17 -08:56:20 -08:56:22 -08:56:26 -08:56:27 -08:56:29 -08:56:32 -08:56:34 -08:56:37 -08:56:40 -08:56:43 -08:56:46 -08:56:48 -08:56:51 -08:56:54 -08:56:57 -08:57:00 -08:57:03 -08:57:06 -08:57:10 -08:57:13 -08:57:15 -08:57:17 -08:57:20 -08:57:25 -08:57:43 -08:57:50 -08:57:50 -08:57:50 -08:57:50 -08:57:50 -08:58:01 -08:58:05 -08:58:08 -08:58:09 -08:58:11 -08:58:13 -08:58:17 -08:58:19 -08:58:19 -08:58:21 -08:58:24 -08:58:25 -08:58:27 -08:58:30 -08:58:32 -08:58:34 -08:58:41 -08:58:44 -08:58:47 -08:58:53 -08:58:58 -08:59:01 -08:59:04 -08:59:06 -08:59:08 -08:59:09 -08:59:11 -08:59:13 -08:59:16 -08:59:18 -08:59:20 -08:59:23 -08:59:25 -08:59:28 -08:59:33 -08:59:34 -08:59:35 -08:59:36 -08:59:45 -08:59:48 -08:59:50 -08:59:54 -08:59:57 -09:00:00 -09:00:03 -09:00:06 -09:00:09 -09:00:13 -09:00:16 -09:00:18 -09:00:22 -09:00:25 -09:00:28 -09:00:30 -09:00:33 -09:00:35 -09:00:38 -09:00:41 -09:00:43 -09:00:48 -09:00:50 -09:00:52 -09:00:55 -09:01:00 -09:01:02 -09:01:04 -09:01:05 -09:01:08 -09:01:11 -09:01:16 -09:01:18 -09:01:21 -09:01:24 -09:01:27 -09:01:29 -09:01:32 -09:01:34 -09:01:37 -09:01:41 -09:01:45 -09:01:48 -09:01:50 -09:01:52 -09:01:56 -09:02:00 -09:02:02 -09:02:05 -09:02:08 -09:02:09 -09:02:12 -09:02:14 -09:02:21 -09:02:24 -09:02:26 -09:02:32 -09:02:35 -09:02:39 -09:02:42 -09:02:47 -09:02:53 -09:02:58 -09:03:48 -09:03:50 -09:03:53 -09:03:55 -09:03:58 -09:04:00 -09:04:01 -09:04:03 -09:04:05 -09:04:13 -09:04:16 -09:04:20 -09:04:22 -09:04:27 -09:04:29 -09:04:33 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_1.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_1.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_1.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_1.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2293 +0,0 @@ -06:44:35 -06:44:36 -06:44:37 -06:44:39 -06:44:40 -06:44:42 -06:44:48 -06:44:49 -06:44:50 -06:44:52 -06:44:53 -06:44:57 -06:44:59 -06:45:00 -06:45:02 -06:45:05 -06:45:07 -06:45:09 -06:45:12 -06:45:14 -06:45:17 -06:45:18 -06:45:20 -06:45:22 -06:45:23 -06:45:25 -06:45:27 -06:45:29 -06:45:30 -06:45:31 -06:45:33 -06:45:35 -06:45:36 -06:45:37 -06:45:43 -06:45:45 -06:45:49 -06:45:51 -06:45:57 -06:46:06 -06:46:07 -06:46:08 -06:46:10 -06:46:11 -06:46:13 -06:46:15 -06:46:20 -06:46:23 -06:46:24 -06:46:26 -06:46:28 -06:46:30 -06:46:32 -06:46:33 -06:46:35 -06:46:39 -06:46:40 -06:46:41 -06:46:42 -06:46:43 -06:46:44 -06:46:45 -06:46:49 -06:46:50 -06:46:52 -06:46:53 -06:46:55 -06:46:58 -06:46:59 -06:47:02 -06:47:11 -06:47:16 -06:47:17 -06:47:19 -06:47:23 -06:47:26 -06:47:28 -06:47:29 -06:47:31 -06:47:32 -06:47:33 -06:47:34 -06:47:38 -06:47:41 -06:47:42 -06:47:43 -06:47:44 -06:47:44 -06:47:46 -06:47:48 -06:47:52 -06:47:53 -06:47:55 -06:47:56 -06:47:58 -06:49:05 -06:49:07 -06:49:09 -06:49:10 -06:49:10 -06:49:12 -06:49:26 -06:49:28 -06:49:30 -06:49:32 -06:49:35 -06:49:36 -06:49:38 -06:49:40 -06:49:43 -06:49:45 -06:49:47 -06:49:48 -06:49:49 -06:49:51 -06:49:52 -06:49:53 -06:49:54 -06:49:56 -06:49:58 -06:50:00 -06:50:02 -06:50:04 -06:50:08 -06:50:10 -06:50:12 -06:50:13 -06:50:15 -06:50:16 -06:50:17 -06:50:22 -06:50:22 -06:50:24 -06:50:26 -06:50:28 -06:50:29 -06:50:31 -06:50:33 -06:50:35 -06:50:37 -06:50:39 -06:50:41 -06:50:42 -06:50:44 -06:50:46 -06:50:47 -06:50:49 -06:50:51 -06:50:52 -06:50:53 -06:50:54 -06:50:57 -06:51:01 -06:51:02 -06:51:05 -06:51:07 -06:51:09 -06:51:12 -06:51:16 -06:51:18 -06:51:23 -06:51:24 -06:51:29 -06:51:31 -06:51:33 -06:51:36 -06:51:39 -06:51:41 -06:51:42 -06:51:44 -06:51:46 -06:51:49 -06:51:50 -06:51:51 -06:51:55 -06:51:59 -06:52:01 -06:52:03 -06:52:05 -06:52:06 -06:52:07 -06:52:08 -06:52:12 -06:52:14 -06:52:15 -06:52:18 -06:52:19 -06:52:21 -06:52:22 -06:52:29 -06:52:30 -06:52:32 -06:52:34 -06:52:35 -06:52:36 -06:52:41 -06:52:43 -06:52:52 -06:52:55 -06:52:58 -06:53:00 -06:53:06 -06:53:07 -06:53:09 -06:53:15 -06:53:21 -06:53:23 -06:53:25 -06:53:28 -06:53:30 -06:53:31 -06:53:32 -06:53:35 -06:53:36 -06:53:38 -06:53:39 -06:53:41 -06:53:43 -06:53:45 -06:53:46 -06:53:47 -06:53:51 -06:53:56 -06:54:01 -06:54:02 -06:54:05 -06:54:11 -06:54:23 -06:54:24 -06:54:35 -06:54:37 -06:54:39 -06:54:41 -06:54:42 -06:54:43 -06:54:45 -06:54:46 -06:54:47 -06:54:49 -06:54:52 -06:54:55 -06:54:58 -06:54:59 -06:55:01 -06:55:02 -06:55:09 -06:55:10 -06:55:12 -06:55:13 -06:55:15 -06:55:18 -06:55:21 -06:55:24 -06:55:28 -06:55:30 -06:55:33 -06:55:34 -06:55:36 -06:55:37 -06:55:37 -06:55:39 -06:55:41 -06:55:42 -06:55:43 -06:55:45 -06:55:47 -06:55:49 -06:55:50 -06:55:51 -06:55:55 -06:55:57 -06:55:59 -06:56:00 -06:56:03 -06:56:06 -06:56:07 -06:56:10 -06:56:12 -06:56:14 -06:56:16 -06:56:19 -06:56:25 -06:56:27 -06:56:28 -06:56:29 -06:56:30 -06:56:31 -06:56:32 -06:56:34 -06:56:35 -06:56:36 -06:56:38 -06:56:39 -06:56:40 -06:56:42 -06:56:43 -06:56:45 -06:56:46 -06:56:47 -06:56:50 -06:56:51 -06:56:59 -06:57:00 -06:57:02 -06:57:03 -06:57:05 -06:57:09 -06:57:11 -06:57:13 -06:57:16 -06:57:18 -06:57:20 -06:57:22 -06:57:24 -06:57:26 -06:57:28 -06:57:33 -06:57:35 -06:57:38 -06:57:40 -06:57:42 -06:57:43 -06:57:45 -06:57:50 -06:57:52 -06:57:53 -06:57:54 -06:57:57 -06:57:58 -06:58:04 -06:58:05 -06:58:06 -06:58:09 -06:58:10 -06:58:13 -06:58:15 -06:58:16 -06:58:18 -06:58:20 -06:58:21 -06:58:22 -06:58:25 -06:58:29 -06:58:33 -06:58:36 -06:58:38 -06:58:40 -06:58:41 -06:58:42 -06:58:49 -06:59:04 -06:59:06 -06:59:07 -06:59:09 -06:59:10 -06:59:11 -06:59:13 -06:59:19 -06:59:21 -06:59:22 -06:59:26 -06:59:28 -06:59:30 -06:59:33 -06:59:34 -06:59:36 -06:59:37 -06:59:40 -06:59:41 -06:59:44 -06:59:45 -06:59:47 -06:59:52 -06:59:53 -06:59:56 -06:59:58 -07:00:00 -07:00:01 -07:00:03 -07:00:18 -07:00:18 -07:00:20 -07:00:24 -07:00:27 -07:00:28 -07:00:30 -07:00:31 -07:00:32 -07:00:34 -07:00:35 -07:00:37 -07:00:39 -07:00:40 -07:00:41 -07:00:43 -07:00:45 -07:00:47 -07:00:50 -07:00:51 -07:00:52 -07:00:55 -07:01:01 -07:01:02 -07:01:03 -07:01:05 -07:01:11 -07:01:12 -07:01:14 -07:01:15 -07:01:17 -07:01:17 -07:01:19 -07:01:20 -07:01:21 -07:01:23 -07:01:24 -07:01:26 -07:01:27 -07:01:28 -07:01:29 -07:01:30 -07:01:32 -07:01:34 -07:01:38 -07:01:40 -07:01:42 -07:01:44 -07:01:47 -07:01:49 -07:01:50 -07:01:51 -07:01:53 -07:01:54 -07:01:55 -07:01:56 -07:01:58 -07:02:05 -07:02:06 -07:02:08 -07:02:10 -07:02:11 -07:02:13 -07:02:17 -07:02:21 -07:02:33 -07:02:35 -07:02:38 -07:02:39 -07:02:40 -07:02:41 -07:02:42 -07:02:43 -07:02:44 -07:02:46 -07:02:47 -07:02:48 -07:02:50 -07:02:51 -07:02:52 -07:02:54 -07:02:55 -07:02:57 -07:03:00 -07:03:02 -07:03:05 -07:03:06 -07:03:08 -07:03:10 -07:03:11 -07:03:13 -07:03:15 -07:03:16 -07:03:18 -07:03:20 -07:03:21 -07:03:23 -07:03:24 -07:03:25 -07:03:27 -07:03:28 -07:03:30 -07:03:32 -07:03:34 -07:03:35 -07:03:43 -07:03:45 -07:03:47 -07:03:50 -07:03:52 -07:03:55 -07:03:56 -07:03:57 -07:03:59 -07:04:01 -07:04:02 -07:04:05 -07:04:20 -07:04:21 -07:04:24 -07:04:28 -07:04:29 -07:04:30 -07:04:32 -07:04:33 -07:04:56 -07:04:57 -07:04:59 -07:05:00 -07:05:01 -07:05:07 -07:05:10 -07:05:11 -07:05:12 -07:05:13 -07:05:14 -07:05:15 -07:05:16 -07:05:18 -07:05:22 -07:05:23 -07:05:27 -07:05:29 -07:05:30 -07:05:31 -07:05:34 -07:05:36 -07:05:37 -07:05:38 -07:05:40 -07:05:41 -07:05:42 -07:05:46 -07:05:48 -07:05:50 -07:05:51 -07:05:53 -07:05:54 -07:05:55 -07:05:56 -07:05:57 -07:05:59 -07:06:00 -07:06:03 -07:06:04 -07:06:06 -07:06:07 -07:06:09 -07:06:10 -07:06:11 -07:06:13 -07:06:15 -07:06:31 -07:06:32 -07:06:34 -07:06:35 -07:06:38 -07:06:40 -07:06:42 -07:06:43 -07:06:45 -07:06:46 -07:06:48 -07:06:49 -07:06:50 -07:06:52 -07:06:54 -07:06:57 -07:07:01 -07:07:02 -07:07:05 -07:07:06 -07:07:07 -07:07:10 -07:07:12 -07:07:13 -07:07:14 -07:07:16 -07:07:17 -07:07:21 -07:07:22 -07:07:23 -07:07:24 -07:07:27 -07:07:28 -07:07:31 -07:07:35 -07:07:37 -07:07:40 -07:07:42 -07:07:44 -07:07:46 -07:07:53 -07:07:56 -07:07:57 -07:07:59 -07:08:03 -07:08:06 -07:08:07 -07:08:08 -07:08:12 -07:08:13 -07:08:15 -07:08:16 -07:08:17 -07:08:19 -07:08:22 -07:08:23 -07:08:28 -07:08:31 -07:08:32 -07:08:33 -07:08:35 -07:08:38 -07:08:40 -07:08:44 -07:08:50 -07:08:52 -07:08:53 -07:08:55 -07:08:56 -07:08:58 -07:08:59 -07:09:02 -07:09:58 -07:10:00 -07:10:01 -07:10:02 -07:10:03 -07:10:05 -07:10:06 -07:10:10 -07:10:11 -07:10:13 -07:10:15 -07:10:17 -07:10:18 -07:10:20 -07:10:22 -07:10:24 -07:10:27 -07:10:29 -07:10:30 -07:10:34 -07:10:38 -07:10:39 -07:10:40 -07:10:41 -07:10:44 -07:10:46 -07:10:47 -07:10:48 -07:10:51 -07:10:54 -07:10:57 -07:11:00 -07:11:04 -07:11:06 -07:11:08 -07:11:09 -07:11:12 -07:11:13 -07:11:16 -07:11:18 -07:11:20 -07:11:22 -07:11:23 -07:11:25 -07:11:27 -07:11:28 -07:11:30 -07:11:32 -07:11:34 -07:11:35 -07:11:38 -07:11:41 -07:11:42 -07:11:45 -07:11:48 -07:11:49 -07:11:52 -07:11:54 -07:11:55 -07:11:57 -07:12:01 -07:12:03 -07:12:04 -07:12:08 -07:12:11 -07:12:12 -07:12:14 -07:12:15 -07:12:18 -07:12:19 -07:12:22 -07:12:23 -07:12:26 -07:12:28 -07:12:29 -07:12:33 -07:12:35 -07:12:38 -07:12:42 -07:12:44 -07:12:47 -07:12:48 -07:12:49 -07:12:51 -07:12:53 -07:12:55 -07:12:57 -07:12:58 -07:13:03 -07:13:04 -07:13:07 -07:13:09 -07:13:12 -07:13:13 -07:13:15 -07:13:17 -07:13:18 -07:13:20 -07:13:21 -07:13:26 -07:13:28 -07:13:29 -07:13:30 -07:13:33 -07:13:36 -07:13:38 -07:13:40 -07:13:41 -07:13:42 -07:13:45 -07:13:54 -07:13:56 -07:13:59 -07:14:00 -07:14:01 -07:14:02 -07:14:04 -07:14:05 -07:14:08 -07:14:11 -07:14:13 -07:14:16 -07:14:18 -07:14:21 -07:14:23 -07:14:25 -07:14:27 -07:14:28 -07:14:31 -07:14:33 -07:14:36 -07:14:39 -07:14:41 -07:14:43 -07:14:44 -07:14:46 -07:14:48 -07:14:50 -07:14:52 -07:14:53 -07:14:54 -07:14:56 -07:14:57 -07:15:00 -07:15:02 -07:15:05 -07:15:08 -07:15:11 -07:15:15 -07:15:17 -07:15:19 -07:15:22 -07:15:24 -07:15:27 -07:15:28 -07:15:30 -07:15:32 -07:15:35 -07:15:37 -07:15:40 -07:15:44 -07:15:46 -07:15:49 -07:15:51 -07:15:52 -07:15:56 -07:15:57 -07:15:59 -07:16:01 -07:16:02 -07:16:03 -07:16:05 -07:16:12 -07:16:14 -07:16:16 -07:16:22 -07:16:24 -07:16:26 -07:16:28 -07:16:30 -07:16:34 -07:16:36 -07:16:40 -07:16:42 -07:16:43 -07:16:45 -07:16:46 -07:16:47 -07:16:49 -07:16:53 -07:17:00 -07:17:03 -07:17:06 -07:17:11 -07:17:14 -07:17:15 -07:17:18 -07:17:22 -07:17:23 -07:17:25 -07:17:26 -07:17:29 -07:17:31 -07:17:34 -07:17:35 -07:17:37 -07:17:40 -07:17:41 -07:17:43 -07:17:45 -07:17:47 -07:17:47 -07:17:49 -07:17:52 -07:17:55 -07:17:58 -07:17:59 -07:18:01 -07:18:02 -07:18:03 -07:18:08 -07:18:11 -07:18:14 -07:18:16 -07:18:18 -07:18:22 -07:18:25 -07:18:27 -07:18:29 -07:18:31 -07:18:33 -07:18:35 -07:18:36 -07:18:39 -07:18:42 -07:18:44 -07:18:45 -07:18:47 -07:18:50 -07:18:52 -07:18:56 -07:18:57 -07:18:59 -07:19:01 -07:19:03 -07:19:05 -07:19:08 -07:19:09 -07:19:11 -07:19:12 -07:19:13 -07:19:15 -07:19:17 -07:19:19 -07:19:21 -07:19:23 -07:19:25 -07:19:27 -07:19:28 -07:19:30 -07:19:33 -07:19:36 -07:19:37 -07:19:39 -07:19:40 -07:19:43 -07:19:44 -07:19:47 -07:19:49 -07:19:53 -07:19:55 -07:19:57 -07:19:59 -07:20:01 -07:20:02 -07:20:05 -07:20:06 -07:20:08 -07:20:10 -07:20:13 -07:20:18 -07:20:22 -07:20:26 -07:20:28 -07:20:30 -07:20:32 -07:20:34 -07:20:35 -07:20:38 -07:20:40 -07:20:42 -07:20:45 -07:20:46 -07:20:48 -07:20:51 -07:20:53 -07:20:55 -07:20:56 -07:20:58 -07:21:02 -07:21:04 -07:21:08 -07:21:12 -07:21:15 -07:21:18 -07:21:20 -07:21:22 -07:21:24 -07:21:27 -07:21:29 -07:21:31 -07:21:32 -07:21:36 -07:21:38 -07:21:40 -07:21:41 -07:21:43 -07:21:51 -07:21:55 -07:21:56 -07:21:58 -07:21:59 -07:22:01 -07:22:04 -07:22:06 -07:22:08 -07:22:10 -07:22:12 -07:22:13 -07:22:15 -07:22:16 -07:22:18 -07:22:19 -07:22:21 -07:22:22 -07:22:24 -07:22:26 -07:22:29 -07:22:30 -07:22:32 -07:22:35 -07:22:36 -07:22:38 -07:22:42 -07:22:44 -07:22:50 -07:22:54 -07:22:55 -07:22:57 -07:23:02 -07:23:06 -07:23:10 -07:23:11 -07:23:18 -07:23:21 -07:23:22 -07:23:24 -07:23:32 -07:23:35 -07:23:38 -07:23:40 -07:23:42 -07:23:43 -07:23:46 -07:23:49 -07:23:50 -07:23:52 -07:23:54 -07:23:56 -07:23:57 -07:23:59 -07:24:00 -07:24:03 -07:24:10 -07:24:11 -07:24:15 -07:24:25 -07:24:28 -07:24:31 -07:24:42 -07:24:47 -07:24:51 -07:24:53 -07:24:55 -07:24:56 -07:24:58 -07:25:00 -07:25:02 -07:25:05 -07:25:06 -07:25:10 -07:25:13 -07:25:15 -07:25:17 -07:25:53 -07:26:02 -07:26:03 -07:26:04 -07:26:06 -07:26:08 -07:26:09 -07:26:11 -07:26:13 -07:26:14 -07:26:16 -07:26:21 -07:26:22 -07:26:23 -07:26:26 -07:26:31 -07:26:32 -07:26:33 -07:26:36 -07:26:39 -07:26:41 -07:26:46 -07:26:48 -07:26:53 -07:26:57 -07:27:01 -07:27:27 -07:27:31 -07:27:33 -07:27:34 -07:27:38 -07:27:39 -07:27:42 -07:27:44 -07:27:46 -07:27:47 -07:27:49 -07:27:51 -07:27:52 -07:27:58 -07:28:00 -07:28:01 -07:28:06 -07:28:12 -07:28:14 -07:28:15 -07:28:16 -07:28:22 -07:28:23 -07:28:24 -07:28:29 -07:28:31 -07:28:41 -07:28:44 -07:28:48 -07:28:50 -07:28:53 -07:28:54 -07:28:55 -07:28:57 -07:28:59 -07:29:02 -07:29:04 -07:29:05 -07:29:10 -07:29:12 -07:29:13 -07:29:15 -07:29:17 -07:29:19 -07:29:21 -07:29:22 -07:29:24 -07:29:27 -07:29:30 -07:29:32 -07:29:40 -07:29:42 -07:29:44 -07:29:46 -07:29:49 -07:29:51 -07:29:51 -07:29:53 -07:29:57 -07:29:59 -07:30:01 -07:30:03 -07:30:06 -07:30:19 -07:30:22 -07:30:26 -07:30:32 -07:30:33 -07:30:35 -07:30:37 -07:30:39 -07:30:40 -07:30:43 -07:30:44 -07:30:56 -07:31:02 -07:31:04 -07:31:09 -07:31:12 -07:31:15 -07:31:16 -07:31:22 -07:31:24 -07:31:26 -07:31:28 -07:31:30 -07:31:47 -07:31:48 -07:31:49 -07:31:51 -07:31:52 -07:31:54 -07:31:56 -07:31:58 -07:32:00 -07:32:01 -07:32:02 -07:32:33 -07:32:34 -07:32:37 -07:32:38 -07:32:39 -07:32:42 -07:32:48 -07:32:50 -07:32:52 -07:32:56 -07:32:59 -07:33:00 -07:33:11 -07:33:16 -07:33:17 -07:33:18 -07:33:22 -07:33:24 -07:33:26 -07:33:29 -07:33:34 -07:33:36 -07:33:40 -07:33:43 -07:33:44 -07:33:47 -07:33:48 -07:33:50 -07:33:51 -07:33:53 -07:33:59 -07:34:11 -07:34:14 -07:34:22 -07:34:25 -07:34:28 -07:34:32 -07:34:39 -07:34:55 -07:35:12 -07:35:16 -07:35:19 -07:35:21 -07:35:23 -07:35:24 -07:35:28 -07:35:29 -07:35:31 -07:35:32 -07:35:33 -07:35:35 -07:35:36 -07:35:37 -07:35:38 -07:35:40 -07:35:42 -07:35:45 -07:35:56 -07:35:58 -07:36:00 -07:36:23 -07:36:38 -07:37:08 -07:37:09 -07:37:10 -07:37:12 -07:37:15 -07:37:16 -07:37:18 -07:37:20 -07:37:21 -07:37:25 -07:37:29 -07:37:31 -07:37:34 -07:37:35 -07:37:37 -07:37:38 -07:37:39 -07:37:39 -07:37:43 -07:37:50 -07:38:03 -07:38:09 -07:38:16 -07:38:18 -07:39:24 -07:39:26 -07:39:28 -07:39:30 -07:39:31 -07:39:33 -07:39:35 -07:39:36 -07:39:38 -07:39:42 -07:39:44 -07:39:49 -07:39:51 -07:39:53 -07:39:56 -07:39:58 -07:40:00 -07:40:02 -07:40:04 -07:40:08 -07:40:10 -07:40:12 -07:40:14 -07:40:16 -07:40:17 -07:40:20 -07:40:22 -07:40:26 -07:40:29 -07:40:31 -07:40:32 -07:40:34 -07:40:37 -07:40:40 -07:40:44 -07:40:45 -07:40:49 -07:40:51 -07:40:53 -07:40:58 -07:41:01 -07:41:03 -07:41:06 -07:41:08 -07:41:10 -07:41:11 -07:41:12 -07:41:14 -07:41:16 -07:41:19 -07:41:22 -07:41:25 -07:41:29 -07:41:30 -07:41:52 -07:41:54 -07:41:55 -07:41:57 -07:41:58 -07:41:59 -07:42:00 -07:42:03 -07:42:05 -07:42:07 -07:42:10 -07:42:11 -07:42:13 -07:42:15 -07:42:18 -07:42:20 -07:42:25 -07:42:27 -07:42:28 -07:42:30 -07:42:31 -07:42:33 -07:42:35 -07:42:36 -07:42:40 -07:42:41 -07:42:45 -07:42:58 -07:43:00 -07:43:02 -07:43:04 -07:43:06 -07:43:16 -07:43:20 -07:43:22 -07:43:24 -07:43:26 -07:43:31 -07:43:34 -07:43:37 -07:43:40 -07:43:41 -07:43:47 -07:43:51 -07:43:55 -07:43:59 -07:44:01 -07:44:02 -07:44:04 -07:44:05 -07:44:07 -07:44:25 -07:44:26 -07:44:48 -07:44:51 -07:44:54 -07:44:56 -07:44:57 -07:45:00 -07:45:04 -07:45:19 -07:45:26 -07:45:28 -07:45:33 -07:45:36 -07:45:38 -07:45:40 -07:45:42 -07:45:48 -07:45:53 -07:45:54 -07:45:55 -07:45:57 -07:46:01 -07:46:03 -07:46:04 -07:46:06 -07:46:10 -07:46:20 -07:46:22 -07:46:25 -07:46:39 -07:46:41 -07:46:44 -07:46:46 -07:46:50 -07:46:51 -07:46:54 -07:47:33 -07:47:36 -07:47:39 -07:47:48 -07:47:53 -07:47:55 -07:47:57 -07:48:01 -07:48:03 -07:48:04 -07:48:07 -07:48:10 -07:48:11 -07:48:13 -07:48:46 -07:48:51 -07:48:53 -07:48:56 -07:49:22 -07:49:24 -07:49:26 -07:49:27 -07:49:29 -07:49:30 -07:49:33 -07:50:30 -07:50:32 -07:50:33 -07:50:35 -07:50:36 -07:50:39 -07:50:41 -07:50:42 -07:50:44 -07:50:45 -07:50:46 -07:50:47 -07:50:49 -07:50:51 -07:50:52 -07:50:54 -07:50:58 -07:51:00 -07:51:03 -07:51:06 -07:51:08 -07:51:10 -07:51:12 -07:51:13 -07:51:27 -07:51:30 -07:51:32 -07:51:34 -07:51:37 -07:51:40 -07:51:42 -07:51:44 -07:51:46 -07:51:47 -07:51:50 -07:52:06 -07:52:08 -07:52:10 -07:52:11 -07:52:13 -07:52:16 -07:52:19 -07:52:22 -07:52:38 -07:52:42 -07:52:45 -07:52:47 -07:52:53 -07:53:09 -07:53:12 -07:53:14 -07:53:17 -07:53:20 -07:53:22 -07:53:24 -07:53:31 -07:53:33 -07:53:37 -07:53:52 -07:53:55 -07:53:56 -07:53:58 -07:53:59 -07:54:01 -07:54:05 -07:54:07 -07:54:28 -07:54:30 -07:54:31 -07:54:33 -07:54:34 -07:54:38 -07:54:41 -07:54:43 -07:54:44 -07:54:53 -07:54:55 -07:54:56 -07:54:57 -07:55:02 -07:55:03 -07:55:08 -07:55:11 -07:55:13 -07:55:16 -07:55:18 -07:55:19 -07:55:20 -07:55:28 -07:55:31 -07:55:38 -07:55:41 -07:56:06 -07:56:07 -07:56:08 -07:56:12 -07:56:13 -07:56:14 -07:56:16 -07:56:17 -07:56:19 -07:56:21 -07:56:23 -07:56:25 -07:56:27 -07:56:31 -07:56:32 -07:56:33 -07:56:35 -07:56:37 -07:56:39 -07:56:40 -07:56:47 -07:57:06 -07:57:24 -07:57:30 -07:57:31 -07:57:33 -07:57:37 -07:57:42 -07:57:44 -07:57:58 -07:58:09 -07:58:11 -07:58:14 -07:58:16 -07:58:24 -07:58:25 -07:58:27 -07:58:48 -07:58:49 -07:58:50 -07:59:12 -07:59:14 -07:59:15 -07:59:16 -07:59:17 -07:59:19 -07:59:27 -07:59:29 -07:59:30 -07:59:34 -07:59:35 -08:00:02 -08:00:04 -08:00:11 -08:00:12 -08:00:15 -08:00:18 -08:00:20 -08:00:40 -08:01:19 -08:01:21 -08:01:23 -08:01:24 -08:01:26 -08:01:27 -08:01:29 -08:01:31 -08:01:34 -08:01:35 -08:01:37 -08:01:39 -08:01:40 -08:01:42 -08:01:43 -08:01:51 -08:01:54 -08:02:17 -08:02:18 -08:02:22 -08:02:22 -08:02:25 -08:02:26 -08:02:27 -08:02:31 -08:02:33 -08:02:35 -08:02:36 -08:02:38 -08:02:39 -08:02:42 -08:02:45 -08:02:46 -08:02:48 -08:02:53 -08:02:55 -08:02:57 -08:02:58 -08:03:00 -08:03:03 -08:03:05 -08:03:07 -08:03:08 -08:03:10 -08:03:11 -08:03:14 -08:03:16 -08:03:17 -08:03:19 -08:03:21 -08:03:25 -08:03:26 -08:03:31 -08:03:32 -08:03:33 -08:03:35 -08:03:37 -08:03:41 -08:03:42 -08:03:43 -08:03:44 -08:04:04 -08:04:06 -08:04:09 -08:04:10 -08:04:12 -08:04:14 -08:04:16 -08:04:21 -08:04:23 -08:04:24 -08:04:25 -08:04:26 -08:04:31 -08:04:31 -08:04:33 -08:04:35 -08:04:37 -08:04:44 -08:04:47 -08:05:12 -08:05:19 -08:05:22 -08:05:29 -08:05:58 -08:06:03 -08:06:05 -08:06:08 -08:06:19 -08:06:23 -08:06:29 -08:06:39 -08:06:42 -08:06:43 -08:06:44 -08:06:46 -08:06:48 -08:06:51 -08:06:52 -08:06:55 -08:07:05 -08:07:13 -08:07:52 -08:07:54 -08:07:56 -08:07:58 -08:08:00 -08:08:01 -08:08:03 -08:08:04 -08:08:07 -08:08:08 -08:08:11 -08:08:26 -08:08:27 -08:08:28 -08:08:33 -08:08:34 -08:08:38 -08:08:43 -08:08:45 -08:08:49 -08:09:08 -08:09:09 -08:09:11 -08:09:13 -08:09:15 -08:09:17 -08:09:19 -08:09:21 -08:09:22 -08:09:23 -08:09:25 -08:09:28 -08:09:31 -08:09:36 -08:09:39 -08:09:40 -08:09:42 -08:09:50 -08:09:54 -08:10:12 -08:10:13 -08:10:15 -08:10:16 -08:10:18 -08:10:23 -08:10:24 -08:10:29 -08:10:30 -08:10:31 -08:10:32 -08:10:39 -08:11:42 -08:11:44 -08:11:47 -08:11:48 -08:11:52 -08:11:53 -08:11:57 -08:11:59 -08:12:02 -08:12:03 -08:12:06 -08:12:07 -08:12:09 -08:12:11 -08:12:13 -08:12:15 -08:12:17 -08:12:18 -08:12:22 -08:12:23 -08:12:27 -08:12:33 -08:12:42 -08:12:43 -08:13:02 -08:13:49 -08:13:51 -08:13:54 -08:13:55 -08:13:57 -08:13:59 -08:14:10 -08:14:12 -08:14:13 -08:14:14 -08:14:16 -08:14:20 -08:14:23 -08:14:31 -08:14:33 -08:14:35 -08:14:42 -08:14:43 -08:14:44 -08:14:45 -08:14:50 -08:14:52 -08:14:52 -08:14:59 -08:15:02 -08:15:03 -08:15:05 -08:15:13 -08:15:18 -08:15:24 -08:15:27 -08:15:28 -08:15:31 -08:15:40 -08:15:41 -08:15:44 -08:15:45 -08:15:59 -08:16:01 -08:16:09 -08:16:10 -08:16:13 -08:16:14 -08:16:15 -08:16:18 -08:16:21 -08:16:22 -08:16:23 -08:16:27 -08:16:48 -08:16:58 -08:17:00 -08:17:02 -08:17:04 -08:17:25 -08:17:27 -08:17:31 -08:17:33 -08:17:47 -08:17:50 -08:18:01 -08:18:17 -08:18:19 -08:18:20 -08:18:21 -08:18:24 -08:18:35 -08:18:37 -08:18:38 -08:18:39 -08:18:42 -08:18:45 -08:18:47 -08:18:49 -08:18:52 -08:18:54 -08:18:56 -08:18:57 -08:18:58 -08:19:02 -08:19:10 -08:19:11 -08:19:12 -08:19:18 -08:19:20 -08:19:21 -08:19:24 -08:19:32 -08:19:43 -08:19:44 -08:19:46 -08:19:48 -08:19:49 -08:19:51 -08:19:53 -08:19:54 -08:19:57 -08:19:58 -08:20:00 -08:20:04 -08:20:05 -08:20:06 -08:20:07 -08:20:15 -08:20:16 -08:20:17 -08:20:19 -08:20:29 -08:20:30 -08:20:31 -08:20:36 -08:20:38 -08:20:40 -08:20:44 -08:20:47 -08:21:06 -08:21:39 -08:21:41 -08:21:45 -08:21:48 -08:21:50 -08:21:52 -08:21:53 -08:21:54 -08:21:55 -08:21:57 -08:21:59 -08:22:00 -08:22:01 -08:22:02 -08:22:04 -08:22:07 -08:22:09 -08:22:10 -08:22:12 -08:22:14 -08:22:15 -08:22:19 -08:22:23 -08:22:26 -08:22:29 -08:22:37 -08:22:38 -08:22:42 -08:22:57 -08:23:00 -08:23:03 -08:23:04 -08:23:11 -08:23:14 -08:23:26 -08:23:29 -08:23:30 -08:23:34 -08:23:41 -08:23:43 -08:23:45 -08:23:59 -08:24:20 -08:24:21 -08:24:23 -08:24:24 -08:24:26 -08:24:28 -08:24:30 -08:24:31 -08:24:55 -08:24:59 -08:25:05 -08:25:08 -08:25:10 -08:25:16 -08:25:21 -08:25:22 -08:25:30 -08:25:32 -08:25:42 -08:25:45 -08:25:47 -08:25:49 -08:25:50 -08:25:57 -08:25:59 -08:26:02 -08:26:05 -08:26:07 -08:26:09 -08:26:13 -08:26:39 -08:26:45 -08:26:46 -08:26:47 -08:26:49 -08:26:52 -08:26:53 -08:26:55 -08:26:56 -08:26:58 -08:26:59 -08:27:02 -08:27:05 -08:27:06 -08:27:07 -08:27:25 -08:27:27 -08:27:28 -08:27:29 -08:27:31 -08:27:32 -08:27:36 -08:27:38 -08:27:39 -08:27:41 -08:27:59 -08:28:00 -08:28:12 -08:28:22 -08:28:24 -08:28:42 -08:28:46 -08:28:48 -08:28:50 -08:28:51 -08:28:53 -08:29:04 -08:29:05 -08:29:06 -08:29:14 -08:29:23 -08:29:25 -08:29:28 -08:29:29 -08:29:34 -08:29:35 -08:29:36 -08:29:38 -08:29:39 -08:29:42 -08:29:43 -08:29:45 -08:29:49 -08:29:51 -08:29:54 -08:29:56 -08:30:13 -08:30:15 -08:30:18 -08:30:20 -08:30:20 -08:30:22 -08:30:24 -08:30:27 -08:30:29 -08:30:31 -08:30:33 -08:30:38 -08:30:39 -08:30:41 -08:30:42 -08:30:43 -08:30:47 -08:30:48 -08:30:59 -08:31:00 -08:31:05 -08:31:13 -08:31:17 -08:31:19 -08:31:20 -08:31:24 -08:31:36 -08:31:38 -08:31:40 -08:32:31 -08:32:32 -08:32:36 -08:32:37 -08:32:39 -08:32:43 -08:32:45 -08:32:46 -08:32:47 -08:32:49 -08:32:51 -08:32:52 -08:32:55 -08:32:56 -08:32:57 -08:32:59 -08:33:01 -08:33:02 -08:33:07 -08:33:08 -08:33:12 -08:33:15 -08:33:19 -08:33:20 -08:33:22 -08:33:25 -08:33:26 -08:33:29 -08:33:31 -08:33:34 -08:33:37 -08:33:40 -08:33:42 -08:33:43 -08:33:45 -08:33:47 -08:33:48 -08:33:50 -08:33:52 -08:33:54 -08:33:59 -08:34:01 -08:34:06 -08:34:08 -08:34:09 -08:34:11 -08:34:13 -08:34:43 -08:34:44 -08:34:48 -08:34:50 -08:34:51 -08:35:03 -08:35:05 -08:35:09 -08:35:21 -08:35:22 -08:35:24 -08:35:25 -08:35:27 -08:35:29 -08:35:31 -08:35:33 -08:35:39 -08:35:40 -08:35:43 -08:35:45 -08:35:47 -08:35:48 -08:35:52 -08:36:02 -08:36:03 -08:36:06 -08:36:09 -08:36:10 -08:36:11 -08:36:12 -08:36:15 -08:36:18 -08:36:20 -08:36:21 -08:36:31 -08:36:32 -08:36:36 -08:36:37 -08:36:44 -08:36:45 -08:36:47 -08:37:07 -08:37:14 -08:37:15 -08:37:17 -08:37:20 -08:37:22 -08:37:24 -08:37:27 -08:37:29 -08:37:30 -08:37:33 -08:37:36 -08:37:46 -08:37:47 -08:37:48 -08:37:49 -08:37:51 -08:37:53 -08:38:04 -08:38:07 -08:38:10 -08:38:12 -08:38:19 -08:38:24 -08:38:25 -08:38:26 -08:38:29 -08:38:30 -08:38:31 -08:38:40 -08:38:41 -08:38:45 -08:38:47 -08:38:49 -08:38:51 -08:38:55 -08:38:57 -08:38:59 -08:39:00 -08:39:03 -08:39:07 -08:39:28 -08:39:29 -08:39:31 -08:39:32 -08:39:34 -08:39:35 -08:39:37 -08:40:03 -08:40:04 -08:40:21 -08:40:28 -08:40:34 -08:40:35 -08:40:37 -08:40:38 -08:40:40 -08:40:42 -08:40:46 -08:40:48 -08:40:51 -08:40:55 -08:40:57 -08:40:58 -08:41:09 -08:41:10 -08:41:12 -08:41:13 -08:41:14 -08:41:16 -08:41:18 -08:41:21 -08:41:48 -08:41:48 -08:41:50 -08:41:53 -08:41:55 -08:41:57 -08:42:05 -08:42:07 -08:42:10 -08:42:11 -08:42:13 -08:42:30 -08:42:43 -08:42:44 -08:42:47 -08:42:50 -08:42:54 -08:42:59 -08:43:02 -08:43:07 -08:43:21 -08:43:30 -08:43:32 -08:43:33 -08:43:43 -08:43:46 -08:44:03 -08:44:04 -08:44:07 -08:44:09 -08:44:10 -08:44:15 -08:44:16 -08:44:18 -08:44:20 -08:44:24 -08:44:26 -08:44:28 -08:44:33 -08:44:35 -08:44:39 -08:44:41 -08:44:43 -08:44:45 -08:44:52 -08:44:59 -08:45:14 -08:45:17 -08:45:21 -08:45:26 -08:45:29 -08:46:10 -08:46:11 -08:46:13 -08:46:15 -08:46:20 -08:46:21 -08:46:23 -08:46:24 -08:46:27 -08:46:28 -08:46:38 -08:46:40 -08:47:27 -08:47:29 -08:47:30 -08:47:33 -08:47:34 -08:47:38 -08:47:39 -08:47:53 -08:48:00 -08:48:02 -08:48:03 -08:48:05 -08:48:07 -08:48:09 -08:48:10 -08:48:14 -08:48:15 -08:48:18 -08:48:20 -08:48:24 -08:48:35 -08:48:36 -08:48:38 -08:48:41 -08:48:55 -08:48:57 -08:49:03 -08:49:20 -08:49:21 -08:49:31 -08:49:32 -08:49:33 -08:49:34 -08:49:36 -08:49:37 -08:49:39 -08:49:41 -08:49:42 -08:49:44 -08:49:46 -08:49:48 -08:49:49 -08:49:51 -08:49:52 -08:49:53 -08:50:09 -08:50:14 -08:50:38 -08:50:40 -08:51:20 -08:51:25 -08:51:29 -08:51:37 -08:51:38 -08:51:39 -08:51:41 -08:51:42 -08:51:47 -08:51:50 -08:51:54 -08:52:03 -08:52:13 -08:52:14 -08:52:24 -08:52:26 -08:52:29 -08:52:31 -08:52:32 -08:52:36 -08:52:38 -08:52:39 -08:52:41 -08:52:43 -08:52:45 -08:52:46 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_2.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_2.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_2.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_2.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2293 +0,0 @@ -06:46:47 -06:46:48 -06:46:51 -06:46:53 -06:46:56 -06:46:57 -06:47:00 -06:47:06 -06:47:07 -06:47:09 -06:47:11 -06:47:14 -06:47:17 -06:47:19 -06:47:20 -06:47:24 -06:47:26 -06:47:28 -06:47:29 -06:47:31 -06:47:33 -06:47:34 -06:47:36 -06:47:38 -06:47:39 -06:47:42 -06:47:44 -06:47:46 -06:47:49 -06:47:49 -06:47:50 -06:47:52 -06:47:53 -06:47:54 -06:47:57 -06:47:59 -06:48:03 -06:48:04 -06:48:12 -06:48:18 -06:48:20 -06:48:21 -06:48:23 -06:48:25 -06:48:26 -06:48:28 -06:48:32 -06:48:33 -06:48:37 -06:48:38 -06:48:40 -06:48:42 -06:48:44 -06:48:46 -06:48:49 -06:48:55 -06:48:56 -06:48:57 -06:48:58 -06:48:59 -06:49:01 -06:49:02 -06:49:05 -06:49:06 -06:49:12 -06:49:14 -06:49:16 -06:49:18 -06:49:19 -06:49:24 -06:49:30 -06:49:33 -06:49:34 -06:49:35 -06:49:38 -06:49:41 -06:49:43 -06:49:44 -06:49:45 -06:49:46 -06:49:48 -06:49:49 -06:49:51 -06:49:52 -06:49:53 -06:49:54 -06:49:55 -06:49:56 -06:49:58 -06:50:00 -06:50:05 -06:50:05 -06:50:06 -06:50:08 -06:50:10 -06:51:17 -06:51:18 -06:51:24 -06:51:26 -06:51:27 -06:51:29 -06:51:33 -06:51:36 -06:51:38 -06:51:40 -06:51:49 -06:51:51 -06:51:52 -06:51:54 -06:51:57 -06:51:59 -06:52:04 -06:52:06 -06:52:06 -06:52:10 -06:52:12 -06:52:13 -06:52:15 -06:52:16 -06:52:18 -06:52:23 -06:52:26 -06:52:27 -06:52:32 -06:52:34 -06:52:37 -06:52:38 -06:52:40 -06:52:41 -06:52:46 -06:52:53 -06:52:54 -06:52:56 -06:52:57 -06:53:01 -06:53:03 -06:53:04 -06:53:06 -06:53:07 -06:53:12 -06:53:14 -06:53:16 -06:53:17 -06:53:18 -06:53:20 -06:53:22 -06:53:24 -06:53:26 -06:53:27 -06:53:28 -06:53:29 -06:53:33 -06:53:35 -06:53:38 -06:53:40 -06:53:41 -06:53:43 -06:53:45 -06:53:49 -06:53:51 -06:53:54 -06:53:57 -06:54:07 -06:54:10 -06:54:11 -06:54:14 -06:54:15 -06:54:17 -06:54:18 -06:54:22 -06:54:24 -06:54:26 -06:54:27 -06:54:29 -06:54:32 -06:54:35 -06:54:37 -06:54:40 -06:54:42 -06:54:43 -06:54:44 -06:54:47 -06:54:51 -06:54:54 -06:54:55 -06:54:57 -06:54:58 -06:55:00 -06:55:03 -06:55:05 -06:55:07 -06:55:09 -06:55:11 -06:55:13 -06:55:14 -06:55:16 -06:55:17 -06:55:23 -06:55:24 -06:55:26 -06:55:27 -06:55:32 -06:55:33 -06:55:35 -06:55:40 -06:55:43 -06:55:45 -06:55:48 -06:55:50 -06:55:51 -06:55:53 -06:55:54 -06:55:57 -06:55:59 -06:56:01 -06:56:02 -06:56:03 -06:56:05 -06:56:06 -06:56:08 -06:56:09 -06:56:16 -06:56:18 -06:56:21 -06:56:24 -06:56:26 -06:56:27 -06:56:29 -06:56:31 -06:56:43 -06:56:44 -06:56:46 -06:56:49 -06:56:50 -06:56:51 -06:56:53 -06:56:56 -06:56:58 -06:56:59 -06:57:03 -06:57:07 -06:57:09 -06:57:10 -06:57:12 -06:57:16 -06:57:34 -06:57:36 -06:57:37 -06:57:40 -06:57:44 -06:57:47 -06:57:50 -06:57:54 -06:57:55 -06:57:57 -06:57:58 -06:58:00 -06:58:02 -06:58:03 -06:58:05 -06:58:09 -06:58:10 -06:58:12 -06:58:13 -06:58:14 -06:58:16 -06:58:18 -06:58:19 -06:58:23 -06:58:25 -06:58:27 -06:58:28 -06:58:31 -06:58:33 -06:58:34 -06:58:36 -06:58:37 -06:58:39 -06:58:41 -06:58:43 -06:58:50 -06:58:51 -06:58:53 -06:58:54 -06:58:55 -06:58:56 -06:58:57 -06:58:59 -06:59:01 -06:59:03 -06:59:05 -06:59:06 -06:59:07 -06:59:10 -06:59:12 -06:59:14 -06:59:16 -06:59:17 -06:59:19 -06:59:20 -06:59:27 -06:59:28 -06:59:30 -06:59:31 -06:59:33 -06:59:35 -06:59:38 -06:59:39 -06:59:41 -06:59:44 -06:59:47 -06:59:49 -06:59:50 -06:59:52 -06:59:54 -06:59:56 -06:59:57 -06:59:59 -07:00:03 -07:00:06 -07:00:08 -07:00:09 -07:00:11 -07:00:16 -07:00:18 -07:00:20 -07:00:22 -07:00:24 -07:00:25 -07:00:29 -07:00:31 -07:00:33 -07:00:35 -07:00:37 -07:00:41 -07:00:43 -07:00:44 -07:00:46 -07:00:48 -07:00:49 -07:00:54 -07:00:57 -07:00:58 -07:01:00 -07:01:03 -07:01:06 -07:01:07 -07:01:10 -07:01:11 -07:01:14 -07:01:21 -07:01:23 -07:01:24 -07:01:25 -07:01:27 -07:01:30 -07:01:32 -07:01:36 -07:01:38 -07:01:39 -07:01:42 -07:01:44 -07:01:46 -07:01:48 -07:01:49 -07:01:51 -07:01:53 -07:01:55 -07:01:56 -07:01:59 -07:02:00 -07:02:02 -07:02:04 -07:02:06 -07:02:11 -07:02:12 -07:02:15 -07:02:16 -07:02:18 -07:02:23 -07:02:24 -07:02:27 -07:02:32 -07:02:36 -07:02:37 -07:02:39 -07:02:40 -07:02:41 -07:02:49 -07:02:50 -07:02:56 -07:02:58 -07:02:59 -07:03:01 -07:03:03 -07:03:05 -07:03:07 -07:03:09 -07:03:10 -07:03:12 -07:03:15 -07:03:21 -07:03:22 -07:03:24 -07:03:26 -07:03:29 -07:03:30 -07:03:32 -07:03:34 -07:03:35 -07:03:37 -07:03:39 -07:03:41 -07:03:42 -07:03:43 -07:03:45 -07:03:46 -07:03:48 -07:03:49 -07:03:51 -07:03:53 -07:03:54 -07:03:56 -07:03:59 -07:04:02 -07:04:04 -07:04:06 -07:04:09 -07:04:11 -07:04:12 -07:04:13 -07:04:14 -07:04:16 -07:04:17 -07:04:19 -07:04:21 -07:04:24 -07:04:27 -07:04:28 -07:04:30 -07:04:32 -07:04:33 -07:04:35 -07:04:38 -07:04:41 -07:04:44 -07:04:47 -07:04:51 -07:04:52 -07:04:54 -07:04:56 -07:04:57 -07:04:58 -07:05:01 -07:05:02 -07:05:03 -07:05:04 -07:05:06 -07:05:06 -07:05:08 -07:05:10 -07:05:12 -07:05:15 -07:05:17 -07:05:18 -07:05:20 -07:05:21 -07:05:29 -07:05:30 -07:05:33 -07:05:34 -07:05:35 -07:05:38 -07:05:41 -07:05:43 -07:05:44 -07:05:45 -07:05:47 -07:05:50 -07:05:51 -07:05:52 -07:05:55 -07:05:56 -07:05:56 -07:06:01 -07:06:05 -07:06:08 -07:06:11 -07:06:12 -07:06:15 -07:06:17 -07:06:21 -07:06:24 -07:06:28 -07:06:30 -07:06:31 -07:06:33 -07:06:35 -07:06:38 -07:06:41 -07:06:43 -07:06:44 -07:06:49 -07:06:50 -07:07:19 -07:07:20 -07:07:21 -07:07:23 -07:07:25 -07:07:31 -07:07:33 -07:07:34 -07:07:36 -07:07:37 -07:07:38 -07:07:39 -07:07:41 -07:07:43 -07:07:46 -07:07:48 -07:07:51 -07:08:05 -07:08:06 -07:08:08 -07:08:11 -07:08:13 -07:08:14 -07:08:17 -07:08:18 -07:08:19 -07:08:23 -07:08:26 -07:08:28 -07:08:29 -07:08:32 -07:08:34 -07:08:37 -07:08:38 -07:08:40 -07:08:42 -07:08:44 -07:08:46 -07:08:48 -07:08:49 -07:08:51 -07:08:52 -07:08:54 -07:08:57 -07:08:58 -07:09:00 -07:09:04 -07:09:08 -07:09:11 -07:09:14 -07:09:15 -07:09:18 -07:09:19 -07:09:22 -07:09:24 -07:09:26 -07:09:29 -07:09:31 -07:09:33 -07:09:34 -07:09:36 -07:09:39 -07:09:44 -07:09:47 -07:09:48 -07:09:52 -07:09:54 -07:09:57 -07:10:01 -07:10:03 -07:10:05 -07:10:06 -07:10:08 -07:10:09 -07:10:12 -07:10:13 -07:10:14 -07:10:16 -07:10:18 -07:10:21 -07:10:23 -07:10:29 -07:10:30 -07:10:34 -07:10:35 -07:10:39 -07:10:41 -07:10:43 -07:10:46 -07:10:47 -07:10:49 -07:10:52 -07:10:54 -07:10:55 -07:10:56 -07:11:01 -07:11:04 -07:11:05 -07:11:07 -07:11:08 -07:11:11 -07:11:14 -07:11:18 -07:11:20 -07:11:22 -07:11:26 -07:11:28 -07:11:31 -07:11:33 -07:11:35 -07:11:37 -07:11:43 -07:11:44 -07:11:45 -07:11:47 -07:11:49 -07:11:51 -07:11:53 -07:11:56 -07:12:25 -07:12:30 -07:12:31 -07:12:33 -07:12:35 -07:12:38 -07:12:39 -07:12:46 -07:12:47 -07:12:49 -07:12:50 -07:12:52 -07:12:56 -07:12:57 -07:13:00 -07:13:02 -07:13:07 -07:13:08 -07:13:11 -07:13:13 -07:13:17 -07:13:18 -07:13:20 -07:13:21 -07:13:25 -07:13:27 -07:13:28 -07:13:30 -07:13:34 -07:13:36 -07:13:38 -07:13:40 -07:13:43 -07:13:50 -07:13:52 -07:13:54 -07:13:55 -07:13:58 -07:14:00 -07:14:03 -07:14:04 -07:14:07 -07:14:09 -07:14:11 -07:14:12 -07:14:14 -07:14:17 -07:14:20 -07:14:21 -07:14:23 -07:14:25 -07:14:27 -07:14:29 -07:14:30 -07:14:32 -07:14:35 -07:14:37 -07:14:40 -07:14:42 -07:14:44 -07:14:45 -07:14:50 -07:14:51 -07:14:53 -07:14:57 -07:15:00 -07:15:02 -07:15:04 -07:15:06 -07:15:09 -07:15:10 -07:15:12 -07:15:13 -07:15:15 -07:15:19 -07:15:23 -07:15:25 -07:15:27 -07:15:34 -07:15:36 -07:15:39 -07:15:40 -07:15:41 -07:15:43 -07:15:45 -07:15:48 -07:15:50 -07:15:51 -07:15:56 -07:15:58 -07:16:02 -07:16:04 -07:16:06 -07:16:07 -07:16:10 -07:16:12 -07:16:14 -07:16:16 -07:16:17 -07:16:21 -07:16:23 -07:16:25 -07:16:26 -07:16:31 -07:16:35 -07:16:37 -07:16:39 -07:16:41 -07:16:42 -07:16:44 -07:16:52 -07:16:54 -07:16:56 -07:16:57 -07:16:59 -07:17:01 -07:17:03 -07:17:04 -07:17:07 -07:17:10 -07:17:12 -07:17:14 -07:17:17 -07:17:19 -07:17:20 -07:17:22 -07:17:24 -07:17:26 -07:17:28 -07:17:31 -07:17:33 -07:17:36 -07:17:38 -07:17:40 -07:17:41 -07:17:44 -07:17:46 -07:17:47 -07:17:51 -07:17:57 -07:17:58 -07:18:00 -07:18:07 -07:18:09 -07:18:11 -07:18:13 -07:18:17 -07:18:20 -07:18:23 -07:18:27 -07:18:29 -07:18:31 -07:18:33 -07:18:36 -07:18:38 -07:18:40 -07:18:43 -07:18:45 -07:18:47 -07:18:49 -07:18:53 -07:18:56 -07:18:59 -07:19:02 -07:19:04 -07:19:06 -07:19:08 -07:19:10 -07:19:12 -07:19:16 -07:19:17 -07:19:20 -07:19:24 -07:19:27 -07:19:28 -07:19:33 -07:19:34 -07:19:36 -07:19:38 -07:19:41 -07:19:46 -07:19:48 -07:19:53 -07:19:55 -07:19:56 -07:19:58 -07:20:01 -07:20:03 -07:20:05 -07:20:08 -07:20:14 -07:20:18 -07:20:20 -07:20:23 -07:20:26 -07:20:28 -07:20:31 -07:20:35 -07:20:37 -07:20:39 -07:20:40 -07:20:43 -07:20:44 -07:20:47 -07:20:50 -07:20:53 -07:20:55 -07:20:57 -07:20:59 -07:21:02 -07:21:07 -07:21:08 -07:21:11 -07:21:13 -07:21:16 -07:21:19 -07:21:22 -07:21:25 -07:21:27 -07:21:29 -07:21:33 -07:21:36 -07:21:40 -07:21:45 -07:21:47 -07:21:50 -07:21:53 -07:21:54 -07:21:58 -07:22:01 -07:22:06 -07:22:07 -07:22:10 -07:22:14 -07:22:16 -07:22:19 -07:22:20 -07:22:23 -07:22:27 -07:22:28 -07:22:33 -07:22:34 -07:22:35 -07:22:37 -07:22:39 -07:22:41 -07:22:43 -07:22:44 -07:22:46 -07:22:50 -07:22:52 -07:22:55 -07:23:00 -07:23:02 -07:23:04 -07:23:06 -07:23:08 -07:23:11 -07:23:13 -07:23:16 -07:23:19 -07:23:22 -07:23:24 -07:23:25 -07:23:27 -07:23:29 -07:23:30 -07:23:32 -07:23:34 -07:23:38 -07:23:41 -07:23:43 -07:23:45 -07:23:47 -07:23:49 -07:23:51 -07:23:53 -07:23:55 -07:23:57 -07:24:00 -07:24:02 -07:24:06 -07:24:11 -07:24:16 -07:24:18 -07:24:20 -07:24:23 -07:24:25 -07:24:27 -07:24:30 -07:24:33 -07:24:35 -07:24:38 -07:24:40 -07:24:42 -07:24:44 -07:24:47 -07:24:48 -07:24:51 -07:24:53 -07:24:57 -07:24:59 -07:25:03 -07:25:05 -07:25:09 -07:25:14 -07:25:18 -07:25:22 -07:25:24 -07:25:28 -07:25:31 -07:25:34 -07:25:36 -07:25:39 -07:25:40 -07:25:43 -07:25:45 -07:25:50 -07:25:54 -07:25:58 -07:26:02 -07:26:05 -07:26:07 -07:26:09 -07:26:13 -07:26:17 -07:26:21 -07:26:23 -07:26:25 -07:26:27 -07:26:30 -07:26:32 -07:26:34 -07:26:37 -07:26:41 -07:26:43 -07:26:46 -07:26:49 -07:26:53 -07:26:56 -07:26:58 -07:27:02 -07:27:04 -07:27:07 -07:27:09 -07:27:11 -07:27:13 -07:27:16 -07:27:17 -07:27:21 -07:27:23 -07:27:26 -07:27:28 -07:27:29 -07:27:32 -07:27:34 -07:27:37 -07:27:39 -07:27:43 -07:27:46 -07:27:48 -07:27:51 -07:27:52 -07:27:53 -07:27:58 -07:28:01 -07:28:02 -07:28:04 -07:28:07 -07:28:10 -07:28:12 -07:28:15 -07:28:16 -07:28:21 -07:28:24 -07:28:26 -07:28:29 -07:28:34 -07:28:36 -07:28:39 -07:28:41 -07:28:43 -07:28:46 -07:28:49 -07:28:51 -07:28:52 -07:28:55 -07:28:57 -07:28:59 -07:29:01 -07:29:04 -07:29:08 -07:29:10 -07:29:11 -07:29:14 -07:29:16 -07:29:17 -07:29:20 -07:29:22 -07:29:25 -07:29:26 -07:29:30 -07:29:33 -07:29:35 -07:29:40 -07:29:42 -07:29:44 -07:29:45 -07:29:48 -07:29:53 -07:29:56 -07:29:59 -07:30:03 -07:30:04 -07:30:10 -07:30:12 -07:30:14 -07:30:16 -07:30:19 -07:30:26 -07:30:27 -07:30:29 -07:30:31 -07:30:33 -07:30:35 -07:30:37 -07:30:38 -07:30:40 -07:30:42 -07:30:45 -07:30:46 -07:30:49 -07:30:52 -07:30:55 -07:30:57 -07:30:58 -07:31:01 -07:31:04 -07:31:07 -07:31:09 -07:31:13 -07:31:15 -07:31:18 -07:31:22 -07:31:24 -07:31:28 -07:31:31 -07:31:40 -07:31:42 -07:31:44 -07:31:45 -07:31:46 -07:31:53 -07:31:54 -07:31:56 -07:31:57 -07:32:00 -07:32:01 -07:32:03 -07:32:06 -07:32:08 -07:32:10 -07:32:14 -07:32:18 -07:32:20 -07:32:24 -07:32:27 -07:32:35 -07:32:39 -07:32:42 -07:32:47 -07:32:51 -07:32:55 -07:32:59 -07:33:04 -07:33:08 -07:33:11 -07:33:16 -07:33:18 -07:33:22 -07:33:27 -07:33:30 -07:33:33 -07:33:41 -07:33:46 -07:33:49 -07:33:52 -07:33:55 -07:33:59 -07:34:02 -07:34:07 -07:34:09 -07:34:12 -07:34:15 -07:34:17 -07:34:22 -07:34:25 -07:34:29 -07:34:35 -07:34:38 -07:34:40 -07:34:45 -07:34:48 -07:34:50 -07:34:53 -07:35:00 -07:35:06 -07:35:09 -07:35:12 -07:35:13 -07:35:16 -07:35:18 -07:35:22 -07:35:24 -07:35:27 -07:35:29 -07:35:33 -07:35:40 -07:35:43 -07:35:47 -07:35:50 -07:35:54 -07:35:57 -07:36:00 -07:36:04 -07:36:07 -07:36:10 -07:36:14 -07:36:17 -07:36:22 -07:36:26 -07:36:28 -07:36:31 -07:36:35 -07:36:39 -07:36:42 -07:36:46 -07:36:49 -07:36:59 -07:37:03 -07:37:06 -07:37:10 -07:37:13 -07:37:14 -07:37:16 -07:37:20 -07:37:27 -07:37:32 -07:37:34 -07:37:38 -07:37:41 -07:37:44 -07:37:46 -07:37:57 -07:38:00 -07:38:10 -07:38:15 -07:38:18 -07:38:19 -07:38:21 -07:38:23 -07:38:26 -07:38:28 -07:38:31 -07:38:34 -07:38:36 -07:38:37 -07:38:39 -07:38:42 -07:38:45 -07:38:47 -07:38:50 -07:38:52 -07:38:56 -07:38:58 -07:39:00 -07:39:02 -07:39:06 -07:39:11 -07:39:14 -07:39:14 -07:39:21 -07:39:28 -07:39:30 -07:39:33 -07:39:35 -07:39:37 -07:39:38 -07:39:39 -07:39:41 -07:39:43 -07:39:48 -07:39:52 -07:39:54 -07:39:57 -07:39:58 -07:40:00 -07:40:01 -07:40:04 -07:40:09 -07:40:11 -07:40:14 -07:40:24 -07:40:35 -07:40:36 -07:41:56 -07:41:59 -07:42:03 -07:42:05 -07:42:08 -07:42:10 -07:42:11 -07:42:13 -07:42:15 -07:42:21 -07:42:23 -07:42:28 -07:42:30 -07:42:32 -07:42:35 -07:42:37 -07:42:38 -07:42:39 -07:42:44 -07:42:46 -07:42:47 -07:42:48 -07:42:50 -07:42:52 -07:42:53 -07:42:56 -07:42:59 -07:43:01 -07:43:05 -07:43:11 -07:43:12 -07:43:14 -07:43:17 -07:43:20 -07:43:25 -07:43:26 -07:43:28 -07:43:30 -07:43:34 -07:43:37 -07:43:39 -07:43:42 -07:43:45 -07:43:48 -07:43:51 -07:43:56 -07:43:57 -07:44:03 -07:44:05 -07:44:10 -07:44:14 -07:44:16 -07:44:21 -07:44:24 -07:44:47 -07:44:56 -07:45:00 -07:45:03 -07:45:08 -07:45:10 -07:45:11 -07:45:15 -07:45:18 -07:45:22 -07:45:24 -07:45:27 -07:45:30 -07:45:32 -07:45:35 -07:45:38 -07:45:41 -07:45:44 -07:45:50 -07:45:54 -07:46:02 -07:46:04 -07:46:06 -07:46:11 -07:46:14 -07:46:17 -07:46:21 -07:46:23 -07:46:28 -07:46:32 -07:46:36 -07:46:38 -07:46:40 -07:46:42 -07:46:44 -07:46:47 -07:46:51 -07:46:53 -07:46:56 -07:46:58 -07:47:02 -07:47:05 -07:47:08 -07:47:12 -07:47:22 -07:47:25 -07:47:28 -07:47:32 -07:47:34 -07:47:36 -07:47:39 -07:47:44 -07:47:47 -07:47:55 -07:47:59 -07:48:02 -07:48:06 -07:48:08 -07:48:10 -07:48:13 -07:48:21 -07:48:25 -07:48:28 -07:48:31 -07:48:33 -07:48:35 -07:48:40 -07:48:43 -07:48:48 -07:48:50 -07:48:56 -07:49:01 -07:49:05 -07:49:11 -07:49:13 -07:49:16 -07:49:19 -07:49:24 -07:49:28 -07:49:31 -07:49:34 -07:49:39 -07:49:43 -07:49:45 -07:49:50 -07:49:53 -07:49:57 -07:50:08 -07:50:10 -07:50:13 -07:50:16 -07:50:24 -07:50:28 -07:50:30 -07:50:33 -07:50:35 -07:50:38 -07:50:40 -07:50:44 -07:50:46 -07:50:48 -07:50:57 -07:51:00 -07:51:02 -07:51:04 -07:52:01 -07:52:02 -07:52:04 -07:52:05 -07:52:06 -07:52:07 -07:52:09 -07:52:57 -07:52:59 -07:53:01 -07:53:04 -07:53:05 -07:53:07 -07:53:09 -07:53:10 -07:53:17 -07:53:18 -07:53:19 -07:53:20 -07:53:23 -07:53:24 -07:53:27 -07:53:31 -07:53:35 -07:53:37 -07:53:40 -07:53:44 -07:53:46 -07:53:47 -07:53:48 -07:53:50 -07:53:54 -07:53:57 -07:53:59 -07:54:02 -07:54:09 -07:54:11 -07:54:13 -07:54:14 -07:54:18 -07:54:20 -07:54:22 -07:54:28 -07:54:31 -07:54:33 -07:54:35 -07:54:38 -07:54:42 -07:54:49 -07:54:53 -07:54:57 -07:55:03 -07:55:09 -07:55:14 -07:55:20 -07:55:25 -07:55:30 -07:55:33 -07:55:37 -07:55:42 -07:55:45 -07:55:48 -07:55:51 -07:55:55 -07:56:00 -07:56:15 -07:56:21 -07:56:23 -07:56:27 -07:56:29 -07:56:32 -07:56:37 -07:56:53 -07:56:58 -07:57:02 -07:57:06 -07:57:15 -07:57:21 -07:57:27 -07:57:34 -07:57:41 -07:57:46 -07:57:51 -07:57:57 -07:58:05 -07:58:12 -07:58:17 -07:58:21 -07:58:25 -07:58:31 -07:58:35 -07:58:42 -07:58:48 -07:58:54 -07:58:58 -07:59:03 -07:59:12 -07:59:16 -07:59:21 -07:59:26 -07:59:30 -07:59:37 -07:59:40 -07:59:43 -07:59:46 -07:59:52 -07:59:54 -07:59:57 -08:00:02 -08:00:06 -08:00:10 -08:00:14 -08:00:17 -08:00:20 -08:00:29 -08:00:33 -08:00:37 -08:00:40 -08:00:42 -08:00:47 -08:00:51 -08:00:54 -08:01:00 -08:01:03 -08:01:06 -08:01:08 -08:01:14 -08:01:18 -08:01:24 -08:01:27 -08:01:31 -08:01:33 -08:01:35 -08:01:37 -08:01:41 -08:01:48 -08:01:53 -08:01:57 -08:02:00 -08:02:03 -08:02:06 -08:02:09 -08:02:11 -08:02:14 -08:02:17 -08:02:19 -08:02:22 -08:02:27 -08:02:30 -08:02:33 -08:02:35 -08:02:40 -08:02:42 -08:02:46 -08:02:48 -08:02:52 -08:03:00 -08:03:36 -08:03:37 -08:03:46 -08:03:47 -08:03:49 -08:03:50 -08:03:51 -08:03:56 -08:03:58 -08:04:00 -08:04:02 -08:04:05 -08:04:06 -08:04:08 -08:04:10 -08:04:12 -08:04:17 -08:04:34 -08:04:37 -08:04:40 -08:04:41 -08:04:47 -08:04:48 -08:04:50 -08:04:56 -08:04:59 -08:05:02 -08:05:03 -08:05:05 -08:05:06 -08:05:09 -08:05:12 -08:05:13 -08:05:15 -08:05:17 -08:05:21 -08:05:23 -08:05:24 -08:05:26 -08:05:34 -08:05:36 -08:05:38 -08:05:39 -08:05:44 -08:05:46 -08:05:48 -08:05:49 -08:05:50 -08:05:52 -08:05:53 -08:05:56 -08:05:57 -08:06:00 -08:06:02 -08:06:03 -08:06:05 -08:06:07 -08:06:12 -08:06:13 -08:06:15 -08:06:17 -08:06:21 -08:06:23 -08:06:26 -08:06:29 -08:06:33 -08:06:36 -08:06:40 -08:06:46 -08:06:51 -08:06:55 -08:06:58 -08:07:01 -08:07:07 -08:07:10 -08:07:13 -08:07:17 -08:07:21 -08:07:25 -08:07:30 -08:07:33 -08:07:36 -08:07:40 -08:07:47 -08:07:50 -08:07:52 -08:08:01 -08:08:19 -08:08:23 -08:08:25 -08:08:38 -08:08:39 -08:08:41 -08:08:41 -08:08:45 -08:08:47 -08:08:50 -08:08:52 -08:08:55 -08:09:00 -08:09:08 -08:09:18 -08:10:07 -08:10:09 -08:10:11 -08:10:14 -08:10:15 -08:10:18 -08:10:19 -08:10:21 -08:10:23 -08:10:24 -08:10:31 -08:10:33 -08:10:34 -08:10:35 -08:10:37 -08:10:39 -08:10:41 -08:10:44 -08:10:45 -08:10:47 -08:11:14 -08:11:16 -08:11:17 -08:11:19 -08:11:22 -08:11:24 -08:11:28 -08:11:30 -08:11:31 -08:11:32 -08:11:37 -08:11:38 -08:11:42 -08:11:51 -08:11:53 -08:11:54 -08:11:55 -08:11:59 -08:12:06 -08:12:13 -08:12:14 -08:12:16 -08:12:16 -08:12:17 -08:12:19 -08:12:40 -08:12:46 -08:12:48 -08:12:48 -08:12:49 -08:12:51 -08:13:40 -08:13:42 -08:13:46 -08:13:47 -08:13:57 -08:13:58 -08:14:02 -08:14:03 -08:14:06 -08:14:07 -08:14:11 -08:14:12 -08:14:14 -08:14:16 -08:14:19 -08:14:20 -08:14:24 -08:14:26 -08:14:28 -08:14:30 -08:14:32 -08:14:34 -08:14:41 -08:14:42 -08:15:24 -08:15:36 -08:15:40 -08:15:43 -08:15:46 -08:15:50 -08:15:52 -08:16:10 -08:16:11 -08:16:13 -08:16:14 -08:16:17 -08:16:21 -08:16:23 -08:16:26 -08:16:28 -08:16:31 -08:16:34 -08:16:36 -08:16:37 -08:16:38 -08:16:48 -08:16:49 -08:16:50 -08:16:52 -08:16:56 -08:16:59 -08:17:02 -08:17:03 -08:17:16 -08:17:19 -08:17:23 -08:17:24 -08:17:27 -08:17:36 -08:17:38 -08:17:40 -08:17:42 -08:17:59 -08:18:01 -08:18:07 -08:18:09 -08:18:12 -08:18:14 -08:18:15 -08:18:17 -08:18:22 -08:18:23 -08:18:24 -08:18:26 -08:19:01 -08:19:03 -08:19:06 -08:19:07 -08:19:09 -08:19:37 -08:19:38 -08:19:40 -08:19:41 -08:19:43 -08:19:46 -08:20:06 -08:20:22 -08:20:23 -08:20:25 -08:20:26 -08:20:33 -08:20:35 -08:20:37 -08:20:39 -08:20:40 -08:20:42 -08:20:50 -08:20:55 -08:20:58 -08:21:01 -08:21:05 -08:21:07 -08:21:11 -08:21:12 -08:21:16 -08:21:34 -08:21:35 -08:21:37 -08:21:38 -08:21:39 -08:21:41 -08:21:43 -08:21:46 -08:21:51 -08:21:54 -08:21:55 -08:21:57 -08:22:00 -08:22:03 -08:22:05 -08:22:06 -08:22:08 -08:22:10 -08:22:12 -08:22:15 -08:22:17 -08:22:18 -08:22:19 -08:22:21 -08:22:22 -08:22:26 -08:22:28 -08:22:30 -08:22:31 -08:22:33 -08:22:34 -08:22:36 -08:22:37 -08:22:43 -08:22:44 -08:23:03 -08:23:57 -08:23:59 -08:24:02 -08:24:05 -08:24:07 -08:24:09 -08:24:10 -08:24:11 -08:24:13 -08:24:14 -08:24:19 -08:24:20 -08:24:21 -08:24:23 -08:24:26 -08:24:31 -08:24:33 -08:24:35 -08:24:39 -08:24:41 -08:24:45 -08:24:47 -08:24:49 -08:24:53 -08:24:56 -08:24:58 -08:24:59 -08:25:01 -08:25:05 -08:25:06 -08:25:08 -08:25:08 -08:25:10 -08:25:11 -08:25:22 -08:25:24 -08:25:25 -08:25:26 -08:25:29 -08:25:30 -08:25:31 -08:25:48 -08:26:18 -08:26:19 -08:26:25 -08:26:26 -08:26:29 -08:26:30 -08:26:33 -08:26:35 -08:27:03 -08:27:04 -08:27:06 -08:27:08 -08:27:09 -08:27:15 -08:27:21 -08:27:23 -08:27:33 -08:27:34 -08:27:46 -08:27:48 -08:27:49 -08:27:51 -08:27:52 -08:27:53 -08:27:55 -08:27:57 -08:27:58 -08:28:01 -08:28:03 -08:28:04 -08:28:49 -08:28:54 -08:28:55 -08:28:57 -08:29:00 -08:29:04 -08:29:05 -08:29:08 -08:29:13 -08:29:14 -08:29:15 -08:29:17 -08:29:20 -08:29:22 -08:29:23 -08:29:26 -08:29:28 -08:29:29 -08:29:30 -08:29:32 -08:29:33 -08:29:34 -08:29:37 -08:29:38 -08:29:39 -08:30:11 -08:30:12 -08:30:14 -08:30:17 -08:30:19 -08:30:42 -08:30:44 -08:30:47 -08:30:49 -08:30:50 -08:30:54 -08:30:56 -08:30:57 -08:30:58 -08:30:59 -08:31:18 -08:31:19 -08:31:23 -08:31:24 -08:31:31 -08:31:34 -08:31:35 -08:31:37 -08:31:39 -08:31:41 -08:31:42 -08:31:44 -08:31:45 -08:31:48 -08:31:49 -08:31:51 -08:32:02 -08:32:10 -08:32:13 -08:32:15 -08:32:16 -08:32:17 -08:32:19 -08:32:22 -08:32:23 -08:32:27 -08:32:29 -08:32:44 -08:32:45 -08:32:49 -08:32:50 -08:32:51 -08:32:57 -08:32:58 -08:33:01 -08:33:03 -08:33:06 -08:33:11 -08:33:13 -08:33:17 -08:33:19 -08:33:26 -08:33:31 -08:33:33 -08:33:35 -08:34:33 -08:34:35 -08:34:39 -08:34:41 -08:34:48 -08:34:51 -08:34:53 -08:34:55 -08:34:57 -08:35:01 -08:35:03 -08:35:04 -08:35:07 -08:35:07 -08:35:10 -08:35:12 -08:35:13 -08:35:15 -08:35:19 -08:35:21 -08:35:23 -08:35:26 -08:35:30 -08:35:31 -08:35:32 -08:35:35 -08:35:36 -08:35:39 -08:35:41 -08:35:43 -08:35:45 -08:35:48 -08:35:51 -08:35:53 -08:35:55 -08:35:56 -08:36:00 -08:36:01 -08:36:03 -08:36:04 -08:36:05 -08:36:07 -08:36:09 -08:36:12 -08:36:14 -08:36:15 -08:36:16 -08:36:49 -08:36:52 -08:36:54 -08:36:55 -08:36:56 -08:36:59 -08:37:01 -08:37:04 -08:37:15 -08:37:17 -08:37:19 -08:37:20 -08:37:22 -08:37:27 -08:37:29 -08:37:33 -08:37:41 -08:37:42 -08:37:44 -08:37:46 -08:37:48 -08:37:49 -08:37:51 -08:38:11 -08:38:12 -08:38:16 -08:38:20 -08:38:21 -08:38:22 -08:38:23 -08:38:26 -08:38:28 -08:38:30 -08:38:31 -08:38:33 -08:38:34 -08:38:36 -08:38:38 -08:38:41 -08:38:43 -08:38:44 -08:39:12 -08:39:17 -08:39:19 -08:39:22 -08:39:25 -08:39:29 -08:39:33 -08:39:36 -08:39:42 -08:39:44 -08:39:46 -08:39:48 -08:39:50 -08:39:51 -08:39:53 -08:39:54 -08:39:55 -08:39:56 -08:40:03 -08:40:05 -08:40:09 -08:40:10 -08:40:18 -08:40:19 -08:40:20 -08:40:22 -08:40:25 -08:40:26 -08:40:27 -08:40:30 -08:40:31 -08:40:37 -08:40:43 -08:40:45 -08:40:47 -08:40:50 -08:40:53 -08:40:55 -08:40:58 -08:41:04 -08:41:08 -08:41:34 -08:41:35 -08:41:37 -08:41:39 -08:41:41 -08:41:42 -08:41:43 -08:42:18 -08:42:19 -08:42:21 -08:42:27 -08:42:42 -08:42:44 -08:42:45 -08:42:46 -08:42:48 -08:42:49 -08:42:51 -08:42:52 -08:42:55 -08:42:58 -08:43:00 -08:43:01 -08:43:06 -08:43:07 -08:43:09 -08:43:10 -08:43:11 -08:43:14 -08:43:16 -08:43:18 -08:43:43 -08:43:44 -08:43:46 -08:43:52 -08:43:55 -08:43:58 -08:44:09 -08:44:12 -08:44:14 -08:44:16 -08:44:18 -08:44:37 -08:44:41 -08:44:43 -08:44:46 -08:44:50 -08:44:52 -08:44:54 -08:44:57 -08:45:08 -08:45:11 -08:45:22 -08:45:23 -08:45:25 -08:45:33 -08:45:39 -08:46:03 -08:46:05 -08:46:20 -08:46:22 -08:46:23 -08:46:28 -08:46:30 -08:46:32 -08:46:34 -08:46:37 -08:46:38 -08:46:42 -08:46:44 -08:46:47 -08:46:49 -08:46:51 -08:46:52 -08:46:54 -08:46:58 -08:47:00 -08:47:07 -08:47:10 -08:47:12 -08:47:20 -08:47:25 -08:48:08 -08:48:10 -08:48:12 -08:48:15 -08:48:22 -08:48:22 -08:48:25 -08:48:27 -08:48:29 -08:48:30 -08:48:31 -08:48:33 -08:49:36 -08:49:38 -08:49:40 -08:49:43 -08:49:44 -08:49:46 -08:49:48 -08:49:55 -08:49:57 -08:49:59 -08:50:01 -08:50:03 -08:50:06 -08:50:10 -08:50:11 -08:50:13 -08:50:14 -08:50:23 -08:50:24 -08:50:25 -08:50:29 -08:50:30 -08:50:33 -08:50:35 -08:50:43 -08:50:45 -08:50:49 -08:51:24 -08:51:25 -08:51:36 -08:51:37 -08:51:39 -08:51:41 -08:51:46 -08:51:47 -08:51:49 -08:51:51 -08:51:54 -08:51:55 -08:51:57 -08:51:59 -08:52:01 -08:52:02 -08:52:05 -08:52:15 -08:52:17 -08:52:19 -08:52:32 -08:52:34 -08:53:31 -08:53:34 -08:53:37 -08:53:39 -08:53:41 -08:53:42 -08:53:43 -08:53:49 -08:53:50 -08:53:53 -08:53:56 -08:53:59 -08:54:01 -08:54:32 -08:54:33 -08:54:40 -08:54:42 -08:54:45 -08:54:47 -08:54:49 -08:54:52 -08:54:55 -08:54:56 -08:54:58 -08:54:59 -08:55:01 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_3.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_3.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_3.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_3.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2293 +0,0 @@ -06:47:18 -06:47:19 -06:47:21 -06:47:23 -06:47:26 -06:47:27 -06:47:30 -06:47:36 -06:47:38 -06:47:40 -06:47:41 -06:47:44 -06:47:47 -06:47:48 -06:47:50 -06:47:55 -06:47:58 -06:47:59 -06:48:01 -06:48:04 -06:48:05 -06:48:06 -06:48:08 -06:48:09 -06:48:11 -06:48:13 -06:48:15 -06:48:17 -06:48:19 -06:48:20 -06:48:22 -06:48:23 -06:48:24 -06:48:25 -06:48:28 -06:48:31 -06:48:34 -06:48:36 -06:48:43 -06:48:50 -06:48:52 -06:48:53 -06:48:56 -06:48:58 -06:48:59 -06:49:03 -06:49:05 -06:49:06 -06:49:06 -06:49:09 -06:49:10 -06:49:12 -06:49:13 -06:49:15 -06:49:16 -06:49:18 -06:49:26 -06:49:26 -06:49:27 -06:49:28 -06:49:29 -06:49:30 -06:49:32 -06:49:35 -06:49:36 -06:49:41 -06:49:44 -06:49:46 -06:49:47 -06:49:48 -06:49:53 -06:50:00 -06:50:04 -06:50:05 -06:50:06 -06:50:09 -06:50:13 -06:50:14 -06:50:16 -06:50:17 -06:50:18 -06:50:20 -06:50:21 -06:50:22 -06:50:24 -06:50:26 -06:50:27 -06:50:28 -06:50:29 -06:50:31 -06:50:33 -06:50:38 -06:50:39 -06:50:40 -06:50:42 -06:50:45 -06:51:48 -06:51:49 -06:51:53 -06:51:56 -06:51:58 -06:52:01 -06:52:05 -06:52:08 -06:52:09 -06:52:10 -06:52:20 -06:52:21 -06:52:23 -06:52:24 -06:52:28 -06:52:30 -06:52:34 -06:52:35 -06:52:36 -06:52:40 -06:52:41 -06:52:44 -06:52:44 -06:52:46 -06:52:49 -06:52:54 -06:52:57 -06:52:58 -06:53:02 -06:53:04 -06:53:07 -06:53:09 -06:53:10 -06:53:12 -06:53:13 -06:53:24 -06:53:25 -06:53:28 -06:53:30 -06:53:34 -06:53:35 -06:53:38 -06:53:39 -06:53:41 -06:53:45 -06:53:47 -06:53:49 -06:53:51 -06:53:52 -06:53:55 -06:53:57 -06:53:59 -06:54:00 -06:54:01 -06:54:02 -06:54:03 -06:54:06 -06:54:08 -06:54:12 -06:54:13 -06:54:14 -06:54:15 -06:54:17 -06:54:20 -06:54:22 -06:54:26 -06:54:27 -06:54:38 -06:54:40 -06:54:42 -06:54:44 -06:54:46 -06:54:48 -06:54:49 -06:54:52 -06:54:54 -06:54:57 -06:54:59 -06:55:01 -06:55:04 -06:55:05 -06:55:07 -06:55:11 -06:55:13 -06:55:14 -06:55:15 -06:55:18 -06:55:22 -06:55:25 -06:55:27 -06:55:28 -06:55:30 -06:55:31 -06:55:34 -06:55:37 -06:55:38 -06:55:40 -06:55:42 -06:55:43 -06:55:45 -06:55:48 -06:55:49 -06:55:57 -06:55:58 -06:55:59 -06:56:00 -06:56:04 -06:56:05 -06:56:06 -06:56:11 -06:56:14 -06:56:17 -06:56:21 -06:56:22 -06:56:24 -06:56:25 -06:56:26 -06:56:29 -06:56:32 -06:56:34 -06:56:35 -06:56:36 -06:56:37 -06:56:39 -06:56:40 -06:56:41 -06:56:47 -06:56:49 -06:56:53 -06:56:55 -06:56:57 -06:56:59 -06:57:02 -06:57:03 -06:57:13 -06:57:15 -06:57:17 -06:57:19 -06:57:19 -06:57:20 -06:57:23 -06:57:25 -06:57:26 -06:57:29 -06:57:33 -06:57:36 -06:57:39 -06:57:41 -06:57:42 -06:57:44 -06:58:07 -06:58:08 -06:58:09 -06:58:11 -06:58:13 -06:58:17 -06:58:20 -06:58:21 -06:58:24 -06:58:26 -06:58:28 -06:58:29 -06:58:31 -06:58:33 -06:58:34 -06:58:37 -06:58:41 -06:58:43 -06:58:46 -06:58:47 -06:58:48 -06:58:50 -06:58:51 -06:58:54 -06:58:56 -06:58:58 -06:59:00 -06:59:04 -06:59:06 -06:59:07 -06:59:09 -06:59:10 -06:59:14 -06:59:14 -06:59:16 -06:59:24 -06:59:26 -06:59:28 -06:59:29 -06:59:30 -06:59:31 -06:59:32 -06:59:34 -06:59:36 -06:59:37 -06:59:40 -06:59:41 -06:59:42 -06:59:44 -06:59:46 -06:59:47 -06:59:48 -06:59:49 -06:59:51 -06:59:54 -06:59:58 -07:00:01 -07:00:03 -07:00:04 -07:00:05 -07:00:09 -07:00:11 -07:00:13 -07:00:16 -07:00:19 -07:00:20 -07:00:21 -07:00:24 -07:00:26 -07:00:27 -07:00:30 -07:00:33 -07:00:36 -07:00:40 -07:00:42 -07:00:43 -07:00:45 -07:00:49 -07:00:53 -07:00:55 -07:00:56 -07:00:58 -07:01:00 -07:01:03 -07:01:05 -07:01:07 -07:01:08 -07:01:10 -07:01:12 -07:01:15 -07:01:16 -07:01:18 -07:01:21 -07:01:22 -07:01:28 -07:01:32 -07:01:33 -07:01:35 -07:01:38 -07:01:42 -07:01:43 -07:01:45 -07:01:46 -07:01:53 -07:01:57 -07:01:59 -07:02:00 -07:02:00 -07:02:02 -07:02:05 -07:02:08 -07:02:13 -07:02:15 -07:02:16 -07:02:19 -07:02:20 -07:02:22 -07:02:23 -07:02:25 -07:02:27 -07:02:28 -07:02:30 -07:02:33 -07:02:35 -07:02:36 -07:02:37 -07:02:39 -07:02:40 -07:02:44 -07:02:46 -07:02:48 -07:02:49 -07:02:51 -07:02:56 -07:02:57 -07:02:59 -07:03:04 -07:03:07 -07:03:09 -07:03:10 -07:03:11 -07:03:11 -07:03:12 -07:03:16 -07:03:18 -07:03:26 -07:03:28 -07:03:29 -07:03:31 -07:03:33 -07:03:36 -07:03:37 -07:03:39 -07:03:41 -07:03:42 -07:03:46 -07:03:52 -07:03:54 -07:03:55 -07:03:58 -07:04:01 -07:04:04 -07:04:06 -07:04:08 -07:04:08 -07:04:09 -07:04:11 -07:04:13 -07:04:14 -07:04:17 -07:04:19 -07:04:21 -07:04:22 -07:04:23 -07:04:26 -07:04:28 -07:04:29 -07:04:31 -07:04:34 -07:04:36 -07:04:38 -07:04:39 -07:04:43 -07:04:46 -07:04:47 -07:04:48 -07:04:48 -07:04:50 -07:04:52 -07:04:53 -07:04:56 -07:04:57 -07:05:00 -07:05:02 -07:05:03 -07:05:06 -07:05:08 -07:05:11 -07:05:13 -07:05:15 -07:05:18 -07:05:20 -07:05:24 -07:05:25 -07:05:27 -07:05:28 -07:05:29 -07:05:30 -07:05:33 -07:05:34 -07:05:36 -07:05:38 -07:05:39 -07:05:40 -07:05:44 -07:05:45 -07:05:48 -07:05:50 -07:05:53 -07:05:55 -07:05:57 -07:05:58 -07:06:03 -07:06:05 -07:06:07 -07:06:10 -07:06:11 -07:06:14 -07:06:16 -07:06:17 -07:06:19 -07:06:19 -07:06:19 -07:06:22 -07:06:24 -07:06:25 -07:06:26 -07:06:30 -07:06:31 -07:06:31 -07:06:39 -07:06:39 -07:06:43 -07:06:45 -07:06:47 -07:06:49 -07:06:54 -07:06:57 -07:07:00 -07:07:02 -07:07:04 -07:07:06 -07:07:09 -07:07:12 -07:07:14 -07:07:17 -07:07:18 -07:07:21 -07:07:23 -07:07:54 -07:07:55 -07:07:57 -07:07:59 -07:08:01 -07:08:06 -07:08:08 -07:08:09 -07:08:10 -07:08:12 -07:08:13 -07:08:13 -07:08:15 -07:08:16 -07:08:20 -07:08:22 -07:08:26 -07:08:26 -07:08:38 -07:08:39 -07:08:41 -07:08:44 -07:08:47 -07:08:48 -07:08:51 -07:08:52 -07:08:53 -07:08:57 -07:09:02 -07:09:04 -07:09:05 -07:09:07 -07:09:09 -07:09:11 -07:09:13 -07:09:14 -07:09:16 -07:09:20 -07:09:21 -07:09:23 -07:09:25 -07:09:26 -07:09:27 -07:09:30 -07:09:33 -07:09:34 -07:09:39 -07:09:44 -07:09:45 -07:09:48 -07:09:49 -07:09:52 -07:09:55 -07:09:57 -07:09:58 -07:10:00 -07:10:06 -07:10:08 -07:10:09 -07:10:10 -07:10:12 -07:10:12 -07:10:16 -07:10:19 -07:10:23 -07:10:24 -07:10:28 -07:10:29 -07:10:33 -07:10:38 -07:10:39 -07:10:41 -07:10:41 -07:10:44 -07:10:48 -07:10:50 -07:10:51 -07:10:54 -07:10:56 -07:10:59 -07:11:00 -07:11:05 -07:11:06 -07:11:10 -07:11:11 -07:11:14 -07:11:15 -07:11:17 -07:11:20 -07:11:20 -07:11:22 -07:11:26 -07:11:29 -07:11:31 -07:11:32 -07:11:37 -07:11:42 -07:11:44 -07:11:46 -07:11:49 -07:11:51 -07:11:52 -07:11:54 -07:11:59 -07:12:01 -07:12:07 -07:12:07 -07:12:09 -07:12:11 -07:12:12 -07:12:20 -07:12:21 -07:12:22 -07:12:24 -07:12:25 -07:12:27 -07:12:29 -07:12:32 -07:13:07 -07:13:09 -07:13:11 -07:13:13 -07:13:15 -07:13:17 -07:13:18 -07:13:24 -07:13:25 -07:13:28 -07:13:29 -07:13:31 -07:13:34 -07:13:35 -07:13:38 -07:13:39 -07:13:43 -07:13:44 -07:13:47 -07:13:50 -07:13:54 -07:13:55 -07:13:58 -07:13:59 -07:14:02 -07:14:05 -07:14:06 -07:14:07 -07:14:12 -07:14:16 -07:14:23 -07:14:27 -07:14:28 -07:14:28 -07:14:30 -07:14:32 -07:14:35 -07:14:37 -07:14:40 -07:14:42 -07:14:44 -07:14:46 -07:14:47 -07:14:50 -07:14:53 -07:14:56 -07:15:00 -07:15:03 -07:15:05 -07:15:07 -07:15:08 -07:15:11 -07:15:14 -07:15:16 -07:15:18 -07:15:21 -07:15:22 -07:15:24 -07:15:24 -07:15:24 -07:15:26 -07:15:29 -07:15:32 -07:15:33 -07:15:37 -07:15:39 -07:15:41 -07:15:44 -07:15:47 -07:15:49 -07:15:50 -07:15:52 -07:15:53 -07:15:54 -07:15:56 -07:16:02 -07:16:04 -07:16:05 -07:16:05 -07:16:11 -07:16:13 -07:16:15 -07:16:17 -07:16:18 -07:16:21 -07:16:24 -07:16:25 -07:16:26 -07:16:33 -07:16:34 -07:16:40 -07:16:41 -07:16:43 -07:16:44 -07:16:48 -07:16:50 -07:16:51 -07:16:54 -07:16:55 -07:17:00 -07:17:03 -07:17:05 -07:17:07 -07:17:11 -07:17:15 -07:17:17 -07:17:19 -07:17:21 -07:17:21 -07:17:25 -07:17:34 -07:17:36 -07:17:37 -07:17:38 -07:17:41 -07:17:42 -07:17:44 -07:17:45 -07:17:49 -07:17:52 -07:17:54 -07:17:57 -07:18:01 -07:18:05 -07:18:05 -07:18:07 -07:18:08 -07:18:09 -07:18:11 -07:18:14 -07:18:16 -07:18:18 -07:18:22 -07:18:23 -07:18:25 -07:18:26 -07:18:28 -07:18:29 -07:18:31 -07:18:34 -07:18:36 -07:18:39 -07:18:41 -07:18:43 -07:18:49 -07:18:51 -07:18:53 -07:18:58 -07:19:06 -07:19:10 -07:19:12 -07:19:14 -07:19:15 -07:19:17 -07:19:20 -07:19:22 -07:19:24 -07:19:27 -07:19:30 -07:19:32 -07:19:35 -07:19:39 -07:19:41 -07:19:45 -07:19:47 -07:19:48 -07:19:50 -07:19:52 -07:19:54 -07:19:55 -07:19:56 -07:20:00 -07:20:01 -07:20:10 -07:20:12 -07:20:18 -07:20:18 -07:20:19 -07:20:20 -07:20:21 -07:20:24 -07:20:28 -07:20:30 -07:20:36 -07:20:38 -07:20:40 -07:20:41 -07:20:44 -07:20:46 -07:20:49 -07:20:51 -07:21:01 -07:21:03 -07:21:05 -07:21:07 -07:21:10 -07:21:14 -07:21:17 -07:21:19 -07:21:20 -07:21:22 -07:21:23 -07:21:26 -07:21:27 -07:21:31 -07:21:37 -07:21:38 -07:21:39 -07:21:42 -07:21:45 -07:21:46 -07:21:48 -07:21:53 -07:21:56 -07:21:59 -07:22:01 -07:22:03 -07:22:05 -07:22:09 -07:22:13 -07:22:19 -07:22:25 -07:22:26 -07:22:29 -07:22:30 -07:22:31 -07:22:35 -07:22:38 -07:22:38 -07:22:46 -07:22:47 -07:22:48 -07:22:52 -07:22:54 -07:22:56 -07:22:57 -07:22:59 -07:23:05 -07:23:07 -07:23:15 -07:23:16 -07:23:18 -07:23:19 -07:23:20 -07:23:25 -07:23:26 -07:23:28 -07:23:29 -07:23:32 -07:23:33 -07:23:37 -07:23:42 -07:23:43 -07:23:44 -07:23:46 -07:23:48 -07:23:50 -07:23:51 -07:23:55 -07:23:57 -07:24:02 -07:24:03 -07:24:04 -07:24:06 -07:24:08 -07:24:09 -07:24:14 -07:24:18 -07:24:23 -07:24:25 -07:24:26 -07:24:29 -07:24:32 -07:24:33 -07:24:36 -07:24:39 -07:24:41 -07:24:43 -07:24:47 -07:24:51 -07:24:51 -07:24:58 -07:25:05 -07:25:06 -07:25:08 -07:25:11 -07:25:13 -07:25:14 -07:25:18 -07:25:20 -07:25:22 -07:25:25 -07:25:27 -07:25:29 -07:25:31 -07:25:34 -07:25:36 -07:25:37 -07:25:39 -07:25:41 -07:25:42 -07:25:48 -07:25:52 -07:25:56 -07:26:00 -07:26:05 -07:26:07 -07:26:09 -07:26:11 -07:26:14 -07:26:17 -07:26:21 -07:26:23 -07:26:27 -07:26:28 -07:26:32 -07:26:35 -07:26:40 -07:26:45 -07:26:46 -07:26:47 -07:26:50 -07:26:53 -07:26:55 -07:27:00 -07:27:03 -07:27:05 -07:27:07 -07:27:10 -07:27:13 -07:27:15 -07:27:22 -07:27:22 -07:27:23 -07:27:25 -07:27:31 -07:27:39 -07:27:41 -07:27:42 -07:27:46 -07:27:48 -07:27:50 -07:27:52 -07:27:57 -07:27:59 -07:28:02 -07:28:05 -07:28:07 -07:28:11 -07:28:13 -07:28:18 -07:28:21 -07:28:24 -07:28:27 -07:28:31 -07:28:34 -07:28:38 -07:28:40 -07:28:43 -07:28:45 -07:28:48 -07:28:50 -07:28:54 -07:28:56 -07:28:58 -07:29:02 -07:29:04 -07:29:06 -07:29:09 -07:29:12 -07:29:16 -07:29:20 -07:29:23 -07:29:27 -07:29:32 -07:29:36 -07:29:39 -07:29:42 -07:29:45 -07:29:49 -07:29:52 -07:29:55 -07:29:59 -07:30:01 -07:30:01 -07:30:04 -07:30:06 -07:30:09 -07:30:12 -07:30:18 -07:30:26 -07:30:32 -07:30:36 -07:30:38 -07:30:40 -07:30:44 -07:30:47 -07:30:52 -07:30:56 -07:30:59 -07:31:03 -07:31:06 -07:31:09 -07:31:14 -07:31:17 -07:31:19 -07:31:22 -07:31:26 -07:31:37 -07:31:38 -07:31:48 -07:31:52 -07:31:54 -07:31:57 -07:32:01 -07:32:05 -07:32:08 -07:32:11 -07:32:15 -07:32:18 -07:32:21 -07:32:23 -07:32:25 -07:32:28 -07:32:32 -07:32:35 -07:32:37 -07:32:40 -07:32:42 -07:32:45 -07:32:47 -07:32:58 -07:33:04 -07:33:06 -07:33:09 -07:33:12 -07:33:12 -07:33:15 -07:33:18 -07:33:22 -07:33:26 -07:33:29 -07:33:31 -07:33:36 -07:33:39 -07:33:43 -07:33:47 -07:33:56 -07:33:59 -07:34:01 -07:34:06 -07:34:09 -07:34:12 -07:34:17 -07:34:20 -07:34:24 -07:34:28 -07:34:30 -07:34:33 -07:34:36 -07:34:38 -07:34:42 -07:34:46 -07:34:49 -07:34:53 -07:34:57 -07:35:01 -07:35:04 -07:35:07 -07:35:09 -07:35:13 -07:35:20 -07:35:23 -07:35:26 -07:35:29 -07:35:31 -07:35:36 -07:35:40 -07:35:43 -07:35:46 -07:35:50 -07:35:53 -07:35:56 -07:36:02 -07:36:05 -07:36:07 -07:36:10 -07:36:12 -07:36:14 -07:36:14 -07:36:17 -07:36:19 -07:36:22 -07:36:24 -07:36:26 -07:36:30 -07:36:36 -07:36:42 -07:36:45 -07:36:48 -07:36:50 -07:36:54 -07:36:57 -07:37:00 -07:37:03 -07:37:08 -07:37:11 -07:37:15 -07:37:18 -07:37:21 -07:37:23 -07:37:28 -07:37:30 -07:37:33 -07:37:37 -07:37:40 -07:37:42 -07:37:52 -07:37:56 -07:37:57 -07:38:00 -07:38:05 -07:38:09 -07:38:12 -07:38:16 -07:38:19 -07:38:22 -07:38:25 -07:38:29 -07:38:33 -07:38:38 -07:38:41 -07:38:43 -07:38:44 -07:38:53 -07:38:56 -07:39:01 -07:39:04 -07:39:07 -07:39:11 -07:39:14 -07:39:18 -07:39:21 -07:39:25 -07:39:29 -07:39:33 -07:39:37 -07:39:40 -07:39:43 -07:39:55 -07:39:59 -07:40:04 -07:40:15 -07:40:21 -07:40:25 -07:40:32 -07:40:36 -07:40:39 -07:40:43 -07:40:48 -07:40:52 -07:40:58 -07:41:02 -07:41:11 -07:41:14 -07:41:18 -07:41:21 -07:41:26 -07:41:30 -07:41:34 -07:41:37 -07:41:40 -07:41:45 -07:41:48 -07:41:52 -07:41:55 -07:41:58 -07:42:03 -07:42:06 -07:42:10 -07:42:17 -07:42:21 -07:42:24 -07:42:29 -07:42:33 -07:42:37 -07:42:40 -07:42:45 -07:42:47 -07:42:51 -07:42:54 -07:42:57 -07:43:01 -07:43:03 -07:43:06 -07:43:09 -07:43:10 -07:43:15 -07:43:17 -07:43:22 -07:43:28 -07:43:32 -07:43:36 -07:43:43 -07:43:52 -07:43:54 -07:43:57 -07:44:00 -07:44:06 -07:44:09 -07:44:13 -07:44:17 -07:44:20 -07:44:22 -07:44:26 -07:44:28 -07:44:32 -07:44:35 -07:44:37 -07:44:39 -07:44:49 -07:44:52 -07:44:56 -07:45:00 -07:45:04 -07:45:08 -07:45:12 -07:45:14 -07:45:16 -07:45:19 -07:45:24 -07:45:29 -07:45:33 -07:45:40 -07:45:42 -07:45:47 -07:45:51 -07:45:56 -07:45:58 -07:46:06 -07:46:08 -07:46:11 -07:46:15 -07:46:17 -07:46:21 -07:46:26 -07:46:29 -07:46:32 -07:46:34 -07:46:36 -07:46:39 -07:46:43 -07:46:46 -07:46:50 -07:46:54 -07:46:58 -07:47:01 -07:47:07 -07:47:13 -07:47:14 -07:47:19 -07:47:23 -07:47:25 -07:47:30 -07:47:32 -07:47:37 -07:47:42 -07:47:47 -07:47:51 -07:47:55 -07:47:59 -07:48:02 -07:48:04 -07:48:07 -07:48:12 -07:48:16 -07:48:22 -07:48:24 -07:48:27 -07:48:31 -07:48:34 -07:48:39 -07:48:44 -07:48:47 -07:48:52 -07:48:58 -07:49:02 -07:49:03 -07:49:07 -07:49:10 -07:49:13 -07:49:16 -07:49:19 -07:49:23 -07:49:26 -07:49:30 -07:49:34 -07:49:36 -07:49:41 -07:49:44 -07:49:50 -07:49:52 -07:49:58 -07:50:00 -07:50:03 -07:50:07 -07:50:11 -07:50:14 -07:50:18 -07:50:24 -07:50:29 -07:50:35 -07:50:40 -07:50:54 -07:50:57 -07:51:03 -07:51:09 -07:51:16 -07:51:21 -07:51:25 -07:51:29 -07:51:33 -07:51:36 -07:51:41 -07:51:59 -07:52:04 -07:52:07 -07:52:11 -07:52:16 -07:52:23 -07:52:23 -07:52:31 -07:52:35 -07:52:39 -07:52:44 -07:52:48 -07:52:52 -07:52:55 -07:53:11 -07:53:16 -07:53:27 -07:53:31 -07:53:34 -07:53:39 -07:53:42 -07:53:48 -07:53:58 -07:54:07 -07:54:11 -07:54:16 -07:54:21 -07:54:24 -07:54:28 -07:54:32 -07:54:35 -07:54:39 -07:54:44 -07:54:47 -07:54:52 -07:54:54 -07:55:04 -07:55:13 -07:55:26 -07:55:31 -07:55:37 -07:55:46 -07:55:50 -07:55:53 -07:55:56 -07:55:59 -07:56:04 -07:56:14 -07:56:21 -07:56:26 -07:56:30 -07:56:34 -07:56:36 -07:56:40 -07:56:44 -07:56:47 -07:56:51 -07:56:54 -07:56:57 -07:57:00 -07:57:03 -07:57:09 -07:57:13 -07:57:17 -07:57:20 -07:57:24 -07:57:28 -07:57:32 -07:57:36 -07:57:40 -07:57:46 -07:57:51 -07:57:56 -07:58:00 -07:58:02 -07:58:06 -07:58:08 -07:58:10 -07:58:13 -07:58:17 -07:58:26 -07:58:33 -07:58:37 -07:58:40 -07:58:43 -07:58:45 -07:58:48 -07:58:51 -07:58:53 -07:58:56 -07:59:00 -07:59:03 -07:59:07 -07:59:11 -07:59:16 -07:59:19 -07:59:21 -07:59:23 -07:59:27 -07:59:30 -07:59:31 -07:59:34 -07:59:36 -07:59:40 -07:59:45 -07:59:50 -07:59:52 -07:59:57 -08:00:01 -08:00:04 -08:00:06 -08:00:09 -08:00:15 -08:00:19 -08:00:22 -08:00:24 -08:00:26 -08:00:30 -08:00:32 -08:00:35 -08:00:38 -08:00:43 -08:00:48 -08:00:54 -08:00:56 -08:00:58 -08:01:01 -08:01:03 -08:01:07 -08:01:11 -08:01:14 -08:01:17 -08:01:20 -08:01:24 -08:01:27 -08:01:33 -08:01:36 -08:01:39 -08:01:45 -08:01:45 -08:01:48 -08:01:50 -08:01:55 -08:01:57 -08:01:59 -08:02:03 -08:02:05 -08:02:07 -08:02:11 -08:02:15 -08:02:17 -08:02:21 -08:02:27 -08:02:29 -08:02:31 -08:02:33 -08:02:37 -08:02:40 -08:02:42 -08:02:45 -08:02:49 -08:02:52 -08:02:55 -08:02:58 -08:03:01 -08:03:04 -08:03:07 -08:03:14 -08:03:18 -08:03:20 -08:03:24 -08:03:27 -08:03:31 -08:03:33 -08:03:37 -08:03:41 -08:03:45 -08:03:47 -08:03:52 -08:03:56 -08:03:58 -08:04:02 -08:04:04 -08:04:08 -08:04:11 -08:04:15 -08:04:18 -08:04:23 -08:04:26 -08:04:28 -08:04:31 -08:04:35 -08:04:37 -08:04:40 -08:04:42 -08:04:45 -08:04:48 -08:04:55 -08:05:01 -08:05:06 -08:05:10 -08:05:12 -08:05:15 -08:05:18 -08:05:22 -08:05:24 -08:05:27 -08:05:33 -08:05:36 -08:05:38 -08:05:40 -08:05:45 -08:05:48 -08:05:51 -08:06:00 -08:06:05 -08:06:09 -08:06:12 -08:06:14 -08:06:17 -08:06:19 -08:06:23 -08:06:27 -08:06:31 -08:06:35 -08:06:36 -08:06:40 -08:06:44 -08:06:47 -08:06:49 -08:06:52 -08:06:56 -08:07:00 -08:07:03 -08:07:05 -08:07:06 -08:07:08 -08:07:15 -08:07:17 -08:07:20 -08:07:22 -08:07:29 -08:07:32 -08:07:36 -08:07:39 -08:07:41 -08:07:43 -08:07:46 -08:07:55 -08:07:58 -08:08:01 -08:08:04 -08:08:06 -08:08:08 -08:08:17 -08:08:19 -08:08:22 -08:08:25 -08:08:30 -08:08:35 -08:08:38 -08:08:41 -08:08:45 -08:08:48 -08:08:52 -08:08:56 -08:08:59 -08:09:02 -08:09:05 -08:09:07 -08:09:11 -08:09:14 -08:09:17 -08:09:21 -08:09:23 -08:09:27 -08:09:29 -08:09:32 -08:09:35 -08:09:39 -08:09:42 -08:09:45 -08:09:51 -08:09:57 -08:10:00 -08:10:05 -08:10:10 -08:10:16 -08:10:25 -08:10:34 -08:10:39 -08:10:44 -08:11:18 -08:11:23 -08:11:28 -08:11:34 -08:11:38 -08:11:43 -08:11:48 -08:11:55 -08:12:04 -08:12:10 -08:12:15 -08:12:19 -08:12:24 -08:12:28 -08:12:41 -08:12:43 -08:12:49 -08:12:51 -08:12:56 -08:12:59 -08:13:03 -08:13:08 -08:13:12 -08:13:17 -08:13:19 -08:13:22 -08:13:25 -08:13:29 -08:13:36 -08:13:39 -08:13:43 -08:13:46 -08:13:50 -08:13:54 -08:13:57 -08:13:59 -08:14:01 -08:14:03 -08:14:08 -08:14:11 -08:14:18 -08:14:23 -08:14:25 -08:14:27 -08:14:30 -08:14:31 -08:14:34 -08:14:38 -08:14:40 -08:14:42 -08:14:45 -08:14:48 -08:15:02 -08:15:05 -08:15:07 -08:15:09 -08:15:11 -08:15:16 -08:15:19 -08:15:21 -08:15:24 -08:15:26 -08:15:30 -08:15:32 -08:15:34 -08:15:36 -08:15:39 -08:15:43 -08:15:47 -08:15:49 -08:15:53 -08:15:55 -08:15:57 -08:16:01 -08:16:04 -08:16:07 -08:16:10 -08:16:12 -08:16:15 -08:16:19 -08:16:22 -08:16:27 -08:16:30 -08:16:33 -08:16:34 -08:16:37 -08:16:41 -08:16:43 -08:16:45 -08:16:49 -08:16:50 -08:16:52 -08:16:57 -08:16:59 -08:17:02 -08:17:05 -08:17:08 -08:17:11 -08:17:13 -08:17:15 -08:17:17 -08:17:18 -08:17:21 -08:17:23 -08:17:25 -08:17:27 -08:17:30 -08:17:33 -08:17:36 -08:17:38 -08:17:41 -08:17:47 -08:17:50 -08:17:54 -08:17:57 -08:18:01 -08:18:08 -08:18:11 -08:18:13 -08:18:15 -08:18:24 -08:18:30 -08:18:31 -08:18:37 -08:18:38 -08:18:41 -08:18:43 -08:18:44 -08:18:49 -08:18:52 -08:18:53 -08:18:55 -08:18:56 -08:19:35 -08:19:37 -08:19:39 -08:19:40 -08:20:10 -08:20:11 -08:20:12 -08:20:15 -08:20:16 -08:20:20 -08:20:35 -08:20:52 -08:20:53 -08:20:55 -08:20:56 -08:21:03 -08:21:05 -08:21:06 -08:21:08 -08:21:10 -08:21:12 -08:21:21 -08:21:25 -08:21:27 -08:21:32 -08:21:36 -08:21:37 -08:21:42 -08:21:43 -08:21:48 -08:22:08 -08:22:09 -08:22:10 -08:22:10 -08:22:12 -08:22:14 -08:22:16 -08:22:17 -08:22:21 -08:22:24 -08:22:27 -08:22:28 -08:22:30 -08:22:34 -08:22:36 -08:22:39 -08:22:39 -08:22:40 -08:22:41 -08:22:44 -08:22:47 -08:22:50 -08:22:52 -08:22:53 -08:22:55 -08:22:58 -08:22:59 -08:23:01 -08:23:03 -08:23:06 -08:23:07 -08:23:10 -08:23:11 -08:23:14 -08:23:16 -08:23:32 -08:24:29 -08:24:32 -08:24:35 -08:24:37 -08:24:40 -08:24:41 -08:24:42 -08:24:44 -08:24:45 -08:24:48 -08:24:51 -08:24:52 -08:24:53 -08:24:55 -08:24:59 -08:25:02 -08:25:06 -08:25:08 -08:25:12 -08:25:14 -08:25:17 -08:25:19 -08:25:25 -08:25:27 -08:25:29 -08:25:32 -08:25:33 -08:25:35 -08:25:42 -08:25:44 -08:25:45 -08:25:45 -08:25:47 -08:25:49 -08:25:51 -08:25:53 -08:25:55 -08:25:56 -08:25:58 -08:26:00 -08:26:01 -08:26:16 -08:26:46 -08:26:48 -08:26:55 -08:26:56 -08:26:59 -08:27:00 -08:27:03 -08:27:05 -08:27:34 -08:27:36 -08:27:39 -08:27:40 -08:27:42 -08:27:45 -08:27:51 -08:27:52 -08:28:02 -08:28:04 -08:28:15 -08:28:18 -08:28:19 -08:28:21 -08:28:21 -08:28:24 -08:28:26 -08:28:28 -08:28:29 -08:28:32 -08:28:34 -08:28:35 -08:29:22 -08:29:25 -08:29:26 -08:29:28 -08:29:31 -08:29:34 -08:29:37 -08:29:41 -08:29:44 -08:29:46 -08:29:47 -08:29:49 -08:29:52 -08:29:54 -08:29:55 -08:29:58 -08:30:00 -08:30:01 -08:30:02 -08:30:04 -08:30:05 -08:30:06 -08:30:09 -08:30:11 -08:30:12 -08:30:44 -08:30:46 -08:30:48 -08:30:50 -08:30:52 -08:31:05 -08:31:12 -08:31:14 -08:31:18 -08:31:20 -08:31:21 -08:31:23 -08:31:26 -08:31:28 -08:31:28 -08:31:46 -08:31:47 -08:31:52 -08:31:54 -08:31:59 -08:32:02 -08:32:05 -08:32:07 -08:32:09 -08:32:12 -08:32:13 -08:32:15 -08:32:17 -08:32:19 -08:32:21 -08:32:22 -08:32:25 -08:32:29 -08:32:38 -08:32:40 -08:32:42 -08:32:44 -08:32:45 -08:32:47 -08:32:50 -08:32:51 -08:32:55 -08:32:57 -08:33:14 -08:33:17 -08:33:20 -08:33:21 -08:33:22 -08:33:32 -08:33:37 -08:33:38 -08:33:40 -08:33:43 -08:33:45 -08:33:48 -08:33:50 -08:33:51 -08:33:55 -08:34:00 -08:34:02 -08:34:04 -08:35:03 -08:35:05 -08:35:11 -08:35:12 -08:35:18 -08:35:23 -08:35:25 -08:35:26 -08:35:28 -08:35:31 -08:35:34 -08:35:35 -08:35:37 -08:35:38 -08:35:41 -08:35:43 -08:35:44 -08:35:46 -08:35:51 -08:35:52 -08:35:58 -08:36:01 -08:36:03 -08:36:05 -08:36:06 -08:36:09 -08:36:10 -08:36:12 -08:36:14 -08:36:16 -08:36:18 -08:36:20 -08:36:22 -08:36:23 -08:36:26 -08:36:27 -08:36:33 -08:36:35 -08:36:37 -08:36:38 -08:36:40 -08:36:41 -08:36:42 -08:36:45 -08:36:46 -08:36:49 -08:36:50 -08:37:19 -08:37:21 -08:37:24 -08:37:26 -08:37:28 -08:37:29 -08:37:30 -08:37:33 -08:37:43 -08:37:45 -08:37:47 -08:37:48 -08:37:50 -08:37:55 -08:37:59 -08:38:02 -08:38:12 -08:38:13 -08:38:16 -08:38:17 -08:38:19 -08:38:20 -08:38:23 -08:38:42 -08:38:44 -08:38:48 -08:38:51 -08:38:52 -08:38:53 -08:38:55 -08:38:58 -08:38:59 -08:39:02 -08:39:04 -08:39:07 -08:39:08 -08:39:09 -08:39:12 -08:39:13 -08:39:14 -08:39:44 -08:39:47 -08:39:50 -08:39:51 -08:39:55 -08:39:59 -08:40:03 -08:40:07 -08:40:14 -08:40:17 -08:40:18 -08:40:19 -08:40:20 -08:40:21 -08:40:23 -08:40:24 -08:40:25 -08:40:27 -08:40:28 -08:40:36 -08:40:37 -08:40:39 -08:40:42 -08:40:48 -08:40:49 -08:40:50 -08:40:51 -08:40:55 -08:40:57 -08:40:58 -08:41:02 -08:41:03 -08:41:05 -08:41:12 -08:41:14 -08:41:18 -08:41:20 -08:41:21 -08:41:23 -08:41:26 -08:41:34 -08:41:35 -08:42:04 -08:42:05 -08:42:07 -08:42:09 -08:42:12 -08:42:15 -08:42:51 -08:42:53 -08:42:54 -08:42:57 -08:43:14 -08:43:16 -08:43:17 -08:43:19 -08:43:21 -08:43:23 -08:43:25 -08:43:27 -08:43:29 -08:43:29 -08:43:30 -08:43:32 -08:43:33 -08:43:36 -08:43:37 -08:43:40 -08:43:41 -08:43:43 -08:43:46 -08:43:47 -08:44:13 -08:44:13 -08:44:17 -08:44:22 -08:44:24 -08:44:26 -08:44:39 -08:44:43 -08:44:44 -08:44:47 -08:44:49 -08:45:08 -08:45:12 -08:45:13 -08:45:15 -08:45:17 -08:45:19 -08:45:20 -08:45:22 -08:45:24 -08:45:38 -08:45:40 -08:45:49 -08:45:50 -08:45:52 -08:45:59 -08:46:07 -08:46:33 -08:46:51 -08:46:54 -08:46:55 -08:47:00 -08:47:02 -08:47:05 -08:47:07 -08:47:09 -08:47:10 -08:47:15 -08:47:17 -08:47:20 -08:47:22 -08:47:23 -08:47:25 -08:47:27 -08:47:29 -08:47:33 -08:47:35 -08:47:38 -08:47:40 -08:47:41 -08:47:48 -08:47:55 -08:48:41 -08:48:41 -08:48:43 -08:48:45 -08:48:52 -08:48:54 -08:48:56 -08:48:57 -08:49:00 -08:49:03 -08:49:05 -08:50:07 -08:50:10 -08:50:11 -08:50:12 -08:50:14 -08:50:17 -08:50:19 -08:50:20 -08:50:24 -08:50:27 -08:50:29 -08:50:30 -08:50:32 -08:50:35 -08:50:38 -08:50:42 -08:50:43 -08:50:53 -08:50:55 -08:50:56 -08:50:57 -08:50:58 -08:51:00 -08:51:02 -08:51:09 -08:51:11 -08:51:14 -08:51:55 -08:51:56 -08:52:08 -08:52:09 -08:52:11 -08:52:12 -08:52:16 -08:52:17 -08:52:19 -08:52:20 -08:52:24 -08:52:26 -08:52:28 -08:52:29 -08:52:32 -08:52:33 -08:52:36 -08:52:46 -08:52:48 -08:52:50 -08:53:00 -08:54:02 -08:54:04 -08:54:08 -08:54:11 -08:54:13 -08:54:14 -08:54:15 -08:54:20 -08:54:21 -08:54:23 -08:54:25 -08:54:29 -08:54:30 -08:55:06 -08:55:07 -08:55:15 -08:55:16 -08:55:20 -08:55:22 -08:55:23 -08:55:26 -08:55:28 -08:55:29 -08:55:31 -08:55:32 -08:55:34 -08:55:36 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_4.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_4.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_4.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_4.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2293 +0,0 @@ -06:48:01 -06:48:02 -06:48:05 -06:48:06 -06:48:08 -06:48:09 -06:48:13 -06:48:16 -06:48:17 -06:48:19 -06:48:21 -06:48:23 -06:48:25 -06:48:27 -06:48:28 -06:48:34 -06:48:37 -06:48:38 -06:48:39 -06:48:42 -06:48:45 -06:48:46 -06:48:49 -06:48:51 -06:48:51 -06:48:55 -06:48:56 -06:48:58 -06:49:00 -06:49:01 -06:49:02 -06:49:04 -06:49:05 -06:49:06 -06:49:09 -06:49:12 -06:49:14 -06:49:17 -06:49:23 -06:49:28 -06:49:29 -06:49:32 -06:49:33 -06:49:37 -06:49:39 -06:49:40 -06:49:42 -06:49:46 -06:49:48 -06:49:50 -06:49:52 -06:49:54 -06:49:55 -06:49:56 -06:49:57 -06:50:00 -06:50:05 -06:50:06 -06:50:07 -06:50:08 -06:50:10 -06:50:11 -06:50:12 -06:50:15 -06:50:16 -06:50:20 -06:50:22 -06:50:24 -06:50:26 -06:50:28 -06:50:33 -06:50:41 -06:50:45 -06:50:47 -06:50:48 -06:50:50 -06:50:53 -06:50:54 -06:50:55 -06:50:56 -06:50:57 -06:50:58 -06:50:59 -06:51:01 -06:51:04 -06:51:06 -06:51:07 -06:51:09 -06:51:09 -06:51:13 -06:51:16 -06:51:19 -06:51:20 -06:51:21 -06:51:23 -06:51:24 -06:52:19 -06:52:21 -06:52:28 -06:52:30 -06:52:33 -06:52:35 -06:52:36 -06:52:40 -06:52:44 -06:52:48 -06:52:50 -06:52:52 -06:53:00 -06:53:01 -06:53:03 -06:53:05 -06:53:09 -06:53:11 -06:53:15 -06:53:16 -06:53:17 -06:53:20 -06:53:24 -06:53:25 -06:53:26 -06:53:29 -06:53:33 -06:53:36 -06:53:38 -06:53:44 -06:53:46 -06:53:49 -06:53:50 -06:53:52 -06:53:52 -06:53:53 -06:54:05 -06:54:06 -06:54:09 -06:54:13 -06:54:15 -06:54:17 -06:54:19 -06:54:21 -06:54:22 -06:54:26 -06:54:30 -06:54:32 -06:54:33 -06:54:35 -06:54:39 -06:54:40 -06:54:41 -06:54:43 -06:54:45 -06:54:46 -06:54:47 -06:54:49 -06:54:53 -06:54:55 -06:54:57 -06:54:58 -06:55:00 -06:55:02 -06:55:05 -06:55:06 -06:55:09 -06:55:11 -06:55:18 -06:55:20 -06:55:24 -06:55:26 -06:55:27 -06:55:29 -06:55:29 -06:55:32 -06:55:34 -06:55:38 -06:55:40 -06:55:42 -06:55:46 -06:55:48 -06:55:50 -06:55:53 -06:55:54 -06:55:56 -06:55:57 -06:55:59 -06:56:02 -06:56:06 -06:56:08 -06:56:12 -06:56:14 -06:56:16 -06:56:17 -06:56:20 -06:56:21 -06:56:23 -06:56:25 -06:56:26 -06:56:27 -06:56:29 -06:56:30 -06:56:38 -06:56:38 -06:56:40 -06:56:41 -06:56:43 -06:56:46 -06:56:48 -06:56:49 -06:56:52 -06:56:56 -06:56:59 -06:57:01 -06:57:02 -06:57:04 -06:57:06 -06:57:08 -06:57:11 -06:57:14 -06:57:16 -06:57:18 -06:57:19 -06:57:21 -06:57:22 -06:57:23 -06:57:24 -06:57:28 -06:57:30 -06:57:33 -06:57:35 -06:57:37 -06:57:40 -06:57:45 -06:57:46 -06:57:53 -06:57:55 -06:57:57 -06:57:59 -06:57:59 -06:58:00 -06:58:02 -06:58:04 -06:58:05 -06:58:08 -06:58:14 -06:58:15 -06:58:19 -06:58:20 -06:58:22 -06:58:23 -06:58:50 -06:58:52 -06:58:53 -06:58:54 -06:58:56 -06:59:00 -06:59:03 -06:59:05 -06:59:07 -06:59:09 -06:59:12 -06:59:13 -06:59:14 -06:59:16 -06:59:17 -06:59:20 -06:59:25 -06:59:27 -06:59:28 -06:59:29 -06:59:31 -06:59:32 -06:59:33 -06:59:34 -06:59:38 -06:59:40 -06:59:42 -06:59:43 -06:59:47 -06:59:48 -06:59:49 -06:59:52 -06:59:53 -06:59:56 -06:59:58 -07:00:03 -07:00:11 -07:00:13 -07:00:14 -07:00:15 -07:00:16 -07:00:18 -07:00:18 -07:00:21 -07:00:23 -07:00:24 -07:00:26 -07:00:27 -07:00:29 -07:00:30 -07:00:32 -07:00:33 -07:00:37 -07:00:37 -07:00:39 -07:00:41 -07:00:44 -07:00:46 -07:00:47 -07:00:49 -07:00:51 -07:00:52 -07:00:54 -07:00:55 -07:00:57 -07:00:59 -07:01:02 -07:01:03 -07:01:04 -07:01:08 -07:01:11 -07:01:13 -07:01:14 -07:01:17 -07:01:22 -07:01:26 -07:01:27 -07:01:28 -07:01:29 -07:01:33 -07:01:36 -07:01:38 -07:01:39 -07:01:41 -07:01:42 -07:01:46 -07:01:48 -07:01:49 -07:01:51 -07:01:52 -07:01:55 -07:01:56 -07:01:58 -07:01:59 -07:02:01 -07:02:02 -07:02:12 -07:02:15 -07:02:17 -07:02:19 -07:02:22 -07:02:26 -07:02:27 -07:02:30 -07:02:31 -07:02:47 -07:02:49 -07:02:50 -07:02:51 -07:02:53 -07:02:55 -07:02:57 -07:03:02 -07:03:03 -07:03:04 -07:03:07 -07:03:08 -07:03:11 -07:03:13 -07:03:17 -07:03:20 -07:03:25 -07:03:27 -07:03:27 -07:03:30 -07:03:31 -07:03:34 -07:03:36 -07:03:37 -07:03:39 -07:03:41 -07:03:45 -07:03:46 -07:03:48 -07:03:51 -07:03:54 -07:03:55 -07:03:56 -07:03:57 -07:03:58 -07:04:01 -07:04:02 -07:04:07 -07:04:09 -07:04:10 -07:04:11 -07:04:13 -07:04:14 -07:04:15 -07:04:17 -07:04:18 -07:04:19 -07:04:26 -07:04:35 -07:04:36 -07:04:40 -07:04:42 -07:04:45 -07:04:47 -07:04:50 -07:04:51 -07:04:52 -07:04:53 -07:04:56 -07:04:57 -07:04:59 -07:05:01 -07:05:03 -07:05:04 -07:05:06 -07:05:08 -07:05:09 -07:05:11 -07:05:13 -07:05:16 -07:05:17 -07:05:20 -07:05:22 -07:05:24 -07:05:27 -07:05:30 -07:05:31 -07:05:33 -07:05:34 -07:05:36 -07:05:38 -07:05:40 -07:05:42 -07:05:45 -07:05:47 -07:05:48 -07:05:50 -07:05:51 -07:05:53 -07:05:56 -07:05:58 -07:06:02 -07:06:04 -07:06:06 -07:06:11 -07:06:12 -07:06:14 -07:06:15 -07:06:17 -07:06:18 -07:06:20 -07:06:21 -07:06:24 -07:06:26 -07:06:27 -07:06:28 -07:06:31 -07:06:33 -07:06:34 -07:06:36 -07:06:39 -07:06:40 -07:06:41 -07:06:42 -07:06:49 -07:06:50 -07:06:52 -07:06:53 -07:06:54 -07:06:56 -07:07:00 -07:07:01 -07:07:03 -07:07:04 -07:07:07 -07:07:08 -07:07:09 -07:07:11 -07:07:13 -07:07:14 -07:07:14 -07:07:18 -07:07:19 -07:07:23 -07:07:29 -07:07:30 -07:07:31 -07:07:34 -07:07:40 -07:07:44 -07:07:45 -07:07:47 -07:07:49 -07:07:52 -07:07:56 -07:07:58 -07:08:01 -07:08:02 -07:08:04 -07:08:06 -07:08:30 -07:08:38 -07:08:38 -07:08:42 -07:08:44 -07:08:47 -07:08:49 -07:08:51 -07:08:53 -07:08:53 -07:08:55 -07:08:57 -07:08:58 -07:08:59 -07:09:02 -07:09:06 -07:09:08 -07:09:14 -07:09:22 -07:09:23 -07:09:25 -07:09:27 -07:09:29 -07:09:30 -07:09:32 -07:09:33 -07:09:35 -07:09:41 -07:09:46 -07:09:48 -07:09:51 -07:09:55 -07:09:58 -07:10:00 -07:10:02 -07:10:05 -07:10:06 -07:10:10 -07:10:11 -07:10:14 -07:10:15 -07:10:17 -07:10:18 -07:10:22 -07:10:24 -07:10:25 -07:10:26 -07:10:26 -07:10:30 -07:10:34 -07:10:36 -07:10:38 -07:10:39 -07:10:40 -07:10:43 -07:10:45 -07:10:48 -07:10:50 -07:10:54 -07:10:56 -07:10:58 -07:10:59 -07:11:00 -07:11:04 -07:11:09 -07:11:13 -07:11:15 -07:11:16 -07:11:17 -07:11:20 -07:11:27 -07:11:29 -07:11:31 -07:11:32 -07:11:34 -07:11:36 -07:11:37 -07:11:39 -07:11:41 -07:11:43 -07:11:44 -07:11:48 -07:11:49 -07:11:56 -07:11:58 -07:12:00 -07:12:04 -07:12:07 -07:12:09 -07:12:11 -07:12:12 -07:12:16 -07:12:18 -07:12:20 -07:12:22 -07:12:23 -07:12:26 -07:12:28 -07:12:29 -07:12:31 -07:12:33 -07:12:34 -07:12:36 -07:12:37 -07:12:42 -07:12:45 -07:12:48 -07:12:52 -07:12:55 -07:12:56 -07:12:57 -07:13:05 -07:13:06 -07:13:08 -07:13:11 -07:13:12 -07:13:14 -07:13:16 -07:13:19 -07:13:49 -07:13:51 -07:13:53 -07:13:55 -07:13:58 -07:14:04 -07:14:06 -07:14:11 -07:14:12 -07:14:16 -07:14:18 -07:14:19 -07:14:22 -07:14:25 -07:14:29 -07:14:30 -07:14:33 -07:14:35 -07:14:39 -07:14:40 -07:14:43 -07:14:44 -07:14:46 -07:14:49 -07:14:52 -07:14:55 -07:14:56 -07:14:58 -07:15:00 -07:15:02 -07:15:03 -07:15:06 -07:15:07 -07:15:11 -07:15:13 -07:15:15 -07:15:17 -07:15:21 -07:15:23 -07:15:27 -07:15:29 -07:15:31 -07:15:34 -07:15:35 -07:15:37 -07:15:38 -07:15:39 -07:15:43 -07:15:44 -07:15:46 -07:15:48 -07:15:50 -07:15:51 -07:15:52 -07:15:54 -07:15:59 -07:16:01 -07:16:02 -07:16:05 -07:16:07 -07:16:09 -07:16:20 -07:16:20 -07:16:22 -07:16:26 -07:16:28 -07:16:32 -07:16:33 -07:16:34 -07:16:36 -07:16:38 -07:16:40 -07:16:41 -07:16:42 -07:16:43 -07:16:45 -07:16:51 -07:16:53 -07:16:54 -07:16:59 -07:17:03 -07:17:05 -07:17:06 -07:17:08 -07:17:10 -07:17:12 -07:17:15 -07:17:16 -07:17:18 -07:17:23 -07:17:25 -07:17:32 -07:17:33 -07:17:36 -07:17:37 -07:17:40 -07:17:42 -07:17:43 -07:17:45 -07:17:46 -07:17:52 -07:17:54 -07:17:56 -07:17:58 -07:18:07 -07:18:09 -07:18:12 -07:18:15 -07:18:16 -07:18:16 -07:18:18 -07:18:25 -07:18:27 -07:18:29 -07:18:30 -07:18:32 -07:18:34 -07:18:36 -07:18:36 -07:18:40 -07:18:41 -07:18:43 -07:18:45 -07:18:48 -07:18:52 -07:18:56 -07:18:57 -07:18:59 -07:19:01 -07:19:03 -07:19:05 -07:19:09 -07:19:12 -07:19:17 -07:19:18 -07:19:20 -07:19:23 -07:19:25 -07:19:27 -07:19:29 -07:19:34 -07:19:36 -07:19:38 -07:19:40 -07:19:42 -07:19:46 -07:19:50 -07:20:07 -07:20:11 -07:20:15 -07:20:18 -07:20:22 -07:20:26 -07:20:30 -07:20:33 -07:20:38 -07:20:41 -07:20:49 -07:20:53 -07:20:56 -07:20:59 -07:21:03 -07:21:07 -07:21:10 -07:21:15 -07:21:17 -07:21:17 -07:21:20 -07:21:23 -07:21:25 -07:21:28 -07:21:30 -07:21:34 -07:21:36 -07:21:41 -07:21:43 -07:21:46 -07:21:49 -07:21:51 -07:21:53 -07:21:55 -07:21:57 -07:22:00 -07:22:02 -07:22:06 -07:22:09 -07:22:13 -07:22:14 -07:22:20 -07:22:22 -07:22:25 -07:22:27 -07:22:34 -07:22:39 -07:22:43 -07:22:47 -07:22:50 -07:22:53 -07:22:56 -07:23:02 -07:23:04 -07:23:04 -07:23:06 -07:23:09 -07:23:10 -07:23:12 -07:23:14 -07:23:19 -07:23:21 -07:23:23 -07:23:25 -07:23:28 -07:23:30 -07:23:32 -07:23:35 -07:23:37 -07:23:40 -07:23:44 -07:23:47 -07:23:49 -07:23:51 -07:23:54 -07:23:56 -07:24:00 -07:24:04 -07:24:08 -07:24:09 -07:24:13 -07:24:18 -07:24:19 -07:24:21 -07:24:24 -07:24:28 -07:24:29 -07:24:31 -07:24:33 -07:24:36 -07:24:39 -07:24:42 -07:24:44 -07:24:48 -07:24:50 -07:24:56 -07:24:56 -07:24:58 -07:25:00 -07:25:02 -07:25:06 -07:25:08 -07:25:10 -07:25:15 -07:25:16 -07:25:19 -07:25:21 -07:25:22 -07:25:24 -07:25:27 -07:25:29 -07:25:31 -07:25:32 -07:25:34 -07:25:36 -07:25:42 -07:25:44 -07:25:45 -07:25:46 -07:25:49 -07:25:50 -07:25:53 -07:25:56 -07:26:00 -07:26:04 -07:26:06 -07:26:08 -07:26:10 -07:26:14 -07:26:19 -07:26:24 -07:26:35 -07:26:49 -07:26:51 -07:26:55 -07:27:02 -07:27:10 -07:27:16 -07:27:18 -07:27:21 -07:27:24 -07:27:27 -07:27:30 -07:27:34 -07:27:36 -07:27:39 -07:27:45 -07:27:47 -07:27:50 -07:27:52 -07:27:55 -07:27:57 -07:28:01 -07:28:05 -07:28:08 -07:28:14 -07:28:18 -07:28:21 -07:28:24 -07:28:29 -07:28:31 -07:28:33 -07:28:36 -07:28:41 -07:28:44 -07:28:45 -07:28:50 -07:28:51 -07:28:56 -07:28:58 -07:29:02 -07:29:08 -07:29:12 -07:29:14 -07:29:17 -07:29:18 -07:29:21 -07:29:24 -07:29:27 -07:29:30 -07:29:33 -07:29:36 -07:29:39 -07:29:40 -07:29:44 -07:29:46 -07:29:49 -07:29:50 -07:29:52 -07:29:55 -07:30:00 -07:30:08 -07:30:11 -07:30:12 -07:30:16 -07:30:18 -07:30:21 -07:30:24 -07:30:27 -07:30:29 -07:30:31 -07:30:33 -07:30:37 -07:30:41 -07:30:44 -07:30:46 -07:30:48 -07:30:51 -07:30:54 -07:30:56 -07:31:00 -07:31:05 -07:31:09 -07:31:10 -07:31:12 -07:31:14 -07:31:16 -07:31:19 -07:31:24 -07:31:27 -07:31:30 -07:31:32 -07:31:35 -07:31:39 -07:31:42 -07:31:45 -07:31:47 -07:31:52 -07:31:56 -07:31:58 -07:32:01 -07:32:08 -07:32:11 -07:32:13 -07:32:16 -07:32:19 -07:32:24 -07:32:27 -07:32:28 -07:32:30 -07:32:33 -07:32:37 -07:32:39 -07:32:40 -07:32:42 -07:32:47 -07:32:49 -07:32:52 -07:32:54 -07:32:56 -07:32:57 -07:33:00 -07:33:02 -07:33:05 -07:33:07 -07:33:11 -07:33:12 -07:33:14 -07:33:17 -07:33:25 -07:33:26 -07:33:26 -07:33:28 -07:33:33 -07:33:41 -07:33:45 -07:33:48 -07:33:54 -07:33:58 -07:34:17 -07:34:20 -07:34:23 -07:34:25 -07:34:27 -07:34:34 -07:34:36 -07:34:41 -07:34:43 -07:34:47 -07:34:51 -07:34:55 -07:34:58 -07:35:00 -07:35:02 -07:35:04 -07:35:08 -07:35:10 -07:35:22 -07:35:28 -07:35:33 -07:35:36 -07:35:48 -07:35:53 -07:36:03 -07:36:06 -07:36:11 -07:36:14 -07:36:18 -07:36:26 -07:36:30 -07:36:36 -07:36:41 -07:36:44 -07:36:47 -07:36:50 -07:36:55 -07:36:57 -07:37:04 -07:37:08 -07:37:13 -07:37:17 -07:37:22 -07:37:23 -07:37:25 -07:37:29 -07:37:33 -07:37:39 -07:37:46 -07:37:49 -07:37:54 -07:37:59 -07:38:03 -07:38:07 -07:38:10 -07:38:14 -07:38:21 -07:38:24 -07:38:27 -07:38:30 -07:38:33 -07:38:36 -07:38:40 -07:38:43 -07:38:45 -07:38:47 -07:38:52 -07:38:55 -07:38:58 -07:39:03 -07:39:07 -07:39:09 -07:39:12 -07:39:15 -07:39:19 -07:39:22 -07:39:26 -07:39:28 -07:39:30 -07:39:32 -07:39:36 -07:39:41 -07:39:45 -07:39:51 -07:39:54 -07:39:56 -07:39:59 -07:40:02 -07:40:04 -07:40:07 -07:40:16 -07:40:18 -07:40:22 -07:40:24 -07:40:26 -07:40:28 -07:40:30 -07:40:34 -07:40:38 -07:40:39 -07:40:41 -07:40:43 -07:40:55 -07:40:59 -07:41:02 -07:41:03 -07:41:06 -07:41:10 -07:41:15 -07:41:19 -07:41:21 -07:41:24 -07:41:27 -07:41:29 -07:41:33 -07:41:38 -07:41:40 -07:41:43 -07:41:50 -07:41:54 -07:41:57 -07:42:00 -07:42:03 -07:42:08 -07:42:14 -07:42:17 -07:42:25 -07:42:27 -07:42:30 -07:42:36 -07:42:39 -07:42:45 -07:42:49 -07:42:55 -07:43:02 -07:43:08 -07:43:13 -07:43:16 -07:43:16 -07:43:25 -07:43:30 -07:43:40 -07:43:44 -07:43:46 -07:43:50 -07:43:54 -07:43:58 -07:44:07 -07:44:13 -07:44:16 -07:44:20 -07:44:24 -07:44:27 -07:44:31 -07:44:34 -07:44:37 -07:44:39 -07:44:42 -07:44:45 -07:44:49 -07:44:53 -07:44:56 -07:44:59 -07:45:08 -07:45:11 -07:45:16 -07:45:20 -07:45:23 -07:45:27 -07:45:29 -07:45:33 -07:45:39 -07:45:43 -07:45:46 -07:45:49 -07:45:54 -07:46:00 -07:46:03 -07:46:07 -07:46:09 -07:46:10 -07:46:13 -07:46:16 -07:46:20 -07:46:24 -07:46:29 -07:46:33 -07:46:51 -07:46:58 -07:47:10 -07:47:13 -07:47:18 -07:47:21 -07:47:26 -07:47:30 -07:47:34 -07:47:39 -07:47:44 -07:47:48 -07:47:52 -07:47:56 -07:48:13 -07:48:29 -07:48:35 -07:48:40 -07:48:46 -07:48:51 -07:48:55 -07:48:58 -07:49:02 -07:49:11 -07:49:15 -07:49:21 -07:49:27 -07:49:34 -07:49:42 -07:49:47 -07:49:51 -07:49:55 -07:50:02 -07:50:07 -07:50:12 -07:50:12 -07:50:15 -07:50:19 -07:50:27 -07:50:33 -07:50:37 -07:50:43 -07:50:46 -07:50:51 -07:50:58 -07:51:02 -07:51:05 -07:51:10 -07:51:13 -07:51:17 -07:51:22 -07:51:25 -07:51:30 -07:51:35 -07:51:42 -07:51:47 -07:51:52 -07:51:56 -07:51:58 -07:52:09 -07:52:15 -07:52:20 -07:52:24 -07:52:27 -07:52:30 -07:52:32 -07:52:36 -07:52:41 -07:52:43 -07:52:47 -07:52:50 -07:52:53 -07:52:55 -07:52:59 -07:53:02 -07:53:08 -07:53:11 -07:53:12 -07:53:16 -07:53:19 -07:53:23 -07:53:27 -07:53:30 -07:53:36 -07:53:40 -07:53:43 -07:53:44 -07:53:46 -07:53:48 -07:53:49 -07:53:53 -07:53:56 -07:53:59 -07:54:02 -07:54:05 -07:54:07 -07:54:11 -07:54:15 -07:54:18 -07:54:37 -07:54:40 -07:54:45 -07:54:47 -07:54:49 -07:54:52 -07:54:55 -07:54:59 -07:55:01 -07:55:12 -07:55:16 -07:55:19 -07:55:22 -07:55:24 -07:55:26 -07:55:28 -07:55:33 -07:55:35 -07:55:38 -07:55:40 -07:55:40 -07:55:43 -07:55:45 -07:55:47 -07:55:52 -07:55:54 -07:55:57 -07:56:00 -07:56:02 -07:56:06 -07:56:09 -07:56:12 -07:56:15 -07:56:18 -07:56:20 -07:56:27 -07:56:30 -07:56:31 -07:56:34 -07:56:37 -07:56:40 -07:56:43 -07:56:47 -07:56:50 -07:56:54 -07:56:58 -07:57:02 -07:57:04 -07:57:11 -07:57:16 -07:57:18 -07:57:20 -07:57:24 -07:57:27 -07:57:29 -07:57:33 -07:57:36 -07:57:38 -07:57:42 -07:57:46 -07:57:48 -07:57:51 -07:57:54 -07:57:57 -07:58:01 -07:58:03 -07:58:05 -07:58:12 -07:58:14 -07:58:16 -07:58:20 -07:58:23 -07:58:25 -07:58:27 -07:58:29 -07:58:34 -07:58:36 -07:58:38 -07:58:41 -07:58:43 -07:58:47 -07:58:48 -07:58:52 -07:58:54 -07:58:56 -07:59:01 -07:59:11 -07:59:13 -07:59:16 -07:59:19 -07:59:22 -07:59:25 -07:59:28 -07:59:32 -07:59:34 -07:59:39 -07:59:43 -07:59:47 -07:59:59 -08:00:06 -08:00:09 -08:00:13 -08:00:16 -08:00:31 -08:00:41 -08:00:41 -08:00:43 -08:00:45 -08:00:48 -08:00:51 -08:00:54 -08:00:57 -08:01:00 -08:01:04 -08:01:07 -08:01:11 -08:01:15 -08:01:19 -08:01:25 -08:01:29 -08:01:32 -08:01:35 -08:01:39 -08:01:42 -08:01:45 -08:01:48 -08:01:50 -08:01:55 -08:01:59 -08:02:07 -08:02:10 -08:02:18 -08:02:21 -08:02:25 -08:02:28 -08:02:31 -08:02:34 -08:02:36 -08:02:39 -08:02:40 -08:02:43 -08:02:46 -08:02:48 -08:02:51 -08:02:57 -08:03:00 -08:03:05 -08:03:07 -08:03:10 -08:03:14 -08:03:18 -08:03:22 -08:03:26 -08:03:29 -08:03:33 -08:03:36 -08:03:41 -08:03:45 -08:03:51 -08:03:57 -08:04:00 -08:04:06 -08:04:11 -08:04:16 -08:04:23 -08:04:27 -08:04:30 -08:04:32 -08:04:35 -08:04:37 -08:04:42 -08:04:50 -08:04:52 -08:04:55 -08:04:59 -08:05:01 -08:05:04 -08:05:06 -08:05:10 -08:05:13 -08:05:15 -08:05:17 -08:05:22 -08:05:26 -08:05:29 -08:05:32 -08:05:35 -08:05:37 -08:05:42 -08:05:42 -08:05:43 -08:05:46 -08:05:51 -08:05:55 -08:05:59 -08:06:02 -08:06:05 -08:06:07 -08:06:12 -08:06:18 -08:06:21 -08:06:25 -08:06:29 -08:06:32 -08:06:34 -08:06:39 -08:06:41 -08:06:46 -08:07:04 -08:07:27 -08:07:34 -08:07:40 -08:07:46 -08:07:50 -08:07:56 -08:08:03 -08:08:05 -08:08:13 -08:08:18 -08:08:23 -08:08:26 -08:08:34 -08:08:42 -08:08:45 -08:08:47 -08:08:51 -08:08:57 -08:09:00 -08:09:03 -08:09:08 -08:09:14 -08:09:16 -08:09:19 -08:09:22 -08:09:25 -08:09:27 -08:09:31 -08:09:37 -08:09:43 -08:09:46 -08:09:48 -08:09:50 -08:09:55 -08:09:58 -08:10:04 -08:10:09 -08:10:12 -08:10:14 -08:10:18 -08:10:20 -08:10:23 -08:10:27 -08:10:30 -08:10:32 -08:10:36 -08:10:40 -08:10:43 -08:10:44 -08:10:47 -08:10:53 -08:10:54 -08:10:58 -08:11:02 -08:11:08 -08:11:11 -08:11:14 -08:11:19 -08:11:21 -08:11:24 -08:11:27 -08:11:33 -08:11:36 -08:11:37 -08:11:39 -08:11:41 -08:11:44 -08:11:46 -08:11:56 -08:11:57 -08:12:00 -08:12:03 -08:12:06 -08:12:08 -08:12:12 -08:12:14 -08:12:18 -08:12:20 -08:12:28 -08:12:30 -08:12:31 -08:12:37 -08:12:39 -08:12:40 -08:12:43 -08:12:46 -08:12:48 -08:12:50 -08:12:52 -08:12:54 -08:12:56 -08:12:59 -08:13:03 -08:13:06 -08:13:08 -08:13:10 -08:13:13 -08:13:16 -08:13:18 -08:13:21 -08:13:27 -08:13:29 -08:13:32 -08:13:33 -08:13:37 -08:13:39 -08:13:40 -08:13:43 -08:13:45 -08:13:46 -08:13:57 -08:13:59 -08:14:03 -08:14:05 -08:14:08 -08:14:11 -08:14:13 -08:14:20 -08:14:22 -08:14:25 -08:14:27 -08:14:30 -08:14:37 -08:14:41 -08:14:43 -08:14:46 -08:14:50 -08:14:53 -08:14:56 -08:15:04 -08:15:05 -08:15:09 -08:15:11 -08:15:14 -08:15:22 -08:15:24 -08:15:27 -08:15:30 -08:15:34 -08:15:37 -08:15:39 -08:15:41 -08:15:43 -08:15:46 -08:15:50 -08:15:58 -08:16:01 -08:16:03 -08:16:05 -08:16:07 -08:16:09 -08:16:12 -08:16:13 -08:16:15 -08:16:17 -08:16:19 -08:16:21 -08:16:24 -08:16:25 -08:16:32 -08:16:34 -08:16:35 -08:16:37 -08:16:41 -08:16:46 -08:16:48 -08:16:49 -08:16:51 -08:16:53 -08:16:55 -08:16:57 -08:16:59 -08:17:02 -08:17:05 -08:17:15 -08:17:16 -08:17:18 -08:17:20 -08:17:23 -08:17:26 -08:17:29 -08:17:32 -08:17:36 -08:17:41 -08:17:44 -08:17:46 -08:17:56 -08:17:58 -08:18:04 -08:18:08 -08:18:10 -08:18:13 -08:18:16 -08:18:19 -08:18:21 -08:18:24 -08:18:27 -08:18:29 -08:18:31 -08:18:36 -08:18:38 -08:18:41 -08:18:44 -08:18:48 -08:18:51 -08:18:53 -08:18:54 -08:18:56 -08:18:58 -08:19:00 -08:19:02 -08:19:04 -08:19:05 -08:19:08 -08:19:11 -08:19:16 -08:19:17 -08:19:19 -08:19:22 -08:19:25 -08:19:27 -08:19:29 -08:19:34 -08:19:39 -08:19:42 -08:19:45 -08:19:46 -08:19:49 -08:19:50 -08:19:53 -08:19:55 -08:19:57 -08:19:59 -08:20:00 -08:20:03 -08:20:06 -08:20:08 -08:20:10 -08:20:13 -08:20:21 -08:20:24 -08:20:26 -08:20:27 -08:20:50 -08:20:53 -08:21:00 -08:21:03 -08:21:05 -08:21:16 -08:21:31 -08:21:32 -08:21:34 -08:21:35 -08:21:42 -08:21:45 -08:21:48 -08:21:50 -08:21:51 -08:21:53 -08:22:03 -08:22:06 -08:22:10 -08:22:13 -08:22:21 -08:22:22 -08:22:24 -08:22:25 -08:22:31 -08:22:50 -08:22:51 -08:22:52 -08:22:54 -08:22:58 -08:22:59 -08:23:01 -08:23:02 -08:23:07 -08:23:10 -08:23:13 -08:23:15 -08:23:17 -08:23:18 -08:23:20 -08:23:22 -08:23:23 -08:23:24 -08:23:26 -08:23:28 -08:23:31 -08:23:33 -08:23:35 -08:23:36 -08:23:38 -08:23:39 -08:23:42 -08:23:43 -08:23:45 -08:23:51 -08:23:52 -08:23:53 -08:23:57 -08:24:00 -08:24:02 -08:24:03 -08:24:10 -08:25:12 -08:25:14 -08:25:16 -08:25:20 -08:25:22 -08:25:24 -08:25:25 -08:25:26 -08:25:27 -08:25:30 -08:25:33 -08:25:34 -08:25:35 -08:25:37 -08:25:41 -08:25:45 -08:25:50 -08:25:51 -08:25:55 -08:25:57 -08:26:00 -08:26:03 -08:26:07 -08:26:11 -08:26:13 -08:26:14 -08:26:16 -08:26:18 -08:26:21 -08:26:28 -08:26:31 -08:26:33 -08:26:35 -08:26:37 -08:26:39 -08:26:40 -08:26:42 -08:26:45 -08:26:48 -08:26:50 -08:26:51 -08:27:02 -08:27:25 -08:27:26 -08:27:34 -08:27:35 -08:27:38 -08:27:41 -08:27:43 -08:27:45 -08:28:17 -08:28:19 -08:28:21 -08:28:23 -08:28:24 -08:28:27 -08:28:31 -08:28:32 -08:28:42 -08:28:43 -08:28:53 -08:28:56 -08:28:58 -08:29:00 -08:29:00 -08:29:03 -08:29:06 -08:29:08 -08:29:09 -08:29:12 -08:29:14 -08:29:16 -08:30:06 -08:30:07 -08:30:08 -08:30:10 -08:30:13 -08:30:14 -08:30:15 -08:30:17 -08:30:24 -08:30:27 -08:30:29 -08:30:31 -08:30:33 -08:30:35 -08:30:37 -08:30:41 -08:30:43 -08:30:44 -08:30:45 -08:30:46 -08:30:48 -08:30:49 -08:30:52 -08:30:53 -08:30:54 -08:31:27 -08:31:28 -08:31:32 -08:31:35 -08:31:36 -08:31:44 -08:31:51 -08:31:54 -08:31:58 -08:32:01 -08:32:02 -08:32:03 -08:32:05 -08:32:06 -08:32:08 -08:32:10 -08:32:26 -08:32:27 -08:32:30 -08:32:31 -08:32:36 -08:32:39 -08:32:44 -08:32:46 -08:32:51 -08:32:55 -08:32:57 -08:32:58 -08:33:00 -08:33:02 -08:33:03 -08:33:06 -08:33:09 -08:33:17 -08:33:18 -08:33:19 -08:33:21 -08:33:23 -08:33:25 -08:33:27 -08:33:28 -08:33:31 -08:33:35 -08:33:55 -08:33:56 -08:34:00 -08:34:02 -08:34:03 -08:34:13 -08:34:15 -08:34:20 -08:34:22 -08:34:24 -08:34:26 -08:34:28 -08:34:30 -08:34:32 -08:34:33 -08:34:36 -08:34:41 -08:34:43 -08:34:48 -08:35:41 -08:35:42 -08:35:49 -08:35:51 -08:35:56 -08:36:06 -08:36:07 -08:36:11 -08:36:14 -08:36:17 -08:36:21 -08:36:23 -08:36:25 -08:36:28 -08:36:30 -08:36:32 -08:36:35 -08:36:38 -08:36:41 -08:36:44 -08:36:47 -08:36:50 -08:36:55 -08:36:59 -08:37:02 -08:37:08 -08:37:14 -08:37:19 -08:37:23 -08:37:24 -08:37:29 -08:37:33 -08:37:36 -08:37:38 -08:37:42 -08:37:47 -08:37:54 -08:37:58 -08:38:03 -08:38:07 -08:38:09 -08:38:12 -08:38:15 -08:38:19 -08:38:24 -08:38:26 -08:38:29 -08:38:39 -08:38:41 -08:38:45 -08:38:48 -08:38:50 -08:38:53 -08:38:56 -08:38:59 -08:39:04 -08:39:05 -08:39:11 -08:39:15 -08:39:17 -08:39:19 -08:39:29 -08:39:30 -08:39:35 -08:39:37 -08:39:41 -08:39:44 -08:39:46 -08:39:50 -08:39:52 -08:39:58 -08:40:00 -08:40:06 -08:40:08 -08:40:11 -08:40:15 -08:40:18 -08:40:22 -08:40:24 -08:40:26 -08:40:29 -08:40:32 -08:40:35 -08:40:39 -08:40:41 -08:40:43 -08:40:45 -08:40:52 -08:40:56 -08:41:01 -08:41:06 -08:41:08 -08:41:10 -08:41:13 -08:41:15 -08:41:18 -08:41:19 -08:41:21 -08:41:23 -08:41:26 -08:41:29 -08:41:30 -08:41:31 -08:41:33 -08:41:35 -08:41:40 -08:41:43 -08:41:45 -08:41:47 -08:41:53 -08:41:56 -08:41:56 -08:42:00 -08:42:04 -08:42:06 -08:42:10 -08:42:14 -08:42:18 -08:42:31 -08:42:38 -08:42:43 -08:42:48 -08:42:58 -08:43:00 -08:43:03 -08:43:06 -08:43:10 -08:43:13 -08:43:16 -08:43:18 -08:43:21 -08:43:28 -08:43:33 -08:43:37 -08:43:40 -08:43:49 -08:43:50 -08:43:53 -08:43:57 -08:44:02 -08:44:05 -08:44:10 -08:44:14 -08:44:19 -08:44:22 -08:44:29 -08:44:34 -08:44:39 -08:44:43 -08:44:45 -08:44:51 -08:44:54 -08:44:57 -08:45:00 -08:45:03 -08:45:05 -08:45:09 -08:45:14 -08:45:15 -08:45:22 -08:45:26 -08:45:29 -08:45:33 -08:45:37 -08:45:41 -08:45:46 -08:45:48 -08:45:53 -08:45:56 -08:46:00 -08:46:03 -08:46:09 -08:46:13 -08:46:27 -08:46:31 -08:46:36 -08:46:43 -08:46:46 -08:46:53 -08:46:58 -08:47:03 -08:47:06 -08:47:17 -08:47:21 -08:47:24 -08:47:30 -08:47:45 -08:48:07 -08:48:20 -08:48:24 -08:48:29 -08:48:37 -08:48:42 -08:48:49 -08:49:20 -08:49:24 -08:49:31 -08:49:37 -08:49:45 -08:49:50 -08:49:56 -08:50:03 -08:50:26 -08:50:26 -08:50:34 -08:50:48 -08:50:53 -08:50:58 -08:51:03 -08:51:07 -08:51:17 -08:51:22 -08:51:27 -08:51:34 -08:51:37 -08:51:47 -08:51:51 -08:51:54 -08:52:00 -08:52:05 -08:52:09 -08:52:15 -08:52:23 -08:52:26 -08:53:19 -08:53:24 -08:53:30 -08:53:36 -08:53:41 -08:53:52 -08:53:55 -08:53:59 -08:54:06 -08:54:09 -08:54:13 -08:54:16 -08:54:19 -08:54:25 -08:54:28 -08:54:30 -08:54:37 -08:54:40 -08:54:42 -08:54:45 -08:54:47 -08:54:51 -08:54:53 -08:54:57 -08:54:59 -08:55:02 -08:55:05 -08:55:11 -08:55:15 -08:55:18 -08:55:21 -08:55:24 -08:55:27 -08:55:31 -08:55:36 -08:55:39 -08:55:43 -08:55:47 -08:55:53 -08:55:57 -08:56:01 -08:56:12 -08:56:18 -08:56:21 -08:56:30 -08:57:03 -08:57:11 -08:57:20 -08:57:25 -08:57:31 -08:57:38 -08:57:47 -08:57:51 -08:58:21 -08:58:35 -08:58:50 -08:58:57 -08:59:02 -08:59:24 -08:59:29 -08:59:32 -08:59:39 -08:59:44 -08:59:48 -08:59:54 -08:59:57 -09:00:02 -09:00:05 -09:00:09 -09:00:13 -09:00:17 -09:00:20 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_5.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_5.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_5.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_5.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2293 +0,0 @@ -06:48:18 -06:48:19 -06:48:20 -06:48:21 -06:48:23 -06:48:24 -06:48:28 -06:48:31 -06:48:32 -06:48:34 -06:48:35 -06:48:38 -06:48:40 -06:48:41 -06:48:43 -06:48:49 -06:48:51 -06:48:52 -06:48:56 -06:48:59 -06:49:01 -06:49:03 -06:49:04 -06:49:05 -06:49:10 -06:49:11 -06:49:13 -06:49:15 -06:49:15 -06:49:17 -06:49:19 -06:49:20 -06:49:21 -06:49:23 -06:49:27 -06:49:27 -06:49:29 -06:49:32 -06:49:40 -06:49:44 -06:49:47 -06:49:48 -06:49:53 -06:49:55 -06:49:56 -06:49:57 -06:50:02 -06:50:03 -06:50:06 -06:50:07 -06:50:09 -06:50:10 -06:50:11 -06:50:13 -06:50:15 -06:50:20 -06:50:21 -06:50:22 -06:50:23 -06:50:24 -06:50:25 -06:50:27 -06:50:30 -06:50:31 -06:50:35 -06:50:36 -06:50:39 -06:50:40 -06:50:42 -06:50:47 -06:50:56 -06:51:00 -06:51:01 -06:51:03 -06:51:06 -06:51:07 -06:51:09 -06:51:10 -06:51:11 -06:51:12 -06:51:13 -06:51:14 -06:51:16 -06:51:18 -06:51:20 -06:51:22 -06:51:23 -06:51:23 -06:51:28 -06:51:30 -06:51:34 -06:51:35 -06:51:36 -06:51:38 -06:51:40 -06:52:44 -06:52:45 -06:52:48 -06:52:50 -06:52:51 -06:52:55 -06:52:59 -06:53:03 -06:53:04 -06:53:07 -06:53:15 -06:53:15 -06:53:16 -06:53:18 -06:53:19 -06:53:24 -06:53:26 -06:53:30 -06:53:31 -06:53:32 -06:53:34 -06:53:36 -06:53:38 -06:53:39 -06:53:41 -06:53:43 -06:53:47 -06:53:52 -06:53:53 -06:53:59 -06:54:01 -06:54:04 -06:54:05 -06:54:06 -06:54:07 -06:54:08 -06:54:20 -06:54:21 -06:54:23 -06:54:28 -06:54:31 -06:54:34 -06:54:36 -06:54:38 -06:54:41 -06:54:45 -06:54:47 -06:54:49 -06:54:51 -06:54:54 -06:54:55 -06:54:57 -06:54:59 -06:55:00 -06:55:01 -06:55:02 -06:55:05 -06:55:08 -06:55:10 -06:55:12 -06:55:13 -06:55:15 -06:55:17 -06:55:22 -06:55:23 -06:55:24 -06:55:27 -06:55:33 -06:55:35 -06:55:40 -06:55:42 -06:55:44 -06:55:45 -06:55:46 -06:55:48 -06:55:49 -06:55:52 -06:55:55 -06:55:57 -06:56:00 -06:56:03 -06:56:05 -06:56:05 -06:56:08 -06:56:09 -06:56:11 -06:56:12 -06:56:14 -06:56:17 -06:56:21 -06:56:23 -06:56:27 -06:56:29 -06:56:31 -06:56:32 -06:56:35 -06:56:37 -06:56:38 -06:56:41 -06:56:42 -06:56:43 -06:56:45 -06:56:46 -06:56:52 -06:56:55 -06:56:56 -06:56:58 -06:57:00 -06:57:03 -06:57:04 -06:57:07 -06:57:11 -06:57:14 -06:57:16 -06:57:18 -06:57:19 -06:57:21 -06:57:22 -06:57:25 -06:57:29 -06:57:32 -06:57:33 -06:57:34 -06:57:36 -06:57:37 -06:57:39 -06:57:40 -06:57:43 -06:57:45 -06:57:48 -06:57:50 -06:57:52 -06:57:55 -06:58:00 -06:58:02 -06:58:07 -06:58:10 -06:58:12 -06:58:14 -06:58:15 -06:58:16 -06:58:17 -06:58:19 -06:58:20 -06:58:22 -06:58:29 -06:58:30 -06:58:33 -06:58:35 -06:58:37 -06:58:39 -06:59:06 -06:59:07 -06:59:07 -06:59:09 -06:59:11 -06:59:13 -06:59:15 -06:59:18 -06:59:20 -06:59:23 -06:59:25 -06:59:28 -06:59:29 -06:59:31 -06:59:32 -06:59:33 -06:59:35 -06:59:40 -06:59:42 -06:59:44 -06:59:45 -06:59:46 -06:59:47 -06:59:48 -06:59:49 -06:59:54 -06:59:55 -06:59:57 -06:59:59 -07:00:02 -07:00:04 -07:00:05 -07:00:07 -07:00:09 -07:00:11 -07:00:13 -07:00:18 -07:00:28 -07:00:29 -07:00:31 -07:00:32 -07:00:33 -07:00:34 -07:00:35 -07:00:37 -07:00:39 -07:00:41 -07:00:43 -07:00:44 -07:00:45 -07:00:47 -07:00:48 -07:00:50 -07:00:54 -07:00:55 -07:00:56 -07:00:58 -07:01:02 -07:01:03 -07:01:05 -07:01:06 -07:01:07 -07:01:09 -07:01:10 -07:01:12 -07:01:14 -07:01:16 -07:01:18 -07:01:19 -07:01:20 -07:01:23 -07:01:26 -07:01:29 -07:01:29 -07:01:30 -07:01:33 -07:01:38 -07:01:41 -07:01:43 -07:01:43 -07:01:45 -07:01:49 -07:01:51 -07:01:53 -07:01:54 -07:01:56 -07:01:57 -07:02:02 -07:02:03 -07:02:04 -07:02:06 -07:02:07 -07:02:11 -07:02:12 -07:02:14 -07:02:15 -07:02:17 -07:02:18 -07:02:27 -07:02:31 -07:02:32 -07:02:34 -07:02:37 -07:02:41 -07:02:43 -07:02:46 -07:02:47 -07:02:52 -07:03:04 -07:03:06 -07:03:07 -07:03:08 -07:03:09 -07:03:12 -07:03:13 -07:03:19 -07:03:21 -07:03:22 -07:03:24 -07:03:25 -07:03:28 -07:03:29 -07:03:31 -07:03:33 -07:03:35 -07:03:37 -07:03:39 -07:03:42 -07:03:43 -07:03:44 -07:03:47 -07:03:49 -07:03:52 -07:03:54 -07:03:55 -07:03:57 -07:03:59 -07:04:02 -07:04:03 -07:04:06 -07:04:10 -07:04:13 -07:04:14 -07:04:15 -07:04:17 -07:04:18 -07:04:19 -07:04:21 -07:04:24 -07:04:26 -07:04:28 -07:04:29 -07:04:30 -07:04:31 -07:04:32 -07:04:34 -07:04:35 -07:04:36 -07:04:41 -07:04:51 -07:04:52 -07:04:56 -07:04:58 -07:05:01 -07:05:02 -07:05:06 -07:05:07 -07:05:08 -07:05:09 -07:05:11 -07:05:13 -07:05:15 -07:05:17 -07:05:19 -07:05:20 -07:05:22 -07:05:23 -07:05:26 -07:05:27 -07:05:30 -07:05:32 -07:05:34 -07:05:36 -07:05:39 -07:05:40 -07:05:44 -07:05:47 -07:05:48 -07:05:49 -07:05:50 -07:05:52 -07:05:54 -07:05:56 -07:05:58 -07:06:01 -07:06:02 -07:06:04 -07:06:06 -07:06:08 -07:06:09 -07:06:12 -07:06:14 -07:06:19 -07:06:22 -07:06:23 -07:06:29 -07:06:30 -07:06:31 -07:06:33 -07:06:34 -07:06:36 -07:06:37 -07:06:38 -07:06:41 -07:06:43 -07:06:44 -07:06:45 -07:06:47 -07:06:48 -07:06:50 -07:06:52 -07:06:55 -07:06:56 -07:06:57 -07:06:59 -07:07:06 -07:07:08 -07:07:09 -07:07:10 -07:07:11 -07:07:13 -07:07:17 -07:07:17 -07:07:19 -07:07:20 -07:07:22 -07:07:24 -07:07:25 -07:07:28 -07:07:29 -07:07:31 -07:07:36 -07:07:37 -07:07:40 -07:07:48 -07:07:50 -07:07:52 -07:07:53 -07:07:57 -07:08:00 -07:08:04 -07:08:07 -07:08:10 -07:08:15 -07:08:19 -07:08:24 -07:08:27 -07:08:37 -07:08:44 -07:08:48 -07:08:51 -07:08:54 -07:08:58 -07:09:01 -07:09:04 -07:09:05 -07:09:11 -07:09:14 -07:09:16 -07:09:20 -07:09:22 -07:09:24 -07:09:27 -07:09:29 -07:09:33 -07:09:36 -07:09:39 -07:09:43 -07:09:45 -07:09:47 -07:09:50 -07:09:52 -07:09:54 -07:09:55 -07:09:57 -07:09:59 -07:10:01 -07:10:05 -07:10:07 -07:10:09 -07:10:12 -07:10:15 -07:10:17 -07:10:20 -07:10:22 -07:10:25 -07:10:26 -07:10:29 -07:10:31 -07:10:35 -07:10:37 -07:10:40 -07:10:43 -07:10:45 -07:10:49 -07:10:51 -07:10:54 -07:10:59 -07:11:02 -07:11:04 -07:11:07 -07:11:10 -07:11:12 -07:11:15 -07:11:17 -07:11:21 -07:11:24 -07:11:27 -07:11:29 -07:11:32 -07:11:33 -07:11:35 -07:11:38 -07:11:42 -07:11:45 -07:11:47 -07:11:49 -07:11:51 -07:11:54 -07:11:57 -07:11:58 -07:12:00 -07:12:02 -07:12:04 -07:12:06 -07:12:08 -07:12:09 -07:12:11 -07:12:13 -07:12:17 -07:12:19 -07:12:22 -07:12:25 -07:12:27 -07:12:28 -07:12:30 -07:12:34 -07:12:35 -07:12:37 -07:12:41 -07:12:42 -07:12:44 -07:12:47 -07:12:50 -07:12:52 -07:12:54 -07:12:57 -07:13:00 -07:13:03 -07:13:06 -07:13:08 -07:13:14 -07:13:16 -07:13:19 -07:13:22 -07:13:26 -07:13:29 -07:13:33 -07:13:35 -07:13:37 -07:13:41 -07:13:44 -07:13:46 -07:13:49 -07:13:51 -07:13:53 -07:13:55 -07:13:59 -07:14:05 -07:14:06 -07:14:09 -07:14:10 -07:14:14 -07:14:20 -07:14:21 -07:14:27 -07:14:29 -07:14:32 -07:14:34 -07:14:35 -07:14:38 -07:14:42 -07:14:46 -07:14:47 -07:14:50 -07:14:52 -07:14:56 -07:14:57 -07:15:00 -07:15:01 -07:15:04 -07:15:07 -07:15:10 -07:15:12 -07:15:14 -07:15:15 -07:15:18 -07:15:20 -07:15:21 -07:15:23 -07:15:24 -07:15:27 -07:15:29 -07:15:31 -07:15:32 -07:15:38 -07:15:40 -07:15:43 -07:15:45 -07:15:48 -07:15:50 -07:15:51 -07:15:53 -07:15:54 -07:15:55 -07:16:00 -07:16:01 -07:16:02 -07:16:06 -07:16:08 -07:16:10 -07:16:11 -07:16:13 -07:16:16 -07:16:18 -07:16:19 -07:16:22 -07:16:23 -07:16:24 -07:16:37 -07:16:38 -07:16:40 -07:16:44 -07:16:45 -07:16:48 -07:16:50 -07:16:52 -07:16:54 -07:16:56 -07:16:58 -07:16:59 -07:17:00 -07:17:01 -07:17:02 -07:17:08 -07:17:10 -07:17:11 -07:17:17 -07:17:20 -07:17:22 -07:17:23 -07:17:26 -07:17:28 -07:17:30 -07:17:34 -07:17:35 -07:17:36 -07:17:42 -07:17:43 -07:17:52 -07:17:53 -07:17:54 -07:17:56 -07:18:00 -07:18:02 -07:18:03 -07:18:05 -07:18:09 -07:18:13 -07:18:15 -07:18:19 -07:18:23 -07:18:29 -07:18:34 -07:18:39 -07:18:45 -07:18:48 -07:18:51 -07:19:00 -07:19:04 -07:19:08 -07:19:09 -07:19:13 -07:19:15 -07:19:18 -07:19:20 -07:19:31 -07:19:37 -07:19:43 -07:19:46 -07:19:50 -07:19:52 -07:19:55 -07:19:59 -07:20:01 -07:20:04 -07:20:07 -07:20:10 -07:20:14 -07:20:21 -07:20:24 -07:20:27 -07:20:30 -07:20:32 -07:20:34 -07:20:39 -07:20:41 -07:20:43 -07:20:45 -07:20:47 -07:20:49 -07:20:52 -07:20:56 -07:20:56 -07:20:58 -07:21:03 -07:21:07 -07:21:09 -07:21:11 -07:21:14 -07:21:16 -07:21:19 -07:21:22 -07:21:24 -07:21:28 -07:21:30 -07:21:32 -07:21:35 -07:21:38 -07:21:41 -07:21:44 -07:21:48 -07:21:50 -07:21:52 -07:21:54 -07:21:57 -07:21:59 -07:22:02 -07:22:07 -07:22:11 -07:22:12 -07:22:14 -07:22:20 -07:22:21 -07:22:22 -07:22:24 -07:22:26 -07:22:28 -07:22:30 -07:22:34 -07:22:36 -07:22:39 -07:22:41 -07:22:45 -07:22:47 -07:22:49 -07:22:52 -07:22:58 -07:23:02 -07:23:08 -07:23:10 -07:23:12 -07:23:15 -07:23:16 -07:23:20 -07:23:22 -07:23:24 -07:23:25 -07:23:30 -07:23:31 -07:23:33 -07:23:35 -07:23:41 -07:23:44 -07:23:45 -07:23:47 -07:23:50 -07:23:51 -07:23:53 -07:23:55 -07:23:56 -07:24:01 -07:24:03 -07:24:06 -07:24:07 -07:24:10 -07:24:13 -07:24:19 -07:24:20 -07:24:27 -07:24:31 -07:24:32 -07:24:36 -07:24:40 -07:24:41 -07:24:44 -07:24:47 -07:24:54 -07:24:55 -07:24:56 -07:24:59 -07:25:01 -07:25:03 -07:25:05 -07:25:07 -07:25:12 -07:25:13 -07:25:22 -07:25:23 -07:25:25 -07:25:29 -07:25:32 -07:25:37 -07:25:51 -07:25:56 -07:25:59 -07:26:04 -07:26:06 -07:26:13 -07:26:18 -07:26:23 -07:26:27 -07:26:31 -07:26:34 -07:26:39 -07:26:40 -07:26:44 -07:26:46 -07:26:52 -07:26:56 -07:26:58 -07:27:00 -07:27:02 -07:27:05 -07:27:10 -07:27:13 -07:27:20 -07:27:22 -07:27:24 -07:27:26 -07:27:28 -07:27:30 -07:27:31 -07:27:33 -07:27:36 -07:27:38 -07:27:41 -07:27:45 -07:27:50 -07:27:55 -07:27:58 -07:28:00 -07:28:04 -07:28:05 -07:28:07 -07:28:12 -07:28:15 -07:28:17 -07:28:20 -07:28:24 -07:28:25 -07:28:27 -07:28:29 -07:28:31 -07:28:33 -07:28:36 -07:28:40 -07:28:42 -07:28:45 -07:28:48 -07:28:52 -07:28:54 -07:28:58 -07:29:00 -07:29:02 -07:29:04 -07:29:09 -07:29:11 -07:29:12 -07:29:15 -07:29:17 -07:29:21 -07:29:23 -07:29:28 -07:29:34 -07:29:39 -07:29:42 -07:29:44 -07:29:46 -07:29:49 -07:29:52 -07:29:55 -07:29:57 -07:30:00 -07:30:04 -07:30:06 -07:30:09 -07:30:11 -07:30:15 -07:30:18 -07:30:23 -07:30:28 -07:30:33 -07:30:40 -07:30:48 -07:30:55 -07:30:57 -07:31:00 -07:31:06 -07:31:09 -07:31:13 -07:31:15 -07:31:18 -07:31:20 -07:31:22 -07:31:25 -07:31:28 -07:31:31 -07:31:34 -07:31:36 -07:31:39 -07:31:41 -07:31:43 -07:31:46 -07:31:53 -07:31:53 -07:31:55 -07:31:56 -07:31:58 -07:32:00 -07:32:02 -07:32:06 -07:32:08 -07:32:09 -07:32:12 -07:32:14 -07:32:16 -07:32:20 -07:32:22 -07:32:26 -07:32:30 -07:32:32 -07:32:34 -07:32:39 -07:32:39 -07:32:41 -07:32:44 -07:32:45 -07:32:47 -07:32:52 -07:32:56 -07:32:57 -07:33:00 -07:33:03 -07:33:05 -07:33:11 -07:33:15 -07:33:19 -07:33:33 -07:33:36 -07:33:40 -07:33:44 -07:33:54 -07:33:57 -07:34:06 -07:34:12 -07:34:19 -07:34:24 -07:34:28 -07:34:31 -07:34:34 -07:34:36 -07:34:41 -07:34:42 -07:34:45 -07:34:48 -07:34:53 -07:34:58 -07:35:04 -07:35:07 -07:35:11 -07:35:16 -07:35:37 -07:35:39 -07:35:45 -07:35:47 -07:35:51 -07:35:58 -07:36:01 -07:36:04 -07:36:06 -07:36:08 -07:36:12 -07:36:14 -07:36:18 -07:36:20 -07:36:22 -07:36:24 -07:36:27 -07:36:31 -07:36:40 -07:36:43 -07:36:47 -07:36:51 -07:36:57 -07:37:01 -07:37:15 -07:37:18 -07:37:22 -07:37:25 -07:37:28 -07:37:35 -07:37:38 -07:37:43 -07:37:46 -07:37:49 -07:37:52 -07:37:55 -07:37:58 -07:38:01 -07:38:05 -07:38:07 -07:38:11 -07:38:15 -07:38:17 -07:38:19 -07:38:21 -07:38:23 -07:38:25 -07:38:35 -07:38:36 -07:38:39 -07:38:40 -07:38:41 -07:38:46 -07:38:46 -07:38:49 -07:38:53 -07:38:57 -07:38:58 -07:38:59 -07:39:01 -07:39:02 -07:39:05 -07:39:07 -07:39:09 -07:39:14 -07:39:22 -07:39:24 -07:39:27 -07:39:30 -07:39:32 -07:39:34 -07:39:39 -07:39:42 -07:39:45 -07:39:48 -07:39:54 -07:39:57 -07:39:59 -07:40:00 -07:40:01 -07:40:06 -07:40:08 -07:40:12 -07:40:18 -07:40:21 -07:40:22 -07:40:25 -07:40:30 -07:40:32 -07:40:35 -07:40:49 -07:40:53 -07:40:58 -07:41:00 -07:41:03 -07:41:06 -07:41:09 -07:41:14 -07:41:19 -07:41:21 -07:41:29 -07:41:33 -07:41:45 -07:41:54 -07:42:05 -07:42:06 -07:42:10 -07:42:13 -07:42:19 -07:42:25 -07:42:33 -07:42:40 -07:42:47 -07:42:53 -07:42:56 -07:43:02 -07:43:06 -07:43:11 -07:43:17 -07:43:21 -07:43:25 -07:43:30 -07:43:33 -07:43:38 -07:43:42 -07:43:45 -07:43:49 -07:43:52 -07:43:55 -07:43:58 -07:44:03 -07:44:06 -07:44:09 -07:44:17 -07:44:23 -07:44:31 -07:44:37 -07:44:42 -07:44:46 -07:44:50 -07:44:58 -07:45:03 -07:45:07 -07:45:11 -07:45:14 -07:45:18 -07:45:22 -07:45:26 -07:45:29 -07:45:35 -07:45:40 -07:45:44 -07:45:47 -07:45:50 -07:45:55 -07:45:58 -07:46:01 -07:46:04 -07:46:08 -07:46:14 -07:46:16 -07:46:19 -07:46:24 -07:46:29 -07:46:35 -07:46:39 -07:46:44 -07:46:55 -07:46:59 -07:47:02 -07:47:26 -07:47:29 -07:47:34 -07:47:38 -07:47:49 -07:47:52 -07:47:59 -07:48:04 -07:48:07 -07:48:12 -07:48:16 -07:48:19 -07:48:28 -07:48:33 -07:48:38 -07:48:41 -07:48:47 -07:48:53 -07:49:04 -07:49:08 -07:49:12 -07:49:16 -07:49:21 -07:49:25 -07:49:29 -07:49:34 -07:49:37 -07:49:41 -07:49:44 -07:49:48 -07:49:51 -07:49:57 -07:49:59 -07:50:03 -07:50:07 -07:50:11 -07:50:14 -07:50:18 -07:50:23 -07:50:27 -07:50:31 -07:50:34 -07:50:39 -07:50:46 -07:50:55 -07:51:03 -07:51:06 -07:51:09 -07:51:13 -07:51:18 -07:51:23 -07:51:27 -07:51:30 -07:51:35 -07:51:40 -07:51:42 -07:51:48 -07:51:51 -07:51:55 -07:51:59 -07:52:04 -07:52:07 -07:52:12 -07:52:14 -07:52:18 -07:52:21 -07:52:24 -07:52:27 -07:52:31 -07:52:39 -07:52:43 -07:52:46 -07:52:48 -07:52:56 -07:52:57 -07:53:03 -07:53:05 -07:53:06 -07:53:08 -07:53:12 -07:53:14 -07:53:16 -07:53:19 -07:53:21 -07:53:23 -07:53:25 -07:53:27 -07:53:30 -07:53:33 -07:53:36 -07:53:39 -07:53:42 -07:53:43 -07:53:47 -07:53:50 -07:53:54 -07:54:03 -07:54:05 -07:54:10 -07:54:16 -07:54:19 -07:54:22 -07:54:24 -07:54:26 -07:54:29 -07:54:34 -07:54:37 -07:54:43 -07:54:48 -07:54:50 -07:54:56 -07:55:01 -07:55:07 -07:55:10 -07:55:19 -07:55:22 -07:55:24 -07:55:26 -07:55:29 -07:55:31 -07:55:36 -07:55:40 -07:55:43 -07:55:52 -07:55:56 -07:55:59 -07:56:02 -07:56:05 -07:56:08 -07:56:11 -07:56:15 -07:56:20 -07:56:22 -07:56:25 -07:56:27 -07:56:29 -07:56:31 -07:56:33 -07:56:35 -07:56:38 -07:56:40 -07:56:42 -07:56:45 -07:56:50 -07:56:54 -07:56:54 -07:56:57 -07:57:01 -07:57:06 -07:57:09 -07:57:12 -07:57:15 -07:57:19 -07:57:22 -07:57:25 -07:57:28 -07:57:30 -07:57:33 -07:57:36 -07:57:39 -07:57:43 -07:57:47 -07:57:52 -07:57:54 -07:57:57 -07:57:59 -07:58:03 -07:58:10 -07:58:12 -07:58:14 -07:58:17 -07:58:21 -07:58:23 -07:58:28 -07:58:31 -07:58:34 -07:58:37 -07:58:40 -07:58:44 -07:58:51 -07:58:54 -07:58:57 -07:59:02 -07:59:08 -07:59:11 -07:59:22 -07:59:30 -07:59:35 -07:59:38 -07:59:44 -07:59:49 -07:59:53 -07:59:56 -07:59:59 -08:00:03 -08:00:06 -08:00:08 -08:00:13 -08:00:16 -08:00:18 -08:00:22 -08:00:26 -08:00:29 -08:00:31 -08:00:36 -08:00:40 -08:00:43 -08:00:45 -08:00:47 -08:00:50 -08:00:53 -08:00:56 -08:00:59 -08:01:04 -08:01:08 -08:01:11 -08:01:13 -08:01:16 -08:01:18 -08:01:24 -08:01:30 -08:01:33 -08:01:34 -08:01:37 -08:01:39 -08:01:41 -08:01:44 -08:01:46 -08:01:48 -08:01:51 -08:01:53 -08:01:57 -08:01:59 -08:02:06 -08:02:14 -08:02:17 -08:02:19 -08:02:23 -08:02:25 -08:02:26 -08:02:29 -08:02:32 -08:02:36 -08:02:42 -08:03:11 -08:03:13 -08:03:16 -08:03:19 -08:03:21 -08:03:24 -08:03:28 -08:03:32 -08:03:35 -08:03:38 -08:03:40 -08:03:42 -08:03:46 -08:03:50 -08:03:52 -08:03:56 -08:03:59 -08:04:02 -08:04:06 -08:04:09 -08:04:12 -08:04:15 -08:04:18 -08:04:22 -08:04:25 -08:04:29 -08:04:33 -08:04:35 -08:04:38 -08:04:41 -08:04:46 -08:04:51 -08:04:55 -08:05:02 -08:05:03 -08:05:07 -08:05:13 -08:05:17 -08:05:20 -08:05:23 -08:05:26 -08:05:28 -08:05:32 -08:05:38 -08:05:41 -08:05:45 -08:06:29 -08:06:31 -08:06:35 -08:06:40 -08:06:43 -08:06:47 -08:06:49 -08:06:52 -08:06:57 -08:07:02 -08:07:08 -08:07:18 -08:07:23 -08:07:26 -08:07:29 -08:07:32 -08:07:35 -08:07:41 -08:07:43 -08:07:47 -08:07:49 -08:07:53 -08:07:55 -08:07:59 -08:08:04 -08:08:07 -08:08:12 -08:08:15 -08:08:17 -08:08:19 -08:08:22 -08:08:24 -08:08:26 -08:08:29 -08:08:37 -08:08:40 -08:08:47 -08:08:51 -08:08:53 -08:08:57 -08:09:00 -08:09:03 -08:09:06 -08:09:09 -08:09:12 -08:09:15 -08:09:22 -08:09:26 -08:09:30 -08:09:32 -08:09:34 -08:09:36 -08:09:38 -08:09:41 -08:09:43 -08:09:47 -08:09:51 -08:09:53 -08:09:55 -08:09:56 -08:09:59 -08:10:01 -08:10:04 -08:10:12 -08:10:20 -08:10:27 -08:10:29 -08:10:35 -08:10:38 -08:10:41 -08:10:54 -08:10:58 -08:11:02 -08:11:05 -08:11:09 -08:11:11 -08:11:15 -08:11:18 -08:11:20 -08:11:23 -08:11:26 -08:11:29 -08:11:30 -08:11:34 -08:11:35 -08:11:39 -08:11:41 -08:11:43 -08:11:47 -08:11:50 -08:11:52 -08:11:56 -08:11:58 -08:12:00 -08:12:02 -08:12:04 -08:12:08 -08:12:09 -08:12:12 -08:12:13 -08:12:15 -08:12:19 -08:12:21 -08:12:23 -08:12:25 -08:12:27 -08:12:29 -08:12:31 -08:12:34 -08:12:38 -08:12:41 -08:12:43 -08:12:45 -08:12:50 -08:12:55 -08:12:58 -08:12:59 -08:13:04 -08:13:06 -08:13:08 -08:13:11 -08:13:13 -08:13:17 -08:13:19 -08:13:21 -08:13:25 -08:13:27 -08:13:32 -08:13:35 -08:13:37 -08:13:39 -08:13:41 -08:13:48 -08:13:52 -08:14:06 -08:14:12 -08:14:17 -08:14:20 -08:14:22 -08:14:26 -08:14:29 -08:14:32 -08:14:35 -08:14:38 -08:14:41 -08:14:44 -08:14:48 -08:14:54 -08:14:58 -08:15:01 -08:15:04 -08:15:05 -08:15:09 -08:15:12 -08:15:15 -08:15:17 -08:15:19 -08:15:26 -08:15:27 -08:15:29 -08:15:32 -08:15:35 -08:15:36 -08:15:39 -08:15:43 -08:15:44 -08:15:48 -08:15:49 -08:15:53 -08:15:57 -08:16:00 -08:16:05 -08:16:06 -08:16:09 -08:16:10 -08:16:11 -08:16:13 -08:16:15 -08:16:19 -08:16:29 -08:16:30 -08:16:33 -08:16:34 -08:16:35 -08:16:38 -08:16:42 -08:16:44 -08:16:47 -08:16:49 -08:16:51 -08:16:54 -08:16:56 -08:17:02 -08:17:05 -08:17:11 -08:17:28 -08:17:33 -08:17:37 -08:17:39 -08:17:43 -08:17:46 -08:17:49 -08:17:52 -08:17:54 -08:17:56 -08:17:59 -08:18:02 -08:18:09 -08:18:11 -08:18:14 -08:18:16 -08:18:18 -08:18:20 -08:18:23 -08:18:25 -08:18:27 -08:18:29 -08:18:32 -08:18:34 -08:18:38 -08:18:41 -08:18:44 -08:18:48 -08:18:50 -08:18:52 -08:18:53 -08:18:55 -08:18:57 -08:18:59 -08:19:00 -08:19:01 -08:19:03 -08:19:06 -08:19:07 -08:19:10 -08:19:13 -08:19:16 -08:19:19 -08:19:22 -08:19:23 -08:19:25 -08:19:27 -08:19:29 -08:19:31 -08:19:34 -08:19:36 -08:19:39 -08:19:41 -08:19:42 -08:19:44 -08:19:48 -08:19:50 -08:19:52 -08:19:54 -08:19:58 -08:20:04 -08:20:07 -08:20:09 -08:20:12 -08:20:14 -08:20:15 -08:20:18 -08:20:23 -08:20:27 -08:20:30 -08:20:31 -08:20:34 -08:21:10 -08:21:12 -08:21:14 -08:21:17 -08:21:21 -08:21:23 -08:21:27 -08:21:36 -08:21:39 -08:21:43 -08:21:46 -08:21:49 -08:21:51 -08:21:57 -08:22:00 -08:22:03 -08:22:06 -08:22:09 -08:22:10 -08:22:12 -08:22:15 -08:22:17 -08:22:20 -08:22:22 -08:22:24 -08:22:27 -08:22:29 -08:22:32 -08:22:35 -08:22:37 -08:22:42 -08:22:44 -08:22:46 -08:22:48 -08:22:49 -08:22:54 -08:23:06 -08:23:08 -08:23:11 -08:23:13 -08:23:15 -08:23:19 -08:23:20 -08:23:25 -08:23:28 -08:23:30 -08:23:31 -08:23:35 -08:23:36 -08:23:39 -08:23:40 -08:23:42 -08:23:44 -08:23:45 -08:23:47 -08:23:50 -08:23:53 -08:23:54 -08:23:55 -08:23:58 -08:24:00 -08:24:05 -08:24:09 -08:24:13 -08:24:16 -08:24:20 -08:24:27 -08:24:35 -08:24:39 -08:24:42 -08:24:47 -08:24:51 -08:25:32 -08:25:35 -08:25:40 -08:25:43 -08:25:46 -08:25:51 -08:25:56 -08:25:59 -08:26:03 -08:26:05 -08:26:07 -08:26:09 -08:26:11 -08:26:14 -08:26:22 -08:26:25 -08:26:29 -08:26:32 -08:26:35 -08:26:39 -08:26:42 -08:26:47 -08:26:49 -08:26:53 -08:26:56 -08:27:04 -08:27:08 -08:27:13 -08:27:16 -08:27:20 -08:27:23 -08:27:25 -08:27:28 -08:27:31 -08:27:34 -08:27:36 -08:27:39 -08:27:42 -08:27:44 -08:27:48 -08:27:51 -08:27:54 -08:27:57 -08:28:02 -08:28:05 -08:28:07 -08:28:09 -08:28:13 -08:28:17 -08:28:23 -08:28:28 -08:28:35 -08:28:38 -08:28:40 -08:28:42 -08:28:44 -08:28:47 -08:28:50 -08:28:53 -08:28:59 -08:29:00 -08:29:08 -08:29:11 -08:29:13 -08:29:16 -08:29:17 -08:29:21 -08:29:23 -08:29:25 -08:29:27 -08:29:31 -08:29:33 -08:29:35 -08:30:22 -08:30:23 -08:30:25 -08:30:27 -08:30:29 -08:30:30 -08:30:33 -08:30:37 -08:30:40 -08:30:44 -08:30:45 -08:30:48 -08:30:50 -08:30:53 -08:30:56 -08:30:59 -08:31:01 -08:31:03 -08:31:05 -08:31:08 -08:31:10 -08:31:21 -08:31:27 -08:31:31 -08:31:36 -08:31:47 -08:31:49 -08:31:52 -08:31:55 -08:31:58 -08:32:03 -08:32:09 -08:32:13 -08:32:17 -08:32:20 -08:32:23 -08:32:27 -08:32:31 -08:32:33 -08:32:38 -08:32:43 -08:32:46 -08:32:49 -08:32:52 -08:32:57 -08:33:00 -08:33:04 -08:33:08 -08:33:13 -08:33:16 -08:33:18 -08:33:20 -08:33:21 -08:33:25 -08:33:27 -08:33:30 -08:33:34 -08:33:40 -08:33:46 -08:33:50 -08:33:54 -08:33:58 -08:34:04 -08:34:09 -08:34:14 -08:34:19 -08:34:32 -08:34:38 -08:34:44 -08:34:49 -08:34:53 -08:34:56 -08:35:01 -08:35:07 -08:35:10 -08:35:15 -08:35:24 -08:35:32 -08:35:40 -08:35:44 -08:35:46 -08:35:51 -08:36:18 -08:36:22 -08:36:25 -08:36:30 -08:36:35 -08:36:41 -08:36:51 -08:36:54 -08:36:58 -08:37:04 -08:37:09 -08:37:11 -08:37:15 -08:37:20 -08:37:28 -08:37:34 -08:37:38 -08:37:40 -08:37:44 -08:37:47 -08:37:51 -08:37:52 -08:37:54 -08:37:57 -08:37:59 -08:38:05 -08:38:09 -08:38:14 -08:38:18 -08:38:21 -08:38:23 -08:38:26 -08:38:29 -08:38:32 -08:38:36 -08:38:42 -08:38:45 -08:38:47 -08:38:51 -08:38:54 -08:38:57 -08:39:00 -08:39:02 -08:39:05 -08:39:06 -08:39:12 -08:39:14 -08:39:17 -08:39:19 -08:39:21 -08:39:25 -08:39:30 -08:39:33 -08:39:36 -08:39:39 -08:39:41 -08:39:43 -08:39:48 -08:39:51 -08:39:55 -08:39:57 -08:40:00 -08:40:03 -08:40:05 -08:40:08 -08:40:12 -08:40:14 -08:40:20 -08:40:22 -08:40:25 -08:40:27 -08:40:30 -08:40:32 -08:40:34 -08:40:36 -08:40:42 -08:40:43 -08:40:45 -08:40:47 -08:40:50 -08:40:53 -08:40:55 -08:40:57 -08:40:59 -08:41:02 -08:41:05 -08:41:07 -08:41:08 -08:41:10 -08:41:13 -08:41:25 -08:41:47 -08:41:55 -08:42:00 -08:42:04 -08:42:09 -08:42:12 -08:42:16 -08:42:19 -08:42:22 -08:42:27 -08:42:30 -08:42:35 -08:42:38 -08:42:41 -08:42:46 -08:42:50 -08:42:52 -08:42:57 -08:43:02 -08:43:06 -08:43:10 -08:43:14 -08:43:18 -08:43:21 -08:43:24 -08:43:26 -08:43:29 -08:43:30 -08:43:37 -08:43:39 -08:43:42 -08:43:51 -08:43:54 -08:43:57 -08:44:00 -08:44:04 -08:44:06 -08:44:11 -08:44:14 -08:44:17 -08:44:19 -08:44:22 -08:44:26 -08:44:29 -08:44:35 -08:44:38 -08:44:41 -08:44:49 -08:45:02 -08:45:07 -08:45:12 -08:45:15 -08:45:17 -08:45:21 -08:45:24 -08:45:27 -08:45:30 -08:45:37 -08:45:43 -08:45:48 -08:45:52 -08:45:56 -08:45:59 -08:46:03 -08:46:09 -08:46:12 -08:46:18 -08:46:23 -08:46:27 -08:46:32 -08:46:39 -08:47:03 -08:47:11 -08:47:14 -08:47:21 -08:47:33 -08:47:40 -08:47:45 -08:48:20 -08:48:26 -08:48:29 -08:48:34 -08:48:38 -08:48:43 -08:48:58 -08:49:07 -08:49:10 -08:49:13 -08:49:18 -08:49:23 -08:49:38 -08:49:45 -08:49:49 -08:49:55 -08:49:59 -08:50:03 -08:50:09 -08:50:11 -08:50:17 -08:50:21 -08:50:24 -08:50:27 -08:50:29 -08:50:49 -08:50:57 -08:51:08 -08:51:17 -08:52:04 -08:52:12 -08:52:20 -08:52:35 -08:52:40 -08:52:47 -08:52:51 -08:52:56 -08:53:06 -08:53:15 -08:53:20 -08:53:26 -08:53:29 -08:53:32 -08:53:34 -08:53:37 -08:53:43 -08:53:48 -08:53:52 -08:53:56 -08:53:58 -08:54:00 -08:54:05 -08:54:08 -08:54:12 -08:54:15 -08:54:19 -08:54:21 -08:54:30 -08:54:34 -08:54:39 -08:54:42 -08:54:46 -08:54:49 -08:54:52 -08:54:56 -08:55:05 -08:55:09 -08:55:14 -08:55:21 -08:55:47 -08:55:53 -08:55:59 -08:56:05 -08:56:09 -08:56:12 -08:56:19 -08:56:39 -08:56:44 -08:56:46 -08:57:21 -08:57:26 -08:57:31 -08:57:34 -08:57:38 -08:58:22 -08:58:24 -08:58:27 -08:58:32 -08:58:35 -08:58:39 -08:58:44 -08:58:46 -08:58:49 -08:58:50 -08:58:52 -08:58:55 -08:58:59 -08:59:02 -08:59:06 -08:59:11 -08:59:13 -08:59:23 -08:59:27 -08:59:29 -08:59:33 -08:59:38 -08:59:42 -08:59:46 -08:59:49 -08:59:53 -08:59:56 -08:59:59 -09:00:03 -09:00:06 -09:00:10 -09:00:14 -09:00:16 -09:00:21 -09:00:25 -09:00:27 -09:00:30 -09:00:32 -09:00:34 -09:00:37 -09:00:39 -09:00:41 -09:00:42 -09:00:45 -09:00:47 -09:00:49 -09:00:51 -09:00:53 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_7.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_7.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_7.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_7.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2293 +0,0 @@ -06:49:19 -06:49:20 -06:49:22 -06:49:23 -06:49:24 -06:49:26 -06:49:28 -06:49:30 -06:49:31 -06:49:35 -06:49:36 -06:49:38 -06:49:39 -06:49:41 -06:49:43 -06:49:51 -06:49:52 -06:49:53 -06:49:55 -06:49:56 -06:50:00 -06:50:02 -06:50:03 -06:50:04 -06:50:09 -06:50:13 -06:50:14 -06:50:15 -06:50:16 -06:50:17 -06:50:18 -06:50:19 -06:50:21 -06:50:24 -06:50:28 -06:50:30 -06:50:31 -06:50:41 -06:50:45 -06:50:46 -06:50:48 -06:50:51 -06:50:52 -06:50:54 -06:50:58 -06:51:03 -06:51:05 -06:51:08 -06:51:10 -06:51:12 -06:51:14 -06:51:16 -06:51:17 -06:51:18 -06:51:21 -06:51:22 -06:51:23 -06:51:24 -06:51:27 -06:51:28 -06:51:29 -06:51:30 -06:51:31 -06:51:34 -06:51:36 -06:51:38 -06:51:40 -06:51:42 -06:51:46 -06:51:57 -06:52:02 -06:52:03 -06:52:05 -06:52:07 -06:52:09 -06:52:10 -06:52:12 -06:52:14 -06:52:15 -06:52:16 -06:52:17 -06:52:18 -06:52:22 -06:52:24 -06:52:25 -06:52:26 -06:52:28 -06:52:30 -06:52:33 -06:52:37 -06:52:38 -06:52:39 -06:52:41 -06:52:43 -06:53:38 -06:53:39 -06:53:40 -06:53:44 -06:53:45 -06:53:46 -06:53:47 -06:53:53 -06:53:57 -06:53:59 -06:54:01 -06:54:09 -06:54:10 -06:54:12 -06:54:13 -06:54:18 -06:54:22 -06:54:25 -06:54:26 -06:54:27 -06:54:28 -06:54:30 -06:54:32 -06:54:33 -06:54:35 -06:54:38 -06:54:40 -06:54:44 -06:54:46 -06:54:52 -06:54:53 -06:54:56 -06:54:57 -06:55:00 -06:55:01 -06:55:02 -06:55:14 -06:55:15 -06:55:17 -06:55:24 -06:55:26 -06:55:28 -06:55:30 -06:55:31 -06:55:32 -06:55:36 -06:55:38 -06:55:40 -06:55:43 -06:55:46 -06:55:49 -06:55:50 -06:55:52 -06:55:54 -06:55:55 -06:55:56 -06:55:57 -06:56:00 -06:56:04 -06:56:07 -06:56:08 -06:56:09 -06:56:12 -06:56:14 -06:56:17 -06:56:18 -06:56:21 -06:56:24 -06:56:30 -06:56:32 -06:56:36 -06:56:39 -06:56:40 -06:56:43 -06:56:44 -06:56:47 -06:56:49 -06:56:50 -06:56:52 -06:56:53 -06:56:56 -06:56:58 -06:57:00 -06:57:03 -06:57:05 -06:57:06 -06:57:08 -06:57:09 -06:57:14 -06:57:17 -06:57:18 -06:57:20 -06:57:23 -06:57:24 -06:57:25 -06:57:28 -06:57:31 -06:57:33 -06:57:35 -06:57:37 -06:57:38 -06:57:40 -06:57:41 -06:57:46 -06:57:48 -06:57:50 -06:57:52 -06:57:54 -06:57:56 -06:57:57 -06:58:01 -06:58:05 -06:58:08 -06:58:10 -06:58:12 -06:58:14 -06:58:16 -06:58:16 -06:58:20 -06:58:23 -06:58:26 -06:58:27 -06:58:29 -06:58:31 -06:58:32 -06:58:33 -06:58:34 -06:58:40 -06:58:42 -06:58:46 -06:58:48 -06:58:49 -06:58:52 -06:58:56 -06:58:57 -06:59:01 -06:59:05 -06:59:07 -06:59:10 -06:59:11 -06:59:12 -06:59:13 -06:59:15 -06:59:16 -06:59:18 -06:59:23 -06:59:25 -06:59:27 -06:59:28 -06:59:30 -06:59:33 -07:00:02 -07:00:03 -07:00:05 -07:00:07 -07:00:09 -07:00:13 -07:00:16 -07:00:17 -07:00:20 -07:00:22 -07:00:23 -07:00:25 -07:00:26 -07:00:27 -07:00:29 -07:00:38 -07:00:40 -07:00:41 -07:00:42 -07:00:43 -07:00:44 -07:00:46 -07:00:48 -07:00:49 -07:00:52 -07:00:53 -07:00:55 -07:00:56 -07:01:00 -07:01:02 -07:01:04 -07:01:06 -07:01:07 -07:01:10 -07:01:12 -07:01:20 -07:01:27 -07:01:29 -07:01:31 -07:01:32 -07:01:34 -07:01:36 -07:01:37 -07:01:39 -07:01:41 -07:01:44 -07:01:46 -07:01:48 -07:01:50 -07:01:52 -07:01:54 -07:01:57 -07:01:58 -07:02:00 -07:02:03 -07:02:05 -07:02:08 -07:02:10 -07:02:12 -07:02:15 -07:02:17 -07:02:22 -07:02:24 -07:02:26 -07:02:29 -07:02:32 -07:02:34 -07:02:36 -07:02:38 -07:02:40 -07:02:42 -07:02:44 -07:02:46 -07:02:48 -07:02:50 -07:02:53 -07:02:53 -07:02:56 -07:02:59 -07:03:02 -07:03:04 -07:03:05 -07:03:08 -07:03:10 -07:03:12 -07:03:14 -07:03:16 -07:03:19 -07:03:22 -07:03:25 -07:03:27 -07:03:30 -07:03:32 -07:03:34 -07:03:36 -07:03:40 -07:03:42 -07:03:44 -07:03:46 -07:03:49 -07:03:51 -07:03:53 -07:03:55 -07:03:56 -07:03:59 -07:04:10 -07:04:12 -07:04:13 -07:04:15 -07:04:17 -07:04:19 -07:04:20 -07:04:26 -07:04:27 -07:04:28 -07:04:31 -07:04:34 -07:04:37 -07:04:39 -07:04:42 -07:04:44 -07:04:47 -07:04:50 -07:04:53 -07:04:57 -07:05:01 -07:05:11 -07:05:17 -07:05:19 -07:05:22 -07:05:26 -07:05:28 -07:05:30 -07:05:32 -07:05:36 -07:05:37 -07:05:40 -07:05:43 -07:05:47 -07:05:49 -07:05:51 -07:05:52 -07:05:53 -07:05:55 -07:05:58 -07:06:04 -07:06:07 -07:06:08 -07:06:10 -07:06:12 -07:06:14 -07:06:15 -07:06:17 -07:06:18 -07:06:20 -07:06:23 -07:06:27 -07:06:29 -07:06:32 -07:06:34 -07:06:38 -07:06:40 -07:06:43 -07:06:45 -07:06:46 -07:06:48 -07:06:50 -07:06:51 -07:06:53 -07:06:55 -07:06:56 -07:06:58 -07:06:59 -07:07:03 -07:07:05 -07:07:08 -07:07:11 -07:07:14 -07:07:16 -07:07:18 -07:07:22 -07:07:22 -07:07:25 -07:07:30 -07:07:37 -07:07:39 -07:07:41 -07:07:43 -07:07:45 -07:07:48 -07:07:53 -07:07:55 -07:07:58 -07:08:01 -07:08:05 -07:08:06 -07:08:09 -07:08:11 -07:08:14 -07:08:17 -07:08:21 -07:08:24 -07:08:28 -07:08:32 -07:08:34 -07:08:36 -07:08:38 -07:08:41 -07:08:43 -07:08:47 -07:08:49 -07:08:51 -07:08:54 -07:08:57 -07:08:59 -07:09:01 -07:09:04 -07:09:05 -07:09:08 -07:09:11 -07:09:13 -07:09:15 -07:09:18 -07:09:22 -07:09:23 -07:09:24 -07:09:27 -07:09:28 -07:09:30 -07:09:33 -07:09:34 -07:09:36 -07:09:40 -07:09:42 -07:09:46 -07:09:48 -07:09:49 -07:09:51 -07:09:52 -07:09:54 -07:09:56 -07:09:59 -07:10:05 -07:10:07 -07:10:08 -07:10:09 -07:10:10 -07:10:12 -07:10:17 -07:10:20 -07:10:23 -07:10:24 -07:10:27 -07:10:30 -07:10:31 -07:10:34 -07:10:37 -07:10:39 -07:10:42 -07:10:43 -07:10:45 -07:10:50 -07:10:53 -07:10:55 -07:10:59 -07:11:00 -07:11:02 -07:11:04 -07:11:05 -07:11:07 -07:11:08 -07:11:11 -07:11:14 -07:11:18 -07:11:24 -07:11:29 -07:11:31 -07:11:33 -07:11:36 -07:11:38 -07:11:39 -07:11:41 -07:11:43 -07:11:45 -07:11:47 -07:11:49 -07:11:51 -07:11:53 -07:11:56 -07:11:59 -07:12:02 -07:12:04 -07:12:07 -07:12:09 -07:12:14 -07:12:15 -07:12:19 -07:12:20 -07:12:22 -07:12:24 -07:12:26 -07:12:31 -07:12:32 -07:12:35 -07:12:41 -07:12:44 -07:12:47 -07:12:49 -07:12:51 -07:12:53 -07:12:57 -07:12:59 -07:13:02 -07:13:04 -07:13:07 -07:13:08 -07:13:11 -07:13:14 -07:13:15 -07:13:18 -07:13:22 -07:13:25 -07:13:26 -07:13:29 -07:13:30 -07:13:33 -07:13:36 -07:13:38 -07:13:40 -07:13:41 -07:13:43 -07:13:46 -07:13:47 -07:13:49 -07:13:50 -07:13:52 -07:13:54 -07:13:56 -07:13:59 -07:14:04 -07:14:06 -07:14:09 -07:14:10 -07:14:14 -07:14:16 -07:14:19 -07:14:22 -07:14:23 -07:14:26 -07:14:30 -07:14:34 -07:14:36 -07:15:01 -07:15:04 -07:15:07 -07:15:09 -07:15:13 -07:15:16 -07:15:18 -07:15:22 -07:15:24 -07:15:26 -07:15:28 -07:15:30 -07:15:33 -07:15:36 -07:15:40 -07:15:43 -07:15:45 -07:15:50 -07:15:51 -07:15:54 -07:15:56 -07:15:57 -07:16:00 -07:16:01 -07:16:04 -07:16:09 -07:16:13 -07:16:15 -07:16:17 -07:16:20 -07:16:23 -07:16:25 -07:16:32 -07:16:34 -07:16:37 -07:16:39 -07:16:42 -07:16:47 -07:16:49 -07:16:51 -07:16:52 -07:16:55 -07:16:56 -07:16:58 -07:17:01 -07:17:05 -07:17:06 -07:17:08 -07:17:11 -07:17:15 -07:17:17 -07:17:19 -07:17:21 -07:17:24 -07:17:26 -07:17:28 -07:17:30 -07:17:32 -07:17:35 -07:17:37 -07:17:39 -07:17:41 -07:17:45 -07:17:47 -07:17:53 -07:17:54 -07:17:57 -07:17:59 -07:18:02 -07:18:05 -07:18:07 -07:18:10 -07:18:14 -07:18:16 -07:18:18 -07:18:28 -07:18:29 -07:18:32 -07:18:35 -07:18:37 -07:18:40 -07:18:42 -07:18:47 -07:18:49 -07:18:53 -07:18:56 -07:19:01 -07:19:03 -07:19:06 -07:19:10 -07:19:12 -07:19:15 -07:19:18 -07:19:20 -07:19:22 -07:19:24 -07:19:26 -07:19:28 -07:19:29 -07:19:32 -07:19:35 -07:19:38 -07:19:41 -07:19:43 -07:19:47 -07:19:49 -07:19:52 -07:19:53 -07:19:55 -07:19:56 -07:20:01 -07:20:03 -07:20:05 -07:20:07 -07:20:15 -07:20:16 -07:20:23 -07:20:25 -07:20:27 -07:20:28 -07:20:31 -07:20:36 -07:20:38 -07:20:40 -07:20:42 -07:20:49 -07:20:51 -07:20:54 -07:20:55 -07:20:59 -07:21:07 -07:21:10 -07:21:13 -07:21:19 -07:21:25 -07:21:28 -07:21:35 -07:21:38 -07:21:42 -07:21:45 -07:21:49 -07:21:51 -07:21:54 -07:21:56 -07:22:00 -07:22:08 -07:22:14 -07:22:18 -07:22:21 -07:22:25 -07:22:28 -07:22:31 -07:22:34 -07:22:37 -07:22:39 -07:22:42 -07:22:45 -07:22:49 -07:22:52 -07:22:55 -07:22:58 -07:22:59 -07:23:07 -07:23:09 -07:23:13 -07:23:16 -07:23:18 -07:23:21 -07:23:25 -07:23:28 -07:23:30 -07:23:34 -07:23:39 -07:23:43 -07:23:48 -07:23:52 -07:23:56 -07:24:01 -07:24:03 -07:24:06 -07:24:10 -07:24:14 -07:24:17 -07:24:21 -07:24:25 -07:24:28 -07:24:32 -07:24:35 -07:24:39 -07:24:45 -07:24:48 -07:24:50 -07:24:52 -07:24:54 -07:24:56 -07:24:58 -07:25:01 -07:25:03 -07:25:07 -07:25:09 -07:25:11 -07:25:16 -07:25:18 -07:25:20 -07:25:22 -07:25:24 -07:25:27 -07:25:29 -07:25:33 -07:25:37 -07:25:39 -07:25:39 -07:25:41 -07:25:42 -07:25:44 -07:25:47 -07:25:49 -07:25:53 -07:25:56 -07:26:00 -07:26:07 -07:26:09 -07:26:11 -07:26:16 -07:26:18 -07:26:19 -07:26:21 -07:26:24 -07:26:25 -07:26:28 -07:26:30 -07:26:32 -07:26:33 -07:26:35 -07:26:38 -07:26:41 -07:26:43 -07:26:44 -07:26:47 -07:26:51 -07:26:54 -07:26:57 -07:26:59 -07:27:02 -07:27:04 -07:27:07 -07:27:21 -07:27:29 -07:27:40 -07:27:45 -07:27:50 -07:27:55 -07:27:59 -07:28:01 -07:28:04 -07:28:08 -07:28:12 -07:28:14 -07:28:16 -07:28:20 -07:28:23 -07:28:25 -07:28:28 -07:28:30 -07:28:35 -07:28:36 -07:28:41 -07:28:42 -07:28:44 -07:28:46 -07:28:48 -07:28:52 -07:28:54 -07:28:56 -07:28:59 -07:29:01 -07:29:04 -07:29:06 -07:29:08 -07:29:11 -07:29:14 -07:29:17 -07:29:20 -07:29:23 -07:29:25 -07:29:28 -07:29:31 -07:29:41 -07:29:44 -07:29:46 -07:29:48 -07:29:51 -07:29:54 -07:29:56 -07:30:01 -07:30:08 -07:30:12 -07:30:16 -07:30:21 -07:30:24 -07:30:27 -07:30:31 -07:30:34 -07:30:38 -07:30:42 -07:30:45 -07:30:50 -07:30:56 -07:31:07 -07:31:19 -07:31:24 -07:31:28 -07:31:34 -07:31:42 -07:31:46 -07:31:51 -07:31:57 -07:32:00 -07:32:04 -07:32:07 -07:32:09 -07:32:12 -07:32:15 -07:32:17 -07:32:19 -07:32:22 -07:32:24 -07:32:27 -07:32:31 -07:32:33 -07:32:36 -07:32:38 -07:32:41 -07:32:43 -07:32:46 -07:32:48 -07:32:51 -07:32:53 -07:32:54 -07:32:58 -07:33:00 -07:33:03 -07:33:05 -07:33:08 -07:33:13 -07:33:17 -07:33:20 -07:33:24 -07:33:26 -07:33:29 -07:33:31 -07:33:35 -07:33:38 -07:33:39 -07:33:41 -07:33:44 -07:33:45 -07:33:49 -07:33:50 -07:33:53 -07:33:58 -07:34:00 -07:34:02 -07:34:15 -07:34:17 -07:34:19 -07:34:23 -07:34:26 -07:34:31 -07:34:32 -07:34:37 -07:34:40 -07:34:44 -07:34:48 -07:34:52 -07:34:57 -07:35:01 -07:35:06 -07:35:11 -07:35:15 -07:35:19 -07:35:24 -07:35:34 -07:35:39 -07:35:44 -07:35:50 -07:35:52 -07:35:55 -07:35:57 -07:36:00 -07:36:03 -07:36:05 -07:36:08 -07:36:11 -07:36:14 -07:36:18 -07:36:20 -07:36:23 -07:36:31 -07:36:33 -07:36:36 -07:36:40 -07:36:45 -07:36:48 -07:36:52 -07:36:54 -07:36:57 -07:37:01 -07:37:05 -07:37:09 -07:37:12 -07:37:16 -07:37:23 -07:37:29 -07:37:33 -07:37:41 -07:37:46 -07:37:52 -07:38:07 -07:38:11 -07:38:24 -07:38:27 -07:38:30 -07:38:34 -07:38:37 -07:38:39 -07:38:41 -07:38:43 -07:38:46 -07:38:50 -07:38:52 -07:38:54 -07:38:56 -07:39:01 -07:39:06 -07:39:10 -07:39:12 -07:39:15 -07:39:18 -07:39:22 -07:39:25 -07:39:29 -07:39:32 -07:39:36 -07:39:42 -07:39:45 -07:39:51 -07:39:56 -07:40:04 -07:40:09 -07:40:15 -07:40:29 -07:40:33 -07:40:37 -07:40:40 -07:40:43 -07:40:48 -07:41:00 -07:41:05 -07:41:10 -07:41:14 -07:41:19 -07:41:23 -07:41:28 -07:41:31 -07:41:34 -07:41:39 -07:41:41 -07:41:50 -07:41:52 -07:41:57 -07:41:59 -07:42:04 -07:42:07 -07:42:11 -07:42:14 -07:42:16 -07:42:21 -07:42:26 -07:42:31 -07:42:38 -07:42:44 -07:42:47 -07:43:06 -07:43:26 -07:43:29 -07:43:35 -07:43:43 -07:43:48 -07:43:53 -07:43:59 -07:44:03 -07:44:08 -07:44:15 -07:44:18 -07:44:22 -07:44:26 -07:44:30 -07:44:35 -07:44:39 -07:44:42 -07:44:45 -07:44:48 -07:44:51 -07:44:54 -07:44:57 -07:45:00 -07:45:03 -07:45:05 -07:45:10 -07:45:13 -07:45:17 -07:45:21 -07:45:24 -07:45:27 -07:45:30 -07:45:33 -07:45:35 -07:45:38 -07:45:42 -07:45:45 -07:45:49 -07:45:55 -07:45:57 -07:46:02 -07:46:05 -07:46:08 -07:46:13 -07:46:19 -07:46:23 -07:46:29 -07:46:34 -07:46:41 -07:46:57 -07:47:02 -07:47:21 -07:47:24 -07:47:28 -07:47:31 -07:47:33 -07:47:33 -07:47:37 -07:47:40 -07:47:45 -07:47:49 -07:47:52 -07:47:54 -07:47:57 -07:48:00 -07:48:06 -07:48:09 -07:48:12 -07:48:15 -07:48:17 -07:48:20 -07:48:24 -07:48:29 -07:48:31 -07:48:33 -07:48:38 -07:48:39 -07:48:42 -07:48:44 -07:48:47 -07:48:49 -07:48:54 -07:48:58 -07:49:01 -07:49:05 -07:49:08 -07:49:10 -07:49:13 -07:49:17 -07:49:20 -07:49:24 -07:49:28 -07:49:33 -07:49:45 -07:49:51 -07:49:57 -07:50:04 -07:50:09 -07:50:15 -07:50:19 -07:50:22 -07:50:24 -07:50:26 -07:50:29 -07:50:31 -07:50:35 -07:50:37 -07:50:41 -07:50:44 -07:50:47 -07:50:50 -07:50:52 -07:50:54 -07:50:56 -07:50:58 -07:51:01 -07:51:04 -07:51:07 -07:51:09 -07:51:13 -07:51:16 -07:51:20 -07:51:27 -07:51:34 -07:51:38 -07:51:42 -07:51:46 -07:51:50 -07:51:54 -07:51:58 -07:52:03 -07:52:06 -07:52:09 -07:52:13 -07:52:16 -07:52:19 -07:52:22 -07:52:24 -07:52:28 -07:52:31 -07:52:34 -07:52:38 -07:52:41 -07:52:46 -07:52:49 -07:52:52 -07:52:55 -07:53:01 -07:53:04 -07:53:06 -07:53:09 -07:53:11 -07:53:14 -07:53:17 -07:53:20 -07:53:23 -07:53:26 -07:53:29 -07:53:34 -07:53:37 -07:53:39 -07:53:42 -07:53:45 -07:53:50 -07:53:52 -07:53:56 -07:53:59 -07:54:03 -07:54:08 -07:54:12 -07:54:16 -07:54:28 -07:54:37 -07:54:43 -07:54:53 -07:54:56 -07:54:58 -07:55:02 -07:55:05 -07:55:08 -07:55:11 -07:55:14 -07:55:18 -07:55:21 -07:55:24 -07:55:27 -07:55:29 -07:55:32 -07:55:35 -07:55:39 -07:55:42 -07:55:44 -07:55:46 -07:55:49 -07:55:52 -07:55:54 -07:55:58 -07:56:01 -07:56:04 -07:56:06 -07:56:10 -07:56:14 -07:56:16 -07:56:20 -07:56:23 -07:56:28 -07:56:31 -07:56:34 -07:56:37 -07:56:41 -07:56:44 -07:56:48 -07:56:53 -07:57:16 -07:57:19 -07:57:22 -07:57:26 -07:57:28 -07:57:32 -07:57:35 -07:57:40 -07:57:42 -07:57:44 -07:57:48 -07:57:51 -07:57:54 -07:57:58 -07:58:01 -07:58:05 -07:58:07 -07:58:11 -07:58:13 -07:58:15 -07:58:16 -07:58:18 -07:58:21 -07:58:25 -07:58:28 -07:58:31 -07:58:33 -07:58:36 -07:58:39 -07:58:44 -07:58:49 -07:58:56 -07:58:59 -07:59:03 -07:59:05 -07:59:07 -07:59:10 -07:59:14 -07:59:21 -07:59:23 -07:59:28 -07:59:31 -07:59:35 -07:59:40 -07:59:49 -07:59:55 -08:00:03 -08:00:09 -08:00:12 -08:00:16 -08:00:19 -08:00:22 -08:00:25 -08:00:28 -08:00:32 -08:00:36 -08:00:39 -08:00:42 -08:00:45 -08:00:48 -08:00:51 -08:00:54 -08:00:56 -08:00:59 -08:01:02 -08:01:06 -08:01:09 -08:01:13 -08:01:17 -08:01:23 -08:01:27 -08:01:29 -08:01:33 -08:01:36 -08:01:40 -08:01:48 -08:01:53 -08:01:59 -08:02:08 -08:02:15 -08:02:43 -08:02:47 -08:02:51 -08:02:54 -08:02:57 -08:03:00 -08:03:05 -08:03:08 -08:03:12 -08:03:19 -08:03:22 -08:03:25 -08:03:29 -08:03:34 -08:03:39 -08:03:42 -08:03:47 -08:03:54 -08:03:56 -08:04:00 -08:04:11 -08:04:16 -08:04:18 -08:04:21 -08:04:25 -08:04:30 -08:04:35 -08:04:37 -08:04:40 -08:04:43 -08:04:45 -08:04:48 -08:04:51 -08:04:54 -08:04:57 -08:05:00 -08:05:04 -08:05:07 -08:05:09 -08:05:12 -08:05:15 -08:05:18 -08:05:20 -08:05:23 -08:05:26 -08:05:29 -08:05:31 -08:05:33 -08:05:37 -08:05:40 -08:05:42 -08:05:44 -08:05:48 -08:05:50 -08:05:59 -08:06:02 -08:06:05 -08:06:08 -08:06:11 -08:06:26 -08:06:30 -08:06:32 -08:06:35 -08:06:38 -08:06:41 -08:06:44 -08:06:48 -08:06:50 -08:06:55 -08:06:57 -08:07:01 -08:07:03 -08:07:08 -08:07:10 -08:07:12 -08:07:14 -08:07:16 -08:07:22 -08:07:24 -08:07:28 -08:07:31 -08:07:33 -08:07:36 -08:07:40 -08:07:43 -08:07:46 -08:07:50 -08:07:54 -08:07:57 -08:08:00 -08:08:02 -08:08:05 -08:08:08 -08:08:10 -08:08:12 -08:08:17 -08:08:21 -08:08:25 -08:08:27 -08:08:29 -08:08:32 -08:08:34 -08:08:37 -08:08:41 -08:08:44 -08:08:46 -08:08:49 -08:08:51 -08:08:54 -08:08:56 -08:08:59 -08:09:03 -08:09:06 -08:09:09 -08:09:13 -08:09:17 -08:09:19 -08:09:20 -08:09:23 -08:09:26 -08:09:28 -08:09:34 -08:09:37 -08:09:40 -08:09:43 -08:09:46 -08:09:48 -08:09:50 -08:09:52 -08:09:56 -08:09:59 -08:10:02 -08:10:14 -08:10:20 -08:10:25 -08:10:30 -08:10:34 -08:10:36 -08:10:40 -08:10:44 -08:10:49 -08:10:52 -08:10:55 -08:10:59 -08:11:00 -08:11:03 -08:11:06 -08:11:10 -08:11:14 -08:11:16 -08:11:19 -08:11:23 -08:11:25 -08:11:27 -08:11:30 -08:11:32 -08:11:34 -08:11:36 -08:11:38 -08:11:42 -08:11:47 -08:11:49 -08:11:52 -08:11:55 -08:11:59 -08:12:01 -08:12:04 -08:12:06 -08:12:08 -08:12:11 -08:12:19 -08:12:23 -08:12:26 -08:12:29 -08:12:30 -08:12:32 -08:12:34 -08:12:37 -08:12:39 -08:12:41 -08:12:43 -08:12:46 -08:12:48 -08:12:49 -08:12:54 -08:12:55 -08:13:00 -08:13:07 -08:13:15 -08:13:17 -08:13:20 -08:13:22 -08:13:24 -08:13:26 -08:13:31 -08:13:41 -08:13:51 -08:13:56 -08:13:59 -08:14:07 -08:14:12 -08:14:14 -08:14:17 -08:14:20 -08:14:24 -08:14:26 -08:14:29 -08:14:32 -08:14:34 -08:14:40 -08:14:42 -08:14:44 -08:14:46 -08:14:50 -08:14:52 -08:14:55 -08:14:58 -08:14:59 -08:15:01 -08:15:02 -08:15:08 -08:15:09 -08:15:11 -08:15:13 -08:15:15 -08:15:17 -08:15:19 -08:15:23 -08:15:26 -08:15:29 -08:15:31 -08:15:33 -08:15:35 -08:15:38 -08:15:39 -08:15:42 -08:15:44 -08:15:46 -08:15:48 -08:15:52 -08:15:55 -08:15:56 -08:16:00 -08:16:01 -08:16:03 -08:16:05 -08:16:08 -08:16:11 -08:16:13 -08:16:14 -08:16:16 -08:16:18 -08:16:19 -08:16:22 -08:16:24 -08:16:26 -08:16:28 -08:16:31 -08:16:35 -08:16:38 -08:16:43 -08:16:46 -08:16:48 -08:16:50 -08:16:54 -08:16:56 -08:16:59 -08:17:02 -08:17:04 -08:17:06 -08:17:10 -08:17:15 -08:17:47 -08:17:54 -08:17:58 -08:18:02 -08:18:05 -08:18:10 -08:18:13 -08:18:18 -08:18:21 -08:18:24 -08:18:28 -08:18:30 -08:18:33 -08:18:37 -08:18:39 -08:18:45 -08:18:48 -08:18:50 -08:18:54 -08:18:56 -08:18:59 -08:19:02 -08:19:04 -08:19:07 -08:19:10 -08:19:14 -08:19:17 -08:19:19 -08:19:21 -08:19:24 -08:19:27 -08:19:31 -08:19:36 -08:19:39 -08:19:42 -08:19:45 -08:19:47 -08:19:49 -08:19:52 -08:19:54 -08:19:55 -08:19:59 -08:20:01 -08:20:03 -08:20:06 -08:20:08 -08:20:17 -08:20:19 -08:20:21 -08:20:23 -08:20:25 -08:20:29 -08:20:32 -08:20:34 -08:20:36 -08:20:39 -08:20:43 -08:20:46 -08:20:47 -08:20:50 -08:20:53 -08:20:57 -08:20:59 -08:21:02 -08:21:05 -08:21:09 -08:21:12 -08:21:29 -08:21:34 -08:21:50 -08:21:54 -08:22:00 -08:22:22 -08:22:27 -08:22:30 -08:22:39 -08:22:41 -08:22:44 -08:22:46 -08:22:49 -08:22:51 -08:22:53 -08:22:56 -08:22:58 -08:23:00 -08:23:04 -08:23:05 -08:23:07 -08:23:09 -08:23:12 -08:23:16 -08:23:19 -08:23:20 -08:23:22 -08:23:24 -08:23:26 -08:23:28 -08:23:30 -08:23:32 -08:23:34 -08:23:38 -08:23:40 -08:23:43 -08:23:47 -08:23:55 -08:23:59 -08:24:04 -08:24:08 -08:24:12 -08:24:17 -08:24:22 -08:24:25 -08:24:28 -08:24:35 -08:24:37 -08:24:40 -08:24:46 -08:24:50 -08:24:53 -08:24:56 -08:24:59 -08:25:03 -08:25:07 -08:25:09 -08:25:12 -08:25:16 -08:25:19 -08:25:23 -08:25:29 -08:25:32 -08:25:36 -08:25:41 -08:25:45 -08:25:50 -08:25:54 -08:25:57 -08:26:01 -08:26:04 -08:26:07 -08:26:10 -08:26:13 -08:26:18 -08:26:22 -08:26:27 -08:26:32 -08:26:37 -08:26:41 -08:26:44 -08:26:48 -08:26:52 -08:26:55 -08:27:00 -08:27:03 -08:27:07 -08:27:10 -08:27:14 -08:27:18 -08:27:21 -08:27:25 -08:27:31 -08:27:34 -08:27:37 -08:27:40 -08:27:43 -08:27:46 -08:27:50 -08:27:54 -08:27:57 -08:27:59 -08:28:03 -08:28:06 -08:28:08 -08:28:10 -08:28:12 -08:28:15 -08:28:18 -08:28:21 -08:28:24 -08:28:28 -08:28:31 -08:28:34 -08:28:36 -08:28:38 -08:28:40 -08:28:43 -08:28:47 -08:28:49 -08:28:52 -08:29:00 -08:29:06 -08:29:10 -08:29:14 -08:29:34 -08:29:45 -08:29:51 -08:29:57 -08:29:59 -08:30:03 -08:30:09 -08:30:18 -08:30:22 -08:30:27 -08:30:31 -08:30:35 -08:30:41 -08:30:44 -08:30:49 -08:30:54 -08:31:02 -08:31:06 -08:31:13 -08:31:19 -08:31:26 -08:31:29 -08:31:33 -08:31:37 -08:31:43 -08:31:48 -08:31:51 -08:31:53 -08:32:02 -08:32:05 -08:32:10 -08:32:14 -08:32:19 -08:32:23 -08:32:26 -08:32:29 -08:32:33 -08:32:38 -08:32:43 -08:32:48 -08:32:51 -08:32:57 -08:33:04 -08:33:10 -08:33:24 -08:33:27 -08:33:30 -08:33:37 -08:33:39 -08:33:41 -08:33:46 -08:33:49 -08:33:51 -08:33:55 -08:33:57 -08:34:01 -08:34:06 -08:34:08 -08:34:13 -08:34:16 -08:34:22 -08:34:25 -08:34:27 -08:34:29 -08:34:31 -08:34:34 -08:34:37 -08:34:40 -08:34:43 -08:34:44 -08:34:46 -08:34:49 -08:34:51 -08:34:54 -08:34:57 -08:34:58 -08:35:01 -08:35:12 -08:35:16 -08:35:20 -08:35:21 -08:35:23 -08:35:25 -08:35:29 -08:35:35 -08:35:37 -08:35:40 -08:35:44 -08:35:48 -08:35:50 -08:35:53 -08:35:56 -08:35:59 -08:36:01 -08:36:05 -08:36:13 -08:36:20 -08:36:25 -08:36:30 -08:36:34 -08:36:39 -08:36:43 -08:36:54 -08:36:57 -08:37:01 -08:37:06 -08:37:09 -08:37:13 -08:37:17 -08:37:23 -08:37:25 -08:37:30 -08:37:35 -08:37:41 -08:37:45 -08:37:49 -08:37:56 -08:38:00 -08:38:05 -08:38:10 -08:38:15 -08:38:21 -08:38:26 -08:38:29 -08:38:32 -08:38:36 -08:38:41 -08:38:45 -08:38:52 -08:38:57 -08:39:00 -08:39:03 -08:39:06 -08:39:08 -08:39:13 -08:39:14 -08:39:17 -08:39:21 -08:39:26 -08:39:30 -08:39:35 -08:39:40 -08:39:45 -08:39:48 -08:39:51 -08:39:56 -08:39:58 -08:40:05 -08:40:09 -08:40:16 -08:40:21 -08:40:26 -08:40:32 -08:40:37 -08:40:41 -08:40:45 -08:40:49 -08:40:52 -08:40:57 -08:41:02 -08:41:05 -08:41:08 -08:41:11 -08:41:14 -08:41:19 -08:41:20 -08:41:22 -08:41:25 -08:41:29 -08:41:31 -08:41:36 -08:41:38 -08:41:40 -08:41:43 -08:41:46 -08:41:48 -08:41:50 -08:41:53 -08:41:56 -08:42:01 -08:42:04 -08:42:08 -08:42:11 -08:42:14 -08:42:17 -08:42:21 -08:42:24 -08:42:28 -08:42:31 -08:42:35 -08:42:38 -08:42:41 -08:42:45 -08:42:50 -08:42:54 -08:42:58 -08:43:04 -08:43:10 -08:43:14 -08:43:22 -08:43:29 -08:43:40 -08:44:31 -08:44:34 -08:44:42 -08:44:47 -08:44:57 -08:45:04 -08:45:10 -08:45:14 -08:45:22 -08:45:29 -08:45:33 -08:45:38 -08:45:40 -08:45:48 -08:45:53 -08:45:58 -08:46:02 -08:46:08 -08:46:13 -08:46:20 -08:46:27 -08:46:33 -08:46:39 -08:46:45 -08:46:51 -08:46:59 -08:47:21 -08:47:33 -08:47:45 -08:47:50 -08:47:55 -08:48:00 -08:48:21 -08:48:25 -08:48:32 -08:48:36 -08:48:41 -08:48:49 -08:48:55 -08:49:03 -08:49:08 -08:49:15 -08:49:22 -08:49:28 -08:49:34 -08:49:54 -08:49:59 -08:50:02 -08:50:06 -08:50:11 -08:50:13 -08:50:16 -08:50:20 -08:50:32 -08:50:37 -08:50:41 -08:50:45 -08:50:49 -08:50:52 -08:50:56 -08:51:04 -08:51:11 -08:51:15 -08:51:19 -08:51:24 -08:51:34 -08:51:39 -08:51:47 -08:51:53 -08:52:00 -08:52:03 -08:52:08 -08:52:13 -08:52:20 -08:52:24 -08:52:52 -08:52:59 -08:53:35 -08:53:39 -08:53:46 -08:53:51 -08:53:57 -08:54:02 -08:54:05 -08:54:08 -08:54:11 -08:54:15 -08:54:18 -08:54:21 -08:54:25 -08:54:33 -08:54:35 -08:54:39 -08:54:42 -08:54:46 -08:54:48 -08:54:51 -08:54:54 -08:54:58 -08:55:01 -08:55:06 -08:55:10 -08:55:15 -08:55:20 -08:55:28 -08:55:31 -08:55:34 -08:55:36 -08:55:39 -08:55:42 -08:55:45 -08:55:48 -08:55:50 -08:55:52 -08:55:54 -08:56:00 -08:56:02 -08:56:05 -08:56:10 -08:56:12 -08:56:15 -08:56:18 -08:56:20 -08:56:24 -08:56:27 -08:56:29 -08:56:32 -08:56:35 -08:56:37 -08:56:40 -08:56:50 -08:56:56 -08:56:59 -08:57:03 -08:57:07 -08:57:12 -08:57:15 -08:57:19 -08:57:22 -08:57:32 -08:57:35 -08:57:39 -08:57:42 -08:57:44 -08:57:46 -08:57:47 -08:57:53 -08:57:55 -08:57:58 -08:58:06 -08:58:08 -08:58:10 -08:58:12 -08:58:15 -08:58:17 -08:58:23 -08:58:25 -08:58:29 -08:58:32 -08:58:35 -08:58:38 -08:58:40 -08:58:44 -08:58:47 -08:58:50 -08:58:52 -08:58:56 -08:59:01 -08:59:04 -08:59:07 -08:59:10 -08:59:12 -08:59:16 -08:59:20 -08:59:25 -08:59:30 -08:59:34 -08:59:37 -08:59:41 -08:59:43 -08:59:47 -08:59:53 -08:59:57 -09:00:00 -09:00:03 -09:00:06 -09:00:11 -09:00:13 -09:00:16 -09:00:20 -09:00:23 -09:00:27 -09:00:29 -09:00:31 -09:00:33 -09:00:35 -09:00:38 -09:00:43 -09:00:45 -09:00:47 -09:00:49 -09:00:51 -09:00:54 -09:00:55 -09:00:57 -09:01:00 -09:01:03 -09:01:06 -09:01:08 -09:01:10 -09:01:13 -09:01:17 -09:01:19 -09:01:21 -09:01:23 -09:01:25 -09:01:27 -09:01:28 -09:01:30 -09:01:33 -09:01:36 -09:01:37 -09:01:42 -09:01:44 -09:01:45 -09:01:48 -09:01:53 -09:01:55 -09:01:57 -09:02:00 -09:02:01 -09:02:03 -09:02:04 -09:02:08 -09:02:11 -09:02:14 -09:02:16 -09:02:21 -09:02:22 -09:02:24 -09:02:26 -09:02:28 -09:02:31 -09:02:32 -09:02:34 -09:02:37 -09:02:38 -09:02:40 -09:02:43 -09:02:46 -09:02:47 -09:02:49 -09:02:51 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_8.txt sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_8.txt --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_8.txt 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/obstimes_2_8.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2293 +0,0 @@ -06:49:46 -06:49:47 -06:49:49 -06:49:50 -06:49:51 -06:49:52 -06:49:55 -06:49:57 -06:49:58 -06:50:00 -06:50:02 -06:50:03 -06:50:05 -06:50:07 -06:50:09 -06:50:16 -06:50:17 -06:50:19 -06:50:20 -06:50:22 -06:50:24 -06:50:25 -06:50:27 -06:50:29 -06:50:30 -06:50:35 -06:50:38 -06:50:40 -06:50:42 -06:50:43 -06:50:44 -06:50:45 -06:50:46 -06:50:48 -06:50:51 -06:50:54 -06:50:56 -06:50:57 -06:51:07 -06:51:10 -06:51:11 -06:51:12 -06:51:17 -06:51:18 -06:51:20 -06:51:23 -06:51:30 -06:51:32 -06:51:36 -06:51:39 -06:51:45 -06:51:49 -06:51:51 -06:51:53 -06:51:56 -06:51:59 -06:52:00 -06:52:02 -06:52:03 -06:52:05 -06:52:06 -06:52:07 -06:52:08 -06:52:10 -06:52:12 -06:52:15 -06:52:17 -06:52:19 -06:52:20 -06:52:24 -06:52:26 -06:52:30 -06:52:31 -06:52:32 -06:52:34 -06:52:36 -06:52:38 -06:52:39 -06:52:41 -06:52:42 -06:52:43 -06:52:44 -06:52:45 -06:52:48 -06:52:50 -06:52:52 -06:52:53 -06:52:55 -06:52:57 -06:53:00 -06:53:03 -06:53:05 -06:53:06 -06:53:08 -06:53:09 -06:54:09 -06:54:11 -06:54:15 -06:54:16 -06:54:17 -06:54:19 -06:54:24 -06:54:27 -06:54:30 -06:54:31 -06:54:41 -06:54:43 -06:54:44 -06:54:45 -06:54:50 -06:54:52 -06:54:56 -06:54:57 -06:54:58 -06:54:59 -06:55:01 -06:55:03 -06:55:04 -06:55:08 -06:55:11 -06:55:14 -06:55:16 -06:55:22 -06:55:24 -06:55:27 -06:55:29 -06:55:30 -06:55:32 -06:55:34 -06:55:44 -06:55:46 -06:55:48 -06:55:55 -06:55:57 -06:55:59 -06:56:01 -06:56:03 -06:56:04 -06:56:08 -06:56:10 -06:56:11 -06:56:13 -06:56:15 -06:56:19 -06:56:20 -06:56:22 -06:56:25 -06:56:26 -06:56:27 -06:56:28 -06:56:30 -06:56:36 -06:56:38 -06:56:40 -06:56:43 -06:56:47 -06:56:49 -06:56:53 -06:56:55 -06:56:57 -06:57:00 -06:57:04 -06:57:06 -06:57:09 -06:57:12 -06:57:13 -06:57:15 -06:57:16 -06:57:19 -06:57:20 -06:57:22 -06:57:23 -06:57:25 -06:57:29 -06:57:31 -06:57:33 -06:57:37 -06:57:37 -06:57:38 -06:57:39 -06:57:41 -06:57:45 -06:57:48 -06:57:49 -06:57:51 -06:57:53 -06:57:54 -06:57:56 -06:57:59 -06:58:01 -06:58:05 -06:58:07 -06:58:08 -06:58:10 -06:58:12 -06:58:14 -06:58:19 -06:58:21 -06:58:25 -06:58:42 -06:58:46 -06:58:48 -06:58:50 -06:58:53 -06:58:56 -06:58:58 -06:59:00 -06:59:02 -06:59:04 -06:59:05 -06:59:07 -06:59:09 -06:59:10 -06:59:12 -06:59:14 -06:59:15 -06:59:16 -06:59:18 -06:59:20 -06:59:21 -06:59:25 -06:59:27 -06:59:29 -06:59:32 -06:59:34 -06:59:36 -06:59:39 -06:59:40 -06:59:43 -06:59:45 -06:59:46 -06:59:48 -06:59:50 -06:59:53 -06:59:56 -06:59:58 -06:59:59 -07:00:01 -07:00:04 -07:00:06 -07:00:07 -07:00:09 -07:00:11 -07:00:13 -07:00:34 -07:00:35 -07:00:37 -07:00:40 -07:00:43 -07:00:46 -07:00:48 -07:00:53 -07:00:57 -07:01:02 -07:01:18 -07:01:22 -07:01:24 -07:01:25 -07:01:27 -07:01:30 -07:01:33 -07:01:35 -07:01:37 -07:01:39 -07:01:41 -07:01:43 -07:01:44 -07:01:46 -07:01:48 -07:01:51 -07:01:53 -07:01:55 -07:01:57 -07:01:59 -07:02:01 -07:02:03 -07:02:05 -07:02:07 -07:02:08 -07:02:10 -07:02:13 -07:02:16 -07:02:18 -07:02:20 -07:02:21 -07:02:23 -07:02:24 -07:02:26 -07:02:28 -07:02:29 -07:02:32 -07:02:35 -07:02:36 -07:02:38 -07:02:40 -07:02:42 -07:02:43 -07:02:45 -07:02:46 -07:02:48 -07:02:50 -07:02:53 -07:02:55 -07:02:56 -07:02:58 -07:02:59 -07:03:01 -07:03:02 -07:03:05 -07:03:06 -07:03:09 -07:03:11 -07:03:13 -07:03:14 -07:03:16 -07:03:19 -07:03:21 -07:03:22 -07:03:24 -07:03:27 -07:03:31 -07:03:34 -07:03:35 -07:03:38 -07:03:41 -07:03:44 -07:03:45 -07:03:47 -07:03:50 -07:03:53 -07:04:29 -07:04:32 -07:04:34 -07:04:38 -07:04:40 -07:04:42 -07:04:44 -07:04:46 -07:04:47 -07:04:50 -07:04:52 -07:04:55 -07:04:57 -07:04:59 -07:05:01 -07:05:05 -07:05:07 -07:05:08 -07:05:10 -07:05:12 -07:05:15 -07:05:17 -07:05:19 -07:05:22 -07:05:24 -07:05:26 -07:05:27 -07:05:30 -07:05:31 -07:05:32 -07:05:35 -07:05:38 -07:05:40 -07:05:42 -07:05:44 -07:05:45 -07:05:48 -07:05:51 -07:05:53 -07:05:55 -07:05:56 -07:05:59 -07:06:00 -07:06:02 -07:06:05 -07:06:07 -07:06:08 -07:06:10 -07:06:11 -07:06:16 -07:06:17 -07:06:19 -07:06:24 -07:06:27 -07:06:29 -07:06:30 -07:06:31 -07:06:33 -07:06:34 -07:06:37 -07:06:45 -07:06:47 -07:06:49 -07:06:50 -07:06:52 -07:06:56 -07:06:58 -07:07:01 -07:07:04 -07:07:08 -07:07:36 -07:07:38 -07:07:41 -07:07:43 -07:07:45 -07:07:48 -07:07:50 -07:07:52 -07:07:55 -07:07:56 -07:07:58 -07:08:00 -07:08:02 -07:08:03 -07:08:05 -07:08:08 -07:08:09 -07:08:11 -07:08:12 -07:08:15 -07:08:17 -07:08:19 -07:08:22 -07:08:25 -07:08:26 -07:08:27 -07:08:29 -07:08:31 -07:08:36 -07:08:37 -07:08:38 -07:08:40 -07:08:42 -07:08:44 -07:08:47 -07:08:49 -07:08:52 -07:08:55 -07:08:57 -07:09:00 -07:09:02 -07:09:04 -07:09:09 -07:09:12 -07:09:17 -07:09:22 -07:09:24 -07:09:26 -07:09:28 -07:09:29 -07:09:31 -07:09:32 -07:09:34 -07:09:37 -07:09:38 -07:09:41 -07:09:42 -07:09:44 -07:09:46 -07:09:47 -07:09:49 -07:09:51 -07:09:53 -07:09:55 -07:09:57 -07:09:59 -07:10:00 -07:10:03 -07:10:04 -07:10:07 -07:10:08 -07:10:09 -07:10:11 -07:10:13 -07:10:15 -07:10:17 -07:10:18 -07:10:20 -07:10:23 -07:10:25 -07:10:27 -07:10:29 -07:10:31 -07:10:31 -07:10:33 -07:10:35 -07:10:38 -07:10:43 -07:10:45 -07:10:46 -07:10:48 -07:10:49 -07:10:51 -07:10:54 -07:10:56 -07:10:58 -07:11:00 -07:11:02 -07:11:06 -07:11:08 -07:11:10 -07:11:13 -07:11:15 -07:11:18 -07:11:20 -07:11:24 -07:11:29 -07:11:32 -07:11:46 -07:11:50 -07:11:52 -07:11:54 -07:11:56 -07:11:58 -07:11:59 -07:12:01 -07:12:03 -07:12:06 -07:12:09 -07:12:11 -07:12:13 -07:12:16 -07:12:18 -07:12:19 -07:12:24 -07:12:25 -07:12:26 -07:12:29 -07:12:31 -07:12:33 -07:12:36 -07:12:38 -07:12:40 -07:12:42 -07:12:44 -07:12:46 -07:12:48 -07:12:50 -07:12:52 -07:12:54 -07:12:58 -07:13:00 -07:13:03 -07:13:04 -07:13:06 -07:13:07 -07:13:09 -07:13:12 -07:13:14 -07:13:16 -07:13:20 -07:13:26 -07:13:28 -07:13:31 -07:13:35 -07:13:38 -07:13:42 -07:13:46 -07:13:52 -07:13:58 -07:14:04 -07:14:35 -07:14:38 -07:14:41 -07:14:43 -07:14:46 -07:14:49 -07:14:52 -07:14:53 -07:14:57 -07:14:58 -07:15:01 -07:15:04 -07:15:06 -07:15:08 -07:15:09 -07:15:11 -07:15:12 -07:15:14 -07:15:16 -07:15:17 -07:15:20 -07:15:23 -07:15:24 -07:15:27 -07:15:30 -07:15:31 -07:15:34 -07:15:35 -07:15:38 -07:15:40 -07:15:42 -07:15:44 -07:15:46 -07:15:48 -07:15:50 -07:15:52 -07:15:53 -07:15:55 -07:15:57 -07:15:59 -07:16:01 -07:16:03 -07:16:04 -07:16:06 -07:16:09 -07:16:11 -07:16:13 -07:16:15 -07:16:17 -07:16:18 -07:16:20 -07:16:23 -07:16:24 -07:16:26 -07:16:34 -07:16:35 -07:16:37 -07:16:39 -07:16:40 -07:16:42 -07:16:44 -07:16:45 -07:16:55 -07:16:58 -07:17:00 -07:17:02 -07:17:05 -07:17:08 -07:17:09 -07:17:13 -07:17:15 -07:17:17 -07:17:20 -07:17:22 -07:17:29 -07:17:32 -07:17:35 -07:17:38 -07:17:44 -07:17:48 -07:18:08 -07:18:11 -07:18:14 -07:18:17 -07:18:20 -07:18:24 -07:18:26 -07:18:28 -07:18:31 -07:18:32 -07:18:35 -07:18:37 -07:18:40 -07:18:41 -07:18:43 -07:18:45 -07:18:48 -07:18:50 -07:18:53 -07:18:56 -07:18:57 -07:19:01 -07:19:03 -07:19:05 -07:19:07 -07:19:09 -07:19:12 -07:19:13 -07:19:15 -07:19:18 -07:19:19 -07:19:20 -07:19:23 -07:19:25 -07:19:27 -07:19:28 -07:19:30 -07:19:33 -07:19:35 -07:19:39 -07:19:41 -07:19:44 -07:19:47 -07:19:50 -07:19:52 -07:19:56 -07:20:33 -07:20:37 -07:20:40 -07:20:43 -07:20:46 -07:20:48 -07:20:50 -07:20:52 -07:20:54 -07:20:57 -07:21:00 -07:21:03 -07:21:04 -07:21:06 -07:21:08 -07:21:10 -07:21:11 -07:21:13 -07:21:15 -07:21:17 -07:21:21 -07:21:25 -07:21:27 -07:21:29 -07:21:31 -07:21:33 -07:21:37 -07:21:41 -07:21:44 -07:21:47 -07:21:49 -07:21:55 -07:22:01 -07:22:12 -07:22:15 -07:22:18 -07:22:20 -07:22:23 -07:22:24 -07:22:27 -07:22:30 -07:22:32 -07:22:35 -07:22:38 -07:22:41 -07:22:43 -07:22:47 -07:22:51 -07:22:52 -07:22:54 -07:22:57 -07:22:59 -07:23:03 -07:23:05 -07:23:09 -07:23:28 -07:23:37 -07:23:49 -07:23:52 -07:23:55 -07:23:58 -07:24:00 -07:24:03 -07:24:05 -07:24:07 -07:24:09 -07:24:11 -07:24:13 -07:24:15 -07:24:17 -07:24:18 -07:24:21 -07:24:24 -07:24:28 -07:24:31 -07:24:34 -07:24:35 -07:24:37 -07:24:39 -07:24:42 -07:24:43 -07:24:46 -07:24:48 -07:24:50 -07:24:54 -07:24:57 -07:25:00 -07:25:02 -07:25:04 -07:25:07 -07:25:10 -07:25:12 -07:25:14 -07:25:18 -07:25:19 -07:25:21 -07:25:26 -07:25:29 -07:25:33 -07:25:35 -07:25:37 -07:25:38 -07:25:40 -07:25:43 -07:25:45 -07:25:46 -07:25:49 -07:25:51 -07:25:54 -07:25:56 -07:25:57 -07:26:04 -07:26:05 -07:26:07 -07:26:08 -07:26:11 -07:26:17 -07:26:26 -07:26:35 -07:27:02 -07:27:04 -07:27:06 -07:27:09 -07:27:11 -07:27:14 -07:27:16 -07:27:21 -07:27:25 -07:27:27 -07:27:29 -07:27:31 -07:27:33 -07:27:35 -07:27:37 -07:27:39 -07:27:40 -07:27:41 -07:27:45 -07:27:46 -07:27:48 -07:27:50 -07:27:53 -07:27:54 -07:27:57 -07:28:00 -07:28:03 -07:28:04 -07:28:06 -07:28:09 -07:28:11 -07:28:14 -07:28:16 -07:28:18 -07:28:23 -07:28:25 -07:28:27 -07:28:32 -07:28:40 -07:28:49 -07:29:17 -07:29:20 -07:29:23 -07:29:25 -07:29:30 -07:29:33 -07:29:35 -07:29:37 -07:29:39 -07:29:44 -07:29:46 -07:29:48 -07:29:51 -07:29:52 -07:29:59 -07:30:01 -07:30:04 -07:30:07 -07:30:12 -07:30:25 -07:30:50 -07:30:53 -07:30:56 -07:30:58 -07:31:00 -07:31:04 -07:31:06 -07:31:08 -07:31:10 -07:31:14 -07:31:16 -07:31:18 -07:31:20 -07:31:22 -07:31:24 -07:31:26 -07:31:28 -07:31:31 -07:31:33 -07:31:34 -07:31:36 -07:31:38 -07:31:40 -07:31:41 -07:31:43 -07:31:48 -07:31:50 -07:31:54 -07:31:56 -07:31:59 -07:32:01 -07:32:03 -07:32:05 -07:32:07 -07:32:09 -07:32:11 -07:32:14 -07:32:17 -07:32:22 -07:32:28 -07:32:31 -07:32:32 -07:32:34 -07:32:36 -07:32:37 -07:32:40 -07:32:47 -07:32:49 -07:32:53 -07:32:55 -07:32:56 -07:32:59 -07:33:00 -07:33:02 -07:33:04 -07:33:05 -07:33:09 -07:33:11 -07:33:15 -07:33:18 -07:33:22 -07:33:23 -07:33:27 -07:33:31 -07:33:32 -07:33:36 -07:33:40 -07:33:44 -07:33:47 -07:34:34 -07:34:37 -07:34:40 -07:34:43 -07:34:46 -07:34:53 -07:34:56 -07:34:58 -07:35:01 -07:35:03 -07:35:06 -07:35:09 -07:35:12 -07:35:14 -07:35:17 -07:35:19 -07:35:22 -07:35:24 -07:35:26 -07:35:29 -07:35:31 -07:35:35 -07:35:37 -07:35:40 -07:35:43 -07:35:45 -07:35:48 -07:35:51 -07:35:53 -07:35:56 -07:35:59 -07:36:02 -07:36:07 -07:36:09 -07:36:14 -07:36:18 -07:36:22 -07:36:31 -07:36:38 -07:37:31 -07:37:35 -07:37:37 -07:37:40 -07:37:43 -07:37:46 -07:37:49 -07:37:53 -07:37:55 -07:37:57 -07:37:58 -07:38:01 -07:38:04 -07:38:06 -07:38:08 -07:38:10 -07:38:12 -07:38:15 -07:38:18 -07:38:20 -07:38:24 -07:38:27 -07:38:29 -07:38:32 -07:38:34 -07:38:36 -07:38:39 -07:38:43 -07:38:48 -07:38:53 -07:38:58 -07:39:03 -07:39:09 -07:39:52 -07:39:55 -07:39:58 -07:39:59 -07:40:01 -07:40:05 -07:40:06 -07:40:09 -07:40:10 -07:40:14 -07:40:16 -07:40:17 -07:40:19 -07:40:21 -07:40:22 -07:40:24 -07:40:27 -07:40:30 -07:40:32 -07:40:36 -07:40:38 -07:40:39 -07:40:40 -07:40:45 -07:40:56 -07:41:00 -07:41:02 -07:41:09 -07:41:13 -07:41:21 -07:42:05 -07:42:10 -07:42:13 -07:42:18 -07:42:24 -07:42:28 -07:42:33 -07:42:36 -07:42:41 -07:42:45 -07:42:47 -07:42:52 -07:42:54 -07:42:58 -07:43:01 -07:43:06 -07:43:10 -07:43:28 -07:43:33 -07:43:37 -07:43:44 -07:43:49 -07:43:52 -07:43:55 -07:43:57 -07:44:00 -07:44:02 -07:44:04 -07:44:08 -07:44:11 -07:44:15 -07:44:18 -07:44:20 -07:44:22 -07:44:25 -07:44:26 -07:44:31 -07:44:34 -07:44:36 -07:44:39 -07:44:42 -07:44:46 -07:44:48 -07:44:50 -07:44:54 -07:44:56 -07:44:59 -07:45:07 -07:45:12 -07:45:19 -07:46:24 -07:46:27 -07:46:30 -07:46:32 -07:46:34 -07:46:36 -07:46:38 -07:46:40 -07:46:44 -07:46:46 -07:46:48 -07:46:52 -07:46:55 -07:46:56 -07:46:58 -07:47:00 -07:47:04 -07:47:05 -07:47:07 -07:47:10 -07:47:13 -07:47:15 -07:47:20 -07:47:21 -07:47:23 -07:47:24 -07:47:26 -07:47:27 -07:47:31 -07:47:35 -07:47:37 -07:47:40 -07:47:43 -07:47:46 -07:47:49 -07:47:50 -07:47:54 -07:47:58 -07:48:00 -07:48:02 -07:48:06 -07:48:08 -07:48:12 -07:48:18 -07:48:26 -07:48:32 -07:49:03 -07:49:06 -07:49:08 -07:49:11 -07:49:13 -07:49:15 -07:49:21 -07:49:22 -07:49:24 -07:49:27 -07:49:29 -07:49:30 -07:49:33 -07:49:37 -07:49:40 -07:49:43 -07:49:46 -07:49:48 -07:49:50 -07:49:52 -07:49:55 -07:49:57 -07:50:00 -07:50:03 -07:50:05 -07:50:07 -07:50:10 -07:50:12 -07:50:15 -07:50:19 -07:50:22 -07:50:28 -07:50:30 -07:50:33 -07:50:36 -07:50:38 -07:50:42 -07:51:19 -07:51:22 -07:51:25 -07:51:29 -07:51:32 -07:51:33 -07:51:36 -07:51:38 -07:51:41 -07:51:45 -07:51:47 -07:51:49 -07:51:50 -07:51:52 -07:51:55 -07:51:56 -07:52:00 -07:52:03 -07:52:04 -07:52:06 -07:52:08 -07:52:10 -07:52:11 -07:52:14 -07:52:15 -07:52:17 -07:52:18 -07:52:20 -07:52:22 -07:52:24 -07:52:27 -07:52:35 -07:52:38 -07:52:43 -07:52:45 -07:52:48 -07:52:51 -07:52:54 -07:53:00 -07:53:06 -07:53:48 -07:53:50 -07:53:55 -07:53:59 -07:54:01 -07:54:04 -07:54:05 -07:54:07 -07:54:10 -07:54:13 -07:54:15 -07:54:17 -07:54:18 -07:54:21 -07:54:23 -07:54:26 -07:54:33 -07:54:37 -07:54:38 -07:54:40 -07:54:42 -07:54:45 -07:54:46 -07:54:47 -07:54:50 -07:54:52 -07:54:54 -07:54:57 -07:55:01 -07:55:03 -07:55:05 -07:55:07 -07:55:09 -07:55:12 -07:55:17 -07:55:19 -07:55:21 -07:55:24 -07:55:26 -07:55:29 -07:55:31 -07:55:33 -07:55:38 -07:55:40 -07:55:44 -07:55:52 -07:56:37 -07:56:41 -07:56:43 -07:56:46 -07:56:48 -07:56:50 -07:56:54 -07:56:56 -07:56:57 -07:57:01 -07:57:02 -07:57:05 -07:57:07 -07:57:10 -07:57:11 -07:57:13 -07:57:14 -07:57:16 -07:57:19 -07:57:21 -07:57:24 -07:57:26 -07:57:29 -07:57:30 -07:57:34 -07:57:37 -07:57:38 -07:57:41 -07:57:43 -07:57:49 -07:57:51 -07:57:54 -07:57:57 -07:58:00 -07:58:02 -07:58:07 -07:58:13 -07:58:15 -07:58:20 -07:58:24 -07:59:11 -07:59:13 -07:59:16 -07:59:19 -07:59:22 -07:59:23 -07:59:26 -07:59:28 -07:59:30 -07:59:33 -07:59:36 -07:59:39 -07:59:42 -07:59:43 -07:59:45 -07:59:46 -07:59:48 -07:59:51 -07:59:53 -07:59:56 -07:59:59 -08:00:01 -08:00:04 -08:00:06 -08:00:09 -08:00:16 -08:00:21 -08:00:28 -08:00:31 -08:00:34 -08:00:37 -08:00:39 -08:00:42 -08:00:46 -08:00:50 -08:00:56 -08:01:01 -08:01:54 -08:01:57 -08:01:59 -08:02:02 -08:02:03 -08:02:06 -08:02:07 -08:02:10 -08:02:13 -08:02:16 -08:02:18 -08:02:21 -08:02:24 -08:02:27 -08:02:29 -08:02:34 -08:02:38 -08:02:43 -08:02:45 -08:02:47 -08:02:47 -08:02:51 -08:03:18 -08:03:22 -08:03:24 -08:03:26 -08:03:29 -08:03:32 -08:03:34 -08:03:36 -08:03:40 -08:03:43 -08:03:45 -08:03:47 -08:03:51 -08:03:52 -08:03:55 -08:03:59 -08:04:01 -08:04:04 -08:04:06 -08:04:08 -08:04:10 -08:04:14 -08:04:18 -08:04:19 -08:04:20 -08:04:22 -08:04:25 -08:04:26 -08:04:29 -08:04:35 -08:04:38 -08:04:39 -08:04:43 -08:04:49 -08:04:55 -08:04:57 -08:05:00 -08:05:05 -08:05:09 -08:05:14 -08:05:41 -08:05:44 -08:05:47 -08:05:49 -08:05:52 -08:05:54 -08:05:56 -08:05:58 -08:06:00 -08:06:02 -08:06:05 -08:06:06 -08:06:09 -08:06:11 -08:06:15 -08:06:16 -08:06:19 -08:06:20 -08:06:22 -08:06:25 -08:06:27 -08:06:29 -08:06:32 -08:06:35 -08:06:39 -08:06:41 -08:06:43 -08:06:44 -08:06:57 -08:07:00 -08:07:07 -08:07:13 -08:07:17 -08:07:18 -08:07:21 -08:07:24 -08:07:26 -08:07:28 -08:07:30 -08:07:32 -08:07:34 -08:07:37 -08:07:38 -08:07:40 -08:07:42 -08:07:45 -08:07:49 -08:07:51 -08:07:55 -08:07:57 -08:07:59 -08:08:01 -08:08:03 -08:08:04 -08:08:06 -08:08:07 -08:08:10 -08:08:12 -08:08:17 -08:08:20 -08:08:22 -08:08:25 -08:08:27 -08:08:31 -08:08:35 -08:08:36 -08:08:42 -08:08:44 -08:08:46 -08:08:49 -08:08:50 -08:08:54 -08:08:57 -08:08:59 -08:09:04 -08:09:48 -08:09:51 -08:09:53 -08:09:54 -08:09:56 -08:09:59 -08:10:00 -08:10:02 -08:10:04 -08:10:07 -08:10:09 -08:10:11 -08:10:12 -08:10:14 -08:10:18 -08:10:22 -08:10:25 -08:10:28 -08:10:29 -08:10:32 -08:10:34 -08:10:37 -08:10:39 -08:10:41 -08:10:43 -08:10:46 -08:10:52 -08:10:54 -08:10:56 -08:10:58 -08:10:59 -08:11:01 -08:11:06 -08:11:08 -08:11:10 -08:11:13 -08:11:15 -08:11:18 -08:11:20 -08:11:22 -08:11:25 -08:11:26 -08:11:31 -08:11:33 -08:11:35 -08:11:37 -08:11:38 -08:11:41 -08:11:44 -08:11:49 -08:11:50 -08:11:55 -08:12:03 -08:12:05 -08:12:07 -08:12:10 -08:12:13 -08:12:15 -08:12:18 -08:12:20 -08:12:24 -08:12:30 -08:12:44 -08:12:52 -08:12:56 -08:12:59 -08:13:02 -08:13:04 -08:13:07 -08:13:09 -08:13:12 -08:13:15 -08:13:18 -08:13:22 -08:13:39 -08:13:45 -08:13:49 -08:13:51 -08:13:54 -08:13:56 -08:13:58 -08:14:00 -08:14:04 -08:14:06 -08:14:12 -08:14:14 -08:14:16 -08:14:18 -08:14:21 -08:14:23 -08:14:28 -08:14:33 -08:14:37 -08:14:39 -08:14:41 -08:14:44 -08:14:46 -08:14:48 -08:14:50 -08:14:52 -08:14:55 -08:14:57 -08:14:59 -08:15:02 -08:15:04 -08:15:07 -08:15:09 -08:15:10 -08:15:13 -08:15:16 -08:15:18 -08:15:20 -08:15:22 -08:15:25 -08:15:27 -08:15:30 -08:15:32 -08:15:33 -08:15:37 -08:15:39 -08:15:41 -08:15:42 -08:15:46 -08:15:47 -08:15:53 -08:15:55 -08:15:56 -08:15:58 -08:15:59 -08:16:02 -08:16:04 -08:16:08 -08:16:11 -08:16:13 -08:16:15 -08:16:18 -08:16:21 -08:16:26 -08:17:16 -08:17:19 -08:17:22 -08:17:28 -08:17:29 -08:17:32 -08:17:34 -08:17:36 -08:17:38 -08:17:40 -08:17:43 -08:17:45 -08:17:47 -08:17:50 -08:17:52 -08:17:54 -08:17:57 -08:18:01 -08:18:02 -08:18:04 -08:18:07 -08:18:08 -08:18:10 -08:18:16 -08:18:19 -08:18:23 -08:18:30 -08:18:32 -08:18:37 -08:18:40 -08:18:42 -08:18:46 -08:18:48 -08:18:51 -08:18:53 -08:18:55 -08:18:58 -08:19:00 -08:19:03 -08:19:06 -08:19:10 -08:19:13 -08:19:17 -08:19:19 -08:19:22 -08:19:25 -08:19:27 -08:19:30 -08:19:32 -08:19:34 -08:19:38 -08:19:40 -08:19:43 -08:19:48 -08:19:50 -08:19:52 -08:19:54 -08:19:56 -08:19:58 -08:20:00 -08:20:03 -08:20:05 -08:20:09 -08:20:11 -08:20:14 -08:20:16 -08:20:19 -08:21:23 -08:21:26 -08:21:29 -08:21:33 -08:21:34 -08:21:37 -08:21:39 -08:21:41 -08:21:43 -08:21:45 -08:21:52 -08:21:54 -08:21:56 -08:21:59 -08:22:01 -08:22:04 -08:22:09 -08:22:12 -08:22:14 -08:22:15 -08:22:16 -08:22:19 -08:22:25 -08:22:26 -08:22:30 -08:22:32 -08:22:34 -08:22:36 -08:22:38 -08:22:40 -08:22:42 -08:22:45 -08:22:50 -08:22:52 -08:22:54 -08:22:57 -08:22:59 -08:23:02 -08:23:04 -08:23:09 -08:23:17 -08:23:21 -08:23:24 -08:23:49 -08:23:52 -08:23:55 -08:23:59 -08:24:01 -08:24:03 -08:24:04 -08:24:06 -08:24:08 -08:24:09 -08:24:12 -08:24:14 -08:24:15 -08:24:19 -08:24:21 -08:24:23 -08:24:25 -08:24:26 -08:24:34 -08:24:37 -08:24:38 -08:24:42 -08:24:44 -08:24:46 -08:24:48 -08:24:50 -08:24:52 -08:24:58 -08:25:04 -08:25:10 -08:25:17 -08:25:20 -08:25:26 -08:25:32 -08:25:35 -08:25:41 -08:25:48 -08:26:02 -08:26:04 -08:26:07 -08:26:10 -08:26:14 -08:26:16 -08:26:19 -08:26:23 -08:26:27 -08:26:29 -08:26:35 -08:26:38 -08:26:42 -08:26:45 -08:26:47 -08:26:50 -08:26:54 -08:26:56 -08:26:59 -08:27:05 -08:27:09 -08:27:11 -08:27:14 -08:27:16 -08:27:18 -08:27:20 -08:27:22 -08:27:24 -08:27:27 -08:27:29 -08:27:30 -08:27:33 -08:27:36 -08:27:40 -08:27:42 -08:27:45 -08:27:47 -08:27:51 -08:28:09 -08:28:14 -08:28:19 -08:28:22 -08:28:30 -08:28:36 -08:28:40 -08:28:58 -08:29:02 -08:29:09 -08:29:13 -08:29:15 -08:29:21 -08:29:24 -08:29:27 -08:29:30 -08:29:34 -08:29:38 -08:29:42 -08:29:48 -08:29:53 -08:29:57 -08:30:02 -08:30:33 -08:30:36 -08:30:39 -08:30:41 -08:30:43 -08:30:46 -08:30:49 -08:30:53 -08:30:57 -08:31:00 -08:31:04 -08:31:05 -08:31:10 -08:31:13 -08:31:16 -08:31:21 -08:31:25 -08:31:28 -08:31:32 -08:31:35 -08:31:39 -08:31:43 -08:31:51 -08:32:28 -08:32:31 -08:32:35 -08:32:38 -08:32:40 -08:32:41 -08:32:43 -08:32:45 -08:32:48 -08:32:50 -08:32:52 -08:32:54 -08:32:56 -08:32:57 -08:33:00 -08:33:02 -08:33:05 -08:33:08 -08:33:11 -08:33:13 -08:33:14 -08:33:17 -08:33:19 -08:33:20 -08:33:22 -08:33:26 -08:33:27 -08:33:29 -08:33:34 -08:33:36 -08:33:41 -08:33:44 -08:33:48 -08:33:50 -08:33:52 -08:33:58 -08:34:01 -08:34:04 -08:34:06 -08:34:08 -08:34:11 -08:34:13 -08:34:16 -08:34:18 -08:34:20 -08:34:24 -08:34:28 -08:34:30 -08:34:32 -08:34:37 -08:34:40 -08:34:44 -08:34:47 -08:34:51 -08:35:00 -08:35:08 -08:35:12 -08:35:15 -08:35:20 -08:35:27 -08:35:34 -08:35:38 -08:35:44 -08:35:51 -08:36:08 -08:36:12 -08:36:18 -08:36:22 -08:36:24 -08:36:27 -08:36:30 -08:36:33 -08:36:37 -08:36:42 -08:36:44 -08:36:48 -08:36:53 -08:36:57 -08:37:01 -08:37:07 -08:37:37 -08:37:42 -08:37:44 -08:37:47 -08:37:49 -08:37:51 -08:37:54 -08:37:57 -08:37:58 -08:37:59 -08:38:01 -08:38:04 -08:38:05 -08:38:09 -08:38:11 -08:38:13 -08:38:15 -08:38:20 -08:38:22 -08:38:25 -08:38:28 -08:38:35 -08:38:42 -08:39:14 -08:39:18 -08:39:21 -08:39:23 -08:39:26 -08:39:30 -08:39:32 -08:39:37 -08:39:41 -08:39:45 -08:39:47 -08:39:49 -08:39:54 -08:39:57 -08:39:58 -08:40:00 -08:40:04 -08:40:08 -08:40:12 -08:40:15 -08:40:17 -08:40:19 -08:40:22 -08:40:25 -08:40:29 -08:40:33 -08:40:35 -08:40:37 -08:40:39 -08:40:41 -08:40:43 -08:40:46 -08:40:49 -08:40:52 -08:40:58 -08:41:01 -08:41:06 -08:41:09 -08:41:11 -08:41:15 -08:41:18 -08:41:24 -08:41:27 -08:41:32 -08:41:40 -08:41:43 -08:41:47 -08:41:51 -08:41:52 -08:41:56 -08:41:59 -08:42:02 -08:42:04 -08:42:07 -08:42:11 -08:43:37 -08:43:43 -08:43:46 -08:43:48 -08:43:54 -08:43:59 -08:44:03 -08:44:06 -08:44:10 -08:44:15 -08:44:18 -08:44:24 -08:44:27 -08:44:30 -08:44:33 -08:44:38 -08:44:41 -08:44:47 -08:44:54 -08:45:06 -08:45:11 -08:45:14 -08:45:19 -08:45:22 -08:45:24 -08:45:29 -08:45:35 -08:45:40 -08:46:36 -08:46:40 -08:46:43 -08:46:46 -08:46:49 -08:46:52 -08:46:55 -08:47:01 -08:47:06 -08:47:10 -08:47:17 -08:47:49 -08:47:54 -08:47:58 -08:48:02 -08:48:05 -08:48:07 -08:48:39 -08:48:43 -08:48:47 -08:48:51 -08:49:00 -08:49:05 -08:49:09 -08:49:17 -08:49:21 -08:49:24 -08:49:29 -08:49:35 -08:49:38 -08:49:41 -08:49:45 -08:49:48 -08:49:51 -08:49:54 -08:49:57 -08:50:01 -08:50:04 -08:50:11 -08:50:14 -08:50:17 -08:50:19 -08:50:22 -08:50:27 -08:50:31 -08:50:34 -08:50:43 -08:50:50 -08:50:54 -08:50:58 -08:51:04 -08:52:41 -08:52:44 -08:52:48 -08:52:51 -08:52:53 -08:52:57 -08:53:05 -08:53:08 -08:53:12 -08:53:15 -08:53:20 -08:53:23 -08:53:27 -08:53:30 -08:53:32 -08:53:37 -08:53:40 -08:53:48 -08:53:51 -08:53:56 -08:54:04 -08:54:06 -08:54:09 -08:54:10 -08:54:14 -08:54:16 -08:54:19 -08:54:21 -08:54:24 -08:54:27 -08:54:28 -08:54:30 -08:54:32 -08:54:35 -08:54:36 -08:54:39 -08:54:41 -08:54:43 -08:54:46 -08:54:49 -08:54:51 -08:54:54 -08:54:56 -08:55:01 -08:55:03 -08:55:06 -08:55:11 -08:55:13 -08:55:16 -08:55:18 -08:55:21 -08:55:23 -08:55:25 -08:55:26 -08:55:38 -08:55:39 -08:55:42 -08:55:44 -08:55:47 -08:55:50 -08:55:54 -08:55:59 -08:56:33 -08:56:36 -08:56:39 -08:56:42 -08:56:45 -08:56:50 -08:56:57 -08:56:59 -08:57:03 -08:57:05 -08:57:07 -08:57:08 -08:57:10 -08:57:11 -08:57:13 -08:57:16 -08:57:18 -08:57:25 -08:57:26 -08:57:28 -08:57:30 -08:57:32 -08:57:35 -08:57:38 -08:57:40 -08:57:43 -08:57:45 -08:57:47 -08:57:48 -08:57:51 -08:57:53 -08:57:55 -08:57:58 -08:58:00 -08:58:02 -08:58:04 -08:58:06 -08:58:11 -08:58:13 -08:58:16 -08:58:17 -08:58:20 -08:58:24 -08:58:32 -08:58:36 -08:58:39 -08:58:44 -08:58:51 -08:59:18 -08:59:21 -08:59:24 -08:59:28 -08:59:31 -08:59:32 -08:59:35 -08:59:37 -08:59:40 -08:59:44 -08:59:46 -08:59:51 -08:59:53 -08:59:56 -08:59:59 -09:00:01 -09:00:06 -09:00:08 -09:00:09 -09:00:11 -09:00:12 -09:00:15 -09:00:16 -09:00:19 -09:00:21 -09:00:23 -09:00:24 -09:00:27 -09:00:30 -09:00:32 -09:00:33 -09:00:35 -09:00:41 -09:00:43 -09:00:45 -09:00:51 -09:00:53 -09:00:56 -09:00:58 -09:01:03 -09:01:08 -09:01:11 -09:01:12 -09:01:15 -09:01:17 -09:01:19 -09:01:21 -09:01:23 -09:01:25 -09:01:26 -09:01:27 -09:01:30 -09:01:31 -09:01:33 -09:01:35 -09:01:37 -09:01:39 -09:01:41 -09:01:43 -09:01:45 -09:01:47 -09:01:50 -09:01:51 -09:01:53 -09:01:57 -09:02:02 -09:02:03 -09:02:06 -09:02:08 -09:02:10 -09:02:12 -09:02:14 -09:02:17 -09:02:20 -09:02:28 -09:02:34 -09:02:38 -09:02:40 -09:02:42 -09:02:46 -09:02:48 -09:02:52 -09:02:53 -09:02:54 -09:02:57 -09:02:59 -09:03:01 -09:03:03 -09:03:05 -09:03:07 -09:03:13 -09:03:14 -09:03:16 -09:03:19 -09:03:21 -09:03:22 -09:03:24 -09:03:27 -09:03:28 -09:03:30 -09:03:32 -09:03:34 -09:03:36 -09:03:38 -09:03:39 -09:03:41 -09:03:43 diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.edg.xml sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.edg.xml --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.edg.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.edg.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.nod.xml sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.nod.xml --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.nod.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.nod.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/runner.py sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/runner.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/runner.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,129 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file runner.py -# @author Daniel Krajzewicz -# @author Michael Behrisch -# @date 2007-10-25 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function - -import os -import subprocess -import sys -import shutil -from scipy.optimize import fmin_cobyla - -if 'SUMO_HOME' in os.environ: - tools = os.path.join(os.environ['SUMO_HOME'], 'tools') - sys.path.append(tools) -else: - sys.exit("please declare environment variable 'SUMO_HOME'") -from sumolib import checkBinary # noqa -import validate # noqa - - -def buildVSS(obs7file, obs8file, vss): - t7Times = validate.readTimes(obs7file) - t8Times = validate.readTimes(obs8file) - print('data read: ', len(t7Times), len(t8Times)) - - fp = open(vss, 'w') - lObs8 = 337.5 - print('', file=fp) - for i, t7 in enumerate(t7Times): - v = lObs8 / (t8Times[i] - t7) - if i != len(t7Times) - 1 and t7 != t7Times[i + 1]: - print(' ' % (t7, v), file=fp) - print('', file=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(' ' % ( - t, vehID), file=fRou) - print('', file=fRou) - fRou.close() - -# 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])] - print('# simulation with:', *["%s:%.3f" % i for i in para]) - fType = open('data/input_types.add.xml', 'w') - fType.write(('\n \n') % dict(para)) - fType.close() - result = validate.validate(checkBinary('sumo')) - print('#### yields rmse: %.4f' % result) - print("%s %s" % (" ".join(["%.3f" % pe for pe in p]), result), file=fpLog) - fpLog.flush() - return result - -# defining all the constraints - - -def conVmax(params): # vMax < 25 - return 25.0 - params[0] - - -def conTtau(params): # tTau > 1.1 - return params[5] - 1.1 - - -def conSigA(params): # sigA > 0.1 - return params[4] - 0.1 - - -def conSigA2(params): # sigA < 1.0 - return 1.0 - params[4] - - -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 IOError: - 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') -shutil.copy("data/spd-road.vss.xml", "vss.xml") -sys.stdout.flush() -genDemand('data/obstimes_1_1.txt', 'data/spd-road.rou.xml') -validate.parseObsTimes() -# 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 -# 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) -fpLog.close() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/validate.py sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/validate.py --- sumo-1.1.0+dfsg1/docs/tutorial/san_pablo_dam/validate.py 2018-12-18 09:58:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/san_pablo_dam/validate.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file validate.py -# @author Michael Behrisch -# @date 2012-01-21 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function - -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]))) - return times - - -def parseObsTimes(): - 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: - continue - obsTimes[i] = readTimes('data/obstimes_%s_%s.txt' % (dDay, i)) - - # convert obsTimes[][] into travel-times: - for i in range(1, 8): - ni = len(obsTimes[i]) - if ni == len(obsTimes[i + 1]) and ni > 100: - for j in range(ni): - obsTimes[i][j] = obsTimes[i + 1][j] - obsTimes[i][j] - - -def validate(sumoBinary): - 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] = [] - - # read the simulated times - 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): - ni = len(simTimes[i]) - if ni == len(simTimes[i + 1]) and ni > 100: - for j in range(ni): - 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] - 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: - 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])) - if verbose: - print("%s %s" % (i, err[i]), file=f) - errAll += err[i] - cntAll += 1 - if verbose: - f.close() - - # finally, write the individual travel times into a csv-file - # this is not really needed when validate is called from calibrate as an intermediate - # step, but it makes analyzing of the result more simple. - # first the header - 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)) - 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: - ttObs = int(obsTimes[i][line]) - ttSim = int(simTimes[i][line]) - c.write(repr(ttObs) + ';' + repr(ttSim) + ';') - c.write('\n') - c.close() - return errAll / cntAll diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/makeSumolympicWalkers.py sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/makeSumolympicWalkers.py --- sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/makeSumolympicWalkers.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/makeSumolympicWalkers.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file makeSumolympicWalkers.py -# @author Leonhard Luecken -# @date 2016-11-25 -# @version $Id$ - -outfile = "sumolympicWalks.rou.xml" -startEdge = "beg" -endEdge = "end" -# Startzeit -departTime = 0. -# Startposition -departPos = -30. -# Anzahl Fussgaenger -numberTrips = 200 -# Generiere XML Datei -xml_string = "\n" -for i in range(numberTrips): - xml_string += ' \n' % (departTime, i, departPos) - xml_string += ' \n' % (startEdge, endEdge) - xml_string += ' \n' -xml_string += "\n" -with open(outfile, "w") as f: - f.write(xml_string) diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.net.xml sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.net.xml --- sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.net.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.net.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.rou.xml sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.rou.xml --- sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.rou.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.rou.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.sumocfg sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.sumocfg --- sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.sumocfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympics.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympicWalks.rou.xml sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympicWalks.rou.xml --- sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/data/sumolympicWalks.rou.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/data/sumolympicWalks.rou.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,602 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/runner.py sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/sumolympics/runner.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/sumolympics/runner.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file runner.py -# @author Daniel Krajzewicz -# @author Michael Behrisch -# @date 2007-10-25 -# @version $Id$ - -from __future__ import absolute_import -from __future__ import print_function - - -import os -import subprocess -import sys -if 'SUMO_HOME' in os.environ: - tools = os.path.join(os.environ['SUMO_HOME'], 'tools') - sys.path.append(tools) -else: - sys.exit("please declare environment variable 'SUMO_HOME'") -from sumolib import checkBinary # noqa -sumoBinary = checkBinary('sumo') -# run simulation -retcode = subprocess.call( - [sumoBinary, "-c", "data/sumolympics.sumocfg", "--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) -print(">> Simulation closed with status %s" % retcode) -sys.stdout.flush() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.con.xml sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.con.xml --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.con.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.con.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.edg.xml sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.edg.xml --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.edg.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.edg.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.netccfg sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.netccfg --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.netccfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.netccfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.nod.xml sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.nod.xml --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.nod.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.nod.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.rou.xml sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.rou.xml --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.rou.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.rou.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.tll.xml sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.tll.xml --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.tll.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/pedcrossing.tll.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/run.sumocfg sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/run.sumocfg --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/run.sumocfg 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/run.sumocfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/viewsettings.xml sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/viewsettings.xml --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/viewsettings.xml 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/data/viewsettings.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,551 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/runner.py sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/runner.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_pedestrian_crossing/runner.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file runner.py -# @author Lena Kalleske -# @author Daniel Krajzewicz -# @author Michael Behrisch -# @author Jakob Erdmann -# @date 2009-03-26 -# @version $Id$ - -""" -Tutorial for traffic light control via the TraCI interface. -This scenario models a pedestrian crossing which switches on demand. -""" -from __future__ import absolute_import -from __future__ import print_function - -import os -import sys -import optparse -import subprocess - - -# the directory in which this script resides -THISDIR = os.path.dirname(__file__) - - -# we need to import python modules from the $SUMO_HOME/tools directory -# If the the environment variable SUMO_HOME is not set, try to locate the python -# modules relative to this script -if 'SUMO_HOME' in os.environ: - tools = os.path.join(os.environ['SUMO_HOME'], 'tools') - sys.path.append(tools) -else: - sys.exit("please declare environment variable 'SUMO_HOME'") -import traci # noqa -from sumolib import checkBinary # noqa -import randomTrips # noqa - -# minimum green time for the vehicles -MIN_GREEN_TIME = 15 -# the first phase in tls plan. see 'pedcrossing.tll.xml' -VEHICLE_GREEN_PHASE = 0 -# the id of the traffic light (there is only one). This is identical to the -# id of the controlled intersection (by default) -TLSID = 'C' - -# pedestrian edges at the controlled intersection -WALKINGAREAS = [':C_w0', ':C_w1'] -CROSSINGS = [':C_c0'] - - -def run(): - """execute the TraCI control loop""" - # track the duration for which the green phase of the vehicles has been - # active - greenTimeSoFar = 0 - - # whether the pedestrian button has been pressed - activeRequest = False - - # main loop. do something every simulation step until no more vehicles are - # loaded or running - while traci.simulation.getMinExpectedNumber() > 0: - traci.simulationStep() - - # decide wether there is a waiting pedestrian and switch if the green - # phase for the vehicles exceeds its minimum duration - if not activeRequest: - activeRequest = checkWaitingPersons() - if traci.trafficlight.getPhase(TLSID) == VEHICLE_GREEN_PHASE: - greenTimeSoFar += 1 - if greenTimeSoFar > MIN_GREEN_TIME: - # check whether someone has pushed the button - - if activeRequest: - # switch to the next phase - traci.trafficlight.setPhase( - TLSID, VEHICLE_GREEN_PHASE + 1) - # reset state - activeRequest = False - greenTimeSoFar = 0 - - sys.stdout.flush() - traci.close() - - -def checkWaitingPersons(): - """check whether a person has requested to cross the street""" - - # check both sides of the crossing - for edge in WALKINGAREAS: - peds = traci.edge.getLastStepPersonIDs(edge) - # check who is waiting at the crossing - # we assume that pedestrians push the button upon - # standing still for 1s - for ped in peds: - if (traci.person.getWaitingTime(ped) == 1 and - traci.person.getNextEdge(ped) in CROSSINGS): - print("%s pushes the button" % ped) - return True - return False - - -def get_options(): - """define options for this script and interpret the command line""" - optParser = optparse.OptionParser() - optParser.add_option("--nogui", action="store_true", - default=False, help="run the commandline version of sumo") - options, args = optParser.parse_args() - return options - - -# this is the main entry point of this script -if __name__ == "__main__": - # load whether to run with or without GUI - options = get_options() - - # this script has been called from the command line. It will start sumo as a - # server, then connect and run - if options.nogui: - sumoBinary = checkBinary('sumo') - else: - sumoBinary = checkBinary('sumo-gui') - - net = 'pedcrossing.net.xml' - # build the multi-modal network from plain xml inputs - subprocess.call([checkBinary('netconvert'), - '-c', os.path.join('data', 'pedcrossing.netccfg'), - '--output-file', net], - stdout=sys.stdout, stderr=sys.stderr) - - # generate the pedestrians for this simulation - randomTrips.main(randomTrips.get_options([ - '--net-file', net, - '--output-trip-file', 'pedestrians.trip.xml', - '--seed', '42', # make runs reproducible - '--pedestrians', - '--prefix', 'ped', - # prevent trips that start and end on the same edge - '--min-distance', '1', - '--trip-attributes', 'departPos="random" arrivalPos="random"', - '--binomial', '4', - '--period', '35'])) - - # this is the normal way of using traci. sumo is started as a - # subprocess and then the python script connects and runs - traci.start([sumoBinary, '-c', os.path.join('data', 'run.sumocfg')]) - run() diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_tls/embedded.py sumo-1.2.0+dfsg1/docs/tutorial/traci_tls/embedded.py --- sumo-1.1.0+dfsg1/docs/tutorial/traci_tls/embedded.py 2018-12-18 09:58:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_tls/embedded.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -#!/usr/bin/env python -# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v2.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v20.html -# SPDX-License-Identifier: EPL-2.0 - -# @file embedded.py -# @author Lena Kalleske -# @author Daniel Krajzewicz -# @author Michael Behrisch -# @author Jakob Erdmann -# @date 2009-03-26 -# @version $Id$ - -from __future__ import absolute_import - -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 # noqa - - -if runner.traci.isEmbedded(): - # this script has been called from the sumo-internal python interpreter - # only execute the main control procedure - runner.run() -else: - options = runner.get_options() - # this script has been called from the command line. It will start sumo with - # this script as argument - if options.nogui: - sumoBinary = runner.checkBinary('sumo') - else: - # gui running probably does not work yet - sumoBinary = runner.checkBinary('sumo-gui') - - # first, generate the route file for this simulation - runner.generate_routefile() - - # 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", "--python-script", __file__], - stdout=sys.stdout, stderr=sys.stderr) - sys.exit(retCode) diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_tls/runner.py sumo-1.2.0+dfsg1/docs/tutorial/traci_tls/runner.py --- sumo-1.1.0+dfsg1/docs/tutorial/traci_tls/runner.py 2018-07-09 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_tls/runner.py 2019-01-23 23:00:20.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/docs/tutorial/traci_tls/tripinfo.xml sumo-1.2.0+dfsg1/docs/tutorial/traci_tls/tripinfo.xml --- sumo-1.1.0+dfsg1/docs/tutorial/traci_tls/tripinfo.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/tutorial/traci_tls/tripinfo.xml 2019-04-15 22:14:43.000000000 +0000 @@ -0,0 +1,801 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-1.1.0+dfsg1/docs/wiki/index.html sumo-1.2.0+dfsg1/docs/wiki/index.html --- sumo-1.1.0+dfsg1/docs/wiki/index.html 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/wiki/index.html 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,431 @@ + + + + + Eclipse SUMO - Simulation of Urban Mobility + + + + + + +
+ + + + + + +
+ + Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ Hallo
+ +
+ + +
+ + Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/docs/wiki/logo.png and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/docs/wiki/logo.png differ diff -Nru sumo-1.1.0+dfsg1/docs/wiki/sumo.css sumo-1.2.0+dfsg1/docs/wiki/sumo.css --- sumo-1.1.0+dfsg1/docs/wiki/sumo.css 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/docs/wiki/sumo.css 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,418 @@ +html { + background-color: #ebebeb; + font: normal 12px Tahoma, Verdana, "Lucida Grande", Georgia, Sans-Serif; + padding: 0; + margin: 0 auto; + background-repeat: repeat-y; + background-position: top center; + background-image: url(body_bg.png); +} + +body { + background-color: #ebebeb; + font: normal 12px Tahoma, Verdana, "Lucida Grande", Georgia, Sans-Serif; + padding: 0; + margin: 0 auto; + padding-left: 20; + padding-right: 20; + background-repeat: repeat-y; + background-position: top center; + background-image: url(body_bg.png); +} + +#container { + margin: 0 auto; + background-color: #ffffff; + border-left: 1px; + border-right: 1px; + border-top: 0px; + border-bottom: 0px; + border-style: solid; + border-color: #080063; +} + +body#bmission li#lmission a +{ + color: #eff8ff; + background-color: #ffffff; + text-align: left; +} + + +/* Links */ +a { font-weight: bold; border-bottom: 1px dotted transparent; } +a:link { color: #336699; text-decoration: none; border-bottom-color: #336699; } +a:visited { color: #5588aa; text-decoration: none; border-bottom-color: #5588aa; } +a:hover, a:active { color: #ad5b1e; border-bottom: 1px solid #ad5b1e; } + + +/* Html Elements */ +h1, h2, h3, h4, h5, h6 { font-weight: normal; margin: 5px 0 10px; padding: 0; } +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { + font-weight: normal; + border-bottom-width: 0; +} + +h1 { font-size: 28px; } +h2 { font-size: 24px; } +h3 { font-size: 20px; } +h4 { font-size: 18px; } +h5 { font-size: 16px; } +h6 { font-size: 14px; } + +ul, ol { + line-height: 1.5em; + padding-left: 20px; + margin-left: 0px; + padding-right: 0px; + padding-top: -.5em; + margin-top: -.5em; +} +li { margin: 0em; padding: 0em; } + +ul ul +{ + padding-left: 10px; + font-weight: normal; + padding-top: 0; + margin-top: 0; +} +ul ul li { margin: 0em; padding: 0em; } + +ul { + list-style-type: square; +} + +blockquote, pre { + background-color: #f0f0f0; + border: 1px dashed #bbbbbb; + margin-left: 10px; + margin-right: 10px; + padding: 8px; +} +.xml, .inlxml { + color: #000080; + background-color: #f0f0ff; + border-color: #000080; +} + +ins { text-decoration: none; color: #466b85; } +del { color: #555555; } + + +/* Structure */ +#subsMenu { float: left; width: 100%; clear: both; } +#subsMenu ul { + padding: 0; + width: 100%; + float: left; + margin: 0 0 10px; + list-style-type: none; + background-color: #17412f; +} +#subsMenu li { float: left; } +#subsMenu a:link, #subsMenu a:visited { + float: left; + display: block; + color: #eff8ff; + padding: 5px 10px; + border-bottom-width: 0; +} +#subsMenu a:hover, #subsMenu a:active +{ + color: #ffffff; + background-color: #485573; +} + +#shortIntro { + margin: 5 15px; text-align: left; +} + +#wrapper { text-align: center; } +.col1 { width: 270px; float: left; margin: 0 15px; text-align: left; } +.col1 ul { margin: 0 0 0 15px; padding: 0; line-height: 1.5em; } +.col1 li { font-size: 14px; font-weight: bold; padding-bottom: 10px; margin-left: 10px; } +.col1 h3 { font-size: 18px; padding: 5px 10px; margin-top: 20px; } +.col2 { width: 270px; float: left; margin: 0 15px; text-align: left; } +.col2 ul { margin: 0 0 0 15px; padding: 0; line-height: 1.5em; } +.col2 li { font-size: 14px; font-weight: bold; padding-bottom: 10px; margin-left: 10px; } +.col2 h3 { font-size: 18px; padding: 5px 10px; margin-top: 20px; } +.slink { font-size: 12px; font-weight: normal; margin-top: -.8em; margin-bottom: 10px; margin-left: 5px; } +.slink a { font-size: 12px; font-weight: normal; margin-top: -.8em; margin-bottom: 10px; margin-left: 5px; } +.small { font-size: 12px; font-weight: normal; margin-top: .2em; } + +#step1 h3 { + background-color: #C6EB9A; +} + +#step2 h3 { + background-color: #ebeb9a; +} + +#step3 h3 { + background-color: #ffb366; +} + +#step1 li { color: #307030; border-bottom-color: #307030; } +#step1 a:link { color: #307030; border-bottom-color: #307030; } +#step1 a:visited { color: #307030; border-bottom-color: #307030; } + +#step2 li { color: #707000; border-bottom-color: #707000; } +#step2 a:link { color: #707000; border-bottom-color: #707000; } +#step2 a:visited { color: #707000; border-bottom-color: #707000; } + +#step3 a:link { color: #DF4532; border-bottom-color: #DF4532; } +#step3 a:visited { color: #DF4532; border-bottom-color: #DF4532; } + +#header { float: left; width: 100%; clear: both; margin-top: 10px; } + +#page-header { clear: both; position: relative; margin-bottom: 20px; } + + +#footer +{ + clear: both; + color: #666666; + padding: 20px 0 15px; + text-align: center; +} + +/* Header */ + +#header h1 +{ + padding: 0; + float: left; + width: 140px; + margin: 10px 0; + font-size: 14px; + text-transform: uppercase; + letter-spacing: 0.1em; + border-right: 1px solid #999999; +} + +#header h1 a:hover, +#header h1 a:active +{ + border-bottom-width: 0; +} + +#header h2 +{ + float: left; + width: 250px; + font-size: 12px; + line-height: 2.5em; + padding-left: 10px; + text-transform: lowercase; +} + +#header #search +{ + float: right; +} + +#header #search input +{ + padding: 5px; + border: 1px solid #999999; + background-color: #f5f5f5; +} + +#header #search input:hover +{ + background-color: #e5e5e5; + border: 1px solid #777777; +} + +/* Navigation */ + + +/* Page-Header */ +#nav { + float: left; + background-color: #ffffff; + width: 310px; + margin-right: 0px; + padding-right: 0px; + margin-top: -10px; +} + +#nav a +{ + font-weight: normal; +} + + + +#nav h3 +{ + font-size: 16px; + padding-top: 4px; + padding-bottom: 4px; + padding-left: 20px; +} + + +#content { + margin-left: 320px; + text-align: left; +} +#content table +{ + font: normal 12px Tahoma, Verdana, "Lucida Grande", Georgia, Sans-Serif; +} + +#lastMod +{ + font: normal 10px Tahoma, Verdana, "Lucida Grande", Georgia, Sans-Serif; + text-align: right; + padding-right: 10px; +} + +#page-header ul +{ + bottom: -8px; + right: 10px; + margin: 0; + padding: 0; + float: left; + position: absolute; + list-style-type: none; +} + +#page-header li { float: left; } + +#page-header li a:link, +#page-header li a:visited +{ + float: left; + display: block; + margin: 0 10px; + padding: 5px 20px; + color: #ffffff; + border-bottom-width: 0; + background-image: url(menu.png); + background-repeat: repeat-x; +} + +#page-header li a:hover, +#page-header li a:active +{ + background-image: url(menu_hover.png); +} + +/* Logo */ +#logo +{ + background-color:#338033; + height: 140px; + color: white; + padding-top: 10px; +} +#logo_text1 { + font: normal 70px Tahoma, Verdana, "Lucida Grande", Georgia, Sans-Serif; +} +#logo_text2 { + font: normal 35px Tahoma, Verdana, "Lucida Grande", Georgia, Sans-Serif; +} + + + +/* Footer */ + +#footer a:link { color: #5588aa; border-bottom-color: #5588aa; } + +#footer a:visited { color: #77bbdd; border-bottom-color: #77bbdd; } + +#footer a:hover, #footer a:active { color: #336699; border-bottom-color: #336699; } + +#footer p { margin: 5px 0; } + + + + + + + +.pics { + height: 340px; + width: 240px; + padding: 0; + margin: 0; + +} + +#images td { + padding: 0; + margin: 0; + position: relative; +} + +#images td div { + padding: 0; + margin: 0; +} + +.pics img { + border: 0px solid #ccc; + padding: 0; + margin: 0; +// top: 0; +// left: 0 +} + + +.parss-title { + display:block; + clear:left; + font-weight:bold; + line-height:100%; +} +.parss-date { + display:block; + color:#000; + font-weight:normal; + font-size: 12px; + margin-top: .2em; +} +.parss-image { + width:80px; + height:auto; + overflow:hidden; + padding:0 5px 5px 0; + display:block; + float:left; +} +.parss-image img { + width:80px; + height:auto; +} +.parss-description { + font-size: 12px; font-weight: normal; margin-top: -.8em; margin-bottom: 10px; +} +.parss-description a { font-size: 12px; font-weight: normal; margin-top: -.8em; margin-bottom: 10px; } + + +table.wikitable { + margin: 1em 0; + background-color: #f9f9f9; + border: 1px #aaa solid; + border-collapse: collapse; + color: black; +} +table.wikitable > tr > th, +table.wikitable > tr > td, +table.wikitable > * > tr > th, +table.wikitable > * > tr > td { + border: 1px #aaa solid; + padding: 0.2em; +} +table.wikitable > tr > th, +table.wikitable > * > tr > th { + background-color: #f2f2f2; + text-align: center; +} +table.wikitable > caption { + font-weight: bold; +} diff -Nru sumo-1.1.0+dfsg1/install-sh sumo-1.2.0+dfsg1/install-sh --- sumo-1.1.0+dfsg1/install-sh 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/install-sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,508 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2014-09-12.12; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -tab=' ' -nl=' -' -IFS=" $tab$nl" - -# Set DOITPROG to "echo" to test this script. - -doit=${DOITPROG-} -doit_exec=${doit:-exec} - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -is_target_a_directory=possibly - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) is_target_a_directory=never;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - dstdir=`dirname "$dst"` - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - oIFS=$IFS - IFS=/ - set -f - set fnord $dstdir - shift - set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - set +f && - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru sumo-1.1.0+dfsg1/ltmain.sh sumo-1.2.0+dfsg1/ltmain.sh --- sumo-1.1.0+dfsg1/ltmain.sh 2018-12-17 23:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/ltmain.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,11156 +0,0 @@ -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 - -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996-2015 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. - -# GNU Libtool 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 -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 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. - -# This program 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. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: -# -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh -# -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - - -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! - -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac -fi - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () -{ - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result -} - - -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. - -: ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} - - -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## - -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s|\([`"$\\]\)|\\\1|g' - -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' - -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" - - -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: - -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath=$0 - -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` - -# Make sure we have an absolute progpath for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` - progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname - ;; - *) - _G_IFS=$IFS - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS=$_G_IFS - test -x "$progdir/$progname" && break - done - IFS=$_G_IFS - test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname - ;; -esac - - -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. - -opt_dry_run=false -opt_quiet=false -opt_verbose=false - -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: -} - - -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. - - -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. - - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd - - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd - - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT -# -------------------------------------------------------- -# Perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE -} - - -# func_grep EXPRESSION FILENAME -# ----------------------------- -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $debug_cmd - - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= - - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$_G_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - _G_dir_list=$_G_directory_path:$_G_dir_list - - # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` - done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$_G_dir" 2>/dev/null || : - done - IFS=$func_mkdir_p_IFS - - # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" - fi -} - - -# func_mktempdir [BASENAME] -# ------------------------- -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. -func_mktempdir () -{ - $debug_cmd - - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then - # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ - else - - # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - - if test ! -d "$_G_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ - - func_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" - fi - - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - - -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () -{ - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; - esac - - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" - ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 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. - -# This program 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. - -# 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 the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; -# esac -# done -# -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll alse need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} - - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} - - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result -} - - -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () -{ - $debug_cmd - - func_parse_options_result= - - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; - - --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result -} - - -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () -{ - $debug_cmd - - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - func_run_hooks func_validate_options ${1+"$@"} - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result -} - - - -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. - - -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - - -# func_help -# --------- -# Echo long help message to standard output and exit. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message" - exit 0 -} - - -# func_missing_arg ARGNAME -# ------------------------ -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $debug_cmd - - func_error "Missing argument for '$1'." - exit_cmd=exit -} - - -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () -{ - $debug_cmd - - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} - - -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} - - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - - exit $? -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: - -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' - - -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. - -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' - - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi - - -# func_fatal_configuration ARG... -# ------------------------------- -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." -} - - -# func_config -# ----------- -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - - -# func_features -# ------------- -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test yes = "$build_libtool_libs"; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test yes = "$build_old_libs"; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - - -# func_enable_tag TAGNAME -# ----------------------- -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname=$1 - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf=/$re_begincf/,/$re_endcf/p - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -# func_check_version_match -# ------------------------ -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false - - nonopt= - preserve_args= - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result -} -func_add_hook func_options_prep libtool_options_prep - - -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () -{ - $debug_cmd - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - case $1 in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; - - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result -} -func_add_hook func_parse_options libtool_parse_options - - - -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift - fi - - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } - - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options - - -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift - - - -## ----------- ## -## Main. ## -## ----------- ## - -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if 'file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case $lalib_p_line in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test yes = "$lalib_p" -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $debug_cmd - - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# 'FILE.' does not work on cygwin managed mounts. -func_source () -{ - $debug_cmd - - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $debug_cmd - - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with '--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' - else - write_lobj=none - fi - - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $debug_cmd - - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $debug_cmd - - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $debug_cmd - - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $debug_cmd - - if test -z "$2" && test -n "$1"; then - func_error "Could not determine host file name corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result=$1 - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $debug_cmd - - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " '$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result=$3 - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $debug_cmd - - case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via '$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $debug_cmd - - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $debug_cmd - - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result=$1 -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via '$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $debug_cmd - - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $debug_cmd - - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result=$1 -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - -# func_mode_compile arg... -func_mode_compile () -{ - $debug_cmd - - # Get the compilation command and the source file. - base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg=$arg - arg_mode=normal - ;; - - target ) - libobj=$arg - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs=$IFS; IFS=, - for arg in $args; do - IFS=$save_ifs - func_append_quoted lastarg "$arg" - done - IFS=$save_ifs - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg=$srcfile - srcfile=$arg - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with '-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj=$func_basename_result - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from '$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name '$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test yes = "$build_old_libs"; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test yes = "$need_locks"; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test warn = "$need_locks"; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test no != "$pic_mode"; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test yes = "$compiler_c_o"; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test no != "$need_locks"; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a 'standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix '.c' with the -library object suffix, '.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to '-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the '--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE use a list of object files found in FILE to specify objects - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with '-') are ignored. - -Every other argument is treated as a filename. Files ending in '.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in '.la', then a libtool library is created, -only library objects ('.lo' files) may be specified, and '-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created -using 'ar' and 'ranlib', or on Windows using 'lib'. - -If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode '$opt_mode'" - ;; - esac - - echo - $ECHO "Try '$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test : = "$opt_help"; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - $SED '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $debug_cmd - - # The first argument is the command name. - cmd=$nonopt - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "'$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "'$file' was not linked with '-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir=$func_dirname_result - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir=$func_dirname_result - ;; - - *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic=$magic - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file=$progdir/$program - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file=$progdir/$program - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if $opt_dry_run; then - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - else - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd=\$cmd$args - fi -} - -test execute = "$opt_mode" && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $debug_cmd - - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "'$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument '$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the '-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the '$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the '$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the '$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $debug_cmd - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=false - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=: ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir=$func_dirname_result - destname=$func_basename_result - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "'$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir=$func_dirname_result - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking '$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname=$1 - shift - - srcname=$realname - test -n "$relink_command" && srcname=${realname}T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme=$stripme - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib=$destdir/$realname - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest=$destfile - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to '$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test yes = "$build_old_libs"; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext= - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=.exe - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" - - finalize=: - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test no = "$fast_install" && test -n "$relink_command"; then - $opt_dry_run || { - if $finalize; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink '$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file=$outputname - else - func_warning "cannot relink '$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name=$func_basename_result - - # 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 $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test install = "$opt_mode" && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms=${my_outputname}S.c - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* External symbol declarations for the compiler. */\ -" - - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp - $opt_dry_run || { - $RM $export_symbols - eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" - func_basename "$dlprefile" - name=$func_basename_result - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # 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*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' - - # Transform the symbol file into the correct name. - symfileobj=$output_objdir/${my_outputname}S.$objext - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for '$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $debug_cmd - - win32_libid_type=unknown - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s|.*|import| - p - q - } - }'` - ;; - esac - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $debug_cmd - - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $debug_cmd - - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result= - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $debug_cmd - - my_gentop=$1; shift - my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib=$func_basename_result - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches; do - func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" - $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" - cd "unfat-$$/$darwin_base_archive-$darwin_arch" - func_extract_an_archive "`pwd`" "$darwin_base_archive" - cd "$darwin_curdir" - $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result=$my_oldobjs -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - 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+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test yes = "$fast_install"; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - \$ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* declarations of non-ANSI functions */ -#if defined __MINGW32__ -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined __CYGWIN__ -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined other_platform || defined ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined _MSC_VER -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined __CYGWIN__ -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined other platforms ... */ -#endif - -#if defined PATH_MAX -# define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ -} while (0) - -#if defined LT_DEBUGWRAPPER -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - size_t tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined HAVE_DOS_BASED_FILE_SYSTEM - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined HAVE_DOS_BASED_FILE_SYSTEM - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = (size_t) (q - p); - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (STREQ (str, pat)) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - size_t len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - size_t orig_value_len = strlen (orig_value); - size_t add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - size_t len = strlen (new_value); - while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[--len] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $debug_cmd - - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $debug_cmd - - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # what system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - os2dllname= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=false - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module=$wl-single_module - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg=$1 - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir=$arg - prev= - continue - ;; - dlfiles|dlprefiles) - $preload || { - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=: - } - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test no = "$dlself"; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test dlprefiles = "$prev"; then - dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test dlfiles = "$prev"; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols=$arg - test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex=$arg - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - if test none != "$pic_object"; then - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - fi - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file '$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; - precious_regex) - precious_files_regex=$arg - prev= - continue - ;; - release) - release=-$arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test rpath = "$prev"; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds=$arg - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg=$arg - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test X-export-symbols = "X$arg"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" - else - func_fatal_error "need path for '-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test X-lc = "X$arg" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue - ;; - esac - elif test X-lc_r = "X$arg"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -mllvm) - prev=mllvm - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -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" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module=$wl-multi_module - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "'-no-install' is ignored for $host" - func_warning "assuming '-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -os2dllname) - prev=os2dllname - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - test none = "$pic_object" || { - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - } - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test dlprefiles = "$prev"; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" - - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test lib = "$linkmode"; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=false - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test lib,link = "$linkmode,$pass"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs=$tmp_deplibs - fi - - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs - deplibs= - fi - if test prog = "$linkmode"; then - case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test lib,dlpreopen = "$linkmode,$pass"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs=$dlprefiles - fi - if test dlopen = "$pass"; then - # Collect dlpreopened libraries - save_deplibs=$deplibs - deplibs= - fi - - for deplib in $libs; do - lib= - found=false - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test lib = "$linkmode"; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib=$searchdir/lib$name$search_ext - if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: - else - found=false - fi - break 2 - fi - done - done - if $found; then - # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library"; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - *.ltframework) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test conv = "$pass" && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - if test scan = "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "'-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test link = "$pass"; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=false - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: - fi - ;; - pass_all) - valid_a_lib=: - ;; - esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - fi - ;; - esac - continue - ;; - prog) - if test link != "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=: - continue - ;; - esac # case $deplib - - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir=$func_dirname_result - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test conv = "$pass"; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib=$l - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - - # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" - if test -z "$dlname" || - test yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of '$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir - fi - ;; - esac - func_basename "$lib" - laname=$func_basename_result - - # Find the relevant object directory and library name. - if test yes = "$installed"; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir - else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir - fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir=$ladir - absdir=$abs_ladir - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" - fi - case $host in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test lib = "$linkmode"; then - deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test prog = "$linkmode" && test link != "$pass"; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if $linkalldeplibs; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test prog,link = "$linkmode,$pass"; then - if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then - # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then - use_static_libs=no - fi - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test no = "$installed"; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest - break - fi - done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then - echo - if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname=$1 - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname=$dlname - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - esac - eval soname=\"$soname_spec\" - else - soname=$realname - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot=$soname - func_basename "$soroot" - soname=$func_basename_result - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from '$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for '$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test prog = "$linkmode" || test relink != "$opt_mode"; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib - case $host in - *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; - *-*-sysv4*uw2*) add_dir=-L$dir ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add=$dir/$old_library - fi - elif test -n "$old_library"; then - add=$dir/$old_library - fi - fi - esac - elif test no = "$hardcode_minus_L"; then - case $host in - *-*-sunos*) add_shlibpath=$dir ;; - esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - relink) - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - 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 - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test yes != "$lib_linked"; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test prog = "$linkmode"; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test prog = "$linkmode" || test relink = "$opt_mode"; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add=-l$name - elif test yes = "$hardcode_automatic"; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib"; then - add=$inst_prefix_dir$libdir/$linklib - else - add=$libdir/$linklib - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - fi - - if test prog = "$linkmode"; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test prog = "$linkmode"; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test yes = "$build_libtool_libs"; then - # Not a shared library - if test pass_all != "$deplibs_check_method"; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test lib = "$linkmode"; then - if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs=$temp_deplibs - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test no != "$link_all_deplibs"; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path=$deplib ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of '$dir'" - absdir=$dir - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names"; then - for tmp in $deplibrary_names; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl"; then - depdepl=$absdir/$objdir/$depdepl - darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" - path= - fi - fi - ;; - *) - path=-L$absdir/$objdir - ;; - esac - else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test dlopen != "$pass"; then - test conv = "$pass" || { - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - } - - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" - else - vars=deplibs - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i= - ;; - esac - if test -n "$i"; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles - fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "'-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs=$output - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form 'libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" - - if test no != "$need_lib_prefix"; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" - - install_libdir=$1 - - oldlibs= - if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then - # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs=$IFS; IFS=: - set dummy $vinfo 0 0 0 - shift - IFS=$save_ifs - - test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major=$1 - number_minor=$2 - number_revision=$3 - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # that has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_minor - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type '$version_type'" - ;; - esac - ;; - no) - current=$1 - revision=$2 - age=$3 - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT '$current' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION '$revision' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE '$age' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE '$age' is greater than the current interface number '$current'" - func_fatal_error "'$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac - ;; - - freebsd-aout) - major=.$current - versuffix=.$current.$revision - ;; - - freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - irix | nonstopux) - if test no = "$lt_irix_increment"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring=$verstring_prefix$major.$revision - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test 0 -ne "$loop"; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring_prefix$major.$iface:$verstring - done - - # Before this point, $major must not contain '.'. - major=.$major - versuffix=$major.$revision - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision - - # Add in all the interfaces that we are compatible with. - loop=$age - while test 0 -ne "$loop"; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring:$iface.0 - done - - # Make executables depend on our current version. - func_append verstring ":$current.0" - ;; - - qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current - ;; - - sunos) - major=.$current - versuffix=.$current.$revision - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - - *) - func_fatal_configuration "unknown library version type '$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring=0.0 - ;; - esac - if test no = "$need_version"; then - versuffix= - else - versuffix=.0.0 - fi - fi - - # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then - major= - versuffix= - verstring= - fi - - # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi - fi - else - # Don't allow undefined symbols. - allow_undefined_flag=$no_undefined_flag - fi - - fi - - func_generate_dlsyms "$libname" "$libname" : - func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= - - if test relink != "$opt_mode"; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles=$dlfiles - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test yes = "$build_libtool_libs"; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release= - versuffix= - major= - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib=$potent_lib - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib= - ;; - esac - fi - if test -n "$a_deplib"; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib=$potent_lib # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs= - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test none = "$deplibs_check_method"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test yes = "$droppeddeps"; then - if test yes = "$module"; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test no = "$allow_undefined"; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs=$new_libs - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test yes = "$hardcode_into_libs"; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname=$1 - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname=$realname - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib=$output_objdir/$realname - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols=$output_objdir/$libname.uexp - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols=$export_symbols - export_symbols= - always_export_symbols=yes - } - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs=$IFS; IFS='~' - for cmd1 in $cmds; do - IFS=$save_ifs - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test yes = "$try_normal_branch" \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=$output_objdir/$output_la.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs=$tmp_deplibs - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test : != "$skipped_export" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test yes = "$compiler_needs_object"; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test -z "$objlist" || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test 1 -eq "$k"; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-$k.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - } - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' - for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - ${skipped_export-false} && { - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - } - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs=$IFS; IFS='~' - for cmd in $cmds; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then - # On all known operating systems, these are identical. - dlname=$soname - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "'-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object '$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj=$output - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags - else - gentop=$output_objdir/${obj}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - - # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - - output=$obj - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - test yes = "$build_libtool_libs" || { - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - } - - if test -n "$pic_flag" || test default != "$pic_mode"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output=$libobj - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "'-release' is ignored for programs" - - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs=$new_libs - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath=$rpath - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath=$rpath - - if test -n "$libobjs" && test yes = "$build_old_libs"; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" false - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=: - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false - ;; - *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false - ;; - *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false - fi - ;; - esac - $wrappers_required || { - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' - fi - - exit $exit_status - } - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test yes = "$no_install"; then - # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource=$output_path/$objdir/lt-$output_name.c - cwrapper=$output_path/$output_name.exe - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host"; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience - build_libtool_libs=no - ;; - *) - oldobjs="$old_deplibs $non_pic_objects" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac - - if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase=$func_basename_result - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - 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" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test -z "$oldobjs"; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test yes = "$installed"; then - if test -z "$install_libdir"; then - break - fi - output=$output_objdir/${outputname}i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name=$func_basename_result - 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" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs=$newdependency_libs - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles=$newdlprefiles - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles=$newdlprefiles - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that cannot go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $debug_cmd - - RM=$nonopt - files= - rmforce=false - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=: ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir - else - odir=$dir/$objdir - fi - func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir - - # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif $rmforce; then - continue - fi - - rmfiles=$file - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case $opt_mode in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test clean = "$opt_mode"; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the $objdir's in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi - -test -z "$opt_mode" && { - help=$generic_help - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff -Nru sumo-1.1.0+dfsg1/Makefile.cvs sumo-1.2.0+dfsg1/Makefile.cvs --- sumo-1.1.0+dfsg1/Makefile.cvs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/Makefile.cvs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,8 @@ +default: all + +all: + autoreconf -i + +clean: + rm -r aclocal.m4 autom4te.cache/ config.* configure depcomp install-sh missing src/config.h.in ltmain.sh INSTALL src/version.h src/netimport/typemap.h; \ + find . \( -name '*.gcda' -o -name '*.gcno' -o -name Makefile.in \) -exec rm '{}' ';' diff -Nru sumo-1.1.0+dfsg1/Makefile.in sumo-1.2.0+dfsg1/Makefile.in --- sumo-1.1.0+dfsg1/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,950 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = . -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) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(am__DIST_COMMON) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -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 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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS ChangeLog compile \ - config.guess config.sub install-sh ltmain.sh missing -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_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,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - 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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -SUBDIRS = src unittest bin -EXTRA_DIST = README.md ChangeLog AUTHORS CONTRIBUTING.md LICENSE NOTICE.md sumo.doxyconf -all: all-recursive - -.SUFFIXES: -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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) - test -d "$(distdir)" || mkdir "$(distdir)" - @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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_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_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz - $(am__post_remove_distdir) -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_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 -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(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: - @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)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 - -.PRECIOUS: Makefile - - -doc: pydoc doxygen userdoc javadoc - -pydoc: - rm -rf docs/pydoc - mkdir docs/pydoc - cd docs/pydoc && \ - for i in `find ../../tools/traci ../../tools/sumolib -name "*.py" -not -executable | sed 's,../../tools/,,;s,/,.,g;s,.py,,;s,.__init__,,'`; do \ - PYTHONPATH="../../tools" python -c "import $$i, pydoc; pydoc.writedoc($$i)"; \ - done - -doxygen: - rm -rf docs/doxygen - mkdir docs/doxygen - doxygen sumo.doxyconf &> doxygen.log - -lcov: - rm -rf docs/lcov - mkdir docs/lcov - lcov -d . -c --no-external --output-file docs/lcov/lcov.info - genhtml -o docs/lcov/html docs/lcov/lcov.info - -lcov-reset: - lcov -d . -z - -userdoc: - rm -rf 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 - -javadoc: - rm -rf docs/javadoc - mkdir docs/javadoc - ant -f tools/contributed/traas/build.xml javadoc || true - mv tools/contributed/traas/javadoc docs/javadoc/traas || true - -man: - rm -rf docs/man - mkdir docs/man - help2man -N -n "A microscopic road traffic simulation" bin/sumo > docs/man/sumo.1 - help2man -N -n "GUI version of the simulation SUMO" bin/sumo-gui > docs/man/sumo-gui.1 - help2man -N -n "Builds vehicle routes for SUMO using detector values" bin/dfrouter > docs/man/dfrouter.1 - help2man -N -n "Shortest path router and DUE computer for the microscopic road traffic simulation SUMO" bin/duarouter > docs/man/duarouter.1 - help2man -N -n "Router for the microscopic road traffic simulation SUMO based on junction turning ratios" bin/jtrrouter > docs/man/jtrrouter.1 - help2man -N -n "Import O/D-matrices for macroscopic traffic assignment" bin/marouter > docs/man/marouter.1 - help2man -N -n "Generates routes of persons throughout a day for the microscopic road traffic simulation SUMO" bin/activitygen > docs/man/activitygen.1 - help2man -N -n "Importer of O/D-matrices for the road traffic simulation SUMO" bin/od2trips > docs/man/od2trips.1 - help2man -N -n "Road network importer / builder for the road traffic simulation SUMO" bin/netconvert > docs/man/netconvert.1 - help2man -N -n "Road network editor for the road traffic simulation SUMO" bin/netedit > docs/man/netedit.1 - help2man -N -n "Road network generator for the microscopic road traffic simulation SUMO" bin/netgenerate > docs/man/netgenerate.1 - help2man -N -n "Importer of polygons and POIs for the road traffic simulation SUMO" bin/polyconvert > docs/man/polyconvert.1 - help2man -N -n "TraCITestClient for the road traffic simulation SUMO" bin/TraCITestClient > docs/man/TraCITestClient.1 - -dist-hook: abs_distdir=`pwd`/$(distdir) -dist-hook: - cd $(srcdir) ; \ - if test -d tests; then \ - 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\|osm\)" -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 ; \ - tools/extractTest.py -i -f tests/examples.txt -o $(abs_distdir) ; \ - find build -regex ".*\.\(sh\|csh\|desktop\|png\|spec\|cmake\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ - find data -regex ".*\.\(xsd\|xml\|csv\|veh\|obj\|mtl\|ttf\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ - find tools -regex ".*\.\(py\|java\|xml\|sumocfg\|gif\|html\|png\|js\|css\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ - find . -name CMakeLists.txt -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ - cp --parents src/*.cmake $(abs_distdir) ; \ - fi; - -dist-doc: doc - cd $(srcdir) - $(am__remove_distdir) - mkdir -p $(distdir)/docs - find tests/complex/tutorial -regex ".*\.\(xml\|txt\|sumocfg\|netccfg\|py\|osm\)" -print0 | xargs -0 cp --parents --target-directory $(distdir) - mv $(distdir)/tests/complex/tutorial $(distdir)/docs - rmdir $(distdir)/tests/complex - rmdir $(distdir)/tests - find docs/doxygen -name "*.png" | xargs rm - cp -r docs/pydoc docs/doxygen docs/userdoc docs/javadoc $(distdir)/docs - tools/extractTest.py -i -f tests/examples.txt -o $(distdir) - tar -czf $(PACKAGE)-doc-$(VERSION).tar.gz $(distdir) - rm -f $(PACKAGE)-doc-$(VERSION).zip - zip -r $(PACKAGE)-doc-$(VERSION).zip $(distdir) - $(am__remove_distdir) - -dist-tests: - cd $(srcdir) - $(am__remove_distdir) - mkdir $(distdir) - find tests -name .svn -prune -o -type f -print0 | xargs -0 cp --parents -t $(distdir) - tar -czf $(PACKAGE)-tests-$(VERSION).tar.gz $(distdir) - $(am__remove_distdir) - -dist-complete: dist dist-doc dist-tests traas cadyts - 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) - -pydist: - cd tools && python ./build/setup-sumolib.py sdist bdist_egg && python ./build/setup-traci.py sdist bdist_egg - -examples: - tools/extractTest.py -x -f tests/examples.txt - -traas: - ant -f tools/contributed/traas/build.xml clean release || true - cp tools/contributed/traas/dist/TraaS.jar bin || true - -cadyts: - mvn --batch-mode -f tools/contributed/calibration/pom.xml clean install || true - cp tools/contributed/calibration/*/target/*.jar bin || true - -sumo$(EXEEXT) netconvert$(EXEEXT) \ - netgenerate$(EXEEXT) duarouter$(EXEEXT) \ - dfrouter$(EXEEXT) jtrrouter$(EXEEXT) \ - od2trips$(EXEEXT) polyconvert$(EXEEXT) \ - netedit$(EXEEXT) \ - sumo-gui$(EXEEXT): - $(MAKE) -C src $@ - -# 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-1.1.0+dfsg1/missing sumo-1.2.0+dfsg1/missing --- sumo-1.1.0+dfsg1/missing 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/missing 1970-01-01 00:00:00.000000000 +0000 @@ -1,215 +0,0 @@ -#! /bin/sh -# Common wrapper for a few potentially missing GNU programs. - -scriptversion=2013-10-28.13; # UTC - -# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Originally written by Fran,cois Pinard , 1996. - -# This program 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, 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 the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try '$0 --help' for more information" - exit 1 -fi - -case $1 in - - --is-lightweight) - # Used by our autoconf macros to check whether the available missing - # script is modern enough. - exit 0 - ;; - - --run) - # Back-compat with the calling convention used by older automake. - shift - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due -to PROGRAM being missing or too old. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man - -Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and -'g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: unknown '$1' option" - echo 1>&2 "Try '$0 --help' for more information" - exit 1 - ;; - -esac - -# Run the given program, remember its exit status. -"$@"; st=$? - -# If it succeeded, we are done. -test $st -eq 0 && exit 0 - -# Also exit now if we it failed (or wasn't found), and '--version' was -# passed; such an option is passed most likely to detect whether the -# program is present and works. -case $2 in --version|--help) exit $st;; esac - -# Exit code 63 means version mismatch. This often happens when the user -# tries to use an ancient version of a tool on a file that requires a -# minimum version. -if test $st -eq 63; then - msg="probably too old" -elif test $st -eq 127; then - # Program was missing. - msg="missing on your system" -else - # Program was found and executed, but failed. Give up. - exit $st -fi - -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software - -program_details () -{ - case $1 in - aclocal|automake) - echo "The '$1' program is part of the GNU Automake package:" - echo "<$gnu_software_URL/automake>" - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/autoconf>" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - autoconf|autom4te|autoheader) - echo "The '$1' program is part of the GNU Autoconf package:" - echo "<$gnu_software_URL/autoconf/>" - echo "It also requires GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - esac -} - -give_advice () -{ - # Normalize program name to check for. - normalized_program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - - printf '%s\n' "'$1' is $msg." - - configure_deps="'configure.ac' or m4 files included by 'configure.ac'" - case $normalized_program in - autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' - ;; - autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" - echo "$configure_deps." - program_details 'autoheader' - ;; - automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" - echo "$configure_deps." - program_details 'aclocal' - ;; - autom4te*) - echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' - ;; - bison*|yacc*) - echo "You should only need it if you modified a '.y' file." - echo "You may want to install the GNU Bison package:" - echo "<$gnu_software_URL/bison/>" - ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; - help2man*) - echo "You should only need it if you modified a dependency" \ - "of a man page." - echo "You may want to install the GNU Help2man package:" - echo "<$gnu_software_URL/help2man/>" - ;; - makeinfo*) - echo "You should only need it if you modified a '.texi' file, or" - echo "any other file indirectly affecting the aspect of the manual." - echo "You might want to install the Texinfo package:" - echo "<$gnu_software_URL/texinfo/>" - echo "The spurious makeinfo call might also be the consequence of" - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" - echo "want to install GNU make:" - echo "<$gnu_software_URL/make/>" - ;; - *) - echo "You might have modified some files without having the proper" - echo "tools for further handling them. Check the 'README' file, it" - echo "often tells you about the needed prerequisites for installing" - echo "this package. You may also peek at any GNU archive site, in" - echo "case some other package contains this missing '$1' program." - ;; - esac -} - -give_advice "$1" | sed -e '1s/^/WARNING: /' \ - -e '2,$s/^/ /' >&2 - -# Propagate the correct exit status (expected to be 127 for a program -# not found, 63 for a program that failed due to version mismatch). -exit $st - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru sumo-1.1.0+dfsg1/README.md sumo-1.2.0+dfsg1/README.md --- sumo-1.1.0+dfsg1/README.md 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/README.md 2019-04-15 14:11:30.000000000 +0000 @@ -9,18 +9,18 @@ What is SUMO ------------ -["Simulation of Urban MObility" (SUMO)](http://sumo.dlr.de/) is an open source, +["Simulation of Urban MObility" (SUMO)](https://sumo.dlr.de/) is an open source, highly portable, microscopic traffic simulation package designed to handle large road networks and different modes of transport. It is mainly developed by employees of the [Institute of Transportation Systems -at the German Aerospace Center](http://www.dlr.de/ts). +at the German Aerospace Center](https://www.dlr.de/ts). Where to get it --------------- -You can download SUMO from SourceForge via our [downloads site](http://sumo.dlr.de/wiki/Downloads). +You can download SUMO from SourceForge via our [downloads site](https://sumo.dlr.de/wiki/Downloads). As the program is still under development and is extended continuously, we advice you to use the latest sources from our GitHub repository. Using a command line client @@ -29,28 +29,36 @@ git clone --recursive https://github.com/eclipse/sumo -Mailing List ------------- +Contact +------- To stay informed, we have a mailing list for SUMO. You can subscribe at https://dev.eclipse.org/mailman/listinfo/sumo-user. Messages to the list can be sent to sumo-user@eclipse.org. SUMO announcements will be made through the sumo-announce@eclipse.org list; you can subscribe to this list at https://dev.eclipse.org/mailman/listinfo/sumo-announce. +For further contact information have a look at https://sumo.dlr.de/wiki/Contact. Build and Installation ---------------------- For Windows we provide pre-compiled binaries and CMake files to generate Visual Studio projects. -Using Linux a simple "./configure && make" should be enough for the distributions, if you -have installed all needed libraries properly. Using the repository checkout you -need to issue "make -f Makefile.cvs" before "./configure && make" in order to run -the autoconf utilities creating configure and the Makefiles. -If configure does not find the libraries or includes needed, please check -"./configure --help" for information on how to specify the paths needed. +If you want to develop under Windows, please also clone the dependent libraries using + + git clone --recursive https://github.com/DLR-TS/SUMOLibraries + +Using Linux you should have a look whether your distribution already contains sumo. +There is also a [ppa for ubuntu users](https://launchpad.net/~sumo) and a +[open build service instance](https://build.opensuse.org/project/show?project=home%3Abehrisch). +If you want to build yourself, the steps for ubuntu are: + + sudo apt-get install cmake python libxerces-c-dev libfox-1.6-dev libgl1-mesa-dev libglu1-mesa-dev libgdal-dev libproj-dev + mkdir build/cmake-build && cd build/cmake-build + cmake ../.. + make -j8 -For [detailed build instructions have a look at our wiki](http://sumo.dlr.de/wiki/Developer/Main#Build_instructions). +For [detailed build instructions have a look at our wiki](https://sumo.dlr.de/wiki/Developer/Main#Build_instructions). Getting started @@ -76,4 +84,4 @@ SUMO is licensed under the [Eclipse Public License Version 2](https://eclipse.org/legal/epl-v20.html). For the licenses of the different libraries and supplementary code information is in the -subdirectories and the [wiki](http://sumo.dlr.de/wiki/License). +subdirectories and the [wiki](https://sumo.dlr.de/wiki/License). diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivities.cpp sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivities.cpp --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivities.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivities.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivities.h sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivities.h --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivities.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivities.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivity.cpp sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivity.cpp --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivity.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivity.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -27,8 +27,9 @@ #include #include +#include +#include #include "AGActivity.h" -#include "../city/AGTime.h" // =========================================================================== @@ -39,6 +40,7 @@ return genDone; } + bool AGActivity::generateTrips() { return true; @@ -98,12 +100,14 @@ return available; } + int AGActivity::timeToDrive(AGPosition from, AGPosition to) { double dist = from.distanceTo(to); return (int)(timePerKm * dist / 1000.0); } + int AGActivity::depHour(AGPosition from, AGPosition to, int arrival) { // ?? departure.addDays(1); // in case of negative time: arrival < timeToDrive @@ -111,11 +115,13 @@ return (arrival - timeToDrive(from, to)); } + int AGActivity::arrHour(AGPosition from, AGPosition to, int departure) { return (departure + timeToDrive(from, to)); } + int AGActivity::randomTimeBetween(int begin, int end) { if (0 > begin || begin > end) { @@ -128,9 +134,11 @@ return (begin + tAlea); } + std::list& AGActivity::getPartialActivityTrips() { return myPartialActivityTrips; } + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivity.h sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivity.h --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGActivity.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGActivity.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -30,8 +30,13 @@ #include #include "AGTrip.h" -#include "../city/AGHousehold.h" -#include "../city/AGDataAndStatistics.h" +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class AGHousehold; // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGFreeTime.cpp sumo-1.2.0+dfsg1/src/activitygen/activities/AGFreeTime.cpp --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGFreeTime.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGFreeTime.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "AGFreeTime.h" diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGFreeTime.h sumo-1.2.0+dfsg1/src/activitygen/activities/AGFreeTime.h --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGFreeTime.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGFreeTime.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGTrip.cpp sumo-1.2.0+dfsg1/src/activitygen/activities/AGTrip.cpp --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGTrip.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGTrip.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGTrip.h sumo-1.2.0+dfsg1/src/activitygen/activities/AGTrip.h --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGTrip.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGTrip.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.cpp sumo-1.2.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.cpp --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -26,9 +26,14 @@ // =========================================================================== #include -#include "AGWorkAndSchool.h" #include -#include "../city/AGCar.h" +#include +#include +#include +#include +#include +#include +#include "AGWorkAndSchool.h" // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.h sumo-1.2.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.h --- sumo-1.1.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/AGWorkAndSchool.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/activities/Makefile.in sumo-1.2.0+dfsg1/src/activitygen/activities/Makefile.in --- sumo-1.1.0+dfsg1/src/activitygen/activities/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activities/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,640 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/activitygen/activities -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libagactivities.a -libagactivities_a_SOURCES = AGActivities.cpp AGActivities.h \ -AGTrip.cpp AGTrip.h \ -AGActivity.cpp AGActivity.h \ -AGWorkAndSchool.cpp AGWorkAndSchool.h \ -AGFreeTime.cpp AGFreeTime.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) --foreign src/activitygen/activities/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/activitygen/activities/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGActivities.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGActivity.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGFreeTime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGTrip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGWorkAndSchool.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/activitygen/activitygen_main.cpp sumo-1.2.0+dfsg1/src/activitygen/activitygen_main.cpp --- sumo-1.1.0+dfsg1/src/activitygen/activitygen_main.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/activitygen_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -69,7 +69,7 @@ throw ProcessError("The network file '" + file + "' could not be accessed."); } PROGRESS_BEGIN_MESSAGE("Loading net"); - RONetHandler handler(toFill, eb, true); + RONetHandler handler(toFill, eb, true, 0); handler.setFileName(file); if (!XMLSubSys::runParser(handler, file, true)) { PROGRESS_FAILED_MESSAGE(); diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGActivityGen.cpp sumo-1.2.0+dfsg1/src/activitygen/AGActivityGen.cpp --- sumo-1.1.0+dfsg1/src/activitygen/AGActivityGen.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGActivityGen.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGActivityGen.h sumo-1.2.0+dfsg1/src/activitygen/AGActivityGen.h --- sumo-1.1.0+dfsg1/src/activitygen/AGActivityGen.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGActivityGen.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGActivityGenHandler.cpp sumo-1.2.0+dfsg1/src/activitygen/AGActivityGenHandler.cpp --- sumo-1.1.0+dfsg1/src/activitygen/AGActivityGenHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGActivityGenHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGActivityGenHandler.h sumo-1.2.0+dfsg1/src/activitygen/AGActivityGenHandler.h --- sumo-1.1.0+dfsg1/src/activitygen/AGActivityGenHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGActivityGenHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGActivityTripWriter.cpp sumo-1.2.0+dfsg1/src/activitygen/AGActivityTripWriter.cpp --- sumo-1.1.0+dfsg1/src/activitygen/AGActivityTripWriter.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGActivityTripWriter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -59,7 +59,7 @@ 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_DEPART, time2string(TIME2STEPS(time))) .writeAttr(SUMO_ATTR_DEPARTPOS, trip.getDep().getPosition()) .writeAttr(SUMO_ATTR_ARRIVALPOS, trip.getArr().getPosition()) .writeAttr(SUMO_ATTR_ARRIVALSPEED, 0.) diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGActivityTripWriter.h sumo-1.2.0+dfsg1/src/activitygen/AGActivityTripWriter.h --- sumo-1.1.0+dfsg1/src/activitygen/AGActivityTripWriter.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGActivityTripWriter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGFrame.cpp sumo-1.2.0+dfsg1/src/activitygen/AGFrame.cpp --- sumo-1.1.0+dfsg1/src/activitygen/AGFrame.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/AGFrame.h sumo-1.2.0+dfsg1/src/activitygen/AGFrame.h --- sumo-1.1.0+dfsg1/src/activitygen/AGFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/AGFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGAdult.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGAdult.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGAdult.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGAdult.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGAdult.h sumo-1.2.0+dfsg1/src/activitygen/city/AGAdult.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGAdult.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGAdult.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGBus.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGBus.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGBus.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGBus.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGBus.h sumo-1.2.0+dfsg1/src/activitygen/city/AGBus.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGBus.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGBus.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGBusLine.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGBusLine.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGBusLine.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGBusLine.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGBusLine.h sumo-1.2.0+dfsg1/src/activitygen/city/AGBusLine.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGBusLine.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGBusLine.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGCar.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGCar.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGCar.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGCar.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGCar.h sumo-1.2.0+dfsg1/src/activitygen/city/AGCar.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGCar.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGCar.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGChild.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGChild.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGChild.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGChild.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGChild.h sumo-1.2.0+dfsg1/src/activitygen/city/AGChild.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGChild.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGChild.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGCity.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGCity.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGCity.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGCity.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -37,6 +37,7 @@ #include #include #include +#include "AGAdult.h" #include "AGStreet.h" #include "AGWorkPosition.h" #include "AGCity.h" diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGCity.h sumo-1.2.0+dfsg1/src/activitygen/city/AGCity.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGCity.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGCity.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -32,7 +32,6 @@ #include #include #include -#include #include "AGPosition.h" #include "AGDataAndStatistics.h" #include "AGSchool.h" @@ -45,6 +44,7 @@ // class declarations // =========================================================================== class AGHousehold; +class RONet; // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGDataAndStatistics.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGDataAndStatistics.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGDataAndStatistics.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGDataAndStatistics.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGDataAndStatistics.h sumo-1.2.0+dfsg1/src/activitygen/city/AGDataAndStatistics.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGDataAndStatistics.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGDataAndStatistics.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGHousehold.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGHousehold.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGHousehold.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGHousehold.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -28,8 +28,11 @@ #include #include -#include "AGHousehold.h" #include "AGCar.h" +#include "AGChild.h" +#include "AGCity.h" +#include "AGDataAndStatistics.h" +#include "AGHousehold.h" // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGHousehold.h sumo-1.2.0+dfsg1/src/activitygen/city/AGHousehold.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGHousehold.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGHousehold.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGPerson.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGPerson.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGPerson.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGPerson.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGPerson.h sumo-1.2.0+dfsg1/src/activitygen/city/AGPerson.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGPerson.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGPerson.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGPosition.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGPosition.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGPosition.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGPosition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGPosition.h sumo-1.2.0+dfsg1/src/activitygen/city/AGPosition.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGPosition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGPosition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials @@ -28,9 +28,9 @@ // =========================================================================== #include -#include "../../utils/geom/Position.h" #include #include +#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGSchool.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGSchool.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGSchool.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGSchool.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGSchool.h sumo-1.2.0+dfsg1/src/activitygen/city/AGSchool.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGSchool.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGSchool.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGStreet.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGStreet.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGStreet.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGStreet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGStreet.h sumo-1.2.0+dfsg1/src/activitygen/city/AGStreet.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGStreet.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGStreet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGTime.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGTime.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGTime.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGTime.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGTime.h sumo-1.2.0+dfsg1/src/activitygen/city/AGTime.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGTime.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGTime.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGWorkPosition.cpp sumo-1.2.0+dfsg1/src/activitygen/city/AGWorkPosition.cpp --- sumo-1.1.0+dfsg1/src/activitygen/city/AGWorkPosition.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGWorkPosition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/AGWorkPosition.h sumo-1.2.0+dfsg1/src/activitygen/city/AGWorkPosition.h --- sumo-1.1.0+dfsg1/src/activitygen/city/AGWorkPosition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/AGWorkPosition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/activitygen/city/Makefile.in sumo-1.2.0+dfsg1/src/activitygen/city/Makefile.in --- sumo-1.1.0+dfsg1/src/activitygen/city/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/city/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,661 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/activitygen/city -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - AGStreet.$(OBJEXT) AGPosition.$(OBJEXT) AGSchool.$(OBJEXT) \ - AGBusLine.$(OBJEXT) AGBus.$(OBJEXT) AGHousehold.$(OBJEXT) \ - AGWorkPosition.$(OBJEXT) AGPerson.$(OBJEXT) AGAdult.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libagcity.a -libagcity_a_SOURCES = AGTime.cpp AGTime.h \ -AGCity.cpp AGCity.h \ -AGStreet.cpp AGStreet.h \ -AGPosition.cpp AGPosition.h \ -AGSchool.cpp AGSchool.h \ -AGBusLine.cpp AGBusLine.h \ -AGBus.cpp AGBus.h \ -AGHousehold.cpp AGHousehold.h \ -AGWorkPosition.cpp AGWorkPosition.h \ -AGPerson.cpp AGPerson.h \ -AGAdult.cpp AGAdult.h \ -AGChild.cpp AGChild.h \ -AGDataAndStatistics.cpp AGDataAndStatistics.h \ -AGCar.cpp AGCar.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) --foreign src/activitygen/city/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/activitygen/city/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGAdult.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGBus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGBusLine.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGCar.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGChild.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGCity.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGDataAndStatistics.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGHousehold.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGPerson.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGPosition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGSchool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGStreet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGTime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGWorkPosition.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/activitygen/Makefile.am sumo-1.2.0+dfsg1/src/activitygen/Makefile.am --- sumo-1.1.0+dfsg1/src/activitygen/Makefile.am 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -29,4 +29,4 @@ ../duarouter/RODUAEdgeBuilder.o \ ../duarouter/RODUAFrame.o \ ../router/librouter.a \ -$(COMMON_LIBS) $(FOX_LDFLAGS) +$(COMMON_LIBS) $(FOX_LDFLAGS) $(PROJ_LDFLAGS) diff -Nru sumo-1.1.0+dfsg1/src/activitygen/Makefile.in sumo-1.2.0+dfsg1/src/activitygen/Makefile.in --- sumo-1.1.0+dfsg1/src/activitygen/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/activitygen/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,836 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = activitygen$(EXEEXT) -subdir = src/activitygen -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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_activitygen_OBJECTS = activitygen_main.$(OBJEXT) \ - AGActivityGen.$(OBJEXT) AGActivityGenHandler.$(OBJEXT) \ - AGActivityTripWriter.$(OBJEXT) AGFrame.$(OBJEXT) -activitygen_OBJECTS = $(am_activitygen_OBJECTS) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = ../utils/options/liboptions.a \ - ../utils/xml/libxml.a ../utils/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ - ../foreign/tcpip/libtcpip.a $(am__DEPENDENCIES_1) -activitygen_DEPENDENCIES = ./activities/libagactivities.a \ - ./city/libagcity.a ../duarouter/RODUAEdgeBuilder.o \ - ../duarouter/RODUAFrame.o ../router/librouter.a \ - $(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) $(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 = $(activitygen_SOURCES) -DIST_SOURCES = $(activitygen_SOURCES) -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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -SUBDIRS = activities city -COMMON_LIBS = ../utils/options/liboptions.a \ -../utils/xml/libxml.a \ -../utils/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ -../foreign/tcpip/libtcpip.a \ -$(XERCES_LIBS) - -activitygen_SOURCES = activitygen_main.cpp \ -AGActivityGen.cpp AGActivityGen.h \ -AGActivityGenHandler.cpp AGActivityGenHandler.h \ -AGActivityTripWriter.cpp AGActivityTripWriter.h \ -AGFrame.cpp AGFrame.h - -activitygen_LDFLAGS = $(XERCES_LDFLAGS) -activitygen_LDADD = ./activities/libagactivities.a \ -./city/libagcity.a \ -../duarouter/RODUAEdgeBuilder.o \ -../duarouter/RODUAFrame.o \ -../router/librouter.a \ -$(COMMON_LIBS) $(FOX_LDFLAGS) - -all: all-recursive - -.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) --foreign src/activitygen/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/activitygen/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 - -activitygen$(EXEEXT): $(activitygen_OBJECTS) $(activitygen_DEPENDENCIES) $(EXTRA_activitygen_DEPENDENCIES) - @rm -f activitygen$(EXEEXT) - $(AM_V_CXXLD)$(activitygen_LINK) $(activitygen_OBJECTS) $(activitygen_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGActivityGen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGActivityGenHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGActivityTripWriter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activitygen_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 - -# 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(PROGRAMS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/CMakeLists.txt sumo-1.2.0+dfsg1/src/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -2,7 +2,7 @@ netwrite netimport netbuild foreign_eulerspiral ${GDAL_LIBRARY} netimport_vissim netimport_vissim_typeloader netimport_vissim_tempstructs ${commonlibs}) set(sumolibs - traciserver libsumostatic netload microsim_cfmodels microsim_lcmodels microsim_devices microsim_trigger microsim_output microsim_pedestrians microsim_actions + traciserver libsumostatic netload microsim_cfmodels microsim_engine microsim_lcmodels microsim_devices microsim_trigger microsim_output microsim_pedestrians microsim_actions microsim_traffic_lights microsim mesosim ${commonvehiclelibs} ${GRPC_LIBS} ${PYTHON_LIBRARIES}) @@ -49,7 +49,7 @@ set_target_properties(sumo-gui PROPERTIES OUTPUT_NAME_DEBUG sumo-gui${BINARY_SUFFIX}D) target_link_libraries(sumo-gui gui guinetload guisim gui gui_dialogs utils_gui_windows utils_gui_globjects utils_gui_div utils_gui_settings - utils_gui_images utils_gui_cursors utils_gui_tracker utils_foxtools osgview microsim ${sumolibs} mesogui + utils_gui_images utils_gui_cursors utils_gui_shortcuts utils_gui_tracker utils_foxtools osgview microsim ${sumolibs} mesogui ${GDAL_LIBRARY} ${FFMPEG_LIBRARIES} ${OPENSCENEGRAPH_LIBRARIES} ${GL2PS_LIBRARIES}) if (MSVC) set_target_properties(sumo-gui PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") diff -Nru sumo-1.1.0+dfsg1/src/config.h.cmake sumo-1.2.0+dfsg1/src/config.h.cmake --- sumo-1.1.0+dfsg1/src/config.h.cmake 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/config.h.cmake 2019-04-15 14:11:30.000000000 +0000 @@ -42,8 +42,8 @@ /* defined if osg is available */ #cmakedefine HAVE_OSG -/* defined if PROJ is available */ -#cmakedefine HAVE_PROJ +/* set to proj.h, proj_api.h or empty depending on which proj is available */ +#cmakedefine PROJ_API_FILE "@PROJ_API_FILE@" /* defined if python is available */ #cmakedefine HAVE_PYTHON @@ -52,7 +52,7 @@ //#define HAVE_VERSION_H #ifndef HAVE_VERSION_H /* Define if auto-generated version.h is unavailable. */ -#define VERSION_STRING "1.1.0" +#define VERSION_STRING "1.2.0" #endif /* defines the epsilon to use on general floating point comparison */ diff -Nru sumo-1.1.0+dfsg1/src/config.h.in sumo-1.2.0+dfsg1/src/config.h.in --- sumo-1.1.0+dfsg1/src/config.h.in 2018-12-17 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/config.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,231 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define if compiling under cygwin */ -#undef HAVE_CYGWIN - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Reporting string for enabled options */ -#undef HAVE_ENABLED - -/* defined if ffmpeg is available */ -#undef HAVE_FFMPEG - -/* Define to 1 if you have the header file. */ -#undef HAVE_FLOAT_H - -/* 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 - -/* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MATH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - -/* defined if osg is available */ -#undef HAVE_OSG - -/* Define to 1 if you have the `pow' function. */ -#undef HAVE_POW - -/* defined if PROJ is available */ -#undef HAVE_PROJ - -/* defined if python is available */ -#undef HAVE_PYTHON - -/* Define to 1 if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define to 1 if you have the `socket' function. */ -#undef HAVE_SOCKET - -/* Define to 1 if you have the `sqrt' function. */ -#undef HAVE_SQRT - -/* Define to 1 if `stat' has the bug that it succeeds when given the - zero-length file name argument. */ -#undef HAVE_STAT_EMPTY_STRING_BUG - -/* Define to 1 if stdbool.h conforms to C99. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if auto-generated version.h should be used. */ -#undef HAVE_VERSION_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WCHAR_H - -/* Define to 1 if the system has the type `_Bool'. */ -#undef HAVE__BOOL - -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing - slash. */ -#undef LSTAT_FOLLOWS_SLASHED_SYMLINK - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Including windows.h gives errors otherwise (cygwin) */ -#undef NOMINMAX - -/* defines the epsilon to use on general floating point comparison */ -#undef NUMERICAL_EPS - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* defines the epsilon to use on position comparison */ -#undef POSITION_EPS - -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* Define to the type of arg 1 for `select'. */ -#undef SELECT_TYPE_ARG1 - -/* Define to the type of args 2, 3 and 4 for `select'. */ -#undef SELECT_TYPE_ARG234 - -/* Define to the type of arg 5 for `select'. */ -#undef SELECT_TYPE_ARG5 - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* Version number of package */ -#undef VERSION - -/* Defined if auto-generated version.h is unavailable. */ -#undef VERSION_STRING - -/* Xerces and Fox expect this to be defined (cygwin) */ -#undef WIN32 - -/* Define length for Xerces 3. */ -#undef XERCES3_SIZE_t - -/* Define to 1 in order to enable sumo debugging code. */ -#undef _DEBUG - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -#undef volatile diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/dfrouter_main.cpp sumo-1.2.0+dfsg1/src/dfrouter/dfrouter_main.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/dfrouter_main.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/dfrouter_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/Makefile.am sumo-1.2.0+dfsg1/src/dfrouter/Makefile.am --- sumo-1.1.0+dfsg1/src/dfrouter/Makefile.am 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -22,4 +22,4 @@ ../utils/emissions/libemissions.a \ ../foreign/PHEMlight/cpp/libphemlight.a \ ../foreign/tcpip/libtcpip.a \ --l$(LIB_XERCES) $(FOX_LDFLAGS) +-l$(LIB_XERCES) $(FOX_LDFLAGS) $(PROJ_LDFLAGS) diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/Makefile.in sumo-1.2.0+dfsg1/src/dfrouter/Makefile.in --- sumo-1.1.0+dfsg1/src/dfrouter/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,720 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = dfrouter$(EXEEXT) -subdir = src/dfrouter -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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_dfrouter_OBJECTS = dfrouter_main.$(OBJEXT) \ - RODFDetFlowLoader.$(OBJEXT) RODFDetector.$(OBJEXT) \ - RODFDetectorFlow.$(OBJEXT) RODFDetectorHandler.$(OBJEXT) \ - RODFNet.$(OBJEXT) RODFRouteCont.$(OBJEXT) \ - 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/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ - ../foreign/tcpip/libtcpip.a $(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) $(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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -dfrouter_SOURCES = dfrouter_main.cpp RODFDetFlowLoader.cpp RODFDetFlowLoader.h \ -RODFDetector.cpp RODFDetector.h RODFDetectorFlow.cpp RODFDetectorFlow.h \ -RODFDetectorHandler.cpp RODFDetectorHandler.h \ -RODFNet.cpp RODFNet.h RODFRouteCont.cpp RODFRouteCont.h \ -RODFRouteDesc.h RODFEdgeBuilder.cpp RODFEdgeBuilder.h \ -RODFEdge.cpp RODFEdge.h \ -RODFFrame.cpp RODFFrame.h - -dfrouter_LDFLAGS = $(XERCES_LDFLAGS) -dfrouter_LDADD = ../router/librouter.a \ -../utils/options/liboptions.a \ -../utils/xml/libxml.a \ -../utils/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ -../foreign/tcpip/libtcpip.a \ --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) --foreign src/dfrouter/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dfrouter/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 - -dfrouter$(EXEEXT): $(dfrouter_OBJECTS) $(dfrouter_DEPENDENCIES) $(EXTRA_dfrouter_DEPENDENCIES) - @rm -f dfrouter$(EXEEXT) - $(AM_V_CXXLD)$(dfrouter_LINK) $(dfrouter_OBJECTS) $(dfrouter_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFDetFlowLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFDetector.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFDetectorFlow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFDetectorHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFEdge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFEdgeBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFNet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODFRouteCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfrouter_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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/dfrouter/RODFDetector.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFDetector.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetector.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetector.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -205,7 +205,7 @@ } } if (splitEdge != nullptr) { - j = find(j, (*ri).edges2Pass.end(), splitEdge); + j = std::find(j, (*ri).edges2Pass.end(), splitEdge); } else { ++j; } @@ -308,6 +308,7 @@ return false; } // insertions + int vehicleIndex = 0; if (insertionsOnly || flows.knows(myID)) { // get the flows for this detector const std::vector& mflows = flows.getFlowDefs(myID); @@ -367,11 +368,7 @@ // write out.openTag(SUMO_TAG_VEHICLE); - if (getType() == SOURCE_DETECTOR) { - out.writeAttr(SUMO_ATTR_ID, "emitter_" + myID + "_" + toString(ctime)); - } else { - out.writeAttr(SUMO_ATTR_ID, "calibrator_" + myID + "_" + toString(ctime)); - } + out.writeAttr(SUMO_ATTR_ID, myID + "." + toString(vehicleIndex)); if (oc.getBool("vtype")) { out.writeAttr(SUMO_ATTR_TYPE, vtype); } @@ -422,6 +419,7 @@ } out.closeTag(); srcFD.isLKW += srcFD.fLKW; + vehicleIndex++; } } } @@ -720,6 +718,8 @@ // individual speedFactors to match departSpeed (MSEdge::insertVehicle()) type.speedFactor.getParameter()[1] = dev; type.parametersSet |= VTYPEPARS_SPEEDFACTOR_SET; + } else { + type.speedFactor.getParameter()[1] = -1; // do not write speedDev, only simple speedFactor } } @@ -877,7 +877,7 @@ myDetectorMap.erase(ri1); // std::vector::iterator ri2 = - find(myDetectors.begin(), myDetectors.end(), oldDet); + std::find(myDetectors.begin(), myDetectors.end(), oldDet); myDetectors.erase(ri2); // bool found = false; @@ -955,7 +955,7 @@ void RODFDetectorCon::clearDists(std::map* >& dists) const { for (std::map* >::iterator i = dists.begin(); i != dists.end(); ++i) { - delete(*i).second; + delete (*i).second; } } diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorFlow.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorFlow.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorFlow.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorFlow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorFlow.h sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorFlow.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorFlow.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorFlow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFDetector.h sumo-1.2.0+dfsg1/src/dfrouter/RODFDetector.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorHandler.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorHandler.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorHandler.h sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorHandler.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetectorHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetectorHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFDetFlowLoader.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFDetFlowLoader.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetFlowLoader.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetFlowLoader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFDetFlowLoader.h sumo-1.2.0+dfsg1/src/dfrouter/RODFDetFlowLoader.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFDetFlowLoader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFDetFlowLoader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFEdgeBuilder.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFEdgeBuilder.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFEdgeBuilder.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFEdgeBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFEdgeBuilder.h sumo-1.2.0+dfsg1/src/dfrouter/RODFEdgeBuilder.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFEdgeBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFEdgeBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFEdge.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFEdge.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFEdge.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFEdge.h sumo-1.2.0+dfsg1/src/dfrouter/RODFEdge.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFEdge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFFrame.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFFrame.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFFrame.cpp 2018-08-23 22:00:10.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFFrame.h sumo-1.2.0+dfsg1/src/dfrouter/RODFFrame.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFNet.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFNet.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFNet.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFNet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFNet.h sumo-1.2.0+dfsg1/src/dfrouter/RODFNet.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFNet.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFNet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFRouteCont.cpp sumo-1.2.0+dfsg1/src/dfrouter/RODFRouteCont.cpp --- sumo-1.1.0+dfsg1/src/dfrouter/RODFRouteCont.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFRouteCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFRouteCont.h sumo-1.2.0+dfsg1/src/dfrouter/RODFRouteCont.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFRouteCont.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFRouteCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/dfrouter/RODFRouteDesc.h sumo-1.2.0+dfsg1/src/dfrouter/RODFRouteDesc.h --- sumo-1.1.0+dfsg1/src/dfrouter/RODFRouteDesc.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/dfrouter/RODFRouteDesc.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/duarouter/duarouter_main.cpp sumo-1.2.0+dfsg1/src/duarouter/duarouter_main.cpp --- sumo-1.1.0+dfsg1/src/duarouter/duarouter_main.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/duarouter/duarouter_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -44,11 +44,10 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -94,6 +93,7 @@ // initialise the loader loader.openRoutes(net); // build the router + auto ttFunction = gWeightsRandomFactor > 1 ? &ROEdge::getTravelTimeStaticRandomized : &ROEdge::getTravelTimeStatic; SUMOAbstractRouter* router; const std::string measure = oc.getString("weight-attribute"); const std::string routingAlgorithm = oc.getString("routing-algorithm"); @@ -103,10 +103,10 @@ if (routingAlgorithm == "dijkstra") { if (net.hasPermissions()) { router = new DijkstraRouter >( - ROEdge::getAllEdges(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); + ROEdge::getAllEdges(), oc.getBool("ignore-errors"), ttFunction); } else { router = new DijkstraRouter >( - ROEdge::getAllEdges(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); + ROEdge::getAllEdges(), oc.getBool("ignore-errors"), ttFunction); } } else if (routingAlgorithm == "astar") { if (net.hasPermissions()) { @@ -120,9 +120,9 @@ begin, end, std::numeric_limits::max(), 1); ROVehicle defaultVehicle(SUMOVehicleParameter(), nullptr, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID), &net); lookup = std::make_shared(oc.getString("astar.landmark-distances"), ROEdge::getAllEdges(), &router, &defaultVehicle, - oc.isSet("astar.save-landmark-distances") ? oc.getString("astar.save-landmark-distances") : "", oc.getInt("routing-threads")); + oc.isSet("astar.save-landmark-distances") ? oc.getString("astar.save-landmark-distances") : "", oc.getInt("routing-threads")); } - router = new AStar(ROEdge::getAllEdges(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, lookup); + router = new AStar(ROEdge::getAllEdges(), oc.getBool("ignore-errors"), ttFunction, lookup); } else { typedef AStarRouter > AStar; std::shared_ptr lookup; @@ -134,9 +134,9 @@ begin, end, std::numeric_limits::max(), 1); ROVehicle defaultVehicle(SUMOVehicleParameter(), nullptr, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID), &net); lookup = std::make_shared(oc.getString("astar.landmark-distances"), ROEdge::getAllEdges(), &router, &defaultVehicle, - oc.isSet("astar.save-landmark-distances") ? oc.getString("astar.save-landmark-distances") : "", oc.getInt("routing-threads")); + oc.isSet("astar.save-landmark-distances") ? oc.getString("astar.save-landmark-distances") : "", oc.getInt("routing-threads")); } - router = new AStar(ROEdge::getAllEdges(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, lookup); + router = new AStar(ROEdge::getAllEdges(), oc.getBool("ignore-errors"), ttFunction, lookup); } } else if (routingAlgorithm == "CH") { const SUMOTime weightPeriod = (oc.isSet("weight-files") ? @@ -182,10 +182,10 @@ } if (net.hasPermissions()) { router = new DijkstraRouter >( - ROEdge::getAllEdges(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTimeStatic); + ROEdge::getAllEdges(), oc.getBool("ignore-errors"), op, ttFunction); } else { router = new DijkstraRouter >( - ROEdge::getAllEdges(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTimeStatic); + ROEdge::getAllEdges(), oc.getBool("ignore-errors"), op, ttFunction); } } int carWalk = 0; diff -Nru sumo-1.1.0+dfsg1/src/duarouter/Makefile.am sumo-1.2.0+dfsg1/src/duarouter/Makefile.am --- sumo-1.1.0+dfsg1/src/duarouter/Makefile.am 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/duarouter/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -18,4 +18,4 @@ ../utils/emissions/libemissions.a \ ../foreign/PHEMlight/cpp/libphemlight.a \ ../foreign/tcpip/libtcpip.a \ --l$(LIB_XERCES) $(FOX_LDFLAGS) +-l$(LIB_XERCES) $(FOX_LDFLAGS) $(PROJ_LDFLAGS) diff -Nru sumo-1.1.0+dfsg1/src/duarouter/Makefile.in sumo-1.2.0+dfsg1/src/duarouter/Makefile.in --- sumo-1.1.0+dfsg1/src/duarouter/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/duarouter/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,705 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = duarouter$(EXEEXT) -subdir = src/duarouter -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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_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/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ - ../foreign/tcpip/libtcpip.a $(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) $(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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -duarouter_SOURCES = duarouter_main.cpp \ -RODUAEdgeBuilder.cpp RODUAEdgeBuilder.h \ -RODUAFrame.cpp RODUAFrame.h - -duarouter_LDFLAGS = $(XERCES_LDFLAGS) -duarouter_LDADD = ../router/librouter.a \ -../utils/options/liboptions.a \ -../utils/xml/libxml.a \ -../utils/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ -../foreign/tcpip/libtcpip.a \ --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) --foreign src/duarouter/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/duarouter/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 - -duarouter$(EXEEXT): $(duarouter_OBJECTS) $(duarouter_DEPENDENCIES) $(EXTRA_duarouter_DEPENDENCIES) - @rm -f duarouter$(EXEEXT) - $(AM_V_CXXLD)$(duarouter_LINK) $(duarouter_OBJECTS) $(duarouter_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODUAEdgeBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RODUAFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/duarouter_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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/duarouter/RODUAEdgeBuilder.cpp sumo-1.2.0+dfsg1/src/duarouter/RODUAEdgeBuilder.cpp --- sumo-1.1.0+dfsg1/src/duarouter/RODUAEdgeBuilder.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/duarouter/RODUAEdgeBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/duarouter/RODUAEdgeBuilder.h sumo-1.2.0+dfsg1/src/duarouter/RODUAEdgeBuilder.h --- sumo-1.1.0+dfsg1/src/duarouter/RODUAEdgeBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/duarouter/RODUAEdgeBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/duarouter/RODUAFrame.cpp sumo-1.2.0+dfsg1/src/duarouter/RODUAFrame.cpp --- sumo-1.1.0+dfsg1/src/duarouter/RODUAFrame.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/duarouter/RODUAFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -79,6 +79,12 @@ oc.doRegister("intermodal-weight-output", new Option_FileName()); oc.addDescription("intermodal-weight-output", "Output", "Write intermodal edges with lengths and travel times to FILE"); + oc.doRegister("write-trips", new Option_Bool(false)); + oc.addDescription("write-trips", "Output", "Write trips instead of vehicles (for validating trip input)"); + + oc.doRegister("write-trips.geo", new Option_Bool(false)); + oc.addDescription("write-trips.geo", "Output", "Write trips with geo-coordinates"); + // register import options oc.doRegister("weight-files", 'w', new Option_FileName()); oc.addSynonyme("weight-files", "weights"); @@ -100,6 +106,9 @@ oc.addSynonyme("weights.expand", "expand-weights", true); oc.addDescription("weights.expand", "Processing", "Expand weights behind the simulation's end"); + oc.doRegister("weights.random-factor", new Option_Float(1.)); + oc.addDescription("weights.random-factor", "Processing", "Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT)"); + oc.doRegister("routing-algorithm", new Option_String("dijkstra")); oc.addDescription("routing-algorithm", "Processing", "Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']"); diff -Nru sumo-1.1.0+dfsg1/src/duarouter/RODUAFrame.h sumo-1.2.0+dfsg1/src/duarouter/RODUAFrame.h --- sumo-1.1.0+dfsg1/src/duarouter/RODUAFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/duarouter/RODUAFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/foreign/eulerspiral/LICENSE.TXT sumo-1.2.0+dfsg1/src/foreign/eulerspiral/LICENSE.TXT --- sumo-1.1.0+dfsg1/src/foreign/eulerspiral/LICENSE.TXT 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/eulerspiral/LICENSE.TXT 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff -Nru sumo-1.1.0+dfsg1/src/foreign/eulerspiral/Makefile.in sumo-1.2.0+dfsg1/src/foreign/eulerspiral/Makefile.in --- sumo-1.1.0+dfsg1/src/foreign/eulerspiral/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/eulerspiral/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,631 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foreign/eulerspiral -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = odrSpiral.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libeulerspiral.a -libeulerspiral_a_SOURCES = \ -odrSpiral.h odrSpiral.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) --foreign src/foreign/eulerspiral/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/foreign/eulerspiral/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odrSpiral.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/foreign/fontstash/LICENSE.txt sumo-1.2.0+dfsg1/src/foreign/fontstash/LICENSE.txt --- sumo-1.1.0+dfsg1/src/foreign/fontstash/LICENSE.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/fontstash/LICENSE.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,18 @@ +Copyright (c) 2013 Mikko Mononen memon@inside.org + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + diff -Nru sumo-1.1.0+dfsg1/src/foreign/fontstash/Makefile.in sumo-1.2.0+dfsg1/src/foreign/fontstash/Makefile.in --- sumo-1.1.0+dfsg1/src/foreign/fontstash/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/fontstash/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,465 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foreign/fontstash -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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) -am__DIST_COMMON = $(srcdir)/Makefile.in -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -EXTRA_DIST = fontstash.h glfontstash.h stb_truetype.h -all: all-am - -.SUFFIXES: -$(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) --foreign src/foreign/fontstash/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/foreign/fontstash/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -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 -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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - 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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/foreign/Makefile.in sumo-1.2.0+dfsg1/src/foreign/Makefile.in --- sumo-1.1.0+dfsg1/src/foreign/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,646 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foreign -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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 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_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 tcpip PHEMlight rtree fontstash -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -@WITH_GUI_TRUE@GUIDIRS = rtree fontstash -SUBDIRS = eulerspiral tcpip PHEMlight $(GUIDIRS) -all: all-recursive - -.SUFFIXES: -$(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) --foreign src/foreign/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/foreign/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 - -.PRECIOUS: Makefile - - -# 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: Binary files /tmp/tmpPYmR2G/BYD1raS2U6/sumo-1.1.0+dfsg1/src/foreign/PHEMlight/ConverterOptions.dat and /tmp/tmpPYmR2G/bwbBZs1eRB/sumo-1.2.0+dfsg1/src/foreign/PHEMlight/ConverterOptions.dat differ diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.cpp sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.cpp --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.cpp 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.h sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.h --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.h 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEP.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.cpp sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.cpp --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.cpp 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.h sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.h --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.h 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/CEPHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.cpp sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.cpp --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.cpp 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.h sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.h --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.h 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Constants.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/conversion.patch sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/conversion.patch --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/conversion.patch 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/conversion.patch 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,573 @@ +diff --git b/src/foreign/PHEMlight/cpp/CEP.cpp a/src/foreign/PHEMlight/cpp/CEP.cpp +index eafe2e787f..5a0aef688e 100644 +--- b/src/foreign/PHEMlight/cpp/CEP.cpp ++++ a/src/foreign/PHEMlight/cpp/CEP.cpp +@@ -1,4 +1,25 @@ +-#include "CEP.h" ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file CEP.cpp ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#include "CEP.h" + #include "Constants.h" + #include "Helpers.h" + +@@ -6,6 +27,7 @@ + namespace PHEMlightdll { + + CEP::CEP(bool heavyVehicle, double vehicleMass, double vehicleLoading, double vehicleMassRot, double crossArea, double cWValue, double f0, double f1, double f2, double f3, double f4, double axleRatio, std::vector& transmissionGearRatios, double auxPower, double ratedPower, double engineIdlingSpeed, double engineRatedSpeed, double effictiveWheelDiameter, double pNormV0, double pNormP0, double pNormV1, double pNormP1, const std::string& vehicelFuelType, std::vector >& matrixFC, std::vector& headerLinePollutants, std::vector >& matrixPollutants, std::vector >& matrixSpeedRotational, std::vector >& normedDragTable, double idlingFC, std::vector& idlingPollutants) { ++ transmissionGearRatios.size(); // just to make the compiler happy about the unused parameter + InitializeInstanceFields(); + _resistanceF0 = f0; + _resistanceF1 = f1; +@@ -36,12 +58,12 @@ namespace PHEMlightdll { + std::vector > normalizedPollutantMeasures; + + // init pollutant identifiers +- for (int i = 0; i < headerLinePollutants.size(); i++) { ++ for (int i = 0; i < (int)headerLinePollutants.size(); i++) { + pollutantIdentifier.push_back(headerLinePollutants[i]); + } + + // initialize measures +- for (int i = 0; i < headerLinePollutants.size(); i++) { ++ for (int i = 0; i < (int)headerLinePollutants.size(); i++) { + pollutantMeasures.push_back(std::vector()); + normalizedPollutantMeasures.push_back(std::vector()); + } +@@ -50,7 +72,7 @@ namespace PHEMlightdll { + _speedCurveRotational = std::vector(); + _speedPatternRotational = std::vector(); + _gearTransmissionCurve = std::vector(); +- for (int i = 0; i < matrixSpeedRotational.size(); i++) { ++ for (int i = 0; i < (int)matrixSpeedRotational.size(); i++) { + if (matrixSpeedRotational[i].size() != 3) { + return; + } +@@ -63,7 +85,7 @@ namespace PHEMlightdll { + // looping through matrix and assigning values for drag table + _nNormTable = std::vector(); + _dragNormTable = std::vector(); +- for (int i = 0; i < normedDragTable.size(); i++) { ++ for (int i = 0; i < (int)normedDragTable.size(); i++) { + if (normedDragTable[i].size() != 2) { + return; + } +@@ -77,7 +99,7 @@ namespace PHEMlightdll { + _normedCepCurveFC = std::vector(); + _powerPatternFC = std::vector(); + _normalizedPowerPatternFC = std::vector(); +- for (int i = 0; i < matrixFC.size(); i++) { ++ for (int i = 0; i < (int)matrixFC.size(); i++) { + if (matrixFC[i].size() != 2) { + return; + } +@@ -110,10 +132,10 @@ namespace PHEMlightdll { + + _cepNormalizedCurvePollutants = std::map >(); + +- int headerCount = headerLinePollutants.size(); +- for (int i = 0; i < matrixPollutants.size(); i++) { +- for (int j = 0; j < matrixPollutants[i].size(); j++) { +- if (matrixPollutants[i].size() != headerCount + 1) { ++ 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; + } + +@@ -131,7 +153,7 @@ namespace PHEMlightdll { + _cepCurvePollutants = std::map >(); + _idlingValuesPollutants = std::map(); + +- for (int i = 0; i < headerLinePollutants.size(); i++) { ++ for (int i = 0; i < (int)headerLinePollutants.size(); i++) { + _cepCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], pollutantMeasures[i])); + _cepNormalizedCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], normalizedPollutantMeasures[i])); + _idlingValuesPollutants.insert(std::make_pair(pollutantIdentifier[i], idlingPollutants[i] * pollutantMultiplyer)); +@@ -211,7 +233,7 @@ namespace PHEMlightdll { + int upperIndex; + int lowerIndex; + +- if (VehicleClass->gettClass() != Constants::strBEV) { ++ if (_fuelType != Constants::strBEV) { + if (std::abs(speed) <= Constants::ZERO_SPEED_ACCURACY) { + if (pollutant == "FC") { + return _idlingValueFC; +@@ -353,14 +375,14 @@ namespace PHEMlightdll { + } + + if (value >= pattern.back()) { +- lowerIndex = pattern.size() - 1; +- upperIndex = pattern.size() - 1; ++ lowerIndex = (int)pattern.size() - 1; ++ upperIndex = (int)pattern.size() - 1; + return; + } + + // bisection search to find correct position in power pattern +- int middleIndex = (pattern.size() - 1) / 2; +- upperIndex = pattern.size() - 1; ++ int middleIndex = ((int)pattern.size() - 1) / 2; ++ upperIndex = (int)pattern.size() - 1; + lowerIndex = 0; + + while (upperIndex - lowerIndex > 1) { +diff --git b/src/foreign/PHEMlight/cpp/CEP.h a/src/foreign/PHEMlight/cpp/CEP.h +index f24983953b..84aa342689 100644 +--- b/src/foreign/PHEMlight/cpp/CEP.h ++++ a/src/foreign/PHEMlight/cpp/CEP.h +@@ -1,4 +1,25 @@ +-#ifndef PHEMlightCEP ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file CEP.h ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#ifndef PHEMlightCEP + #define PHEMlightCEP + + #define _USE_MATH_DEFINES +@@ -11,7 +32,6 @@ + //C# TO C++ CONVERTER NOTE: Forward class declarations: + namespace PHEMlightdll { class Helpers; } + +-#define FLEET + + namespace PHEMlightdll { + class CEP { +diff --git b/src/foreign/PHEMlight/cpp/CEPHandler.cpp a/src/foreign/PHEMlight/cpp/CEPHandler.cpp +index 53a739894b..fa5ee8e2ae 100644 +--- b/src/foreign/PHEMlight/cpp/CEPHandler.cpp ++++ a/src/foreign/PHEMlight/cpp/CEPHandler.cpp +@@ -1,4 +1,27 @@ +-#include "CEPHandler.h" ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file CEPHandler.cpp ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#include ++#include ++#include "CEPHandler.h" + #include "CEP.h" + #include "Helpers.h" + #include "Constants.h" +@@ -10,11 +33,11 @@ namespace PHEMlightdll { + _ceps = std::map(); + } + +- std::map CEPHandler::getCEPS() const { ++ const std::map& CEPHandler::getCEPS() const { + return _ceps; + } + +- bool CEPHandler::GetCEP(const std::string& DataPath, Helpers* Helper) { ++ bool CEPHandler::GetCEP(const std::vector& DataPath, Helpers* Helper) { + if (getCEPS().find(Helper->getgClass()) == getCEPS().end()) { + if (!Load(DataPath, Helper)) { + return false; +@@ -23,11 +46,11 @@ namespace PHEMlightdll { + return true; + } + +- bool CEPHandler::Load(const std::string& DataPath, Helpers* Helper) { ++ bool CEPHandler::Load(const std::vector& DataPath, Helpers* Helper) { + //Deklaration + // get string identifier for PHEM emission class + //C# TO C++ CONVERTER TODO TASK: There is no native C++ equivalent to 'ToString': +- std::string emissionRep = Helper->getgClass().ToString(); ++ std::string emissionRep = Helper->getgClass(); + + // to hold everything. + std::vector > matrixSpeedInertiaTable; +@@ -80,7 +103,7 @@ namespace PHEMlightdll { + return true; + } + +- bool CEPHandler::ReadVehicleFile(const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector >& matrixSpeedInertiaTable, std::vector >& normedDragTable) { ++ bool CEPHandler::ReadVehicleFile(const std::vector& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector >& matrixSpeedInertiaTable, std::vector >& normedDragTable) { + vehicleMass = 0; + vehicleLoading = 0; + vehicleMassRot = 0; +@@ -111,12 +134,17 @@ namespace PHEMlightdll { + int dataCount = 0; + + //Open file +- std::string path = DataPath + std::string("\\") + emissionClass + std::string(".PHEMLight.veh"); +- if (!File::Exists(path)) { +- Helper->setErrMsg(std::string("File do not exist! (") + path + std::string(")")); ++ std::ifstream vehicleReader; ++ for (std::vector::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) { ++ vehicleReader.open(((*i) + emissionClass + ".PHEMLight.veh").c_str()); ++ if (vehicleReader.good()) { ++ break; ++ } ++ } ++ if (!vehicleReader.good()) { ++ Helper->setErrMsg("File does not exist! (" + emissionClass + ".PHEMLight.veh)"); + return false; + } +- StreamReader* vehicleReader = File::OpenText(path); + + // skip header + ReadLine(vehicleReader); +@@ -262,11 +290,10 @@ namespace PHEMlightdll { + normedDragTable.push_back(todoubleList(split(line, ','))); + } + +- vehicleReader->Close(); + return true; + } + +- bool CEPHandler::ReadEmissionData(bool readFC, const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector& header, std::vector >& matrix, std::vector& idlingValues) { ++ bool CEPHandler::ReadEmissionData(bool readFC, const std::vector& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector& header, std::vector >& matrix, std::vector& idlingValues) { + // declare file stream + std::string line; + header = std::vector(); +@@ -278,18 +305,23 @@ namespace PHEMlightdll { + pollutantExtension += std::string("_FC"); + } + +- std::string path = DataPath + std::string("\\") + emissionClass + pollutantExtension + std::string(".csv"); +- if (!File::Exists(path)) { +- Helper->setErrMsg(std::string("File do not exist! (") + path + std::string(")")); ++ std::ifstream fileReader; ++ for (std::vector::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) { ++ fileReader.open(((*i) + emissionClass + pollutantExtension + ".csv").c_str()); ++ if (fileReader.good()) { ++ break; ++ } ++ } ++ if (!fileReader.good()) { ++ Helper->setErrMsg("File does not exist! (" + emissionClass + pollutantExtension + ".csv)"); + return false; + } +- StreamReader* fileReader = File::OpenText(path); + + // read header line for pollutant identifiers + if ((line = ReadLine(fileReader)) != "") { +- std::vector& entries = split(line, ','); ++ std::vector entries = split(line, ','); + // skip first entry "Pe" +- for (int i = 1; i < entries.size(); i++) { ++ for (int i = 1; i < (int)entries.size(); i++) { + header.push_back(entries[i]); + } + } +@@ -303,7 +335,7 @@ namespace PHEMlightdll { + //readIdlingValues + line = ReadLine(fileReader); + +- std::vector stringIdlings = split(line, ',').ToList(); ++ std::vector stringIdlings = split(line, ','); + stringIdlings.erase(stringIdlings.begin()); + + idlingValues = todoubleList(stringIdlings); +@@ -311,26 +343,38 @@ namespace PHEMlightdll { + while ((line = ReadLine(fileReader)) != "") { + matrix.push_back(todoubleList(split(line, ','))); + } +- fileReader->Close(); + return true; + } + + std::vector CEPHandler::split(const std::string& s, char delim) { +-//C# TO C++ CONVERTER TODO TASK: There is no direct native C++ equivalent to this .NET String method: +- return s.Split(delim).ToList(); ++ std::vector elems; ++ std::stringstream ss(s); ++ std::string item; ++ while (std::getline(ss, item, delim)) { ++ elems.push_back(item); ++ } ++ return elems; + } + + double CEPHandler::todouble(const std::string& s) { +- return static_cast(s, CultureInfo::InvariantCulture); ++ std::stringstream ss(s); ++ double item; ++ ss >> item; ++ return item; + } + +- std::vector CEPHandler::todoubleList(std::vector& s) { +- return s.Select([&] (void* p) { +- todouble(p); +- }).Cast().ToList(); ++ std::vector CEPHandler::todoubleList(const std::vector& s) { ++ std::vector result; ++ for (std::vector::const_iterator i = s.begin(); i != s.end(); ++i) { ++ result.push_back(todouble(*i)); ++ } ++ return result; + } + +- std::string CEPHandler::ReadLine(StreamReader* s) { +- return s->ReadLine(); ++ std::string CEPHandler::ReadLine(std::ifstream& s) { ++ std::string line; ++ std::getline(s, line); ++ line.erase(line.find_last_not_of(" \n\r\t") + 1); ++ return line; + } + } +diff --git b/src/foreign/PHEMlight/cpp/CEPHandler.h a/src/foreign/PHEMlight/cpp/CEPHandler.h +index bd46d8d9b9..d2e0fd3fb6 100644 +--- b/src/foreign/PHEMlight/cpp/CEPHandler.h ++++ a/src/foreign/PHEMlight/cpp/CEPHandler.h +@@ -1,4 +1,25 @@ +-#ifndef PHEMlightCEPHANDLER ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file CEPHandler.h ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#ifndef PHEMlightCEPHANDLER + #define PHEMlightCEPHANDLER + + #include +@@ -10,7 +31,6 @@ + namespace PHEMlightdll { class CEP; } + namespace PHEMlightdll { class Helpers; } + +-#define FLEET + + namespace PHEMlightdll { + class CEPHandler { +@@ -28,14 +48,14 @@ namespace PHEMlightdll { + private: + std::map _ceps; + public: +- std::map getCEPS() const; ++ const std::map& getCEPS() const; + + + //-------------------------------------------------------------------------------------------------- + // Methods + //-------------------------------------------------------------------------------------------------- + +- bool GetCEP(const std::string& DataPath, Helpers* Helper); ++ bool GetCEP(const std::vector& DataPath, Helpers* Helper); + + + //-------------------------------------------------------------------------------------------------- +@@ -43,11 +63,11 @@ namespace PHEMlightdll { + //-------------------------------------------------------------------------------------------------- + + private: +- bool Load(const std::string& DataPath, Helpers* Helper); ++ bool Load(const std::vector& DataPath, Helpers* Helper); + +- bool ReadVehicleFile(const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector >& matrixSpeedInertiaTable, std::vector >& normedDragTable); ++ bool ReadVehicleFile(const std::vector& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector >& matrixSpeedInertiaTable, std::vector >& normedDragTable); + +- bool ReadEmissionData(bool readFC, const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector& header, std::vector >& matrix, std::vector& idlingValues); ++ bool ReadEmissionData(bool readFC, const std::vector& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector& header, std::vector >& matrix, std::vector& idlingValues); + + + //-------------------------------------------------------------------------------------------------- +@@ -61,10 +81,10 @@ namespace PHEMlightdll { + double todouble(const std::string& s); + + //Convert string to double list +- std::vector todoubleList(std::vector& s); ++ std::vector todoubleList(const std::vector& s); + + //Read a line from file +- std::string ReadLine(StreamReader* s); ++ std::string ReadLine(std::ifstream& s); + }; + } + +diff --git b/src/foreign/PHEMlight/cpp/Constants.cpp a/src/foreign/PHEMlight/cpp/Constants.cpp +index e534017678..936416fe08 100644 +--- b/src/foreign/PHEMlight/cpp/Constants.cpp ++++ a/src/foreign/PHEMlight/cpp/Constants.cpp +@@ -1,4 +1,25 @@ +-#include "Constants.h" ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file Constants.cpp ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#include "Constants.h" + + + namespace PHEMlightdll { +diff --git b/src/foreign/PHEMlight/cpp/Constants.h a/src/foreign/PHEMlight/cpp/Constants.h +index bd3387c15b..113c4247c7 100644 +--- b/src/foreign/PHEMlight/cpp/Constants.h ++++ a/src/foreign/PHEMlight/cpp/Constants.h +@@ -1,4 +1,25 @@ +-#ifndef PHEMlightCONSTANTS ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file Constants.h ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#ifndef PHEMlightCONSTANTS + #define PHEMlightCONSTANTS + + #include +diff --git b/src/foreign/PHEMlight/cpp/Helpers.cpp a/src/foreign/PHEMlight/cpp/Helpers.cpp +index b3872222ff..c3e6912ce8 100644 +--- b/src/foreign/PHEMlight/cpp/Helpers.cpp ++++ a/src/foreign/PHEMlight/cpp/Helpers.cpp +@@ -1,4 +1,25 @@ +-#include "Helpers.h" ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file Helpers.cpp ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#include "Helpers.h" + #include "Constants.h" + + +diff --git b/src/foreign/PHEMlight/cpp/Helpers.h a/src/foreign/PHEMlight/cpp/Helpers.h +index 0f6ad8eefb..23b41471a2 100644 +--- b/src/foreign/PHEMlight/cpp/Helpers.h ++++ a/src/foreign/PHEMlight/cpp/Helpers.h +@@ -1,4 +1,25 @@ +-#ifndef PHEMlightHELPERS ++/****************************************************************************/ ++// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo ++// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. ++// PHEMlight module ++// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ ++// This program and the accompanying materials ++// are made available under the terms of the Eclipse Public License v2.0 ++// which accompanies this distribution, and is available at ++// http://www.eclipse.org/legal/epl-v20.html ++// SPDX-License-Identifier: EPL-2.0 ++/****************************************************************************/ ++/// @file Helpers.h ++/// @author Martin Dippold ++/// @author Michael Behrisch ++/// @date July 2016 ++/// @version $Id$ ++/// ++// ++/****************************************************************************/ ++ ++ ++#ifndef PHEMlightHELPERS + #define PHEMlightHELPERS + + #include diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.cpp sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.cpp --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.cpp 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.h sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.h --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.h 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Helpers.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // PHEMlight module // Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/ // This program and the accompanying materials diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Makefile.in sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Makefile.in --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/cpp/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/cpp/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,636 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foreign/PHEMlight/cpp -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libphemlight_a_AR = $(AR) $(ARFLAGS) -libphemlight_a_LIBADD = -am_libphemlight_a_OBJECTS = CEP.$(OBJEXT) CEPHandler.$(OBJEXT) \ - Constants.$(OBJEXT) Helpers.$(OBJEXT) -libphemlight_a_OBJECTS = $(am_libphemlight_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 = $(libphemlight_a_SOURCES) -DIST_SOURCES = $(libphemlight_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libphemlight.a -libphemlight_a_SOURCES = \ -CEP.cpp CEP.h CEPHandler.cpp CEPHandler.h \ -Constants.cpp Constants.h Helpers.cpp Helpers.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) --foreign src/foreign/PHEMlight/cpp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/foreign/PHEMlight/cpp/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) - -libphemlight.a: $(libphemlight_a_OBJECTS) $(libphemlight_a_DEPENDENCIES) $(EXTRA_libphemlight_a_DEPENDENCIES) - $(AM_V_at)-rm -f libphemlight.a - $(AM_V_AR)$(libphemlight_a_AR) libphemlight.a $(libphemlight_a_OBJECTS) $(libphemlight_a_LIBADD) - $(AM_V_at)$(RANLIB) libphemlight.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CEP.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CEPHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Constants.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Helpers.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/CEP.cs sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/CEP.cs --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/CEP.cs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/CEP.cs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,1039 @@ +#define FLEET +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PHEMlightdll +{ + public class CEP + { + //-------------------------------------------------------------------------------------------------- + // Constructors + //-------------------------------------------------------------------------------------------------- + + #region Constructor + public CEP(bool heavyVehicle, + double vehicleMass, + double vehicleLoading, + double vehicleMassRot, + double crossArea, + double cWValue, + double f0, + double f1, + double f2, + double f3, + double f4, + double axleRatio, + List transmissionGearRatios, + double auxPower, + double ratedPower, + double engineIdlingSpeed, + double engineRatedSpeed, + double effictiveWheelDiameter, + double pNormV0, + double pNormP0, + double pNormV1, + double pNormP1, + string vehicelFuelType, + List> matrixFC, + List headerLinePollutants, + List> matrixPollutants, + List> matrixSpeedRotational, + List> normedDragTable, + double idlingFC, + List idlingPollutants) + { + _resistanceF0 = f0; + _resistanceF1 = f1; + _resistanceF2 = f2; + _resistanceF3 = f3; + _resistanceF4 = f4; + _cWValue = cWValue; + _crossSectionalArea = crossArea; + _massVehicle = vehicleMass; + _vehicleLoading = vehicleLoading; + _vehicleMassRot = vehicleMassRot; + _ratedPower = ratedPower; + _engineIdlingSpeed = engineIdlingSpeed; + _engineRatedSpeed = engineRatedSpeed; + _effectiveWheelDiameter = effictiveWheelDiameter; + _heavyVehicle = heavyVehicle; + _fuelType = vehicelFuelType; + _axleRatio = axleRatio; + _auxPower = auxPower; + + _pNormV0 = pNormV0 / 3.6; + _pNormP0 = pNormP0; + _pNormV1 = pNormV1 / 3.6; + _pNormP1 = pNormP1; + + List pollutantIdentifier = new List(); + List> pollutantMeasures = new List>(); + List> normalizedPollutantMeasures = new List>(); + + // init pollutant identifiers + for (int i = 0; i < headerLinePollutants.Count; i++) + { + pollutantIdentifier.Add(headerLinePollutants[i]); + } + + // initialize measures + for (int i = 0; i < headerLinePollutants.Count; i++) + { + pollutantMeasures.Add(new List()); + normalizedPollutantMeasures.Add(new List()); + } + + // looping through matrix and assigning values for speed rotational table + _speedCurveRotational = new List(); + _speedPatternRotational = new List(); + _gearTransmissionCurve = new List(); + for (int i = 0; i < matrixSpeedRotational.Count; i++) + { + if (matrixSpeedRotational[i].Count != 3) + return; + + _speedPatternRotational.Add(matrixSpeedRotational[i][0] / 3.6); + _gearTransmissionCurve.Add(matrixSpeedRotational[i][1]); + _speedCurveRotational.Add(matrixSpeedRotational[i][2]); + } + + // looping through matrix and assigning values for drag table + _nNormTable = new List(); + _dragNormTable = new List(); + for (int i = 0; i < normedDragTable.Count; i++) + { + if (normedDragTable[i].Count != 2) + return; + + _nNormTable.Add(normedDragTable[i][0]); + _dragNormTable.Add(normedDragTable[i][1]); + } + + // looping through matrix and assigning values for Fuel consumption + _cepCurveFC = new List(); + _normedCepCurveFC = new List(); + _powerPatternFC = new List(); + _normalizedPowerPatternFC = new List(); + for (int i = 0; i < matrixFC.Count; i++) + { + if (matrixFC[i].Count != 2) + return; + + _powerPatternFC.Add(matrixFC[i][0] * _ratedPower); + _normalizedPowerPatternFC.Add(matrixFC[i][0]); + _cepCurveFC.Add(matrixFC[i][1] * _ratedPower); + _normedCepCurveFC.Add(matrixFC[i][1]); + + } + + _powerPatternPollutants = new List(); + + double pollutantMultiplyer = 1; + + _drivingPower = _normalizingPower = CalcPower(Constants.NORMALIZING_SPEED, Constants.NORMALIZING_ACCELARATION, 0); + + // looping through matrix and assigning values for pollutants + if (heavyVehicle) + { + _normalizingPower = _ratedPower; + _normalizingType = NormalizingType.RatedPower; + pollutantMultiplyer = _ratedPower; + } + else + { + _normalizingPower = _drivingPower; + _normalizingType = NormalizingType.DrivingPower; + } + + _normailzedPowerPatternPollutants = new List(); + + _cepNormalizedCurvePollutants = new Dictionary>(); + + int headerCount = headerLinePollutants.Count; + for (int i = 0; i < matrixPollutants.Count; i++) + { + for (int j = 0; j < matrixPollutants[i].Count; j++) + { + if (matrixPollutants[i].Count != headerCount + 1) + return; + + if (j == 0) + { + _normailzedPowerPatternPollutants.Add(matrixPollutants[i][j]); + _powerPatternPollutants.Add(matrixPollutants[i][j] * NormalizingPower); + } + else + { + pollutantMeasures[j - 1].Add(matrixPollutants[i][j] * pollutantMultiplyer); + normalizedPollutantMeasures[j - 1].Add(matrixPollutants[i][j]); + } + } + } + + _cepCurvePollutants = new Dictionary>(); + _idlingValuesPollutants = new Dictionary(); + + for (int i = 0; i < headerLinePollutants.Count; i++) + { + _cepCurvePollutants.Add(pollutantIdentifier[i], pollutantMeasures[i]); + _cepNormalizedCurvePollutants.Add(pollutantIdentifier[i], normalizedPollutantMeasures[i]); + _idlingValuesPollutants.Add(pollutantIdentifier[i], idlingPollutants[i] * pollutantMultiplyer); + } + + _idlingValueFC = idlingFC * _ratedPower; + } + #endregion + + #if FLEET + #region ConstrutorForFleetmix + private CEP(bool heavyVehicle, + double vehicleMass, + double vehicleLoading, + double vehicleMassRot, + double crossArea, + double cWValue, + double f0, + double f1, + double f2, + double f3, + double f4, + double axleRatio, + double auxPower, + double ratedPower, + double engineIdlingSpeed, + double engineRatedSpeed, + double effictiveWheelDiameter, + double pNormV0, + double pNormP0, + double pNormV1, + double pNormP1) + { + _resistanceF0 = f0; + _resistanceF1 = f1; + _resistanceF2 = f2; + _resistanceF3 = f3; + _resistanceF4 = f4; + _cWValue = cWValue; + _crossSectionalArea = crossArea; + _massVehicle = vehicleMass; + _vehicleLoading = vehicleLoading; + _vehicleMassRot = vehicleMassRot; + _ratedPower = ratedPower; + _engineIdlingSpeed = engineIdlingSpeed; + _engineRatedSpeed = engineRatedSpeed; + _effectiveWheelDiameter = effictiveWheelDiameter; + + _axleRatio = axleRatio; + _auxPower = auxPower; + + _pNormV0 = pNormV0 / 3.6; + _pNormP0 = pNormP0; + _pNormV1 = pNormV1 / 3.6; + _pNormP1 = pNormP1; + + _heavyVehicle = heavyVehicle; + + } + #endregion + #endif + + //-------------------------------------------------------------------------------------------------- + // Members + //-------------------------------------------------------------------------------------------------- + + #region HeavyVehicle + private bool _heavyVehicle; + public bool HeavyVehicle + { + get + { + return _heavyVehicle; + } + } + #endregion + + #region FuelType + private string _fuelType; + public string FuelType + { + get + { + return _fuelType; + } + } + #endregion + + #region NormalizingType + public enum NormalizingType + { + RatedPower, + DrivingPower + } + private NormalizingType _normalizingType; + public NormalizingType NormalizingTypeX + { + get + { + return _normalizingType; + } + } + #endregion + + #region RatedPower + private double _ratedPower; + public double RatedPower + { + get + { + return _ratedPower; + } + set + { + _ratedPower = value; + } + } + #endregion + + #region NormalizingPower + private double _normalizingPower; + public double NormalizingPower + { + get + { + return _normalizingPower; + } + } + #endregion + + #region DrivingPower + private double _drivingPower; + public double DrivingPower + { + get + { + return _drivingPower; + } + set + { + _drivingPower = value; + } + } + + #endregion + + #region Private Members + + protected double _massVehicle; + protected double _vehicleLoading; + protected double _vehicleMassRot; + protected double _crossSectionalArea; + protected double _cWValue; + protected double _resistanceF0; + protected double _resistanceF1; + protected double _resistanceF2; + protected double _resistanceF3; + protected double _resistanceF4; + protected double _axleRatio; + protected double _auxPower; + protected double _pNormV0; + protected double _pNormP0; + protected double _pNormV1; + protected double _pNormP1; + + protected double _engineRatedSpeed; + protected double _engineIdlingSpeed; + protected double _effectiveWheelDiameter; + + protected List _speedPatternRotational; + protected List _powerPatternFC; + protected List _normalizedPowerPatternFC; + protected List _normailzedPowerPatternPollutants; + protected List _powerPatternPollutants; + + protected List _cepCurveFC; + protected List _normedCepCurveFC; + protected List _gearTransmissionCurve; + protected List _speedCurveRotational; + protected Dictionary> _cepCurvePollutants; + protected Dictionary> _cepNormalizedCurvePollutants; + protected double _idlingValueFC; + protected Dictionary _idlingValuesPollutants; + + protected List _nNormTable; + protected List _dragNormTable; + + #endregion + + //-------------------------------------------------------------------------------------------------- + // Methods + //-------------------------------------------------------------------------------------------------- + + #region CalcPower + public double CalcPower(double speed, double acc, double gradient) + { + //Declaration + double power = 0; + double rotFactor = GetRotationalCoeffecient(speed); + double powerAux = (_auxPower * _ratedPower); + + //Calculate the power + power += (_massVehicle + _vehicleLoading) * Constants.GRAVITY_CONST * (_resistanceF0 + _resistanceF1 * speed + _resistanceF4 * Math.Pow(speed, 4)) * speed; + power += (_crossSectionalArea * _cWValue * Constants.AIR_DENSITY_CONST / 2) * Math.Pow(speed, 3); + power += (_massVehicle * rotFactor + _vehicleMassRot + _vehicleLoading) * acc * speed; + power += (_massVehicle + _vehicleLoading) * Constants.GRAVITY_CONST * gradient * 0.01 * speed; + power /= 1000; + power /= Constants._DRIVE_TRAIN_EFFICIENCY; + power += powerAux; + + //Return result + return power; + } + #endregion + + #region CalcEngPower + public double CalcEngPower(double power) + { + if (power < _powerPatternFC.First()) return _powerPatternFC.First(); + if (power > _powerPatternFC.Last()) return _powerPatternFC.Last(); + + return power; + } + #endregion + + #region GetEmission + public double GetEmission(string pollutant, double power, double speed, Helpers VehicleClass) + { + //Declaration + List emissionCurve; + List powerPattern; + + // bisection search to find correct position in power pattern + int upperIndex; + int lowerIndex; + + if (VehicleClass.tClass != Constants.strBEV) + { + if (Math.Abs(speed) <= Constants.ZERO_SPEED_ACCURACY) + { + if (pollutant == "FC") + { + return _idlingValueFC; + } + else + { + if (!_cepCurvePollutants.ContainsKey(pollutant)) + { + VehicleClass.ErrMsg = "Emission pollutant " + pollutant + " not found!"; + return 0; + } + + return _idlingValuesPollutants[pollutant]; + } + } + } + + if (pollutant == "FC") + { + emissionCurve = _cepCurveFC; + powerPattern = _powerPatternFC; + } + else + { + if (!_cepCurvePollutants.ContainsKey(pollutant)) + { + VehicleClass.ErrMsg = "Emission pollutant " + pollutant + " not found!"; + return 0; + } + + emissionCurve = _cepCurvePollutants[pollutant]; + powerPattern = _powerPatternPollutants; + } + + if (emissionCurve.Count == 0) + { + VehicleClass.ErrMsg = "Empty emission curve for " + pollutant + " found!"; + return 0; + } + if (emissionCurve.Count == 1) + { + return emissionCurve[0]; + } + + // in case that the demanded power is smaller than the first entry (smallest) in the power pattern the first is returned (should never happen) + if (power <= powerPattern.First()) + { + return emissionCurve[0]; + } + + // if power bigger than all entries in power pattern return the last (should never happen) + if (power >= powerPattern.Last()) + { + return emissionCurve.Last(); + } + + FindLowerUpperInPattern(out lowerIndex, out upperIndex, powerPattern, power); + return Interpolate(power, powerPattern[lowerIndex], powerPattern[upperIndex], emissionCurve[lowerIndex], emissionCurve[upperIndex]); + } + #endregion + + #if FLEET + #region GetNormedEmission + public double GetNormedEmission(string pollutant, double power, double speed, Helpers VehicleClass) + { + //Declaration + List emissionCurve; + List powerPattern; + + // bisection search to find correct position in power pattern + int upperIndex; + int lowerIndex; + + if (pollutant == "FC") + { + emissionCurve = _normedCepCurveFC; + powerPattern = _normalizedPowerPatternFC; + } + else + { + if (!_cepCurvePollutants.ContainsKey(pollutant)) + { + VehicleClass.ErrMsg = "Emission pollutant " + pollutant + " not found!"; + return 0; + } + emissionCurve = _cepNormalizedCurvePollutants[pollutant]; + powerPattern = _normailzedPowerPatternPollutants; + } + + if (emissionCurve.Count == 0) + { + VehicleClass.ErrMsg = "Empty emission curve for " + pollutant + " found!"; + return 0; + } + if (emissionCurve.Count == 1) + { + return emissionCurve[0]; + } + // in case that the demanded power is smaller than the first entry (smallest) in the power pattern the first is returned (should never happen) + if (power <= powerPattern.First()) + { + return emissionCurve[0]; + } + + // if power bigger than all entries in power pattern the last is returned (should never happen) + if (power >= powerPattern.Last()) + { + return emissionCurve.Last(); + } + + FindLowerUpperInPattern(out lowerIndex, out upperIndex, powerPattern, power); + return Interpolate(power, powerPattern[lowerIndex], powerPattern[upperIndex], emissionCurve[lowerIndex], emissionCurve[upperIndex]); + } + #endregion + #endif + + #region GetCO2Emission + public double GetCO2Emission(double _FC, double _CO, double _HC, Helpers VehicleClass) + { + //Declaration + double fCBr; + double fCHC = 0.866; + double fCCO = 0.429; + double fCCO2 = 0.273; + + switch (_fuelType) + { + case Constants.strGasoline: + fCBr = 0.865; + break; + case Constants.strDiesel: + fCBr = 0.863; + break; + case Constants.strCNG: + fCBr = 0.693; + fCHC = 0.803; + break; + case Constants.strLPG: + fCBr = 0.825; + fCHC = 0.825; + break; + default: + VehicleClass.ErrMsg = "The propolsion type is not known! (" + _fuelType + ")"; + return 0; + } + + return (_FC * fCBr - _CO * fCCO - _HC * fCHC) / fCCO2; + } + #endregion + + #region GetDecelCoast + public double GetDecelCoast(double speed, double acc, double gradient) + { + //Declaration + int upperIndex; + int lowerIndex; + + if (speed < Constants.SPEED_DCEL_MIN) + { + return speed / Constants.SPEED_DCEL_MIN * GetDecelCoast(Constants.SPEED_DCEL_MIN, acc, gradient); + } + + double rotCoeff = GetRotationalCoeffecient(speed); + FindLowerUpperInPattern(out lowerIndex, out upperIndex, _speedPatternRotational, speed); + double iGear = Interpolate(speed, + _speedPatternRotational[lowerIndex], + _speedPatternRotational[upperIndex], + _gearTransmissionCurve[lowerIndex], + _gearTransmissionCurve[upperIndex]); + + double iTot = iGear * _axleRatio; + + double n = (30 * speed * iTot) / ((_effectiveWheelDiameter / 2) * Math.PI); + double nNorm = (n - _engineIdlingSpeed) / (_engineRatedSpeed - _engineIdlingSpeed); + + FindLowerUpperInPattern(out lowerIndex, out upperIndex, _nNormTable, nNorm); + + double fMot = 0; + + if (speed >= 10e-2) + { + fMot = (-Interpolate(nNorm, + _nNormTable[lowerIndex], + _nNormTable[upperIndex], + _dragNormTable[lowerIndex], + _dragNormTable[upperIndex]) * _ratedPower * 1000 / speed) / 0.9; + } + + double fRoll = (_resistanceF0 + + _resistanceF1 * speed + + Math.Pow(_resistanceF2 * speed, 2) + + Math.Pow(_resistanceF3 * speed, 3) + + Math.Pow(_resistanceF4 * speed, 4)) * (_massVehicle + _vehicleLoading) * Constants.GRAVITY_CONST; + + double fAir = _cWValue * _crossSectionalArea * 1.2 * 0.5 * Math.Pow(speed, 2); + + double fGrad = (_massVehicle + _vehicleLoading) * Constants.GRAVITY_CONST * gradient / 100; + + return -(fMot + fRoll + fAir + fGrad) / ((_massVehicle + _vehicleLoading) * rotCoeff); + } + #endregion + + #region GetRotationalCoeffecient + public double GetRotationalCoeffecient(double speed) + { + //Declaration + int upperIndex; + int lowerIndex; + + FindLowerUpperInPattern(out lowerIndex, out upperIndex, _speedPatternRotational, speed); + return Interpolate(speed, + _speedPatternRotational[lowerIndex], + _speedPatternRotational[upperIndex], + _speedCurveRotational[lowerIndex], + _speedCurveRotational[upperIndex]); + } + #endregion + + #if FLEET + #region GetGearCoeffecient + public double GetGearCoeffecient(double speed) + { + //Declaration + int upperIndex; + int lowerIndex; + + FindLowerUpperInPattern(out lowerIndex, out upperIndex, _speedPatternRotational, speed); + return Interpolate(speed, + _speedPatternRotational[lowerIndex], + _speedPatternRotational[upperIndex], + _gearTransmissionCurve[lowerIndex], + _gearTransmissionCurve[upperIndex]); + } + #endregion + + #region GetDragCoeffecient + public double GetDragCoeffecient(double nNorm) + { + //Declaration + int upperIndex; + int lowerIndex; + + FindLowerUpperInPattern(out lowerIndex, out upperIndex, _nNormTable, nNorm); + return Interpolate(nNorm, + _nNormTable[lowerIndex], + _nNormTable[upperIndex], + _dragNormTable[lowerIndex], + _dragNormTable[upperIndex]); + } + #endregion + #endif + + #region FindLowerUpperInPattern + private void FindLowerUpperInPattern(out int lowerIndex, out int upperIndex, List pattern, double value) + { + lowerIndex = 0; + upperIndex = 0; + + if (value <= pattern.First()) + { + lowerIndex = 0; + upperIndex = 0; + return; + } + + if (value >= pattern.Last()) + { + lowerIndex = pattern.Count - 1; + upperIndex = pattern.Count - 1; + return; + } + + // bisection search to find correct position in power pattern + int middleIndex = (pattern.Count - 1) / 2; + upperIndex = pattern.Count - 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; + } + } + + if (pattern[lowerIndex] <= value && value < pattern[upperIndex]) + { + return; + } + } + #endregion + + #region Interpolate + private double Interpolate(double px, double p1, double p2, double e1, double e2) + { + if (p2 == p1) + return e1; + + return e1 + (px - p1) / (p2 - p1) * (e2 - e1); + } + #endregion + + #region GetMaxAccel + public double GetMaxAccel(double speed, double gradient) + { + double rotFactor = GetRotationalCoeffecient(speed); + double pMaxForAcc = GetPMaxNorm(speed) * _ratedPower - CalcPower(speed, 0, gradient); + + return (pMaxForAcc * 1000) / ((_massVehicle * rotFactor + _vehicleMassRot + _vehicleLoading) * speed); + } + #endregion + + #region GetPMaxNorm + private double GetPMaxNorm(double speed) + { + // Linear function between v0 and v1, constant elsewhere + if (speed <= _pNormV0) + return _pNormP0; + else if (speed >= _pNormV1) + return _pNormP1; + else + { + return Interpolate(speed, _pNormV0, _pNormV1, _pNormP0, _pNormP1); + } + } + #endregion + + //-------------------------------------------------------------------------------------------------- + // Operators for fleetmix + //-------------------------------------------------------------------------------------------------- + + #if FLEET + #region AddRangeCeps + public static CEP AddRangeCeps(CEP[] cps, Helpers Helper) + { + #region SingleValues + CEP newCEP = new CEP(cps.Select(p => p.HeavyVehicle ? 1 : 0).Sum() > 0, + cps.Select(p => p._massVehicle).Sum(), + cps.Select(p => p._vehicleLoading).Sum(), + cps.Select(p => p._vehicleMassRot).Sum(), + cps.Select(p => p._crossSectionalArea).Sum(), + cps.Select(p => p._cWValue).Sum(), + cps.Select(p => p._resistanceF0).Sum(), + cps.Select(p => p._resistanceF1).Sum(), + cps.Select(p => p._resistanceF2).Sum(), + cps.Select(p => p._resistanceF3).Sum(), + cps.Select(p => p._resistanceF4).Sum(), + cps.Select(p => p._axleRatio).Sum(), + cps.Select(p => p._auxPower).Sum(), + cps.Select(p => p._ratedPower).Sum(), + cps.Select(p => p._engineIdlingSpeed).Sum(), + cps.Select(p => p._engineRatedSpeed).Sum(), + cps.Select(p => p._effectiveWheelDiameter).Sum(), + cps.Select(p => p._pNormV0).Sum(), + cps.Select(p => p._pNormP0).Sum(), + cps.Select(p => p._pNormV1).Sum(), + cps.Select(p => p._pNormP1).Sum()); + + newCEP._fuelType = cps.First().FuelType; + #endregion + + #region SpeedRotationalTable + double minSpeedRotational = cps.Select(p => p._speedPatternRotational.First()).Min(); + double maxSpeedRotational = cps.Select(p => p._speedPatternRotational.Last()).Max(); + + newCEP._speedPatternRotational + = CreatePattern(minSpeedRotational, + maxSpeedRotational, + Constants.SPEED_ROTATIONAL_INCREMENT); + + newCEP._speedCurveRotational = new List(); + newCEP._gearTransmissionCurve = new List(); + + for (int i = 0; i < newCEP._speedPatternRotational.Count; i++) + { + newCEP._speedCurveRotational.Add(cps.Select(p => p.GetRotationalCoeffecient(newCEP._speedPatternRotational[i])).Sum()); + + newCEP._gearTransmissionCurve.Add(cps.Select(p => p.GetGearCoeffecient(newCEP._speedPatternRotational[i])).Sum()); + } + #endregion + + #region NormalizingPower + newCEP._drivingPower = newCEP.CalcPower(Constants.NORMALIZING_SPEED, Constants.NORMALIZING_ACCELARATION, 0); + + if (newCEP._heavyVehicle) + { + newCEP._normalizingPower = newCEP._ratedPower; + newCEP._normalizingType = NormalizingType.RatedPower; + } + else + { + newCEP._normalizingPower = newCEP._drivingPower; + newCEP._normalizingType = NormalizingType.DrivingPower; + } + #endregion + + #region FC + double minNormPowerPatternFC = cps.Select(p => p._normalizedPowerPatternFC.First()).Min(); + double maxNormPowerPatternFC = cps.Select(p => p._normalizedPowerPatternFC.Last()).Max(); + + newCEP._normalizedPowerPatternFC + = CreatePattern(minNormPowerPatternFC, + maxNormPowerPatternFC, + Constants.POWER_FC_INCREMENT); + + newCEP._cepCurveFC = new List(); + newCEP._normedCepCurveFC = new List(); + newCEP._powerPatternFC = new List(); + + for (int i = 0; i < newCEP._normalizedPowerPatternFC.Count; i++) + { + double newCepVal = cps.Select(p => p.GetNormedEmission("FC", newCEP._normalizedPowerPatternFC[i], double.MaxValue, Helper)).Sum(); + newCEP._cepCurveFC.Add(newCepVal * newCEP._ratedPower); + newCEP._normedCepCurveFC.Add(newCepVal); + newCEP._powerPatternFC.Add(newCEP._normalizedPowerPatternFC[i] * newCEP._ratedPower); + } + #endregion + + #region Pollutants + double minNormPowerPattern = cps.Select(p => p._normailzedPowerPatternPollutants.First()).Min(); + double maxNormPowerPattern = cps.Select(p => p._normailzedPowerPatternPollutants.Last()).Max(); + + newCEP._normailzedPowerPatternPollutants + = CreatePattern(minNormPowerPattern, + maxNormPowerPattern, + Constants.POWER_POLLUTANT_INCREMENT); + + newCEP._cepCurvePollutants = new Dictionary>(); + newCEP._powerPatternPollutants = new List(); + newCEP._cepNormalizedCurvePollutants = new Dictionary>(); + + foreach (string id in cps.First()._cepCurvePollutants.Keys) + { + newCEP._cepCurvePollutants.Add(id, new List()); + newCEP._cepNormalizedCurvePollutants.Add(id, new List()); + } + + for (int i = 0; i < newCEP._normailzedPowerPatternPollutants.Count; i++) + { + foreach (string id in newCEP._cepCurvePollutants.Keys) + { + if (newCEP.NormalizingTypeX == NormalizingType.RatedPower) + { + double newCepVal = cps.Select(p => p.GetNormedEmission(id, newCEP._normailzedPowerPatternPollutants[i], double.MaxValue, Helper)).Sum(); + newCEP._cepCurvePollutants[id].Add(newCepVal * newCEP._ratedPower); + newCEP._cepNormalizedCurvePollutants[id].Add(newCepVal); + } + else + { + newCEP._cepCurvePollutants[id].Add(cps.Select(p => p.GetEmission(id, newCEP._normailzedPowerPatternPollutants[i] * p._normalizingPower, double.MaxValue, Helper)).Sum()); + newCEP._cepNormalizedCurvePollutants[id].Add(cps.Select(p => p.GetNormedEmission(id, newCEP._normailzedPowerPatternPollutants[i], double.MaxValue, Helper)).Sum()); + } + } + newCEP._powerPatternPollutants.Add(newCEP._normailzedPowerPatternPollutants[i] * newCEP.NormalizingPower); + } + #endregion + + #region IdlingValues + newCEP._idlingValueFC = cps.Select(p => p._idlingValueFC).Sum(); + newCEP._idlingValuesPollutants = new Dictionary(); + + foreach (string id in cps.First()._idlingValuesPollutants.Keys) + { + newCEP._idlingValuesPollutants.Add(id, cps.Select(p => p._idlingValuesPollutants[id]).Sum()); + } + #endregion + + #region TragTable + double minTragTable = cps.Select(p => p._nNormTable.First()).Min(); + double maxTragTable = cps.Select(p => p._nNormTable.Last()).Max(); + + newCEP._nNormTable + = CreatePattern(minTragTable, + maxTragTable, + Constants.NNORM_INCREMENT); + + newCEP._dragNormTable = new List(); + + for (int i = 0; i < newCEP._nNormTable.Count; i++) + { + newCEP._dragNormTable.Add(cps.Select(p => p.GetDragCoeffecient(newCEP._nNormTable[i])).Sum()); + } + #endregion + return newCEP; + } + #endregion + + #region Operator * + public static CEP operator *(CEP cp1, double d) + { + #region SingleValues + CEP newCEP = new CEP(cp1.HeavyVehicle, + d * cp1._massVehicle, + d * cp1._vehicleLoading, + d * cp1._vehicleMassRot, + d * cp1._crossSectionalArea, + d * cp1._cWValue, + d * cp1._resistanceF0, + d * cp1._resistanceF1, + d * cp1._resistanceF2, + d * cp1._resistanceF3, + d * cp1._resistanceF4, + d * cp1._axleRatio, + d * cp1._auxPower, + d * cp1._ratedPower, + d * cp1._engineIdlingSpeed, + d * cp1._engineRatedSpeed, + d * cp1._effectiveWheelDiameter, + d * cp1._pNormV0, + d * cp1._pNormP0, + d * cp1._pNormV1, + d * cp1._pNormP1); + + newCEP._fuelType = cp1.FuelType; + #endregion + + #region SpeedRotationalTable + newCEP._speedPatternRotational = new List(cp1._speedPatternRotational); + newCEP._speedCurveRotational = new List(cp1._speedCurveRotational.Select(p => p * d)); + newCEP._gearTransmissionCurve = new List(cp1._gearTransmissionCurve.Select(p => p * d)); + #endregion + + #region NormalizingPower + newCEP._drivingPower = newCEP.CalcPower(Constants.NORMALIZING_SPEED, Constants.NORMALIZING_ACCELARATION, 0); + + if (newCEP._heavyVehicle) + { + newCEP._normalizingPower = newCEP._ratedPower; + newCEP._normalizingType = NormalizingType.RatedPower; + } + else + { + newCEP._normalizingPower = newCEP._drivingPower; + newCEP._normalizingType = NormalizingType.DrivingPower; + } + #endregion + + #region FC + newCEP._powerPatternFC = new List(cp1._powerPatternFC.Select(p => p * d)); + newCEP._normalizedPowerPatternFC = new List(cp1._normalizedPowerPatternFC); + newCEP._cepCurveFC = new List(cp1._cepCurveFC.Select(p => p * d)); + newCEP._normedCepCurveFC = new List(cp1._normedCepCurveFC.Select(p => p * d)); + #endregion + + #region Pollutants + newCEP._powerPatternPollutants = new List(cp1._normailzedPowerPatternPollutants.Select(p => p * newCEP._normalizingPower)); + newCEP._normailzedPowerPatternPollutants = new List(cp1._normailzedPowerPatternPollutants); + newCEP._cepCurvePollutants = new Dictionary>(); + newCEP._cepNormalizedCurvePollutants = new Dictionary>(); + + foreach (string id in cp1._cepCurvePollutants.Keys) + { + newCEP._cepCurvePollutants.Add(id, new List(cp1._cepCurvePollutants[id].Select(p => p * d))); + newCEP._cepNormalizedCurvePollutants.Add(id, new List(cp1._cepNormalizedCurvePollutants[id].Select(p => p * d))); + } + #endregion + + #region IdlingValues + newCEP._idlingValueFC = cp1._idlingValueFC * d; + newCEP._idlingValuesPollutants = new Dictionary(); + + foreach (string id in cp1._idlingValuesPollutants.Keys) + { + newCEP._idlingValuesPollutants.Add(id, + cp1._idlingValuesPollutants[id] * d); + } + #endregion + + #region DragTable + newCEP._nNormTable = new List(cp1._nNormTable); + newCEP._dragNormTable = new List(cp1._dragNormTable.Select(p => p * d)); + #endregion + return newCEP; + } + #endregion + + #region CreatePattern + static public List CreatePattern(double min, double max, double increment) + { + //Declaration + List pattern = new List(); + double actualMin = min; + double actualMax = max; + + if (min < 0) + actualMin = Math.Ceiling(min / increment) * increment; + else + actualMin = Math.Floor(min / increment) * increment; + + if (max < 0) + actualMax = Math.Floor(max / increment) * increment; + else + actualMax = Math.Ceiling(max / increment) * increment; + + double curVal = actualMin; + + while (curVal <= actualMax) + { + pattern.Add(curVal); + curVal += increment; + } + return pattern; + } + #endregion + #endif + } +} diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/CEPHandler.cs sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/CEPHandler.cs --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/CEPHandler.cs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/CEPHandler.cs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,558 @@ +#define FLEET +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using System.Globalization; + +namespace PHEMlightdll +{ + public class CEPHandler + { + //-------------------------------------------------------------------------------------------------- + // Constructors + //-------------------------------------------------------------------------------------------------- + + #region Constructor + public CEPHandler() + { + _ceps = new Dictionary(); + } + #endregion + + //-------------------------------------------------------------------------------------------------- + // Members + //-------------------------------------------------------------------------------------------------- + + #region CEPS + private Dictionary _ceps; + public Dictionary CEPS + { + get + { + return _ceps; + } + } + #endregion + + #if FLEET + #region FleetShares + private Dictionary> _fleetShares; + public Dictionary> FleetShares + { + get + { + return _fleetShares; + } + } + #endregion + #endif + + //-------------------------------------------------------------------------------------------------- + // Methods + //-------------------------------------------------------------------------------------------------- + + #region GetCEP + public bool GetCEP(string DataPath, Helpers Helper) + { + if (!CEPS.ContainsKey(Helper.gClass)) + { + if (!Load(DataPath, Helper)) + { + return false; + } + } + return true; + } + #endregion + + #if FLEET + #region GetFleetCEP + public bool GetFleetCEP(string DataPath, string AggClass, Helpers Helper) + { + if (!CEPS.ContainsKey(Helper.gClass)) + { + if (Constants.AGGREGATED_VEHICLECLASSES.Contains(AggClass)) + { + List weightedCEPS = new List(); + + if (FleetShares.ContainsKey(AggClass)) + { + foreach (string aggVehClass in FleetShares[AggClass].Keys) + { + if (!Helper.setclass(aggVehClass)) + { + return false; + } + if (!CEPS.ContainsKey(aggVehClass) && !Load(DataPath, Helper)) + { + return false; + } + weightedCEPS.Add(CEPS[aggVehClass] * FleetShares[AggClass][aggVehClass]); + } + _ceps.Add(AggClass, CEP.AddRangeCeps(weightedCEPS.ToArray(), Helper)); + + //Set the vehicle class back + Helper.gClass = AggClass; + } + else + { + Helper.ErrMsg = "The aggregated vehicle class (" + AggClass + ") is not available in the FleetShare file!"; + return false; + } + } + else + { + Helper.ErrMsg = "The aggregated vehicle class (" + AggClass + ") is a unknown class!"; + return false; + } + } + return true; + } + #endregion + #endif + + //-------------------------------------------------------------------------------------------------- + // Methods + //-------------------------------------------------------------------------------------------------- + + #region Load + private bool Load(string DataPath, Helpers Helper) + { + //Deklaration + // get string identifier for PHEM emission class + string emissionRep = Helper.gClass.ToString(); + + // to hold everything. + List> matrixSpeedInertiaTable; + List> normedTragTableSpeedInertiaTable; + List> matrixFC; + List> matrixPollutants; + List idlingValuesFC; + List idlingValuesPollutants; + List headerFC; + List headerPollutants; + + double vehicleMass; + double vehicleLoading; + double vehicleMassRot; + double crosssectionalArea; + double cwValue; + double f0; + double f1; + double f2; + double f3; + double f4; + double axleRatio; + List transmissionGearRatios; + double auxPower; + double ratedPower; + double engineIdlingSpeed; + double engineRatedSpeed; + double effectiveWhellDiameter; + string vehicleMassType; + string vehicleFuelType; + double pNormV0; + double pNormP0; + double pNormV1; + double pNormP1; + + if (!ReadVehicleFile(DataPath, + emissionRep, + Helper, + out vehicleMass, + out vehicleLoading, + out vehicleMassRot, + out crosssectionalArea, + out cwValue, + out f0, + out f1, + out f2, + out f3, + out f4, + out axleRatio, + out auxPower, + out ratedPower, + out engineIdlingSpeed, + out engineRatedSpeed, + out effectiveWhellDiameter, + out transmissionGearRatios, + out vehicleMassType, + out vehicleFuelType, + out pNormV0, + out pNormP0, + out pNormV1, + out pNormP1, + out matrixSpeedInertiaTable, + out normedTragTableSpeedInertiaTable)) + return false; + + if (!ReadEmissionData(true, DataPath, emissionRep, Helper, out headerFC, out matrixFC, out idlingValuesFC)) + return false; + + if (!ReadEmissionData(false, DataPath, emissionRep, Helper, out headerPollutants, out matrixPollutants, out idlingValuesPollutants)) + return false; + + _ceps.Add(Helper.gClass, new CEP(vehicleMassType == Constants.HeavyVehicle, + vehicleMass, + vehicleLoading, + vehicleMassRot, + crosssectionalArea, + cwValue, + f0, + f1, + f2, + f3, + f4, + axleRatio, + transmissionGearRatios, + auxPower, + ratedPower, + engineIdlingSpeed, + engineRatedSpeed, + effectiveWhellDiameter, + pNormV0, + pNormP0, + pNormV1, + pNormP1, + vehicleFuelType, + matrixFC, + headerPollutants, + matrixPollutants, + matrixSpeedInertiaTable, + normedTragTableSpeedInertiaTable, + idlingValuesFC.First(), + idlingValuesPollutants)); + + return true; + } + #endregion + + #region ReadVehicleFile + private bool ReadVehicleFile(string DataPath, + string emissionClass, + Helpers Helper, + out double vehicleMass, + out double vehicleLoading, + out double vehicleMassRot, + out double crossArea, + out double cWValue, + out double f0, + out double f1, + out double f2, + out double f3, + out double f4, + out double axleRatio, + out double auxPower, + out double ratedPower, + out double engineIdlingSpeed, + out double engineRatedSpeed, + out double effectiveWheelDiameter, + out List transmissionGearRatios, + out string vehicleMassType, + out string vehicleFuelType, + out double pNormV0, + out double pNormP0, + out double pNormV1, + out double pNormP1, + out List> matrixSpeedInertiaTable, + out List> normedDragTable) + { + vehicleMass = 0; + vehicleLoading = 0; + vehicleMassRot = 0; + crossArea = 0; + cWValue = 0; + f0 = 0; + f1 = 0; + f2 = 0; + f3 = 0; + f4 = 0; + axleRatio = 0; + ratedPower = 0; + auxPower = 0; + engineIdlingSpeed = 0; + engineRatedSpeed = 0; + effectiveWheelDiameter = 0; + vehicleMassType = ""; + vehicleFuelType = ""; + pNormV0 = 0; + pNormP0 = 0; + pNormV1 = 0; + pNormP1 = 0; + transmissionGearRatios = new List(); + matrixSpeedInertiaTable = new List>(); + normedDragTable = new List>(); + string line; + string cell; + int dataCount = 0; + + //Open file + string path = DataPath + @"\" + emissionClass + ".PHEMLight.veh"; + if (!File.Exists(@path)) + { + Helper.ErrMsg = "File do not exist! (" + path + ")"; + return false; + } + StreamReader vehicleReader = File.OpenText(@path); + + // skip header + ReadLine(vehicleReader); + + while ((line = ReadLine(vehicleReader)) != null && dataCount <= 49) + { + if (line.Substring(0, 1) == Helper.CommentPrefix) + { + continue; + } + else + { + dataCount++; + } + + cell = split(line, ',')[0]; + + // reading Mass + if (dataCount == 1) + vehicleMass = todouble(cell); + + // reading vehicle loading + if (dataCount == 2) + vehicleLoading = todouble(cell); + + // reading cWValue + if (dataCount == 3) + cWValue = todouble(cell); + + // reading crossectional area + if (dataCount == 4) + crossArea = todouble(cell); + + // reading vehicle mass rotational + if (dataCount == 7) + vehicleMassRot = todouble(cell); + + // reading rated power + if (dataCount == 9) + auxPower = todouble(cell); + + // reading rated power + if (dataCount == 10) + ratedPower = todouble(cell); + + // reading engine rated speed + if (dataCount == 11) + engineRatedSpeed = todouble(cell); + + // reading engine idling speed + if (dataCount == 12) + engineIdlingSpeed = todouble(cell); + + // reading f0 + if (dataCount == 14) + f0 = todouble(cell); + + // reading f1 + if (dataCount == 15) + f1 = todouble(cell); + + // reading f2 + if (dataCount == 16) + f2 = todouble(cell); + + // reading f3 + if (dataCount == 17) + f3 = todouble(cell); + + // reading f4 + if (dataCount == 18) + f4 = todouble(cell); + + // reading axleRatio + if (dataCount == 21) + axleRatio = todouble(cell); + + // reading effective wheel diameter + if (dataCount == 22) + effectiveWheelDiameter = todouble(cell); + + if (dataCount >= 23 && dataCount <= 40) + transmissionGearRatios.Add(todouble(cell)); + + // reading vehicleMassType + if (dataCount == 45) + vehicleMassType = cell; + + // reading vehicleFuelType + if (dataCount == 46) + vehicleFuelType = cell; + + // reading pNormV0 + if (dataCount == 47) + pNormV0 = todouble(cell); + + // reading pNormP0 + if (dataCount == 48) + pNormP0 = todouble(cell); + + // reading pNormV1 + if (dataCount == 49) + pNormV1 = todouble(cell); + + // reading pNormP1 + if (dataCount == 50) + pNormP1 = todouble(cell); + } + + while ((line = ReadLine(vehicleReader)) != null && line.Substring(0, 1) != Helper.CommentPrefix) + { + if (line.Substring(0, 1) == Helper.CommentPrefix) + continue; + + matrixSpeedInertiaTable.Add(todoubleList(split(line, ','))); + } + + while ((line = ReadLine(vehicleReader)) != null) + { + if (line.Substring(0, 1) == Helper.CommentPrefix) + continue; + + normedDragTable.Add(todoubleList(split(line, ','))); + } + + vehicleReader.Close(); + return true; + } + #endregion + + #region ReadEmissionData + private bool ReadEmissionData(bool readFC, + string DataPath, + string emissionClass, + Helpers Helper, + out List header, + out List> matrix, + out List idlingValues) + { + // declare file stream + string line; + header = new List(); + matrix = new List>(); + idlingValues = new List(); + + string pollutantExtension = ""; + if (readFC) + pollutantExtension += "_FC"; + + string path = DataPath + @"\" + emissionClass + pollutantExtension + ".csv"; + if (!File.Exists(path)) + { + Helper.ErrMsg = "File do not exist! (" + path + ")"; + return false; + } + StreamReader fileReader = File.OpenText(@path); + + // read header line for pollutant identifiers + if ((line = ReadLine(fileReader)) != null) + { + List entries = split(line, ','); + // skip first entry "Pe" + for (int i = 1; i < entries.Count; i++) + { + header.Add(entries[i]); + } + } + + // skip units + ReadLine(fileReader); + + // skip comment + ReadLine(fileReader); + + //readIdlingValues + line = ReadLine(fileReader); + + List stringIdlings = split(line, ',').ToList(); + stringIdlings.RemoveAt(0); + + idlingValues = todoubleList(stringIdlings); + + while ((line = ReadLine(fileReader)) != null) + { + matrix.Add(todoubleList(split(line, ','))); + } + fileReader.Close(); + return true; + } + #endregion + + #if FLEET + #region ReadFleetShares + public bool ReadFleetShares(string DataPath, Helpers Helper) + { + //Declaration + string line; + string path = DataPath + @"\FleetShares.csv"; + if (!File.Exists(@path)) + { + Helper.ErrMsg = "FleetShares file does not exist! (" + path + ")"; + return false; + } + StreamReader shareReader = File.OpenText(@path); + + _fleetShares = new Dictionary>(); + + while ((line = ReadLine(shareReader)) != null) + { + if (line.Substring(0, 1) == Helper.CommentPrefix) + continue; + + List splitLine = split(line, ','); + string aggregateClass = splitLine[0]; + + if (!FleetShares.ContainsKey(aggregateClass)) + FleetShares.Add(aggregateClass, new Dictionary()); + + string subClass = splitLine[1]; + + if (!FleetShares[aggregateClass].ContainsKey(subClass)) + FleetShares[aggregateClass].Add(subClass, todouble(splitLine[2])); + } + return true; + } + #endregion + #endif + + //-------------------------------------------------------------------------------------------------- + // Functions + //-------------------------------------------------------------------------------------------------- + + #region Functions + //Split the string + private List split(string s, char delim) + { + return s.Split(delim).ToList(); + } + + //Convert string to double + private double todouble(string s) + { + return double.Parse(s, CultureInfo.InvariantCulture); + } + + //Convert string to double list + private List todoubleList(List s) + { + return s.Select(p => todouble(p)).Cast().ToList(); + } + + //Read a line from file + private string ReadLine(StreamReader s) + { + return s.ReadLine(); + } + #endregion + } +} diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/Constants.cs sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/Constants.cs --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/Constants.cs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/Constants.cs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,81 @@ +#define FLEET +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PHEMlightdll +{ + public class Constants + { + //Calculation constant + public const double GRAVITY_CONST = 9.81; + public const double AIR_DENSITY_CONST = 1.182; + public const double NORMALIZING_SPEED = 19.444; + public const double NORMALIZING_ACCELARATION = 0.45; + public const double SPEED_DCEL_MIN = 10 / 3.6; + public const double ZERO_SPEED_ACCURACY = 0.5; + public const double DRIVE_TRAIN_EFFICIENCY_All = 0.9; + public const double DRIVE_TRAIN_EFFICIENCY_CB = 0.8; + + #if FLEET + //Fleetmix constants + public const double SPEED_ROTATIONAL_INCREMENT = 10 / 3.6; + public const double POWER_FC_INCREMENT = 0.1; + public const double POWER_POLLUTANT_INCREMENT = 0.3; + public const double NNORM_INCREMENT = 0.05; + #endif + + //Strings + public const string HeavyVehicle = "HV"; + + //Vehiclestrings + public const string strPKW = "PC"; + public const string strLNF = "LCV"; + public const string strLKW = "HDV_RT"; + public const string strLSZ = "HDV_TT"; + public const string strRB = "HDV_CO"; + public const string strLB = "HDV_CB"; + public const string strMR2 = "MC_2S"; + public const string strMR4 = "MC_4S"; + public const string strKKR = "MOP"; + + //Fuelstrings + public const string strGasoline = "G"; + public const string strDiesel = "D"; + public const string strCNG = "CNG"; + public const string strLPG = "LPG"; + public const string strHybrid = "HEV"; + public const string strBEV = "BEV"; + + //Euroclasses + public const string strEU = "EU"; + + //Sizeclasse + public const string strSI = "I"; + public const string strSII = "II"; + public const string strSIII = "III"; + + #if FLEET + //Fleetmix + private const string strAggPC = "PC"; + private const string strAggBUS = "BUS"; + private const string strAggHDV = "HDV"; + private const string strAggTW = "TW"; + public static string[] AGGREGATED_VEHICLECLASSES = new string[] { strAggPC, + strAggHDV, + strAggBUS, + strAggTW}; + #endif + + //Drive train efficiency + public static double _DRIVE_TRAIN_EFFICIENCY; + public static double DRIVE_TRAIN_EFFICIENCY + { + get { return _DRIVE_TRAIN_EFFICIENCY; } + set { _DRIVE_TRAIN_EFFICIENCY = value; } + } + + } +} diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/cResult.cs sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/cResult.cs --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/cResult.cs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/cResult.cs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,265 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PHEMlightdll +{ + public class VehicleResult + { + #region Construtor + public VehicleResult(double time, + double speed, + double grad, + double power, + double pPos, + double pNormRated, + double pNormDrive, + double acc, + double fc, + double fcel, + double cO2, + double nOx, + double hC, + double pM, + double cO) + { + _time = time; + _speed = speed; + _grad = grad; + _power = power; + _pPos = pPos; + _pNormRated = pNormRated; + _pNormDrive = pNormDrive; + _accelaration = acc; + _emissionData = new EmissionData(fc, + fcel, + cO2, + nOx, + hC, + pM, + cO); + } + #endregion + + //-------------------------------------------------------------------------------------------------- + // GeneralState + //-------------------------------------------------------------------------------------------------- + + #region Time + private double _time; + public double Time + { + get + { + return _time; + } + } + #endregion + + #region Speed + private double _speed; + public double Speed + { + get + { + return _speed; + } + } + #endregion + + #region Grad + private double _grad; + public double Grad + { + get + { + return _grad; + } + } + #endregion + + #region Power + private double _power; + public double Power + { + get + { + return _power; + } + } + #endregion + + #region PPos + private double _pPos; + public double PPos + { + get + { + return _pPos; + } + } + #endregion + + #region PNormRated + private double _pNormRated; + public double PNormRated + { + get + { + return _pNormRated; + } + set + { + _pNormRated = value; + } + } + #endregion + + #region PNormDrive + private double _pNormDrive; + public double PNormDrive + { + get + { + return _pNormDrive; + } + set + { + _pNormDrive = value; + } + } + #endregion + + #region Accelaration + private double _accelaration; + public double Accelaration + { + get + { + return _accelaration; + } + } + #endregion + + //-------------------------------------------------------------------------------------------------- + // EmissionData + //-------------------------------------------------------------------------------------------------- + + #region EmissionData + private EmissionData _emissionData; + public EmissionData EmissionData + { + get + { + return _emissionData; + } + } + #endregion + } + + public class EmissionData + { + + #region Constructor + public EmissionData(double fc, + double fcel, + double cO2, + double nOx, + double hC, + double pM, + double cO) + { + _fc = fc; + _fcel = fcel; + _cO2 = cO2; + _nOx = nOx; + _hC = hC; + _pM = pM; + _cO = cO; + } + #endregion + + //-------------------------------------------------------------------------------------------------- + // GeneralState + //-------------------------------------------------------------------------------------------------- + + #region FC + private double _fc; + public double FC + { + get + { + return _fc; + } + } + #endregion + + #region FCel + private double _fcel; + public double FCel + { + get + { + return _fcel; + } + } + #endregion + + #region CO2 + private double _cO2; + public double CO2 + { + get + { + return _cO2; + } + } + #endregion + + #region NOx + private double _nOx; + public double NOx + { + get + { + return _nOx; + } + } + #endregion + + #region HC + private double _hC; + public double HC + { + get + { + return _hC; + } + } + #endregion + + #region PM + private double _pM; + public double PM + { + get + { + return _pM; + } + } + #endregion + + #region CO + private double _cO; + public double CO + { + get + { + return _cO; + } + } + #endregion + } +} diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/Helpers.cs sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/Helpers.cs --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/Helpers.cs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/Helpers.cs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,265 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PHEMlightdll +{ + public class Helpers + { + //-------------------------------------------------------------------------------------------------- + // Members + //-------------------------------------------------------------------------------------------------- + #region Members + private string _vClass; + public string vClass + { + get { return _vClass; } + set { _vClass = value; } + } + private string _eClass; + public string eClass + { + get { return _eClass; } + set { _eClass = value; } + } + private string _tClass; + public string tClass + { + get { return _tClass; } + set { _tClass = value; } + } + private string _sClass; + public string sClass + { + get { return _sClass; } + set { _sClass = value; } + } + private string _Class; + public string gClass + { + get { return _Class; } + set { _Class = value; } + } + private string _ErrMsg; + public string ErrMsg + { + get { return _ErrMsg; } + set { _ErrMsg = value; } + } + private string _commentPrefix; + public string CommentPrefix + { + get { return _commentPrefix; } + set { _commentPrefix = value; } + } + private string _PHEMDataV; + public string PHEMDataV + { + get { return _PHEMDataV; } + set { _PHEMDataV = value; } + } + #endregion + + #region Classes + //Get vehicle class + private bool getvclass(string VEH) + { + // Set the drive train efficency + Constants.DRIVE_TRAIN_EFFICIENCY = Constants.DRIVE_TRAIN_EFFICIENCY_All; + + //Get the vehicle class + if (VEH.IndexOf(Constants.strPKW) >= 0) + { + _vClass = Constants.strPKW; + return true; + } + else if (VEH.IndexOf(Constants.strLNF) >= 0) + { + _vClass = Constants.strLNF; + return true; + } + else if (VEH.IndexOf(Constants.strLKW) >= 0) + { + _vClass = Constants.strLKW; + return true; + } + else if (VEH.IndexOf(Constants.strLSZ) >= 0) + { + _vClass = Constants.strLSZ; + return true; + } + else if (VEH.IndexOf(Constants.strRB) >= 0) + { + _vClass = Constants.strRB; + return true; + } + else if (VEH.IndexOf(Constants.strLB) >= 0) + { + _vClass = Constants.strLB; + Constants.DRIVE_TRAIN_EFFICIENCY = Constants.DRIVE_TRAIN_EFFICIENCY_CB; + return true; + } + else if (VEH.IndexOf(Constants.strMR2) >= 0) + { + _vClass = Constants.strMR2; + return true; + } + else if (VEH.IndexOf(Constants.strMR4) >= 0) + { + _vClass = Constants.strMR4; + return true; + } + else if (VEH.IndexOf(Constants.strKKR) >= 0) + { + _vClass = Constants.strKKR; + return true; + } + //Should never happens + _ErrMsg = "Vehicle class not defined! (" + VEH + ")"; + return false; + } + + //Get technologie Class + private bool gettclass(string VEH) + { + if (VEH.IndexOf("_" + Constants.strDiesel) > 0) + { + if (VEH.IndexOf("_" + Constants.strHybrid) > 0) + { + _tClass = Constants.strDiesel + "_" + Constants.strHybrid; + return true; + } + else + { + _tClass = Constants.strDiesel; + return true; + } + + } + else if (VEH.IndexOf("_" + Constants.strGasoline) > 0) + { + if (VEH.IndexOf("_" + Constants.strHybrid) > 0) + { + _tClass = Constants.strGasoline + "_" + Constants.strHybrid; + return true; + } + else + { + _tClass = Constants.strGasoline; + return true; + } + } + else if (VEH.IndexOf("_" + Constants.strCNG) > 0) + { + _tClass = Constants.strCNG; + return true; + } + else if (VEH.IndexOf("_" + Constants.strBEV) > 0) + { + _tClass = Constants.strBEV; + return true; + } + //Should never happens + _ErrMsg = "Fuel class not defined! (" + VEH + ")"; + return false; + } + + //Get size class + private bool getsclass(string VEH) + { + if (VEH.IndexOf(Constants.strLKW) >= 0) + { + if (VEH.IndexOf("_" + Constants.strSII) > 0) + { + _sClass = Constants.strSII; + return true; + } + else if (VEH.IndexOf("_" + Constants.strSI) > 0) + { + _sClass = Constants.strSI; + return true; + } + else + { + //Should never happen + _ErrMsg = "Size class not defined! (" + VEH + ")"; + return false; + } + } + else if (VEH.IndexOf(Constants.strLNF) >= 0) + { + if (VEH.IndexOf("_" + Constants.strSIII) > 0) + { + _sClass = Constants.strSIII; + return true; + } + else if (VEH.IndexOf("_" + Constants.strSII) > 0) + { + _sClass = Constants.strSII; + return true; + } + else if (VEH.IndexOf("_" + Constants.strSI) > 0) + { + _sClass = Constants.strSI; + return true; + } + else + { + _ErrMsg = "Size class not defined! (" + VEH.Substring(VEH.LastIndexOf(@"\"), VEH.Length - VEH.LastIndexOf(@"\")) + ")"; + return false; + } + } + else + { + _sClass = ""; + return true; + } + } + + //Get euro class + private bool geteclass(string VEH) + { + if (VEH.IndexOf("_" + Constants.strEU) > 0) + { + if (VEH.IndexOf("_", VEH.IndexOf("_" + Constants.strEU) + 1) > 0) + { + _eClass = Constants.strEU + VEH.Substring(VEH.IndexOf("_" + Constants.strEU) + 3, VEH.IndexOf("_", VEH.IndexOf("_" + Constants.strEU) + 1) - (VEH.IndexOf("_" + Constants.strEU) + 3)); + return true; + } + else if (VEH.IndexOf(".", VEH.IndexOf("_" + Constants.strEU) + 1) > 0) + { + _eClass = Constants.strEU + VEH.Substring(VEH.IndexOf("_" + Constants.strEU) + 3, VEH.IndexOf(".", VEH.IndexOf("_" + Constants.strEU) + 1) - (VEH.IndexOf("_" + Constants.strEU) + 3)); + return true; + } + else + { + _eClass = Constants.strEU + VEH.Substring(VEH.IndexOf("_" + Constants.strEU) + 3, VEH.Length - (VEH.IndexOf("_" + Constants.strEU) + 3)); + return true; + } + } + else if (VEH.IndexOf("_" + Constants.strBEV) > 0) + { + _eClass = ""; + return true; + } + //Should never happens + _ErrMsg = "Euro class not defined! (" + VEH + ")"; + return false; + } + + //Set complete class string + public bool setclass(string VEH) + { + if (getvclass(VEH)) { _Class = _vClass; } else { return false; } + if (getsclass(VEH)) { if (_sClass != "") { _Class = _Class + "_" + sClass; } } else { return false; } + if (gettclass(VEH)) { _Class = _Class + "_" + tClass; } else { return false; } + if (geteclass(VEH)) { if (_eClass != "") { _Class = _Class + "_" + eClass; } } else { return false; } + return true; + } + #endregion + + + } +} diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/Start.cs sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/Start.cs --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/dll_code/Start.cs 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/dll_code/Start.cs 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,530 @@ +#define FLEET +using System; +using System.IO; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Reflection; + +namespace PHEMlightdll +{ + public class Start + { + private List _DataPath; + private CEPHandler DataInput; + public Helpers Helper = new Helpers(); + + //******************* Parameters of Array or Single calculation ******************* + //********************************* INPUT ****************************************** + //*** DATATYP | UNIT | VARIBLE | Description *** + //List | [-] | DataFiles (VEH, FC, EMI)| Name of file (e.g. "PC_D_EU4" path neede if not in "Default Vehicles") or aggregated name (PC, HDV, BUS, TW) by FleetMix calculation + //List / double | [s] | Time | Time signal + //List / double | [m/s] | Velocity | Velocity signal + //double | [m/s^2]| acc | Acceleration (ONLY NEDDED BY SINGLE CALCULATION) + //List / double | [%] | Gradient | Gradient of the route + //out List | [-] | VehicleResultsOrg | Returned result list + //bool | [-] | fleetMix = false | Optional parameter if fleetMix should be calculate + //string | [-] | CommentPref = "c" | Optional parameter for comment prefix + + //********************************* OUPUT: VehicleResultsOrg ********************** + //*** DATATYP | UNIT | VARIBLE | Description *** + //double | [s] | time | Time + //double | [m/s] | speed | Velocity + //double | [kW] | power | Calculated power at the engine (ICE for conventional and HEV vehicles, electric engine for BEVs) including engine inertia and auxiliaries; not limited for engine fullload and braking limitations + //double | [kW] | P_pos | Positive engine power limited with engine rated power + //double | [-] | pNormRated | Engine power normalised with rated engine power and limited with the power range (fullload and drag) as specified in the characteristic curve for fuel consumption + //double | [-] | pNormDrive | Engine power normalised with "P_drive" and limited with the power range (fullload and drag) as specified in the characteristic curve for emissions + //double | [m/s^2]| acc | Caclulated/given acceleration + //double | [g/h] | fc | Calculated fuel consumption (Different unit for BEV vehicles) + // | [kWh/h]| | + //double | [g/h] | cO2 | Calculated CO2 emissions + //double | [g/h] | NOx | Calculated NOx emissions + //double | [g/h] | HC | Calculated HC emissions + //double | [g/h] | PM | Calculated PM emissions + //double | [g/h] | CO | Calculated CO emissions + + #region calculate + //Calculate data from array + public bool CALC_Array(List DataFiles, + List Time, + List Velocity, + List Gradient, + out List VehicleResultsOrg, + bool fleetMix = false, + string CommentPref = "c") + { + //Declaration + int i; + double acc; + List _VehicleResult = new List(); + + //Initialisation + Helper.ErrMsg = null; + + //Borrow + Helper.CommentPrefix = CommentPref; + _DataPath = new List(); + //Set path by normal calculation (on given) and set path by fleetmix (on Default Vehicles) calculation + for (i = 0; i < DataFiles.Count; i++) + { + if ((DataFiles[i].LastIndexOf(@"\")) >= 0) + { + _DataPath.Add(DataFiles[i]); + } + else + { + //_DataPath.Add(Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(@"\")) + @"\Default Vehicles\" + Helper.PHEMDataV); + _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\"))); + _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\"))); + _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\"))); + i += 1; + } + } + + //Read the vehicle and emission data + #if FLEET + if (fleetMix) + { + //Set the vehicle class + Helper.gClass = _DataPath[0]; + + //Generate the class + DataInput = new CEPHandler(); + + //Read the FleetShares + if (!DataInput.ReadFleetShares(DataFiles[1], Helper)) + { + VehicleResultsOrg = null; + return false; + } + //Read the vehicle and emission data + if (!DataInput.GetFleetCEP(_DataPath, DataFiles[0], Helper)) + { + VehicleResultsOrg = null; + return false; + } + } + else + #endif + { + //Get vehicle string + if (!Helper.setclass(DataFiles[0])) + { + VehicleResultsOrg = null; + return false; + } + + //Generate the class + DataInput = new CEPHandler(); + + //Read the vehicle and emission data + if (!DataInput.GetCEP(_DataPath, Helper)) + { + VehicleResultsOrg = null; + return false; + } + } + + //Calculate emissions per second + for (i = 1; i <= Time.Count - 1; i++) + { + //Calculate the acceleration + acc = (Velocity[i] - Velocity[i - 1]) / (Time[i] - Time[i - 1]); + + //Calculate and save the data in the List + _VehicleResult.Add(PHEMLight.CreateVehicleStateData(Helper, + DataInput.CEPS[Helper.gClass], + Time[i - 1], + Velocity[i - 1], + acc, + Gradient[i - 1])); + if (Helper.ErrMsg != null) + { + VehicleResultsOrg = null; + return false; + } + } + VehicleResultsOrg = _VehicleResult; + return true; + } + + //Calculate single data + public bool CALC_Single(List DataFiles, + double Time, + double Velocity, + double acc, + double Gradient, + out List VehicleResultsOrg, + bool fleetMix = false, + string CommentPref = "c") + { + //Declaration + List _VehicleResult = new List(); + VehicleResultsOrg = _VehicleResult; + + //Borrow + Helper.CommentPrefix = CommentPref; + _DataPath = new List(); + //Set path by normal calculation (on given) and set path by fleetmix (on Fleetshare file) calculation + for (int i = 0; i < DataFiles.Count; i++) + { + if ((DataFiles[i].LastIndexOf(@"\")) >= 0) + { + _DataPath.Add(DataFiles[i]); + } + else + { + //_DataPath.Add(Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(@"\")) + @"\Default Vehicles\" + Helper.PHEMDataV); + _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\"))); + _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\"))); + _DataPath.Add(DataFiles[i + 1].Substring(0, DataFiles[i + 1].LastIndexOf(@"\"))); + i += 1; + } + } + + //Read the vehicle and emission data + #if FLEET + if (fleetMix) + { + //Set the vehicle class + Helper.gClass = "AggClass_" + DataFiles[0]; + + //Generate the class + DataInput = new CEPHandler(); + + //Read the FleetShares + if (!DataInput.ReadFleetShares(DataFiles[1], Helper)) + { + VehicleResultsOrg = null; + return false; + } + //Read the vehicle and emission data + if (!DataInput.GetFleetCEP(_DataPath, DataFiles[0], Helper)) + { + VehicleResultsOrg = null; + return false; + } + } + else + #endif + { + //Get vehicle string + if (!Helper.setclass(DataFiles[0])) + { + VehicleResultsOrg = null; + return false; + } + + //Generate the class + DataInput = new CEPHandler(); + + //Read the vehicle and emission data + if (!DataInput.GetCEP(_DataPath, Helper)) + { + VehicleResultsOrg = null; + return false; + } + } + + //Calculate and save the data in the List + _VehicleResult.Add(PHEMLight.CreateVehicleStateData(Helper, + DataInput.CEPS[Helper.gClass], + Time, + Velocity, + acc, + Gradient)); + VehicleResultsOrg = _VehicleResult; + return true; + } + #endregion + + #region ExportData + public bool ExportData(string path, string vehicle, List _VehicleResult) + { + if (path == null || vehicle == null || _VehicleResult == null || _VehicleResult.Count == 0) return false; + + //Write head + StringBuilder allLines = new StringBuilder(); + string lineEnding = "\r\n"; + + allLines.AppendLine("Vehicletype: ," + vehicle); + allLines.AppendLine("Time, Speed, Gradient, Accelaration, Engine power raw, P_pos, P_norm_rated, P_norm_drive, FC, Electric Power, CO2, NOx, CO, HC, PM"); + allLines.AppendLine("[s], [m/s], [%], [m/s^2], [kW], [kW], [-], [-], [g/h], [kWh/h], [g/h], [g/h], [g/h], [g/h], [g/h]"); + + //Write data + foreach (VehicleResult Result in _VehicleResult) + { + allLines.Append(Result.Time.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.Speed.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.Grad.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.Accelaration.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.Power.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.PPos.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.PNormRated.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.PNormDrive.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.EmissionData.FC.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.EmissionData.FCel.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.EmissionData.CO2.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.EmissionData.NOx.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.EmissionData.CO.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.EmissionData.HC.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(Result.EmissionData.PM.ToString("0.0000", CultureInfo.InvariantCulture) + lineEnding); + } + + // Write the string to a file. + if (path.IndexOf(".", 0) < 0) + { + path = path + ".sta"; + } + try + { + StreamWriter file = new StreamWriter(path); + file.WriteLine(allLines); + file.Close(); + return true; + } + catch (Exception ex) + { + return false; + } + } + + public bool ExportSumData(string path, string vehicle, string cycle, VehicleResult _VehicleResult) + { + if (path == null || vehicle == null || cycle == null || _VehicleResult == null) return false; + StringBuilder allLines = new StringBuilder(); + + if (path.IndexOf(".", 0) < 0) + { + path = path + ".erg"; + } + + if (!File.Exists(path)) + { + //Write head + allLines.AppendLine("PHEMLight Results"); + allLines.AppendLine(""); + allLines.AppendLine("Vehicle, Cycle, Time, Speed, Gradient, Accelaration, Engine power raw, P_pos, P_norm_rated, P_norm_drive, FC, Electric Power, CO2, NOx, CO, HC, PM"); + allLines.AppendLine("[-], [-], [s], [km/h], [%], [m/s^2], [kW], [kW], [-], [-], [g/km], [kWh/km], [g/km], [g/km], [g/km], [g/km], [g/km]"); + } + + //Write data + allLines.Append(vehicle + ","); + allLines.Append(cycle + ","); + allLines.Append(_VehicleResult.Time.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.Speed.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.Grad.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.Accelaration.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.Power.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.PPos.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.PNormRated.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.PNormDrive.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.EmissionData.FC.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.EmissionData.FCel.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.EmissionData.CO2.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.EmissionData.NOx.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.EmissionData.CO.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.EmissionData.HC.ToString("0.0000", CultureInfo.InvariantCulture) + ","); + allLines.Append(_VehicleResult.EmissionData.PM.ToString("0.0000", CultureInfo.InvariantCulture)); + + // Write the string to a file. + try + { + StreamWriter file = new StreamWriter(path, true); + file.WriteLine(allLines); + file.Close(); + return true; + } + catch (Exception ex) + { + return false; + } + } + + public VehicleResult GenerateSumData(List _VehicleResult) + { + //Declaration + double sum_time = 0; + double sum_speed = 0; + double sum_grad = 0; + double sum_power = 0; + double sum_pPos = 0; + double sum_pNormRated = 0; + double sum_pNormDrive = 0; + double sum_acc = 0; + double sum_fc = 0; + double sum_fcel = 0; + double sum_cO2 = 0; + double sum_nOx = 0; + double sum_hC = 0; + double sum_pM = 0; + double sum_cO = 0; + + if (_VehicleResult == null || _VehicleResult.Count == 0) return new VehicleResult(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + + //Write data + foreach (VehicleResult Result in _VehicleResult) + { + sum_speed += Result.Speed * 3.6; + sum_power += Result.Power; + if (Result.PPos > 0) { sum_pPos += Result.PPos; } + sum_grad += Result.Grad; + sum_pNormRated += Result.PNormRated; + sum_pNormDrive += Result.PNormDrive; + sum_acc += Result.Accelaration; + sum_fcel += Result.EmissionData.FCel; + sum_fc += Result.EmissionData.FC; + sum_cO2 += Result.EmissionData.CO2; + sum_nOx += Result.EmissionData.NOx; + sum_hC += Result.EmissionData.HC; + sum_pM += Result.EmissionData.PM; + sum_cO += Result.EmissionData.CO; + } + + //Build average + sum_time = _VehicleResult[_VehicleResult.Count - 1].Time - _VehicleResult[0].Time; + sum_power /= _VehicleResult.Count; + sum_pPos /= _VehicleResult.Count; + sum_grad /= _VehicleResult.Count; + sum_pNormRated /= _VehicleResult.Count; + sum_pNormDrive /= _VehicleResult.Count; + sum_acc /= _VehicleResult.Count; + if (sum_speed > 0) + { + sum_fc /= sum_speed; + sum_fcel /= sum_speed; + sum_cO2 /= sum_speed; + sum_nOx /= sum_speed; + sum_hC /= sum_speed; + sum_pM /= sum_speed; + sum_cO /= sum_speed; + } + else + { + sum_fc = 0; + sum_fcel = 0; + sum_cO2 = 0; + sum_nOx = 0; + sum_hC = 0; + sum_pM = 0; + sum_cO = 0; + } + sum_speed /= _VehicleResult.Count; + + return new VehicleResult(sum_time, + sum_speed, + sum_grad, + sum_power, + sum_pPos, + sum_pNormRated, + sum_pNormDrive, + sum_acc, + sum_fc, + sum_fcel, + sum_cO2, + sum_nOx, + sum_hC, + sum_pM, + sum_cO); + } + #endregion + } + + //Calculation + class PHEMLight + { + #region CreateVehicleStateData + static public VehicleResult CreateVehicleStateData(Helpers Helper, + CEP currCep, + double time, + double inputSpeed, + double inputAcc, + double Gradient = 0) + { + //Declaration + double speed = Math.Max(inputSpeed, 0); + double acc; + double P_pos; + + //Speed/Acceleration limitation + if (speed == 0) + acc = 0; + else + acc = Math.Min(inputAcc, currCep.GetMaxAccel(speed, Gradient)); + + //Calculate the power + double power = currCep.CalcPower(speed, acc, Gradient); + double P_eng = currCep.CalcEngPower(power); + + //Power limitation + if (P_eng >= 0) + P_pos = power; + else + P_pos = 0; + + //Calculate the result values (BEV) + if (Helper.tClass == Constants.strBEV) + { + return new VehicleResult(time, + speed, + Gradient, + power, + P_pos, + P_eng / currCep.RatedPower, + P_eng / currCep.DrivingPower, + acc, + 0, + currCep.GetEmission("FC", power, speed, Helper), + 0, + 0, + 0, + 0, + 0); + } + + //Calculate the decel costing + double decelCoast = currCep.GetDecelCoast(speed, acc, Gradient); + + //Calculate the result values (Zero emissions by costing, Idling emissions by v <= 0.5m/s²) + if (acc >= decelCoast || speed <= Constants.ZERO_SPEED_ACCURACY) + { + return new VehicleResult(time, + speed, + Gradient, + power, + P_pos, + P_eng / currCep.RatedPower, + P_eng / currCep.DrivingPower, + acc, + currCep.GetEmission("FC", power, speed, Helper), + 0, + currCep.GetCO2Emission(currCep.GetEmission("FC", power, speed, Helper), currCep.GetEmission("CO", power, speed, Helper), currCep.GetEmission("HC", power, speed, Helper), Helper), + currCep.GetEmission("NOx", power, speed, Helper), + currCep.GetEmission("HC", power, speed, Helper), + currCep.GetEmission("PM", power, speed, Helper), + currCep.GetEmission("CO", power, speed, Helper)); + } + else + { + return new VehicleResult(time, + speed, + Gradient, + power, + P_pos, + power / currCep.RatedPower, + power / currCep.DrivingPower, + acc, + 0, + 0, + 0, + 0, + 0, + 0, + 0); + } + } + #endregion + } +} diff -Nru sumo-1.1.0+dfsg1/src/foreign/PHEMlight/Makefile.in sumo-1.2.0+dfsg1/src/foreign/PHEMlight/Makefile.in --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,645 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foreign/PHEMlight -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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 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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -SUBDIRS = cpp -all: all-recursive - -.SUFFIXES: -$(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) --foreign src/foreign/PHEMlight/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/foreign/PHEMlight/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/foreign/PHEMlight/README_Converting.md sumo-1.2.0+dfsg1/src/foreign/PHEMlight/README_Converting.md --- sumo-1.1.0+dfsg1/src/foreign/PHEMlight/README_Converting.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/PHEMlight/README_Converting.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,13 @@ +How to convert the PHEMlight C# code to C++ +=========================================== + +- Use C# to C++ converter by Tangible Software +- load the ConverterOptions.dat via Import Settings +- Select "Convert all C# in folder" +- Select the dll_code folder as source and the cpp folder as target +- determine changes in Start.cpp (function PHEMLight::CreateVehicleStateData) which need to go into HelpersPHEMlight::compute +- delete cResult.*, stringbuilder.h, and Start.* +- apply the conversion patch to add license info and some small fixes +- check whether further changes are needed by compiling and running the tests, especially the reference cycles +- if adaptions were made create a new conversion patch (git diff *.cpp *.h > conversion.patch) +- commit diff -Nru sumo-1.1.0+dfsg1/src/foreign/rtree/LayeredRTree.h sumo-1.2.0+dfsg1/src/foreign/rtree/LayeredRTree.h --- sumo-1.1.0+dfsg1/src/foreign/rtree/LayeredRTree.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/rtree/LayeredRTree.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/foreign/rtree/Makefile.in sumo-1.2.0+dfsg1/src/foreign/rtree/Makefile.in --- sumo-1.1.0+dfsg1/src/foreign/rtree/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/rtree/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,465 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foreign/rtree -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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) -am__DIST_COMMON = $(srcdir)/Makefile.in -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -EXTRA_DIST = RTree.h SUMORTree.h LayeredRTree.h -all: all-am - -.SUFFIXES: -$(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) --foreign src/foreign/rtree/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/foreign/rtree/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -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 -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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - 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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/foreign/rtree/README.TXT sumo-1.2.0+dfsg1/src/foreign/rtree/README.TXT --- sumo-1.1.0+dfsg1/src/foreign/rtree/README.TXT 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/rtree/README.TXT 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,32 @@ + +TITLE + + R-TREES: A DYNAMIC INDEX STRUCTURE FOR SPATIAL SEARCHING + +DESCRIPTION + + A C++ templated version of the RTree algorithm. + For more information please read the comments in RTree.h + +AUTHORS + + * 1983 Original algorithm and test code by Antonin Guttman and Michael Stonebraker, UC Berkely + * 1994 ANCI C ported from original test code by Melinda Green - melinda@superliminal.com + * 1995 Sphere volume fix for degeneracy problem submitted by Paul Brook + * 2004 Templated C++ port by Greg Douglas + +LICENSE: + + Entirely free for all uses. Enjoy! + +FILES + * RTree.h The C++ templated RTree implementation. Well commented. + * Test.cpp A simple test program, ported from the original C version. + * MemoryTest.cpp A more rigourous test to validate memory use. + * README.TXT This file. + +TO BUILD + + To build a test, compile only one of the test files with RTree.h. + Both test files contain a main() function. + diff -Nru sumo-1.1.0+dfsg1/src/foreign/rtree/SUMORTree.h sumo-1.2.0+dfsg1/src/foreign/rtree/SUMORTree.h --- sumo-1.1.0+dfsg1/src/foreign/rtree/SUMORTree.h 2018-10-17 22:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/rtree/SUMORTree.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,12 +23,12 @@ // =========================================================================== #include +#include #include +#include #include #include #include -#include -#include #include "RTree.h" @@ -69,17 +69,19 @@ class SUMORTree : private GUI_RTREE_QUAL, public Boundary { public: /// @brief Constructor - SUMORTree() : GUI_RTREE_QUAL(&GUIGlObject::drawGL) { - } + SUMORTree() : GUI_RTREE_QUAL(&GUIGlObject::drawGL), + myLock(true) + { } /// @brief Destructor virtual ~SUMORTree() { // check if lock is locked before insert objects - if(myLock.locked()) { - ProcessError("Mutex of SUMORTree is locked during call destructor (Lock value = " + toString(myLock.lockCount())+ ")"); + if (myLock.locked()) { + // cannot throw exception in destructor + WRITE_ERROR("Mutex of SUMORTree is locked during call of the destructor"); } // show information in gui testing debug gl mode - WRITE_GLDEBUG("Number of objects in SUMORTree during call destructor: " + toString(myTreeDebug.size())); + WRITE_GLDEBUG("Number of objects in SUMORTree during call of the destructor: " + toString(myTreeDebug.size())); } /** @brief Insert entry @@ -89,7 +91,7 @@ * @see RTree::Insert */ virtual void Insert(const float a_min[2], const float a_max[2], GUIGlObject* const & a_dataId) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); GUI_RTREE_QUAL::Insert(a_min, a_max, a_dataId); } @@ -100,7 +102,7 @@ * @see RTree::Remove */ virtual void Remove(const float a_min[2], const float a_max[2], GUIGlObject* const & a_dataId) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); GUI_RTREE_QUAL::Remove(a_min, a_max, a_dataId); } @@ -114,7 +116,7 @@ * @see RTree::Search */ virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings& c) const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return GUI_RTREE_QUAL::Search(a_min, a_max, c); } @@ -124,10 +126,10 @@ void addAdditionalGLObject(GUIGlObject *o) { // check if lock is locked before insert objects if(myLock.locked()) { - ProcessError("Mutex of SUMORTree is locked before object insertion (Lock value = " + toString(myLock.lockCount())+ ")"); + ProcessError("Mutex of SUMORTree is locked before object insertion"); } // lock mutex - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); // obtain boundary of object Boundary b = o->getCenteringBoundary(); // show information in gui testing debug gl mode @@ -152,10 +154,10 @@ void removeAdditionalGLObject(GUIGlObject *o) { // check if lock is locked remove insert objects if(myLock.locked()) { - ProcessError("Mutex of SUMORTree is locked before object remove (Lock value = " + toString(myLock.lockCount())+ ")"); + ProcessError("Mutex of SUMORTree is locked before object remove"); } // lock mutex - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); // obtain boundary of object Boundary b = o->getCenteringBoundary(); // show information in gui testing debug gl mode @@ -175,7 +177,7 @@ protected: /// @brief A mutex avoiding parallel change and traversal of the tree - mutable MFXMutex myLock; + mutable FXMutex myLock; private: /**@brief Map only used for check that SUMORTree works as expected, only is used if option "gui-testing-debug-gl" is enabled. diff -Nru sumo-1.1.0+dfsg1/src/foreign/tcpip/CMakeLists.txt sumo-1.2.0+dfsg1/src/foreign/tcpip/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/foreign/tcpip/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/tcpip/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -7,3 +7,6 @@ add_library(foreign_tcpip STATIC ${foreign_tcpip_STAT_SRCS}) set_property(TARGET foreign_tcpip PROPERTY PROJECT_LABEL "z_foreign_tcpip") +if (SUMO_UTILS) + install(TARGETS foreign_tcpip DESTINATION lib) +endif () diff -Nru sumo-1.1.0+dfsg1/src/foreign/tcpip/Makefile.in sumo-1.2.0+dfsg1/src/foreign/tcpip/Makefile.in --- sumo-1.1.0+dfsg1/src/foreign/tcpip/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/tcpip/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,630 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foreign/tcpip -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libtcpip.a -libtcpip_a_SOURCES = socket.h socket.cpp storage.h storage.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) --foreign src/foreign/tcpip/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/foreign/tcpip/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/storage.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/foreign/tcpip/storage.cpp sumo-1.2.0+dfsg1/src/foreign/tcpip/storage.cpp --- sumo-1.1.0+dfsg1/src/foreign/tcpip/storage.cpp 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/tcpip/storage.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -198,37 +198,70 @@ } - // ----------------------------------------------------------------------- - /** - * Reads a string list form the array - * @return The read string - */ - std::vector Storage::readStringList() - { - std::vector tmp; - const int len = readInt(); - tmp.reserve(len); - for (int i = 0; i < len; i++) - { - tmp.push_back(readString()); - } - return tmp; - } + // ----------------------------------------------------------------------- + /** + * Reads a string list form the array + * @return The read string + */ + std::vector Storage::readStringList() + { + std::vector tmp; + const int len = readInt(); + tmp.reserve(len); + for (int i = 0; i < len; i++) + { + tmp.push_back(readString()); + } + return tmp; + } - // ---------------------------------------------------------------------- - /** - * Writes a string into the array; - * @param s The string to be written - */ - void Storage::writeStringList(const std::vector &s) - { - writeInt(static_cast(s.size())); + // ----------------------------------------------------------------------- + /** + * Reads a double list from the array + * @return The read double list + */ + std::vector Storage::readDoubleList() + { + std::vector tmp; + const int len = readInt(); + tmp.reserve(len); + for (int i = 0; i < len; i++) + { + tmp.push_back(readDouble()); + } + return tmp; + } + + + // ---------------------------------------------------------------------- + /** + * Writes a string into the array; + * @param s The string to be written + */ + void Storage::writeStringList(const std::vector &s) + { + writeInt(static_cast(s.size())); for (std::vector::const_iterator it = s.begin(); it!=s.end() ; it++) - { - writeString(*it); + { + writeString(*it); } - } + } + + + // ---------------------------------------------------------------------- + /** + * Writes a double list into the array; + * @param s The double list to be written + */ + void Storage::writeDoubleList(const std::vector &s) + { + writeInt(static_cast(s.size())); + for (std::vector::const_iterator it = s.begin(); it!=s.end() ; it++) + { + writeDouble(*it); + } + } // ---------------------------------------------------------------------- diff -Nru sumo-1.1.0+dfsg1/src/foreign/tcpip/storage.h sumo-1.2.0+dfsg1/src/foreign/tcpip/storage.h --- sumo-1.1.0+dfsg1/src/foreign/tcpip/storage.h 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/foreign/tcpip/storage.h 2019-04-15 14:11:30.000000000 +0000 @@ -91,8 +91,11 @@ virtual std::string readString(); virtual void writeString(const std::string& s); - virtual std::vector readStringList(); - virtual void writeStringList(const std::vector &s); + virtual std::vector readStringList(); + virtual void writeStringList(const std::vector &s); + + virtual std::vector readDoubleList(); + virtual void writeDoubleList(const std::vector &s); virtual int readShort(); virtual void writeShort(int); diff -Nru sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp --- sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -55,13 +55,13 @@ new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo); // copyright notice - new FXLabel(this, "Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo); + new FXLabel(this, "Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo); new FXLabel(this, "This application is based on code provided by the Eclipse SUMO project.", nullptr, GUIDesignLabelAboutInfo); new FXLabel(this, "These core components are available under the conditions of the Eclipse Public License v2.", nullptr, GUIDesignLabelAboutInfo); (new FXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("http://www.eclipse.org/legal/epl-v20.html"); // link to homepage - (new FXLinkLabel(this, "http://sumo.dlr.de", nullptr, GUIDesignLabelCenter))->setTipText("http://sumo.dlr.de"); + (new FXLinkLabel(this, "https://sumo.dlr.de", nullptr, GUIDesignLabelCenter))->setTipText("https://sumo.dlr.de"); // centered ok-button FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame); diff -Nru sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.h sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.h --- sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AboutSUMO.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.cpp sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.cpp --- sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -67,7 +67,7 @@ b = new FXCheckButton(f1, "Locate elements when clicking on messages", this, MID_LOCATELINKS); b->setCheck(myLocateLinks); new FXHorizontalSeparator(f1, SEPARATOR_GROOVE | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X); - b = new FXCheckButton(f1, "Allow Textures", this , MID_ALLOWTEXTURES); + b = new FXCheckButton(f1, "Allow Textures", this, MID_ALLOWTEXTURES); b->setCheck(myAllowTextures); FXHorizontalFrame* f2 = new FXHorizontalFrame(f1, LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X | PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 5, 5); FXButton* initial = new FXButton(f2, "&OK", nullptr, this, MID_SETTINGS_OK, BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4); diff -Nru sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.h sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.h --- sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_AppSettings.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.cpp sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.cpp --- sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -204,7 +204,7 @@ GUIDialog_Breakpoints::onCmdEditTable(FXObject*, FXSelector, void* data) { FXMutexLock lock(*myBreakpointLock); const FXTablePos* const i = (FXTablePos*) data; - const std::string value = myTable->getItemText(i->row, i->col).text(); + const std::string value = StringUtils::prune(myTable->getItemText(i->row, i->col).text()); // check whether the inserted value is empty const bool empty = value.find_first_not_of(" ") == std::string::npos; try { @@ -231,5 +231,10 @@ } +void +GUIDialog_Breakpoints::layout() { + FXMainWindow::layout(); + myTable->setColumnWidth(0, myTable->getWidth() - 1); +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.h sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.h --- sumo-1.1.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/dialogs/GUIDialog_Breakpoints.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -75,6 +75,8 @@ long onCmdEditTable(FXObject*, FXSelector, void*); /// @} + virtual void layout(); + protected: /// FOX needs this GUIDialog_Breakpoints() {} diff -Nru sumo-1.1.0+dfsg1/src/gui/dialogs/Makefile.in sumo-1.2.0+dfsg1/src/gui/dialogs/Makefile.in --- sumo-1.1.0+dfsg1/src/gui/dialogs/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/dialogs/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,636 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/dialogs -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguidialogs.a -libguidialogs_a_SOURCES = GUIDialog_AboutSUMO.cpp GUIDialog_AboutSUMO.h \ -GUIDialog_AppSettings.cpp GUIDialog_AppSettings.h \ -GUIDialog_Breakpoints.cpp GUIDialog_Breakpoints.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) --foreign src/gui/dialogs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/gui/dialogs/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_AboutSUMO.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_AppSettings.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_Breakpoints.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/gui/GUIApplicationWindow.cpp sumo-1.2.0+dfsg1/src/gui/GUIApplicationWindow.cpp --- sumo-1.1.0+dfsg1/src/gui/GUIApplicationWindow.cpp 2018-12-17 23:00:33.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIApplicationWindow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -69,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -94,67 +96,70 @@ // FOX-declarations // =========================================================================== FXDEFMAP(GUIApplicationWindow) GUIApplicationWindowMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_QUIT, GUIApplicationWindow::onCmdQuit), - FXMAPFUNC(SEL_SIGNAL, MID_QUIT, GUIApplicationWindow::onCmdQuit), - FXMAPFUNC(SEL_CLOSE, MID_WINDOW, GUIApplicationWindow::onCmdQuit), - - 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), - FXMAPFUNC(SEL_COMMAND, MID_EDITCHOSEN, GUIApplicationWindow::onCmdEditChosen), - FXMAPFUNC(SEL_COMMAND, MID_EDIT_BREAKPOINTS, GUIApplicationWindow::onCmdEditBreakpoints), - FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWSCHEME, GUIApplicationWindow::onCmdEditViewScheme), - FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWPORT, GUIApplicationWindow::onCmdEditViewport), - FXMAPFUNC(SEL_COMMAND, MID_NETEDIT, GUIApplicationWindow::onCmdNetedit), - - 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_LISTPARKING, GUIApplicationWindow::onCmdListParking), - FXMAPFUNC(SEL_COMMAND, MID_LISTTELEPORTING, GUIApplicationWindow::onCmdListTeleporting), - FXMAPFUNC(SEL_COMMAND, MID_ABOUT, GUIApplicationWindow::onCmdAbout), - FXMAPFUNC(SEL_COMMAND, MID_NEW_MICROVIEW, GUIApplicationWindow::onCmdNewView), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE, GUIApplicationWindow::onCmdQuit), + FXMAPFUNC(SEL_SIGNAL, MID_HOTKEY_CTRL_Q_CLOSE, GUIApplicationWindow::onCmdQuit), + FXMAPFUNC(SEL_CLOSE, MID_WINDOW, GUIApplicationWindow::onCmdQuit), + + FXMAPFUNC(SEL_COMMAND, MID_OPEN_CONFIG, GUIApplicationWindow::onCmdOpenConfiguration), + FXMAPFUNC(SEL_COMMAND, MID_OPEN_NETWORK, GUIApplicationWindow::onCmdOpenNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_P, GUIApplicationWindow::onCmdOpenShapes), + FXMAPFUNC(SEL_COMMAND, MID_OPEN_EDGEDATA, GUIApplicationWindow::onCmdOpenEdgeData), + FXMAPFUNC(SEL_COMMAND, MID_RECENTFILE, GUIApplicationWindow::onCmdOpenRecent), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_R_RELOAD, GUIApplicationWindow::onCmdReload), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION, GUIApplicationWindow::onCmdClose), + FXMAPFUNC(SEL_COMMAND, MID_EDITCHOSEN, GUIApplicationWindow::onCmdEditChosen), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_B_EDITBREAKPOINT, GUIApplicationWindow::onCmdEditBreakpoints), + FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWSCHEME, GUIApplicationWindow::onCmdEditViewScheme), + FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWPORT, GUIApplicationWindow::onCmdEditViewport), + FXMAPFUNC(SEL_COMMAND, MID_NETEDIT, GUIApplicationWindow::onCmdNetedit), + + FXMAPFUNC(SEL_COMMAND, MID_APPSETTINGS, GUIApplicationWindow::onCmdAppSettings), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID, GUIApplicationWindow::onCmdGaming), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_F_FULSCREENMODE, GUIApplicationWindow::onCmdFullScreen), + FXMAPFUNC(SEL_COMMAND, MID_LISTINTERNAL, GUIApplicationWindow::onCmdListInternal), + FXMAPFUNC(SEL_COMMAND, MID_LISTPARKING, GUIApplicationWindow::onCmdListParking), + FXMAPFUNC(SEL_COMMAND, MID_LISTTELEPORTING, GUIApplicationWindow::onCmdListTeleporting), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F2_ABOUT, GUIApplicationWindow::onCmdAbout), + FXMAPFUNC(SEL_COMMAND, MID_NEW_MICROVIEW, GUIApplicationWindow::onCmdNewView), #ifdef HAVE_OSG FXMAPFUNC(SEL_COMMAND, MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG), #endif - FXMAPFUNC(SEL_COMMAND, MID_START, GUIApplicationWindow::onCmdStart), - FXMAPFUNC(SEL_COMMAND, MID_STOP, GUIApplicationWindow::onCmdStop), - FXMAPFUNC(SEL_COMMAND, MID_STEP, GUIApplicationWindow::onCmdStep), - FXMAPFUNC(SEL_COMMAND, MID_SIMSAVE, GUIApplicationWindow::onCmdSaveState), - FXMAPFUNC(SEL_COMMAND, MID_TIME_TOOGLE, GUIApplicationWindow::onCmdTimeToggle), - FXMAPFUNC(SEL_COMMAND, MID_DELAY_TOOGLE, GUIApplicationWindow::onCmdDelayToggle), - FXMAPFUNC(SEL_COMMAND, MID_DEMAND_SCALE, GUIApplicationWindow::onCmdDemandScale), - FXMAPFUNC(SEL_COMMAND, MID_CLEARMESSAGEWINDOW, GUIApplicationWindow::onCmdClearMsgWindow), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS, GUIApplicationWindow::onCmdStart), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK, GUIApplicationWindow::onCmdStop), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND, GUIApplicationWindow::onCmdStep), + FXMAPFUNC(SEL_COMMAND, MID_SIMSAVE, GUIApplicationWindow::onCmdSaveState), + FXMAPFUNC(SEL_COMMAND, MID_TIME_TOOGLE, GUIApplicationWindow::onCmdTimeToggle), + FXMAPFUNC(SEL_COMMAND, MID_DELAY_TOOGLE, GUIApplicationWindow::onCmdDelayToggle), + FXMAPFUNC(SEL_COMMAND, MID_DEMAND_SCALE, GUIApplicationWindow::onCmdDemandScale), + FXMAPFUNC(SEL_COMMAND, MID_CLEARMESSAGEWINDOW, GUIApplicationWindow::onCmdClearMsgWindow), FXMAPFUNC(SEL_COMMAND, MID_SHOWNETSTATS, GUIApplicationWindow::onCmdShowStats), FXMAPFUNC(SEL_COMMAND, MID_SHOWVEHSTATS, GUIApplicationWindow::onCmdShowStats), FXMAPFUNC(SEL_COMMAND, MID_SHOWPERSONSTATS, GUIApplicationWindow::onCmdShowStats), - 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), + 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_HOTKEY_CTRL_P, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_OPEN_EDGEDATA, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_R_RELOAD, GUIApplicationWindow::onUpdReload), + FXMAPFUNC(SEL_UPDATE, MID_RECENTFILE, GUIApplicationWindow::onUpdOpenRecent), + FXMAPFUNC(SEL_UPDATE, MID_NEW_MICROVIEW, GUIApplicationWindow::onUpdAddView), #ifdef HAVE_OSG - FXMAPFUNC(SEL_COMMAND, MID_NEW_OSGVIEW, GUIApplicationWindow::onUpdAddView), + FXMAPFUNC(SEL_UPDATE, MID_NEW_OSGVIEW, GUIApplicationWindow::onUpdAddView), #endif - 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_SIMSAVE, GUIApplicationWindow::onUpdNeedsSimulation), - FXMAPFUNC(SEL_UPDATE, MID_EDITCHOSEN, GUIApplicationWindow::onUpdNeedsSimulation), - FXMAPFUNC(SEL_UPDATE, MID_EDIT_BREAKPOINTS, GUIApplicationWindow::onUpdNeedsSimulation), - FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWSCHEME, GUIApplicationWindow::onUpdNeedsSimulation), - FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWPORT, GUIApplicationWindow::onUpdNeedsSimulation), - FXMAPFUNC(SEL_UPDATE, MID_NETEDIT, GUIApplicationWindow::onUpdNeedsSimulation), - FXMAPFUNC(SEL_UPDATE, MID_DEMAND_SCALE, GUIApplicationWindow::onUpdNeedsSimulation), - FXMAPFUNC(SEL_COMMAND, MID_HELP, GUIApplicationWindow::onCmdHelp), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS, GUIApplicationWindow::onUpdStart), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK, GUIApplicationWindow::onUpdStop), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND, GUIApplicationWindow::onUpdStep), + FXMAPFUNC(SEL_UPDATE, MID_SIMSAVE, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_EDITCHOSEN, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_B_EDITBREAKPOINT, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWSCHEME, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWPORT, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_NETEDIT, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_DEMAND_SCALE, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_TRACI_STATUS, GUIApplicationWindow::onUpdTraCIStatus), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F1_ONLINEDOCUMENTATION, GUIApplicationWindow::onCmdHelp), // forward requests to the active view FXMAPFUNC(SEL_COMMAND, MID_LOCATEJUNCTION, GUIApplicationWindow::onCmdLocate), @@ -209,7 +214,8 @@ myJamSoundTime(60), myPreviousCollisionNumber(0), myWaitingTime(0), - myTimeLoss(0) { + myTimeLoss(0), + myTotalDistance(0) { // init icons GUIIconSubSys::initIcons(a); // init cursors @@ -229,8 +235,8 @@ setSelector(MID_WINDOW); // build menu bar - myMenuBarDrag = new FXToolBarShell(this, GUIDesignToolBarShell3); - myMenuBar = new FXMenuBar(myTopDock, myMenuBarDrag, GUIDesignBar); + myMenuBarDrag = new FXToolBarShell(this, GUIDesignToolBar); + myMenuBar = new FXMenuBar(myTopDock, myMenuBarDrag, GUIDesignToolbarMenuBar); new FXToolBarGrip(myMenuBar, myMenuBar, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); buildToolBars(); // build the thread - io @@ -266,6 +272,7 @@ fillMenuBar(); myToolBar6->hide(); myToolBar7->hide(); + myToolBar9->hide(); // build additional threads myLoadThread = new GUILoadThread(getApp(), this, myEvents, myLoadThreadEvent); myRunThread = new GUIRunThread(getApp(), this, mySimDelay, myEvents, myRunThreadEvent); @@ -370,14 +377,17 @@ GUIIconSubSys::getIcon(ICON_OPEN_NET), this, MID_OPEN_NETWORK); new FXMenuCommand(myFileMenu, "Open Shapes \tCtrl+P\tLoad POIs and Polygons for visualization.", - GUIIconSubSys::getIcon(ICON_OPEN_SHAPES), this, MID_OPEN_SHAPES); + GUIIconSubSys::getIcon(ICON_OPEN_SHAPES), this, MID_HOTKEY_CTRL_P); + new FXMenuCommand(myFileMenu, + "Open EdgeData \tCtrl+U\tLoad edge related data for visualization.", + GUIIconSubSys::getIcon(ICON_OPEN_NET), this, MID_OPEN_EDGEDATA); new FXMenuCommand(myFileMenu, "&Reload\tCtrl+R\tReloads the simulation / the network.", - GUIIconSubSys::getIcon(ICON_RELOAD), this, MID_RELOAD); + GUIIconSubSys::getIcon(ICON_RELOAD), this, MID_HOTKEY_CTRL_R_RELOAD); new FXMenuSeparator(myFileMenu); new FXMenuCommand(myFileMenu, "Close\tCtrl+W\tClose the simulation.", - GUIIconSubSys::getIcon(ICON_CLOSE), this, MID_CLOSE); + GUIIconSubSys::getIcon(ICON_CLOSE), this, MID_HOTKEY_CTRL_W_CLOSESIMULATION); // Recent files FXMenuSeparator* sep1 = new FXMenuSeparator(myFileMenu); sep1->setTarget(&myRecentConfigs); @@ -414,7 +424,7 @@ new FXMenuSeparator(myFileMenu); new FXMenuCommand(myFileMenu, "&Quit\tCtrl+Q\tQuit the Application.", - nullptr, this, MID_QUIT, 0); + nullptr, this, MID_HOTKEY_CTRL_Q_CLOSE, 0); // build edit menu mySelectByPermissions = new FXMenuPane(this); @@ -433,17 +443,17 @@ GUIIconSubSys::getIcon(ICON_FLAG), mySelectByPermissions); new FXMenuSeparator(myEditMenu); new FXMenuCommand(myEditMenu, - "Edit Breakpoints...\tCtrl+B\tOpens a dialog for editing breakpoints.", - nullptr, this, MID_EDIT_BREAKPOINTS); + "Edit Breakpoints\tCtrl+B\tOpens a dialog for editing breakpoints.", + nullptr, this, MID_HOTKEY_CTRL_B_EDITBREAKPOINT); new FXMenuCommand(myEditMenu, - "Edit Visualisation ...\tCtrl+V\tOpens a dialog for editing visualization settings.", + "Edit Visualisation\tCtrl+V\tOpens a dialog for editing visualization settings.", nullptr, this, MID_EDITVIEWSCHEME); new FXMenuCommand(myEditMenu, - "Edit Viewport...\tCtrl+I\tOpens a dialog for editing viewing are, zoom and rotation.", + "Edit Viewport\tCtrl+I\tOpens a dialog for editing viewing are, zoom and rotation.", nullptr, this, MID_EDITVIEWPORT); new FXMenuSeparator(myEditMenu); new FXMenuCommand(myEditMenu, - "Open in Netedit...\tCtrl+T\tOpens the netedit application with the current network.", + "Open in Netedit\tCtrl+T\tOpens the netedit application with the current network.", nullptr, this, MID_NETEDIT); // build settings menu @@ -454,10 +464,10 @@ nullptr, this, MID_APPSETTINGS); new FXMenuCheck(mySettingsMenu, "Gaming Mode\tCtrl+G\tToggle gaming mode on/off.", - this, MID_GAMING); + this, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID); new FXMenuCheck(mySettingsMenu, "Full Screen Mode\tCtrl+F\tToggle full screen mode on/off.", - this, MID_FULLSCREEN); + this, MID_HOTKEY_CTRL_F_FULSCREENMODE); // build Locate menu myLocatorMenu = new FXMenuPane(this); new FXMenuTitle(myMenuBar, "&Locate", nullptr, myLocatorMenu); @@ -503,13 +513,13 @@ new FXMenuTitle(myMenuBar, "Simulation", nullptr, myControlMenu); new FXMenuCommand(myControlMenu, "Run\tCtrl+A\tStart running the simulation.", - GUIIconSubSys::getIcon(ICON_START), this, MID_START); + GUIIconSubSys::getIcon(ICON_START), this, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS); new FXMenuCommand(myControlMenu, "Stop\tCtrl+S\tStop running the simulation.", - GUIIconSubSys::getIcon(ICON_STOP), this, MID_STOP); + GUIIconSubSys::getIcon(ICON_STOP), this, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK); new FXMenuCommand(myControlMenu, "Step\tCtrl+D\tPerform one simulation step.", - GUIIconSubSys::getIcon(ICON_STEP), this, MID_STEP); + GUIIconSubSys::getIcon(ICON_STEP), this, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND); new FXMenuCommand(myControlMenu, "Save\t\tSave the current simulation state to a file.", GUIIconSubSys::getIcon(ICON_SAVE), this, MID_SIMSAVE); @@ -558,32 +568,13 @@ // build help menu myHelpMenu = new FXMenuPane(this); new FXMenuTitle(myMenuBar, "&Help", nullptr, myHelpMenu); - new FXMenuCommand(myHelpMenu, "&Online Documentation\tF1\tOpen Online documentation", nullptr, this, MID_HELP); - new FXMenuCommand(myHelpMenu, "&About\tF2\tAbout sumo-gui", GUIIconSubSys::getIcon(ICON_SUMO_MINI), - this, MID_ABOUT); - - // initialize Ctrl hotkeys with Caps Lock enabled using decimal code (to avoid problems in Linux) - getAccelTable()->addAccel(262222, this, FXSEL(SEL_COMMAND, MID_OPEN_NETWORK)); // Ctrl + N - getAccelTable()->addAccel(262223, this, FXSEL(SEL_COMMAND, MID_OPEN_CONFIG)); // Ctrl + O - getAccelTable()->addAccel(262226, this, FXSEL(SEL_COMMAND, MID_RELOAD)); // Ctrl + R - getAccelTable()->addAccel(262224, this, FXSEL(SEL_COMMAND, MID_OPEN_SHAPES)); // Ctrl + P - getAccelTable()->addAccel(262230, this, FXSEL(SEL_COMMAND, MID_CLOSE)); // Ctrl + W - getAccelTable()->addAccel(262225, this, FXSEL(SEL_COMMAND, MID_QUIT)); // Ctrl + Q - getAccelTable()->addAccel(262214, this, FXSEL(SEL_COMMAND, MID_FULLSCREEN)); // Ctrl + F - getAccelTable()->addAccel(262215, this, FXSEL(SEL_COMMAND, MID_GAMING)); // Ctrl + G - getAccelTable()->addAccel(262209, this, FXSEL(SEL_COMMAND, MID_START)); // Ctrl + A - getAccelTable()->addAccel(262227, this, FXSEL(SEL_COMMAND, MID_STOP)); // Ctrl + S - getAccelTable()->addAccel(262212, this, FXSEL(SEL_COMMAND, MID_STEP)); // Ctrl + D - - /** Disabled shorcuts for Locate dialog due #4261 - // initialize Shift hotkeys with Caps Lock enabled using decimal code (to avoid problems in Linux) - getAccelTable()->addAccel(65642, this, FXSEL(SEL_COMMAND, MID_LOCATEJUNCTION)); // Shift + J - getAccelTable()->addAccel(65637, this, FXSEL(SEL_COMMAND, MID_LOCATEEDGE)); // Shift + E - getAccelTable()->addAccel(65652, this, FXSEL(SEL_COMMAND, MID_LOCATETLS)); // Shift + T - getAccelTable()->addAccel(65633, this, FXSEL(SEL_COMMAND, MID_LOCATEADD)); // Shift + A - getAccelTable()->addAccel(65647, this, FXSEL(SEL_COMMAND, MID_LOCATEPOI)); // Shift + O - getAccelTable()->addAccel(65644, this, FXSEL(SEL_COMMAND, MID_LOCATEPOLY)); // Shift + L - **/ + new FXMenuCommand(myHelpMenu, "&Online Documentation\tF1\tOpen Online documentation", nullptr, this, MID_HOTKEY_F1_ONLINEDOCUMENTATION); + new FXMenuCommand(myHelpMenu, "&About\tF2\tAbout sumo-gui", GUIIconSubSys::getIcon(ICON_SUMO_MINI), this, MID_HOTKEY_F2_ABOUT); + + //new FXButton(myMenuBar, "\t\tShows TraCI status", GUIIconSubSys::getIcon(ICON_ADD), this, MID_TRACI_STATUS, 0, 0, 0, 14, 14, 0, 0, 0, 0); + + // build SUMO Accelerators (hotkeys) + GUIShortcutsSubSys::buildSUMOAccelerators(this); } @@ -592,28 +583,28 @@ // build tool bars { // file and simulation tool bar - myToolBarDrag1 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar1 = new FXToolBar(myTopDock, myToolBarDrag1, GUIDesignToolBarShell1); + myToolBarDrag1 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar1 = new FXToolBar(myTopDock, myToolBarDrag1, GUIDesignToolBarRaisedNextTop); new FXToolBarGrip(myToolBar1, myToolBar1, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); // build file tools new FXButton(myToolBar1, "\t\tOpen a simulation (Configuration file).", GUIIconSubSys::getIcon(ICON_OPEN_CONFIG), this, MID_OPEN_CONFIG, GUIDesignButtonToolbar); new FXButton(myToolBar1, "\t\tOpen a network.", GUIIconSubSys::getIcon(ICON_OPEN_NET), this, MID_OPEN_NETWORK, GUIDesignButtonToolbar); - new FXButton(myToolBar1, "\t\tReloads the simulation / the network.", GUIIconSubSys::getIcon(ICON_RELOAD), this, MID_RELOAD, GUIDesignButtonToolbar); + new FXButton(myToolBar1, "\t\tReloads the simulation / the network.", GUIIconSubSys::getIcon(ICON_RELOAD), this, MID_HOTKEY_CTRL_R_RELOAD, GUIDesignButtonToolbar); } { // simulation toolbar - myToolBarDrag2 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar2 = new FXToolBar(myTopDock, myToolBarDrag2, GUIDesignToolBarShell2); + myToolBarDrag2 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar2 = new FXToolBar(myTopDock, myToolBarDrag2, GUIDesignToolBarRaisedSameTop); new FXToolBarGrip(myToolBar2, myToolBar2, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); // build simulation tools - new FXButton(myToolBar2, "\t\tStart the loaded simulation.", GUIIconSubSys::getIcon(ICON_START), this, MID_START, GUIDesignButtonToolbar); - new FXButton(myToolBar2, "\t\tStop the running simulation.", GUIIconSubSys::getIcon(ICON_STOP), this, MID_STOP, GUIDesignButtonToolbar); - new FXButton(myToolBar2, "\t\tPerform a single simulation step.", GUIIconSubSys::getIcon(ICON_STEP), this, MID_STEP, GUIDesignButtonToolbar); + new FXButton(myToolBar2, "\t\tStart the loaded simulation.", GUIIconSubSys::getIcon(ICON_START), this, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS, GUIDesignButtonToolbar); + new FXButton(myToolBar2, "\t\tStop the running simulation.", GUIIconSubSys::getIcon(ICON_STOP), this, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK, GUIDesignButtonToolbar); + new FXButton(myToolBar2, "\t\tPerform a single simulation step.", GUIIconSubSys::getIcon(ICON_STEP), this, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND, GUIDesignButtonToolbar); } { // Simulation Step Display - myToolBarDrag3 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar3 = new FXToolBar(myTopDock, myToolBarDrag3, GUIDesignToolBarShell2); + myToolBarDrag3 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar3 = new FXToolBar(myTopDock, myToolBarDrag3, GUIDesignToolBarRaisedSameTop); new FXToolBarGrip(myToolBar3, myToolBar3, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); new FXButton(myToolBar3, "Time:\t\tToggle between seconds and hour:minute:seconds display", nullptr, this, MID_TIME_TOOGLE, GUIDesignButtonToolbarText); @@ -626,8 +617,8 @@ } { // Simulation Delay - myToolBarDrag4 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar4 = new FXToolBar(myTopDock, myToolBarDrag4, GUIDesignToolBarShell2); + myToolBarDrag4 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar4 = new FXToolBar(myTopDock, myToolBarDrag4, GUIDesignToolBarRaisedSameTop); new FXToolBarGrip(myToolBar4, myToolBar4, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); new FXButton(myToolBar4, "Delay (ms):\t\tDelay per simulated second. Click to toggle between the last two delay values", nullptr, this, MID_DELAY_TOOGLE, GUIDesignButtonToolbarText); @@ -648,8 +639,8 @@ } { // Scale traffic (flows and incrementally loaded vehicles) - myToolBarDrag8 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar8 = new FXToolBar(myTopDock, myToolBarDrag8, GUIDesignToolBarShell2); + myToolBarDrag8 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar8 = new FXToolBar(myTopDock, myToolBarDrag8, GUIDesignToolBarRaisedSameTop); new FXToolBarGrip(myToolBar8, myToolBar8, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); new FXLabel(myToolBar8, "Scale Traffic:\t\tScale traffic from flows and vehicles that are loaded incrementally from route files", nullptr, LAYOUT_TOP | LAYOUT_LEFT); myDemandScaleSpinner = new FXRealSpinner(myToolBar8, 7, this, MID_DEMAND_SCALE, GUIDesignSpinDial); @@ -659,22 +650,22 @@ } { // Views - myToolBarDrag5 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar5 = new FXToolBar(myTopDock, myToolBarDrag5, GUIDesignToolBarShell2); + myToolBarDrag5 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar5 = new FXToolBar(myTopDock, myToolBarDrag5, GUIDesignToolBarRaisedSameTop); new FXToolBarGrip(myToolBar5, myToolBar5, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); // build view tools new FXButton(myToolBar5, "\t\tOpen a new microscopic view.", GUIIconSubSys::getIcon(ICON_MICROVIEW), this, MID_NEW_MICROVIEW, GUIDesignButtonToolbar); #ifdef HAVE_OSG new FXButton(myToolBar5, "\t\tOpen a new 3D view.", - GUIIconSubSys::getIcon(ICON_MICROVIEW), this, MID_NEW_OSGVIEW, GUIDesignButtonToolbar); + GUIIconSubSys::getIcon(ICON_OSGVIEW), this, MID_NEW_OSGVIEW, GUIDesignButtonToolbar); #endif } { /// game specific stuff // total waitingTime - myToolBarDrag6 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar6 = new FXToolBar(myTopDock, myToolBarDrag6, GUIDesignToolBarShell2); + myToolBarDrag6 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar6 = new FXToolBar(myTopDock, myToolBarDrag6, GUIDesignToolBarRaisedSameTop); new FXToolBarGrip(myToolBar6, myToolBar6, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); new FXLabel(myToolBar6, "Waiting Time:\t\tTime spent waiting accumulated for all vehicles", nullptr, LAYOUT_TOP | LAYOUT_LEFT); myWaitingTimeLabel = new FXEX::FXLCDLabel(myToolBar6, 13, nullptr, 0, JUSTIFY_RIGHT); @@ -685,8 +676,8 @@ myWaitingTimeLabel->setText("-------------"); // idealistic time loss - myToolBarDrag7 = new FXToolBarShell(this, GUIDesignToolBarShell3); - myToolBar7 = new FXToolBar(myTopDock, myToolBarDrag7, GUIDesignToolBarShell2); + myToolBarDrag7 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar7 = new FXToolBar(myTopDock, myToolBarDrag7, GUIDesignToolBarRaisedSameTop); new FXToolBarGrip(myToolBar7, myToolBar7, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); new FXLabel(myToolBar7, "Time Loss:\t\tTime lost due to being unable to drive with maximum speed for all vehicles", nullptr, LAYOUT_TOP | LAYOUT_LEFT); myTimeLossLabel = new FXEX::FXLCDLabel(myToolBar7, 13, nullptr, 0, JUSTIFY_RIGHT); @@ -695,6 +686,18 @@ myTimeLossLabel->setThickness(2); myTimeLossLabel->setGroove(2); myTimeLossLabel->setText("-------------"); + + // total driving distance + myToolBarDrag9 = new FXToolBarShell(this, GUIDesignToolBar); + myToolBar9 = new FXToolBar(myTopDock, myToolBarDrag9, GUIDesignToolBarRaisedSameTop); + new FXToolBarGrip(myToolBar9, myToolBar9, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); + new FXLabel(myToolBar9, "Distance (km):\t\tTotal distance driven by DRT vehicles", nullptr, LAYOUT_TOP | LAYOUT_LEFT); + myTotalDistanceLabel = new FXEX::FXLCDLabel(myToolBar9, 13, nullptr, 0, JUSTIFY_RIGHT); + myTotalDistanceLabel->setHorizontal(2); + myTotalDistanceLabel->setVertical(6); + myTotalDistanceLabel->setThickness(2); + myTotalDistanceLabel->setGroove(2); + myTotalDistanceLabel->setText("-------------"); } } @@ -774,7 +777,7 @@ long GUIApplicationWindow::onCmdHelp(FXObject*, FXSelector, void*) { - FXLinkLabel::fxexecute("http://sumo.dlr.de/wiki/SUMO-GUI"); + FXLinkLabel::fxexecute("https://sumo.dlr.de/wiki/SUMO-GUI"); return 1; } @@ -885,6 +888,33 @@ } long +GUIApplicationWindow::onCmdOpenEdgeData(FXObject*, FXSelector, void*) { + // get the shape file name + FXFileDialog opendialog(this, "Open EdgeData"); + opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY)); + opendialog.setSelectMode(SELECTFILE_EXISTING); + opendialog.setPatternList("EdgeData files (*.xml)\nAll files (*)"); + if (gCurrentFolder.length() != 0) { + opendialog.setDirectory(gCurrentFolder); + } + if (opendialog.execute()) { + gCurrentFolder = opendialog.getDirectory(); + std::string file = opendialog.getFilename().text(); + if (!GUINet::getGUIInstance()->loadEdgeData(file)) { + WRITE_MESSAGE("Loading of " + file + " failed."); + } + update(); + if (myMDIClient->numChildren() > 0) { + GUISUMOViewParent* w = dynamic_cast(myMDIClient->getActiveChild()); + if (w != nullptr) { + w->getView()->update(); + } + } + } + return 1; +} + +long GUIApplicationWindow::onCmdReload(FXObject*, FXSelector, void*) { storeWindowSizeAndPos(); getApp()->beginWaitCursor(); @@ -928,7 +958,7 @@ long GUIApplicationWindow::onUpdReload(FXObject* sender, FXSelector, void* ptr) { sender->handle(this, - myAmLoading || myLoadThread->getFileName() == "" + myAmLoading || myLoadThread->getFileName() == "" || TraCIServer::getInstance() != nullptr ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), ptr); return 1; @@ -1097,6 +1127,12 @@ return 1; } +long +GUIApplicationWindow::onUpdTraCIStatus(FXObject* sender, FXSelector, void* ptr) { + sender->handle(this, TraCIServer::getInstance() == nullptr ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), ptr); + return 1; +} + long GUIApplicationWindow::onCmdLocate(FXObject*, FXSelector sel, void*) { @@ -1140,12 +1176,17 @@ myToolBar4->hide(); myToolBar5->hide(); myToolBar6->show(); - myToolBar7->show(); myToolBar8->hide(); + if (myTLSGame) { + myToolBar7->show(); + } else { + myToolBar9->show(); + } myMessageWindow->hide(); myLCDLabel->setFgColor(MFXUtils::getFXColor(RGBColor::RED)); myWaitingTimeLabel->setFgColor(MFXUtils::getFXColor(RGBColor::RED)); myTimeLossLabel->setFgColor(MFXUtils::getFXColor(RGBColor::RED)); + myTotalDistanceLabel->setFgColor(MFXUtils::getFXColor(RGBColor::RED)); gSchemeStorage.getDefault().gaming = true; } else { myMenuBar->show(); @@ -1157,6 +1198,7 @@ myToolBar6->hide(); myToolBar7->hide(); myToolBar8->show(); + myToolBar9->hide(); myMessageWindow->show(); myLCDLabel->setFgColor(MFXUtils::getFXColor(RGBColor::GREEN)); gSchemeStorage.getDefault().gaming = false; @@ -1334,9 +1376,6 @@ getApp()->exit(1); } } else { - if (OptionsCont::getOptions().getBool("game")) { - onCmdGaming(nullptr, 0, nullptr); - } // initialise simulation thread if (!myRunThread->init(ec->myNet, ec->myBegin, ec->myEnd)) { if (GUIGlobals::gQuitOnEnd) { @@ -1379,6 +1418,16 @@ myRunThread->getBreakpoints().assign(settings.getBreakpoints().begin(), settings.getBreakpoints().end()); myRunThread->getBreakpointLock().unlock(); } + if (!OptionsCont::getOptions().isDefault("breakpoints")) { + std::vector breakpoints; + for (const std::string& val : OptionsCont::getOptions().getStringVector("breakpoints")) { + breakpoints.push_back(string2time(val)); + } + std::sort(breakpoints.begin(), breakpoints.end()); + myRunThread->getBreakpointLock().lock(); + myRunThread->getBreakpoints().assign(breakpoints.begin(), breakpoints.end()); + myRunThread->getBreakpointLock().unlock(); + } myJamSounds = settings.getEventDistribution("jam"); myCollisionSounds = settings.getEventDistribution("collision"); if (settings.getJamSoundTime() > 0) { @@ -1399,16 +1448,23 @@ myRunThread->getBreakpointLock().unlock(); } - if (isGaming()) { - setTitle("SUMO Interactive Traffic Light"); + if (OptionsCont::getOptions().getBool("game")) { + if (OptionsCont::getOptions().getString("game.mode") == "tls") { + myTLSGame = true; + setTitle("SUMO Interactive Traffic Light"); + } else { + myTLSGame = false; + setTitle("SUMO Interactive Demand-Responsive-Transport"); + } + onCmdGaming(nullptr, 0, nullptr); } else { // set simulation name on the caption setTitle(MFXUtils::getTitleText("SUMO " VERSION_STRING, ec->myFile.c_str())); } if (ec->myViewportFromRegistry) { Position off; - off.set(getApp()->reg().readRealEntry("viewport", "x"), - getApp()->reg().readRealEntry("viewport", "y"), + off.set(getApp()->reg().readRealEntry("viewport", "x"), + getApp()->reg().readRealEntry("viewport", "y"), getApp()->reg().readRealEntry("viewport", "z")); Position p(off.x(), off.y(), 0); GUISUMOAbstractView* view = myGLWindows[0]->getView(); @@ -1434,7 +1490,6 @@ void GUIApplicationWindow::handleEvent_SimulationStep(GUIEvent*) { - updateChildren(); updateTimeLCD(myRunThread->getNet().getCurrentTimeStep()); const int running = myRunThread->getNet().getVehicleControl().getRunningVehicleNo(); const int backlog = myRunThread->getNet().getInsertionControl().getWaitingVehicleNo(); @@ -1461,11 +1516,16 @@ myStatButtons[2]->setText(toString(myRunThread->getNet().getContainerControl().getRunningNumber()).c_str()); } if (myAmGaming) { - checkGamingEvents(); + if (myTLSGame) { + checkGamingEvents(); + } else { + checkGamingEventsDRT(); + } } if (myRunThread->simulationIsStartable()) { getApp()->forceRefresh(); // restores keyboard focus } + updateChildren(); update(); } @@ -1544,7 +1604,7 @@ for (it = vc.loadedVehBegin(); it != end; ++it) { const MSVehicle* veh = dynamic_cast(it->second); assert(veh != 0); - if (veh->isOnRoad()) { + if (veh->isOnRoad() && !veh->isStopped()) { const double vmax = MIN2(veh->getVehicleType().getMaxSpeed(), veh->getEdge()->getSpeedLimit()); if (veh->getSpeed() < SUMO_const_haltingSpeed) { myWaitingTime += DELTA_T; @@ -1556,6 +1616,24 @@ myTimeLossLabel->setText(time2string(myTimeLoss).c_str()); } +void +GUIApplicationWindow::checkGamingEventsDRT() { + // update performance indicators + MSTransportableControl& pc = myRunThread->getNet().getPersonControl(); + myWaitingTime += pc.getWaitingForVehicleNumber() * DELTA_T; + myWaitingTimeLabel->setText(time2string(myWaitingTime).c_str()); + + MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); + MSVehicleControl::constVehIt end = vc.loadedVehEnd(); + for (auto it = vc.loadedVehBegin(); it != end; ++it) { + const MSVehicle* veh = dynamic_cast(it->second); + assert(veh != 0); + if (veh->isOnRoad() && !veh->isStopped()) { + myTotalDistance += SPEED2DIST(veh->getSpeed()); + } + } + myTotalDistanceLabel->setText(toString(myTotalDistance / 100).c_str()); +} void GUIApplicationWindow::loadConfigOrNet(const std::string& file, bool isNet) { @@ -1563,7 +1641,7 @@ getApp()->beginWaitCursor(); myAmLoading = true; closeAllWindows(); - gSchemeStorage.saveViewport(0, 0, -1); // recenter view + gSchemeStorage.saveViewport(0, 0, -1, 0); // recenter view myLoadThread->loadConfigOrNet(file, isNet); setStatusBarText("Loading '" + file + "'."); update(); @@ -1757,12 +1835,20 @@ void GUIApplicationWindow::sendBlockingEvent(GUIEvent* event) { myEventMutex.lock(); - myEvents.add(event); + myEvents.push_back(event); myRunThreadEvent.signal(); myEventCondition.wait(myEventMutex); myEventMutex.unlock(); } +void +GUIApplicationWindow::setBreakpoints(const std::vector& breakpoints) { + if (myRunThread != nullptr) { + myRunThread->getBreakpointLock().lock(); + myRunThread->getBreakpoints().assign(breakpoints.begin(), breakpoints.end()); + myRunThread->getBreakpointLock().unlock(); + } +} const std::vector GUIApplicationWindow::retrieveBreakpoints() const { diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIApplicationWindow.h sumo-1.2.0+dfsg1/src/gui/GUIApplicationWindow.h --- sumo-1.1.0+dfsg1/src/gui/GUIApplicationWindow.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIApplicationWindow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -132,6 +132,9 @@ /// @brief Called on menu File->Load Shapes long onCmdOpenShapes(FXObject*, FXSelector, void*); + /// @brief Called on menu File->Load EdgeData + long onCmdOpenEdgeData(FXObject*, FXSelector, void*); + /// @brief Called on reload long onCmdReload(FXObject*, FXSelector, void*); @@ -238,6 +241,9 @@ /// @brief Determines whether some buttons which require an active simulation may be shown long onUpdNeedsSimulation(FXObject*, FXSelector, void*); + /// @brief Determines whether traci is active + long onUpdTraCIStatus(FXObject*, FXSelector, void*); + /// @brief Called if the message window shall be cleared long onCmdClearMsgWindow(FXObject*, FXSelector, void*); @@ -276,6 +282,10 @@ mySimDelay = delay; } + /** @brief Sets the breakpoints of the parent application + */ + virtual void setBreakpoints(const std::vector& breakpoints); + /** @brief Sends an event from the application thread to the GUI and waits until it is handled * @param event the event to send */ @@ -301,6 +311,7 @@ /// @brief handles additional game-related events void checkGamingEvents(); + void checkGamingEventsDRT(); protected: /// FOX needs this for static members @@ -367,7 +378,7 @@ double myAlternateSimDelay; /// @brief List of got requests - MFXEventQue myEvents; + FXSynchQue myEvents; /// @brief The menu used for the MDI-windows FXMDIMenu* myMDIMenu; @@ -419,14 +430,18 @@ /// @brief A random number generator used to choose a gaming sound static std::mt19937 myGamingRNG; int myPreviousCollisionNumber; + /// @brief current game mode + bool myTLSGame; /// @brief performance indicators FXEX::FXLCDLabel* myWaitingTimeLabel; FXEX::FXLCDLabel* myTimeLossLabel; + FXEX::FXLCDLabel* myTotalDistanceLabel; SUMOTime myWaitingTime; SUMOTime myTimeLoss; - FXToolBar* myToolBar6, *myToolBar7; - FXToolBarShell* myToolBarDrag6, *myToolBarDrag7; + double myTotalDistance; + FXToolBar* myToolBar6, *myToolBar7, *myToolBar9; + FXToolBarShell* myToolBarDrag6, *myToolBarDrag7, *myToolBarDrag9; ////} }; diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIEvent_SimulationEnded.h sumo-1.2.0+dfsg1/src/gui/GUIEvent_SimulationEnded.h --- sumo-1.1.0+dfsg1/src/gui/GUIEvent_SimulationEnded.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIEvent_SimulationEnded.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIEvent_SimulationLoaded.h sumo-1.2.0+dfsg1/src/gui/GUIEvent_SimulationLoaded.h --- sumo-1.1.0+dfsg1/src/gui/GUIEvent_SimulationLoaded.h 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIEvent_SimulationLoaded.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIGlobals.cpp sumo-1.2.0+dfsg1/src/gui/GUIGlobals.cpp --- sumo-1.1.0+dfsg1/src/gui/GUIGlobals.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIGlobals.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIGlobals.h sumo-1.2.0+dfsg1/src/gui/GUIGlobals.h --- sumo-1.1.0+dfsg1/src/gui/GUIGlobals.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIGlobals.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/GUILoadThread.cpp sumo-1.2.0+dfsg1/src/gui/GUILoadThread.cpp --- sumo-1.1.0+dfsg1/src/gui/GUILoadThread.cpp 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUILoadThread.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -65,7 +65,7 @@ // member method definitions // =========================================================================== GUILoadThread::GUILoadThread(FXApp* app, GUIApplicationWindow* mw, - MFXEventQue& eq, FXEX::FXThreadEvent& ev) + FXSynchQue& eq, FXEX::FXThreadEvent& ev) : FXSingleEventThread(app, mw), myParent(mw), myEventQue(eq), myEventThrow(ev) { myErrorRetriever = new MsgRetrievingFunction(this, &GUILoadThread::retrieveMessage, MsgHandler::MT_ERROR); @@ -112,7 +112,7 @@ myFile = oc.getString("net-file"); myLoadNet = true; } - myEventQue.add(new GUIEvent_Message("Loading '" + myFile + "'.")); + myEventQue.push_back(new GUIEvent_Message("Loading '" + myFile + "'.")); myEventThrow.signal(); myParent->addRecentFile(FXPath::absolute(myFile.c_str()), myLoadNet); } @@ -148,9 +148,7 @@ } // initialise global settings - RandHelper::initRandGlobal(); - RandHelper::initRandGlobal(MSRouteHandler::getParsingRNG()); - RandHelper::initRandGlobal(MSDevice::getEquipmentRNG()); + NLBuilder::initRandomness(); MSFrame::setMSGlobals(oc); GUITexturesHelper::allowTextures(!oc.getBool("disable-textures")); @@ -176,8 +174,8 @@ new GUIEventControl()); // 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; + execs[libsumo::CMD_GET_GUI_VARIABLE] = &TraCIServerAPI_GUI::processGet; + execs[libsumo::CMD_SET_GUI_VARIABLE] = &TraCIServerAPI_GUI::processSet; TraCIServer::openSocket(execs); eb = new GUIEdgeControlBuilder(); @@ -200,6 +198,15 @@ #ifdef HAVE_OSG osgView = oc.getBool("osg-view"); #endif + if (oc.isSet("edgedata-files")) { + if (!oc.isUsableFileList("edgedata-files")) { + WRITE_ERROR("Could not load edgedata-files '" + oc.getString("edgedata-files") + "'"); + } else { + for (const std::string& file : oc.getStringVector("edgedata-files")) { + net->loadEdgeData(file); + } + } + } } } catch (ProcessError& e) { if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { @@ -220,7 +227,7 @@ } delete eb; submitEndAndCleanup(net, simStartTime, simEndTime, guiSettingsFiles, osgView, - oc.getBool("registry-viewport")); + oc.getBool("registry-viewport")); return 0; } @@ -238,7 +245,7 @@ MsgHandler::getMessageInstance()->removeRetriever(myMessageRetriever); // inform parent about the process GUIEvent* e = new GUIEvent_SimulationLoaded(net, simStartTime, simEndTime, myTitle, guiSettingsFiles, osgView, viewportFromRegistry); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); } @@ -257,7 +264,7 @@ void GUILoadThread::retrieveMessage(const MsgHandler::MsgType type, const std::string& msg) { GUIEvent* e = new GUIEvent_Message(type, msg); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); } diff -Nru sumo-1.1.0+dfsg1/src/gui/GUILoadThread.h sumo-1.2.0+dfsg1/src/gui/GUILoadThread.h --- sumo-1.1.0+dfsg1/src/gui/GUILoadThread.h 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUILoadThread.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ #include #include #include -#include +#include // =========================================================================== @@ -50,7 +50,7 @@ class GUILoadThread : public FXSingleEventThread { public: /// constructor - GUILoadThread(FXApp* app, GUIApplicationWindow* mw, MFXEventQue& eq, + GUILoadThread(FXApp* app, GUIApplicationWindow* mw, FXSynchQue& eq, FXEX::FXThreadEvent& ev); /// destructor @@ -93,7 +93,7 @@ Needed to be deleted from the handler later on */ OutputDevice* myErrorRetriever, *myMessageRetriever, *myWarningRetriever; - MFXEventQue& myEventQue; + FXSynchQue& myEventQue; FXEX::FXThreadEvent& myEventThrow; diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIManipulator.cpp sumo-1.2.0+dfsg1/src/gui/GUIManipulator.cpp --- sumo-1.1.0+dfsg1/src/gui/GUIManipulator.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIManipulator.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIManipulator.h sumo-1.2.0+dfsg1/src/gui/GUIManipulator.h --- sumo-1.1.0+dfsg1/src/gui/GUIManipulator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIManipulator.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIRunThread.cpp sumo-1.2.0+dfsg1/src/gui/GUIRunThread.cpp --- sumo-1.1.0+dfsg1/src/gui/GUIRunThread.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIRunThread.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -51,7 +51,7 @@ // member method definitions // =========================================================================== GUIRunThread::GUIRunThread(FXApp* app, MFXInterThreadEventClient* parent, - double& simDelay, MFXEventQue& eq, + double& simDelay, FXSynchQue& eq, FXEX::FXThreadEvent& ev) : FXSingleEventThread(app, parent), myNet(nullptr), myHalting(true), myQuit(false), mySimulationInProgress(false), myOk(true), myHaveSignaledEnd(false), @@ -128,7 +128,7 @@ } // check whether we shall stop at this step myBreakpointLock.lock(); - const bool haltAfter = find(myBreakpoints.begin(), myBreakpoints.end(), myNet->getCurrentTimeStep()) != myBreakpoints.end(); + const bool haltAfter = std::find(myBreakpoints.begin(), myBreakpoints.end(), myNet->getCurrentTimeStep()) != myBreakpoints.end(); myBreakpointLock.unlock(); // do the step makeStep(); @@ -170,7 +170,7 @@ // inform parent that a step has been performed e = new GUIEvent_SimulationStep(); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); e = nullptr; @@ -203,7 +203,7 @@ break; } if (e != nullptr) { - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); myHalting = true; } @@ -222,7 +222,7 @@ mySimulationLock.unlock(); mySimulationInProgress = false; e = new GUIEvent_SimulationEnded(MSNet::SIMSTATE_ERROR_IN_SIM, myNet->getCurrentTimeStep()); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); myHalting = true; myOk = false; @@ -232,7 +232,7 @@ mySimulationLock.unlock(); mySimulationInProgress = false; e = new GUIEvent_SimulationEnded(MSNet::SIMSTATE_ERROR_IN_SIM, myNet->getCurrentTimeStep()); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); myHalting = true; myOk = false; @@ -314,7 +314,7 @@ void GUIRunThread::retrieveMessage(const MsgHandler::MsgType type, const std::string& msg) { GUIEvent* e = new GUIEvent_Message(type, msg); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); } diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIRunThread.h sumo-1.2.0+dfsg1/src/gui/GUIRunThread.h --- sumo-1.1.0+dfsg1/src/gui/GUIRunThread.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIRunThread.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,8 +32,7 @@ #include #include #include -#include -#include +#include #include @@ -59,7 +58,7 @@ public: /// constructor GUIRunThread(FXApp* app, MFXInterThreadEventClient* mw, - double& simDelay, MFXEventQue& eq, FXEX::FXThreadEvent& ev); + double& simDelay, FXSynchQue& eq, FXEX::FXThreadEvent& ev); /// destructor virtual ~GUIRunThread(); @@ -153,11 +152,11 @@ double& mySimDelay; - MFXEventQue& myEventQue; + FXSynchQue& myEventQue; FXEX::FXThreadEvent& myEventThrow; - MFXMutex mySimulationLock; + FXMutex mySimulationLock; /// @brief List of breakpoints std::vector myBreakpoints; diff -Nru sumo-1.1.0+dfsg1/src/gui/GUISUMOViewParent.cpp sumo-1.2.0+dfsg1/src/gui/GUISUMOViewParent.cpp --- sumo-1.1.0+dfsg1/src/gui/GUISUMOViewParent.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUISUMOViewParent.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -93,8 +93,8 @@ const FXString& name, GUIMainWindow* parentWindow, FXIcon* ic, FXuint opts, - FXint x, FXint y, FXint w, FXint h) - : GUIGlChildWindow(p, parentWindow, mdimenu, name, ic, opts, x, y, w, h) { + FXint x, FXint y, FXint w, FXint h) : + GUIGlChildWindow(p, parentWindow, mdimenu, name, nullptr, ic, opts, x, y, w, h) { myParent->addGLChild(this); } @@ -114,7 +114,7 @@ } myView->buildViewToolBars(*this); if (myParent->isGaming()) { - myNavigationToolBar->hide(); + myStaticNavigationToolBar->hide(); } return myView; } @@ -128,9 +128,9 @@ void GUISUMOViewParent::setToolBarVisibility(const bool value) { if (value) { - myNavigationToolBar->show(); + myStaticNavigationToolBar->show(); } else { - myNavigationToolBar->hide(); + myStaticNavigationToolBar->hide(); } } diff -Nru sumo-1.1.0+dfsg1/src/gui/GUISUMOViewParent.h sumo-1.2.0+dfsg1/src/gui/GUISUMOViewParent.h --- sumo-1.1.0+dfsg1/src/gui/GUISUMOViewParent.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUISUMOViewParent.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.cpp sumo-1.2.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.cpp --- sumo-1.1.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -150,7 +150,7 @@ 20, 20, 300, 200), myApplication(&app), myTLLogic(&logic), myAmInTrackingMode(true) { // build the toolbar - myToolBarDrag = new FXToolBarShell(this, GUIDesignToolBarShell3); + myToolBarDrag = new FXToolBarShell(this, GUIDesignToolBar); myToolBar = new FXToolBar(this, myToolBarDrag, LAYOUT_SIDE_TOP | LAYOUT_FILL_X | FRAME_RAISED); new FXToolBarGrip(myToolBar, myToolBar, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); // interval manipulation diff -Nru sumo-1.1.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.h sumo-1.2.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.h --- sumo-1.1.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUITLLogicPhasesTrackerWindow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,7 +52,6 @@ class GUIMainWindow; class MSTrafficLightLogic; class GUITrafficLightLogicWrapper; -class MFXMutex; // =========================================================================== @@ -201,7 +200,7 @@ GUITLLogicPhasesTrackerPanel* myPanel; /// @brief A lock to avoid addition of new values while drawing - MFXMutex myLock; + FXMutex myLock; /** @brief The names of links * @@ -250,4 +249,3 @@ #endif /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIViewTraffic.cpp sumo-1.2.0+dfsg1/src/gui/GUIViewTraffic.cpp --- sumo-1.1.0+dfsg1/src/gui/GUIViewTraffic.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIViewTraffic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -59,6 +59,7 @@ #include #include #include +#include #include /* ------------------------------------------------------------------------- @@ -84,7 +85,8 @@ GUINet& net, FXGLVisual* glVis, FXGLCanvas* share) : GUISUMOAbstractView(p, app, parent, net.getVisualisationSpeedUp(), glVis, share), - myTrackedID(GUIGlObject::INVALID_ID) + myTrackedID(GUIGlObject::INVALID_ID), + myTLSGame(OptionsCont::getOptions().getString("game.mode") == "tls") #ifdef HAVE_FFMPEG , myCurrentVideo(nullptr) #endif @@ -102,12 +104,12 @@ { const std::vector& names = gSchemeStorage.getNames(); for (std::vector::const_iterator i = names.begin(); i != names.end(); ++i) { - v.getColoringSchemesCombo().appendItem((*i).c_str()); + v.getColoringSchemesCombo()->appendItem(i->c_str()); if ((*i) == myVisualizationSettings->name) { - v.getColoringSchemesCombo().setCurrentItem(v.getColoringSchemesCombo().getNumItems() - 1); + v.getColoringSchemesCombo()->setCurrentItem(v.getColoringSchemesCombo()->getNumItems() - 1); } } - v.getColoringSchemesCombo().setNumVisible(MAX2(5, (int)names.size() + 1)); + v.getColoringSchemesCombo()->setNumVisible(MAX2(5, (int)names.size() + 1)); } // for junctions new FXButton(v.getLocatorPopup(), @@ -230,6 +232,35 @@ } +std::vector +GUIViewTraffic::getEdgeDataAttrs() const { + if (GUINet::getGUIInstance() != nullptr) { + return GUINet::getGUIInstance()->getEdgeDataAttrs(); + } + return std::vector(); +} + + +std::vector +GUIViewTraffic::getEdgeLaneParamKeys(bool edgeKeys) const { + std::set keys; + for (const MSEdge* e : MSEdge::getAllEdges()) { + if (edgeKeys) { + for (const auto& item : e->getParametersMap()) { + keys.insert(item.first); + } + } else { + for (const auto lane : e->getLanes()) { + for (const auto& item : lane->getParametersMap()) { + keys.insert(item.first); + } + } + } + } + return std::vector(keys.begin(), keys.end()); +} + + int GUIViewTraffic::doPaintGL(int mode, const Boundary& bound) { // (uncomment the next line to check select mode) @@ -304,46 +335,115 @@ void GUIViewTraffic::onGamingClick(Position pos) { - MSTLLogicControl& tlsControl = MSNet::getInstance()->getTLSControl(); - const std::vector& logics = tlsControl.getAllLogics(); - MSTrafficLightLogic* minTll = nullptr; - double minDist = std::numeric_limits::infinity(); - for (std::vector::const_iterator i = logics.begin(); i != logics.end(); ++i) { - // get the logic - MSTrafficLightLogic* tll = (*i); - if (tlsControl.isActive(tll)) { - // get the links - const MSTrafficLightLogic::LaneVector& lanes = tll->getLanesAt(0); - if (lanes.size() > 0) { - const Position& endPos = lanes[0]->getShape().back(); - if (endPos.distanceTo(pos) < minDist) { - minDist = endPos.distanceTo(pos); - minTll = tll; + if (myTLSGame) { + MSTLLogicControl& tlsControl = MSNet::getInstance()->getTLSControl(); + const std::vector& logics = tlsControl.getAllLogics(); + MSTrafficLightLogic* minTll = nullptr; + double minDist = std::numeric_limits::infinity(); + for (std::vector::const_iterator i = logics.begin(); i != logics.end(); ++i) { + // get the logic + MSTrafficLightLogic* tll = (*i); + if (tlsControl.isActive(tll) && tll->getProgramID() != "off") { + // get the links + const MSTrafficLightLogic::LaneVector& lanes = tll->getLanesAt(0); + if (lanes.size() > 0) { + const Position& endPos = lanes[0]->getShape().back(); + if (endPos.distanceTo(pos) < minDist) { + minDist = endPos.distanceTo(pos); + minTll = tll; + } } } } - } - if (minTll != nullptr) { - const MSTLLogicControl::TLSLogicVariants& vars = tlsControl.get(minTll->getID()); - const std::vector logics = vars.getAllLogics(); - if (logics.size() > 1) { - MSSimpleTrafficLightLogic* l = (MSSimpleTrafficLightLogic*) logics[0]; - for (int i = 0; i < (int)logics.size() - 1; ++i) { - if (minTll->getProgramID() == logics[i]->getProgramID()) { - l = (MSSimpleTrafficLightLogic*) logics[i + 1]; + if (minTll != nullptr) { + const MSTLLogicControl::TLSLogicVariants& vars = tlsControl.get(minTll->getID()); + const std::vector logics = vars.getAllLogics(); + if (logics.size() > 1) { + MSSimpleTrafficLightLogic* l = (MSSimpleTrafficLightLogic*) logics[0]; + for (int i = 0; i < (int)logics.size() - 1; ++i) { + if (minTll->getProgramID() == logics[i]->getProgramID()) { + l = (MSSimpleTrafficLightLogic*) logics[i + 1]; + tlsControl.switchTo(minTll->getID(), l->getProgramID()); + } + } + if (l == logics[0]) { tlsControl.switchTo(minTll->getID(), l->getProgramID()); } + l->changeStepAndDuration(tlsControl, MSNet::getInstance()->getCurrentTimeStep(), 0, l->getPhase(0).duration); + update(); } - if (l == logics[0]) { - tlsControl.switchTo(minTll->getID(), l->getProgramID()); + } + } else { + // DRT game + if (MSGlobals::gUseMesoSim) { + return; + } + const std::set& sel = gSelected.getSelected(GLO_VEHICLE); + if (sel.size() == 0) { + // find closest pt vehicle + double minDist = std::numeric_limits::infinity(); + GUIVehicle* closest = nullptr; + MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); + MSVehicleControl::constVehIt it = vc.loadedVehBegin(); + MSVehicleControl::constVehIt end = vc.loadedVehEnd(); + for (it = vc.loadedVehBegin(); it != end; ++it) { + GUIVehicle* veh = dynamic_cast(it->second); + assert(veh != 0); + if (veh->getParameter().line != "") { + const double dist = veh->getPosition().distanceTo2D(pos); + if (dist < minDist) { + minDist = dist; + closest = veh; + } + } + } + if (closest != nullptr) { + gSelected.select(closest->getGlID()); + closest->addActiveAddVisualisation(this, GUIBaseVehicle::VO_SHOW_FUTURE_ROUTE); + } + } else { + // find closest pt stop + double minDist = std::numeric_limits::infinity(); + MSStoppingPlace* closestStop = nullptr; + const NamedObjectCont& stops = MSNet::getInstance()->getStoppingPlaces(SUMO_TAG_BUS_STOP); + for (auto it = stops.begin(); it != stops.end(); ++it) { + MSStoppingPlace* stop = it->second; + const double dist = pos.distanceTo2D(stop->getLane().geometryPositionAtOffset(stop->getEndLanePosition())); + if (dist < minDist) { + minDist = dist; + closestStop = stop; + } + } + if (closestStop != 0) { + GUIGlID id = *sel.begin(); + GUIVehicle* veh = dynamic_cast(GUIGlObjectStorage::gIDStorage.getObjectBlocking(id)); + assert(veh != 0); + MSLane* lane = veh->getLane(); + lane->getVehiclesSecure(); + veh->rerouteDRTStop(closestStop); + GUIGlObjectStorage::gIDStorage.unblockObject(id); + lane->releaseVehicles(); } - l->changeStepAndDuration(tlsControl, MSNet::getInstance()->getCurrentTimeStep(), 0, l->getPhase(0).duration); - update(); } } } +void +GUIViewTraffic::onGamingRightClick(Position /*pos*/) { + const std::set& sel = gSelected.getSelected(GLO_VEHICLE); + if (sel.size() > 0) { + GUIGlID id = *sel.begin(); + GUIVehicle* veh = dynamic_cast(GUIGlObjectStorage::gIDStorage.getObjectBlocking(id)); + if (veh != 0) { + veh->removeActiveAddVisualisation(this, GUIBaseVehicle::VO_SHOW_FUTURE_ROUTE); + } + GUIGlObjectStorage::gIDStorage.unblockObject(id); + } + gSelected.clear(); +} + + SUMOTime GUIViewTraffic::getCurrentTimeStep() const { return MSNet::getInstance()->getCurrentTimeStep(); diff -Nru sumo-1.1.0+dfsg1/src/gui/GUIViewTraffic.h sumo-1.2.0+dfsg1/src/gui/GUIViewTraffic.h --- sumo-1.1.0+dfsg1/src/gui/GUIViewTraffic.h 2018-11-07 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/GUIViewTraffic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -84,11 +84,18 @@ bool setColorScheme(const std::string& name); - ///@brief recalibrate color scheme according to the current value range + /// @brief recalibrate color scheme according to the current value range void buildColorRainbow(const GUIVisualizationSettings& s, GUIColorScheme& scheme, int active, GUIGlObjectType objectType); + /// @brief return list of loaded edgeData attributes + std::vector getEdgeDataAttrs() const; + + /// @brief return list of available edge parameters + std::vector getEdgeLaneParamKeys(bool edgeKeys) const; + /// @brief handle mouse click in gaming mode void onGamingClick(Position pos); + void onGamingRightClick(Position pos); /// @brief get the current simulation time SUMOTime getCurrentTimeStep() const; @@ -123,6 +130,9 @@ private: GUIGlID myTrackedID; + /// @brief whether game mode was set to 'tls' + bool myTLSGame; + #ifdef HAVE_FFMPEG GUIVideoEncoder* myCurrentVideo; #endif diff -Nru sumo-1.1.0+dfsg1/src/gui/Makefile.in sumo-1.2.0+dfsg1/src/gui/Makefile.in --- sumo-1.1.0+dfsg1/src/gui/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,769 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - GUIGlobals.$(OBJEXT) GUIManipulator.$(OBJEXT) \ - GUILoadThread.$(OBJEXT) GUIRunThread.$(OBJEXT) \ - GUISUMOViewParent.$(OBJEXT) \ - 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) -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 = $(libgui_a_SOURCES) -DIST_SOURCES = $(libgui_a_SOURCES) -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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libgui.a -libgui_a_SOURCES = GUIApplicationWindow.cpp GUIApplicationWindow.h \ -GUIEvent_SimulationEnded.h GUIEvent_SimulationLoaded.h \ -GUIGlobals.cpp GUIGlobals.h \ -GUIManipulator.h GUIManipulator.cpp \ -GUILoadThread.cpp GUILoadThread.h \ -GUIRunThread.cpp GUIRunThread.h \ -GUISUMOViewParent.cpp GUISUMOViewParent.h \ -GUITLLogicPhasesTrackerWindow.cpp GUITLLogicPhasesTrackerWindow.h \ -GUIViewTraffic.cpp GUIViewTraffic.h \ -TraCIServerAPI_GUI.cpp TraCIServerAPI_GUI.h - -SUBDIRS = dialogs -all: all-recursive - -.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) --foreign src/gui/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/gui/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIApplicationWindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIGlobals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUILoadThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIManipulator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIRunThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUISUMOViewParent.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITLLogicPhasesTrackerWindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIViewTraffic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_GUI.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 - -# 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LIBRARIES) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 \ - 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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/gui/TraCIServerAPI_GUI.cpp sumo-1.2.0+dfsg1/src/gui/TraCIServerAPI_GUI.cpp --- sumo-1.1.0+dfsg1/src/gui/TraCIServerAPI_GUI.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/TraCIServerAPI_GUI.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,42 +47,43 @@ int variable = inputStorage.readUnsignedByte(); std::string id = inputStorage.readString(); // check variable - if (variable != TRACI_ID_LIST && variable != VAR_VIEW_ZOOM && variable != VAR_VIEW_OFFSET - && variable != VAR_VIEW_SCHEMA && variable != VAR_VIEW_BOUNDARY && variable != VAR_HAS_VIEW) { - return server.writeErrorStatusCmd(CMD_GET_GUI_VARIABLE, "Get GUI Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + if (variable != libsumo::TRACI_ID_LIST && variable != libsumo::VAR_VIEW_ZOOM && variable != libsumo::VAR_VIEW_OFFSET + && variable != libsumo::VAR_VIEW_SCHEMA && variable != libsumo::VAR_VIEW_BOUNDARY && variable != libsumo::VAR_HAS_VIEW + && variable != libsumo::VAR_TRACK_VEHICLE) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_GUI_VARIABLE, "Get GUI Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // begin response building tcpip::Storage tempMsg; // response-code, variableID, objectID - tempMsg.writeUnsignedByte(RESPONSE_GET_GUI_VARIABLE); + tempMsg.writeUnsignedByte(libsumo::RESPONSE_GET_GUI_VARIABLE); tempMsg.writeUnsignedByte(variable); tempMsg.writeString(id); // process request - if (variable == TRACI_ID_LIST) { + if (variable == libsumo::TRACI_ID_LIST) { std::vector ids = GUIMainWindow::getInstance()->getViewIDs(); - tempMsg.writeUnsignedByte(TYPE_STRINGLIST); + tempMsg.writeUnsignedByte(libsumo::TYPE_STRINGLIST); tempMsg.writeStringList(ids); } else { GUISUMOAbstractView* v = getNamedView(id); - if (v == nullptr && variable != VAR_HAS_VIEW) { - return server.writeErrorStatusCmd(CMD_GET_GUI_VARIABLE, "View '" + id + "' is not known", outputStorage); + if (v == nullptr && variable != libsumo::VAR_HAS_VIEW) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_GUI_VARIABLE, "View '" + id + "' is not known", outputStorage); } switch (variable) { - case VAR_VIEW_ZOOM: - tempMsg.writeUnsignedByte(TYPE_DOUBLE); + case libsumo::VAR_VIEW_ZOOM: + tempMsg.writeUnsignedByte(libsumo::TYPE_DOUBLE); tempMsg.writeDouble(v->getChanger().getZoom()); break; - case VAR_VIEW_OFFSET: - tempMsg.writeUnsignedByte(POSITION_2D); + case libsumo::VAR_VIEW_OFFSET: + tempMsg.writeUnsignedByte(libsumo::POSITION_2D); tempMsg.writeDouble(v->getChanger().getXPos()); tempMsg.writeDouble(v->getChanger().getYPos()); break; - case VAR_VIEW_SCHEMA: - tempMsg.writeUnsignedByte(TYPE_STRING); + case libsumo::VAR_VIEW_SCHEMA: + tempMsg.writeUnsignedByte(libsumo::TYPE_STRING); tempMsg.writeString(v->getVisualisationSettings()->name); break; - case VAR_VIEW_BOUNDARY: { - tempMsg.writeUnsignedByte(TYPE_POLYGON); + case libsumo::VAR_VIEW_BOUNDARY: { + tempMsg.writeUnsignedByte(libsumo::TYPE_POLYGON); Boundary b = v->getVisibleBoundary(); tempMsg.writeByte(2); tempMsg.writeDouble(b.xmin()); @@ -91,15 +92,35 @@ tempMsg.writeDouble(b.ymax()); break; } - case VAR_HAS_VIEW: - tempMsg.writeUnsignedByte(TYPE_INTEGER); + case libsumo::VAR_HAS_VIEW: { + tempMsg.writeUnsignedByte(libsumo::TYPE_INTEGER); tempMsg.writeInt(v != nullptr ? 1 : 0); break; + } + case libsumo::VAR_TRACK_VEHICLE: { + GUIVehicle* gv = 0; + std::string id; + GUIGlID gid = v->getTrackedID(); + if (gid != GUIGlObject::INVALID_ID) { + gv = static_cast(GUIGlObjectStorage::gIDStorage.getObjectBlocking(gid)); + } + if (gv == 0) { + id = ""; + } else { + id = gv->getID(); + } + tempMsg.writeUnsignedByte(libsumo::TYPE_STRING); + tempMsg.writeString(id); + if (gid != GUIGlObject::INVALID_ID) { + GUIGlObjectStorage::gIDStorage.unblockObject(gid); + } + break; + } default: break; } } - server.writeStatusCmd(CMD_GET_GUI_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_GUI_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, tempMsg); return true; } @@ -111,34 +132,35 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != VAR_VIEW_ZOOM && variable != VAR_VIEW_OFFSET && variable != VAR_VIEW_SCHEMA && variable != VAR_VIEW_BOUNDARY - && variable != VAR_SCREENSHOT && variable != VAR_TRACK_VEHICLE + if (variable != libsumo::VAR_VIEW_ZOOM && variable != libsumo::VAR_VIEW_OFFSET + && variable != libsumo::VAR_VIEW_SCHEMA && variable != libsumo::VAR_VIEW_BOUNDARY + && variable != libsumo::VAR_SCREENSHOT && variable != libsumo::VAR_TRACK_VEHICLE ) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "Change GUI State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "Change GUI State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // id std::string id = inputStorage.readString(); GUISUMOAbstractView* v = getNamedView(id); if (v == nullptr) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "View '" + id + "' is not known", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "View '" + id + "' is not known", outputStorage); } // process switch (variable) { - case VAR_VIEW_ZOOM: { + case libsumo::VAR_VIEW_ZOOM: { Position off, p; double zoom = 1; if (!server.readTypeCheckingDouble(inputStorage, zoom)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The zoom must be given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The zoom must be given as a double.", outputStorage); } off.set(v->getChanger().getXPos(), v->getChanger().getYPos(), v->getChanger().zoom2ZPos(zoom)); p.set(off.x(), off.y(), 0); v->setViewportFromToRot(off, p, v->getChanger().getRotation()); } break; - case VAR_VIEW_OFFSET: { + case libsumo::VAR_VIEW_OFFSET: { libsumo::TraCIPosition tp; if (!server.readTypeCheckingPosition2D(inputStorage, tp)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The view port must be given as a position.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The view port must be given as a position.", outputStorage); } Position off, p; @@ -147,58 +169,58 @@ v->setViewportFromToRot(off, p, v->getChanger().getRotation()); } break; - case VAR_VIEW_SCHEMA: { + case libsumo::VAR_VIEW_SCHEMA: { std::string schema; if (!server.readTypeCheckingString(inputStorage, schema)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The scheme must be specified by a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The scheme must be specified by a string.", outputStorage); } if (!v->setColorScheme(schema)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The scheme is not known.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The scheme is not known.", outputStorage); } } break; - case VAR_VIEW_BOUNDARY: { + case libsumo::VAR_VIEW_BOUNDARY: { PositionVector p; if (!server.readTypeCheckingPolygon(inputStorage, p)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The boundary must be specified by a bounding box.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The boundary must be specified by a bounding box.", outputStorage); } v->centerTo(Boundary(p[0].x(), p[0].y(), p[1].x(), p[1].y())); break; } - case VAR_SCREENSHOT: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "Screenshot requires a compound object.", outputStorage); + case libsumo::VAR_SCREENSHOT: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "Screenshot requires a compound object.", outputStorage); } int parameterCount = inputStorage.readInt(); if (parameterCount != 3) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "Screenshot requires three values as parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "Screenshot requires three values as parameter.", outputStorage); } std::string filename; if (!server.readTypeCheckingString(inputStorage, filename)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The first variable must be a file name.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The first variable must be a file name.", outputStorage); } int width = 0, height = 0; if (!server.readTypeCheckingInt(inputStorage, width)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The second variable must be the width given as int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The second variable must be the width given as int.", outputStorage); } if (!server.readTypeCheckingInt(inputStorage, height)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "The third variable must be the height given as int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "The third variable must be the height given as int.", outputStorage); } // take screenshot after the current step is finished (showing the same state as sumo-gui and netstate-output) v->addSnapshot(MSNet::getInstance()->getCurrentTimeStep(), filename, width, height); } break; - case VAR_TRACK_VEHICLE: { + case libsumo::VAR_TRACK_VEHICLE: { std::string id; if (!server.readTypeCheckingString(inputStorage, id)) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "Tracking requires a string vehicle ID.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "Tracking requires a string vehicle ID.", outputStorage); } if (id == "") { v->stopTrack(); } else { SUMOVehicle* veh = MSNet::getInstance()->getVehicleControl().getVehicle(id); if (veh == nullptr) { - return server.writeErrorStatusCmd(CMD_SET_GUI_VARIABLE, "Could not find vehicle '" + id + "'.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, "Could not find vehicle '" + id + "'.", outputStorage); } if (v->getTrackedID() != static_cast(veh)->getGlID()) { v->startTrack(static_cast(veh)->getGlID()); @@ -208,7 +230,7 @@ default: break; } - server.writeStatusCmd(CMD_SET_GUI_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_GUI_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/gui/TraCIServerAPI_GUI.h sumo-1.2.0+dfsg1/src/gui/TraCIServerAPI_GUI.h --- sumo-1.1.0+dfsg1/src/gui/TraCIServerAPI_GUI.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/gui/TraCIServerAPI_GUI.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guinetload/GUIDetectorBuilder.cpp sumo-1.2.0+dfsg1/src/guinetload/GUIDetectorBuilder.cpp --- sumo-1.1.0+dfsg1/src/guinetload/GUIDetectorBuilder.cpp 2018-06-01 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guinetload/GUIDetectorBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guinetload/GUIDetectorBuilder.h sumo-1.2.0+dfsg1/src/guinetload/GUIDetectorBuilder.h --- sumo-1.1.0+dfsg1/src/guinetload/GUIDetectorBuilder.h 2018-06-01 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guinetload/GUIDetectorBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.cpp sumo-1.2.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.cpp --- sumo-1.1.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.h sumo-1.2.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.h --- sumo-1.1.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guinetload/GUIEdgeControlBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guinetload/GUITriggerBuilder.cpp sumo-1.2.0+dfsg1/src/guinetload/GUITriggerBuilder.cpp --- sumo-1.1.0+dfsg1/src/guinetload/GUITriggerBuilder.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guinetload/GUITriggerBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -70,12 +70,12 @@ void GUITriggerBuilder::buildStoppingPlace(MSNet& net, std::string id, std::vector lines, MSLane* lane, - double frompos, double topos, const SumoXMLTag element, std::string name) { + double frompos, double topos, const SumoXMLTag element, std::string name, int personCapacity) { if (element == SUMO_TAG_CONTAINER_STOP) { //TODO: shall we also allow names for container stops? might make sense [GL March '17] - myCurrentStop = new GUIContainerStop(id, lines, *lane, frompos, topos); + myCurrentStop = new GUIContainerStop(id, lines, *lane, frompos, topos, name, personCapacity); } else { - myCurrentStop = new GUIBusStop(id, lines, *lane, frompos, topos, name); + myCurrentStop = new GUIBusStop(id, lines, *lane, frompos, topos, name, personCapacity); } if (!net.addStoppingPlace(element, myCurrentStop)) { delete myCurrentStop; diff -Nru sumo-1.1.0+dfsg1/src/guinetload/GUITriggerBuilder.h sumo-1.2.0+dfsg1/src/guinetload/GUITriggerBuilder.h --- sumo-1.1.0+dfsg1/src/guinetload/GUITriggerBuilder.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guinetload/GUITriggerBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -111,7 +111,7 @@ * @exception InvalidArgument If the stop can not be added to the net (is duplicate) */ virtual void buildStoppingPlace(MSNet& net, std::string id, std::vector lines, MSLane* lane, - double frompos, double topos, const SumoXMLTag element, std::string string); + double frompos, double topos, const SumoXMLTag element, std::string string, int personCapacity); /** @brief Builds a parking area diff -Nru sumo-1.1.0+dfsg1/src/guinetload/Makefile.in sumo-1.2.0+dfsg1/src/guinetload/Makefile.in --- sumo-1.1.0+dfsg1/src/guinetload/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guinetload/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,635 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/guinetload -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguinetload.a -libguinetload_a_SOURCES = GUIDetectorBuilder.cpp GUIDetectorBuilder.h \ -GUIEdgeControlBuilder.cpp GUIEdgeControlBuilder.h \ -GUITriggerBuilder.cpp GUITriggerBuilder.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) --foreign src/guinetload/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/guinetload/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDetectorBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIEdgeControlBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITriggerBuilder.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/guisim/GUIBaseVehicle.cpp sumo-1.2.0+dfsg1/src/guisim/GUIBaseVehicle.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIBaseVehicle.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIBaseVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,7 @@ #include #include #include + #include "GUIBaseVehicle.h" #include "GUIPerson.h" #include "GUIContainer.h" @@ -67,6 +69,8 @@ FXMAPFUNC(SEL_COMMAND, MID_HIDE_ALLROUTES, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideAllRoutes), FXMAPFUNC(SEL_COMMAND, MID_SHOW_CURRENTROUTE, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowCurrentRoute), FXMAPFUNC(SEL_COMMAND, MID_HIDE_CURRENTROUTE, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideCurrentRoute), + FXMAPFUNC(SEL_COMMAND, MID_SHOW_FUTUREROUTE, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFutureRoute), + FXMAPFUNC(SEL_COMMAND, MID_HIDE_FUTUREROUTE, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideFutureRoute), FXMAPFUNC(SEL_COMMAND, MID_SHOW_BEST_LANES, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes), FXMAPFUNC(SEL_COMMAND, MID_HIDE_BEST_LANES, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideBestLanes), FXMAPFUNC(SEL_COMMAND, MID_START_TRACK, GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack), @@ -79,67 +83,6 @@ // Object implementation FXIMPLEMENT(GUIBaseVehicle::GUIBaseVehiclePopupMenu, GUIGLObjectPopupMenu, GUIBaseVehiclePopupMenuMap, ARRAYNUMBER(GUIBaseVehiclePopupMenuMap)) - - -// =========================================================================== -// data definitions -// =========================================================================== -/* ------------------------------------------------------------------------- - * drawed shapes - * ----------------------------------------------------------------------- */ -double vehiclePoly_PassengerCarBody[] = { .5, 0, 0, 0, 0, .3, 0.08, .44, 0.25, .5, 0.95, .5, 1., .4, 1., -.4, 0.95, -.5, 0.25, -.5, 0.08, -.44, 0, -.3, 0, 0, -10000 }; -double vehiclePoly_PassengerCarBodyFront[] = { 0.1, 0, 0.025, 0, 0.025, 0.25, 0.27, 0.4, 0.27, -.4, 0.025, -0.25, 0.025, 0, -10000 }; -double vehiclePoly_PassengerFrontGlass[] = { 0.35, 0, 0.3, 0, 0.3, 0.4, 0.43, 0.3, 0.43, -0.3, 0.3, -0.4, 0.3, 0, -10000 }; -double vehiclePoly_PassengerSedanRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.77, -.47, 0.67, -.37, 0.45, -.37, 0.34, -.47, -10000 }; -double vehiclePoly_PassengerSedanLeftGlass[] = { 0.36, .43, 0.34, .47, 0.77, .47, 0.67, .37, 0.45, .37, 0.34, .47, -10000 }; -double vehiclePoly_PassengerSedanBackGlass[] = { 0.80, 0, 0.70, 0, 0.70, 0.3, 0.83, 0.4, 0.83, -.4, 0.70, -.3, 0.70, 0, -10000 }; -double vehiclePoly_PassengerHatchbackRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.80, -.37, 0.45, -.37, 0.34, -.47, -10000 }; -double vehiclePoly_PassengerHatchbackLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.80, .37, 0.45, .37, 0.34, .47, -10000 }; -double vehiclePoly_PassengerHatchbackBackGlass[] = { 0.92, 0, 0.80, 0, 0.80, 0.3, 0.95, 0.4, 0.95, -.4, 0.80, -.3, 0.80, 0, -10000 }; -double vehiclePoly_PassengerWagonRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.87, -.37, 0.45, -.37, 0.34, -.47, -10000 }; -double vehiclePoly_PassengerWagonLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.87, .37, 0.45, .37, 0.34, .47, -10000 }; -double vehiclePoly_PassengerWagonBackGlass[] = { 0.92, 0, 0.90, 0, 0.90, 0.3, 0.95, 0.4, 0.95, -.4, 0.90, -.3, 0.90, 0, -10000 }; - -double vehiclePoly_PassengerVanBody[] = { .5, 0, 0, 0, 0, .4, 0.1, .5, 0.97, .5, 1., .47, 1., -.47, 0.97, -.5, 0.1, -.5, 0, -.4, 0, 0, -10000 }; -double vehiclePoly_PassengerVanBodyFront[] = { 0.1, 0, 0.025, 0, 0.025, 0.25, 0.13, 0.4, 0.13, -.4, 0.025, -0.25, 0.025, 0, -10000 }; -double vehiclePoly_PassengerVanFrontGlass[] = { 0.21, 0, 0.16, 0, 0.16, 0.4, 0.29, 0.3, 0.29, -0.3, 0.16, -0.4, 0.16, 0, -10000 }; -double vehiclePoly_PassengerVanRightGlass[] = { 0.36, -.43, 0.20, -.47, 0.98, -.47, 0.91, -.37, 0.31, -.37, 0.20, -.47, -10000 }; -double vehiclePoly_PassengerVanLeftGlass[] = { 0.36, .43, 0.20, .47, 0.98, .47, 0.91, .37, 0.31, .37, 0.20, .47, -10000 }; -double vehiclePoly_PassengerVanBackGlass[] = { 0.95, 0, 0.94, 0, 0.94, 0.3, 0.98, 0.4, 0.98, -.4, 0.94, -.3, 0.94, 0, -10000 }; - -double vehiclePoly_DeliveryMediumRightGlass[] = { 0.21, -.43, 0.20, -.47, 0.38, -.47, 0.38, -.37, 0.31, -.37, 0.20, -.47, -10000 }; -double vehiclePoly_DeliveryMediumLeftGlass[] = { 0.21, .43, 0.20, .47, 0.38, .47, 0.38, .37, 0.31, .37, 0.20, .47, -10000 }; - -double vehiclePoly_TransportBody[] = { .5, 0, 0, 0, 0, .45, 0.05, .5, 2.25, .5, 2.25, -.5, 0.05, -.5, 0, -.45, 0, 0, -10000 }; -double vehiclePoly_TransportFrontGlass[] = { 0.1, 0, 0.05, 0, 0.05, 0.45, 0.25, 0.4, 0.25, -.4, 0.05, -0.45, 0.05, 0, -10000 }; -double vehiclePoly_TransportRightGlass[] = { 0.36, -.47, 0.10, -.48, 1.25, -.48, 1.25, -.4, 0.3, -.4, 0.10, -.48, -10000 }; -double vehiclePoly_TransportLeftGlass[] = { 0.36, .47, 0.10, .48, 1.25, .48, 1.25, .4, 0.3, .4, 0.10, .48, -10000 }; - -double vehiclePoly_EVehicleBody[] = { .5, 0, 0, 0, 0, .3, 0.08, .44, 0.25, .5, 0.75, .5, .92, .44, 1, .3, 1, -.3, .92, -.44, .75, -.5, .25, -.5, 0.08, -.44, 0, -.3, 0, 0, -1000 }; -double vehiclePoly_EVehicleFrontGlass[] = { .5, 0, 0.05, .05, 0.05, .25, 0.13, .39, 0.3, .45, 0.70, .45, .87, .39, .95, .25, .95, -.25, .87, -.39, .70, -.45, .3, -.45, 0.13, -.39, 0.05, -.25, 0.05, 0.05, -1000 }; -//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 }; - -double vehiclePoly_EmergencySign[] = { .2, .5, -.2, .5, -.2, -.5, .2, -.5, -10000 }; -double vehiclePoly_Emergency[] = { .1, .1, -.1, .1, -.1, -.1, .1, -.1, -10000 }; -double vehiclePoly_Emergency2[] = { .04, .3, -.04, .3, -.04, -.3, .04, -.3, -10000 }; - -double vehiclePoly_EmergencyLadder[] = { -.5, .3, .5, .3, .5, .2, -.5, .2, -10000 }; -double vehiclePoly_EmergencyLadder2[] = { -.5, -.3, .5, -.3, .5, -.2, -.5, -.2, -10000 }; -double vehiclePoly_EmergencyLadder3[] = { -.45, .3, -.4, .3, -.4, -.3, -.45, -.3, -10000 }; -double vehiclePoly_EmergencyLadder4[] = { .45, .3, .4, .3, .4, -.3, .45, -.3, -10000 }; -double vehiclePoly_EmergencyLadder5[] = { .05, .3, .0, .3, .0, -.3, .05, -.3, -10000 }; -double vehiclePoly_EmergencyLadder6[] = { -.25, .3, -.2, .3, -.2, -.3, -.25, -.3, -10000 }; -double vehiclePoly_EmergencyLadder7[] = { .25, .3, .2, .3, .2, -.3, .25, -.3, -10000 }; - -double vehiclePoly_Rickshaw[] = { 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 // =========================================================================== @@ -191,6 +134,23 @@ long +GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFutureRoute(FXObject*, FXSelector, void*) { + assert(myObject->getType() == GLO_VEHICLE); + if (!static_cast(myObject)->hasActiveAddVisualisation(myParent, VO_SHOW_FUTURE_ROUTE)) { + static_cast(myObject)->addActiveAddVisualisation(myParent, VO_SHOW_FUTURE_ROUTE); + } + return 1; +} + +long +GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideFutureRoute(FXObject*, FXSelector, void*) { + assert(myObject->getType() == GLO_VEHICLE); + static_cast(myObject)->removeActiveAddVisualisation(myParent, VO_SHOW_FUTURE_ROUTE); + return 1; +} + + +long GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes(FXObject*, FXSelector, void*) { assert(myObject->getType() == GLO_VEHICLE); if (!static_cast(myObject)->hasActiveAddVisualisation(myParent, VO_SHOW_BEST_LANES)) { @@ -290,6 +250,11 @@ } else { new FXMenuCommand(ret, "Show Current Route", nullptr, ret, MID_SHOW_CURRENTROUTE); } + if (hasActiveAddVisualisation(&parent, VO_SHOW_FUTURE_ROUTE)) { + new FXMenuCommand(ret, "Hide Future Route", nullptr, ret, MID_HIDE_FUTUREROUTE); + } else { + new FXMenuCommand(ret, "Show Future Route", nullptr, ret, MID_SHOW_FUTUREROUTE); + } if (hasActiveAddVisualisation(&parent, VO_SHOW_ALL_ROUTES)) { new FXMenuCommand(ret, "Hide All Routes", nullptr, ret, MID_HIDE_ALLROUTES); } else { @@ -331,546 +296,9 @@ } -void -GUIBaseVehicle::drawAction_drawVehicleAsBoxPlus() const { - glPushMatrix(); - glScaled(getVType().getWidth(), getVType().getLength(), 1.); - glBegin(GL_TRIANGLE_STRIP); - glVertex2d(0., 0.); - glVertex2d(-.5, .15); - glVertex2d(.5, .15); - glVertex2d(-.5, 1.); - glVertex2d(.5, 1.); - glEnd(); - glPopMatrix(); -} - - -void -GUIBaseVehicle::drawAction_drawVehicleAsTrianglePlus() const { - const double length = getVType().getLength(); - if (length >= 8.) { - drawAction_drawVehicleAsBoxPlus(); - return; - } - glPushMatrix(); - glScaled(getVType().getWidth(), length, 1.); - glBegin(GL_TRIANGLES); - glVertex2d(0., 0.); - glVertex2d(-.5, 1.); - glVertex2d(.5, 1.); - glEnd(); - glPopMatrix(); -} - - -void -GUIBaseVehicle::drawPoly(double* poses, double offset) { - glPushMatrix(); - glTranslated(0, 0, offset * .1); - glPolygonOffset(0, (GLfloat) - offset); - glBegin(GL_TRIANGLE_FAN); - int i = 0; - while (poses[i] > -999) { - glVertex2d(poses[i], poses[i + 1]); - i = i + 2; - } - glEnd(); - glPopMatrix(); -} - - -bool -GUIBaseVehicle::drawAction_drawVehicleAsPoly(const GUIVisualizationSettings& s) const { - RGBColor current = GLHelper::getColor(); - RGBColor lighter = current.changedBrightness(51); - RGBColor darker = current.changedBrightness(-51); - - const double length = getVType().getLength(); - const double width = getVType().getWidth(); - glPushMatrix(); - glRotated(90, 0, 0, 1); - glScaled(length, width, 1.); - SUMOVehicleShape shape = getVType().getGuiShape(); - bool drawCarriages = false; - - // draw main body - switch (shape) { - case SVS_UNKNOWN: - drawPoly(vehiclePoly_PassengerCarBody, 4); - GLHelper::setColor(lighter); - drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); - break; - case SVS_PEDESTRIAN: - glTranslated(0, 0, .045); - GLHelper::drawFilledCircle(0.25); - glTranslated(0, 0, -.045); - glScaled(.7, 2, 1); - glTranslated(0, 0, .04); - GLHelper::setColor(lighter); - GLHelper::drawFilledCircle(0.25); - 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(0.4, 0, .5); - glScaled(0.1, 0.2, 1); - GLHelper::setColor(darker); - GLHelper::drawFilledCircle(1); - 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); - glPopMatrix(); - } - break; - case SVS_PASSENGER: - case SVS_PASSENGER_SEDAN: - case SVS_PASSENGER_HATCHBACK: - case SVS_PASSENGER_WAGON: - drawPoly(vehiclePoly_PassengerCarBody, 4); - GLHelper::setColor(lighter); - drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); - break; - case SVS_PASSENGER_VAN: - drawPoly(vehiclePoly_PassengerVanBody, 4); - GLHelper::setColor(lighter); - drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); - drawPoly(vehiclePoly_PassengerVanRightGlass, 4.5); - drawPoly(vehiclePoly_PassengerVanLeftGlass, 4.5); - drawPoly(vehiclePoly_PassengerVanBackGlass, 4.5); - break; - case SVS_DELIVERY: - drawPoly(vehiclePoly_PassengerVanBody, 4); - GLHelper::setColor(lighter); - drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); - drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5); - drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5); - break; - case SVS_TRUCK: - case SVS_TRUCK_SEMITRAILER: - case SVS_TRUCK_1TRAILER: - glScaled(1. / (length), 1, 1.); - drawPoly(vehiclePoly_TransportBody, 4); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_TransportFrontGlass, 4.5); - drawPoly(vehiclePoly_TransportRightGlass, 4.5); - drawPoly(vehiclePoly_TransportLeftGlass, 4.5); - break; - case SVS_BUS: - case SVS_BUS_COACH: - case SVS_BUS_TROLLEY: { - double ml = length; - glScaled(1. / (length), 1, 1.); - glTranslated(0, 0, .04); - glBegin(GL_TRIANGLE_FAN); - glVertex2d(ml / 2., 0); - glVertex2d(0, 0); - glVertex2d(0, -.45); - glVertex2d(0 + .05, -.5); - glVertex2d(ml - .05, -.5); - glVertex2d(ml, -.45); - glVertex2d(ml, .45); - glVertex2d(ml - .05, .5); - glVertex2d(0 + .05, .5); - glVertex2d(0, .45); - glVertex2d(0, 0); - glEnd(); - glTranslated(0, 0, -.04); - - glTranslated(0, 0, .045); - glColor3d(0, 0, 0); - glBegin(GL_QUADS); - glVertex2d(0 + .05, .48); - glVertex2d(0 + .05, -.48); - glVertex2d(0 + .15, -.48); - glVertex2d(0 + .15, .48); - - glVertex2d(ml - .1, .45); - glVertex2d(ml - .1, -.45); - glVertex2d(ml - .05, -.45); - glVertex2d(ml - .05, .45); - - glVertex2d(0 + .20, .49); - glVertex2d(0 + .20, .45); - glVertex2d(ml - .20, .45); - glVertex2d(ml - .20, .49); - - glVertex2d(0 + .20, -.49); - glVertex2d(0 + .20, -.45); - glVertex2d(ml - .20, -.45); - glVertex2d(ml - .20, -.49); - - glEnd(); - glTranslated(0, 0, -.045); - } - break; - case SVS_BUS_FLEXIBLE: - case SVS_RAIL: - case SVS_RAIL_CAR: - case SVS_RAIL_CARGO: - drawAction_drawCarriageClass(s, shape, false); - drawCarriages = true; - break; - case SVS_E_VEHICLE: - drawPoly(vehiclePoly_EVehicleBody, 4); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_EVehicleFrontGlass, 4.5); - glTranslated(0, 0, .048); - GLHelper::setColor(current); - glBegin(GL_QUADS); - glVertex2d(.3, .5); - glVertex2d(.35, .5); - glVertex2d(.35, -.5); - glVertex2d(.3, -.5); - - glVertex2d(.3, -.05); - glVertex2d(.7, -.05); - glVertex2d(.7, .05); - glVertex2d(.3, .05); - - glVertex2d(.7, .5); - glVertex2d(.65, .5); - glVertex2d(.65, -.5); - glVertex2d(.7, -.5); - glEnd(); - glTranslated(0, 0, -.048); - //drawPoly(vehiclePoly_EVehicleBackGlass, 4.5); - break; - case SVS_ANT: - glPushMatrix(); - // ant is stretched via vehicle length - GLHelper::setColor(darker); - // draw left side - GLHelper::drawBoxLine(Position(-0.2, -.10), 350, 0.5, .02); - GLHelper::drawBoxLine(Position(-0.3, -.50), 240, 0.4, .03); - GLHelper::drawBoxLine(Position(0.3, -.10), 340, 0.8, .03); - GLHelper::drawBoxLine(Position(0.05, -.80), 290, 0.6, .04); - GLHelper::drawBoxLine(Position(0.4, -.10), 20, 0.8, .03); - GLHelper::drawBoxLine(Position(0.65, -.80), 75, 0.6, .04); - GLHelper::drawBoxLine(Position(0.5, -.10), 55, 0.8, .04); - GLHelper::drawBoxLine(Position(1.1, -.55), 90, 0.6, .04); - // draw right side - GLHelper::drawBoxLine(Position(-0.2, .10), 190, 0.5, .02); - GLHelper::drawBoxLine(Position(-0.3, .50), 300, 0.4, .03); - GLHelper::drawBoxLine(Position(0.3, .10), 200, 0.8, .03); - GLHelper::drawBoxLine(Position(0.05, .80), 250, 0.6, .04); - GLHelper::drawBoxLine(Position(0.4, .10), 160, 0.8, .03); - GLHelper::drawBoxLine(Position(0.65, .80), 105, 0.6, .04); - GLHelper::drawBoxLine(Position(0.5, .10), 125, 0.8, .04); - GLHelper::drawBoxLine(Position(1.1, .55), 90, 0.6, .04); - // draw body - GLHelper::setColor(current); - glTranslated(0, 0, 0.1); - GLHelper::drawFilledCircle(.25, 16); - glTranslated(.4, 0, 0); - GLHelper::drawFilledCircle(.2, 16); - glTranslated(.4, 0, 0); - 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; - } - case SVS_EMERGENCY: // similar to delivery - drawPoly(vehiclePoly_PassengerVanBody, 4); - GLHelper::setColor(darker); - drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); - drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5); - drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5); - // first aid sign - glTranslated(0.7, 0, 0); - glColor3d(.18, .55, .34); - drawPoly(vehiclePoly_EmergencySign, 4.5); - glColor3d(1, 1, 1); - drawPoly(vehiclePoly_Emergency, 5); - drawPoly(vehiclePoly_Emergency2, 5); - break; - case SVS_FIREBRIGADE: // similar to delivery in red orange - drawPoly(vehiclePoly_PassengerVanBody, 4); - GLHelper::setColor(lighter); - drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); - drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5); - drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5); - // draw ladder - glTranslated(0.7, 0, 0); - glColor3d(1, .5, 0); - drawPoly(vehiclePoly_EmergencySign, 4.5); - glColor3d(.5, .5, .5); - drawPoly(vehiclePoly_EmergencyLadder, 5); - drawPoly(vehiclePoly_EmergencyLadder2, 5); - drawPoly(vehiclePoly_EmergencyLadder3, 5); - drawPoly(vehiclePoly_EmergencyLadder4, 5); - drawPoly(vehiclePoly_EmergencyLadder5, 5); - drawPoly(vehiclePoly_EmergencyLadder6, 5); - drawPoly(vehiclePoly_EmergencyLadder7, 5); - break; - case SVS_POLICE: // similar to passenger grey with blue - drawPoly(vehiclePoly_PassengerCarBody, 4); - GLHelper::setColor(lighter); - drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); - // first aid sign - glTranslated(0.7, 0, 0); - glColor3d(.5, .5, .5); - drawPoly(vehiclePoly_EmergencySign, 4.5); - glColor3d(0, 0, 1); - drawPoly(vehiclePoly_Emergency, 5); - drawPoly(vehiclePoly_Emergency2, 5); - break; - case SVS_RICKSHAW: // Rickshaw - drawPoly(vehiclePoly_PassengerCarBody, 4); - // wheels - GLHelper::setColor(darker); - glPushMatrix(); - glTranslated(.5, .5, -0.1); - GLHelper::drawFilledCircle(.3, 6); - glPopMatrix(); - //other wheel - glPushMatrix(); - glTranslated(.5, -.5, -0.1); - GLHelper::drawFilledCircle(.3, 6); - glPopMatrix(); - break; - default: // same as passenger - drawPoly(vehiclePoly_PassengerCarBody, 4); - glColor3d(1, 1, 1); - drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); - glColor3d(0, 0, 0); - drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); - break; - } - - // draw decorations - switch (shape) { - case SVS_PEDESTRIAN: - break; - case SVS_BICYCLE: - //glScaled(length, 1, 1.); - glBegin(GL_TRIANGLE_FAN); - glVertex2d(1 / 2., 0); - glVertex2d(0, 0); - glVertex2d(0, -.03); - glVertex2d(0 + .05, -.05); - glVertex2d(1 - .05, -.05); - glVertex2d(1, -.03); - glVertex2d(1, .03); - glVertex2d(1 - .05, .05); - glVertex2d(0 + .05, .05); - glVertex2d(0, .03); - glVertex2d(0, 0); - glEnd(); - break; - case SVS_MOPED: - case SVS_MOTORCYCLE: - //glScaled(length, 1, 1.); - glBegin(GL_TRIANGLE_FAN); - glVertex2d(1 / 2., 0); - glVertex2d(0, 0); - glVertex2d(0, -.03); - glVertex2d(0 + .05, -.2); - glVertex2d(1 - .05, -.2); - glVertex2d(1, -.03); - glVertex2d(1, .03); - glVertex2d(1 - .05, .2); - glVertex2d(0 + .05, .2); - glVertex2d(0, .03); - glVertex2d(0, 0); - glEnd(); - break; - case SVS_PASSENGER: - case SVS_PASSENGER_SEDAN: - drawPoly(vehiclePoly_PassengerSedanRightGlass, 4.5); - drawPoly(vehiclePoly_PassengerSedanLeftGlass, 4.5); - drawPoly(vehiclePoly_PassengerSedanBackGlass, 4.5); - break; - case SVS_PASSENGER_HATCHBACK: - drawPoly(vehiclePoly_PassengerHatchbackRightGlass, 4.5); - drawPoly(vehiclePoly_PassengerHatchbackLeftGlass, 4.5); - drawPoly(vehiclePoly_PassengerHatchbackBackGlass, 4.5); - break; - case SVS_PASSENGER_WAGON: - drawPoly(vehiclePoly_PassengerWagonRightGlass, 4.5); - drawPoly(vehiclePoly_PassengerWagonLeftGlass, 4.5); - drawPoly(vehiclePoly_PassengerWagonBackGlass, 4.5); - break; - case SVS_PASSENGER_VAN: - case SVS_DELIVERY: - break; - case SVS_TRUCK: - GLHelper::setColor(current); - GLHelper::drawBoxLine(Position(2.3, 0), 90., length - 2.3, .5); - break; - case SVS_TRUCK_SEMITRAILER: - GLHelper::setColor(current); - GLHelper::drawBoxLine(Position(2.8, 0), 90., length - 2.8, .5); - break; - case SVS_TRUCK_1TRAILER: { - GLHelper::setColor(current); - double l = length - 2.3; - l = l / 2.; - GLHelper::drawBoxLine(Position(2.3, 0), 90., l, .5); - GLHelper::drawBoxLine(Position(2.3 + l + .5, 0), 90., l - .5, .5); - break; - } - case SVS_BUS_TROLLEY: - glPushMatrix(); - glTranslated(0, 0, .1); - GLHelper::setColor(darker); - GLHelper::drawBoxLine(Position(3.8, 0), 90., 1, .3); - glTranslated(0, 0, .1); - glColor3d(0, 0, 0); - GLHelper::drawBoxLine(Position(4.3, .2), 90., 1, .06); - GLHelper::drawBoxLine(Position(4.3, -.2), 90., 1, .06); - GLHelper::drawBoxLine(Position(5.3, .2), 90., 3, .03); - GLHelper::drawBoxLine(Position(5.3, -.2), 90., 3, .03); - glPopMatrix(); - break; - case SVS_BUS: - case SVS_BUS_COACH: - case SVS_BUS_FLEXIBLE: - case SVS_RAIL: - case SVS_RAIL_CAR: - case SVS_RAIL_CARGO: - case SVS_E_VEHICLE: - case SVS_ANT: - case SVS_SHIP: - case SVS_EMERGENCY: - case SVS_FIREBRIGADE: - case SVS_POLICE: - case SVS_RICKSHAW: - break; - default: // same as passenger/sedan - drawPoly(vehiclePoly_PassengerSedanRightGlass, 4.5); - drawPoly(vehiclePoly_PassengerSedanLeftGlass, 4.5); - drawPoly(vehiclePoly_PassengerSedanBackGlass, 4.5); - break; - } - /* - glBegin(GL_TRIANGLE_FAN); - glVertex2d(.5,.5); // center - strip begin - glVertex2d(0, .5); // center, front - glVertex2d(0, .8); // ... clockwise ... (vehicle right side) - glVertex2d(0.08, .94); - glVertex2d(0.25, 1.); - glVertex2d(0.95, 1.); - glVertex2d(1., .9); - glVertex2d(1., .1); // (vehicle left side) - glVertex2d(0.95, 0.); - glVertex2d(0.25, 0.); - glVertex2d(0.08, .06); - glVertex2d(0, .2); // - glVertex2d(0, .5); // center, front (close) - glEnd(); - - glPolygonOffset(0, -4.5); - glColor3d(1, 1, 1); // front - glBegin(GL_TRIANGLE_FAN); - glVertex2d(0.1,0.5); - glVertex2d(0.025,0.5); - glVertex2d(0.025,0.75); - glVertex2d(0.27,0.9); - glVertex2d(0.27,0.1); - glVertex2d(0.025,0.25); - glVertex2d(0.025,0.5); - glEnd(); - - glColor3d(0, 0, 0); // front glass - glBegin(GL_TRIANGLE_FAN); - glVertex2d(0.35,0.5); - glVertex2d(0.3,0.5); - glVertex2d(0.3,0.9); - glVertex2d(0.43,0.8); - glVertex2d(0.43,0.2); - glVertex2d(0.3,0.1); - glVertex2d(0.3,0.5); - glEnd(); - - glBegin(GL_TRIANGLE_FAN); // back glass - glVertex2d(0.92,0.5); - glVertex2d(0.90,0.5); - glVertex2d(0.90,0.8); - glVertex2d(0.95,0.9); - glVertex2d(0.95,0.1); - glVertex2d(0.90,0.2); - glVertex2d(0.90,0.5); - glEnd(); - - glBegin(GL_TRIANGLE_FAN); // right glass - glVertex2d(0.36,0.07); - glVertex2d(0.34,0.03); - glVertex2d(0.94,0.03); - glVertex2d(0.87,0.13); - glVertex2d(0.45,0.13); - glVertex2d(0.34,0.03); - glEnd(); - - glBegin(GL_TRIANGLE_FAN); // left glass - glVertex2d(0.36,1.-0.07); - glVertex2d(0.34,1.-0.03); - glVertex2d(0.94,1.-0.03); - glVertex2d(0.87,1.-0.13); - glVertex2d(0.45,1.-0.13); - glVertex2d(0.34,1.-0.03); - glEnd(); - */ - - glPopMatrix(); - return drawCarriages; -} - - -bool -GUIBaseVehicle::drawAction_drawVehicleAsImage(const GUIVisualizationSettings& s, double length) const { - const std::string& file = getVType().getImgFile(); - if (file != "") { - int textureID = GUITexturesHelper::getTextureID(file); - if (textureID > 0) { - const double exaggeration = s.vehicleSize.getExaggeration(s, this); - if (length < 0) { - length = getVType().getLength() * exaggeration; - } - const double halfWidth = getVType().getWidth() / 2.0 * exaggeration; - GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, 0, halfWidth, length); - return true; - } - } - return false; +const std::string +GUIBaseVehicle::getOptionalName() const { + return myVehicle.getParameter().getParameter("name", ""); } @@ -881,12 +309,6 @@ Position p1 = pos; const double degAngle = RAD2DEG(angle + M_PI / 2.); const double length = getVType().getLength(); - // one seat in the center of the vehicle by default - if (myVehicle.getLane() != nullptr) { - mySeatPositions[0] = myVehicle.getPosition(-length / 2); - } else { - mySeatPositions[0] = p1; - } glTranslated(p1.x(), p1.y(), getType()); glRotated(degAngle, 0, 0, 1); // set lane color @@ -913,13 +335,13 @@ bool drawCarriages = false; switch (s.vehicleQuality) { case 0: - drawAction_drawVehicleAsTrianglePlus(); + GUIBaseVehicleHelper::drawAction_drawVehicleAsTrianglePlus(getVType().getWidth(), getVType().getLength()); break; case 1: - drawAction_drawVehicleAsBoxPlus(); + GUIBaseVehicleHelper::drawAction_drawVehicleAsBoxPlus(getVType().getWidth(), getVType().getLength()); break; case 2: - drawCarriages = drawAction_drawVehicleAsPoly(s); + drawCarriages = drawAction_drawVehicleAsPolyWithCarriagges(s); // draw flashing blue light for emergency vehicles if (getVType().getGuiShape() == SVS_EMERGENCY) { glTranslated(0, 0, .1); @@ -928,15 +350,7 @@ break; case 3: default: - // draw as image but take special care for drawing trains - // fallback to simple shapes - glPushMatrix(); // drawAction_drawRailCarriages assumes matrix stack depth of 2 - if (!drawAction_drawCarriageClass(s, getVType().getGuiShape(), true)) { - if (!drawAction_drawVehicleAsImage(s)) { - drawCarriages = drawAction_drawVehicleAsPoly(s); - }; - } - glPopMatrix(); + drawCarriages = drawAction_drawVehicleAsPolyWithCarriagges(s, true); break; } if (s.drawMinGap) { @@ -1033,14 +447,27 @@ drawName(Position(0, 0), s.scale, getVType().getGuiShape() == SVS_PEDESTRIAN ? s.personName : s.vehicleName, s.angle); if (s.vehicleName.show && myVehicle.getParameter().line != "") { - glTranslated(0, 0.6 * s.vehicleName.scaledSize(s.scale), 0); + glRotated(-s.angle, 0, 0, 1); + glTranslated(0, 0.7 * s.vehicleName.scaledSize(s.scale), 0); + glRotated(s.angle, 0, 0, 1); GLHelper::drawTextSettings(s.vehicleName, "line:" + myVehicle.getParameter().line, Position(0, 0), s.scale, s.angle); } if (s.vehicleValue.show) { - glTranslated(0, 0.6 * s.vehicleName.scaledSize(s.scale), 0); - const double value = getColorValue(s.vehicleColorer.getActive()); + glRotated(-s.angle, 0, 0, 1); + glTranslated(0, 0.7 * s.vehicleName.scaledSize(s.scale), 0); + glRotated(s.angle, 0, 0, 1); + const double value = getColorValue(s.vehicleColorer.getActive()); GLHelper::drawTextSettings(s.vehicleValue, toString(value), Position(0, 0), s.scale, s.angle); } + + if (!drawCarriages) { + mySeatPositions.clear(); + int requiredSeats = getNumPassengers() + getNumContainers(); + const int totalSeats = getVType().getPersonCapacity() + getVType().getContainerCapacity(); + const Position back = (p1 + Position(-length * upscaleLength, 0)).rotateAround2D(angle, p1); + computeSeats(p1, back, totalSeats, upscale, requiredSeats); + } + glPopMatrix(); glPopName(); drawAction_drawPersonsAndContainers(s); @@ -1065,7 +492,10 @@ drawBestLanes(); } if (hasActiveAddVisualisation(parent, VO_SHOW_ROUTE)) { - drawRoute(s, 0, 0.25); + drawRoute(s, 0, 0.25, false); + } + if (hasActiveAddVisualisation(parent, VO_SHOW_FUTURE_ROUTE)) { + drawRoute(s, 0, 0.25, true); } if (hasActiveAddVisualisation(parent, VO_SHOW_ALL_ROUTES)) { if (myVehicle.getNumberReroutes() > 0) { @@ -1188,7 +618,7 @@ GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); return true; } - case 29: { // color randomly (by pointer hash) + case 30: { // color randomly (by pointer hash) std::hash ptr_hash; const double hue = (double)(ptr_hash(veh) % 360); // [0-360] const double sat = ((ptr_hash(veh) / 360) % 67) / 100.0 + 0.33; // [0.33-1] @@ -1225,7 +655,7 @@ void -GUIBaseVehicle::drawRoute(const GUIVisualizationSettings& s, int routeNo, double darken) const { +GUIBaseVehicle::drawRoute(const GUIVisualizationSettings& s, int routeNo, double darken, bool future) const { setColor(s); GLdouble colors[4]; glGetDoublev(GL_CURRENT_COLOR, colors); @@ -1247,13 +677,13 @@ } glColor3dv(colors); if (routeNo == 0) { - drawRouteHelper(s, myVehicle.getRoute()); + drawRouteHelper(s, myVehicle.getRoute(), future); return; } --routeNo; // only prior routes are stored const MSRoute* route = myRoutes->getRoute(routeNo); if (route != nullptr) { - drawRouteHelper(s, *route); + drawRouteHelper(s, *route, future); } } @@ -1305,5 +735,63 @@ } +bool +GUIBaseVehicle::drawAction_drawVehicleAsPolyWithCarriagges(const GUIVisualizationSettings& s, bool asImage) const { + if (getVType().getParameter().carriageLength > 0) { + drawAction_drawCarriageClass(s, asImage); + return true; + } else { + if (asImage && + GUIBaseVehicleHelper::drawAction_drawVehicleAsImage(s, getVType().getImgFile(), this, getVType().getWidth())) { + return false; + } + GUIBaseVehicleHelper::drawAction_drawVehicleAsPoly(s, getVType().getGuiShape(), getVType().getWidth(), getVType().getLength()); + return false; + } +} + + +int +GUIBaseVehicle::getNumPassengers() const { + if (myVehicle.getPersonDevice() != nullptr) { + return (int)myVehicle.getPersonDevice()->size(); + } + return 0; +} + + +int +GUIBaseVehicle::getNumContainers() const { + if (myVehicle.getContainerDevice() != nullptr) { + return (int)myVehicle.getContainerDevice()->size(); + } + return 0; +} + + +void +GUIBaseVehicle::computeSeats(const Position& front, const Position& back, int maxSeats, double exaggeration, int& requiredSeats) const { + if (requiredSeats <= 0) { + return; // save some work + } + const double vehWidth = getVType().getWidth() * exaggeration; + const double length = front.distanceTo2D(back); + const double seatOffset = SUMO_const_waitingPersonWidth * exaggeration; + const int rowSize = MAX2(1, (int)floor(vehWidth / seatOffset)); + const double rowOffset = (length - 1) / ceil(maxSeats / rowSize); + const double sideOffset = (rowSize - 1) / 2 * seatOffset; + double rowPos = 1 - rowOffset; + for (int i = 0; requiredSeats > 0 && i < maxSeats; i++) { + int seat = (i % rowSize); + if (seat == 0) { + rowPos += rowOffset; + } + mySeatPositions.push_back(PositionVector::positionAtOffset2D(front, back, rowPos, + seat * seatOffset - sideOffset)); + requiredSeats--; + } +} + + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIBaseVehicle.h sumo-1.2.0+dfsg1/src/guisim/GUIBaseVehicle.h --- sumo-1.1.0+dfsg1/src/guisim/GUIBaseVehicle.h 2018-05-31 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIBaseVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,8 +29,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -90,8 +90,8 @@ /// @brief gets the color value according to the current scheme index virtual double getColorValue(int activeScheme) const = 0; - /// @brief draws the given guiShape if it has distinc carriages/modules and eturns true if so - virtual bool drawAction_drawCarriageClass(const GUIVisualizationSettings& s, SUMOVehicleShape guiShape, bool asImage) const = 0; + /// @brief draws the given guiShape with distinct carriages/modules + virtual void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const = 0; /** @brief Returns the time since the last lane change in seconds * @see MSVehicle::myLastLaneChangeOffset @@ -102,7 +102,7 @@ /** @brief Draws the route * @param[in] r The route to draw */ - virtual void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r) const = 0; + virtual void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future) const = 0; /// @brief retrieve information about the current stop state virtual std::string getStopInfo() const = 0; @@ -162,6 +162,8 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the value for generic parameter 'name' or '' + const std::string getOptionalName() const; /** @brief Draws the object on the specified position with the specified angle * @param[in] s The settings for the current view (may influence drawing) @@ -214,6 +216,12 @@ void removeActiveAddVisualisation(GUISUMOAbstractView* const parent, int which); /// @} + /// @brief return the number of passengers + int getNumPassengers() const; + + /// @brief return the number of passengers + int getNumContainers() const; + /** @@ -245,6 +253,10 @@ long onCmdShowCurrentRoute(FXObject*, FXSelector, void*); /// @brief Called if the current route of the vehicle shall be hidden long onCmdHideCurrentRoute(FXObject*, FXSelector, void*); + /// @brief Called if the current route of the vehicle shall be shown + long onCmdShowFutureRoute(FXObject*, FXSelector, void*); + /// @brief Called if the current route of the vehicle shall be hidden + long onCmdHideFutureRoute(FXObject*, FXSelector, void*); /// @brief Called if the vehicle's best lanes shall be shown long onCmdShowBestLanes(FXObject*, FXSelector, void*); /// @brief Called if the vehicle's best lanes shall be hidden @@ -288,7 +300,9 @@ /// @brief LFLinkItems VO_SHOW_LFLINKITEMS = 8, /// @brief draw vehicle outside the road network - VO_DRAW_OUTSIDE_NETWORK = 16 + VO_DRAW_OUTSIDE_NETWORK = 16, + /// @brief show vehicle's current continued from the current position + VO_SHOW_FUTURE_ROUTE = 32 }; /// @brief Enabled visualisations, per view @@ -300,7 +314,7 @@ * @param[in] routeNo The route to show (0: the current, >0: prior) * @param[in] darken The amount to darken the route by */ - void drawRoute(const GUIVisualizationSettings& s, int routeNo, double darken) const; + void drawRoute(const GUIVisualizationSettings& s, int routeNo, double darken, bool future = false) const; /// @} @@ -312,21 +326,6 @@ /// @brief sets the color according to the currente settings void setColor(const GUIVisualizationSettings& s) const; - /// @name drawing helper methods - /// @{ - static void drawPoly(double* poses, double offset); - - void drawAction_drawVehicleAsBoxPlus() const; - void drawAction_drawVehicleAsTrianglePlus() const; - bool drawAction_drawVehicleAsPoly(const GUIVisualizationSettings& s) const; - - /* @brief try to draw vehicle as raster image and return true if sucessful - * @param[in] length The custom length of the vehicle - * (defaults to the * length specified in the vehicle type if -1 is passed) - */ - bool drawAction_drawVehicleAsImage(const GUIVisualizationSettings& s, double length = -1) const; - /// @} - /// @brief returns the seat position for the person with the given index const Position& getSeatPosition(int personIndex) const; @@ -337,10 +336,16 @@ return myVehicle.getVehicleType(); } + /// @brief draw vehicle body and return whether carriages are being drawn + bool drawAction_drawVehicleAsPolyWithCarriagges(const GUIVisualizationSettings& s, bool asImage = false) const; + + /// @brief add seats to mySeatPositions and update requiredSeats + void computeSeats(const Position& front, const Position& back, int maxSeats, double exaggeration, int& requiredSeats) const; + protected: /// The mutex used to avoid concurrent updates of the vehicle buffer - mutable MFXMutex myLock; + mutable FXMutex myLock; /// @brief positions of seats in the vehicle (updated at every drawing step) mutable PositionVector mySeatPositions; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIBusStop.cpp sumo-1.2.0+dfsg1/src/guisim/GUIBusStop.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIBusStop.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIBusStop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -54,12 +54,14 @@ // method definitions // =========================================================================== GUIBusStop::GUIBusStop(const std::string& id, const std::vector& lines, MSLane& lane, - double frompos, double topos, const std::string name) : - MSStoppingPlace(id, lines, lane, frompos, topos, name), - GUIGlObject_AbstractAdd(GLO_BUS_STOP, id) { + double frompos, double topos, const std::string name, int personCapacity) : + MSStoppingPlace(id, lines, lane, frompos, topos, name, personCapacity), + GUIGlObject_AbstractAdd(GLO_BUS_STOP, id), + myPersonExaggeration(1) { const double offsetSign = MSNet::getInstance()->lefthand() ? -1 : 1; + myWidth = MAX2(1.0, ceil(personCapacity / getPersonsAbreast()) * SUMO_const_waitingPersonDepth); myFGShape = lane.getShape(); - myFGShape.move2side(1.65 * offsetSign); + myFGShape.move2side((lane.getWidth() + myWidth) * 0.45 * offsetSign); myFGShape = myFGShape.getSubpart( lane.interpolateLanePosToGeometryPos(frompos), lane.interpolateLanePosToGeometryPos(topos)); @@ -73,7 +75,7 @@ myFGShapeRotations.push_back((double) atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double) M_PI); } PositionVector tmp = myFGShape; - tmp.move2side(1.5 * offsetSign); + tmp.move2side(myWidth / 2 * offsetSign); myFGSignPos = tmp.getLineCenter(); myFGSignRot = 0; if (tmp.length() != 0) { @@ -119,6 +121,7 @@ ret->mkItem("name", false, getMyName()); ret->mkItem("begin position [m]", false, myBegPos); ret->mkItem("end position [m]", false, myEndPos); + ret->mkItem("person capacity [#]", false, myTransportableCapacity); ret->mkItem("person number [#]", true, new FunctionBinding(this, &MSStoppingPlace::getTransportableNumber)); ret->mkItem("stopped vehicles[#]", true, new FunctionBinding(this, &MSStoppingPlace::getStoppedVehicleNumber)); ret->mkItem("last free pos[m]", true, new FunctionBinding(this, &MSStoppingPlace::getLastFreePos)); @@ -136,7 +139,8 @@ glTranslated(0, 0, getType()); GLHelper::setColor(s.SUMO_color_busStop); const double exaggeration = s.addSize.getExaggeration(s, this); - GLHelper::drawBoxLines(myFGShape, myFGShapeRotations, myFGShapeLengths, exaggeration); + const double offset = myWidth * 0.5 * MAX2(0.0, exaggeration - 1); + GLHelper::drawBoxLines(myFGShape, myFGShapeRotations, myFGShapeLengths, myWidth * 0.5 * exaggeration, 0, offset); // draw details unless zoomed out to far if (s.scale * exaggeration >= 10) { glPushMatrix(); @@ -176,6 +180,9 @@ if (s.addFullName.show && getMyName() != "") { GLHelper::drawTextSettings(s.addFullName, getMyName(), myFGSignPos, s.scale, s.getTextAngle(myFGSignRot), GLO_MAX - getType()); } + if (exaggeration > 1) { + myPersonExaggeration = s.personSize.getExaggeration(s, nullptr); + } glPopMatrix(); glPopName(); drawName(myFGSignPos, s.scale, s.addName, s.angle); @@ -192,5 +199,20 @@ return b; } +const std::string +GUIBusStop::getOptionalName() const { + return myName; +} + +Position +GUIBusStop::getWaitPosition(MSTransportable* t) const { + Position result = MSStoppingPlace::getWaitPosition(t); + if (myPersonExaggeration > 1) { + Position ref = myLane.getShape().positionAtOffset(myLane.interpolateLanePosToGeometryPos((myBegPos + myEndPos) / 2), + myLane.getWidth() / 2); + result = ref + (result - ref) * myPersonExaggeration; + } + return result; +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIBusStop.h sumo-1.2.0+dfsg1/src/guisim/GUIBusStop.h --- sumo-1.1.0+dfsg1/src/guisim/GUIBusStop.h 2018-06-12 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIBusStop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -72,7 +72,7 @@ */ GUIBusStop(const std::string& id, const std::vector& lines, MSLane& lane, - double frompos, double topos, const std::string name); + double frompos, double topos, const std::string name, int personCapacity); /// @brief Destructor @@ -116,12 +116,19 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the street name + const std::string getOptionalName() 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 Returns the next free waiting place for pedestrians / containers + * @return The next free waiting place for pedestrians / containers + */ + Position getWaitPosition(MSTransportable* person) const; //@} @@ -141,9 +148,15 @@ /// @brief The rotation of the sign double myFGSignRot; + /// @brief The visual width of the stoppling place + double myWidth; + /// @brief The coordinates of access points PositionVector myAccessCoords; + /// @brief The current person exaggeration + mutable double myPersonExaggeration; + }; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUICalibrator.cpp sumo-1.2.0+dfsg1/src/guisim/GUICalibrator.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUICalibrator.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUICalibrator.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUICalibrator.h sumo-1.2.0+dfsg1/src/guisim/GUICalibrator.h --- sumo-1.1.0+dfsg1/src/guisim/GUICalibrator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUICalibrator.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIChargingStation.cpp sumo-1.2.0+dfsg1/src/guisim/GUIChargingStation.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIChargingStation.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIChargingStation.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -187,4 +187,9 @@ drawName(getCenteringBoundary().getCenter(), s.scale, s.addName, s.angle); } +const std::string +GUIChargingStation::getOptionalName() const { + return myName; +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIChargingStation.h sumo-1.2.0+dfsg1/src/guisim/GUIChargingStation.h --- sumo-1.1.0+dfsg1/src/guisim/GUIChargingStation.h 2018-09-10 22:00:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIChargingStation.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -112,6 +112,9 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the stopping place name + const std::string getOptionalName() const; + /** @brief Draws the object * @param[in] s The settings for the current view (may influence drawing) * @see GUIGlObject::drawGL diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIContainer.cpp sumo-1.2.0+dfsg1/src/guisim/GUIContainer.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIContainer.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIContainer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -330,14 +329,14 @@ double GUIContainer::getEdgePos() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSContainer::getEdgePos(); } Position GUIContainer::getPosition() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); if (getCurrentStageType() == WAITING && getEdge()->getPermissions() == SVC_SHIP) { MSLane* lane = getEdge()->getLanes().front(); //the most right lane of the water way PositionVector laneShape = lane->getShape(); @@ -349,21 +348,21 @@ double GUIContainer::getAngle() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSContainer::getAngle(); } double GUIContainer::getWaitingSeconds() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSContainer::getWaitingSeconds(); } double GUIContainer::getSpeed() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSContainer::getSpeed(); } diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIContainer.h sumo-1.2.0+dfsg1/src/guisim/GUIContainer.h --- sumo-1.1.0+dfsg1/src/guisim/GUIContainer.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIContainer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,11 +27,11 @@ #include #include #include +#include #include #include #include #include -#include #include @@ -185,7 +185,7 @@ private: /// The mutex used to avoid concurrent updates of the vehicle buffer - mutable MFXMutex myLock; + mutable FXMutex myLock; /// The position of a container while riding a vehicle Position myPositionInVehicle; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIContainerStop.cpp sumo-1.2.0+dfsg1/src/guisim/GUIContainerStop.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIContainerStop.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIContainerStop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,9 +52,9 @@ // method definitions // =========================================================================== GUIContainerStop::GUIContainerStop(const std::string& id, const std::vector& lines, MSLane& lane, - double frompos, double topos) - : MSStoppingPlace(id, lines, lane, frompos, topos), - GUIGlObject_AbstractAdd(GLO_CONTAINER_STOP, id) { + double frompos, double topos, const std::string& name, int containerCapacity) : + MSStoppingPlace(id, lines, lane, frompos, topos, name, containerCapacity), + GUIGlObject_AbstractAdd(GLO_CONTAINER_STOP, id) { const double offsetSign = MSNet::getInstance()->lefthand() ? -1 : 1; myFGShape = lane.getShape(); myFGShape.move2side(1.65 * offsetSign); @@ -161,10 +161,10 @@ glPopMatrix(); glPopName(); drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); - for (std::vector::const_iterator i = myWaitingTransportables.begin(); i != myWaitingTransportables.end(); ++i) { - glTranslated(0, 1, 0); // make multiple containers viewable - static_cast(*i)->drawGL(s); - } + //for (std::vector::const_iterator i = myWaitingTransportables.begin(); i != myWaitingTransportables.end(); ++i) { + // glTranslated(0, 1, 0); // make multiple containers viewable + // static_cast(*i)->drawGL(s); + //} } @@ -175,6 +175,11 @@ return b; } +const std::string +GUIContainerStop::getOptionalName() const { + return myName; +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIContainerStop.h sumo-1.2.0+dfsg1/src/guisim/GUIContainerStop.h --- sumo-1.1.0+dfsg1/src/guisim/GUIContainerStop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIContainerStop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,7 +71,7 @@ */ GUIContainerStop(const std::string& id, const std::vector& lines, MSLane& lane, - double frompos, double topos); + double frompos, double topos, const std::string& name, int containerCapacity); /// @brief Destructor @@ -113,6 +113,8 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the stopping place name + const std::string getOptionalName() const; /** @brief Draws the object * @param[in] s The settings for the current view (may influence drawing) diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIDetectorWrapper.cpp sumo-1.2.0+dfsg1/src/guisim/GUIDetectorWrapper.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIDetectorWrapper.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIDetectorWrapper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIDetectorWrapper.h sumo-1.2.0+dfsg1/src/guisim/GUIDetectorWrapper.h --- sumo-1.1.0+dfsg1/src/guisim/GUIDetectorWrapper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIDetectorWrapper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIE2Collector.cpp sumo-1.2.0+dfsg1/src/guisim/GUIE2Collector.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIE2Collector.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIE2Collector.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIE2Collector.h sumo-1.2.0+dfsg1/src/guisim/GUIE2Collector.h --- sumo-1.1.0+dfsg1/src/guisim/GUIE2Collector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIE2Collector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIE3Collector.cpp sumo-1.2.0+dfsg1/src/guisim/GUIE3Collector.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIE3Collector.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIE3Collector.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIE3Collector.h sumo-1.2.0+dfsg1/src/guisim/GUIE3Collector.h --- sumo-1.1.0+dfsg1/src/guisim/GUIE3Collector.h 2018-06-01 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIE3Collector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIEdge.cpp sumo-1.2.0+dfsg1/src/guisim/GUIEdge.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIEdge.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,11 +28,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -203,6 +203,10 @@ return b; } +const std::string +GUIEdge::getOptionalName() const { + return myStreetName; +} void GUIEdge::drawGL(const GUIVisualizationSettings& s) const { @@ -211,14 +215,11 @@ } glPushName(getGlID()); // draw the lanes + if (MSGlobals::gUseMesoSim) { + setColor(s); + } for (std::vector::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) { - if (MSGlobals::gUseMesoSim) { - setColor(s); - } - GUILane* l = dynamic_cast(*i); - if (l != nullptr) { - l->drawGL(s); - } + static_cast(*i)->drawGL(s); } if (MSGlobals::gUseMesoSim) { if (s.scale * s.vehicleSize.getExaggeration(s, nullptr) > s.vehicleSize.minSize) { @@ -231,16 +232,24 @@ const bool drawInternalEdgeName = s.internalEdgeName.show && myFunction == EDGEFUNC_INTERNAL; const bool drawCwaEdgeName = s.cwaEdgeName.show && (myFunction == EDGEFUNC_CROSSING || myFunction == EDGEFUNC_WALKINGAREA); const bool drawStreetName = s.streetName.show && myStreetName != ""; - const bool drawEdgeValue = s.edgeValue.show && (myFunction == EDGEFUNC_NORMAL - || (myFunction == EDGEFUNC_INTERNAL && !s.drawJunctionShape) - || ((myFunction == EDGEFUNC_CROSSING || myFunction == EDGEFUNC_WALKINGAREA) && s.drawCrossingsAndWalkingareas)); + const bool drawEdgeValue = s.edgeValue.show && (myFunction == EDGEFUNC_NORMAL + || (myFunction == EDGEFUNC_INTERNAL && !s.drawJunctionShape) + || ((myFunction == EDGEFUNC_CROSSING || myFunction == EDGEFUNC_WALKINGAREA) && s.drawCrossingsAndWalkingareas)); if (drawEdgeName || drawInternalEdgeName || drawCwaEdgeName || drawStreetName || drawEdgeValue) { GUILane* lane1 = dynamic_cast((*myLanes)[0]); GUILane* lane2 = dynamic_cast((*myLanes).back()); if (lane1 != nullptr && lane2 != nullptr) { + const bool spreadSuperposed = s.spreadSuperposed && getBidiEdge() != nullptr && lane2->drawAsRailway(s); Position p = lane1->getShape().positionAtOffset(lane1->getShape().length() / (double) 2.); p.add(lane2->getShape().positionAtOffset(lane2->getShape().length() / (double) 2.)); p.mul(.5); + if (spreadSuperposed) { + // move name to the right of the edge and towards its beginning + const double dist = 0.6 * s.edgeName.scaledSize(s.scale); + const double shiftA = lane1->getShape().rotationAtOffset(lane1->getShape().length() / (double) 2.) - DEG2RAD(135); + Position shift(dist * cos(shiftA), dist * sin(shiftA)); + p.add(shift); + } double angle = s.getTextAngle(lane1->getShape().rotationDegreeAtOffset(lane1->getShape().length() / (double) 2.) + 90); if (drawEdgeName) { drawName(p, s.scale, s.edgeName, angle); @@ -255,15 +264,18 @@ if (drawEdgeValue) { const int activeScheme = s.getLaneEdgeMode(); // use value of leftmost lane to hopefully avoid sidewalks, bikelanes etc - double value = (MSGlobals::gUseMesoSim - ? getColorValue(s, activeScheme) - : lane2->getColorValue(s, activeScheme)); - GLHelper::drawTextSettings(s.edgeValue, toString(value), p, s.scale, angle); + double value = (MSGlobals::gUseMesoSim + ? getColorValue(s, activeScheme) + : lane2->getColorValue(s, activeScheme)); + const RGBColor color = (MSGlobals::gUseMesoSim ? s.edgeColorer : s.laneColorer).getScheme().getColor(value); + if (color.alpha() != 0) { + GLHelper::drawTextSettings(s.edgeValue, toString(value), p, s.scale, angle); + } } } } if (s.scale * s.personSize.getExaggeration(s, nullptr) > s.personSize.minSize) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); for (std::set::const_iterator i = myPersons.begin(); i != myPersons.end(); ++i) { GUIPerson* person = dynamic_cast(*i); assert(person != 0); @@ -271,7 +283,7 @@ } } if (s.scale * s.containerSize.getExaggeration(s, nullptr) > s.containerSize.minSize) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); for (std::set::const_iterator i = myContainers.begin(); i != myContainers.end(); ++i) { GUIContainer* container = dynamic_cast(*i); assert(container != 0); @@ -287,7 +299,7 @@ if (vehicleControl != nullptr) { // draw the meso vehicles vehicleControl->secureVehicles(); - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); int laneIndex = 0; MESegment::Queue queue; for (std::vector::const_iterator msl = myLanes->begin(); msl != myLanes->end(); ++msl, ++laneIndex) { @@ -402,13 +414,13 @@ const int activeScheme = c.getActive(); int activeMicroScheme = -1; switch (activeScheme) { - case 0: + case 0: activeMicroScheme = 0; // color uniform break; - case 9: + case 9: activeMicroScheme = 18; // color by angle break; - case 17: + case 17: activeMicroScheme = 30; // color by TAZ break; default: diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIEdge.h sumo-1.2.0+dfsg1/src/guisim/GUIEdge.h --- sumo-1.1.0+dfsg1/src/guisim/GUIEdge.h 2018-11-27 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,10 +28,10 @@ #include #include +#include #include #include #include -#include // =========================================================================== @@ -124,6 +124,8 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the street name + const std::string getOptionalName() const; /** @brief Draws the object * @param[in] s The settings for the current view (may influence drawing) @@ -134,23 +136,23 @@ void addPerson(MSTransportable* p) const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSEdge::addPerson(p); } void removePerson(MSTransportable* p) const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSEdge::removePerson(p); } void addContainer(MSTransportable* c) const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSEdge::addContainer(c); } void removeContainer(MSTransportable* c) const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSEdge::removeContainer(c); } @@ -226,7 +228,7 @@ private: /// The mutex used to avoid concurrent updates of myPersons/ myContainers - mutable MFXMutex myLock; + mutable FXMutex myLock; mutable RGBColor myMesoColor; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIEventControl.cpp sumo-1.2.0+dfsg1/src/guisim/GUIEventControl.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIEventControl.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIEventControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,14 +23,16 @@ #include #include -#include +#include #include "GUIEventControl.h" // =========================================================================== // member definitions // =========================================================================== -GUIEventControl::GUIEventControl() {} +GUIEventControl::GUIEventControl() : + myLock(true) +{} GUIEventControl::~GUIEventControl() { @@ -39,14 +41,14 @@ void GUIEventControl::addEvent(Command* operation, SUMOTime execTimeStep) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSEventControl::addEvent(operation, execTimeStep); } void GUIEventControl::execute(SUMOTime execTime) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSEventControl::execute(execTime); } diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIEventControl.h sumo-1.2.0+dfsg1/src/guisim/GUIEventControl.h --- sumo-1.1.0+dfsg1/src/guisim/GUIEventControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIEventControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,16 +24,11 @@ // =========================================================================== #include +#include #include // =========================================================================== -// class declarations -// =========================================================================== -class MFXMutex; - - -// =========================================================================== // class definitions // =========================================================================== /** @@ -79,7 +74,7 @@ private: /// @brief The lock used to prohibit parallel addition and processing of events - MFXMutex myLock; + FXMutex myLock; private: diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIInductLoop.cpp sumo-1.2.0+dfsg1/src/guisim/GUIInductLoop.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIInductLoop.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIInductLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -42,8 +42,10 @@ * GUIInductLoop-methods * ----------------------------------------------------------------------- */ GUIInductLoop::GUIInductLoop(const std::string& id, MSLane* const lane, - double position, const std::string& vTypes) - : MSInductLoop(id, lane, position, vTypes) {} + double position, const std::string& vTypes) : + MSInductLoop(id, lane, position, vTypes), + myWrapper(nullptr) +{} GUIInductLoop::~GUIInductLoop() {} @@ -51,49 +53,61 @@ GUIDetectorWrapper* GUIInductLoop::buildDetectorGUIRepresentation() { - return new MyWrapper(*this, myPosition); + // caller (GUINet) takes responsibility for pointer + myWrapper = new MyWrapper(*this, myPosition); + return myWrapper; } void GUIInductLoop::reset() { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSInductLoop::reset(); } void -GUIInductLoop::enterDetectorByMove(SUMOVehicle& veh, double entryTimestep) { - AbstractMutex::ScopedLocker locker(myLock); +GUIInductLoop::enterDetectorByMove(SUMOTrafficObject& veh, double entryTimestep) { + FXMutexLock locker(myLock); MSInductLoop::enterDetectorByMove(veh, entryTimestep); } void -GUIInductLoop::leaveDetectorByMove(SUMOVehicle& veh, double leaveTimestep) { - AbstractMutex::ScopedLocker locker(myLock); +GUIInductLoop::leaveDetectorByMove(SUMOTrafficObject& veh, double leaveTimestep) { + FXMutexLock locker(myLock); MSInductLoop::leaveDetectorByMove(veh, leaveTimestep); } void -GUIInductLoop::leaveDetectorByLaneChange(SUMOVehicle& veh, double lastPos) { - AbstractMutex::ScopedLocker locker(myLock); +GUIInductLoop::leaveDetectorByLaneChange(SUMOTrafficObject& veh, double lastPos) { + FXMutexLock locker(myLock); MSInductLoop::leaveDetectorByLaneChange(veh, lastPos); } std::vector GUIInductLoop::collectVehiclesOnDet(SUMOTime t, bool leaveTime) const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSInductLoop::collectVehiclesOnDet(t, leaveTime); } + +void +GUIInductLoop::setSpecialColor(const RGBColor* color) { + if (myWrapper != nullptr) { + myWrapper->setSpecialColor(color); + } +} + + // ------------------------------------------------------------------------- // GUIInductLoop::MyWrapper-methods // ------------------------------------------------------------------------- GUIInductLoop::MyWrapper::MyWrapper(GUIInductLoop& detector, double pos) : GUIDetectorWrapper(GLO_E1DETECTOR, detector.getID()), - myDetector(detector), myPosition(pos) { + myDetector(detector), myPosition(pos), + mySpecialColor(nullptr) { myFGPosition = detector.getLane()->geometryPositionAtOffset(pos); myBoundary.add(myFGPosition.x() + (double) 5.5, myFGPosition.y() + (double) 5.5); myBoundary.add(myFGPosition.x() - (double) 5.5, myFGPosition.y() - (double) 5.5); @@ -163,9 +177,14 @@ glVertex2d(0, -2 + .1); glEnd(); + if (mySpecialColor == nullptr) { + glColor3d(1, 1, 1); + } else { + GLHelper::setColor(*mySpecialColor); + } + // outline if (width * exaggeration > 1) { - glColor3d(1, 1, 1); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glBegin(GL_QUADS); glVertex2f(0 - 1.0, 2); @@ -179,7 +198,6 @@ // position indicator if (width * exaggeration > 1) { glRotated(90, 0, 0, -1); - glColor3d(1, 1, 1); glBegin(GL_LINES); glVertex2d(0, 1.7); glVertex2d(0, -1.7); diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIInductLoop.h sumo-1.2.0+dfsg1/src/guisim/GUIInductLoop.h --- sumo-1.1.0+dfsg1/src/guisim/GUIInductLoop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIInductLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,7 +26,7 @@ // =========================================================================== #include -#include +#include #include #include #include "GUIDetectorWrapper.h" @@ -88,6 +88,9 @@ std::vector collectVehiclesOnDet(SUMOTime t, bool leaveTime = false) const; + /// @brief sets special caller for myWrapper + void setSpecialColor(const RGBColor* color); + protected: /// @name Methods that add and remove vehicles from internal container /// @{ @@ -100,7 +103,7 @@ * @param entryTimestep Timestep (not necessary integer) of entrance. * @see MSInductLoop::enterDetectorByMove() */ - void enterDetectorByMove(SUMOVehicle& veh, double entryTimestep); + void enterDetectorByMove(SUMOTrafficObject& veh, double entryTimestep); /** @brief Processes a vehicle that leaves the detector @@ -111,7 +114,7 @@ * @param leaveTimestep Timestep (not necessary integer) of leaving. * @see MSInductLoop::leaveDetectorByMove() */ - void leaveDetectorByMove(SUMOVehicle& veh, double leaveTimestep); + void leaveDetectorByMove(SUMOTrafficObject& veh, double leaveTimestep); /** @brief Removes a vehicle from the detector's map myVehiclesOnDet. @@ -121,7 +124,7 @@ * @param veh The leaving vehicle. * @param lastPos The last position of the leaving vehicle. */ - void leaveDetectorByLaneChange(SUMOVehicle& veh, double lastPos); + void leaveDetectorByLaneChange(SUMOTrafficObject& veh, double lastPos); /// @} @@ -174,6 +177,10 @@ /// @brief Returns the detector itself GUIInductLoop& getLoop(); + /// @brief set (outline) color for extra visualiaztion + void setSpecialColor(const RGBColor* color) { + mySpecialColor = color; + } private: /// @brief The wrapped detector @@ -191,6 +198,9 @@ /// @brief The position on the lane double myPosition; + /// @brief color for extra visualization + const RGBColor* mySpecialColor; + private: /// @brief Invalidated copy constructor. MyWrapper(const MyWrapper&); @@ -200,9 +210,13 @@ }; +private: + + /// @brief the glObject wrapper for this induction loop + MyWrapper* myWrapper; /// @brief Mutex preventing parallel read/write access to internal MSInductLoop state - mutable MFXMutex myLock; + mutable FXMutex myLock; }; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIInstantInductLoop.cpp sumo-1.2.0+dfsg1/src/guisim/GUIInstantInductLoop.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIInstantInductLoop.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIInstantInductLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIInstantInductLoop.h sumo-1.2.0+dfsg1/src/guisim/GUIInstantInductLoop.h --- sumo-1.1.0+dfsg1/src/guisim/GUIInstantInductLoop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIInstantInductLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,7 @@ // =========================================================================== #include -#include +#include #include #include #include "GUIDetectorWrapper.h" @@ -135,7 +135,7 @@ /// @brief Mutex preventing parallel read/write access to internal MSInductLoop state - mutable MFXMutex myLock; + mutable FXMutex myLock; }; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIJunctionWrapper.cpp sumo-1.2.0+dfsg1/src/guisim/GUIJunctionWrapper.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIJunctionWrapper.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIJunctionWrapper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,8 +34,11 @@ #include #include #include +#include #include #include +#include +#include #include #include #include @@ -52,9 +55,10 @@ // =========================================================================== // method definitions // =========================================================================== -GUIJunctionWrapper::GUIJunctionWrapper(MSJunction& junction) - : GUIGlObject(GLO_JUNCTION, junction.getID()), - myJunction(junction) { +GUIJunctionWrapper::GUIJunctionWrapper(MSJunction& junction, const std::string& tllID): + GUIGlObject(GLO_JUNCTION, junction.getID()), + myJunction(junction), + myTLLID(tllID) { if (myJunction.getShape().size() == 0) { Position pos = myJunction.getPosition(); myBoundary = Boundary(pos.x() - 1., pos.y() - 1., pos.x() + 1., pos.y() + 1.); @@ -64,16 +68,25 @@ myMaxSize = MAX2(myBoundary.getWidth(), myBoundary.getHeight()); myIsInternal = myJunction.getType() == NODETYPE_INTERNAL; myAmWaterway = myJunction.getIncoming().size() + myJunction.getOutgoing().size() > 0; - for (ConstMSEdgeVector::const_iterator it = myJunction.getIncoming().begin(); it != myJunction.getIncoming().end(); ++it) { - if (!(*it)->isInternal() && !isWaterway((*it)->getPermissions())) { - myAmWaterway = false; - break; + myAmRailway = myJunction.getIncoming().size() + myJunction.getOutgoing().size() > 0; + for (auto it = myJunction.getIncoming().begin(); it != myJunction.getIncoming().end() && (myAmWaterway || myAmRailway); ++it) { + if (!(*it)->isInternal()) { + if (!isWaterway((*it)->getPermissions())) { + myAmWaterway = false; + } + if (!isRailway((*it)->getPermissions())) { + myAmRailway = false; + } } } - for (ConstMSEdgeVector::const_iterator it = myJunction.getOutgoing().begin(); it != myJunction.getOutgoing().end(); ++it) { - if (!(*it)->isInternal() && !isWaterway((*it)->getPermissions())) { - myAmWaterway = false; - break; + for (auto it = myJunction.getOutgoing().begin(); it != myJunction.getOutgoing().end() && (myAmWaterway || myAmRailway); ++it) { + if (!(*it)->isInternal()) { + if (!isWaterway((*it)->getPermissions())) { + myAmWaterway = false; + } + if (!isRailway((*it)->getPermissions())) { + myAmRailway = false; + } } } } @@ -125,12 +138,11 @@ glPushMatrix(); glPushName(getGlID()); const double colorValue = getColorValue(s); - GLHelper::setColor(s.junctionColorer.getScheme().getColor(colorValue)); + const RGBColor color = s.junctionColorer.getScheme().getColor(colorValue); + GLHelper::setColor(color); // recognize full transparency and simply don't draw - GLfloat color[4]; - glGetFloatv(GL_CURRENT_COLOR, color); - if (color[3] != 0) { + if (color.alpha() != 0) { PositionVector shape = myJunction.getShape(); shape.closePolygon(); if (exaggeration > 1) { @@ -159,6 +171,16 @@ drawName(myJunction.getPosition(), s.scale, s.internalJunctionName, s.angle); } else { drawName(myJunction.getPosition(), s.scale, s.junctionName, s.angle); + if (s.tlsPhaseIndex.show && myTLLID != "") { + const MSTrafficLightLogic* active = MSNet::getInstance()->getTLSControl().getActive(myTLLID); + const int index = active->getCurrentPhaseIndex(); + const std::string& name = active->getCurrentPhaseDef().getName(); + GLHelper::drawTextSettings(s.tlsPhaseIndex, toString(index), myJunction.getPosition(), s.scale, s.angle); + if (name != "") { + const Position offset = Position(0, 0.8 * s.tlsPhaseIndex.scaledSize(s.scale)).rotateAround2D(DEG2RAD(-s.angle), Position(0, 0)); + GLHelper::drawTextSettings(s.tlsPhaseIndex, name, myJunction.getPosition() - offset, s.scale, s.angle); + } + } } } @@ -169,6 +191,8 @@ case 0: if (myAmWaterway) { return 1; + } else if (myAmRailway && MSNet::getInstance()->hasInternalLinks()) { + return 2; } else { return 0; } @@ -216,7 +240,6 @@ } } - #ifdef HAVE_OSG void GUIJunctionWrapper::updateColor(const GUIVisualizationSettings& s) { diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIJunctionWrapper.h sumo-1.2.0+dfsg1/src/guisim/GUIJunctionWrapper.h --- sumo-1.1.0+dfsg1/src/guisim/GUIJunctionWrapper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIJunctionWrapper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -63,7 +63,7 @@ /** @brief Constructor * @param[in] junction The represented junction */ - GUIJunctionWrapper(MSJunction& junction); + GUIJunctionWrapper(MSJunction& junction, const std::string& tllID); /// @brief Destructor @@ -157,6 +157,11 @@ /// @brief whether this junction has only waterways as incoming and outgoing edges bool myAmWaterway; + /// @brief whether this junction has only railways as incoming and outgoing edges + bool myAmRailway; + + /// @brief the associated traffic light or "" + const std::string myTLLID; #ifdef HAVE_OSG osg::Geometry* myGeom; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUILane.cpp sumo-1.2.0+dfsg1/src/guisim/GUILane.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUILane.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUILane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -80,7 +80,8 @@ #ifdef HAVE_OSG myGeom(0), #endif - myAmClosed(false) { + myAmClosed(false), + myLock(true) { if (MSGlobals::gUseMesoSim) { myShape = splitAtSegments(shape); assert(fabs(myShape.length() - shape.length()) < POSITION_EPS); @@ -115,7 +116,7 @@ GUILane::incorporateVehicle(MSVehicle* veh, double pos, double speed, double posLat, const MSLane::VehCont::iterator& at, MSMoveReminder::Notification notification) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSLane::incorporateVehicle(veh, pos, speed, posLat, at, notification); } @@ -136,69 +137,69 @@ void GUILane::planMovements(const SUMOTime t) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSLane::planMovements(t); } void -GUILane::setJunctionApproaches(const SUMOTime t) { - AbstractMutex::ScopedLocker locker(myLock); +GUILane::setJunctionApproaches(const SUMOTime t) const { + FXMutexLock locker(myLock); MSLane::setJunctionApproaches(t); } -bool -GUILane::executeMovements(SUMOTime t, std::vector& into) { - AbstractMutex::ScopedLocker locker(myLock); - return MSLane::executeMovements(t, into); +void +GUILane::executeMovements(const SUMOTime t) { + FXMutexLock locker(myLock); + MSLane::executeMovements(t); } MSVehicle* GUILane::removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification, bool notify) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSLane::removeVehicle(remVehicle, notification, notify); } void GUILane::removeParking(MSVehicle* remVehicle) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSLane::removeParking(remVehicle); } void GUILane::swapAfterLaneChange(SUMOTime t) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSLane::swapAfterLaneChange(t); } -bool -GUILane::integrateNewVehicle(SUMOTime t) { - AbstractMutex::ScopedLocker locker(myLock); - return MSLane::integrateNewVehicle(t); +void +GUILane::integrateNewVehicles() { + FXMutexLock locker(myLock); + MSLane::integrateNewVehicles(); } void GUILane::detectCollisions(SUMOTime timestep, const std::string& stage) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSLane::detectCollisions(timestep, stage); } double GUILane::setPartialOccupation(MSVehicle* v) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSLane::setPartialOccupation(v); } void GUILane::resetPartialOccupation(MSVehicle* v) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSLane::resetPartialOccupation(v); } @@ -293,8 +294,8 @@ return; } // draw all links - double w = myWidth / (double) noLinks; - double x1 = 0; + const double w = myWidth / (double) noLinks; + double x1 = myEdge->getToJunction()->getType() == NODETYPE_RAIL_SIGNAL ? -myWidth * 0.5 : 0; const bool lefthand = MSNet::getInstance()->lefthand(); for (int i = 0; i < noLinks; ++i) { double x2 = x1 + w; @@ -367,6 +368,11 @@ 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 + double scale = isInternal() ? 0.5 : 1; + if (myEdge->getToJunction()->getType() == NODETYPE_RAIL_SIGNAL) { + scale *= MAX2(s.laneWidthExaggeration, s.junctionSize.getExaggeration(s, this, 10)); + } + glScaled(scale, scale, 1); glBegin(GL_QUADS); glVertex2d(x1 - myHalfLaneWidth, 0.0); glVertex2d(x1 - myHalfLaneWidth, 0.5); @@ -459,8 +465,8 @@ } GLHelper::setColor(GUIVisualizationSettings::getLinkColor((*i)->getState())); glBegin(GL_LINES); - Position p1 = getShape()[-1]; - Position p2 = connected->getShape()[0]; + Position p1 = myEdge->isWalkingArea() ? getShape().getCentroid() : getShape()[-1]; + Position p2 = connected->getEdge().isWalkingArea() ? connected->getShape().getCentroid() : connected->getShape()[0]; if (exaggeration > 1) { p1 = centroid + ((p1 - centroid) * exaggeration); p2 = centroid + ((p2 - centroid) * exaggeration); @@ -488,7 +494,9 @@ } else { exaggeration *= s.laneScaler.getScheme().getColor(getScaleValue(s.laneScaler.getActive())); } - const bool drawDetails = (s.scale * exaggeration > 5 || s.junctionSize.minSize == 0) && !s.drawForSelecting; + const bool hasRailSignal = myEdge->getToJunction()->getType() == NODETYPE_RAIL_SIGNAL; + const bool detailZoom = s.scale * exaggeration > 5; + const bool drawDetails = (detailZoom || s.junctionSize.minSize == 0 || hasRailSignal) && !s.drawForSelecting; if (isCrossing || isWalkingArea) { // draw internal lanes on top of junctions glTranslated(0, 0, GLO_JUNCTION + 0.1); @@ -499,7 +507,7 @@ glTranslated(0, 0, getType()); } // set lane color - setColor(s); + const RGBColor color = setColor(s); if (MSGlobals::gUseMesoSim) { myShapeColors.clear(); const std::vector& segmentColors = static_cast(myEdge)->getSegmentColors(); @@ -512,10 +520,8 @@ } } // recognize full transparency and simply don't draw - GLfloat color[4]; - glGetFloatv(GL_CURRENT_COLOR, color); bool hiddenBidi = myEdge->getBidiEdge() != nullptr && myEdge->getNumericalID() > myEdge->getBidiEdge()->getNumericalID(); - if (color[3] != 0 && s.scale * exaggeration > s.laneMinSize) { + if (color.alpha() != 0 && s.scale * exaggeration > s.laneMinSize) { // scale tls-controlled lane2lane-arrows along with their junction shapes double junctionExaggeration = 1; if (!isInternal @@ -526,7 +532,7 @@ // draw lane // check whether it is not too small if (s.scale * exaggeration < 1. && junctionExaggeration == 1 && s.junctionSize.minSize != 0) { - if (!isInternal) { + if (!isInternal || hasRailSignal) { if (myShapeColors.size() > 0) { GLHelper::drawLine(myShape, myShapeColors); } else { @@ -536,28 +542,36 @@ glPopMatrix(); } else { GUINet* net = (GUINet*) MSNet::getInstance(); - if (hiddenBidi) { + const bool spreadSuperposed = s.spreadSuperposed && myEdge->getBidiEdge() != nullptr && drawAsRailway(s); + if (hiddenBidi && !spreadSuperposed) { // do not draw shape - } else if (drawAsRailway(s)) { + } else if (drawAsRailway(s) && (!s.drawForSelecting || spreadSuperposed)) { // draw as railway: assume standard gauge of 1435mm when lane width is not set // draw foot width 150mm, assume that distance between rail feet inner sides is reduced on both sides by 39mm with regard to the gauge // assume crosstie length of 181% gauge (2600mm for standard gauge) + PositionVector shape = myShape; const double width = myWidth; - const double halfGauge = 0.5 * (width == SUMO_const_laneWidth ? 1.4350 : width) * exaggeration; + double halfGauge = 0.5 * (width == SUMO_const_laneWidth ? 1.4350 : width) * exaggeration; + if (spreadSuperposed) { + shape.move2side(halfGauge * 0.8); + halfGauge *= 0.4; + } const double halfInnerFeetWidth = halfGauge - 0.039 * exaggeration; - const double halfRailWidth = halfInnerFeetWidth + 0.15 * exaggeration; + const double halfRailWidth = detailZoom ? (halfInnerFeetWidth + 0.15 * exaggeration) : SUMO_const_halfLaneWidth; const double halfCrossTieWidth = halfGauge * 1.81; if (myShapeColors.size() > 0) { - GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, myShapeColors, halfRailWidth); + GLHelper::drawBoxLines(shape, myShapeRotations, myShapeLengths, myShapeColors, halfRailWidth); } else { - GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, halfRailWidth); + GLHelper::drawBoxLines(shape, myShapeRotations, myShapeLengths, halfRailWidth); } // Draw white on top with reduced width (the area between the two tracks) - glColor3d(1, 1, 1); - glTranslated(0, 0, .1); - GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, halfInnerFeetWidth); - setColor(s); - GLHelper::drawCrossTies(myShape, myShapeRotations, myShapeLengths, 0.26 * exaggeration, 0.6 * exaggeration, halfCrossTieWidth, s.drawForSelecting); + if (detailZoom) { + glColor3d(1, 1, 1); + glTranslated(0, 0, .1); + GLHelper::drawBoxLines(shape, myShapeRotations, myShapeLengths, halfInnerFeetWidth); + setColor(s); + GLHelper::drawCrossTies(shape, myShapeRotations, myShapeLengths, 0.26 * exaggeration, 0.6 * exaggeration, halfCrossTieWidth, s.drawForSelecting); + } } else if (isCrossing) { if (s.drawCrossingsAndWalkingareas && (s.scale > 3.0 || s.junctionSize.minSize == 0)) { glTranslated(0, 0, .2); @@ -614,11 +628,11 @@ glColor3d(0.3, 0.3, 0.3); } if (!isCrossing || s.drawCrossingsAndWalkingareas) { - drawDirectionIndicators(exaggeration); + drawDirectionIndicators(exaggeration, spreadSuperposed); } } - if (!isInternal) { - if (MSGlobals::gLateralResolution > 0 && s.showSublanes && !hiddenBidi) { + if ((!isInternal || isCrossing)) { + if (MSGlobals::gLateralResolution > 0 && s.showSublanes && !hiddenBidi && !isCrossing) { // draw sublane-borders GLHelper::setColor(GLHelper::getColor().changedBrightness(51)); for (double offset = -myHalfLaneWidth; offset < myHalfLaneWidth; offset += MSGlobals::gLateralResolution) { @@ -640,7 +654,8 @@ glTranslated(0, 0, .1); } // make sure link rules are drawn so tls can be selected via right-click - if (s.showLinkRules && (drawDetails || s.drawForSelecting)) { + if (s.showLinkRules && (drawDetails || s.drawForSelecting) + && (!myEdge->isInternal() || getLinkCont()[0]->isInternalJunctionLink())) { drawLinkRules(s, *net); } if ((drawDetails || junctionExaggeration > 1) && s.showLane2Lane) { @@ -747,13 +762,15 @@ } void -GUILane::drawDirectionIndicators(double exaggeration) const { +GUILane::drawDirectionIndicators(double exaggeration, bool spreadSuperposed) const { glPushMatrix(); glTranslated(0, 0, GLO_EDGE); int e = (int) getShape().size() - 1; - const double w = MAX2(POSITION_EPS, myWidth); - const double w2 = MAX2(POSITION_EPS, myHalfLaneWidth); - const double w4 = MAX2(POSITION_EPS, myQuarterLaneWidth); + const double widthFactor = spreadSuperposed ? 0.4 : 1; + const double w = MAX2(POSITION_EPS, myWidth * widthFactor); + const double w2 = MAX2(POSITION_EPS, myHalfLaneWidth * widthFactor); + const double w4 = MAX2(POSITION_EPS, myQuarterLaneWidth * widthFactor); + const double sideOffset = spreadSuperposed ? w * -0.5 : 0; for (int i = 0; i < e; ++i) { glPushMatrix(); glTranslated(getShape()[i].x(), getShape()[i].y(), 0.1); @@ -761,9 +778,9 @@ for (double t = 0; t < myShapeLengths[i]; t += w) { const double length = MIN2(w2, myShapeLengths[i] - t) * exaggeration; glBegin(GL_TRIANGLES); - glVertex2d(0, -t - length); - glVertex2d(-w4 * exaggeration, -t); - glVertex2d(+w4 * exaggeration, -t); + glVertex2d(sideOffset, -t - length); + glVertex2d(sideOffset - w4 * exaggeration, -t); + glVertex2d(sideOffset + w4 * exaggeration, -t); glEnd(); } glPopMatrix(); @@ -808,8 +825,8 @@ buildSelectionPopupEntry(ret); // buildShowParamsPopupEntry(ret, false); - const double pos = interpolateGeometryPosToLanePos(myShape.nearest_offset_to_point2D(parent.getPositionInformation())); - const double height = myShape.positionAtOffset2D(myShape.nearest_offset_to_point2D(parent.getPositionInformation())).z(); + const double pos = interpolateGeometryPosToLanePos(myShape.nearest_offset_to_point25D(parent.getPositionInformation())); + const double height = myShape.positionAtOffset(pos).z(); new FXMenuCommand(ret, ("pos: " + toString(pos) + " height: " + toString(height)).c_str(), nullptr, nullptr, 0); new FXMenuSeparator(ret); buildPositionCopyEntry(ret, false); @@ -975,12 +992,12 @@ case 30: { // taz color col = c.getScheme().getColor(0); std::vector tazColors; - for (MSEdge* e: myEdge->getPredecessors()) { + for (MSEdge* e : myEdge->getPredecessors()) { if (e->isTazConnector() && e->knowsParameter("tazColor")) { tazColors.push_back(RGBColor::parseColor(e->getParameter("tazColor"))); } } - for (MSEdge* e: myEdge->getSuccessors()) { + for (MSEdge* e : myEdge->getSuccessors()) { if (e->isTazConnector() && e->knowsParameter("tazColor")) { tazColors.push_back(RGBColor::parseColor(e->getParameter("tazColor"))); } @@ -1130,8 +1147,12 @@ try { return StringUtils::toDouble(myEdge->getParameter(s.edgeParam, "0")); } catch (NumberFormatException&) { - WRITE_WARNING("Edge parameter '" + myEdge->getParameter(s.edgeParam, "0") + "' key '" + s.edgeParam + "' is not a number for edge '" + myEdge->getID() + "'"); - return 0; + try { + return StringUtils::toBool(myEdge->getParameter(s.edgeParam, "0")); + } catch (BoolFormatException&) { + WRITE_WARNING("Edge parameter '" + myEdge->getParameter(s.edgeParam, "0") + "' key '" + s.edgeParam + "' is not a number for edge '" + myEdge->getID() + "'"); + return -1; + } } } case 32: { @@ -1139,10 +1160,18 @@ try { return StringUtils::toDouble(getParameter(s.laneParam, "0")); } catch (NumberFormatException&) { - WRITE_WARNING("Lane parameter '" + getParameter(s.laneParam, "0") + "' key '" + s.laneParam + "' is not a number for lane '" + getID() + "'"); - return 0; + try { + return StringUtils::toBool(getParameter(s.laneParam, "0")); + } catch (BoolFormatException&) { + WRITE_WARNING("Lane parameter '" + getParameter(s.laneParam, "0") + "' key '" + s.laneParam + "' is not a number for lane '" + getID() + "'"); + return -1; + } } } + case 33: { + // by edge data value + return GUINet::getGUIInstance()->getEdgeData(myEdge, s.edgeData); + } } return 0; } @@ -1220,7 +1249,7 @@ bool GUILane::drawAsRailway(const GUIVisualizationSettings& s) const { - return isRailway(myPermissions) && s.showRails && !s.drawForSelecting; + return isRailway(myPermissions) && s.showRails && (!s.drawForSelecting || s.spreadSuperposed); } diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUILane.h sumo-1.2.0+dfsg1/src/guisim/GUILane.h --- sumo-1.1.0+dfsg1/src/guisim/GUILane.h 2018-11-09 23:00:30.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUILane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -127,15 +126,15 @@ /** 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 setJunctionApproaches(const SUMOTime t); + void setJunctionApproaches(const SUMOTime t) const; /** the same as in MSLane, but locks the access for the visualisation first; the access will be granted at the end of this method */ - bool executeMovements(SUMOTime t, std::vector& into); + void executeMovements(const SUMOTime t); /** the same as in MSLane, but locks the access for the visualisation first; the access will be granted at the end of this method */ - bool integrateNewVehicle(SUMOTime t); + void integrateNewVehicles(); ///@} @@ -221,7 +220,7 @@ void drawBikeMarkings() const; /// @brief direction indicators for lanes - void drawDirectionIndicators(double exaggeration) const; + void drawDirectionIndicators(double exaggeration, bool spreadSuperposed) const; /// @brief draw intersection positions of foe internal lanes with this one void debugDrawFoeIntersections() const; @@ -261,7 +260,11 @@ /* @brief sets the color according to the current scheme index and some lane function * @param[in] id override active scheme when calling from meso gui */ - bool setFunctionalColor(const GUIColorer& c, RGBColor& col, int activeScheme=-1) const; + bool setFunctionalColor(const GUIColorer& c, RGBColor& col, int activeScheme = -1) const; + + /// @brief whether to draw this lane as a railway + bool drawAsRailway(const GUIVisualizationSettings& s) const; + protected: /// moves myTmpVehicles int myVehicles after a lane change procedure @@ -310,9 +313,6 @@ /// @brief sets the color according to the currente settings RGBColor 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; @@ -346,7 +346,7 @@ private: /// The mutex used to avoid concurrent updates of the vehicle buffer - mutable MFXMutex myLock; + mutable FXMutex myLock; /// @brief special color to signify alternative coloring scheme static const RGBColor MESO_USE_LANE_COLOR; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUILaneSpeedTrigger.cpp sumo-1.2.0+dfsg1/src/guisim/GUILaneSpeedTrigger.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUILaneSpeedTrigger.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUILaneSpeedTrigger.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUILaneSpeedTrigger.h sumo-1.2.0+dfsg1/src/guisim/GUILaneSpeedTrigger.h --- sumo-1.1.0+dfsg1/src/guisim/GUILaneSpeedTrigger.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUILaneSpeedTrigger.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUINet.cpp sumo-1.2.0+dfsg1/src/guisim/GUINet.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUINet.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUINet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,11 +31,14 @@ #include #include #include +#include #include +#include #include #include #include #include +#include #include #include #include @@ -62,10 +65,10 @@ // definition of static variables used for visualisation of objects' values // =========================================================================== template std::vector< GLObjectValuePassConnector* > GLObjectValuePassConnector::myContainer; -template MFXMutex GLObjectValuePassConnector::myLock; +template FXMutex GLObjectValuePassConnector::myLock; template std::vector< GLObjectValuePassConnector >* > GLObjectValuePassConnector >::myContainer; -template MFXMutex GLObjectValuePassConnector >::myLock; +template FXMutex GLObjectValuePassConnector >::myLock; // =========================================================================== @@ -89,18 +92,21 @@ // delete allocated wrappers // of junctions for (std::vector::iterator i1 = myJunctionWrapper.begin(); i1 != myJunctionWrapper.end(); i1++) { - delete(*i1); + delete (*i1); } // of additional structures GUIGlObject_AbstractAdd::clearDictionary(); // of tl-logics for (Logics2WrapperMap::iterator i3 = myLogics2Wrapper.begin(); i3 != myLogics2Wrapper.end(); i3++) { - delete(*i3).second; + delete (*i3).second; } // of detectors for (std::vector::iterator i = myDetectorWrapper.begin(); i != myDetectorWrapper.end(); ++i) { delete *i; } + for (auto& item : myLoadedEdgeData) { + delete item.second; + } } @@ -132,8 +138,6 @@ GUINet::initTLMap() { // get the list of loaded tl-logics const std::vector& logics = getTLSControl().getAllLogics(); - // allocate storage for the wrappers - myTLLogicWrapper.reserve(logics.size()); // go through the logics for (std::vector::const_iterator i = logics.begin(); i != logics.end(); ++i) { createTLWrapper(*i); @@ -218,7 +222,7 @@ void GUINet::simulationStep() { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSNet::simulationStep(); } @@ -277,8 +281,16 @@ // initialise junction storage for gui int size = myJunctions->size(); myJunctionWrapper.reserve(size); + std::map junction2TLL; + for (const auto tls : getTLSControl().getAllLogics()) { + for (const auto& links : tls->getLinks()) { + for (const MSLink* l : links) { + junction2TLL[l->getJunction()] = l->getTLLogic()->getID(); + } + } + } for (const auto& i : *myJunctions) { - myJunctionWrapper.push_back(new GUIJunctionWrapper(*i.second)); + myJunctionWrapper.push_back(new GUIJunctionWrapper(*i.second, junction2TLL[i.second])); } // build the visualization tree for (std::vector::iterator i = myEdgeWrapper.begin(); i != myEdgeWrapper.end(); ++i) { @@ -409,9 +421,9 @@ GUIParameterTableWindow* GUINet::getParameterWindow(GUIMainWindow& app, - GUISUMOAbstractView&) { + GUISUMOAbstractView& parent) { GUIParameterTableWindow* ret = - new GUIParameterTableWindow(app, *this, 35); + new GUIParameterTableWindow(app, *this, 36); // add items ret->mkItem("loaded vehicles [#]", true, new FunctionBinding(&getVehicleControl(), &MSVehicleControl::getLoadedVehicleNo)); @@ -448,6 +460,7 @@ // ret->mkItem("time step [s]", true, new FunctionBinding(this, &GUINet::getCurrentTimeStep)); if (logSimulationDuration()) { ret->mkItem("step duration [ms]", true, new FunctionBinding(this, &GUINet::getWholeDuration)); + ret->mkItem("FPS", true, new FunctionBinding(&parent, &GUISUMOAbstractView::getFPS)); ret->mkItem("simulation duration [ms]", true, new FunctionBinding(this, &GUINet::getSimDuration)); /* ret->mkItem("visualisation duration [ms]", true, @@ -532,6 +545,92 @@ } +double +GUINet::getEdgeData(const MSEdge* edge, const std::string& attr) { + auto it = myLoadedEdgeData.find(attr); + if (it != myLoadedEdgeData.end()) { + double value; + bool found = it->second->retrieveExistingEffort(edge, STEPS2TIME(getCurrentTimeStep()), value); + if (found) { + return value; + } else { + return -1; + } + } else { + return -2; + } +} + + +void +GUINet::DiscoverAttributes::myStartElement(int element, const SUMOSAXAttributes& attrs) { + if (element == SUMO_TAG_EDGE || element == SUMO_TAG_LANE) { + std::vector tmp = attrs.getAttributeNames(); + edgeAttrs.insert(tmp.begin(), tmp.end()); + } else if (element == SUMO_TAG_INTERVAL) { + bool ok; + lastIntervalEnd = MAX2(lastIntervalEnd, attrs.getSUMOTimeReporting(SUMO_ATTR_END, nullptr, ok)); + } +} + +std::vector +GUINet::DiscoverAttributes::getEdgeAttrs() { + edgeAttrs.erase(toString(SUMO_ATTR_ID)); + return std::vector(edgeAttrs.begin(), edgeAttrs.end()); +} + +void +GUINet::EdgeFloatTimeLineRetriever_GUI::addEdgeWeight(const std::string& id, + double value, double begTime, double endTime) const { + MSEdge* edge = MSEdge::dictionary(id); + if (edge != nullptr) { + myWeightStorage->addEffort(edge, begTime, endTime, value); + } else { + WRITE_ERROR("Trying to set the effort for the unknown edge '" + id + "'."); + } +} + + +bool +GUINet::loadEdgeData(const std::string& file) { + // discover edge attributes + DiscoverAttributes discoveryHandler(file); + XMLSubSys::runParser(discoveryHandler, file); + std::vector attrs = discoveryHandler.getEdgeAttrs(); + WRITE_MESSAGE("Loading edgedata from '" + file + + "' Found " + toString(attrs.size()) + + " attributes: " + toString(attrs)); + myEdgeDataEndTime = MAX2(myEdgeDataEndTime, discoveryHandler.lastIntervalEnd); + // create a retriever for each attribute + std::vector retrieverDefsInternal; + retrieverDefsInternal.reserve(attrs.size()); + std::vector retrieverDefs; + for (const std::string& attr : attrs) { + MSEdgeWeightsStorage* ws = new MSEdgeWeightsStorage(); + myLoadedEdgeData[attr] = ws; + retrieverDefsInternal.push_back(EdgeFloatTimeLineRetriever_GUI(ws)); + retrieverDefs.push_back(new SAXWeightsHandler::ToRetrieveDefinition(attr, true, retrieverDefsInternal.back())); + } + SAXWeightsHandler handler(retrieverDefs, ""); + return XMLSubSys::runParser(handler, file); +} + + +std::vector +GUINet::getEdgeDataAttrs() const { + std::vector result; + for (const auto& item : myLoadedEdgeData) { + result.push_back(item.first); + } + return result; +} + +bool +GUINet::isSelected(const MSTrafficLightLogic* tll) const { + const auto it = myLogics2Wrapper.find(const_cast(tll)); + return it != myLogics2Wrapper.end() && gSelected.isSelected(GLO_TLLOGIC, it->second->getGlID()); +} + #ifdef HAVE_OSG void GUINet::updateColor(const GUIVisualizationSettings& s) { diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUINet.h sumo-1.2.0+dfsg1/src/guisim/GUINet.h --- sumo-1.1.0+dfsg1/src/guisim/GUINet.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUINet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include #include #include @@ -57,7 +59,6 @@ class GUIVehicle; class GUIVehicleControl; class MSVehicleControl; -class MFXMutex; class GUIMEVehicleControl; @@ -100,6 +101,13 @@ ~GUINet(); + /** + * @brief Returns whether this is a GUI Net + */ + bool isGUINet() const override { + return true; + } + /// @name inherited from GUIGlObject //@{ @@ -111,8 +119,7 @@ * @return The built popup-menu * @see GUIGlObject::getPopUpMenu */ - GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, - GUISUMOAbstractView& parent); + GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) override; /** @brief Returns an own parameter window @@ -122,8 +129,7 @@ * @return The built parameter window * @see GUIGlObject::getParameterWindow */ - GUIParameterTableWindow* getParameterWindow( - GUIMainWindow& app, GUISUMOAbstractView& parent); + GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent) override; /** @brief Returns the boundary to which the view shall be centered in order to show the object @@ -131,14 +137,14 @@ * @return The boundary the object is within * @see GUIGlObject::getCenteringBoundary */ - Boundary getCenteringBoundary() const; + Boundary getCenteringBoundary() const override; /** @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; + void drawGL(const GUIVisualizationSettings& s) const override; //@} @@ -237,7 +243,7 @@ * @see MSPersonControl * @see myPersonControl */ - MSTransportableControl& getPersonControl(); + MSTransportableControl& getPersonControl() override; /** @brief Returns the container control @@ -248,7 +254,7 @@ * @see MSContainerControl * @see myContainerControl */ - MSTransportableControl& getContainerControl(); + MSTransportableControl& getContainerControl() override; /** Returns the gl-id of the traffic light that controls the given link @@ -306,6 +312,16 @@ */ GUIMEVehicleControl* getGUIMEVehicleControl(); + /// @brief retrieve loaded edged weight for the given attribute and the current simulation time + double getEdgeData(const MSEdge* edge, const std::string& attr); + + /// @brief load edgeData from file + bool loadEdgeData(const std::string& file); + + + /// @brief return list of loaded edgeData attributes + std::vector getEdgeDataAttrs() const; + #ifdef HAVE_OSG void updateColor(const GUIVisualizationSettings& s); #endif @@ -323,8 +339,10 @@ static GUINet* getGUIInstance(); /// @brief creates a wrapper for the given logic - void createTLWrapper(MSTrafficLightLogic* tll); + void createTLWrapper(MSTrafficLightLogic* tll) override; + /// @brief return wheter the given logic (or rather it's wrapper) is selected in the GUI + bool isSelected(const MSTrafficLightLogic* tll) const override; private: /// @brief Initialises the tl-logic map and wrappers @@ -345,9 +363,6 @@ /// @brief Wrapped MS-junctions std::vector myJunctionWrapper; - /// @brief Wrapped TL-Logics - std::vector myTLLogicWrapper; - /// @brief A detector dictionary std::vector myDetectorWrapper; @@ -370,9 +385,49 @@ long myLastVehicleMovementCount, myOverallVehicleCount; long myOverallSimDuration; + /// @brief loaded edge data for visualization + std::map myLoadedEdgeData; + + /// @brief class for discovering edge attributes + class DiscoverAttributes : public SUMOSAXHandler { + public: + DiscoverAttributes(const std::string& file): + SUMOSAXHandler(file), lastIntervalEnd(0) {}; + ~DiscoverAttributes() {}; + void myStartElement(int element, const SUMOSAXAttributes& attrs); + std::vector getEdgeAttrs(); + SUMOTime lastIntervalEnd; + private: + std::set edgeAttrs; + }; + + class EdgeFloatTimeLineRetriever_GUI : public SAXWeightsHandler::EdgeFloatTimeLineRetriever { + public: + /// @brief Constructor + EdgeFloatTimeLineRetriever_GUI(MSEdgeWeightsStorage* weightStorage) : myWeightStorage(weightStorage) {} + + /// @brief Destructor + ~EdgeFloatTimeLineRetriever_GUI() { } + + /** @brief Adds an effort for a given edge and time period + * + * @param[in] id The id of the object to add a weight for + * @param[in] val The effort + * @param[in] beg The begin of the interval the weight is valid for + * @param[in] end The end of the interval the weight is valid for + * @see SAXWeightsHandler::EdgeFloatTimeLineRetriever::addEdgeWeight + */ + void addEdgeWeight(const std::string& id, double val, double beg, double end) const; + + private: + /// @brief The storage that edges shall be added to + MSEdgeWeightsStorage* myWeightStorage; + + }; + private: /// The mutex used to avoid concurrent updates of the vehicle buffer - mutable MFXMutex myLock; + mutable FXMutex myLock; }; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIParkingArea.cpp sumo-1.2.0+dfsg1/src/guisim/GUIParkingArea.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIParkingArea.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIParkingArea.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -192,10 +192,6 @@ } glPopName(); drawName(getCenteringBoundary().getCenter(), s.scale, s.addName, s.angle); - for (std::vector::const_iterator i = myWaitingTransportables.begin(); i != myWaitingTransportables.end(); ++i) { - glTranslated(0, 1, 0); // make multiple containers viewable - static_cast(*i)->drawGL(s); - } // draw parking vehicles (their lane might not be within drawing range. if it is, they are drawn twice) myLane.getVehiclesSecure(); for (std::set::const_iterator v = myLane.getParkingVehicles().begin(); v != myLane.getParkingVehicles().end(); ++v) { @@ -205,12 +201,12 @@ } -void +void GUIParkingArea::addLotEntry(double x, double y, double z, - double width, double length, double angle) { + double width, double length, double angle) { MSParkingArea::addLotEntry(x, y, z, width, length, angle); Boundary b; - b.add(Position(x,y)); + b.add(Position(x, y)); b.grow(MAX2(width, length) + 5); myBoundary.add(b); } @@ -221,6 +217,10 @@ } +const std::string +GUIParkingArea::getOptionalName() const { + return myName; +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIParkingArea.h sumo-1.2.0+dfsg1/src/guisim/GUIParkingArea.h --- sumo-1.1.0+dfsg1/src/guisim/GUIParkingArea.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIParkingArea.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -119,9 +119,12 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the stopping place name + const std::string getOptionalName() const; + /// @brief extend boundary void addLotEntry(double x, double y, double z, - double width, double length, double angle); + double width, double length, double angle); /** @brief Draws the object * @param[in] s The settings for the current view (may influence drawing) diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIPerson.cpp sumo-1.2.0+dfsg1/src/guisim/GUIPerson.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIPerson.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIPerson.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -286,9 +285,11 @@ glScaled(upscale, upscale, 1); switch (s.personQuality) { case 0: - case 1: drawAction_drawAsTriangle(s); break; + case 1: + drawAction_drawAsCircle(s); + break; case 2: drawAction_drawAsPoly(s); break; @@ -435,21 +436,21 @@ double GUIPerson::getEdgePos() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSPerson::getEdgePos(); } Position GUIPerson::getPosition() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSPerson::getPosition(); } Position GUIPerson::getGUIPosition() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); if (getCurrentStageType() == DRIVING && !isWaiting4Vehicle() && myPositionInVehicle != Position::INVALID) { return myPositionInVehicle; } else { @@ -460,21 +461,21 @@ double GUIPerson::getNaviDegree() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return GeomHelper::naviDegree(MSPerson::getAngle()); } double GUIPerson::getWaitingSeconds() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSPerson::getWaitingSeconds(); } double GUIPerson::getSpeed() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSPerson::getSpeed(); } @@ -501,6 +502,13 @@ } +void +GUIPerson::drawAction_drawAsCircle(const GUIVisualizationSettings& /* s */) const { + glScaled(getVehicleType().getLength(), getVehicleType().getLength(), 1); + GLHelper::drawFilledCircle(0.8); +} + + void GUIPerson::drawAction_drawAsPoly(const GUIVisualizationSettings& /* s */) const { // draw pedestrian shape diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIPerson.h sumo-1.2.0+dfsg1/src/guisim/GUIPerson.h --- sumo-1.1.0+dfsg1/src/guisim/GUIPerson.h 2018-06-12 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIPerson.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include #include -#include #include @@ -242,7 +242,7 @@ private: /// The mutex used to avoid concurrent updates of the vehicle buffer - mutable MFXMutex myLock; + mutable FXMutex myLock; /// The position of a person while riding a vehicle Position myPositionInVehicle; @@ -259,6 +259,7 @@ /// @name drawing helper methods /// @{ void drawAction_drawAsTriangle(const GUIVisualizationSettings& s) const; + void drawAction_drawAsCircle(const GUIVisualizationSettings& s) const; void drawAction_drawAsPoly(const GUIVisualizationSettings& s) const; void drawAction_drawAsImage(const GUIVisualizationSettings& s) const; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.cpp sumo-1.2.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -156,6 +156,10 @@ buildNameCopyPopupEntry(ret); buildSelectionPopupEntry(ret); new FXMenuCommand(ret, ("phase: " + toString(tll->getCurrentPhaseIndex())).c_str(), nullptr, nullptr, 0); + const std::string& name = myTLLogic.getCurrentPhaseDef().getName(); + if (name != "") { + new FXMenuCommand(ret, ("phase name: " + name).c_str(), nullptr, nullptr, 0); + } new FXMenuSeparator(ret); buildShowParamsPopupEntry(ret, false); buildPositionCopyEntry(ret, false); diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.h sumo-1.2.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.h --- sumo-1.1.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUITrafficLightLogicWrapper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUITransportableControl.cpp sumo-1.2.0+dfsg1/src/guisim/GUITransportableControl.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUITransportableControl.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUITransportableControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUITransportableControl.h sumo-1.2.0+dfsg1/src/guisim/GUITransportableControl.h --- sumo-1.1.0+dfsg1/src/guisim/GUITransportableControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUITransportableControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUITriggeredRerouter.cpp sumo-1.2.0+dfsg1/src/guisim/GUITriggeredRerouter.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUITriggeredRerouter.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUITriggeredRerouter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUITriggeredRerouter.h sumo-1.2.0+dfsg1/src/guisim/GUITriggeredRerouter.h --- sumo-1.1.0+dfsg1/src/guisim/GUITriggeredRerouter.h 2018-07-02 22:00:11.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUITriggeredRerouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIVehicleControl.cpp sumo-1.2.0+dfsg1/src/guisim/GUIVehicleControl.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIVehicleControl.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIVehicleControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,7 @@ // =========================================================================== #include -#include +#include #include #include "GUIVehicleControl.h" #include "GUIVehicle.h" @@ -60,35 +60,35 @@ bool GUIVehicleControl::addVehicle(const std::string& id, SUMOVehicle* v) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSVehicleControl::addVehicle(id, v); } void GUIVehicleControl::deleteVehicle(SUMOVehicle* veh, bool discard) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MSVehicleControl::deleteVehicle(veh, discard); } int GUIVehicleControl::getHaltingVehicleNo() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSVehicleControl::getHaltingVehicleNo(); } std::pair GUIVehicleControl::getVehicleMeanSpeeds() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MSVehicleControl::getVehicleMeanSpeeds(); } void GUIVehicleControl::insertVehicleIDs(std::vector& into, bool listParking, bool listTeleporting) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); into.reserve(myVehicleDict.size()); for (VehicleDictType::iterator i = myVehicleDict.begin(); i != myVehicleDict.end(); ++i) { SUMOVehicle* veh = (*i).second; diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIVehicleControl.h sumo-1.2.0+dfsg1/src/guisim/GUIVehicleControl.h --- sumo-1.1.0+dfsg1/src/guisim/GUIVehicleControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIVehicleControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,17 +26,12 @@ #include #include +#include #include #include // =========================================================================== -// class declarations -// =========================================================================== -class MFXMutex; - - -// =========================================================================== // class definitions // =========================================================================== /** @@ -127,7 +122,7 @@ private: /// The mutex used to avoid concurrent updates of the vehicle buffer - mutable MFXMutex myLock; + mutable FXMutex myLock; private: diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIVehicle.cpp sumo-1.2.0+dfsg1/src/guisim/GUIVehicle.cpp --- sumo-1.1.0+dfsg1/src/guisim/GUIVehicle.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -47,10 +48,13 @@ #include #include #include +#include +#include #include #include #include #include + #include "GUIVehicle.h" #include "GUIPerson.h" #include "GUIContainer.h" @@ -93,7 +97,7 @@ GUISUMOAbstractView&) { const int sublaneParams = MSGlobals::gLateralResolution > 0 ? 4 : 0; GUIParameterTableWindow* ret = - new GUIParameterTableWindow(app, *this, 37 + sublaneParams + (int)getParameter().getParametersMap().size()); + new GUIParameterTableWindow(app, *this, 39 + sublaneParams + (int)getParameter().getParametersMap().size()); // add items ret->mkItem("lane [id]", false, Named::getIDSecure(myLane, "n/a")); if (MSAbstractLaneChangeModel::haveLateralDynamics()) { @@ -165,6 +169,9 @@ new FunctionBinding(this, &MSVehicle::getPersonNumber)); ret->mkItem("containers", true, new FunctionBinding(this, &MSVehicle::getContainerNumber)); + + ret->mkItem("lcState right", false, toString((LaneChangeAction)getLaneChangeModel().getSavedState(-1).second)); + ret->mkItem("lcState left", false, toString((LaneChangeAction)getLaneChangeModel().getSavedState(1).second)); // close building if (MSGlobals::gLateralResolution > 0) { ret->mkItem("right side on edge [m]", true, new FunctionBinding(this, &GUIVehicle::getRightSideOnEdge2)); @@ -182,7 +189,7 @@ GUIVehicle::getTypeParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { GUIParameterTableWindow* ret = - new GUIParameterTableWindow(app, *this, 25 + new GUIParameterTableWindow(app, *this, 26 + (int)myType->getParameter().getParametersMap().size() + (int)myType->getParameter().lcParameter.size() + (int)myType->getParameter().jmParameter.size()); @@ -197,6 +204,7 @@ ret->mkItem("emission class", false, PollutantsInterface::getName(myType->getEmissionClass())); ret->mkItem("carFollowModel", false, SUMOXMLDefinitions::CarFollowModels.getString((SumoXMLTag)getCarFollowModel().getModelID())); ret->mkItem("LaneChangeModel", false, SUMOXMLDefinitions::LaneChangeModels.getString(getLaneChangeModel().getModelID())); + ret->mkItem("guiShape", false, getVehicleShapeName(myType->getGuiShape())); 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()); @@ -259,28 +267,152 @@ } -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; +void +GUIVehicle::drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const { + RGBColor current = GLHelper::getColor(); + RGBColor darker = current.changedBrightness(-51); + const double exaggeration = s.vehicleSize.getExaggeration(s, this); + const double totalLength = getVType().getLength(); + double upscaleLength = exaggeration; + if (exaggeration > 1 && totalLength > 5) { + // reduce the length/width ratio because this is not usefull at high zoom + upscaleLength = MAX2(1.0, upscaleLength * (5 + sqrt(totalLength - 5)) / totalLength); + } + const double locomotiveLength = getVehicleType().getParameter().locomotiveLength * upscaleLength; + if (exaggeration == 0) { + return; + } + const double defaultLength = getVehicleType().getParameter().carriageLength * upscaleLength; + const int firstPassengerCarriage = defaultLength == locomotiveLength ? 0 : 1; + const double carriageGap = getVehicleType().getParameter().carriageGap * upscaleLength; + const double length = totalLength * upscaleLength; + const double halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration; + glPopMatrix(); // undo initial translation and rotation + const double xCornerCut = 0.3 * exaggeration; + const double yCornerCut = 0.4 * exaggeration; + // round to closest integer + const int numCarriages = MAX2(1, 1 + (int)((length - locomotiveLength) / (defaultLength + carriageGap) + 0.5)); + assert(numCarriages > 0); + double carriageLengthWithGap = length / numCarriages; + double carriageLength = carriageLengthWithGap - carriageGap; + double firstCarriageLength = carriageLength; + if (defaultLength != locomotiveLength && numCarriages > 1) { + firstCarriageLength = locomotiveLength; + carriageLengthWithGap = (length - locomotiveLength) / (numCarriages - 1); + carriageLength = carriageLengthWithGap - carriageGap; + } + const int totalSeats = getVType().getPersonCapacity() + getVType().getContainerCapacity(); + const int seatsPerCarriage = (int)ceil(totalSeats / (numCarriages - firstPassengerCarriage)); + // lane on which the carriage front is situated + MSLane* lane = myLane; + int routeIndex = getRoutePosition(); + // lane on which the carriage back is situated + MSLane* backLane = myLane; + int backRouteIndex = routeIndex; + // offsets of front and back + double carriageOffset = myState.pos(); + double carriageBackOffset = myState.pos() - firstCarriageLength; + // handle seats + int requiredSeats = getNumPassengers() + getNumContainers(); + if (requiredSeats > 0) { + mySeatPositions.clear(); + } + Position front, back; + double angle = 0.; + // draw individual carriages + double curCLength = firstCarriageLength; + //std::cout << SIMTIME << " veh=" << getID() << " curCLength=" << curCLength << " loc=" << locomotiveLength << " car=" << carriageLength << " tlen=" << totalLength << " len=" << length << "\n"; + for (int i = 0; i < numCarriages; ++i) { + if (i > 0) { + curCLength = carriageLength; + } + while (carriageOffset < 0) { + MSLane* prev = getPreviousLane(lane, routeIndex); + if (prev != lane) { + carriageOffset += prev->getLength(); + } else { + // no lane available for drawing. + carriageOffset = 0; + } + lane = prev; + } + while (carriageBackOffset < 0) { + MSLane* prev = getPreviousLane(backLane, backRouteIndex); + if (prev != backLane) { + carriageBackOffset += prev->getLength(); + } else { + // no lane available for drawing. + carriageBackOffset = 0; + } + backLane = prev; + } + front = lane->geometryPositionAtOffset(carriageOffset); + back = backLane->geometryPositionAtOffset(carriageBackOffset); + if (front == back) { + // no place for drawing available + continue; + } + const double drawnCarriageLength = front.distanceTo2D(back); + angle = atan2((front.x() - back.x()), (back.y() - front.y())) * (double) 180.0 / (double) M_PI; + if (i >= firstPassengerCarriage) { + computeSeats(front, back, seatsPerCarriage, exaggeration, requiredSeats); + } + glPushMatrix(); + glTranslated(front.x(), front.y(), getType()); + glRotated(angle, 0, 0, 1); + if (!asImage || !GUIBaseVehicleHelper::drawAction_drawVehicleAsImage(s, getVType().getImgFile(), this, getVType().getWidth(), curCLength)) { + switch (getVType().getGuiShape()) { + case SVS_TRUCK_SEMITRAILER: + case SVS_TRUCK_1TRAILER: + if (i == 0) { + GUIBaseVehicleHelper::drawAction_drawVehicleAsPoly(s, getVType().getGuiShape(), getVType().getWidth() * exaggeration, curCLength, i); + } else { + GLHelper::setColor(current); + GLHelper::drawBoxLine(Position(0, 0), 180, curCLength, halfWidth); + } + break; + default: { + if (i == 0) { + GLHelper::setColor(darker); + } else { + GLHelper::setColor(current); + } + // generic rail carriage + glBegin(GL_TRIANGLE_FAN); + glVertex2d(-halfWidth + xCornerCut, 0); + glVertex2d(-halfWidth, yCornerCut); + glVertex2d(-halfWidth, drawnCarriageLength - yCornerCut); + glVertex2d(-halfWidth + xCornerCut, drawnCarriageLength); + glVertex2d(halfWidth - xCornerCut, drawnCarriageLength); + glVertex2d(halfWidth, drawnCarriageLength - yCornerCut); + glVertex2d(halfWidth, yCornerCut); + glVertex2d(halfWidth - xCornerCut, 0); + glEnd(); + } + } + } + glPopMatrix(); + carriageOffset -= (curCLength + carriageGap); + carriageBackOffset -= carriageLengthWithGap; + } + if (getVType().getGuiShape() == SVS_RAIL_CAR) { + glPushMatrix(); + glTranslated(front.x(), front.y(), getType()); + glRotated(angle, 0, 0, 1); + drawAction_drawVehicleBlinker(curCLength); + drawAction_drawVehicleBrakeLight(curCLength); + glPopMatrix(); + } + // restore matrix + glPushMatrix(); + front = getPosition(); + glTranslated(front.x(), front.y(), getType()); + const double degAngle = RAD2DEG(getAngle() + M_PI / 2.); + glRotated(degAngle, 0, 0, 1); + glScaled(exaggeration, upscaleLength, 1); + if (mySeatPositions.size() == 0) { + mySeatPositions.push_back(back); } - return true; } #define BLINKER_POS_FRONT .5 @@ -410,6 +542,8 @@ return getElectricityConsumption(); case 28: return getTimeLossSeconds(); + case 29: + return getLaneChangeModel().getSpeedLat(); } return 0; } @@ -451,9 +585,9 @@ void -GUIVehicle::drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r) const { +GUIVehicle::drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future) const { const double exaggeration = s.vehicleSize.getExaggeration(s, this); - MSRouteIterator i = r.begin(); + MSRouteIterator i = future ? myCurrEdge : r.begin(); const std::vector& bestLaneConts = getBestLanesContinuation(); // draw continuation lanes when drawing the current route where available int bestLaneIndex = (&r == myRoute ? 0 : (int)bestLaneConts.size()); @@ -472,18 +606,31 @@ } GLHelper::drawBoxLines(lane->getShape(), lane->getShapeRotations(), lane->getShapeLengths(), exaggeration); } + // draw stop labels + // (vertical shift for repeated stops at the same position + std::map, int> repeat; // count repeated occurrences of the same position int stopIndex = 0; for (const Stop& stop : myStops) { Position pos = stop.lane->geometryPositionAtOffset(stop.reached ? getPositionOnLane() : stop.getEndPos(*this)); GLHelper::drawBoxLines(stop.lane->getShape().getOrthogonal(pos, 10, true, stop.lane->getWidth()), 0.1); std::string label = stop.reached ? "stopped" : "stop " + toString(stopIndex); +#ifdef _DEBUG + label += " (" + toString(stop.edge - myCurrEdge) + "e)"; +#endif if (stop.pars.until >= 0) { label += " until:" + time2string(stop.pars.until); } if (stop.duration >= 0) { - label += " duration:" + time2string(stop.duration); + if (STEPS2TIME(stop.duration) > 3600 * 24) { + label += " duration:1day+"; + } else { + label += " duration:" + time2string(stop.duration); + } } - GLHelper::drawText(label, pos, 1.0, s.vehicleName.size / s.scale, s.vehicleName.color); + std::pair stopPos = std::make_pair(stop.lane, stop.getEndPos(*this)); + const double textSize = s.vehicleName.size / s.scale; + GLHelper::drawText(label, pos - Position(0, textSize * repeat[stopPos]), 1.0, textSize, s.vehicleName.color); + repeat[stopPos]++; stopIndex++; } } @@ -491,169 +638,26 @@ MSLane* -GUIVehicle::getPreviousLane(MSLane* current, int& furtherIndex) const { - if (furtherIndex < (int)myFurtherLanes.size()) { - return myFurtherLanes[furtherIndex++]; - } else { - const int routeIndex = (int)(getCurrentRouteEdge() - myRoute->begin()); - int backIndex = furtherIndex + 1; - for (MSLane* l : myFurtherLanes) { - if (l->isInternal()) { - backIndex--; - } - } - if (routeIndex >= backIndex) { - furtherIndex++; - // could also look for the first lane that allows this vehicle class - // but this is probably not an issue for trains - return (*(getCurrentRouteEdge() - backIndex))->getLanes()[0]; - } - return current; - } -} - - -void -GUIVehicle::drawAction_drawRailCarriages(const GUIVisualizationSettings& s, double defaultLength, double carriageGap, int firstPassengerCarriage, bool asImage) const { - RGBColor current = GLHelper::getColor(); - RGBColor darker = current.changedBrightness(-51); - const double exaggeration = s.vehicleSize.getExaggeration(s, this); - const double totalLength = getVType().getLength(); - double upscaleLength = exaggeration; - if (exaggeration > 1 && totalLength > 5) { - // reduce the length/width ratio because this is not usefull at high zoom - upscaleLength = MAX2(1.0, upscaleLength * (5 + sqrt(totalLength - 5)) / totalLength); - } - defaultLength *= upscaleLength; - if (exaggeration == 0) { - return; - } - carriageGap *= upscaleLength; - const double length = totalLength * upscaleLength; - const double halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration; - glPopMatrix(); // undo scaling and 90 degree rotation - glPopMatrix(); // undo initial translation and rotation - GLHelper::setColor(darker); - const double xCornerCut = 0.3 * exaggeration; - const double yCornerCut = 0.4 * exaggeration; - // round to closest integer - const int numCarriages = MAX2(1, (int)(length / (defaultLength + carriageGap) + 0.5)); - assert(numCarriages > 0); - const double carriageLengthWithGap = length / numCarriages; - const double carriageLength = carriageLengthWithGap - carriageGap; - // lane on which the carriage front is situated - MSLane* lane = myLane; - int furtherIndex = 0; - // lane on which the carriage back is situated - MSLane* backLane = myLane; - int backFurtherIndex = furtherIndex; - // offsets of front and back - double carriageOffset = myState.pos(); - double carriageBackOffset = myState.pos() - carriageLength; - // handle seats - int requiredSeats = getNumPassengers(); - if (requiredSeats > 0) { - mySeatPositions.clear(); - } - Position front, back; - double angle = 0.; - // draw individual carriages - for (int i = 0; i < numCarriages; ++i) { - while (carriageOffset < 0) { - MSLane* prev = getPreviousLane(lane, furtherIndex); - if (prev != lane) { - carriageOffset += prev->getLength(); - } else { - // no lane available for drawing. - carriageOffset = 0; +GUIVehicle::getPreviousLane(MSLane* current, int& routeIndex) const { + if (current->isInternal()) { + return current->getIncomingLanes().front().lane; + } + if (routeIndex > 0) { + routeIndex--; + const MSEdge* prevNormal = myRoute->getEdges()[routeIndex]; + for (MSLane* cand : prevNormal->getLanes()) { + for (MSLink* link : cand->getLinkCont()) { + if (link->getLane() == current) { + if (link->getViaLane() != nullptr) { + return link->getViaLane(); + } else { + return const_cast(link->getLaneBefore()); + } + } } - lane = prev; - } - while (carriageBackOffset < 0) { - MSLane* prev = getPreviousLane(backLane, backFurtherIndex); - if (prev != backLane) { - carriageBackOffset += prev->getLength(); - } else { - // no lane available for drawing. - carriageBackOffset = 0; - } - backLane = prev; - } - front = lane->geometryPositionAtOffset(carriageOffset); - back = backLane->geometryPositionAtOffset(carriageBackOffset); - if (front == back) { - // no place for drawing available - continue; - } - const double drawnCarriageLength = front.distanceTo2D(back); - angle = atan2((front.x() - back.x()), (back.y() - front.y())) * (double) 180.0 / (double) M_PI; - if (i >= firstPassengerCarriage) { - computeSeats(front, back, requiredSeats); - } - glPushMatrix(); - glTranslated(front.x(), front.y(), getType()); - glRotated(angle, 0, 0, 1); - if (!asImage || !drawAction_drawVehicleAsImage(s, carriageLength)) { - glBegin(GL_TRIANGLE_FAN); - glVertex2d(-halfWidth + xCornerCut, 0); - glVertex2d(-halfWidth, yCornerCut); - glVertex2d(-halfWidth, drawnCarriageLength - yCornerCut); - glVertex2d(-halfWidth + xCornerCut, drawnCarriageLength); - glVertex2d(halfWidth - xCornerCut, drawnCarriageLength); - glVertex2d(halfWidth, drawnCarriageLength - yCornerCut); - glVertex2d(halfWidth, yCornerCut); - glVertex2d(halfWidth - xCornerCut, 0); - glEnd(); - } - glPopMatrix(); - carriageOffset -= carriageLengthWithGap; - carriageBackOffset -= carriageLengthWithGap; - GLHelper::setColor(current); - } - if (getVType().getGuiShape() == SVS_RAIL_CAR) { - glPushMatrix(); - glTranslated(front.x(), front.y(), getType()); - glRotated(angle, 0, 0, 1); - drawAction_drawVehicleBlinker(carriageLength); - drawAction_drawVehicleBrakeLight(carriageLength); - glPopMatrix(); - } - // restore matrices - glPushMatrix(); - front = getPosition(); - glTranslated(front.x(), front.y(), getType()); - const double degAngle = RAD2DEG(getAngle() + M_PI / 2.); - glRotated(degAngle, 0, 0, 1); - glScaled(exaggeration, upscaleLength, 1); - glPushMatrix(); -} - - -int -GUIVehicle::getNumPassengers() const { - if (myPersonDevice != nullptr) { - return (int)myPersonDevice->size(); - } - return 0; -} - - -void -GUIVehicle::computeSeats(const Position& front, const Position& back, int& requiredSeats) const { - if (requiredSeats <= 0) { - return; // save some work - } - const double length = front.distanceTo2D(back); - if (length < 4) { - // small vehicle, sit at the center - mySeatPositions.push_back(PositionVector::positionAtOffset2D(front, back, length / 2)); - requiredSeats--; - } else { - for (double p = 2; p <= length - 1; p += 1) { - mySeatPositions.push_back(PositionVector::positionAtOffset2D(front, back, p)); - requiredSeats--; } } + return current; } @@ -826,5 +830,69 @@ return getLaneChangeModel().getManeuverDist(); } +void +GUIVehicle::rerouteDRTStop(MSStoppingPlace* busStop) { + SUMOTime intermediateDuration = TIME2STEPS(20); + SUMOTime finalDuration = SUMOTime_MAX; + if (myParameter->stops.size() >= 2) { + // copy durations from the original stops + intermediateDuration = myParameter->stops.front().duration; + finalDuration = myParameter->stops.back().duration; + } + // if the stop is already in the list of stops, cancel all stops that come + // after it and set the stop duration + std::string line = ""; + int destinations = 0; + bool add = true; + for (auto it = myStops.begin(); it != myStops.end(); it++) { + if (!it->reached && destinations < 2 && it->busstop != nullptr) { + line += it->busstop->getID(); + destinations++; + } + if (it->busstop == busStop) { + it->duration = finalDuration; + myStops.erase(++it, myStops.end()); + add = false; + break; + } else { + it->duration = MIN2(it->duration, intermediateDuration); + } + } + if (destinations < 2) { + line += busStop->getID(); + } + if (add) { + // create new stop + SUMOVehicleParameter::Stop stopPar; + stopPar.busstop = busStop->getID(); + stopPar.lane = busStop->getLane().getID(); + stopPar.startPos = busStop->getBeginLanePosition(); + stopPar.endPos = busStop->getEndLanePosition(); + stopPar.duration = finalDuration; + stopPar.until = -1; + stopPar.triggered = false; + stopPar.containerTriggered = false; + stopPar.parking = false; + stopPar.index = STOP_INDEX_FIT; + stopPar.parametersSet = STOP_START_SET | STOP_END_SET; + // clean up prior route to improve visualisation, ensure that the stop can be added immediately + ConstMSEdgeVector edges = myRoute->getEdges(); + edges.erase(edges.begin(), edges.begin() + getRoutePosition()); + edges.push_back(&busStop->getLane().getEdge()); + replaceRouteEdges(edges, -1, 0, "DRT.tmp", false, false, false); + std::string errorMsg; + // add stop + addStop(stopPar, errorMsg); + } + const bool hasReroutingDevice = getDevice(typeid(MSDevice_Routing)) != nullptr; + SUMOAbstractRouter& router = hasReroutingDevice + ? MSRoutingEngine::getRouterTT() + : MSNet::getInstance()->getRouterTT(); + // reroute to ensure the new stop is reached + reroute(MSNet::getInstance()->getCurrentTimeStep(), "DRT", router); + myParameter->line = line; + assert(haveValidStopEdges()); +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/guisim/GUIVehicle.h sumo-1.2.0+dfsg1/src/guisim/GUIVehicle.h --- sumo-1.1.0+dfsg1/src/guisim/GUIVehicle.h 2018-05-31 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/GUIVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -86,7 +86,7 @@ /** @brief Draws the route * @param[in] r The route to draw */ - void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r) const; + void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future) const; void drawAction_drawVehicleBlinker(double length) const; void drawAction_drawVehicleBrakeLight(double length, bool onlyOne = false) const; @@ -148,6 +148,8 @@ /// @brief return the lane-change maneuver distance double getManeuverDist() const; + /// @brief handle route to accomodate to given stop + void rerouteDRTStop(MSStoppingPlace* busStop); protected: /// @brief register vehicle for drawing while outside the network @@ -158,24 +160,13 @@ /* @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, double defaultLength, double carriageGap, - int firstPassengerCarriage, bool asImage) const; - /// @} - - /// @brief draws the given guiShape if it has distinct carriages/modules and returns true if so - bool drawAction_drawCarriageClass(const GUIVisualizationSettings& s, SUMOVehicleShape guiShape, bool asImage) const; + void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, 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& furtherIndex) const; - - /// @brief return the number of passengers - int getNumPassengers() const; - - /// @brief add seats to mySeatPositions and update requiredSeats - void computeSeats(const Position& front, const Position& back, int& requiredSeats) const; + MSLane* getPreviousLane(MSLane* current, int& routeIndex) const; /// @brief retrieve information about the current stop state std::string getStopInfo() const; diff -Nru sumo-1.1.0+dfsg1/src/guisim/Makefile.in sumo-1.2.0+dfsg1/src/guisim/Makefile.in --- sumo-1.1.0+dfsg1/src/guisim/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,687 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/guisim -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) GUIContainer.$(OBJEXT) \ - GUIContainerStop.$(OBJEXT) GUIParkingArea.$(OBJEXT) \ - GUIDetectorWrapper.$(OBJEXT) GUIE2Collector.$(OBJEXT) \ - GUIE3Collector.$(OBJEXT) GUIEdge.$(OBJEXT) \ - GUIEventControl.$(OBJEXT) GUIInductLoop.$(OBJEXT) \ - GUIInstantInductLoop.$(OBJEXT) GUIJunctionWrapper.$(OBJEXT) \ - GUILane.$(OBJEXT) GUILaneSpeedTrigger.$(OBJEXT) \ - GUIPerson.$(OBJEXT) GUINet.$(OBJEXT) \ - GUITrafficLightLogicWrapper.$(OBJEXT) \ - GUITriggeredRerouter.$(OBJEXT) GUICalibrator.$(OBJEXT) \ - GUIChargingStation.$(OBJEXT) GUIBaseVehicle.$(OBJEXT) \ - GUIVehicle.$(OBJEXT) GUIVehicleControl.$(OBJEXT) \ - GUITransportableControl.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguisim.a -libguisim_a_SOURCES = GUIBusStop.cpp GUIBusStop.h \ -GUIContainer.cpp GUIContainer.h \ -GUIContainerStop.cpp GUIContainerStop.h \ -GUIParkingArea.cpp GUIParkingArea.h \ -GUIDetectorWrapper.cpp GUIDetectorWrapper.h \ -GUIE2Collector.cpp GUIE2Collector.h \ -GUIE3Collector.cpp GUIE3Collector.h GUIEdge.cpp GUIEdge.h \ -GUIEventControl.cpp GUIEventControl.h \ -GUIInductLoop.cpp GUIInductLoop.h \ -GUIInstantInductLoop.cpp GUIInstantInductLoop.h \ -GUIJunctionWrapper.cpp GUIJunctionWrapper.h \ -GUILane.cpp GUILane.h \ -GUILaneSpeedTrigger.cpp GUILaneSpeedTrigger.h \ -GUIPerson.cpp GUIPerson.h \ -GUINet.cpp GUINet.h \ -GUITrafficLightLogicWrapper.cpp GUITrafficLightLogicWrapper.h \ -GUITriggeredRerouter.cpp GUITriggeredRerouter.h \ -GUICalibrator.cpp GUICalibrator.h \ -GUIChargingStation.cpp GUIChargingStation.h \ -GUIBaseVehicle.cpp GUIBaseVehicle.h \ -GUIVehicle.cpp GUIVehicle.h GUIVehicleControl.cpp GUIVehicleControl.h \ -GUITransportableControl.cpp GUITransportableControl.h - -EXTRA_DIST = guisim64.ico -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) --foreign src/guisim/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/guisim/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIBaseVehicle.Po@am__quote@ -@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)/GUIChargingStation.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIContainer.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)/GUIE2Collector.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIEventControl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIInductLoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIInstantInductLoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIJunctionWrapper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUILane.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUILaneSpeedTrigger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUINet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIParkingArea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIPerson.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITrafficLightLogicWrapper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITransportableControl.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIVehicleControl.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/guisim_main.cpp sumo-1.2.0+dfsg1/src/guisim_main.cpp --- sumo-1.1.0+dfsg1/src/guisim_main.cpp 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/guisim_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -53,8 +54,7 @@ int main(int argc, char** argv) { // make the output aware of threading - MFXMutex lock; - MsgHandler::assignLock(&lock); + MsgHandler::setFactory(&MsgHandlerSynchronized::create); // get the options OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions @@ -87,7 +87,7 @@ gSchemeStorage.init(&application); window->dependentBuild(); // Create app - application.addSignal(SIGINT, window, MID_QUIT); + application.addSignal(SIGINT, window, MID_HOTKEY_CTRL_Q_CLOSE); application.create(); // Load configuration given on command line if (argc > 1) { diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/jtrrouter_main.cpp sumo-1.2.0+dfsg1/src/jtrrouter/jtrrouter_main.cpp --- sumo-1.1.0+dfsg1/src/jtrrouter/jtrrouter_main.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/jtrrouter_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/Makefile.am sumo-1.2.0+dfsg1/src/jtrrouter/Makefile.am --- sumo-1.1.0+dfsg1/src/jtrrouter/Makefile.am 2018-04-10 21:24:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -21,4 +21,4 @@ ../utils/emissions/libemissions.a \ ../foreign/PHEMlight/cpp/libphemlight.a \ ../foreign/tcpip/libtcpip.a \ --l$(LIB_XERCES) $(FOX_LDFLAGS) +-l$(LIB_XERCES) $(FOX_LDFLAGS) $(PROJ_LDFLAGS) diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/Makefile.in sumo-1.2.0+dfsg1/src/jtrrouter/Makefile.in --- sumo-1.1.0+dfsg1/src/jtrrouter/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,711 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = jtrrouter$(EXEEXT) -subdir = src/jtrrouter -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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_jtrrouter_OBJECTS = jtrrouter_main.$(OBJEXT) ROJTREdge.$(OBJEXT) \ - 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/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ - ../foreign/tcpip/libtcpip.a $(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) $(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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -jtrrouter_SOURCES = jtrrouter_main.cpp \ -ROJTREdge.cpp ROJTREdge.h \ -ROJTREdgeBuilder.cpp ROJTREdgeBuilder.h \ -ROJTRRouter.cpp ROJTRRouter.h ROJTRTurnDefLoader.cpp ROJTRTurnDefLoader.h \ -ROJTRFrame.cpp ROJTRFrame.h - -jtrrouter_LDFLAGS = $(XERCES_LDFLAGS) -jtrrouter_LDADD = ../router/librouter.a \ -../utils/options/liboptions.a \ -../utils/xml/libxml.a \ -../utils/distribution/libdistribution.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/PHEMlight/cpp/libphemlight.a \ -../foreign/tcpip/libtcpip.a \ --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) --foreign src/jtrrouter/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/jtrrouter/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 - -jtrrouter$(EXEEXT): $(jtrrouter_OBJECTS) $(jtrrouter_DEPENDENCIES) $(EXTRA_jtrrouter_DEPENDENCIES) - @rm -f jtrrouter$(EXEEXT) - $(AM_V_CXXLD)$(jtrrouter_LINK) $(jtrrouter_OBJECTS) $(jtrrouter_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROJTREdge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROJTREdgeBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROJTRFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROJTRRouter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROJTRTurnDefLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jtrrouter_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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.cpp sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.cpp --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.h sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.h --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdgeBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTREdge.cpp sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdge.cpp --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTREdge.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ ROJTREdge::~ROJTREdge() { for (FollowerUsageCont::iterator i = myFollowingDefs.begin(); i != myFollowingDefs.end(); ++i) { - delete(*i).second; + delete (*i).second; } } diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTREdge.h sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdge.h --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTREdge.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTREdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRFrame.cpp sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRFrame.cpp --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRFrame.cpp 2018-07-06 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRFrame.h sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRFrame.h --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRRouter.cpp sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRRouter.cpp --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRRouter.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRRouter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,7 +34,7 @@ // =========================================================================== ROJTRRouter::ROJTRRouter(bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops) : - SUMOAbstractRouter("JTRRouter", &ROEdge::getTravelTimeStatic), + SUMOAbstractRouter("JTRRouter", unbuildIsWarningOnly, &ROEdge::getTravelTimeStatic), myUnbuildIsWarningOnly(unbuildIsWarningOnly), myAcceptAllDestination(acceptAllDestinations), myMaxEdges(maxEdges), myIgnoreClasses(ignoreClasses), myAllowLoops(allowLoops) { @@ -47,7 +47,7 @@ bool ROJTRRouter::compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle, - SUMOTime time, ConstROEdgeVector& into) { + SUMOTime time, ConstROEdgeVector& into, bool silent) { const ROJTREdge* current = static_cast(from); double timeS = STEPS2TIME(time); std::set avoidEdges; @@ -68,8 +68,10 @@ if (myAcceptAllDestination) { return true; } else { - MsgHandler* mh = myUnbuildIsWarningOnly ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance(); - mh->inform("The route starting at edge '" + from->getID() + "' could not be closed."); + if (!silent) { + MsgHandler* mh = myUnbuildIsWarningOnly ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance(); + mh->inform("The route starting at edge '" + from->getID() + "' could not be closed."); + } return false; } } diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRRouter.h sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRRouter.h --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRRouter.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRRouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,7 @@ // =========================================================================== #include -#include +#include #include @@ -77,7 +77,7 @@ * @param[filled] into The list of edges to store the route into */ bool compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle, - SUMOTime time, ConstROEdgeVector& into); + SUMOTime time, ConstROEdgeVector& into, bool silent = false); /** @brief Recomputes the costs of a route diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.cpp sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.cpp --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.h sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.h --- sumo-1.1.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/jtrrouter/ROJTRTurnDefLoader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/libsumo/CMakeLists.txt sumo-1.2.0+dfsg1/src/libsumo/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/libsumo/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -22,6 +22,7 @@ Simulation.cpp Simulation.h Subscription.h + TraCIConstants.h TraCIDefs.h TrafficLight.cpp TrafficLight.h diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Edge.cpp sumo-1.2.0+dfsg1/src/libsumo/Edge.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Edge.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Edge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include "Edge.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Edge.h sumo-1.2.0+dfsg1/src/libsumo/Edge.h --- sumo-1.1.0+dfsg1/src/libsumo/Edge.h 2018-09-10 22:00:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Edge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ #include #include #include -#include +#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Helper.cpp sumo-1.2.0+dfsg1/src/libsumo/Helper.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Helper.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Helper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -48,7 +49,7 @@ #include #include #include -#include +#include #include "Helper.h" #define FAR_AWAY 1000.0 @@ -57,10 +58,11 @@ //#define DEBUG_MOVEXY_ANGLE //#define DEBUG_SURROUNDING + void LaneStoringVisitor::add(const MSLane* const l) const { switch (myDomain) { - case CMD_GET_VEHICLE_VARIABLE: { + case libsumo::CMD_GET_VEHICLE_VARIABLE: { const MSLane::VehCont& vehs = l->getVehiclesSecure(); for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) { if (myShape.distance2D((*j)->getPosition()) <= myRange) { @@ -70,7 +72,7 @@ l->releaseVehicles(); } break; - case CMD_GET_PERSON_VARIABLE: { + case libsumo::CMD_GET_PERSON_VARIABLE: { l->getVehiclesSecure(); std::vector persons = l->getEdge().getSortedPersons(MSNet::getInstance()->getCurrentTimeStep(), true); for (auto p : persons) { @@ -81,13 +83,13 @@ l->releaseVehicles(); } break; - case CMD_GET_EDGE_VARIABLE: { + case libsumo::CMD_GET_EDGE_VARIABLE: { if (myShape.size() != 1 || l->getShape().distance2D(myShape[0]) <= myRange) { myIDs.insert(l->getEdge().getID()); } } break; - case CMD_GET_LANE_VARIABLE: { + case libsumo::CMD_GET_LANE_VARIABLE: { if (myShape.size() != 1 || l->getShape().distance2D(myShape[0]) <= myRange) { myIDs.insert(l->getID()); } @@ -152,22 +154,21 @@ } else { objIDs.insert(s.id); } - const int numVars = s.contextDomain > 0 && s.variables.size() == 1 && s.variables[0] == TRACI_ID_LIST ? 0 : (int)s.variables.size(); if (myWrapper.empty()) { - myWrapper[CMD_GET_EDGE_VARIABLE] = Edge::makeWrapper(); - myWrapper[CMD_GET_INDUCTIONLOOP_VARIABLE] = InductionLoop::makeWrapper(); - myWrapper[CMD_GET_JUNCTION_VARIABLE] = Junction::makeWrapper(); - myWrapper[CMD_GET_LANE_VARIABLE] = Lane::makeWrapper(); - myWrapper[CMD_GET_LANEAREA_VARIABLE] = LaneArea::makeWrapper(); - myWrapper[CMD_GET_MULTIENTRYEXIT_VARIABLE] = MultiEntryExit::makeWrapper(); - myWrapper[CMD_GET_PERSON_VARIABLE] = Person::makeWrapper(); - myWrapper[CMD_GET_POI_VARIABLE] = POI::makeWrapper(); - myWrapper[CMD_GET_POLYGON_VARIABLE] = Polygon::makeWrapper(); - myWrapper[CMD_GET_ROUTE_VARIABLE] = Route::makeWrapper(); - myWrapper[CMD_GET_SIM_VARIABLE] = Simulation::makeWrapper(); - myWrapper[CMD_GET_TL_VARIABLE] = TrafficLight::makeWrapper(); - myWrapper[CMD_GET_VEHICLE_VARIABLE] = Vehicle::makeWrapper(); - myWrapper[CMD_GET_VEHICLETYPE_VARIABLE] = VehicleType::makeWrapper(); + myWrapper[libsumo::CMD_GET_EDGE_VARIABLE] = Edge::makeWrapper(); + myWrapper[libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE] = InductionLoop::makeWrapper(); + myWrapper[libsumo::CMD_GET_JUNCTION_VARIABLE] = Junction::makeWrapper(); + myWrapper[libsumo::CMD_GET_LANE_VARIABLE] = Lane::makeWrapper(); + myWrapper[libsumo::CMD_GET_LANEAREA_VARIABLE] = LaneArea::makeWrapper(); + myWrapper[libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE] = MultiEntryExit::makeWrapper(); + myWrapper[libsumo::CMD_GET_PERSON_VARIABLE] = Person::makeWrapper(); + myWrapper[libsumo::CMD_GET_POI_VARIABLE] = POI::makeWrapper(); + myWrapper[libsumo::CMD_GET_POLYGON_VARIABLE] = Polygon::makeWrapper(); + myWrapper[libsumo::CMD_GET_ROUTE_VARIABLE] = Route::makeWrapper(); + myWrapper[libsumo::CMD_GET_SIM_VARIABLE] = Simulation::makeWrapper(); + myWrapper[libsumo::CMD_GET_TL_VARIABLE] = TrafficLight::makeWrapper(); + myWrapper[libsumo::CMD_GET_VEHICLE_VARIABLE] = Vehicle::makeWrapper(); + myWrapper[libsumo::CMD_GET_VEHICLETYPE_VARIABLE] = VehicleType::makeWrapper(); } auto wrapper = myWrapper.find(getCommandId); if (wrapper == myWrapper.end()) { @@ -175,13 +176,18 @@ } std::shared_ptr handler = wrapper->second; for (const std::string& objID : objIDs) { - if (numVars > 0) { + if (!s.variables.empty()) { for (const int variable : s.variables) { handler->handle(objID, variable, handler.get()); } } else { - if (!handler->handle(objID, LAST_STEP_VEHICLE_NUMBER, handler.get())) { - handler->handle(objID, TRACI_ID_LIST, handler.get()); + if (s.contextDomain == 0 && getCommandId == libsumo::CMD_GET_VEHICLE_VARIABLE) { + // default for vehicles is edge id and lane position + handler->handle(objID, VAR_ROAD_ID, handler.get()); + handler->handle(objID, VAR_LANEPOSITION, handler.get()); + } else if (s.contextDomain > 0 || !handler->handle(objID, libsumo::LAST_STEP_VEHICLE_NUMBER, handler.get())) { + // default for detectors is vehicle number, for all others (and contexts) id list + handler->handle(objID, libsumo::TRACI_ID_LIST, handler.get()); } } } @@ -248,7 +254,7 @@ TraCIPosition p; p.x = position.x(); p.y = position.y(); - p.z = includeZ ? position.z() : Position::INVALID.z(); + p.z = includeZ ? position.z() : INVALID_DOUBLE_VALUE; return p; } @@ -287,25 +293,33 @@ std::pair -Helper::convertCartesianToRoadMap(Position pos) { - /// XXX use rtree instead +Helper::convertCartesianToRoadMap(const Position& pos, const SUMOVehicleClass vClass) { + const PositionVector shape({ pos }); std::pair result; - std::vector allEdgeIds; - double minDistance = std::numeric_limits::max(); - - allEdgeIds = MSNet::getInstance()->getEdgeControl().getEdgeNames(); - for (std::vector::iterator itId = allEdgeIds.begin(); itId != allEdgeIds.end(); itId++) { - const std::vector& allLanes = MSEdge::dictionary((*itId))->getLanes(); - for (std::vector::const_iterator itLane = allLanes.begin(); itLane != allLanes.end(); itLane++) { - const double newDistance = (*itLane)->getShape().distance2D(pos); - if (newDistance < minDistance) { - minDistance = newDistance; - result.first = (*itLane); + double range = 1000.; + const Boundary& netBounds = GeoConvHelper::getFinal().getConvBoundary(); + const double maxRange = MAX2(1001., netBounds.getWidth() + netBounds.getHeight() + netBounds.distanceTo2D(pos)); + while (range < maxRange) { + std::set laneIds; + collectObjectsInRange(libsumo::CMD_GET_LANE_VARIABLE, shape, range, laneIds); + double minDistance = std::numeric_limits::max(); + for (const std::string& laneID : laneIds) { + MSLane* const lane = MSLane::dictionary(laneID); + if (lane->allowsVehicleClass(vClass)) { + const double newDistance = lane->getShape().distance2D(pos); + if (newDistance < minDistance) { + minDistance = newDistance; + result.first = lane; + } } } + if (minDistance < std::numeric_limits::max()) { + // @todo this may be a place where 3D is required but 2D is delivered + result.second = result.first->getShape().nearest_offset_to_point2D(pos, false); + break; + } + range *= 2; } - // @todo this may be a place where 3D is required but 2D is delivered - result.second = result.first->getShape().nearest_offset_to_point2D(pos, false); return result; } @@ -323,7 +337,9 @@ void Helper::registerVehicleStateListener() { - MSNet::getInstance()->addVehicleStateListener(&myVehicleStateListener); + if (MSNet::hasInstance()) { + MSNet::getInstance()->addVehicleStateListener(&myVehicleStateListener); + } } @@ -344,28 +360,28 @@ void Helper::findObjectShape(int domain, const std::string& id, PositionVector& shape) { switch (domain) { - case CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT: + case libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT: InductionLoop::storeShape(id, shape); break; - case CMD_SUBSCRIBE_LANE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_LANE_CONTEXT: Lane::storeShape(id, shape); break; - case CMD_SUBSCRIBE_VEHICLE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_VEHICLE_CONTEXT: Vehicle::storeShape(id, shape); break; - case CMD_SUBSCRIBE_PERSON_CONTEXT: + case libsumo::CMD_SUBSCRIBE_PERSON_CONTEXT: Person::storeShape(id, shape); break; - case CMD_SUBSCRIBE_POI_CONTEXT: + case libsumo::CMD_SUBSCRIBE_POI_CONTEXT: POI::storeShape(id, shape); break; - case CMD_SUBSCRIBE_POLYGON_CONTEXT: + case libsumo::CMD_SUBSCRIBE_POLYGON_CONTEXT: Polygon::storeShape(id, shape); break; - case CMD_SUBSCRIBE_JUNCTION_CONTEXT: + case libsumo::CMD_SUBSCRIBE_JUNCTION_CONTEXT: Junction::storeShape(id, shape); break; - case CMD_SUBSCRIBE_EDGE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_EDGE_CONTEXT: Edge::storeShape(id, shape); break; default: @@ -379,28 +395,28 @@ // build the look-up tree if not yet existing if (myObjects.find(domain) == myObjects.end()) { switch (domain) { - case CMD_GET_INDUCTIONLOOP_VARIABLE: - myObjects[CMD_GET_INDUCTIONLOOP_VARIABLE] = InductionLoop::getTree(); + case libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE: + myObjects[libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE] = InductionLoop::getTree(); break; - case CMD_GET_EDGE_VARIABLE: - case CMD_GET_LANE_VARIABLE: - case CMD_GET_PERSON_VARIABLE: - case CMD_GET_VEHICLE_VARIABLE: - myObjects[CMD_GET_EDGE_VARIABLE] = nullptr; - myObjects[CMD_GET_LANE_VARIABLE] = nullptr; - myObjects[CMD_GET_PERSON_VARIABLE] = nullptr; - myObjects[CMD_GET_VEHICLE_VARIABLE] = nullptr; + case libsumo::CMD_GET_EDGE_VARIABLE: + case libsumo::CMD_GET_LANE_VARIABLE: + case libsumo::CMD_GET_PERSON_VARIABLE: + case libsumo::CMD_GET_VEHICLE_VARIABLE: + myObjects[libsumo::CMD_GET_EDGE_VARIABLE] = nullptr; + myObjects[libsumo::CMD_GET_LANE_VARIABLE] = nullptr; + myObjects[libsumo::CMD_GET_PERSON_VARIABLE] = nullptr; + myObjects[libsumo::CMD_GET_VEHICLE_VARIABLE] = nullptr; myLaneTree = new LANE_RTREE_QUAL(&MSLane::visit); MSLane::fill(*myLaneTree); break; - case CMD_GET_POI_VARIABLE: - myObjects[CMD_GET_POI_VARIABLE] = POI::getTree(); + case libsumo::CMD_GET_POI_VARIABLE: + myObjects[libsumo::CMD_GET_POI_VARIABLE] = POI::getTree(); break; - case CMD_GET_POLYGON_VARIABLE: - myObjects[CMD_GET_POLYGON_VARIABLE] = Polygon::getTree(); + case libsumo::CMD_GET_POLYGON_VARIABLE: + myObjects[libsumo::CMD_GET_POLYGON_VARIABLE] = Polygon::getTree(); break; - case CMD_GET_JUNCTION_VARIABLE: - myObjects[CMD_GET_JUNCTION_VARIABLE] = Junction::getTree(); + case libsumo::CMD_GET_JUNCTION_VARIABLE: + myObjects[libsumo::CMD_GET_JUNCTION_VARIABLE] = Junction::getTree(); break; default: break; @@ -410,18 +426,18 @@ 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: - case CMD_GET_POI_VARIABLE: - case CMD_GET_POLYGON_VARIABLE: - case CMD_GET_JUNCTION_VARIABLE: { + case libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE: + case libsumo::CMD_GET_POI_VARIABLE: + case libsumo::CMD_GET_POLYGON_VARIABLE: + case libsumo::CMD_GET_JUNCTION_VARIABLE: { Named::StoringVisitor sv(into); myObjects[domain]->Search(cmin, cmax, sv); } break; - case CMD_GET_EDGE_VARIABLE: - case CMD_GET_LANE_VARIABLE: - case CMD_GET_PERSON_VARIABLE: - case CMD_GET_VEHICLE_VARIABLE: { + case libsumo::CMD_GET_EDGE_VARIABLE: + case libsumo::CMD_GET_LANE_VARIABLE: + case libsumo::CMD_GET_PERSON_VARIABLE: + case libsumo::CMD_GET_VEHICLE_VARIABLE: { LaneStoringVisitor sv(into, shape, range, domain); myLaneTree->Search(cmin, cmax, sv); } @@ -437,9 +453,9 @@ Helper::applySubscriptionFilters(const Subscription& s, std::set& objIDs) { #ifdef DEBUG_SURROUNDING MSVehicle* _veh = libsumo::Vehicle::getVehicle(s.id); - std::cout << SIMTIME << " applySubscriptionFilters for vehicle '" << _veh->getID() << "' on lane '" << _veh->getLane()->getID() <<"'" - << "\n on edge '" << _veh->getLane()->getEdge().getID() << "' (" << toString(_veh->getLane()->getEdge().getLanes()) << ")\n" - << "objIDs = " << toString(objIDs) << std::endl; + std::cout << SIMTIME << " applySubscriptionFilters for vehicle '" << _veh->getID() << "' on lane '" << _veh->getLane()->getID() << "'" + << "\n on edge '" << _veh->getLane()->getEdge().getID() << "' (" << toString(_veh->getLane()->getEdge().getLanes()) << ")\n" + << "objIDs = " << toString(objIDs) << std::endl; #endif if (s.activeFilters == 0) { @@ -459,7 +475,7 @@ // TODO: Treat case, where ego vehicle is currently on opposite lane std::set vehs; - if(s.activeFilters & SUBS_FILTER_NO_RTREE) { + if (s.activeFilters & SUBS_FILTER_NO_RTREE) { // Set defaults for upstream and downstream distances double downstreamDist = s.range, upstreamDist = s.range; if (s.activeFilters & SUBS_FILTER_DOWNSTREAM_DIST) { @@ -541,7 +557,7 @@ // Get leader on opposite vehs.insert(vehs.end(), lane->getFollower(v, posOnOpposite, downstreamDist, true).first); // Get follower (no search on consecutive lanes - vehs.insert(vehs.end(), lane->getLeader(v, posOnOpposite-v->getLength(), std::vector()).first); + vehs.insert(vehs.end(), lane->getLeader(v, posOnOpposite - v->getLength(), std::vector()).first); } } } @@ -558,7 +574,7 @@ #ifdef DEBUG_SURROUNDING std::cout << " On junction '" << l->getJunction()->getID() << "' (no. foe links = " << l->getFoeLinks().size() << "):" << std::endl; #endif - for(auto& foeLane : l->getFoeLanes()) { + for (auto& foeLane : l->getFoeLanes()) { // Check vehicles approaching the entry link corresponding to this lane const MSLink* foeLink = foeLane->getEntryLink(); for (auto& vi : foeLink->getApproaching()) { @@ -578,19 +594,19 @@ } } #ifdef DEBUG_SURROUNDING - std::cout << SIMTIME << " applySubscriptionFilters() for veh '" << v->getID() << "'. Found the following vehicles:\n"; - for (auto veh : vehs) { - if (veh != nullptr) { - std::cout << " '" << veh->getID() << "' on lane '" << veh->getLane()->getID() << "'\n"; - } + std::cout << SIMTIME << " applySubscriptionFilters() for veh '" << v->getID() << "'. Found the following vehicles:\n"; + for (auto veh : vehs) { + if (veh != nullptr) { + std::cout << " '" << veh->getID() << "' on lane '" << veh->getLane()->getID() << "'\n"; } + } #endif } else { // No maneuver filters requested, but only lanes filter (directly, or indirectly by specifying downstream or upstream distance) assert(filterLanes.size() > 0); // This is to remember the lanes checked in the driving direction of the vehicle (their opposites can be added in a second pass) auto checkedLanesInDrivingDir = std::make_shared(); - for (int offset : filterLanes){ + for (int offset : filterLanes) { MSLane* lane = vehLane->getParallelLane(offset); if (lane != nullptr) { #ifdef DEBUG_SURROUNDING @@ -600,7 +616,7 @@ // (Coverage info is collected per origin lane since lanes reached from neighboring lanes may have different distances // and aborting at previously scanned when coming from a closer origin may prevent scanning of parts that should be included.) std::shared_ptr checkedLanes = std::make_shared(); - const std::set new_vehs = lane->getSurroundingVehicles(v->getPositionOnLane(), downstreamDist, upstreamDist+v->getLength(), checkedLanes); + const std::set new_vehs = lane->getSurroundingVehicles(v->getPositionOnLane(), downstreamDist, upstreamDist + v->getLength(), checkedLanes); vehs.insert(new_vehs.begin(), new_vehs.end()); fuseLaneCoverage(checkedLanesInDrivingDir, checkedLanes); } else if (!disregardOppositeDirection && offset > 0) { @@ -625,7 +641,7 @@ } lane = opposite->getLanes()[ix_opposite]; // Search vehs along opposite lanes (swap upstream and downstream distance) - const std::set new_vehs = lane->getSurroundingVehicles(lane->getLength() - v->getPositionOnLane(), upstreamDist+v->getLength(), downstreamDist, std::make_shared()); + const std::set new_vehs = lane->getSurroundingVehicles(lane->getLength() - v->getPositionOnLane(), upstreamDist + v->getLength(), downstreamDist, std::make_shared()); vehs.insert(new_vehs.begin(), new_vehs.end()); } #ifdef DEBUG_SURROUNDING @@ -660,7 +676,7 @@ } // Add vehicles from corresponding range on opposite direction const MSLane* oppositeLane = *oppositeLaneIt; - auto new_vehs = oppositeLane->getVehiclesInRange(lane->getLength()-range.second, lane->getLength()-range.first); + auto new_vehs = oppositeLane->getVehiclesInRange(lane->getLength() - range.second, lane->getLength() - range.first); vehs.insert(new_vehs.begin(), new_vehs.end()); } } @@ -780,7 +796,7 @@ std::set into; PositionVector shape; shape.push_back(pos); - collectObjectsInRange(CMD_GET_EDGE_VARIABLE, shape, maxRouteDistance, into); + collectObjectsInRange(libsumo::CMD_GET_EDGE_VARIABLE, shape, maxRouteDistance, into); double maxDist = 0; std::map lane2utility; // compute utility for all candidate edges @@ -933,7 +949,7 @@ const LaneUtility& u = lane2utility.find(bestLane)->second; bestDistance = u.dist; *lane = bestLane; - lanePos = bestLane->getShape().nearest_offset_to_point2D(pos, false); + lanePos = bestLane->getShape().nearest_offset_to_point25D(pos, false); const MSEdge* prevEdge = u.prevEdge; if (u.onRoute) { ConstMSEdgeVector::const_iterator prevEdgePos = std::find(currentRoute.begin(), currentRoute.end(), prevEdge); @@ -1050,7 +1066,7 @@ // check position, stuff, we should have the best lane along the route lanePos = MAX2(0., MIN2(double((*lane)->getLength() - POSITION_EPS), (*lane)->interpolateGeometryPosToLanePos( - (*lane)->getShape().nearest_offset_to_point2D(pos, false)))); + (*lane)->getShape().nearest_offset_to_point25D(pos, false)))); //std::cout << SIMTIME << " moveToXYMap_matchingRoutePosition vehicle=" << veh.getID() << " currLane=" << veh.getLane()->getID() << " routeOffset=" << routeOffset << " edges=" << toString(edges) << " lane=" << (*lane)->getID() << "\n"; #ifdef DEBUG_MOVEXY std::cout << " b ok lane " << (*lane)->getID() << " lanePos:" << lanePos << std::endl; @@ -1114,6 +1130,13 @@ return true; } + +bool +Helper::SubscriptionWrapper::wrapRoadPosition(const std::string& objID, const int variable, const TraCIRoadPosition& value) { + myActiveResults[objID][variable] = std::make_shared(value); + return true; +} + void Helper::VehicleStateListener::vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& /*info*/) { diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Helper.h sumo-1.2.0+dfsg1/src/libsumo/Helper.h --- sumo-1.1.0+dfsg1/src/libsumo/Helper.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Helper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -118,7 +118,7 @@ static MSEdge* getEdge(const std::string& edgeID); static const MSLane* getLaneChecking(const std::string& edgeID, int laneIndex, double pos); - static std::pair convertCartesianToRoadMap(Position pos); + static std::pair convertCartesianToRoadMap(const Position& pos, const SUMOVehicleClass vClass); static void findObjectShape(int domain, const std::string& id, PositionVector& shape); @@ -191,6 +191,7 @@ bool wrapStringList(const std::string& objID, const int variable, const std::vector& value); bool wrapPosition(const std::string& objID, const int variable, const TraCIPosition& value); bool wrapColor(const std::string& objID, const int variable, const TraCIColor& value); + bool wrapRoadPosition(const std::string& objID, const int variable, const TraCIRoadPosition& value); private: SubscriptionResults myResults; ContextSubscriptionResults myContextResults; diff -Nru sumo-1.1.0+dfsg1/src/libsumo/InductionLoop.cpp sumo-1.2.0+dfsg1/src/libsumo/InductionLoop.cpp --- sumo-1.1.0+dfsg1/src/libsumo/InductionLoop.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/InductionLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "InductionLoop.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/InductionLoop.h sumo-1.2.0+dfsg1/src/libsumo/InductionLoop.h --- sumo-1.1.0+dfsg1/src/libsumo/InductionLoop.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/InductionLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,7 @@ #include #include -#include +#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Junction.cpp sumo-1.2.0+dfsg1/src/libsumo/Junction.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Junction.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Junction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "Helper.h" #include "Junction.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Junction.h sumo-1.2.0+dfsg1/src/libsumo/Junction.h --- sumo-1.1.0+dfsg1/src/libsumo/Junction.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Junction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ #include #include -#include +#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/libsumo/LaneArea.cpp sumo-1.2.0+dfsg1/src/libsumo/LaneArea.cpp --- sumo-1.1.0+dfsg1/src/libsumo/LaneArea.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/LaneArea.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "LaneArea.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/LaneArea.h sumo-1.2.0+dfsg1/src/libsumo/LaneArea.h --- sumo-1.1.0+dfsg1/src/libsumo/LaneArea.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/LaneArea.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Lane.cpp sumo-1.2.0+dfsg1/src/libsumo/Lane.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Lane.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Lane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "Lane.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Lane.h sumo-1.2.0+dfsg1/src/libsumo/Lane.h --- sumo-1.1.0+dfsg1/src/libsumo/Lane.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Lane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/libsumo/libsumo.i sumo-1.2.0+dfsg1/src/libsumo/libsumo.i --- sumo-1.1.0+dfsg1/src/libsumo/libsumo.i 2018-11-04 23:00:44.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/libsumo.i 2019-04-15 14:11:30.000000000 +0000 @@ -131,13 +131,35 @@ PyDict_SetItem($result, PyInt_FromLong(theKey), tuple); continue; } + const libsumo::TraCIPosition* const thePosition = dynamic_cast(theVal); + if (thePosition != nullptr) { + PyObject* tuple; + if (thePosition->z != libsumo::INVALID_DOUBLE_VALUE) { + tuple = PyTuple_Pack(3, PyFloat_FromDouble(thePosition->x), PyFloat_FromDouble(thePosition->y), PyFloat_FromDouble(thePosition->z)); + } else { + tuple = PyTuple_Pack(2, PyFloat_FromDouble(thePosition->x), PyFloat_FromDouble(thePosition->y)); + } + PyDict_SetItem($result, PyInt_FromLong(theKey), tuple); + continue; + } + const libsumo::TraCIRoadPosition* const theRoadPosition = dynamic_cast(theVal); + if (theRoadPosition != nullptr) { + PyObject* tuple; + if (theRoadPosition->laneIndex != libsumo::INVALID_INT_VALUE) { + tuple = PyTuple_Pack(3, PyUnicode_FromString(theRoadPosition->edgeID.c_str()), PyFloat_FromDouble(theRoadPosition->pos), PyInt_FromLong(theRoadPosition->laneIndex)); + } else { + tuple = PyTuple_Pack(2, PyUnicode_FromString(theRoadPosition->edgeID.c_str()), PyFloat_FromDouble(theRoadPosition->pos)); + } + PyDict_SetItem($result, PyInt_FromLong(theKey), tuple); + continue; + } PyObject *value = SWIG_NewPointerObj(SWIG_as_voidptr(theVal), SWIGTYPE_p_libsumo__TraCIResult, 0); PyDict_SetItem($result, PyInt_FromLong(theKey), value); } }; %typemap(out) libsumo::TraCIPosition { - if ($1.z != - 1024 * 1024 * 1024) { // see Position::INVALID + if ($1.z != libsumo::INVALID_DOUBLE_VALUE) { $result = PyTuple_Pack(3, PyFloat_FromDouble($1.x), PyFloat_FromDouble($1.y), PyFloat_FromDouble($1.z)); } else { $result = PyTuple_Pack(2, PyFloat_FromDouble($1.x), PyFloat_FromDouble($1.y)); @@ -216,6 +238,19 @@ } }; +%typemap(out) std::vector { + $result = PyTuple_New($1.size()); + int index = 0; + for (auto iter = $1.begin(); iter != $1.end(); ++iter) { + PyTuple_SetItem($result, index++, PyTuple_Pack(6, PyUnicode_FromString(iter->lane.c_str()), + PyFloat_FromDouble(iter->endPos), + PyUnicode_FromString(iter->stoppingPlaceID.c_str()), + PyLong_FromLong(iter->stopFlags), + PyFloat_FromDouble(iter->duration), + PyFloat_FromDouble(iter->until))); + } +}; + %typemap(out) std::pair { $result = PyTuple_Pack(2, PyLong_FromLong($1.first), PyLong_FromLong($1.second)); }; @@ -237,8 +272,8 @@ %begin %{ #ifdef _MSC_VER -// ignore constant conditional expression warnings -#pragma warning(disable:4127) +// ignore constant conditional expression and unreachable code warnings +#pragma warning(disable:4127 4702) #endif %} @@ -307,6 +342,7 @@ %include "Polygon.h" %include "Route.h" %include "Simulation.h" +%include "TraCIConstants.h" %include "TrafficLight.h" %include "VehicleType.h" %include "Vehicle.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Makefile.in sumo-1.2.0+dfsg1/src/libsumo/Makefile.in --- sumo-1.1.0+dfsg1/src/libsumo/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,681 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/libsumo -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libsumostatic_a_AR = $(AR) $(ARFLAGS) -libsumostatic_a_LIBADD = -am_libsumostatic_a_OBJECTS = Edge.$(OBJEXT) Helper.$(OBJEXT) \ - InductionLoop.$(OBJEXT) Junction.$(OBJEXT) Lane.$(OBJEXT) \ - LaneArea.$(OBJEXT) MultiEntryExit.$(OBJEXT) POI.$(OBJEXT) \ - Person.$(OBJEXT) Polygon.$(OBJEXT) Route.$(OBJEXT) \ - Simulation.$(OBJEXT) TrafficLight.$(OBJEXT) Vehicle.$(OBJEXT) \ - VehicleType.$(OBJEXT) -libsumostatic_a_OBJECTS = $(am_libsumostatic_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 = $(libsumostatic_a_SOURCES) -DIST_SOURCES = $(libsumostatic_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libsumostatic.a -libsumostatic_a_SOURCES = Edge.cpp \ -Edge.h \ -Helper.cpp \ -Helper.h \ -InductionLoop.cpp \ -InductionLoop.h \ -Junction.cpp \ -Junction.h \ -Lane.cpp \ -Lane.h \ -LaneArea.cpp \ -LaneArea.h \ -MultiEntryExit.cpp \ -MultiEntryExit.h \ -POI.cpp \ -POI.h \ -Person.h \ -Person.cpp \ -Polygon.h \ -Polygon.cpp \ -Route.h \ -Route.cpp \ -Simulation.h \ -Simulation.cpp \ -Subscription.h \ -TraCIDefs.h \ -TrafficLight.h \ -TrafficLight.cpp \ -Vehicle.h \ -Vehicle.cpp \ -VehicleType.h \ -VehicleType.cpp - -EXTRA_DIST = libsumo.i -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) --foreign src/libsumo/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/libsumo/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) - -libsumostatic.a: $(libsumostatic_a_OBJECTS) $(libsumostatic_a_DEPENDENCIES) $(EXTRA_libsumostatic_a_DEPENDENCIES) - $(AM_V_at)-rm -f libsumostatic.a - $(AM_V_AR)$(libsumostatic_a_AR) libsumostatic.a $(libsumostatic_a_OBJECTS) $(libsumostatic_a_LIBADD) - $(AM_V_at)$(RANLIB) libsumostatic.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Edge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InductionLoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Junction.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lane.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LaneArea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MultiEntryExit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/POI.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Person.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Polygon.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Route.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Simulation.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TrafficLight.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vehicle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VehicleType.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/libsumo/MultiEntryExit.cpp sumo-1.2.0+dfsg1/src/libsumo/MultiEntryExit.cpp --- sumo-1.1.0+dfsg1/src/libsumo/MultiEntryExit.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/MultiEntryExit.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "MultiEntryExit.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/MultiEntryExit.h sumo-1.2.0+dfsg1/src/libsumo/MultiEntryExit.h --- sumo-1.1.0+dfsg1/src/libsumo/MultiEntryExit.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/MultiEntryExit.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Person.cpp sumo-1.2.0+dfsg1/src/libsumo/Person.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Person.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Person.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,13 +26,13 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include "VehicleType.h" #include "Person.h" @@ -84,6 +84,19 @@ double +Person::getSlope(const std::string& personID) { + MSPerson* person = getPerson(personID); + const double ep = person->getEdgePos(); + const MSLane* lane = getSidewalk(person->getEdge()); + if (lane == nullptr) { + lane = person->getEdge()->getLanes()[0]; + } + const double gp = lane->interpolateLanePosToGeometryPos(ep); + return lane->getShape().slopeDegreeAtOffset(gp); +} + + +double Person::getSpeed(const std::string& personID) { return getPerson(personID)->getSpeed(); } @@ -142,7 +155,9 @@ } std::vector edgeIDs; for (auto& e : p->getEdges(nextStageIndex)) { - edgeIDs.push_back(e->getID()); + if (e != nullptr) { + edgeIDs.push_back(e->getID()); + } } return edgeIDs; } @@ -372,7 +387,7 @@ SUMOVehicleParameter* params = new SUMOVehicleParameter(vehicleParams); MSTransportable::MSTransportablePlan* plan = new MSTransportable::MSTransportablePlan(); - plan->push_back(new MSTransportable::Stage_Waiting(edge, 0, depart, pos, "awaiting departure", true)); + plan->push_back(new MSTransportable::Stage_Waiting(edge, nullptr, 0, depart, pos, "awaiting departure", true)); try { MSTransportable* person = MSNet::getInstance()->getPersonControl().buildPerson(params, vehicleType, plan, nullptr); @@ -419,7 +434,7 @@ throw TraCIException("Invalid stopping place id '" + stopID + "' for person: '" + personID + "'"); } } - p->appendStage(new MSTransportable::Stage_Waiting(p->getArrivalEdge(), TIME2STEPS(duration), 0, p->getArrivalPos(), description, false)); + p->appendStage(new MSTransportable::Stage_Waiting(p->getArrivalEdge(), nullptr, TIME2STEPS(duration), 0, p->getArrivalPos(), description, false)); } @@ -785,7 +800,7 @@ void Person::setColor(const std::string& personID, const TraCIColor& c) { const SUMOVehicleParameter& p = getPerson(personID)->getParameter(); - p.color.set(c.r, c.g, c.b, c.a); + p.color.set((unsigned char)c.r, (unsigned char)c.g, (unsigned char)c.b, (unsigned char)c.a); p.parametersSet |= VEHPARS_COLOR_SET; } @@ -829,6 +844,8 @@ return wrapper->wrapPosition(objID, variable, getPosition(objID, true)); case VAR_ANGLE: return wrapper->wrapDouble(objID, variable, getAngle(objID)); + case VAR_SLOPE: + return wrapper->wrapDouble(objID, variable, getSlope(objID)); case VAR_SPEED: return wrapper->wrapDouble(objID, variable, getSpeed(objID)); case VAR_ROAD_ID: diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Person.h sumo-1.2.0+dfsg1/src/libsumo/Person.h --- sumo-1.1.0+dfsg1/src/libsumo/Person.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Person.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,7 +26,7 @@ #include #include #include -#include +#include // =========================================================================== @@ -63,6 +63,7 @@ static std::vector getEdges(const std::string& personID, int nextStageIndex = 0); static std::string getParameter(const std::string& routeID, const std::string& param); static double getAngle(const std::string& personID); + static double getSlope(const std::string& personID); static double getLanePosition(const std::string& personID); LIBSUMO_VEHICLE_TYPE_GETTER diff -Nru sumo-1.1.0+dfsg1/src/libsumo/POI.cpp sumo-1.2.0+dfsg1/src/libsumo/POI.cpp --- sumo-1.1.0+dfsg1/src/libsumo/POI.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/POI.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,8 +27,10 @@ #include #include +#include #include -#include +#include +#include "Polygon.h" #include "POI.h" #include "Helper.h" @@ -77,6 +79,30 @@ } +double +POI::getWidth(const std::string& poiID) { + return getPoI(poiID)->getWidth(); +} + + +double +POI::getHeight(const std::string& poiID) { + return getPoI(poiID)->getHeight(); +} + + +double +POI::getAngle(const std::string& poiID) { + return getPoI(poiID)->getShapeNaviDegree(); +} + + +std::string +POI::getImageFile(const std::string& poiID) { + return getPoI(poiID)->getShapeImgFile(); +} + + std::string POI::getParameter(const std::string& poiID, const std::string& key) { return getPoI(poiID)->getParameter(key, ""); @@ -103,15 +129,39 @@ } +void +POI::setWidth(const std::string& poiID, double width) { + getPoI(poiID)->setWidth(width); +} + + +void +POI::setHeight(const std::string& poiID, double height) { + getPoI(poiID)->setHeight(height); +} + + +void +POI::setAngle(const std::string& poiID, double angle) { + getPoI(poiID)->setShapeNaviDegree(angle); +} + + +void +POI::setImageFile(const std::string& poiID, const std::string& imageFile) { + getPoI(poiID)->setShapeImgFile(imageFile); +} + + bool -POI::add(const std::string& poiID, double x, double y, const TraCIColor& color, const std::string& poiType, int layer) { +POI::add(const std::string& poiID, double x, double y, const TraCIColor& color, const std::string& poiType, int layer, const std::string& imgFile, double width, double height, double angle) { ShapeContainer& shapeCont = MSNet::getInstance()->getShapeContainer(); return shapeCont.addPOI(poiID, poiType, Helper::makeRGBColor(color), Position(x, y), false, "", 0, 0, (double)layer, - Shape::DEFAULT_ANGLE, - Shape::DEFAULT_IMG_FILE, + angle, + imgFile, Shape::DEFAULT_RELATIVEPATH, - Shape::DEFAULT_IMG_WIDTH, - Shape::DEFAULT_IMG_HEIGHT); + width, + height); } @@ -123,12 +173,67 @@ void +POI::highlight(const std::string& poiID, const TraCIColor& col, double size, const int alphaMax, const double duration, const int type) { + // NOTE: Code is duplicated in large parts in Vehicle.cpp + PointOfInterest* poi = getPoI(poiID); + + // Center of the highlight circle + Position* center = dynamic_cast(poi); + // Size of the highlight circle + if (size <= 0) { + size = sqrt(poi->getHeight() * poi->getHeight() + poi->getWidth() * poi->getWidth()) * 0.7; + } + // Make polygon shape + const unsigned int nPoints = 34; + const PositionVector circlePV = GeomHelper::makeRing(size, size + 1., *center, nPoints); + TraCIPositionVector circle = Helper::makeTraCIPositionVector(circlePV); + +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << SIMTIME << " Vehicle::highlight() for vehicle '" << vehicleID << "'\n" + << " circle: " << circlePV << std::endl; +#endif + + // Find a free polygon id + int i = 0; + std::string polyID = poi->getID() + "_hl" + toString(i); + while (Polygon::exists(polyID)) { + polyID = poi->getID() + "_hl" + toString(++i); + } + // Line width + double lw = 0.; + // Layer + double lyr = 0.; + if (MSNet::getInstance()->isGUINet()) { + lyr = poi->getShapeLayer(); + lyr += (type + 1) / 257.; + } + // Make Polygon + Polygon::addHighlightPolygon(poiID, type, polyID, circle, col, true, lw, "highlight", (int)lyr); + + // Animation time line + double maxAttack = 1.0; // maximal fade-in time + std::vector timeSpan; + if (duration > 0.) { + timeSpan = {0, MIN2(maxAttack, duration / 3.), 2.*duration / 3., duration}; + } + // Alpha time line + std::vector alphaSpan; + if (alphaMax > 0.) { + alphaSpan = {0., (double) alphaMax, ((double) alphaMax) / 3., 0.}; + } + // Attach dynamics + Polygon::addDynamics(polyID, "", timeSpan, alphaSpan, false, false); +} + + +void POI::setParameter(const std::string& poiID, const std::string& key, const std::string& value) { PointOfInterest* p = getPoI(poiID); p->setParameter(key, value); } + LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(POI, POI) @@ -182,6 +287,14 @@ return wrapper->wrapPosition(objID, variable, getPosition(objID)); case VAR_POSITION3D: return wrapper->wrapPosition(objID, variable, getPosition(objID, true)); + case VAR_WIDTH: + return wrapper->wrapDouble(objID, variable, getWidth(objID)); + case VAR_HEIGHT: + return wrapper->wrapDouble(objID, variable, getHeight(objID)); + case VAR_ANGLE: + return wrapper->wrapDouble(objID, variable, getAngle(objID)); + case VAR_IMAGEFILE: + return wrapper->wrapString(objID, variable, getImageFile(objID)); default: return false; } diff -Nru sumo-1.1.0+dfsg1/src/libsumo/POI.h sumo-1.2.0+dfsg1/src/libsumo/POI.h --- sumo-1.1.0+dfsg1/src/libsumo/POI.h 2018-10-04 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/POI.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,6 +28,7 @@ #include #include +#include // =========================================================================== @@ -56,13 +57,22 @@ static std::string getType(const std::string& poiID); static TraCIPosition getPosition(const std::string& poiID, const bool includeZ = false); static TraCIColor getColor(const std::string& poiID); + static double getWidth(const std::string& poiID); + static double getHeight(const std::string& poiID); + static double getAngle(const std::string& poiID); + static std::string getImageFile(const std::string& poiID); static std::string getParameter(const std::string& poiID, const std::string& key); static void setType(const std::string& poiID, const std::string& setType); static void setColor(const std::string& poiID, const TraCIColor& c); static void setPosition(const std::string& poiID, double x, double y); - static bool add(const std::string& poiID, double x, double y, const TraCIColor& color, const std::string& poiType = "", int layer = 0); + static void setWidth(const std::string& poiID, double width); + static void setHeight(const std::string& poiID, double height); + static void setAngle(const std::string& poiID, double angle); + static void setImageFile(const std::string& poiID, const std::string& imageFile); + static bool add(const std::string& poiID, double x, double y, const TraCIColor& color, const std::string& poiType = "", int layer = 0, const std::string& imgFile = Shape::DEFAULT_IMG_FILE, double width = Shape::DEFAULT_IMG_WIDTH, double height = Shape::DEFAULT_IMG_HEIGHT, double angle = Shape::DEFAULT_ANGLE); static bool remove(const std::string& poiID, int layer = 0); + static void highlight(const std::string& poiID, const TraCIColor& col, double size, const int alphaMax, const double duration, const int type); static void setParameter(const std::string& poiID, const std::string& key, const std::string& value); diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Polygon.cpp sumo-1.2.0+dfsg1/src/libsumo/Polygon.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Polygon.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Polygon.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -20,9 +20,15 @@ // included modules // =========================================================================== #include -#include +#include +#include +#include +#include +#include #include +#include #include +#include #include "Polygon.h" #include "Helper.h" @@ -122,6 +128,56 @@ } } +void +Polygon::addHighlightPolygon(const std::string& objectID, const int type, const std::string& polygonID, const TraCIPositionVector& shape, const TraCIColor& color, bool fill, double lineWidth, const std::string& polygonType, int layer) { + MSNet::getInstance()->getShapeContainer().registerHighlight(objectID, type, polygonID); + add(polygonID, shape, color, fill, lineWidth, polygonType, layer); +} + +void +Polygon::addDynamics(const std::string& polygonID, const std::string& trackedID, const std::vector& timeSpan, const std::vector& alphaSpan, bool looped, bool rotate) { + if (timeSpan.empty()) { + if (trackedID == "") { + throw TraCIException("Could not add polygon dynamics for polygon '" + polygonID + "': dynamics underspecified (either a tracked object ID or a time span have to be provided)."); + } + if (looped) { + throw TraCIException("Could not add polygon dynamics for polygon '" + polygonID + "': looped==true requires time line of positive length."); + } + } + if (timeSpan.size() == 1) { + throw TraCIException("Could not add polygon dynamics for polygon '" + polygonID + "': time span cannot have length one."); + } else if (timeSpan.size() > 0 && timeSpan[0] != 0.0) { + throw TraCIException("Could not add polygon dynamics for polygon '" + polygonID + "': first element of time span must be zero."); + } + if (timeSpan.size() != alphaSpan.size() && alphaSpan.size() != 0) { + throw TraCIException("Could not add polygon dynamics for polygon '" + polygonID + "': alpha span must have length zero or equal to time span length."); + } + if (timeSpan.size() >= 2) { + for (unsigned int i = 1; i < timeSpan.size(); ++i) { + if (timeSpan[i - 1] > timeSpan[i]) { + throw TraCIException("Could not add polygon dynamics for polygon '" + polygonID + "': entries of time span must be ordered ascendingly."); + } + } + } + + SUMOTrafficObject* obj = getTrafficObject(trackedID); + ShapeContainer& shapeCont = MSNet::getInstance()->getShapeContainer(); + PolygonDynamics* pd = shapeCont.addPolygonDynamics(SIMTIME, polygonID, obj, timeSpan, alphaSpan, looped, rotate); + if (pd == nullptr) { + throw TraCIException("Could not add polygon dynamics for polygon '" + polygonID + "': polygon doesn't exist."); + } + // Ensure existence of a DynamicShapeUpdater + if (MSNet::getInstance()->getDynamicShapeUpdater() == nullptr) { + MSNet::VehicleStateListener* listener = dynamic_cast(MSNet::getInstance()->makeDynamicShapeUpdater()); + MSNet::getInstance()->addVehicleStateListener(listener); + } + + // Schedule the regular polygon update + auto cmd = new ParametrisedWrappingCommand(&shapeCont, pd, &ShapeContainer::polygonDynamicsUpdate); + shapeCont.addPolygonUpdateCommand(pd->getPolygonID(), cmd); + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent(cmd, SIMSTEP + DELTA_T); +} + void Polygon::remove(const std::string& polygonID, int /* layer */) { @@ -156,6 +212,26 @@ } +SUMOTrafficObject* +Polygon::getTrafficObject(const std::string& id) { + if (id == "") { + return nullptr; + } + MSNet* net = MSNet::getInstance(); + // First try to find a vehicle with the given id + SUMOVehicle* sumoVehicle = net->getVehicleControl().getVehicle(id); + if (sumoVehicle != nullptr) { + return static_cast(sumoVehicle); + } + MSTransportable* transportable = net->getPersonControl().get(id); + if (transportable != nullptr) { + return static_cast(transportable); + } else { + throw TraCIException("Traffic object '" + id + "' is not known"); + } +} + + void Polygon::setParameter(const std::string& polygonID, const std::string& key, const std::string& value) { SUMOPolygon* p = getPolygon(polygonID); @@ -213,6 +289,12 @@ } +bool +Polygon::exists(std::string polyID) { + SUMOPolygon* p = MSNet::getInstance()->getShapeContainer().getPolygons().get(polyID); + return p != nullptr; +} + } diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Polygon.h sumo-1.2.0+dfsg1/src/libsumo/Polygon.h --- sumo-1.1.0+dfsg1/src/libsumo/Polygon.h 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Polygon.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,7 +26,7 @@ #include #include #include -#include +#include // =========================================================================== @@ -34,6 +34,7 @@ // =========================================================================== class NamedRTree; class SUMOPolygon; +class SUMOTrafficObject; namespace libsumo { class VariableWrapper; } @@ -57,6 +58,9 @@ static void setShape(const std::string& polygonID, const TraCIPositionVector& shape); static void setColor(const std::string& polygonID, const TraCIColor& c); static void add(const std::string& polygonID, const TraCIPositionVector& shape, const TraCIColor& color, bool fill = false, double lineWidth = 1, const std::string& polygonType = "", int layer = 0); + + static void addHighlightPolygon(const std::string& objectID, const int type, const std::string& polygonID, const TraCIPositionVector& shape, const TraCIColor& color, bool fill, double lineWidth, const std::string& polygonType, int layer); + static void addDynamics(const std::string& polygonID, const std::string& trackedID, const std::vector& timeSpan, const std::vector& alphaSpan, bool looped, bool rotate); static void remove(const std::string& polygonID, int layer = 0); static void setFilled(std::string polygonID, bool filled); @@ -80,8 +84,14 @@ static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper); + /// Checks if a polygon of the given name exists already in the simulation + static bool exists(std::string polyID); + private: static SUMOPolygon* getPolygon(const std::string& id); + /// @brief Obtain a traffic object with the given id if one exists + /// @return Searches the domains Vehicle and Person for the given id (priorizes vehicles) + static SUMOTrafficObject* getTrafficObject(const std::string& id); private: static SubscriptionResults mySubscriptionResults; diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Route.cpp sumo-1.2.0+dfsg1/src/libsumo/Route.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Route.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Route.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "Helper.h" #include "Route.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Route.h sumo-1.2.0+dfsg1/src/libsumo/Route.h --- sumo-1.1.0+dfsg1/src/libsumo/Route.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Route.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Simulation.cpp sumo-1.2.0+dfsg1/src/libsumo/Simulation.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Simulation.cpp 2018-11-22 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Simulation.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include "Simulation.h" #include @@ -323,12 +323,16 @@ TraCIRoadPosition -Simulation::convertRoad(double x, double y, bool isGeo) { +Simulation::convertRoad(double x, double y, bool isGeo, const std::string& vClass) { Position pos(x, y); if (isGeo) { GeoConvHelper::getFinal().x2cartesian_const(pos); } - std::pair roadPos = libsumo::Helper::convertCartesianToRoadMap(pos); + if (!SumoVehicleClassStrings.hasString(vClass)) { + throw TraCIException("Unknown vehicle class '" + vClass + "'."); + } + const SUMOVehicleClass vc = SumoVehicleClassStrings.get(vClass); + std::pair roadPos = libsumo::Helper::convertCartesianToRoadMap(pos, vc); if (roadPos.first == nullptr) { throw TraCIException("Cannot convert position to road."); } @@ -361,8 +365,8 @@ GeoConvHelper::getFinal().x2cartesian_const(pos2); } if (isDriving) { - std::pair roadPos1 = libsumo::Helper::convertCartesianToRoadMap(pos1); - std::pair roadPos2 = libsumo::Helper::convertCartesianToRoadMap(pos2); + std::pair roadPos1 = libsumo::Helper::convertCartesianToRoadMap(pos1, SVC_IGNORING); + std::pair roadPos2 = libsumo::Helper::convertCartesianToRoadMap(pos2, SVC_IGNORING); if ((roadPos1.first == roadPos2.first) && (roadPos1.second <= roadPos2.second)) { // same edge return roadPos2.second - roadPos1.second; @@ -448,7 +452,7 @@ for (const MSEdge* e : edges) { result.edges.push_back(e->getID()); } - result.travelTime = result.cost = router.recomputeCosts(edges, vehicle, dep); + result.travelTime = result.cost = router.recomputeCosts(edges, vehicle, dep, &result.length); if (vehicle != nullptr) { MSNet::getInstance()->getVehicleControl().deleteVehicle(vehicle, true); } @@ -482,19 +486,21 @@ } for (StringTokenizer st(modes); st.hasNext();) { const std::string mode = st.next(); - if (mode == "car") { + if (mode == toString(PERSONMODE_CAR)) { pars.push_back(new SUMOVehicleParameter()); pars.back()->vtypeid = DEFAULT_VTYPE_ID; pars.back()->id = mode; modeSet |= SVC_PASSENGER; - } else if (mode == "bicycle") { + } else if (mode == toString(PERSONMODE_BICYCLE)) { pars.push_back(new SUMOVehicleParameter()); pars.back()->vtypeid = DEFAULT_BIKETYPE_ID; pars.back()->id = mode; modeSet |= SVC_BICYCLE; - } else if (mode == "public") { + } else if (mode == toString(PERSONMODE_PUBLIC)) { pars.push_back(nullptr); modeSet |= SVC_BUS; + } else if (mode == toString(PERSONMODE_WALK)) { + // do nothing } else { throw TraCIException("Unknown person mode '" + mode + "'."); } @@ -514,7 +520,7 @@ if (walkFactor < 0) { walkFactor = OptionsCont::getOptions().getFloat("persontrip.walkfactor"); } - const double externalFactor = StringUtils::toDouble(pedType->getParameter().getParameter("externalEffortFactor", "1.0")); + const double externalFactor = StringUtils::toDouble(pedType->getParameter().getParameter("externalEffortFactor", "100")); if (departPos < 0) { departPos += fromEdge->getLength(); } diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Simulation.h sumo-1.2.0+dfsg1/src/libsumo/Simulation.h --- sumo-1.1.0+dfsg1/src/libsumo/Simulation.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Simulation.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ #include #include -#include +#include // =========================================================================== @@ -94,7 +94,7 @@ static TraCIPosition convert3D(const std::string& edgeID, double pos, int laneIndex = 0, bool toGeo = false); - static TraCIRoadPosition convertRoad(double x, double y, bool isGeo = false); + static TraCIRoadPosition convertRoad(double x, double y, bool isGeo = false, const std::string& vClass = "ignoring"); static TraCIPosition convertGeo(double x, double y, bool fromGeo = false); diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Subscription.h sumo-1.2.0+dfsg1/src/libsumo/Subscription.h --- sumo-1.1.0+dfsg1/src/libsumo/Subscription.h 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Subscription.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -124,6 +124,7 @@ virtual bool wrapStringList(const std::string& objID, const int variable, const std::vector& value) = 0; virtual bool wrapPosition(const std::string& objID, const int variable, const TraCIPosition& value) = 0; virtual bool wrapColor(const std::string& objID, const int variable, const TraCIColor& value) = 0; + virtual bool wrapRoadPosition(const std::string& objID, const int variable, const TraCIRoadPosition& value) = 0; }; } diff -Nru sumo-1.1.0+dfsg1/src/libsumo/TraCIConstants.h sumo-1.2.0+dfsg1/src/libsumo/TraCIConstants.h --- sumo-1.1.0+dfsg1/src/libsumo/TraCIConstants.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/TraCIConstants.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,999 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file TraCIConstants.h +/// @author Axel Wegener +/// @author Friedemann Wesner +/// @author Bjoern Hendriks +/// @author Daniel Krajzewicz +/// @author Thimor Bohn +/// @author Tino Morenz +/// @author Michael Behrisch +/// @author Christoph Sommer +/// @author Mario Krumnow +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @date 2007/10/24 +/// @version $Id$ +/// +// holds codes used for TraCI +/****************************************************************************/ +#ifndef TRACICONSTANTS_H +#define TRACICONSTANTS_H + +#if __cplusplus >= 201103L +#define TRACI_CONST constexpr +#else +#define TRACI_CONST const +#endif + +namespace libsumo { + +// **************************************** +// VERSION +// **************************************** +TRACI_CONST int TRACI_VERSION = 20; + +// **************************************** +// COMMANDS +// **************************************** +// command: get version +TRACI_CONST int CMD_GETVERSION = 0x00; + +// command: load +TRACI_CONST int CMD_LOAD = 0x01; + +// command: simulation step +TRACI_CONST int CMD_SIMSTEP = 0x02; + +// command: set connection priority (execution order) +TRACI_CONST int CMD_SETORDER = 0x03; + +// command: stop node +TRACI_CONST int CMD_STOP = 0x12; + +// command: reroute to parking area +TRACI_CONST int CMD_REROUTE_TO_PARKING = 0xc2; + +// command: Resume from parking +TRACI_CONST int CMD_RESUME = 0x19; + +// command: set lane +TRACI_CONST int CMD_CHANGELANE = 0x13; + +// command: slow down +TRACI_CONST int CMD_SLOWDOWN = 0x14; + +// command: set sublane (vehicle) +TRACI_CONST int CMD_CHANGESUBLANE = 0x15; + +// command: open gap +TRACI_CONST int CMD_OPENGAP = 0x16; + +// command: change target +TRACI_CONST int CMD_CHANGETARGET = 0x31; + +// command: close sumo +TRACI_CONST int CMD_CLOSE = 0x7F; + +// command: add subscription filter +TRACI_CONST int CMD_ADD_SUBSCRIPTION_FILTER = 0x7e; + + +// command: subscribe induction loop (e1) context +TRACI_CONST int CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT = 0x80; +// response: subscribe induction loop (e1) context +TRACI_CONST int RESPONSE_SUBSCRIBE_INDUCTIONLOOP_CONTEXT = 0x90; +// command: get induction loop (e1) variable +TRACI_CONST int CMD_GET_INDUCTIONLOOP_VARIABLE = 0xa0; +// response: get induction loop (e1) variable +TRACI_CONST int RESPONSE_GET_INDUCTIONLOOP_VARIABLE = 0xb0; +// command: subscribe induction loop (e1) variable +TRACI_CONST int CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE = 0xd0; +// response: subscribe induction loop (e1) variable +TRACI_CONST int RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE = 0xe0; + +// command: subscribe multi-entry/multi-exit detector (e3) context +TRACI_CONST int CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT = 0x81; +// response: subscribe multi-entry/multi-exit detector (e3) context +TRACI_CONST int RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT = 0x91; +// command: get multi-entry/multi-exit detector (e3) variable +TRACI_CONST int CMD_GET_MULTIENTRYEXIT_VARIABLE = 0xa1; +// response: get multi-entry/multi-exit detector (e3) variable +TRACI_CONST int RESPONSE_GET_MULTIENTRYEXIT_VARIABLE = 0xb1; +// command: subscribe multi-entry/multi-exit detector (e3) variable +TRACI_CONST int CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE = 0xd1; +// response: subscribe multi-entry/multi-exit detector (e3) variable +TRACI_CONST int RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE = 0xe1; + +// command: subscribe traffic lights context +TRACI_CONST int CMD_SUBSCRIBE_TL_CONTEXT = 0x82; +// response: subscribe traffic lights context +TRACI_CONST int RESPONSE_SUBSCRIBE_TL_CONTEXT = 0x92; +// command: get traffic lights variable +TRACI_CONST int CMD_GET_TL_VARIABLE = 0xa2; +// response: get traffic lights variable +TRACI_CONST int RESPONSE_GET_TL_VARIABLE = 0xb2; +// command: set traffic lights variable +TRACI_CONST int CMD_SET_TL_VARIABLE = 0xc2; +// command: subscribe traffic lights variable +TRACI_CONST int CMD_SUBSCRIBE_TL_VARIABLE = 0xd2; +// response: subscribe traffic lights variable +TRACI_CONST int RESPONSE_SUBSCRIBE_TL_VARIABLE = 0xe2; + +// command: subscribe lane context +TRACI_CONST int CMD_SUBSCRIBE_LANE_CONTEXT = 0x83; +// response: subscribe lane context +TRACI_CONST int RESPONSE_SUBSCRIBE_LANE_CONTEXT = 0x93; +// command: get lane variable +TRACI_CONST int CMD_GET_LANE_VARIABLE = 0xa3; +// response: get lane variable +TRACI_CONST int RESPONSE_GET_LANE_VARIABLE = 0xb3; +// command: set lane variable +TRACI_CONST int CMD_SET_LANE_VARIABLE = 0xc3; +// command: subscribe lane variable +TRACI_CONST int CMD_SUBSCRIBE_LANE_VARIABLE = 0xd3; +// response: subscribe lane variable +TRACI_CONST int RESPONSE_SUBSCRIBE_LANE_VARIABLE = 0xe3; + +// command: subscribe vehicle context +TRACI_CONST int CMD_SUBSCRIBE_VEHICLE_CONTEXT = 0x84; +// response: subscribe vehicle context +TRACI_CONST int RESPONSE_SUBSCRIBE_VEHICLE_CONTEXT = 0x94; +// command: get vehicle variable +TRACI_CONST int CMD_GET_VEHICLE_VARIABLE = 0xa4; +// response: get vehicle variable +TRACI_CONST int RESPONSE_GET_VEHICLE_VARIABLE = 0xb4; +// command: set vehicle variable +TRACI_CONST int CMD_SET_VEHICLE_VARIABLE = 0xc4; +// command: subscribe vehicle variable +TRACI_CONST int CMD_SUBSCRIBE_VEHICLE_VARIABLE = 0xd4; +// response: subscribe vehicle variable +TRACI_CONST int RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE = 0xe4; + +// command: subscribe vehicle type context +TRACI_CONST int CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT = 0x85; +// response: subscribe vehicle type context +TRACI_CONST int RESPONSE_SUBSCRIBE_VEHICLETYPE_CONTEXT = 0x95; +// command: get vehicle type variable +TRACI_CONST int CMD_GET_VEHICLETYPE_VARIABLE = 0xa5; +// response: get vehicle type variable +TRACI_CONST int RESPONSE_GET_VEHICLETYPE_VARIABLE = 0xb5; +// command: set vehicle type variable +TRACI_CONST int CMD_SET_VEHICLETYPE_VARIABLE = 0xc5; +// command: subscribe vehicle type variable +TRACI_CONST int CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE = 0xd5; +// response: subscribe vehicle type variable +TRACI_CONST int RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE = 0xe5; + +// command: subscribe route context +TRACI_CONST int CMD_SUBSCRIBE_ROUTE_CONTEXT = 0x86; +// response: subscribe route context +TRACI_CONST int RESPONSE_SUBSCRIBE_ROUTE_CONTEXT = 0x96; +// command: get route variable +TRACI_CONST int CMD_GET_ROUTE_VARIABLE = 0xa6; +// response: get route variable +TRACI_CONST int RESPONSE_GET_ROUTE_VARIABLE = 0xb6; +// command: set route variable +TRACI_CONST int CMD_SET_ROUTE_VARIABLE = 0xc6; +// command: subscribe route variable +TRACI_CONST int CMD_SUBSCRIBE_ROUTE_VARIABLE = 0xd6; +// response: subscribe route variable +TRACI_CONST int RESPONSE_SUBSCRIBE_ROUTE_VARIABLE = 0xe6; + +// command: subscribe poi context +TRACI_CONST int CMD_SUBSCRIBE_POI_CONTEXT = 0x87; +// response: subscribe poi context +TRACI_CONST int RESPONSE_SUBSCRIBE_POI_CONTEXT = 0x97; +// command: get poi variable +TRACI_CONST int CMD_GET_POI_VARIABLE = 0xa7; +// response: get poi variable +TRACI_CONST int RESPONSE_GET_POI_VARIABLE = 0xb7; +// command: set poi variable +TRACI_CONST int CMD_SET_POI_VARIABLE = 0xc7; +// command: subscribe poi variable +TRACI_CONST int CMD_SUBSCRIBE_POI_VARIABLE = 0xd7; +// response: subscribe poi variable +TRACI_CONST int RESPONSE_SUBSCRIBE_POI_VARIABLE = 0xe7; + +// command: subscribe polygon context +TRACI_CONST int CMD_SUBSCRIBE_POLYGON_CONTEXT = 0x88; +// response: subscribe polygon context +TRACI_CONST int RESPONSE_SUBSCRIBE_POLYGON_CONTEXT = 0x98; +// command: get polygon variable +TRACI_CONST int CMD_GET_POLYGON_VARIABLE = 0xa8; +// response: get polygon variable +TRACI_CONST int RESPONSE_GET_POLYGON_VARIABLE = 0xb8; +// command: set polygon variable +TRACI_CONST int CMD_SET_POLYGON_VARIABLE = 0xc8; +// command: subscribe polygon variable +TRACI_CONST int CMD_SUBSCRIBE_POLYGON_VARIABLE = 0xd8; +// response: subscribe polygon variable +TRACI_CONST int RESPONSE_SUBSCRIBE_POLYGON_VARIABLE = 0xe8; + +// command: subscribe junction context +TRACI_CONST int CMD_SUBSCRIBE_JUNCTION_CONTEXT = 0x89; +// response: subscribe junction context +TRACI_CONST int RESPONSE_SUBSCRIBE_JUNCTION_CONTEXT = 0x99; +// command: get junction variable +TRACI_CONST int CMD_GET_JUNCTION_VARIABLE = 0xa9; +// response: get junction variable +TRACI_CONST int RESPONSE_GET_JUNCTION_VARIABLE = 0xb9; +// command: set junction variable +TRACI_CONST int CMD_SET_JUNCTION_VARIABLE = 0xc9; +// command: subscribe junction variable +TRACI_CONST int CMD_SUBSCRIBE_JUNCTION_VARIABLE = 0xd9; +// response: subscribe junction variable +TRACI_CONST int RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE = 0xe9; + +// command: subscribe edge context +TRACI_CONST int CMD_SUBSCRIBE_EDGE_CONTEXT = 0x8a; +// response: subscribe edge context +TRACI_CONST int RESPONSE_SUBSCRIBE_EDGE_CONTEXT = 0x9a; +// command: get edge variable +TRACI_CONST int CMD_GET_EDGE_VARIABLE = 0xaa; +// response: get edge variable +TRACI_CONST int RESPONSE_GET_EDGE_VARIABLE = 0xba; +// command: set edge variable +TRACI_CONST int CMD_SET_EDGE_VARIABLE = 0xca; +// command: subscribe edge variable +TRACI_CONST int CMD_SUBSCRIBE_EDGE_VARIABLE = 0xda; +// response: subscribe edge variable +TRACI_CONST int RESPONSE_SUBSCRIBE_EDGE_VARIABLE = 0xea; + +// command: subscribe simulation context +TRACI_CONST int CMD_SUBSCRIBE_SIM_CONTEXT = 0x8b; +// response: subscribe simulation context +TRACI_CONST int RESPONSE_SUBSCRIBE_SIM_CONTEXT = 0x9b; +// command: get simulation variable +TRACI_CONST int CMD_GET_SIM_VARIABLE = 0xab; +// response: get simulation variable +TRACI_CONST int RESPONSE_GET_SIM_VARIABLE = 0xbb; +// command: set simulation variable +TRACI_CONST int CMD_SET_SIM_VARIABLE = 0xcb; +// command: subscribe simulation variable +TRACI_CONST int CMD_SUBSCRIBE_SIM_VARIABLE = 0xdb; +// response: subscribe simulation variable +TRACI_CONST int RESPONSE_SUBSCRIBE_SIM_VARIABLE = 0xeb; + +// command: subscribe GUI context +TRACI_CONST int CMD_SUBSCRIBE_GUI_CONTEXT = 0x8c; +// response: subscribe GUI context +TRACI_CONST int RESPONSE_SUBSCRIBE_GUI_CONTEXT = 0x9c; +// command: get GUI variable +TRACI_CONST int CMD_GET_GUI_VARIABLE = 0xac; +// response: get GUI variable +TRACI_CONST int RESPONSE_GET_GUI_VARIABLE = 0xbc; +// command: set GUI variable +TRACI_CONST int CMD_SET_GUI_VARIABLE = 0xcc; +// command: subscribe GUI variable +TRACI_CONST int CMD_SUBSCRIBE_GUI_VARIABLE = 0xdc; +// response: subscribe GUI variable +TRACI_CONST int RESPONSE_SUBSCRIBE_GUI_VARIABLE = 0xec; + +// command: subscribe areal detector (e2) context +TRACI_CONST int CMD_SUBSCRIBE_LANEAREA_CONTEXT = 0x8d; +// response: subscribe areal detector (e2) context +TRACI_CONST int RESPONSE_SUBSCRIBE_LANEAREA_CONTEXT = 0x9d; +// command: get areal detector (e2) variable +TRACI_CONST int CMD_GET_LANEAREA_VARIABLE = 0xad; +// response: get areal detector (e2) variable +TRACI_CONST int RESPONSE_GET_LANEAREA_VARIABLE = 0xbd; +// command: subscribe areal detector (e2) variable +TRACI_CONST int CMD_SUBSCRIBE_LANEAREA_VARIABLE = 0xdd; +// response: subscribe areal detector (e2) variable +TRACI_CONST int RESPONSE_SUBSCRIBE_LANEAREA_VARIABLE = 0xed; + +// command: subscribe person context +TRACI_CONST int CMD_SUBSCRIBE_PERSON_CONTEXT = 0x8e; +// response: subscribe person context +TRACI_CONST int RESPONSE_SUBSCRIBE_PERSON_CONTEXT = 0x9e; +// command: get person variable +TRACI_CONST int CMD_GET_PERSON_VARIABLE = 0xae; +// response: get person variable +TRACI_CONST int RESPONSE_GET_PERSON_VARIABLE = 0xbe; +// command: set person variable +TRACI_CONST int CMD_SET_PERSON_VARIABLE = 0xce; +// command: subscribe person variable +TRACI_CONST int CMD_SUBSCRIBE_PERSON_VARIABLE = 0xde; +// response: subscribe person variable +TRACI_CONST int RESPONSE_SUBSCRIBE_PERSON_VARIABLE = 0xee; + + +// **************************************** +// POSITION REPRESENTATIONS +// **************************************** +// Position in geo-coordinates +TRACI_CONST int POSITION_LON_LAT = 0x00; +// 2D cartesian coordinates +TRACI_CONST int POSITION_2D = 0x01; +// Position in geo-coordinates with altitude +TRACI_CONST int POSITION_LON_LAT_ALT = 0x02; +// 3D cartesian coordinates +TRACI_CONST int POSITION_3D = 0x03; +// Position on road map +TRACI_CONST int POSITION_ROADMAP = 0x04; + + +// **************************************** +// DATA TYPES +// **************************************** +// Polygon (2*n doubles) +TRACI_CONST int TYPE_POLYGON = 0x06; +// unsigned byte +TRACI_CONST int TYPE_UBYTE = 0x07; +// signed byte +TRACI_CONST int TYPE_BYTE = 0x08; +// 32 bit signed integer +TRACI_CONST int TYPE_INTEGER = 0x09; +// double precision float +TRACI_CONST int TYPE_DOUBLE = 0x0B; +// 8 bit ASCII string +TRACI_CONST int TYPE_STRING = 0x0C; +// list of strings +TRACI_CONST int TYPE_STRINGLIST = 0x0E; +// compound object +TRACI_CONST int TYPE_COMPOUND = 0x0F; +// list of double precision floats +TRACI_CONST int TYPE_DOUBLELIST = 0x10; +// color (four ubytes) +TRACI_CONST int TYPE_COLOR = 0x11; + + +// **************************************** +// RESULT TYPES +// **************************************** +// result type: Ok +TRACI_CONST int RTYPE_OK = 0x00; +// result type: not implemented +TRACI_CONST int RTYPE_NOTIMPLEMENTED = 0x01; +// result type: error +TRACI_CONST int RTYPE_ERR = 0xFF; + +// **************************************** +// special return or parameter values +// **************************************** +// return value for invalid queries (especially vehicle is not on the road), see Position::INVALID +TRACI_CONST double INVALID_DOUBLE_VALUE = -1073741824.0; +// return value for invalid queries (especially vehicle is not on the road), see Position::INVALID +TRACI_CONST int INVALID_INT_VALUE = -1073741824; +// maximum value for client ordering (2 ^ 30) +TRACI_CONST int MAX_ORDER = 1073741824; + + +// **************************************** +// DIFFERENT DISTANCE REQUESTS +// **************************************** +// air distance +TRACI_CONST int REQUEST_AIRDIST = 0x00; +// driving distance +TRACI_CONST int REQUEST_DRIVINGDIST = 0x01; + + +// **************************************** +// VEHICLE REMOVAL REASONS +// **************************************** +// vehicle started teleport +TRACI_CONST int REMOVE_TELEPORT = 0x00; +// vehicle removed while parking +TRACI_CONST int REMOVE_PARKING = 0x01; +// vehicle arrived +TRACI_CONST int REMOVE_ARRIVED = 0x02; +// vehicle was vaporized +TRACI_CONST int REMOVE_VAPORIZED = 0x03; +// vehicle finished route during teleport +TRACI_CONST int REMOVE_TELEPORT_ARRIVED = 0x04; + +// **************************************** +// PERSON/CONTAINER STAGES +// **************************************** +// person / container stopping +TRACI_CONST int STAGE_WAITING_FOR_DEPART = 0x00; +// person / container stopping +TRACI_CONST int STAGE_WAITING = 0x01; +// person walking / container transhiping +TRACI_CONST int STAGE_WALKING = 0x02; +// person riding / container being transported +TRACI_CONST int STAGE_DRIVING = 0x03; + +// **************************************** +// Stop Flags +// **************************************** +TRACI_CONST int STOP_DEFAULT = 0x00; +TRACI_CONST int STOP_PARKING = 0x01; +TRACI_CONST int STOP_TRIGGERED = 0x02; +TRACI_CONST int STOP_CONTAINER_TRIGGERED = 0x04; +TRACI_CONST int STOP_BUS_STOP = 0x08; +TRACI_CONST int STOP_CONTAINER_STOP = 0x10; +TRACI_CONST int STOP_CHARGING_STATION = 0x20; +TRACI_CONST int STOP_PARKING_AREA = 0x40; + +// **************************************** +// Departure Flags +// **************************************** +TRACI_CONST int DEPARTFLAG_TRIGGERED = -0x01; +TRACI_CONST int DEPARTFLAG_CONTAINER_TRIGGERED = -0x02; +TRACI_CONST int DEPARTFLAG_NOW = -0x03; + +TRACI_CONST int DEPARTFLAG_SPEED_RANDOM = -0x02; +TRACI_CONST int DEPARTFLAG_SPEED_MAX = -0x03; + +TRACI_CONST int DEPARTFLAG_LANE_RANDOM = -0x02; +TRACI_CONST int DEPARTFLAG_LANE_FREE = -0x03; +TRACI_CONST int DEPARTFLAG_LANE_ALLOWED_FREE = -0x04; +TRACI_CONST int DEPARTFLAG_LANE_BEST_FREE = -0x05; +TRACI_CONST int DEPARTFLAG_LANE_FIRST_ALLOWED = -0x06; + +TRACI_CONST int DEPARTFLAG_POS_RANDOM = -0x02; +TRACI_CONST int DEPARTFLAG_POS_FREE = -0x03; +TRACI_CONST int DEPARTFLAG_POS_BASE = -0x04; +TRACI_CONST int DEPARTFLAG_POS_LAST = -0x05; +TRACI_CONST int DEPARTFLAG_POS_RANDOM_FREE = -0x06; + +TRACI_CONST int ARRIVALFLAG_LANE_CURRENT = -0x02; +TRACI_CONST int ARRIVALFLAG_SPEED_CURRENT = -0x02; + +TRACI_CONST int ARRIVALFLAG_POS_RANDOM = -0x02; +TRACI_CONST int ARRIVALFLAG_POS_MAX = -0x03; + +// **************************************** +// Routing modes +// **************************************** +// use custom weights if available, fall back to loaded weights and then to free-flow speed +TRACI_CONST int ROUTING_MODE_DEFAULT = 0x00; +// use aggregated travel times from device.rerouting +TRACI_CONST int ROUTING_MODE_AGGREGATED = 0x01; +// use loaded efforts +TRACI_CONST int ROUTING_MODE_EFFORT = 0x02; +// use combined costs +TRACI_CONST int ROUTING_MODE_COMBINED = 0x03; + +// **************************************** +// FILTER TYPES (for context subscription filters) +// **************************************** + +// Reset all filters +TRACI_CONST int FILTER_TYPE_NONE = 0x00; + +// Filter by list of lanes relative to ego vehicle +TRACI_CONST int FILTER_TYPE_LANES = 0x01; + +// Exclude vehicles on opposite (and other) lanes from context subscription result +TRACI_CONST int FILTER_TYPE_NOOPPOSITE = 0x02; + +// Specify maximal downstream distance for vehicles in context subscription result +TRACI_CONST int FILTER_TYPE_DOWNSTREAM_DIST = 0x03; + +// Specify maximal upstream distance for vehicles in context subscription result +TRACI_CONST int FILTER_TYPE_UPSTREAM_DIST = 0x04; + +// Only return leader and follower on the specified lanes in context subscription result +TRACI_CONST int FILTER_TYPE_LEAD_FOLLOW = 0x05; + +// Only return foes on upcoming junction in context subscription result +TRACI_CONST int FILTER_TYPE_TURN = 0x07; + +// Only return vehicles of the given vClass in context subscription result +TRACI_CONST int FILTER_TYPE_VCLASS = 0x08; + +// Only return vehicles of the given vType in context subscription result +TRACI_CONST int FILTER_TYPE_VTYPE = 0x09; + + + + + +// **************************************** +// VARIABLE TYPES (for CMD_GET_*_VARIABLE) +// **************************************** +// list of instances' ids (get: all) +TRACI_CONST int TRACI_ID_LIST = 0x00; + +// count of instances (get: all) +TRACI_CONST int ID_COUNT = 0x01; + +// subscribe object variables (get: all) +TRACI_CONST int AUTOMATIC_VARIABLES_SUBSCRIPTION = 0x02; + +// subscribe context variables (get: all) +TRACI_CONST int AUTOMATIC_CONTEXT_SUBSCRIPTION = 0x03; + +// generic attributes (get/set: all) +TRACI_CONST int GENERIC_ATTRIBUTE = 0x03; + +// last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges) +TRACI_CONST int LAST_STEP_VEHICLE_NUMBER = 0x10; + +// last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges) +TRACI_CONST int LAST_STEP_MEAN_SPEED = 0x11; + +// last step vehicle list (get: induction loops, multi-entry/multi-exit detector, lanes, edges) +TRACI_CONST int LAST_STEP_VEHICLE_ID_LIST = 0x12; + +// last step occupancy (get: induction loops, lanes, edges) +TRACI_CONST int LAST_STEP_OCCUPANCY = 0x13; + +// last step vehicle halting number (get: multi-entry/multi-exit detector, lanes, edges) +TRACI_CONST int LAST_STEP_VEHICLE_HALTING_NUMBER = 0x14; + +// last step mean vehicle length (get: induction loops, lanes, edges) +TRACI_CONST int LAST_STEP_LENGTH = 0x15; + +// last step time since last detection (get: induction loops) +TRACI_CONST int LAST_STEP_TIME_SINCE_DETECTION = 0x16; + +// entry times +TRACI_CONST int LAST_STEP_VEHICLE_DATA = 0x17; + +// last step jam length in vehicles +TRACI_CONST int JAM_LENGTH_VEHICLE = 0x18; + +// last step jam length in meters +TRACI_CONST int JAM_LENGTH_METERS = 0x19; + +// last step person list (get: edges, vehicles) +TRACI_CONST int LAST_STEP_PERSON_ID_LIST = 0x1a; + +// full name (get: edges, simulation, trafficlight) +TRACI_CONST int VAR_NAME = 0x1b; + +// traffic light states, encoded as rRgGyYoO tuple (get: traffic lights) +TRACI_CONST int TL_RED_YELLOW_GREEN_STATE = 0x20; + +// index of the phase (set: traffic lights) +TRACI_CONST int TL_PHASE_INDEX = 0x22; + +// traffic light program (set: traffic lights) +TRACI_CONST int TL_PROGRAM = 0x23; + +// phase duration (set: traffic lights) +TRACI_CONST int TL_PHASE_DURATION = 0x24; + +// controlled lanes (get: traffic lights) +TRACI_CONST int TL_CONTROLLED_LANES = 0x26; + +// controlled links (get: traffic lights) +TRACI_CONST int TL_CONTROLLED_LINKS = 0x27; + +// index of the current phase (get: traffic lights) +TRACI_CONST int TL_CURRENT_PHASE = 0x28; + +// name of the current program (get: traffic lights) +TRACI_CONST int TL_CURRENT_PROGRAM = 0x29; + +// controlled junctions (get: traffic lights) +TRACI_CONST int TL_CONTROLLED_JUNCTIONS = 0x2a; + +// complete definition (get: traffic lights) +TRACI_CONST int TL_COMPLETE_DEFINITION_RYG = 0x2b; + +// complete program (set: traffic lights) +TRACI_CONST int TL_COMPLETE_PROGRAM_RYG = 0x2c; + +// assumed time to next switch (get: traffic lights) +TRACI_CONST int TL_NEXT_SWITCH = 0x2d; + +// current state, using external signal names (get: traffic lights) +TRACI_CONST int TL_EXTERNAL_STATE = 0x2e; + +// outgoing link number (get: lanes) +TRACI_CONST int LANE_LINK_NUMBER = 0x30; + +// id of parent edge (get: lanes) +TRACI_CONST int LANE_EDGE_ID = 0x31; + +// outgoing link definitions (get: lanes) +TRACI_CONST int LANE_LINKS = 0x33; + +// list of allowed vehicle classes (get&set: lanes) +TRACI_CONST int LANE_ALLOWED = 0x34; + +// list of not allowed vehicle classes (get&set: lanes) +TRACI_CONST int LANE_DISALLOWED = 0x35; + +// list of foe lanes (get: lanes) +TRACI_CONST int VAR_FOES = 0x37; + +// slope (get: edge, lane, vehicle, person) +TRACI_CONST int VAR_SLOPE = 0x36; + +// speed (get: vehicle) +TRACI_CONST int VAR_SPEED = 0x40; + +// maximum allowed/possible speed (get: vehicle types, lanes, set: edges, lanes) +TRACI_CONST int VAR_MAXSPEED = 0x41; + +// position (2D) (get: vehicle, poi, inductionloop, areadetector; set: poi) +TRACI_CONST int VAR_POSITION = 0x42; + +// position (3D) (get: vehicle, poi, set: poi) +TRACI_CONST int VAR_POSITION3D = 0x39; + +// angle (get: vehicle, poi; set: poi) +TRACI_CONST int VAR_ANGLE = 0x43; + +// angle (get: vehicle types, lanes, arealdetector, set: lanes) +TRACI_CONST int VAR_LENGTH = 0x44; + +// color (get: vehicles, vehicle types, polygons, pois) +TRACI_CONST int VAR_COLOR = 0x45; + +// max. acceleration (get: vehicles, vehicle types) +TRACI_CONST int VAR_ACCEL = 0x46; + +// max. comfortable deceleration (get: vehicles, vehicle types) +TRACI_CONST int VAR_DECEL = 0x47; + +// max. (physically possible) deceleration (get: vehicles, vehicle types) +TRACI_CONST int VAR_EMERGENCY_DECEL = 0x7b; + +// apparent deceleration (get: vehicles, vehicle types) +TRACI_CONST int VAR_APPARENT_DECEL = 0x7c; + +// action step length (get: vehicles, vehicle types) +TRACI_CONST int VAR_ACTIONSTEPLENGTH = 0x7d; + +// last action time (get: vehicles) +TRACI_CONST int VAR_LASTACTIONTIME = 0x7f; + +// driver's desired headway (get: vehicle types) +TRACI_CONST int VAR_TAU = 0x48; + +// vehicle class (get: vehicle types) +TRACI_CONST int VAR_VEHICLECLASS = 0x49; + +// emission class (get: vehicle types) +TRACI_CONST int VAR_EMISSIONCLASS = 0x4a; + +// shape class (get: vehicle types) +TRACI_CONST int VAR_SHAPECLASS = 0x4b; + +// minimum gap (get: vehicle types) +TRACI_CONST int VAR_MINGAP = 0x4c; + +// width (get: vehicle types, lanes, polygons, poi) +TRACI_CONST int VAR_WIDTH = 0x4d; + +// shape (get: polygons) +TRACI_CONST int VAR_SHAPE = 0x4e; + +// type id (get: vehicles, polygons, pois) +TRACI_CONST int VAR_TYPE = 0x4f; + +// road id (get: vehicles) +TRACI_CONST int VAR_ROAD_ID = 0x50; + +// lane id (get: vehicles, inductionloop, arealdetector) +TRACI_CONST int VAR_LANE_ID = 0x51; + +// lane index (get: vehicle, edge) +TRACI_CONST int VAR_LANE_INDEX = 0x52; + +// route id (get & set: vehicles) +TRACI_CONST int VAR_ROUTE_ID = 0x53; + +// edges (get: routes, vehicles) +TRACI_CONST int VAR_EDGES = 0x54; + +// update bestLanes (set: vehicle) +TRACI_CONST int VAR_UPDATE_BESTLANES = 0x6a; + +// filled? (get: polygons) +TRACI_CONST int VAR_FILL = 0x55; + +// get/set image file (poi, poly, vehicle, person, simulation) +TRACI_CONST int VAR_IMAGEFILE = 0x93; + +// position (1D along lane) (get: vehicle) +TRACI_CONST int VAR_LANEPOSITION = 0x56; + +// route (set: vehicles) +TRACI_CONST int VAR_ROUTE = 0x57; + +// travel time information (get&set: vehicle) +TRACI_CONST int VAR_EDGE_TRAVELTIME = 0x58; + +// effort information (get&set: vehicle) +TRACI_CONST int VAR_EDGE_EFFORT = 0x59; + +// last step travel time (get: edge, lane) +TRACI_CONST int VAR_CURRENT_TRAVELTIME = 0x5a; + +// signals state (get/set: vehicle) +TRACI_CONST int VAR_SIGNALS = 0x5b; + +// vehicle: new lane/position along (set: vehicle) +TRACI_CONST int VAR_MOVE_TO = 0x5c; + +// polygon: add dynamics (set: polygon) +TRACI_CONST int VAR_ADD_DYNAMICS = 0x5c; + +// vehicle: highlight (set: vehicle, poi) +TRACI_CONST int VAR_HIGHLIGHT = 0x6c; + +// driver imperfection (set: vehicle) +TRACI_CONST int VAR_IMPERFECTION = 0x5d; + +// speed factor (set: vehicle) +TRACI_CONST int VAR_SPEED_FACTOR = 0x5e; + +// speed deviation (set: vehicle) +TRACI_CONST int VAR_SPEED_DEVIATION = 0x5f; + +// routing mode (get/set: vehicle) +TRACI_CONST int VAR_ROUTING_MODE = 0x89; + +// speed without TraCI influence (get: vehicle) +TRACI_CONST int VAR_SPEED_WITHOUT_TRACI = 0xb1; + +// best lanes (get: vehicle) +TRACI_CONST int VAR_BEST_LANES = 0xb2; + +// how speed is set (set: vehicle) +TRACI_CONST int VAR_SPEEDSETMODE = 0xb3; + +// move vehicle to explicit (remote controlled) position (set: vehicle) +TRACI_CONST int MOVE_TO_XY = 0xb4; + +// is the vehicle stopped, and if so parked and/or triggered? +// value = stopped + 2 * parking + 4 * triggered +TRACI_CONST int VAR_STOPSTATE = 0xb5; + +// how lane changing is performed (get/set: vehicle) +TRACI_CONST int VAR_LANECHANGE_MODE = 0xb6; + +// maximum speed regarding max speed on the current lane and speed factor (get: vehicle) +TRACI_CONST int VAR_ALLOWED_SPEED = 0xb7; + +// position (1D lateral position relative to center of the current lane) (get: vehicle) +TRACI_CONST int VAR_LANEPOSITION_LAT = 0xb8; + +// get/set prefered lateral alignment within the lane (vehicle) +TRACI_CONST int VAR_LATALIGNMENT = 0xb9; + +// get/set maximum lateral speed (vehicle, vtypes) +TRACI_CONST int VAR_MAXSPEED_LAT = 0xba; + +// get/set minimum lateral gap (vehicle, vtypes) +TRACI_CONST int VAR_MINGAP_LAT = 0xbb; + +// get/set vehicle height (vehicle, vtypes, poi) +TRACI_CONST int VAR_HEIGHT = 0xbc; + +// get/set vehicle line +TRACI_CONST int VAR_LINE = 0xbd; + +// get/set vehicle via +TRACI_CONST int VAR_VIA = 0xbe; + +// get (lane change relevant) neighboring vehicles (vehicles) +TRACI_CONST int VAR_NEIGHBORS = 0xbf; + +// current CO2 emission of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_CO2EMISSION = 0x60; + +// current CO emission of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_COEMISSION = 0x61; + +// current HC emission of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_HCEMISSION = 0x62; + +// current PMx emission of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_PMXEMISSION = 0x63; + +// current NOx emission of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_NOXEMISSION = 0x64; + +// current fuel consumption of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_FUELCONSUMPTION = 0x65; + +// current noise emission of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_NOISEEMISSION = 0x66; + +// current person number (get: vehicle) +TRACI_CONST int VAR_PERSON_NUMBER = 0x67; + +// number of persons waiting at a defined bus stop (get: simulation) +TRACI_CONST int VAR_BUS_STOP_WAITING = 0x67; + +// current leader together with gap (get: vehicle) +TRACI_CONST int VAR_LEADER = 0x68; + +// edge index in current route (get: vehicle) +TRACI_CONST int VAR_ROUTE_INDEX = 0x69; + +// current waiting time (get: vehicle, lane) +TRACI_CONST int VAR_WAITING_TIME = 0x7a; + +// current waiting time (get: vehicle) +TRACI_CONST int VAR_ACCUMULATED_WAITING_TIME = 0x87; + +// upcoming traffic lights (get: vehicle) +TRACI_CONST int VAR_NEXT_TLS = 0x70; + +// upcoming stops (get: vehicle) +TRACI_CONST int VAR_NEXT_STOPS = 0x73; + +// current acceleration (get: vehicle) +TRACI_CONST int VAR_ACCELERATION = 0x72; + +// current time in seconds (get: simulation) +TRACI_CONST int VAR_TIME = 0x66; + +// current time step (get: simulation) +TRACI_CONST int VAR_TIME_STEP = 0x70; + +// current electricity consumption of a node (get: vehicle, lane, edge) +TRACI_CONST int VAR_ELECTRICITYCONSUMPTION = 0x71; + +// number of loaded vehicles (get: simulation) +TRACI_CONST int VAR_LOADED_VEHICLES_NUMBER = 0x71; + +// loaded vehicle ids (get: simulation) +TRACI_CONST int VAR_LOADED_VEHICLES_IDS = 0x72; + +// number of departed vehicle (get: simulation) +TRACI_CONST int VAR_DEPARTED_VEHICLES_NUMBER = 0x73; + +// departed vehicle ids (get: simulation) +TRACI_CONST int VAR_DEPARTED_VEHICLES_IDS = 0x74; + +// number of vehicles starting to teleport (get: simulation) +TRACI_CONST int VAR_TELEPORT_STARTING_VEHICLES_NUMBER = 0x75; + +// ids of vehicles starting to teleport (get: simulation) +TRACI_CONST int VAR_TELEPORT_STARTING_VEHICLES_IDS = 0x76; + +// number of vehicles ending to teleport (get: simulation) +TRACI_CONST int VAR_TELEPORT_ENDING_VEHICLES_NUMBER = 0x77; + +// ids of vehicles ending to teleport (get: simulation) +TRACI_CONST int VAR_TELEPORT_ENDING_VEHICLES_IDS = 0x78; + +// number of arrived vehicles (get: simulation) +TRACI_CONST int VAR_ARRIVED_VEHICLES_NUMBER = 0x79; + +// ids of arrived vehicles (get: simulation) +TRACI_CONST int VAR_ARRIVED_VEHICLES_IDS = 0x7a; + +// delta t (get: simulation) +TRACI_CONST int VAR_DELTA_T = 0x7b; + +// bounding box (get: simulation) +TRACI_CONST int VAR_NET_BOUNDING_BOX = 0x7c; + +// minimum number of expected vehicles (get: simulation) +TRACI_CONST int VAR_MIN_EXPECTED_VEHICLES = 0x7d; + +// number of vehicles starting to park (get: simulation) +TRACI_CONST int VAR_STOP_STARTING_VEHICLES_NUMBER = 0x68; + +// ids of vehicles starting to park (get: simulation) +TRACI_CONST int VAR_STOP_STARTING_VEHICLES_IDS = 0x69; + +// number of vehicles ending to park (get: simulation) +TRACI_CONST int VAR_STOP_ENDING_VEHICLES_NUMBER = 0x6a; + +// ids of vehicles ending to park (get: simulation) +TRACI_CONST int VAR_STOP_ENDING_VEHICLES_IDS = 0x6b; + +// number of vehicles starting to park (get: simulation) +TRACI_CONST int VAR_PARKING_STARTING_VEHICLES_NUMBER = 0x6c; + +// ids of vehicles starting to park (get: simulation) +TRACI_CONST int VAR_PARKING_STARTING_VEHICLES_IDS = 0x6d; + +// number of vehicles ending to park (get: simulation) +TRACI_CONST int VAR_PARKING_ENDING_VEHICLES_NUMBER = 0x6e; + +// ids of vehicles ending to park (get: simulation) +TRACI_CONST int VAR_PARKING_ENDING_VEHICLES_IDS = 0x6f; + +// number of vehicles involved in a collision (get: simulation) +TRACI_CONST int VAR_COLLIDING_VEHICLES_NUMBER = 0x80; + +// ids of vehicles involved in a collision (get: simulation) +TRACI_CONST int VAR_COLLIDING_VEHICLES_IDS = 0x81; + +// number of vehicles involved in a collision (get: simulation) +TRACI_CONST int VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER = 0x89; + +// ids of vehicles involved in a collision (get: simulation) +TRACI_CONST int VAR_EMERGENCYSTOPPING_VEHICLES_IDS = 0x8a; + +// clears the simulation of all not inserted vehicles (set: simulation) +TRACI_CONST int CMD_CLEAR_PENDING_VEHICLES = 0x94; + +// triggers saving simulation state (set: simulation) +TRACI_CONST int CMD_SAVE_SIMSTATE = 0x95; + +// sets/retrieves abstract parameter +TRACI_CONST int VAR_PARAMETER = 0x7e; + + +// add an instance (poi, polygon, vehicle, person, route) +TRACI_CONST int ADD = 0x80; + +// remove an instance (poi, polygon, vehicle, person) +TRACI_CONST int REMOVE = 0x81; + +// copy an instance (vehicle type, other TBD.) +TRACI_CONST int COPY = 0x88; + +// convert coordinates +TRACI_CONST int POSITION_CONVERSION = 0x82; + +// distance between points or vehicles +TRACI_CONST int DISTANCE_REQUEST = 0x83; + +// the current driving distance +TRACI_CONST int VAR_DISTANCE = 0x84; + +// add a fully specified instance (vehicle) +TRACI_CONST int ADD_FULL = 0x85; + +// find a car based route +TRACI_CONST int FIND_ROUTE = 0x86; + +// find an intermodal route +TRACI_CONST int FIND_INTERMODAL_ROUTE = 0x87; + +// force rerouting based on travel time (vehicles) +TRACI_CONST int CMD_REROUTE_TRAVELTIME = 0x90; + +// force rerouting based on effort (vehicles) +TRACI_CONST int CMD_REROUTE_EFFORT = 0x91; + +// validates current route (vehicles) +TRACI_CONST int VAR_ROUTE_VALID = 0x92; + +// retrieve information regarding the current person/container stage +TRACI_CONST int VAR_STAGE = 0xc0; + +// retrieve information regarding the next edge including crossings and walkingAreas (pedestrians only) +TRACI_CONST int VAR_NEXT_EDGE = 0xc1; + +// retrieve information regarding the number of remaining stages +TRACI_CONST int VAR_STAGES_REMAINING = 0xc2; + +// retrieve the current vehicle id for the driving stage (person, container) +TRACI_CONST int VAR_VEHICLE = 0xc3; + +// append a person stage (person) +TRACI_CONST int APPEND_STAGE = 0xc4; + +// append a person stage (person) +TRACI_CONST int REMOVE_STAGE = 0xc5; + +// zoom +TRACI_CONST int VAR_VIEW_ZOOM = 0xa0; + +// view position +TRACI_CONST int VAR_VIEW_OFFSET = 0xa1; + +// view schema +TRACI_CONST int VAR_VIEW_SCHEMA = 0xa2; + +// view by boundary +TRACI_CONST int VAR_VIEW_BOUNDARY = 0xa3; + +// screenshot +TRACI_CONST int VAR_SCREENSHOT = 0xa5; + +// track vehicle +TRACI_CONST int VAR_TRACK_VEHICLE = 0xa6; + +// presence of view +TRACI_CONST int VAR_HAS_VIEW = 0xa7; + +} // namespace libsumo + +#undef TRACI_CONST + +#endif diff -Nru sumo-1.1.0+dfsg1/src/libsumo/TraCIDefs.h sumo-1.2.0+dfsg1/src/libsumo/TraCIDefs.h --- sumo-1.1.0+dfsg1/src/libsumo/TraCIDefs.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/TraCIDefs.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,8 +24,8 @@ // =========================================================================== // included modules // =========================================================================== -#include - +// we do not include config.h here, since we should be independent of a special sumo build +#include #include #include #include @@ -38,12 +38,10 @@ // =========================================================================== // global definitions // =========================================================================== -// value for invalid queries -#define INVALID_DOUBLE_VALUE -1073741824 #define LIBSUMO_SUBSCRIPTION_API \ -static void subscribe(const std::string& objID, const std::vector& vars = std::vector(), double beginTime = INVALID_DOUBLE_VALUE, double endTime = INVALID_DOUBLE_VALUE); \ -static void subscribeContext(const std::string& objID, int domain, double range, const std::vector& vars = std::vector(), double beginTime = INVALID_DOUBLE_VALUE, double endTime = INVALID_DOUBLE_VALUE); \ +static void subscribe(const std::string& objID, const std::vector& vars = std::vector(), double beginTime = libsumo::INVALID_DOUBLE_VALUE, double endTime = libsumo::INVALID_DOUBLE_VALUE); \ +static void subscribeContext(const std::string& objID, int domain, double range, const std::vector& vars = std::vector(), double beginTime = libsumo::INVALID_DOUBLE_VALUE, double endTime = libsumo::INVALID_DOUBLE_VALUE); \ static const SubscriptionResults getAllSubscriptionResults(); \ static const TraCIResults getSubscriptionResults(const std::string& objID); \ static const ContextSubscriptionResults getAllContextSubscriptionResults(); \ @@ -110,7 +108,7 @@ os << "TraCIPosition(" << x << "," << y << "," << z << ")"; return os.str(); } - double x, y, z; + double x = INVALID_DOUBLE_VALUE, y = INVALID_DOUBLE_VALUE, z = INVALID_DOUBLE_VALUE; }; /** @struct TraCIRoadPosition @@ -124,19 +122,21 @@ } std::string edgeID; double pos; - int laneIndex; + int laneIndex = INVALID_INT_VALUE; }; /** @struct TraCIColor * @brief A color */ struct TraCIColor : TraCIResult { + TraCIColor() : r(0), g(0), b(0), a(255) {} + TraCIColor(int r, int g, int b, int a = 255) : r(r), g(g), b(b), a(a) {} std::string getString() { std::ostringstream os; - os << "TraCIColor(" << (int)r << "," << (int)g << "," << (int)b << "," << (int)a << ")"; + os << "TraCIColor(" << r << "," << g << "," << b << "," << a << ")"; return os.str(); } - unsigned char r, g, b, a; + int r, g, b, a; }; /** @struct TraCIPositionVector @@ -203,14 +203,18 @@ class TraCIPhase { public: TraCIPhase() {} - TraCIPhase(const double _duration, const std::string& _state, const double _minDur = INVALID_DOUBLE_VALUE, const double _maxDur = INVALID_DOUBLE_VALUE, const int _next = -1) - : duration(_duration), state(_state), minDur(_minDur), maxDur(_maxDur), next(_next) {} + TraCIPhase(const double _duration, const std::string& _state, const double _minDur = libsumo::INVALID_DOUBLE_VALUE, + const double _maxDur = libsumo::INVALID_DOUBLE_VALUE, + const std::vector& _next = std::vector(), + const std::string& _name = "") : + duration(_duration), state(_state), minDur(_minDur), maxDur(_maxDur), next(_next), name(_name) {} ~TraCIPhase() {} double duration; std::string state; double minDur, maxDur; - int next; + std::vector next; + std::string name; }; } @@ -330,7 +334,7 @@ class TraCIStage { public: TraCIStage() {} // only to make swig happy - TraCIStage(int _type) : type(_type), depart(-1) {} + TraCIStage(int _type) : type(_type) {} /// @brief The type of stage (walking, driving, ...) int type; /// @brief The vehicle type when using a private car or bike @@ -346,17 +350,17 @@ /// @brief effort needed double cost; /// @brief length in m - double length; + double length = INVALID_DOUBLE_VALUE; /// @brief id of the intended vehicle for public transport ride - std::string intended; - /// @brief intended depart time for public transport ride or -1 - double depart; + std::string intended = ""; + /// @brief intended depart time for public transport ride or INVALID_DOUBLE_VALUE + double depart = INVALID_DOUBLE_VALUE; /// @brief position on the lane when starting the stage - double departPos; + double departPos = INVALID_DOUBLE_VALUE; /// @brief position on the lane when ending the stage - double arrivalPos; + double arrivalPos = INVALID_DOUBLE_VALUE; /// @brief arbitrary description string - std::string description; + std::string description = ""; }; } diff -Nru sumo-1.1.0+dfsg1/src/libsumo/TrafficLight.cpp sumo-1.2.0+dfsg1/src/libsumo/TrafficLight.cpp --- sumo-1.1.0+dfsg1/src/libsumo/TrafficLight.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/TrafficLight.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "TrafficLight.h" @@ -69,7 +69,9 @@ TraCILogic l(logic->getProgramID(), (int)logic->getLogicType(), logic->getCurrentPhaseIndex()); l.subParameter = logic->getParametersMap(); for (const MSPhaseDefinition* const phase : logic->getPhases()) { - l.phases.emplace_back(TraCIPhase(STEPS2TIME(phase->duration), phase->getState(), STEPS2TIME(phase->minDuration), STEPS2TIME(phase->maxDuration), phase->getNextPhase())); + l.phases.emplace_back(TraCIPhase(STEPS2TIME(phase->duration), phase->getState(), + STEPS2TIME(phase->minDuration), STEPS2TIME(phase->maxDuration), + phase->getNextPhases(), phase->getName())); } result.emplace_back(l); } @@ -139,6 +141,11 @@ } +std::string +TrafficLight::getPhaseName(const std::string& tlsID) { + return getTLS(tlsID).getActive()->getCurrentPhaseDef().getName(); +} + double TrafficLight::getPhaseDuration(const std::string& tlsID) { return STEPS2TIME(getTLS(tlsID).getActive()->getCurrentPhaseDef().duration); @@ -175,6 +182,12 @@ active->changeStepAndDuration(MSNet::getInstance()->getTLSControl(), cTime, index, duration); } +void +TrafficLight::setPhaseName(const std::string& tlsID, const std::string& name) { + MSTrafficLightLogic* const active = getTLS(tlsID).getActive(); + const_cast(active->getCurrentPhaseDef()).setName(name); +} + void TrafficLight::setProgram(const std::string& tlsID, const std::string& programID) { @@ -204,7 +217,7 @@ } std::vector phases; for (TraCIPhase phase : logic.phases) { - phases.push_back(new MSPhaseDefinition(TIME2STEPS(phase.duration), phase.state, TIME2STEPS(phase.minDur), TIME2STEPS(phase.maxDur), phase.next)); + phases.push_back(new MSPhaseDefinition(TIME2STEPS(phase.duration), phase.state, TIME2STEPS(phase.minDur), TIME2STEPS(phase.maxDur), phase.next, phase.name)); } if (vars.getLogic(logic.programID) == nullptr) { MSTrafficLightLogic* mslogic = new MSSimpleTrafficLightLogic(MSNet::getInstance()->getTLSControl(), tlsID, logic.programID, TLTYPE_STATIC, phases, logic.currentPhaseIndex, 0, logic.subParameter); @@ -252,6 +265,8 @@ return wrapper->wrapStringList(objID, variable, getControlledLanes(objID)); case TL_CURRENT_PHASE: return wrapper->wrapInt(objID, variable, getPhase(objID)); + case VAR_NAME: + return wrapper->wrapString(objID, variable, getPhaseName(objID)); case TL_CURRENT_PROGRAM: return wrapper->wrapString(objID, variable, getProgram(objID)); case TL_PHASE_DURATION: diff -Nru sumo-1.1.0+dfsg1/src/libsumo/TrafficLight.h sumo-1.2.0+dfsg1/src/libsumo/TrafficLight.h --- sumo-1.1.0+dfsg1/src/libsumo/TrafficLight.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/TrafficLight.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ #include #include -#include +#include #ifndef SWIGJAVA #ifndef SWIGPYTHON #include @@ -63,12 +63,14 @@ static std::vector > getControlledLinks(const std::string& tlsID); static std::string getProgram(const std::string& tlsID); static int getPhase(const std::string& tlsID); + static std::string getPhaseName(const std::string& tlsID); static double getPhaseDuration(const std::string& tlsID); static double getNextSwitch(const std::string& tlsID); static std::string getParameter(const std::string& tlsID, const std::string& paramName); static void setRedYellowGreenState(const std::string& tlsID, const std::string& state); static void setPhase(const std::string& tlsID, const int index); + static void setPhaseName(const std::string& tlsID, const std::string& name); static void setProgram(const std::string& tlsID, const std::string& programID); static void setPhaseDuration(const std::string& tlsID, const double phaseDuration); static void setCompleteRedYellowGreenDefinition(const std::string& tlsID, const TraCILogic& logic); diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Vehicle.cpp sumo-1.2.0+dfsg1/src/libsumo/Vehicle.cpp --- sumo-1.1.0+dfsg1/src/libsumo/Vehicle.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Vehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,9 +23,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -39,12 +39,22 @@ #include #include #include -#include +#include #include "Helper.h" #include "Route.h" +#include "Polygon.h" #include "Vehicle.h" +// =========================================================================== +// debug defines +// =========================================================================== +//#define DEBUG_NEIGHBORS +//#define DEBUG_DYNAMIC_SHAPES +#define DEBUG_COND (veh->isSelected()) + + + namespace libsumo { // =========================================================================== // static member initializations @@ -127,11 +137,7 @@ if (isVisible(veh)) { return Helper::makeTraCIPosition(veh->getPosition(), includeZ); } - TraCIPosition pos; - pos.x = INVALID_DOUBLE_VALUE; - pos.y = INVALID_DOUBLE_VALUE; - pos.z = INVALID_DOUBLE_VALUE; - return pos; + return TraCIPosition(); } @@ -393,6 +399,29 @@ seen += lane->getLength(); link = MSLane::succLinkSec(*veh, view, *lane, bestLaneConts); } + // consider edges beyond bestLanes + const int remainingEdges = (int)(veh->getRoute().end() - veh->getCurrentRouteEdge()) - view; + //std::cout << "remainingEdges=" << remainingEdges << " view=" << view << " best=" << toString(bestLaneConts) << "\n"; + for (int i = 0; i < remainingEdges; i++) { + const MSEdge* prev = *(veh->getCurrentRouteEdge() + view + i - 1); + const MSEdge* next = *(veh->getCurrentRouteEdge() + view + i); + const std::vector* allowed = prev->allowedLanes(*next, veh->getVClass()); + if (allowed != nullptr && allowed->size() != 0) { + for (MSLink* link : allowed->front()->getLinkCont()) { + if (&link->getLane()->getEdge() == next && link->isTLSControlled()) { + TraCINextTLSData ntd; + ntd.id = link->getTLLogic()->getID(); + ntd.tlIndex = link->getTLIndex(); + ntd.dist = seen; + ntd.state = (char)link->getState(); + result.push_back(ntd); + } + } + } else { + // invalid route, cannot determine nextTLS + break; + } + } } return result; } @@ -421,7 +450,7 @@ if (it->chargingStation != nullptr) { nsd.stoppingPlaceID = it->chargingStation->getID(); } - nsd.stopFlags = (1 + + nsd.stopFlags = ((it->reached ? 1 : 0) + (it->pars.parking ? 2 : 0) + (it->pars.triggered ? 4 : 0) + (it->pars.containerTriggered ? 8 : 0) + @@ -444,7 +473,8 @@ int result = 0; if (veh->isStopped()) { const MSVehicle::Stop& stop = veh->getNextStop(); - result = (1 + (stop.pars.parking ? 2 : 0) + + result = ((stop.reached ? 1 : 0) + + (stop.pars.parking ? 2 : 0) + (stop.pars.triggered ? 4 : 0) + (stop.pars.containerTriggered ? 8 : 0) + (stop.busstop != nullptr ? 16 : 0) + @@ -502,7 +532,7 @@ Vehicle::getDrivingDistance2D(const std::string& vehicleID, double x, double y) { MSVehicle* veh = getVehicle(vehicleID); if (veh->isOnRoad()) { - std::pair roadPos = Helper::convertCartesianToRoadMap(Position(x, y)); + std::pair roadPos = Helper::convertCartesianToRoadMap(Position(x, y), veh->getVehicleType().getVehicleClass()); double distance = veh->getRoute().getDistanceBetween(veh->getPositionOnLane(), roadPos.second, veh->getEdge(), &roadPos.first->getEdge(), true, veh->getRoutePosition()); if (distance == std::numeric_limits::max()) { @@ -562,7 +592,7 @@ std::pair Vehicle::getLaneChangeState(const std::string& vehicleID, int direction) { MSVehicle* veh = getVehicle(vehicleID); - if (veh->isOnRoad() && veh->getLaneChangeModel().hasSavedState(direction)) { + if (veh->isOnRoad()) { return veh->getLaneChangeModel().getSavedState(direction); } else { return std::make_pair((int)LCA_UNKNOWN, (int)LCA_UNKNOWN); @@ -590,6 +620,13 @@ } catch (InvalidArgument& e) { throw TraCIException("Vehicle '" + vehicleID + "' does not support laneChangeModel parameter '" + key + "' (" + e.what() + ")."); } + } else if (StringUtils::startsWith(key, "carFollowModel.")) { + const std::string attrName = key.substr(15); + try { + return veh->getCarFollowModel().getParameter(veh, attrName); + } catch (InvalidArgument& e) { + throw TraCIException("Vehicle '" + vehicleID + "' does not support carFollowModel parameter '" + key + "' (" + e.what() + ")."); + } } else if (StringUtils::startsWith(key, "has.") && StringUtils::endsWith(key, ".device")) { StringTokenizer tok(key, "."); if (tok.size() != 3) { @@ -602,6 +639,111 @@ } +std::map +Vehicle::getNeighbors(const std::string& vehicleID, const int mode) { + int dir = (1 & mode) != 0 ? -1 : 1; + bool queryLeaders = (2 & mode) != 0; + bool blockersOnly = (4 & mode) != 0; + + MSVehicle* veh = getVehicle(vehicleID); + std::map neighs; + auto& lcm = veh->getLaneChangeModel(); + +#ifdef DEBUG_NEIGHBORS + if DEBUG_COND { + std::cout << "getNeighbors() for veh '" << vehicleID << "': dir=" << dir + << ", queryLeaders=" << queryLeaders + << ", blockersOnly=" << blockersOnly << std::endl; +} +#endif + + + +if (blockersOnly) { + // Check if a blocking neigh exists in the given direction + bool blocked = false; + if (dir == -1) { + if (queryLeaders) { + blocked = (lcm.getOwnState() & LCA_BLOCKED_BY_RIGHT_LEADER) != 0; + } else { + blocked = (lcm.getOwnState() & LCA_BLOCKED_BY_RIGHT_FOLLOWER) != 0; + } + } else { + if (queryLeaders) { + blocked = (lcm.getOwnState() & LCA_BLOCKED_BY_LEFT_LEADER) != 0; + } else { + blocked = (lcm.getOwnState() & LCA_BLOCKED_BY_LEFT_FOLLOWER) != 0; + } + } + +#ifdef DEBUG_NEIGHBORS + if DEBUG_COND { + std::cout << " blocked=" << blocked << std::endl; + } +#endif + + if (!blocked) { + // Not blocked => return empty vector + return neighs; + } + } + + const std::shared_ptr res = queryLeaders ? lcm.getLeaders(dir) : lcm.getFollowers(dir); + if (res != nullptr && res->hasVehicles()) { + auto distIt = begin(res->getDistances()); + auto vehIt = begin(res->getVehicles()); + while (distIt != end(res->getDistances())) { + if (*vehIt != nullptr) { + neighs[*vehIt] = *distIt; + } + ++vehIt; + ++distIt; + } + } + return neighs; +} + + +std::map +Vehicle::getRightFollowers(const std::string& vehicleID, bool blockingOnly) { + if (blockingOnly) { + return getNeighbors(vehicleID, 5); + } else { + return getNeighbors(vehicleID, 1); + } +} + + +std::map +Vehicle::getRightLeaders(const std::string& vehicleID, bool blockingOnly) { + if (blockingOnly) { + return getNeighbors(vehicleID, 7); + } else { + return getNeighbors(vehicleID, 3); + } +} + + +std::map +Vehicle::getLeftFollowers(const std::string& vehicleID, bool blockingOnly) { + if (blockingOnly) { + return getNeighbors(vehicleID, 4); + } else { + return getNeighbors(vehicleID, 0); + } +} + + +std::map +Vehicle::getLeftLeaders(const std::string& vehicleID, bool blockingOnly) { + if (blockingOnly) { + return getNeighbors(vehicleID, 6); + } else { + return getNeighbors(vehicleID, 2); + } +} + + const MSVehicleType& Vehicle::getVehicleType(const std::string& vehicleID) { return getVehicle(vehicleID)->getVehicleType(); @@ -854,15 +996,9 @@ } void -Vehicle::changeLaneRelative(const std::string& vehicleID, int laneChange, double duration) { +Vehicle::changeLaneRelative(const std::string& vehicleID, int indexOffset, double duration) { std::vector > laneTimeLine; - int laneIndex; - // Check in which direction the lane change should be performed 0: for right, >0 to left - if (laneChange > 0) { - laneIndex = getVehicle(vehicleID)->getLaneIndex() + laneChange; - } else { - laneIndex = getVehicle(vehicleID)->getLaneIndex() - 1; - } + int laneIndex = getVehicle(vehicleID)->getLaneIndex() + indexOffset; laneTimeLine.push_back(std::make_pair(MSNet::getInstance()->getCurrentTimeStep(), laneIndex)); laneTimeLine.push_back(std::make_pair(MSNet::getInstance()->getCurrentTimeStep() + TIME2STEPS(duration), laneIndex)); getVehicle(vehicleID)->getInfluencer().setLaneTimeLine(laneTimeLine); @@ -1038,6 +1174,7 @@ } if ((found && bestDistance <= maxRouteDistance) || mayLeaveNetwork) { // optionally compute lateral offset + pos.setz(veh->getPosition().z()); if (found && (MSGlobals::gLateralResolution > 0 || mayLeaveNetwork)) { const double perpDist = lane->getShape().distance2D(pos, false); if (perpDist != GeomHelper::INVALID_OFFSET) { @@ -1057,6 +1194,7 @@ lanePosLat = -lanePosLat; } } + pos.setz(lane->geometryPositionAtOffset(lanePos).z()); } if (found && !mayLeaveNetwork && MSGlobals::gLateralResolution < 0) { // mapped position may differ from pos @@ -1095,8 +1233,12 @@ } void -Vehicle::openGap(const std::string& vehicleID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel) { +Vehicle::openGap(const std::string& vehicleID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, const std::string& referenceVehID) { MSVehicle* veh = getVehicle(vehicleID); + MSVehicle* refVeh = nullptr; + if (referenceVehID != "") { + refVeh = getVehicle(referenceVehID); + } const double originalTau = veh->getVehicleType().getCarFollowModel().getHeadwayTime(); if (newTimeHeadway == -1) { newTimeHeadway = originalTau; @@ -1105,7 +1247,7 @@ WRITE_WARNING("Ignoring openGap(). New time headway must not be smaller than the original."); return; } - veh->getInfluencer().activateGapController(originalTau, newTimeHeadway, newSpaceHeadway, duration, changeRate, maxDecel); + veh->getInfluencer().activateGapController(originalTau, newTimeHeadway, newSpaceHeadway, duration, changeRate, maxDecel, refVeh); } void @@ -1117,6 +1259,11 @@ } void +Vehicle::requestToC(const std::string& vehID, double leadTime) { + setParameter(vehID, "device.toc.requestToC", toString(leadTime)); +} + +void Vehicle::setSpeed(const std::string& vehicleID, double speed) { MSVehicle* veh = getVehicle(vehicleID); std::vector > speedTimeLine; @@ -1177,6 +1324,9 @@ ConstMSEdgeVector edges; try { MSEdge::parseEdgesList(edgeIDs, edges, ""); + if (edges.size() > 0 && edges.back()->isInternal()) { + edges.push_back(edges.back()->getLanes()[0]->getNextNormal()); + } } catch (ProcessError& e) { throw TraCIException("Invalid edge list for vehicle '" + veh->getID() + "' (" + e.what() + ")"); } @@ -1315,15 +1465,8 @@ MSVehicle* veh = getVehicle(vehicleID); if (actionStepLength == 0.) { veh->resetActionOffset(); - return; - } - SUMOTime actionStepLengthMillisecs = SUMOVehicleParserHelper::processActionStepLength(actionStepLength); - SUMOTime previousActionStepLength = veh->getActionStepLength(); - veh->getSingularType().setActionStepLength(actionStepLengthMillisecs, resetActionOffset); - if (resetActionOffset) { - veh->resetActionOffset(); } else { - veh->updateActionOffset(previousActionStepLength, actionStepLengthMillisecs); + veh->setActionStepLength(actionStepLength, resetActionOffset); } } @@ -1371,7 +1514,7 @@ void Vehicle::setColor(const std::string& vehicleID, const TraCIColor& col) { const SUMOVehicleParameter& p = getVehicle(vehicleID)->getParameter(); - p.color.set(col.r, col.g, col.b, col.a); + p.color.set((unsigned char)col.r, (unsigned char)col.g, (unsigned char)col.b, (unsigned char)col.a); p.parametersSet |= VEHPARS_COLOR_SET; } @@ -1524,6 +1667,13 @@ } catch (InvalidArgument& e) { throw TraCIException("Vehicle '" + vehicleID + "' does not support laneChangeModel parameter '" + key + "' (" + e.what() + ")."); } + } else if (StringUtils::startsWith(key, "carFollowModel.")) { + const std::string attrName = key.substr(15); + try { + veh->getCarFollowModel().setParameter(veh, attrName, value); + } catch (InvalidArgument& e) { + throw TraCIException("Vehicle '" + vehicleID + "' does not support carFollowModel parameter '" + key + "' (" + e.what() + ")."); + } } else if (StringUtils::startsWith(key, "has.") && StringUtils::endsWith(key, ".device")) { StringTokenizer tok(key, "."); if (tok.size() != 3) { @@ -1550,10 +1700,73 @@ } +void +Vehicle::highlight(const std::string& vehicleID, const TraCIColor& col, double size, const int alphaMax, const double duration, const int type) { + // NOTE: Code is duplicated in large parts in POI.cpp + MSVehicle* veh = getVehicle(vehicleID); + + // Center of the highlight circle + Position center = veh->getPosition(); + const double l2 = veh->getLength() * 0.5; + center.sub(cos(veh->getAngle())*l2, sin(veh->getAngle())*l2); + // Size of the highlight circle + if (size <= 0) { + size = veh->getLength() * 0.7; + } + // Make polygon shape + const unsigned int nPoints = 34; + const PositionVector circlePV = GeomHelper::makeRing(size, size + 1., center, nPoints); + TraCIPositionVector circle = Helper::makeTraCIPositionVector(circlePV); + +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << SIMTIME << " Vehicle::highlight() for vehicle '" << vehicleID << "'\n" + << " circle: " << circlePV << std::endl; +#endif + + // Find a free polygon id + int i = 0; + std::string polyID = veh->getID() + "_hl" + toString(i); + while (Polygon::exists(polyID)) { + polyID = veh->getID() + "_hl" + toString(++i); + } + // Line width + double lw = 0.; + // Layer + double lyr = 0.; + if (MSNet::getInstance()->isGUINet()) { + lyr = GLO_VEHICLE + 0.01; + lyr += (type + 1) / 257.; + } + // Make Polygon + Polygon::addHighlightPolygon(vehicleID, type, polyID, circle, col, true, lw, "highlight", (int)lyr); + + // Animation time line + double maxAttack = 1.0; // maximal fade-in time + std::vector timeSpan; + if (duration > 0.) { + timeSpan = {0, MIN2(maxAttack, duration / 3.), 2.*duration / 3., duration}; + } + // Alpha time line + std::vector alphaSpan; + if (alphaMax > 0.) { + alphaSpan = {0., (double) alphaMax, (double)(alphaMax) / 3., 0.}; + } + // Attach dynamics + Polygon::addDynamics(polyID, vehicleID, timeSpan, alphaSpan, false, true); +} + + LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(Vehicle, VEHICLE) void +Vehicle::subscribeLeader(const std::string& vehicleID, double /* dist */, double beginTime, double endTime) { + // TODO handle dist correctly + Vehicle::subscribe(vehicleID, std::vector({libsumo::VAR_LEADER}), beginTime, endTime); +} + + +void Vehicle::storeShape(const std::string& id, PositionVector& shape) { shape.push_back(getVehicle(id)->getPosition()); } @@ -1654,6 +1867,13 @@ return wrapper->wrapDouble(objID, variable, getAcceleration(objID)); case VAR_LASTACTIONTIME: return wrapper->wrapDouble(objID, variable, getLastActionTime(objID)); + case VAR_LEADER: { + const auto& lead = getLeader(objID); + TraCIRoadPosition rp; + rp.edgeID = lead.first; + rp.pos = lead.second; + return wrapper->wrapRoadPosition(objID, variable, rp); + } default: return false; } diff -Nru sumo-1.1.0+dfsg1/src/libsumo/Vehicle.h sumo-1.2.0+dfsg1/src/libsumo/Vehicle.h --- sumo-1.1.0+dfsg1/src/libsumo/Vehicle.h 2018-11-02 23:00:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/Vehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,7 @@ #include #include #include -#include +#include // =========================================================================== @@ -106,6 +106,11 @@ static std::pair getLaneChangeState(const std::string& vehicleID, int direction); static double getLastActionTime(const std::string& vehicleID); static std::string getParameter(const std::string& vehicleID, const std::string& key); + static std::map getNeighbors(const std::string& vehicleID, const int mode); + static std::map getRightFollowers(const std::string& vehicleID, bool blockingOnly = false); + static std::map getRightLeaders(const std::string& vehicleID, bool blockingOnly = false); + static std::map getLeftFollowers(const std::string& vehicleID, bool blockingOnly = false); + static std::map getLeftLeaders(const std::string& vehicleID, bool blockingOnly = false); static const MSVehicleType& getVehicleType(const std::string& vehicleID); /// @} @@ -146,12 +151,13 @@ static void changeTarget(const std::string& vehicleID, const std::string& edgeID); static void changeLane(const std::string& vehicleID, int laneIndex, double duration); - static void changeLaneRelative(const std::string& vehicleID, int laneChange, double duration); + static void changeLaneRelative(const std::string& vehicleID, int indexOffset, double duration); static void changeSublane(const std::string& vehicleID, double latDist); static void slowDown(const std::string& vehicleID, double speed, double duration); - static void openGap(const std::string& vehicleID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel); + static void openGap(const std::string& vehicleID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, const std::string& referenceVehID = ""); static void deactivateGapControl(const std::string& vehicleID); + static void requestToC(const std::string& vehID, double leadTime); static void setSpeed(const std::string& vehicleID, double speed); static void setSpeedMode(const std::string& vehicleID, int speedMode); static void setLaneChangeMode(const std::string& vehicleID, int laneChangeMode); @@ -173,12 +179,15 @@ static void setLine(const std::string& vehicleID, const std::string& line); static void setVia(const std::string& vehicleID, const std::vector& via); static void setParameter(const std::string& vehicleID, const std::string& key, const std::string& value); + static void highlight(const std::string& vehicleID, const TraCIColor& col, double size, const int alphaMax, const double duration, const int type); /// @} LIBSUMO_VEHICLE_TYPE_SETTER LIBSUMO_SUBSCRIPTION_API + static void subscribeLeader(const std::string& vehicleID, double dist = 0., double beginTime = libsumo::INVALID_DOUBLE_VALUE, double endTime = libsumo::INVALID_DOUBLE_VALUE); + /** @brief Saves the shape of the requested object in the given container * @param id The id of the poi to retrieve * @param shape The container to fill diff -Nru sumo-1.1.0+dfsg1/src/libsumo/VehicleType.cpp sumo-1.2.0+dfsg1/src/libsumo/VehicleType.cpp --- sumo-1.1.0+dfsg1/src/libsumo/VehicleType.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/VehicleType.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,9 +24,9 @@ #include #include #include -#include +#include #include -#include +#include #include "Helper.h" #include "VehicleType.h" diff -Nru sumo-1.1.0+dfsg1/src/libsumo/VehicleType.h sumo-1.2.0+dfsg1/src/libsumo/VehicleType.h --- sumo-1.1.0+dfsg1/src/libsumo/VehicleType.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/libsumo/VehicleType.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,7 @@ // =========================================================================== #include #include -#include +#include #define LIBSUMO_VEHICLE_TYPE_GETTER \ diff -Nru sumo-1.1.0+dfsg1/src/Makefile.am sumo-1.2.0+dfsg1/src/Makefile.am --- sumo-1.1.0+dfsg1/src/Makefile.am 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -33,6 +33,7 @@ sumo_LDADD = ./netload/libnetload.a \ ./microsim/libmicrosim.a \ ./microsim/cfmodels/libmicrosimcfmodels.a \ +./microsim/engine/libmicrosimengine.a \ ./microsim/lcmodels/libmicrosimlcmodels.a \ ./microsim/devices/libmicrosimdevs.a \ ./microsim/output/libmicrosimoutput.a \ @@ -61,6 +62,7 @@ ./netimport/vissim/tempstructs/libvissimtmpstr.a \ ./netwrite/libnetwrite.a \ ./netbuild/libnetbuild.a \ +./utils/shapes/libshapes.a \ ./foreign/eulerspiral/libeulerspiral.a \ $(COMMON_LIBS) \ $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) @@ -79,6 +81,7 @@ ./utils/gui/settings/libguiutilssettings.a \ ./utils/gui/images/libguiutilsimages.a \ ./utils/gui/cursors/libguiutilscursors.a \ +./utils/gui/shortcuts/libguiutilsshortcuts.a \ ./utils/gui/tracker/libguiutilstracker.a \ ./utils/foxtools/libfoxtools.a \ ./mesogui/libmesogui.a \ @@ -103,4 +106,4 @@ ../tools/build/version.py $(CURDIR) endif -EXTRA_DIST = config.h config.h.in $(VERSION_H) sumo-gui.rc +EXTRA_DIST = config.h.in $(VERSION_H) sumo-gui.rc diff -Nru sumo-1.1.0+dfsg1/src/Makefile.in sumo-1.2.0+dfsg1/src/Makefile.in --- sumo-1.1.0+dfsg1/src/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,967 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = od2trips$(EXEEXT) sumo$(EXEEXT) netconvert$(EXEEXT) \ - $(am__EXEEXT_1) -subdir = src -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -@WITH_GUI_TRUE@am__EXEEXT_1 = sumo-gui$(EXEEXT) -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_netconvert_OBJECTS = netconvert_main.$(OBJEXT) -netconvert_OBJECTS = $(am_netconvert_OBJECTS) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = ./utils/options/liboptions.a ./utils/xml/libxml.a \ - ./utils/distribution/libdistribution.a ./utils/geom/libgeom.a \ - ./utils/common/libcommon.a ./utils/importio/libimportio.a \ - ./utils/iodevices/libiodevices.a \ - ./foreign/PHEMlight/cpp/libphemlight.a \ - ./foreign/tcpip/libtcpip.a $(am__DEPENDENCIES_1) -netconvert_DEPENDENCIES = ./netimport/libnetimport.a \ - ./netimport/vissim/libvissimimport.a \ - ./netimport/vissim/typeloader/libvissimtypeload.a \ - ./netimport/vissim/tempstructs/libvissimtmpstr.a \ - ./netwrite/libnetwrite.a ./netbuild/libnetbuild.a \ - ./foreign/eulerspiral/libeulerspiral.a $(am__DEPENDENCIES_2) \ - $(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/vehicle/libvehicle.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 \ - ./microsim/pedestrians/libmicrosimpeds.a \ - ./mesosim/libmesosim.a ./utils/vehicle/libvehicle.a \ - ./utils/shapes/libshapes.a ./utils/emissions/libemissions.a \ - ./traci-server/libtraciserver.a ./libsumo/libsumostatic.a \ - ./utils/traci/libtraciclient.a $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -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 \ - ./microsim/pedestrians/libmicrosimpeds.a \ - ./mesosim/libmesosim.a ./utils/vehicle/libvehicle.a \ - ./utils/shapes/libshapes.a ./utils/emissions/libemissions.a \ - ./traci-server/libtraciserver.a ./libsumo/libsumostatic.a \ - ./utils/traci/libtraciclient.a $(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 \ -@WITH_GUI_TRUE@ ./guisim/libguisim.a \ -@WITH_GUI_TRUE@ ./gui/dialogs/libguidialogs.a \ -@WITH_GUI_TRUE@ ./utils/gui/windows/libguiutilsWindows.a \ -@WITH_GUI_TRUE@ ./utils/gui/globjects/libguiutilsglobjects.a \ -@WITH_GUI_TRUE@ ./utils/gui/div/libguiutilsdiv.a \ -@WITH_GUI_TRUE@ ./utils/gui/settings/libguiutilssettings.a \ -@WITH_GUI_TRUE@ ./utils/gui/images/libguiutilsimages.a \ -@WITH_GUI_TRUE@ ./utils/gui/cursors/libguiutilscursors.a \ -@WITH_GUI_TRUE@ ./utils/gui/tracker/libguiutilstracker.a \ -@WITH_GUI_TRUE@ ./utils/foxtools/libfoxtools.a \ -@WITH_GUI_TRUE@ ./mesogui/libmesogui.a ./osgview/libosgview.a \ -@WITH_GUI_TRUE@ $(am__DEPENDENCIES_3) ./gui/GUIManipulator.o \ -@WITH_GUI_TRUE@ ./gui/GUITLLogicPhasesTrackerWindow.o \ -@WITH_GUI_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ -@WITH_GUI_TRUE@ $(am__DEPENDENCIES_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@ -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 = -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_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 od marouter mesosim \ - netbuild netwrite netgen netimport netload polyconvert \ - dfrouter duarouter jtrrouter activitygen tools libsumo \ - traci-server traci_testclient gui guinetload guisim netedit \ - mesogui osgview -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -@WITH_GUI_TRUE@GUI_APPS = sumo-gui -@WITH_GUI_TRUE@GUI_DIRS = gui guinetload guisim netedit mesogui osgview -COMMON_LIBS = ./utils/options/liboptions.a \ -./utils/xml/libxml.a \ -./utils/distribution/libdistribution.a \ -./utils/geom/libgeom.a \ -./utils/common/libcommon.a \ -./utils/importio/libimportio.a \ -./utils/iodevices/libiodevices.a \ -./foreign/PHEMlight/cpp/libphemlight.a \ -./foreign/tcpip/libtcpip.a \ -$(XERCES_LIBS) - -od2trips_SOURCES = od2trips_main.cpp -od2trips_LDADD = ./od/libod.a \ -./utils/options/liboptions.a \ -./utils/vehicle/libvehicle.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 \ -./mesosim/libmesosim.a \ -./utils/vehicle/libvehicle.a \ -./utils/shapes/libshapes.a \ -./utils/emissions/libemissions.a \ -./traci-server/libtraciserver.a \ -./libsumo/libsumostatic.a \ -./utils/traci/libtraciclient.a \ -$(COMMON_LIBS) \ -$(PYTHON_LIBS) \ -$(FOX_LDFLAGS) $(XERCES_LDFLAGS) $(PROJ_LDFLAGS) - -netconvert_SOURCES = netconvert_main.cpp -netconvert_LDADD = ./netimport/libnetimport.a \ -./netimport/vissim/libvissimimport.a \ -./netimport/vissim/typeloader/libvissimtypeload.a \ -./netimport/vissim/tempstructs/libvissimtmpstr.a \ -./netwrite/libnetwrite.a \ -./netbuild/libnetbuild.a \ -./foreign/eulerspiral/libeulerspiral.a \ -$(COMMON_LIBS) \ -$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) - -@WITH_GUI_TRUE@sumo_gui_SOURCES = guisim_main.cpp -@WITH_GUI_TRUE@sumo_gui_LDADD = ./gui/libgui.a \ -@WITH_GUI_TRUE@./guinetload/libguinetload.a \ -@WITH_GUI_TRUE@./guisim/libguisim.a \ -@WITH_GUI_TRUE@./gui/dialogs/libguidialogs.a \ -@WITH_GUI_TRUE@./utils/gui/windows/libguiutilsWindows.a \ -@WITH_GUI_TRUE@./utils/gui/globjects/libguiutilsglobjects.a \ -@WITH_GUI_TRUE@./utils/gui/div/libguiutilsdiv.a \ -@WITH_GUI_TRUE@./utils/gui/settings/libguiutilssettings.a \ -@WITH_GUI_TRUE@./utils/gui/images/libguiutilsimages.a \ -@WITH_GUI_TRUE@./utils/gui/cursors/libguiutilscursors.a \ -@WITH_GUI_TRUE@./utils/gui/tracker/libguiutilstracker.a \ -@WITH_GUI_TRUE@./utils/foxtools/libfoxtools.a \ -@WITH_GUI_TRUE@./mesogui/libmesogui.a \ -@WITH_GUI_TRUE@./osgview/libosgview.a \ -@WITH_GUI_TRUE@$(sumo_LDADD) \ -@WITH_GUI_TRUE@./gui/GUIManipulator.o \ -@WITH_GUI_TRUE@./gui/GUITLLogicPhasesTrackerWindow.o \ -@WITH_GUI_TRUE@$(OSG_LIBS) $(FFMPEG_LIBS) \ -@WITH_GUI_TRUE@$(sumo_LDFLAGS) $(GDAL_LDFLAGS) $(X_LDFLAGS) - -SUBDIRS = foreign utils microsim router od marouter mesosim \ -netbuild netwrite netgen netimport netload \ -polyconvert dfrouter duarouter jtrrouter activitygen tools \ -libsumo traci-server traci_testclient $(GUI_DIRS) - -@WITH_VERSION_H_TRUE@VERSION_H = version.h -EXTRA_DIST = config.h config.h.in $(VERSION_H) sumo-gui.rc -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.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) --foreign src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/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): - -config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status src/config.h -$(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -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 - -netconvert$(EXEEXT): $(netconvert_OBJECTS) $(netconvert_DEPENDENCIES) $(EXTRA_netconvert_DEPENDENCIES) - @rm -f netconvert$(EXEEXT) - $(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) - $(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) - $(AM_V_CXXLD)$(CXXLINK) $(sumo_gui_OBJECTS) $(sumo_gui_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@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@ $(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 - -# 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(PROGRAMS) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: $(am__recursive_targets) all install-am install-strip - -.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 - -.PRECIOUS: Makefile - -@WITH_VERSION_H_TRUE@all: $(VERSION_H) -@WITH_VERSION_H_TRUE@$(VERSION_H): ../.git -@WITH_VERSION_H_TRUE@ ../tools/build/version.py $(CURDIR) - -# 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-1.1.0+dfsg1/src/marouter/Makefile.am sumo-1.2.0+dfsg1/src/marouter/Makefile.am --- sumo-1.1.0+dfsg1/src/marouter/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -22,4 +22,4 @@ ../utils/emissions/libemissions.a \ ../foreign/PHEMlight/cpp/libphemlight.a \ ../foreign/tcpip/libtcpip.a \ --l$(LIB_XERCES) $(FOX_LDFLAGS) +-l$(LIB_XERCES) $(FOX_LDFLAGS) $(PROJ_LDFLAGS) diff -Nru sumo-1.1.0+dfsg1/src/marouter/Makefile.in sumo-1.2.0+dfsg1/src/marouter/Makefile.in --- sumo-1.1.0+dfsg1/src/marouter/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,714 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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) \ - ROMARouteHandler.$(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/PHEMlight/cpp/libphemlight.a \ - ../foreign/tcpip/libtcpip.a $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -marouter_SOURCES = marouter_main.cpp \ -ROMAAssignments.cpp ROMAAssignments.h \ -ROMAEdge.cpp ROMAEdge.h \ -ROMAEdgeBuilder.cpp ROMAEdgeBuilder.h \ -ROMAFrame.cpp ROMAFrame.h \ -ROMARouteHandler.cpp ROMARouteHandler.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/PHEMlight/cpp/libphemlight.a \ -../foreign/tcpip/libtcpip.a \ --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) --foreign src/marouter/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/marouter/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)/ROMARouteHandler.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/marouter/marouter_main.cpp sumo-1.2.0+dfsg1/src/marouter/marouter_main.cpp --- sumo-1.1.0+dfsg1/src/marouter/marouter_main.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/marouter_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,11 +47,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -103,6 +103,7 @@ } } + double getTravelTime(const ROEdge* const edge, const ROVehicle* const /* veh */, double /* time */) { return edge->getLength() / edge->getSpeedLimit(); @@ -286,7 +287,7 @@ } matrix.sortByBeginTime(); ROVehicle defaultVehicle(SUMOVehicleParameter(), nullptr, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID), &net); - ROMAAssignments a(begin, end, oc.getBool("additive-traffic"), oc.getFloat("weight-adaption"), net, matrix, *router); + ROMAAssignments a(begin, end, oc.getBool("additive-traffic"), oc.getFloat("weight-adaption"), oc.getInt("max-alternatives"), net, matrix, *router); a.resetFlows(); #ifdef HAVE_FOX const int maxNumThreads = oc.getInt("routing-threads"); @@ -294,7 +295,11 @@ new RONet::WorkerThread(net.getThreadPool(), provider); } #endif - const std::string assignMethod = oc.getString("assignment-method"); + std::string assignMethod = oc.getString("assignment-method"); + if (assignMethod == "UE") { + WRITE_WARNING("Deterministic user equilibrium ('UE') is not implemented yet, using stochastic method ('SUE')."); + assignMethod = "SUE"; + } if (assignMethod == "incremental") { a.incremental(oc.getInt("max-iterations"), oc.getBool("verbose")); } else if (assignMethod == "SUE") { @@ -312,8 +317,11 @@ std::map sortedOut; SUMOTime lastEnd = -1; int num = 0; - for (std::vector::const_iterator i = matrix.getCells().begin(); i != matrix.getCells().end(); ++i) { - const ODCell* const c = *i; + for (const ODCell* const c : matrix.getCells()) { + if (c->begin >= end || c->end <= begin || + c->pathsVector.empty() || c->pathsVector.front()->getEdgeVector().empty()) { + continue; + } if (lastEnd >= 0 && lastEnd <= c->begin) { for (std::map::const_iterator desc = sortedOut.begin(); desc != sortedOut.end(); ++desc) { dev->writePreformattedTag(desc->second); @@ -321,30 +329,36 @@ sortedOut.clear(); } if (c->departures.empty()) { + const SUMOTime b = MAX2(begin, c->begin); + const SUMOTime e = MIN2(end, c->end); + const int numVehs = int(c->vehicleNumber * (e - b) / (c->end - c->begin)); OutputDevice_String od(dev->isBinary(), 1); od.openTag(SUMO_TAG_FLOW).writeAttr(SUMO_ATTR_ID, oc.getString("prefix") + toString(num++)); - od.writeAttr(SUMO_ATTR_BEGIN, time2string(c->begin)).writeAttr(SUMO_ATTR_END, time2string(c->end)); - od.writeAttr(SUMO_ATTR_NUMBER, int(c->vehicleNumber)); + od.writeAttr(SUMO_ATTR_BEGIN, time2string(b)).writeAttr(SUMO_ATTR_END, time2string(e)); + od.writeAttr(SUMO_ATTR_NUMBER, numVehs); matrix.writeDefaultAttrs(od, oc.getBool("ignore-vehicle-type"), c); od.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(od, nullptr, true, false); + for (RORoute* const r : c->pathsVector) { + r->setCosts(router->recomputeCosts(r->getEdgeVector(), &defaultVehicle, begin)); + r->writeXMLDefinition(od, nullptr, true, false); } od.closeTag(); od.closeTag(); sortedOut[c->begin] += od.getString(); } else { for (std::map >::const_iterator deps = c->departures.begin(); deps != c->departures.end(); ++deps) { + if (deps->first >= end || deps->first < begin) { + continue; + } const std::string routeDistId = c->origin + "_" + c->destination + "_" + time2string(c->begin) + "_" + time2string(c->end); - for (std::vector::const_iterator id = deps->second.begin(); id != deps->second.end(); ++id) { + for (const std::string& id : deps->second) { OutputDevice_String od(dev->isBinary(), 1); - od.openTag(SUMO_TAG_VEHICLE).writeAttr(SUMO_ATTR_ID, *id).writeAttr(SUMO_ATTR_DEPART, time2string(deps->first)); + od.openTag(SUMO_TAG_VEHICLE).writeAttr(SUMO_ATTR_ID, id).writeAttr(SUMO_ATTR_DEPART, time2string(deps->first)); matrix.writeDefaultAttrs(od, oc.getBool("ignore-vehicle-type"), c); od.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(od, nullptr, true, false); + for (RORoute* const r : c->pathsVector) { + r->setCosts(router->recomputeCosts(r->getEdgeVector(), &defaultVehicle, begin)); + r->writeXMLDefinition(od, nullptr, true, false); } od.closeTag(); if (!tazParamKeys.empty()) { @@ -445,7 +459,7 @@ } } if (net->getDistricts().empty()) { - throw ProcessError("No districts loaded."); + WRITE_WARNING("No districts loaded, will use edge ids!"); } // load districts ODDistrictCont districts; @@ -455,14 +469,14 @@ matrix.loadMatrix(oc); ROMARouteHandler handler(matrix); matrix.loadRoutes(oc, handler); - if (matrix.getNumLoaded() == 0) { - throw ProcessError("No vehicles loaded."); + if (matrix.getNumLoaded() == matrix.getNumDiscarded()) { + throw ProcessError("No valid vehicles loaded."); } if (MsgHandler::getErrorInstance()->wasInformed() && !oc.getBool("ignore-errors")) { throw ProcessError("Loading failed."); } MsgHandler::getErrorInstance()->clear(); - WRITE_MESSAGE(toString(matrix.getNumLoaded()) + " vehicles loaded."); + WRITE_MESSAGE(toString(matrix.getNumLoaded() - matrix.getNumDiscarded()) + " valid vehicles loaded (total seen: " + toString(matrix.getNumLoaded()) + ")."); // build routes and parse the incremental rates if the incremental method is choosen. try { diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAAssignments.cpp sumo-1.2.0+dfsg1/src/marouter/ROMAAssignments.cpp --- sumo-1.1.0+dfsg1/src/marouter/ROMAAssignments.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAAssignments.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,14 +25,14 @@ #include #include +#include +#include +#include +#include #include -#include #include #include -#include #include -#include -#include #include "ROMAEdge.h" #include "ROMAAssignments.h" @@ -48,9 +48,10 @@ // =========================================================================== ROMAAssignments::ROMAAssignments(const SUMOTime begin, const SUMOTime end, const bool additiveTraffic, - const double adaptionFactor, RONet& net, ODMatrix& matrix, + const double adaptionFactor, const int maxAlternatives, RONet& net, ODMatrix& matrix, SUMOAbstractRouter& router) - : myBegin(begin), myEnd(end), myAdditiveTraffic(additiveTraffic), myAdaptionFactor(adaptionFactor), myNet(net), myMatrix(matrix), myRouter(router) { + : myBegin(begin), myEnd(end), myAdditiveTraffic(additiveTraffic), myAdaptionFactor(adaptionFactor), + myMaxAlternatives(maxAlternatives), myNet(net), myMatrix(matrix), myRouter(router) { myDefaultVehicle = new ROVehicle(SUMOVehicleParameter(), nullptr, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID), &net); } @@ -165,7 +166,7 @@ bool -ROMAAssignments::addRoute(ConstROEdgeVector& edges, std::vector& paths, std::string routeId, double prob) { +ROMAAssignments::addRoute(const ConstROEdgeVector& edges, std::vector& paths, std::string routeId, double prob) { std::vector::iterator p; for (p = paths.begin(); p != paths.end(); p++) { if (edges == (*p)->getEdgeVector()) { @@ -182,18 +183,49 @@ } +const ConstROEdgeVector +ROMAAssignments::computePath(ODCell* cell, const SUMOTime time, const double probability, SUMOAbstractRouter* router) { + const ROEdge* const from = myNet.getEdge(cell->origin + (cell->originIsEdge ? "" : "-source")); + if (from == nullptr) { + throw ProcessError("Unknown origin '" + cell->origin + "'."); + } + const ROEdge* const to = myNet.getEdge(cell->destination + (cell->destinationIsEdge ? "" : "-sink")); + if (to == nullptr) { + throw ProcessError("Unknown destination '" + cell->destination + "'."); + } + ConstROEdgeVector edges; + if (router == nullptr) { + router = &myRouter; + } + if (myMaxAlternatives > 0 && (int)cell->pathsVector.size() < myMaxAlternatives) { + router->compute(from, to, myDefaultVehicle, time, edges); + if (addRoute(edges, cell->pathsVector, cell->origin + cell->destination + toString(cell->pathsVector.size()), probability)) { + return edges; + } + } else { + double minCost = std::numeric_limits::max(); + RORoute* minRoute = nullptr; + for (RORoute* const p : cell->pathsVector) { + const double cost = router->recomputeCosts(edges, myDefaultVehicle, time); + if (cost < minCost) { + minCost = cost; + minRoute = p; + } + } + minRoute->addProbability(probability); + } + return ConstROEdgeVector(); +} + + void ROMAAssignments::getKPaths(const int kPaths, const double penalty) { - for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { - ODCell* c = *i; + for (ODCell* const c : myMatrix.getCells()) { 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; + for (const ROEdge* const e : computePath(c)) { + myPenalties[e] += penalty; } - addRoute(edges, c->pathsVector, c->origin + c->destination + toString(c->pathsVector.size()), 0); } } myPenalties.clear(); @@ -216,10 +248,10 @@ SUMOTime lastBegin = -1; std::vector intervals; int count = 0; - for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { - if ((*i)->begin != lastBegin) { + for (const ODCell* const c : myMatrix.getCells()) { + if (c->begin != lastBegin) { intervals.push_back(count); - lastBegin = (*i)->begin; + lastBegin = c->begin; } count++; } @@ -271,10 +303,8 @@ myRouter.setBulkMode(false); lastOrigin = c->origin; } - ConstROEdgeVector edges; - myRouter.compute(myNet.getEdge(c->origin + "-source"), myNet.getEdge(c->destination + "-sink"), myDefaultVehicle, begin, edges); + computePath(c, begin, linkFlow); myRouter.setBulkMode(true); - addRoute(edges, c->pathsVector, c->origin + c->destination + toString(c->pathsVector.size()), linkFlow); } #ifdef HAVE_FOX if (myNet.getThreadPool().size() > 0) { @@ -316,14 +346,13 @@ if (myAdditiveTraffic) { intervals[STEPS2TIME(myBegin)] = STEPS2TIME(myEnd); } else { - for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { - intervals[STEPS2TIME((*i)->begin)] = STEPS2TIME((*i)->end); + for (const ODCell* const c : myMatrix.getCells()) { + intervals[STEPS2TIME(c->begin)] = STEPS2TIME(c->end); } } 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* const c = *i; + for (const ODCell* const c : myMatrix.getCells()) { const SUMOTime begin = myAdditiveTraffic ? myBegin : c->begin; const SUMOTime end = myAdditiveTraffic ? myEnd : c->end; // update path cost @@ -386,19 +415,15 @@ // 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); + for (ODCell* const c : myMatrix.getCells()) { + newRoute |= !computePath(c).empty(); } if (!newRoute) { break; } } // final round of assignment - for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { - ODCell* c = *i; + for (const ODCell* const c : myMatrix.getCells()) { // update path cost for (std::vector::const_iterator j = c->pathsVector.begin(); j != c->pathsVector.end(); ++j) { RORoute* r = *j; @@ -441,8 +466,6 @@ // --------------------------------------------------------------------------- void ROMAAssignments::RoutingTask::run(FXWorkerThread* context) { - ConstROEdgeVector edges; - static_cast(context)->getVehicleRouter().compute(myAssign.myNet.getEdge(myCell->origin + "-source"), myAssign.myNet.getEdge(myCell->destination + "-sink"), myAssign.myDefaultVehicle, myBegin, edges); - myAssign.addRoute(edges, myCell->pathsVector, myCell->origin + myCell->destination + toString(myCell->pathsVector.size()), myLinkFlow); + myAssign.computePath(myCell, myBegin, myLinkFlow, &static_cast(context)->getVehicleRouter()); } #endif diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAAssignments.h sumo-1.2.0+dfsg1/src/marouter/ROMAAssignments.h --- sumo-1.1.0+dfsg1/src/marouter/ROMAAssignments.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAAssignments.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ // =========================================================================== #include -#include +#include #include // =========================================================================== @@ -52,7 +52,8 @@ public: /// Constructor ROMAAssignments(const SUMOTime begin, const SUMOTime end, const bool additiveTraffic, - const double adaptionFactor, RONet& net, ODMatrix& matrix, SUMOAbstractRouter& router); + const double adaptionFactor, const int maxAlternatives, + RONet& net, ODMatrix& matrix, SUMOAbstractRouter& router); /// Destructor ~ROMAAssignments(); @@ -120,7 +121,9 @@ private: /// @brief add a route and check for duplicates - bool addRoute(ConstROEdgeVector& edges, std::vector& paths, std::string routeId, double prob); + bool addRoute(const ConstROEdgeVector& edges, std::vector& paths, std::string routeId, double prob); + + const ConstROEdgeVector computePath(ODCell* cell, const SUMOTime time = 0, const double probability = 0., SUMOAbstractRouter* router = nullptr); /// @brief get the k shortest paths void getKPaths(const int kPaths, const double penalty); @@ -130,6 +133,7 @@ const SUMOTime myEnd; const bool myAdditiveTraffic; const double myAdaptionFactor; + const int myMaxAlternatives; RONet& myNet; ODMatrix& myMatrix; SUMOAbstractRouter& myRouter; diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAEdgeBuilder.cpp sumo-1.2.0+dfsg1/src/marouter/ROMAEdgeBuilder.cpp --- sumo-1.1.0+dfsg1/src/marouter/ROMAEdgeBuilder.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAEdgeBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAEdgeBuilder.h sumo-1.2.0+dfsg1/src/marouter/ROMAEdgeBuilder.h --- sumo-1.1.0+dfsg1/src/marouter/ROMAEdgeBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAEdgeBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAEdge.cpp sumo-1.2.0+dfsg1/src/marouter/ROMAEdge.cpp --- sumo-1.1.0+dfsg1/src/marouter/ROMAEdge.cpp 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAEdge.h sumo-1.2.0+dfsg1/src/marouter/ROMAEdge.h --- sumo-1.1.0+dfsg1/src/marouter/ROMAEdge.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAFrame.cpp sumo-1.2.0+dfsg1/src/marouter/ROMAFrame.cpp --- sumo-1.1.0+dfsg1/src/marouter/ROMAFrame.cpp 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMAFrame.h sumo-1.2.0+dfsg1/src/marouter/ROMAFrame.h --- sumo-1.1.0+dfsg1/src/marouter/ROMAFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMAFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMARouteHandler.cpp sumo-1.2.0+dfsg1/src/marouter/ROMARouteHandler.cpp --- sumo-1.1.0+dfsg1/src/marouter/ROMARouteHandler.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMARouteHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,9 +24,10 @@ // =========================================================================== #include +#include #include #include -#include +#include #include #include "ROMARouteHandler.h" @@ -35,8 +36,7 @@ // method definitions // =========================================================================== ROMARouteHandler::ROMARouteHandler(ODMatrix& matrix) : - SUMOSAXHandler(""), - myMatrix(matrix) { + SUMOSAXHandler(""), myMatrix(matrix) { if (OptionsCont::getOptions().isSet("taz-param")) { myTazParamKeys = OptionsCont::getOptions().getStringVector("taz-param"); } @@ -48,16 +48,23 @@ void -ROMARouteHandler::myStartElement(int element, - const SUMOSAXAttributes& attrs) { +ROMARouteHandler::myStartElement(int element, const SUMOSAXAttributes& attrs) { if (element == SUMO_TAG_TRIP || element == SUMO_TAG_VEHICLE) { myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs); + if (!myVehicleParameter->wasSet(VEHPARS_FROM_TAZ_SET) && attrs.hasAttribute(SUMO_ATTR_FROM)) { + myVehicleParameter->fromTaz = attrs.getString(SUMO_ATTR_FROM); + } + if (!myVehicleParameter->wasSet(VEHPARS_TO_TAZ_SET) && attrs.hasAttribute(SUMO_ATTR_TO)) { + myVehicleParameter->toTaz = attrs.getString(SUMO_ATTR_TO); + } } else if (element == SUMO_TAG_PARAM && !myTazParamKeys.empty()) { if (attrs.getString(SUMO_ATTR_KEY) == myTazParamKeys[0]) { myVehicleParameter->fromTaz = attrs.getString(SUMO_ATTR_VALUE); + myVehicleParameter->parametersSet |= VEHPARS_FROM_TAZ_SET; } if (myTazParamKeys.size() > 1 && attrs.getString(SUMO_ATTR_KEY) == myTazParamKeys[1]) { myVehicleParameter->toTaz = attrs.getString(SUMO_ATTR_VALUE); + myVehicleParameter->parametersSet |= VEHPARS_TO_TAZ_SET; } } } @@ -66,8 +73,13 @@ void ROMARouteHandler::myEndElement(int element) { if (element == SUMO_TAG_TRIP || element == SUMO_TAG_VEHICLE) { - std::pair od = std::make_pair(myVehicleParameter->fromTaz, myVehicleParameter->toTaz); - myMatrix.add(myVehicleParameter->id, myVehicleParameter->depart, od, myVehicleParameter->vtypeid); + if (myVehicleParameter->fromTaz == "" || myVehicleParameter->toTaz == "") { + WRITE_WARNING("No origin or no destination given, ignoring '" + myVehicleParameter->id + "'!"); + } else { + myMatrix.add(myVehicleParameter->id, myVehicleParameter->depart, + myVehicleParameter->fromTaz, myVehicleParameter->toTaz, myVehicleParameter->vtypeid, + !myVehicleParameter->wasSet(VEHPARS_FROM_TAZ_SET), !myVehicleParameter->wasSet(VEHPARS_TO_TAZ_SET)); + } delete myVehicleParameter; } } diff -Nru sumo-1.1.0+dfsg1/src/marouter/ROMARouteHandler.h sumo-1.2.0+dfsg1/src/marouter/ROMARouteHandler.h --- sumo-1.1.0+dfsg1/src/marouter/ROMARouteHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/marouter/ROMARouteHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -68,10 +68,10 @@ void myEndElement(int element); //@} - private: /// @brief The matrix to fill ODMatrix& myMatrix; + /// @brief The keys for reading taz std::vector myTazParamKeys; /// @brief The current vehicle parameters diff -Nru sumo-1.1.0+dfsg1/src/mesogui/GUIMEInductLoop.cpp sumo-1.2.0+dfsg1/src/mesogui/GUIMEInductLoop.cpp --- sumo-1.1.0+dfsg1/src/mesogui/GUIMEInductLoop.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesogui/GUIMEInductLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesogui/GUIMEInductLoop.h sumo-1.2.0+dfsg1/src/mesogui/GUIMEInductLoop.h --- sumo-1.1.0+dfsg1/src/mesogui/GUIMEInductLoop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesogui/GUIMEInductLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicleControl.cpp sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicleControl.cpp --- sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicleControl.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicleControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,7 +21,7 @@ // =========================================================================== #include -#include +#include #include #include #include @@ -59,21 +59,21 @@ bool GUIMEVehicleControl::addVehicle(const std::string& id, SUMOVehicle* v) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); return MEVehicleControl::addVehicle(id, v); } void GUIMEVehicleControl::deleteVehicle(SUMOVehicle* veh, bool discard) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); MEVehicleControl::deleteVehicle(veh, discard); } void GUIMEVehicleControl::insertVehicleIDs(std::vector& into) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); into.reserve(myVehicleDict.size()); for (VehicleDictType::iterator i = myVehicleDict.begin(); i != myVehicleDict.end(); ++i) { SUMOVehicle* veh = (*i).second; diff -Nru sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicleControl.h sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicleControl.h --- sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicleControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicleControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,16 +24,12 @@ #include #include -#include +#include #include #include // =========================================================================== -// class declarations -// =========================================================================== - -// =========================================================================== // class definitions // =========================================================================== /** @@ -105,7 +101,7 @@ private: /// The mutex used to avoid concurrent updates of the vehicle buffer - mutable MFXMutex myLock; + mutable FXMutex myLock; private: diff -Nru sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicle.cpp sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicle.cpp --- sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicle.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,12 +27,14 @@ #include #include #include +#include #include #include #include #include #include #include + #include "GUIMEVehicle.h" @@ -147,13 +149,9 @@ } -bool -GUIMEVehicle::drawAction_drawCarriageClass(const GUIVisualizationSettings& /* s */, SUMOVehicleShape /* guiShape */, bool /* asImage */) const { - // undo scaling from GUIBaseVehicle::drawAction_drawVehicleAsPoly - glPopMatrix(); - drawAction_drawVehicleAsBoxPlus(); - glPushMatrix(); - return true; +void +GUIMEVehicle::drawAction_drawCarriageClass(const GUIVisualizationSettings& /* s */, bool /* asImage */) const { + GUIBaseVehicleHelper::drawAction_drawVehicleAsBoxPlus(getVType().getWidth(), getVType().getLength()); } @@ -204,9 +202,9 @@ void -GUIMEVehicle::drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r) const { +GUIMEVehicle::drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future) const { const double exaggeration = s.vehicleSize.getExaggeration(s, this); - MSRouteIterator i = r.begin(); + MSRouteIterator i = future ? myCurrEdge : r.begin(); for (; i != r.end(); ++i) { const GUILane* lane = static_cast((*i)->getLanes()[0]); GLHelper::drawBoxLines(lane->getShape(), lane->getShapeRotations(), lane->getShapeLengths(), 1.0); diff -Nru sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicle.h sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicle.h --- sumo-1.1.0+dfsg1/src/mesogui/GUIMEVehicle.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesogui/GUIMEVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -88,8 +88,8 @@ /// @brief gets the color value according to the current scheme index double getColorValue(int activeScheme) 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 draws the given guiShape with distinct carriages/modules + void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const; /** @brief Returns the time since the last lane change in seconds * @see MSVehicle::myLastLaneChangeOffset @@ -100,7 +100,7 @@ /** @brief Draws the route * @param[in] r The route to draw */ - void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r) const; + void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future) const; /// @brief retrieve information about the current stop state std::string getStopInfo() const; diff -Nru sumo-1.1.0+dfsg1/src/mesogui/Makefile.in sumo-1.2.0+dfsg1/src/mesogui/Makefile.in --- sumo-1.1.0+dfsg1/src/mesogui/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesogui/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,635 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/mesogui -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libmesogui_a_AR = $(AR) $(ARFLAGS) -libmesogui_a_LIBADD = -am_libmesogui_a_OBJECTS = GUIMEInductLoop.$(OBJEXT) \ - GUIMEVehicle.$(OBJEXT) GUIMEVehicleControl.$(OBJEXT) -libmesogui_a_OBJECTS = $(am_libmesogui_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 = $(libmesogui_a_SOURCES) -DIST_SOURCES = $(libmesogui_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmesogui.a -libmesogui_a_SOURCES = GUIMEInductLoop.cpp GUIMEInductLoop.h \ -GUIMEVehicle.cpp GUIMEVehicle.h \ -GUIMEVehicleControl.cpp GUIMEVehicleControl.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) --foreign src/mesogui/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/mesogui/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) - -libmesogui.a: $(libmesogui_a_OBJECTS) $(libmesogui_a_DEPENDENCIES) $(EXTRA_libmesogui_a_DEPENDENCIES) - $(AM_V_at)-rm -f libmesogui.a - $(AM_V_AR)$(libmesogui_a_AR) libmesogui.a $(libmesogui_a_OBJECTS) $(libmesogui_a_LIBADD) - $(AM_V_at)$(RANLIB) libmesogui.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIMEInductLoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIMEVehicle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIMEVehicleControl.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/mesosim/Makefile.in sumo-1.2.0+dfsg1/src/mesosim/Makefile.in --- sumo-1.1.0+dfsg1/src/mesosim/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,642 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/mesosim -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libmesosim_a_AR = $(AR) $(ARFLAGS) -libmesosim_a_LIBADD = -am_libmesosim_a_OBJECTS = MEInductLoop.$(OBJEXT) MELoop.$(OBJEXT) \ - MESegment.$(OBJEXT) METriggeredCalibrator.$(OBJEXT) \ - MEVehicle.$(OBJEXT) MEVehicleControl.$(OBJEXT) -libmesosim_a_OBJECTS = $(am_libmesosim_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 = $(libmesosim_a_SOURCES) -DIST_SOURCES = $(libmesosim_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmesosim.a -libmesosim_a_SOURCES = MEInductLoop.cpp MEInductLoop.h \ -MELoop.cpp MELoop.h \ -MESegment.cpp MESegment.h \ -METriggeredCalibrator.cpp METriggeredCalibrator.h \ -MEVehicle.cpp MEVehicle.h \ -MEVehicleControl.cpp MEVehicleControl.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) --foreign src/mesosim/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/mesosim/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) - -libmesosim.a: $(libmesosim_a_OBJECTS) $(libmesosim_a_DEPENDENCIES) $(EXTRA_libmesosim_a_DEPENDENCIES) - $(AM_V_at)-rm -f libmesosim.a - $(AM_V_AR)$(libmesosim_a_AR) libmesosim.a $(libmesosim_a_OBJECTS) $(libmesosim_a_LIBADD) - $(AM_V_at)$(RANLIB) libmesosim.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEInductLoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MELoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MESegment.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/METriggeredCalibrator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEVehicle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEVehicleControl.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/mesosim/MEInductLoop.cpp sumo-1.2.0+dfsg1/src/mesosim/MEInductLoop.cpp --- sumo-1.1.0+dfsg1/src/mesosim/MEInductLoop.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MEInductLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MEInductLoop.h sumo-1.2.0+dfsg1/src/mesosim/MEInductLoop.h --- sumo-1.1.0+dfsg1/src/mesosim/MEInductLoop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MEInductLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MELoop.cpp sumo-1.2.0+dfsg1/src/mesosim/MELoop.cpp --- sumo-1.1.0+dfsg1/src/mesosim/MELoop.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MELoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -281,6 +281,9 @@ MESegment* MELoop::getSegmentForEdge(const MSEdge& e, double pos) { + if (e.getNumericalID() >= (int)myEdges2FirstSegments.size()) { + return nullptr; + } MESegment* s = myEdges2FirstSegments[e.getNumericalID()]; if (pos > 0) { double cpos = 0; diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MELoop.h sumo-1.2.0+dfsg1/src/mesosim/MELoop.h --- sumo-1.1.0+dfsg1/src/mesosim/MELoop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MELoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MESegment.cpp sumo-1.2.0+dfsg1/src/mesosim/MESegment.cpp --- sumo-1.1.0+dfsg1/src/mesosim/MESegment.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MESegment.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -114,7 +114,7 @@ assert(allowed != 0); assert(allowed->size() > 0); for (std::vector::const_iterator j = allowed->begin(); j != allowed->end(); ++j) { - std::vector::const_iterator it = find(lanes.begin(), lanes.end(), *j); + std::vector::const_iterator it = std::find(lanes.begin(), lanes.end(), *j); myFollowerMap[edge].push_back((int)distance(lanes.begin(), it)); } } @@ -221,7 +221,7 @@ void MESegment::removeDetector(MSMoveReminder* data) { - std::vector::iterator it = find( + std::vector::iterator it = std::find( myDetectorData.begin(), myDetectorData.end(), data); if (it != myDetectorData.end()) { myDetectorData.erase(it); @@ -660,9 +660,9 @@ void -MESegment::loadState(std::vector& vehIds, MSVehicleControl& vc, const SUMOTime block, const int queIdx) { - for (std::vector::const_iterator it = vehIds.begin(); it != vehIds.end(); ++it) { - MEVehicle* v = static_cast(vc.getVehicle(*it)); +MESegment::loadState(const std::vector& vehIds, MSVehicleControl& vc, const SUMOTime block, const int queIdx) { + for (const std::string& id : vehIds) { + MEVehicle* v = static_cast(vc.getVehicle(id)); // vehicle could be removed due to options if (v != nullptr) { assert(v->getSegment() == this); diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MESegment.h sumo-1.2.0+dfsg1/src/mesosim/MESegment.h --- sumo-1.1.0+dfsg1/src/mesosim/MESegment.h 2018-10-11 22:00:28.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MESegment.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -323,7 +323,7 @@ * @todo What about throwing an IOError? * @todo What about throwing an error if something else fails (a vehicle can not be referenced)? */ - void loadState(std::vector& vehIDs, MSVehicleControl& vc, const SUMOTime blockTime, const int queIdx); + void loadState(const std::vector& vehIDs, MSVehicleControl& vc, const SUMOTime blockTime, const int queIdx); /// @} diff -Nru sumo-1.1.0+dfsg1/src/mesosim/METriggeredCalibrator.cpp sumo-1.2.0+dfsg1/src/mesosim/METriggeredCalibrator.cpp --- sumo-1.1.0+dfsg1/src/mesosim/METriggeredCalibrator.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/METriggeredCalibrator.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include "MELoop.h" diff -Nru sumo-1.1.0+dfsg1/src/mesosim/METriggeredCalibrator.h sumo-1.2.0+dfsg1/src/mesosim/METriggeredCalibrator.h --- sumo-1.1.0+dfsg1/src/mesosim/METriggeredCalibrator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/METriggeredCalibrator.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MEVehicleControl.cpp sumo-1.2.0+dfsg1/src/mesosim/MEVehicleControl.cpp --- sumo-1.1.0+dfsg1/src/mesosim/MEVehicleControl.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MEVehicleControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MEVehicleControl.h sumo-1.2.0+dfsg1/src/mesosim/MEVehicleControl.h --- sumo-1.1.0+dfsg1/src/mesosim/MEVehicleControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MEVehicleControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MEVehicle.cpp sumo-1.2.0+dfsg1/src/mesosim/MEVehicle.cpp --- sumo-1.1.0+dfsg1/src/mesosim/MEVehicle.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MEVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -192,7 +192,7 @@ if (onInit) { myCurrEdge = newRoute->begin(); } else { - myCurrEdge = find(edges.begin() + offset, edges.end(), *myCurrEdge); + myCurrEdge = std::find(edges.begin() + offset, edges.end(), *myCurrEdge); } // check whether the old route may be deleted (is not used by anyone else) newRoute->addReference(); @@ -223,11 +223,17 @@ const MSEdge* const edge = MSEdge::dictionary(stopPar.lane.substr(0, stopPar.lane.rfind('_'))); assert(edge != 0); MESegment* stopSeg = MSGlobals::gMesoNet->getSegmentForEdge(*edge, stopPar.endPos); - myStops[stopSeg].push_back(stopPar); - if (myStops[stopSeg].back().until >= 0) { - myStops[stopSeg].back().until += untilOffset; + std::vector& segmentStops = myStops[stopSeg]; + bool cyclicRoute = (myStopEdges.size() > 0 && myStopEdges.back() == edge + && segmentStops.size() > 0 && segmentStops.back().endPos > stopPar.endPos + && stopPar.index != STOP_INDEX_FIT); + segmentStops.push_back(stopPar); + if (segmentStops.back().until >= 0) { + segmentStops.back().until += untilOffset; + } + if (myStopEdges.empty() || myStopEdges.back() != edge || cyclicRoute) { + myStopEdges.push_back(edge); } - myStopEdges.push_back(edge); return true; } @@ -274,17 +280,43 @@ const ConstMSEdgeVector -MEVehicle::getStopEdges() const { -// TODO: myStopEdges still needs to be updated when leaving a stop +MEVehicle::getStopEdges(double& firstPos, double& lastPos) const { + if (myStopEdges.size() > 0) { + // always try to skip + firstPos = myStopEdges.front()->getLength(); + lastPos = 0; + } return myStopEdges; } +std::vector > +MEVehicle::getStopIndices() const { + std::vector > result; + auto it = myCurrEdge; + for (const MSEdge* e : myStopEdges) { + auto it2 = std::find(it, myRoute->end(), e); + if (it2 != myRoute->end()) { + result.push_back(std::make_pair((int)(it2 - myRoute->begin()), 0)); + it = it2; + } + } + return result; +} + void MEVehicle::processStop() { assert(isStopped()); MSEdge* edge = const_cast(getEdge()); - for (const SUMOVehicleParameter::Stop& stop : myStops.find(mySegment)->second) { + auto segStopsIt = myStops.find(mySegment); + std::vector& stops = segStopsIt->second; + double lastPos = 0; + for (auto it = stops.begin(); it != stops.end();) { + SUMOVehicleParameter::Stop stop = *it; + if (stop.endPos <= lastPos) { + break; + } + lastPos = stop.endPos; //SUMOTime started = MSNet::getInstance()->getCurrentTimeStep() - TIME2STEPS(getCurrentStoppingTimeSeconds()); SUMOTime started = myLastEntryTime; //std::cout << SIMTIME << " veh=" << getID() << " lastEntry=" << STEPS2TIME(myLastEntryTime) << " stopStarted=" << STEPS2TIME(started) << "\n"; @@ -306,8 +338,28 @@ if (MSStopOut::active()) { MSStopOut::getInstance()->stopEnded(this, stop, mySegment->getEdge().getID()); } + it = stops.erase(it); } MSNet::getInstance()->getVehicleControl().removeWaiting(&mySegment->getEdge(), this); + // clean up stops + if (stops.size() == 0) { + myStops.erase(segStopsIt); + } + bool removeStopEdge = true; + // remove the current stop edge if there are no stops on further segments of this edge + for (MESegment* next = mySegment->getNextSegment(); next != nullptr; next = next->getNextSegment()) { + if (myStops.count(next) != 0) { + removeStopEdge = false; + break; + } + } + if (removeStopEdge) { + if (myStopEdges.size() > 0) { + myStopEdges.erase(myStopEdges.begin()); + } else { + assert(false); + } + } } diff -Nru sumo-1.1.0+dfsg1/src/mesosim/MEVehicle.h sumo-1.2.0+dfsg1/src/mesosim/MEVehicle.h --- sumo-1.1.0+dfsg1/src/mesosim/MEVehicle.h 2018-09-18 22:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/mesosim/MEVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -171,6 +171,11 @@ */ bool isStoppedInRange(double pos) const; + /** @brief Returns whether the vehicle stops at the given stopping place */ + bool stopsAt(MSStoppingPlace* /*stop*/) const { + return false; + }; + /** @brief Returns until when to stop at the given segment * @param[in] seg The segment in question * @param[in] time the current time @@ -181,8 +186,10 @@ /** @brief Returns the list of still pending stop edges */ - const ConstMSEdgeVector getStopEdges() const; + const ConstMSEdgeVector getStopEdges(double& firstPos, double& lastPos) const; + /// @brief return list of route indices for the remaining stops + std::vector > getStopIndices() const; /// @brief get distance for coming to a stop (used for rerouting checks) double getBrakeGap() const { diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.cpp sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.cpp --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.h sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.h --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledDet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSState.cpp sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSState.cpp --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSState.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSState.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSState.h sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSState.h --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSState.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSState.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.cpp sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.cpp --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.h sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.h --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitches.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.h sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.h --- sumo-1.1.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Command_SaveTLSSwitchStates.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/actions/Makefile.in sumo-1.2.0+dfsg1/src/microsim/actions/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/actions/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/actions/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,643 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/actions -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - Command_SaveTLSSwitches.$(OBJEXT) \ - Command_SaveTLSSwitchStates.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmsactions.a -libmsactions_a_SOURCES = \ -Command_SaveTLSState.cpp Command_SaveTLSState.h \ -Command_SaveTLSSwitches.cpp Command_SaveTLSSwitches.h \ -Command_SaveTLSSwitchStates.cpp Command_SaveTLSSwitchStates.h \ -Command_SaveTLCoupledLaneDet.cpp Command_SaveTLCoupledLaneDet.h \ -Command_SaveTLCoupledDet.cpp Command_SaveTLCoupledDet.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) --foreign src/microsim/actions/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/actions/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command_SaveTLCoupledDet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command_SaveTLCoupledLaneDet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command_SaveTLSState.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command_SaveTLSSwitchStates.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command_SaveTLSSwitches.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/cfmodels/CC_Const.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/CC_Const.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/CC_Const.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/CC_Const.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,184 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file CC_Const.h +/// @author Michele Segata +/// @date Fri, 11 Apr 2014 +/// @version $Id$ +/// +// File defining constants, structs, and enums for cruise controllers +/****************************************************************************/ +#ifndef CC_CONST_H +#define CC_CONST_H + +#include +#include + +namespace Plexe { + +/** + * @brief action that might be requested by the platooning management + */ +enum PLATOONING_LANE_CHANGE_ACTION { + DRIVER_CHOICE = 0, //the platooning management is not active, so just let the driver choose the lane + STAY_IN_CURRENT_LANE = 3, //the car is part of a platoon, so it has to stay on the dedicated platooning lane + MOVE_TO_FIXED_LANE = 4 //move the car to a specific lane +}; + +/** + * @brief TraCI modes for lane changing + */ +#define FIX_LC 0b1000000000 +#define DEFAULT_NOTRACI_LC 0b1010101010 + +/** @enum ACTIVE_CONTROLLER + * @brief Determines the currently active controller, i.e., ACC, CACC, or the + * driver. In future we might need to switch off the automatic controller and + * leave the control to the mobility model which reproduces a human driver + */ +enum ACTIVE_CONTROLLER +{DRIVER = 0, ACC = 1, CACC = 2, FAKED_CACC = 3, PLOEG = 4, CONSENSUS = 5, FLATBED = 6}; + +/** + * @brief struct used as header for generic data passing to this model through + * traci + */ +struct CCDataHeader { + int type; //type of message. indicates what comes after the header + int size; //size of message. indicates how many bytes comes after the header +}; + +/** + * Struct defining data passed about a vehicle + */ +struct VEHICLE_DATA { + int index; //position in the platoon (0 = first) + double speed; //vehicle speed + double acceleration; //vehicle acceleration + double positionX; //position of the vehicle in the simulation + double positionY; //position of the vehicle in the simulation + double time; //time at which such information was read from vehicle's sensors + double length; //vehicle length + double u; //controller acceleration + double speedX; //vehicle speed on the X axis + double speedY; //vehicle speed on the Y axis + double angle; //vehicle angle in radians +}; + +#define MAX_N_CARS 8 + +#define CC_ENGINE_MODEL_FOLM 0x00 //first order lag model +#define CC_ENGINE_MODEL_REALISTIC 0x01 //the detailed and realistic engine model + +//parameter names for engine models +#define FOLM_PAR_TAU "tau_s" +#define FOLM_PAR_DT "dt_s" + +#define ENGINE_PAR_VEHICLE "vehicle" +#define ENGINE_PAR_XMLFILE "xmlFile" +#define ENGINE_PAR_DT "dt_s" + +#define CC_PAR_VEHICLE_DATA "ccvd" //data about a vehicle, like position, speed, acceleration, etc +#define CC_PAR_VEHICLE_POSITION "ccvp" //position of the vehicle in the platoon (0 based) +#define CC_PAR_PLATOON_SIZE "ccps" //number of cars in the platoon + +//set of controller-related constants +#define CC_PAR_CACC_XI "ccxi" //xi +#define CC_PAR_CACC_OMEGA_N "ccon" //omega_n +#define CC_PAR_CACC_C1 "ccc1" //C1 +#define CC_PAR_ENGINE_TAU "cctau" //engine time constant + +#define CC_PAR_UMIN "ccumin" //lower saturation for u +#define CC_PAR_UMAX "ccumax" //upper saturation for u + +#define CC_PAR_PLOEG_H "ccph" //time headway of ploeg's CACC +#define CC_PAR_PLOEG_KP "ccpkp" //kp parameter of ploeg's CACC +#define CC_PAR_PLOEG_KD "ccpkd" //kd parameter of ploeg's CACC + +#define CC_PAR_FLATBED_KA "ccfka" //ka parameter of flatbed CACC +#define CC_PAR_FLATBED_KV "ccfkv" //kv parameter of flatbed CACC +#define CC_PAR_FLATBED_KP "ccfkp" //kp parameter of flatbed CACC +#define CC_PAR_FLATBED_H "ccfh" //h parameter of flatbed CACC +#define CC_PAR_FLATBED_D "ccfd" //distance parameter of flatbed CACC + +#define CC_PAR_VEHICLE_ENGINE_MODEL "ccem" //set the engine model for a vehicle + +#define CC_PAR_VEHICLE_MODEL "ccvm" //set the vehicle model, i.e., engine characteristics +#define CC_PAR_VEHICLES_FILE "ccvf" //set the location of the vehicle parameters file + +// set CACC constant spacing +#define PAR_CACC_SPACING "ccsp" + +// get ACC computed acceleration when faked CACC controller is enabled +#define PAR_ACC_ACCELERATION "ccacc" + +// determine whether a vehicle has crashed or not +#define PAR_CRASHED "cccr" + +// set a fixed acceleration to a vehicle controlled by CC/ACC/CACC +#define PAR_FIXED_ACCELERATION "ccfa" + +// get vehicle speed and acceleration, needed for example by the platoon leader (get: vehicle) +#define PAR_SPEED_AND_ACCELERATION "ccsa" + +// set speed and acceleration of the platoon leader +#define PAR_LEADER_SPEED_AND_ACCELERATION "cclsa" + +// set whether CACCs should use real or controller acceleration +#define PAR_USE_CONTROLLER_ACCELERATION "ccca" + +// get lane count for the street the vehicle is currently traveling +#define PAR_LANES_COUNT "cclc" + +// set the cruise control desired speed +#define PAR_CC_DESIRED_SPEED "ccds" + +// set the currently active vehicle controller which can be either the driver, or the ACC or the CACC +#define PAR_ACTIVE_CONTROLLER "ccac" + +// get radar data from the car +#define PAR_RADAR_DATA "ccrd" + +// communicate with the cruise control to give him fake indications. this can be useful when you want +// to advance a vehicle to a certain position, for example, for joining a platoon. clearly the ACC +// must always take into consideration both fake and real data +#define PAR_LEADER_FAKE_DATA "cclfd" +#define PAR_FRONT_FAKE_DATA "ccffd" + +// get the distance that a car has to travel until it reaches the end of its route +#define PAR_DISTANCE_TO_END "ccdte" + +// get the distance from the beginning of the route +#define PAR_DISTANCE_FROM_BEGIN "ccdfb" + +// set speed and acceleration of preceding vehicle +#define PAR_PRECEDING_SPEED_AND_ACCELERATION "ccpsa" + +// set ACC headway time +#define PAR_ACC_HEADWAY_TIME "ccaht" + +// return engine information (for the realistic engine model) +#define PAR_ENGINE_DATA "cced" + +// enabling/disabling auto feeding +#define PAR_USE_AUTO_FEEDING "ccaf" + +// enabling/disabling data prediction +#define PAR_USE_PREDICTION "ccup" + +// add/remove members from own platoon +#define PAR_ADD_MEMBER "ccam" +#define PAR_REMOVE_MEMBER "ccrm" + +// let the leader automatically change lane for the whole platoon if there is a speed advantage +#define PAR_ENABLE_AUTO_LANE_CHANGE "ccalc" + +} + +#endif /* CC_CONST_H */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,87 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file CC_VehicleVariables.cpp +/// @author Michele Segata +/// @date Mon, 7 Mar 2016 +/// @version $Id$ +/// +/****************************************************************************/ +#include "CC_VehicleVariables.h" + +//initialize default L and K matrices +const int CC_VehicleVariables::defaultL[][MAX_N_CARS] = { + {0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 1, 0, 0, 0, 0, 0}, + {1, 0, 0, 1, 0, 0, 0, 0}, + {1, 0, 0, 0, 1, 0, 0, 0}, + {1, 0, 0, 0, 0, 1, 0, 0}, + {1, 0, 0, 0, 0, 0, 1, 0} +}; +const double CC_VehicleVariables::defaultK[][MAX_N_CARS] = { + {0, 0, 0, 0, 0, 0, 0, 0}, + {460, 0, 0, 0, 0, 0, 0, 0}, + {80, 860, 0, 0, 0, 0, 0, 0}, + {80, 0, 860, 0, 0, 0, 0, 0}, + {80, 0, 0, 860, 0, 0, 0, 0}, + {80, 0, 0, 0, 860, 0, 0, 0}, + {80, 0, 0, 0, 0, 860, 0, 0}, + {80, 0, 0, 0, 0, 0, 860, 0} +}; +const double CC_VehicleVariables::defaultB[MAX_N_CARS] = {1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800}; +const double CC_VehicleVariables::defaultH[MAX_N_CARS] = {0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8}; + +CC_VehicleVariables::CC_VehicleVariables() : + controllerAcceleration(0), frontSpeed(0), frontAcceleration(0), + frontControllerAcceleration(0), frontDataReadTime(0), frontAngle(0), frontInitialized(false), + autoFeed(false), leaderVehicle(0), frontVehicle(0), + accHeadwayTime(1.5), accLambda(0.1), + useControllerAcceleration(true), leaderSpeed(0), + leaderAcceleration(0), leaderControllerAcceleration(0), leaderDataReadTime(0), leaderAngle(0), + leaderInitialized(false), caccInitialized(false), + useFixedAcceleration(0), fixedAcceleration(0), + crashed(false), crashedVictim(false), + ccDesiredSpeed(14), ccKp(1), activeController(Plexe::DRIVER), + nInitialized(0), position(-1), nCars(8), + caccXi(-1), caccOmegaN(-1), caccC1(-1), caccAlpha1(-1), caccAlpha2(-1), + caccAlpha3(-1), caccAlpha4(-1), caccAlpha5(-1), caccSpacing(5), + engineTau(0.5), + uMin(-1e6), uMax(1e6), + ploegH(0.5), ploegKp(0.2), ploegKd(0.7), + flatbedKa(2.4), flatbedKv(0.6), flatbedKp(12), flatbedD(5), flatbedH(4), + engine(0), engineModel(CC_ENGINE_MODEL_FOLM), + usePrediction(false), + autoLaneChange(false) { + fakeData.frontAcceleration = 0; + fakeData.frontControllerAcceleration = 0; + fakeData.frontDistance = 0; + fakeData.frontSpeed = 0; + fakeData.leaderAcceleration = 0; + fakeData.leaderControllerAcceleration = 0; + fakeData.leaderSpeed = 0; + leaderPosition.set(0, 0); + frontPosition.set(0, 0); + //init L, K, b, and h with default values + memcpy(L, defaultL, sizeof(int)*MAX_N_CARS * MAX_N_CARS); + memcpy(K, defaultK, sizeof(double)*MAX_N_CARS * MAX_N_CARS); + memcpy(b, defaultB, sizeof(double)*MAX_N_CARS); + memcpy(h, defaultH, sizeof(double)*MAX_N_CARS); + //no data about any vehicle has been set + for (int i = 0; i < MAX_N_CARS; i++) { + initialized[i] = false; + } +} + +CC_VehicleVariables::~CC_VehicleVariables() { + if (engine) { + delete engine; + } +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/CC_VehicleVariables.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,211 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file CC_VehicleVariables.h +/// @author Michele Segata +/// @date Mon, 7 Mar 2016 +/// @version $Id$ +/// +/****************************************************************************/ +#ifndef CC_VEHICLEVARIABLES_H +#define CC_VEHICLEVARIABLES_H + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "CC_Const.h" +#include +#include +#include +#include +#include + +#include +#include +#include + +class CC_VehicleVariables : public MSCFModel::VehicleVariables { +public: + + /** + * @struct FAKE_CONTROLLER_DATA + * @brief represent the set of fake data which is sent to the controller in + * order to automatically make the car move to a precise position before + * joining the platoon. + * we expect to get from the upper application the data that the CACC needs, i.e.: + * - front distance, front speed and front vehicle acceleration: this information + * regards the car that the vehicle joining the platoon will have directly in + * front. this data might be real or might be fake: for example, if the platoon + * management algorithm decides to set the vehicle as the new leader, there won't + * be a car in front, and the fake data will be used only for positioning. in the + * case of fake data, acceleration must be set to 0 + * - leader front speed and acceleration: this information is the same as previously + * described for vehicle in front, but regards the leader. again, if the vehicle + * is being set as the new leader, this data might be fake data + */ + struct FAKE_CONTROLLER_DATA { + double frontDistance; + double frontSpeed; + double frontAcceleration; + double frontControllerAcceleration; + double leaderSpeed; + double leaderAcceleration; + double leaderControllerAcceleration; + }; + + /** + * Topology matrix L for the consensus controller + */ + const static int defaultL[MAX_N_CARS][MAX_N_CARS]; + + /** + * Gains matrix K for the consensus controller + */ + const static double defaultK[MAX_N_CARS][MAX_N_CARS]; + + /** + * Default damping ratios vector b for the consensus controller + */ + const static double defaultB[]; + + /** + * Default time headways vector h for the consensus controller + */ + const static double defaultH[]; + + CC_VehicleVariables(); + ~CC_VehicleVariables(); + + /// @brief acceleration as computed by the controller, to be sent to other vehicles + double controllerAcceleration; + + /// @brief current front vehicle speed + double frontSpeed; + /// @brief current front vehicle acceleration (used by CACC) + double frontAcceleration; + /// @brief front vehicle controller acceleration (used by CACC) + double frontControllerAcceleration; + /// @brief current front vehicle position + Position frontPosition; + /// @brief when front vehicle data has been readed from GPS + double frontDataReadTime; + /// @brief front vehicle velocity vector + Position frontVelocity; + /// @brief front vehicle angle in radians + double frontAngle; + /// @did we receive at least one packet? + bool frontInitialized; + + /// @brief determines whether CACC should automatically fetch data about other vehicles + bool autoFeed; + /// @brief leader vehicle, used for auto feeding + MSVehicle* leaderVehicle; + /// @brief front sumo id, used for auto feeding + MSVehicle* frontVehicle; + + /// @brief headway time for ACC + double accHeadwayTime; + double accLambda; + + /// @brief determines whether PATH's CACC should use the real vehicle + /// acceleration or the controller computed one + bool useControllerAcceleration; + /// @brief platoon's leader speed (used by CACC) + double leaderSpeed; + /// @brief platoon's leader acceleration (used by CACC) + double leaderAcceleration; + /// @brief platoon's leader controller acceleration (used by CACC) + double leaderControllerAcceleration; + /// @brief platoon's leader position + Position leaderPosition; + /// @brief when leader data has been readed from GPS + double leaderDataReadTime; + /// @brief platoon's leader velocity vector + Position leaderVelocity; + /// @brief platoon's leader angle in radians + double leaderAngle; + /// @did we receive at least one packet? + bool leaderInitialized; + bool caccInitialized; + + //enable/disable the use of a constant, user defined acceleration instead of the one computed by the controller + int useFixedAcceleration; + //fixed acceleration to use + double fixedAcceleration; + + //car collided in the last timestep + bool crashed; + bool crashedVictim; + + /// @brief CC desired speed + double ccDesiredSpeed; + double ccKp; + /// @brief currently active controller + enum Plexe::ACTIVE_CONTROLLER activeController; + + /// @brief fake controller data. @see FAKE_CONTROLLER_DATA + struct FAKE_CONTROLLER_DATA fakeData; + + /// @brief L matrix + int L[MAX_N_CARS][MAX_N_CARS]; + /// @brief K matrix + double K[MAX_N_CARS][MAX_N_CARS]; + /// @brief vector of damping ratios b + double b[MAX_N_CARS]; + /// @brief vector of time headways h + double h[MAX_N_CARS]; + + /// @brief data about vehicles in the platoon + struct Plexe::VEHICLE_DATA vehicles[MAX_N_CARS]; + /// @brief tells whether data about a certain vehicle has been initialized + bool initialized[MAX_N_CARS]; + /// @brief count of initialized vehicles + int nInitialized; + /// @brief my position within the platoon (0 = first car) + int position; + /// @brief number of cars in the platoon + int nCars; + + /// @brief controller related parameters + double caccXi; + double caccOmegaN; + double caccC1; + double caccAlpha1, caccAlpha2, caccAlpha3, caccAlpha4, caccAlpha5; + /// @brief fixed spacing for CACC + double caccSpacing; + double engineTau; + /// @brief limits for u + double uMin, uMax; + double ploegH; + double ploegKp; + double ploegKd; + double flatbedKa; + double flatbedKv; + double flatbedKp; + double flatbedD; + double flatbedH; + + /// @brief engine model employed by this car + GenericEngineModel* engine; + /// @brief numeric value indicating the employed model + int engineModel; + + /// @brief enable/disable data prediction (interpolation) for missing data + bool usePrediction; + + /// @brief list of members belonging to my platoon + std::map members; + + /// @brief automatic whole platoon lane change + bool autoLaneChange; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/CMakeLists.txt sumo-1.2.0+dfsg1/src/microsim/cfmodels/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -27,6 +27,12 @@ MSCFModel_CACC.h MSCFModel_Rail.cpp MSCFModel_Rail.h + CC_Const.h + CC_VehicleVariables.cpp + CC_VehicleVariables.h + MSCFModel_CC.cpp + MSCFModel_CC.h + ParBuffer.h ) add_library(microsim_cfmodels STATIC ${microsim_cfmodels_STAT_SRCS}) diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/Makefile.am sumo-1.2.0+dfsg1/src/microsim/cfmodels/Makefile.am --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/Makefile.am 2018-11-22 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -14,4 +14,7 @@ MSCFModel_Wiedemann.cpp MSCFModel_Wiedemann.h \ MSCFModel_ACC.cpp MSCFModel_ACC.h \ MSCFModel_CACC.cpp MSCFModel_CACC.h \ -MSCFModel_Rail.cpp MSCFModel_Rail.h +MSCFModel_Rail.cpp MSCFModel_Rail.h \ +MSCFModel_CC.cpp MSCFModel_CC.h \ +CC_VehicleVariables.cpp CC_VehicleVariables.h \ +ParBuffer.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/Makefile.in sumo-1.2.0+dfsg1/src/microsim/cfmodels/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,664 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/cfmodels -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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_KraussOrig1.$(OBJEXT) MSCFModel_KraussPS.$(OBJEXT) \ - MSCFModel_KraussX.$(OBJEXT) MSCFModel_PWag2009.$(OBJEXT) \ - MSCFModel_SmartSK.$(OBJEXT) MSCFModel_Wiedemann.$(OBJEXT) \ - MSCFModel_ACC.$(OBJEXT) MSCFModel_CACC.$(OBJEXT) \ - MSCFModel_Rail.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmicrosimcfmodels.a -libmicrosimcfmodels_a_SOURCES = \ -MSCFModel.cpp MSCFModel.h \ -MSCFModel_Daniel1.cpp MSCFModel_Daniel1.h \ -MSCFModel_IDM.cpp MSCFModel_IDM.h \ -MSCFModel_Kerner.cpp MSCFModel_Kerner.h \ -MSCFModel_Krauss.cpp MSCFModel_Krauss.h \ -MSCFModel_KraussOrig1.cpp MSCFModel_KraussOrig1.h \ -MSCFModel_KraussPS.cpp MSCFModel_KraussPS.h \ -MSCFModel_KraussX.cpp MSCFModel_KraussX.h \ -MSCFModel_PWag2009.cpp MSCFModel_PWag2009.h \ -MSCFModel_SmartSK.cpp MSCFModel_SmartSK.h \ -MSCFModel_Wiedemann.cpp MSCFModel_Wiedemann.h \ -MSCFModel_ACC.cpp MSCFModel_ACC.h \ -MSCFModel_CACC.cpp MSCFModel_CACC.h \ -MSCFModel_Rail.cpp MSCFModel_Rail.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) --foreign src/microsim/cfmodels/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/cfmodels/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_ACC.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_CACC.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_Daniel1.Po@am__quote@ -@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_KraussOrig1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_KraussPS.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_KraussX.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_PWag2009.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_Rail.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_SmartSK.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_Wiedemann.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.cpp 2018-09-22 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -43,8 +43,9 @@ // =========================================================================== // debug flags // =========================================================================== -#define DEBUG_ACC -#define DEBUG_COND (veh->isSelected()) +//#define DEBUG_ACC +//#define DEBUG_COND (true) +//#define DEBUG_COND (veh->isSelected()) // =========================================================================== @@ -58,6 +59,15 @@ #define DEFAULT_CA_GAIN_SPACE 0.8 #define DEFAULT_CA_GAIN_SPEED 0.23 +// =========================================================================== +// thresholds +// =========================================================================== +#define GAP_THRESHOLD_SPEEDCTRL 120 +#define GAP_THRESHOLD_GAPCTRL 100 + + + + // override followSpeed when deemed unsafe by the given margin (the value was selected to reduce the number of necessary interventions) #define DEFAULT_EMERGENCY_OVERRIDE_THRESHOLD 2.0 @@ -105,6 +115,46 @@ } +double +MSCFModel_ACC::getSecureGap(const double speed, const double leaderSpeed, const double /* leaderMaxDecel */) const { + // Accel in gap mode should vanish: + // 0 = myGapControlGainSpeed * (leaderSpeed - speed) + myGapControlGainSpace * (g - myHeadwayTime * speed); + // <=> myGapControlGainSpace * g = - myGapControlGainSpeed * (leaderSpeed - speed) + myGapControlGainSpace * myHeadwayTime * speed; + // <=> g = - myGapControlGainSpeed * (leaderSpeed - speed) / myGapControlGainSpace + myHeadwayTime * speed; + return myGapControlGainSpeed * (speed - leaderSpeed) / myGapControlGainSpace + myHeadwayTime * speed; +} + + +double +MSCFModel_ACC::insertionFollowSpeed(const MSVehicle* const v, double speed, double gap2pred, double predSpeed, double predMaxDecel) const { +//#ifdef DEBUG_ACC +// std::cout << "MSCFModel_ACC::insertionFollowSpeed(), speed="<getID() << "'\n" - << " gap=" << gap2pred << " speed=" << speed << " predSpeed=" << predSpeed - << " desSpeed=" << desSpeed << std::endl; + << " gap=" << gap2pred << " speed=" << speed << " predSpeed=" << predSpeed + << " desSpeed=" << desSpeed << std::endl; } #endif @@ -170,7 +220,7 @@ /* Velocity error */ double vErr = speed - desSpeed; int setControlMode = 0; - ACCVehicleVariables* vars = (ACCVehicleVariables*)veh->getCarFollowVariables(); + ACCVehicleVariables* vars = (ACCVehicleVariables*) veh->getCarFollowVariables(); if (vars->lastUpdateTime != MSNet::getInstance()->getCurrentTimeStep()) { vars->lastUpdateTime = MSNet::getInstance()->getCurrentTimeStep(); setControlMode = 1; diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.h 2018-11-21 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_ACC.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -80,6 +80,22 @@ */ double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const; + /** @brief Returns the a gap such that the gap mode acceleration of the follower is zero + * @param[in] speed EGO's speed + * @param[in] leaderSpeed LEADER's speed + * @param[in] leaderMaxDecel LEADER's max. deceleration rate + */ + double getSecureGap(const double speed, const double leaderSpeed, const double leaderMaxDecel) const; + + /** @brief Computes the vehicle's acceptable speed at insertion + * @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 + */ + double insertionFollowSpeed(const MSVehicle* const v, double speed, double gap2pred, double predSpeed, double predMaxDecel) const; + /** @brief Returns the maximum gap at which an interaction between both vehicles occurs * @@ -110,7 +126,7 @@ */ MSCFModel* duplicate(const MSVehicleType* vtype) const; - virtual MSCFModel::VehicleVariables* createVehicleVariables() const { + VehicleVariables* createVehicleVariables() const { ACCVehicleVariables* ret = new ACCVehicleVariables(); ret->ACC_ControlMode = 0; ret->lastUpdateTime = 0; diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_CACC.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_CACC.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_CACC.cpp 2018-11-21 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_CACC.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -87,12 +87,12 @@ const double vSafe = maximumSafeFollowSpeed(gap2pred, speed, predSpeed, predMaxDecel); if (vSafe + DEFAULT_EMERGENCY_OVERRIDE_THRESHOLD < vCACC) { if DEBUG_COND { - CACCVehicleVariables* vars = (CACCVehicleVariables*)veh->getCarFollowVariables(); + CACCVehicleVariables* vars = (CACCVehicleVariables*)veh->getCarFollowVariables(); std::cout << "\n"; - std::cout << "Apply Safe speed"<< "\n"; + std::cout << "Apply Safe speed" << "\n"; std::cout << SIMTIME << " veh=" << veh->getID() << " v=" << speed << " vL=" << predSpeed << " gap=" << gap2pred << " vCACC=" << vCACC << " vSafe=" << vSafe << " cm=" << vars->CACC_ControlMode << "\n"; } - return vSafe + DEFAULT_EMERGENCY_OVERRIDE_THRESHOLD; + return vSafe + DEFAULT_EMERGENCY_OVERRIDE_THRESHOLD; } return vCACC; } @@ -116,7 +116,7 @@ double MSCFModel_CACC::speedSpeedContol(const double speed, double vErr) const { // Speed control law - double sclAccel = mySpeedControlGain*vErr; + double sclAccel = mySpeedControlGain * vErr; double newSpeed = speed + ACCEL2SPEED(sclAccel); return newSpeed; } @@ -127,7 +127,7 @@ double newSpeed = 0.0; std::pair leaderInfo = veh->getLeader(100); - if (leaderInfo.first ) { + if (leaderInfo.first) { if (leaderInfo.first->getCarFollowModel().getModelID() != SUMO_TAG_CF_CACC) { //ACC control mode newSpeed = acc_CFM._v(veh, gap2pred, speed, predSpeed, desSpeed, true); @@ -143,35 +143,35 @@ if ((spacingErr > 0 && spacingErr < 0.2) && (vErr < 0.1)) { // gap mode //newSpeed = speed + 0.45 * spacingErr + 0.0125 *spacingErr1; - #if DEBUG_CACC == 1 +#if DEBUG_CACC == 1 if DEBUG_COND { - std::cout << " applying gap control" << std::endl; - } - #endif - newSpeed = speed + myGapControlGainGap * spacingErr + myGapControlGainGapDot *spacingErr1; - } else if (spacingErr < 0) { + std::cout << " applying gap control" << std::endl; + } +#endif + newSpeed = speed + myGapControlGainGap * spacingErr + myGapControlGainGapDot * spacingErr1; + } else if (spacingErr < 0) { // collision avoidance mode //newSpeed = speed + 0.45 * spacingErr + 0.05 *spacingErr1; - #if DEBUG_CACC == 1 - if DEBUG_COND { - std::cout << " applying collision avoidance" << std::endl; - } - #endif - newSpeed = speed + myCollisionAvoidanceGainGap * spacingErr + myCollisionAvoidanceGainGapDot *spacingErr1; - } else { - // gap closing mode - #if DEBUG_CACC == 1 +#if DEBUG_CACC == 1 if DEBUG_COND { - std::cout << " applying gap closing" << std::endl; - } - #endif - newSpeed = speed + myGapClosingControlGainGap * spacingErr + myGapClosingControlGainGapDot *spacingErr1; + std::cout << " applying collision avoidance" << std::endl; + } +#endif + newSpeed = speed + myCollisionAvoidanceGainGap * spacingErr + myCollisionAvoidanceGainGapDot * spacingErr1; + } else { + // gap closing mode +#if DEBUG_CACC == 1 + if DEBUG_COND { + std::cout << " applying gap closing" << std::endl; } +#endif + newSpeed = speed + myGapClosingControlGainGap * spacingErr + myGapClosingControlGainGapDot * spacingErr1; } + } - } else { /* no leader */ - newSpeed = speedSpeedContol(speed, vErr); - } +} else { /* no leader */ + newSpeed = speedSpeedContol(speed, vErr); + } return newSpeed; @@ -179,15 +179,15 @@ double MSCFModel_CACC::_v(const MSVehicle* const veh, const double gap2pred, const double speed, - const double predSpeed, const double desSpeed, const bool /* respectMinGap */) const { + const double predSpeed, const double desSpeed, const bool /* respectMinGap */) const { double newSpeed = 0.0; #if DEBUG_CACC == 1 if DEBUG_COND { std::cout << SIMTIME << " MSCFModel_CACC::_v() for veh '" << veh->getID() << "'\n" - << " gap=" << gap2pred << " speed=" << speed << " predSpeed=" << predSpeed - << " desSpeed=" << desSpeed << std::endl; + << " gap=" << gap2pred << " speed=" << speed << " predSpeed=" << predSpeed + << " desSpeed=" << desSpeed << std::endl; } #endif @@ -207,13 +207,13 @@ std::cout << " applying speedControl" << std::endl; } #endif - // Find acceleration - Speed control law - newSpeed = speedSpeedContol(speed, vErr); + // Find acceleration - Speed control law + newSpeed = speedSpeedContol(speed, vErr); // Set cl to vehicle parameters if (setControlMode) { vars->CACC_ControlMode = 0; } - } else if (time_gap < 1.5 ){ + } else if (time_gap < 1.5) { // Find acceleration - Gap control law newSpeed = speedGapControl(veh, gap2pred, speed, predSpeed, desSpeed, vErr); // Set cl to vehicle parameters @@ -230,7 +230,7 @@ std::cout << " applying speedControl" << std::endl; } #endif - newSpeed = speedSpeedContol(speed, vErr); + newSpeed = speedSpeedContol(speed, vErr); } else { newSpeed = speedGapControl(veh, gap2pred, speed, predSpeed, desSpeed, vErr); } @@ -238,8 +238,8 @@ #if DEBUG_CACC == 1 if DEBUG_COND { - std::cout << " result: accel=" < +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef sgn +#define sgn(x) ((x > 0) - (x < 0)) +#endif + +// =========================================================================== +// method definitions +// =========================================================================== +MSCFModel_CC::MSCFModel_CC(const MSVehicleType* vtype) : MSCFModel(vtype), + myCcDecel(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_CCDECEL, 1.5)), + myCcAccel(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_CCACCEL, 1.5)), + myConstantSpacing(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_CONSTSPACING, 5.0)), + myKp(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_KP, 1.0)), + myLambda(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_LAMBDA, 0.1)), + myC1(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_C1, 0.5)), + myXi(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_XI, 1.0)), + myOmegaN(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_OMEGAN, 0.2)), + myTau(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_TAU, 0.5)), + myLanesCount((int)vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_LANES_COUNT, -1)), + myPloegH(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_PLOEG_H, 0.5)), + myPloegKp(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_PLOEG_KP, 0.2)), + myPloegKd(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_PLOEG_KD, 0.7)), + myFlatbedKa(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_FLATBED_KA, 2.4)), + myFlatbedKv(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_FLATBED_KV, 0.6)), + myFlatbedKp(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_FLATBED_KP, 12.0)), + myFlatbedH(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_FLATBED_H, 4.0)), + myFlatbedD(vtype->getParameter().getCFParam(SUMO_ATTR_CF_CC_FLATBED_D, 5.0)) { + + //if the lanes count has not been specified in the attributes of the model, lane changing cannot properly work + if (myLanesCount == -1) { + std::cerr << "The number of lanes needs to be specified in the attributes of carFollowing-CC with the \"lanesCount\" attribute\n"; + WRITE_ERROR("The number of lanes needs to be specified in the attributes of carFollowing-CC with the \"lanesCount\" attribute"); + assert(false); + } + + //instantiate the driver model. For now, use Krauss as default, then needs to be parameterized + myHumanDriver = new MSCFModel_Krauss(vtype); + +} + +MSCFModel_CC::~MSCFModel_CC() {} + +MSCFModel::VehicleVariables* +MSCFModel_CC::createVehicleVariables() const { + CC_VehicleVariables* vars = new CC_VehicleVariables(); + vars->ccKp = myKp; + vars->accLambda = myLambda; + vars->caccSpacing = myConstantSpacing; + vars->caccC1 = myC1; + vars->caccXi = myXi; + vars->caccOmegaN = myOmegaN; + vars->engineTau = myTau; + //we cannot invoke recomputeParameters() because we have no pointer to the MSVehicle class + vars->caccAlpha1 = 1 - vars->caccC1; + vars->caccAlpha2 = vars->caccC1; + vars->caccAlpha3 = -(2 * vars->caccXi - vars->caccC1 * (vars->caccXi + sqrt(vars->caccXi * vars->caccXi - 1))) * vars->caccOmegaN; + vars->caccAlpha4 = -(vars->caccXi + sqrt(vars->caccXi * vars->caccXi - 1)) * vars->caccOmegaN * vars->caccC1; + vars->caccAlpha5 = -vars->caccOmegaN * vars->caccOmegaN; + + vars->ploegH = myPloegH; + vars->ploegKp = myPloegKp; + vars->ploegKd = myPloegKd; + vars->flatbedKa = myFlatbedKa; + vars->flatbedKv = myFlatbedKv; + vars->flatbedKp = myFlatbedKp; + vars->flatbedD = myFlatbedD; + vars->flatbedH = myFlatbedH; + //by default use a first order lag model for the engine + vars->engine = new FirstOrderLagModel(); + vars->engine->setParameter(FOLM_PAR_TAU, vars->engineTau); + vars->engine->setParameter(FOLM_PAR_DT, TS); + vars->engine->setMaximumAcceleration(myAccel); + vars->engine->setMaximumDeceleration(myDecel); + vars->engineModel = CC_ENGINE_MODEL_FOLM; + return (VehicleVariables*)vars; +} + +void +MSCFModel_CC::performAutoLaneChange(MSVehicle* const veh) const { + bool canChange; + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + // check for left lane change + std::pair state = libsumo::Vehicle::getLaneChangeState(veh->getID(), +1); + int traciState = state.first; + if (traciState & LCA_LEFT && traciState & LCA_SPEEDGAIN) { + // we can gain by moving left. check that all vehicles can move left + if (!(state.first & LCA_BLOCKED)) { + // leader is not blocked. check all the members + canChange = true; + for (auto m = vars->members.begin(); m != vars->members.end(); m++) { + const std::pair mState = libsumo::Vehicle::getLaneChangeState(m->second, +1); + if (mState.first & LCA_BLOCKED) { + canChange = false; + break; + } + } + if (canChange) { + libsumo::Vehicle::changeLane(veh->getID(), veh->getLaneIndex() + 1, 0); + for (auto m = vars->members.begin(); m != vars->members.end(); m++) { + libsumo::Vehicle::changeLane(m->second, veh->getLaneIndex() + 1, 0); + } + } + + } + } + state = libsumo::Vehicle::getLaneChangeState(veh->getID(), -1); + traciState = state.first; + if (traciState & LCA_RIGHT && traciState & LCA_KEEPRIGHT) { + // we should move back right. check that all vehicles can move right + if (!(state.first & LCA_BLOCKED)) { + // leader is not blocked. check all the members + canChange = true; + for (auto m = vars->members.begin(); m != vars->members.end(); m++) { + const std::pair mState = libsumo::Vehicle::getLaneChangeState(m->second, -1); + if (mState.first & LCA_BLOCKED) { + canChange = false; + break; + } + } + if (canChange) { + libsumo::Vehicle::changeLane(veh->getID(), veh->getLaneIndex() - 1, 1); + for (auto m = vars->members.begin(); m != vars->members.end(); m++) { + libsumo::Vehicle::changeLane(m->second, veh->getLaneIndex() - 1, 1); + } + } + + } + } + +} + +double +MSCFModel_CC::finalizeSpeed(MSVehicle* const veh, double vPos) const { + double vNext; + //acceleration computed by the controller + double controllerAcceleration; + //acceleration after engine actuation + double engineAcceleration; + + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + + //call processNextStop() to ensure vehicle removal in case of crash + veh->processNextStop(vPos); + + if (vars->activeController != Plexe::DRIVER) { + veh->setChosenSpeedFactor(vars->ccDesiredSpeed / veh->getLane()->getSpeedLimit()); + } + + if (vars->autoLaneChange) { + performAutoLaneChange(veh); + } + + if (vars->activeController != Plexe::DRIVER) { + controllerAcceleration = SPEED2ACCEL(vPos - veh->getSpeed()); + controllerAcceleration = std::min(vars->uMax, std::max(vars->uMin, controllerAcceleration)); + //compute the actual acceleration applied by the engine + engineAcceleration = vars->engine->getRealAcceleration(veh->getSpeed(), veh->getAcceleration(), controllerAcceleration, MSNet::getInstance()->getCurrentTimeStep()); + vNext = MAX2(double(0), veh->getSpeed() + ACCEL2SPEED(engineAcceleration)); + vars->controllerAcceleration = controllerAcceleration; + } else { + vNext = myHumanDriver->finalizeSpeed(veh, vPos); + } + + return vNext; +} + + +double +MSCFModel_CC::followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred) const { + + UNUSED_PARAMETER(pred); + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + + if (vars->activeController != Plexe::DRIVER) { + return _v(veh, gap2pred, speed, predSpeed); + } else { + return myHumanDriver->followSpeed(veh, speed, gap2pred, predSpeed, predMaxDecel); + } +} + +double +MSCFModel_CC::insertionFollowSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const { + UNUSED_PARAMETER(veh); + UNUSED_PARAMETER(gap2pred); + UNUSED_PARAMETER(predSpeed); + UNUSED_PARAMETER(predMaxDecel); + //by returning speed + 1, we tell sumo that "speed" is always a safe speed + return speed + 1; +} + +double +MSCFModel_CC::stopSpeed(const MSVehicle* const veh, double speed, double gap2pred) const { + + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + if (vars->activeController != Plexe::DRIVER) { + double gap2pred, relSpeed; + getRadarMeasurements(veh, gap2pred, relSpeed); + if (gap2pred == -1) { + gap2pred = std::numeric_limits().max(); + } + return _v(veh, gap2pred, speed, speed + relSpeed); + } else { + return myHumanDriver->stopSpeed(veh, speed, gap2pred); + } +} + +double MSCFModel_CC::freeSpeed(const MSVehicle* const veh, double speed, double seen, double maxSpeed, const bool onInsertion) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + if (vars->activeController != Plexe::DRIVER) { + double gap2pred, relSpeed; + getRadarMeasurements(veh, gap2pred, relSpeed); + if (gap2pred == -1) { + gap2pred = std::numeric_limits().max(); + } + return _v(veh, gap2pred, speed, speed + relSpeed); + } else { + return MSCFModel::freeSpeed(veh, speed, seen, maxSpeed, onInsertion); + } +} + +double +MSCFModel_CC::interactionGap(const MSVehicle* const veh, double vL) const { + + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + if (vars->activeController != Plexe::DRIVER) { + //maximum radar range is CC is enabled + return 250; + } else { + return myHumanDriver->interactionGap(veh, vL); + } + +} + +double +MSCFModel_CC::maxNextSpeed(double speed, const MSVehicle* const veh) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + if (vars->engineModel == CC_ENGINE_MODEL_FOLM) { + return speed + (double) ACCEL2SPEED(getMaxAccel()); + } else { + return speed + (double) ACCEL2SPEED(20); + } +} + +double +MSCFModel_CC::minNextSpeed(double speed, const MSVehicle* const veh) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + if (vars->engineModel == CC_ENGINE_MODEL_FOLM) { + return MSCFModel::minNextSpeed(speed, veh); + } else { + return MAX2((double)0, speed - (double) ACCEL2SPEED(20)); + } +} + +double +MSCFModel_CC::_v(const MSVehicle* const veh, double gap2pred, double egoSpeed, double predSpeed) const { + + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + + //acceleration computed by the controller + double controllerAcceleration = vars->fixedAcceleration; + //speed computed by the model + double speed; + //acceleration computed by the Cruise Control + double ccAcceleration; + //acceleration computed by the Adaptive Cruise Control + double accAcceleration; + //acceleration computed by the Cooperative Adaptive Cruise Control + double caccAcceleration; + //variables needed by CACC + double predAcceleration, leaderAcceleration, leaderSpeed; + //dummy variables used for auto feeding + Position pos; + double time; + const double currentTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep() + DELTA_T); + + if (vars->crashed || vars->crashedVictim) { + return 0; + } + if (vars->activeController == Plexe::DRIVER || !vars->useFixedAcceleration) { + switch (vars->activeController) { + case Plexe::ACC: + ccAcceleration = _cc(veh, egoSpeed, vars->ccDesiredSpeed); + accAcceleration = _acc(veh, egoSpeed, predSpeed, gap2pred, vars->accHeadwayTime); + if (gap2pred > 250 || ccAcceleration < accAcceleration) { + controllerAcceleration = ccAcceleration; + } else { + controllerAcceleration = accAcceleration; + } + break; + + case Plexe::CACC: + if (vars->autoFeed) { + getVehicleInformation(vars->leaderVehicle, vars->leaderSpeed, vars->leaderAcceleration, vars->leaderControllerAcceleration, pos, time); + getVehicleInformation(vars->frontVehicle, vars->frontSpeed, vars->frontAcceleration, vars->frontControllerAcceleration, pos, time); + } + + if (vars->useControllerAcceleration) { + predAcceleration = vars->frontControllerAcceleration; + leaderAcceleration = vars->leaderControllerAcceleration; + } else { + predAcceleration = vars->frontAcceleration; + leaderAcceleration = vars->leaderAcceleration; + } + //overwrite pred speed using data obtained through wireless communication + predSpeed = vars->frontSpeed; + leaderSpeed = vars->leaderSpeed; + if (vars->usePrediction) { + predSpeed += (currentTime - vars->frontDataReadTime) * vars->frontAcceleration; + leaderSpeed += (currentTime - vars->leaderDataReadTime) * vars->leaderAcceleration; + } + + if (vars->caccInitialized) { + controllerAcceleration = _cacc(veh, egoSpeed, predSpeed, predAcceleration, gap2pred, leaderSpeed, leaderAcceleration, vars->caccSpacing); + } else + //do not let CACC take decisions until at least one packet has been received + { + controllerAcceleration = 0; + } + + break; + + case Plexe::FAKED_CACC: + + if (vars->autoFeed) { + getVehicleInformation(vars->leaderVehicle, vars->fakeData.leaderSpeed, vars->fakeData.leaderAcceleration, vars->fakeData.leaderControllerAcceleration, pos, time); + getVehicleInformation(vars->frontVehicle, vars->fakeData.frontSpeed, vars->fakeData.frontAcceleration, vars->fakeData.frontControllerAcceleration, pos, time); + vars->fakeData.frontDistance = pos.distanceTo2D(veh->getPosition()); + } + + if (vars->useControllerAcceleration) { + predAcceleration = vars->fakeData.frontControllerAcceleration; + leaderAcceleration = vars->fakeData.leaderControllerAcceleration; + } else { + predAcceleration = vars->fakeData.frontAcceleration; + leaderAcceleration = vars->fakeData.leaderAcceleration; + } + ccAcceleration = _cc(veh, egoSpeed, vars->ccDesiredSpeed); + caccAcceleration = _cacc(veh, egoSpeed, vars->fakeData.frontSpeed, predAcceleration, vars->fakeData.frontDistance, vars->fakeData.leaderSpeed, leaderAcceleration, vars->caccSpacing); + //faked CACC can be used to get closer to a platoon for joining + //using the minimum acceleration ensures that we do not exceed + //the CC desired speed + controllerAcceleration = std::min(ccAcceleration, caccAcceleration); + + break; + + case Plexe::PLOEG: + + if (vars->autoFeed) { + getVehicleInformation(vars->frontVehicle, vars->frontSpeed, vars->frontAcceleration, vars->frontControllerAcceleration, pos, time); + } + + if (vars->useControllerAcceleration) { + predAcceleration = vars->frontControllerAcceleration; + } else { + predAcceleration = vars->frontAcceleration; + } + //check if we received at least one packet + if (vars->frontInitialized) + //ploeg's controller computes \dot{u}_i, so we need to sum such value to the previously computed u_i + { + controllerAcceleration = vars->controllerAcceleration + _ploeg(veh, egoSpeed, predSpeed, predAcceleration, gap2pred); + } else { + controllerAcceleration = 0; + } + + break; + + case Plexe::CONSENSUS: + controllerAcceleration = _consensus(veh, egoSpeed, veh->getPosition(), currentTime); + break; + + case Plexe::FLATBED: + + if (vars->autoFeed) { + getVehicleInformation(vars->leaderVehicle, vars->leaderSpeed, vars->leaderAcceleration, vars->leaderControllerAcceleration, pos, time); + getVehicleInformation(vars->frontVehicle, vars->frontSpeed, vars->frontAcceleration, vars->frontControllerAcceleration, pos, time); + } + + //overwrite pred speed using data obtained through wireless communication + predSpeed = vars->frontSpeed; + leaderSpeed = vars->leaderSpeed; + if (vars->usePrediction) { + predSpeed += (currentTime - vars->frontDataReadTime) * vars->frontAcceleration; + leaderSpeed += (currentTime - vars->leaderDataReadTime) * vars->leaderAcceleration; + } + + if (vars->caccInitialized) { + controllerAcceleration = _flatbed(veh, veh->getAcceleration(), egoSpeed, predSpeed, gap2pred, leaderSpeed); + } else + //do not let CACC take decisions until at least one packet has been received + { + controllerAcceleration = 0; + } + + break; + + case Plexe::DRIVER: + std::cerr << "Switching to normal driver behavior still not implemented in MSCFModel_CC\n"; + assert(false); + break; + + default: + std::cerr << "Invalid controller selected in MSCFModel_CC\n"; + assert(false); + break; + + } + + } + + speed = MAX2(double(0), egoSpeed + ACCEL2SPEED(controllerAcceleration)); + + return speed; +} + +double +MSCFModel_CC::_cc(const MSVehicle* veh, double egoSpeed, double desSpeed) const { + + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + //Eq. 5.5 of the Rajamani book, with Ki = 0 and bounds on max and min acceleration + return std::min(myCcAccel, std::max(-myCcDecel, -vars->ccKp * (egoSpeed - desSpeed))); + +} + +double +MSCFModel_CC::_acc(const MSVehicle* veh, double egoSpeed, double predSpeed, double gap2pred, double headwayTime) const { + + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + //Eq. 6.18 of the Rajamani book + return -1.0 / headwayTime * (egoSpeed - predSpeed + vars->accLambda * (-gap2pred + headwayTime * egoSpeed + 2)); + +} + +double +MSCFModel_CC::_cacc(const MSVehicle* veh, double egoSpeed, double predSpeed, double predAcceleration, double gap2pred, double leaderSpeed, double leaderAcceleration, double spacing) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + //compute epsilon, i.e., the desired distance error + double epsilon = -gap2pred + spacing; //NOTICE: error (if any) should already be included in gap2pred + //compute epsilon_dot, i.e., the desired speed error + double epsilon_dot = egoSpeed - predSpeed; + //Eq. 7.39 of the Rajamani book + return vars->caccAlpha1 * predAcceleration + vars->caccAlpha2 * leaderAcceleration + + vars->caccAlpha3 * epsilon_dot + vars->caccAlpha4 * (egoSpeed - leaderSpeed) + vars->caccAlpha5 * epsilon; +} + + +double +MSCFModel_CC::_ploeg(const MSVehicle* veh, double egoSpeed, double predSpeed, double predAcceleration, double gap2pred) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + return (1 / vars->ploegH * ( + -vars->controllerAcceleration + + vars->ploegKp * (gap2pred - (2 + vars->ploegH * egoSpeed)) + + vars->ploegKd * (predSpeed - egoSpeed - vars->ploegH * veh->getAcceleration()) + + predAcceleration + )) * TS ; +} + +double +MSCFModel_CC::d_i_j(const struct Plexe::VEHICLE_DATA* vehicles, const double h[MAX_N_CARS], int i, int j) const { + + int k, min_i, max_i; + double d = 0; + //compute indexes of the summation + if (j < i) { + min_i = j; + max_i = i - 1; + } else { + min_i = i; + max_i = j - 1; + } + //compute distance + for (k = min_i; k <= max_i; k++) { + d += h[k] * vehicles[0].speed + vehicles[k].length + 15; + } + + if (j < i) { + return d; + } else { + return -d; + } + +} + +double +MSCFModel_CC::_consensus(const MSVehicle* veh, double egoSpeed, Position egoPosition, double time) const { + //TODO: this controller, by using real GPS coordinates, does only work + //when vehicles are traveling west-to-east on a straight line, basically + //on the X axis. This needs to be fixed to consider direction as well + CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables(); + int index = vars->position; + int nCars = vars->nCars; + struct Plexe::VEHICLE_DATA* vehicles = vars->vehicles; + + //loop variable + int j; + //control input + double u_i = 0; + //actual distance term + double actualDistance = 0; + //desired distance term + double desiredDistance = 0; + //speed error term + double speedError = 0; + //degree of agent i + double d_i = 0; + + //compensate my position: compute prediction of what will be my position at time of actuation + Position egoVelocity = veh->getVelocityVector(); + egoPosition.set(egoPosition.x() + egoVelocity.x() * STEPS2TIME(DELTA_T), + egoPosition.y() + egoVelocity.y() * STEPS2TIME(DELTA_T)); + vehicles[index].speed = egoSpeed; + vehicles[index].positionX = egoPosition.x(); + vehicles[index].positionY = egoPosition.y(); + + //check that data from all vehicles have been received. the control + //law might actually need a subset of all the data, but d_i_j needs + //the lengths of all vehicles. uninitialized values might cause problems + if (vars->nInitialized != vars->nCars - 1) { + return 0; + } + + //compute speed error. + speedError = -vars->b[index] * (egoSpeed - vehicles[0].speed); + + //compute desired distance term + for (j = 0; j < nCars; j++) { + if (j == index) { + continue; + } + d_i += vars->L[index][j]; + desiredDistance -= vars->K[index][j] * vars->L[index][j] * d_i_j(vehicles, vars->h, index, j); + } + desiredDistance = desiredDistance / d_i; + + //compute actual distance term + for (j = 0; j < nCars; j++) { + if (j == index) { + continue; + } + //distance error for consensus with GPS equipped + Position otherPosition; + double dt = time - vehicles[j].time; + //predict the position of the other vehicle + otherPosition.setx(vehicles[j].positionX + dt * vehicles[j].speedX); + otherPosition.sety(vehicles[j].positionY + dt * vehicles[j].speedY); + double distance = egoPosition.distanceTo2D(otherPosition) * sgn(j - index); + actualDistance -= vars->K[index][j] * vars->L[index][j] * distance; + } + + actualDistance = actualDistance / (d_i); + + //original paper formula + u_i = (speedError + desiredDistance + actualDistance) / 1000; + + return u_i; +} + +double +MSCFModel_CC::_flatbed(const MSVehicle* veh, double egoAcceleration, double egoSpeed, double predSpeed, + double gap2pred, double leaderSpeed) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + return ( + -vars->flatbedKa * egoAcceleration + + vars->flatbedKv * (predSpeed - egoSpeed) + + vars->flatbedKp * (gap2pred - vars->flatbedD - vars->flatbedH * (egoSpeed - leaderSpeed)) + ); +} + +double +MSCFModel_CC::getCACCConstantSpacing(const MSVehicle* veh) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + return vars->caccSpacing; +} + +void +MSCFModel_CC::getVehicleInformation(const MSVehicle* veh, double& speed, double& acceleration, double& controllerAcceleration, Position& position, double& time) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + speed = veh->getSpeed(); + acceleration = veh->getAcceleration(); + controllerAcceleration = vars->controllerAcceleration; + position = veh->getPosition(); + time = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); +} + +void MSCFModel_CC::setParameter(MSVehicle* veh, const std::string& key, const std::string& value) const { + // vehicle variables used to set the parameter + CC_VehicleVariables* vars; + + ParBuffer buf(value); + + vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + try { + if (key.compare(PAR_LEADER_SPEED_AND_ACCELERATION) == 0) { + double x, y, vx, vy; + buf >> vars->leaderSpeed >> vars->leaderAcceleration >> x >> y >> vars->leaderDataReadTime + >> vars->leaderControllerAcceleration >> vx >> vy >> vars->leaderAngle; + vars->leaderPosition = Position(x, y); + vars->leaderVelocity = Position(vx, vy); + vars->leaderInitialized = true; + if (vars->frontInitialized) { + vars->caccInitialized = true; + } + return; + } + if (key.compare(PAR_PRECEDING_SPEED_AND_ACCELERATION) == 0) { + double x, y, vx, vy; + buf >> vars->frontSpeed >> vars->frontAcceleration >> x >> y >> vars->frontDataReadTime + >> vars->frontControllerAcceleration >> vx >> vy >> vars->frontAngle; + vars->frontPosition = Position(x, y); + vars->frontVelocity = Position(vx, vy); + vars->frontInitialized = true; + if (vars->leaderInitialized) { + vars->caccInitialized = true; + } + return; + } + if (key.compare(CC_PAR_VEHICLE_DATA) == 0) { + struct Plexe::VEHICLE_DATA vehicle; + buf >> vehicle.index >> vehicle.speed >> vehicle.acceleration >> + vehicle.positionX >> vehicle.positionY >> vehicle.time >> + vehicle.length >> vehicle.u >> vehicle.speedX >> + vehicle.speedY >> vehicle.angle; + //if the index is larger than the number of cars, simply ignore the data + if (vehicle.index >= vars->nCars || vehicle.index == -1) { + return; + } + vars->vehicles[vehicle.index] = vehicle; + if (!vars->initialized[vehicle.index] && vehicle.index != vars->position) { + vars->nInitialized++; + } + vars->initialized[vehicle.index] = true; + return; + } + if (key.compare(PAR_LEADER_FAKE_DATA) == 0) { + buf >> vars->fakeData.leaderSpeed >> vars->fakeData.leaderAcceleration + >> vars->fakeData.leaderControllerAcceleration; + if (buf.last_empty()) { + vars->useControllerAcceleration = false; + } + return; + } + if (key.compare(PAR_FRONT_FAKE_DATA) == 0) { + buf >> vars->fakeData.frontSpeed >> vars->fakeData.frontAcceleration >> vars->fakeData.frontDistance + >> vars->fakeData.frontControllerAcceleration; + if (buf.last_empty()) { + vars->useControllerAcceleration = false; + } + return; + } + if (key.compare(CC_PAR_VEHICLE_POSITION) == 0) { + vars->position = StringUtils::toInt(value.c_str()); + return; + } + if (key.compare(CC_PAR_PLATOON_SIZE) == 0) { + vars->nCars = StringUtils::toInt(value.c_str()); + // given that we have a static matrix, check that we're not + // setting a number of cars larger than the size of that matrix + if (vars->nCars > MAX_N_CARS) { + vars->nCars = MAX_N_CARS; + std::stringstream warn; + warn << "MSCFModel_CC: setting a number of cars of " << vars->nCars << " out of a maximum of " << MAX_N_CARS << + ". The CONSENSUS controller will not work properly if chosen. If you are using a different controller " << + "you can ignore this warning"; + WRITE_WARNING(warn.str()); + } + return; + } + if (key.compare(PAR_ADD_MEMBER) == 0) { + std::string id; + int position; + buf >> id >> position; + vars->members[position] = id; + return; + } + if (key.compare(PAR_REMOVE_MEMBER) == 0) { + for (auto item = vars->members.begin(); item != vars->members.end(); item++) + if (item->second.compare(value) == 0) { + vars->members.erase(item); + break; + } + return; + } + if (key.compare(PAR_ENABLE_AUTO_LANE_CHANGE) == 0) { + vars->autoLaneChange = StringUtils::toInt(value.c_str()) == 1; + return; + } + if (key.compare(CC_PAR_CACC_XI) == 0) { + vars->caccXi = StringUtils::toDouble(value.c_str()); + recomputeParameters(veh); + return; + } + if (key.compare(CC_PAR_CACC_OMEGA_N) == 0) { + vars->caccOmegaN = StringUtils::toDouble(value.c_str()); + recomputeParameters(veh); + return; + } + if (key.compare(CC_PAR_CACC_C1) == 0) { + vars->caccC1 = StringUtils::toDouble(value.c_str()); + recomputeParameters(veh); + return; + } + if (key.compare(CC_PAR_ENGINE_TAU) == 0) { + vars->engineTau = StringUtils::toDouble(value.c_str()); + vars->engine->setParameter(FOLM_PAR_TAU, vars->engineTau); + recomputeParameters(veh); + vars->engine->setParameter(FOLM_PAR_TAU, vars->engineTau); + } + if (key.compare(CC_PAR_UMIN) == 0) { + vars->uMin = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_UMAX) == 0) { + vars->uMax = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_PLOEG_H) == 0) { + vars->ploegH = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_PLOEG_KP) == 0) { + vars->ploegKp = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_PLOEG_KD) == 0) { + vars->ploegKd = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_FLATBED_KA) == 0) { + vars->flatbedKa = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_FLATBED_KV) == 0) { + vars->flatbedKv = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_FLATBED_KP) == 0) { + vars->flatbedKp = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_FLATBED_H) == 0) { + vars->flatbedH = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_FLATBED_D) == 0) { + vars->flatbedD = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(CC_PAR_VEHICLE_ENGINE_MODEL) == 0) { + if (vars->engine) { + delete vars->engine; + } + int engineModel = StringUtils::toInt(value.c_str());; + switch (engineModel) { + case CC_ENGINE_MODEL_REALISTIC: { + vars->engine = new RealisticEngineModel(); + vars->engine->setParameter(ENGINE_PAR_DT, TS); + veh->getInfluencer().setSpeedMode(0); + vars->engineModel = CC_ENGINE_MODEL_REALISTIC; + break; + } + case CC_ENGINE_MODEL_FOLM: + default: { + vars->engine = new FirstOrderLagModel(); + vars->engine->setParameter(FOLM_PAR_DT, TS); + vars->engine->setParameter(FOLM_PAR_TAU, vars->engineTau); + vars->engineModel = CC_ENGINE_MODEL_FOLM; + break; + } + } + vars->engine->setMaximumAcceleration(myAccel); + vars->engine->setMaximumDeceleration(myDecel); + return; + } + if (key.compare(CC_PAR_VEHICLE_MODEL) == 0) { + vars->engine->setParameter(ENGINE_PAR_VEHICLE, value); + return; + } + if (key.compare(CC_PAR_VEHICLES_FILE) == 0) { + vars->engine->setParameter(ENGINE_PAR_XMLFILE, value); + return; + } + if (key.compare(PAR_CACC_SPACING) == 0) { + vars->caccSpacing = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(PAR_FIXED_ACCELERATION) == 0) { + buf >> vars->useFixedAcceleration >> vars->fixedAcceleration; + return; + } + if (key.compare(PAR_CC_DESIRED_SPEED) == 0) { + vars->ccDesiredSpeed = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(PAR_ACTIVE_CONTROLLER) == 0) { + vars->activeController = (enum Plexe::ACTIVE_CONTROLLER) StringUtils::toInt(value.c_str()); + return; + } + if (key.compare(PAR_ACC_HEADWAY_TIME) == 0) { + vars->accHeadwayTime = StringUtils::toDouble(value.c_str()); + return; + } + if (key.compare(PAR_USE_CONTROLLER_ACCELERATION) == 0) { + vars->useControllerAcceleration = StringUtils::toInt(value.c_str()) != 0; + return; + } + if (key.compare(PAR_USE_AUTO_FEEDING) == 0) { + int af; + std::string leaderId, frontId; + buf >> af; + vars->autoFeed = af == 1; + if (vars->autoFeed) { + vars->usePrediction = false; + buf >> leaderId; + if (buf.last_empty()) { + throw InvalidArgument("Trying to enable auto feeding without providing leader vehicle id"); + } + vars->leaderVehicle = dynamic_cast(MSNet::getInstance()->getVehicleControl().getVehicle(leaderId)); + if (vars->leaderVehicle == 0) { + throw libsumo::TraCIException("Vehicle '" + leaderId + "' is not known"); + } + buf >> frontId; + if (buf.last_empty()) { + throw InvalidArgument("Trying to enable auto feeding without providing front vehicle id"); + } + vars->frontVehicle = dynamic_cast(MSNet::getInstance()->getVehicleControl().getVehicle(frontId)); + if (vars->frontVehicle == 0) { + throw libsumo::TraCIException("Vehicle '" + frontId + "' is not known"); + } + vars->leaderInitialized = true; + vars->frontInitialized = true; + vars->caccInitialized = true; + } + return; + } + if (key.compare(PAR_USE_PREDICTION) == 0) { + vars->usePrediction = StringUtils::toInt(value.c_str()) == 1; + return; + } + } catch (NumberFormatException&) { + throw InvalidArgument("Invalid value '" + value + "' for parameter '" + key + "' for vehicle '" + veh->getID() + "'"); + } + +} + +std::string MSCFModel_CC::getParameter(const MSVehicle* veh, const std::string& key) const { + // vehicle variables used to set the parameter + CC_VehicleVariables* vars; + ParBuffer buf; + + vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + if (key.compare(PAR_SPEED_AND_ACCELERATION) == 0) { + Position velocity = veh->getVelocityVector(); + buf << veh->getSpeed() << veh->getAcceleration() << + vars->controllerAcceleration << veh->getPosition().x() << + veh->getPosition().y() << + STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) << + velocity.x() << velocity.y() << veh->getAngle(); + return buf.str(); + } + if (key.compare(PAR_CRASHED) == 0) { + return vars->crashed ? "1" : "0"; + } + if (key.compare(PAR_RADAR_DATA) == 0) { + double distance, relSpeed; + getRadarMeasurements(veh, distance, relSpeed); + buf << distance << relSpeed; + return buf.str(); + } + if (key.compare(PAR_LANES_COUNT) == 0) { + buf << veh->getLane()->getEdge().getLanes().size(); + return buf.str(); + } + if (key.compare(PAR_DISTANCE_TO_END) == 0) { + //route of the vehicle + const MSRoute* route; + //edge the vehicle is currently traveling on + const MSEdge* currentEdge; + //last edge of the route of this vehicle + const MSEdge* lastEdge; + //current position of the vehicle on the edge its traveling in + double positionOnEdge; + //distance to trip end using + double distanceToEnd; + + route = &veh->getRoute(); + currentEdge = veh->getEdge(); + lastEdge = route->getEdges().back(); + positionOnEdge = veh->getPositionOnLane(); + distanceToEnd = route->getDistanceBetween(positionOnEdge, lastEdge->getLanes()[0]->getLength(), currentEdge, lastEdge); + + buf << distanceToEnd; + return buf.str(); + } + if (key.compare(PAR_DISTANCE_FROM_BEGIN) == 0) { + //route of the vehicle + const MSRoute* route; + //edge the vehicle is currently traveling on + const MSEdge* currentEdge; + //last edge of the route of this vehicle + const MSEdge* firstEdge; + //current position of the vehicle on the edge its traveling in + double positionOnEdge; + //distance to trip end using + double distanceFromBegin; + + route = &veh->getRoute(); + currentEdge = veh->getEdge(); + firstEdge = route->getEdges().front(); + positionOnEdge = veh->getPositionOnLane(); + distanceFromBegin = route->getDistanceBetween(0, positionOnEdge, firstEdge, currentEdge); + + buf << distanceFromBegin; + return buf.str(); + } + if (key.compare(PAR_CC_DESIRED_SPEED) == 0) { + buf << (double)vars->ccDesiredSpeed; + return buf.str(); + } + if (key.compare(PAR_ACTIVE_CONTROLLER) == 0) { + buf << (int)vars->activeController; + return buf.str(); + } + if (key.compare(PAR_ACC_HEADWAY_TIME) == 0) { + buf << (double)vars->accHeadwayTime; + return buf.str(); + } + if (key.compare(PAR_ACC_ACCELERATION) == 0) { + buf << getACCAcceleration(veh); + return buf.str(); + } + if (key.compare(PAR_CACC_SPACING) == 0) { + buf << vars->caccSpacing; + return buf.str(); + } + if (key.find(CC_PAR_VEHICLE_DATA) == 0) { + ParBuffer inBuf(key); + int index; + inBuf >> index; + struct Plexe::VEHICLE_DATA vehicle; + if (index >= vars->nCars || index < 0) { + vehicle.index = -1; + } else { + vehicle = vars->vehicles[index]; + } + buf << vehicle.index << vehicle.speed << vehicle.acceleration << + vehicle.positionX << vehicle.positionY << vehicle.time << + vehicle.length << vehicle.u << vehicle.speedX << + vehicle.speedY << vehicle.angle; + return buf.str(); + } + if (key.compare(PAR_ENGINE_DATA) == 0) { + int gear; + double rpm; + RealisticEngineModel* engine = dynamic_cast(vars->engine); + if (engine) { + engine->getEngineData(veh->getSpeed(), gear, rpm); + } else { + gear = -1; + rpm = 0; + } + buf << (gear + 1) << rpm; + return buf.str(); + } + return ""; +} + +void MSCFModel_CC::recomputeParameters(const MSVehicle* veh) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + vars->caccAlpha1 = 1 - vars->caccC1; + vars->caccAlpha2 = vars->caccC1; + vars->caccAlpha3 = -(2 * vars->caccXi - vars->caccC1 * (vars->caccXi + sqrt(vars->caccXi * vars->caccXi - 1))) * vars->caccOmegaN; + vars->caccAlpha4 = -(vars->caccXi + sqrt(vars->caccXi * vars->caccXi - 1)) * vars->caccOmegaN * vars->caccC1; + vars->caccAlpha5 = -vars->caccOmegaN * vars->caccOmegaN; +} + +void MSCFModel_CC::resetConsensus(const MSVehicle* veh) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + for (int i = 0; i < MAX_N_CARS; i++) { + vars->initialized[i] = false; + vars->nInitialized = 0; + } +} + +void MSCFModel_CC::switchOnACC(const MSVehicle* veh, double ccDesiredSpeed) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + vars->ccDesiredSpeed = ccDesiredSpeed; + vars->activeController = Plexe::ACC; +} + +enum Plexe::ACTIVE_CONTROLLER MSCFModel_CC::getActiveController(const MSVehicle* veh) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + return vars->activeController; +} + +void MSCFModel_CC::getRadarMeasurements(const MSVehicle* veh, double& distance, double& relativeSpeed) const { + std::pair l = libsumo::Vehicle::getLeader(veh->getID(), 250); + if (l.second < 0) { + distance = -1; + relativeSpeed = 0; + } else { + distance = l.second; + SUMOVehicle* leader = MSNet::getInstance()->getVehicleControl().getVehicle(l.first); + relativeSpeed = leader->getSpeed() - veh->getSpeed(); + } +} + +void MSCFModel_CC::setCrashed(const MSVehicle* veh, bool crashed, bool victim) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + if (victim) { + vars->crashedVictim = crashed; + } else { + vars->crashed = crashed; + } +} + +double MSCFModel_CC::getACCAcceleration(const MSVehicle* veh) const { + CC_VehicleVariables* vars = (CC_VehicleVariables*) veh->getCarFollowVariables(); + double distance, relSpeed; + getRadarMeasurements(veh, distance, relSpeed); + if (distance < 0) { + return 0; + } else { + return _acc(veh, veh->getSpeed(), relSpeed + veh->getSpeed(), distance, vars->accHeadwayTime); + } +} + +int MSCFModel_CC::getMyLanesCount() const { + return myLanesCount; +} + +MSCFModel* +MSCFModel_CC::duplicate(const MSVehicleType* vtype) const { + return new MSCFModel_CC(vtype); +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_CC.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_CC.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_CC.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_CC.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,413 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSCFModel_CC.h +/// @author Michele Segata +/// @date Wed, 18 Apr 2012 +/// @version $Id$ +/// +// A series of automatic Cruise Controllers (CC, ACC, CACC) +/****************************************************************************/ +#ifndef MSCFMODEL_CC_H +#define MSCFMODEL_CC_H + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "CC_Const.h" +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "CC_VehicleVariables.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** @class MSCFModel_CC + * @brief A set of automatic Cruise Controllers, including classic Cruise + * Control (CC), Adaptive Cruise Control (ACC) and Cooperative Adaptive Cruise + * Control (CACC). Take as references the chapters 5, 6 and 7 of the Rajamani's + * book "Vehicle dynamics and control" (2011). + * This model is meant to be used for simulation of platooning systems in mixed + * scenarios, so with automatic and driver controlled vehicles. + * The platooning manager is a distributed application implemented for veins + * (so for omnet++) supported by a 802.11p based communication protocol, which + * will determine the actions to be performed (such as switching on the + * automatic controller, or the lane to move to) and communicate them to this + * car following models via TraCI + * @see MSCFModel + */ +class MSCFModel_CC : public MSCFModel { +public: + + /** @brief Constructor + * @param[in] accel The maximum acceleration that controllers can output (def. 1.5 m/s^2) + * @param[in] decel The maximum deceleration that ACC and CACC controllers can output (def. 6 m/s^2) + * @param[in] ccDecel The maximum deceleration that the CC can output (def. 1.5 m/s^2) + * @param[in] headwayTime the headway gap for ACC (be aware of instabilities) (def. 1.5 s) + * @param[in] constantSpacing the constant gap for CACC (def. 5 m) + * @param[in] kp design constant for CC (def. 1) + * @param[in] lambda design constant for ACC (def. 0.1) + * @param[in] c1 design constant for CACC (def. 0.5) + * @param[in] xi design constant for CACC (def. 1) + * @param[in] omegaN design constant for CACC (def. 0.2) + * @param[in] tau engine time constant used for actuation lag (def. 0.5 s) + * @param[in] lanesCount number of lanes of the highway + * @param[in] ccAccel the maximum acceleration the CC can apply + */ + MSCFModel_CC(const MSVehicleType* vtype); + + /// @brief Destructor + ~MSCFModel_CC(); + + + /// @name Implementations of the MSCFModel interface + /// @{ + + /** @brief Applies interaction with stops and lane changing model influences + * @param[in] veh The ego vehicle + * @param[in] vPos The possible velocity + * @return The velocity after applying interactions with stops and lane change model influences + */ + virtual double finalizeSpeed(MSVehicle* const veh, double vPos) const; + + + /** @brief Computes the vehicle's safe speed (no dawdling) + * @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 + */ + double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const; + + /** @brief Overload base MSCFModel::insertionFollowSpeed method to inject + * automated vehicles as soon as they are requested, without checking + * for safe speed constraints + * + */ + virtual double insertionFollowSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double 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 + */ + double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const; + + /** @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. 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 double freeSpeed(const MSVehicle* const veh, double speed, double seen, + double maxSpeed, const bool onInsertion = false) const; + + virtual double maxNextSpeed(double speed, const MSVehicle* const veh) const; + + virtual double minNextSpeed(double speed, const MSVehicle* const veh = 0) const; + + + /** @brief Returns the maximum gap at which an interaction between both vehicles occurs + * + * "interaction" means that the LEADER influences EGO's speed. + * @param[in] veh The EGO vehicle + * @param[in] vL LEADER's speed + * @return The interaction gap + * @todo evaluate signature + * @see MSCFModel::interactionGap + */ + double interactionGap(const MSVehicle* const, double vL) const; + + + /** @brief Returns the model's name + * @return The model's name + * @see MSCFModel::getModelName + */ + int getModelID() const { + return SUMO_TAG_CF_CC; + } + /// @} + + + + /** @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; + + VehicleVariables* createVehicleVariables() const; + + /** + * @brief returns CACC desired constant spacing + * + * @param[in] veh the vehicle to get constant spacing of + * @return spacing the spacing in meters + */ + double getCACCConstantSpacing(const MSVehicle* veh) const; + + /** + * @brief set the information about a generic car. This method should be invoked + * by TraCI when a wireless message with such data is received. For testing, it might + * be also invoked from SUMO source code + * + * @param[in] veh the vehicle for which the data must be saved + * @param[in] speed the leader speed + * @param[in] acceleration the leader acceleration + * @param[in] position the position of the leader + * @param[in] time the time at which this data was read from leader's sensors + */ +// void setVehicleInformation(const MSVehicle* veh, double speed, double acceleration, Position position, double time) const; + + /** + * @brief try to get the given parameter for this carFollowingModel + * + * @param[in] veh the vehicle from which the parameter must be retrieved + * @param[in] key the key of the parameter + * @return the value of the requested parameter + */ + virtual std::string getParameter(const MSVehicle* veh, const std::string& key) const; + + /** + * @brief try to set the given parameter for this carFollowingModel + * + * @param[in] veh the vehicle for which the parameter must be set + * @param[in] key the key of the parameter + * @param[in] value the value to be set for the given parameter + */ + virtual void setParameter(MSVehicle* veh, const std::string& key, const std::string& value) const; + + /** + * @brief get the information about a vehicle. This can be used by TraCI in order to + * get speed and acceleration of the platoon leader before sending them to other + * vehicles + * + * @param[in] veh the vehicle for which the data is requested + * @param[out] speed where the speed is written + * @param[out] acceleration where the acceleration is written + * @param[out] controllerAcceleration the last acceleration value computed by + * the controller will be written in this variable. This might be different from + * acceleration because of actuation lag + */ + void getVehicleInformation(const MSVehicle* veh, double& speed, double& acceleration, double& controllerAcceleration, Position& position, double& time) const; + + /** + * @brief switch on the ACC, so disabling the human driver car control + * + * @param[in] veh the vehicle for which the ACC must be switched on + * @param[in] ccDesiredSpeed the cruise control speed + */ + void switchOnACC(const MSVehicle* veh, double ccDesiredSpeed) const; + + /** + * @brief return the currently active controller + * + * @param[in] veh the vehicle for which the action is requested + * @return the currently active controller + */ + enum Plexe::ACTIVE_CONTROLLER getActiveController(const MSVehicle* veh) const; + + /** + * @brief return the data that is currently being measured by the radar + */ + void getRadarMeasurements(const MSVehicle* veh, double& distance, double& relativeSpeed) const; + + /** + * @brief tells the module that in the last timestep the car has crashed (or not) + * + * @param[in] veh the vehicle + * @param[in] crashed whether the car has crashed or not + * @param[in] victim whether the car was the victim or not + */ + void setCrashed(const MSVehicle* veh, bool crashed, bool victim = false) const; + + /** + * @brief returns the ACC computed acceleration when the faked + * CACC is controlling the car. This can be used to check for + * vehicles in front + */ + double getACCAcceleration(const MSVehicle* veh) const; + + /** + * @brief returns the number of lanes set in the configuration file + */ + int getMyLanesCount() const; + +private: + + /** + * @brief Recomputes controller related parameters after setting them + */ + void recomputeParameters(const MSVehicle* veh) const; + + /** + * @brief Resets the consensus controller. In particular, sets the + * "initialized" vector all to false. This might be useful when changing + * topology. + */ + void resetConsensus(const MSVehicle* veh) const; + +private: + void performAutoLaneChange(MSVehicle* const veh) const; + + double _v(const MSVehicle* const veh, double gap2pred, double egoSpeed, double predSpeed) const; + + /** @brief controller for the CC which computes the acceleration to be applied. the value needs to be passed to the actuator + * + * @param[in] egoSpeed vehicle current speed + * @param[in] desSpeed vehicle desired speed + * @return the acceleration to be given to the actuator + */ + double _cc(const MSVehicle* veh, double egoSpeed, double desSpeed) const; + + /** @brief controller for the ACC which computes the acceleration to be applied. the value needs to be passed to the actuator + * + * @param[in] egoSpeed vehicle current speed + * @param[in] desSpeed vehicle desired speed + * @param[in] gap2pred the distance to preceding vehicle + * @param[in] headwayTime the headway time ACC should maintain + * @return the acceleration to be given to the actuator + */ + double _acc(const MSVehicle* veh, double egoSpeed, double predSpeed, double gap2pred, double headwayTime) const; + + /** @brief controller for the CACC which computes the acceleration to be applied. the value needs to be passed to the actuator + * + * @param[in] egoSpeed vehicle current speed + * @param[in] desSpeed vehicle desired speed + * @param[in] predAcceleration acceleration of preceding vehicle + * @param[in] gap2pred the distance to preceding vehicle + * @param[in] leaderSpeed the speed of the platoon leader + * @param[in] leaderAcceleration the acceleration of the platoon leader + * @param[in] spacing the spacing to be kept + * @return the acceleration to be given to the actuator + */ + double _cacc(const MSVehicle* veh, double egoSpeed, double predSpeed, double predAcceleration, double gap2pred, double leaderSpeed, double leaderAcceleration, double spacing) const; + + /** @brief controller for the Ploeg's CACC which computes the control input variation. + * Opposed to other controllers, this method returns a value which needs to be summed + * to the previous desired acceleration. + * + * @param[in] egoSpeed vehicle current speed + * @param[in] predSpeed the speed of the front vehicle + * @param[in] predAcceleration acceleration of preceding vehicle + * @param[in] gap2pred the distance to preceding vehicle + * @return the variation of desired acceleration + */ + double _ploeg(const MSVehicle* veh, double egoSpeed, double predSpeed, double predAcceleration, double gap2pred) const; + + /** @brief controller based on consensus strategy + * + * @param[in] egoSpeed vehicle current speed + * @param[in] egoPosition vehicle current position + * @param[in] time current time + * @return the acceleration to be given to the actuator + */ + double _consensus(const MSVehicle* veh, double egoSpeed, Position egoPosition, double time) const; + + /** @brief computes the desired distance between vehicle i and vehicle j + * + * @param[in] vehicles data about all vehicles + * @param[in] h vector of times headway + * @param[in] i index of own vehicle + * @param[in] j index of vehicle to compute distance from + * @return the desired distance between vehicle i and j + * + */ + double d_i_j(const struct Plexe::VEHICLE_DATA* vehicles, const double h[MAX_N_CARS], int i, int j) const; + + /** @brief flatbed platoon towing model + * + * @param[in] egoAcceleration vehicle current acceleration + * @param[in] egoSpeed vehicle current speed + * @param[in] predSpeed front vehicle speed + * @param[in] gap2pred distance to front vehicle + * @param[in] leaderSpeed speed of leading vehicle + */ + double _flatbed(const MSVehicle* veh, double egoAcceleration, double egoSpeed, double predSpeed, + double gap2pred, double leaderSpeed) const; + + +private: + + /// @brief the car following model which drives the car when automated cruising is disabled, i.e., the human driver + MSCFModel* myHumanDriver; + + /// @brief The maximum deceleration that the CC can output + const double myCcDecel; + + /// @brief The maximum acceleration that the CC can output + const double myCcAccel; + + /// @brief the constant gap for CACC + const double myConstantSpacing; + + /// @brief design constant for CC + const double myKp; + + /// @brief design constant for ACC + const double myLambda; + + /// @brief design constant for CACC + const double myC1; + + /// @brief design constant for CACC + const double myXi; + + /// @brief design constant for CACC + const double myOmegaN; + + /// @brief engine time constant used for actuation lag + const double myTau; + + /// @brief number of lanes in the highway, in the absence of on-/off-ramps. This is used + /// to move to the correct lane even when a lane is added for on-/off-ramps + const int myLanesCount; + + /// @brief Ploeg's CACC parameters + const double myPloegH; + const double myPloegKp; + const double myPloegKd; + + /// @brief flatbed CACC parameters + const double myFlatbedKa; + const double myFlatbedKv; + const double myFlatbedKp; + const double myFlatbedH; + const double myFlatbedD; + +private: + /// @brief Invalidated assignment operator. + MSCFModel_CC& operator=(const MSCFModel_CC&) = delete; +}; + +#endif /* MSCFMODEL_CC_H */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel.cpp 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -190,7 +190,7 @@ } #endif - vMax = MAX2(vMin, vMax); +vMax = MAX2(vMin, vMax); // apply further speed adaptations double vNext = patchSpeedBeforeLC(veh, vMin, vMax); #ifdef DEBUG_FINALIZE_SPEED @@ -206,14 +206,14 @@ #ifdef DEBUG_FINALIZE_SPEED if DEBUG_COND { std::cout << std::setprecision(gPrecision) - << "veh '" << veh->getID() << "' oldV=" << oldV - << " vPos" << vPos - << " vMin=" << vMin - << " vMax=" << vMax - << " vStop=" << vStop - << " vDawdle=" << vDawdle - << " vNext=" << vNext - << "\n"; + << "veh '" << veh->getID() << "' oldV=" << oldV + << " vPos" << vPos + << " vMin=" << vMin + << " vMax=" << vMax + << " vStop=" << vStop + << " vDawdle=" << vDawdle + << " vNext=" << vNext + << "\n"; } #endif return vNext; @@ -457,10 +457,10 @@ double -MSCFModel::avoidArrivalAccel(double dist, double time, double speed) { +MSCFModel::avoidArrivalAccel(double dist, double time, double speed, double maxDecel) { assert(time > 0 || dist == 0); if (dist <= 0) { - return -std::numeric_limits::max(); + return -maxDecel; } else if (time * speed > 2 * dist) { // stop before dist is necessary. We need // d = v*v/(2*a) @@ -699,8 +699,8 @@ double MSCFModel::estimateSpeedAfterDistance(const double dist, const double v, const double accel) const { // dist=v*t + 0.5*accel*t^2, solve for t and use v1 = v + accel*t - return MAX2(0., MIN2(myType->getMaxSpeed(), - (double)sqrt(2 * dist * accel + v * v))); + return MIN2(myType->getMaxSpeed(), + (double)sqrt(MAX2(0., 2 * dist * accel + v * v))); } @@ -812,14 +812,14 @@ // such that starting to break after accelerating with a for the time tau=headway // still allows us to stop in time. - const double tau = headway; + const double tau = headway == 0 ? TS : headway; const double v0 = MAX2(0., v); // We first consider the case that a stop has to take place within time tau if (v0 * tau >= 2 * g) { if (g == 0.) { if (v0 > 0.) { // indicate to brake as hard as possible - return -std::numeric_limits::max(); + return -ACCEL2SPEED(myEmergencyDecel); } else { // stay stopped return 0.; @@ -961,7 +961,7 @@ // Case 2) applies assert(gap < 0 || predSpeed < egoSpeed); if (gap <= 0.) { - return - std::numeric_limits::max(); + return -ACCEL2SPEED(myEmergencyDecel); } // Required deceleration according to case 2) const double b2 = 0.5 * (egoSpeed * egoSpeed - predSpeed * predSpeed) / gap; @@ -991,15 +991,15 @@ if (!veh->getDriverState()->debugLocked()) { veh->getDriverState()->lockDebug(); std::cout << SIMTIME << " veh '" << veh->getID() << "' -> MSCFModel_Krauss::applyHeadwayAndSpeedDifferencePerceptionErrors()\n" - << " speed=" << speed << " gap=" << gap << " leaderSpeed=" << predSpeed - << "\n perceivedGap=" << perceivedGap << " perceivedLeaderSpeed=" << speed + perceivedSpeedDifference - << " perceivedSpeedDifference=" << perceivedSpeedDifference - << std::endl; + << " speed=" << speed << " gap=" << gap << " leaderSpeed=" << predSpeed + << "\n perceivedGap=" << perceivedGap << " perceivedLeaderSpeed=" << speed + perceivedSpeedDifference + << " perceivedSpeedDifference=" << perceivedSpeedDifference + << std::endl; const double exactFollowSpeed = followSpeed(veh, speed, gap, predSpeed, predMaxDecel); const double errorFollowSpeed = followSpeed(veh, speed, perceivedGap, speed + perceivedSpeedDifference, predMaxDecel); const double accelError = SPEED2ACCEL(errorFollowSpeed - exactFollowSpeed); std::cout << " gapError=" << perceivedGap - gap << " dvError=" << perceivedSpeedDifference - (predSpeed - speed) - << "\n resulting accelError: " << accelError << std::endl; + << "\n resulting accelError: " << accelError << std::endl; veh->getDriverState()->unlockDebug(); } } @@ -1023,7 +1023,7 @@ if (!veh->getDriverState()->debugLocked()) { veh->getDriverState()->lockDebug(); std::cout << SIMTIME << " veh '" << veh->getID() << "' -> MSCFModel_Krauss::applyHeadwayPerceptionError()\n" - << " speed=" << speed << " gap=" << gap << "\n perceivedGap=" << perceivedGap << std::endl; + << " speed=" << speed << " gap=" << gap << "\n perceivedGap=" << perceivedGap << std::endl; const double exactStopSpeed = stopSpeed(veh, speed, gap); const double errorStopSpeed = stopSpeed(veh, speed, perceivedGap); const double accelError = SPEED2ACCEL(errorStopSpeed - exactStopSpeed); diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -63,7 +63,7 @@ WRITE_WARNING("Maximum speed of vehicle '" + veh->getID() + "' is lower than the minimum speed (min: " + toString(vMin) + ", max: " + toString(vMax) + ")."); } #endif - return veh->getLaneChangeModel().patchSpeed(vMin, MAX2(vMin, dawdle(vMax)), vMax, *this); + return veh->getLaneChangeModel().patchSpeed(vMin, MAX2(vMin, dawdle(vMax, veh->getRNG())), vMax, *this); } @@ -80,8 +80,8 @@ double -MSCFModel_Daniel1::dawdle(double speed) const { - return MAX2(0., speed - ACCEL2SPEED(myDawdle * myAccel * RandHelper::rand())); +MSCFModel_Daniel1::dawdle(double speed, std::mt19937* rng) const { + return MAX2(0., speed - ACCEL2SPEED(myDawdle * myAccel * RandHelper::rand(rng))); } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Daniel1.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -145,7 +145,7 @@ * @param[in] speed The speed with no dawdling * @return The speed after dawdling */ - virtual double dawdle(double speed) const; + virtual double dawdle(double speed, std::mt19937* rng) const; protected: /// @brief The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max. diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel.h 2018-09-06 22:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -382,7 +382,7 @@ * @param[in] speed - the current speed * @return Returns the acceleration which would ensure an arrival at distance dist earliest for the given time */ - static double avoidArrivalAccel(double dist, double time, double speed); + static double avoidArrivalAccel(double dist, double time, double speed, double maxDecel); /** @brief Computes the minimal possible arrival speed after covering a given distance @@ -562,6 +562,32 @@ */ double maximumSafeStopSpeedBallistic(double gap, double currentSpeed, bool onInsertion = false, double headway = -1) const; + /** + * @brief try to get the given parameter for this carFollowingModel + * + * @param[in] veh the vehicle from which the parameter must be retrieved + * @param[in] key the key of the parameter + * @return the value of the requested parameter + */ + virtual std::string getParameter(const MSVehicle* veh, const std::string& key) const { + UNUSED_PARAMETER(veh); + UNUSED_PARAMETER(key); + return ""; + } + + /** + * @brief try to set the given parameter for this carFollowingModel + * + * @param[in] veh the vehicle for which the parameter must be set + * @param[in] key the key of the parameter + * @param[in] value the value to be set for the given parameter + */ + virtual void setParameter(MSVehicle* veh, const std::string& key, const std::string& value) const { + UNUSED_PARAMETER(veh); + UNUSED_PARAMETER(key); + UNUSED_PARAMETER(value); + } + protected: /** @brief Overwrites gap2pred and predSpeed by the perceived values obtained from the vehicle's driver state, diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.cpp 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -67,15 +67,33 @@ double +MSCFModel_IDM::insertionFollowSpeed(const MSVehicle* const v, double speed, double gap2pred, double predSpeed, double predMaxDecel) const { + const double vMax = v->getLane()->getVehicleMaxSpeed(v); + // see definition of s in _v() + double s = MAX2(0., vMax * myHeadwayTime + vMax * (vMax - predSpeed) / myTwoSqrtAccelDecel); + if (gap2pred >= s) { + // followSpeed always stays below vMax because s*s / (gap2pred * gap2pred) > 0. This would prevent insertion with maximum speed at all distances + return vMax; + } else { + return followSpeed(v, speed, gap2pred, predSpeed, predMaxDecel); + } +} + + +double MSCFModel_IDM::stopSpeed(const MSVehicle* const veh, const double speed, double gap) const { if (gap < 0.01) { return 0; } - double result = _v(veh, gap, speed, 0, veh->getLane()->getVehicleMaxSpeed(veh), false); - if (gap > 0 && speed < NUMERICAL_EPS) { + double result = _v(veh, gap, speed, 0, veh->getLane()->getVehicleMaxSpeed(veh)); + if (gap > 0 && speed < NUMERICAL_EPS && result < NUMERICAL_EPS) { // ensure that stops can be reached: + //std::cout << " switching to krauss: " << veh->getID() << " gap=" << gap << " speed=" << speed << " res1=" << result << " res2=" << maximumSafeStopSpeed(gap, speed, false, veh->getActionStepLengthSecs())<< "\n"; result = maximumSafeStopSpeed(gap, speed, false, veh->getActionStepLengthSecs()); } + //if (result * TS > gap) { + // std::cout << "Maximum stop speed exceeded for gap=" << gap << " result=" << result << " veh=" << veh->getID() << " speed=" << speed << " t=" << SIMTIME << "\n"; + //} return result; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.h 2018-09-05 22:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_IDM.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -107,7 +107,23 @@ * @todo evaluate signature * @see MSCFModel::interactionGap */ - double interactionGap(const MSVehicle* const , double vL) const; + double interactionGap(const MSVehicle* const, double vL) 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 + */ + double insertionFollowSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const; + /** @brief Returns the minimum gap to reserve if the leader is braking at maximum (>=0) * @param[in] speed EGO's speed diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,7 +47,7 @@ MSCFModel_Kerner::finalizeSpeed(MSVehicle* const veh, double vPos) const { const double vNext = MSCFModel::finalizeSpeed(veh, vPos); VehicleVariables* vars = (VehicleVariables*)veh->getCarFollowVariables(); - vars->rand = RandHelper::rand(); + vars->rand = RandHelper::rand(veh->getRNG()); return vNext; } @@ -67,6 +67,7 @@ MSCFModel::VehicleVariables* MSCFModel_Kerner::createVehicleVariables() const { VehicleVariables* ret = new VehicleVariables(); + /// XXX should use egoVehicle->getRNG() ret->rand = RandHelper::rand(); return ret; } @@ -83,6 +84,7 @@ double vsafe = (double)(-1. * myTauDecel + sqrt(myTauDecel * myTauDecel + (predSpeed * predSpeed) + (2. * myDecel * gap))); VehicleVariables* vars = (VehicleVariables*)veh->getCarFollowVariables(); double va = MAX2((double) 0, MIN3(vfree, vsafe, vcond)) + vars->rand; + //std::cout << SIMTIME << " veh=" << veh->getID() << " speed=" << speed << " gap=" << gap << " G=" << G << " predSpeed=" << predSpeed << " vfree=" << vfree << " vsafe=" << vsafe << " vcond=" << vcond << " rand=" << vars->rand << "\n"; double v = MAX2((double) 0, MIN4(vfree, va, speed + ACCEL2SPEED(myAccel), vsafe)); return v; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Kerner.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.cpp 2018-11-18 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -58,7 +58,7 @@ const double sigma = (veh->passingMinor() ? veh->getVehicleType().getParameter().getJMParam(SUMO_ATTR_JM_SIGMA_MINOR, myDawdle) : myDawdle); - const double vDawdle = MAX2(vMin, dawdle2(vMax, sigma)); + const double vDawdle = MAX2(vMin, dawdle2(vMax, sigma, veh->getRNG())); return vDawdle; } @@ -99,7 +99,7 @@ } double -MSCFModel_Krauss::dawdle2(double speed, double sigma) const { +MSCFModel_Krauss::dawdle2(double speed, double sigma, std::mt19937* rng) const { if (!MSGlobals::gSemiImplicitEulerUpdate) { // in case of the ballistic update, negative speeds indicate // a desired stop before the completion of the next timestep. @@ -109,7 +109,7 @@ } } // generate random number out of [0,1) - const double random = RandHelper::rand(); + const double random = RandHelper::rand(rng); // Dawdle. if (speed < myAccel) { // we should not prevent vehicles from driving just due to dawdling diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Krauss.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -98,7 +98,7 @@ * @param[in] sigma The sigma value to use * @return The speed after dawdling */ - double dawdle2(double speed, double sigma) const; + double dawdle2(double speed, double sigma, std::mt19937* rng) const; }; diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,7 +52,7 @@ double MSCFModel_KraussOrig1::patchSpeedBeforeLC(const MSVehicle* veh, double vMin, double vMax) const { UNUSED_PARAMETER(veh); - const double vDawdle = MAX2(vMin, dawdle(vMax)); + const double vDawdle = MAX2(vMin, dawdle(vMax, veh->getRNG())); return vDawdle; } @@ -80,7 +80,7 @@ double -MSCFModel_KraussOrig1::dawdle(double speed) const { +MSCFModel_KraussOrig1::dawdle(double speed, std::mt19937* rng) const { if (!MSGlobals::gSemiImplicitEulerUpdate) { // in case of the ballistic update, negative speeds indicate // a desired stop before the completion of the next timestep. @@ -89,7 +89,7 @@ return speed; } } - return MAX2(0., speed - ACCEL2SPEED(myDawdle * myAccel * RandHelper::rand())); + return MAX2(0., speed - ACCEL2SPEED(myDawdle * myAccel * RandHelper::rand(rng))); } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h 2018-08-26 22:00:42.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -142,7 +142,7 @@ * @param[in] speed The speed with no dawdling * @return The speed after dawdling */ - virtual double dawdle(double speed) const; + virtual double dawdle(double speed, std::mt19937* rng) const; protected: /// @brief The vehicle's dawdle-parameter. 0 for no dawdling, 1 for max. diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussPS.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -54,12 +54,12 @@ double MSCFModel_KraussX::patchSpeedBeforeLC(const MSVehicle* veh, double vMin, double vMax) const { - return dawdleX(veh->getSpeed(), vMin, vMax); + return dawdleX(veh->getSpeed(), vMin, vMax, veh->getRNG()); } double -MSCFModel_KraussX::dawdleX(double vOld, double vMin, double vMax) const { +MSCFModel_KraussX::dawdleX(double vOld, double vMin, double vMax, std::mt19937* rng) const { double speed = vMax; if (!MSGlobals::gSemiImplicitEulerUpdate) { // in case of the ballistic update, negative speeds indicate @@ -73,7 +73,7 @@ if (vOld < myAccel) { speed -= ACCEL2SPEED(myTmp1 * myAccel); } - const double random = RandHelper::rand(); + const double random = RandHelper::rand(rng); speed -= ACCEL2SPEED(myDawdle * myAccel * random); // overbraking if (vOld > vMax) { diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_KraussX.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -78,7 +78,7 @@ * @return The speed after dawdling * */ - double dawdleX(double vOld, double vMin, double vMax) const; + double dawdleX(double vOld, double vMin, double vMax, std::mt19937* rng) const; /// @brief extension parameter nr1 double myTmp1; diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -69,11 +69,11 @@ const double asafe = SPEED2ACCEL(vsafe - speed); VehicleVariables* vars = (VehicleVariables*)veh->getCarFollowVariables(); double apref = vars->aOld; - if (apref <= asafe && RandHelper::rand() <= myActionPointProbability * TS) { + if (apref <= asafe && RandHelper::rand(veh->getRNG()) <= myActionPointProbability * TS) { apref = myDecelDivTau * (gap + (predSpeed - speed) * myHeadwayTime - speed * myHeadwayTime) / (speed + myTauDecel); apref = MIN2(apref, myAccel); apref = MAX2(apref, -myDecel); - apref += myDawdle * RandHelper::rand((double) - 1., (double)1.); + apref += myDawdle * RandHelper::rand((double) - 1., (double)1., veh->getRNG()); } if (apref > asafe) { apref = asafe; diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_PWag2009.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.cpp 2018-11-15 23:00:46.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -141,15 +141,18 @@ double MSCFModel_Rail::minNextSpeed(double speed, const MSVehicle* const veh) const { - double slope = veh->getSlope(); - double gr = myTrainParams.weight * G * sin(DEG2RAD(slope)); //kN - double res = getInterpolatedValueFromLookUpMap(speed, &(myTrainParams.resistance)); // kN - double totalRes = res + gr; //kN - - - double a = myTrainParams.decl + totalRes / myTrainParams.rotWeight; - - return speed - a * DELTA_T / 1000.; + const double slope = veh->getSlope(); + const double gr = myTrainParams.weight * G * sin(DEG2RAD(slope)); //kN + const double res = getInterpolatedValueFromLookUpMap(speed, &(myTrainParams.resistance)); // kN + const double totalRes = res + gr; //kN + const double a = myTrainParams.decl + totalRes / myTrainParams.rotWeight; + const double vMin = speed - a * DELTA_T / 1000.; + if (MSGlobals::gSemiImplicitEulerUpdate) { + return MAX2(vMin, 0.); + } else { + // NOTE: ballistic update allows for negative speeds to indicate a stop within the next timestep + return vMin; + } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.h 2018-08-26 22:00:42.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Rail.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -132,10 +132,14 @@ return MAX2(getSpeedAfterMaxDecel(speed), MIN2(_vsafe(veh, gap, 0), maxNextSpeed(speed, veh))); } +double +MSCFModel_SmartSK::patchSpeedBeforeLC(const MSVehicle* veh, double /*vMin*/, double /*vMax*/) const { + return dawdle(veh->getSpeed(), veh->getRNG()); +} double -MSCFModel_SmartSK::dawdle(double speed) const { - return MAX2(0., speed - ACCEL2SPEED(myDawdle * myAccel * RandHelper::rand())); +MSCFModel_SmartSK::dawdle(double speed, std::mt19937* rng) const { + return MAX2(0., speed - ACCEL2SPEED(myDawdle * myAccel * RandHelper::rand(rng))); } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_SmartSK.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -126,6 +126,8 @@ } /// @} + /// @brief apply dawdling + double patchSpeedBeforeLC(const MSVehicle* veh, double vMin, double vMax) const; /** @brief Duplicates the car-following model * @param[in] vtype The vehicle type this model belongs to (1:1) @@ -146,13 +148,13 @@ * @param[in] speed The speed with no dawdling * @return The speed after dawdling */ - virtual double dawdle(double speed) const; + virtual double dawdle(double speed, std::mt19937* rng) const; virtual void updateMyHeadway(const MSVehicle* const veh) const { // this is the point were the preferred headway changes slowly: SSKVehicleVariables* vars = (SSKVehicleVariables*)veh->getCarFollowVariables(); double tTau = vars->myHeadway; - tTau = tTau + (myHeadwayTime - tTau) * myTmp2 + myTmp3 * tTau * RandHelper::rand(double(-1.0), double(1.0)); + tTau = tTau + (myHeadwayTime - tTau) * myTmp2 + myTmp3 * tTau * RandHelper::rand(double(-1.0), double(1.0), veh->getRNG()); if (tTau < TS) { // this ensures the SK safety condition tTau = TS; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -81,12 +81,12 @@ * does a lousy job of closing in on a stop / junction * hence we borrow from Krauss here */ - return MAX2(getSpeedAfterMaxDecel(speed), MIN2(krauss_vsafe(gap, 0), maxNextSpeed(speed, veh))); + return MIN2(maximumSafeStopSpeed(gap, speed, false, veh->getActionStepLengthSecs()), maxNextSpeed(speed, veh)); } double -MSCFModel_Wiedemann::interactionGap(const MSVehicle* const , double vL) const { +MSCFModel_Wiedemann::interactionGap(const MSVehicle* const, double vL) const { UNUSED_PARAMETER(vL); return D_MAX; } @@ -113,7 +113,7 @@ const double sdv_root = (dx - myAX) / myCX; const double sdv = sdv_root * sdv_root; const double cldv = sdv * ex * ex; - const double opdv = cldv * (-1 - 2 * RandHelper::randNorm(0.5, 0.15)); + const double opdv = cldv * (-1 - 2 * RandHelper::randNorm(0.5, 0.15, veh->getRNG())); // select the regime, get new acceleration, compute new speed based double accel; if (dx <= abx) { @@ -168,8 +168,7 @@ double -MSCFModel_Wiedemann::emergency(double /* dv */, double /* dx */) const { - /* emergency according to A.Stebens +MSCFModel_Wiedemann::emergency(double dv, double dx) const { // wiedemann assumes that dx will always be larger than myAX (sumo may // violate this assumption when crashing (-: if (dx > myAX) { @@ -179,25 +178,9 @@ assert(accel <= 0); return accel; } else { - return = -myDecel; + return -myEmergencyDecel; } - */ // emergency according to C.Werner - return -myEmergencyDecel; -} - - - -// XXX: This could be replaced by maximumSafeStopSpeed(), refs. #2575 -double -MSCFModel_Wiedemann::krauss_vsafe(double gap, double predSpeed) const { - if (predSpeed == 0 && gap < 0.01) { - return 0; - } - const double tauDecel = myDecel * myHeadwayTime; - const double speedReduction = ACCEL2SPEED(myDecel); - const int predSteps = int(predSpeed / speedReduction); - const double leaderContrib = 2. * myDecel * (gap + SPEED2DIST(predSteps * predSpeed - speedReduction * predSteps * (predSteps + 1) / 2)); - return (double)(-tauDecel + sqrt(tauDecel * tauDecel + leaderContrib)); + //return -myEmergencyDecel; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.h 2018-06-14 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/MSCFModel_Wiedemann.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -92,7 +92,7 @@ * @todo evaluate signature * @see MSCFModel::interactionGap */ - double interactionGap(const MSVehicle* const , double vL) const; + double interactionGap(const MSVehicle* const, double vL) const; /** @brief Returns the model's name @@ -163,10 +163,6 @@ static const double D_MAX; /// @} - /// @brief vsafe from krauss since Wiedemann is deficient at approaching - // standing obstacles (see MSCFModel_Krauss::_vsafe) - double krauss_vsafe(double gap, double predSpeed) const; - private: /// @brief Invalidated assignment operator MSCFModel_Wiedemann& operator=(const MSCFModel_Wiedemann& s); diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/ParBuffer.h sumo-1.2.0+dfsg1/src/microsim/cfmodels/ParBuffer.h --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/ParBuffer.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/ParBuffer.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,159 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file ParBuffer.h +/// @author Michele Segata +/// @date Wed, 18 Apr 2012 +/// @version $Id$ +/// +// Class for the string serialization and deserialization of parameters +/****************************************************************************/ + +#ifndef PARBUFFER_H_ +#define PARBUFFER_H_ + +#include +#include +#include +#include + +class ParBuffer { +public: + ParBuffer() : SEP(':'), ESC('\\'), QUO('"'), was_empty(false) {} + ParBuffer(std::string buf) : SEP(':'), ESC('\\'), QUO('"'), + was_empty(false) { + inBuffer = buf; + } + + template ParBuffer& operator <<(const T& v) { + std::stringstream ss; + std::string str_value; + ss << v; + str_value = escape(ss.str()); + if (outBuffer.str().length() == 0) { + outBuffer << str_value; + } else { + outBuffer << SEP << str_value; + } + return *this; + } + + size_t next_escape(std::string str, size_t pos) { + size_t c_pos = str.find(SEP, pos); + size_t e_pos = str.find(ESC, pos); + if (c_pos == std::string::npos) { + return e_pos; + } + if (e_pos == std::string::npos) { + return c_pos; + } + return std::min(c_pos, e_pos); + } + + std::string escape(std::string str) { + size_t pos, last_pos = 0; + std::stringstream escaping; + std::string escaped; + while ((pos = next_escape(str, last_pos)) != std::string::npos) { + escaping << str.substr(last_pos, pos - last_pos); + escaping << ESC << str.substr(pos, 1); + last_pos = pos + 1; + } + if (last_pos != str.size()) { + escaping << str.substr(last_pos); + } + escaped = escaping.str(); + if (escaped.empty() || (escaped.c_str()[0] == QUO && escaped.c_str()[escaped.length() - 1] == QUO)) { + escaping.str(""); + escaping.clear(); + escaping << QUO << escaped << QUO; + escaped = escaping.str(); + } + return escaped;; + } + + std::string unescape(std::string str) { + size_t pos, last_pos = 0; + std::stringstream unescaped; + std::string escaped; + if (str.c_str()[0] == QUO && str.c_str()[str.length() - 1] == QUO) { + str = str.substr(1, str.length() - 2); + } + while ((pos = str.find(ESC, last_pos)) != std::string::npos) { + unescaped << str.substr(last_pos, pos - last_pos); + unescaped << str.substr(pos + 1, 1); + last_pos = pos + 2; + } + if (last_pos != str.size()) { + unescaped << str.substr(last_pos); + } + return unescaped.str(); + } + + std::string next() { + if (inBuffer.size() == 0) { + return ""; + } + + int sep = -1; + do { + sep = (int)inBuffer.find(SEP, sep + 1); + } while (!(sep == (int)std::string::npos || sep == 0 || inBuffer.c_str()[sep - 1] != ESC)); + + std::string value; + if (sep == (int)std::string::npos) { + value = unescape(inBuffer); + inBuffer = ""; + } else { + value = unescape(inBuffer.substr(0, sep)); + inBuffer = inBuffer.substr(sep + 1); + } + return value; + } + + template ParBuffer& operator>>(T& v) { + std::string value = next(); + std::stringstream ss(value); + ss >> v; + // stringstream doesn't write to v if value is an empty string. the + // only solution is letting the user know that the last parsed + // portion was empty + if (value == "") { + was_empty = true; + } else { + was_empty = false; + } + return *this; + } + + bool last_empty() { + return was_empty; + } + + void set(std::string buf) { + inBuffer = buf; + } + void clear() { + outBuffer.clear(); + } + std::string str() const { + return outBuffer.str(); + } + +private: + const char SEP; + const char ESC; + const char QUO; + std::stringstream outBuffer; + std::string inBuffer; + bool was_empty; + +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/microsim/cfmodels/README_Contributing.md sumo-1.2.0+dfsg1/src/microsim/cfmodels/README_Contributing.md --- sumo-1.1.0+dfsg1/src/microsim/cfmodels/README_Contributing.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/cfmodels/README_Contributing.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,29 @@ +Please feel free to add and / or modify files here but keep in mind that +EPL requires that "derivative works" be licensed under the terms of the EPL +whereas "separate modules of software" may be licensed arbitrarily. +Modifications to the files and directories listed here are considered derivative work: + +- MSCFModel.cpp +- MSCFModel.h +- MSCFModel_Daniel1.cpp +- MSCFModel_Daniel1.h +- MSCFModel_IDM.cpp +- MSCFModel_IDM.h +- MSCFModel_Kerner.cpp +- MSCFModel_Kerner.h +- MSCFModel_Krauss.cpp +- MSCFModel_Krauss.h +- MSCFModel_KraussOrig1.cpp +- MSCFModel_KraussOrig1.h +- MSCFModel_KraussPS.cpp +- MSCFModel_KraussPS.h +- MSCFModel_KraussX.cpp +- MSCFModel_KraussX.h +- MSCFModel_PWag2009.cpp +- MSCFModel_PWag2009.h +- MSCFModel_Rail.cpp +- MSCFModel_Rail.h +- MSCFModel_SmartSK.cpp +- MSCFModel_SmartSK.h +- MSCFModel_Wiedemann.cpp +- MSCFModel_Wiedemann.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/CMakeLists.txt sumo-1.2.0+dfsg1/src/microsim/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/microsim/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,7 @@ add_subdirectory(actions) add_subdirectory(cfmodels) add_subdirectory(devices) +add_subdirectory(engine) add_subdirectory(lcmodels) add_subdirectory(logging) add_subdirectory(output) @@ -24,6 +25,8 @@ MSEdgeWeightsStorage.h MSEventControl.cpp MSEventControl.h + MSDynamicShapeUpdater.cpp + MSDynamicShapeUpdater.h MSFrame.cpp MSFrame.h MSGlobals.cpp diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/CMakeLists.txt sumo-1.2.0+dfsg1/src/microsim/devices/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/microsim/devices/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -29,9 +29,11 @@ MSDevice_Bluelight.h MSDevice_FCD.cpp MSDevice_FCD.h - MSPersonDevice.h - MSPersonDevice_Routing.cpp - MSPersonDevice_Routing.h + MSTransportableDevice.h + MSTransportableDevice_Routing.cpp + MSTransportableDevice_Routing.h + MSTransportableDevice_FCD.cpp + MSTransportableDevice_FCD.h MSRoutingEngine.cpp MSRoutingEngine.h MSVehicleDevice.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/Makefile.am sumo-1.2.0+dfsg1/src/microsim/devices/Makefile.am --- sumo-1.1.0+dfsg1/src/microsim/devices/Makefile.am 2018-10-30 23:00:26.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -14,7 +14,8 @@ MSDevice_Example.cpp MSDevice_Example.h \ MSDevice_Bluelight.cpp MSDevice_Bluelight.h \ MSDevice_FCD.cpp MSDevice_FCD.h \ -MSPersonDevice.h MSVehicleDevice.h \ -MSPersonDevice_Routing.cpp MSPersonDevice_Routing.h \ +MSTransportableDevice.h MSVehicleDevice.h \ +MSTransportableDevice_Routing.cpp MSTransportableDevice_Routing.h \ +MSTransportableDevice_FCD.cpp MSTransportableDevice_FCD.h \ MSRoutingEngine.cpp MSRoutingEngine.h \ MSDevice_Vehroutes.cpp MSDevice_Vehroutes.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/Makefile.in sumo-1.2.0+dfsg1/src/microsim/devices/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/devices/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,671 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/devices -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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_SSM.$(OBJEXT) MSDevice_DriverState.$(OBJEXT) \ - MSDevice_ToC.$(OBJEXT) MSDevice_BTreceiver.$(OBJEXT) \ - MSDevice_BTsender.$(OBJEXT) MSDevice_Emissions.$(OBJEXT) \ - MSDevice_Transportable.$(OBJEXT) MSDevice_Routing.$(OBJEXT) \ - MSDevice_Tripinfo.$(OBJEXT) MSDevice_Battery.$(OBJEXT) \ - MSDevice_Example.$(OBJEXT) MSDevice_Bluelight.$(OBJEXT) \ - MSDevice_FCD.$(OBJEXT) MSPersonDevice_Routing.$(OBJEXT) \ - MSRoutingEngine.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmicrosimdevs.a -libmicrosimdevs_a_SOURCES = MSDevice.cpp MSDevice.h \ -MSDevice_SSM.cpp MSDevice_SSM.h \ -MSDevice_DriverState.cpp MSDevice_DriverState.h \ -MSDevice_ToC.cpp MSDevice_ToC.h \ -MSDevice_BTreceiver.cpp MSDevice_BTreceiver.h \ -MSDevice_BTsender.cpp MSDevice_BTsender.h \ -MSDevice_Emissions.cpp MSDevice_Emissions.h \ -MSDevice_Transportable.cpp MSDevice_Transportable.h \ -MSDevice_Routing.cpp MSDevice_Routing.h \ -MSDevice_Tripinfo.cpp MSDevice_Tripinfo.h \ -MSDevice_Battery.cpp MSDevice_Battery.h \ -MSDevice_Example.cpp MSDevice_Example.h \ -MSDevice_Bluelight.cpp MSDevice_Bluelight.h \ -MSDevice_FCD.cpp MSDevice_FCD.h \ -MSPersonDevice.h MSVehicleDevice.h \ -MSPersonDevice_Routing.cpp MSPersonDevice_Routing.h \ -MSRoutingEngine.cpp MSRoutingEngine.h \ -MSDevice_Vehroutes.cpp MSDevice_Vehroutes.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) --foreign src/microsim/devices/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/devices/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@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_Battery.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Bluelight.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_DriverState.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_FCD.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Routing.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_SSM.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_ToC.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Transportable.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPersonDevice_Routing.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRoutingEngine.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/devices/MSDevice_Battery.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Battery.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Battery.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Battery.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -91,7 +91,11 @@ } -bool MSDevice_Battery::notifyMove(SUMOVehicle& veh, double /* oldPos */, double /* newPos */, double /* newSpeed */) { +bool MSDevice_Battery::notifyMove(SUMOTrafficObject& tObject, double /* oldPos */, double /* newPos */, double /* newSpeed */) { + if (!tObject.isVehicle()) { + return false; + } + SUMOVehicle& veh = static_cast(tObject); // Start vehicleStoppedTimer if the vehicle is stopped. In other case reset timer if (veh.getSpeed() < myStoppingTreshold) { // Increase vehicle stopped timer diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Battery.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Battery.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Battery.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Battery.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -77,7 +77,7 @@ * * @return True (always). */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /// @} /// @brief return the name for this type of device diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -118,7 +118,7 @@ bool -MSDevice_Bluelight::notifyMove(SUMOVehicle& veh, double /* oldPos */, +MSDevice_Bluelight::notifyMove(SUMOTrafficObject& veh, double /* oldPos */, double /* newPos */, double newSpeed) { #ifdef DEBUG_BLUELIGHT std::cout << "device '" << getID() << "' notifyMove: newSpeed=" << newSpeed << "\n"; @@ -193,7 +193,7 @@ bool -MSDevice_Bluelight::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Bluelight::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { #ifdef DEBUG_BLUELIGHT std::cout << "device '" << getID() << "' notifyEnter: reason=" << reason << " currentEdge=" << veh.getEdge()->getID() << "\n"; #else @@ -205,7 +205,7 @@ bool -MSDevice_Bluelight::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Bluelight::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { #ifdef DEBUG_BLUELIGHT std::cout << "device '" << getID() << "' notifyLeave: reason=" << reason << " currentEdge=" << veh.getEdge()->getID() << "\n"; #else diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Bluelight.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,6 +31,7 @@ // class declarations // =========================================================================== class SUMOVehicle; +class SUMOTrafficObject; // =========================================================================== @@ -84,7 +85,7 @@ * * @return True (always). */ - bool notifyMove(SUMOVehicle& veh, double oldPos, + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); @@ -96,7 +97,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Saves arrival info @@ -107,7 +108,7 @@ * @param[in] isLaneChange whether the vehicle changed from the lane * @return True if it did not leave the net. */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.cpp 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -383,7 +383,7 @@ bool -MSDevice_BTreceiver::notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* /* enteredLane */) { +MSDevice_BTreceiver::notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* /* enteredLane */) { 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()); @@ -401,7 +401,7 @@ bool -MSDevice_BTreceiver::notifyMove(SUMOVehicle& veh, double /* oldPos */, double newPos, double newSpeed) { +MSDevice_BTreceiver::notifyMove(SUMOTrafficObject& veh, double /* oldPos */, double newPos, double newSpeed) { if (sVehicles.find(veh.getID()) == sVehicles.end()) { WRITE_WARNING("btreceiver: Can not update position of vehicle '" + veh.getID() + "' which is not on the road."); return true; @@ -413,7 +413,7 @@ bool -MSDevice_BTreceiver::notifyLeave(SUMOVehicle& veh, double /* lastPos */, Notification reason, const MSLane* /* enteredLane */) { +MSDevice_BTreceiver::notifyLeave(SUMOTrafficObject& veh, double /* lastPos */, Notification reason, const MSLane* /* enteredLane */) { if (reason < MSMoveReminder::NOTIFICATION_TELEPORT) { return true; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTreceiver.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -97,7 +97,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane = 0); /** @brief Checks whether the reminder still has to be notified about the vehicle moves @@ -113,7 +113,7 @@ * * @return True if vehicle hasn't passed the reminder completely. */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /** @brief Moves (the known) vehicle from running to arrived vehicles' list @@ -126,7 +126,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0); ///@} /// @brief return the name for this type of device diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTsender.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTsender.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTsender.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTsender.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -82,7 +82,7 @@ bool -MSDevice_BTsender::notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* /* enteredLane */) { +MSDevice_BTsender::notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* /* enteredLane */) { 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()); @@ -100,7 +100,7 @@ bool -MSDevice_BTsender::notifyMove(SUMOVehicle& veh, double /* oldPos */, double newPos, double newSpeed) { +MSDevice_BTsender::notifyMove(SUMOTrafficObject& veh, double /* oldPos */, double newPos, double newSpeed) { if (sVehicles.find(veh.getID()) == sVehicles.end()) { WRITE_WARNING("btsender: Can not update position of vehicle '" + veh.getID() + "' which is not on the road."); return true; @@ -112,7 +112,7 @@ bool -MSDevice_BTsender::notifyLeave(SUMOVehicle& veh, double /* lastPos */, Notification reason, const MSLane* /* enteredLane */) { +MSDevice_BTsender::notifyLeave(SUMOTrafficObject& veh, double /* lastPos */, Notification reason, const MSLane* /* enteredLane */) { if (reason < MSMoveReminder::NOTIFICATION_TELEPORT) { return true; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTsender.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTsender.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_BTsender.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_BTsender.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -35,6 +35,7 @@ // class declarations // =========================================================================== class SUMOVehicle; +class SUMOTrafficObject; // =========================================================================== @@ -94,7 +95,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane = 0); /** @brief Checks whether the reminder still has to be notified about the vehicle moves @@ -110,7 +111,7 @@ * * @return True if vehicle hasn't passed the reminder completely. */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /** @brief Moves (the known) vehicle from running to arrived vehicles' list @@ -123,7 +124,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0); /// @} /// @brief return the name for this type of device diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -40,7 +40,8 @@ #include "MSDevice_DriverState.h" #include "MSDevice_Bluelight.h" #include "MSDevice_FCD.h" -#include "MSPersonDevice_Routing.h" +#include "MSTransportableDevice_Routing.h" +#include "MSTransportableDevice_FCD.h" #include "MSRoutingEngine.h" @@ -75,6 +76,9 @@ MSDevice_DriverState::insertOptions(oc); MSDevice_Bluelight::insertOptions(oc); MSDevice_FCD::insertOptions(oc); + + MSTransportableDevice_Routing::insertOptions(oc); + MSTransportableDevice_FCD::insertOptions(oc); } @@ -105,8 +109,9 @@ void -MSDevice::buildPersonDevices(MSTransportable& p, std::vector& into) { - MSPersonDevice_Routing::buildDevices(p, into); +MSDevice::buildTransportableDevices(MSTransportable& p, std::vector& into) { + MSTransportableDevice_Routing::buildDevices(p, into); + MSTransportableDevice_FCD::buildDevices(p, into); } @@ -133,18 +138,6 @@ } -bool -MSDevice::equippedByParameter(const MSTransportable* t, const std::string& deviceName, bool outputOptionSet) { - const std::string key = "has." + deviceName + ".device"; - if (t->getParameter().knowsParameter(key)) { - return StringUtils::toBool(t->getParameter().getParameter(key, "false")); - } else if (t->getVehicleType().getParameter().knowsParameter(key)) { - return StringUtils::toBool(t->getVehicleType().getParameter().getParameter(key, "false")); - } - return outputOptionSet; -} - - void MSDevice::saveState(OutputDevice& /* out */) const { WRITE_WARNING("Device '" + getID() + "' cannot save state"); diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_DriverState.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_DriverState.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_DriverState.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_DriverState.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -63,7 +63,7 @@ MSDevice_DriverState::insertOptions(OptionsCont& oc) { oc.addOptionSubTopic("Driver State Device"); insertDefaultAssignmentOptions("driverstate", "Driver State Device", oc); - oc.doRegister("device.driverstate.initialAwareness", new Option_Float(DriverStateDefaults::minAwareness)); + oc.doRegister("device.driverstate.initialAwareness", new Option_Float(DriverStateDefaults::initialAwareness)); oc.addDescription("device.driverstate.initialAwareness", "Driver State Device", "Initial value assigned to the driver's awareness."); oc.doRegister("device.driverstate.errorTimeScaleCoefficient", new Option_Float(DriverStateDefaults::errorTimeScaleCoefficient)); oc.addDescription("device.driverstate.errorTimeScaleCoefficient", "Driver State Device", "Time scale for the error process."); @@ -79,13 +79,16 @@ oc.addDescription("device.driverstate.headwayChangePerceptionThreshold", "Driver State Device", "Base threshold for recognizing changes in the headway (threshold also scales with distance)."); oc.doRegister("device.driverstate.minAwareness", new Option_Float(DriverStateDefaults::minAwareness)); oc.addDescription("device.driverstate.minAwareness", "Driver State Device", "Minimal admissible value for the driver's awareness."); + oc.doRegister("device.driverstate.maximalReactionTime", new Option_Float(-1.0)); + oc.addDescription("device.driverstate.maximalReactionTime", "Driver State Device", "Maximal reaction time (~action step length) induced by decreased awareness level (reached for awareness=minAwareness)."); } void MSDevice_DriverState::buildVehicleDevices(SUMOVehicle& v, std::vector& into) { OptionsCont& oc = OptionsCont::getOptions(); - if (equippedByDefaultAssignmentOptions(oc, "driverstate", v, false)) { + // ToC device implies driverstate + if (equippedByDefaultAssignmentOptions(oc, "driverstate", v, false) || equippedByDefaultAssignmentOptions(oc, "toc", v, false)) { const double minAwareness = getMinAwareness(v, oc); const double initialAwareness = getInitialAwareness(v, oc); const double errorTimeScaleCoefficient = getErrorTimeScaleCoefficient(v, oc); @@ -94,6 +97,7 @@ const double speedDifferenceChangePerceptionThreshold = getSpeedDifferenceChangePerceptionThreshold(v, oc); const double headwayChangePerceptionThreshold = getHeadwayChangePerceptionThreshold(v, oc); const double headwayErrorCoefficient = getHeadwayErrorCoefficient(v, oc); + const double maximalReactionTime = getMaximalReactionTime(v, oc); // build the device MSDevice_DriverState* device = new MSDevice_DriverState(v, "driverstate" + v.getID(), minAwareness, @@ -103,7 +107,8 @@ speedDifferenceErrorCoefficient, speedDifferenceChangePerceptionThreshold, headwayChangePerceptionThreshold, - headwayErrorCoefficient); + headwayErrorCoefficient, + maximalReactionTime); into.push_back(device); } } @@ -141,6 +146,10 @@ MSDevice_DriverState::getHeadwayErrorCoefficient(const SUMOVehicle& v, const OptionsCont& oc) { return getFloatParam(v, oc, "driverstate.headwayErrorCoefficient", DriverStateDefaults::headwayErrorCoefficient, false); } +double +MSDevice_DriverState::getMaximalReactionTime(const SUMOVehicle& v, const OptionsCont& oc) { + return getFloatParam(v, oc, "driverstate.maximalReactionTime", -1.0, false); +} // --------------------------------------------------------------------------- @@ -154,7 +163,8 @@ double speedDifferenceErrorCoefficient, double speedDifferenceChangePerceptionThreshold, double headwayChangePerceptionThreshold, - double headwayErrorCoefficient) : + double headwayErrorCoefficient, + double maximalReactionTime) : MSVehicleDevice(holder, id), myMinAwareness(minAwareness), myInitialAwareness(initialAwareness), @@ -164,11 +174,11 @@ mySpeedDifferenceChangePerceptionThreshold(speedDifferenceChangePerceptionThreshold), myHeadwayChangePerceptionThreshold(headwayChangePerceptionThreshold), myHeadwayErrorCoefficient(headwayErrorCoefficient), - myDriverState(nullptr) { + myMaximalReactionTime(maximalReactionTime) { // Take care! Holder is currently being constructed. Cast occurs before completion. myHolderMS = static_cast(&holder); - // Ensure that the holder receives a driver state as soon as it is created (can't be done here, since myHolderMS is incomplete) - MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent(new WrappingCommand(this, &MSDevice_DriverState::createDriverState), SIMSTEP); + initDriverState(); + #ifdef DEBUG_DSDEVICE std::cout << "initialized device '" << id << "' with " @@ -184,23 +194,9 @@ } -//MSDevice_DriverState::~MSDevice_DriverState() {} - -SUMOTime -MSDevice_DriverState::createDriverState(SUMOTime /* t */) { -#ifdef DEBUG_DSDEVICE - std::cout << SIMTIME << " MSDevice_DriverState::createDriverState() for vehicle '" << myHolder.getID() << "'" << std::endl; -#endif - assert(myDriverState == nullptr); - assert(myHolderMS->getDriverState() == nullptr); - myHolderMS->createDriverState(); - myDriverState = myHolderMS->getDriverState(); - initDriverState(); - return 0; -} - void MSDevice_DriverState::initDriverState() { + myDriverState = std::make_shared(myHolderMS); myDriverState->setMinAwareness(myMinAwareness); myDriverState->setInitialAwareness(myInitialAwareness); myDriverState->setErrorTimeScaleCoefficient(myErrorTimeScaleCoefficient); @@ -210,6 +206,14 @@ myDriverState->setSpeedDifferenceChangePerceptionThreshold(mySpeedDifferenceChangePerceptionThreshold); myDriverState->setHeadwayChangePerceptionThreshold(myHeadwayChangePerceptionThreshold); myDriverState->setAwareness(myInitialAwareness); + if (myMaximalReactionTime > 0) { + myDriverState->setMaximalReactionTime(myMaximalReactionTime); + } +} + +void +MSDevice_DriverState::update() { + myDriverState->update(); } std::string @@ -243,6 +247,12 @@ return toString(myDriverState->getSpeedDifferenceChangePerceptionThreshold()); } else if (key == "headwayChangePerceptionThreshold") { return toString(myDriverState->getHeadwayChangePerceptionThreshold()); + } else if (key == "maximalReactionTime") { + return toString(myDriverState->getMaximalReactionTime()); + } else if (key == "originalReactionTime") { + return toString(myDriverState->getOriginalReactionTime()); + } else if (key == "actionStepLength") { + return toString(myDriverState->getActionStepLength()); } throw InvalidArgument("Parameter '" + key + "' is not supported for device of type '" + deviceName() + "'"); } @@ -277,6 +287,10 @@ myDriverState->setSpeedDifferenceChangePerceptionThreshold(StringUtils::toDouble(value)); } else if (key == "headwayChangePerceptionThreshold") { myDriverState->setHeadwayChangePerceptionThreshold(StringUtils::toDouble(value)); + } else if (key == "maximalReactionTime") { + myDriverState->setMaximalReactionTime(StringUtils::toDouble(value)); + } else if (key == "originalReactionTime") { + myDriverState->setOriginalReactionTime(StringUtils::toDouble(value)); } else { throw InvalidArgument("Parameter '" + key + "' is not supported for device of type '" + deviceName() + "'"); } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_DriverState.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_DriverState.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_DriverState.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_DriverState.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -72,6 +72,14 @@ */ static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); + /// update internal state + void update(); + + /// return internal state + inline std::shared_ptr getDriverState() const { + return myDriverState; + } + private: /// @name Helpers for parameter parsing /// @{ @@ -83,6 +91,7 @@ static double getSpeedDifferenceChangePerceptionThreshold(const SUMOVehicle& v, const OptionsCont& oc); static double getHeadwayChangePerceptionThreshold(const SUMOVehicle& v, const OptionsCont& oc); static double getHeadwayErrorCoefficient(const SUMOVehicle& v, const OptionsCont& oc); + static double getMaximalReactionTime(const SUMOVehicle& v, const OptionsCont& oc); /// @} @@ -116,18 +125,19 @@ double speedDifferenceErrorCoefficient, double speedDifferenceChangePerceptionThreshold, double headwayChangePerceptionThreshold, - double headwayErrorCoefficient); + double headwayErrorCoefficient, + double maximalReactionTime); /// @brief Initializeses the driver state parameters void initDriverState(); - /// @brief Creates a DriverState for the equipped vehicle - SUMOTime createDriverState(SUMOTime); - private: /// @brief The holder vehicle casted to MSVehicle* MSVehicle* myHolderMS; + /// @name Temporary to hold driverstate parameters until initialization. + /// @note Invalid after call to initDriverState(). + /// @{ double myMinAwareness; double myInitialAwareness; double myErrorTimeScaleCoefficient; @@ -136,6 +146,8 @@ double mySpeedDifferenceChangePerceptionThreshold; double myHeadwayChangePerceptionThreshold; double myHeadwayErrorCoefficient; + double myMaximalReactionTime; + /// @} /// @brief The driver state of the holder. std::shared_ptr myDriverState; diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Emissions.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Emissions.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Emissions.cpp 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Emissions.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -66,7 +66,7 @@ bool -MSDevice_Emissions::notifyMove(SUMOVehicle& veh, double /*oldPos*/, double /*newPos*/, double newSpeed) { +MSDevice_Emissions::notifyMove(SUMOTrafficObject& veh, double /*oldPos*/, double /*newPos*/, double newSpeed) { const SUMOEmissionClass c = veh.getVehicleType().getEmissionClass(); const double a = veh.getAcceleration(); const double slope = veh.getSlope(); diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Emissions.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Emissions.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Emissions.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Emissions.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -95,7 +95,7 @@ * @see MSMoveReminder::notifyMove * @see PollutantsInterface */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /// @} /// @brief return the name for this type of device diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Example.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Example.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Example.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Example.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -106,27 +106,30 @@ bool -MSDevice_Example::notifyMove(SUMOVehicle& veh, double /* oldPos */, +MSDevice_Example::notifyMove(SUMOTrafficObject& tObject, double /* oldPos */, double /* newPos */, double 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(typeid(MSDevice_Tripinfo))); - if (otherDevice != nullptr) { - std::cout << " veh '" << veh.getID() << " has device '" << otherDevice->getID() << "'\n"; + if (tObject.isVehicle()) { + SUMOVehicle& veh = static_cast(tObject); + // check whether another device is present on the vehicle: + MSDevice_Tripinfo* otherDevice = static_cast(veh.getDevice(typeid(MSDevice_Tripinfo))); + if (otherDevice != nullptr) { + std::cout << " veh '" << veh.getID() << " has device '" << otherDevice->getID() << "'\n"; + } } return true; // keep the device } bool -MSDevice_Example::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Example::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { std::cout << "device '" << getID() << "' notifyEnter: reason=" << reason << " currentEdge=" << veh.getEdge()->getID() << "\n"; return true; // keep the device } bool -MSDevice_Example::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Example::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { std::cout << "device '" << getID() << "' notifyLeave: reason=" << reason << " currentEdge=" << veh.getEdge()->getID() << "\n"; return true; // keep the device } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Example.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Example.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Example.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Example.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,7 +31,7 @@ // =========================================================================== // class declarations // =========================================================================== -class SUMOVehicle; +class SUMOTrafficObject; // =========================================================================== @@ -85,7 +85,7 @@ * * @return True (always). */ - bool notifyMove(SUMOVehicle& veh, double oldPos, + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); @@ -97,7 +97,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Saves arrival info @@ -108,7 +108,7 @@ * @param[in] isLaneChange whether the vehicle changed from the lane * @return True if it did not leave the net. */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_FCD.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_FCD.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_FCD.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_FCD.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include "MSDevice_Tripinfo.h" #include "MSDevice_FCD.h" // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_FCD.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_FCD.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_FCD.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_FCD.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,6 +32,7 @@ // class declarations // =========================================================================== class SUMOVehicle; +class SUMOTrafficObject; // =========================================================================== @@ -69,7 +70,7 @@ /// @brief Destructor. ~MSDevice_FCD(); - bool notifyEnter(SUMOVehicle& /*veh*/, MSMoveReminder::Notification /*reason*/, const MSLane* /*enteredLane*/) { + bool notifyEnter(SUMOTrafficObject& /*veh*/, MSMoveReminder::Notification /*reason*/, const MSLane* /*enteredLane*/) { return false; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -46,7 +47,7 @@ class MSTransportable; class SUMOSAXAttributes; class MSVehicleDevice; -class MSPersonDevice; +class MSTransportableDevice; // =========================================================================== @@ -85,7 +86,7 @@ * @param[in] p The person for which a device may be built * @param[filled] into The vector to store the built device in */ - static void buildPersonDevices(MSTransportable& p, std::vector& into); + static void buildTransportableDevices(MSTransportable& p, std::vector& into); static std::mt19937* getEquipmentRNG() { return &myEquipmentRNG; @@ -94,17 +95,12 @@ /// @brief return the name for this type of device virtual const std::string deviceName() const = 0; - /** @brief Determines whether a transportable should get a certain device - **/ - static bool equippedByParameter(const MSTransportable* t, const std::string& deviceName, bool outputOptionSet); - /// @brief perform cleanup for all devices static void cleanupAll(); public: /** @brief Constructor * - * @param[in] holder The vehicle that holds this device * @param[in] id The ID of the device */ MSDevice(const std::string& id) : Named(id) { @@ -165,7 +161,7 @@ * @param[in] optionsTopic The options topic into which the options shall be added * @param[filled] oc The options container to add the options to */ - static void insertDefaultAssignmentOptions(const std::string& deviceName, const std::string& optionsTopic, OptionsCont& oc, const bool isPerson=false); + static void insertDefaultAssignmentOptions(const std::string& deviceName, const std::string& optionsTopic, OptionsCont& oc, const bool isPerson = false); /** @brief Determines whether a vehicle should get a certain device @@ -174,7 +170,7 @@ * @param[in] deviceName The name of the device type * @param[in] v The vehicle to determine whether it shall be equipped or not */ - template + template static bool equippedByDefaultAssignmentOptions(const OptionsCont& oc, const std::string& deviceName, DEVICEHOLDER& v, bool outputOptionSet, const bool isPerson = false); /// @} diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Routing.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Routing.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Routing.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Routing.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,10 +36,6 @@ #include #include #include -#include -#include -#include -#include #include "MSRoutingEngine.h" #include "MSDevice_Routing.h" @@ -62,11 +58,11 @@ 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.doRegister("device.rerouting.adaptation-weight", new Option_Float(0)); oc.addSynonyme("device.rerouting.adaptation-weight", "device.routing.adaptation-weight", true); oc.addDescription("device.rerouting.adaptation-weight", "Routing", "The weight of prior edge weights for exponential moving average"); - oc.doRegister("device.rerouting.adaptation-steps", new Option_Integer(0)); + oc.doRegister("device.rerouting.adaptation-steps", new Option_Integer(180)); oc.addSynonyme("device.rerouting.adaptation-steps", "device.routing.adaptation-steps", true); oc.addDescription("device.rerouting.adaptation-steps", "Routing", "The number of steps for moving average weight of prior edge weights"); @@ -96,7 +92,7 @@ bool MSDevice_Routing::checkOptions(OptionsCont& oc) { bool ok = true; - if (oc.getInt("device.rerouting.adaptation-steps") > 0 && !oc.isDefault("device.rerouting.adaptation-weight")) { + if (!oc.isDefault("device.rerouting.adaptation-steps") && !oc.isDefault("device.rerouting.adaptation-weight")) { WRITE_ERROR("Only one of the options 'device.rerouting.adaptation-steps' or 'device.rerouting.adaptation-weight' may be given."); ok = false; } @@ -166,7 +162,7 @@ bool -MSDevice_Routing::notifyEnter(SUMOVehicle& /*veh*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Routing::notifyEnter(SUMOTrafficObject& /*veh*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { // clean up pre depart rerouting if (myRerouteCommand != nullptr) { diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Routing.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Routing.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Routing.h 2018-10-30 23:00:26.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Routing.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -48,7 +48,7 @@ * @brief A device that performs vehicle rerouting based on current edge speeds * * The routing-device system consists of in-vehicle devices that perform the routing - * and simulation-wide static methods for collecting edge weights and + * and simulation-wide static methods for collecting edge weights and * parallelizing in MSRoutingEngine. * * A device is assigned to a vehicle using the common explicit/probability - procedure. @@ -115,7 +115,7 @@ * @see MSEventHandler * @see WrappingCommand */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} /// @brief return the name for this type of device @@ -151,6 +151,10 @@ mySkipRouting = currentTime; } + SUMOTime getPeriod() const { + return myPeriod; + } + /// @brief try to retrieve the given parameter from this device. Throw exception for unsupported key std::string getParameter(const std::string& key) const; diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_SSM.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_SSM.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_SSM.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_SSM.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -49,6 +49,11 @@ //#define DEBUG_SSM_DRAC //#define DEBUG_SSM_SURROUNDING //#define DEBUG_SSM_NOTIFICATIONS +//#define DEBUG_COND MSNet::getInstance()->getCurrentTimeStep() > 308000 +//#define DEBUG_COND1(ego) MSNet::getInstance()->getCurrentTimeStep() > 308000 +#define DEBUG_COND1(ego) ego!=nullptr && ego->isSelected() +//#define DEBUG_COND1(ego) ego!=nullptr && ego->getID() == "flow1.23" +#define DEBUG_COND false // =========================================================================== // Constants @@ -201,9 +206,9 @@ oc.doRegister("device.ssm.trajectories", Option::makeUnsetWithDefault(false)); oc.addDescription("device.ssm.trajectories", "SSM Device", "Specifies whether trajectories will be logged (if false, only the extremal values and times are reported, this is the default)."); oc.doRegister("device.ssm.range", Option::makeUnsetWithDefault(DEFAULT_RANGE)); - oc.addDescription("device.ssm.range", "SSM Device", "Specifies the detection range in meters (default is " + toString(DEFAULT_RANGE) + "m.). For vehicles below this distance from the equipped vehicle, SSM values are traced."); + oc.addDescription("device.ssm.range", "SSM Device", "Specifies the detection range in meters (default is " + ::toString(DEFAULT_RANGE) + "m.). For vehicles below this distance from the equipped vehicle, SSM values are traced."); oc.doRegister("device.ssm.extratime", Option::makeUnsetWithDefault(DEFAULT_EXTRA_TIME)); - oc.addDescription("device.ssm.extratime", "SSM Device", "Specifies the time in seconds to be logged after a conflict is over (default is " + toString(DEFAULT_EXTRA_TIME) + "secs.). Required >0 if PET is to be calculated for crossing conflicts."); + oc.addDescription("device.ssm.extratime", "SSM Device", "Specifies the time in seconds to be logged after a conflict is over (default is " + ::toString(DEFAULT_EXTRA_TIME) + "secs.). Required >0 if PET is to be calculated for crossing conflicts."); oc.doRegister("device.ssm.file", Option::makeUnsetWithDefault("")); oc.addDescription("device.ssm.file", "SSM Device", "Give a global default filename for the SSM output."); oc.doRegister("device.ssm.geo", Option::makeUnsetWithDefault(false)); @@ -269,15 +274,17 @@ PET(INVALID, Position::invalidPosition(), ENCOUNTER_TYPE_NOCONFLICT_AHEAD, INVALID), closingRequested(false) { #ifdef DEBUG_SSM - std::cout << "\n" << SIMTIME << " Constructing encounter of '" - << ego->getID() << "' and '" << foe->getID() << "'" << std::endl; + if (DEBUG_COND1(ego)) + std::cout << "\n" << SIMTIME << " Constructing encounter of '" + << ego->getID() << "' and '" << foe->getID() << "'" << std::endl; #endif } MSDevice_SSM::Encounter::~Encounter() { #ifdef DEBUG_SSM - std::cout << "\n" << SIMTIME << " Destroying encounter of '" - << egoID << "' and '" << foeID << "' (begin was " << begin << ")" << std::endl; + if (DEBUG_COND1(ego)) + std::cout << "\n" << SIMTIME << " Destroying encounter of '" + << egoID << "' and '" << foeID << "' (begin was " << begin << ")" << std::endl; #endif } @@ -286,13 +293,14 @@ MSDevice_SSM::Encounter::add(double time, const EncounterType type, Position egoX, Position egoV, Position foeX, Position foeV, Position conflictPoint, double egoDistToConflict, double foeDistToConflict, double ttc, double drac, std::pair pet) { #ifdef DEBUG_SSM - std::cout << time << " Adding data point for encounter of '" << egoID << "' and '" << foeID << "':\n" - << "type=" << type << ", egoDistToConflict=" << (egoDistToConflict == INVALID ? "NA" : toString(egoDistToConflict)) - << ", foeDistToConflict=" << (foeDistToConflict == INVALID ? "NA" : toString(foeDistToConflict)) - << ",\nttc=" << (ttc == INVALID ? "NA" : toString(ttc)) - << ", drac=" << (drac == INVALID ? "NA" : toString(drac)) - << ", pet=" << (pet.second == INVALID ? "NA" : toString(pet.second)) - << std::endl; + if (DEBUG_COND1(ego)) + std::cout << time << " Adding data point for encounter of '" << egoID << "' and '" << foeID << "':\n" + << "type=" << type << ", egoDistToConflict=" << (egoDistToConflict == INVALID ? "NA" : ::toString(egoDistToConflict)) + << ", foeDistToConflict=" << (foeDistToConflict == INVALID ? "NA" : ::toString(foeDistToConflict)) + << ",\nttc=" << (ttc == INVALID ? "NA" : ::toString(ttc)) + << ", drac=" << (drac == INVALID ? "NA" : ::toString(drac)) + << ", pet=" << (pet.second == INVALID ? "NA" : ::toString(pet.second)) + << std::endl; #endif currentType = type; @@ -387,24 +395,27 @@ void MSDevice_SSM::update() { #ifdef DEBUG_SSM - std::cout << "\n" << SIMTIME << " Device '" << getID() << "' update()\n" - << "Size of myActiveEncounters: " << myActiveEncounters.size() - << "\nSize of myPastConflicts: " << myPastConflicts.size() - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "\n" << SIMTIME << " Device '" << getID() << "' update()\n" + << "Size of myActiveEncounters: " << myActiveEncounters.size() + << "\nSize of myPastConflicts: " << myPastConflicts.size() + << std::endl; #endif // Scan surroundings for other vehicles FoeInfoMap foes; findSurroundingVehicles(*myHolderMS, myRange, foes); #ifdef DEBUG_SSM - if (foes.size() > 0) { - std::cout << "Scanned surroundings: Found potential foes:\n"; - for (FoeInfoMap::const_iterator i = foes.begin(); i != foes.end(); ++i) { - std::cout << i->first->getID() << " "; + if (DEBUG_COND1(myHolderMS)) { + if (foes.size() > 0) { + std::cout << "Scanned surroundings: Found potential foes:\n"; + for (FoeInfoMap::const_iterator i = foes.begin(); i != foes.end(); ++i) { + std::cout << i->first->getID() << " "; + } + std::cout << std::endl; + } else { + std::cout << "Scanned surroundings: No potential conflict could be identified." << std::endl; } - std::cout << std::endl; - } else { - std::cout << "Scanned surroundings: No potential conflict could be identified." << std::endl; } #endif @@ -478,24 +489,28 @@ void MSDevice_SSM::createEncounters(FoeInfoMap& foes) { #ifdef DEBUG_SSM - std::cout << "\n" << SIMTIME << " Device '" << getID() << "' createEncounters()" << std::endl; - std::cout << "New foes:\n"; - for (FoeInfoMap::const_iterator vi = foes.begin(); vi != foes.end(); ++vi) { - std::cout << vi->first->getID() << "\n"; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "\n" << SIMTIME << " Device '" << getID() << "' createEncounters()" << std::endl; + std::cout << "New foes:\n"; + for (FoeInfoMap::const_iterator vi = foes.begin(); vi != foes.end(); ++vi) { + std::cout << vi->first->getID() << "\n"; + } + std::cout << std::endl; } - std::cout << std::endl; #endif for (FoeInfoMap::const_iterator foe = foes.begin(); foe != foes.end(); ++foe) { - std::pair conflictLanes; Encounter* e = new Encounter(myHolderMS, foe->first, SIMTIME, myExtraTime); - updateEncounter(e, foe->second); // deletes foe->second - if (myOldestActiveEncounterBegin == INVALID) { - assert(myActiveEncounters.empty()); - myOldestActiveEncounterBegin = e->begin; + if (updateEncounter(e, foe->second)) { // deletes foe->second + if (myOldestActiveEncounterBegin == INVALID) { + assert(myActiveEncounters.empty()); + myOldestActiveEncounterBegin = e->begin; + } + assert(myOldestActiveEncounterBegin <= e->begin); + myActiveEncounters.push_back(e); + } else { + // Discard encounters, where one vehicle already left the conflict area } - assert(myOldestActiveEncounterBegin <= e->begin); - myActiveEncounters.push_back(e); } } @@ -510,12 +525,14 @@ void MSDevice_SSM::processEncounters(FoeInfoMap& foes, bool forceClose) { #ifdef DEBUG_SSM - std::cout << "\n" << SIMTIME << " Device '" << getID() << "' processEncounters()" << std::endl; - std::cout << "Currently present foes:\n"; - for (FoeInfoMap::const_iterator vi = foes.begin(); vi != foes.end(); ++vi) { - std::cout << vi->first->getID() << "\n"; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "\n" << SIMTIME << " Device '" << getID() << "' processEncounters()" << std::endl; + std::cout << "Currently present foes:\n"; + for (FoeInfoMap::const_iterator vi = foes.begin(); vi != foes.end(); ++vi) { + std::cout << vi->first->getID() << "\n"; + } + std::cout << std::endl; } - std::cout << std::endl; #endif // Run through active encounters. If corresponding foe is still present in foes update and @@ -571,9 +588,10 @@ MSDevice_SSM::qualifiesAsConflict(Encounter* e) { // Check if conflict measure thresholds are exceeded (to decide whether to keep the encounter for writing out) #ifdef DEBUG_SSM - std::cout << SIMTIME << " qualifiesAsConflict() for encounter of vehicles '" - << e->egoID << "' and '" << e->foeID - << "'" << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " qualifiesAsConflict() for encounter of vehicles '" + << e->egoID << "' and '" << e->foeID + << "'" << std::endl; #endif if (myComputePET && e->PET.value != INVALID && e->PET.value <= myThresholds["PET"]) { @@ -598,25 +616,51 @@ bool wasConflict = qualifiesAsConflict(e); if (wasConflict) { myPastConflicts.push(e); + +#ifdef DEBUG_SSM + if (!myPastConflicts.empty()) { + if (DEBUG_COND1(myHolderMS)) { + std::cout << "pastConflictsQueue of veh '" << myHolderMS->getID() << "':\n"; + } + auto myPastConflicts_bak = myPastConflicts; + double lastBegin = myPastConflicts.top()->begin; + while (!myPastConflicts.empty()) { + auto c = myPastConflicts.top(); + myPastConflicts.pop(); + if (DEBUG_COND1(myHolderMS)) { + std::cout << " Conflict with foe '" << c->foe << "' (time " << c->begin << "-" << c->end << ")\n"; + } + if (c->begin < lastBegin) { + std::cout << " Queue corrupt...\n"; + assert(false); + } + lastBegin = c->begin; + } + std::cout << std::endl; + myPastConflicts = myPastConflicts_bak; + } +#endif } else { delete e; } #ifdef DEBUG_SSM - std::cout << SIMTIME << " closeEncounter() of vehicles '" - << e->egoID << "' and '" << e->foeID - << "' (was ranked as " << (wasConflict ? "conflict" : "non-conflict") << ")" << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " closeEncounter() of vehicles '" + << e->egoID << "' and '" << e->foeID + << "' (was ranked as " << (wasConflict ? "conflict" : "non-conflict") << ")" << std::endl; #endif return; } -void +bool MSDevice_SSM::updateEncounter(Encounter* e, FoeInfo* foeInfo) { #ifdef DEBUG_SSM - std::cout << SIMTIME << " updateEncounter() of vehicles '" - << e->egoID << "' and '" << e->foeID - << "'" << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " updateEncounter() of vehicles '" + << e->egoID << "' and '" << e->foeID + << "'" << std::endl; #endif assert(e->foe != 0); @@ -627,16 +671,27 @@ // More details on follower/lead relation are determined in a second step below, see estimateConflictTimes() // If a crossing situation is ongoing (i.e. one of the vehicles entered the conflict area already in the last step, // this is handled by passedEncounter by only tracing the vehicle's movements) - // The further developement of the encounter type is done in checkConflictEntryAndExit() + // The further development of the encounter type is done in checkConflictEntryAndExit() eInfo.type = classifyEncounter(foeInfo, eInfo); + // Discard new encounters, where one vehicle has already left the conflict area + if (eInfo.encounter->size() == 0) { + if (eInfo.type == ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA + || eInfo.type == ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA) { + delete foeInfo; + // Signalize to discard + return false; + } + } + if (eInfo.type == ENCOUNTER_TYPE_NOCONFLICT_AHEAD) { // At this state, eInfo.type == ENCOUNTER_TYPE_NOCONFLICT_AHEAD implies that the foe // is either out of the device's range or its route does not interfere with the ego's route. #ifdef DEBUG_SSM - std::cout << SIMTIME << " Encounter of vehicles '" - << e->egoID << "' and '" << e->foeID - << "' does not imply any conflict." << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " Encounter of vehicles '" + << e->egoID << "' and '" << e->foeID + << "' does not imply any conflict." << std::endl; #endif updatePassedEncounter(e, foeInfo, eInfo); // return; @@ -678,7 +733,8 @@ // free foeInfo delete foeInfo; - + // Keep encounter + return true; } @@ -689,24 +745,28 @@ * In case of FOLLOWING it is the position of leader's back. */ #ifdef DEBUG_SSM - std::cout << SIMTIME << " determineConflictPoint()" << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << SIMTIME << " determineConflictPoint()" << std::endl; + } #endif const EncounterType& type = eInfo.type; const Encounter* e = eInfo.encounter; if (type == ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA || type == ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA - || type == ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA - || type == ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA || type == ENCOUNTER_TYPE_COLLISION) { + // Both vehicles have already past the conflict entry. + assert(e->size() > 0); // A new encounter should not be created if both vehicles already entered the conflict area eInfo.conflictPoint = e->conflictPointSpan.back(); } else if (type == ENCOUNTER_TYPE_CROSSING_FOLLOWER || type == ENCOUNTER_TYPE_MERGING_FOLLOWER - || type == ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA) { + || type == ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA + || type == ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA) { eInfo.conflictPoint = e->ego->getPositionAlongBestLanes(eInfo.egoConflictEntryDist); } else if (type == ENCOUNTER_TYPE_CROSSING_LEADER || type == ENCOUNTER_TYPE_MERGING_LEADER - || type == ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA) { + || type == ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA + || type == ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA) { eInfo.conflictPoint = e->foe->getPositionAlongBestLanes(eInfo.foeConflictEntryDist); } else if (type == ENCOUNTER_TYPE_FOLLOWING_FOLLOWER) { eInfo.conflictPoint = e->foe->getPosition(-e->foe->getLength()); @@ -714,13 +774,17 @@ eInfo.conflictPoint = e->ego->getPosition(-e->ego->getLength()); } else { #ifdef DEBUG_SSM - std::cout << "No conflict point associated with encounter type " << type << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << "No conflict point associated with encounter type " << type << std::endl; + } #endif return; } #ifdef DEBUG_SSM - std::cout << " Conflict at " << eInfo.conflictPoint << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Conflict at " << eInfo.conflictPoint << std::endl; + } #endif } @@ -733,13 +797,14 @@ assert(type != ENCOUNTER_TYPE_NOCONFLICT_AHEAD); // arrival times not defined, if no conflict is ahead. #ifdef DEBUG_SSM - std::cout << SIMTIME << " estimateConflictTimes() for ego '" << e->egoID << "' and foe '" << e->foeID << "'\n" - << " encounter type: " << eInfo.type << "\n" - << " egoConflictEntryDist=" << (eInfo.egoConflictEntryDist == INVALID ? "NA" : toString(eInfo.egoConflictEntryDist)) - << ", foeConflictEntryDist=" << (eInfo.foeConflictEntryDist == INVALID ? "NA" : toString(eInfo.foeConflictEntryDist)) - << "\n ego speed=" << e->ego->getSpeed() - << ", foe speed=" << e->foe->getSpeed() - << std::endl; + if (DEBUG_COND1(e->ego)) + std::cout << SIMTIME << " estimateConflictTimes() for ego '" << e->egoID << "' and foe '" << e->foeID << "'\n" + << " encounter type: " << eInfo.type << "\n" + << " egoConflictEntryDist=" << (eInfo.egoConflictEntryDist == INVALID ? "NA" : ::toString(eInfo.egoConflictEntryDist)) + << ", foeConflictEntryDist=" << (eInfo.foeConflictEntryDist == INVALID ? "NA" : ::toString(eInfo.foeConflictEntryDist)) + << "\n ego speed=" << e->ego->getSpeed() + << ", foe speed=" << e->foe->getSpeed() + << std::endl; #endif if (type == ENCOUNTER_TYPE_FOLLOWING_FOLLOWER || type == ENCOUNTER_TYPE_FOLLOWING_LEADER || type == ENCOUNTER_TYPE_MERGING_ADJACENT || type == ENCOUNTER_TYPE_ON_ADJACENT_LANES) { @@ -747,8 +812,9 @@ // TTC must take into account the movement of the leader, as would DRAC, PET doesn't need the time either, since it uses aposteriori // values. #ifdef DEBUG_SSM - std::cout << " encouter type " << type << " -> no entry/exit times to be calculated." - << std::endl; + if (DEBUG_COND1(e->ego)) + std::cout << " encouter type " << type << " -> no entry/exit times to be calculated." + << std::endl; #endif return; } @@ -763,7 +829,6 @@ // Determine exit distances if (type == ENCOUNTER_TYPE_MERGING) { - assert(type == ENCOUNTER_TYPE_MERGING); eInfo.egoConflictExitDist = eInfo.egoConflictEntryDist + e->ego->getVehicleType().getLength(); eInfo.foeConflictExitDist = eInfo.foeConflictEntryDist + e->foe->getVehicleType().getLength(); } else { @@ -788,10 +853,11 @@ } #ifdef DEBUG_SSM - std::cout << " Potential conflict type: " << (type == ENCOUNTER_TYPE_CROSSING ? "CROSSING" : "MERGING") << "\n" - << " egoConflictEntryTime=" << (eInfo.egoEstimatedConflictEntryTime == INVALID ? "INVALID" : toString(eInfo.egoEstimatedConflictEntryTime)) - << ", foeConflictEntryTime=" << (eInfo.foeEstimatedConflictEntryTime == INVALID ? "INVALID" : toString(eInfo.foeEstimatedConflictEntryTime)) - << std::endl; + if (DEBUG_COND1(e->ego)) + std::cout << " Conflict type: " << toString(type) << "\n" + << " egoConflictEntryTime=" << (eInfo.egoEstimatedConflictEntryTime == INVALID ? "INVALID" : ::toString(eInfo.egoEstimatedConflictEntryTime)) + << ", foeConflictEntryTime=" << (eInfo.foeEstimatedConflictEntryTime == INVALID ? "INVALID" : ::toString(eInfo.foeEstimatedConflictEntryTime)) + << std::endl; #endif // Estimate exit times from conflict area for leader / follower. @@ -824,17 +890,19 @@ } else if (eInfo.egoEstimatedConflictEntryTime < eInfo.foeEstimatedConflictEntryTime) { // ego is estimated first at conflict point #ifdef DEBUG_SSM - std::cout << " -> ego is estimated leader at conflict entry." - << " egoConflictExitTime=" << (eInfo.egoEstimatedConflictExitTime == INVALID ? "NA" : toString(eInfo.egoEstimatedConflictExitTime)) - << std::endl; + if (DEBUG_COND1(e->ego)) + std::cout << " -> ego is estimated leader at conflict entry." + << " egoConflictExitTime=" << (eInfo.egoEstimatedConflictExitTime == INVALID ? "NA" : ::toString(eInfo.egoEstimatedConflictExitTime)) + << std::endl; #endif type = type == ENCOUNTER_TYPE_CROSSING ? ENCOUNTER_TYPE_CROSSING_LEADER : ENCOUNTER_TYPE_MERGING_LEADER; } else { // ego is estimated second at conflict point #ifdef DEBUG_SSM - std::cout << " -> foe is estimated leader at conflict entry." - << " foeConflictExitTime=" << (eInfo.foeEstimatedConflictExitTime == INVALID ? "NA" : toString(eInfo.foeEstimatedConflictExitTime)) - << std::endl; + if (DEBUG_COND1(e->ego)) + std::cout << " -> foe is estimated leader at conflict entry." + << " foeConflictExitTime=" << (eInfo.foeEstimatedConflictExitTime == INVALID ? "NA" : ::toString(eInfo.foeEstimatedConflictExitTime)) + << std::endl; #endif type = type == ENCOUNTER_TYPE_CROSSING ? ENCOUNTER_TYPE_CROSSING_FOLLOWER : ENCOUNTER_TYPE_MERGING_FOLLOWER; } @@ -846,10 +914,12 @@ void MSDevice_SSM::computeSSMs(EncounterApproachInfo& eInfo) const { #ifdef DEBUG_SSM - Encounter* e = eInfo.encounter; - std::cout << SIMTIME << " computeSSMs() for vehicles '" - << e->ego->getID() << "' and '" << e->foe->getID() - << "'" << std::endl; + if (DEBUG_COND1(myHolderMS)) { + Encounter* e = eInfo.encounter; + std::cout << SIMTIME << " computeSSMs() for vehicles '" + << e->ego->getID() << "' and '" << e->foe->getID() + << "'" << std::endl; + } #endif const EncounterType& type = eInfo.type; @@ -883,11 +953,14 @@ } #ifdef DEBUG_SSM - std::cout << "computeSSMs() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "':\n" - << " ttc=" << (eInfo.ttc == INVALID ? "INVALID" : toString(eInfo.ttc)) - << ", drac=" << (eInfo.drac == INVALID ? "INVALID" : toString(eInfo.drac)) - << ", pet=" << (eInfo.pet.second == INVALID ? "INVALID" : toString(eInfo.pet.second)) - << std::endl; + if (DEBUG_COND1(myHolderMS)) { + Encounter* e = eInfo.encounter; + std::cout << "computeSSMs() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "':\n" + << " ttc=" << (eInfo.ttc == INVALID ? "INVALID" : ::toString(eInfo.ttc)) + << ", drac=" << (eInfo.drac == INVALID ? "INVALID" : ::toString(eInfo.drac)) + << ", pet=" << (eInfo.pet.second == INVALID ? "INVALID" : ::toString(eInfo.pet.second)) + << std::endl; + } #endif } @@ -902,8 +975,9 @@ std::pair& pet = eInfo.pet; #ifdef DEBUG_SSM - std::cout << SIMTIME << " determinePET() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "'" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " determinePET() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "'" + << "(type: " << toString(static_cast(e->typeSpan.back())) << ")" << std::endl; #endif if (type == ENCOUNTER_TYPE_FOLLOWING_FOLLOWER || type == ENCOUNTER_TYPE_FOLLOWING_LEADER) { @@ -916,8 +990,9 @@ EncounterType prevType = static_cast(e->typeSpan.back()); if (prevType == ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA) { #ifdef DEBUG_SSM - std::cout << "PET for crossing encounter already calculated as " << e->PET.value - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "PET for crossing encounter already calculated as " << e->PET.value + << std::endl; #endif // pet must have been calculated already assert(e->PET.value != INVALID); @@ -935,37 +1010,38 @@ #ifdef DEBUG_SSM - std::cout << "e->egoDistsToConflict.back() = " << e->egoDistsToConflict.back() - << "\ne->egoConflictEntryTime = " << e->egoConflictEntryTime - << "\ne->egoConflictExitTime = " << e->egoConflictExitTime - << "\ne->foeDistsToConflict.back() = " << e->foeDistsToConflict.back() - << "\ne->foeConflictEntryTime = " << e->foeConflictEntryTime - << "\ne->foeConflictExitTime = " << e->foeConflictExitTime - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "e->egoDistsToConflict.back() = " << e->egoDistsToConflict.back() + << "\ne->egoConflictEntryTime = " << e->egoConflictEntryTime + << "\ne->egoConflictExitTime = " << e->egoConflictExitTime + << "\ne->foeDistsToConflict.back() = " << e->foeDistsToConflict.back() + << "\ne->foeConflictEntryTime = " << e->foeConflictEntryTime + << "\ne->foeConflictExitTime = " << e->foeConflictExitTime + << std::endl; #endif - assert(e->foeConflictEntryTime != INVALID); - assert(e->egoConflictEntryTime != INVALID); + // But both have passed the conflict area + assert(e->egoConflictEntryTime != INVALID || e->foeConflictEntryTime != INVALID); - // Both have passed the conflict area - assert(e->foeConflictExitTime != INVALID && e->egoConflictExitTime != INVALID); - // both have left the conflict region already - if (e->egoConflictEntryTime > e->foeConflictExitTime) { + // Both have left the conflict region + // (Conflict may have started as one was already within the conflict area - thus the check for INVALID entry times) + if (e->foeConflictEntryTime == INVALID || (e->egoConflictEntryTime != INVALID && e->egoConflictEntryTime > e->foeConflictExitTime)) { pet.first = e->egoConflictEntryTime; pet.second = e->egoConflictEntryTime - e->foeConflictExitTime; - } else if (e->foeConflictEntryTime > e->egoConflictExitTime) { + } else if (e->egoConflictEntryTime == INVALID || (e->egoConflictEntryTime != INVALID && e->foeConflictEntryTime > e->egoConflictExitTime)) { pet.first = e->foeConflictEntryTime; pet.second = e->foeConflictEntryTime - e->egoConflictExitTime; } else { - #ifdef DEBUG_SSM - std::cout << "Unexpected branch in determinePET: Both passed conflict area in the same step." - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "Unexpected branch in determinePET: Both passed conflict area in the same step." + << std::endl; #endif pet.first = INVALID; pet.second = INVALID; assert(prevType != ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA && prevType != ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA); + assert(false); // let this fail for debug build } // Reset entry and exit times two allow an eventual subsequent re-use @@ -975,14 +1051,16 @@ e->foeConflictExitTime = INVALID; #ifdef DEBUG_SSM - std::cout << "Calculated PET = " << pet.second << " (at t=" << pet.first << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "Calculated PET = " << pet.second << " (at t=" << pet.first << ")" + << std::endl; #endif } else { // other cases (merging and pre-crossing situations) do not correspond to a PET calculation. #ifdef DEBUG_SSM - std::cout << "PET unappropriate for merging and pre-crossing situations. No calculation performed." - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "PET unappropriate for merging and pre-crossing situations. No calculation performed." + << std::endl; #endif return; } @@ -997,8 +1075,9 @@ double& drac = eInfo.drac; #ifdef DEBUG_SSM - std::cout << SIMTIME << " determineTTCandDRAC() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "' (type = " << eInfo.type << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " determineTTCandDRAC() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "' (type = " << eInfo.type << ")" + << std::endl; #endif // Dependent on the actual encounter situation (eInfo.type) calculate the TTC. @@ -1032,12 +1111,13 @@ double foeExitTime = e->foe->getSpeed() > 0 ? eInfo.foeConflictExitDist / e->foe->getSpeed() : INVALID; #ifdef DEBUG_SSM - std::cout << " Conflict times with constant speed extrapolation for merging situation:\n " - << " egoEntryTime=" << (egoEntryTime == INVALID ? "NA" : toString(egoEntryTime)) - << ", egoExitTime=" << (egoExitTime == INVALID ? "NA" : toString(egoExitTime)) - << ", foeEntryTime=" << (foeEntryTime == INVALID ? "NA" : toString(foeEntryTime)) - << ", foeExitTime=" << (foeExitTime == INVALID ? "NA" : toString(foeExitTime)) - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << " Conflict times with constant speed extrapolation for merging situation:\n " + << " egoEntryTime=" << (egoEntryTime == INVALID ? "NA" : ::toString(egoEntryTime)) + << ", egoExitTime=" << (egoExitTime == INVALID ? "NA" : ::toString(egoExitTime)) + << ", foeEntryTime=" << (foeEntryTime == INVALID ? "NA" : ::toString(foeEntryTime)) + << ", foeExitTime=" << (foeExitTime == INVALID ? "NA" : ::toString(foeExitTime)) + << std::endl; #endif // based on that, we obtain @@ -1046,7 +1126,9 @@ ttc = INVALID; drac = INVALID; #ifdef DEBUG_SSM - std::cout << " No TTC and DRAC computed as one vehicle is stopped." << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << " No TTC and DRAC computed as one vehicle is stopped." << std::endl; + } #endif return; } @@ -1072,8 +1154,9 @@ // if (myComputeDRAC) drac = computeDRAC(eInfo); #ifdef DEBUG_SSM - std::cout << " Extrapolation predicts collision *at* merge point with TTC=" << ttc - << ", drac=" << drac << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << " Extrapolation predicts collision *at* merge point with TTC=" << ttc + << ", drac=" << drac << std::endl; #endif } else { @@ -1101,14 +1184,16 @@ } } #ifdef DEBUG_SSM - if (ttc == INVALID) { - // assert(dv >= 0); - assert(drac == INVALID); - std::cout << " Extrapolation does not predict any collision." << std::endl; - } else { - std::cout << " Extrapolation predicts collision *after* merge point with TTC=" - << (ttc == INVALID ? "NA" : toString(ttc)) - << ", drac=" << (drac == INVALID ? "NA" : toString(drac)) << std::endl; + if (DEBUG_COND1(myHolderMS)) { + if (ttc == INVALID) { + // assert(dv >= 0); + assert(drac == INVALID || drac == 0.0); + std::cout << " Extrapolation does not predict any collision." << std::endl; + } else { + std::cout << " Extrapolation predicts collision *after* merge point with TTC=" + << (ttc == INVALID ? "NA" : ::toString(ttc)) + << ", drac=" << (drac == INVALID ? "NA" : ::toString(drac)) << std::endl; + } } #endif @@ -1146,15 +1231,18 @@ } } else { #ifdef DEBUG_SSM - std::stringstream ss; - ss << "'" << type << "'"; - WRITE_WARNING("Underspecified or unknown encounter type in MSDevice_SSM::determineTTCandDRAC(): " + ss.str()); + if (DEBUG_COND1(myHolderMS)) { + std::stringstream ss; + ss << "'" << type << "'"; + WRITE_WARNING("Underspecified or unknown encounter type in MSDevice_SSM::determineTTCandDRAC(): " + ss.str()); + } #endif } #ifdef DEBUG_SSM - std::cout << "ttc=" << (ttc == INVALID ? "INVALID" : toString(ttc)) << ", drac=" << (drac == INVALID ? "INVALID" : toString(drac)) - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "ttc=" << (ttc == INVALID ? "INVALID" : ::toString(ttc)) << ", drac=" << (drac == INVALID ? "INVALID" : ::toString(drac)) + << std::endl; #endif } @@ -1165,8 +1253,9 @@ // (currently only the cross section corresponding to the target lane's begin is considered) // More specifically, the minimum has to be taken from the two if a collision at merge was predicted. #ifdef DEBUG_SSM - std::cout << "computeTTC() with gap=" << gap << ", followerSpeed=" << followerSpeed << ", leaderSpeed=" << leaderSpeed - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "computeTTC() with gap=" << gap << ", followerSpeed=" << followerSpeed << ", leaderSpeed=" << leaderSpeed + << std::endl; #endif if (gap <= 0.) { return 0.; // collision already happend @@ -1182,10 +1271,11 @@ double MSDevice_SSM::computeDRAC(double gap, double followerSpeed, double leaderSpeed) { -#ifdef DEBUG_SSM_DRAC - std::cout << "computeDRAC() with gap=" << gap << ", followerSpeed=" << followerSpeed << ", leaderSpeed=" << leaderSpeed - << std::endl; -#endif +//#ifdef DEBUG_SSM_DRAC +// if (DEBUG_COND) +// std::cout << "computeDRAC() with gap=" << gap << ", followerSpeed=" << followerSpeed << ", leaderSpeed=" << leaderSpeed +// << std::endl; +//#endif if (gap <= 0.) { return INVALID; // collision! } @@ -1211,25 +1301,30 @@ double tExit1 = eInfo.egoEstimatedConflictExitTime; double tExit2 = eInfo.foeEstimatedConflictExitTime; #ifdef DEBUG_SSM_DRAC - std::cout << SIMTIME << "computeDRAC() with" - << "\ndEntry1=" << dEntry1 << ", dEntry2=" << dEntry2 - << ", dExit1=" << dExit1 << ", dExit2=" << dExit2 - << ",\nv1=" << v1 << ", v2=" << v2 - << "\ntEntry1=" << (tEntry1 == INVALID ? "NA" : toString(tEntry1)) << ", tEntry2=" << (tEntry2 == INVALID ? "NA" : toString(tEntry2)) - << ", tExit1=" << (tExit1 == INVALID ? "NA" : toString(tExit1)) << ", tExit2=" << (tExit2 == INVALID ? "NA" : toString(tExit2)) - << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) + std::cout << SIMTIME << "computeDRAC() with" + << "\ndEntry1=" << dEntry1 << ", dEntry2=" << dEntry2 + << ", dExit1=" << dExit1 << ", dExit2=" << dExit2 + << ",\nv1=" << v1 << ", v2=" << v2 + << "\ntEntry1=" << (tEntry1 == INVALID ? "NA" : ::toString(tEntry1)) << ", tEntry2=" << (tEntry2 == INVALID ? "NA" : ::toString(tEntry2)) + << ", tExit1=" << (tExit1 == INVALID ? "NA" : ::toString(tExit1)) << ", tExit2=" << (tExit2 == INVALID ? "NA" : ::toString(tExit2)) + << std::endl; #endif if (dExit1 <= 0. || dExit2 <= 0.) { // At least one vehicle already left or is not about to enter conflict area at all => no breaking needed. #ifdef DEBUG_SSM_DRAC - std::cout << "One already left conflict area -> drac == 0." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << "One already left conflict area -> drac == 0." << std::endl; + } #endif return 0.; } if (dEntry1 <= 0. && dEntry2 <= 0.) { // collision... (both already entered conflict area but none left) #ifdef DEBUG_SSM_DRAC - std::cout << "Both entered conflict area but neither left. -> collision!" << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << "Both entered conflict area but neither left. -> collision!" << std::endl; + } #endif return INVALID; } @@ -1238,13 +1333,17 @@ if (dEntry1 > 0.) { // vehicle 1 could break #ifdef DEBUG_SSM_DRAC - std::cout << "Ego could break..." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << "Ego could break..." << std::endl; + } #endif if (tExit2 != INVALID) { // Vehicle 2 is expected to leave conflict area at t2 drac = MIN2(drac, 2 * (v1 - dEntry1 / tExit2) / tExit2); #ifdef DEBUG_SSM_DRAC - std::cout << " Foe expected to leave in " << tExit2 << "-> Ego needs drac=" << drac << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Foe expected to leave in " << tExit2 << "-> Ego needs drac=" << drac << std::endl; + } #endif } else { // Vehicle 2 is expected to stop on conflict area or earlier @@ -1252,12 +1351,16 @@ // ... on conflict area => veh1 has to stop before entry drac = MIN2(drac, computeDRAC(dEntry1, v1, 0)); #ifdef DEBUG_SSM_DRAC - std::cout << " Foe is expected stop on conflict area -> Ego needs drac=" << drac << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Foe is expected stop on conflict area -> Ego needs drac=" << drac << std::endl; + } #endif } else { // ... before conflict area #ifdef DEBUG_SSM_DRAC - std::cout << " Foe is expected stop before conflict area -> no drac computation for ego (will be done for foe if applicable)" << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Foe is expected stop before conflict area -> no drac computation for ego (will be done for foe if applicable)" << std::endl; + } #endif } } @@ -1266,12 +1369,16 @@ if (dEntry2 > 0.) { // vehicle 2 could break #ifdef DEBUG_SSM_DRAC - std::cout << "Foe could break..." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << "Foe could break..." << std::endl; + } #endif if (tExit1 != INVALID) { // Vehicle 1 is expected to leave conflict area at t1 #ifdef DEBUG_SSM_DRAC - std::cout << " Ego expected to leave in " << tExit1 << "-> Foe needs drac=" << (2 * (v2 - dEntry2 / tExit1) / tExit1) << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Ego expected to leave in " << tExit1 << "-> Foe needs drac=" << (2 * (v2 - dEntry2 / tExit1) / tExit1) << std::endl; + } #endif drac = MIN2(drac, 2 * (v2 - dEntry2 / tExit1) / tExit1); } else { @@ -1279,13 +1386,17 @@ if (tEntry1 != INVALID) { // ... on conflict area => veh2 has to stop before entry #ifdef DEBUG_SSM_DRAC - std::cout << " Ego is expected stop on conflict area -> Foe needs drac=" << computeDRAC(dEntry2, v2, 0) << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Ego is expected stop on conflict area -> Foe needs drac=" << computeDRAC(dEntry2, v2, 0) << std::endl; + } #endif drac = MIN2(drac, computeDRAC(dEntry2, v2, 0)); } else { // ... before conflict area #ifdef DEBUG_SSM_DRAC - std::cout << " Ego is expected stop before conflict area -> no drac computation for foe (done for ego if applicable)" << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Ego is expected stop before conflict area -> no drac computation for foe (done for ego if applicable)" << std::endl; + } #endif } } @@ -1300,9 +1411,53 @@ Encounter* e = eInfo.encounter; #ifdef DEBUG_SSM - std::cout << SIMTIME << " checkConflictEntryAndExit() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "'" << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << SIMTIME << " checkConflictEntryAndExit() for encounter of vehicles '" << e->egoID << "' and '" << e->foeID << "'" << std::endl; + } #endif + const bool foePastConflictEntry = eInfo.foeConflictEntryDist < 0.0; + const bool egoPastConflictEntry = eInfo.egoConflictEntryDist < 0.0; + const bool foePastConflictExit = eInfo.foeConflictEntryDist < 0.0; + const bool egoPastConflictExit = eInfo.egoConflictEntryDist < 0.0; + + + if (e->size() == 0) { + // This is a new conflict + + // An encounter should be created earlier than when both already entered the conflict area. + // TODO: Check! If this does not fail, the case distinctions can be simplified to a large degree! + assert(!foePastConflictEntry || !egoPastConflictEntry); + + if (egoPastConflictExit) { + if (foePastConflictExit) { + eInfo.type = ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA; + } else if (foePastConflictEntry) { + eInfo.type = ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA; + } else { + eInfo.type = ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA; + } + } else if (foePastConflictExit) { + if (egoPastConflictEntry) { + eInfo.type = ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA; + } else { + eInfo.type = ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA; + } + } else { + // No one left conflict area + if (egoPastConflictEntry) { + if (foePastConflictEntry) { + eInfo.type = ENCOUNTER_TYPE_COLLISION; + } else { + eInfo.type = ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA; + } + } else if (foePastConflictEntry) { + eInfo.type = ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA; + } + } + return; + } + // Distances to conflict area boundaries in previous step double prevEgoConflictEntryDist = eInfo.egoConflictEntryDist + e->ego->getLastStepDist(); double prevFoeConflictEntryDist = eInfo.foeConflictEntryDist + e->foe->getLastStepDist(); @@ -1310,22 +1465,14 @@ double prevFoeConflictExitDist = prevFoeConflictEntryDist + eInfo.foeConflictAreaLength + e->foe->getLength(); EncounterType prevType = e->currentType; - if (e->timeSpan.size() == 0) { - // Encounter has just been created, no data points yet. - // If a vehicle was already beyond conflict area boundary in last step, we set the passing time to the previous time step - prevEgoConflictEntryDist = MAX2(prevEgoConflictEntryDist, 0.); - prevFoeConflictEntryDist = MAX2(prevFoeConflictEntryDist, 0.); - prevEgoConflictExitDist = MAX2(prevEgoConflictExitDist, 0.); - prevFoeConflictExitDist = MAX2(prevFoeConflictExitDist, 0.); - } - - // Check if ego entered in last step - if (e->egoConflictEntryTime == INVALID && eInfo.egoConflictEntryDist < 0 && prevEgoConflictEntryDist >= 0) { + if (e->egoConflictEntryTime == INVALID && egoPastConflictEntry && prevEgoConflictEntryDist >= 0) { // ego must have entered the conflict in the last step. Determine exact entry time e->egoConflictEntryTime = SIMTIME - TS + MSCFModel::passingTime(-prevEgoConflictEntryDist, 0., -eInfo.egoConflictEntryDist, e->ego->getPreviousSpeed(), e->ego->getSpeed()); #ifdef DEBUG_SSM - std::cout << " ego entered conflict area at t=" << e->egoConflictEntryTime << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " ego entered conflict area at t=" << e->egoConflictEntryTime << std::endl; + } #endif // Update encounter type (only done here for entering, the other transitions are done in updatePassedEncounter) if (prevType == ENCOUNTER_TYPE_CROSSING_FOLLOWER @@ -1335,11 +1482,13 @@ } // Check if foe entered in last step - if (e->foeConflictEntryTime == INVALID && eInfo.foeConflictEntryDist < 0. && prevFoeConflictEntryDist >= 0) { + if (e->foeConflictEntryTime == INVALID && foePastConflictEntry && prevFoeConflictEntryDist >= 0) { // foe must have entered the conflict in the last step. Determine exact entry time e->foeConflictEntryTime = SIMTIME - TS + MSCFModel::passingTime(-prevFoeConflictEntryDist, 0., -eInfo.foeConflictEntryDist, e->foe->getPreviousSpeed(), e->foe->getSpeed()); #ifdef DEBUG_SSM - std::cout << " foe entered conflict area at t=" << e->foeConflictEntryTime << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " foe entered conflict area at t=" << e->foeConflictEntryTime << std::endl; + } #endif // Update encounter type (only done here for entering, the other transitions are done in updatePassedEncounter) if (prevType == ENCOUNTER_TYPE_CROSSING_FOLLOWER @@ -1355,7 +1504,9 @@ // Add cross section to calculate PET for foe // e->foePETCrossSections.push_back(std::make_pair(eInfo.foeConflictEntryCrossSection, e->egoConflictExitTime)); #ifdef DEBUG_SSM - std::cout << " ego left conflict area at t=" << e->egoConflictExitTime << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " ego left conflict area at t=" << e->egoConflictExitTime << std::endl; + } #endif // Update encounter type (only done here for entering, the other transitions are done in updatePassedEncounter) if (prevType == ENCOUNTER_TYPE_CROSSING_FOLLOWER @@ -1371,7 +1522,9 @@ // Add cross section to calculate PET for ego // e->egoPETCrossSections.push_back(std::make_pair(eInfo.egoConflictEntryCrossSection, e->foeConflictExitTime)); #ifdef DEBUG_SSM - std::cout << " foe left conflict area at t=" << e->foeConflictExitTime << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " foe left conflict area at t=" << e->foeConflictExitTime << std::endl; + } #endif // Update encounter type (only done here for entering, the other transitions are done in updatePassedEncounter) if (prevType == ENCOUNTER_TYPE_CROSSING_FOLLOWER @@ -1386,18 +1539,20 @@ MSDevice_SSM::updatePassedEncounter(Encounter* e, FoeInfo* foeInfo, EncounterApproachInfo& eInfo) { #ifdef DEBUG_SSM - std::cout << SIMTIME << " updatePassedEncounter() for vehicles '" - << e->egoID << "' and '" << e->foeID << "'" - << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) + std::cout << SIMTIME << " updatePassedEncounter() for vehicles '" + << e->egoID << "' and '" << e->foeID << "'" + << std::endl; #endif if (foeInfo == nullptr) { // the foe is out of the device's range, proceed counting down the remaining extra time to trace e->countDownExtraTime(TS); #ifdef DEBUG_SSM - std::cout << " Foe is out of range. Counting down extra time." - << " Remaining seconds before closing encounter: " << e->getRemainingExtraTime() - << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) + std::cout << " Foe is out of range. Counting down extra time." + << " Remaining seconds before closing encounter: " << e->getRemainingExtraTime() + << std::endl; #endif } else { @@ -1412,7 +1567,9 @@ if (lastPotentialConflictType == ENCOUNTER_TYPE_NOCONFLICT_AHEAD) { // This encounter was no conflict in the last step -> remains so #ifdef DEBUG_SSM - std::cout << " This encounter wasn't classified as a potential conflict lately." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " This encounter wasn't classified as a potential conflict lately." << std::endl; + } #endif if (foeInfo == nullptr) { // Encounter was either never a potential conflict and foe is out of range @@ -1420,7 +1577,9 @@ // -> no use in further tracing this encounter e->closingRequested = true; #ifdef DEBUG_SSM - std::cout << " Closing encounter." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Closing encounter." << std::endl; + } #endif eInfo.type = ENCOUNTER_TYPE_NOCONFLICT_AHEAD; } @@ -1430,7 +1589,9 @@ // if a following situation leads to a no-conflict situation this encounter switches no-conflict, since no further computations (PET) are needed. eInfo.type = ENCOUNTER_TYPE_FOLLOWING_PASSED; #ifdef DEBUG_SSM - std::cout << " Encounter was previously classified as a follow/lead situation." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Encounter was previously classified as a follow/lead situation." << std::endl; + } #endif } else if (lastPotentialConflictType == ENCOUNTER_TYPE_MERGING_FOLLOWER || lastPotentialConflictType == ENCOUNTER_TYPE_MERGING_LEADER @@ -1439,7 +1600,9 @@ // or route- or lane-changes removed the conflict. eInfo.type = ENCOUNTER_TYPE_MERGING_PASSED; #ifdef DEBUG_SSM - std::cout << " Encounter was previously classified as a merging situation." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Encounter was previously classified as a merging situation." << std::endl; + } #endif } if (lastPotentialConflictType == ENCOUNTER_TYPE_CROSSING_FOLLOWER @@ -1454,7 +1617,9 @@ // Encounter has been a crossing situation. #ifdef DEBUG_SSM - std::cout << " Encounter was previously classified as a crossing situation of type " << lastPotentialConflictType << "." << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Encounter was previously classified as a crossing situation of type " << lastPotentialConflictType << "." << std::endl; + } #endif // For passed encounters, the xxxConflictAreaLength variables are not determined before -> we use the stored values. @@ -1472,11 +1637,12 @@ eInfo.foeConflictExitDist = eInfo.foeConflictEntryDist + eInfo.foeConflictAreaLength + e->foe->getLength(); #ifdef DEBUG_SSM - std::cout << " egoConflictEntryDist = " << eInfo.egoConflictEntryDist - << ", egoConflictExitDist = " << eInfo.egoConflictExitDist - << "\n foeConflictEntryDist = " << eInfo.foeConflictEntryDist - << ", foeConflictExitDist = " << eInfo.foeConflictExitDist - << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) + std::cout << " egoConflictEntryDist = " << eInfo.egoConflictEntryDist + << ", egoConflictExitDist = " << eInfo.egoConflictExitDist + << "\n foeConflictEntryDist = " << eInfo.foeConflictEntryDist + << ", foeConflictExitDist = " << eInfo.foeConflictExitDist + << std::endl; #endif // Determine actual encounter type @@ -1522,7 +1688,9 @@ // TODO: adjust the conflict distances according to lateral movement for single ENTERED-cases #ifdef DEBUG_SSM - std::cout << " Updated classification: " << eInfo.type << std::endl; + if (DEBUG_COND1(eInfo.encounter->ego)) { + std::cout << " Updated classification: " << eInfo.type << std::endl; + } #endif } } @@ -1531,7 +1699,9 @@ MSDevice_SSM::EncounterType MSDevice_SSM::classifyEncounter(const FoeInfo* foeInfo, EncounterApproachInfo& eInfo) const { #ifdef DEBUG_SSM - std::cout << "classifyEncounter() called." << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "classifyEncounter() called." << std::endl; + } #endif if (foeInfo == nullptr) { // foeInfo == 0 signalizes, that no corresponding foe info was returned by findSurroundingVehicles(), @@ -1553,7 +1723,9 @@ // -> Merely trace the change of distances to the conflict entry / exit // -> Derefer this to updatePassedEncounter, where this is done anyhow. #ifdef DEBUG_SSM - std::cout << " Ongoing crossing conflict will be traced by passedEncounter()." << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << " Ongoing crossing conflict will be traced by passedEncounter()." << std::endl; + } #endif return prevType; } @@ -1572,11 +1744,12 @@ const MSLane* foeConflictLane = findFoeConflictLane(e->foe, foeInfo->egoConflictLane, foeDistToConflictLane); #ifdef DEBUG_SSM - std::cout << "egoConflictLane: '" << (egoConflictLane == 0 ? "NULL" : egoConflictLane->getID()) << "'\n" - << "foeConflictLane: '" << (foeConflictLane == 0 ? "NULL" : foeConflictLane->getID()) << "'" - << "\nEgo's distance to conflict lane: " << egoDistToConflictLane - << "\nFoe's distance to conflict lane: " << foeDistToConflictLane - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "egoConflictLane: '" << (egoConflictLane == 0 ? "NULL" : egoConflictLane->getID()) << "'\n" + << "foeConflictLane: '" << (foeConflictLane == 0 ? "NULL" : foeConflictLane->getID()) << "'" + << "\nEgo's distance to conflict lane: " << egoDistToConflictLane + << "\nFoe's distance to conflict lane: " << foeDistToConflictLane + << std::endl; #endif // Treat different cases for foeConflictLane and egoConflictLane (internal or non-internal / equal to egoLane or to foeLane), @@ -1594,7 +1767,9 @@ // foe vehicle is not on course towards the ego's route (see findFoeConflictLane) type = ENCOUNTER_TYPE_NOCONFLICT_AHEAD; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: No conflict." << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: No conflict." << std::endl; + } #endif } else if (!egoConflictLane->isInternal()) { // The conflict lane is non-internal, therefore we either have no potential conflict or a lead/follow situation (i.e., no crossing or merging) @@ -1610,14 +1785,18 @@ eInfo.egoConflictEntryDist = e->foe->getBackPositionOnLane() - e->ego->getPositionOnLane(); } #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Lead/follow-situation on non-internal lane '" << egoLane->getID() << "'" << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: Lead/follow-situation on non-internal lane '" << egoLane->getID() << "'" << std::endl; + } #endif } else if (&(foeLane->getEdge()) == &(egoLane->getEdge())) { // Foe is on the same non-internal edge but not on the same lane. Treat this as no conflict for now // XXX: this disregards conflicts for vehicles on adjacent lanes type = ENCOUNTER_TYPE_ON_ADJACENT_LANES; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: " << type << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: " << type << std::endl; + } #endif } else { assert(&(egoLane->getEdge()) == &(foeConflictLane->getEdge())); @@ -1628,16 +1807,19 @@ eInfo.foeConflictEntryDist = foeDistToConflictLane + e->ego->getBackPositionOnLane(); #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.foeConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.foeConflictEntryDist << ")" + << std::endl; #endif } else { // Foe's route leads to an adjacent lane of the current lane of the ego type = ENCOUNTER_TYPE_ON_ADJACENT_LANES; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: " << type << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: " << type << std::endl; + } #endif } } @@ -1652,16 +1834,19 @@ type = ENCOUNTER_TYPE_FOLLOWING_FOLLOWER; eInfo.egoConflictEntryDist = egoDistToConflictLane + e->foe->getBackPositionOnLane(); #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.egoConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.egoConflictEntryDist << ")" + << std::endl; #endif } else { // Ego's route leads to an adjacent lane of the current lane of the foe type = ENCOUNTER_TYPE_ON_ADJACENT_LANES; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: " << type << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: " << type << std::endl; + } #endif } } @@ -1676,7 +1861,9 @@ // XXX: this disregards conflicts for vehicles on adjacent internal lanes type = ENCOUNTER_TYPE_ON_ADJACENT_LANES; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: " << type << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: " << type << std::endl; + } #endif } else { // Lead / follow situation on connection @@ -1685,20 +1872,22 @@ type = ENCOUNTER_TYPE_FOLLOWING_LEADER; eInfo.foeConflictEntryDist = foeDistToConflictLane + e->ego->getBackPositionOnLane(); #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.foeConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.foeConflictEntryDist << ")" + << std::endl; #endif } else if (egoLane != egoConflictLane && foeLane == foeConflictLane) { // foe on junction, ego not yet type = ENCOUNTER_TYPE_FOLLOWING_FOLLOWER; eInfo.egoConflictEntryDist = egoDistToConflictLane + e->foe->getBackPositionOnLane(); #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.egoConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.egoConflictEntryDist << ")" + << std::endl; #endif } else { // Both must be already on the junction in a lead / follow situation on a connection @@ -1712,25 +1901,29 @@ type = ENCOUNTER_TYPE_FOLLOWING_LEADER; eInfo.foeConflictEntryDist = foeDistToConflictLane + e->ego->getBackPositionOnLane(); #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.foeConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.foeConflictEntryDist << ")" + << std::endl; #endif } else { type = ENCOUNTER_TYPE_FOLLOWING_FOLLOWER; eInfo.egoConflictEntryDist = egoDistToConflictLane + e->foe->getBackPositionOnLane(); #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.egoConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.egoConflictEntryDist << ")" + << std::endl; #endif } } else { // ego and foe on distinct, consecutive internal lanes #ifdef DEBUG_SSM - std::cout << " Lead/follow situation on consecutive internal lanes." << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << " Lead/follow situation on consecutive internal lanes." << std::endl; + } #endif MSLane* lane = egoEntryLink->getViaLane(); #ifdef _MSC_VER @@ -1756,10 +1949,11 @@ eInfo.egoConflictEntryDist += e->foe->getBackPositionOnLane(); egoConflictLane = lane; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.egoConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' follows foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.egoConflictEntryDist << ")" + << std::endl; #endif break; } else if (foeLane == lane) { @@ -1775,10 +1969,11 @@ eInfo.foeConflictEntryDist += e->ego->getBackPositionOnLane(); foeConflictLane = lane; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << " (gap = " << eInfo.foeConflictEntryDist << ")" - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' leads foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << " (gap = " << eInfo.foeConflictEntryDist << ")" + << std::endl; #endif break; } @@ -1787,8 +1982,9 @@ } } #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Lead/follow-situation on connection from '" << egoEntryLink->getLaneBefore()->getID() - << "' to '" << egoEntryLink->getLane()->getID() << "'" << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Lead/follow-situation on connection from '" << egoEntryLink->getLaneBefore()->getID() + << "' to '" << egoEntryLink->getLane()->getID() << "'" << std::endl; #endif } } @@ -1799,7 +1995,7 @@ const std::vector& foeFoeLinks = foeEntryLink->getFoeLinks(); // Determine whether ego and foe links are foes bool crossOrMerge = (find(egoFoeLinks.begin(), egoFoeLinks.end(), foeEntryLink) != egoFoeLinks.end() - || find(foeFoeLinks.begin(), foeFoeLinks.end(), egoEntryLink) != foeFoeLinks.end()); + || std::find(foeFoeLinks.begin(), foeFoeLinks.end(), egoEntryLink) != foeFoeLinks.end()); if (!crossOrMerge) { // if (&(foeEntryLink->getLane()->getEdge()) == &(egoEntryLink->getLane()->getEdge())) { // // XXX: the situation of merging into adjacent lanes is disregarded for now <- the alleged situation appears to imply crossOrMerge!!! @@ -1810,7 +2006,9 @@ // } else { type = ENCOUNTER_TYPE_NOCONFLICT_AHEAD; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: No conflict." << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: No conflict." << std::endl; + } #endif // } } else if (&(foeEntryLink->getLane()->getEdge()) == &(egoEntryLink->getLane()->getEdge())) { @@ -1819,16 +2017,19 @@ eInfo.egoConflictEntryDist = egoDistToConflictLane + egoEntryLink->getInternalLengthsAfter(); eInfo.foeConflictEntryDist = foeDistToConflictLane + foeEntryLink->getInternalLengthsAfter(); #ifdef DEBUG_SSM - std::cout << "-> Encounter type: Merging situation of ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' and foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << "\nDistances to merge-point: ego: " << eInfo.egoConflictEntryDist << ", foe: " << eInfo.foeConflictEntryDist - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "-> Encounter type: Merging situation of ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' and foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << "\nDistances to merge-point: ego: " << eInfo.egoConflictEntryDist << ", foe: " << eInfo.foeConflictEntryDist + << std::endl; #endif } else { // Links leading to the same edge but different lanes. XXX: Disregards conflicts on adjacent lanes type = ENCOUNTER_TYPE_MERGING_ADJACENT; #ifdef DEBUG_SSM - std::cout << "-> Encounter type: No conflict: " << type << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "-> Encounter type: No conflict: " << type << std::endl; + } #endif } } else { @@ -1924,19 +2125,20 @@ #ifdef DEBUG_SSM - std::cout << " Determined exact conflict distances for crossing conflict." - << "\n crossingOrientation=" << crossingOrientation - << ", egoCrossingAngle=" << egoConnectionLine.rotationAtOffset(0.) - << ", foeCrossingAngle=" << foeConnectionLine.rotationAtOffset(0.) - << ", relativeAngle=" << angle - << " (foe from " << (crossingOrientation > 0 ? "right)" : "left)") - << "\n resulting offset for conflict entry distance:" - << "\n ego=" << crossingOrientation* e->foe->getLateralPositionOnLane() - << ", foe=" << crossingOrientation* e->ego->getLateralPositionOnLane() - << "\n resulting entry distances:" - << "\n ego=" << eInfo.egoConflictEntryDist - << ", foe=" << eInfo.foeConflictEntryDist - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << " Determined exact conflict distances for crossing conflict." + << "\n crossingOrientation=" << crossingOrientation + << ", egoCrossingAngle=" << egoConnectionLine.rotationAtOffset(0.) + << ", foeCrossingAngle=" << foeConnectionLine.rotationAtOffset(0.) + << ", relativeAngle=" << angle + << " (foe from " << (crossingOrientation > 0 ? "right)" : "left)") + << "\n resulting offset for conflict entry distance:" + << "\n ego=" << crossingOrientation* e->foe->getLateralPositionOnLane() + << ", foe=" << crossingOrientation* e->ego->getLateralPositionOnLane() + << "\n resulting entry distances:" + << "\n ego=" << eInfo.egoConflictEntryDist + << ", foe=" << eInfo.foeConflictEntryDist + << std::endl; #endif // TODO: This could also more precisely be calculated wrt the angle of the crossing *at the conflict point* @@ -1948,12 +2150,13 @@ eInfo.foeConflictExitDist = eInfo.foeConflictEntryDist + eInfo.foeConflictAreaLength + e->foe->getLength(); #ifdef DEBUG_SSM - std::cout << "real egoConflictLane: '" << (egoConflictLane == 0 ? "NULL" : egoConflictLane->getID()) << "'\n" - << "real foeConflictLane: '" << (foeConflictLane == 0 ? "NULL" : foeConflictLane->getID()) << "'\n" - << "-> Encounter type: Crossing situation of ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' and foe '" - << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" - << "\nDistances to crossing-point: ego: " << eInfo.egoConflictEntryDist << ", foe: " << eInfo.foeConflictEntryDist - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << "real egoConflictLane: '" << (egoConflictLane == 0 ? "NULL" : egoConflictLane->getID()) << "'\n" + << "real foeConflictLane: '" << (foeConflictLane == 0 ? "NULL" : foeConflictLane->getID()) << "'\n" + << "-> Encounter type: Crossing situation of ego '" << e->ego->getID() << "' on lane '" << egoLane->getID() << "' and foe '" + << e->foe->getID() << "' on lane '" << foeLane->getID() << "'" + << "\nDistances to crossing-point: ego: " << eInfo.egoConflictEntryDist << ", foe: " << eInfo.foeConflictEntryDist + << std::endl; #endif } } @@ -1966,11 +2169,12 @@ MSDevice_SSM::findFoeConflictLane(const MSVehicle* foe, const MSLane* egoConflictLane, double& distToConflictLane) const { #ifdef DEBUG_SSM - std::cout << SIMTIME << " findFoeConflictLane() for foe '" - << foe->getID() << "' on lane '" << foe->getLane()->getID() - << "' (with egoConflictLane=" << (egoConflictLane == 0 ? "NULL" : egoConflictLane->getID()) - << ")\nfoeBestLanes: " << toString(foe->getBestLanesContinuation()) - << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " findFoeConflictLane() for foe '" + << foe->getID() << "' on lane '" << foe->getLane()->getID() + << "' (with egoConflictLane=" << (egoConflictLane == 0 ? "NULL" : egoConflictLane->getID()) + << ")\nfoeBestLanes: " << ::toString(foe->getBestLanesContinuation()) + << std::endl; #endif MSLane* foeLane = foe->getLane(); std::vector::const_iterator laneIter = foe->getBestLanesContinuation().begin(); @@ -1981,10 +2185,11 @@ // Potential conflict lies on junction if egoConflictLane is internal const MSJunction* conflictJunction = egoConflictLane->isInternal() ? egoConflictLane->getEdge().getToJunction() : nullptr; #ifdef DEBUG_SSM - if (conflictJunction != 0) { - std::cout << "Potential conflict on junction '" << conflictJunction->getID() - << std::endl; - } + if (DEBUG_COND1(myHolderMS)) + if (conflictJunction != 0) { + std::cout << "Potential conflict on junction '" << conflictJunction->getID() + << std::endl; + } #endif if (foeLane->isInternal() && foeLane->getEdge().getToJunction() == conflictJunction) { // foe is already on the conflict junction @@ -2011,7 +2216,9 @@ assert(!foeLane->isInternal()); if (&foeLane->getEdge() == &egoConflictLane->getEdge()) { #ifdef DEBUG_SSM - std::cout << "Found conflict lane for foe: '" << foeLane->getID() << "'" << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "Found conflict lane for foe: '" << foeLane->getID() << "'" << std::endl; + } #endif // found the potential conflict edge along foeBestLanes return foeLane; @@ -2036,7 +2243,9 @@ if (foeLane->getEdge().getToJunction() == conflictJunction) { assert(foeLane != 0); #ifdef DEBUG_SSM - std::cout << "Found conflict lane for foe: '" << foeLane->getID() << "'" << std::endl; + if (DEBUG_COND1(myHolderMS)) { + std::cout << "Found conflict lane for foe: '" << foeLane->getID() << "'" << std::endl; + } #endif // found egoConflictLane, resp. the conflict junction, along foeBestLanes return foeLane; @@ -2052,7 +2261,9 @@ void MSDevice_SSM::flushConflicts(bool flushAll) { #ifdef DEBUG_SSM - std::cout << "\n" << SIMTIME << " Device '" << getID() << "' flushConflicts()" << std::endl; + if (DEBUG_COND) { + std::cout << "\n" << SIMTIME << " Device '" << getID() << "' flushConflicts()" << std::endl; + } #endif while (!myPastConflicts.empty()) { Encounter* top = myPastConflicts.top(); @@ -2070,9 +2281,10 @@ MSDevice_SSM::flushGlobalMeasures() { std::string egoID = myHolderMS->getID(); #ifdef DEBUG_SSM - std::cout << SIMTIME << " flushGlobalMeasures() of vehicle '" - << egoID << "'" - << "'\ntoGeo=" << myUseGeoCoords << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " flushGlobalMeasures() of vehicle '" + << egoID << "'" + << "'\ntoGeo=" << myUseGeoCoords << std::endl; #endif if (myComputeBR || myComputeSGAP || myComputeTGAP) { myOutputFile->openTag("globalMeasures"); @@ -2085,7 +2297,7 @@ if (myUseGeoCoords) { toGeo(myMaxBR.first.second); } - myOutputFile->openTag("maxBR").writeAttr("time", myMaxBR.first.first).writeAttr("position", toString(myMaxBR.first.second)).writeAttr("value", myMaxBR.second).closeTag(); + myOutputFile->openTag("maxBR").writeAttr("time", myMaxBR.first.first).writeAttr("position", ::toString(myMaxBR.first.second)).writeAttr("value", myMaxBR.second).closeTag(); } } @@ -2096,7 +2308,7 @@ toGeo(myMinSGAP.first.first.second); } myOutputFile->openTag("minSGAP").writeAttr("time", myMinSGAP.first.first.first) - .writeAttr("position", toString(myMinSGAP.first.first.second)) + .writeAttr("position", ::toString(myMinSGAP.first.first.second)) .writeAttr("value", myMinSGAP.first.second) .writeAttr("leader", myMinSGAP.second).closeTag(); } @@ -2109,7 +2321,7 @@ toGeo(myMinTGAP.first.first.second); } myOutputFile->openTag("minTGAP").writeAttr("time", myMinTGAP.first.first.first) - .writeAttr("position", toString(myMinTGAP.first.first.second)) + .writeAttr("position", ::toString(myMinTGAP.first.first.second)) .writeAttr("value", myMinTGAP.first.second) .writeAttr("leader", myMinTGAP.second).closeTag(); } @@ -2134,9 +2346,10 @@ void MSDevice_SSM::writeOutConflict(Encounter* e) { #ifdef DEBUG_SSM - std::cout << SIMTIME << " writeOutConflict() of vehicles '" - << e->egoID << "' and '" << e->foeID - << "'\ntoGeo=" << myUseGeoCoords << std::endl; + if (DEBUG_COND1(myHolderMS)) + std::cout << SIMTIME << " writeOutConflict() of vehicles '" + << e->egoID << "' and '" << e->foeID + << "'\ntoGeo=" << myUseGeoCoords << std::endl; #endif myOutputFile->openTag("conflict"); myOutputFile->writeAttr("begin", e->begin).writeAttr("end", e->end); @@ -2153,13 +2366,13 @@ toGeo(e->conflictPointSpan); } - myOutputFile->openTag("egoPosition").writeAttr("values", toString(e->egoTrajectory.x, myUseGeoCoords ? gPrecisionGeo : gPrecision)).closeTag(); - myOutputFile->openTag("egoVelocity").writeAttr("values", toString(e->egoTrajectory.v)).closeTag(); + myOutputFile->openTag("egoPosition").writeAttr("values", ::toString(e->egoTrajectory.x, myUseGeoCoords ? gPrecisionGeo : gPrecision)).closeTag(); + myOutputFile->openTag("egoVelocity").writeAttr("values", ::toString(e->egoTrajectory.v)).closeTag(); - myOutputFile->openTag("foePosition").writeAttr("values", toString(e->foeTrajectory.x, myUseGeoCoords ? gPrecisionGeo : gPrecision)).closeTag(); - myOutputFile->openTag("foeVelocity").writeAttr("values", toString(e->foeTrajectory.v)).closeTag(); + myOutputFile->openTag("foePosition").writeAttr("values", ::toString(e->foeTrajectory.x, myUseGeoCoords ? gPrecisionGeo : gPrecision)).closeTag(); + myOutputFile->openTag("foeVelocity").writeAttr("values", ::toString(e->foeTrajectory.v)).closeTag(); - myOutputFile->openTag("conflictPoint").writeAttr("values", toString(e->conflictPointSpan, myUseGeoCoords ? gPrecisionGeo : gPrecision)).closeTag(); + myOutputFile->openTag("conflictPoint").writeAttr("values", ::toString(e->conflictPointSpan, myUseGeoCoords ? gPrecisionGeo : gPrecision)).closeTag(); } if (myComputeTTC) { @@ -2169,13 +2382,13 @@ if (e->minTTC.time == INVALID) { myOutputFile->openTag("minTTC").writeAttr("time", "NA").writeAttr("position", "NA").writeAttr("type", "NA").writeAttr("value", "NA").closeTag(); } else { - std::string time = toString(e->minTTC.time); - std::string type = toString(int(e->minTTC.type)); - std::string value = toString(e->minTTC.value); + std::string time = ::toString(e->minTTC.time); + std::string type = ::toString(int(e->minTTC.type)); + std::string value = ::toString(e->minTTC.value); if (myUseGeoCoords) { toGeo(e->minTTC.pos); } - std::string position = toString(e->minTTC.pos, myUseGeoCoords ? gPrecisionGeo : gPrecision); + std::string position = ::toString(e->minTTC.pos, myUseGeoCoords ? gPrecisionGeo : gPrecision); myOutputFile->openTag("minTTC").writeAttr("time", time).writeAttr("position", position).writeAttr("type", type).writeAttr("value", value).closeTag(); } } @@ -2186,13 +2399,13 @@ if (e->maxDRAC.time == INVALID) { myOutputFile->openTag("maxDRAC").writeAttr("time", "NA").writeAttr("position", "NA").writeAttr("type", "NA").writeAttr("value", "NA").closeTag(); } else { - std::string time = toString(e->maxDRAC.time); - std::string type = toString(int(e->maxDRAC.type)); - std::string value = toString(e->maxDRAC.value); + std::string time = ::toString(e->maxDRAC.time); + std::string type = ::toString(int(e->maxDRAC.type)); + std::string value = ::toString(e->maxDRAC.value); if (myUseGeoCoords) { toGeo(e->maxDRAC.pos); } - std::string position = toString(e->maxDRAC.pos, myUseGeoCoords ? gPrecisionGeo : gPrecision); + std::string position = ::toString(e->maxDRAC.pos, myUseGeoCoords ? gPrecisionGeo : gPrecision); myOutputFile->openTag("maxDRAC").writeAttr("time", time).writeAttr("position", position).writeAttr("type", type).writeAttr("value", value).closeTag(); } } @@ -2200,13 +2413,13 @@ if (e->PET.time == INVALID) { myOutputFile->openTag("PET").writeAttr("time", "NA").writeAttr("position", "NA").writeAttr("type", "NA").writeAttr("value", "NA").closeTag(); } else { - std::string time = toString(e->PET.time); - std::string type = toString(int(e->PET.type)); - std::string value = toString(e->PET.value); + std::string time = ::toString(e->PET.time); + std::string type = ::toString(int(e->PET.type)); + std::string value = ::toString(e->PET.value); if (myUseGeoCoords) { toGeo(e->PET.pos); } - std::string position = toString(e->PET.pos, myUseGeoCoords ? gPrecisionGeo : gPrecision); + std::string position = ::toString(e->PET.pos, myUseGeoCoords ? gPrecisionGeo : gPrecision); myOutputFile->openTag("PET").writeAttr("time", time).writeAttr("position", position).writeAttr("type", type).writeAttr("value", value).closeTag(); } } @@ -2217,7 +2430,7 @@ MSDevice_SSM::makeStringWithNAs(std::vector v, double NA, std::string sep) { std::string res = ""; for (std::vector::const_iterator i = v.begin(); i != v.end(); ++i) { - res += (i == v.begin() ? "" : sep) + (*i == NA ? "NA" : toString(*i)); + res += (i == v.begin() ? "" : sep) + (*i == NA ? "NA" : ::toString(*i)); } return res; } @@ -2226,7 +2439,7 @@ MSDevice_SSM::makeStringWithNAs(std::vector v, std::vector NAs, std::string sep) { std::string res = ""; for (std::vector::const_iterator i = v.begin(); i != v.end(); ++i) { - res += (i == v.begin() ? "" : sep) + (find(NAs.begin(), NAs.end(), *i) != NAs.end() ? "NA" : toString(*i)); + res += (i == v.begin() ? "" : sep) + (find(NAs.begin(), NAs.end(), *i) != NAs.end() ? "NA" : ::toString(*i)); } return res; } @@ -2273,17 +2486,19 @@ instances->insert(this); #ifdef DEBUG_SSM - std::vector measures; - std::vector threshVals; - for (std::map::const_iterator i = myThresholds.begin(); i != myThresholds.end(); ++i) { - measures.push_back(i->first); - threshVals.push_back(i->second); - } - std::cout << "Initialized ssm device '" << id << "' with " - << "myMeasures=" << joinToString(measures, " ") - << ", myThresholds=" << joinToString(threshVals, " ") - << ", mySaveTrajectories=" << mySaveTrajectories - << ", myRange=" << myRange << ", output file=" << outputFilename << ", extra time=" << myExtraTime << ", useGeo=" << myUseGeoCoords << "\n"; + if (DEBUG_COND1(myHolderMS)) { + std::vector measures; + std::vector threshVals; + for (std::map::const_iterator i = myThresholds.begin(); i != myThresholds.end(); ++i) { + measures.push_back(i->first); + threshVals.push_back(i->second); + } + std::cout << "Initialized ssm device '" << id << "' with " + << "myMeasures=" << joinToString(measures, " ") + << ", myThresholds=" << joinToString(threshVals, " ") + << ", mySaveTrajectories=" << mySaveTrajectories + << ", myRange=" << myRange << ", output file=" << outputFilename << ", extra time=" << myExtraTime << ", useGeo=" << myUseGeoCoords << "\n"; + } #endif } @@ -2299,9 +2514,11 @@ bool -MSDevice_SSM::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_SSM::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { + assert(veh.isVehicle()); #ifdef DEBUG_SSM_NOTIFICATIONS - std::cout << "device '" << getID() << "' notifyEnter: reason=" << reason << " currentEdge=" << veh.getLane()->getEdge().getID() << "\n"; + MSBaseVehicle* v = (MSBaseVehicle*) &veh; + std::cout << "device '" << getID() << "' notifyEnter: reason=" << reason << " currentEdge=" << v->getLane()->getEdge().getID() << "\n"; #else UNUSED_PARAMETER(veh); UNUSED_PARAMETER(reason); @@ -2310,10 +2527,12 @@ } bool -MSDevice_SSM::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, +MSDevice_SSM::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { + assert(veh.isVehicle()); #ifdef DEBUG_SSM_NOTIFICATIONS - std::cout << "device '" << getID() << "' notifyLeave: reason=" << reason << " currentEdge=" << veh.getLane()->getEdge().getID() << "\n"; + MSBaseVehicle* v = (MSBaseVehicle*) &veh; + std::cout << "device '" << getID() << "' notifyLeave: reason=" << reason << " currentEdge=" << v->getLane()->getEdge().getID() << "\n"; #else UNUSED_PARAMETER(veh); UNUSED_PARAMETER(reason); @@ -2322,7 +2541,7 @@ } bool -MSDevice_SSM::notifyMove(SUMOVehicle& /* veh */, double /* oldPos */, +MSDevice_SSM::notifyMove(SUMOTrafficObject& /* veh */, double /* oldPos */, double /* newPos */, double newSpeed) { #ifdef DEBUG_SSM_NOTIFICATIONS std::cout << "device '" << getID() << "' notifyMove: newSpeed=" << newSpeed << "\n"; @@ -2339,7 +2558,7 @@ std::cout << SIMTIME << " Looking for surrounding vehicles for ego vehicle '" << veh.getID() << "' on edge '" << veh.getLane()->getEdge().getID() << "'." - << "\nVehicle's best lanes = " << toString(veh.getBestLanesContinuation()) + << "\nVehicle's best lanes = " << ::toString(veh.getBestLanesContinuation()) << std::endl; #endif @@ -2439,7 +2658,7 @@ #ifdef DEBUG_SSM_SURROUNDING std::cout << SIMTIME << " Scanning downstream for vehicle '" << veh.getID() << "' on lane '" << veh.getLane()->getID() << "', position=" << pos << ".\n" << "Considering edge '" << edge->getID() << "' Remaining downstream range = " << remainingDownstreamRange - << "\nbestLanes=" << toString(egoBestLanes) << "\n" + << "\nbestLanes=" << ::toString(egoBestLanes) << "\n" << std::endl; #endif assert(!edge->isInternal()); @@ -2554,7 +2773,7 @@ continue; } if (veh->getPositionOnLane() - veh->getLength() <= pos && veh->getPositionOnLane() >= pos - range) { -#ifdef DEBUG_SSM +#ifdef DEBUG_SSM_SURROUNDING std::cout << veh->getID() << "\n"; #endif FoeInfo* c = new FoeInfo(); // c is deleted in updateEncounter() @@ -2566,7 +2785,7 @@ lane->releaseVehicles(); } -#ifdef DEBUG_SSM +#ifdef DEBUG_SSM_SURROUNDING std::cout << std::endl; #endif @@ -2732,7 +2951,7 @@ } else { useGeo = oc.getBool("device.ssm.geo"); if (!oc.isSet("device.ssm.geo") && (issuedParameterWarnFlags & SSM_WARN_GEO) == 0) { - std::cout << "vehicle '" << v.getID() << "' does not supply vehicle parameter 'device.ssm.geo'. Using default of '" << toString(useGeo) << "'\n"; + std::cout << "vehicle '" << v.getID() << "' does not supply vehicle parameter 'device.ssm.geo'. Using default of '" << ::toString(useGeo) << "'\n"; issuedParameterWarnFlags |= SSM_WARN_GEO; } } @@ -2792,7 +3011,7 @@ } if (extraTime < 0.) { extraTime = DEFAULT_EXTRA_TIME; - WRITE_WARNING("Negative (or no) value encountered for vehicle parameter 'device.ssm.extratime' in vehicle '" + v.getID() + "' using default value " + toString(extraTime) + " instead"); + WRITE_WARNING("Negative (or no) value encountered for vehicle parameter 'device.ssm.extratime' in vehicle '" + v.getID() + "' using default value " + ::toString(extraTime) + " instead"); } return extraTime; } @@ -2817,7 +3036,7 @@ } else { trajectories = oc.getBool("device.ssm.trajectories"); if (!oc.isSet("device.ssm.trajectories") && (issuedParameterWarnFlags & SSM_WARN_TRAJECTORIES) == 0) { - std::cout << "vehicle '" << v.getID() << "' does not supply vehicle parameter 'device.ssm.trajectories'. Using default of '" << toString(trajectories) << "'\n"; + std::cout << "vehicle '" << v.getID() << "' does not supply vehicle parameter 'device.ssm.trajectories'. Using default of '" << ::toString(trajectories) << "'\n"; issuedParameterWarnFlags |= SSM_WARN_TRAJECTORIES; } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_SSM.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_SSM.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_SSM.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_SSM.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,6 +37,7 @@ // class declarations // =========================================================================== class SUMOVehicle; +class SUMOTrafficObject; // =========================================================================== @@ -115,6 +116,54 @@ ENCOUNTER_TYPE_COLLISION = 111 //!< ENCOUNTER_TYPE_COLLISION }; + static std::string toString(EncounterType type) { + switch (type) { + case (ENCOUNTER_TYPE_NOCONFLICT_AHEAD): + return ("NOCONFLICT_AHEAD"); + case (ENCOUNTER_TYPE_FOLLOWING): + return ("FOLLOWING"); + case (ENCOUNTER_TYPE_FOLLOWING_FOLLOWER): + return ("FOLLOWING_FOLLOWER"); + case (ENCOUNTER_TYPE_FOLLOWING_LEADER): + return ("FOLLOWING_LEADER"); + case (ENCOUNTER_TYPE_ON_ADJACENT_LANES): + return ("ON_ADJACENT_LANES"); + case (ENCOUNTER_TYPE_MERGING): + return ("MERGING"); + case (ENCOUNTER_TYPE_MERGING_LEADER): + return ("MERGING_LEADER"); + case (ENCOUNTER_TYPE_MERGING_FOLLOWER): + return ("MERGING_FOLLOWER"); + case (ENCOUNTER_TYPE_MERGING_ADJACENT): + return ("MERGING_ADJACENT"); + case (ENCOUNTER_TYPE_CROSSING): + return ("CROSSING"); + case (ENCOUNTER_TYPE_CROSSING_LEADER): + return ("CROSSING_LEADER"); + case (ENCOUNTER_TYPE_CROSSING_FOLLOWER): + return ("CROSSING_FOLLOWER"); + case (ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA): + return ("EGO_ENTERED_CONFLICT_AREA"); + case (ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA): + return ("FOE_ENTERED_CONFLICT_AREA"); + case (ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA): + return ("EGO_LEFT_CONFLICT_AREA"); + case (ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA): + return ("FOE_LEFT_CONFLICT_AREA"); + case (ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA): + return ("BOTH_ENTERED_CONFLICT_AREA"); + case (ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA): + return ("BOTH_LEFT_CONFLICT_AREA"); + case (ENCOUNTER_TYPE_FOLLOWING_PASSED): + return ("FOLLOWING_PASSED"); + case (ENCOUNTER_TYPE_MERGING_PASSED): + return ("MERGING_PASSED"); + case (ENCOUNTER_TYPE_COLLISION): + return ("COLLISION"); + } + return ("UNKNOWN"); + }; + private: /// @brief An encounter is an episode involving two vehicles, /// which are closer to each other than some specified distance. @@ -172,7 +221,7 @@ struct compare { typedef bool value_type; bool operator()(Encounter* e1, Encounter* e2) { - return e1->begin <= e2->begin; + return e1->begin >= e2->begin; }; }; @@ -370,7 +419,7 @@ * * @return Always true to keep the device as it cannot be thrown away */ - bool notifyMove(SUMOVehicle& veh, double oldPos, + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); @@ -383,7 +432,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Called whenever the holder leaves a lane @@ -394,7 +443,7 @@ * @param[in] enteredLane The lane entered. * @return True if it did not leave the net. */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} @@ -473,8 +522,10 @@ void flushGlobalMeasures(); /** @brief Updates the encounter (adds a new trajectory point) and deletes the foeInfo. + * @return Returns false for new encounters, which should not be kept (if one vehicle has + * already left the conflict zone at encounter creation). True, otherwise. */ - void updateEncounter(Encounter* e, FoeInfo* foeInfo); + bool updateEncounter(Encounter* e, FoeInfo* foeInfo); /** @brief Updates an encounter, which was classified as ENCOUNTER_TYPE_NOCONFLICT_AHEAD * this may be the case because the foe is out of the detection range but the encounter diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_ToC.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_ToC.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_ToC.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_ToC.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -242,11 +242,11 @@ #ifdef DEBUG_TOC std::cout << "Parsed openGapParams: \n" - << " timegap=" << timegap - << ", spacing=" << spacing - << ", changeRate=" << changeRate - << ", maxDecel=" << maxDecel - << std::endl; + << " timegap=" << timegap + << ", spacing=" << spacing + << ", changeRate=" << changeRate + << ", maxDecel=" << maxDecel + << std::endl; #endif return OpenGapParams(timegap, spacing, changeRate, maxDecel, specifiedAny); @@ -279,8 +279,6 @@ myOpenGapParams(ogp) { // Take care! Holder is currently being constructed. Cast occurs before completion. myHolderMS = static_cast(&holder); - // Ensure that the holder receives a driver state as soon as it is created (can't be done here, since myHolderMS is incomplete) - MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent(new WrappingCommand(this, &MSDevice_ToC::ensureDriverStateExistence), SIMSTEP); if (outputFilename != "") { myOutputFile = &OutputDevice::getDevice(outputFilename); @@ -365,21 +363,6 @@ } -SUMOTime -MSDevice_ToC::ensureDriverStateExistence(SUMOTime /* t */) { -#ifdef DEBUG_TOC - std::cout << SIMTIME << " ensureDriverStateExistence() for vehicle '" << myHolder.getID() << "'" << std::endl; -#endif - // Ensure that the holder has a driver state - if (myHolderMS->getDriverState() == nullptr - && !myHolderMS->hasDevice("driverstate")) { - // Create an MSDriverState for the vehicle if it hasn't one already, - // and has no DriverState Device attached (that will create the driver state, then) - myHolderMS->createDriverState(); - } - return 0; -} - MSDevice_ToC::~MSDevice_ToC() { // unregister from static instance container instances.erase(this); @@ -418,8 +401,7 @@ resetDeliberateLCs(); } myCurrentAwareness = value; - std::shared_ptr ds = myHolderMS->getDriverState(); - ds->setAwareness(value); + myHolderMS->getDriverState()->setAwareness(value); } @@ -851,7 +833,7 @@ assert(myEvents.empty()); return; } - while(!myEvents.empty()) { + while (!myEvents.empty()) { std::pair& e = myEvents.front(); myOutputFile->openTag(e.second); myOutputFile->writeAttr("id", myHolder.getID()).writeAttr("t", STEPS2TIME(e.first)); @@ -891,7 +873,7 @@ myPreviousLCMode = lcModeHolder; #ifdef DEBUG_TOC std::cout << "MSDevice_ToC::setLCModeMRM() setting LC Mode of vehicle '" << myHolder.getID() - << "' from " << myPreviousLCMode << " to " << LCModeMRM << std::endl; + << "' from " << myPreviousLCMode << " to " << LCModeMRM << std::endl; #endif } myHolderMS->getInfluencer().setLaneChangeMode(LCModeMRM); diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_ToC.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_ToC.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_ToC.h 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_ToC.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -149,9 +149,6 @@ void setParameter(const std::string& key, const std::string& value); - /// @brief Ensure existence of DriverState for equipped vehicles - SUMOTime ensureDriverStateExistence(SUMOTime); - /// @brief Trigger execution of an MRM SUMOTime triggerMRM(SUMOTime t); diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Transportable.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Transportable.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Transportable.cpp 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Transportable.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -57,10 +57,20 @@ MSDevice_Transportable::~MSDevice_Transportable() { + // flush any unfortunate riders still remaining + for (MSTransportable* transportable : myTransportables) { + WRITE_WARNING((myAmContainer ? "Removing container '" : "Removing person '") + transportable->getID() + + "' at removal of vehicle '" + myHolder.getID() + "'"); + if (myAmContainer) { + MSNet::getInstance()->getContainerControl().erase(transportable); + } else { + MSNet::getInstance()->getPersonControl().erase(transportable); + } + } } void -MSDevice_Transportable::notifyMoveInternal(const SUMOVehicle& veh, +MSDevice_Transportable::notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double /* timeOnLane*/, const double /* meanSpeedFrontOnLane */, @@ -68,12 +78,12 @@ const double /* travelledDistanceFrontOnLane */, const double /* travelledDistanceVehicleOnLane */, const double /* meanLengthOnLane */) { - notifyMove(const_cast(veh), -1, -1, -1); + notifyMove(const_cast(veh), -1, -1, -1); } bool -MSDevice_Transportable::notifyMove(SUMOVehicle& veh, double /*oldPos*/, double /*newPos*/, double /*newSpeed*/) { +MSDevice_Transportable::notifyMove(SUMOTrafficObject& veh, double /*oldPos*/, double /*newPos*/, double /*newSpeed*/) { if (myStopped) { if (!veh.isStopped()) { for (std::vector::iterator i = myTransportables.begin(); i != myTransportables.end(); ++i) { @@ -94,10 +104,11 @@ } } if (MSStopOut::active()) { + SUMOVehicle* vehicle = dynamic_cast(&veh); if (myAmContainer) { - MSStopOut::getInstance()->unloadedContainers(&veh, 1); + MSStopOut::getInstance()->unloadedContainers(vehicle, 1); } else { - MSStopOut::getInstance()->unloadedPersons(&veh, 1); + MSStopOut::getInstance()->unloadedPersons(vehicle, 1); } } i = myTransportables.erase(i); @@ -113,7 +124,7 @@ bool -MSDevice_Transportable::notifyEnter(SUMOVehicle& /*veh*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Transportable::notifyEnter(SUMOTrafficObject& /*veh*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { for (std::vector::iterator i = myTransportables.begin(); i != myTransportables.end(); ++i) { (*i)->setDeparted(MSNet::getInstance()->getCurrentTimeStep()); @@ -124,10 +135,10 @@ bool -MSDevice_Transportable::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, +MSDevice_Transportable::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { - for (std::vector::iterator i = myTransportables.begin(); i != myTransportables.end(); ++i) { + for (std::vector::iterator i = myTransportables.begin(); i != myTransportables.end();) { MSTransportable* transportable = *i; if (transportable->getDestination() != veh.getEdge()) { WRITE_WARNING((myAmContainer ? "Teleporting container '" : "Teleporting person '") + transportable->getID() + @@ -141,6 +152,7 @@ MSNet::getInstance()->getPersonControl().erase(transportable); } } + i = myTransportables.erase(i); } } return true; @@ -162,12 +174,15 @@ void MSDevice_Transportable::removeTransportable(MSTransportable* transportable) { - myTransportables.erase(std::find(myTransportables.begin(), myTransportables.end(), transportable)); - if (MSStopOut::active() && myHolder.isStopped()) { - if (myAmContainer) { - MSStopOut::getInstance()->loadedContainers(&myHolder, 1); - } else { - MSStopOut::getInstance()->loadedPersons(&myHolder, 1); + auto it = std::find(myTransportables.begin(), myTransportables.end(), transportable); + if (it != myTransportables.end()) { + myTransportables.erase(it); + if (MSStopOut::active() && myHolder.isStopped()) { + if (myAmContainer) { + MSStopOut::getInstance()->loadedContainers(&myHolder, 1); + } else { + MSStopOut::getInstance()->loadedPersons(&myHolder, 1); + } } } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Transportable.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Transportable.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Transportable.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Transportable.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,7 +71,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyMove */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /** @brief Adds passengers on vehicle insertion @@ -82,7 +82,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Passengers leaving on arrival @@ -94,7 +94,7 @@ * * @return True if it did not leave the net. */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} @@ -140,7 +140,7 @@ /** @brief Internal notification about the vehicle moves, see MSMoveReminder::notifyMoveInternal() * */ - void notifyMoveInternal(const SUMOVehicle& veh, + void notifyMoveInternal(const SUMOTrafficObject& veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -133,7 +133,7 @@ } bool -MSDevice_Tripinfo::notifyMove(SUMOVehicle& veh, double /*oldPos*/, +MSDevice_Tripinfo::notifyMove(SUMOTrafficObject& veh, double /*oldPos*/, double /*newPos*/, double newSpeed) { if (veh.isStopped()) { myStoppingTime += DELTA_T; @@ -150,7 +150,7 @@ } void -MSDevice_Tripinfo::notifyMoveInternal(const SUMOVehicle& veh, +MSDevice_Tripinfo::notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double timeOnLane, const double /* meanSpeedFrontOnLane */, @@ -171,7 +171,7 @@ } bool -MSDevice_Tripinfo::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Tripinfo::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { if (!MSGlobals::gUseMesoSim) { myDepartLane = static_cast(veh).getLane()->getID(); @@ -188,7 +188,7 @@ bool -MSDevice_Tripinfo::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, +MSDevice_Tripinfo::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { myArrivalTime = MSNet::getInstance()->getCurrentTimeStep(); diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Tripinfo.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,6 +32,7 @@ // class declarations // =========================================================================== class SUMOVehicle; +class SUMOTrafficObject; // =========================================================================== // class definitions @@ -108,7 +109,7 @@ * @param[in] newSpeed Moving speed. * @return True (always). */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /** @brief Saves departure info on insertion @@ -119,7 +120,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Saves arrival info @@ -130,7 +131,7 @@ * @param[in] isLaneChange whether the vehicle changed from the lane * @return True if it did not leave the net. */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} @@ -181,7 +182,7 @@ /** @brief Internal notification about the vehicle moves, see MSMoveReminder::notifyMoveInternal() * */ - void notifyMoveInternal(const SUMOVehicle& veh, + void notifyMoveInternal(const SUMOTrafficObject& veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -132,15 +132,16 @@ bool -MSDevice_Vehroutes::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Vehroutes::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { + MSVehicle& vehicle = static_cast(veh); if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { - if (mySorted && myStateListener.myDevices[&veh] == this) { + if (mySorted && myStateListener.myDevices[&vehicle] == this) { const SUMOTime departure = myIntendedDepart ? myHolder.getParameter().depart : MSNet::getInstance()->getCurrentTimeStep(); myDepartureCounts[departure]++; } if (!MSGlobals::gUseMesoSim) { - myDepartLane = static_cast(veh).getLane()->getIndex(); - myDepartPosLat = static_cast(veh).getLateralPositionOnLane(); + myDepartLane = vehicle.getLane()->getIndex(); + myDepartPosLat = vehicle.getLateralPositionOnLane(); } myDepartSpeed = veh.getSpeed(); myDepartPos = veh.getPositionOnLane(); @@ -150,7 +151,7 @@ bool -MSDevice_Vehroutes::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSDevice_Vehroutes::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { 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(); @@ -443,7 +444,9 @@ bis >> time; bis >> routeID; bis >> info; - myReplacedRoutes.push_back(RouteReplaceInfo(MSEdge::dictionary(edgeID), time, MSRoute::dictionary(routeID), info)); + const MSRoute* route = MSRoute::dictionary(routeID); + route->addReference(); + myReplacedRoutes.push_back(RouteReplaceInfo(MSEdge::dictionary(edgeID), time, route, info)); } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.h sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSDevice_Vehroutes.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -91,7 +91,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Saves exit times if needed @@ -105,7 +105,7 @@ * * @return True, if exit times are to be collected. */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0); /// @} /// @brief return the name for this type of device diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSPersonDevice.h sumo-1.2.0+dfsg1/src/microsim/devices/MSPersonDevice.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSPersonDevice.h 2018-10-13 22:00:07.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSPersonDevice.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file MSPersonDevice.h -/// @author Michael Behrisch -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @date Tue, 04 Dec 2007 -/// @version $Id$ -/// -// Abstract in-person device -/****************************************************************************/ -#ifndef MSPersonDevice_h -#define MSPersonDevice_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include "MSDevice.h" - - -// =========================================================================== -// class declarations -// =========================================================================== -class MSTransportable; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSPersonDevice - * @brief Abstract in-person device - * - * The MSPersonDevice-interface brings the following interfaces to a vehicle that - * may be overwritten by real devices: - * @arg Retrieval of the person that holds the device - */ -class MSPersonDevice : public MSDevice { -public: - /** @brief Constructor - * - * @param[in] holder The person that holds this device - * @param[in] id The ID of the device - */ - MSPersonDevice(MSTransportable& holder, const std::string& id) : - MSDevice(id), myHolder(holder) { - } - - - /// @brief Destructor - virtual ~MSPersonDevice() { } - - - /** @brief Returns the person that holds this device - * - * @return The person that holds this device - */ - MSTransportable& getHolder() const { - return myHolder; - } - -protected: - /// @brief The person that stores the device - MSTransportable& myHolder; - -private: - /// @brief Invalidated copy constructor. - MSPersonDevice(const MSPersonDevice&); - - /// @brief Invalidated assignment operator. - MSPersonDevice& operator=(const MSPersonDevice&); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file MSPersonDevice_Routing.cpp -/// @author Michael Behrisch -/// @author Daniel Krajzewicz -/// @author Laura Bieker -/// @author Christoph Sommer -/// @author Jakob Erdmann -/// @date Tue, 04 Dec 2007 -/// @version $Id$ -/// -// A device that performs vehicle rerouting based on current edge speeds -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include "MSRoutingEngine.h" -#include "MSPersonDevice_Routing.h" - - -// =========================================================================== -// method definitions -// =========================================================================== -// --------------------------------------------------------------------------- -// static initialisation methods -// --------------------------------------------------------------------------- -void -MSPersonDevice_Routing::insertOptions(OptionsCont& oc) { - insertDefaultAssignmentOptions("rerouting", "Routing", oc, true); - oc.doRegister("person-device.rerouting.period", new Option_String("0", "TIME")); - oc.addSynonyme("person-device.rerouting.period", "person-device.routing.period", true); - oc.addDescription("person-device.rerouting.period", "Routing", "The period with which the person shall be rerouted"); -} - - -void -MSPersonDevice_Routing::buildDevices(MSTransportable& p, std::vector& into) { - const OptionsCont& oc = OptionsCont::getOptions(); - if (p.getParameter().wasSet(VEHPARS_FORCE_REROUTE) || equippedByDefaultAssignmentOptions(oc, "rerouting", p, false)) { - // route computation is enabled - const SUMOTime period = string2time(oc.getString("person-device.rerouting.period")); - MSRoutingEngine::initWeightUpdate(); - // build the device - into.push_back(new MSPersonDevice_Routing(p, "routing_" + p.getID(), period)); - } -} - - -// --------------------------------------------------------------------------- -// MSPersonDevice_Routing-methods -// --------------------------------------------------------------------------- -MSPersonDevice_Routing::MSPersonDevice_Routing(MSTransportable& holder, const std::string& id, SUMOTime period) - : MSPersonDevice(holder, id), myPeriod(period), myLastRouting(-1), myRerouteCommand(0) { - if (holder.getParameter().wasSet(VEHPARS_FORCE_REROUTE)) { - // if we don't update the edge weights, we might as well reroute now and hopefully use our threads better - const SUMOTime execTime = MSRoutingEngine::hasEdgeUpdates() ? holder.getParameter().depart : -1; - MSNet::getInstance()->getInsertionEvents()->addEvent(new WrappingCommand(this, &MSPersonDevice_Routing::wrappedRerouteCommandExecute), execTime); - // the event will deschedule and destroy itself so it does not need to be stored - } -} - - -MSPersonDevice_Routing::~MSPersonDevice_Routing() { - // make the rerouting command invalid if there is one - if (myRerouteCommand != nullptr) { - myRerouteCommand->deschedule(); - } -} - - -SUMOTime -MSPersonDevice_Routing::wrappedRerouteCommandExecute(SUMOTime currentTime) { - reroute(currentTime); - return myPeriod; -} - - -void -MSPersonDevice_Routing::reroute(const SUMOTime currentTime, const bool /* onInit */) { - MSRoutingEngine::initEdgeWeights(); - //check whether the weights did change since the last reroute - if (myLastRouting >= MSRoutingEngine::getLastAdaptation()) { - return; - } - myLastRouting = currentTime; -// MSRoutingEngine::reroute(myHolder, currentTime, onInit); -} - - -std::string -MSPersonDevice_Routing::getParameter(const std::string& key) const { - if (key == "period") { - return time2string(myPeriod); - } - throw InvalidArgument("Parameter '" + key + "' is not supported for device of type '" + deviceName() + "'"); -} - - -void -MSPersonDevice_Routing::setParameter(const std::string& key, const std::string& value) { - double doubleValue; - try { - doubleValue = StringUtils::toDouble(value); - } catch (NumberFormatException&) { - throw InvalidArgument("Setting parameter '" + key + "' requires a number for device of type '" + deviceName() + "'"); - } - if (key == "period") { - const SUMOTime oldPeriod = myPeriod; - myPeriod = TIME2STEPS(doubleValue); - if (myPeriod <= 0) { - myRerouteCommand->deschedule(); - } else if (oldPeriod <= 0) { - // re-schedule routing command - MSNet::getInstance()->getInsertionEvents()->addEvent(new WrappingCommand(this, &MSPersonDevice_Routing::wrappedRerouteCommandExecute), SIMSTEP + myPeriod); - } - } else { - throw InvalidArgument("Setting parameter '" + key + "' is not supported for device of type '" + deviceName() + "'"); - } -} - - -void -MSPersonDevice_Routing::saveState(OutputDevice& out) const { - out.openTag(SUMO_TAG_DEVICE); - out.writeAttr(SUMO_ATTR_ID, getID()); - std::vector internals; - internals.push_back(toString(myPeriod)); - out.writeAttr(SUMO_ATTR_STATE, toString(internals)); - out.closeTag(); -} - - -void -MSPersonDevice_Routing::loadState(const SUMOSAXAttributes& attrs) { - std::istringstream bis(attrs.getString(SUMO_ATTR_STATE)); - bis >> myPeriod; -} - - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.h sumo-1.2.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.h 2018-10-30 23:00:26.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSPersonDevice_Routing.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file MSPersonDevice_Routing.h -/// @author Michael Behrisch -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @date Tue, 04 Dec 2007 -/// @version $Id$ -/// -// A device that performs vehicle rerouting based on current edge speeds -/****************************************************************************/ -#ifndef MSPersonDevice_Routing_h -#define MSPersonDevice_Routing_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include "MSPersonDevice.h" - - -// =========================================================================== -// class declarations -// =========================================================================== -class MSLane; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSPersonDevice_Routing - * @brief A device that performs person rerouting based on current edge speeds - * - * The routing-device system consists of in-vehicle devices that perform the routing - * and simulation-wide static methods for collecting edge weights and - * parallelizing in MSRoutingEngine. - * - * A device is assigned using the common explicit/probability - procedure. - * - * A device computes a new route for a person as soon as a personTrip appears in the plan. - */ -class MSPersonDevice_Routing : public MSPersonDevice { -public: - /** @brief Inserts MSPersonDevice_Routing-options - * @param[filled] oc The options container to add the options to - */ - static void insertOptions(OptionsCont& oc); - - /** @brief checks MSPersonDevice_Routing-options - * @param[filled] oc The options container with the user-defined options - */ - static bool checkOptions(OptionsCont& oc); - - - /** @brief Build devices for the given person, if needed - * - * The options are read and evaluated whether rerouting-devices shall be built - * for the given person. - * - * When the first device is built, the static container of edge weights - * used for routing is initialised with the mean speed the edges allow. - * In addition, an event is generated which updates these weights is - * built and added to the list of events to execute at a simulation end. - * - * The built device is stored in the given vector. - * - * @param[in] p The person for which a device may be built - * @param[filled] into The vector to store the built device in - */ - static void buildDevices(MSTransportable& p, std::vector& into); - - - /// @brief Destructor. - ~MSPersonDevice_Routing(); - - - /// @brief return the name for this type of device - const std::string deviceName() const { - return "rerouting"; - } - - /** @brief Saves the state of the device - * - * @param[in] out The OutputDevice to write the information into - */ - void saveState(OutputDevice& out) const; - - /** @brief Loads the state of the device from the given description - * - * @param[in] attrs XML attributes describing the current state - */ - void loadState(const SUMOSAXAttributes& attrs); - - /// @brief initiate the rerouting, create router / thread pool on first use - void reroute(const SUMOTime currentTime, const bool onInit = false); - - /// @brief try to retrieve the given parameter from this device. Throw exception for unsupported key - std::string getParameter(const std::string& key) const; - - /// @brief try to set the given parameter for this device. Throw exception for unsupported key - void setParameter(const std::string& key, const std::string& value); - - -private: - - /** @brief Constructor - * - * @param[in] holder The vehicle that holds this device - * @param[in] id The ID of the device - * @param[in] period The period with which a new route shall be searched - */ - MSPersonDevice_Routing(MSTransportable& holder, const std::string& id, SUMOTime period); - - /** @brief Performs rerouting after a period - * - * A new route is computed by calling the vehicle's "reroute" method, supplying - * "getEffort" as the edge effort retrieval method. - * - * This method is called from the event handler at the begin of a simulation - * step after the rerouting period is over. The reroute period is returned. - * - * @param[in] currentTime The current simulation time - * @return The offset to the next call (the rerouting period "myPeriod") - * @see MSVehicle::reroute - * @see MSEventHandler - * @see WrappingCommand - */ - SUMOTime wrappedRerouteCommandExecute(SUMOTime currentTime); - - -private: - /// @brief The period with which a vehicle shall be rerouted - SUMOTime myPeriod; - - /// @brief The last time a routing took place - SUMOTime myLastRouting; - - /// @brief The (optional) command responsible for rerouting - WrappingCommand< MSPersonDevice_Routing >* myRerouteCommand; - -private: - /// @brief Invalidated copy constructor. - MSPersonDevice_Routing(const MSPersonDevice_Routing&); - - /// @brief Invalidated assignment operator. - MSPersonDevice_Routing& operator=(const MSPersonDevice_Routing&); - - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSRoutingEngine.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSRoutingEngine.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSRoutingEngine.cpp 2018-11-18 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSRoutingEngine.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,10 +37,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include // =========================================================================== @@ -57,7 +57,6 @@ bool MSRoutingEngine::myWithTaz; SUMOAbstractRouter* MSRoutingEngine::myRouter = nullptr; AStarRouter >* MSRoutingEngine::myRouterWithProhibited = nullptr; -double MSRoutingEngine::myRandomizeWeightsFactor = 0; std::map, const MSRoute*> MSRoutingEngine::myCachedRoutes; #ifdef HAVE_FOX FXWorkerThread::Pool MSRoutingEngine::myThreadPool; @@ -100,7 +99,9 @@ MSRoutingEngine::initEdgeWeights() { if (myEdgeSpeeds.empty()) { const OptionsCont& oc = OptionsCont::getOptions(); - myAdaptationSteps = oc.getInt("device.rerouting.adaptation-steps"); + if (myAdaptationWeight == 0 || !oc.isDefault("device.rerouting.adaptation-steps")) { + myAdaptationSteps = oc.getInt("device.rerouting.adaptation-steps"); + } const bool useLoaded = oc.getBool("device.rerouting.init-with-loaded-weights"); const double currentSecond = SIMTIME; for (const MSEdge* const edge : MSNet::getInstance()->getEdgeControl().getEdges()) { @@ -120,7 +121,6 @@ } } myLastAdaptation = MSNet::getInstance()->getCurrentTimeStep(); - myRandomizeWeightsFactor = oc.getFloat("weights.random-factor"); } } @@ -130,8 +130,8 @@ const int id = e->getNumericalID(); if (id < (int)myEdgeSpeeds.size()) { double effort = MAX2(e->getLength() / MAX2(myEdgeSpeeds[id], NUMERICAL_EPS), e->getMinimumTravelTime(v)); - if (myRandomizeWeightsFactor != 1.) { - effort *= RandHelper::rand(1., myRandomizeWeightsFactor); + if (gWeightsRandomFactor != 1.) { + effort *= RandHelper::rand(1., gWeightsRandomFactor); } return effort; } @@ -188,11 +188,10 @@ 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(); + for (const MSEdge* e : edges) { dev.openTag(SUMO_TAG_EDGE); - dev.writeAttr(SUMO_ATTR_ID, (*i)->getID()); - dev.writeAttr("traveltime", (*i)->getLength() / myEdgeSpeeds[id]); + dev.writeAttr(SUMO_ATTR_ID, e->getID()); + dev.writeAttr("traveltime", getEffort(e, nullptr, STEPS2TIME(currentTime))); dev.closeTag(); } dev.closeTag(); @@ -251,7 +250,7 @@ typedef AStarRouter > AStar; std::shared_ptr lookup; if (oc.isSet("astar.all-distances")) { - lookup = std::shared_ptr ( new AStar::FLT(oc.getString("astar.all-distances"), (int)MSEdge::getAllEdges().size())); + lookup = std::shared_ptr (new AStar::FLT(oc.getString("astar.all-distances"), (int)MSEdge::getAllEdges().size())); } else if (oc.isSet("astar.landmark-distances")) { const double speedFactor = vehicle.getChosenSpeedFactor(); // we need an exemplary vehicle with speedFactor 1 diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSRoutingEngine.h sumo-1.2.0+dfsg1/src/microsim/devices/MSRoutingEngine.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSRoutingEngine.h 2018-10-12 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSRoutingEngine.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,8 +30,8 @@ #include #include #include -#include -#include +#include +#include #include #include "MSDevice.h" @@ -226,9 +226,6 @@ /// @brief The router to use by rerouter elements static AStarRouter >* myRouterWithProhibited; - /// @brief Whether to disturb edge weights dynamically - static double myRandomizeWeightsFactor; - /// @brief The container of pre-calculated routes static std::map, const MSRoute*> myCachedRoutes; diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,80 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSTransportableDevice_FCD.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 11.06.2013 +/// @version $Id$ +/// +// A device which stands as an implementation FCD and which outputs movereminder calls +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include "MSTransportableDevice_FCD.h" + +// =========================================================================== +// static members +// =========================================================================== + +// =========================================================================== +// method definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// static initialisation methods +// --------------------------------------------------------------------------- +void +MSTransportableDevice_FCD::insertOptions(OptionsCont& oc) { + insertDefaultAssignmentOptions("fcd", "FCD Device", oc, true); + + oc.doRegister("person-device.fcd.period", new Option_String("0")); + oc.addDescription("person-device.fcd.period", "FCD Device", "Recording period for FCD-data"); +} + + +void +MSTransportableDevice_FCD::buildDevices(MSTransportable& t, std::vector& into) { + OptionsCont& oc = OptionsCont::getOptions(); + if (equippedByDefaultAssignmentOptions(oc, "fcd", t, oc.isSet("fcd-output"), true)) { + MSTransportableDevice_FCD* device = new MSTransportableDevice_FCD(t, "fcd_" + t.getID()); + into.push_back(device); + } +} + + +// --------------------------------------------------------------------------- +// MSTransportableDevice_FCD-methods +// --------------------------------------------------------------------------- +MSTransportableDevice_FCD::MSTransportableDevice_FCD(MSTransportable& holder, const std::string& id) : + MSTransportableDevice(holder, id) { +} + + +MSTransportableDevice_FCD::~MSTransportableDevice_FCD() { +} + + +void +MSTransportableDevice_FCD::cleanup() { +} + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.h sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_FCD.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,109 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSTransportableDevice_FCD.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @date 11.06.2013 +/// @version $Id$ +/// +// A device which records floating car data +/****************************************************************************/ +#ifndef MSTransportableDevice_FCD_h +#define MSTransportableDevice_FCD_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "MSTransportableDevice.h" +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSTransportable; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSTransportableDevice_FCD + * @brief A device which collects info on the vehicle trip (mainly on departure and arrival) + * + * Each device collects departure time, lane and speed and the same for arrival. + * + * @see MSTransportableDevice + */ +class MSTransportableDevice_FCD : public MSTransportableDevice { +public: + /** @brief Inserts MSTransportableDevice_FCD-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 FCD-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[filled] into The vector to store the built device in + */ + static void buildDevices(MSTransportable& t, std::vector& into); + +public: + /// @brief Destructor. + ~MSTransportableDevice_FCD(); + + bool notifyEnter(SUMOTrafficObject& /*veh*/, MSMoveReminder::Notification /*reason*/, const MSLane* /*enteredLane*/) { + return false; + } + + void saveState(OutputDevice& /* out */) const { + } + + /// @brief return the name for this type of device + const std::string deviceName() const { + return "fcd"; + } + + /// @brief resets the edge filter + static void cleanup(); + +private: + /** @brief Constructor + * + * @param[in] holder The vehicle that holds this device + * @param[in] id The ID of the device + */ + MSTransportableDevice_FCD(MSTransportable& holder, const std::string& id); + +private: + /// @brief Invalidated copy constructor. + MSTransportableDevice_FCD(const MSTransportableDevice_FCD&); + + /// @brief Invalidated assignment operator. + MSTransportableDevice_FCD& operator=(const MSTransportableDevice_FCD&); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice.h sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,93 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSTransportableDevice.h +/// @author Michael Behrisch +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @date Tue, 04 Dec 2007 +/// @version $Id$ +/// +// Abstract in-person device +/****************************************************************************/ +#ifndef MSTransportableDevice_h +#define MSTransportableDevice_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include "MSDevice.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSTransportable; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSTransportableDevice + * @brief Abstract in-person device + * + * The MSTransportableDevice-interface brings the following interfaces to a vehicle that + * may be overwritten by real devices: + * @arg Retrieval of the person that holds the device + */ +class MSTransportableDevice : public MSDevice { +public: + /** @brief Constructor + * + * @param[in] holder The person that holds this device + * @param[in] id The ID of the device + */ + MSTransportableDevice(MSTransportable& holder, const std::string& id) : + MSDevice(id), myHolder(holder) { + } + + + /// @brief Destructor + virtual ~MSTransportableDevice() { } + + + /** @brief Returns the person that holds this device + * + * @return The person that holds this device + */ + MSTransportable& getHolder() const { + return myHolder; + } + +protected: + /// @brief The person that stores the device + MSTransportable& myHolder; + +private: + /// @brief Invalidated copy constructor. + MSTransportableDevice(const MSTransportableDevice&); + + /// @brief Invalidated assignment operator. + MSTransportableDevice& operator=(const MSTransportableDevice&); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.cpp sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.cpp --- sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,155 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSTransportableDevice_Routing.cpp +/// @author Michael Behrisch +/// @author Daniel Krajzewicz +/// @author Laura Bieker +/// @author Christoph Sommer +/// @author Jakob Erdmann +/// @date Tue, 04 Dec 2007 +/// @version $Id$ +/// +// A device that performs vehicle rerouting based on current edge speeds +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include "MSRoutingEngine.h" +#include "MSTransportableDevice_Routing.h" + + +// =========================================================================== +// method definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// static initialisation methods +// --------------------------------------------------------------------------- +void +MSTransportableDevice_Routing::insertOptions(OptionsCont& oc) { + insertDefaultAssignmentOptions("rerouting", "Routing", oc, true); + oc.doRegister("person-device.rerouting.period", new Option_String("0", "TIME")); + oc.addSynonyme("person-device.rerouting.period", "person-device.routing.period", true); + oc.addDescription("person-device.rerouting.period", "Routing", "The period with which the person shall be rerouted"); +} + + +void +MSTransportableDevice_Routing::buildDevices(MSTransportable& p, std::vector& into) { + const OptionsCont& oc = OptionsCont::getOptions(); + if (p.getParameter().wasSet(VEHPARS_FORCE_REROUTE) || equippedByDefaultAssignmentOptions(oc, "rerouting", p, false, true)) { + // route computation is enabled + const SUMOTime period = string2time(oc.getString("person-device.rerouting.period")); + MSRoutingEngine::initWeightUpdate(); + // build the device + into.push_back(new MSTransportableDevice_Routing(p, "routing_" + p.getID(), period)); + } +} + + +// --------------------------------------------------------------------------- +// MSTransportableDevice_Routing-methods +// --------------------------------------------------------------------------- +MSTransportableDevice_Routing::MSTransportableDevice_Routing(MSTransportable& holder, const std::string& id, SUMOTime period) + : MSTransportableDevice(holder, id), myPeriod(period), myLastRouting(-1), myRerouteCommand(0) { + if (holder.getParameter().wasSet(VEHPARS_FORCE_REROUTE)) { + // if we don't update the edge weights, we might as well reroute now and hopefully use our threads better + const SUMOTime execTime = MSRoutingEngine::hasEdgeUpdates() ? holder.getParameter().depart : -1; + MSNet::getInstance()->getInsertionEvents()->addEvent(new WrappingCommand(this, &MSTransportableDevice_Routing::wrappedRerouteCommandExecute), execTime); + // the event will deschedule and destroy itself so it does not need to be stored + } +} + + +MSTransportableDevice_Routing::~MSTransportableDevice_Routing() { + // make the rerouting command invalid if there is one + if (myRerouteCommand != nullptr) { + myRerouteCommand->deschedule(); + } +} + + +SUMOTime +MSTransportableDevice_Routing::wrappedRerouteCommandExecute(SUMOTime currentTime) { + reroute(currentTime); + return myPeriod; +} + + +void +MSTransportableDevice_Routing::reroute(const SUMOTime currentTime, const bool /* onInit */) { + MSRoutingEngine::initEdgeWeights(); + //check whether the weights did change since the last reroute + if (myLastRouting >= MSRoutingEngine::getLastAdaptation()) { + return; + } + myLastRouting = currentTime; +// MSRoutingEngine::reroute(myHolder, currentTime, onInit); +} + + +std::string +MSTransportableDevice_Routing::getParameter(const std::string& key) const { + if (key == "period") { + return time2string(myPeriod); + } + throw InvalidArgument("Parameter '" + key + "' is not supported for device of type '" + deviceName() + "'"); +} + + +void +MSTransportableDevice_Routing::setParameter(const std::string& key, const std::string& value) { + double doubleValue; + try { + doubleValue = StringUtils::toDouble(value); + } catch (NumberFormatException&) { + throw InvalidArgument("Setting parameter '" + key + "' requires a number for device of type '" + deviceName() + "'"); + } + if (key == "period") { + const SUMOTime oldPeriod = myPeriod; + myPeriod = TIME2STEPS(doubleValue); + if (myPeriod <= 0) { + myRerouteCommand->deschedule(); + } else if (oldPeriod <= 0) { + // re-schedule routing command + MSNet::getInstance()->getInsertionEvents()->addEvent(new WrappingCommand(this, &MSTransportableDevice_Routing::wrappedRerouteCommandExecute), SIMSTEP + myPeriod); + } + } else { + throw InvalidArgument("Setting parameter '" + key + "' is not supported for device of type '" + deviceName() + "'"); + } +} + + +void +MSTransportableDevice_Routing::saveState(OutputDevice& out) const { + out.openTag(SUMO_TAG_DEVICE); + out.writeAttr(SUMO_ATTR_ID, getID()); + std::vector internals; + internals.push_back(toString(myPeriod)); + out.writeAttr(SUMO_ATTR_STATE, toString(internals)); + out.closeTag(); +} + + +void +MSTransportableDevice_Routing::loadState(const SUMOSAXAttributes& attrs) { + std::istringstream bis(attrs.getString(SUMO_ATTR_STATE)); + bis >> myPeriod; +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.h sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSTransportableDevice_Routing.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,164 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSTransportableDevice_Routing.h +/// @author Michael Behrisch +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @date Tue, 04 Dec 2007 +/// @version $Id$ +/// +// A device that performs vehicle rerouting based on current edge speeds +/****************************************************************************/ +#ifndef MSTransportableDevice_Routing_h +#define MSTransportableDevice_Routing_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "MSTransportableDevice.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSLane; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSTransportableDevice_Routing + * @brief A device that performs person rerouting based on current edge speeds + * + * The routing-device system consists of in-vehicle devices that perform the routing + * and simulation-wide static methods for collecting edge weights and + * parallelizing in MSRoutingEngine. + * + * A device is assigned using the common explicit/probability - procedure. + * + * A device computes a new route for a person as soon as a personTrip appears in the plan. + */ +class MSTransportableDevice_Routing : public MSTransportableDevice { +public: + /** @brief Inserts MSTransportableDevice_Routing-options + * @param[filled] oc The options container to add the options to + */ + static void insertOptions(OptionsCont& oc); + + /** @brief checks MSTransportableDevice_Routing-options + * @param[filled] oc The options container with the user-defined options + */ + static bool checkOptions(OptionsCont& oc); + + + /** @brief Build devices for the given person, if needed + * + * The options are read and evaluated whether rerouting-devices shall be built + * for the given person. + * + * When the first device is built, the static container of edge weights + * used for routing is initialised with the mean speed the edges allow. + * In addition, an event is generated which updates these weights is + * built and added to the list of events to execute at a simulation end. + * + * The built device is stored in the given vector. + * + * @param[in] p The person for which a device may be built + * @param[filled] into The vector to store the built device in + */ + static void buildDevices(MSTransportable& p, std::vector& into); + + + /// @brief Destructor. + ~MSTransportableDevice_Routing(); + + + /// @brief return the name for this type of device + const std::string deviceName() const { + return "rerouting"; + } + + /** @brief Saves the state of the device + * + * @param[in] out The OutputDevice to write the information into + */ + void saveState(OutputDevice& out) const; + + /** @brief Loads the state of the device from the given description + * + * @param[in] attrs XML attributes describing the current state + */ + void loadState(const SUMOSAXAttributes& attrs); + + /// @brief initiate the rerouting, create router / thread pool on first use + void reroute(const SUMOTime currentTime, const bool onInit = false); + + /// @brief try to retrieve the given parameter from this device. Throw exception for unsupported key + std::string getParameter(const std::string& key) const; + + /// @brief try to set the given parameter for this device. Throw exception for unsupported key + void setParameter(const std::string& key, const std::string& value); + + +private: + + /** @brief Constructor + * + * @param[in] holder The vehicle that holds this device + * @param[in] id The ID of the device + * @param[in] period The period with which a new route shall be searched + */ + MSTransportableDevice_Routing(MSTransportable& holder, const std::string& id, SUMOTime period); + + /** @brief Performs rerouting after a period + * + * A new route is computed by calling the vehicle's "reroute" method, supplying + * "getEffort" as the edge effort retrieval method. + * + * This method is called from the event handler at the begin of a simulation + * step after the rerouting period is over. The reroute period is returned. + * + * @param[in] currentTime The current simulation time + * @return The offset to the next call (the rerouting period "myPeriod") + * @see MSVehicle::reroute + * @see MSEventHandler + * @see WrappingCommand + */ + SUMOTime wrappedRerouteCommandExecute(SUMOTime currentTime); + + +private: + /// @brief The period with which a vehicle shall be rerouted + SUMOTime myPeriod; + + /// @brief The last time a routing took place + SUMOTime myLastRouting; + + /// @brief The (optional) command responsible for rerouting + WrappingCommand< MSTransportableDevice_Routing >* myRerouteCommand; + +private: + /// @brief Invalidated copy constructor. + MSTransportableDevice_Routing(const MSTransportableDevice_Routing&); + + /// @brief Invalidated assignment operator. + MSTransportableDevice_Routing& operator=(const MSTransportableDevice_Routing&); + + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/MSVehicleDevice.h sumo-1.2.0+dfsg1/src/microsim/devices/MSVehicleDevice.h --- sumo-1.1.0+dfsg1/src/microsim/devices/MSVehicleDevice.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/MSVehicleDevice.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/devices/README_Contributing.md sumo-1.2.0+dfsg1/src/microsim/devices/README_Contributing.md --- sumo-1.1.0+dfsg1/src/microsim/devices/README_Contributing.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/devices/README_Contributing.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,29 @@ +Please feel free to add and / or modify files here but keep in mind that +EPL requires that "derivative works" be licensed under the terms of the EPL +whereas "separate modules of software" may be licensed arbitrarily. +Modifications to the files and directories listed here are considered derivative work: + +- MSDevice.cpp +- MSDevice.h +- MSDevice_Battery.cpp +- MSDevice_Battery.h +- MSDevice_Bluelight.cpp +- MSDevice_Bluelight.h +- MSDevice_BTreceiver.cpp +- MSDevice_BTreceiver.h +- MSDevice_BTsender.cpp +- MSDevice_BTsender.h +- MSDevice_Emissions.cpp +- MSDevice_Emissions.h +- MSDevice_Example.cpp +- MSDevice_Example.h +- MSDevice_Routing.cpp +- MSDevice_Routing.h +- MSDevice_SSM.cpp +- MSDevice_SSM.h +- MSDevice_Transportable.cpp +- MSDevice_Transportable.h +- MSDevice_Tripinfo.cpp +- MSDevice_Tripinfo.h +- MSDevice_Vehroutes.cpp +- MSDevice_Vehroutes.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/CMakeLists.txt sumo-1.2.0+dfsg1/src/microsim/engine/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/microsim/engine/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,15 @@ +set(microsim_engine_STAT_SRCS + EngineParameters.cpp + EngineParameters.h + FirstOrderLagModel.cpp + FirstOrderLagModel.h + GenericEngineModel.cpp + GenericEngineModel.h + RealisticEngineModel.cpp + RealisticEngineModel.h + VehicleEngineHandler.cpp + VehicleEngineHandler.h +) + +add_library(microsim_engine STATIC ${microsim_engine_STAT_SRCS}) +set_property(TARGET microsim_engine PROPERTY PROJECT_LABEL "z_microsim_engine") diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/EngineParameters.cpp sumo-1.2.0+dfsg1/src/microsim/engine/EngineParameters.cpp --- sumo-1.1.0+dfsg1/src/microsim/engine/EngineParameters.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/EngineParameters.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,170 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file EngineParameters.cpp +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +/****************************************************************************/ + +#include + +#include +#include // for M_PI +#include "EngineParameters.h" + + +EngineParameters::EngineParameters() : nGears(5), differentialRatio(3.714), wheelDiameter_m(0.94), + mass_kg(1300), cAir(0.3), a_m2(2.7), rho_kgpm3(1.2), cr1(0.0136), cr2(5.18e-7), + slope(0.), tiresFrictionCoefficient(0.7), engineEfficiency(0.8), + massFactor(1.089), cylinders(4), dt(0.01), minRpm(1000), maxRpm(7000), + brakesTau_s(0.2), tauEx_s(0.1), tauBurn_s(-1), fixedTauBurn(false) { + id = ""; + //set default gear ratios + gearRatios = new double[nGears]; + gearRatios[0] = 3.909;//4.5; + gearRatios[1] = 2.238;//3.5;//2.6; + gearRatios[2] = 1.520;//2.5;//1.5; + gearRatios[3] = 1.156;//1.5;//1.0; + gearRatios[4] = 0.971;//1.0;//0.8; + //default engine mapping + engineMapping.degree = 1; + engineMapping.x[0] = -7.50084; + engineMapping.x[1] = 0.02045; + //default shifting rule + shiftingRule.rpm = 6000; + shiftingRule.deltaRpm = 100; + //initialize precomputed coefficients + computeCoefficients(); + +} + +EngineParameters::EngineParameters(const EngineParameters& other) : + nGears(other.nGears), differentialRatio(other.differentialRatio), wheelDiameter_m(other.wheelDiameter_m), + mass_kg(other.mass_kg), cAir(other.cAir), a_m2(other.a_m2), rho_kgpm3(other.rho_kgpm3), cr1(other.cr1), cr2(other.cr2), + slope(other.slope), tiresFrictionCoefficient(other.tiresFrictionCoefficient), engineEfficiency(other.engineEfficiency), + massFactor(other.massFactor), cylinders(other.cylinders), dt(other.dt), minRpm(other.minRpm), maxRpm(other.maxRpm), + brakesTau_s(other.brakesTau_s), tauEx_s(other.tauEx_s), tauBurn_s(other.tauBurn_s), fixedTauBurn(other.fixedTauBurn) { + id = other.id; + gearRatios = new double[nGears]; + for (int i = 0; i < nGears; i++) { + gearRatios[i] = other.gearRatios[i]; + } + engineMapping.degree = other.engineMapping.degree; + for (int i = 0; i < engineMapping.degree; i++) { + engineMapping.x[i] = other.engineMapping.x[i]; + } + shiftingRule.rpm = other.shiftingRule.rpm; + shiftingRule.deltaRpm = other.shiftingRule.deltaRpm; + computeCoefficients(); +} +EngineParameters& EngineParameters::operator =(const EngineParameters& other) { + id = other.id; + nGears = other.nGears; + differentialRatio = other.differentialRatio; + wheelDiameter_m = other.wheelDiameter_m; + mass_kg = other.mass_kg; + cAir = other.cAir; + a_m2 = other.a_m2; + rho_kgpm3 = other.rho_kgpm3; + cr1 = other.cr1; + cr2 = other.cr2; + slope = other.slope; + tiresFrictionCoefficient = other.tiresFrictionCoefficient; + engineEfficiency = other.engineEfficiency; + massFactor = other.massFactor; + cylinders = other.cylinders; + dt = other.dt; + minRpm = other.minRpm; + maxRpm = other.maxRpm; + delete [] gearRatios; + gearRatios = new double[nGears]; + for (int i = 0; i < nGears; i++) { + gearRatios[i] = other.gearRatios[i]; + } + engineMapping.degree = other.engineMapping.degree; + for (int i = 0; i < engineMapping.degree; i++) { + engineMapping.x[i] = other.engineMapping.x[i]; + } + shiftingRule.rpm = other.shiftingRule.rpm; + shiftingRule.deltaRpm = other.shiftingRule.deltaRpm; + brakesTau_s = other.brakesTau_s; + tauBurn_s = other.tauBurn_s; + tauEx_s = other.tauEx_s; + fixedTauBurn = other.fixedTauBurn; + computeCoefficients(); + return *this; +} + +EngineParameters::~EngineParameters() { + delete [] gearRatios; +} + +void EngineParameters::computeCoefficients() { + __airFrictionCoefficient = 0.5 * cAir * a_m2 * rho_kgpm3; + __cr1 = mass_kg * massFactor * GRAVITY_MPS2 * cr1; + __cr2 = mass_kg * massFactor * GRAVITY_MPS2 * cr2; + __gravity = mass_kg * massFactor * GRAVITY_MPS2 * sin(slope / 180 * M_PI); + __maxNoSlipAcceleration = tiresFrictionCoefficient * GRAVITY_MPS2 * cos(slope / 180 * M_PI); + __rpmToSpeedCoefficient = wheelDiameter_m * M_PI / (differentialRatio * 60); + __speedToRpmCoefficient = differentialRatio * 60 / (wheelDiameter_m * M_PI); + __speedToThrustCoefficient = engineEfficiency * HP_TO_W; + __maxAccelerationCoefficient = mass_kg * massFactor; + __brakesAlpha = dt / (brakesTau_s + dt); + __brakesOneMinusAlpha = 1 - __brakesAlpha; + __engineTau1 = (420.0 * cylinders - 240.0) / (2.0 * cylinders); + __engineTau2 = (120.0 * cylinders - 120.0) / cylinders; + __engineTauDe_s = tauBurn_s + tauEx_s; +} + +void EngineParameters::dumpParameters(std::ostream& out) { + out << "ID: " << id.c_str() << std::endl; + + out << "Gearbox:\n"; + out << "\tGears number: " << (int)nGears << std::endl; + for (int i = 0; i < nGears; i++) { + out << std::setprecision(4) << "\tRatio of gear " << (i + 1) << ": " << gearRatios[i] << std::endl; + } + out << std::setprecision(4) << "\tFinal drive ratio: " << differentialRatio << std::endl; + + out << "Wheels:\n"; + out << std::setprecision(3) << "\tDiameter: " << wheelDiameter_m << " m\n"; + out << std::setprecision(3) << "\tFriction coefficient: " << tiresFrictionCoefficient << std::endl; + out << std::setprecision(10) << "\tcr1: " << cr1 << std::endl; + out << std::setprecision(10) << "\tcr2: " << cr2 << std::endl; + + out << "Mass:\n"; + out << std::setprecision(2) << "\tMass: " << mass_kg << " kg\n"; + out << std::setprecision(4) << "\tMass factor: " << massFactor << std::endl; + + out << "Air drag:\n"; + out << std::setprecision(4) << "\tDrag coefficient: " << cAir << std::endl; + out << std::setprecision(3) << "\tMax section: " << a_m2 << " m^2\n"; + + out << "Engine:\n"; + out << "\tEfficiency: " << engineEfficiency << std::endl; + out << "\tCylinders: " << cylinders << std::endl; + out << "\tMinimum rpm: " << minRpm << std::endl; + out << "\tMaximum rpm: " << maxRpm << std::endl; + out << "\tMapping (rpm to hp) degree: " << engineMapping.degree << std::endl; + for (int i = 0; i < engineMapping.degree; i++) { + out << "\t\tMapping coefficient x" << i << ": " << engineMapping.x[i] << std::endl; + } + out << "\tShifting rpm: " << shiftingRule.rpm << std::endl; + out << "\tShifting delta: " << shiftingRule.deltaRpm << std::endl; + + out << "Brakes:\n"; + out << "\tTime constant (s): " << brakesTau_s << std::endl; + + out << "Vehicle unrelated parameters:\n"; + out << std::setprecision(4) << "\tAir density: " << rho_kgpm3 << " kg/m^3\n"; + out << "\tRoad slope: " << slope << " degrees\n"; + out << std::setprecision(3) << "\tSimulation sampling time: " << dt << " s\n"; +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/EngineParameters.h sumo-1.2.0+dfsg1/src/microsim/engine/EngineParameters.h --- sumo-1.1.0+dfsg1/src/microsim/engine/EngineParameters.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/EngineParameters.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,137 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file EngineParameters.h +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +/****************************************************************************/ + +#ifndef ENGINEPARAMETERS_H_ +#define ENGINEPARAMETERS_H_ + +#include +#include + +//gravity force +#define GRAVITY_MPS2 9.81 +//horsepower to watts conversion factor +#define HP_TO_W 745.699872 +//maximum engine time constant +#define TAU_MAX 0.5 +//maximum degree for the engine polynomial +#define MAX_POLY_DEGREE 9 + +class EngineParameters { + +public: + + /** + * Defines the polynomial coefficients of the engine model mapping engine + * speed to horsepower. + * The model is of type + * power(rpm) [hp] = x0 + x1*hp + x2*hp^2 + ... + */ + struct PolynomialEngineModelRpmToHp { + int degree; + double x[MAX_POLY_DEGREE]; + }; + + /** + * Defines the rules for gear shifting. The structure contains the rpm + * at which shifting should occur and the delta used for up and down + * shifting. So to shift up, the rpm should be at least rpm + delta, + * while to shift down the should be lower than rpm - delta. this + * is needed to avoid oscillations when running aroud rpm + */ + struct GearShiftingRules { + double rpm; + double deltaRpm; + }; + + //id of the type of vehicle + std::string id; + //number of gears + int nGears; + //gear ratios + double* gearRatios; + //differential ratio + double differentialRatio; + //wheel diameter in meters + double wheelDiameter_m; + //mass of vehicle + double mass_kg; + //air friction parameters + double cAir, a_m2, rho_kgpm3; + //precomputed air friction coefficient + double __airFrictionCoefficient; + //tires parameters + double cr1, cr2; + //precomputed rolling resistance parameters + double __cr1, __cr2; + //road slope in degrees + double slope; + //precomputed gravitational force + double __gravity; + //tires friction coefficient + double tiresFrictionCoefficient; + //precomputed maximum acceleration with no slip + double __maxNoSlipAcceleration; + //engine mapping + struct PolynomialEngineModelRpmToHp engineMapping; + //gear shifting rule + struct GearShiftingRules shiftingRule; + //engine efficiency + double engineEfficiency; + //factor taking into account inertia of rotating masses, such as flywheel + double massFactor; + //number of cylinders of the engine + int cylinders; + //simulation timestep + double dt; + //min and max rpm + double minRpm, maxRpm; + //brakes actuation time constant in second + double brakesTau_s; + //engine time constants for exhaust and burning + double tauEx_s, tauBurn_s; + //whether tauBurn_s is fixed or dynamic + bool fixedTauBurn; + //other precomputed coefficients + double __rpmToSpeedCoefficient; + double __speedToRpmCoefficient; + double __speedToThrustCoefficient; + double __maxAccelerationCoefficient; + double __engineTau1; + double __engineTau2; + double __engineTauDe_s; + double __brakesAlpha; + double __brakesOneMinusAlpha; + //todo: finish + double minSpeed; + + /** + * Computes the precomputed coefficients used to speedup the model + */ + void computeCoefficients(); + + /** + * Writes the parameter to an output stream, for debugging purposes + */ + void dumpParameters(std::ostream& out); + + EngineParameters(); + EngineParameters(const EngineParameters& other); + EngineParameters& operator = (const EngineParameters& other); + virtual ~EngineParameters(); + +}; + +#endif /* ENGINEPARAMETERS_H_ */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/FirstOrderLagModel.cpp sumo-1.2.0+dfsg1/src/microsim/engine/FirstOrderLagModel.cpp --- sumo-1.1.0+dfsg1/src/microsim/engine/FirstOrderLagModel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/FirstOrderLagModel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,69 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file FirstOrderLagModel.cpp +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +// An engine model using a first order lag +/****************************************************************************/ + +#include "FirstOrderLagModel.h" +#include +#include "utils/common/StdDefs.h" +#include + +FirstOrderLagModel::FirstOrderLagModel() : GenericEngineModel(), + tau_s(0.5), dt_s(0.01) { + className = "FirstOrderLagModel"; + computeParameters(); +} +FirstOrderLagModel::~FirstOrderLagModel() {} + +void FirstOrderLagModel::computeParameters() { + alpha = dt_s / (tau_s + dt_s); + oneMinusAlpha = 1 - alpha; +} + +double FirstOrderLagModel::getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep) { + UNUSED_PARAMETER(speed_mps); + UNUSED_PARAMETER(timeStep); + return std::min( + maxAcceleration_mpsps, + std::max( + -maxDeceleration_mpsps, + alpha * reqAccel_mps2 + oneMinusAlpha * accel_mps2 + ) + ); +} + +void FirstOrderLagModel::loadParameters(const ParMap& parameters) { + parseParameter(parameters, std::string(FOLM_PAR_TAU), tau_s); + parseParameter(parameters, std::string(FOLM_PAR_DT), dt_s); + computeParameters(); +} + +void FirstOrderLagModel::setParameter(const std::string parameter, const std::string& value) { + UNUSED_PARAMETER(parameter); + UNUSED_PARAMETER(value); +} +void FirstOrderLagModel::setParameter(const std::string parameter, double value) { + if (parameter == FOLM_PAR_TAU) { + tau_s = value; + } + if (parameter == FOLM_PAR_DT) { + dt_s = value; + } + computeParameters(); +} +void FirstOrderLagModel::setParameter(const std::string parameter, int value) { + UNUSED_PARAMETER(parameter); + UNUSED_PARAMETER(value); +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/FirstOrderLagModel.h sumo-1.2.0+dfsg1/src/microsim/engine/FirstOrderLagModel.h --- sumo-1.1.0+dfsg1/src/microsim/engine/FirstOrderLagModel.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/FirstOrderLagModel.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,82 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file FirstOrderLagModel.h +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +// An engine model using a first order lag +/****************************************************************************/ + +#ifndef FIRSTORDERLAGMODEL_H_ +#define FIRSTORDERLAGMODEL_H_ + +#include "GenericEngineModel.h" + +/** + * This model models actuation lags using a first order lag, i.e., a first order + * low pass filter with a time constant tau + */ +class FirstOrderLagModel : public GenericEngineModel { + +protected: + + //engine lag time constant in seconds + double tau_s; + //simulation sampling time + double dt_s; + //helper variables + double alpha, oneMinusAlpha; + + /** + * Recomputes helper variables after loading parameters + */ + void computeParameters(); + +public: + FirstOrderLagModel(); + virtual ~FirstOrderLagModel(); + + /** + * Computes real vehicle acceleration given current speed, current acceleration, + * and requested acceleration. Acceleration can be negative as well. The + * model should handle decelerations as well + * + * @param[in] speed_mps current speed in meters per second + * @param[in] accel_mps2 current acceleration in meters per squared second + * @param[in] reqAccel_mps2 requested acceleration in meters per squared second + * @param[in] timeStep current simulation timestep + * @return the real acceleration that the vehicle applies in meters per + * squared second + */ + virtual double getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep = 0); + + /** + * Load model parameters. This method requires a map of strings to be as + * flexible as possible, independently from the actual model implementation + * + * @param[in] parameters a map of strings (from parameter name to parameter + * value) including configuration parameters + */ + virtual void loadParameters(const ParMap& parameters); + + /** + * Sets a single parameter value + * + * @param[in] parameter the name of the parameter + * @param[in] value the value for the parameter + */ + virtual void setParameter(const std::string parameter, const std::string& value); + virtual void setParameter(const std::string parameter, double value); + virtual void setParameter(const std::string parameter, int value); + +}; + +#endif /* FIRSTORDERLAGMODEL_H_ */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/GenericEngineModel.cpp sumo-1.2.0+dfsg1/src/microsim/engine/GenericEngineModel.cpp --- sumo-1.1.0+dfsg1/src/microsim/engine/GenericEngineModel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/GenericEngineModel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,66 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GenericEngineModel.cpp +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +// Generic interface for an engine model +/****************************************************************************/ + +#include + +#include +#include +#include "GenericEngineModel.h" + + +void GenericEngineModel::printParameterError(std::string parameter, std::string value) { + std::cerr << className << ": invalid value " << value << " for parameter " << parameter << std::endl; +} + +void GenericEngineModel::parseParameter(const ParMap& parameters, std::string parameter, double& value) { + ParMap::const_iterator par = parameters.find(parameter); + if (par != parameters.end()) { + try { + value = StringUtils::toDouble(par->second); + } catch (ProcessError&) { + printParameterError(par->first, par->second); + } + } +} +void GenericEngineModel::parseParameter(const ParMap& parameters, std::string parameter, int& value) { + ParMap::const_iterator par = parameters.find(parameter); + if (par != parameters.end()) { + try { + value = StringUtils::toInt(par->second); + } catch (ProcessError&) { + printParameterError(par->first, par->second); + } + } +} +void GenericEngineModel::parseParameter(const ParMap& parameters, std::string parameter, std::string& value) { + ParMap::const_iterator par = parameters.find(parameter); + if (par != parameters.end()) { + value = par->second; + } +} +void GenericEngineModel::setMaximumAcceleration(double maxAcceleration_mpsps) { + this->maxAcceleration_mpsps = maxAcceleration_mpsps; +} +void GenericEngineModel::setMaximumDeceleration(double maxDeceleration_mpsps) { + this->maxDeceleration_mpsps = maxDeceleration_mpsps; +} +double GenericEngineModel::setMaximumAcceleration() { + return maxAcceleration_mpsps; +} +double GenericEngineModel::setMaximumDeceleration() { + return maxDeceleration_mpsps; +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/GenericEngineModel.h sumo-1.2.0+dfsg1/src/microsim/engine/GenericEngineModel.h --- sumo-1.1.0+dfsg1/src/microsim/engine/GenericEngineModel.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/GenericEngineModel.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,122 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GenericEngineModel.h +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +// Generic interface for an engine model +/****************************************************************************/ + +#ifndef GENERICENGINEMODEL_H_ +#define GENERICENGINEMODEL_H_ + +#include +#include +#include + +/** + * This is an interface for plexe engine models. It provides two virtual methods + * that should be overridden by implementing classes: getRealAcceleration and + * loadParameters + */ +class GenericEngineModel { + +public: + + typedef std::map ParMap; + +protected: + + //class name, used to log information + std::string className; + //minimum and maximum acceleration of the model, if any + double maxAcceleration_mpsps, maxDeceleration_mpsps; + + /** + * Prints a parameter error + */ + void printParameterError(std::string parameter, std::string value); + + /** + * Parses a value from the parameter map + */ + void parseParameter(const ParMap& parameters, std::string parameter, double& value); + void parseParameter(const ParMap& parameters, std::string parameter, int& value); + void parseParameter(const ParMap& parameters, std::string parameter, std::string& value); + +public: + + GenericEngineModel() : maxAcceleration_mpsps(1.5), maxDeceleration_mpsps(7) {}; + virtual ~GenericEngineModel() {}; + + /** + * Computes real vehicle acceleration given current speed, current acceleration, + * and requested acceleration. Acceleration can be negative as well. The + * model should handle decelerations as well + * + * @param[in] speed_mps current speed in meters per second + * @param[in] accel_mps2 current acceleration in meters per squared second + * @param[in] reqAccel_mps2 requested acceleration in meters per squared second + * @param[in] timeStep current simulation timestep + * @return the real acceleration that the vehicle applies in meters per + * squared second + */ + virtual double getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep = 0) = 0; + + /** + * Load model parameters. This method requires a map of strings to be as + * flexible as possible, independently from the actual model implementation + * + * @param[in] parameters a map of strings (from parameter name to parameter + * value) including configuration parameters + */ + virtual void loadParameters(const ParMap& parameters) = 0; + + /** + * Sets a single parameter value + * + * @param[in] parameter the name of the parameter + * @param[in] value the value for the parameter + */ + virtual void setParameter(const std::string parameter, const std::string& value) = 0; + virtual void setParameter(const std::string parameter, double value) = 0; + virtual void setParameter(const std::string parameter, int value) = 0; + + /** + * Sets maximum acceleration value + * + * @param[in] maximum acceleration in meters per second squared + */ + void setMaximumAcceleration(double maxAcceleration_mpsps); + /** + * Sets maximum deceleration value + * + * @param[in] maximum deceleration (positive value) in meters per second + * squared + */ + void setMaximumDeceleration(double maxAcceleration_mpsps); + /** + * Returns the maximum acceleration value + * + * @return maximum acceleration in meters per second squared + */ + double setMaximumAcceleration(); + /** + * Returns the maximum deceleration value + * + * @return maximum deceleration (positive value) in meters per second + * squared + */ + double setMaximumDeceleration(); + +}; + +#endif /* GENERICENGINEMODEL_H_ */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/Makefile.am sumo-1.2.0+dfsg1/src/microsim/engine/Makefile.am --- sumo-1.1.0+dfsg1/src/microsim/engine/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,8 @@ +noinst_LIBRARIES = libmicrosimengine.a + +libmicrosimengine_a_SOURCES = \ +GenericEngineModel.cpp GenericEngineModel.h \ +FirstOrderLagModel.cpp FirstOrderLagModel.h \ +RealisticEngineModel.cpp RealisticEngineModel.h \ +EngineParameters.cpp EngineParameters.h \ +VehicleEngineHandler.cpp VehicleEngineHandler.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/RealisticEngineModel.cpp sumo-1.2.0+dfsg1/src/microsim/engine/RealisticEngineModel.cpp --- sumo-1.1.0+dfsg1/src/microsim/engine/RealisticEngineModel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/RealisticEngineModel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,306 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file RealisticEngineModel.cpp +/// @author Michele Segata, Antonio Saverio Valente +/// @date 4 Feb 2015 +/// @version $Id$ +/// +// A detailed engine model +/****************************************************************************/ + +#include "RealisticEngineModel.h" +#include +//define M_PI if this is not defined in +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif +#include +#include + +#include +#include +#include +#include + +#include +#include "utils/common/StdDefs.h" +#include + +RealisticEngineModel::RealisticEngineModel() { + className = "RealisticEngineModel"; + dt_s = 0.01; + xmlFile = "vehicles.xml"; + minSpeed_mps = rpmToSpeed_mps(ep.minRpm, ep.wheelDiameter_m, ep.differentialRatio, ep.gearRatios[0]); +} + +RealisticEngineModel::~RealisticEngineModel() {} + +double RealisticEngineModel::rpmToSpeed_mps(double rpm, double wheelDiameter_m = 0.94, + double differentialRatio = 4.6, double gearRatio = 4.5) { + return rpm * wheelDiameter_m * M_PI / (differentialRatio * gearRatio * 60); +} + +double RealisticEngineModel::rpmToSpeed_mps(double rpm) { + return ep.__rpmToSpeedCoefficient * rpm / ep.gearRatios[currentGear]; +} + +double RealisticEngineModel::speed_mpsToRpm(double speed_mps, double wheelDiameter_m, + double differentialRatio, double gearRatio) { + return speed_mps * differentialRatio * gearRatio * 60 / (wheelDiameter_m * M_PI); +} + +double RealisticEngineModel::speed_mpsToRpm(double speed_mps) { + return ep.__speedToRpmCoefficient * speed_mps * ep.gearRatios[currentGear]; +} + +double RealisticEngineModel::speed_mpsToRpm(double speed_mps, double gearRatio) { + return ep.__speedToRpmCoefficient * speed_mps * gearRatio; +} + +double RealisticEngineModel::rpmToPower_hp(double rpm, const struct EngineParameters::PolynomialEngineModelRpmToHp* engineMapping) { + double sum = engineMapping->x[0]; + for (int i = 1; i < engineMapping->degree; i++) { + sum += engineMapping->x[i] + pow(rpm, i); + } + return sum; +} + +double RealisticEngineModel::rpmToPower_hp(double rpm) { + if (rpm >= ep.maxRpm) { + rpm = ep.maxRpm; + } + double sum = ep.engineMapping.x[0]; + for (int i = 1; i < ep.engineMapping.degree; i++) { + sum += ep.engineMapping.x[i] * pow(rpm, i); + } + return sum; +} + +double RealisticEngineModel::speed_mpsToPower_hp(double speed_mps, + const struct EngineParameters::PolynomialEngineModelRpmToHp* engineMapping, + double wheelDiameter_m, double differentialRatio, + double gearRatio) { + double rpm = speed_mpsToRpm(speed_mps, wheelDiameter_m, differentialRatio, gearRatio); + return rpmToPower_hp(rpm, engineMapping); +} + +double RealisticEngineModel::speed_mpsToPower_hp(double speed_mps) { + return rpmToPower_hp(speed_mpsToRpm(speed_mps)); +} + +double RealisticEngineModel::speed_mpsToThrust_N(double speed_mps, + const struct EngineParameters::PolynomialEngineModelRpmToHp* engineMapping, + double wheelDiameter_m, double differentialRatio, + double gearRatio, double engineEfficiency) { + double power_hp = speed_mpsToPower_hp(speed_mps, engineMapping, wheelDiameter_m, differentialRatio, gearRatio); + return engineEfficiency * power_hp * HP_TO_W / speed_mps; +} + +double RealisticEngineModel::speed_mpsToThrust_N(double speed_mps) { + double power_hp = speed_mpsToPower_hp(speed_mps); + return ep.__speedToThrustCoefficient * power_hp / speed_mps; +} + +double RealisticEngineModel::airDrag_N(double speed_mps, double cAir, double a_m2, double rho_kgpm3) { + return 0.5 * cAir * a_m2 * rho_kgpm3 * speed_mps * speed_mps; +} +double RealisticEngineModel::airDrag_N(double speed_mps) { + return ep.__airFrictionCoefficient * speed_mps * speed_mps; +} + +double RealisticEngineModel::rollingResistance_N(double speed_mps, double mass_kg, double cr1, double cr2) { + return mass_kg * GRAVITY_MPS2 * (cr1 + cr2 * speed_mps * speed_mps); +} +double RealisticEngineModel::rollingResistance_N(double speed_mps) { + return ep.__cr1 + ep.__cr2 * speed_mps * speed_mps; +} + +double RealisticEngineModel::gravityForce_N(double mass_kg, double slope = 0) { + return mass_kg * GRAVITY_MPS2 * sin(slope / 180 * M_PI); +} + +double RealisticEngineModel::gravityForce_N() { + return ep.__gravity; +} + +double RealisticEngineModel::opposingForce_N(double speed_mps, double mass_kg, double slope, + double cAir, double a_m2, double rho_kgpm3, + double cr1, double cr2) { + return airDrag_N(speed_mps, cAir, a_m2, rho_kgpm3) + + rollingResistance_N(speed_mps, mass_kg, cr1, cr2) + + gravityForce_N(mass_kg, slope); +} +double RealisticEngineModel::opposingForce_N(double speed_mps) { + return airDrag_N(speed_mps) + rollingResistance_N(speed_mps) + gravityForce_N(); +} + +double RealisticEngineModel::maxNoSlipAcceleration_mps2(double slope, double frictionCoefficient) { + return frictionCoefficient * GRAVITY_MPS2 * cos(slope / 180 * M_PI); +} + +double RealisticEngineModel::maxNoSlipAcceleration_mps2() { + return ep.__maxNoSlipAcceleration; +} + +double RealisticEngineModel::thrust_NToAcceleration_mps2(double thrust_N) { + return thrust_N / ep.__maxAccelerationCoefficient; +} + +int RealisticEngineModel::performGearShifting(double speed_mps, double acceleration_mps2) { + int newGear = 0; + const double delta = acceleration_mps2 >= 0 ? ep.shiftingRule.deltaRpm : -ep.shiftingRule.deltaRpm; + for (newGear = 0; newGear < ep.nGears - 1; newGear++) { + const double rpm = speed_mpsToRpm(speed_mps, ep.gearRatios[newGear]); + if (rpm >= ep.shiftingRule.rpm + delta) { + continue; + } else { + break; + } + } + currentGear = newGear; + return currentGear; +} + +double RealisticEngineModel::maxEngineAcceleration_mps2(double speed_mps) { + const double maxEngineAcceleration = speed_mpsToThrust_N(speed_mps) / ep.__maxAccelerationCoefficient; + return std::min(maxEngineAcceleration, maxNoSlipAcceleration_mps2()); +} + +double RealisticEngineModel::getEngineTimeConstant_s(double rpm) { + if (rpm <= 0) { + return TAU_MAX; + } else { + if (ep.fixedTauBurn) + //in this case, tau_burn is fixed and is within __engineTauDe_s + { + return std::min(TAU_MAX, ep.__engineTau2 / rpm + ep.__engineTauDe_s); + } else + //in this case, tau_burn is dynamic and is within __engineTau1 + { + return std::min(TAU_MAX, ep.__engineTau1 / rpm + ep.tauEx_s); + } + } +} + +double RealisticEngineModel::getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep) { + + double realAccel_mps2; + //perform gear shifting, if needed + performGearShifting(speed_mps, accel_mps2); + //since we consider no clutch (clutch always engaged), 0 speed would mean 0 rpm, and thus + //0 available power. thus, the car could never start from a complete stop. so we assume + //a minimum speed of 1 m/s to compute engine power + double correctedSpeed = std::max(speed_mps, minSpeed_mps); + if (reqAccel_mps2 >= 0) { + //the system wants to accelerate + //the real engine acceleration is the minimum between what the engine can deliver, and what + //has been requested + double engineAccel = std::min(maxEngineAcceleration_mps2(correctedSpeed), reqAccel_mps2); + //now we need to computed delayed acceleration due to actuation lag + double tau = getEngineTimeConstant_s(speed_mpsToRpm(correctedSpeed)); + double alpha = ep.dt / (tau + ep.dt); + //compute the acceleration provided by the engine, thus removing friction from current acceleration + double currentAccel_mps2 = accel_mps2 + thrust_NToAcceleration_mps2(opposingForce_N(speed_mps)); + //use standard first order lag with time constant depending on engine rpm + //add back frictions resistance as well + realAccel_mps2 = alpha * engineAccel + (1 - alpha) * currentAccel_mps2 - thrust_NToAcceleration_mps2(opposingForce_N(speed_mps)); + } else { + realAccel_mps2 = getRealBrakingAcceleration(speed_mps, accel_mps2, reqAccel_mps2, timeStep); + } + + return realAccel_mps2; +} + +void RealisticEngineModel::getEngineData(double speed_mps, int& gear, double& rpm) { + gear = currentGear; + rpm = speed_mpsToRpm(speed_mps); +} + +double RealisticEngineModel::getRealBrakingAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime t) { + + UNUSED_PARAMETER(t); + //compute which part of the deceleration is currently done by frictions + double frictionDeceleration = thrust_NToAcceleration_mps2(opposingForce_N(speed_mps)); + //remove the part of the deceleration which is due to friction + double brakesAccel_mps2 = accel_mps2 + frictionDeceleration; + //compute the new brakes deceleration + double newBrakesAccel_mps2 = ep.__brakesAlpha * std::max(-ep.__maxNoSlipAcceleration, reqAccel_mps2) + ep.__brakesOneMinusAlpha * brakesAccel_mps2; + //our brakes limit is tires friction + newBrakesAccel_mps2 = std::max(-ep.__maxNoSlipAcceleration, newBrakesAccel_mps2); + //now we need to add back our friction deceleration + return newBrakesAccel_mps2 - frictionDeceleration; + +} + +void RealisticEngineModel::loadParameters(const ParMap& parameters) { + + std::string xmlFile, vehicleType; + + parseParameter(parameters, ENGINE_PAR_VEHICLE, vehicleType); + parseParameter(parameters, ENGINE_PAR_XMLFILE, xmlFile); + + loadParameters(); + +} + +void RealisticEngineModel::loadParameters() { + //initialize xerces library + XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize(); + //create our xml reader + XERCES_CPP_NAMESPACE::SAX2XMLReader* reader = XERCES_CPP_NAMESPACE::XMLReaderFactory::createXMLReader(); + if (reader == 0) { + std::cout << "The XML-parser could not be build." << std::endl; + } + reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgXercesSchema, true); + reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgSAX2CoreValidation, true); + + //VehicleEngineHandler is our SAX parser + VehicleEngineHandler* engineHandler = new VehicleEngineHandler(vehicleType); + reader->setContentHandler(engineHandler); + reader->setErrorHandler(engineHandler); + try { + //parse the document. if any error is present in the xml file, the simulation will be closed + reader->parse(xmlFile.c_str()); + //copy loaded parameters into our engine parameters + ep = engineHandler->getEngineParameters(); + ep.dt = dt_s; + ep.computeCoefficients(); + //compute "minimum speed" to be used when computing maximum acceleration at speeds close to 0 + minSpeed_mps = rpmToSpeed_mps(ep.minRpm, ep.wheelDiameter_m, ep.differentialRatio, ep.gearRatios[0]); + } catch (XERCES_CPP_NAMESPACE::SAXException&) { + std::cerr << "Error while parsing " << xmlFile << ": Does the file exist?" << std::endl; + exit(1); + } + + //delete handler and reader + delete engineHandler; + delete reader; +} + +void RealisticEngineModel::setParameter(const std::string parameter, const std::string& value) { + if (parameter == ENGINE_PAR_XMLFILE) { + xmlFile = value; + } + if (parameter == ENGINE_PAR_VEHICLE) { + vehicleType = value; + if (xmlFile != "") { + loadParameters(); + } + } +} +void RealisticEngineModel::setParameter(const std::string parameter, double value) { + if (parameter == ENGINE_PAR_DT) { + dt_s = value; + } +} +void RealisticEngineModel::setParameter(const std::string parameter, int value) { + UNUSED_PARAMETER(parameter); + UNUSED_PARAMETER(value); +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/RealisticEngineModel.h sumo-1.2.0+dfsg1/src/microsim/engine/RealisticEngineModel.h --- sumo-1.1.0+dfsg1/src/microsim/engine/RealisticEngineModel.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/RealisticEngineModel.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,381 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file RealisticEngineModel.h +/// @author Michele Segata, Antonio Saverio Valente +/// @date 4 Feb 2015 +/// @version $Id$ +/// +// A detailed engine model +/****************************************************************************/ + +#ifndef ENGINEMODEL_H_ +#define ENGINEMODEL_H_ + +#include "GenericEngineModel.h" + +#include + +#include "VehicleEngineHandler.h" +#include "EngineParameters.h" + + +/** + * This class implements a detailed engine and braking model which takes into + * account engine characteristics, gear ratios, external forces due to air + * drag, etc. + * This class uses a particular notation for variables to take into account + * both name and unit, to avoid confusion and mistakes. We write the name in + * camel case, then an underscore, then the unit of measure. For example, + * engine force in newton (kg * m / s^2) we use + * + * double engineForce_kgmps2 + * + * so units which are multiplied are just one next to the other (kgm), "p" + * denotes "per", while the exponent is just a number attached to the unit + * (s2). The same notation is used for functions that compute quantities + */ +class RealisticEngineModel : public GenericEngineModel { + +protected: + + EngineParameters ep; + //current gear + int currentGear; + //minimum speed to be considered for horsepower computation + double minSpeed_mps; + //simulation sampling time + double dt_s; + //xml file with engine parameters + std::string xmlFile; + //id of the vehicle parameters to load + std::string vehicleType; + + /** + * Given engine rotation in rpm, tracting wheels diameter, differential + * ratio, and gear ratio, computes vehicle speed in mps + * + * @param[in] rpm engine rotation speed in rpm + * @param[in] wheelDiameter_m tracting wheels diameter in m + * @param[in] differentialRatio differential ratio + * @param[in] gearRatio gear ratio + * @return vehicle speed in meters per second + */ + double rpmToSpeed_mps(double rpm, double wheelDiameter_m, + double differentialRatio, double gearRatio); + /** + * Computes vehicle speed in mps using stored values + * + * @param[in] rpm engine rotation speed in rpm + * @return vehicle speed in meters per second + */ + double rpmToSpeed_mps(double rpm); + + /** + * Given vehicle speed in mps, tracting wheels diameter, differential + * ratio, and gear ratio, computes engine rotation speed in rpm + * + * @param[in] speed_mps vehicle speed in meters per second + * @param[in] wheelDiameter_m tracting wheels diameter in m + * @param[in] differentialRatio differential ratio + * @param[in] gearRatio gear ratio + * @return engine rotation speed in rpm + */ + double speed_mpsToRpm(double speed_mps, double wheelDiameter_m, + double differentialRatio, double gearRatio); + + /** + * Computes engine rotation speed in rpm using stored values + * + * @param[in] speed_mps vehicle speed in meters per second + * @return engine rotation speed in rpm + */ + double speed_mpsToRpm(double speed_mps); + + /** + * Computes engine rotation speed in rpm using stored values and given + * gear ratio + * + * @param[in] speed_mps vehicle speed in meters per second + * @param[in] gearRatio gear ratio + * @return engine rotation speed in rpm + */ + double speed_mpsToRpm(double speed_mps, double gearRatio); + + /** + * Given an engine mapping computes the available power (hp) given + * current engine speed in rpm + * + * @param[in] rpm engine speed in rpm + * @param[in] engineMapping engine mapping from rpm to hp + * @return available horsepower + */ + double rpmToPower_hp(double rpm, const struct EngineParameters::PolynomialEngineModelRpmToHp* engineMapping); + + /** + * Computes the available power (hp) using stored values + * + * @param[in] rpm engine speed in rpm + * @return available horsepower + */ + double rpmToPower_hp(double rpm); + + /** + * Given vehicle speed in mps, and the rpm to hp mapping, computes + * the available power at the current speed + * + * @param[in] speed_mps vehicle speed in meters per second + * @param[in] engineMapping engine mapping from rpm to hp + * @param[in] wheelDiameter_m tracting wheels diameter in m + * @param[in] differentialRatio differential ratio + * @param[in] gearRatio gear ratio + * @return available horsepower + */ + double speed_mpsToPower_hp(double speed_mps, + const struct EngineParameters::PolynomialEngineModelRpmToHp* engineMapping, + double wheelDiameter_m, double differentialRatio, + double gearRatio); + + /** + * Computes the available power at the current speed using stored values + * + * @param[in] speed_mps vehicle speed in meters per second + * @return available horsepower + */ + double speed_mpsToPower_hp(double speed_mps); + + /** + * Given vehicle speed in mps, and the rpm to hp mapping, computes + * the available maximum thrust at current speed + * + * @param[in] speed_mps vehicle speed in meters per second + * @param[in] engineMapping engine mapping from rpm to hp + * @param[in] wheelDiameter_m tracting wheels diameter in m + * @param[in] differentialRatio differential ratio + * @param[in] gearRatio gear ratio + * @param[in] engineEfficiency engine efficiency + * @return available horsepower + */ + double speed_mpsToThrust_N(double speed_mps, + const struct EngineParameters::PolynomialEngineModelRpmToHp* engineMapping, + double wheelDiameter_m, double differentialRatio, + double gearRatio, double engineEfficiency); + + /** + * Computes the available maximum thrust at current speed using stored + * values + * + * @param[in] speed_mps vehicle speed in meters per second + * @return available maximum thrust + */ + double speed_mpsToThrust_N(double speed_mps); + + /** + * Computes air drag resistance + * + * @param[in] speed_mps vehicle speed in meters per second + * @param[in] cAir drag coefficient + * @param[in] a_m2 maximum vehicle section in square meters + * @param[in] rho_kgpm3 air density in kilograms per cubic meter + * @return air drag force in N + */ + double airDrag_N(double speed_mps, double cAir, double a_m2, double rho_kgpm3); + + /** + * Computes air drag resistance using stored values + * + * @param[in] speed_mps vehicle speed in meters per second + * @return air drag force in N + */ + double airDrag_N(double speed_mps); + + /** + * Computes rolling resistance + * + * @param[in] speed_mps vehicle speed in meters per second + * @param[in] mass_kg mass of the vehicle in kg + * @param[in] cr1 tires parameter + * @param[in] cr2 tires parameter + * @return rolling resistance in N + */ + double rollingResistance_N(double speed_mps, double mass_kg, double cr1, double cr2); + /** + * Computes rolling resistance using stored values + * + * @param[in] speed_mps vehicle speed in meters per second + * @return rolling resistance in N + */ + double rollingResistance_N(double speed_mps); + + /** + * Computes gravitational force due to slope + * + * @param[in] mass_kg vehicle mass in kg + * @param[in] slope road slope in degrees + * @return gravitational force in N + */ + double gravityForce_N(double mass_kg, double slope); + /** + * Computes gravitational force using stored values + * + * @return gravitational force in N + */ + double gravityForce_N(); + + /** + * Computes total opposing force, i.e., air drag, rolling resistance, and + * gravity + * + * @param[in] speed_mps speed in meters per second + * @param[in] mass_kg vehicle mass in kg + * @param[in] slope road slope in degrees + * @param[in] cAir drag coefficient + * @param[in] a_m2 maximum vehicle section in square meters + * @param[in] rho_kgpm3 air density in kilograms per cubic meter + * @param[in] cr1 tires parameter + * @param[in] cr2 tires parameter + * @return total opposing force in N + */ + double opposingForce_N(double speed_mps, double mass_kg, double slope, + double cAir, double a_m2, double rho_kgpm3, + double cr1, double cr2); + + /** + * Computes total opposing force, using stored values + * + * @param[in] speed_mps speed in meters per second + * @return total opposing force in N + */ + double opposingForce_N(double speed_mps); + + /** + * Computes maximum acceleration without slipping tires + * + * @param[in] slope road slope in degrees + * @param[in] frictionCoefficient tires friction coefficient + * @return maximum acceleration without slipping tires in meters per squared second + */ + double maxNoSlipAcceleration_mps2(double slope, double frictionCoefficient); + + /** + * Computes maximum acceleration without slipping tires using stored values + * + * @return maximum acceleration without slipping tires in meters per squared second + */ + double maxNoSlipAcceleration_mps2(); + + /** + * Computes the acceleration for a certain thrust, using stored values of mass + * + * @param[in] thrust_N thrust in N + * @return the acceleration for the vehicle mass in meters per squared second + */ + double thrust_NToAcceleration_mps2(double thrust_N); + + /** + * Computes current gear according to gear shifting rules + * + * @param[in] speed_mps current speed in meters per second + * @param[in] acceleration_mps2 current acceleration in meters per squared second + * @return current gear (0 based) + */ + int performGearShifting(double speed_mps, double acceleration_mps2); + + /** + * Computes the engine actuation time constant as function of the rpm + * + * @param[in] rpm engine rpm + * @return engine time constant in seconds + */ + double getEngineTimeConstant_s(double rpm); + + /** + * Computes maximum vehicle acceleration. This function computes the + * maximum acceleration at the wheel, considering tires friction but + * without considering air friction, rolling resistance, and road slope. + * + * @param[in] speed_mps current speed in meters per second + * @return the maximum engine acceleration at the wheel, as provided by the + * engine, if no tire slip occur + */ + double maxEngineAcceleration_mps2(double speed_mps); + + /** + * Computes real vehicle deceleration + * + * @param[in] speed_mps current speed in meters per second + * @param[in] accel_mps2 current vehicle acceleration in meters per squared second + * @param[in] reqAccel_mps2 the requested deceleration in meters per + * squared second. Notice that this value must be negative + * @param[in] the real deceleration in meters per squared second. Notice + * that the returned value is an acceleration, you should not invert it + */ + double getRealBrakingAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime t); + +public: + RealisticEngineModel(); + virtual ~RealisticEngineModel(); + + /** + * Computes real vehicle acceleration given current speed, current acceleration, + * and requested acceleration. If the requested acceleration is negative, then + * the braking model is invoked + * + * @param[in] speed_mps current speed in meters per second + * @param[in] accel_mps2 current acceleration in meters per squared second + * @param[in] reqAccel_mps2 requested acceleration in meters per squared second + * @param[in] timeStep current simulation timestep. needed for debugging purposes only + * @return the real acceleration that the vehicle applies + */ + virtual double getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep = 0); + + /** + * Load model parameters. This method requires a map of strings to be as + * flexible as possible, independently from the actual model implementation + * + * @param[in] parameters a map of strings (from parameter name to parameter + * value) including configuration parameters + */ + virtual void loadParameters(const ParMap& parameters); + + /** + * Load parameters from xml file + */ + void loadParameters(); + + /** + * Sets a single parameter value + * + * @param[in] parameter the name of the parameter + * @param[in] value the value for the parameter + */ + virtual void setParameter(const std::string parameter, const std::string& value); + virtual void setParameter(const std::string parameter, double value); + virtual void setParameter(const std::string parameter, int value); + + /** + * Returns current engine RPM and gear + * + * @param[in] speed_mps current speed + * @param[out] gear current gear + * @param[out] rpm engine's rpm + */ + void getEngineData(double speed_mps, int& gear, double& rpm); + +#ifdef EE +private: + //some things for the easter egg :) + bool initee; + int lastTimeStep; + struct sockaddr_in serv_addr; + int socketfd; +#endif +}; + +#endif /* ENGINEMODEL_H_ */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/VehicleEngineHandler.cpp sumo-1.2.0+dfsg1/src/microsim/engine/VehicleEngineHandler.cpp --- sumo-1.1.0+dfsg1/src/microsim/engine/VehicleEngineHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/VehicleEngineHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,358 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file VehicleEngineHandler.cpp +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include "VehicleEngineHandler.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +VehicleEngineHandler::VehicleEngineHandler(const std::string& toLoad) + : currentTag(TAG_VEHICLES), skip(false), currentGear(1) { + vehicleToLoad = toLoad; +} + + +VehicleEngineHandler::~VehicleEngineHandler() {} + +std::string transcode(const XMLCh* const qname) { + return std::string(XERCES_CPP_NAMESPACE::XMLString::transcode(qname)); +} + +const XMLCh* transcode(const char* name) { + return XERCES_CPP_NAMESPACE::XMLString::transcode(name); +} + +std::string getAttributeValue(const char* attributeName, const XERCES_CPP_NAMESPACE::Attributes& attrs) { + return transcode(attrs.getValue(transcode(attributeName))); +} + +void +VehicleEngineHandler::startElement(const XMLCh* const /*uri*/, + const XMLCh* const /*localname*/, + const XMLCh* const qname, + const XERCES_CPP_NAMESPACE::Attributes& attrs) { + std::string tag = XERCES_CPP_NAMESPACE::XMLString::transcode(qname); + + switch (currentTag) { + + case TAG_VEHICLES: + + //we are already inside the root. just ignore this + if (tag == ENGINE_TAG_VEHICLES) { + break; + } + + //this is a new vehicle definition. is this the one we should load? + if (tag == ENGINE_TAG_VEHICLE) { + if (getAttributeValue(ENGINE_TAG_VEHICLE_ID, attrs) != vehicleToLoad) { + skip = true; + } else { + engineParameters.id = vehicleToLoad; + } + currentTag = TAG_VEHICLE; + } + + break; + + case TAG_VEHICLE: + + //we are not interested in this vehicle + if (skip) { + break; + } + + //definition of gear ratios + if (tag == ENGINE_TAG_GEARS) { + currentTag = TAG_GEARS; + } + //definition of masses + else if (tag == ENGINE_TAG_MASS) { + loadMassData(attrs); + } + //definition of air drag + else if (tag == ENGINE_TAG_DRAG) { + loadDragData(attrs); + } + //definition of wheels + else if (tag == ENGINE_TAG_WHEELS) { + loadWheelsData(attrs); + } + //definition of engine + else if (tag == ENGINE_TAG_ENGINE) { + loadEngineData(attrs); + currentTag = TAG_ENGINE; + } + //definition of the shifting rule + else if (tag == ENGINE_TAG_SHIFTING) { + loadShiftingData(attrs); + } + //definition of brakes + else if (tag == ENGINE_TAG_BRAKES) { + loadBrakesData(attrs); + } else { + raiseUnknownTagError(tag); + } + + break; + + case TAG_GEARS: + + if (skip) { + break; + } + + if (tag == ENGINE_TAG_GEAR) { + //definition of the ratio for a single gear + loadGearData(attrs); + } else if (tag == ENGINE_TAG_GEAR_DIFFERENTIAL) { + //definition of the ratio for the final drive + loadDifferentialData(attrs); + } else { + raiseUnknownTagError(tag); + } + + break; + + case TAG_ENGINE: + + if (skip) { + break; + } + + if (tag == ENGINE_TAG_ENGINE_POWER) { + loadEngineModelData(attrs); + } else { + raiseUnknownTagError(tag); + } + + break; + + default: + + break; + + } + +} + + +void +VehicleEngineHandler::endElement(const XMLCh* const /*uri*/, + const XMLCh* const /*localname*/, + const XMLCh* const qname) { + std::string tag = XERCES_CPP_NAMESPACE::XMLString::transcode(qname); + + switch (currentTag) { + + case TAG_VEHICLES: + break; + + case TAG_VEHICLE: + if (tag == ENGINE_TAG_VEHICLE) { + skip = false; + currentTag = TAG_VEHICLES; + } + break; + + case TAG_GEARS: + if (tag == ENGINE_TAG_GEARS) { + currentTag = TAG_VEHICLE; + currentGear = 0; + + delete [] engineParameters.gearRatios; + engineParameters.gearRatios = new double[gearRatios.size()]; + for (int i = 0; i < (int)gearRatios.size(); i++) { + engineParameters.gearRatios[i] = gearRatios[i]; + } + engineParameters.nGears = (int)gearRatios.size(); + } + + break; + + case TAG_ENGINE: + if (tag == ENGINE_TAG_ENGINE) { + currentTag = TAG_VEHICLE; + } + break; + + default: + + break; + + } + +} + + + +void +VehicleEngineHandler::endDocument() { + engineParameters.computeCoefficients(); +} + +const EngineParameters& VehicleEngineHandler::getEngineParameters() { + return engineParameters; +} + + + +void +VehicleEngineHandler::loadMassData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + engineParameters.mass_kg = parseDoubleAttribute(ENGINE_TAG_MASS, ENGINE_TAG_MASS_MASS, attrs); + engineParameters.massFactor = parseDoubleAttribute(ENGINE_TAG_MASS, ENGINE_TAG_MASS_FACTOR, attrs); +} + + +void +VehicleEngineHandler::loadDragData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + engineParameters.cAir = parseDoubleAttribute(ENGINE_TAG_DRAG, ENGINE_TAG_DRAG_CAIR, attrs); + engineParameters.a_m2 = parseDoubleAttribute(ENGINE_TAG_DRAG, ENGINE_TAG_DRAG_SECTION, attrs); +} + + +void +VehicleEngineHandler::loadWheelsData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + engineParameters.wheelDiameter_m = parseDoubleAttribute(ENGINE_TAG_WHEELS, ENGINE_TAG_WHEELS_DIAMETER, attrs); + engineParameters.tiresFrictionCoefficient = parseDoubleAttribute(ENGINE_TAG_WHEELS, ENGINE_TAG_WHEELS_FRICTION, attrs); + engineParameters.cr1 = parseDoubleAttribute(ENGINE_TAG_WHEELS, ENGINE_TAG_WHEELS_CR1, attrs); + engineParameters.cr2 = parseDoubleAttribute(ENGINE_TAG_WHEELS, ENGINE_TAG_WHEELS_CR2, attrs); +} + + +void +VehicleEngineHandler::loadEngineData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + engineParameters.engineEfficiency = parseDoubleAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_EFFICIENCY, attrs); + engineParameters.cylinders = parseIntAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_CYLINDERS, attrs); + engineParameters.minRpm = parseIntAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_MINRPM, attrs); + engineParameters.maxRpm = parseIntAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_MAXRPM, attrs); + engineParameters.tauEx_s = parseDoubleAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_TAU_EX, attrs); + if (existsAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_TAU_BURN, attrs) != -1) { + engineParameters.tauBurn_s = parseDoubleAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_TAU_BURN, attrs); + engineParameters.fixedTauBurn = true; + } else { + engineParameters.fixedTauBurn = false; + } + engineParameters.maxRpm = parseIntAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_MAXRPM, attrs); + std::string mapType = parseStringAttribute(ENGINE_TAG_ENGINE, ENGINE_TAG_ENGINE_TYPE, attrs); + if (mapType != "poly") { + throw ProcessError("Invalid engine map type. Only \"poly\" is supported for now"); + } +} + + +void +VehicleEngineHandler::loadGearData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + + int number = parseIntAttribute(ENGINE_TAG_GEAR, ENGINE_TAG_GEAR_N, attrs); + if (number != currentGear) { + //fatal + std::stringstream ss; + ss << "Invalid gear number " << number << ". Please check that gears are inserted in order"; + throw ProcessError(ss.str()); + } + gearRatios.push_back(parseDoubleAttribute(ENGINE_TAG_GEAR, ENGINE_TAG_GEAR_RATIO, attrs)); + currentGear++; + +} + + +void +VehicleEngineHandler::loadDifferentialData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + engineParameters.differentialRatio = parseDoubleAttribute(ENGINE_TAG_GEAR_DIFFERENTIAL, ENGINE_TAG_GEAR_RATIO, attrs); +} + + +void +VehicleEngineHandler::loadEngineModelData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + //check that the degree is within the maximum supported + if (attrs.getLength() > MAX_POLY_DEGREE) { + std::stringstream ss; + ss << "Maximum degree for the engine polynomial is " << MAX_POLY_DEGREE << ". Please check your model's data"; + throw ProcessError(ss.str()); + } + //parse all polynomial coefficients + for (int i = 0; i < (int)attrs.getLength(); i++) { + engineParameters.engineMapping.x[i] = parsePolynomialCoefficient(i, attrs); + } + //save the actual degree + engineParameters.engineMapping.degree = (int)attrs.getLength(); +} + + +void +VehicleEngineHandler::loadShiftingData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + engineParameters.shiftingRule.rpm = parseDoubleAttribute(ENGINE_TAG_SHIFTING, ENGINE_TAG_SHIFTING_RPM, attrs); + engineParameters.shiftingRule.deltaRpm = parseDoubleAttribute(ENGINE_TAG_SHIFTING, ENGINE_TAG_SHIFTING_DELTARPM, attrs); +} + + +void +VehicleEngineHandler::loadBrakesData(const XERCES_CPP_NAMESPACE::Attributes& attrs) { + engineParameters.brakesTau_s = parseDoubleAttribute(ENGINE_TAG_BRAKES, ENGINE_TAG_BRAKES_TAU, attrs); +} + +int VehicleEngineHandler::existsAttribute(std::string /*tag*/, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs) { + return attrs.getIndex(transcode(attribute)); +} +std::string VehicleEngineHandler::parseStringAttribute(std::string tag, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs) { + int attributeIndex; + std::string strValue; + attributeIndex = existsAttribute(tag, attribute, attrs); + if (attributeIndex == -1) { + //raise will stop execution + raiseMissingAttributeError(tag, attribute); + } + return transcode(attrs.getValue(attributeIndex)); +} +int VehicleEngineHandler::parseIntAttribute(std::string tag, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs) { + return StringUtils::toInt(parseStringAttribute(tag, attribute, attrs)); +} +double VehicleEngineHandler::parseDoubleAttribute(std::string tag, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs) { + return StringUtils::toDouble(parseStringAttribute(tag, attribute, attrs)); +} +double VehicleEngineHandler::parsePolynomialCoefficient(int index, const XERCES_CPP_NAMESPACE::Attributes& attrs) { + std::stringstream ss; + ss << "x" << index; + return parseDoubleAttribute(ENGINE_TAG_ENGINE_POWER, ss.str().c_str(), attrs); +} + + +void +VehicleEngineHandler::raiseMissingAttributeError(std::string tag, std::string attribute) { + std::stringstream ss; + ss << "Missing attribute \"" << attribute << "\" for tag " << tag; + throw ProcessError(ss.str()); +} + + +void +VehicleEngineHandler::raiseUnknownTagError(std::string tag) { + std::stringstream ss; + ss << "I don't know what to do with this tag: " << tag; + throw ProcessError(ss.str()); +} + + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/microsim/engine/VehicleEngineHandler.h sumo-1.2.0+dfsg1/src/microsim/engine/VehicleEngineHandler.h --- sumo-1.1.0+dfsg1/src/microsim/engine/VehicleEngineHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/engine/VehicleEngineHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,217 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file VehicleEngineHandler.h +/// @author Michele Segata +/// @date 4 Feb 2015 +/// @version $Id$ +/// +/****************************************************************************/ + +#ifndef VEHICLEENGINEHANDLER_H +#define VEHICLEENGINEHANDLER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include "EngineParameters.h" + +//definition of tag names of the xml file +#define ENGINE_TAG_VEHICLES "vehicles" +#define ENGINE_TAG_VEHICLE "vehicle" +#define ENGINE_TAG_VEHICLE_ID "id" +#define ENGINE_TAG_VEHICLE_DESCRIPTION "description" +#define ENGINE_TAG_GEARS "gears" +#define ENGINE_TAG_GEAR "gear" +#define ENGINE_TAG_GEAR_N "n" +#define ENGINE_TAG_GEAR_RATIO "ratio" +#define ENGINE_TAG_GEAR_DIFFERENTIAL "differential" +#define ENGINE_TAG_MASS "mass" +#define ENGINE_TAG_MASS_MASS "mass" +#define ENGINE_TAG_MASS_FACTOR "massFactor" +#define ENGINE_TAG_WHEELS "wheels" +#define ENGINE_TAG_WHEELS_DIAMETER "diameter" +#define ENGINE_TAG_WHEELS_FRICTION "friction" +#define ENGINE_TAG_WHEELS_CR1 "cr1" +#define ENGINE_TAG_WHEELS_CR2 "cr2" +#define ENGINE_TAG_DRAG "drag" +#define ENGINE_TAG_DRAG_CAIR "cAir" +#define ENGINE_TAG_DRAG_SECTION "section" +#define ENGINE_TAG_ENGINE "engine" +#define ENGINE_TAG_ENGINE_TYPE "type" +#define ENGINE_TAG_ENGINE_EFFICIENCY "efficiency" +#define ENGINE_TAG_ENGINE_CYLINDERS "cylinders" +#define ENGINE_TAG_ENGINE_MINRPM "minRpm" +#define ENGINE_TAG_ENGINE_MAXRPM "maxRpm" +#define ENGINE_TAG_ENGINE_TAU_EX "tauEx" +#define ENGINE_TAG_ENGINE_TAU_BURN "tauBurn" +#define ENGINE_TAG_ENGINE_POWER "power" +#define ENGINE_TAG_ENGINE_POWER_RPM "rpm" +#define ENGINE_TAG_ENGINE_POWER_HP "hp" +#define ENGINE_TAG_ENGINE_POWER_KW "kw" +#define ENGINE_TAG_ENGINE_POWER_SLOPE "slope" +#define ENGINE_TAG_ENGINE_POWER_INTERCEPT "intercept" +#define ENGINE_TAG_SHIFTING "shifting" +#define ENGINE_TAG_SHIFTING_RPM "rpm" +#define ENGINE_TAG_SHIFTING_DELTARPM "deltaRpm" +#define ENGINE_TAG_BRAKES "brakes" +#define ENGINE_TAG_BRAKES_TAU "tau" + +#define TAG_VEHICLES 0 +#define TAG_VEHICLE 1 +#define TAG_GEARS 2 +#define TAG_ENGINE 3 + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * SAX handler used to parse engine parameters + */ +class VehicleEngineHandler : public XERCES_CPP_NAMESPACE::DefaultHandler { + +public: + + /** + * Constructor + * + * @param[in] toLoad id of the vehicle to be loaded + */ + VehicleEngineHandler(const std::string& toLoad); + + + /** @brief Destructor */ + virtual ~VehicleEngineHandler(); + + void startElement(const XMLCh* const uri, const XMLCh* const localname, + const XMLCh* const qname, const XERCES_CPP_NAMESPACE::Attributes& attrs); + + void endElement(const XMLCh* const uri, const XMLCh* const localname, + const XMLCh* const qname); + + void endDocument(); + + const EngineParameters& getEngineParameters(); + +protected: + + /** + * Loads mass information, i.e., mass in kg and mass factor which takes + * into account rotational parts of the engine + */ + void loadMassData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + \ + /** + * Load air drag related data such as drag coefficient and maximum vehicle + * section + */ + void loadDragData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Load data about vehicle's wheels, such as diameter and friction + * coefficient + */ + void loadWheelsData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Load data about the engine, such as efficiency factor and cylinders + */ + void loadEngineData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Load gear ratios + */ + void loadGearData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Load final drive ratio + */ + void loadDifferentialData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Load the mapping between engine rpm and output power in terms of linear + * function, i.e., slope and intercept + */ + void loadEngineModelData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Load the gear shifting rules + */ + void loadShiftingData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Load data about brakes + */ + void loadBrakesData(const XERCES_CPP_NAMESPACE::Attributes& attrs); + + /** + * Checks whether an attribute exists + * + * @return the index, if the attribute exists, -1 otherwise + */ + int existsAttribute(std::string tag, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Search and returns a string attribute if existing. If not, an error is + * printed to stderr and the simulation is stopped + */ + std::string parseStringAttribute(std::string tag, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Search and returns an integer attribute if existing. If not, an error is + * printed to stderr and the simulation is stopped. The simulation is + * stopped if the integer cannot be parsed as well + */ + int parseIntAttribute(std::string tag, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Search and returns a double attribute if existing. If not, an error is + * printed to stderr and the simulation is stopped. The simulation is + * stopped if the double cannot be parsed as well + */ + double parseDoubleAttribute(std::string tag, const char* attribute, const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Search for the x_i coefficient in the list of attributes. If not found, + * an error is printed to stderr and the simulation is stopped. The + * simulation is stopped if the value cannot be parsed as well + */ + double parsePolynomialCoefficient(int index, const XERCES_CPP_NAMESPACE::Attributes& attrs); + /** + * Writes a missing attribute error to stderr and terminates the simulation + */ + void raiseMissingAttributeError(std::string tag, std::string attribute); + /** + * Writes an unknown tag error to stderr and terminates the simulation + */ + void raiseUnknownTagError(std::string tag); + + +private: + + //current tag we're into + int currentTag; + //vehicle type to load + std::string vehicleToLoad; + //skip loading of current vehicle data + bool skip; + //current loaded gear + int currentGear; + //where to store loaded data + EngineParameters engineParameters; + //vector of gear ratios + std::vector gearRatios; + +private: + /// @brief invalidated copy constructor + VehicleEngineHandler(const VehicleEngineHandler& s); + + /// @brief invalidated assignment operator + const VehicleEngineHandler& operator=(const VehicleEngineHandler& s); + +}; + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/Makefile.in sumo-1.2.0+dfsg1/src/microsim/lcmodels/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,639 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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_SL2015.$(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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_SL2015.cpp MSLCM_SL2015.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) --foreign src/microsim/lcmodels/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/lcmodels/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_LC2013.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLCM_SL2015.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -94,6 +94,9 @@ myOwnState(0), myPreviousState(0), myPreviousState2(0), + myCanceledStateRight(LCA_NONE), + myCanceledStateCenter(LCA_NONE), + myCanceledStateLeft(LCA_NONE), mySpeedLat(0), myCommittedSpeed(0), myLaneChangeCompletion(1.0), @@ -117,6 +120,9 @@ myMaxSpeedLatFactor(v.getVehicleType().getParameter().getLCParam(SUMO_ATTR_LCA_MAXSPEEDLATFACTOR, 1)), myLastLaneChangeOffset(0), myAmOpposite(false) { + saveLCState(-1, LCA_UNKNOWN, LCA_UNKNOWN); + saveLCState(0, LCA_UNKNOWN, LCA_UNKNOWN); + saveLCState(1, LCA_UNKNOWN, LCA_UNKNOWN); } @@ -141,12 +147,12 @@ #ifdef DEBUG_MANEUVER if DEBUG_COND { std::cout << SIMTIME - << " veh=" << myVehicle.getID() - << " setManeuverDist() old=" << myManeuverDist << " new=" << dist - << std::endl; + << " veh=" << myVehicle.getID() + << " setManeuverDist() old=" << myManeuverDist << " new=" << dist + << std::endl; } #endif - myManeuverDist = dist; + myManeuverDist = fabs(dist) < NUMERICAL_EPS ? 0. : dist; } @@ -156,6 +162,72 @@ } +void +MSAbstractLaneChangeModel::saveNeighbors(const int dir, const MSLeaderDistanceInfo& followers, const MSLeaderDistanceInfo& leaders) { + if (dir == -1) { + myLeftFollowers = std::make_shared(followers); + myLeftLeaders = std::make_shared(leaders); + } else if (dir == 1) { + myRightFollowers = std::make_shared(followers); + myRightLeaders = std::make_shared(leaders); + } else { + // dir \in {-1,1} ! + assert(false); + } +} + + +void +MSAbstractLaneChangeModel::saveNeighbors(const int dir, const std::pair& follower, const std::pair& leader) { + if (dir == -1) { + myLeftFollowers = std::make_shared(follower, myVehicle.getLane()); + myLeftLeaders = std::make_shared(leader, myVehicle.getLane()); + } else if (dir == 1) { + myRightFollowers = std::make_shared(follower, myVehicle.getLane()); + myRightLeaders = std::make_shared(leader, myVehicle.getLane()); + } else { + // dir \in {-1,1} ! + assert(false); + } +} + + +void +MSAbstractLaneChangeModel::clearNeighbors() { + myLeftFollowers = nullptr; + myLeftLeaders = nullptr; + myRightFollowers = nullptr; + myRightLeaders = nullptr; +} + + +const std::shared_ptr +MSAbstractLaneChangeModel::getFollowers(const int dir) { + if (dir == -1) { + return myLeftFollowers; + } else if (dir == 1) { + return myRightFollowers; + } else { + // dir \in {-1,1} ! + assert(false); + } + return nullptr; +} + +const std::shared_ptr +MSAbstractLaneChangeModel::getLeaders(const int dir) { + if (dir == -1) { + return myLeftLeaders; + } else if (dir == 1) { + return myRightLeaders; + } else { + // dir \in {-1,1} ! + assert(false); + } + return nullptr; +} + + bool MSAbstractLaneChangeModel::congested(const MSVehicle* const neighLeader) { if (neighLeader == nullptr) { @@ -235,7 +307,7 @@ } void -MSAbstractLaneChangeModel::laneChangeOutput(const std::string& tag, MSLane* source, MSLane* target, int direction) { +MSAbstractLaneChangeModel::laneChangeOutput(const std::string& tag, MSLane* source, MSLane* target, int direction, double maneuverDist) { if (myLCOutput) { OutputDevice& of = OutputDevice::getDeviceByOption("lanechange-output"); of.openTag(tag); @@ -261,6 +333,9 @@ if (MSGlobals::gLateralResolution > 0) { const double latGap = direction < 0 ? myLastLateralGapRight : myLastLateralGapLeft; of.writeAttr("latGap", latGap == NO_NEIGHBOR ? "None" : toString(latGap)); + if (maneuverDist != 0) { + of.writeAttr("maneuverDistance", toString(maneuverDist)); + } } of.closeTag(); if (MSGlobals::gLaneChangeDuration > DELTA_T) { @@ -388,7 +463,7 @@ bool MSAbstractLaneChangeModel::cancelRequest(int state, int laneOffset) { // store request before canceling - myCanceledStates[laneOffset] |= state; + getCanceledState(laneOffset) |= state; int ret = myVehicle.influenceChangeDecision(state); return ret != state; } @@ -477,7 +552,7 @@ } -void +MSLane* MSAbstractLaneChangeModel::updateTargetLane() { #ifdef DEBUG_TARGET_LANE MSLane* oldTarget = myTargetLane; @@ -521,6 +596,7 @@ << std::endl; } #endif + return myTargetLane; } @@ -826,3 +902,23 @@ } } } + + +bool +MSAbstractLaneChangeModel::isStrategicBlocked() const { + const int stateRight = mySavedStateRight.second; + if ( + (stateRight & LCA_STRATEGIC) != 0 + && (stateRight & LCA_RIGHT) != 0 + && (stateRight & LCA_BLOCKED) != 0) { + return true; + } + const int stateLeft = mySavedStateLeft.second; + if ( + (stateLeft & LCA_STRATEGIC) != 0 + && (stateLeft & LCA_LEFT) != 0 + && (stateLeft & LCA_BLOCKED) != 0) { + return true; + } + return false; +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h 2018-09-18 22:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -192,17 +192,56 @@ virtual void updateSafeLatDist(const double travelledLatDist); const std::pair& getSavedState(const int dir) const { - return mySavedStates.find(dir)->second; + if (dir == -1) { + return mySavedStateRight; + } else if (dir == 0) { + return mySavedStateCenter; + } else { + return mySavedStateLeft; + } } - bool hasSavedState(const int dir) const { - return mySavedStates.find(dir) != mySavedStates.end(); + void saveLCState(const int dir, const int stateWithoutTraCI, const int state) { + const auto pair = std::make_pair(stateWithoutTraCI | getCanceledState(dir), state); + if (dir == -1) { + mySavedStateRight = pair; + } else if (dir == 0) { + mySavedStateCenter = pair; + } else { + mySavedStateLeft = pair; + } } - void saveLCState(const int dir, const int stateWithoutTraCI, const int state) { - mySavedStates[dir] = std::make_pair(stateWithoutTraCI | myCanceledStates[dir], state); + /// @brief Saves the lane change relevant vehicles, which are currently on neighboring lanes in the given direction + /// (as detected in wantsChangeSublane()). -> SL2015 case + void saveNeighbors(const int dir, const MSLeaderDistanceInfo& followers, const MSLeaderDistanceInfo& leaders); + + /// @brief Saves the lane change relevant vehicles, which are currently on neighboring lanes in the given direction + /// (as detected in wantsChange()). -> LC2013 case + void saveNeighbors(const int dir, const std::pair& follower, const std::pair& leader); + + /// @brief Clear info on neighboring vehicle from previous step + void clearNeighbors(); + + /// @brief Returns the neighboring, lc-relevant followers for the last step in the requested direction + const std::shared_ptr getFollowers(const int dir); + + /// @brief Returns the neighboring, lc-relevant leaders for the last step in the requested direction + const std::shared_ptr getLeaders(const int dir); + + int& getCanceledState(const int dir) { + if (dir == -1) { + return myCanceledStateRight; + } else if (dir == 0) { + return myCanceledStateCenter; + } else { + return myCanceledStateLeft; + } } + /// @return whether this vehicle is blocked from performing a strategic change + bool isStrategicBlocked() const; + void setFollowerGaps(CLeaderDist follower, double secGap); void setLeaderGaps(CLeaderDist, double secGap); void setOrigLeaderGaps(CLeaderDist, double secGap); @@ -211,9 +250,9 @@ void setOrigLeaderGaps(const MSLeaderDistanceInfo& vehicles); virtual void prepareStep() { - myCanceledStates[-1] = LCA_NONE; - myCanceledStates[0] = LCA_NONE; - myCanceledStates[1] = LCA_NONE; + getCanceledState(-1) = LCA_NONE; + getCanceledState(0) = LCA_NONE; + getCanceledState(1) = LCA_NONE; saveLCState(-1, LCA_UNKNOWN, LCA_UNKNOWN); saveLCState(0, LCA_UNKNOWN, LCA_UNKNOWN); saveLCState(1, LCA_UNKNOWN, LCA_UNKNOWN); @@ -464,7 +503,7 @@ /* @brief update lane change reservations after the vehicle moved to a new lane * @note The shadow lane should always be updated before updating the target lane. */ - void updateTargetLane(); + MSLane* updateTargetLane(); /* @brief Determines the lane which the vehicle intends to enter during its current action step. * targetDir is set to the offset of the returned lane with respect to the vehicle'a current lane. */ @@ -499,7 +538,7 @@ void primaryLaneChanged(MSLane* source, MSLane* target, int direction); /// @brief called once the vehicle ends a lane change manoeuvre (non-instant) - void laneChangeOutput(const std::string& tag, MSLane* source, MSLane* target, int direction); + void laneChangeOutput(const std::string& tag, MSLane* source, MSLane* target, int direction, double maneuverDist = 0); /// @brief whether the current change completes the manoeuvre virtual bool sublaneChangeCompleted(const double latDist) const { @@ -574,8 +613,20 @@ /// @brief lane changing state from step before the previous simulation step int myPreviousState2; - std::map > mySavedStates; - std::map myCanceledStates; + std::pair mySavedStateRight; + std::pair mySavedStateCenter; + std::pair mySavedStateLeft; + int myCanceledStateRight; + int myCanceledStateCenter; + int myCanceledStateLeft; + + /// @brief Cached info on lc-relevant neighboring vehicles + /// @{ + std::shared_ptr myLeftFollowers; + std::shared_ptr myLeftLeaders; + std::shared_ptr myRightFollowers; + std::shared_ptr myRightLeaders; + /// @} /// @brief the current lateral speed double mySpeedLat; diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.cpp sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.cpp --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.h sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.h --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_DK2008.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.cpp sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.cpp --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -982,8 +982,8 @@ double secureGap = nv->getCarFollowModel().getSecureGap(nv->getSpeed(), anticipatedSpeed, myCarFollowModel.getMaxDecel()); // propose follower speed corresponding to first estimation of gap - double vsafe = nv->getCarFollowModel().followSpeed( - nv, nv->getSpeed(), anticipatedGap, plannedSpeed, myCarFollowModel.getMaxDecel()); + vsafe = nv->getCarFollowModel().followSpeed( + nv, nv->getSpeed(), anticipatedGap, plannedSpeed, myCarFollowModel.getMaxDecel()); double helpAccel = SPEED2ACCEL(vsafe - nv->getSpeed()) / anticipationTime; if (anticipatedGap > secureGap) { @@ -1122,15 +1122,15 @@ driveToNextStop = myVehicle.nextStopDist(); const double stopPos = myVehicle.getPositionOnLane() + myVehicle.nextStopDist() - myVehicle.getLastStepDist(); #ifdef DEBUG_WANTS_CHANGE - if (DEBUG_COND) { - std::cout << SIMTIME << std::setprecision(gPrecision) << " veh=" << myVehicle.getID() - << " stopDist=" << myVehicle.nextStopDist() - << " lastDist=" << myVehicle.getLastStepDist() - << " stopPos=" << stopPos - << " currentDist=" << currentDist - << " neighDist=" << neighDist - << "\n"; - } + if (DEBUG_COND) { + std::cout << SIMTIME << std::setprecision(gPrecision) << " veh=" << myVehicle.getID() + << " stopDist=" << myVehicle.nextStopDist() + << " lastDist=" << myVehicle.getLastStepDist() + << " stopPos=" << stopPos + << " currentDist=" << currentDist + << " neighDist=" << neighDist + << "\n"; + } #endif currentDist = MAX2(currentDist, stopPos); neighDist = MAX2(neighDist, stopPos); @@ -1330,9 +1330,9 @@ #ifdef DEBUG_WANTS_CHANGE if (DEBUG_COND) { std::cout << " veh=" << myVehicle.getID() << " overtake stopped leader=" << leader.first->getID() - << " overtakeDist=" << overtakeDist - << " remaining=" << MIN2(neighDist, currentDist) - posOnLane - << "\n"; + << " overtakeDist=" << overtakeDist + << " remaining=" << MIN2(neighDist, currentDist) - posOnLane + << "\n"; } #endif ret = ret | lca | LCA_STRATEGIC | LCA_URGENT; @@ -1384,7 +1384,7 @@ } #endif // store state before canceling - myCanceledStates[laneOffset] |= ret; + getCanceledState(laneOffset) |= ret; ret = myVehicle.influenceChangeDecision(ret); if ((ret & lcaCounter) != 0) { // we are not interested in traci requests for the opposite direction here @@ -1926,8 +1926,10 @@ // add internal lengths const MSLane* nextLane = *(j + 1); const MSLink* link = MSLinkContHelper::getConnectingLink(*initialLane, *nextLane); - assert(link != 0); - roundaboutDistanceAhead += link->getInternalLengthsAfter(); + assert(link != nullptr || !MSGlobals::gCheckRoutes); + if (link != nullptr) { + roundaboutDistanceAhead += link->getInternalLengthsAfter(); + } } j++; } else { @@ -1953,7 +1955,10 @@ if (it + 1 != continuationLanes.end() && *(it + 1) != nullptr && (*(it + 1))->getEdge().isRoundabout()) { // find corresponding link for the current lane const MSLink* link = MSLinkContHelper::getConnectingLink(*lane, **(it + 1)); - assert(link != 0); + assert(link != nullptr || !MSGlobals::gCheckRoutes); + if (link == nullptr) { + break; + } double linkLength = link->getInternalLengthsAfter(); roundaboutDistanceAhead += linkLength; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.h sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.h --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.h 2018-09-18 22:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_LC2013.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -103,7 +103,7 @@ double getSafetyFactor() const; - double getOppositeSafetyFactor() const; + double getOppositeSafetyFactor() const; void prepareStep(); diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.cpp sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.cpp --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.cpp 2018-12-17 23:00:33.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -90,6 +90,7 @@ //#define DEBUG_STATE //#define DEBUG_SURROUNDING //#define DEBUG_MANEUVER +//#define DEBUG_COMMITTED_SPEED //#define DEBUG_PATCHSPEED //#define DEBUG_INFORM //#define DEBUG_ROUNDABOUTS @@ -134,8 +135,8 @@ // by default use SUMO_ATTR_LCA_PUSHY. If that is not set, try SUMO_ATTR_LCA_PUSHYGAP myPushy(v.getVehicleType().getParameter().getLCParam(SUMO_ATTR_LCA_PUSHY, 1 - (v.getVehicleType().getParameter().getLCParam(SUMO_ATTR_LCA_PUSHYGAP, - v.getVehicleType().getMinGapLat()) / - v.getVehicleType().getMinGapLat()))), + MAX2(NUMERICAL_EPS, v.getVehicleType().getMinGapLat())) / + MAX2(NUMERICAL_EPS, v.getVehicleType().getMinGapLat())))), myAssertive(v.getVehicleType().getParameter().getLCParam(SUMO_ATTR_LCA_ASSERTIVE, 1)), myImpatience(v.getVehicleType().getParameter().getLCParam(SUMO_ATTR_LCA_IMPATIENCE, 0)), myMinImpatience(myImpatience), @@ -250,7 +251,7 @@ MSAbstractLaneChangeModel::setOwnState(state); if (myVehicle.isActive()) { if ((state & (LCA_STRATEGIC | LCA_SPEEDGAIN)) != 0 && (state & LCA_BLOCKED) != 0) { - myImpatience = MIN2(1.0 , myImpatience + myVehicle.getActionStepLengthSecs() / myTimeToImpatience); + myImpatience = MIN2(1.0, myImpatience + myVehicle.getActionStepLengthSecs() / myTimeToImpatience); } else { // impatience decays only to the driver-specific level myImpatience = MAX2(myMinImpatience, myImpatience - myVehicle.getActionStepLengthSecs() / myTimeToImpatience); @@ -1027,7 +1028,7 @@ break; } } - double driveToNextStop = -std::numeric_limits::max(); + double driveToNextStop = -std::numeric_limits::max(); UNUSED_PARAMETER(driveToNextStop); // XXX use when computing usableDist if (myVehicle.nextStopDist() < std::numeric_limits::max() && &myVehicle.getNextStop().lane->getEdge() == &myVehicle.getLane()->getEdge()) { @@ -1037,15 +1038,15 @@ driveToNextStop = myVehicle.nextStopDist(); const double stopPos = myVehicle.getPositionOnLane() + myVehicle.nextStopDist() - myVehicle.getLastStepDist(); #ifdef DEBUG_WANTS_CHANGE - if (DEBUG_COND) { - std::cout << SIMTIME << std::setprecision(gPrecision) << " veh=" << myVehicle.getID() - << " stopDist=" << myVehicle.nextStopDist() - << " lastDist=" << myVehicle.getLastStepDist() - << " stopPos=" << stopPos - << " currentDist=" << currentDist - << " neighDist=" << neighDist - << "\n"; - } + if (DEBUG_COND) { + std::cout << SIMTIME << std::setprecision(gPrecision) << " veh=" << myVehicle.getID() + << " stopDist=" << myVehicle.nextStopDist() + << " lastDist=" << myVehicle.getLastStepDist() + << " stopPos=" << stopPos + << " currentDist=" << currentDist + << " neighDist=" << neighDist + << "\n"; + } #endif currentDist = MAX2(currentDist, stopPos); neighDist = MAX2(neighDist, stopPos); @@ -1950,7 +1951,7 @@ double foeRight, foeLeft; ahead.getSublaneBorders(sublane, 0, foeRight, foeLeft); // get all leaders ahead or overlapping - PersonDist leader = MSPModel::getModel()->nextBlocking(lane, myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getLength() , foeRight, foeLeft); + PersonDist leader = MSPModel::getModel()->nextBlocking(lane, myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getLength(), foeRight, foeLeft); if (leader.first != 0) { const double gap = leader.second - myVehicle.getVehicleType().getMinGap() - myVehicle.getVehicleType().getLength(); const double vSafePed = myCarFollowModel.stopSpeed(&myVehicle, vMax, gap); @@ -2071,8 +2072,8 @@ #endif // if we can move at least a little bit in the desired direction, do so (rather than block) const bool forcedTraCIChange = (myVehicle.hasInfluencer() - && myVehicle.getInfluencer().getLatDist() != 0 - && myVehicle.getInfluencer().ignoreOverlap()); + && myVehicle.getInfluencer().getLatDist() != 0 + && myVehicle.getInfluencer().ignoreOverlap()); if (latDist < 0) { if (mySafeLatDistRight <= NUMERICAL_EPS) { return LCA_BLOCKED_RIGHT | LCA_OVERLAPPING; @@ -2489,6 +2490,7 @@ << " best.length=" << best.length << " maxJam=" << maxJam << " neighLeftPlace=" << neighLeftPlace + << " myLeftSpace=" << myLeftSpace << "\n"; } #endif @@ -2578,6 +2580,7 @@ //const double requiredDist = MAX2(2 * myVehicle.getLateralOverlap(), getSublaneWidth()) / SUMO_const_laneWidth * laDist; const double requiredDist = 2 * myVehicle.getLateralOverlap() / SUMO_const_laneWidth * laDist; double currentShadowDist = -myVehicle.getPositionOnLane(); + MSLane* shadowPrev = nullptr; for (std::vector::const_iterator it = curr.bestContinuations.begin(); it != curr.bestContinuations.end(); ++it) { if (*it == nullptr) { continue; @@ -2586,7 +2589,16 @@ if (shadow == nullptr || currentShadowDist >= requiredDist) { break; } + if (shadowPrev != nullptr) { + currentShadowDist += shadowPrev->getEdge().getInternalFollowingLengthTo(&shadow->getEdge()); + } currentShadowDist += shadow->getLength(); + shadowPrev = shadow; +#ifdef DEBUG_STRATEGIC_CHANGE + if (gDebugFlag2) { + std::cout << " shadow=" << shadow->getID() << " currentShadowDist=" << currentShadowDist << "\n"; + } +#endif } #ifdef DEBUG_STRATEGIC_CHANGE if (gDebugFlag2) { @@ -2612,7 +2624,7 @@ } #endif // store state before canceling - myCanceledStates[laneOffset] |= ret; + getCanceledState(laneOffset) |= ret; int retTraCI = myVehicle.influenceChangeDecision(ret); if ((retTraCI & LCA_TRACI) != 0) { if ((retTraCI & LCA_STAY) != 0) { @@ -3093,6 +3105,11 @@ myCommittedSpeed = MIN3(myLeftSpace / secondsToLeaveLane, myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle), myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle)); +#if defined(DEBUG_MANEUVER) || defined(DEBUG_COMMITTED_SPEED) + if (debugVehicle()) { + std::cout << SIMTIME << " veh=" << myVehicle.getID() << " myCommittedSpeed=" << myCommittedSpeed << " leftSpace=" << myLeftSpace << " secondsToLeave=" << secondsToLeaveLane << "\n"; + } +#endif } else { // Calculate seconds needed for leaving lane assuming start from lateral speed zero, and lat.accel == -lat.decel @@ -3113,13 +3130,14 @@ assert(myVehicle.getAcceleration() < 0.); nextLeftSpace = myLeftSpace + (myVehicle.getSpeed() * myVehicle.getSpeed() / myVehicle.getAcceleration()) * 0.5; } - const double avoidArrivalSpeed = nextActionStepSpeed + TS * MSCFModel::avoidArrivalAccel(nextLeftSpace, secondsToLeaveLane - timeTillActionStep, nextActionStepSpeed); + const double avoidArrivalSpeed = nextActionStepSpeed + ACCEL2SPEED(MSCFModel::avoidArrivalAccel( + nextLeftSpace, secondsToLeaveLane - timeTillActionStep, nextActionStepSpeed, myVehicle.getCarFollowModel().getEmergencyDecel())); myCommittedSpeed = MIN3(avoidArrivalSpeed, myVehicle.getSpeed() + myVehicle.getCarFollowModel().getMaxAccel() * myVehicle.getActionStepLengthSecs(), myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle)); -#ifdef DEBUG_MANEUVER +#if defined(DEBUG_MANEUVER) || defined(DEBUG_COMMITTED_SPEED) if (gDebugFlag2) { std::cout << SIMTIME << " veh=" << myVehicle.getID() @@ -3127,7 +3145,7 @@ << " currentSpeed=" << myVehicle.getSpeed() << " myLeftSpace=" << myLeftSpace << "\n nextLeftSpace=" << nextLeftSpace - << " nextLeftSpace=" << nextActionStepSpeed + << " nextActionStepSpeed=" << nextActionStepSpeed << " nextActionStepRemainingSeconds=" << secondsToLeaveLane - timeTillActionStep << "\n"; } @@ -3138,7 +3156,7 @@ if (myCommittedSpeed < myVehicle.getCarFollowModel().minNextSpeed(myVehicle.getSpeed(), &myVehicle)) { myCommittedSpeed = 0; } -#ifdef DEBUG_MANEUVER +#if defined(DEBUG_MANEUVER) || defined(DEBUG_COMMITTED_SPEED) if (gDebugFlag2) { std::cout << SIMTIME << " veh=" << myVehicle.getID() @@ -3169,7 +3187,7 @@ const double leftVehSide = rightVehSide + vehWidth; const double rightVehSideDest = rightVehSide + latDist; const double leftVehSideDest = leftVehSide + latDist; -#ifdef DEBUG_MANEUVER +#if defined(DEBUG_MANEUVER) || defined(DEBUG_COMMITTED_SPEED) if (gDebugFlag2) { std::cout << " commitFollowSpeed" << " latDist=" << latDist @@ -3188,7 +3206,7 @@ // only check the current stripe occuped by foe (transform into edge-coordinates) double foeRight, foeLeft; leaders.getSublaneBorders(i, foeOffset, foeRight, foeLeft); -#ifdef DEBUG_MANEUVER +#if defined(DEBUG_MANEUVER) || defined(DEBUG_COMMITTED_SPEED) if (gDebugFlag2) { std::cout << " foe=" << vehDist.first->getID() << " gap=" << vehDist.second @@ -3202,11 +3220,10 @@ #endif if (overlap(rightVehSideDest, leftVehSideDest, foeRight, foeLeft)) { // case 1 - assert(vehDist.second >= 0); const double vSafe = myVehicle.getCarFollowModel().followSpeed( &myVehicle, speed, vehDist.second, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); speed = MIN2(speed, vSafe); -#ifdef DEBUG_MANEUVER +#if defined(DEBUG_MANEUVER) || defined(DEBUG_COMMITTED_SPEED) if (gDebugFlag2) { std::cout << " case1 vsafe=" << vSafe << " speed=" << speed << "\n"; } @@ -3217,7 +3234,7 @@ secondsToLeaveLane, &myVehicle, speed, vehDist.second, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); speed = MIN2(speed, vSafe); -#ifdef DEBUG_MANEUVER +#if defined(DEBUG_MANEUVER) || defined(DEBUG_COMMITTED_SPEED) if (gDebugFlag2) { std::cout << " case2 vsafe=" << vSafe << " speed=" << speed << "\n"; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.h sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.h --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.h 2018-06-08 22:00:20.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/MSLCM_SL2015.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/lcmodels/README_Contributing.md sumo-1.2.0+dfsg1/src/microsim/lcmodels/README_Contributing.md --- sumo-1.1.0+dfsg1/src/microsim/lcmodels/README_Contributing.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/lcmodels/README_Contributing.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,13 @@ +Please feel free to add and / or modify files here but keep in mind that +EPL requires that "derivative works" be licensed under the terms of the EPL +whereas "separate modules of software" may be licensed arbitrarily. +Modifications to the files and directories listed here are considered derivative work: + +- MSAbstractLaneChangeModel.cpp +- MSAbstractLaneChangeModel.h +- MSLCM_DK2008.cpp +- MSLCM_DK2008.h +- MSLCM_LC2013.cpp +- MSLCM_LC2013.h +- MSLCM_SL2015.cpp +- MSLCM_SL2015.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/logging/CastingFunctionBinding.h sumo-1.2.0+dfsg1/src/microsim/logging/CastingFunctionBinding.h --- sumo-1.1.0+dfsg1/src/microsim/logging/CastingFunctionBinding.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/logging/CastingFunctionBinding.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/logging/FuncBinding_IntParam.h sumo-1.2.0+dfsg1/src/microsim/logging/FuncBinding_IntParam.h --- sumo-1.1.0+dfsg1/src/microsim/logging/FuncBinding_IntParam.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/logging/FuncBinding_IntParam.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/logging/FuncBinding_StringParam.h sumo-1.2.0+dfsg1/src/microsim/logging/FuncBinding_StringParam.h --- sumo-1.1.0+dfsg1/src/microsim/logging/FuncBinding_StringParam.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/logging/FuncBinding_StringParam.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/logging/FunctionBinding.h sumo-1.2.0+dfsg1/src/microsim/logging/FunctionBinding.h --- sumo-1.1.0+dfsg1/src/microsim/logging/FunctionBinding.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/logging/FunctionBinding.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/logging/Makefile.in sumo-1.2.0+dfsg1/src/microsim/logging/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/logging/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/logging/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,467 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/logging -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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) -am__DIST_COMMON = $(srcdir)/Makefile.in -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -EXTRA_DIST = CastingFunctionBinding.h \ -FuncBinding_IntParam.h FuncBinding_StringParam.h FunctionBinding.h - -all: all-am - -.SUFFIXES: -$(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) --foreign src/microsim/logging/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/logging/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -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 -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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - 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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/Makefile.am sumo-1.2.0+dfsg1/src/microsim/Makefile.am --- sumo-1.1.0+dfsg1/src/microsim/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -31,7 +31,8 @@ MSStateHandler.h MSStateHandler.cpp \ MSDriverState.h MSDriverState.cpp \ MSTransportable.h MSTransportable.cpp \ -MSTransportableControl.h MSTransportableControl.cpp +MSTransportableControl.h MSTransportableControl.cpp \ +MSDynamicShapeUpdater.h MSDynamicShapeUpdater.cpp -SUBDIRS = actions cfmodels devices lcmodels logging output pedestrians \ +SUBDIRS = actions cfmodels devices engine lcmodels logging output pedestrians \ traffic_lights trigger diff -Nru sumo-1.1.0+dfsg1/src/microsim/Makefile.in sumo-1.2.0+dfsg1/src/microsim/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,836 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - MSCModel_NonInteracting.$(OBJEXT) MSContainer.$(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) \ - MSLaneChanger.$(OBJEXT) MSLaneChangerSublane.$(OBJEXT) \ - MSLink.$(OBJEXT) MSLinkCont.$(OBJEXT) \ - MSLogicJunction.$(OBJEXT) MSMoveReminder.$(OBJEXT) \ - MSNet.$(OBJEXT) MSNoLogicJunction.$(OBJEXT) \ - MSRightOfWayJunction.$(OBJEXT) MSRoute.$(OBJEXT) \ - MSRouteHandler.$(OBJEXT) MSStoppingPlace.$(OBJEXT) \ - MSParkingArea.$(OBJEXT) MSVehicle.$(OBJEXT) \ - MSLeaderInfo.$(OBJEXT) MSVehicleContainer.$(OBJEXT) \ - MSVehicleControl.$(OBJEXT) MSVehicleTransfer.$(OBJEXT) \ - MSVehicleType.$(OBJEXT) MSStateHandler.$(OBJEXT) \ - MSDriverState.$(OBJEXT) MSTransportable.$(OBJEXT) \ - MSTransportableControl.$(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) -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 = $(libmicrosim_a_SOURCES) -DIST_SOURCES = $(libmicrosim_a_SOURCES) -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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmicrosim.a -libmicrosim_a_SOURCES = MSBitSetLogic.h \ -MSBaseVehicle.cpp MSBaseVehicle.h \ -MSCModel_NonInteracting.h MSCModel_NonInteracting.cpp \ -MSContainer.cpp MSContainer.h \ -MSEdge.cpp MSEdge.h MSEdgeControl.cpp MSEdgeControl.h \ -MSEdgeWeightsStorage.cpp MSEdgeWeightsStorage.h \ -MSEventControl.cpp MSEventControl.h \ -MSFrame.cpp MSFrame.h MSGlobals.cpp MSGlobals.h \ -MSInsertionControl.cpp MSInsertionControl.h \ -MSInternalJunction.cpp MSInternalJunction.h \ -MSJunction.cpp MSJunction.h \ -MSJunctionControl.cpp MSJunctionControl.h \ -MSJunctionLogic.cpp MSJunctionLogic.h MSLane.cpp MSLane.h \ -MSLaneChanger.cpp MSLaneChanger.h \ -MSLaneChangerSublane.cpp MSLaneChangerSublane.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 \ -MSRightOfWayJunction.cpp MSRightOfWayJunction.h \ -MSRoute.cpp MSRoute.h MSRouteHandler.cpp MSRouteHandler.h \ -MSStoppingPlace.cpp MSStoppingPlace.h \ -MSParkingArea.cpp MSParkingArea.h \ -MSVehicle.cpp MSVehicle.h \ -MSLeaderInfo.cpp MSLeaderInfo.h \ -MSVehicleContainer.cpp MSVehicleContainer.h \ -MSVehicleControl.cpp MSVehicleControl.h \ -MSVehicleTransfer.cpp MSVehicleTransfer.h \ -MSVehicleType.cpp MSVehicleType.h \ -MSStateHandler.h MSStateHandler.cpp \ -MSDriverState.h MSDriverState.cpp \ -MSTransportable.h MSTransportable.cpp \ -MSTransportableControl.h MSTransportableControl.cpp - -SUBDIRS = actions cfmodels devices lcmodels logging output pedestrians \ -traffic_lights trigger - -all: all-recursive - -.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) --foreign src/microsim/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@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)/MSDriverState.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSEventControl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSGlobals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSInsertionControl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSInternalJunction.Po@am__quote@ -@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)/MSLane.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLaneChanger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLaneChangerSublane.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLeaderInfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLinkCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLogicJunction.Po@am__quote@ -@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)/MSParkingArea.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRouteHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSStateHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSStoppingPlace.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSTransportable.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSTransportableControl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVehicle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVehicleContainer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVehicleControl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVehicleTransfer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVehicleType.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 - -# 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LIBRARIES) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 \ - 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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/MSBaseVehicle.cpp sumo-1.2.0+dfsg1/src/microsim/MSBaseVehicle.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSBaseVehicle.cpp 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSBaseVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -44,6 +44,11 @@ #include #include "MSInsertionControl.h" +//#define DEBUG_REROUTE +//#define DEBUG_COND (getID() == "follower") +//#define DEBUG_COND (true) +#define DEBUG_COND (isSelected()) + // =========================================================================== // static members // =========================================================================== @@ -88,12 +93,6 @@ if ((*myRoute->begin())->isTazConnector() || myRoute->getLastEdge()->isTazConnector()) { pars->parametersSet |= VEHPARS_FORCE_REROUTE; } - // init devices - MSDevice::buildVehicleDevices(*this, myDevices); - // - for (MSVehicleDevice* dev : myDevices) { - myMoveReminders.push_back(std::make_pair(dev, 0.)); - } myRoute->addReference(); if (!pars->wasSet(VEHPARS_FORCE_REROUTE)) { calculateArrivalParams(); @@ -104,6 +103,11 @@ } } } + // init devices + MSDevice::buildVehicleDevices(*this, myDevices); + for (MSVehicleDevice* dev : myDevices) { + myMoveReminders.push_back(std::make_pair(dev, 0.)); + } } @@ -159,7 +163,7 @@ void -MSBaseVehicle::reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter& router, const bool onInit, const bool withTaz) { +MSBaseVehicle::reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter& router, const bool onInit, const bool withTaz, const bool silent) { // check whether to reroute const MSEdge* source = withTaz && onInit ? MSEdge::dictionary(myParameter->fromTaz + "-source") : getRerouteOrigin(); if (source == nullptr) { @@ -173,12 +177,40 @@ ConstMSEdgeVector edges; ConstMSEdgeVector stops; if (myParameter->via.size() == 0) { - stops = getStopEdges(); + double firstPos = -1; + double lastPos = -1; + stops = getStopEdges(firstPos, lastPos); + if (stops.size() > 0) { + const double sourcePos = onInit ? 0 : getPositionOnLane(); + // avoid superfluous waypoints for first and last edge + const bool skipFirst = stops.front() == source && sourcePos < firstPos; + const bool skipLast = stops.back() == sink && myArrivalPos > lastPos; +#ifdef DEBUG_REROUTE + if (DEBUG_COND) { + std::cout << SIMTIME << " reroute " << info << " veh=" << getID() << " lane=" << getLane()->getID() + << " source=" << source->getID() << " sourcePos=" << sourcePos << " firstPos=" << firstPos << " arrivalPos=" << myArrivalPos << " lastPos=" << lastPos + << " route=" << toString(myRoute->getEdges()) << " stopEdges=" << toString(stops) << " skipFirst=" << skipFirst << " skipLast=" << skipLast << "\n"; + } +#endif + if (stops.size() == 1 && (skipFirst || skipLast)) { + stops.clear(); + } else { + if (skipFirst) { + stops.erase(stops.begin()); + } + if (skipLast) { + stops.erase(stops.end() - 1); + } + } + } } else { // via takes precedence over stop edges // XXX check for inconsistencies #2275 for (std::vector::const_iterator it = myParameter->via.begin(); it != myParameter->via.end(); ++it) { MSEdge* viaEdge = MSEdge::dictionary(*it); + if (viaEdge == source || viaEdge == sink) { + continue; + } assert(viaEdge != 0); if (!viaEdge->isTazConnector() && viaEdge->allowedLanes(getVClass()) == nullptr) { throw ProcessError("Vehicle '" + getID() + "' is not allowed on any lane of via edge '" + viaEdge->getID() + "'."); @@ -188,32 +220,30 @@ } for (MSRouteIterator s = stops.begin(); s != stops.end(); ++s) { - if (*s != source) { - // !!! need to adapt t here - ConstMSEdgeVector into; - router.compute(source, *s, this, t, into); - if (into.size() > 0) { - into.pop_back(); - edges.insert(edges.end(), into.begin(), into.end()); - if ((*s)->isTazConnector()) { - source = into.back(); - edges.pop_back(); - } else { - source = *s; - } + // !!! need to adapt t here + ConstMSEdgeVector into; + router.computeLooped(source, *s, this, t, into, silent); + if (into.size() > 0) { + into.pop_back(); + edges.insert(edges.end(), into.begin(), into.end()); + if ((*s)->isTazConnector()) { + source = into.back(); + edges.pop_back(); } else { - std::string error = "Vehicle '" + getID() + "' has no valid route from edge '" + source->getID() + "' to stop edge '" + (*s)->getID() + "'."; - if (MSGlobals::gCheckRoutes) { - throw ProcessError(error); - } else { - WRITE_WARNING(error); - edges.push_back(source); - } source = *s; } + } else { + std::string error = "Vehicle '" + getID() + "' has no valid route from edge '" + source->getID() + "' to stop edge '" + (*s)->getID() + "'."; + if (MSGlobals::gCheckRoutes || silent) { + throw ProcessError(error); + } else { + WRITE_WARNING(error); + edges.push_back(source); + } + source = *s; } } - router.compute(source, sink, this, t, edges); + router.compute(source, sink, this, t, edges, silent); if (!edges.empty() && edges.front()->isTazConnector()) { edges.erase(edges.begin()); } @@ -270,7 +300,8 @@ } edges.insert(edges.begin(), myRoute->begin(), myCurrEdge); } - if (edges == myRoute->getEdges()) { + if (edges == myRoute->getEdges() && !StringUtils::endsWith(info, toString(SUMO_TAG_PARKING_ZONE_REROUTE))) { + // re-assign stop iterators when rerouting to a new parkingArea return true; } const RGBColor& c = myRoute->getColor(); @@ -560,10 +591,12 @@ void MSBaseVehicle::removeTransportable(MSTransportable* t) { - const bool isPerson = dynamic_cast(t) != nullptr; - MSDevice_Transportable* device = isPerson ? myPersonDevice : myContainerDevice; - if (device != nullptr) { - device->removeTransportable(t); + // this might be called from the MSTransportable destructor so we cannot do a dynamic cast to determine the type + if (myPersonDevice != nullptr) { + myPersonDevice->removeTransportable(t); + } + if (myContainerDevice != nullptr) { + myContainerDevice->removeTransportable(t); } } @@ -662,6 +695,15 @@ return *type; } +std::mt19937* +MSBaseVehicle::getRNG() const { + const MSLane* lane = getLane(); + if (lane == nullptr) { + return getEdge()->getLanes()[0]->getRNG(); + } else { + return lane->getRNG(); + } +} #ifdef _DEBUG void diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSBaseVehicle.h sumo-1.2.0+dfsg1/src/microsim/MSBaseVehicle.h --- sumo-1.1.0+dfsg1/src/microsim/MSBaseVehicle.h 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSBaseVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -76,6 +76,9 @@ /// @brief Destructor virtual ~MSBaseVehicle(); + bool isVehicle() const { + return true; + } /// Returns the name of the vehicle const std::string& getID() const; @@ -208,7 +211,7 @@ * @param[in] router The router to use * @see replaceRoute */ - void reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter& router, const bool onInit = false, const bool withTaz = false); + void reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter& router, const bool onInit = false, const bool withTaz = false, const bool silent = false); /** @brief Replaces the current route by the given edges @@ -461,10 +464,21 @@ return false; } + /// @brief @return The vehicle's associated RNG + std::mt19937* getRNG() const; + inline NumericalID getNumericalID() const { return myNumericalID; } + const MSDevice_Transportable* getPersonDevice() const { + return myPersonDevice; + } + + const MSDevice_Transportable* getContainerDevice() const { + return myContainerDevice; + } + protected: /** @brief (Re-)Calculates the arrival position and lane from the vehicle parameters */ @@ -472,7 +486,7 @@ /** @brief Returns the list of still pending stop edges */ - virtual const ConstMSEdgeVector getStopEdges() const = 0; + virtual const ConstMSEdgeVector getStopEdges(double& firstPos, double& lastPos) const = 0; protected: /// @brief This vehicle's parameter. diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSBitSetLogic.h sumo-1.2.0+dfsg1/src/microsim/MSBitSetLogic.h --- sumo-1.1.0+dfsg1/src/microsim/MSBitSetLogic.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSBitSetLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSCModel_NonInteracting.cpp sumo-1.2.0+dfsg1/src/microsim/MSCModel_NonInteracting.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSCModel_NonInteracting.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSCModel_NonInteracting.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSCModel_NonInteracting.h sumo-1.2.0+dfsg1/src/microsim/MSCModel_NonInteracting.h --- sumo-1.1.0+dfsg1/src/microsim/MSCModel_NonInteracting.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSCModel_NonInteracting.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSContainer.cpp sumo-1.2.0+dfsg1/src/microsim/MSContainer.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSContainer.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSContainer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -56,6 +56,10 @@ MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving() {} +MSTransportable::Stage* +MSContainer::MSContainerStage_Driving::clone() const { + return new MSContainerStage_Driving(myDestination, myDestinationStop, myArrivalPos, std::vector(myLines.begin(), myLines.end())); +} void MSContainer::MSContainerStage_Driving::proceed(MSNet* net, MSTransportable* container, SUMOTime now, Stage* previous) { @@ -67,7 +71,7 @@ } myWaitingPos = previous->getEdgePos(now); myWaitingSince = now; - SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(myWaitingEdge, myLines, myWaitingPos, container->getID()); + SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(container, myWaitingEdge, myWaitingPos); if (availableVehicle != nullptr && availableVehicle->getParameter().departProcedure == DEPART_CONTAINER_TRIGGERED && !availableVehicle->hasDeparted()) { setVehicle(availableVehicle); myVehicle->addContainer(container); @@ -141,6 +145,11 @@ MSContainer::MSContainerStage_Tranship::~MSContainerStage_Tranship() { } +MSTransportable::Stage* +MSContainer::MSContainerStage_Tranship::clone() const { + return new MSContainerStage_Tranship(myRoute, myDestinationStop, mySpeed, myDepartPos, myArrivalPos); +} + void MSContainer::MSContainerStage_Tranship::proceed(MSNet* /* net */, MSTransportable* container, SUMOTime now, Stage* previous) { myDeparted = now; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSContainer.h sumo-1.2.0+dfsg1/src/microsim/MSContainer.h --- sumo-1.1.0+dfsg1/src/microsim/MSContainer.h 2018-10-10 12:28:12.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSContainer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -76,6 +76,8 @@ /// destructor ~MSContainerStage_Driving(); + Stage* clone() const; + /// proceeds to the next step virtual void proceed(MSNet* net, MSTransportable* container, SUMOTime now, Stage* previous); @@ -113,6 +115,8 @@ /// destructor ~MSContainerStage_Tranship(); + Stage* clone() const; + /// proceeds to the next step virtual void proceed(MSNet* net, MSTransportable* container, SUMOTime now, Stage* previous); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSDriverState.cpp sumo-1.2.0+dfsg1/src/microsim/MSDriverState.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSDriverState.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSDriverState.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,6 +24,7 @@ #include #include +#include #include #include //#include @@ -85,6 +86,7 @@ double DriverStateDefaults::headwayErrorCoefficient = 0.75; double DriverStateDefaults::speedDifferenceChangePerceptionThreshold = 0.1; double DriverStateDefaults::headwayChangePerceptionThreshold = 0.1; +double DriverStateDefaults::maximalReactionTimeFactor = 1.0; // =========================================================================== @@ -129,7 +131,9 @@ myHeadwayErrorCoefficient(DriverStateDefaults::headwayErrorCoefficient), myHeadwayChangePerceptionThreshold(DriverStateDefaults::headwayChangePerceptionThreshold), mySpeedDifferenceChangePerceptionThreshold(DriverStateDefaults::speedDifferenceChangePerceptionThreshold), - myActionStepLength(TS), + myOriginalReactionTime(veh->getActionStepLengthSecs()), + myMaximalReactionTime(DriverStateDefaults::maximalReactionTimeFactor * myOriginalReactionTime), +// myActionStepLength(TS), myStepDuration(TS), myLastUpdateTime(SIMTIME - TS), myDebugLock(false) { @@ -137,6 +141,7 @@ std::cout << "Constructing driver state for veh '" << veh->getID() << "'." << std::endl; #endif updateError(); + updateReactionTime(); } @@ -151,6 +156,8 @@ updateStepDuration(); // Update error updateError(); + // Update actionStepLength, aka reaction time + updateReactionTime(); // Update assumed gaps updateAssumedGaps(); #ifdef DEBUG_AWARENESS @@ -178,18 +185,33 @@ } void +MSSimpleDriverState::updateReactionTime() { + if (myAwareness == 1.0 || myAwareness == 0.0) { + myActionStepLength = myOriginalReactionTime; + } else { + const double theta = (myAwareness - myMinAwareness) / (1.0 - myMinAwareness); + myActionStepLength = myOriginalReactionTime + theta * (myMaximalReactionTime - myOriginalReactionTime); + // Round to multiple of simstep length + int quotient; + remquo(myActionStepLength, TS, "ient); + myActionStepLength = TS * MAX2(quotient, 1); + } +} + +void MSSimpleDriverState::setAwareness(const double value) { assert(value >= 0.); assert(value <= 1.); #ifdef DEBUG_AWARENESS if DEBUG_COND { - std::cout << SIMTIME << " veh=" << myVehicle->getID() << ", setAwareness(" << MAX2(value, minAwareness) << ")" << std::endl; + std::cout << SIMTIME << " veh=" << myVehicle->getID() << ", setAwareness(" << MAX2(value, myMinAwareness) << ")" << std::endl; } #endif myAwareness = MAX2(value, myMinAwareness); if (myAwareness == 1.) { myError.setState(0.); } + updateReactionTime(); } @@ -199,7 +221,7 @@ if DEBUG_COND { if (!debugLocked()) { std::cout << SIMTIME << " getPerceivedHeadway() for veh '" << myVehicle->getID() << "'\n" - << " trueGap=" << trueGap << " objID=" << objID << std::endl; + << " trueGap=" << trueGap << " objID=" << objID << std::endl; } } #endif @@ -225,7 +247,7 @@ if DEBUG_COND { if (!debugLocked()) { std::cout << " new perceived gap (=" << perceivedGap << ") does *not* differ significantly from the assumed (=" - << (assumedGap->second) << ")" << std::endl; + << (assumedGap->second) << ")" << std::endl; } } #endif @@ -257,7 +279,7 @@ if DEBUG_COND { if (!debugLocked()) { std::cout << SIMTIME << " getPerceivedSpeedDifference() for veh '" << myVehicle->getID() << "'\n" - << " trueGap=" << trueGap << " trueSpeedDifference=" << trueSpeedDifference << " objID=" << objID << std::endl; + << " trueGap=" << trueGap << " trueSpeedDifference=" << trueSpeedDifference << " objID=" << objID << std::endl; } } #endif @@ -270,8 +292,8 @@ if DEBUG_COND { if (!debugLocked()) { std::cout << " new perceived speed difference (=" << perceivedSpeedDifference << ") differs significantly from the last perceived (=" - << (lastPerceivedSpeedDifference == myLastPerceivedSpeedDifference.end() ? "NA" : toString(lastPerceivedSpeedDifference->second)) << ")" - << std::endl; + << (lastPerceivedSpeedDifference == myLastPerceivedSpeedDifference.end() ? "NA" : toString(lastPerceivedSpeedDifference->second)) << ")" + << std::endl; } } #endif diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSDriverState.h sumo-1.2.0+dfsg1/src/microsim/MSDriverState.h --- sumo-1.1.0+dfsg1/src/microsim/MSDriverState.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSDriverState.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,21 +31,10 @@ #include #include -// =========================================================================== -// class declarations -// =========================================================================== -//class MSJunction; -//class MSLink; -//class MSVehicle; -//class MSLane; -//class MSPerson; - // =========================================================================== // class definitions // =========================================================================== - - /// @class OUProcess /// @brief An Ornstein-Uhlenbeck stochastic process class OUProcess { @@ -164,6 +153,18 @@ return myAwareness; } + inline double getMaximalReactionTime() const { + return myMaximalReactionTime; + } + + inline double getOriginalReactionTime() const { + return myOriginalReactionTime; + } + + inline double getActionStepLength() const { + return myActionStepLength; + } + inline double getErrorState() const { return myError.getState(); }; @@ -204,6 +205,16 @@ myHeadwayChangePerceptionThreshold = value; } + inline void setMaximalReactionTime(const double value) { + myMaximalReactionTime = value; + updateReactionTime(); + } + + inline void setOriginalReactionTime(const double value) { + myOriginalReactionTime = value; + updateReactionTime(); + } + void setAwareness(const double value); inline void setErrorState(const double state) { @@ -261,19 +272,21 @@ void updateStepDuration(); // Update the error process void updateError(); + // Update the reaction time (actionStepLength) + void updateReactionTime(); private: /// @brief Vehicle corresponding to this driver state MSVehicle* myVehicle; - // @brief Driver's 'awareness' \in [0,1] + /// @brief Driver's 'awareness' \in [0,1] double myAwareness; - // @brief Minimal value for 'awareness' \in [0,1] + /// @brief Minimal value for 'awareness' \in [0,1] double myMinAwareness; - // @brief Initial value for 'awareness' \in [0,1] + /// @brief Initial value for 'awareness' \in [0,1] double myInitialAwareness; - // @brief Driver's 'error', @see TCI_Model + /// @brief Driver's 'error', @see TCI_Model OUProcess myError; /// @brief Coefficient controlling the impact of awareness on the time scale of the error process double myErrorTimeScaleCoefficient; @@ -291,9 +304,14 @@ // // @brief if a perception threshold is passed for some object, a flag is set to induce a reaction to the object // std::map myReactionFlag; - /// @brief action step length induced by awareness level - /// @todo make effective + /// @brief Action step length (~current maximal reaction time) induced by awareness level + /// @note This interpolates linearly from myOriginalReactionTime for awareness==1 + /// to myMaximalReactionTime for awareness==myMinAwareness double myActionStepLength; + /// @brief Maximal reaction time (value set for the actionStepLength at awareness=1) + double myOriginalReactionTime; + /// @brief Maximal reaction time (value set for the actionStepLength at awareness=myMinAwareness) + double myMaximalReactionTime; /// @name Variables for tracking update instants /// @see updateStepDuration() @@ -685,6 +703,7 @@ static double speedDifferenceChangePerceptionThreshold; static double headwayChangePerceptionThreshold; static double headwayErrorCoefficient; + static double maximalReactionTimeFactor; }; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSDynamicShapeUpdater.cpp sumo-1.2.0+dfsg1/src/microsim/MSDynamicShapeUpdater.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSDynamicShapeUpdater.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSDynamicShapeUpdater.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,46 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2019-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSDynamicShapeUpdater.cpp +/// @author Leonhard Luecken +/// @date 08 Apr 2019 +/// @version $Id$ +/// +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include "MSDynamicShapeUpdater.h" +#include "utils/vehicle/SUMOVehicle.h" + +//#define DEBUG_DYNAMIC_SHAPES + +void +MSDynamicShapeUpdater::vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& /* info */) { + + /// @brief Definition of a vehicle state + switch (to) { + /// @brief The vehicle arrived at his destination (is deleted) + case MSNet::VEHICLE_STATE_ARRIVED: { +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << "MSDynamicShapeUpdater: Vehicle '" << vehicle->getID() << "' has arrived. Informing ShapeContainer." << std::endl; +#endif + myShapeContainer.removeTrackers(vehicle->getID()); + } + break; + /// @brief The vehicle is involved in a collision + case MSNet::VEHICLE_STATE_COLLISION: + // TODO: can this lead to removal without calling arrived? + break; + default: + {} + } +} diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSDynamicShapeUpdater.h sumo-1.2.0+dfsg1/src/microsim/MSDynamicShapeUpdater.h --- sumo-1.1.0+dfsg1/src/microsim/MSDynamicShapeUpdater.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSDynamicShapeUpdater.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,42 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2019-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MSDynamicShapeUpdater.h +/// @author Leonhard Luecken +/// @date 08 Apr 2019 +/// @version $Id$ +/// +// +/****************************************************************************/ +#ifndef MICROSIM_MSDYNAMICSHAPEUPDATER_H_ +#define MICROSIM_MSDYNAMICSHAPEUPDATER_H_ + +#include "MSNet.h" +#include "utils/shapes/ShapeContainer.h" + +/** @class DynamicShapeUpdater + * @brief Ensures that dynamic shapes tracking traffic objects are removed when the objects are removed. + */ +class MSDynamicShapeUpdater: public MSNet::VehicleStateListener { +public: + /// @brief Constructor + MSDynamicShapeUpdater(ShapeContainer& shapeContainer) : myShapeContainer(shapeContainer) {}; + + /// @brief Constructor + void vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& info = "") override; + +private: + ShapeContainer& myShapeContainer; + +private: + /// @brief invalidated assignment operator + MSDynamicShapeUpdater& operator=(const MSDynamicShapeUpdater& s) = delete; +}; + +#endif /* MICROSIM_MSDYNAMICSHAPEUPDATER_H_ */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEdgeControl.cpp sumo-1.2.0+dfsg1/src/microsim/MSEdgeControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSEdgeControl.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEdgeControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,14 +24,20 @@ // =========================================================================== #include +#include +#include +#include #include "MSEdgeControl.h" +#include "MSVehicleControl.h" #include "MSGlobals.h" #include "MSEdge.h" #include "MSLane.h" #include "MSVehicle.h" -#include -#include +#define PARALLEL_PLAN_MOVE +//#define PARALLEL_EXEC_MOVE +//#define PARALLEL_CHANGE_LANES +//#define LOAD_BALANCING // =========================================================================== // member method definitions @@ -39,6 +45,7 @@ MSEdgeControl::MSEdgeControl(const std::vector< MSEdge* >& edges) : myEdges(edges), myLanes(MSLane::dictSize()), + myWithVehicles2Integrate(MSGlobals::gNumSimThreads > 1), myLastLaneChange(MSEdge::dictSize()) { // build the usage definitions for lanes for (std::vector< MSEdge* >::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { @@ -83,63 +90,135 @@ myChangedStateLanes.clear(); } + void MSEdgeControl::planMovements(SUMOTime t) { +#ifdef HAVE_FOX + if (MSGlobals::gNumSimThreads > 1) { + while (myThreadPool.size() < MSGlobals::gNumSimThreads) { + new FXWorkerThread(myThreadPool); + } + } +#endif +#ifdef LOAD_BALANCING + myRNGLoad = std::priority_queue >(); + for (int i = 0; i < MSLane::getNumRNGs(); i++) { + myRNGLoad.emplace(0, i); + } +#endif for (std::list::iterator i = myActiveLanes.begin(); i != myActiveLanes.end();) { - if ((*i)->getVehicleNumber() == 0) { + const int vehNum = (*i)->getVehicleNumber(); + if (vehNum == 0) { myLanes[(*i)->getNumericalID()].amActive = false; i = myActiveLanes.erase(i); } else { +#ifdef LOAD_BALANCING + std::pair minRNG = myRNGLoad.top(); + (*i)->setRNGIndex(minRNG.second); + myRNGLoad.pop(); + minRNG.first -= vehNum; + myRNGLoad.push(minRNG); +#endif +#ifdef HAVE_FOX + if (MSGlobals::gNumSimThreads > 1) { + myThreadPool.add((*i)->getPlanMoveTask(t), (*i)->getRNGIndex() % myThreadPool.size()); + ++i; + continue; + } +#endif (*i)->planMovements(t); ++i; } } +#ifdef HAVE_FOX + if (MSGlobals::gNumSimThreads > 1) { + myThreadPool.waitAll(false); + } +#endif } + void MSEdgeControl::setJunctionApproaches(SUMOTime t) { - for (MSLane* lane : myActiveLanes) { + for (MSLane* const lane : myActiveLanes) { lane->setJunctionApproaches(t); } } + void MSEdgeControl::executeMovements(SUMOTime t) { + std::vector wasActive(myActiveLanes.begin(), myActiveLanes.end()); myWithVehicles2Integrate.clear(); +#ifdef HAVE_FOX +#ifdef PARALLEL_EXEC_MOVE + if (MSGlobals::gNumSimThreads > 1) { +#ifdef LOAD_BALANCING + myRNGLoad = std::priority_queue >(); + for (int i = 0; i < MSLane::getNumRNGs(); i++) { + myRNGLoad.emplace(0, i); + } +#endif + for (MSLane* const lane : myActiveLanes) { +#ifdef LOAD_BALANCING + std::pair minRNG = myRNGLoad.top(); + lane->setRNGIndex(minRNG.second); + myRNGLoad.pop(); + minRNG.first -= lane->getVehicleNumber(); + myRNGLoad.push(minRNG); +#endif + myThreadPool.add(lane->getExecuteMoveTask(t), lane->getRNGIndex() % myThreadPool.size()); + } + myThreadPool.waitAll(false); + } +#endif +#endif for (std::list::iterator i = myActiveLanes.begin(); i != myActiveLanes.end();) { - if ((*i)->getVehicleNumber() == 0 || (*i)->executeMovements(t, myWithVehicles2Integrate)) { + if ( +#ifdef PARALLEL_EXEC_MOVE + MSGlobals::gNumSimThreads <= 1 && +#endif + (*i)->getVehicleNumber() > 0) { + (*i)->executeMovements(t); + } + if ((*i)->getVehicleNumber() == 0) { myLanes[(*i)->getNumericalID()].amActive = false; i = myActiveLanes.erase(i); } else { ++i; } } - for (std::vector::iterator i = myWithVehicles2Integrate.begin(); i != myWithVehicles2Integrate.end(); ++i) { - if ((*i)->integrateNewVehicle(t)) { - LaneUsage& lu = myLanes[(*i)->getNumericalID()]; + for (MSLane* lane : wasActive) { + lane->updateLengthSum(); + } + MSNet::getInstance()->getVehicleControl().removePending(); + std::vector& toIntegrate = myWithVehicles2Integrate.getContainer(); + std::sort(toIntegrate.begin(), toIntegrate.end(), ComparatorIdLess()); + myWithVehicles2Integrate.unlock(); + for (MSLane* const lane : toIntegrate) { + const bool wasInactive = lane->getVehicleNumber() == 0; + lane->integrateNewVehicles(); + if (wasInactive && lane->getVehicleNumber() > 0) { + LaneUsage& lu = myLanes[lane->getNumericalID()]; if (!lu.amActive) { if (lu.haveNeighbors) { - myActiveLanes.push_front(*i); + myActiveLanes.push_front(lane); } else { - myActiveLanes.push_back(*i); + myActiveLanes.push_back(lane); } lu.amActive = true; } } } - if (MSGlobals::gLateralResolution > 0) { - // multiple vehicle shadows may have entered an inactive lane and would - // not be sorted otherwise - for (LaneUsageVector::iterator it = myLanes.begin(); it != myLanes.end(); ++it) { - (*it).lane->sortPartialVehicles(); - } - } } void -MSEdgeControl::changeLanes(SUMOTime t) { +MSEdgeControl::changeLanes(const SUMOTime t) { std::vector toAdd; +#ifdef PARALLEL_CHANGE_LANES + std::vector recheckLaneUsage; +#endif MSGlobals::gComputeLC = true; for (std::list::iterator i = myActiveLanes.begin(); i != myActiveLanes.end();) { LaneUsage& lu = myLanes[(*i)->getNumericalID()]; @@ -147,25 +226,52 @@ MSEdge& edge = (*i)->getEdge(); if (myLastLaneChange[edge.getNumericalID()] != t) { myLastLaneChange[edge.getNumericalID()] = t; - edge.changeLanes(t); - const std::vector& lanes = edge.getLanes(); - for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - LaneUsage& lu = myLanes[(*i)->getNumericalID()]; - //if ((*i)->getID() == "disabled") { - // std::cout << SIMTIME << " vehicles=" << toString((*i)->getVehiclesSecure()) << "\n"; - // (*i)->releaseVehicles(); - //} - if ((*i)->getVehicleNumber() > 0 && !lu.amActive) { - toAdd.push_back(*i); - lu.amActive = true; +#ifdef PARALLEL_CHANGE_LANES + if (MSGlobals::gNumSimThreads > 1) { + MSLane* lane = edge.getLanes()[0]; + myThreadPool.add(lane->getLaneChangeTask(t), lane->getRNGIndex() % myThreadPool.size()); + recheckLaneUsage.push_back(&edge); + } else { +#endif + edge.changeLanes(t); + const std::vector& lanes = edge.getLanes(); + for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { + LaneUsage& lu = myLanes[(*i)->getNumericalID()]; + //if ((*i)->getID() == "disabled") { + // std::cout << SIMTIME << " vehicles=" << toString((*i)->getVehiclesSecure()) << "\n"; + // (*i)->releaseVehicles(); + //} + if ((*i)->getVehicleNumber() > 0 && !lu.amActive) { + toAdd.push_back(*i); + lu.amActive = true; + } } +#ifdef PARALLEL_CHANGE_LANES } +#endif } ++i; } else { i = myActiveLanes.end(); } } + +#ifdef PARALLEL_CHANGE_LANES + if (MSGlobals::gNumSimThreads > 1) { + myThreadPool.waitAll(false); + for (MSEdge* e : recheckLaneUsage) { + const std::vector& lanes = e->getLanes(); + for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { + LaneUsage& lu = myLanes[(*i)->getNumericalID()]; + if ((*i)->getVehicleNumber() > 0 && !lu.amActive) { + toAdd.push_back(*i); + lu.amActive = true; + } + } + } + } +#endif + MSGlobals::gComputeLC = false; for (std::vector::iterator i = toAdd.begin(); i != toAdd.end(); ++i) { myActiveLanes.push_front(*i); @@ -187,16 +293,12 @@ lane->detectCollisions(timestep, stage); } } -} - - -std::vector -MSEdgeControl::getEdgeNames() const { - std::vector ret; - for (MSEdgeVector::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { - ret.push_back((*i)->getID()); + if (myInactiveCheckCollisions.size() > 0) { + for (MSLane* lane : myInactiveCheckCollisions) { + lane->detectCollisions(timestep, stage); + } + myInactiveCheckCollisions.clear(); } - return ret; } @@ -206,6 +308,11 @@ } void +MSEdgeControl::checkCollisionForInactive(MSLane* l) { + myInactiveCheckCollisions.insert(l); +} + +void MSEdgeControl::setAdditionalRestrictions() { for (MSEdgeVector::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { const std::vector& lanes = (*i)->getLanes(); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEdgeControl.h sumo-1.2.0+dfsg1/src/microsim/MSEdgeControl.h --- sumo-1.1.0+dfsg1/src/microsim/MSEdgeControl.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEdgeControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,9 +34,15 @@ #include #include #include +#include #include #include +#include +#ifdef HAVE_FOX +#include +#endif + // =========================================================================== // class declarations @@ -121,9 +127,12 @@ * * @see MSLane::executeMovements * @see MSLane::integrateNewVehicle - * @todo When moving to parallel processing, the usage of myWithVehicles2Integrate would get insecure!! */ void executeMovements(SUMOTime t); + + void needsVehicleIntegration(MSLane* const l) { + myWithVehicles2Integrate.push_back(l); + } /// @} @@ -135,7 +144,7 @@ * * @see MSEdge::changeLanes */ - void changeLanes(SUMOTime t); + void changeLanes(const SUMOTime t); /** @brief Detect collisions @@ -161,13 +170,6 @@ } - /** @brief Returns the list of names of all known edges - * - * @return a vector of names of all known edges - */ - std::vector getEdgeNames() const; - - /** @brief Informs the control that the given lane got active * * @param[in] l The activated lane @@ -175,6 +177,9 @@ */ void gotActive(MSLane* l); + /// @brief trigger collision checking for inactive lane + void checkCollisionForInactive(MSLane* l); + /// @brief apply additional restrictions void setAdditionalRestrictions(); @@ -214,7 +219,7 @@ std::list myActiveLanes; /// @brief A storage for lanes which shall be integrated because vehicles have moved onto them - std::vector myWithVehicles2Integrate; + FXSynchQue > myWithVehicles2Integrate; /// @brief Lanes which changed the state without informing the control std::set myChangedStateLanes; @@ -222,6 +227,15 @@ /// @brief The list of active (not empty) lanes std::vector myLastLaneChange; + /// @brief Additional lanes for which collision checking must be performed + std::set myInactiveCheckCollisions; + +#ifdef HAVE_FOX + FXWorkerThread::Pool myThreadPool; +#endif + + std::priority_queue > myRNGLoad; + private: /// @brief Copy constructor. MSEdgeControl(const MSEdgeControl&); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEdge.cpp sumo-1.2.0+dfsg1/src/microsim/MSEdge.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSEdge.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -76,10 +76,11 @@ myWidth(0.), myLength(0.), myEmptyTraveltime(0.), + myTimePenalty(0.), myAmDelayed(false), myAmRoundabout(false), myAmFringe(true), - myBidiEdge(nullptr) + myBidiEdge(nullptr) { } @@ -149,6 +150,12 @@ if (minPenalty > 0) { myEmptyTraveltime += STEPS2TIME(minPenalty); } + } else if (isInternal()) { + const MSLink* link = myLanes->front()->getIncomingLanes()[0].viaLink; + if (!link->isTLSControlled() && !link->havePriority()) { + myEmptyTraveltime += MSGlobals::gMinorPenalty; + myTimePenalty = MSGlobals::gMinorPenalty; + } } } @@ -180,6 +187,7 @@ } } } + lane->checkBufferType(); } std::sort(mySuccessors.begin(), mySuccessors.end(), by_id_sorter()); rebuildAllowedLanes(); @@ -232,7 +240,7 @@ } -void +void MSEdge::addToAllowed(const SVCPermissions permissions, const std::vector* allowedLanes, AllowedLanesCont& laneCont) const { // recheck whether we had this list to save memory if (allowedLanes->empty()) { @@ -759,6 +767,13 @@ v += vehNo * (*i)->getMeanSpeed(); no += vehNo; } + if (myBidiEdge != nullptr) { + for (const MSLane* lane : myBidiEdge->getLanes()) { + const double vehNo = (double)lane->getVehicleNumber(); + v += vehNo * lane->getMeanSpeed(); + no += vehNo; + } + } if (no == 0) { return getSpeedLimit(); } @@ -826,7 +841,7 @@ void MSEdge::clear() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); ++i) { - delete(*i).second; + delete (*i).second; } myDict.clear(); myEdges.clear(); @@ -873,6 +888,7 @@ double MSEdge::getDistanceTo(const MSEdge* other, const bool doBoundaryEstimate) const { + assert(this != other); if (doBoundaryEstimate) { return myBoundary.distanceTo2D(other->myBoundary); } @@ -908,7 +924,7 @@ } double -MSEdge::getVehicleMaxSpeed(const SUMOVehicle* const veh) const { +MSEdge::getVehicleMaxSpeed(const SUMOTrafficObject* const veh) const { // @note lanes might have different maximum speeds in theory return myLanes->empty() ? 1 : getLanes()[0]->getVehicleMaxSpeed(veh); } @@ -1106,7 +1122,7 @@ WRITE_ERROR("Bidi-edge '" + bidiID + "' does not exist"); } return; - } + } if (getFunction() != EDGEFUNC_NORMAL) { return; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEdge.h sumo-1.2.0+dfsg1/src/microsim/MSEdge.h --- sumo-1.1.0+dfsg1/src/microsim/MSEdge.h 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,6 +37,7 @@ #include #include #include +#include #include "MSNet.h" @@ -233,7 +234,7 @@ /// @brief check and register the opposite superposable edge if any - void checkAndRegisterBiDirEdge(const std::string& bidiID=""); + void checkAndRegisterBiDirEdge(const std::string& bidiID = ""); /// @brief return opposite superposable/congruent edge, if it exist and 0 else inline const MSEdge* getBidiEdge() const { @@ -406,9 +407,9 @@ if (myFunction == EDGEFUNC_CONNECTOR) { return 0; } else if (veh != 0) { - return getLength() / getVehicleMaxSpeed(veh); + return getLength() / getVehicleMaxSpeed(veh) + myTimePenalty; } else { - return getLength() / getSpeedLimit(); + return myEmptyTraveltime; } } @@ -547,7 +548,7 @@ void rebuildAllowedLanes(); - void rebuildAllowedTargets(const bool updateVehicles=true); + void rebuildAllowedTargets(const bool updateVehicles = true); /** @brief optimistic air distance heuristic for use in routing @@ -555,7 +556,7 @@ * @param[in] doBoundaryEstimate whether the distance should be estimated by looking at the distance of the bounding boxes * @return The distance to the other edge */ - double getDistanceTo(const MSEdge* other, const bool doBoundaryEstimate=false) const; + double getDistanceTo(const MSEdge* other, const bool doBoundaryEstimate = false) const; /// @brief return the coordinates of the center of the given stop @@ -589,7 +590,7 @@ * @caution Only the first lane is considered * @return The maximum velocity on this edge for the given vehicle */ - double getVehicleMaxSpeed(const SUMOVehicle* const veh) const; + double getVehicleMaxSpeed(const SUMOTrafficObject* const veh) const; virtual void addPerson(MSTransportable* p) const { @@ -630,7 +631,7 @@ // return whether there have been vehicles on this edge at least once inline bool isDelayed() const { - return myAmDelayed; + return myAmDelayed || myBidiEdge == nullptr || myBidiEdge->myAmDelayed; } bool hasLaneChanger() const { @@ -825,6 +826,9 @@ /// @brief the traveltime on the empty edge (cached value for speedup) double myEmptyTraveltime; + /// @brief flat penalty when computing traveltime + double myTimePenalty; + /// @brief whether this edge had a vehicle with less than max speed on it mutable bool myAmDelayed; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEdgeWeightsStorage.cpp sumo-1.2.0+dfsg1/src/microsim/MSEdgeWeightsStorage.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSEdgeWeightsStorage.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEdgeWeightsStorage.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEdgeWeightsStorage.h sumo-1.2.0+dfsg1/src/microsim/MSEdgeWeightsStorage.h --- sumo-1.1.0+dfsg1/src/microsim/MSEdgeWeightsStorage.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEdgeWeightsStorage.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEventControl.cpp sumo-1.2.0+dfsg1/src/microsim/MSEventControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSEventControl.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEventControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSEventControl.h sumo-1.2.0+dfsg1/src/microsim/MSEventControl.h --- sumo-1.1.0+dfsg1/src/microsim/MSEventControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSEventControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSFrame.cpp sumo-1.2.0+dfsg1/src/microsim/MSFrame.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSFrame.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -205,6 +205,9 @@ oc.doRegister("link-output", new Option_FileName()); oc.addDescription("link-output", "Output", "Save links states into FILE"); + oc.doRegister("railsignal-block-output", new Option_FileName()); + oc.addDescription("railsignal-block-output", "Output", "Save railsignal-blocks into FILE"); + oc.doRegister("bt-output", new Option_FileName()); oc.addDescription("bt-output", "Output", "Save bluetooth visibilities into FILE (in conjunction with device.btreceiver and device.btsender)"); @@ -251,6 +254,9 @@ oc.doRegister("step-method.ballistic", new Option_Bool(false)); oc.addDescription("step-method.ballistic", "Processing", "Whether to use ballistic method for the positional update of vehicles (default is a semi-implicit Euler method)."); + oc.doRegister("threads", new Option_Integer(1)); + oc.addDescription("threads", "Processing", "Defines the number of threads for parallel simulation"); + oc.doRegister("lateral-resolution", new Option_Float(-1)); oc.addDescription("lateral-resolution", "Processing", "Defines the resolution in m when handling lateral positioning within a lane (with -1 all vehicles drive at the center of their lane"); @@ -321,6 +327,9 @@ oc.doRegister("tls.all-off", new Option_Bool(false)); oc.addDescription("tls.all-off", "Processing", "Switches off all traffic lights."); + oc.doRegister("tls.actuated.show-detectors", new Option_Bool(false)); + oc.addDescription("tls.actuated.show-detectors", "Processing", "Sets default visibility for actuation detectors"); + oc.doRegister("time-to-impatience", new Option_String("300", "TIME")); oc.addDescription("time-to-impatience", "Processing", "Specify how long a vehicle may wait until impatience grows from 0 to 1, defaults to 300, non-positive values disable impatience growth"); @@ -362,6 +371,8 @@ "Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']"); oc.doRegister("weights.random-factor", new Option_Float(1.)); oc.addDescription("weights.random-factor", "Routing", "Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT)"); + oc.doRegister("weights.minor-penalty", new Option_Float(1.5)); + oc.addDescription("weights.minor-penalty", "Routing", "Apply the given time penalty when computing minimum routing costs for minor-link internal lanes"); oc.doRegister("astar.all-distances", new Option_FileName()); oc.addDescription("astar.all-distances", "Routing", "Initialize lookup table for astar from the given file (generated by marouter --all-pairs-output)"); @@ -442,6 +453,9 @@ // add rand options RandHelper::insertRandOptions(); + oc.doRegister("thread-rngs", new Option_Integer(64)); + oc.addDescription("thread-rngs", "Random Number", + "Number of pre-allocated random number generators to ensure repeatable multi-threaded simulations (should be at least the number of threads for repeatable simulations)."); // add GUI options // the reason that we include them in vanilla sumo as well is to make reusing config files easy @@ -455,12 +469,18 @@ oc.doRegister("game", 'G', new Option_Bool(false)); oc.addDescription("game", "GUI Only", "Start the GUI in gaming mode"); + oc.doRegister("game.mode", new Option_String("tls")); + oc.addDescription("game.mode", "GUI Only", "Select the game type ('tls', 'drt')"); + oc.doRegister("start", 'S', new Option_Bool(false)); oc.addDescription("start", "GUI Only", "Start the simulation after loading"); oc.doRegister("breakpoints", new Option_String()); oc.addDescription("breakpoints", "GUI Only", "Use TIME[] as times when the simulation should halt"); + oc.doRegister("edgedata-files", new Option_FileName()); + oc.addDescription("edgedata-files", "GUI Only", "Load edge/lane weights for visualization from FILE"); + oc.doRegister("demo", 'D', new Option_Bool(false)); oc.addDescription("demo", "GUI Only", "Restart the simulation after ending (demo mode)"); @@ -512,6 +532,7 @@ //OutputDevice::createDeviceByOption("vtk-output", "vtk-export"); OutputDevice::createDeviceByOption("link-output", "link-output"); + OutputDevice::createDeviceByOption("railsignal-block-output", "railsignal-block-output"); OutputDevice::createDeviceByOption("bt-output", "bt-output"); OutputDevice::createDeviceByOption("lanechange-output", "lanechanges"); OutputDevice::createDeviceByOption("stop-output", "stops", "stopinfo_file.xsd"); @@ -638,6 +659,12 @@ ok = false; } }; + if (oc.getInt("threads") > oc.getInt("thread-rngs")) { + WRITE_WARNING("Number of threads exceeds number of thread-rngs. Simulation runs with the same seed may produce different results"); + } + if (oc.getString("game.mode") != "tls" && oc.getString("game.mode") != "drt") { + WRITE_ERROR("game.mode must be one of ['tls', 'drt']"); + } ok &= MSDevice::checkOptions(oc); ok &= SystemFrame::checkOptions(); @@ -699,9 +726,11 @@ // value already checked in checkOptions() MSGlobals::gDefaultEmergencyDecel = StringUtils::toDouble(defaultEmergencyDecelOption); } + MSGlobals::gNumSimThreads = OptionsCont::getOptions().getInt("threads"); MSGlobals::gEmergencyDecelWarningThreshold = oc.getFloat("emergencydecel.warning-threshold"); - + MSGlobals::gMinorPenalty = oc.getFloat("weights.minor-penalty"); + #ifdef _DEBUG if (oc.isSet("movereminder-output")) { MSBaseVehicle::initMoveReminderOutput(oc); @@ -710,6 +739,4 @@ } - /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSFrame.h sumo-1.2.0+dfsg1/src/microsim/MSFrame.h --- sumo-1.1.0+dfsg1/src/microsim/MSFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSGlobals.cpp sumo-1.2.0+dfsg1/src/microsim/MSGlobals.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSGlobals.cpp 2018-11-15 23:00:46.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSGlobals.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -66,6 +66,10 @@ bool MSGlobals::gComputeLC; +int MSGlobals::gNumSimThreads; + double MSGlobals::gEmergencyDecelWarningThreshold(1); + +double MSGlobals::gMinorPenalty(0); /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSGlobals.h sumo-1.2.0+dfsg1/src/microsim/MSGlobals.h --- sumo-1.1.0+dfsg1/src/microsim/MSGlobals.h 2018-11-15 23:00:46.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSGlobals.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -120,9 +120,15 @@ /// whether the simulationLoop is in the lane changing phase static bool gComputeLC; + /// how many threads to use for simulation + static int gNumSimThreads; + /// treshold for warning about strong deceleration static double gEmergencyDecelWarningThreshold; + /// time penalty for passing a minor link when routing + static double gMinorPenalty; + }; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSInsertionControl.cpp sumo-1.2.0+dfsg1/src/microsim/MSInsertionControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSInsertionControl.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSInsertionControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include "MSGlobals.h" @@ -62,7 +62,7 @@ MSInsertionControl::~MSInsertionControl() { for (std::vector::iterator i = myFlows.begin(); i != myFlows.end(); ++i) { - delete(i->pars); + delete (i->pars); } } @@ -86,6 +86,9 @@ // if the flow was loaded from state this is recognizable by having // neither repetitionNumber nor repetitionProbability if (flow.pars->id == pars->id && flow.pars->repetitionNumber == -1 && flow.pars->repetitionProbability == -1) { + if (flow.pars->wasSet(VEHPARS_FORCE_REROUTE)) { + pars->parametersSet |= VEHPARS_FORCE_REROUTE; + } delete flow.pars; flow.pars = pars; return true; @@ -337,6 +340,9 @@ out.openTag(SUMO_TAG_FLOWSTATE); out.writeAttr(SUMO_ATTR_ID, flow.pars->id); out.writeAttr(SUMO_ATTR_INDEX, flow.index); + if (flow.pars->wasSet(VEHPARS_FORCE_REROUTE)) { + out.writeAttr(SUMO_ATTR_REROUTE, true); + } out.closeTag(); } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSInsertionControl.h sumo-1.2.0+dfsg1/src/microsim/MSInsertionControl.h --- sumo-1.1.0+dfsg1/src/microsim/MSInsertionControl.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSInsertionControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSInternalJunction.cpp sumo-1.2.0+dfsg1/src/microsim/MSInternalJunction.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSInternalJunction.cpp 2018-11-16 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSInternalJunction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -109,6 +109,12 @@ MSLink* exitLink = thisLink->getViaLane()->getLinkCont()[0]; exitLink->setRequestInformation(ownLinkIndex, false, false, std::vector(), myInternalLaneFoes, thisLink->getViaLane()); + for (const auto& ili : exitLink->getLane()->getIncomingLanes()) { + if (ili.lane->getEdge().isWalkingArea()) { + exitLink->addWalkingAreaFoeExit(ili.lane); + break; + } + } for (std::vector::const_iterator k = myInternalLinkFoes.begin(); k != myInternalLinkFoes.end(); ++k) { thisLink->addBlockedLink(*k); (*k)->addBlockedLink(thisLink); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSInternalJunction.h sumo-1.2.0+dfsg1/src/microsim/MSInternalJunction.h --- sumo-1.1.0+dfsg1/src/microsim/MSInternalJunction.h 2018-07-01 22:00:14.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSInternalJunction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSJunctionControl.cpp sumo-1.2.0+dfsg1/src/microsim/MSJunctionControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSJunctionControl.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSJunctionControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSJunctionControl.h sumo-1.2.0+dfsg1/src/microsim/MSJunctionControl.h --- sumo-1.1.0+dfsg1/src/microsim/MSJunctionControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSJunctionControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSJunction.cpp sumo-1.2.0+dfsg1/src/microsim/MSJunction.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSJunction.cpp 2018-11-16 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSJunction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSJunction.h sumo-1.2.0+dfsg1/src/microsim/MSJunction.h --- sumo-1.1.0+dfsg1/src/microsim/MSJunction.h 2018-11-16 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSJunction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSJunctionLogic.cpp sumo-1.2.0+dfsg1/src/microsim/MSJunctionLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSJunctionLogic.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSJunctionLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSJunctionLogic.h sumo-1.2.0+dfsg1/src/microsim/MSJunctionLogic.h --- sumo-1.1.0+dfsg1/src/microsim/MSJunctionLogic.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSJunctionLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLaneChanger.cpp sumo-1.2.0+dfsg1/src/microsim/MSLaneChanger.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSLaneChanger.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLaneChanger.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -265,6 +265,7 @@ myCandi = findCandidate(); MSVehicle* vehicle = veh(myCandi); + vehicle->getLaneChangeModel().clearNeighbors(); if (vehicle->getLaneChangeModel().isChangingLanes()) { return continueChange(vehicle, myCandi); @@ -888,9 +889,9 @@ #ifdef DEBUG_CHECK_CHANGE if DEBUG_COND { std::cout << SIMTIME << " checkChange() too slow to guarantee completion of continuous lane change." - << "\nestimatedLCDuration=" << estimatedLCDuration - << "\ndistToNeighLane=" << distToNeighLane - << std::endl; + << "\nestimatedLCDuration=" << estimatedLCDuration + << "\ndistToNeighLane=" << distToNeighLane + << std::endl; } #endif state |= LCA_INSUFFICIENT_SPEED; @@ -907,11 +908,11 @@ #ifdef DEBUG_CHECK_CHANGE if DEBUG_COND { std::cout << SIMTIME << " checkChange() checking continuous lane change..." - << "\ndistToNeighLane=" << distToNeighLane - << " estimatedLCDuration=" << estimatedLCDuration - << " space2change=" << space2change - << " avgSpeed=" << avgSpeed - << std::endl; + << "\ndistToNeighLane=" << distToNeighLane + << " estimatedLCDuration=" << estimatedLCDuration + << " space2change=" << space2change + << " avgSpeed=" << avgSpeed + << std::endl; } #endif @@ -1006,6 +1007,9 @@ vehicle->getLaneChangeModel().setLeaderGaps(neighLead, secureFrontGap); vehicle->getLaneChangeModel().setOrigLeaderGaps(leader, secureOrigFrontGap); } + if (laneOffset != 0) { + vehicle->getLaneChangeModel().saveNeighbors(laneOffset, neighFollow, neighLead); + } return state; } @@ -1039,19 +1043,29 @@ } if (!isOpposite && !oppositeChangeByTraci && vehicle->getVClass() != SVC_EMERGENCY - && leader.first != 0 - && leader.first->signalSet(MSNet::getInstance()->lefthand() - ? MSVehicle::VEH_SIGNAL_BLINKER_RIGHT : MSVehicle::VEH_SIGNAL_BLINKER_LEFT)) { - // do not try to overtake a vehicle that is about to turn left or wants - // to change left itself + && leader.first != 0) { + if (leader.first->signalSet(MSNet::getInstance()->lefthand() + ? MSVehicle::VEH_SIGNAL_BLINKER_RIGHT : MSVehicle::VEH_SIGNAL_BLINKER_LEFT)) { + // do not try to overtake a vehicle that is about to turn left or wants + // to change left itself #ifdef DEBUG_CHANGE_OPPOSITE - if (DEBUG_COND) { - std::cout << " not overtaking leader " << leader.first->getID() << " that has blinker set\n"; - } + if (DEBUG_COND) { + std::cout << " not overtaking leader " << leader.first->getID() << " that has blinker set\n"; + } #endif - return false; + return false; + } else if (leader.second < 0) { + // leaders is either a junction leader (that cannot be overtaken) or something else is wrong +#ifdef DEBUG_CHANGE_OPPOSITE + if (DEBUG_COND) { + std::cout << " not overtaking leader " << leader.first->getID() << " with gap " << leader.second << "\n"; + } +#endif + return false; + } } + MSLane* opposite = source->getOpposite(); //There is no lane for opposite driving if (opposite == nullptr || !opposite->allowsVehicleClass(vehicle->getVClass())) { @@ -1073,8 +1087,6 @@ // if the vehicle is driving on the opposite side then 1) is found on the neighboring lane and 2) on the current lane std::pair overtaken; - std::pair oncoming; - if (!isOpposite && !oppositeChangeByTraci) { overtaken = getColumnleader(vehicle, leader); @@ -1347,15 +1359,15 @@ const double u = leader->getAcceleration() > 0 ? leader->getLane()->getVehicleMaxSpeed(leader) : leader->getSpeed(); const double a = vehicle->getCarFollowModel().getMaxAccel(); const double d = vehicle->getCarFollowModel().getMaxDecel(); - const double g = ( - // drive up to the rear of leader - gap + vehicle->getVehicleType().getMinGap() - // drive head-to-head with the leader - + leader->getVehicleType().getLengthWithGap() - // drive past the leader - + vehicle->getVehicleType().getLength() - // allow for safe gap between leader and vehicle - + leader->getCarFollowModel().getSecureGap(u, vMax, d)); + const double g = MAX2(0.0, ( + // drive up to the rear of leader + gap + vehicle->getVehicleType().getMinGap() + // drive head-to-head with the leader + + leader->getVehicleType().getLengthWithGap() + // drive past the leader + + vehicle->getVehicleType().getLength() + // allow for safe gap between leader and vehicle + + leader->getCarFollowModel().getSecureGap(u, vMax, d))); const double sign = -1; // XXX recheck // v*t + t*t*a*0.5 = g + u*t // solve t @@ -1504,7 +1516,7 @@ std::cout << " look for another leader on lane " << Named::getIDSecure(next) << "\n"; } #endif - while (next != nullptr) { + while (next != nullptr && seen < maxLookAhead) { seen += next->getLength(); MSVehicle* cand = next->getLastAnyVehicle(); if (cand == nullptr) { diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLaneChanger.h sumo-1.2.0+dfsg1/src/microsim/MSLaneChanger.h --- sumo-1.1.0+dfsg1/src/microsim/MSLaneChanger.h 2018-10-05 22:00:52.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLaneChanger.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLaneChangerSublane.cpp sumo-1.2.0+dfsg1/src/microsim/MSLaneChangerSublane.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSLaneChangerSublane.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLaneChangerSublane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -108,6 +108,7 @@ // variant of change() for the sublane case myCandi = findCandidate(); MSVehicle* vehicle = veh(myCandi); + vehicle->getLaneChangeModel().clearNeighbors(); #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { std::cout << "\nCHANGE" << std::endl; @@ -119,10 +120,6 @@ registerUnchanged(vehicle); return false; } - if (vehicle->isRemoteControlled()) { - registerUnchanged(vehicle); - return false; - } if (!vehicle->isActive()) { #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { @@ -139,7 +136,7 @@ #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { std::cout << SIMTIME << " veh '" << vehicle->getID() << "' lcm->maneuverDist=" << vehicle->getLaneChangeModel().getManeuverDist() - << " lcm->speedLat=" << vehicle->getLaneChangeModel().getSpeedLat() << std::endl; + << " lcm->speedLat=" << vehicle->getLaneChangeModel().getSpeedLat() << std::endl; } #endif return changed; @@ -148,7 +145,7 @@ #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { std::cout << "\n" << SIMTIME << " veh '" << vehicle->getID() << "' at plans sublane maneuver." - << std::endl; + << std::endl; } #endif vehicle->updateBestLanes(); // needed? @@ -214,7 +211,7 @@ #ifdef DEBUG_MANEUVER if DEBUG_COND { std::cout << SIMTIME << " veh '" << vehicle->getID() << "' aborts LC-continuation." - << std::endl; + << std::endl; } #endif vehicle->getLaneChangeModel().setSpeedLat(0); @@ -255,8 +252,8 @@ #ifdef DEBUG_MANEUVER if DEBUG_COND { std::cout << SIMTIME << " vehicle '" << vehicle->getID() << "' continueChangeSublane()" - << " remLatDist=" << remLatDist << " nextLatDist=" << nextLatDist - << std::endl; + << " remLatDist=" << remLatDist << " nextLatDist=" << nextLatDist + << std::endl; } #endif @@ -267,6 +264,10 @@ bool MSLaneChangerSublane::startChangeSublane(MSVehicle* vehicle, ChangerIt& from, double latDist) { + if (vehicle->isRemoteControlled()) { + registerUnchanged(vehicle); + return false; + } // Prevent continuation of LC beyond lane borders if change is not allowed const double distToRightLaneBorder = latDist < 0 ? vehicle->getLane()->getWidth() * 0.5 + vehicle->getLateralPositionOnLane() - vehicle->getWidth() * 0.5 : 0.; const double distToLeftLaneBorder = latDist > 0 ? vehicle->getLane()->getWidth() * 0.5 - vehicle->getLateralPositionOnLane() - vehicle->getWidth() * 0.5 : 0.; @@ -300,22 +301,22 @@ #ifdef DEBUG_MANEUVER if DEBUG_COND { std::cout << SIMTIME << " vehicle '" << vehicle->getID() << "' with maneuverDist=" << vehicle->getLaneChangeModel().getManeuverDist() - << " and committedSpeed=" << vehicle->getLaneChangeModel().getCommittedSpeed() - << " increments lateral position by latDist=" << latDist << std::endl; + << " and committedSpeed=" << vehicle->getLaneChangeModel().getCommittedSpeed() + << " increments lateral position by latDist=" << latDist << std::endl; } #endif #ifdef DEBUG_SURROUNDING if DEBUG_COND { std::cout << SIMTIME << " vehicle '" << vehicle->getID() << "'\n to->ahead=" << to->ahead.toString() - << "'\n to->aheadNext=" << to->aheadNext.toString() - << std::endl; + << "'\n to->aheadNext=" << to->aheadNext.toString() + << std::endl; } #endif const bool completedManeuver = vehicle->getLaneChangeModel().getManeuverDist() - latDist == 0.; - vehicle->getLaneChangeModel().setManeuverDist(vehicle->getLaneChangeModel().getManeuverDist() - latDist); vehicle->getLaneChangeModel().updateSafeLatDist(latDist); outputLCStarted(vehicle, from, to, direction); + vehicle->getLaneChangeModel().setManeuverDist(vehicle->getLaneChangeModel().getManeuverDist() - latDist); const bool changedToNewLane = checkChangeToNewLane(vehicle, direction, from, to); MSLane* oldShadowLane = vehicle->getLaneChangeModel().getShadowLane(); @@ -331,7 +332,18 @@ } // Update maneuver reservations on target lanes - vehicle->getLaneChangeModel().updateTargetLane(); + MSLane* targetLane = vehicle->getLaneChangeModel().updateTargetLane(); + if (!changedToNewLane && targetLane != nullptr + && vehicle->getActionStepLength() > DELTA_T) { + const int dir = (vehicle->getLaneChangeModel().getManeuverDist() > 0 ? 1 : -1); + ChangerIt target = from + dir; + const double actionStepDist = dir * vehicle->getVehicleType().getMaxSpeedLat() * vehicle->getActionStepLengthSecs(); + const double latOffset = vehicle->getLatOffset(targetLane) + actionStepDist; + target->ahead.addLeader(vehicle, false, latOffset); + //std::cout << SIMTIME << " veh=" << vehicle->getID() << " target=" << targetLane->getID() + // << " actionStepDist=" << actionStepDist << " latOffset=" << latOffset + // << " targetAhead=" << target->ahead.toString() << "\n"; + } // compute new angle of the vehicle from the x- and y-distances travelled within last time step // (should happen last because primaryLaneChanged() also triggers angle computation) @@ -353,7 +365,6 @@ } #ifdef DEBUG_MANEUVER if (vehicle->getLaneChangeModel().debugVehicle()) { - MSLane* targetLane = vehicle->getLaneChangeModel().getTargetLane(); std::cout << SIMTIME << " startChangeSublane()" << " shadowLane=" << (shadowLane != nullptr ? shadowLane->getID() : "NULL") << " targetLane=" << (targetLane != nullptr ? targetLane->getID() : "NULL") @@ -423,16 +434,16 @@ #ifdef DEBUG_STATE if DEBUG_COND { std::cout << SIMTIME << " veh=" << vehicle->getID() << " laneChangeStarted state=" << toString((LaneChangeAction)vehicle->getLaneChangeModel().getOwnState()) - << " prevState=" << toString((LaneChangeAction)vehicle->getLaneChangeModel().getPrevState()) - << " filter=" << toString((LaneChangeAction)(LCA_CHANGE_REASONS & ~LCA_SUBLANE)) - << " filtered=" << toString((LaneChangeAction)(vehicle->getLaneChangeModel().getOwnState() & (LCA_CHANGE_REASONS & ~LCA_SUBLANE))) - << "\n"; + << " prevState=" << toString((LaneChangeAction)vehicle->getLaneChangeModel().getPrevState()) + << " filter=" << toString((LaneChangeAction)(LCA_CHANGE_REASONS & ~LCA_SUBLANE)) + << " filtered=" << toString((LaneChangeAction)(vehicle->getLaneChangeModel().getOwnState() & (LCA_CHANGE_REASONS & ~LCA_SUBLANE))) + << "\n"; } #endif vehicle->getLaneChangeModel().setLeaderGaps(to->aheadNext); vehicle->getLaneChangeModel().setFollowerGaps(to->lane->getFollowersOnConsecutive(vehicle, vehicle->getBackPositionOnLane(), true)); vehicle->getLaneChangeModel().setOrigLeaderGaps(from->aheadNext); - vehicle->getLaneChangeModel().laneChangeOutput("changeStarted", from->lane, to->lane, direction); + vehicle->getLaneChangeModel().laneChangeOutput("changeStarted", from->lane, to->lane, direction, vehicle->getLaneChangeModel().getManeuverDist()); } } @@ -574,6 +585,9 @@ } #endif vehicle->getLaneChangeModel().saveLCState(laneOffset, oldstate, state); + if (laneOffset != 0) { + vehicle->getLaneChangeModel().saveNeighbors(laneOffset, neighFollowers, neighLeaders); + } return state; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLaneChangerSublane.h sumo-1.2.0+dfsg1/src/microsim/MSLaneChangerSublane.h --- sumo-1.1.0+dfsg1/src/microsim/MSLaneChangerSublane.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLaneChangerSublane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLane.cpp sumo-1.2.0+dfsg1/src/microsim/MSLane.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSLane.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -43,6 +43,9 @@ #include #include #include +#ifdef HAVE_FOX +#include +#endif #include #include #include @@ -63,6 +66,7 @@ #include "MSVehicleControl.h" #include "MSLeaderInfo.h" #include "MSVehicle.h" +#include "cfmodels/MSCFModel_CC.h" //#define DEBUG_INSERTION //#define DEBUG_PLAN_MOVE @@ -78,11 +82,14 @@ //#define DEBUG_SURROUNDING //#define DEBUG_COND (false) +//#define DEBUG_COND (true) //#define DEBUG_COND (getID() == "undefined") //#define DEBUG_COND2(obj) ((obj != 0 && (obj)->getID() == "disabled")) -#define DEBUG_COND2(obj) ((obj != 0 && (obj)->isSelected())) +//#define DEBUG_COND2(obj) ((obj != 0 && (obj)->isSelected())) //#define DEBUG_COND (getID() == "ego") //#define DEBUG_COND2(obj) ((obj != 0 && (obj)->getID() == "ego")) +//#define DEBUG_COND2(obj) (true) + // =========================================================================== // static member definitions @@ -92,12 +99,12 @@ bool MSLane::myCheckJunctionCollisions(false); SUMOTime MSLane::myCollisionStopTime(0); double MSLane::myCollisionMinGapFactor(1.0); +std::vector MSLane::myRNGs; + // =========================================================================== // internal class method definitions // =========================================================================== - - MSLane::AnyVehicleIterator& MSLane::AnyVehicleIterator::operator++() { if (nextIsMyVehicles()) { @@ -181,9 +188,9 @@ myCanonicalPredecessorLane(nullptr), myCanonicalSuccessorLane(nullptr), myBruttoVehicleLengthSum(0), myNettoVehicleLengthSum(0), + myBruttoVehicleLengthSumToRemove(0), myNettoVehicleLengthSumToRemove(0), myLeaderInfo(this, nullptr, 0), myFollowerInfo(this, nullptr, 0), - myLeaderInfoTmp(this, nullptr, 0), myLeaderInfoTime(SUMOTime_MIN), myFollowerInfoTime(SUMOTime_MIN), myLengthGeometryFactor(MAX2(POSITION_EPS, myShape.length()) / myLength), // factor should not be 0 @@ -191,9 +198,15 @@ myRightSideOnEdge(0), // initialized in MSEdge::initialize myRightmostSublane(0), myNeedsCollisionCheck(false) +#ifdef HAVE_FOX + , mySimulationTask(*this, 0) +#endif + { // initialized in MSEdge::initialize initRestrictions();// may be reloaded again from initialized in MSEdge::closeBuilding + assert(myRNGs.size() > 0); + myRNGIndex = numericalID % myRNGs.size(); } @@ -213,6 +226,14 @@ void +MSLane::checkBufferType() { + if (MSGlobals::gNumSimThreads <= 1 || myIncomingLanes.size() <= 1) { + myVehBuffer.unsetCondition(); + } +} + + +void MSLane::addLink(MSLink* link) { myLinks.push_back(link); } @@ -223,8 +244,8 @@ myNeighs.push_back(id); // warn about lengths after loading the second lane of the pair if (getOpposite() != nullptr && getLength() != getOpposite()->getLength()) { - WRITE_WARNING("Unequal lengths of neigh lane '" + getID() + "' and lane '" + id + "' (" + toString(getLength()) - + ", " + toString(getOpposite()->getLength()) + ")"); + WRITE_WARNING("Unequal lengths of neigh lane '" + getID() + "' and lane '" + id + "' (" + toString(getLength()) + + ", " + toString(getOpposite()->getLength()) + ")"); } } @@ -628,6 +649,11 @@ std::vector::const_iterator ri = bestLaneConts.begin(); double seen = getLength() - pos; // == distance from insertion position until the end of the currentLane double dist = cfModel.brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); + // do not insert if the bidirectional edge is occupied + if (myEdge->getBidiEdge() != nullptr && getBidiLane()->getVehicleNumberWithPartials() > 0) { + return false; + } + bool hadRailSignal = false; // before looping through the continuation lanes, check if a stop is scheduled on this lane // (the code is duplicated in the loop) @@ -658,7 +684,9 @@ if (¤tLane->getEdge() == r.getLastEdge()) { // reached the end of the route if (aVehicle->getParameter().arrivalSpeedProcedure == ARRIVAL_SPEED_GIVEN) { - if (checkFailure(aVehicle, speed, dist, cfModel.freeSpeed(aVehicle, speed, seen, aVehicle->getParameter().arrivalSpeed, true), + const double remaining = seen + aVehicle->getArrivalPos() - currentLane->getLength(); + const double nspeed = cfModel.freeSpeed(aVehicle, speed, remaining, aVehicle->getParameter().arrivalSpeed, true); + if (checkFailure(aVehicle, speed, dist, nspeed, patchSpeed, "arrival speed too low")) { // we may not drive with the given velocity - we cannot match the specified arrival speed return false; @@ -674,6 +702,7 @@ } break; } + hadRailSignal |= (*link)->getTLLogic() != nullptr; if (!(*link)->opened(arrivalTime, speed, speed, aVehicle->getVehicleType().getLength(), aVehicle->getImpatience(), cfModel.getMaxDecel(), 0, posLat) || !(*link)->havePriority()) { @@ -699,6 +728,14 @@ << "\n"; } #endif + if (currentLane == this + && currentLane->getEdge().getBidiEdge() != nullptr + && currentLane->getEdge().getToJunction()->getType() == NODETYPE_RAIL_SIGNAL + && (*link)->getTLLogic() != nullptr + && getLength() < aVehicle->getVehicleType().getLength()) { + // allow guarding bidirectional tracks at the network border with railSignal + return false; + } break; } // get the next used lane (including internal) @@ -706,6 +743,11 @@ // check how next lane affects the journey if (nextLane != nullptr) { + // do not insert if the bidirectional edge is occupied before a railSignal has been encountered + if (!hadRailSignal && nextLane->getEdge().getBidiEdge() != nullptr && nextLane->getBidiLane()->getVehicleNumberWithPartials() > 0) { + return false; + } + // check if there are stops on the next lane that should be regarded // (this block is duplicated before the loop to deal with the insertion lane) if (aVehicle->hasStops()) { @@ -998,10 +1040,13 @@ // ------ Handling vehicles lapping into lanes ------ -const MSLeaderInfo& +const MSLeaderInfo MSLane::getLastVehicleInformation(const MSVehicle* ego, double latOffset, double minPos, bool allowCached) const { +#ifdef HAVE_FOX + FXConditionalLock(myLeaderInfoMutex, MSGlobals::gNumSimThreads > 1); +#endif if (myLeaderInfoTime < MSNet::getInstance()->getCurrentTimeStep() || ego != nullptr || minPos > 0 || !allowCached) { - myLeaderInfoTmp = MSLeaderInfo(this, ego, latOffset); + MSLeaderInfo leaderTmp(this, ego, latOffset); AnyVehicleIterator last = anyVehiclesBegin(); int freeSublanes = 1; // number of sublanes for which no leader was found //if (ego->getID() == "disabled" && SIMTIME == 58) { @@ -1017,10 +1062,10 @@ #endif if (veh != ego && veh->getPositionOnLane(this) >= minPos) { const double latOffset = veh->getLatOffset(this); - freeSublanes = myLeaderInfoTmp.addLeader(veh, true, latOffset); + freeSublanes = leaderTmp.addLeader(veh, true, latOffset); #ifdef DEBUG_PLAN_MOVE if (DEBUG_COND2(ego)) { - std::cout << " latOffset=" << latOffset << " newLeaders=" << myLeaderInfoTmp.toString() << "\n"; + std::cout << " latOffset=" << latOffset << " newLeaders=" << leaderTmp.toString() << "\n"; } #endif } @@ -1028,8 +1073,8 @@ } if (ego == nullptr && minPos == 0) { // update cached value + myLeaderInfo = leaderTmp; myLeaderInfoTime = MSNet::getInstance()->getCurrentTimeStep(); - myLeaderInfo = myLeaderInfoTmp; } #ifdef DEBUG_PLAN_MOVE //if (DEBUG_COND2(ego)) std::cout << SIMTIME @@ -1039,23 +1084,26 @@ // << " vehicles=" << toString(myVehicles) // << " partials=" << toString(myPartialVehicles) // << "\n" - // << " result=" << myLeaderInfoTmp.toString() + // << " result=" << leaderTmp.toString() // << " cached=" << myLeaderInfo.toString() // << " myLeaderInfoTime=" << myLeaderInfoTime // << "\n"; gDebugFlag1 = false; #endif - return myLeaderInfoTmp; + return leaderTmp; } return myLeaderInfo; } -const MSLeaderInfo& +const MSLeaderInfo MSLane::getFirstVehicleInformation(const MSVehicle* ego, double latOffset, bool onlyFrontOnLane, double maxPos, bool allowCached) const { +#ifdef HAVE_FOX + FXConditionalLock(myFollowerInfoMutex, MSGlobals::gNumSimThreads > 1); +#endif if (myFollowerInfoTime < MSNet::getInstance()->getCurrentTimeStep() || ego != nullptr || maxPos < myLength || !allowCached || onlyFrontOnLane) { // XXX separate cache for onlyFrontOnLane = true - myLeaderInfoTmp = MSLeaderInfo(this, ego, latOffset); + MSLeaderInfo followerTmp(this, ego, latOffset); AnyVehicleIterator first = anyVehiclesUpstreamBegin(); int freeSublanes = 1; // number of sublanes for which no leader was found const MSVehicle* veh = *first; @@ -1074,14 +1122,14 @@ std::cout << " veh=" << veh->getID() << " latOffset=" << latOffset << "\n"; } #endif - freeSublanes = myLeaderInfoTmp.addLeader(veh, true, latOffset); + freeSublanes = followerTmp.addLeader(veh, true, latOffset); } veh = *(++first); } if (ego == nullptr && maxPos == std::numeric_limits::max()) { // update cached value + myFollowerInfo = followerTmp; myFollowerInfoTime = MSNet::getInstance()->getCurrentTimeStep(); - myFollowerInfo = myLeaderInfoTmp; } #ifdef DEBUG_PLAN_MOVE //if (DEBUG_COND2(ego)) std::cout << SIMTIME @@ -1091,12 +1139,12 @@ // << " vehicles=" << toString(myVehicles) // << " partials=" << toString(myPartialVehicles) // << "\n" - // << " result=" << myLeaderInfoTmp.toString() - // //<< " cached=" << myLeaderInfo.toString() + // << " result=" << followerTmp.toString() + // //<< " cached=" << myFollowerInfo.toString() // << " myLeaderInfoTime=" << myLeaderInfoTime // << "\n"; #endif - return myLeaderInfoTmp; + return followerTmp; } return myFollowerInfo; } @@ -1142,13 +1190,15 @@ } } -void -MSLane::setJunctionApproaches(const SUMOTime t) { - for (MSVehicle* veh : myVehicles) { + +void +MSLane::setJunctionApproaches(const SUMOTime t) const { + for (MSVehicle* const veh : myVehicles) { veh->setApproachingForAllLinks(t); } } + void MSLane::updateLeaderInfo(const MSVehicle* veh, VehCont::reverse_iterator& vehPart, VehCont::reverse_iterator& vehRes, MSLeaderInfo& ahead) const { bool morePartialVehsAhead = vehPart != myPartialVehicles.rend(); @@ -1216,11 +1266,66 @@ } #endif - if (myVehicles.size() == 0 || myCollisionAction == COLLISION_ACTION_NONE) { + if (myCollisionAction == COLLISION_ACTION_NONE) { return; } + std::set toRemove; std::set toTeleport; + if (mustCheckJunctionCollisions()) { + myNeedsCollisionCheck = true; // always check +#ifdef DEBUG_JUNCTION_COLLISIONS + if (DEBUG_COND) { + std::cout << SIMTIME << " detect junction Collisions stage=" << stage << " lane=" << getID() << ":\n" + << " vehs=" << toString(myVehicles) << "\n" + << " part=" << toString(myPartialVehicles) << "\n" + << "\n"; + } +#endif + assert(myLinks.size() == 1); + //std::cout << SIMTIME << " checkJunctionCollisions " << getID() << "\n"; + const std::vector& foeLanes = myLinks.front()->getFoeLanes(); + for (AnyVehicleIterator veh = anyVehiclesBegin(); veh != anyVehiclesEnd(); ++veh) { + MSVehicle* collider = const_cast(*veh); + //std::cout << " collider " << collider->getID() << "\n"; + PositionVector colliderBoundary = collider->getBoundingBox(); + for (std::vector::const_iterator it = foeLanes.begin(); it != foeLanes.end(); ++it) { + const MSLane* foeLane = *it; + //std::cout << " foeLane " << foeLane->getID() << "\n"; + MSLane::AnyVehicleIterator end = foeLane->anyVehiclesEnd(); + for (MSLane::AnyVehicleIterator it_veh = foeLane->anyVehiclesBegin(); it_veh != end; ++it_veh) { + MSVehicle* victim = (MSVehicle*)*it_veh; + if (victim == collider) { + // may happen if the vehicles lane and shadow lane are siblings + continue; + } + //std::cout << " victim " << victim->getID() << "\n"; +#ifdef DEBUG_JUNCTION_COLLISIONS + if (DEBUG_COND && DEBUG_COND2(collider)) { + std::cout << SIMTIME << " foe=" << victim->getID() << " bound=" << colliderBoundary << " foeBound=" << victim->getBoundingBox() << "\n"; + } +#endif + if (colliderBoundary.overlapsWith(victim->getBoundingBox())) { + // make a detailed check + if (collider->getBoundingPoly().overlapsWith(victim->getBoundingPoly())) { + handleCollisionBetween(timestep, stage, collider, victim, -1, 0, toRemove, toTeleport); + } + } + } + detectPedestrianJunctionCollision(collider, colliderBoundary, foeLane, timestep, stage); + } + if (myLinks.front()->getWalkingAreaFoe() != nullptr) { + detectPedestrianJunctionCollision(collider, colliderBoundary, myLinks.front()->getWalkingAreaFoe(), timestep, stage); + } + if (myLinks.front()->getWalkingAreaFoeExit() != nullptr) { + detectPedestrianJunctionCollision(collider, colliderBoundary, myLinks.front()->getWalkingAreaFoeExit(), timestep, stage); + } + } + } + + if (myVehicles.size() == 0) { + return; + } if (!MSAbstractLaneChangeModel::haveLateralDynamics()) { // no sublanes VehCont::reverse_iterator lastVeh = myVehicles.rend() - 1; @@ -1231,6 +1336,34 @@ if (myPartialVehicles.size() > 0) { detectCollisionBetween(timestep, stage, *lastVeh, myPartialVehicles.front(), toRemove, toTeleport); } + if (myEdge->getBidiEdge() != nullptr) { + // bidirectional railway + MSLane* bidiLane = getBidiLane(); + if (bidiLane->getVehicleNumberWithPartials() > 0) { + for (AnyVehicleIterator veh = anyVehiclesBegin(); veh != anyVehiclesEnd(); ++veh) { + double high = (*veh)->getPositionOnLane(this); + double low = (*veh)->getBackPositionOnLane(this); + for (AnyVehicleIterator veh2 = bidiLane->anyVehiclesBegin(); veh2 != bidiLane->anyVehiclesEnd(); ++veh2) { + // self-collisions might ligitemately occur when a long train loops back on itself + //if (*veh == *veh2) { + // // no self-collision (when performing a turn-around) + // continue; + //} + double low2 = myLength - (*veh2)->getPositionOnLane(bidiLane); + double high2 = myLength - (*veh2)->getBackPositionOnLane(bidiLane); + if (!(high < low2 || high2 < low)) { + // the faster vehicle is at fault + MSVehicle* collider = const_cast(*veh); + MSVehicle* victim = const_cast(*veh2); + if (collider->getSpeed() < victim->getSpeed()) { + std::swap(victim, collider); + } + handleCollisionBetween(timestep, stage, collider, victim, -1, 0, toRemove, toTeleport); + } + } + } + } + } } else { // in the sublane-case it is insufficient to check the vehicles ordered // by their front position as there might be more than 2 vehicles next to each @@ -1259,9 +1392,9 @@ if (follow->getLaneChangeModel().getShadowLane() != nullptr && follow->getLane() == this) { // check whether follow collides on the shadow lane const MSLane* shadowLane = follow->getLaneChangeModel().getShadowLane(); - MSLeaderInfo ahead = shadowLane->getLastVehicleInformation(follow, - getRightSideOnEdge() - shadowLane->getRightSideOnEdge(), - follow->getPositionOnLane()); + const MSLeaderInfo& ahead = shadowLane->getLastVehicleInformation(follow, + getRightSideOnEdge() - shadowLane->getRightSideOnEdge(), + follow->getPositionOnLane()); for (int i = 0; i < ahead.numSublanes(); ++i) { MSVehicle* lead = const_cast(ahead[i]); if (lead != nullptr && lead != follow && shadowLane->detectCollisionBetween(timestep, stage, follow, lead, toRemove, toTeleport)) { @@ -1272,53 +1405,6 @@ } } - if (myCheckJunctionCollisions && myEdge->isInternal()) { - myNeedsCollisionCheck = true; // always check -#ifdef DEBUG_JUNCTION_COLLISIONS - if (DEBUG_COND) { - std::cout << SIMTIME << " detect junction Collisions stage=" << stage << " lane=" << getID() << ":\n" - << " vehs=" << toString(myVehicles) << "\n" - << " part=" << toString(myPartialVehicles) << "\n" - << "\n"; - } -#endif - assert(myLinks.size() == 1); - //std::cout << SIMTIME << " checkJunctionCollisions " << getID() << "\n"; - const std::vector& foeLanes = myLinks.front()->getFoeLanes(); - for (AnyVehicleIterator veh = anyVehiclesBegin(); veh != anyVehiclesEnd(); ++veh) { - MSVehicle* collider = const_cast(*veh); - //std::cout << " collider " << collider->getID() << "\n"; - PositionVector colliderBoundary = collider->getBoundingBox(); - for (std::vector::const_iterator it = foeLanes.begin(); it != foeLanes.end(); ++it) { - const MSLane* foeLane = *it; - //std::cout << " foeLane " << foeLane->getID() << "\n"; - MSLane::AnyVehicleIterator end = foeLane->anyVehiclesEnd(); - for (MSLane::AnyVehicleIterator it_veh = foeLane->anyVehiclesBegin(); it_veh != end; ++it_veh) { - MSVehicle* victim = (MSVehicle*)*it_veh; - if (victim == collider) { - // may happen if the vehicles lane and shadow lane are siblings - continue; - } - //std::cout << " victim " << victim->getID() << "\n"; -#ifdef DEBUG_JUNCTION_COLLISIONS - if (DEBUG_COND && DEBUG_COND2(collider)) { - std::cout << SIMTIME << " foe=" << victim->getID() << " bound=" << colliderBoundary << " foeBound=" << victim->getBoundingBox() << "\n"; - } -#endif - if (colliderBoundary.overlapsWith(victim->getBoundingBox())) { - // make a detailed check - if (collider->getBoundingPoly().overlapsWith(victim->getBoundingPoly())) { - handleCollisionBetween(timestep, stage, collider, victim, -1, 0, toRemove, toTeleport); - } - } - } - detectPedestrianJunctionCollision(collider, colliderBoundary, foeLane, timestep, stage); - } - if (myLinks.front()->getWalkingAreaFoe() != nullptr) { - detectPedestrianJunctionCollision(collider, colliderBoundary, myLinks.front()->getWalkingAreaFoe(), timestep, stage); - } - } - } if (myEdge->getPersons().size() > 0 && MSPModel::getModel()->hasPedestrians(this)) { #ifdef DEBUG_PEDESTRIAN_COLLISIONS @@ -1399,6 +1485,7 @@ } } + bool MSLane::detectCollisionBetween(SUMOTime timestep, const std::string& stage, MSVehicle* collider, MSVehicle* victim, std::set& toRemove, @@ -1458,6 +1545,11 @@ // synchroneous lane change maneuver return false; } +#ifdef DEBUG_COLLISIONS + if (DEBUG_COND && (DEBUG_COND2(collider) || DEBUG_COND2(victim))) { + std::cout << SIMTIME << " detectedCollision gap=" << gap << " latGap=" << latGap << "\n"; + } +#endif handleCollisionBetween(timestep, stage, collider, victim, gap, latGap, toRemove, toTeleport); return true; } @@ -1469,13 +1561,22 @@ MSLane::handleCollisionBetween(SUMOTime timestep, const std::string& stage, MSVehicle* collider, MSVehicle* victim, double gap, double latGap, std::set& toRemove, std::set& toTeleport) const { - std::string collisionType = (collider->getLaneChangeModel().isOpposite() != victim->getLaneChangeModel().isOpposite() ? - "frontal collision" : "collision"); + std::string collisionType = ((collider->getLaneChangeModel().isOpposite() != victim->getLaneChangeModel().isOpposite() + || (&collider->getLane()->getEdge() == victim->getLane()->getEdge().getBidiEdge())) + ? "frontal collision" : "collision"); // in frontal collisions the opposite vehicle is the collider if (victim->getLaneChangeModel().isOpposite() && !collider->getLaneChangeModel().isOpposite()) { std::swap(collider, victim); } std::string prefix = "Vehicle '" + collider->getID() + "'; " + collisionType + " with vehicle '" + victim->getID() ; + const MSCFModel_CC* model = dynamic_cast(&collider->getCarFollowModel()); + if (model) { + model->setCrashed(collider, true); + } + model = dynamic_cast(&victim->getCarFollowModel()); + if (model) { + model->setCrashed(victim, true, true); + } if (myCollisionStopTime > 0) { if (collider->collisionStopTime() >= 0 && victim->collisionStopTime() >= 0) { return; @@ -1589,8 +1690,8 @@ } -bool -MSLane::executeMovements(SUMOTime t, std::vector& lanesWithVehiclesToIntegrate) { +void +MSLane::executeMovements(const SUMOTime t) { myNeedsCollisionCheck = true; // iterate 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();) { @@ -1617,7 +1718,7 @@ } else { // vehicle has entered a new lane (leaveLane and workOnMoveReminders were already called in MSVehicle::executeMove) target->myVehBuffer.push_back(veh); - lanesWithVehiclesToIntegrate.push_back(target); + MSNet::getInstance()->getEdgeControl().needsVehicleIntegration(target); } } else if (veh->isParking()) { // vehicle started to park @@ -1628,20 +1729,20 @@ // this should never happen because it is handled in MSVehicle::executeMove assert(false); WRITE_WARNING("Teleporting vehicle '" + veh->getID() + "'; beyond end of lane, target lane='" + getID() + "', time=" + - time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + time2string(t) + "."); MSNet::getInstance()->getVehicleControl().registerCollision(); MSVehicleTransfer::getInstance()->add(t, veh); } else if (veh->collisionStopTime() == 0) { veh->resumeFromStopping(); if (getCollisionAction() == COLLISION_ACTION_REMOVE) { WRITE_WARNING("Removing vehicle '" + veh->getID() + "' after earlier collision, lane='" + veh->getLane()->getID() + ", time=" + - time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + time2string(t) + "."); veh->onRemovalFromNet(MSMoveReminder::NOTIFICATION_VAPORIZED); MSNet::getInstance()->getVehicleControl().scheduleVehicleRemoval(veh); } else if (getCollisionAction() == COLLISION_ACTION_TELEPORT) { WRITE_WARNING("Teleporting vehicle '" + veh->getID() + "' after earlier collision, lane='" + veh->getLane()->getID() + ", time=" + - time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); - MSVehicleTransfer::getInstance()->add(MSNet::getInstance()->getCurrentTimeStep(), veh); + time2string(t) + "."); + MSVehicleTransfer::getInstance()->add(t, veh); } else { ++i; continue; @@ -1650,8 +1751,8 @@ ++i; continue; } - myBruttoVehicleLengthSum -= length; - myNettoVehicleLengthSum -= nettoLength; + myBruttoVehicleLengthSumToRemove += length; + myNettoVehicleLengthSumToRemove += nettoLength; ++i; i = VehCont::reverse_iterator(myVehicles.erase(i.base())); } @@ -1667,8 +1768,8 @@ 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(); + myBruttoVehicleLengthSumToRemove += veh->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSumToRemove += veh->getVehicleType().getLength(); myVehicles.erase(myVehicles.end() - 1); WRITE_WARNING("Teleporting vehicle '" + veh->getID() + "'; waited too long" + reason @@ -1685,16 +1786,31 @@ } } // else look for a (waiting) vehicle that isn't stopped? } - } else { - // avoid numerical instability - myBruttoVehicleLengthSum = 0; - myNettoVehicleLengthSum = 0; } if (MSGlobals::gLateralResolution > 0) { // trigger sorting of vehicles as their order may have changed - lanesWithVehiclesToIntegrate.push_back(this); + MSNet::getInstance()->getEdgeControl().needsVehicleIntegration(this); + } +} + + +void +MSLane::updateLengthSum() { + myBruttoVehicleLengthSum -= myBruttoVehicleLengthSumToRemove; + myNettoVehicleLengthSum -= myNettoVehicleLengthSumToRemove; + myBruttoVehicleLengthSumToRemove = 0; + myNettoVehicleLengthSumToRemove = 0; + if (myVehicles.empty()) { + // avoid numerical instability + myBruttoVehicleLengthSum = 0; + myNettoVehicleLengthSum = 0; } - return myVehicles.size() == 0; +} + + +void +MSLane::changeLanes(const SUMOTime t) { + myEdge->changeLanes(t); } @@ -1752,7 +1868,7 @@ void MSLane::clear() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); ++i) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } @@ -1800,13 +1916,12 @@ } -bool -MSLane::integrateNewVehicle(SUMOTime) { +void +MSLane::integrateNewVehicles() { myNeedsCollisionCheck = true; - bool wasInactive = myVehicles.size() == 0; - sort(myVehBuffer.begin(), myVehBuffer.end(), vehicle_position_sorter(this)); - for (std::vector::const_iterator i = myVehBuffer.begin(); i != myVehBuffer.end(); ++i) { - MSVehicle* veh = *i; + std::vector& buffered = myVehBuffer.getContainer(); + sort(buffered.begin(), buffered.end(), vehicle_position_sorter(this)); + for (MSVehicle* const veh : buffered) { assert(veh->getLane() == this); myVehicles.insert(myVehicles.begin(), veh); myBruttoVehicleLengthSum += veh->getVehicleType().getLengthWithGap(); @@ -1814,7 +1929,8 @@ //if (true) std::cout << SIMTIME << " integrateNewVehicle lane=" << getID() << " veh=" << veh->getID() << " (on lane " << veh->getLane()->getID() << ") into lane=" << getID() << " myBrutto=" << myBruttoVehicleLengthSum << "\n"; myEdge->markDelayed(); } - myVehBuffer.clear(); + buffered.clear(); + myVehBuffer.unlock(); //std::cout << SIMTIME << " integrateNewVehicle lane=" << getID() << " myVehicles1=" << toString(myVehicles); if (MSGlobals::gLateralResolution > 0 || myNeighs.size() > 0) { sort(myVehicles.begin(), myVehicles.end(), vehicle_natural_position_sorter(this)); @@ -1822,9 +1938,8 @@ sortPartialVehicles(); #ifdef DEBUG_VEHICLE_CONTAINER if (DEBUG_COND) std::cout << SIMTIME << " integrateNewVehicle lane=" << getID() - << " vhicles=" << toString(myVehicles) << " partials=" << toString(myPartialVehicles) << "\n"; + << " vehicles=" << toString(myVehicles) << " partials=" << toString(myPartialVehicles) << "\n"; #endif - return wasInactive && myVehicles.size() != 0; } @@ -1840,15 +1955,15 @@ MSLane::sortManeuverReservations() { if (myManeuverReservations.size() > 1) { #ifdef DEBUG_CONTEXT - if DEBUG_COND { - std::cout << "sortManeuverReservations on lane " << getID() - << "\nBefore sort: " << toString(myManeuverReservations) << std::endl; + if (DEBUG_COND) { + std::cout << "sortManeuverReservations on lane " << getID() + << "\nBefore sort: " << toString(myManeuverReservations) << std::endl; } #endif sort(myManeuverReservations.begin(), myManeuverReservations.end(), vehicle_natural_position_sorter(this)); #ifdef DEBUG_CONTEXT - if DEBUG_COND { - std::cout << "After sort: " << toString(myManeuverReservations) << std::endl; + if (DEBUG_COND) { + std::cout << "After sort: " << toString(myManeuverReservations) << std::endl; } #endif } @@ -2102,7 +2217,7 @@ return false; } const std::vector& lanes = (*i).second; - return find(lanes.begin(), lanes.end(), lane) != lanes.end(); + return std::find(lanes.begin(), lanes.end(), lane) != lanes.end(); } @@ -2134,11 +2249,12 @@ const MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); const double maxSpeed = getSpeedLimit() * vc.getMaxSpeedFactor(); // NOTE: For the euler update this is an upper bound on the actual braking distance (see ticket #860) - return maxSpeed * maxSpeed * 0.5 / vc.getMinDeceleration(); + // impose a hard bound due to visibiilty / common sense to avoid unnecessary computation if there are strange vehicles in the fleet + return MIN2(maxSpeed * maxSpeed * 0.5 / vc.getMinDeceleration(), + myPermissions == SVC_SHIP ? 10000.0 : 1000.0); } - std::pair MSLane::getLeader(const MSVehicle* veh, const double vehPos, const std::vector& bestLaneConts, double dist, bool checkTmpVehicles) const { // get the leading vehicle for (shadow) veh @@ -2381,7 +2497,7 @@ MSVehicle* leader = nextLane->getLastAnyVehicle(); if (leader != nullptr && leader != result.first) { const double gap = seen + leader->getBackPositionOnLane(nextLane) - veh.getVehicleType().getMinGap(); - const double tmpSpeed = veh.getCarFollowModel().insertionFollowSpeed(leader, speed, gap, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); + const double tmpSpeed = veh.getCarFollowModel().insertionFollowSpeed(&veh, speed, gap, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); if (tmpSpeed < safeSpeed) { safeSpeed = tmpSpeed; result = std::make_pair(leader, gap); @@ -2428,6 +2544,16 @@ } +const MSLane* +MSLane::getNormalPredecessorLane() const { + if (isInternal()) { + return getLogicalPredecessorLane()->getNormalPredecessorLane(); + } else { + return this; + } +} + + MSLane* MSLane::getLogicalPredecessorLane(const MSEdge& fromEdge) const { for (std::vector::const_iterator i = myIncomingLanes.begin(); i != myIncomingLanes.end(); ++i) { @@ -2890,9 +3016,9 @@ void -MSLane::loadState(std::vector& vehIds, MSVehicleControl& vc) { - for (std::vector::const_iterator it = vehIds.begin(); it != vehIds.end(); ++it) { - MSVehicle* v = dynamic_cast(vc.getVehicle(*it)); +MSLane::loadState(const std::vector& vehIds, MSVehicleControl& vc) { + for (const std::string& id : vehIds) { + MSVehicle* v = dynamic_cast(vc.getVehicle(id)); // vehicle could be removed due to options if (v != nullptr) { v->updateBestLanes(false, this); @@ -2926,9 +3052,9 @@ #ifdef DEBUG_CONTEXT if (DEBUG_COND2(ego)) { std::cout << SIMTIME << " getFollowers lane=" << getID() << " ego=" << ego->getID() - << " backOffset=" << backOffset << " pos=" << egoPos - << " allSub=" << allSublanes << " searchDist=" << searchDist << " ignoreMinor=" << ignoreMinorLinks - << "\n"; + << " backOffset=" << backOffset << " pos=" << egoPos + << " allSub=" << allSublanes << " searchDist=" << searchDist << " ignoreMinor=" << ignoreMinorLinks + << "\n"; } #endif assert(ego != 0); @@ -2966,9 +3092,24 @@ // deceleration of potential follower vehicles if (searchDist == -1) { searchDist = getMaximumBrakeDist() - backOffset; +#ifdef DEBUG_CONTEXT + if (DEBUG_COND2(ego)) { + std::cout << " computed searchDist=" << searchDist << "\n"; + } +#endif + } + std::set egoFurther; + for (MSLane* further : ego->getFurtherLanes()) { + egoFurther.insert(&further->getEdge()); + } + if (ego->getPositionOnLane() < ego->getVehicleType().getLength() && egoFurther.size() == 0 + && ego->getLane()->getLogicalPredecessorLane() != nullptr) { + // on insertion + egoFurther.insert(&ego->getLane()->getLogicalPredecessorLane()->getEdge()); } - std::set visited; + // avoid loops + std::set visited(myEdge->getLanes().begin(), myEdge->getLanes().end()); std::vector newFound; std::vector toExamine = myIncomingLanes; while (toExamine.size() != 0) { @@ -2983,7 +3124,9 @@ gDebugFlag1 = true; // for calling getLeaderInfo } #endif - if (backOffset + (*it).length - next->getLength() < 0) { + if (backOffset + (*it).length - next->getLength() < 0 + && egoFurther.count(&next->getEdge()) != 0 + ) { // check for junction foes that would interfere with lane changing const MSLink::LinkLeaders linkLeaders = (*it).viaLink->getLeaderInfo(ego, -backOffset); for (const auto& ll : linkLeaders) { @@ -2994,17 +3137,19 @@ #ifdef DEBUG_CONTEXT if (DEBUG_COND2(ego)) { std::cout << SIMTIME << " ego=" << ego->getID() << " link=" << (*it).viaLink->getViaLaneOrLane()->getID() - << " (3) added veh=" << Named::getIDSecure(ll.vehAndGap.first) - << " gap=" << ll.vehAndGap.second << " dtC=" << ll.distToCrossing - << " egoIsLeader=" << egoIsLeader << " gap2=" << gap - << "\n"; + << " (3) added veh=" << Named::getIDSecure(ll.vehAndGap.first) + << " gap=" << ll.vehAndGap.second << " dtC=" << ll.distToCrossing + << " egoIsLeader=" << egoIsLeader << " gap2=" << gap + << "\n"; } #endif } } } #ifdef DEBUG_CONTEXT - if (DEBUG_COND2(ego)) gDebugFlag1 = false; + if (DEBUG_COND2(ego)) { + gDebugFlag1 = false; + } #endif for (int i = 0; i < first.numSublanes(); ++i) { @@ -3218,15 +3363,15 @@ return std::set(); } else { // Add this lane's coverage to the lane coverage info - (*checkedLanes)[this] = std::make_pair(MAX2(0.0, startPos-upstreamDist), MIN2(startPos+downstreamDist, getLength())); + (*checkedLanes)[this] = std::make_pair(MAX2(0.0, startPos - upstreamDist), MIN2(startPos + downstreamDist, getLength())); } #ifdef DEBUG_SURROUNDING std::cout << "Scanning on lane " << myID << "(downstr. " << downstreamDist << ", upstr. " << upstreamDist << ", startPos " << startPos << "): " << std::endl; #endif - std::set foundVehicles = getVehiclesInRange(MAX2(0., startPos-upstreamDist), MIN2(myLength, startPos + downstreamDist)); + std::set foundVehicles = getVehiclesInRange(MAX2(0., startPos - upstreamDist), MIN2(myLength, startPos + downstreamDist)); if (startPos < upstreamDist) { // scan incoming lanes - for (const IncomingLaneInfo& incomingInfo : getIncomingLanes()){ + for (const IncomingLaneInfo& incomingInfo : getIncomingLanes()) { MSLane* incoming = incomingInfo.lane; #ifdef DEBUG_SURROUNDING std::cout << "Checking on incoming: " << incoming->getID() << std::endl; @@ -3234,7 +3379,7 @@ std::cout << "Skipping previous: " << incoming->getID() << std::endl; } #endif - std::set newVehs = incoming->getSurroundingVehicles(incoming->getLength(), 0.0, upstreamDist-startPos, checkedLanes); + std::set newVehs = incoming->getSurroundingVehicles(incoming->getLength(), 0.0, upstreamDist - startPos, checkedLanes); foundVehicles.insert(newVehs.begin(), newVehs.end()); } } @@ -3261,41 +3406,25 @@ std::set -MSLane::getVehiclesInRange(double a, double b) const { +MSLane::getVehiclesInRange(const double a, const double b) const { std::set res; const VehCont& vehs = getVehiclesSecure(); - const int nV = (int)vehs.size(); - if (nV == 0) { - releaseVehicles(); - return res; - } - - // query interval to lane dimensions - a = MAX2(0., a); - b = MIN2(myLength, b); - - // Find indices ia (min with veh in interval) - // and ib (max with veh in interval) - int ia = 0, ib = nV-1; - while (ia != nV) { - if(vehs[ia]->getPositionOnLane() >= a) { - break; - } - ++ia; - } - while (ib != -1) { - if(vehs[ib]->getBackPositionOnLane() <= b){ - break; + if (!vehs.empty()) { + for (MSVehicle* const veh : vehs) { + if (veh->getPositionOnLane() >= a) { + if (veh->getBackPositionOnLane() > b) { + break; + } + res.insert(veh); + } } - --ib; } - - res.insert(vehs.begin()+ia, vehs.begin()+ib+1); releaseVehicles(); return res; } + std::vector MSLane::getUpcomingJunctions(double pos, double range, const std::vector& contLanes) const { // set of upcoming junctions and the corresponding conflict links @@ -3310,8 +3439,8 @@ std::vector MSLane::getUpcomingLinks(double pos, double range, const std::vector& contLanes) const { #ifdef DEBUG_SURROUNDING - std::cout << "getUpcoming links on lane '" << getID() << "' with pos=" << pos - << " range=" << range << std::endl; + std::cout << "getUpcoming links on lane '" << getID() << "' with pos=" << pos + << " range=" << range << std::endl; #endif // set of upcoming junctions and the corresponding conflict links std::vector links; @@ -3333,7 +3462,7 @@ // next non-internal lane behind junction lane = link->getLane(); pos = 0.0; - assert(*(contLanesIt+1) == lane); + assert(*(contLanesIt + 1) == lane); } while (++contLanesIt != contLanes.end()) { assert(!lane->isInternal()); @@ -3346,7 +3475,7 @@ break; } link = lane->getLinkTo(*contLanesIt); - if (link!=nullptr) { + if (link != nullptr) { links.insert(links.end(), link); } lane = *contLanesIt; @@ -3528,5 +3657,33 @@ return true; } +void +MSLane::initRNGs(const OptionsCont& oc) { + myRNGs.clear(); + const int numRNGs = oc.getInt("thread-rngs"); + const bool random = oc.getBool("random"); + int seed = oc.getInt("seed"); + for (int i = 0; i < numRNGs; i++) { + myRNGs.push_back(std::mt19937()); + RandHelper::initRand(&myRNGs.back(), random, seed++); + } +} + +MSLane* +MSLane::getBidiLane() const { + const MSEdge* bidiEdge = myEdge->getBidiEdge(); + if (bidiEdge == nullptr) { + return nullptr; + } else { + /// XXX multi-lane edges are not considered + assert(bidiEdge->getLanes().size() == 1); + return bidiEdge->getLanes()[0]; + } +} + +bool +MSLane::mustCheckJunctionCollisions() const { + return myCheckJunctionCollisions && myEdge->isInternal() && myLinks.front()->getFoeLanes().size() > 0; +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLane.h sumo-1.2.0+dfsg1/src/microsim/MSLane.h --- sumo-1.1.0+dfsg1/src/microsim/MSLane.h 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -46,6 +46,11 @@ #include "MSMoveReminder.h" #include +#include +#ifdef HAVE_FOX +#include +#endif + // =========================================================================== // class declarations @@ -81,8 +86,6 @@ friend class MSLaneChanger; friend class MSLaneChangerSublane; - friend class MSXMLRawOut; - friend class MSQueueExport; friend class AnyVehicleIterator; @@ -205,7 +208,25 @@ /// @brief Destructor virtual ~MSLane(); + /// @brief sets the associated RNG index + void setRNGIndex(const int rngIndex) { + myRNGIndex = rngIndex; + } + + /// @brief returns the associated RNG index + int getRNGIndex() const { + return myRNGIndex; + } + + /// @brief return the associated RNG + std::mt19937* getRNG() const { + return &myRNGs[myRNGIndex]; + } + /// @brief return the number of RNGs + static int getNumRNGs() { + return (int)myRNGs.size(); + } /// @name Additional initialisation /// @{ @@ -362,10 +383,10 @@ * @param[in] allowCached Whether the cached value may be used * @return Information about the last vehicles */ - const MSLeaderInfo& getLastVehicleInformation(const MSVehicle* ego, double latOffset, double minPos = 0, bool allowCached = true) const; + const MSLeaderInfo getLastVehicleInformation(const MSVehicle* ego, double latOffset, double minPos = 0, bool allowCached = true) const; /// @brief analogue to getLastVehicleInformation but in the upstream direction - const MSLeaderInfo& getFirstVehicleInformation(const MSVehicle* ego, double latOffset, bool onlyFrontOnLane, double maxPos = std::numeric_limits::max(), bool allowCached = true) const; + const MSLeaderInfo getFirstVehicleInformation(const MSVehicle* ego, double latOffset, bool onlyFrontOnLane, double maxPos = std::numeric_limits::max(), bool allowCached = true) const; /// @} @@ -489,7 +510,7 @@ * @param[in] The vehicle to return the adapted speed limit for * @return This lane's resulting max. speed */ - inline double getVehicleMaxSpeed(const SUMOVehicle* const veh) const { + inline double getVehicleMaxSpeed(const SUMOTrafficObject* const veh) const { if (myRestrictions != 0) { std::map::const_iterator r = myRestrictions->find(veh->getVClass()); if (r != myRestrictions->end()) { @@ -556,11 +577,11 @@ virtual void planMovements(const SUMOTime t); /** @brief Register junction approaches for all vehicles after velocities - * have been planned. + * have been planned. * * This method goes through all vehicles calling their * "setApproachingForAllLinks" method. */ - virtual void setJunctionApproaches(const SUMOTime t); + virtual void setJunctionApproaches(const SUMOTime t) const; /** @brief This updates the MSLeaderInfo argument with respect to the given MSVehicle. * All leader-vehicles on the same edge, which are relevant for the vehicle @@ -582,10 +603,13 @@ * * @see MSVehicle::executeMove */ - virtual bool executeMovements(SUMOTime t, std::vector& lanesWithVehiclesToIntegrate); + virtual void executeMovements(const SUMOTime t); /// Insert buffered vehicle into the real lane. - virtual bool integrateNewVehicle(SUMOTime t); + virtual void integrateNewVehicles(); + + /// @brief updated current vehicle length sum (delayed to avoid lane-order-dependency) + void updateLengthSum(); ///@} @@ -705,6 +729,10 @@ */ template static void fill(RTREE& into); + + + /// @brief initialize rngs + static void initRNGs(const OptionsCont& oc); /// @} @@ -895,7 +923,7 @@ /// @brief Returns all vehicles on the lane overlapping with the interval [a,b] /// @note Does not consider vehs with front on subsequent lanes - std::set getVehiclesInRange(double a, double b) const; + std::set getVehiclesInRange(const double a, const double b) const; /// @brief Returns all upcoming junctions within given range along the given (non-internal) continuation lanes measured from given position @@ -908,6 +936,11 @@ */ MSLane* getLogicalPredecessorLane() const; + /** @brief get normal lane leading to this internal lane, for normal lanes, + * the lane itself is returned + */ + const MSLane* getNormalPredecessorLane() const; + /** @brief return the (first) predecessor lane from the given edge */ MSLane* getLogicalPredecessorLane(const MSEdge& fromEdge) const; @@ -1024,6 +1057,8 @@ /// @brief initialized vClass-specific speed limits void initRestrictions(); + void checkBufferType(); + double getRightSideOnEdge() const { return myRightSideOnEdge; } @@ -1089,6 +1124,31 @@ return false; } + /// @brief retrieve bidirectional lane or nullptr + MSLane* getBidiLane() const; + + /// @brief whether this lane must check for junction collisions + bool mustCheckJunctionCollisions() const; + +#ifdef HAVE_FOX + FXWorkerThread::Task* getPlanMoveTask(const SUMOTime time) { + mySimulationTask.init(&MSLane::planMovements, time); + return &mySimulationTask; + } + + FXWorkerThread::Task* getExecuteMoveTask(const SUMOTime time) { + mySimulationTask.init(&MSLane::executeMovements, time); + return &mySimulationTask; + } + + FXWorkerThread::Task* getLaneChangeTask(const SUMOTime time) { + mySimulationTask.init(&MSLane::changeLanes, time); + return &mySimulationTask; + } +#endif + + void changeLanes(const SUMOTime time); + /// @name State saving/loading /// @{ @@ -1112,7 +1172,7 @@ * @todo What about throwing an IOError? * @todo What about throwing an error if something else fails (a vehicle can not be referenced)? */ - void loadState(std::vector& vehIDs, MSVehicleControl& vc); + void loadState(const std::vector& vehIDs, MSVehicleControl& vc); /// @} @@ -1237,7 +1297,7 @@ /** @brief Buffer for vehicles that moved from their previous lane onto this one. * Integrated after all vehicles executed their moves*/ - VehCont myVehBuffer; + FXSynchQue > myVehBuffer; /** @brief The vehicles which registered maneuvering into the lane within their current action step. * This is currently only relevant for sublane simulation, since continuous lanechanging @@ -1296,6 +1356,12 @@ /// @brief The current length of all vehicles on this lane, excluding their minGaps double myNettoVehicleLengthSum; + /// @brief The length of all vehicles that have left this lane in the current step (this lane, including their minGaps) + double myBruttoVehicleLengthSumToRemove; + + /// @brief The length of all vehicles that have left this lane in the current step (this lane, excluding their minGaps) + double myNettoVehicleLengthSumToRemove; + /** The lane's Links to it's succeeding lanes and the default right-of-way rule, i.e. blocked or not blocked. */ MSLinkCont myLinks; @@ -1308,8 +1374,6 @@ /// @brief followers on all sublanes as seen by vehicles on consecutive lanes (cached) mutable MSLeaderInfo myFollowerInfo; - mutable MSLeaderInfo myLeaderInfoTmp; - /// @brief time step for which myLeaderInfo was last updated mutable SUMOTime myLeaderInfoTime; /// @brief time step for which myFollowerInfo was last updated @@ -1335,12 +1399,17 @@ // @brief transient changes in permissions std::map myPermissionChanges; + // @brief index of the associated thread-rng + int myRNGIndex; + /// definition of the static dictionary type typedef std::map< std::string, MSLane* > DictType; /// Static dictionary to associate string-ids with objects. static DictType myDict; + static std::vector myRNGs; + private: /// @brief This lane's move reminder std::vector< MSMoveReminder* > myMoveReminders; @@ -1472,6 +1541,44 @@ const MSEdge* const myEdge; }; +#ifdef HAVE_FOX + /// Type of the function that is called for the simulation stage (e.g. planMovements). + typedef void(MSLane::*Operation)(const SUMOTime); + + /** + * @class SimulationTask + * @brief the routing task which mainly calls reroute of the vehicle + */ + class SimulationTask : public FXWorkerThread::Task { + public: + SimulationTask(MSLane& l, const SUMOTime time) + : myLane(l), myTime(time) {} + void init(Operation operation, const SUMOTime time) { + myOperation = operation; + myTime = time; + } + void run(FXWorkerThread* /*context*/) { + try { + (myLane.*(myOperation))(myTime); + } catch (ProcessError& e) { + WRITE_ERROR(e.what()); + } + } + private: + Operation myOperation; + MSLane& myLane; + SUMOTime myTime; + private: + /// @brief Invalidated assignment operator. + SimulationTask& operator=(const SimulationTask&) = delete; + }; + + SimulationTask mySimulationTask; + /// @brief Mutex for access to the cached leader info value + mutable FXMutex myLeaderInfoMutex; + /// @brief Mutex for access to the cached follower info value + mutable FXMutex myFollowerInfoMutex; +#endif private: /// @brief invalidated copy constructor MSLane(const MSLane&); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLeaderInfo.cpp sumo-1.2.0+dfsg1/src/microsim/MSLeaderInfo.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSLeaderInfo.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLeaderInfo.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -146,8 +146,9 @@ MSLeaderInfo::getSublaneBorders(int sublane, double latOffset, double& rightSide, double& leftSide) const { assert(sublane >= 0); assert(sublane < (int)myVehicles.size()); - rightSide = sublane * MSGlobals::gLateralResolution + latOffset; - leftSide = MIN2((sublane + 1) * MSGlobals::gLateralResolution, myWidth) + latOffset; + const double res = MSGlobals::gLateralResolution > 0 ? MSGlobals::gLateralResolution : myWidth; + rightSide = sublane * res + latOffset; + leftSide = MIN2((sublane + 1) * res, myWidth) + latOffset; } @@ -162,7 +163,7 @@ std::string MSLeaderInfo::toString() const { std::ostringstream oss; - oss.setf(std::ios::fixed , std::ios::floatfield); + oss.setf(std::ios::fixed, std::ios::floatfield); oss << std::setprecision(2); for (int i = 0; i < (int)myVehicles.size(); ++i) { oss << Named::getIDSecure(myVehicles[i]); @@ -204,6 +205,7 @@ myDistances(1, cLeaderDist.second) { assert(myVehicles.size() == 1); myVehicles[0] = cLeaderDist.first; + myHasVehicles = cLeaderDist.first != nullptr; } MSLeaderDistanceInfo::~MSLeaderDistanceInfo() { } @@ -268,7 +270,7 @@ std::string MSLeaderDistanceInfo::toString() const { std::ostringstream oss; - oss.setf(std::ios::fixed , std::ios::floatfield); + oss.setf(std::ios::fixed, std::ios::floatfield); oss << std::setprecision(2); for (int i = 0; i < (int)myVehicles.size(); ++i) { oss << Named::getIDSecure(myVehicles[i]) << ":"; @@ -386,7 +388,7 @@ std::string MSCriticalFollowerDistanceInfo::toString() const { std::ostringstream oss; - oss.setf(std::ios::fixed , std::ios::floatfield); + oss.setf(std::ios::fixed, std::ios::floatfield); oss << std::setprecision(2); for (int i = 0; i < (int)myVehicles.size(); ++i) { oss << Named::getIDSecure(myVehicles[i]) << ":"; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLeaderInfo.h sumo-1.2.0+dfsg1/src/microsim/MSLeaderInfo.h --- sumo-1.1.0+dfsg1/src/microsim/MSLeaderInfo.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLeaderInfo.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -97,6 +97,10 @@ return myHasVehicles; } + const std::vector& getVehicles() const { + return myVehicles; + } + /// @brief whether a stopped vehicle is leader bool hasStoppedVehicle() const; @@ -163,6 +167,10 @@ /// @brief print a debugging representation virtual std::string toString() const; + const std::vector& getDistances() const { + return myDistances; + } + protected: std::vector myDistances; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLinkCont.cpp sumo-1.2.0+dfsg1/src/microsim/MSLinkCont.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSLinkCont.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLinkCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLinkCont.h sumo-1.2.0+dfsg1/src/microsim/MSLinkCont.h --- sumo-1.1.0+dfsg1/src/microsim/MSLinkCont.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLinkCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLink.cpp sumo-1.2.0+dfsg1/src/microsim/MSLink.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSLink.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLink.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -45,6 +45,9 @@ //#define DEBUG_COND (myLane->getID()=="43[0]_0" && myLaneBefore->getID()==":33_0_0") //#define DEBUG_COND (myLane->getID()=="end_0") //#define DEBUG_COND (true) +//#define DEBUG_COND_ZIPPER (gDebugFlag1) +//#define DEBUG_COND_ZIPPER (true) +#define DEBUG_COND_ZIPPER (ego->isSelected()) // =========================================================================== // static member variables @@ -88,6 +91,7 @@ myGreenFraction(1), myLateralShift(0), myWalkingAreaFoe(nullptr), + myWalkingAreaFoeExit(nullptr), myHavePedestrianCrossingFoe(false), myParallelRight(nullptr), myParallelLeft(nullptr), @@ -196,6 +200,10 @@ // lane width affects the crossing point intersections1.back() -= (*it_lane)->getWidth() / 2; intersections2.back() -= lane->getWidth() / 2; + // ensure negative offset for weird geometries + intersections1.back() = MAX2(0.0, intersections1.back()); + intersections2.back() = MAX2(0.0, intersections2.back()); + // also length/geometry factor. (XXX: Why subtract width/2 *before* converting geometric position to lane pos? refs #3031) intersections1.back() = lane->interpolateGeometryPosToLanePos(intersections1.back()); intersections2.back() = (*it_lane)->interpolateGeometryPosToLanePos(intersections2.back()); @@ -343,10 +351,9 @@ return intersections.size() > 0; } return false; - - } + void MSLink::setApproaching(const SUMOVehicle* approaching, const SUMOTime arrivalTime, const double arrivalSpeed, const double leaveSpeed, const bool setRequest, const SUMOTime arrivalTimeBraking, const double arrivalSpeedBraking, const SUMOTime waitingTime, double dist) { @@ -359,9 +366,9 @@ } } #endif - myApproachingVehicles.insert(std::make_pair(approaching, - ApproachingVehicleInformation(arrivalTime, leaveTime, arrivalSpeed, leaveSpeed, setRequest, - arrivalTimeBraking, arrivalSpeedBraking, waitingTime, dist))); + myApproachingVehicles.emplace(approaching, + ApproachingVehicleInformation(arrivalTime, leaveTime, arrivalSpeed, leaveSpeed, setRequest, + arrivalTimeBraking, arrivalSpeedBraking, waitingTime, dist)); } @@ -376,7 +383,7 @@ } } #endif - myApproachingVehicles.insert(std::make_pair(approaching, ai)); + myApproachingVehicles.emplace(approaching, ai); } @@ -567,7 +574,7 @@ && (ego == nullptr || ego->getVehicleType().getParameter().getJMParam(SUMO_ATTR_JM_IGNORE_FOE_PROB, 0) == 0 || ego->getVehicleType().getParameter().getJMParam(SUMO_ATTR_JM_IGNORE_FOE_SPEED, 0) < it.first->getSpeed() - || ego->getVehicleType().getParameter().getJMParam(SUMO_ATTR_JM_IGNORE_FOE_PROB, 0) < RandHelper::rand()) + || ego->getVehicleType().getParameter().getJMParam(SUMO_ATTR_JM_IGNORE_FOE_PROB, 0) < RandHelper::rand(ego->getRNG())) && blockedByFoe(it.first, it.second, arrivalTime, leaveTime, arrivalSpeed, leaveSpeed, sameTargetLane, impatience, decel, waitingTime, ego)) { if (collectFoes == nullptr) { @@ -995,7 +1002,7 @@ continue; } // ignore foe vehicles that will not pass - if ((!cannotIgnore || leader->isStopped()) + if ((!cannotIgnore || leader->isStopped() || sameTarget) && !foeLane->getLinkCont()[0]->getApproaching(leader).willPass && leader->isFrontOnLane(foeLane) && !isOpposite @@ -1029,7 +1036,10 @@ gap = -1; // always break for vehicles which are on a continuation lane or for opposite-direction vehicles } else { if (gDebugFlag1) { - std::cout << " distToCrossing=" << distToCrossing << " leader back=" << leaderBack << " backDist=" << leaderBackDist << "\n"; + std::cout << " distToCrossing=" << distToCrossing << " leader back=" << leaderBack << " backDist=" << leaderBackDist + << " blockedStrategic=" << leader->getLaneChangeModel().isStrategicBlocked() + //<< " stateRight=" << toString((LaneChangeAction)leader->getLaneChangeModel().getSavedState(-1).second) + << "\n"; } if (leaderBackDist + foeCrossingWidth < 0) { // leader is completely past the crossing point @@ -1037,6 +1047,10 @@ continue; // next vehicle } gap = distToCrossing - ego->getVehicleType().getMinGap() - leaderBackDist - foeCrossingWidth; + if (gap < leader->getVehicleType().getLength() && leader->getLaneChangeModel().isStrategicBlocked()) { + // do not encroach on leader when it tries to change lanes + gap = -1; + } } // if the foe is already moving off the intersection, we may // advance up to the crossing point unless we have the same target or same source @@ -1049,7 +1063,7 @@ } } - if (ego != nullptr) { + if (ego != nullptr && MSNet::getInstance()->hasPersons()) { // check for crossing pedestrians (keep driving if already on top of the crossing const double distToPeds = distToCrossing - MSPModel::SAFETY_GAP; const double vehWidth = ego->getVehicleType().getWidth() + MSPModel::SAFETY_GAP; // + configurable safety gap @@ -1067,21 +1081,9 @@ } //std::cout << SIMTIME << " ego=" << Named::getIDSecure(ego) << " link=" << getViaLaneOrLane()->getID() << " myWalkingAreaFoe=" << Named::getIDSecure(myWalkingAreaFoe) << "\n"; - if (ego != nullptr && myWalkingAreaFoe != nullptr && myWalkingAreaFoe->getEdge().getPersons().size() > 0) { - // pedestrians may be on an arbitrary path across this - // walkingarea. make sure to keep enough distance. - // This is a simple but conservative solution that could be improved - // by ignoring pedestrians that are "obviously" not on a collision course - double distToPeds = std::numeric_limits::max(); - const std::set& persons = myWalkingAreaFoe->getEdge().getPersons(); - for (std::set::const_iterator it = persons.begin(); it != persons.end(); ++it) { - MSPerson* p = dynamic_cast(*it); - distToPeds = MIN2(distToPeds, ego->getPosition().distanceTo2D(p->getPosition()) - p->getVehicleType().getLength() - MSPModel::SAFETY_GAP); - if (collectBlockers != nullptr) { - collectBlockers->push_back(p); - } - } - result.push_back(LinkLeader((MSVehicle*)nullptr, -1, distToPeds)); + if (ego != nullptr) { + checkWalkingAreaFoe(ego, myWalkingAreaFoe, collectBlockers, result); + checkWalkingAreaFoe(ego, myWalkingAreaFoeExit, collectBlockers, result); } if (MSGlobals::gLateralResolution > 0 && ego != nullptr && !isShadowLink) { @@ -1134,6 +1136,29 @@ } +void +MSLink::checkWalkingAreaFoe(const MSVehicle* ego, const MSLane* foeLane, std::vector* collectBlockers, LinkLeaders& result) const { + if (foeLane != nullptr && foeLane->getEdge().getPersons().size() > 0) { + // pedestrians may be on an arbitrary path across this + // walkingarea. make sure to keep enough distance. + // This is a simple but conservative solution that could be improved + // by ignoring pedestrians that are "obviously" not on a collision course + double distToPeds = std::numeric_limits::max(); + for (MSTransportable* t : foeLane->getEdge().getPersons()) { + MSPerson* p = static_cast(t); + const double dist = ego->getPosition().distanceTo2D(p->getPosition()) - p->getVehicleType().getLength(); + if (p->getSpeed() > 0 || dist < MSPModel::SAFETY_GAP / 2) { + distToPeds = MIN2(distToPeds, dist - MSPModel::SAFETY_GAP); + if (collectBlockers != nullptr) { + collectBlockers->push_back(p); + } + } + } + result.push_back(LinkLeader((MSVehicle*)nullptr, -1, distToPeds)); + } +} + + MSLane* MSLink::getViaLaneOrLane() const { if (myInternalLane != nullptr) { @@ -1201,21 +1226,20 @@ const double secondsToArrival = STEPS2TIME(arrivalTime - now); if (secondsToArrival > ZIPPER_ADAPT_TIME && dist > ZIPPER_ADAPT_DIST) { #ifdef DEBUG_ZIPPER - if (gDebugFlag1) std::cout << SIMTIME << " getZipperSpeed ego=" << ego->getID() - << " dist=" << dist << " ignoring foes (arrival in " << STEPS2TIME(arrivalTime - now) << ")\n"; + if (DEBUG_COND_ZIPPER) std::cout << SIMTIME << " getZipperSpeed ego=" << ego->getID() + << " dist=" << dist << " ignoring foes (arrival in " << STEPS2TIME(arrivalTime - now) << ")\n"; #endif return vSafe; } #ifdef DEBUG_ZIPPER - if (gDebugFlag1) std::cout << SIMTIME << " getZipperSpeed ego=" << ego->getID() - << " egoAT=" << arrivalTime - << " dist=" << dist - << " vSafe=" << vSafe - << " numFoes=" << collectFoes->size() - << "\n"; + if (DEBUG_COND_ZIPPER) std::cout << SIMTIME << " getZipperSpeed ego=" << ego->getID() + << " egoAT=" << arrivalTime + << " dist=" << dist + << " vSafe=" << vSafe + << " numFoes=" << collectFoes->size() + << "\n"; #endif MSLink* foeLink = myFoeLinks[0]; - const double vSafeOrig = vSafe; for (std::vector::const_iterator i = collectFoes->begin(); i != collectFoes->end(); ++i) { const MSVehicle* foe = dynamic_cast(*i); assert(foe != 0); @@ -1227,37 +1251,89 @@ // resolve ties by lane index (avi.arrivalTime == arrivalTime && avi.dist == dist && ego->getLane()->getIndex() < foe->getLane()->getIndex())) { #ifdef DEBUG_ZIPPER - if (gDebugFlag1) std::cout - << " ignoring foe=" << foe->getID() - << " foeAT=" << avi.arrivalTime - << " foeDist=" << avi.dist - << " foeSpeed=" << foe->getSpeed() - << " egoSpeed=" << ego->getSpeed() - << " deltaDist=" << avi.dist - dist - << " delteSpeed=" << foe->getSpeed() - foe->getCarFollowModel().getMaxDecel() - ego->getSpeed() - << "\n"; + if (DEBUG_COND_ZIPPER) std::cout + << " ignoring foe=" << foe->getID() + << " foeAT=" << avi.arrivalTime + << " foeDist=" << avi.dist + << " foeSpeed=" << foe->getSpeed() + << " egoSpeed=" << ego->getSpeed() + << " deltaDist=" << avi.dist - dist + << " delteSpeed=" << foe->getSpeed() - foe->getCarFollowModel().getMaxDecel() - ego->getSpeed() + << "\n"; #endif continue; } + // the idea behind speed adaption is three-fold: + // 1) ego needs to be in a car-following relationship with foe eventually + // thus, the ego speed should be equal to the follow speed once the foe enters + // the zipper junction + // 2) ego vehicle needs to put a certain distance beteen himself and foe (safeGap) + // achieving this distance can be spread over time but computing + // safeGap is subject to estimation errors of future speeds + // 3) deceleration can be spread out over the time until true + // car-following happens, at the start of speed adaptions, smaller + // decelerations should be sufficient + + // we cannot trust avi.arrivalSpeed if the foe has leader vehicles that are accelerating + // lets try to extrapolate + const double uMax = foe->getLane()->getVehicleMaxSpeed(foe); + const double uAccel = foe->getCarFollowModel().estimateSpeedAfterDistance(avi.dist, foe->getSpeed(), foe->getCarFollowModel().getMaxAccel()); + const double uEnd = MIN2(uMax, uAccel); + const double uAvg = (foe->getSpeed() + uEnd) / 2; + const double tf0 = avi.dist / MAX2(NUMERICAL_EPS, uAvg); + const double tf = MAX2(1.0, ceil((tf0) / TS) * TS); + + const double vMax = ego->getLane()->getVehicleMaxSpeed(ego); + const double vAccel = ego->getCarFollowModel().estimateSpeedAfterDistance(dist, ego->getSpeed(), ego->getCarFollowModel().getMaxAccel()); + const double vEnd = MIN3(vMax, vAccel, uEnd); + const double vAvg = (ego->getSpeed() + vEnd) / 2; + const double te0 = dist / MAX2(NUMERICAL_EPS, vAvg); + const double te = MAX2(1.0, ceil((te0) / TS) * TS); + const double gap = dist - foe->getVehicleType().getLength() - ego->getVehicleType().getMinGap() - avi.dist; - const double follow = ego->getCarFollowModel().followSpeed( - ego, ego->getSpeed(), gap, foe->getSpeed(), foe->getCarFollowModel().getMaxDecel(), foe); - // speed adaption to follow the foe can be spread over secondsToArrival - const double followInTime = vSafeOrig + (follow - vSafeOrig) / MAX2(1.0, secondsToArrival); - vSafe = MIN2(vSafe, followInTime); + const double safeGap = ego->getCarFollowModel().getSecureGap(vEnd, uEnd, foe->getCarFollowModel().getMaxDecel()); + // round t to next step size + // increase gap to safeGap by the time foe reaches link + // gap + u*t - (t * v + a * t^2 / 2) = safeGap + const double deltaGap = gap + tf * uAvg - safeGap - vAvg * tf; + const double a = 2 * deltaGap / (tf * tf); + const double vSafeGap = ego->getSpeed() + ACCEL2SPEED(a); + const double vFollow = ego->getCarFollowModel().followSpeed( + ego, ego->getSpeed(), gap, foe->getSpeed(), foe->getCarFollowModel().getMaxDecel(), foe); + + // scale behavior based on ego time to link (te) + const double w = MIN2(1.0, te / 10); + const double maxDecel = w * ego->getCarFollowModel().getMaxDecel() + (1 - w) * ego->getCarFollowModel().getEmergencyDecel(); + const double vZipper = MAX3(vFollow, ego->getSpeed() - ACCEL2SPEED(maxDecel), w * vSafeGap + (1 - w) * vFollow); + + vSafe = MIN2(vSafe, vZipper); #ifdef DEBUG_ZIPPER - if (gDebugFlag1) std::cout << " adapting to foe=" << foe->getID() - << " foeDist=" << avi.dist - << " follow=" << follow - << " followInTime=" << followInTime - << " gap=" << gap - << " foeSpeed=" << foe->getSpeed() - << " follow=" << follow - << " foeAT=" << avi.arrivalTime - << " foeLT=" << avi.leavingTime - << " foeAS=" << avi.arrivalSpeed - << " vSafe=" << vSafe - << "\n"; + if (DEBUG_COND_ZIPPER) std::cout << " adapting to foe=" << foe->getID() + << " foeDist=" << avi.dist + << " foeSpeed=" << foe->getSpeed() + << " foeAS=" << avi.arrivalSpeed + << " egoSpeed=" << ego->getSpeed() + << " uMax=" << uMax + << " uAccel=" << uAccel + << " uEnd=" << uEnd + << " uAvg=" << uAvg + << " gap=" << gap + << " safeGap=" << safeGap + << "\n " + << " tf=" << tf + << " te=" << te + << " dg=" << deltaGap + << " aSafeGap=" << a + << " vMax=" << vMax + << " vAccel=" << vAccel + << " vEnd=" << vEnd + << " vSafeGap=" << vSafeGap + << " vFollow=" << vFollow + << " w=" << w + << " maxDecel=" << maxDecel + << " vZipper=" << vZipper + << " vSafe=" << vSafe + << "\n"; #endif } return vSafe; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLink.h sumo-1.2.0+dfsg1/src/microsim/MSLink.h --- sumo-1.1.0+dfsg1/src/microsim/MSLink.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLink.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -165,15 +165,23 @@ const std::vector& foeLinks, const std::vector& foeLanes, MSLane* internalLaneBefore = 0); - /// @brief add walkingarea as foe + /// @brief add walkingarea as foe (when entering the junction) void addWalkingAreaFoe(const MSLane* lane) { myWalkingAreaFoe = lane; } - /// @brief get walkingarea as foe + /// @brief add walkingarea as foe (when leaving the junction) + void addWalkingAreaFoeExit(const MSLane* lane) { + myWalkingAreaFoeExit = lane; + } + + /// @brief get walkingarea as foes const MSLane* getWalkingAreaFoe() { return myWalkingAreaFoe; } + const MSLane* getWalkingAreaFoeExit() { + return myWalkingAreaFoeExit; + } /** @brief Sets the information about an approaching vehicle * @@ -198,7 +206,7 @@ ApproachingVehicleInformation getApproaching(const SUMOVehicle* veh) const; /// @brief return all approaching vehicles - const std::map& getApproaching() const { + const std::map& getApproaching() const { return myApproachingVehicles; } @@ -427,6 +435,9 @@ */ LinkLeaders getLeaderInfo(const MSVehicle* ego, double dist, std::vector* collectBlockers = 0, bool isShadowLink = false) const; + /// @brief check for persons on walkingarea in the path of ego vehicle + void checkWalkingAreaFoe(const MSVehicle* ego, const MSLane* foeLane, std::vector* collectBlockers, LinkLeaders& result) const; + /// @brief return the speed at which ego vehicle must approach the zipper link double getZipperSpeed(const MSVehicle* ego, const double dist, double vSafe, SUMOTime arrivalTime, @@ -544,7 +555,7 @@ /// @brief The lane approaching this link MSLane* myLaneBefore; - std::map myApproachingVehicles; + std::map myApproachingVehicles; std::set myBlockedFoeLinks; /// @brief The position within this respond @@ -614,7 +625,11 @@ // TODO: documentation std::vector myFoeLinks; std::vector myFoeLanes; + + /// @brief walkingArea that must be checked when entering the intersection const MSLane* myWalkingAreaFoe; + /// @brief walkingArea that must be checked when leaving the intersection + const MSLane* myWalkingAreaFoeExit; /// @brief whether on of myFoeLanes is a crossing bool myHavePedestrianCrossingFoe; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLogicJunction.cpp sumo-1.2.0+dfsg1/src/microsim/MSLogicJunction.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSLogicJunction.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLogicJunction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSLogicJunction.h sumo-1.2.0+dfsg1/src/microsim/MSLogicJunction.h --- sumo-1.1.0+dfsg1/src/microsim/MSLogicJunction.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSLogicJunction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSMoveReminder.cpp sumo-1.2.0+dfsg1/src/microsim/MSMoveReminder.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSMoveReminder.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSMoveReminder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ void -MSMoveReminder::updateDetector(SUMOVehicle& veh, double entryPos, double leavePos, +MSMoveReminder::updateDetector(SUMOTrafficObject& veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp) { // each vehicle is tracked linearly across its segment. For each vehicle, @@ -50,7 +50,7 @@ if (entryTime > currentTime) { return; // calibrator may insert vehicles a tiny bit into the future; ignore those } - std::map >::iterator j = myLastVehicleUpdateValues.find(&veh); + auto j = myLastVehicleUpdateValues.find(&veh); if (j != myLastVehicleUpdateValues.end()) { // the vehicle already has reported its values before; use these // however, if this was called from prepareDetectorForWriting the time @@ -84,7 +84,7 @@ void -MSMoveReminder::removeFromVehicleUpdateValues(SUMOVehicle& veh) { +MSMoveReminder::removeFromVehicleUpdateValues(SUMOTrafficObject& veh) { myLastVehicleUpdateValues.erase(&veh); } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSMoveReminder.h sumo-1.2.0+dfsg1/src/microsim/MSMoveReminder.h --- sumo-1.1.0+dfsg1/src/microsim/MSMoveReminder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSMoveReminder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,7 +36,7 @@ // =========================================================================== // class declarations // =========================================================================== -class SUMOVehicle; +class SUMOTrafficObject; class MSLane; @@ -125,7 +125,7 @@ * @return True if vehicle enters the reminder. * @see Notification */ - virtual bool notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane) { + virtual bool notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane) { UNUSED_PARAMETER(reason); UNUSED_PARAMETER(&veh); UNUSED_PARAMETER(&enteredLane); @@ -146,7 +146,7 @@ * * @return True if vehicle hasn't passed the reminder completely. */ - virtual bool notifyMove(SUMOVehicle& veh, + virtual bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed) { @@ -171,7 +171,7 @@ * * @return True if the reminder wants to receive further info. */ - virtual bool notifyLeave(SUMOVehicle& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0) { + virtual bool notifyLeave(SUMOTrafficObject& veh, double lastPos, Notification reason, const MSLane* enteredLane = 0) { UNUSED_PARAMETER(&veh); UNUSED_PARAMETER(lastPos); UNUSED_PARAMETER(reason); @@ -181,7 +181,7 @@ // TODO: Documentation - void updateDetector(SUMOVehicle& veh, double entryPos, double leavePos, + void updateDetector(SUMOTrafficObject& veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp); @@ -203,7 +203,7 @@ * @param[in] travelledDistanceVehicleOnLane distance travelled while front was on the lane. * @param[in] meanLengthOnLane the average length of the vehicle's part on the lane during the last step (==complete length in meso case) */ - virtual void notifyMoveInternal(const SUMOVehicle& veh, + virtual void notifyMoveInternal(const SUMOTrafficObject& veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, @@ -230,7 +230,7 @@ } protected: - void removeFromVehicleUpdateValues(SUMOVehicle& veh); + void removeFromVehicleUpdateValues(SUMOTrafficObject& veh); protected: @@ -240,7 +240,7 @@ std::string myDescription; private: - std::map > myLastVehicleUpdateValues; + std::map > myLastVehicleUpdateValues; private: diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSNet.cpp sumo-1.2.0+dfsg1/src/microsim/MSNet.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSNet.cpp 2018-11-22 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSNet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -58,11 +58,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -89,11 +89,13 @@ #include #include #include +#include #include "MSTransportableControl.h" #include "MSEdgeControl.h" #include "MSJunctionControl.h" #include "MSInsertionControl.h" +#include "MSDynamicShapeUpdater.h" #include "MSEventControl.h" #include "MSEdge.h" #include "MSJunction.h" @@ -169,6 +171,20 @@ throw ProcessError("A network was not yet constructed."); } +void +MSNet::initStatic() { + if (!MSGlobals::gUseMesoSim) { + MSVehicle::Influencer::init(); + } +} + +void +MSNet::cleanupStatic() { + if (!MSGlobals::gUseMesoSim) { + MSVehicle::Influencer::cleanup(); + } +} + MSNet::MSNet(MSVehicleControl* vc, MSEventControl* beginOfTimestepEvents, MSEventControl* endOfTimestepEvents, @@ -179,9 +195,12 @@ myHavePermissions(false), myHasInternalLinks(false), myHasElevation(false), + myHasPedestrianNetwork(false), + myEdgeDataEndTime(-1), myRouterTT(nullptr), myRouterEffort(nullptr), - myPedestrianRouter(nullptr) { + myPedestrianRouter(nullptr), + myDynamicShapeUpdater(nullptr) { if (myInstance != nullptr) { throw ProcessError("A network was already constructed."); } @@ -212,6 +231,7 @@ MSGlobals::gMesoNet = new MELoop(string2time(oc.getString("meso-recheck"))); } myInstance = this; + initStatic(); } @@ -236,9 +256,6 @@ myStateDumpPrefix = oc.getString("save-state.prefix"); myStateDumpSuffix = oc.getString("save-state.suffix"); - // set requests/responses - myJunctions->postloadInitContainer(); - // initialise performance computation mySimBeginMillis = SysUtils::getCurrentMillis(); myHasInternalLinks = hasInternalLinks; @@ -246,12 +263,14 @@ WRITE_WARNING("Opposite direction driving does not work together with the sublane model."); } myHasElevation = checkElevation(); + myHasPedestrianNetwork = checkWalkingarea(); myLefthand = lefthand; myVersion = version; } MSNet::~MSNet() { + cleanupStatic(); // delete controls delete myJunctions; delete myDetectorControl; @@ -372,13 +391,13 @@ msg << "Performance: " << "\n" << " Duration: " << duration << "ms" << "\n"; if (duration != 0) { msg << " Real time factor: " << (STEPS2TIME(myStep - start) * 1000. / (double)duration) << "\n"; - msg.setf(std::ios::fixed , std::ios::floatfield); // use decimal format + msg.setf(std::ios::fixed, std::ios::floatfield); // use decimal format msg.setf(std::ios::showpoint); // print decimal point msg << " UPS: " << ((double)myVehiclesMoved / ((double)duration / 1000)) << "\n"; } // print vehicle statistics const std::string discardNotice = ((myVehicleControl->getLoadedVehicleNo() != myVehicleControl->getDepartedVehicleNo()) ? - " (Loaded: " + toString(myVehicleControl->getLoadedVehicleNo()) + ")" : ""); + " (Loaded: " + toString(myVehicleControl->getLoadedVehicleNo()) + ")" : ""); msg << "Vehicles: " << "\n" << " Inserted: " << myVehicleControl->getDepartedVehicleNo() << discardNotice << "\n" << " Running: " << myVehicleControl->getRunningVehicleNo() << "\n" @@ -467,7 +486,7 @@ mySimStepDuration = SysUtils::getCurrentMillis(); } // simulation state output - std::vector::iterator timeIt = find(myStateDumpTimes.begin(), myStateDumpTimes.end(), myStep); + std::vector::iterator timeIt = std::find(myStateDumpTimes.begin(), myStateDumpTimes.end(), myStep); if (timeIt != myStateDumpTimes.end()) { const int dist = (int)distance(myStateDumpTimes.begin(), timeIt); MSStateHandler::saveState(myStateDumpFiles[dist], myStep); @@ -487,6 +506,7 @@ if (MSGlobals::gUseMesoSim) { MSGlobals::gMesoNet->simulate(myStep); + myVehicleControl->removePending(); } else { // assure all lanes with vehicles are 'active' myEdges->patchActiveLanes(); @@ -563,7 +583,7 @@ if (TraCIServer::getInstance() != nullptr && !TraCIServer::getInstance()->getLoadArgs().empty()) { return SIMSTATE_LOADING; } - if ((stopTime < 0 || myStep > stopTime) && TraCIServer::getInstance() == nullptr) { + if ((stopTime < 0 || myStep > stopTime) && TraCIServer::getInstance() == nullptr && (stopTime > 0 || myStep > myEdgeDataEndTime)) { if ((myVehicleControl->getActiveVehicleCount() == 0) && (myInserter->getPendingFlowCount() == 0) && (myPersonControl == nullptr || !myPersonControl->hasNonWaiting()) @@ -717,9 +737,12 @@ od.writeAttr("running", myVehicleControl->getRunningVehicleNo()); od.writeAttr("waiting", myInserter->getWaitingVehicleNo()); od.writeAttr("ended", myVehicleControl->getEndedVehicleNo()); + od.writeAttr("arrived", myVehicleControl->getArrivedVehicleNo()); + od.writeAttr("collisions", myVehicleControl->getCollisionCount()); + od.writeAttr("teleports", myVehicleControl->getTeleportCount()); + od.writeAttr("halting", myVehicleControl->getHaltingVehicleNo()); od.writeAttr("meanWaitingTime", meanWaitingTime); od.writeAttr("meanTravelTime", meanTravelTime); - od.writeAttr("halting", myVehicleControl->getHaltingVehicleNo()); std::pair meanSpeed = myVehicleControl->getVehicleMeanSpeeds(); od.writeAttr("meanSpeed", meanSpeed.first); od.writeAttr("meanSpeedRelative", meanSpeed.second); @@ -788,6 +811,11 @@ return *myContainerControl; } +MSDynamicShapeUpdater* +MSNet::makeDynamicShapeUpdater() { + myDynamicShapeUpdater = std::unique_ptr (new MSDynamicShapeUpdater(MSNet::getInstance()->getShapeContainer())); + return myDynamicShapeUpdater.get(); +} MSEdgeWeightsStorage& MSNet::getWeightsStorage() { @@ -808,7 +836,7 @@ MSNet::postSimStepOutput() const { if (myLogExecutionTime) { std::ostringstream oss; - oss.setf(std::ios::fixed , std::ios::floatfield); // use decimal format + oss.setf(std::ios::fixed, std::ios::floatfield); // use decimal format oss.setf(std::ios::showpoint); // print decimal point oss << std::setprecision(gPrecision); if (mySimStepDuration != 0) { @@ -828,7 +856,7 @@ << " BUF " << myInserter->getWaitingVehicleNo() << ") "; std::string prev = "Step #" + time2string(myStep - DELTA_T); - std::cout << oss.str().substr(0, 78 - prev.length()); + std::cout << oss.str().substr(0, 90 - prev.length()); } std::cout << '\r'; } @@ -844,7 +872,7 @@ void MSNet::removeVehicleStateListener(VehicleStateListener* listener) { - std::vector::iterator i = find(myVehicleStateListeners.begin(), myVehicleStateListeners.end(), listener); + std::vector::iterator i = std::find(myVehicleStateListeners.begin(), myVehicleStateListeners.end(), listener); if (i != myVehicleStateListeners.end()) { myVehicleStateListeners.erase(i); } @@ -888,6 +916,16 @@ } +const NamedObjectCont& +MSNet::getStoppingPlaces(SumoXMLTag category) const { + auto it = myStoppingPlaces.find(category); + if (it != myStoppingPlaces.end()) { + return it->second; + } else { + throw ProcessError("No stoppingPlace of type '" + toString(category) + "' found"); + } +} + void MSNet::writeChargingStationOutput() const { if (myStoppingPlaces.count(SUMO_TAG_CHARGING_STATION) > 0) { @@ -954,9 +992,8 @@ } } const std::string routingAlgorithm = OptionsCont::getOptions().getString("routing-algorithm"); - if (routingMode == ROUTING_MODE_COMBINED) { - // replace nullptr here by your EffortCalculator - myIntermodalRouter[routingMode] = new MSIntermodalRouter(MSNet::adaptIntermodalRouter, carWalk, routingAlgorithm, routingMode, nullptr); + if (routingMode == libsumo::ROUTING_MODE_COMBINED) { + myIntermodalRouter[routingMode] = new MSIntermodalRouter(MSNet::adaptIntermodalRouter, carWalk, routingAlgorithm, routingMode, new FareModul()); } else { myIntermodalRouter[routingMode] = new MSIntermodalRouter(MSNet::adaptIntermodalRouter, carWalk, routingAlgorithm, routingMode); } @@ -973,29 +1010,24 @@ const MSEdge* const edge = &i.second->getLane().getEdge(); router.getNetwork()->addAccess(i.first, edge, i.second->getAccessPos(edge), i.second->getAccessDistance(edge), SUMO_TAG_PARKING_AREA); } + EffortCalculator* const external = router.getExternalEffort(); // add access to all public transport stops for (const auto& i : myInstance->myStoppingPlaces[SUMO_TAG_BUS_STOP]) { const MSEdge* const edge = &i.second->getLane().getEdge(); - router.getNetwork()->addAccess(i.first, edge, i.second->getAccessPos(edge), i.second->getAccessDistance(edge), SUMO_TAG_BUS_STOP); + router.getNetwork()->addAccess(i.first, edge, i.second->getAccessPos(edge), + i.second->getAccessDistance(edge), SUMO_TAG_BUS_STOP); for (const auto& a : i.second->getAllAccessPos()) { router.getNetwork()->addAccess(i.first, &std::get<0>(a)->getEdge(), std::get<1>(a), std::get<2>(a), SUMO_TAG_BUS_STOP); } + if (external != nullptr) { + external->addStop(router.getNetwork()->getStopEdge(i.first)->getNumericalID(), *i.second); + } } myInstance->getInsertionControl().adaptIntermodalRouter(router); myInstance->getVehicleControl().adaptIntermodalRouter(router); } -const NamedRTree& -MSNet::getLanesRTree() const { - if (!myLanesRTree.first) { - MSLane::fill(myLanesRTree.second); - myLanesRTree.first = true; - } - return myLanesRTree.second; -} - - bool MSNet::checkElevation() { const MSEdgeVector& edges = myEdges->getEdges(); @@ -1011,6 +1043,17 @@ bool +MSNet::checkWalkingarea() { + for (const MSEdge* e : myEdges->getEdges()) { + if (e->getFunction() == EDGEFUNC_WALKINGAREA) { + return true; + } + } + return false; +} + + +bool MSNet::warnOnce(const std::string& typeAndID) { if (myWarnedOnce.find(typeAndID) == myWarnedOnce.end()) { myWarnedOnce[typeAndID] = true; @@ -1019,4 +1062,5 @@ return false; } + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSNet.h sumo-1.2.0+dfsg1/src/microsim/MSNet.h --- sumo-1.1.0+dfsg1/src/microsim/MSNet.h 2018-11-22 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSNet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -15,6 +15,7 @@ /// @author Eric Nicolay /// @author Clemens Honomichl /// @author Michael Behrisch +/// @author Leonhard Luecken /// @date Mon, 12 Mar 2001 /// @version $Id$ /// @@ -37,11 +38,12 @@ #include #include #include +#include #include #include #include #include -#include +#include #include #include "MSJunction.h" @@ -64,6 +66,8 @@ class MSTrafficLightLogic; class MSDetectorControl; class ShapeContainer; +class MSDynamicShapeUpdater; +class PolygonDynamics; class BinaryInputDevice; class MSEdgeWeightsStorage; class SUMOVehicle; @@ -116,6 +120,19 @@ */ static MSNet* getInstance(); + /** + * @brief Returns whether this is a GUI Net + */ + virtual bool isGUINet() const { + return false; + } + + /// @brief Place for static initializations of simulation components (called after successful net build) + static void initStatic(); + + /// @brief Place for static initializations of simulation components (called after successful net build) + static void cleanupStatic(); + /** @brief Returns whether the network was already constructed * @return whether the network was already constructed @@ -440,6 +457,18 @@ return *myShapeContainer; } + /** @brief Returns the dynamic shapes updater + * @see PolygonDynamics + */ + MSDynamicShapeUpdater* getDynamicShapeUpdater() { + return myDynamicShapeUpdater.get(); + } + + /** @brief Creates and returns a dynamic shapes updater + * @see PolygonDynamics + */ + MSDynamicShapeUpdater* makeDynamicShapeUpdater(); + /** @brief Returns the net's internal edge travel times/efforts container * * If the net does not have such a container, it is built. @@ -480,6 +509,7 @@ std::string getStoppingPlaceID(const MSLane* lane, const double pos, const SumoXMLTag category) const; /// @} + const NamedObjectCont& getStoppingPlaces(SumoXMLTag category) const; /// @brief write charging station output void writeChargingStationOutput() const; @@ -487,6 +517,11 @@ /// @brief creates a wrapper for the given logic (see GUINet) virtual void createTLWrapper(MSTrafficLightLogic*) {}; + /// @brief return wheter the given logic (or rather it's wrapper) is selected in the GUI + virtual bool isSelected(const MSTrafficLightLogic*) const { + return false; + } + /// @name Notification about vehicle state changes /// @{ @@ -596,11 +631,6 @@ static void adaptIntermodalRouter(MSIntermodalRouter& router); - /** @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; @@ -611,6 +641,11 @@ return myHasElevation; } + /// @brief return whether the network contains walkingareas and crossings + bool hasPedestrianNetwork() const { + return myHasPedestrianNetwork; + } + /// @brief return whether the network was built for lefthand traffic bool lefthand() const { return myLefthand; @@ -636,6 +671,8 @@ /// @brief check all lanes for elevation data bool checkElevation(); + /// @brief check all lanes for type walkingArea + bool checkWalkingarea(); protected: /// @brief Unique instance of MSNet @@ -737,12 +774,18 @@ /// @brief Whether the network contains elevation data bool myHasElevation; + /// @brief Whether the network contains pedestrian network elements + bool myHasPedestrianNetwork; + /// @brief Whether the network was built for left-hand traffic bool myLefthand; /// @brief the network version double myVersion; + /// @brief end of loaded edgeData + SUMOTime myEdgeDataEndTime; + /// @brief Dictionary of bus / container stops std::map > myStoppingPlaces; @@ -761,10 +804,14 @@ mutable MSPedestrianRouter* myPedestrianRouter; mutable std::map myIntermodalRouter; - /// @brief An RTree structure holding lane IDs mutable std::pair myLanesRTree; + /// @brief Updater for dynamic shapes that are tracking traffic objects + /// (ensures removal of shape dynamics when the objects are removed) + /// @see utils/shapes/PolygonDynamics + std::unique_ptr myDynamicShapeUpdater; + /// @brief string constants for simstep stages static const std::string STAGE_EVENTS; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSNoLogicJunction.cpp sumo-1.2.0+dfsg1/src/microsim/MSNoLogicJunction.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSNoLogicJunction.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSNoLogicJunction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSNoLogicJunction.h sumo-1.2.0+dfsg1/src/microsim/MSNoLogicJunction.h --- sumo-1.1.0+dfsg1/src/microsim/MSNoLogicJunction.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSNoLogicJunction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSParkingArea.cpp sumo-1.2.0+dfsg1/src/microsim/MSParkingArea.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSParkingArea.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSParkingArea.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2015-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2015-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -53,10 +53,10 @@ myWidth(width), myLength(length), myAngle(angle), + myEgressBlocked(false), myReservationTime(-1), myReservations(0), - myReservationMaxLength(0) -{ + myReservationMaxLength(0) { // initialize unspecified defaults if (myWidth == 0) { myWidth = SUMO_const_laneWidth; @@ -80,9 +80,9 @@ const Position s = myShape.positionAtOffset(spaceDim * (i + 1)); Position pos = myAngle == 0 ? s : (f + s) * 0.5; addLotEntry(pos.x(), pos.y(), pos.z(), - myWidth, myLength, - ((double) atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double) M_PI) + myAngle); - mySpaceOccupancies.back().myEndPos = myBegPos + spaceDim * (i + 1); + myWidth, myLength, + ((double) atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double) M_PI) + myAngle); + mySpaceOccupancies.back().myEndPos = myBegPos + MAX2(POSITION_EPS, spaceDim * (i + 1)); } computeLastFreePos(); } @@ -110,7 +110,7 @@ double MSParkingArea::getLastFreePos(const SUMOVehicle& forVehicle) const { - if (myCapacity == getOccupancy()) { + if (myCapacity == (int)myEndPositions.size()) { // keep enough space so that parking vehicles can leave return myLastFreePos - forVehicle.getVehicleType().getMinGap() - POSITION_EPS; } else { @@ -143,12 +143,11 @@ void MSParkingArea::enter(SUMOVehicle* what, double beg, double end) { - if (myLastFreeLot >= 0) { - assert(myLastFreeLot < (int)mySpaceOccupancies.size()); - mySpaceOccupancies[myLastFreeLot].vehicle = what; - myEndPositions[what] = std::pair(beg, end); - computeLastFreePos(); - } + assert(myLastFreePos >= 0); + assert(myLastFreeLot < (int)mySpaceOccupancies.size()); + mySpaceOccupancies[myLastFreeLot].vehicle = what; + myEndPositions[what] = std::pair(beg, end); + computeLastFreePos(); } @@ -170,32 +169,47 @@ MSParkingArea::computeLastFreePos() { myLastFreeLot = -1; myLastFreePos = myBegPos; + myEgressBlocked = false; for (auto& lsd : mySpaceOccupancies) { - if (lsd.vehicle == nullptr) { - myLastFreeLot = lsd.index; - myLastFreePos = lsd.myEndPos; + if (lsd.vehicle == nullptr + || (getOccupancy() == getCapacity() + && lsd.vehicle->remainingStopDuration() <= 0 + && !lsd.vehicle->isStoppedTriggered())) { + if (lsd.vehicle == nullptr) { + myLastFreeLot = lsd.index; + myLastFreePos = lsd.myEndPos; + } else { + // vehicle wants to exit the parking area + myLastFreeLot = lsd.index; + myLastFreePos = lsd.myEndPos - lsd.vehicle->getVehicleType().getLength() - POSITION_EPS; + myEgressBlocked = true; + } break; } else { - myLastFreePos = MIN2(myLastFreePos, - lsd.myEndPos - lsd.vehicle->getVehicleType().getLength() - NUMERICAL_EPS); + myLastFreePos = MIN2(myLastFreePos, + lsd.myEndPos - lsd.vehicle->getVehicleType().getLength() - NUMERICAL_EPS); } } } -double +double MSParkingArea::getLastFreePosWithReservation(SUMOTime t, const SUMOVehicle& forVehicle) { if (forVehicle.getLane() != &myLane) { // for different lanes, do not consider reservations to avoid lane-order // dependency in parallel simulation #ifdef DEBUG_RESERVATIONS - if (DEBUG_COND2(forVehicle)) std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() << " other lane\n"; + if (DEBUG_COND2(forVehicle)) { + std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() << " other lane\n"; + } #endif return getLastFreePos(forVehicle); } if (t > myReservationTime) { #ifdef DEBUG_RESERVATIONS - if (DEBUG_COND2(forVehicle)) std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() << " first reservation\n"; + if (DEBUG_COND2(forVehicle)) { + std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() << " first reservation\n"; + } #endif myReservationTime = t; myReservations = 1; @@ -209,22 +223,24 @@ } else { if (myCapacity > getOccupancy() + myReservations) { #ifdef DEBUG_RESERVATIONS - if (DEBUG_COND2(forVehicle)) std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() << " res=" << myReservations << " enough space\n"; + if (DEBUG_COND2(forVehicle)) { + std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() << " res=" << myReservations << " enough space\n"; + } #endif myReservations++; myReservationMaxLength = MAX2(myReservationMaxLength, forVehicle.getVehicleType().getLength()); return getLastFreePos(forVehicle); - } else{ + } else { if (myCapacity == 0) { return getLastFreePos(forVehicle); } else { #ifdef DEBUG_RESERVATIONS - if (DEBUG_COND2(forVehicle)) std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() - << " res=" << myReservations << " resTime=" << myReservationTime << " reserved full, maxLen=" << myReservationMaxLength << " endPos=" << mySpaceOccupancies[0].myEndPos << "\n"; + if (DEBUG_COND2(forVehicle)) std::cout << SIMTIME << " pa=" << getID() << " freePosRes veh=" << forVehicle.getID() + << " res=" << myReservations << " resTime=" << myReservationTime << " reserved full, maxLen=" << myReservationMaxLength << " endPos=" << mySpaceOccupancies[0].myEndPos << "\n"; #endif - return (mySpaceOccupancies[0].myEndPos - - myReservationMaxLength - - forVehicle.getVehicleType().getMinGap() + return (mySpaceOccupancies[0].myEndPos + - myReservationMaxLength + - forVehicle.getVehicleType().getMinGap() - NUMERICAL_EPS); } } @@ -258,8 +274,12 @@ int MSParkingArea::getOccupancy() const { - return (int)myEndPositions.size(); + return (int)myEndPositions.size() - (myEgressBlocked ? 1 : 0); } +void +MSParkingArea::notifyEgressBlocked() { + computeLastFreePos(); +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSParkingArea.h sumo-1.2.0+dfsg1/src/microsim/MSParkingArea.h --- sumo-1.1.0+dfsg1/src/microsim/MSParkingArea.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSParkingArea.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2015-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2015-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -167,7 +167,7 @@ * @return Whether the lot entry could be added */ virtual void addLotEntry(double x, double y, double z, - double width, double length, double angle); + double width, double length, double angle); /** @brief Returns the lot rectangle width @@ -190,6 +190,10 @@ */ double getAngle() const; + + /// @brief update state so that vehicles wishing to enter cooperate with exiting vehicles + void notifyEgressBlocked(); + protected: /** @struct LotSpaceDefinition @@ -246,6 +250,9 @@ /// @brief The roadside shape of this parkingArea PositionVector myShape; + /// @brief whether a vehicle wants to exit but is blocked + bool myEgressBlocked; + /// @brief track parking reservations from the lane for the current time step SUMOTime myReservationTime; int myReservations; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSRightOfWayJunction.cpp sumo-1.2.0+dfsg1/src/microsim/MSRightOfWayJunction.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSRightOfWayJunction.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSRightOfWayJunction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -156,6 +156,12 @@ MSLink* exitLink = (*j)->getViaLane()->getLinkCont()[0]; exitLink->setRequestInformation((int)requestPos, false, false, std::vector(), myLinkFoeInternalLanes[*j], (*j)->getViaLane()); + for (const auto& ili : exitLink->getLane()->getIncomingLanes()) { + if (ili.lane->getEdge().isWalkingArea()) { + exitLink->addWalkingAreaFoeExit(ili.lane); + break; + } + } } // the exit link for a crossing is needed for the pedestrian model if (MSGlobals::gUsingInternalLanes && (*j)->getLane()->getEdge().isCrossing()) { diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSRightOfWayJunction.h sumo-1.2.0+dfsg1/src/microsim/MSRightOfWayJunction.h --- sumo-1.1.0+dfsg1/src/microsim/MSRightOfWayJunction.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSRightOfWayJunction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSRoute.cpp sumo-1.2.0+dfsg1/src/microsim/MSRoute.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSRoute.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSRoute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,7 +52,7 @@ MSRoute::MSRoute(const std::string& id, const ConstMSEdgeVector& edges, const bool isPermanent, const RGBColor* const c, - const std::vector& stops) : + const std::vector& stops) : Named(id), myEdges(edges), myAmPermanent(isPermanent), myReferenceCounter(isPermanent ? 1 : 0), myColor(c), @@ -276,11 +276,20 @@ double MSRoute::getDistanceBetween(double fromPos, double toPos, const MSEdge* fromEdge, const MSEdge* toEdge, bool includeInternal, int routePosition) const { + //std::cout << SIMTIME << " getDistanceBetween from=" << fromEdge->getID() << " to=" << toEdge->getID() << " fromPos=" << fromPos << " toPos=" << toPos << " includeInternal=" << includeInternal << "\n"; if (routePosition < 0 || routePosition >= (int)myEdges.size()) { throw ProcessError("Invalid routePosition " + toString(routePosition) + " for route with " + toString(myEdges.size()) + " edges"); } - /// XXX routes that start and end within the same intersection are not supported - //std::cout << SIMTIME << " getDistanceBetween from=" << fromEdge->getID() << " to=" << toEdge->getID() << " fromPos=" << fromPos << " toPos=" << toPos << " includeInternal=" << includeInternal << "\n"; + if (fromEdge->isInternal() && toEdge->isInternal() && fromEdge->getToJunction() == toEdge->getToJunction()) { + // internal edges within the same junction + if (fromEdge == toEdge) { + if (fromPos <= toPos) { + return toPos - fromPos; + } + } else if (fromEdge->getSuccessors().front() == toEdge) { + return fromEdge->getLength() - fromPos + toPos; + } + } if (fromEdge->isInternal()) { if (fromEdge == myEdges.front()) { const MSEdge* succ = fromEdge->getSuccessors().front(); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSRoute.h sumo-1.2.0+dfsg1/src/microsim/MSRoute.h --- sumo-1.1.0+dfsg1/src/microsim/MSRoute.h 2018-10-07 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSRoute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSRouteHandler.cpp sumo-1.2.0+dfsg1/src/microsim/MSRouteHandler.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSRouteHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSRouteHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -44,15 +44,15 @@ #include #include #include -#include -#include +#include +#include #include "MSNet.h" #include "MSParkingArea.h" #include "MSStoppingPlace.h" #include #include -#include +#include // =========================================================================== @@ -156,6 +156,7 @@ try { switch (element) { case SUMO_TAG_PERSON: + case SUMO_TAG_PERSONFLOW: if (!MSNet::getInstance()->getVehicleControl().hasVType(myVehicleParameter->vtypeid)) { const std::string error = "The type '" + myVehicleParameter->vtypeid + "' for person '" + myVehicleParameter->id + "' is not known."; delete myVehicleParameter; @@ -196,7 +197,7 @@ } if (myActivePlan->empty()) { myActivePlan->push_back(new MSTransportable::Stage_Waiting( - from, -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start", true)); + from, nullptr, -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start", true)); } } else if (myActivePlan->empty()) { throw ProcessError("The start edge for person '" + pid + "' is not known."); @@ -241,7 +242,7 @@ } if (myActiveContainerPlan->empty()) { myActiveContainerPlan->push_back(new MSTransportable::Stage_Waiting( - from, -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start", true)); + from, nullptr, -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start", true)); } } else if (myActiveContainerPlan->empty()) { throw ProcessError("The start edge within a transport of container '" + containerId + "' is not known."); @@ -317,7 +318,7 @@ } if (myActiveContainerPlan->empty()) { myActiveContainerPlan->push_back(new MSTransportable::Stage_Waiting( - myActiveRoute.front(), -1, myVehicleParameter->depart, departPos, "start", true)); + myActiveRoute.front(), nullptr, -1, myVehicleParameter->depart, departPos, "start", true)); } myActiveContainerPlan->push_back(new MSContainer::MSContainerStage_Tranship(myActiveRoute, cs, speed, departPos, arrivalPos)); myActiveRoute.clear(); @@ -427,37 +428,7 @@ void -MSRouteHandler::myEndElement(int element) { - SUMORouteHandler::myEndElement(element); - switch (element) { - case SUMO_TAG_VTYPE: { - MSVehicleType* vehType = MSVehicleType::build(*myCurrentVType); - delete myCurrentVType; - myCurrentVType = nullptr; - if (!MSNet::getInstance()->getVehicleControl().addVType(vehType)) { - const std::string id = vehType->getID(); - delete vehType; - if (!MSGlobals::gStateLoaded) { - throw ProcessError("Another vehicle type (or distribution) with the id '" + id + "' exists."); - } - } else { - if (myCurrentVTypeDistribution != nullptr) { - myCurrentVTypeDistribution->add(vehType, vehType->getDefaultProbability()); - } - } - } - break; - case SUMO_TAG_TRIP: - myVehicleParameter->parametersSet |= VEHPARS_FORCE_REROUTE; - closeRoute(true); - closeVehicle(); - delete myVehicleParameter; - myVehicleParameter = nullptr; - myInsertStopEdgesAt = -1; - break; - default: - break; - } +MSRouteHandler::openTrip(const SUMOSAXAttributes& /*attrs*/) { } @@ -747,6 +718,94 @@ myActivePlan = nullptr; } + +void +MSRouteHandler::closePersonFlow() { + if (myActivePlan->size() == 0) { + const std::string error = "personFlow '" + myVehicleParameter->id + "' has no plan."; + delete myVehicleParameter; + myVehicleParameter = nullptr; + deleteActivePlans(); + throw ProcessError(error); + } + // let's check whether this person had to depart before the simulation starts + if (!(myAddVehiclesDirectly || checkLastDepart()) + || (myVehicleParameter->depart < string2time(OptionsCont::getOptions().getString("begin")) && !myAmLoadingState)) { + delete myVehicleParameter; + myVehicleParameter = nullptr; + deleteActivePlans(); + return; + } + // type existence has been checked on opening + MSVehicleType* type = MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid, &myParsingRNG); + // instantiate all persons of this flow + int i = 0; + registerLastDepart(); + std::string baseID = myVehicleParameter->id; + if (myVehicleParameter->repetitionProbability > 0) { + if (myVehicleParameter->repetitionEnd == SUMOTime_MAX) { + throw ProcessError("probabilistic personFlow '" + myVehicleParameter->id + "' must specify end time"); + } else { + for (SUMOTime t = myVehicleParameter->depart; t < myVehicleParameter->repetitionEnd; t += TIME2STEPS(1)) { + if (RandHelper::rand(&myParsingRNG) < myVehicleParameter->repetitionProbability) { + addFlowPerson(t, type, baseID, i++); + } + } + } + } else { + SUMOTime depart = myVehicleParameter->depart; + for (; i < myVehicleParameter->repetitionNumber; i++) { + addFlowPerson(depart, type, baseID, i); + depart += myVehicleParameter->repetitionOffset; + } + } + + myVehicleParameter = nullptr; + myActivePlan = nullptr; +} + +void +MSRouteHandler::addFlowPerson(SUMOTime depart, MSVehicleType* type, const std::string& baseID, int i) { + if (i > 0) { + // copy parameter and plan because the person takes over responsibility + SUMOVehicleParameter* copyParam = new SUMOVehicleParameter(); + *copyParam = *myVehicleParameter; + myVehicleParameter = copyParam; + MSTransportable::MSTransportablePlan* copyPlan = new MSTransportable::MSTransportablePlan(); + for (MSTransportable::Stage* s : *myActivePlan) { + copyPlan->push_back(s->clone()); + } + myActivePlan = copyPlan; + } + myVehicleParameter->id = baseID + "." + toString(i); + myVehicleParameter->depart = depart; + MSTransportable* person = MSNet::getInstance()->getPersonControl().buildPerson(myVehicleParameter, type, myActivePlan, &myParsingRNG); + if (!MSNet::getInstance()->getPersonControl().add(person)) { + ProcessError error("Another person with the id '" + myVehicleParameter->id + "' exists."); + delete person; + throw error; + } +} + +void +MSRouteHandler::closeVType() { + MSVehicleType* vehType = MSVehicleType::build(*myCurrentVType); + delete myCurrentVType; + myCurrentVType = nullptr; + if (!MSNet::getInstance()->getVehicleControl().addVType(vehType)) { + const std::string id = vehType->getID(); + delete vehType; + if (!MSGlobals::gStateLoaded) { + throw ProcessError("Another vehicle type (or distribution) with the id '" + id + "' exists."); + } + } else { + if (myCurrentVTypeDistribution != nullptr) { + myCurrentVTypeDistribution->add(vehType, vehType->getDefaultProbability()); + } + } +} + + void MSRouteHandler::closeContainer() { if (myActiveContainerPlan->size() == 0) { @@ -822,6 +881,14 @@ void +MSRouteHandler::closeTrip() { + myVehicleParameter->parametersSet |= VEHPARS_FORCE_REROUTE; + closeRoute(true); + closeVehicle(); +} + + +void MSRouteHandler::addStop(const SUMOSAXAttributes& attrs) { std::string errorSuffix; if (myActivePlan != nullptr) { @@ -839,6 +906,7 @@ return; } const MSEdge* edge = nullptr; + MSStoppingPlace* toStop = nullptr; // try to parse the assigned bus stop if (stop.busstop != "") { // ok, we have a bus stop @@ -847,6 +915,7 @@ WRITE_ERROR("The busStop '" + stop.busstop + "' is not known" + errorSuffix); return; } + toStop = bs; const MSLane& l = bs->getLane(); stop.lane = l.getID(); stop.endPos = bs->getEndLanePosition(); @@ -860,6 +929,7 @@ WRITE_ERROR("The containerStop '" + stop.containerstop + "' is not known" + errorSuffix); return; } + toStop = cs; const MSLane& l = cs->getLane(); stop.lane = l.getID(); stop.endPos = cs->getEndLanePosition(); @@ -873,6 +943,7 @@ WRITE_ERROR("The parkingArea '" + stop.parkingarea + "' is not known" + errorSuffix); return; } + toStop = pa; const MSLane& l = pa->getLane(); stop.lane = l.getID(); stop.endPos = pa->getEndLanePosition(); @@ -881,15 +952,16 @@ } else if (stop.chargingStation != "") { // ok, we have a charging station MSStoppingPlace* cs = MSNet::getInstance()->getStoppingPlace(stop.chargingStation, SUMO_TAG_CHARGING_STATION); - if (cs != nullptr) { - const MSLane& l = cs->getLane(); - stop.lane = l.getID(); - stop.endPos = cs->getEndLanePosition(); - stop.startPos = cs->getBeginLanePosition(); - } else { + if (cs == nullptr) { WRITE_ERROR("The chargingStation '" + stop.chargingStation + "' is not known" + errorSuffix); return; } + toStop = cs; + 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 @@ -919,24 +991,6 @@ } } edge = &MSLane::dictionary(stop.lane)->getEdge(); - if (myActivePlan && - !myActivePlan->empty() && - 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 MSTransportable::Stage_Waiting( - edge, -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start", true)); - } - 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 MSTransportable::Stage_Waiting( - &MSLane::dictionary(stop.lane)->getEdge(), -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start", true)); - } stop.endPos = attrs.getOpt(SUMO_ATTR_ENDPOS, nullptr, ok, MSLane::dictionary(stop.lane)->getLength()); if (attrs.hasAttribute(SUMO_ATTR_POSITION)) { WRITE_WARNING("Deprecated attribute 'pos' in description of stop" + errorSuffix); @@ -949,24 +1003,44 @@ return; } } - if (myActivePlan != nullptr) { + if (myActivePlan) { + if (myActivePlan->empty()) { + double departPos = toStop == nullptr || myVehicleParameter->wasSet(VEHPARS_DEPARTPOS_SET) + ? myVehicleParameter->departPos + : (toStop->getBeginLanePosition() + toStop->getEndLanePosition()) / 2; + myActivePlan->push_back(new MSTransportable::Stage_Waiting( + edge, toStop, -1, myVehicleParameter->depart, departPos, "start", true)); + } else if (myActivePlan->back()->getDestination() != edge) { + throw ProcessError("Disconnected plan for person '" + myVehicleParameter->id + "' (" + edge->getID() + "!=" + myActivePlan->back()->getDestination()->getID() + ")."); + } std::string actType = attrs.getOpt(SUMO_ATTR_ACTTYPE, nullptr, ok, "waiting"); double pos = (stop.startPos + stop.endPos) / 2.; if (!myActivePlan->empty()) { pos = myActivePlan->back()->getArrivalPos(); } myActivePlan->push_back(new MSTransportable::Stage_Waiting( - &MSLane::dictionary(stop.lane)->getEdge(), stop.duration, stop.until, pos, actType, false)); - } else if (myActiveContainerPlan != nullptr) { + &MSLane::dictionary(stop.lane)->getEdge(), toStop, stop.duration, stop.until, pos, actType, false)); + + } else if (myActiveContainerPlan) { + if (myActiveContainerPlan->empty()) { + double departPos = toStop == nullptr || myVehicleParameter->wasSet(VEHPARS_DEPARTPOS_SET) + ? myVehicleParameter->departPos + : (toStop->getBeginLanePosition() + toStop->getEndLanePosition()) / 2; + myActiveContainerPlan->push_back(new MSTransportable::Stage_Waiting( + &MSLane::dictionary(stop.lane)->getEdge(), toStop, -1, myVehicleParameter->depart, departPos, "start", true)); + } else if (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() + ")."); + } std::string actType = attrs.getOpt(SUMO_ATTR_ACTTYPE, nullptr, ok, "waiting"); myActiveContainerPlan->push_back(new MSTransportable::Stage_Waiting( - &MSLane::dictionary(stop.lane)->getEdge(), stop.duration, stop.until, stop.startPos, actType, false)); + &MSLane::dictionary(stop.lane)->getEdge(), toStop, stop.duration, stop.until, stop.startPos, actType, false)); } else if (myVehicleParameter != nullptr) { myVehicleParameter->stops.push_back(stop); } else { myActiveRouteStops.push_back(stop); } if (myInsertStopEdgesAt >= 0) { + //std::cout << " myInsertStopEdgesAt=" << myInsertStopEdgesAt << " edge=" << edge->getID() << " myRoute=" << toString(myActiveRoute) << "\n"; myActiveRoute.insert(myActiveRoute.begin() + myInsertStopEdgesAt, edge); myInsertStopEdgesAt++; } @@ -1084,7 +1158,8 @@ const double departPosLat = attrs.getOpt(SUMO_ATTR_DEPARTPOS_LAT, nullptr, ok, 0); if (ok) { myVehicleParameter->parametersSet |= VEHPARS_FORCE_REROUTE; - myActivePlan->push_back(new MSTransportable::Stage_Trip(from, to == nullptr ? &stoppingPlace->getLane().getEdge() : to, stoppingPlace, duration, modeSet, types, speed, walkFactor, departPosLat, attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS), arrivalPos)); + MSStoppingPlace* fromStop = myActivePlan->empty() ? nullptr : myActivePlan->back()->getDestinationStop(); + myActivePlan->push_back(new MSTransportable::Stage_Trip(from, fromStop, to == nullptr ? &stoppingPlace->getLane().getEdge() : to, stoppingPlace, duration, modeSet, types, speed, walkFactor, departPosLat, attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS), arrivalPos)); } myActiveRoute.clear(); } @@ -1124,7 +1199,7 @@ if (myVehicleParameter->departPosProcedure == DEPART_POS_RANDOM) { initialDepartPos = RandHelper::rand(myActiveRoute.front()->getLength(), &myParsingRNG); } - myActivePlan->push_back(new MSTransportable::Stage_Waiting(myActiveRoute.front(), -1, myVehicleParameter->depart, initialDepartPos, "start", true)); + myActivePlan->push_back(new MSTransportable::Stage_Waiting(myActiveRoute.front(), nullptr, -1, myVehicleParameter->depart, initialDepartPos, "start", true)); } parseWalkPositions(attrs, myVehicleParameter->id, myActiveRoute.front(), myActiveRoute.back(), departPos, arrivalPos, bs, myActivePlan->back(), ok); if (myActiveRoute.empty()) { @@ -1147,4 +1222,28 @@ } +void +MSRouteHandler::addPerson(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +MSRouteHandler::addContainer(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +MSRouteHandler::addRide(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +MSRouteHandler::addTransport(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +MSRouteHandler::addTranship(const SUMOSAXAttributes& /*attrs*/) { +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSRouteHandler.h sumo-1.2.0+dfsg1/src/microsim/MSRouteHandler.h --- sumo-1.1.0+dfsg1/src/microsim/MSRouteHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSRouteHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,11 +26,11 @@ #include #include +#include +#include #include #include "MSContainer.h" #include "MSVehicle.h" -#include -#include // =========================================================================== @@ -53,13 +53,13 @@ */ class MSRouteHandler : public SUMORouteHandler { public: - /// standard constructor - MSRouteHandler(const std::string& file, - bool addVehiclesDirectly); + /// @brief standard constructor + MSRouteHandler(const std::string& file, bool addVehiclesDirectly); - /// standard destructor + /// @brief standard destructor virtual ~MSRouteHandler(); + /// @brief get parsing RNG static std::mt19937* getParsingRNG() { return &myParsingRNG; } @@ -77,18 +77,8 @@ */ 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); //@} - /** @brief Called for parsing from and to and the corresponding taz attributes * * @param[in] element description of the currently opened element @@ -98,42 +88,54 @@ void parseFromViaTo(std::string element, const SUMOSAXAttributes& attrs); - - /** opens a type distribution for reading */ + /// @brief opens a type distribution for reading void openVehicleTypeDistribution(const SUMOSAXAttributes& attrs); - /** closes (ends) the building of a distribution */ + /// @brief closes (ends) the building of a distribution void closeVehicleTypeDistribution(); - /** opens a route for reading */ + /// @brief opens a route for reading void openRoute(const SUMOSAXAttributes& attrs); - /** closes (ends) the building of a route. - Afterwards no edges may be added to it; - this method may throw exceptions when - a) the route is empty or - b) another route with the same id already exists */ + /// @brief opens a trip for reading + void openTrip(const SUMOSAXAttributes& attrs); + + /**@brief closes (ends) the building of a route. + * @note Afterwards no edges may be added to it; + * this method may throw exceptions when + * a) the route is empty or + * b) another route with the same id already exists + */ void closeRoute(const bool mayBeDisconnected = false); - /** opens a route distribution for reading */ + /// @brief opens a route distribution for reading void openRouteDistribution(const SUMOSAXAttributes& attrs); - /** closes (ends) the building of a distribution */ + /// @brief closes (ends) the building of a distribution void closeRouteDistribution(); - /// Ends the processing of a vehicle + /// @brief Ends the processing of a vehicle (note: is virtual because is reimplemented in MSStateHandler) virtual void closeVehicle(); - /// Ends the processing of a person + /// @brief Ends the processing of a vehicle type + void closeVType(); + + /// @brief Ends the processing of a person void closePerson(); - /// Ends the processing of a container + /// @brief Ends the processing of a personFlow + void closePersonFlow(); + + /// @brief Ends the processing of a container void closeContainer(); - /// Ends the processing of a flow + /// @brief Ends the processing of a flow void closeFlow(); - /// Processing of a stop + /// @brief Ends the processing of a trip + void closeTrip(); + + /// @brief Processing of a stop void addStop(const SUMOSAXAttributes& attrs); /// @brief add a routing request for a walking or intermodal person @@ -142,6 +144,21 @@ /// @brief add a fully specified walk void addWalk(const SUMOSAXAttributes& attrs); + /// @brief Processing of a person + void addPerson(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a container + void addContainer(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a ride + void addRide(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a transport + void addTransport(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a tranship + void addTranship(const SUMOSAXAttributes& attrs); + ///@ brief parse depart- and arrival positions of a walk void parseWalkPositions(const SUMOSAXAttributes& attrs, const std::string& personID, const MSEdge* fromEdge, const MSEdge*& toEdge, @@ -183,12 +200,14 @@ /// @brief delete already created MSTransportablePlans if error occurs before handing over responsibility to a MSTransportable. void deleteActivePlans(); + /// @brief delete already created MSTransportablePlans if error occurs before handing over responsibility to a MSTransportable. + void addFlowPerson(SUMOTime depart, MSVehicleType* type, const std::string& baseID, int i); + /// @brief Invalidated copy constructor - MSRouteHandler(const MSRouteHandler& s); + MSRouteHandler(const MSRouteHandler& s) = delete; /// @brief Invalidated assignment operator - MSRouteHandler& operator=(const MSRouteHandler& s); - + MSRouteHandler& operator=(const MSRouteHandler& s) = delete; }; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSStateHandler.cpp sumo-1.2.0+dfsg1/src/microsim/MSStateHandler.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSStateHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSStateHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -144,6 +144,10 @@ case SUMO_TAG_FLOWSTATE: { SUMOVehicleParameter* pars = new SUMOVehicleParameter(); pars->id = attrs.getString(SUMO_ATTR_ID); + bool ok; + if (attrs.getOpt(SUMO_ATTR_REROUTE, nullptr, ok, false)) { + pars->parametersSet |= VEHPARS_FORCE_REROUTE; + } MSNet::getInstance()->getInsertionControl().addFlow(pars, attrs.getInt(SUMO_ATTR_INDEX)); break; @@ -185,14 +189,16 @@ break; } case SUMO_TAG_VIEWSETTINGS_VEHICLES: { - std::vector vehIDs; - SUMOSAXAttributes::parseStringVector(attrs.getString(SUMO_ATTR_VALUE), vehIDs); - if (MSGlobals::gUseMesoSim) { - mySegment->loadState(vehIDs, MSNet::getInstance()->getVehicleControl(), StringUtils::toLong(attrs.getString(SUMO_ATTR_TIME)) - myOffset, myQueIndex++); - } else { - MSEdge::getAllEdges()[myEdgeAndLane.first]->getLanes()[myEdgeAndLane.second]->loadState( - vehIDs, MSNet::getInstance()->getVehicleControl()); - } + try { + const std::vector& vehIDs = attrs.getStringVector(SUMO_ATTR_VALUE); + if (MSGlobals::gUseMesoSim) { + mySegment->loadState(vehIDs, MSNet::getInstance()->getVehicleControl(), StringUtils::toLong(attrs.getString(SUMO_ATTR_TIME)) - myOffset, myQueIndex); + } else { + MSEdge::getAllEdges()[myEdgeAndLane.first]->getLanes()[myEdgeAndLane.second]->loadState( + vehIDs, MSNet::getInstance()->getVehicleControl()); + } + } catch (EmptyData&) {} // attr may be empty + myQueIndex++; break; } case SUMO_TAG_PARAM: { diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSStateHandler.h sumo-1.2.0+dfsg1/src/microsim/MSStateHandler.h --- sumo-1.1.0+dfsg1/src/microsim/MSStateHandler.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSStateHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -44,10 +44,10 @@ */ class MSStateHandler : public MSRouteHandler { public: - /// standard constructor + /// @brief standard constructor MSStateHandler(const std::string& file, const SUMOTime offset); - /// standard destructor + /// @brief standard destructor virtual ~MSStateHandler(); /** @brief Saves the current state @@ -56,6 +56,7 @@ */ static void saveState(const std::string& file, SUMOTime step); + /// @brief get time SUMOTime getTime() const { return myTime; } @@ -74,7 +75,6 @@ void myStartElement(int element, const SUMOSAXAttributes& attrs); - /** @brief Called when a closing tag occurs * * @param[in] element ID of the currently opened element @@ -88,10 +88,19 @@ void closeVehicle(); private: + /// @brief offset const SUMOTime myOffset; + + /// @brief time SUMOTime myTime; + + /// @brief segment MESegment* mySegment; + + /// @brief edge and lanes std::pair myEdgeAndLane; + + /// @brief que index int myQueIndex; /// @brief cached attrs (used when loading vehicles) @@ -112,11 +121,10 @@ private: /// @brief Invalidated copy constructor - MSStateHandler(const MSStateHandler& s); + MSStateHandler(const MSStateHandler& s) = delete; /// @brief Invalidated assignment operator - MSStateHandler& operator=(const MSStateHandler& s); - + MSStateHandler& operator=(const MSStateHandler& s) = delete; }; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSStoppingPlace.cpp sumo-1.2.0+dfsg1/src/microsim/MSStoppingPlace.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSStoppingPlace.cpp 2018-11-22 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSStoppingPlace.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,17 +32,22 @@ #include "MSTransportable.h" #include "MSStoppingPlace.h" - // =========================================================================== // method definitions // =========================================================================== MSStoppingPlace::MSStoppingPlace(const std::string& id, const std::vector& lines, MSLane& lane, - double begPos, double endPos, const std::string name) - : Named(id), myLines(lines), myLane(lane), - myBegPos(begPos), myEndPos(endPos), myLastFreePos(endPos), myWaitingPos(endPos), myName(name) { + double begPos, double endPos, const std::string name, + int capacity) : + Named(id), myLines(lines), myLane(lane), + myBegPos(begPos), myEndPos(endPos), myLastFreePos(endPos), + myName(name), + myTransportableCapacity(capacity) { computeLastFreePos(); + for (int i = 0; i < capacity; i++) { + myWaitingSpots.insert(i); + } } @@ -114,9 +119,42 @@ return pos + POSITION_EPS >= myEndPos || (pos - myBegPos >= veh.getVehicleType().getLength() / 2); } +double +MSStoppingPlace::getWaitingPositionOnLane(MSTransportable* t) const { + auto it = myWaitingTransportables.find(t); + if (it != myWaitingTransportables.end() && it->second >= 0) { + return myEndPos - (0.5 + (it->second) % getPersonsAbreast()) * SUMO_const_waitingPersonWidth; + } else { + return (myEndPos + myBegPos) / 2; + } +} + + +int +MSStoppingPlace::getPersonsAbreast(double length) { + return MAX2(1, (int)floor(length / SUMO_const_waitingPersonWidth)); +} + +int +MSStoppingPlace::getPersonsAbreast() const { + return getPersonsAbreast(myEndPos - myBegPos); +} + Position -MSStoppingPlace::getWaitPosition() const { - return myLane.getShape().positionAtOffset(myLane.interpolateLanePosToGeometryPos(myWaitingPos), .5); +MSStoppingPlace::getWaitPosition(MSTransportable* t) const { + double lanePos = getWaitingPositionOnLane(t); + int row = 0; + auto it = myWaitingTransportables.find(t); + if (it != myWaitingTransportables.end()) { + if (it->second >= 0) { + row = int(it->second / getPersonsAbreast()); + } else { + // invalid position, draw outside bounds + row = 1 + myTransportableCapacity / getPersonsAbreast(); + } + } + return myLane.getShape().positionAtOffset(myLane.interpolateLanePosToGeometryPos(lanePos), + myLane.getWidth() / 2 + row * SUMO_const_waitingPersonDepth); } @@ -130,23 +168,30 @@ } } -void +bool +MSStoppingPlace::hasSpaceForTransportable() const { + return myWaitingSpots.size() > 0; +} + +bool MSStoppingPlace::addTransportable(MSTransportable* p) { - myWaitingTransportables.push_back(p); - myWaitingPos -= p->getVehicleType().getLength(); - myWaitingPos = MAX2(myBegPos, myWaitingPos); + int spot = -1; + if (!hasSpaceForTransportable()) { + return false; + } + spot = *myWaitingSpots.begin(); + myWaitingSpots.erase(myWaitingSpots.begin()); + myWaitingTransportables[p] = spot; + return true; } void MSStoppingPlace::removeTransportable(MSTransportable* p) { - std::vector::iterator i = std::find(myWaitingTransportables.begin(), myWaitingTransportables.end(), p); + auto i = myWaitingTransportables.find(p); if (i != myWaitingTransportables.end()) { - if (i == myWaitingTransportables.end() - 1) { - myWaitingPos -= p->getVehicleType().getLength(); - } - if (i == myWaitingTransportables.begin()) { - myWaitingPos = getEndLanePosition(); + if (i->second >= 0) { + myWaitingSpots.insert(i->second); } myWaitingTransportables.erase(i); } diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSStoppingPlace.h sumo-1.2.0+dfsg1/src/microsim/MSStoppingPlace.h --- sumo-1.1.0+dfsg1/src/microsim/MSStoppingPlace.h 2018-06-12 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSStoppingPlace.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,6 +29,7 @@ #include #include #include +#include // =========================================================================== @@ -56,7 +57,7 @@ * Please note that using the last free space disallows vehicles to enter a * free space in between other vehicles. */ -class MSStoppingPlace : public Named { +class MSStoppingPlace : public Named, public Parameterised { public: /** @brief Constructor * @@ -69,7 +70,9 @@ */ MSStoppingPlace(const std::string& id, const std::vector& lines, MSLane& lane, - double begPos, double endPos, const std::string name = ""); + double begPos, double endPos, const std::string name = "", + int capacity = 0); + /// @brief Destructor @@ -136,15 +139,13 @@ * * @return The next free waiting place for pedestrians / containers */ - Position getWaitPosition() const; + virtual Position getWaitPosition(MSTransportable* person) const; /** @brief Returns the lane position corresponding to getWaitPosition() * * @return The waiting position along the stop lane */ - double getWaitingPositionOnLane() const { - return myWaitingPos; - } + double getWaitingPositionOnLane(MSTransportable* t) const; /** @brief For vehicles at the stop this gives the the actual stopping @@ -169,8 +170,11 @@ return myLastFreePos; } + /// @brief whether there is still capacity for more transportables + bool hasSpaceForTransportable() const; + /// @brief adds a transportable to this stop - void addTransportable(MSTransportable* p); + bool addTransportable(MSTransportable* p); /// @brief Removes a transportable from this stop void removeTransportable(MSTransportable* p); @@ -189,6 +193,10 @@ /// @brief the distance from the access on the given edge to the stop, -1 on failure double getAccessDistance(const MSEdge* edge) const; + const std::string& getMyName() const; + + static int getPersonsAbreast(double length); + protected: /** @brief Computes the last free position on this stop * @@ -198,6 +206,7 @@ */ void computeLastFreePos(); + int getPersonsAbreast() const; protected: /// @brief The list of lines that are assigned to this stop @@ -218,17 +227,17 @@ /// @brief The last free position at this stop (variable) double myLastFreePos; - /// @brief The next free position for persons / containers - double myWaitingPos; - /// @brief The name of the stopping place const std::string myName; -public: - const std::string& getMyName() const; + + /// @brief The number of transportables that can wait here + const int myTransportableCapacity; + protected: - /// @brief Persons waiting at this stop - std::vector myWaitingTransportables; + /// @brief Persons waiting at this stop (mapped to waiting position) + std::map myWaitingTransportables; + std::set myWaitingSpots; /// @brief lanes and positions connected to this stop std::vector > myAccessPos; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSTransportableControl.cpp sumo-1.2.0+dfsg1/src/microsim/MSTransportableControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSTransportableControl.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSTransportableControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -51,7 +51,7 @@ MSTransportableControl::~MSTransportableControl() { for (std::map::iterator i = myTransportables.begin(); i != myTransportables.end(); ++i) { - delete(*i).second; + delete (*i).second; } myTransportables.clear(); myWaiting4Vehicle.clear(); @@ -155,10 +155,13 @@ bool ret = false; if (myWaiting4Vehicle.find(edge) != myWaiting4Vehicle.end()) { TransportableVector& wait = myWaiting4Vehicle[edge]; - const std::string& line = vehicle->getParameter().line == "" ? vehicle->getParameter().id : vehicle->getParameter().line; SUMOTime currentTime = MSNet::getInstance()->getCurrentTimeStep(); for (TransportableVector::iterator i = wait.begin(); i != wait.end();) { - if ((*i)->isWaitingFor(line) && vehicle->getVehicleType().getPersonCapacity() > vehicle->getPersonNumber() && timeToBoardNextPerson <= currentTime && stop.startPos <= (*i)->getEdgePos() && (*i)->getEdgePos() <= stop.endPos) { + if ((*i)->isWaitingFor(vehicle) + && vehicle->getVehicleType().getPersonCapacity() > vehicle->getPersonNumber() + && 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 @@ -196,11 +199,12 @@ if (myWaiting4Vehicle.find(edge) != myWaiting4Vehicle.end()) { TransportableVector& waitContainers = myWaiting4Vehicle[edge]; for (TransportableVector::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() + if ((*i)->isWaitingFor(vehicle) + && vehicle->getVehicleType().getContainerCapacity() > vehicle->getContainerNumber() && timeToLoadNextContainer <= currentTime - && stop.startPos <= (*i)->getEdgePos() && (*i)->getEdgePos() <= stop.endPos) { + && 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 @@ -303,4 +307,5 @@ return new MSContainer(pars, vtype, plan); } + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSTransportableControl.h sumo-1.2.0+dfsg1/src/microsim/MSTransportableControl.h --- sumo-1.1.0+dfsg1/src/microsim/MSTransportableControl.h 2018-05-31 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSTransportableControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -194,6 +194,12 @@ return myJammedNumber; } + /** @brief Returns the number of vehicles waiting for a ride + */ + int getWaitingForVehicleNumber() const { + return myWaitingForVehicleNumber; + } + /// @} protected: diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSTransportable.cpp sumo-1.2.0+dfsg1/src/microsim/MSTransportable.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSTransportable.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSTransportable.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,12 +26,13 @@ #include #include #include -#include -#include +#include +#include #include "MSEdge.h" #include "MSLane.h" #include "MSNet.h" #include +#include #include "MSVehicleControl.h" #include "MSTransportableControl.h" #include "MSTransportable.h" @@ -104,13 +105,18 @@ } } +SUMOTime +MSTransportable::Stage::getDeparted() const { + return myDeparted; +} + void MSTransportable::Stage::setArrived(MSNet* /* net */, MSTransportable* /* transportable */, SUMOTime now) { myArrived = now; } bool -MSTransportable::Stage::isWaitingFor(const std::string& /*line*/) const { +MSTransportable::Stage::isWaitingFor(const SUMOVehicle* /*vehicle*/) const { return false; } @@ -130,13 +136,28 @@ } +void +MSTransportable::Stage::setDestination(const MSEdge* newDestination, MSStoppingPlace* newDestStop) { + myDestination = newDestination; + myDestinationStop = newDestStop; + if (newDestStop != nullptr) { + myArrivalPos = (newDestStop->getBeginLanePosition() + newDestStop->getEndLanePosition()) / 2; + } +} + + + /* ------------------------------------------------------------------------- * MSTransportable::Stage_Trip - methods * ----------------------------------------------------------------------- */ -MSTransportable::Stage_Trip::Stage_Trip(const MSEdge* origin, const MSEdge* destination, MSStoppingPlace* toStop, const SUMOTime duration, const SVCPermissions modeSet, - const std::string& vTypes, const double speed, const double walkFactor, const double departPosLat, const bool hasArrivalPos, const double arrivalPos) : +MSTransportable::Stage_Trip::Stage_Trip(const MSEdge* origin, MSStoppingPlace* fromStop, + const MSEdge* destination, MSStoppingPlace* toStop, + const SUMOTime duration, const SVCPermissions modeSet, + const std::string& vTypes, const double speed, const double walkFactor, + const double departPosLat, const bool hasArrivalPos, const double arrivalPos): MSTransportable::Stage(destination, toStop, arrivalPos, TRIP), myOrigin(origin), + myOriginStop(fromStop), myDuration(duration), myModeSet(modeSet), myVTypes(vTypes), @@ -149,6 +170,13 @@ MSTransportable::Stage_Trip::~Stage_Trip() {} +MSTransportable::Stage* +MSTransportable::Stage_Trip::clone() const { + return new Stage_Trip(myOrigin, const_cast(myOriginStop), + myDestination, myDestinationStop, myDuration, + myModeSet, myVTypes, mySpeed, myWalkFactor, myDepartPosLat, myHaveArrivalPos, myArrivalPos); +} + Position MSTransportable::Stage_Trip::getPosition(SUMOTime /* now */) const { @@ -202,12 +230,14 @@ } } MSTransportable::Stage* previous; + SUMOTime time = MSNet::getInstance()->getCurrentTimeStep(); if (transportable->getNumStages() == transportable->getNumRemainingStages()) { // this is a difficult way to check that we are the first stage myDepartPos = transportable->getParameter().departPos; if (transportable->getParameter().departPosProcedure == DEPART_POS_RANDOM) { myDepartPos = RandHelper::rand(myOrigin->getLength()); } - previous = new MSTransportable::Stage_Waiting(myOrigin, -1, transportable->getParameter().depart, myDepartPos, "start", true); + previous = new MSTransportable::Stage_Waiting(myOrigin, nullptr, -1, transportable->getParameter().depart, myDepartPos, "start", true); + time = transportable->getParameter().depart; } else { previous = transportable->getNextStage(-1); myDepartPos = previous->getArrivalPos(); @@ -228,7 +258,7 @@ std::vector result; int stageIndex = 1; if (net->getIntermodalRouter().compute(myOrigin, myDestination, previous->getArrivalPos(), myArrivalPos, myDestinationStop == nullptr ? "" : myDestinationStop->getID(), - transportable->getVehicleType().getMaxSpeed() * myWalkFactor, vehicle, myModeSet, transportable->getParameter().depart, result)) { + transportable->getVehicleType().getMaxSpeed() * myWalkFactor, vehicle, myModeSet, time, result)) { for (std::vector::iterator it = result.begin(); it != result.end(); ++it) { if (!it->edges.empty()) { MSStoppingPlace* bs = MSNet::getInstance()->getStoppingPlace(it->destStop, SUMO_TAG_BUS_STOP); @@ -244,7 +274,7 @@ // if (previous->getEdge()->getToJunction() == it->edges.front()->getToJunction()) { // depPos = it->edges.front()->getLength(); // } else { - depPos = 0.; + depPos = 0.; // } } previous = new MSPerson::MSPersonStage_Walking(transportable->getID(), it->edges, bs, myDuration, mySpeed, depPos, localArrivalPos, myDepartPosLat); @@ -267,12 +297,14 @@ } } } else { + // append stage so the GUI won't crash due to inconsistent state + transportable->appendStage(new MSPerson::MSPersonStage_Walking(transportable->getID(), ConstMSEdgeVector({ myOrigin, myDestination }), myDestinationStop, myDuration, mySpeed, previous->getArrivalPos(), myArrivalPos, myDepartPosLat), stageIndex++); if (MSGlobals::gCheckRoutes) { - const std::string error = "No connection found between '" + myOrigin->getID() + "' and '" + (myDestinationStop != nullptr ? myDestinationStop->getID() : myDestination->getID()) + "' for person '" + transportable->getID() + "'."; + const std::string error = "No connection found between edge '" + myOrigin->getID() + "' and edge '" + (myDestinationStop != nullptr ? myDestinationStop->getID() : myDestination->getID()) + "' for person '" + transportable->getID() + "'."; + transportable->myStep++; throw ProcessError(error); } else { // pedestrian will teleport - transportable->appendStage(new MSPerson::MSPersonStage_Walking(transportable->getID(), ConstMSEdgeVector({ myOrigin, myDestination }), myDestinationStop, myDuration, mySpeed, previous->getArrivalPos(), myArrivalPos, myDepartPosLat), stageIndex++); } } if (vehicle != nullptr && !carUsed) { @@ -315,13 +347,14 @@ } + /* ------------------------------------------------------------------------- * MSTransportable::Stage_Waiting - methods * ----------------------------------------------------------------------- */ -MSTransportable::Stage_Waiting::Stage_Waiting(const MSEdge* destination, +MSTransportable::Stage_Waiting::Stage_Waiting(const MSEdge* destination, MSStoppingPlace* toStop, SUMOTime duration, SUMOTime until, double pos, const std::string& actType, const bool initial) : - MSTransportable::Stage(destination, nullptr, SUMOVehicleParameter::interpretEdgePos( + MSTransportable::Stage(destination, toStop, SUMOVehicleParameter::interpretEdgePos( pos, destination->getLength(), SUMO_ATTR_DEPARTPOS, "stopping at " + destination->getID()), initial ? WAITING_FOR_DEPART : WAITING), myWaitingDuration(duration), @@ -332,6 +365,10 @@ MSTransportable::Stage_Waiting::~Stage_Waiting() {} +MSTransportable::Stage* +MSTransportable::Stage_Waiting::clone() const { + return new Stage_Waiting(myDestination, myDestinationStop, myWaitingDuration, myWaitingUntil, myArrivalPos, myActType, myType == WAITING_FOR_DEPART); +} SUMOTime MSTransportable::Stage_Waiting::getUntil() const { @@ -356,6 +393,9 @@ MSTransportable::Stage_Waiting::proceed(MSNet* net, MSTransportable* transportable, SUMOTime now, Stage* previous) { myDeparted = now; const SUMOTime until = MAX3(now, now + myWaitingDuration, myWaitingUntil); + if (myDestinationStop != nullptr) { + myDestinationStop->addTransportable(transportable); + } if (dynamic_cast(transportable) != nullptr) { previous->getEdge()->addPerson(transportable); net->getPersonControl().setWaitEnd(until, transportable); @@ -513,8 +553,10 @@ bool -MSTransportable::Stage_Driving::isWaitingFor(const std::string& line) const { - return myLines.count(line) > 0; +MSTransportable::Stage_Driving::isWaitingFor(const SUMOVehicle* vehicle) const { + return (myLines.count(vehicle->getID()) > 0 + || myLines.count(vehicle->getParameter().line) > 0 + || (myLines.count("ANY") > 0 && vehicle->stopsAt(myDestinationStop))); } @@ -572,16 +614,6 @@ } void -MSTransportable::Stage_Driving::setDestination(const MSEdge* newDestination, MSStoppingPlace* newDestStop) { - myDestination = newDestination; - myDestinationStop = newDestStop; - if (newDestStop != nullptr) { - myArrivalPos = (newDestStop->getBeginLanePosition() + newDestStop->getEndLanePosition()) / 2; - } -} - - -void MSTransportable::Stage_Driving::abort(MSTransportable* t) { if (myVehicle != nullptr) { // jumping out of a moving vehicle! @@ -619,10 +651,18 @@ MSTransportable::MSTransportable(const SUMOVehicleParameter* pars, MSVehicleType* vtype, MSTransportablePlan* plan) : myParameter(pars), myVType(vtype), myPlan(plan) { myStep = myPlan->begin(); + // init devices + MSDevice::buildTransportableDevices(*this, myDevices); } MSTransportable::~MSTransportable() { + if (myStep != myPlan->end() && getCurrentStageType() == DRIVING) { + Stage_Driving* const stage = dynamic_cast(*myStep); + if (stage->getVehicle() != nullptr) { + stage->getVehicle()->removeTransportable(this); + } + } if (myPlan != nullptr) { for (MSTransportablePlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) { delete *i; @@ -716,7 +756,7 @@ } else { if (myStep + 1 == myPlan->end()) { // stay in the simulation until the start of simStep to allow appending new stages (at the correct position) - appendStage(new Stage_Waiting(getEdge(), 0, 0, getEdgePos(), "last stage removed", false)); + appendStage(new Stage_Waiting(getEdge(), nullptr, 0, 0, getEdgePos(), "last stage removed", false)); } (*myStep)->abort(this); proceed(MSNet::getInstance(), MSNet::getInstance()->getCurrentTimeStep()); @@ -783,6 +823,11 @@ return myStep == myPlan->end(); } +bool +MSTransportable::hasDeparted() const { + return myPlan->size() > 0 && myPlan->front()->getDeparted() >= 0; +} + void MSTransportable::rerouteParkingArea(MSStoppingPlace* orig, MSStoppingPlace* replacement) { @@ -790,8 +835,12 @@ // @note: parkingArea can currently not be set as myDestinationStop so we // check for stops on the edge instead assert(getCurrentStageType() == DRIVING); + if (dynamic_cast(this) == nullptr) { + WRITE_WARNING("parkingAreaReroute not support for containers"); + return; + } if (getDestination() == &orig->getLane().getEdge()) { - Stage_Driving* stage = dynamic_cast(*myStep); + Stage_Driving* const stage = dynamic_cast(*myStep); assert(stage != 0); assert(stage->getVehicle() != 0); // adapt plan @@ -800,13 +849,72 @@ return; } // if the next step is a walk, adapt the route - // TODO Should we also reroute when the walk has a fixed edge list or only trips? Stage* nextStage = *(myStep + 1); if (nextStage->getStageType() == TRIP) { dynamic_cast(nextStage)->setOrigin(stage->getDestination()); + } else if (nextStage->getStageType() == MOVING_WITHOUT_VEHICLE) { + Stage_Trip* newStage = new Stage_Trip(stage->getDestination(), nullptr, nextStage->getDestination(), + nextStage->getDestinationStop(), -1, 0, "", -1, 1, 0, true, nextStage->getArrivalPos()); + removeStage(1); + appendStage(newStage, 1); + } + // if the plan contains another ride with the same vehicle from the same + // parking area, adapt the preceeding walk to end at the replacement + // (ride origin is set implicitly from the walk destination) + for (auto it = myStep + 2; it != myPlan->end(); it++) { + const Stage* const futureStage = *it; + Stage* const prevStage = *(it - 1); + if (futureStage->getStageType() == DRIVING) { + const MSPerson::MSPersonStage_Driving* const ds = dynamic_cast(futureStage); + if (ds->getLines() == stage->getLines() + && prevStage->getDestination() == &orig->getLane().getEdge()) { + if (prevStage->getStageType() == TRIP) { + dynamic_cast(prevStage)->setDestination(stage->getDestination(), replacement); + } else if (prevStage->getStageType() == MOVING_WITHOUT_VEHICLE) { + Stage_Trip* newStage = new Stage_Trip(prevStage->getFromEdge(), nullptr, stage->getDestination(), + replacement, -1, 0, "", -1, 1, 0, true, stage->getArrivalPos()); + int prevStageRelIndex = (int)(it - 1 - myStep); + removeStage(prevStageRelIndex); + appendStage(newStage, prevStageRelIndex); + } + break; + } + } } } } +MSTransportableDevice* +MSTransportable::getDevice(const std::type_info& type) const { + for (MSTransportableDevice* const dev : myDevices) { + if (typeid(*dev) == type) { + return dev; + } + } + return nullptr; +} + +double +MSTransportable::getSlope() const { + const MSEdge* edge = getEdge(); + const double ep = getEdgePos(); + const double gp = edge->getLanes()[0]->interpolateLanePosToGeometryPos(ep); + return edge->getLanes()[0]->getShape().slopeDegreeAtOffset(gp); +} + +SUMOTime +MSTransportable::getWaitingTime() const { + return (*myStep)->getWaitingTime(MSNet::getInstance()->getCurrentTimeStep()); +} + +double +MSTransportable::getMaxSpeed() const { + return getVehicleType().getMaxSpeed(); +} + +SUMOVehicleClass +MSTransportable::getVClass() const { + return getVehicleType().getVehicleClass(); +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSTransportable.h sumo-1.2.0+dfsg1/src/microsim/MSTransportable.h --- sumo-1.1.0+dfsg1/src/microsim/MSTransportable.h 2018-10-30 23:00:26.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSTransportable.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,7 +29,8 @@ #include #include #include -#include +#include +#include // =========================================================================== @@ -43,6 +44,7 @@ class OutputDevice; class SUMOVehicleParameter; class SUMOVehicle; +class MSTransportableDevice; typedef std::vector ConstMSEdgeVector; @@ -54,7 +56,7 @@ * * The class holds a simulated moveable object */ -class MSTransportable { +class MSTransportable : public SUMOTrafficObject { public: enum StageType { WAITING_FOR_DEPART = 0, @@ -85,6 +87,11 @@ return myDestinationStop; } + /// returns the origin stop (if any). only needed for Stage_Trip + virtual const MSStoppingPlace* getOriginStop() const { + return nullptr; + } + double getArrivalPos() const { return myArrivalPos; } @@ -120,14 +127,17 @@ /// sets the walking speed (ignored in other stages) virtual void setSpeed(double) {}; + /// get departure time of stage + SUMOTime getDeparted() const; + /// logs end of the step void setDeparted(SUMOTime now); /// logs end of the step virtual void setArrived(MSNet* net, MSTransportable* transportable, SUMOTime now); - /// Whether the transportable waits for a vehicle of the line specified. - virtual bool isWaitingFor(const std::string& line) const; + /// Whether the transportable waits for the given vehicle + virtual bool isWaitingFor(const SUMOVehicle* vehicle) const; /// @brief Whether the transportable waits for a vehicle virtual bool isWaiting4Vehicle() const { @@ -157,6 +167,9 @@ /// @brief get angle of the edge at a certain position double getEdgeAngle(const MSEdge* e, double at) const; + void setDestination(const MSEdge* newDestination, MSStoppingPlace* newDestStop); + + /** @brief Called on writing tripinfo output * @param[in] os The stream to write the information into * @exception IOError not yet implemented @@ -182,6 +195,8 @@ */ virtual void endEventOutput(const MSTransportable& transportable, SUMOTime t, OutputDevice& os) const = 0; + virtual Stage* clone() const = 0; + protected: /// the next edge to reach by getting transported const MSEdge* myDestination; @@ -216,14 +231,23 @@ class Stage_Trip : public Stage { public: /// constructor - Stage_Trip(const MSEdge* origin, const MSEdge* destination, MSStoppingPlace* toStop, const SUMOTime duration, const SVCPermissions modeSet, - const std::string& vTypes, const double speed, const double walkFactor, const double departPosLat, const bool hasArrivalPos, const double arrivalPos); + Stage_Trip(const MSEdge* origin, MSStoppingPlace* fromStop, + const MSEdge* destination, MSStoppingPlace* toStop, + const SUMOTime duration, const SVCPermissions modeSet, + const std::string& vTypes, const double speed, const double walkFactor, + const double departPosLat, const bool hasArrivalPos, const double arrivalPos); /// destructor virtual ~Stage_Trip(); + Stage* clone() const; + const MSEdge* getEdge() const; + const MSStoppingPlace* getOriginStop() const { + return myOriginStop; + } + double getEdgePos(SUMOTime now) const; Position getPosition(SUMOTime now) const; @@ -239,7 +263,7 @@ /// logs end of the step virtual void setArrived(MSNet* net, MSTransportable* transportable, SUMOTime now); - /// change origin for parking area rerouting + /// change origin for parking area rerouting void setOrigin(const MSEdge* origin) { myOrigin = origin; } @@ -277,6 +301,9 @@ /// the origin edge const MSEdge* myOrigin; + /// the origin edge + const MSStoppingPlace* myOriginStop; + /// the time the trip should take (applies to only walking) SUMOTime myDuration; @@ -316,12 +343,14 @@ class Stage_Waiting : public Stage { public: /// constructor - Stage_Waiting(const MSEdge* destination, SUMOTime duration, SUMOTime until, + Stage_Waiting(const MSEdge* destination, MSStoppingPlace* toStop, SUMOTime duration, SUMOTime until, double pos, const std::string& actType, const bool initial); /// destructor virtual ~Stage_Waiting(); + Stage* clone() const; + /// abort this stage (TraCI) void abort(MSTransportable*); @@ -415,8 +444,8 @@ double getAngle(SUMOTime now) const; - /// Whether the person waits for a vehicle of the line specified. - bool isWaitingFor(const std::string& line) const; + /// Whether the person waits for the given vehicle + bool isWaitingFor(const SUMOVehicle* vehicle) const; /// @brief Whether the person waits for a vehicle bool isWaiting4Vehicle() const; @@ -435,8 +464,6 @@ ConstMSEdgeVector getEdges() const; - void setDestination(const MSEdge* newDestination, MSStoppingPlace* newDestStop); - void setVehicle(SUMOVehicle* v); /// @brief marks arrival time and records driven distance @@ -454,6 +481,10 @@ */ virtual void endEventOutput(const MSTransportable& p, SUMOTime t, OutputDevice& os) const; + const std::set& getLines() const { + return myLines; + } + protected: /// the lines to choose from const std::set myLines; @@ -485,6 +516,49 @@ }; + /// @name inherited from SUMOTrafficObject + /// @{ + bool isVehicle() const { + return false; + } + + bool isStopped() const { + return getCurrentStageType() == WAITING; + } + + double getSlope() const; + + double getChosenSpeedFactor() const { + return 1.0; + } + + SUMOVehicleClass getVClass() const; + + double getMaxSpeed() const; + + SUMOTime getWaitingTime() const; + + double getPreviousSpeed() const { + return getSpeed(); + } + + double getAcceleration() const { + return 0.0; + } + + double getPositionOnLane() const { + return getEdgePos(); + } + + double getBackPositionOnLane(const MSLane* /*lane*/) const { + return getEdgePos(); + } + + Position getPosition(const double /*offset*/) const { + return getPosition(); + } + /// @} + /// the structure holding the plan of a transportable typedef std::vector MSTransportablePlan; @@ -614,9 +688,9 @@ */ virtual void routeOutput(OutputDevice& os, const bool withRouteLength) const = 0; - /// @brief Whether the transportable waits for a vehicle of the line specified. - bool isWaitingFor(const std::string& line) const { - return (*myStep)->isWaitingFor(line); + /// Whether the transportable waits for the given vehicle in the current step + bool isWaitingFor(const SUMOVehicle* vehicle) const { + return (*myStep)->isWaitingFor(vehicle); } /// @brief Whether the transportable waits for a vehicle @@ -675,9 +749,21 @@ /// @brief return whether the person has reached the end of its plan bool hasArrived() const; + /// @brief return whether the transportable has started it's plan + bool hasDeparted() const; + /// @brief adapt plan when the vehicle reroutes and now stops at replacement instead of orig void rerouteParkingArea(MSStoppingPlace* orig, MSStoppingPlace* replacement); + /// @brief Returns a device of the given type if it exists or 0 + MSTransportableDevice* getDevice(const std::type_info& type) const; + + /** @brief Returns this vehicle's devices + * @return This vehicle's devices + */ + inline const std::vector& getDevices() const { + return myDevices; + } protected: /// @brief the offset for computing positions when standing at an edge @@ -699,6 +785,9 @@ /// the iterator over the route MSTransportablePlan::iterator myStep; + /// @brief The devices this transportable has + std::vector myDevices; + private: /// @brief Invalidated copy constructor. MSTransportable(const MSTransportable&); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleContainer.cpp sumo-1.2.0+dfsg1/src/microsim/MSVehicleContainer.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleContainer.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleContainer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleContainer.h sumo-1.2.0+dfsg1/src/microsim/MSVehicleContainer.h --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleContainer.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleContainer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleControl.cpp sumo-1.2.0+dfsg1/src/microsim/MSVehicleControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleControl.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,12 +31,16 @@ #include "MSRouteHandler.h" #include #include +#include #include #include #include #include #include -#include +#include +#ifdef HAVE_FOX +#include +#endif // =========================================================================== @@ -60,7 +64,8 @@ myWaitingForPerson(0), myWaitingForContainer(0), myMaxSpeedFactor(1), - myMinDeceleration(SUMOVTypeParameter::getDefaultDecel(SVC_IGNORING)) { + myMinDeceleration(SUMOVTypeParameter::getDefaultDecel(SVC_IGNORING)), + myPendingRemovals(MSGlobals::gNumSimThreads > 1) { SUMOVTypeParameter defType(DEFAULT_VTYPE_ID, SVC_PASSENGER); myVTypeDict[DEFAULT_VTYPE_ID] = MSVehicleType::build(defType); SUMOVTypeParameter defPedType(DEFAULT_PEDTYPE_ID, SVC_PEDESTRIAN); @@ -77,12 +82,12 @@ MSVehicleControl::~MSVehicleControl() { // delete vehicles for (VehicleDictType::iterator i = myVehicleDict.begin(); i != myVehicleDict.end(); ++i) { - delete(*i).second; + delete (*i).second; } myVehicleDict.clear(); // delete vehicle type distributions for (VTypeDistDictType::iterator i = myVTypeDistDict.begin(); i != myVTypeDistDict.end(); ++i) { - delete(*i).second; + delete (*i).second; } myVTypeDistDict.clear(); // delete vehicle types @@ -92,6 +97,7 @@ myVTypeDict.clear(); } + SUMOVehicle* MSVehicleControl::buildVehicle(SUMOVehicleParameter* defs, const MSRoute* route, MSVehicleType* type, @@ -107,17 +113,35 @@ 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 (MSVehicleDevice* const dev : veh->getDevices()) { - dev->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(); - } - deleteVehicle(veh); + myPendingRemovals.push_back(veh); +} + + +void +MSVehicleControl::removePending() { +#ifdef HAVE_FOX + std::vector& vehs = myPendingRemovals.getContainer(); +#else + std::vector& vehs = myPendingRemovals; +#endif + std::sort(vehs.begin(), vehs.end(), ComparatorNumericalIdLess()); + for (SUMOVehicle* const veh : vehs) { + myTotalTravelTime += STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep() - veh->getDeparture()); + myRunningVehNo--; + MSNet::getInstance()->informVehicleStateListener(veh, MSNet::VEHICLE_STATE_ARRIVED); + for (MSVehicleDevice* const dev : veh->getDevices()) { + dev->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(); + } + deleteVehicle(veh); + } + vehs.clear(); +#ifdef HAVE_FOX + myPendingRemovals.unlock(); +#endif } @@ -212,6 +236,10 @@ if (veh != nullptr) { myVehicleDict.erase(veh->getID()); } + auto ptVehIt = std::find(myPTVehicles.begin(), myPTVehicles.end(), veh); + if (ptVehIt != myPTVehicles.end()) { + myPTVehicles.erase(ptVehIt); + } delete veh; } @@ -364,31 +392,31 @@ SUMOVehicle* -MSVehicleControl::getWaitingVehicle(const MSEdge* const edge, const std::set& lines, const double position, const std::string ridingID) { +MSVehicleControl::getWaitingVehicle(MSTransportable* transportable, const MSEdge* const edge, const double position) { 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; - double vehiclePosition = (*it)->getPositionOnLane(); + for (SUMOVehicle* vehicle : myWaiting[edge]) { + double vehiclePosition = vehicle->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)) { + if (transportable->isWaitingFor(vehicle)) { if ((position - 10 <= vehiclePosition) && (vehiclePosition <= position + 10)) { - return (*it); - } else if ((*it)->isStoppedTriggered() || - (*it)->getParameter().departProcedure == DEPART_TRIGGERED) { + return vehicle; + } else if (vehicle->isStoppedTriggered() || + vehicle->getParameter().departProcedure == DEPART_TRIGGERED) { // maybe we are within the range of the stop - if ((*it)->isStoppedInRange(position)) { - return (*it); + if (vehicle->isStoppedInRange(position)) { + return vehicle; } else { - waitingTooFarAway.push_back(*it); + waitingTooFarAway.push_back(vehicle); } } } } - 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."); + for (SUMOVehicle* vehicle : waitingTooFarAway) { + WRITE_WARNING(transportable->getID() + " at edge '" + edge->getID() + "' position " + toString(position) + " cannot use waiting vehicle '" + + vehicle->getID() + "' at position " + toString(vehicle->getPositionOnLane()) + " because it is too far away."); } } return nullptr; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleControl.h sumo-1.2.0+dfsg1/src/microsim/MSVehicleControl.h --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleControl.h 2018-08-14 22:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,6 +29,10 @@ #include #include #include +#ifdef HAVE_FOX +#include +#include +#endif #include #include #include @@ -154,6 +158,20 @@ void scheduleVehicleRemoval(SUMOVehicle* veh); + /** @brief Removes a vehicle after it has ended + * + * Writes output to tripinfos and vehroutes if wished; decrements + * the number of running vehicles and increments the number of ended + * vehicles. Then deletes the vehicle using "deleteVehicle". + * + * This method should be called for each vehicle that was inserted + * into the network and quits its ride. + * + * @param[in] veh The vehicle to remove + */ + void removePending(); + + /** @brief Returns the begin of the internal vehicle map * @return The begin of the internal vehicle map */ @@ -406,7 +424,7 @@ * @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 double position, const std::string ridingID); + SUMOVehicle* getWaitingVehicle(MSTransportable* transportable, const MSEdge* const edge, const double position); /** @brief increases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks */ @@ -611,6 +629,13 @@ /// @brief List of vehicles which belong to public transport std::vector myPTVehicles; + /// @brief List of vehicles which are going to be removed +#ifdef HAVE_FOX + FXSynchQue > myPendingRemovals; +#else + std::vector myPendingRemovals; +#endif + private: /// @brief invalidated copy constructor MSVehicleControl(const MSVehicleControl& s); diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicle.cpp sumo-1.2.0+dfsg1/src/microsim/MSVehicle.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSVehicle.cpp 2018-12-17 23:00:33.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,16 +51,18 @@ #include #include #include -#include +#include #include #include #include #include +#include #include #include #include #include #include +#include "MSEdgeControl.h" #include "MSVehicleControl.h" #include "MSVehicleTransfer.h" #include "MSGlobals.h" @@ -88,6 +90,7 @@ //#define DEBUG_CHECKREWINDLINKLANES //#define DEBUG_EXEC_MOVE //#define DEBUG_FURTHER +//#define DEBUG_SETFURTHER //#define DEBUG_TARGET_LANE //#define DEBUG_STOPS //#define DEBUG_BESTLANES @@ -95,10 +98,13 @@ //#define DEBUG_ACTIONSTEPS //#define DEBUG_NEXT_TURN //#define DEBUG_TRACI +//#define DEBUG_REVERSE_BIDI +//#define DEBUG_REPLACE_ROUTE //#define DEBUG_COND (getID() == "follower") //#define DEBUG_COND (true) #define DEBUG_COND (isSelected()) //#define DEBUG_COND2(obj) (obj->getID() == "follower") +#define DEBUG_COND2(obj) (obj->isSelected()) #define STOPPING_PLACE_OFFSET 0.5 @@ -110,6 +116,8 @@ // @todo Calibrate with real-world values / make configurable #define DIST_TO_STOPLINE_EXPECT_PRIORITY 1.0 +#define NUMERICAL_EPS_SPEED (0.1 * NUMERICAL_EPS * TS) + // =========================================================================== // static value definitions // =========================================================================== @@ -240,17 +248,69 @@ /* ------------------------------------------------------------------------- * methods of MSVehicle::Influencer::GapControlState * ----------------------------------------------------------------------- */ +void +MSVehicle::Influencer::GapControlVehStateListener::vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& /*info*/) { +// std::cout << "GapControlVehStateListener::vehicleStateChanged() vehicle=" << vehicle->getID() << ", to=" << to << std::endl; + switch (to) { + case MSNet::VEHICLE_STATE_STARTING_TELEPORT: + case MSNet::VEHICLE_STATE_ARRIVED: + case MSNet::VEHICLE_STATE_STARTING_PARKING: { + // Vehicle left road +// Look up reference vehicle in refVehMap and in case deactivate corresponding gap control + const MSVehicle* msVeh = static_cast(vehicle); +// std::cout << "GapControlVehStateListener::vehicleStateChanged() vehicle=" << vehicle->getID() << " left the road." << std::endl; + if (GapControlState::refVehMap.find(msVeh) != end(GapControlState::refVehMap)) { +// std::cout << "GapControlVehStateListener::deactivating ref vehicle=" << vehicle->getID() << std::endl; + GapControlState::refVehMap[msVeh]->deactivate(); + } + } + break; + default: + {}; + // do nothing, vehicle still on road + } +} + +std::map +MSVehicle::Influencer::GapControlState::refVehMap; + +MSVehicle::Influencer::GapControlVehStateListener +MSVehicle::Influencer::GapControlState::vehStateListener; + MSVehicle::Influencer::GapControlState::GapControlState() : tauOriginal(-1), tauCurrent(-1), tauTarget(-1), addGapCurrent(-1), addGapTarget(-1), - remainingDuration(-1), changeRate(-1), maxDecel(-1), active(false), gapAttained(false), prevLeader(nullptr), + remainingDuration(-1), changeRate(-1), maxDecel(-1), referenceVeh(nullptr), active(false), gapAttained(false), prevLeader(nullptr), lastUpdate(-1), timeHeadwayIncrement(0.0), spaceHeadwayIncrement(0.0) {} +MSVehicle::Influencer::GapControlState::~GapControlState() { + deactivate(); +} + void -MSVehicle::Influencer::GapControlState::activate(double tauOrig, double tauNew, double additionalGap, double dur, double rate, double decel) { +MSVehicle::Influencer::GapControlState::init() { +// std::cout << "GapControlState::init()" << std::endl; + if (MSNet::hasInstance()) { + MSNet::VehicleStateListener* vsl = dynamic_cast(&vehStateListener); + MSNet::getInstance()->addVehicleStateListener(vsl); + } else { + WRITE_ERROR("MSVehicle::Influencer::GapControlState::init(): No MSNet instance found!") + } +} + +void +MSVehicle::Influencer::GapControlState::cleanup() { + MSNet::VehicleStateListener* vsl = dynamic_cast(&vehStateListener); + MSNet::getInstance()->removeVehicleStateListener(vsl); +} + +void +MSVehicle::Influencer::GapControlState::activate(double tauOrig, double tauNew, double additionalGap, double dur, double rate, double decel, const MSVehicle* refVeh) { if (MSGlobals::gUseMesoSim) { WRITE_ERROR("No gap control available for meso.") } else { + // always deactivate control before activating (triggers clean-up of refVehMap) +// std::cout << "activate gap control with refVeh=" << (refVeh==nullptr? "NULL" : refVeh->getID()) << std::endl; tauOriginal = tauOrig; tauCurrent = tauOrig; tauTarget = tauNew; @@ -259,18 +319,29 @@ remainingDuration = dur; changeRate = rate; maxDecel = decel; + referenceVeh = refVeh; active = true; gapAttained = false; prevLeader = nullptr; lastUpdate = SIMSTEP - DELTA_T; - timeHeadwayIncrement = changeRate*TS*(tauTarget - tauOriginal); - spaceHeadwayIncrement = changeRate*TS*addGapTarget; + timeHeadwayIncrement = changeRate * TS * (tauTarget - tauOriginal); + spaceHeadwayIncrement = changeRate * TS * addGapTarget; + + if (referenceVeh != nullptr) { + // Add refVeh to refVehMap + GapControlState::refVehMap[referenceVeh] = this; + } } } void MSVehicle::Influencer::GapControlState::deactivate() { active = false; + if (referenceVeh != nullptr) { + // Remove corresponding refVehMapEntry if appropriate + GapControlState::refVehMap.erase(referenceVeh); + referenceVeh = nullptr; + } } @@ -300,6 +371,15 @@ MSVehicle::Influencer::~Influencer() {} +void +MSVehicle::Influencer::init() { + GapControlState::init(); +} + +void +MSVehicle::Influencer::cleanup() { + GapControlState::cleanup(); +} void MSVehicle::Influencer::setSpeedTimeLine(const std::vector >& speedTimeLine) { @@ -308,11 +388,11 @@ } void -MSVehicle::Influencer::activateGapController(double originalTau, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel) { +MSVehicle::Influencer::activateGapController(double originalTau, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, MSVehicle* refVeh) { if (myGapControlState == nullptr) { myGapControlState = std::make_shared(); } - myGapControlState->activate(originalTau, newTimeHeadway, newSpaceHeadway, duration, changeRate, maxDecel); + myGapControlState->activate(originalTau, newTimeHeadway, newSpaceHeadway, duration, changeRate, maxDecel, refVeh); } void @@ -327,6 +407,15 @@ myLaneTimeLine = laneTimeLine; } + +void +MSVehicle::Influencer::adaptLaneTimeLine(int indexShift) { + for (auto& item : myLaneTimeLine) { + item.second += indexShift; + } +} + + void MSVehicle::Influencer::setSublaneChange(double latDist) { myLatDist = latDist; @@ -367,7 +456,7 @@ SUMOTime MSVehicle::Influencer::getLaneTimeLineEnd() { - if(!myLaneTimeLine.empty()) { + if (!myLaneTimeLine.empty()) { return myLaneTimeLine.back().first; } else { return -1; @@ -412,10 +501,10 @@ #ifdef DEBUG_TRACI if DEBUG_COND2(veh) { std::cout << currentTime << " Influencer::gapControlSpeed(): speed=" << speed - << ", vSafe=" << vSafe - << ", vMin=" << vMin - << ", vMax=" << vMax - << std::endl; + << ", vSafe=" << vSafe + << ", vMin=" << vMin + << ", vMax=" << vMax + << std::endl; } #endif double gapControlSpeed = speed; @@ -424,24 +513,48 @@ const double currentSpeed = veh->getSpeed(); const MSVehicle* msVeh = dynamic_cast(veh); assert(msVeh != nullptr); - const double desiredTargetTimeSpacing = myGapControlState->tauTarget*currentSpeed; - std::pair leaderInfo = msVeh->getLeader(MAX2(desiredTargetTimeSpacing, myGapControlState->addGapCurrent) + 20.); + const double desiredTargetTimeSpacing = myGapControlState->tauTarget * currentSpeed; + std::pair leaderInfo; + if (myGapControlState->referenceVeh == nullptr) { + // No reference vehicle specified -> use current leader as reference + leaderInfo = msVeh->getLeader(MAX2(desiredTargetTimeSpacing, myGapControlState->addGapCurrent) + 20.); + } else { + // Control gap wrt reference vehicle + const MSVehicle* leader = myGapControlState->referenceVeh; + double dist = msVeh->getDistanceToPosition(leader->getPositionOnLane(), leader->getEdge()) - leader->getLength(); + if (dist > 100000) { + // Reference vehicle was not found downstream the ego's route + // Maybe, it is behind the ego vehicle + dist = - leader->getDistanceToPosition(msVeh->getPositionOnLane(), msVeh->getEdge()) - leader->getLength(); +#ifdef DEBUG_TRACI + if DEBUG_COND2(veh) { + if (dist < -100000) { + // also the ego vehicle is not ahead of the reference vehicle -> no CF-relation + std::cout << " Ego and reference vehicle are not in CF relation..." << std::endl; + } else { + std::cout << " Reference vehicle is behind ego..." << std::endl; + } + } +#endif + } + leaderInfo = std::make_pair(leader, dist - msVeh->getVehicleType().getMinGap()); + } const double fakeDist = MAX2(0.0, leaderInfo.second - myGapControlState->addGapCurrent); #ifdef DEBUG_TRACI - if DEBUG_COND2(veh) { - const double desiredCurrentSpacing = myGapControlState->tauCurrent*currentSpeed; - std::cout << " Gap control active:" - << " currentSpeed=" << currentSpeed - << ", desiredTargetTimeSpacing=" << desiredTargetTimeSpacing - << ", desiredCurrentSpacing=" << desiredCurrentSpacing - << ", leader=" << (leaderInfo.first==nullptr ? "NULL" : leaderInfo.first->getID()) - << ", dist=" << leaderInfo.second - << ", fakeDist=" << fakeDist - << ",\n tauOriginal=" << myGapControlState->tauOriginal - << ", tauTarget=" << myGapControlState->tauTarget - << ", tauCurrent=" << myGapControlState->tauCurrent - << std::endl; - } + if DEBUG_COND2(veh) { + const double desiredCurrentSpacing = myGapControlState->tauCurrent * currentSpeed; + std::cout << " Gap control active:" + << " currentSpeed=" << currentSpeed + << ", desiredTargetTimeSpacing=" << desiredTargetTimeSpacing + << ", desiredCurrentSpacing=" << desiredCurrentSpacing + << ", leader=" << (leaderInfo.first == nullptr ? "NULL" : leaderInfo.first->getID()) + << ", dist=" << leaderInfo.second + << ", fakeDist=" << fakeDist + << ",\n tauOriginal=" << myGapControlState->tauOriginal + << ", tauTarget=" << myGapControlState->tauTarget + << ", tauCurrent=" << myGapControlState->tauCurrent + << std::endl; + } #endif if (leaderInfo.first != nullptr) { if (myGapControlState->prevLeader != nullptr && myGapControlState->prevLeader != leaderInfo.first) { @@ -451,23 +564,23 @@ myGapControlState->prevLeader = leaderInfo.first; // Calculate desired following speed assuming the alternative headway time - MSCFModel* cfm = (MSCFModel*) &(msVeh->getVehicleType().getCarFollowModel()); + MSCFModel* cfm = (MSCFModel*) & (msVeh->getVehicleType().getCarFollowModel()); const double origTau = cfm->getHeadwayTime(); cfm->setHeadwayTime(myGapControlState->tauCurrent); gapControlSpeed = MIN2(gapControlSpeed, cfm->followSpeed(msVeh, currentSpeed, fakeDist, leaderInfo.first->getSpeed(), - leaderInfo.first->getVehicleType().getCarFollowModel().getApparentDecel(), nullptr)); + leaderInfo.first->getVehicleType().getCarFollowModel().getApparentDecel(), nullptr)); cfm->setHeadwayTime(origTau); #ifdef DEBUG_TRACI if DEBUG_COND2(veh) { - std::cout << " -> gapControlSpeed="< gapControlSpeed=" << gapControlSpeed; if (myGapControlState->maxDecel > 0) { - std::cout << ", with maxDecel bound: " << MAX2(gapControlSpeed, currentSpeed - TS*myGapControlState->maxDecel); + std::cout << ", with maxDecel bound: " << MAX2(gapControlSpeed, currentSpeed - TS * myGapControlState->maxDecel); } std::cout << std::endl; } #endif if (myGapControlState->maxDecel > 0) { - gapControlSpeed = MAX2(gapControlSpeed, currentSpeed - TS*myGapControlState->maxDecel); + gapControlSpeed = MAX2(gapControlSpeed, currentSpeed - TS * myGapControlState->maxDecel); } } @@ -486,7 +599,7 @@ myGapControlState->gapAttained = leaderInfo.first == nullptr || leaderInfo.second > MAX2(desiredTargetTimeSpacing, myGapControlState->addGapTarget) - POSITION_EPS; #ifdef DEBUG_TRACI if DEBUG_COND2(veh) { - if (myGapControlState->gapAttained){ + if (myGapControlState->gapAttained) { std::cout << " Target gap was established." << std::endl; } } @@ -495,9 +608,9 @@ // Count down remaining time if desired gap was established myGapControlState->remainingDuration -= TS; #ifdef DEBUG_TRACI - if DEBUG_COND2(veh) { - std::cout << " Gap control remaining duration: " << myGapControlState->remainingDuration << std::endl; - } + if DEBUG_COND2(veh) { + std::cout << " Gap control remaining duration: " << myGapControlState->remainingDuration << std::endl; + } #endif if (myGapControlState->remainingDuration <= 0) { #ifdef DEBUG_TRACI @@ -699,7 +812,10 @@ myRemotePos = myRemoteLane->getLength(); } if (myRemoteLane != nullptr && fabs(myRemotePosLat) < 0.5 * (myRemoteLane->getWidth() + v->getVehicleType().getWidth())) { - myRemoteLane->forceVehicleInsertion(v, myRemotePos, MSMoveReminder::NOTIFICATION_TELEPORT, myRemotePosLat); + MSMoveReminder::Notification notify = v->getDeparture() == NOT_YET_DEPARTED + ? MSMoveReminder::NOTIFICATION_DEPARTED + : MSMoveReminder::NOTIFICATION_TELEPORT_ARRIVED; + myRemoteLane->forceVehicleInsertion(v, myRemotePos, notify, myRemotePosLat); v->updateBestLanes(); if (!wasOnRoad) { v->drawOutsideNetwork(false); @@ -728,6 +844,9 @@ double MSVehicle::Influencer::implicitSpeedRemote(const MSVehicle* veh, double oldSpeed) { + if (veh->getPosition() == Position::INVALID) { + return oldSpeed; + } double dist = veh->getPosition().distanceTo2D(myRemoteXYPos); if (myRemoteLane != nullptr) { // if the vehicles is frequently placed on a new edge, the route may @@ -739,13 +858,15 @@ dist = distAlongRoute; } } - if (DIST2SPEED(dist) > veh->getCarFollowModel().maxNextSpeed(oldSpeed, veh) - || DIST2SPEED(dist) < veh->getCarFollowModel().minNextSpeedEmergency(oldSpeed, veh)) { - // implausible movement, keep old speed - return oldSpeed; - } else { - return DIST2SPEED(dist); - } + //std::cout << SIMTIME << " veh=" << veh->getID() << " oldPos=" << veh->getPosition() << " traciPos=" << myRemoteXYPos << " dist=" << dist << "\n"; + const double minSpeed = myConsiderMaxDeceleration ? + veh->getCarFollowModel().minNextSpeedEmergency(oldSpeed, veh) : 0; + const double maxSpeed = (myRemoteLane != nullptr + ? myRemoteLane->getVehicleMaxSpeed(veh) + : (veh->getLane() != nullptr + ? veh->getLane()->getVehicleMaxSpeed(veh) + : veh->getVehicleType().getMaxSpeed())); + return MIN2(maxSpeed, MAX2(minSpeed, DIST2SPEED(dist))); } double @@ -902,9 +1023,7 @@ } myLaneChangeModel = MSAbstractLaneChangeModel::build(type->getLaneChangeModel(), *this); myCFVariables = type->getCarFollowModel().createVehicleVariables(); - if (type->getParameter().hasDriverState) { - createDriverState(); - } + myDriverState = static_cast(getDevice(typeid(MSDevice_DriverState))); myNextDriveItem = myLFLinkLanes.begin(); } @@ -965,7 +1084,7 @@ if (onInit) { myCurrEdge = newRoute->begin(); } else { - MSRouteIterator newCurrEdge = find(edges.begin() + offset, edges.end(), *myCurrEdge);; + MSRouteIterator newCurrEdge = std::find(edges.begin() + offset, edges.end(), *myCurrEdge);; if (myLane->getEdge().isInternal() && ( (newCurrEdge + 1) == edges.end() || (*(newCurrEdge + 1)) != &(myLane->getOutgoingViaLanes().front().first->getEdge()))) { return false; @@ -989,14 +1108,51 @@ addStops(!MSGlobals::gCheckRoutes); } else { // recheck old stops + MSRouteIterator searchStart = myCurrEdge; + double lastPos = getPositionOnLane(); + if (myLane != nullptr && myLane->isInternal() + && myStops.size() > 0 && !myStops.front().lane->isInternal()) { + // searchStart is still incoming to the intersection so lastPos + // relative to that edge must be adapted + lastPos += (*myCurrEdge)->getLength(); + } +#ifdef DEBUG_REPLACE_ROUTE + if (DEBUG_COND) { + std::cout << " replaceRoute on " << (*myCurrEdge)->getID() << " lane=" << myLane->getID() << "\n"; + } +#endif for (std::list::iterator iter = myStops.begin(); iter != myStops.end();) { - if (removeStops && find(myCurrEdge, edges.end(), &iter->lane->getEdge()) == edges.end()) { - iter = myStops.erase(iter); + double endPos = iter->getEndPos(*this); +#ifdef DEBUG_REPLACE_ROUTE + if (DEBUG_COND) { + std::cout << " stopEdge=" << iter->lane->getEdge().getID() << " start=" << (searchStart - myCurrEdge) << " endPos=" << endPos << " lastPos=" << lastPos << "\n"; + } +#endif + if (*searchStart != &iter->lane->getEdge() + || endPos < lastPos) { + if (searchStart != edges.end() && !iter->reached) { + searchStart++; + } + } + lastPos = endPos; + + iter->edge = std::find(searchStart, edges.end(), &iter->lane->getEdge()); +#ifdef DEBUG_REPLACE_ROUTE + if (DEBUG_COND) { + std::cout << " foundIndex=" << (iter->edge - myCurrEdge) << " end=" << (edges.end() - myCurrEdge) << "\n"; + } +#endif + if (iter->edge == edges.end()) { + if (removeStops) { + iter = myStops.erase(iter); + continue; + } else { + assert(false); + } } else { - // iter->edge may point to edges.end() if removeStops is false but it should be replaced by the triggered rerouter anyway - iter->edge = find(myCurrEdge, edges.end(), &iter->lane->getEdge()); - ++iter; + searchStart = iter->edge; } + ++iter; } // add new stops if (addRouteStops) { @@ -1013,13 +1169,14 @@ myLastBestLanesEdge = nullptr; myLastBestLanesInternalLane = nullptr; updateBestLanes(true, onInit ? (*myCurrEdge)->getLanes().front() : 0); + assert(!removeStops || haveValidStopEdges()); return true; } bool MSVehicle::willPass(const MSEdge* const edge) const { - return find(myCurrEdge, myRoute->end(), edge) != myRoute->end(); + return std::find(myCurrEdge, myRoute->end(), edge) != myRoute->end(); } @@ -1259,8 +1416,34 @@ } #endif myAngle = angle; + MSLane* next = myLane; if (straightenFurther && myFurtherLanesPosLat.size() > 0) { - myFurtherLanesPosLat[myFurtherLanesPosLat.size() - 1] = getLateralPositionOnLane(); + for (int i = 0; i < (int)myFurtherLanes.size(); i++) { + MSLane* further = myFurtherLanes[i]; + if (further->getLinkTo(next) != nullptr) { + myFurtherLanesPosLat[i] = getLateralPositionOnLane(); + next = further; + } else { + break; + } + } + } +} + + +void +MSVehicle::setActionStepLength(double actionStepLength, bool resetOffset) { + SUMOTime actionStepLengthMillisecs = SUMOVehicleParserHelper::processActionStepLength(actionStepLength); + SUMOTime previousActionStepLength = getActionStepLength(); + const bool newActionStepLength = actionStepLengthMillisecs != previousActionStepLength; + if (newActionStepLength) { + getSingularType().setActionStepLength(actionStepLengthMillisecs, resetOffset); + if (!resetOffset) { + updateActionOffset(previousActionStepLength, actionStepLengthMillisecs); + } + } + if (resetOffset) { + resetActionOffset(); } } @@ -1319,6 +1502,11 @@ } else { if (getLaneChangeModel().isChangingLanes() && myFurtherLanes.size() > 0 && getLaneChangeModel().getShadowLane(myFurtherLanes.back()) == nullptr) { // special case where the target lane has no predecessor +#ifdef DEBUG_FURTHER + if (DEBUG_COND) { + std::cout << " getBackPosition veh=" << getID() << " specialCase using myLane=" << myLane->getID() << " pos=0 posLat=" << myState.myPosLat << " result=" << myLane->geometryPositionAtOffset(0, posLat) << "\n"; + } +#endif return myLane->geometryPositionAtOffset(0, posLat); } else { #ifdef DEBUG_FURTHER @@ -1390,7 +1578,7 @@ if (searchStart == nullptr) { searchStart = &myCurrEdge; } - stop.edge = find(*searchStart, myRoute->end(), stopEdge); + stop.edge = std::find(*searchStart, myRoute->end(), stopEdge); MSRouteIterator prevStopEdge = myCurrEdge; MSEdge* prevEdge = nullptr; double prevStopPos = myState.myPos; @@ -1402,11 +1590,11 @@ prevEdge = &myStops.back().lane->getEdge(); prevStopPos = myStops.back().pars.endPos; iter = myStops.end(); - stop.edge = find(prevStopEdge, myRoute->end(), stopEdge); + stop.edge = std::find(prevStopEdge, myRoute->end(), stopEdge); if (prevStopEdge == stop.edge // laneEdge check is insufficient for looped routes && prevEdge == &stop.lane->getEdge() // route iterator check insufficient for internal lane stops && prevStopPos > stop.pars.endPos) { - stop.edge = find(prevStopEdge + 1, myRoute->end(), stopEdge); + stop.edge = std::find(prevStopEdge + 1, myRoute->end(), stopEdge); } } } else { @@ -1425,7 +1613,7 @@ ++iter; --index; } - stop.edge = find(prevStopEdge, myRoute->end(), stopEdge); + stop.edge = std::find(prevStopEdge, myRoute->end(), stopEdge); } } const bool sameEdgeAsLastStop = prevStopEdge == stop.edge && prevEdge == &stop.lane->getEdge(); @@ -1438,6 +1626,7 @@ return addStop(stopPar, errorMsg, untilOffset, collision, &next); } errorMsg = errorMsgStart + " for vehicle '" + myParameter->id + "' on lane '" + stopPar.lane + "' is not downstream the current route."; + //std::cout << " could not add stop " << errorMsgStart << " prevStops=" << myStops.size() << " searchStart=" << (*searchStart - myRoute->begin()) << " route=" << toString(myRoute->getEdges()) << "\n"; return false; } // David.C: @@ -1492,6 +1681,9 @@ } } myStops.insert(iter, stop); + //std::cout << " added stop " << errorMsgStart << " totalStops=" << myStops.size() << " searchStart=" << (*searchStart - myRoute->begin()) + // << " routeIndex=" << (stop.edge - myRoute->begin()) + // << " route=" << toString(myRoute->getEdges()) << "\n"; return true; } @@ -1499,71 +1691,37 @@ bool MSVehicle::replaceParkingArea(MSParkingArea* parkingArea, std::string& errorMsg) { // Check if there is a parking area to be replaced - assert(parkingArea != 0); - if (myStops.empty()) { - errorMsg = "Vehicle '" + myParameter->id + "' has no stops."; + if (parkingArea == 0) { + errorMsg = "new parkingArea is NULL"; return false; } - SUMOVehicleParameter::Stop stopPar; - Stop stop = myStops.front(); - if (stop.reached) { - errorMsg = "current stop already reached"; + if (myStops.size() == 0) { + errorMsg = "vehicle has no stops"; return false; } - if (stop.parkingarea == nullptr) { - errorMsg = "current stop is not a parkingArea"; + if (myStops.front().parkingarea == 0) { + errorMsg = "first stop is not at parkingArea"; return false; } - if (stop.parkingarea == parkingArea) { - errorMsg = "current stop is the same as the new parking area"; - return false; - } - stopPar.lane = parkingArea->getLane().getID(); - - // merge duplicated stops equals to parking area - int removeStops = 0; - SUMOTime duration = 0; - - for (std::list::const_iterator iter = myStops.begin(); iter != myStops.end(); ++iter) { - if (duration == 0) { - duration = iter->duration; - ++removeStops; + Stop& first = myStops.front(); + SUMOVehicleParameter::Stop& stopPar = const_cast(first.pars); + // merge subsequent duplicate stops equals to parking area + for (std::list::iterator iter = ++myStops.begin(); iter != myStops.end();) { + if (iter->parkingarea == parkingArea) { + stopPar.duration += iter->duration; + myStops.erase(iter++); } else { - if (iter->parkingarea != nullptr && iter->parkingarea == parkingArea) { - duration += iter->duration; - ++removeStops; - } else { - break; - } + break; } } - - stopPar.index = 0; - stopPar.busstop = ""; - stopPar.chargingStation = ""; - stopPar.containerstop = ""; + stopPar.lane = parkingArea->getLane().getID(); stopPar.parkingarea = parkingArea->getID(); stopPar.startPos = parkingArea->getBeginLanePosition(); stopPar.endPos = parkingArea->getEndLanePosition(); - stopPar.duration = duration; - stopPar.until = stop.pars.until; - stopPar.awaitedPersons = stop.pars.awaitedPersons; - stopPar.awaitedContainers = stop.pars.awaitedContainers; - stopPar.triggered = stop.pars.triggered; - stopPar.containerTriggered = stop.pars.containerTriggered; - stopPar.parking = stop.pars.parking; - stopPar.parametersSet = stop.pars.parametersSet; - - // remove stops equals to parking area - while (removeStops > 0) { - myStops.pop_front(); - --removeStops; - } - const bool result = addStop(stopPar, errorMsg); - if (myLane != nullptr) { - updateBestLanes(true); - } - return result; + first.edge = myRoute->end(); // will be patched in replaceRoute + first.lane = &parkingArea->getLane(); + first.parkingarea = parkingArea; + return true; } @@ -1581,6 +1739,16 @@ } +MSParkingArea* +MSVehicle::getCurrentParkingArea() { + MSParkingArea* currentParkingArea = nullptr; + if (isParking()) { + currentParkingArea = myStops.begin()->parkingarea; + } + return currentParkingArea; +} + + bool MSVehicle::isStopped() const { return !myStops.empty() && myStops.begin()->reached /*&& myState.mySpeed < SUMO_const_haltingSpeed @todo #1864#*/; @@ -1626,7 +1794,7 @@ bool MSVehicle::isParking() const { return isStopped() && myStops.begin()->pars.parking && ( - myStops.begin()->parkingarea == nullptr || !myStops.begin()->parkingarea->parkOnRoad()); + myStops.begin()->parkingarea == nullptr || !myStops.begin()->parkingarea->parkOnRoad()); } @@ -1780,7 +1948,7 @@ // if the stop is a parking area we check if there is a free position on the area if (stop.parkingarea != nullptr) { fitsOnStoppingPlace &= myState.myPos > stop.parkingarea->getBeginLanePosition(); - if (stop.parkingarea->getOccupancy() == stop.parkingarea->getCapacity()) { + if (stop.parkingarea->getOccupancy() >= stop.parkingarea->getCapacity()) { fitsOnStoppingPlace = false; // trigger potential parkingZoneReroute for (std::vector< MSMoveReminder* >::const_iterator rem = myLane->getMoveReminders().begin(); rem != myLane->getMoveReminders().end(); ++rem) { @@ -1794,9 +1962,9 @@ } } } - const double targetPos = (myLFLinkLanes.empty() - ? stop.getEndPos(*this) // loading simulation state - : myState.myPos + myLFLinkLanes.front().myDistance); // avoid concurrent read/write to stoppingPlace during execute move; + const double targetPos = (myLFLinkLanes.empty() + ? stop.getEndPos(*this) // loading simulation state + : myState.myPos + myLFLinkLanes.front().myDistance); // avoid concurrent read/write to stoppingPlace during execute move; const double reachedThreshold = (useStoppingPlace ? targetPos - STOPPING_PLACE_OFFSET : stop.pars.startPos) - NUMERICAL_EPS; #ifdef DEBUG_STOPS if (DEBUG_COND) { @@ -1836,6 +2004,10 @@ // let the parking area know the vehicle stop.parkingarea->enter(this, myState.pos() + getVehicleType().getMinGap(), myState.pos() - myType->getLength()); } + + if (stop.pars.tripId != "") { + ((SUMOVehicleParameter&)getParameter()).setParameter("tripId", stop.pars.tripId); + } } } } @@ -1844,14 +2016,57 @@ const ConstMSEdgeVector -MSVehicle::getStopEdges() const { +MSVehicle::getStopEdges(double& firstPos, double& lastPos) const { + assert(haveValidStopEdges()); ConstMSEdgeVector result; + const Stop* prev = nullptr; + for (const Stop& stop : myStops) { + if (stop.reached) { + continue; + } + const double stopPos = stop.getEndPos(*this); + if (prev == nullptr + || prev->edge != stop.edge + || prev->getEndPos(*this) > stopPos) { + result.push_back(*stop.edge); + } + prev = &stop; + if (firstPos < 0) { + firstPos = stopPos; + } + lastPos = stopPos; + } + //std::cout << "getStopEdges veh=" << getID() << " result=" << toString(result) << "\n"; + return result; +} + + +std::vector > +MSVehicle::getStopIndices() const { + std::vector > result; for (std::list::const_iterator iter = myStops.begin(); iter != myStops.end(); ++iter) { - result.push_back(*iter->edge); + result.push_back(std::make_pair( + (int)(iter->edge - myRoute->begin()), + iter->getEndPos(*this))); } return result; } +bool +MSVehicle::stopsAt(MSStoppingPlace* stop) const { + if (stop == nullptr) { + return false; + } + for (const Stop& s : myStops) { + if (s.busstop == stop + || s.containerstop == stop + || s.parkingarea == stop + || s.chargingStation == stop) { + return true; + } + } + return false; +} double MSVehicle::getBrakeGap() const { @@ -1880,11 +2095,13 @@ return myActionStep; } + void MSVehicle::resetActionOffset(const SUMOTime timeUntilNextAction) { myLastActionTime = MSNet::getInstance()->getCurrentTimeStep() + timeUntilNextAction; } + void MSVehicle::updateActionOffset(const SUMOTime oldActionStepLength, const SUMOTime newActionStepLength) { SUMOTime now = MSNet::getInstance()->getCurrentTimeStep(); @@ -1910,7 +2127,8 @@ if (DEBUG_COND) { std::cout << "\nPLAN_MOVE\n" - << STEPS2TIME(t) + << SIMTIME + << std::setprecision(gPrecision) << " veh=" << getID() << " lane=" << myLane->getID() << " pos=" << getPositionOnLane() @@ -1919,6 +2137,12 @@ << "\n"; } #endif + // Update the driver state + if (hasDriverState()) { + myDriverState->update(); + setActionStepLength(myDriverState->getDriverState()->getActionStepLength(), false); + } + if (!checkActionStep(t)) { #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { @@ -1935,6 +2159,7 @@ std::cout << STEPS2TIME(t) << " vehicle = '" << getID() << "' takes action." << std::endl; } #endif + myLFLinkLanesPrev = myLFLinkLanes; planMoveInternal(t, ahead, myLFLinkLanes, myStopDist, myNextTurn); #ifdef DEBUG_PLAN_MOVE @@ -1958,10 +2183,6 @@ void MSVehicle::planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector& lfLinks, double& myStopDist, std::pair& myNextTurn) const { - // Serving the task difficulty interface - if (hasDriverState()) { - myDriverState->update(); - } lfLinks.clear(); myStopDist = std::numeric_limits::max(); // @@ -2005,7 +2226,7 @@ double seen = opposite ? myState.myPos : myLane->getLength() - myState.myPos; myNextTurn.first = seen; myNextTurn.second = LINKDIR_NODIR; - bool encounteredTurn = false; + bool encounteredTurn = (MSGlobals::gLateralResolution <= 0); // next turn is only needed for sublane double seenNonInternal = 0; double seenInternal = myLane->isInternal() ? seen : 0; double vLinkPass = MIN2(cfModel.estimateSpeedAfterDistance(seen, v, cfModel.getMaxAccel()), laneMaxV); // upper bound @@ -2132,7 +2353,7 @@ #ifdef DEBUG_NEXT_TURN if DEBUG_COND { std::cout << SIMTIME << " veh '" << getID() << "' nextTurn: " << toString(myNextTurn.second) - << " at " << myNextTurn.first << "m." << std::endl; + << " at " << myNextTurn.first << "m." << std::endl; } #endif } @@ -2180,7 +2401,8 @@ } #ifdef DEBUG_PLAN_MOVE if (DEBUG_COND) { - std::cout << " braking for link end: overlap=" << getLateralOverlap() << " va=" << va << " committed=" << getLaneChangeModel().getCommittedSpeed() << " v=" << v << "\n"; + std::cout << " braking for link end lane=" << lane->getID() << " seen=" << seen + << " overlap=" << getLateralOverlap() << " va=" << va << " committed=" << getLaneChangeModel().getCommittedSpeed() << " v=" << v << "\n"; } #endif @@ -2205,10 +2427,11 @@ const double majorStopOffset = MAX2(DIST_TO_STOPLINE_EXPECT_PRIORITY, lane->getStopOffset(this)); const double minorStopOffset = lane->getStopOffset(this); const double brakeDist = cfModel.brakeGap(myState.mySpeed, cfModel.getMaxDecel(), 0); - const bool canBrake = seen >= brakeDist; + const bool canBrakeBeforeLaneEnd = seen >= brakeDist; + const bool canBrakeBeforeStopLine = seen - lane->getStopOffset(this) >= brakeDist; if (yellowOrRed) { // Wait at red traffic light with full distance if possible - if (canBrake) { + if (canBrakeBeforeLaneEnd) { laneStopOffset = MIN2(majorStopOffset, seen - brakeDist); } else { laneStopOffset = majorStopOffset; @@ -2226,9 +2449,13 @@ #ifdef DEBUG_PLAN_MOVE if DEBUG_COND { std::cout << SIMTIME << " veh=" << getID() << " effective stopOffset on lane '" << lane->getID() - << "' is " << laneStopOffset << " (-> stopDist=" << stopDist << ")" << std::endl; + << "' is " << laneStopOffset << " (-> stopDist=" << stopDist << ")" << std::endl; } #endif + // check for train direction reversal + if (canBrakeBeforeLaneEnd && canReverse(laneMaxV)) { + lfLinks.push_back(DriveProcessItem(*link, vMinComfortable, vMinComfortable, false, t, vMinComfortable, 0, 0, seen)); + } // check whether we need to slow down in order to finish a continuous lane change if (getLaneChangeModel().isChangingLanes()) { @@ -2241,8 +2468,8 @@ const double timeRemaining = STEPS2TIME(getLaneChangeModel().remainingTime()); assert(timeRemaining != 0); // XXX: Euler-logic (#860), but I couldn't identify problems from this yet (Leo). Refs. #2575 - const double va = MAX2(cfModel.stopSpeed(this, getSpeed(), seen - POSITION_EPS), - (seen - POSITION_EPS) / timeRemaining); + const double va = MAX2(cfModel.stopSpeed(this, getSpeed(), seen - POSITION_EPS), + (seen - POSITION_EPS) / timeRemaining); #ifdef DEBUG_PLAN_MOVE if (DEBUG_COND) { std::cout << SIMTIME << " veh=" << getID() << " slowing down to finish continuous change before" @@ -2262,7 +2489,7 @@ // - do not issue a request to enter an intersection after we already slowed down for an earlier one const bool abortRequestAfterMinor = slowedDownForMinor && (*link)->getInternalLaneBefore() == nullptr; // - even if red, if we cannot break we should issue a request - bool setRequest = (v > 0 && !abortRequestAfterMinor) || (leavingCurrentIntersection); + bool setRequest = (v > NUMERICAL_EPS_SPEED && !abortRequestAfterMinor) || (leavingCurrentIntersection); double vLinkWait = MIN2(v, cfModel.stopSpeed(this, getSpeed(), stopDist)); #ifdef DEBUG_PLAN_MOVE @@ -2272,13 +2499,19 @@ << " vLinkWait=" << vLinkWait << " brakeDist=" << brakeDist << " seen=" << seen + << " leaveIntersection=" << leavingCurrentIntersection + << " setRequest=" << setRequest + //<< std::setprecision(16) + //<< " v=" << v + //<< " speedEps=" << NUMERICAL_EPS_SPEED + //<< std::setprecision(gPrecision) << "\n"; } #endif // TODO: Consider option on the CFModel side to allow red/yellow light violation - if (yellowOrRed && canBrake && !ignoreRed(*link, canBrake)) { + if (yellowOrRed && canBrakeBeforeStopLine && !ignoreRed(*link, canBrakeBeforeStopLine)) { if (lane->isInternal()) { checkLinkLeaderCurrentAndParallel(*link, lane, seen, lastLink, v, vLinkPass, vLinkWait, setRequest); } @@ -2288,12 +2521,12 @@ break; } - if (ignoreRed(*link, canBrake) && STEPS2TIME(t - (*link)->getLastStateChange()) > 2) { + if (ignoreRed(*link, canBrakeBeforeStopLine) && STEPS2TIME(t - (*link)->getLastStateChange()) > 2) { // restrict speed when ignoring a red light const double redSpeed = MIN2(v, getVehicleType().getParameter().getJMParam(SUMO_ATTR_JM_DRIVE_RED_SPEED, v)); const double va = MAX2(redSpeed, cfModel.freeSpeed(this, getSpeed(), seen, redSpeed)); v = MIN2(va, v); -#ifdef DEBUG_EXEC_MOVE +#ifdef DEBUG_PLAN_MOVE if (DEBUG_COND) std::cout << " ignoreRed spent=" << STEPS2TIME(t - (*link)->getLastStateChange()) << " redSpeed=" << redSpeed @@ -2582,11 +2815,11 @@ } else { #ifdef DEBUG_PLAN_MOVE if (DEBUG_COND) { - std::cout << SIMTIME << " veh=" << getID() << " linkLeader=" << leader->getID() - << " ET=" << myJunctionEntryTime << " lET=" << leader->myJunctionEntryTime - << " ETN=" << myJunctionEntryTimeNeverYield << " lETN=" << leader->myJunctionEntryTimeNeverYield - << " CET=" << myJunctionConflictEntryTime << " lCET=" << leader->myJunctionConflictEntryTime - << "\n"; + std::cout << SIMTIME << " veh=" << getID() << " linkLeader=" << leader->getID() + << " ET=" << myJunctionEntryTime << " lET=" << leader->myJunctionEntryTime + << " ETN=" << myJunctionEntryTimeNeverYield << " lETN=" << leader->myJunctionEntryTimeNeverYield + << " CET=" << myJunctionConflictEntryTime << " lCET=" << leader->myJunctionConflictEntryTime + << "\n"; } #endif adaptToLeader(it->vehAndGap, seen, lastLink, lane, v, vLinkPass, it->distToCrossing); @@ -2605,21 +2838,31 @@ || leader->isStopped() || leader->getWaitingTime() > TIME2STEPS(JUNCTION_BLOCKAGE_TIME))) { setRequest = false; +#ifdef DEBUG_PLAN_MOVE_LEADERINFO + if (DEBUG_COND) { + std::cout << " aborting request\n"; + } +#endif if (lastLink != nullptr && leader->getLane()->getLogicalPredecessorLane() == myLane) { // we are not yet on the junction so must abort that request as well // (or maybe we are already on the junction and the leader is a partial occupator beyond) lastLink->mySetRequest = false; +#ifdef DEBUG_PLAN_MOVE_LEADERINFO + if (DEBUG_COND) { + std::cout << " aborting previous request\n"; + } +#endif } } } #ifdef DEBUG_PLAN_MOVE_LEADERINFO else { if (DEBUG_COND) { - std::cout << SIMTIME << " veh=" << getID() << " ignoring leader " << leader->getID() - << " ET=" << myJunctionEntryTime << " lET=" << leader->myJunctionEntryTime - << " ETN=" << myJunctionEntryTimeNeverYield << " lETN=" << leader->myJunctionEntryTimeNeverYield - << " CET=" << myJunctionConflictEntryTime << " lCET=" << leader->myJunctionConflictEntryTime - << "\n"; + std::cout << SIMTIME << " veh=" << getID() << " ignoring leader " << leader->getID() + << " ET=" << myJunctionEntryTime << " lET=" << leader->myJunctionEntryTime + << " ETN=" << myJunctionEntryTimeNeverYield << " lETN=" << leader->myJunctionEntryTimeNeverYield + << " CET=" << myJunctionConflictEntryTime << " lCET=" << leader->myJunctionConflictEntryTime + << "\n"; } } #endif @@ -2644,6 +2887,15 @@ // 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); +#ifdef DEBUG_PLAN_MOVE_LEADERINFO + if (DEBUG_COND) { + std::cout << SIMTIME << " veh=" << getID() << " stopping before junction: lane=" << lane->getID() << " seen=" << seen + << " laneLength=" << lane->getLength() + << " stopDist=" << seen - lane->getLength() - POSITION_EPS + << " vsafeLeader=" << vsafeLeader + << "\n"; + } +#endif } if (distToCrossing >= 0) { // drive up to the crossing point with the current link leader @@ -2653,7 +2905,7 @@ } double -MSVehicle::getDeltaPos(double accel) { +MSVehicle::getDeltaPos(const double accel) const { double vNext = myState.mySpeed + ACCEL2SPEED(accel); if (MSGlobals::gSemiImplicitEulerUpdate) { // apply implicit Euler positional update @@ -2675,7 +2927,7 @@ } void -MSVehicle::processLinkAproaches(double& vSafe, double& vSafeMin, double& vSafeMinDist) { +MSVehicle::processLinkApproaches(double& vSafe, double& vSafeMin, double& vSafeMinDist) { // Speed limit due to zipper merging double vSafeZipper = std::numeric_limits::max(); @@ -2685,8 +2937,8 @@ // Get safe velocities from DriveProcessItems. assert(myLFLinkLanes.size() != 0 || isRemoteControlled()); - for (DriveItemVector::iterator i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { - MSLink* link = (*i).myLink; + for (const DriveProcessItem& dpi : myLFLinkLanes) { + MSLink* const link = dpi.myLink; #ifdef DEBUG_EXEC_MOVE if (DEBUG_COND) { @@ -2694,26 +2946,28 @@ << SIMTIME << " veh=" << getID() << " link=" << (link == 0 ? "NULL" : link->getViaLaneOrLane()->getID()) - << " req=" << (*i).mySetRequest - << " vP=" << (*i).myVLinkPass - << " vW=" << (*i).myVLinkWait - << " d=" << (*i).myDistance + << " req=" << dpi.mySetRequest + << " vP=" << dpi.myVLinkPass + << " vW=" << dpi.myVLinkWait + << " d=" << dpi.myDistance << "\n"; gDebugFlag1 = true; // See MSLink_DEBUG_OPENED } #endif // the vehicle must change the lane on one of the next lanes (XXX: refs to code further below???, Leo) - if (link != nullptr && (*i).mySetRequest) { + if (link != nullptr && dpi.mySetRequest) { const LinkState ls = link->getState(); // vehicles should brake when running onto a yellow light if the distance allows to halt in front const bool yellow = link->haveYellow(); - const bool canBrake = ((*i).myDistance > getCarFollowModel().brakeGap(myState.mySpeed, getCarFollowModel().getMaxDecel(), 0.) + const bool canBrake = (dpi.myDistance > getCarFollowModel().brakeGap(myState.mySpeed, getCarFollowModel().getMaxDecel(), 0.) || (MSGlobals::gSemiImplicitEulerUpdate && myState.mySpeed < ACCEL2SPEED(getCarFollowModel().getMaxDecel()))); - const bool ignoreRedLink = ignoreRed(link, canBrake); + assert(link->getLaneBefore() != nullptr); + const bool beyondStopLine = dpi.myDistance < link->getLaneBefore()->getStopOffset(this); + const bool ignoreRedLink = ignoreRed(link, canBrake) || beyondStopLine; if (yellow && canBrake && !ignoreRedLink) { - vSafe = (*i).myVLinkWait; + vSafe = dpi.myVLinkWait; myHaveToWaitOnNextLink = true; #ifdef DEBUG_CHECKREWINDLINKLANES if (DEBUG_COND) { @@ -2726,19 +2980,19 @@ const bool influencerPrio = (myInfluencer != nullptr && !myInfluencer->getRespectJunctionPriority()); std::vector collectFoes; bool opened = (yellow || influencerPrio - || link->opened((*i).myArrivalTime, (*i).myArrivalSpeed, (*i).getLeaveSpeed(), - getVehicleType().getLength(), + || link->opened(dpi.myArrivalTime, dpi.myArrivalSpeed, dpi.getLeaveSpeed(), + getVehicleType().getLength(), canBrake ? getImpatience() : 1, getCarFollowModel().getMaxDecel(), getWaitingTime(), getLateralPositionOnLane(), ls == LINKSTATE_ZIPPER ? &collectFoes : nullptr, ignoreRedLink, this)); if (opened && getLaneChangeModel().getShadowLane() != nullptr) { - MSLink* parallelLink = (*i).myLink->getParallelLink(getLaneChangeModel().getShadowDirection()); + MSLink* parallelLink = dpi.myLink->getParallelLink(getLaneChangeModel().getShadowDirection()); if (parallelLink != nullptr) { const double shadowLatPos = getLateralPositionOnLane() - getLaneChangeModel().getShadowDirection() * 0.5 * ( myLane->getWidth() + getLaneChangeModel().getShadowLane()->getWidth()); - opened = yellow || influencerPrio || (opened & parallelLink->opened((*i).myArrivalTime, (*i).myArrivalSpeed, (*i).getLeaveSpeed(), + opened = yellow || influencerPrio || (opened && parallelLink->opened(dpi.myArrivalTime, dpi.myArrivalSpeed, dpi.getLeaveSpeed(), getVehicleType().getLength(), getImpatience(), getCarFollowModel().getMaxDecel(), getWaitingTime(), shadowLatPos, nullptr, @@ -2758,22 +3012,22 @@ } // vehicles should decelerate when approaching a minor link #ifdef DEBUG_EXEC_MOVE - if (DEBUG_COND) { - std::cout << SIMTIME - << " opened=" << opened - << " influencerPrio=" << influencerPrio - << " linkPrio=" << link->havePriority() - << " lastContMajor=" << link->lastWasContMajor() - << " isCont=" << link->isCont() - << " ignoreRed=" << ignoreRedLink - << "\n"; - } + if (DEBUG_COND) { + std::cout << SIMTIME + << " opened=" << opened + << " influencerPrio=" << influencerPrio + << " linkPrio=" << link->havePriority() + << " lastContMajor=" << link->lastWasContMajor() + << " isCont=" << link->isCont() + << " ignoreRed=" << ignoreRedLink + << "\n"; + } #endif if (opened && !influencerPrio && !link->havePriority() && !link->lastWasContMajor() && !link->isCont() && !ignoreRedLink) { double visibilityDistance = link->getFoeVisibilityDistance(); - double determinedFoePresence = i->myDistance <= visibilityDistance; + double determinedFoePresence = dpi.myDistance <= visibilityDistance; if (!determinedFoePresence && (canBrake || !yellow)) { - vSafe = (*i).myVLinkWait; + vSafe = dpi.myVLinkWait; myHaveToWaitOnNextLink = true; #ifdef DEBUG_CHECKREWINDLINKLANES if (DEBUG_COND) { @@ -2796,11 +3050,11 @@ // XXX: 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. Refs. #1845, #2123 - vSafeMinDist = i->myDistance; // distance that must be covered + vSafeMinDist = dpi.myDistance; // distance that must be covered if (MSGlobals::gSemiImplicitEulerUpdate) { - vSafeMin = MIN2((double) DIST2SPEED(vSafeMinDist + POSITION_EPS), (*i).myVLinkPass); + vSafeMin = MIN2((double) DIST2SPEED(vSafeMinDist + POSITION_EPS), dpi.myVLinkPass); } else { - vSafeMin = MIN2((double) DIST2SPEED(2 * vSafeMinDist + NUMERICAL_EPS) - getSpeed(), (*i).myVLinkPass); + vSafeMin = MIN2((double) DIST2SPEED(2 * vSafeMinDist + NUMERICAL_EPS) - getSpeed(), dpi.myVLinkPass); } canBrakeVSafeMin = canBrake; #ifdef DEBUG_EXEC_MOVE @@ -2812,8 +3066,8 @@ } // have waited; may pass if opened... if (opened) { - vSafe = (*i).myVLinkPass; - if (vSafe < getCarFollowModel().getMaxDecel() && vSafe <= (*i).myVLinkWait && vSafe < getCarFollowModel().maxNextSpeed(getSpeed(), this)) { + vSafe = dpi.myVLinkPass; + if (vSafe < getCarFollowModel().getMaxDecel() && vSafe <= dpi.myVLinkWait && vSafe < getCarFollowModel().maxNextSpeed(getSpeed(), this)) { // this vehicle is probably not gonna drive across the next junction (heuristic) myHaveToWaitOnNextLink = true; #ifdef DEBUG_CHECKREWINDLINKLANES @@ -2824,9 +3078,9 @@ } } else if (link->getState() == LINKSTATE_ZIPPER) { vSafeZipper = MIN2(vSafeZipper, - link->getZipperSpeed(this, (*i).myDistance, (*i).myVLinkPass, (*i).myArrivalTime, &collectFoes)); + link->getZipperSpeed(this, dpi.myDistance, dpi.myVLinkPass, dpi.myArrivalTime, &collectFoes)); } else { - vSafe = (*i).myVLinkWait; + vSafe = dpi.myVLinkWait; myHaveToWaitOnNextLink = true; #ifdef DEBUG_CHECKREWINDLINKLANES if (DEBUG_COND) { @@ -2844,7 +3098,7 @@ break; } } else { - if (link != nullptr && link->isExitLink() && myLane->isInternal() && link->getJunction() == myLane->getEdge().getToJunction()) { + if (link != nullptr && link->getInternalLaneBefore() != nullptr && myLane->isInternal() && link->getJunction() == myLane->getEdge().getToJunction()) { // blocked on the junction. yield request so other vehicles may // become junction leader #ifdef DEBUG_EXEC_MOVE @@ -2856,7 +3110,7 @@ myJunctionConflictEntryTime = SUMOTime_MAX; } // we have: i->link == 0 || !i->setRequest - vSafe = (*i).myVLinkWait; + vSafe = dpi.myVLinkWait; if (vSafe < getSpeed()) { myHaveToWaitOnNextLink = true; #ifdef DEBUG_CHECKREWINDLINKLANES @@ -2864,6 +3118,13 @@ std::cout << SIMTIME << " veh=" << getID() << " haveToWait (no request, braking)\n"; } #endif + } else if (vSafe < SUMO_const_haltingSpeed) { + myHaveToWaitOnNextLink = true; +#ifdef DEBUG_CHECKREWINDLINKLANES + if (DEBUG_COND) { + std::cout << SIMTIME << " veh=" << getID() << " haveToWait (no request, stopping)\n"; + } +#endif } break; } @@ -2892,7 +3153,7 @@ std::cout << "vSafeMin Problem? vSafe=" << vSafe << " vSafeMin=" << vSafeMin << " vSafeMinDist=" << vSafeMinDist << std::endl; } #endif - if (canBrakeVSafeMin) { + if (canBrakeVSafeMin && vSafe < getSpeed()) { // cannot drive across a link so we need to stop before it vSafe = MIN2(vSafe, getCarFollowModel().stopSpeed(this, getSpeed(), vSafeMinDist)); vSafeMin = 0; @@ -2927,7 +3188,7 @@ #ifdef DEBUG_TRACI if DEBUG_COND2(this) { std::cout << SIMTIME << " MSVehicle::processTraCISpeedControl() for vehicle '" << getID() << "'" - << " vSafe=" << vSafe << " (init)vNext=" << vNext; + << " vSafe=" << vSafe << " (init)vNext=" << vNext; } #endif if (myInfluencer->isRemoteControlled()) { @@ -2954,7 +3215,7 @@ #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { std::cout << SIMTIME << " veh=" << getID() << " removePassedDriveItems()\n" - << " Current items: "; + << " Current items: "; for (auto& j : myLFLinkLanes) { if (j.myLink == 0) { std::cout << "\n Stop at distance " << j.myDistance; @@ -2989,7 +3250,7 @@ const MSLane* to = j->myLink->getViaLaneOrLane(); const MSLane* from = j->myLink->getLaneBefore(); std::cout << "Link at distance " << j->myDistance << ": '" - << (from == 0 ? "NONE" : from->getID()) << "' -> '" << (to == 0 ? "NONE" : to->getID()) << "'"; + << (from == 0 ? "NONE" : from->getID()) << "' -> '" << (to == 0 ? "NONE" : to->getID()) << "'"; } std::cout << std::endl; } @@ -3011,10 +3272,10 @@ DriveItemVector::iterator i; for (i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { std::cout - << " vPass=" << (*i).myVLinkPass - << " vWait=" << (*i).myVLinkWait - << " linkLane=" << ((*i).myLink == 0 ? "NULL" : (*i).myLink->getViaLaneOrLane()->getID()) - << " request=" << (*i).mySetRequest + << " vPass=" << dpi.myVLinkPass + << " vWait=" << dpi.myVLinkWait + << " linkLane=" << (dpi.myLink == 0 ? "NULL" : dpi.myLink->getViaLaneOrLane()->getID()) + << " request=" << dpi.mySetRequest << "\n"; } std::cout << " myNextDriveItem's linked lane: " << (myNextDriveItem->myLink == 0 ? "NULL" : myNextDriveItem->myLink->getViaLaneOrLane()->getID()) << std::endl; @@ -3146,10 +3407,10 @@ DriveItemVector::iterator i; for (i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { std::cout - << " vPass=" << (*i).myVLinkPass - << " vWait=" << (*i).myVLinkWait - << " linkLane=" << ((*i).myLink == 0 ? "NULL" : (*i).myLink->getViaLaneOrLane()->getID()) - << " request=" << (*i).mySetRequest + << " vPass=" << dpi.myVLinkPass + << " vWait=" << dpi.myVLinkWait + << " linkLane=" << (dpi.myLink == 0 ? "NULL" : dpi.myLink->getViaLaneOrLane()->getID()) + << " request=" << dpi.mySetRequest << "\n"; } } @@ -3165,10 +3426,10 @@ double pseudoFriction = (0.05 + 0.005 * getSpeed()) * getSpeed(); bool brakelightsOn = vNext < getSpeed() - ACCEL2SPEED(pseudoFriction); - if (vNext <= SUMO_const_haltingSpeed && !isStopped()) { + if (vNext <= SUMO_const_haltingSpeed) { brakelightsOn = true; } - if (brakelightsOn) { + if (brakelightsOn && !isStopped()) { switchOnSignal(VEH_SIGNAL_BRAKELIGHT); } else { switchOffSignal(VEH_SIGNAL_BRAKELIGHT); @@ -3201,9 +3462,22 @@ bool -MSVehicle::canReverse() const { +MSVehicle::canReverse(double speedThreshold) const { +#ifdef DEBUG_REVERSE_BIDI + if (DEBUG_COND) std::cout << SIMTIME << " canReverse lane=" << myLane->getID() + << " pos=" << myState.myPos + << " speed=" << std::setprecision(6) << getPreviousSpeed() << std::setprecision(gPrecision) + << " isRail=" << ((getVClass() & SVC_RAIL_CLASSES) != 0) + << " speedOk=" << (getPreviousSpeed() <= speedThreshold) + << " posOK=" << (myState.myPos <= myLane->getLength()) + << " normal=" << !myLane->isInternal() + << " routeOK=" << ((myCurrEdge + 1) != myRoute->end()) + << " bidi=" << (myLane->getEdge().getBidiEdge() == *(myCurrEdge + 1)) + << " stopOk=" << (myStops.empty() || myStops.front().edge != myCurrEdge) + << "\n"; +#endif if ((getVClass() & SVC_RAIL_CLASSES) != 0 - && getPreviousSpeed() <= SUMO_const_haltingSpeed + && getPreviousSpeed() <= speedThreshold && myState.myPos <= myLane->getLength() && !myLane->isInternal() && (myCurrEdge + 1) != myRoute->end() @@ -3211,16 +3485,19 @@ // ensure there are no further stops on this edge && (myStops.empty() || myStops.front().edge != myCurrEdge) ) { + //if (isSelected()) std::cout << " check1 passed\n"; // ensure that the vehicle is fully on bidi edges that allow reversal if ((int)(myRoute->end() - myCurrEdge) <= (int)myFurtherLanes.size()) { return false; } + //if (isSelected()) std::cout << " check2 passed\n"; // ensure that the turn-around connection exists from the current edge to it's bidi-edge const MSEdgeVector& succ = myLane->getEdge().getSuccessors(); if (std::find(succ.begin(), succ.end(), myLane->getEdge().getBidiEdge()) == succ.end()) { return false; } + //if (isSelected()) std::cout << " check3 passed\n"; int view = 2; for (MSLane* further : myFurtherLanes) { if (!further->getEdge().isInternal()) { @@ -3260,15 +3537,21 @@ myNextDriveItem = myLFLinkLanes.begin(); while (myNextDriveItem != myLFLinkLanes.end() && approachedLane != nullptr && myState.myPos > approachedLane->getLength()) { const MSLink* link = myNextDriveItem->myLink; + const double linkDist = myNextDriveItem->myDistance; ++myNextDriveItem; // check whether the vehicle was allowed to enter lane // otherwise it is decelerated and we do not need to test for it's // approach on the following lanes when a lane changing is performed // proceed to the next lane + if (approachedLane->mustCheckJunctionCollisions()) { + // vehicle moves past approachedLane within a single step, collision checking must still be done + MSNet::getInstance()->getEdgeControl().checkCollisionForInactive(approachedLane); + } if (link != nullptr) { approachedLane = link->getViaLaneOrLane(); if (myInfluencer == nullptr || myInfluencer->getEmergencyBrakeRedLight()) { - if (link->haveRed() && !ignoreRed(link, false)) { + bool beyondStopLine = linkDist < link->getLaneBefore()->getStopOffset(this); + if (link->haveRed() && !ignoreRed(link, false) && !beyondStopLine) { emergencyReason = " because of a red traffic light"; break; } @@ -3312,12 +3595,12 @@ } #ifdef DEBUG_PLAN_MOVE_LEADERINFO if (DEBUG_COND) { - std::cout << "Update junctionTimes link=" << link->getViaLaneOrLane()->getID() - << " entry=" << link->isEntryLink() << " conflict=" << link->isConflictEntryLink() << " exit=" << link->isExitLink() - << " ET=" << myJunctionEntryTime - << " ETN=" << myJunctionEntryTimeNeverYield - << " CET=" << myJunctionConflictEntryTime - << "\n"; + std::cout << "Update junctionTimes link=" << link->getViaLaneOrLane()->getID() + << " entry=" << link->isEntryLink() << " conflict=" << link->isConflictEntryLink() << " exit=" << link->isExitLink() + << " ET=" << myJunctionEntryTime + << " ETN=" << myJunctionEntryTimeNeverYield + << " CET=" << myJunctionConflictEntryTime + << "\n"; } #endif if (hasArrived()) { @@ -3387,11 +3670,11 @@ if (myActionStep) { // Actuate control (i.e. choose bounds for safe speed in current simstep (euler), resp. after current sim step (ballistic)) - processLinkAproaches(vSafe, vSafeMin, vSafeMinDist); + processLinkApproaches(vSafe, vSafeMin, vSafeMinDist); #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { std::cout << SIMTIME << " vehicle '" << getID() << "'\n" - " vsafe from processLinkApproaches(): vsafe " << vSafe << std::endl; + " vsafe from processLinkApproaches(): vsafe " << vSafe << std::endl; } #endif } else { @@ -3400,8 +3683,8 @@ #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { std::cout << SIMTIME << " vehicle '" << getID() << "' skips processLinkApproaches()\n" - " continues with constant accel " << myAcceleration << "...\n" - << "speed: " << getSpeed() << " -> " << vSafe << std::endl; + " continues with constant accel " << myAcceleration << "...\n" + << "speed: " << getSpeed() << " -> " << vSafe << std::endl; } #endif } @@ -3424,7 +3707,7 @@ } // (Leo) to avoid tiny oscillations (< 1e-10) of vNext in a standing vehicle column (observed for ballistic update), we cap off vNext // (We assure to do this only for vNext<= MSGlobals::gEmergencyDecelWarningThreshold) { - WRITE_WARNING("Vehicle '" + getID() - + "' performs emergency braking with decel=" + toString(myAcceleration) - + " wished=" + toString(getCarFollowModel().getMaxDecel()) - + " severity=" + toString(emergencyFraction) - //+ " decelPlus=" + toString(decelPlus) - //+ " prevAccel=" + toString(previousAcceleration) - //+ " reserve=" + toString(MAX2(NUMERICAL_EPS, getCarFollowModel().getEmergencyDecel() - getCarFollowModel().getMaxDecel())) - + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + WRITE_WARNING("Vehicle '" + getID() + + "' performs emergency braking with decel=" + toString(myAcceleration) + + " wished=" + toString(getCarFollowModel().getMaxDecel()) + + " severity=" + toString(emergencyFraction) + //+ " decelPlus=" + toString(decelPlus) + //+ " prevAccel=" + toString(previousAcceleration) + //+ " reserve=" + toString(MAX2(NUMERICAL_EPS, getCarFollowModel().getEmergencyDecel() - getCarFollowModel().getMaxDecel())) + + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); } } } @@ -3629,8 +3912,8 @@ double MSVehicle::updateFurtherLanes(std::vector& furtherLanes, std::vector& furtherLanesPosLat, const std::vector& passedLanes) { -#ifdef DEBUG_FURTHER - if (DEBUG_COND) std::cout << SIMTIME +#ifdef DEBUG_SETFURTHER + if (DEBUG_COND) std::cout << SIMTIME << " veh=" << getID() << " updateFurtherLanes oldFurther=" << toString(furtherLanes) << " oldFurtherPosLat=" << toString(furtherLanesPosLat) << " passed=" << toString(passedLanes) @@ -3672,7 +3955,7 @@ newFurtherPosLat.push_back(newFurtherPosLat.back()); } } -#ifdef DEBUG_FURTHER +#ifdef DEBUG_SETFURTHER if (DEBUG_COND) { std::cout << SIMTIME << " updateFurtherLanes \n" << " further lane '" << (*pi)->getID() << "' backPosOnPreviousLane=" << backPosOnPreviousLane @@ -3686,7 +3969,7 @@ furtherLanes.clear(); furtherLanesPosLat.clear(); } -#ifdef DEBUG_FURTHER +#ifdef DEBUG_SETFURTHER if (DEBUG_COND) std::cout << " newFurther=" << toString(furtherLanes) << " newFurtherPosLat=" << toString(furtherLanesPosLat) @@ -3771,7 +4054,7 @@ #pragma warning(push) #pragma warning(disable: 4127) // do not warn about constant conditional expression #endif - SOFT_ASSERT(false); + SOFT_ASSERT(false); #ifdef _MSC_VER #pragma warning(pop) #endif @@ -3875,7 +4158,7 @@ approachedLane = item.myLink->getLane(); const MSVehicle* last = approachedLane->getLastAnyVehicle(); if (last == nullptr || last == this) { - if (approachedLane->getLength() > getVehicleType().getLength() + if (approachedLane->getLength() > getVehicleType().getLength() || keepClear(item.myLink)) { seenSpace += approachedLane->getLength(); } @@ -3924,21 +4207,21 @@ DriveProcessItem& nextItem = lfLinks[i]; const bool canLeaveJunction = item.myLink->getViaLane() == nullptr || nextItem.myLink == nullptr || nextItem.mySetRequest; const bool opened = item.myLink != nullptr && canLeaveJunction && ( - item.myLink->havePriority() - || i == 1 // the upcoming link (item 0) is checked in executeMove anyway. No need to use outdata approachData here - || (myInfluencer != nullptr && !myInfluencer->getRespectJunctionPriority()) - || item.myLink->opened(item.myArrivalTime, item.myArrivalSpeed, - item.getLeaveSpeed(), getVehicleType().getLength(), - getImpatience(), getCarFollowModel().getMaxDecel(), getWaitingTime(), getLateralPositionOnLane())); + item.myLink->havePriority() + || i == 1 // the upcoming link (item 0) is checked in executeMove anyway. No need to use outdata approachData here + || (myInfluencer != nullptr && !myInfluencer->getRespectJunctionPriority()) + || item.myLink->opened(item.myArrivalTime, item.myArrivalSpeed, + item.getLeaveSpeed(), getVehicleType().getLength(), + getImpatience(), getCarFollowModel().getMaxDecel(), getWaitingTime(), getLateralPositionOnLane())); bool allowsContinuation = (item.myLink == nullptr || item.myLink->isCont() || opened) && !item.hadStoppedVehicle; #ifdef DEBUG_CHECKREWINDLINKLANES if (DEBUG_COND) std::cout - << " link=" << (item.myLink == 0 ? "NULL" : item.myLink->getViaLaneOrLane()->getID()) - << " canLeave=" << canLeaveJunction - << " opened=" << opened - << " allowsContinuation=" << allowsContinuation - << " foundStopped=" << foundStopped - << "\n"; + << " link=" << (item.myLink == 0 ? "NULL" : item.myLink->getViaLaneOrLane()->getID()) + << " canLeave=" << canLeaveJunction + << " opened=" << opened + << " allowsContinuation=" << allowsContinuation + << " foundStopped=" << foundStopped + << "\n"; #endif if (!opened && item.myLink != nullptr) { foundStopped = true; @@ -3953,9 +4236,9 @@ item.availableSpace = nextItem.availableSpace; #ifdef DEBUG_CHECKREWINDLINKLANES if (DEBUG_COND) std::cout - << " link=" << (item.myLink == nullptr ? "NULL" : item.myLink->getViaLaneOrLane()->getID()) - << " copy nextAvail=" << nextItem.availableSpace - << "\n"; + << " link=" << (item.myLink == nullptr ? "NULL" : item.myLink->getViaLaneOrLane()->getID()) + << " copy nextAvail=" << nextItem.availableSpace + << "\n"; #endif } } @@ -4023,15 +4306,15 @@ for (DriveProcessItem& dpi : myLFLinkLanes) { if (dpi.myLink != nullptr) { if (dpi.myLink->getState() == LINKSTATE_ALLWAY_STOP) { - dpi.myArrivalTime += (SUMOTime)RandHelper::rand((int)2); // tie braker + dpi.myArrivalTime += (SUMOTime)RandHelper::rand((int)2, getRNG()); // tie braker } dpi.myLink->setApproaching(this, dpi.myArrivalTime, dpi.myArrivalSpeed, dpi.getLeaveSpeed(), - dpi.mySetRequest, dpi.myArrivalTimeBraking, dpi.myArrivalSpeedBraking, getWaitingTime(), dpi.myDistance); + dpi.mySetRequest, dpi.myArrivalTimeBraking, dpi.myArrivalSpeedBraking, getWaitingTime(), dpi.myDistance); } } if (getLaneChangeModel().getShadowLane() != nullptr) { // register on all shadow links - for (DriveProcessItem& dpi : myLFLinkLanes) { + for (const DriveProcessItem& dpi : myLFLinkLanes) { if (dpi.myLink != nullptr) { MSLink* parallelLink = dpi.myLink->getParallelLink(getLaneChangeModel().getShadowDirection()); if (parallelLink != nullptr) { @@ -4045,17 +4328,17 @@ #ifdef DEBUG_PLAN_MOVE if (DEBUG_COND) { std::cout << SIMTIME - << " veh=" << getID() - << " after checkRewindLinkLanes\n"; + << " veh=" << getID() + << " after checkRewindLinkLanes\n"; for (DriveProcessItem& dpi : myLFLinkLanes) { std::cout - << " vPass=" << dpi.myVLinkPass - << " vWait=" << dpi.myVLinkWait - << " linkLane=" << (dpi.myLink == 0 ? "NULL" : dpi.myLink->getViaLaneOrLane()->getID()) - << " request=" << dpi.mySetRequest - << " atime=" << dpi.myArrivalTime - << " atimeB=" << dpi.myArrivalTimeBraking - << "\n"; + << " vPass=" << dpi.myVLinkPass + << " vWait=" << dpi.myVLinkWait + << " linkLane=" << (dpi.myLink == 0 ? "NULL" : dpi.myLink->getViaLaneOrLane()->getID()) + << " request=" << dpi.mySetRequest + << " atime=" << dpi.myArrivalTime + << " atimeB=" << dpi.myArrivalTimeBraking + << "\n"; } } #endif @@ -4115,6 +4398,10 @@ // internal edges are not a part of the route... if (!enteredLane->getEdge().isInternal()) { ++myCurrEdge; + assert(haveValidStopEdges()); + } + if (myInfluencer != nullptr) { + myInfluencer->adaptLaneTimeLine(myLane->getIndex() - oldLane->getIndex()); } if (!onTeleporting) { activateReminders(MSMoveReminder::NOTIFICATION_JUNCTION, enteredLane); @@ -4163,7 +4450,7 @@ lane = lane->getLogicalPredecessorLane(myFurtherLanes[i]->getEdge()); } if (lane != nullptr) { -#ifdef DEBUG_FURTHER +#ifdef DEBUG_SETFURTHER if (DEBUG_COND) { std::cout << SIMTIME << " enterLaneAtLaneChange \n"; } @@ -4171,7 +4458,7 @@ myFurtherLanes[i]->resetPartialOccupation(this); myFurtherLanes[i] = lane; myFurtherLanesPosLat[i] = myState.myPosLat; -#ifdef DEBUG_FURTHER +#ifdef DEBUG_SETFURTHER if (DEBUG_COND) { std::cout << SIMTIME << " enterLaneAtLaneChange \n"; } @@ -4184,9 +4471,10 @@ } } } -#ifdef DEBUG_FURTHER +#ifdef DEBUG_SETFURTHER if (DEBUG_COND) { - std::cout << SIMTIME << " enterLaneAtLaneChange new furtherLanes=" << toString(myFurtherLanes) << "\n"; + std::cout << SIMTIME << " enterLaneAtLaneChange new furtherLanes=" << toString(myFurtherLanes) + << " furterLanesPosLat=" << toString(myFurtherLanesPosLat) << "\n"; } #endif myAngle = computeAngle(); @@ -4219,7 +4507,7 @@ MSLane* clane = enteredLane; while (leftLength > 0) { clane = clane->getLogicalPredecessorLane(); - if (clane == nullptr || clane == myLane) { + if (clane == nullptr || clane == myLane || clane == myLane->getBidiLane()) { break; } myFurtherLanes.push_back(clane); @@ -4347,7 +4635,9 @@ if (myBestLanes.size() > 0 && !forceRebuild && myLastBestLanesEdge == &startLane->getEdge()) { updateOccupancyAndCurrentBestLane(startLane); #ifdef DEBUG_BESTLANES - if (DEBUG_COND) std::cout << " only updateOccupancyAndCurrentBestLane\n"; + if (DEBUG_COND) { + std::cout << " only updateOccupancyAndCurrentBestLane\n"; + } #endif return; } @@ -4358,7 +4648,9 @@ } if (myLastBestLanesInternalLane == startLane && !forceRebuild) { #ifdef DEBUG_BESTLANES - if (DEBUG_COND) std::cout << " nothing to do on internal\n"; + if (DEBUG_COND) { + std::cout << " nothing to do on internal\n"; + } #endif return; } @@ -4405,7 +4697,9 @@ myLastBestLanesInternalLane = startLane; updateOccupancyAndCurrentBestLane(startLane); #ifdef DEBUG_BESTLANES - if (DEBUG_COND) std::cout << " updated for internal\n"; + if (DEBUG_COND) { + std::cout << " updated for internal\n"; + } #endif return; } else { @@ -4439,7 +4733,8 @@ // large enough to overcome a magic threshold in MSLCM_DK2004.cpp:383) nextStopPos = MAX2(POSITION_EPS, MIN2((double)nextStopPos, (double)(nextStopLane->getLength() - 2 * POSITION_EPS))); if (nextStopLane->isInternal()) { - nextStopPos += (*nextStopEdge)->getLength(); + // switch to the correct lane before entering the intersection + nextStopPos = (*nextStopEdge)->getLength(); } } @@ -4464,16 +4759,21 @@ q.bestLaneOffset = 0; q.length = cl->allowsVehicleClass(myType->getVehicleClass()) ? cl->getLength() : 0; q.currentLength = q.length; - q.allowsContinuation = allowed == nullptr || find(allowed->begin(), allowed->end(), cl) != allowed->end(); + q.allowsContinuation = allowed == nullptr || std::find(allowed->begin(), allowed->end(), cl) != allowed->end(); q.occupation = 0; q.nextOccupation = 0; currentLanes.push_back(q); } // - if (nextStopEdge == ce && !nextStopLane->isInternal()) { - progress = false; + if (nextStopEdge == ce + // already past the stop edge + && !(ce == myCurrEdge && myLane != nullptr && myLane->isInternal())) { + if (!nextStopLane->isInternal()) { + progress = false; + } + const MSLane* normalStopLane = nextStopLane->getNormalPredecessorLane(); for (std::vector::iterator q = currentLanes.begin(); q != currentLanes.end(); ++q) { - if (nextStopLane != nullptr && nextStopLane != (*q).lane) { + if (nextStopLane != nullptr && normalStopLane != (*q).lane) { (*q).allowsContinuation = false; (*q).length = nextStopPos; (*q).currentLength = (*q).length; @@ -4657,6 +4957,11 @@ nextOccupation += (*j)->getBruttoVehLenSum(); } (*i).nextOccupation = nextOccupation; +#ifdef DEBUG_BESTLANES + if (DEBUG_COND) { + std::cout << " lane=" << (*i).lane->getID() << " nextOccupation=" << nextOccupation << "\n"; + } +#endif if ((*i).lane == startLane) { myCurrentLaneInBestLanes = i; } @@ -4723,13 +5028,13 @@ MSVehicle::getDistanceToPosition(double destPos, const MSEdge* destEdge) const { double distance = std::numeric_limits::max(); if (isOnRoad() && destEdge != nullptr) { - if (&myLane->getEdge() == *myCurrEdge) { - // vehicle is on a normal edge - distance = myRoute->getDistanceBetween(getPositionOnLane(), destPos, *myCurrEdge, destEdge); - } else { + if (myLane->isInternal()) { // vehicle is on inner junction edge distance = myLane->getLength() - getPositionOnLane(); distance += myRoute->getDistanceBetween(0, destPos, *(myCurrEdge + 1), destEdge); + } else { + // vehicle is on a normal edge + distance = myRoute->getDistanceBetween(getPositionOnLane(), destPos, *myCurrEdge, destEdge); } } return distance; @@ -4830,9 +5135,6 @@ MSBaseVehicle::addPerson(person); if (myStops.size() > 0 && myStops.front().reached && myStops.front().triggered && myStops.front().numExpectedPerson > 0) { myStops.front().numExpectedPerson -= (int)myStops.front().pars.awaitedPersons.count(person->getID()); - if (myStops.front().numExpectedPerson == 0) { - myStops.front().duration = 0; - } } } @@ -4841,9 +5143,6 @@ MSBaseVehicle::addContainer(container); if (myStops.size() > 0 && myStops.front().reached && myStops.front().pars.containerTriggered && myStops.front().numExpectedContainer > 0) { myStops.front().numExpectedContainer -= (int)myStops.front().pars.awaitedContainers.count(container->getID()); - if (myStops.front().numExpectedContainer == 0) { - myStops.front().duration = 0; - } } } @@ -4890,6 +5189,12 @@ } } } + if (myStopDist < (myLane->getLength() - getPositionOnLane()) + // signal parking stop on the current lane when within braking distance (~2 seconds before braking) + && myStops.begin()->pars.parking + && myStopDist < getCarFollowModel().brakeGap(myLane->getVehicleMaxSpeed(this), getCarFollowModel().getMaxDecel(), 3)) { + switchOnSignal(MSNet::getInstance()->lefthand() ? VEH_SIGNAL_BLINKER_LEFT : VEH_SIGNAL_BLINKER_RIGHT); + } if (myInfluencer != nullptr && myInfluencer->getSignals() >= 0) { mySignals = myInfluencer->getSignals(); myInfluencer->setSignals(-1); // overwrite computed signals only once @@ -5070,14 +5375,14 @@ #ifdef DEBUG_ACTIONSTEPS if DEBUG_COND { std::cout << SIMTIME - << " veh=" << getID() - << " halfCurrentLaneWidth=" << halfCurrentLaneWidth - << " halfVehWidth=" << halfVehWidth - << " latPos=" << latPos - << " latLaneDist=" << latLaneDist - << " leftLimit=" << leftLimit - << " rightLimit=" << rightLimit - << "\n"; + << " veh=" << getID() + << " halfCurrentLaneWidth=" << halfCurrentLaneWidth + << " halfVehWidth=" << halfVehWidth + << " latPos=" << latPos + << " latLaneDist=" << latLaneDist + << " leftLimit=" << leftLimit + << " rightLimit=" << rightLimit + << "\n"; } #endif return latLaneDist; @@ -5096,11 +5401,12 @@ return getLateralOverlap(getLateralPositionOnLane()); } + void -MSVehicle::removeApproachingInformation(DriveItemVector& lfLinks) const { - for (DriveItemVector::iterator i = lfLinks.begin(); i != lfLinks.end(); ++i) { - if ((*i).myLink != nullptr) { - (*i).myLink->removeApproaching(this); +MSVehicle::removeApproachingInformation(const DriveItemVector& lfLinks) const { + for (const DriveProcessItem& dpi : lfLinks) { + if (dpi.myLink != nullptr) { + dpi.myLink->removeApproaching(this); } } // unregister on all shadow links @@ -5165,6 +5471,9 @@ MSVehicle::getBoundingBox() const { PositionVector centerLine; centerLine.push_back(getPosition()); + for (MSLane* lane : myFurtherLanes) { + centerLine.push_back(lane->getShape().back()); + } centerLine.push_back(getBackPosition()); centerLine.move2side(0.5 * myType->getWidth()); PositionVector result = centerLine; @@ -5284,14 +5593,13 @@ const double routeCost = router.recomputeCosts(edges, this, MSNet::getInstance()->getCurrentTimeStep()); ConstMSEdgeVector prevEdges(myCurrEdge, myRoute->end()); const double savings = router.recomputeCosts(prevEdges, this, MSNet::getInstance()->getCurrentTimeStep()); - replaceRouteEdges(edges, routeCost, savings, "TraCI:rerouteParkingArea", false, false, false); - - if (!replaceParkingArea(newParkingArea, errorMsg)) { + if (replaceParkingArea(newParkingArea, errorMsg)) { + replaceRouteEdges(edges, routeCost, savings, "TraCI:" + toString(SUMO_TAG_PARKING_ZONE_REROUTE), false, false, false); + } else { WRITE_WARNING("Vehicle '" + getID() + "' could not reroute to new parkingArea '" + newParkingArea->getID() + "' reason=" + errorMsg + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); return false; } - return true; } @@ -5422,7 +5730,6 @@ return result; } - bool MSVehicle::resumeFromStopping() { if (isStopped()) { @@ -5603,7 +5910,7 @@ return false; } -bool +bool MSVehicle::isLeader(const MSLink* link, const MSVehicle* veh) const { assert(link->fromInternalLane()); if (veh == nullptr) { @@ -5629,13 +5936,13 @@ assert(logic != nullptr); #ifdef DEBUG_PLAN_MOVE_LEADERINFO if (DEBUG_COND) { - std::cout << SIMTIME - << " foeLane=" << foeLane->getID() - << " foeLink=" << foeLink->getViaLaneOrLane()->getID() - << " linkIndex=" << link->getIndex() - << " foeLinkIndex=" << foeLink->getIndex() - << " response=" << logic->getResponseFor(link->getIndex()).test(foeLink->getIndex()) - << "\n"; + std::cout << SIMTIME + << " foeLane=" << foeLane->getID() + << " foeLink=" << foeLink->getViaLaneOrLane()->getID() + << " linkIndex=" << link->getIndex() + << " foeLinkIndex=" << foeLink->getIndex() + << " response=" << logic->getResponseFor(link->getIndex()).test(foeLink->getIndex()) + << "\n"; } #endif if (!logic->getResponseFor(link->getIndex()).test(foeLink->getIndex())) { @@ -5650,18 +5957,18 @@ // use ID as tie braker #ifdef DEBUG_PLAN_MOVE_LEADERINFO if (DEBUG_COND) { - std::cout << SIMTIME << " veh=" << getID() << " equal ET " << egoET << " with foe " << veh->getID() - << " foeIsLeaderByID=" << (getID() < veh->getID()) << "\n"; + std::cout << SIMTIME << " veh=" << getID() << " equal ET " << egoET << " with foe " << veh->getID() + << " foeIsLeaderByID=" << (getID() < veh->getID()) << "\n"; } #endif return getID() < veh->getID(); } else { #ifdef DEBUG_PLAN_MOVE_LEADERINFO if (DEBUG_COND) { - std::cout << SIMTIME << " veh=" << getID() << " equal ET " << egoET << " with foe " << veh->getID() - << " foeIsLeaderBySpeed=" << (getSpeed() < veh->getSpeed()) - << " v=" << getSpeed() << " foeV=" << veh->getSpeed() - << "\n"; + std::cout << SIMTIME << " veh=" << getID() << " equal ET " << egoET << " with foe " << veh->getID() + << " foeIsLeaderBySpeed=" << (getSpeed() < veh->getSpeed()) + << " v=" << getSpeed() << " foeV=" << veh->getSpeed() + << "\n"; } #endif return getSpeed() < veh->getSpeed(); @@ -5669,7 +5976,9 @@ } else { // leader was on the junction first #ifdef DEBUG_PLAN_MOVE_LEADERINFO - if (DEBUG_COND) std::cout << " egoET=" << egoET << " foeET=" << foeET << " isLeader=" << (egoET > foeET) << "\n"; + if (DEBUG_COND) { + std::cout << " egoET=" << egoET << " foeET=" << foeET << " isLeader=" << (egoET > foeET) << "\n"; + } #endif return egoET > foeET; } @@ -5731,9 +6040,57 @@ // no need to reset myCachedPosition here since state loading happens directly after creation } -void -MSVehicle::createDriverState() { - myDriverState = std::make_shared(this); +bool +MSVehicle::haveValidStopEdges() const { + MSRouteIterator start = myCurrEdge; + const std::string err = "for vehicle '" + getID() + "' at time " + time2string(MSNet::getInstance()->getCurrentTimeStep()); + int i = 0; + bool ok = true; + double lastPos = getPositionOnLane(); + if (myLane != nullptr && myLane->isInternal() + && myStops.size() > 0 && !myStops.front().lane->isInternal()) { + // start edge is still incoming to the intersection so lastPos + // relative to that edge must be adapted + lastPos += (*myCurrEdge)->getLength(); + } + for (const Stop& stop : myStops) { + const double endPos = stop.getEndPos(*this); + const MSEdge* const stopEdge = &stop.lane->getEdge(); + const MSRouteIterator it = std::find(start, myRoute->end(), stopEdge); + const std::string prefix = "Stop " + toString(i) + " on edge '" + stopEdge->getID() + "' "; + if (it == myRoute->end()) { + WRITE_ERROR(prefix + "is not found after edge '" + (*start)->getID() + "' (" + toString(start - myCurrEdge) + " after current " + err); + ok = false; + } else { + MSRouteIterator it2; + for (it2 = myRoute->begin(); it2 != myRoute->end(); it2++) { + if (it2 == stop.edge) { + break; + } + } + if (it2 == myRoute->end()) { + WRITE_ERROR(prefix + "used invalid route index " + err); + ok = false; + } else if (it2 < start) { + WRITE_ERROR(prefix + "used invalid (relative) route index " + toString(it2 - myCurrEdge) + " expected after " + toString(start - myCurrEdge) + " " + err); + ok = false; + } else { + if (it != stop.edge && endPos >= lastPos) { + WRITE_WARNING(prefix + "is used in " + toString(stop.edge - myCurrEdge) + " edges but first encounter is in " + + toString(it - myCurrEdge) + " edges " + err); + } + start = stop.edge; + } + } + lastPos = endPos; + i++; + } + return ok; +} + +std::shared_ptr +MSVehicle::getDriverState() const { + return myDriverState->getDriverState(); } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicle.h sumo-1.2.0+dfsg1/src/microsim/MSVehicle.h --- sumo-1.1.0+dfsg1/src/microsim/MSVehicle.h 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -44,6 +44,7 @@ #include "MSBaseVehicle.h" #include "MSLink.h" #include "MSLane.h" +#include "MSNet.h" #define INVALID_SPEED 299792458 + 1 // nothing can go faster than the speed of light! Refs. #2577 @@ -66,7 +67,7 @@ class MSContainer; class MSJunction; class MSLeaderInfo; -//class MSDriverState; +class MSDevice_DriverState; class MSSimpleDriverState; // =========================================================================== @@ -391,7 +392,7 @@ * @param[in] accel the assumed acceleration * @return distance covered in next integration step */ - double getDeltaPos(double accel); + double getDeltaPos(const double accel) const; /// @name state setter/getter @@ -701,6 +702,14 @@ /// @brief Set a custom vehicle angle in rad, optionally updates furtherLanePosLat void setAngle(double angle, bool straightenFurther = false); + /** @brief Sets the action steplength of the vehicle + * + * @param actionStepLength New value + * @param resetActionOffset whether the action offset should be reset to zero, + * i.e., the next action step should follow immediately. + */ + void setActionStepLength(double actionStepLength, bool resetActionOffset = true); + /** Returns true if the two vehicles overlap. */ static bool overlap(const MSVehicle* veh1, const MSVehicle* veh2) { if (veh1->myState.myPos < veh2->myState.myPos) { @@ -709,7 +718,6 @@ return veh1->myState.myPos - veh1->getVehicleType().getLengthWithGap() < veh2->myState.myPos; } - /** Returns true if vehicle's speed is below 60km/h. This is only relevant on highways. Overtaking on the right is allowed then. */ bool congested() const { @@ -897,9 +905,8 @@ * @return The vehicle driver's state * */ - inline std::shared_ptr getDriverState() const { - return myDriverState; - } + + std::shared_ptr getDriverState() const; /** @brief Returns the vehicle's car following model variables @@ -980,14 +987,13 @@ */ bool replaceParkingArea(MSParkingArea* parkingArea, std::string& errorMsg); - /** @brief Create a DriverState for the vehicle - */ - void createDriverState(); - - /** @brief get the current parking area stop + /** @brief get the upcoming parking area stop or nullptr */ MSParkingArea* getNextParkingArea(); + /** @brief get the current parking area stop or nullptr */ + MSParkingArea* getCurrentParkingArea(); + /** @brief Returns whether the vehicle has to stop somewhere * @return Whether the vehicle has to stop somewhere */ @@ -998,7 +1004,7 @@ /** @brief Whether this vehicle is equipped with a MSDriverState */ inline bool hasDriverState() const { - return (myDriverState != nullptr); + return myDriverState != nullptr; } /** @brief Returns whether the vehicle is at a stop @@ -1009,6 +1015,9 @@ /// @brief Returns the remaining stop duration for a stopped vehicle or 0 SUMOTime remainingStopDuration() const; + /** @brief Returns whether the vehicle stops at the given stopping place */ + bool stopsAt(MSStoppingPlace* stop) const; + /** @brief Returns whether the vehicle will stop on the current edge */ bool willStop() const; @@ -1094,7 +1103,6 @@ */ double getTimeGapOnLane() const; - /// @name Emission retrieval //@{ @@ -1354,10 +1362,31 @@ */ class Influencer { private: + + /// @brief A static instance of this class in GapControlState deactivates gap control + /// for vehicles whose reference vehicle is removed from the road network + class GapControlVehStateListener : public MSNet::VehicleStateListener { + /** @brief Called if a vehicle changes its state + * @param[in] vehicle The vehicle which changed its state + * @param[in] to The state the vehicle has changed to + * @param[in] info Additional information on the state change + * @note This deactivates the corresponding gap control when a reference vehicle is removed. + */ + void vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& info = ""); + }; + + /// @brief Container for state and parameters of the gap control struct GapControlState { GapControlState(); - void activate(double tauOriginal, double tauTarget, double additionalGap, double duration, double changeRate, double maxDecel); + virtual ~GapControlState(); + /// @brief Static initalization (adds vehicle state listener) + static void init(); + /// @brief Static cleanup (removes vehicle state listener) + static void cleanup(); + /// @brief Start gap control with given params + void activate(double tauOriginal, double tauTarget, double additionalGap, double duration, double changeRate, double maxDecel, const MSVehicle* refVeh); + /// @brief Stop gap control void deactivate(); /// @brief Original value for the desired headway (will be reset after duration has expired) double tauOriginal; @@ -1376,6 +1405,8 @@ double changeRate; /// @brief Maximal deceleration to be applied due to the adapted headway double maxDecel; + /// @brief reference vehicle for the gap - if it is null, the current leader on the ego's lane is used as a reference + const MSVehicle* referenceVeh; /// @brief Whether the gap control is active bool active; /// @brief Whether the desired gap was attained during the current activity phase (induces the remaining duration to decrease) @@ -1386,15 +1417,24 @@ SUMOTime lastUpdate; /// @brief cache storage for the headway increments of the current operation double timeHeadwayIncrement, spaceHeadwayIncrement; + + /// @brief stores reference vehicles currently in use by a gapController + static std::map refVehMap; + + private: + static GapControlVehStateListener vehStateListener; }; public: /// @brief Constructor Influencer(); - /// @brief Destructor ~Influencer(); + /// @brief Static initalization + static void init(); + /// @brief Static cleanup + static void cleanup(); /** @brief Sets a new velocity timeline * @param[in] speedTimeLine The time line of speeds to use @@ -1403,7 +1443,7 @@ /** @brief Activates the gap control with the given parameters, @see GapControlState */ - void activateGapController(double originalTau, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel); + void activateGapController(double originalTau, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, MSVehicle* refVeh = nullptr); /** @brief Deactivates the gap control */ @@ -1414,6 +1454,11 @@ */ void setLaneTimeLine(const std::vector >& laneTimeLine); + /** @brief Adapts lane timeline when moving to a new lane and the lane index changes + * @param[in] indexShift The change in laneIndex + */ + void adaptLaneTimeLine(int indexShift); + /** @brief Sets a new sublane-change request * @param[in] latDist The lateral distance for changing */ @@ -1638,7 +1683,7 @@ const Influencer* getInfluencer() const; bool hasInfluencer() const { - return myInfluencer != 0; + return myInfluencer != nullptr; } /// @brief allow TraCI to influence a lane change decision @@ -1658,7 +1703,10 @@ static int nextLinkPriority(const std::vector& conts); /// @brief whether the given vehicle must be followed at the given junction - bool isLeader(const MSLink* link, const MSVehicle* veh) const; + bool isLeader(const MSLink* link, const MSVehicle* veh) const; + + // @brief get the position of the back bumper; + const Position getBackPosition() const; /// @name state io //@{ @@ -1704,7 +1752,7 @@ * @param[in/out] vSafeMin The minimal safe (or admissible) velocity (used her for ensuring the clearing of junctions in time). * @param[in/out] vSafeMinDist The distance to the next link, which should either be crossed this step, or in front of which the vehicle need to stop. */ - void processLinkAproaches(double& vSafe, double& vSafeMin, double& vSafeMinDist); + void processLinkApproaches(double& vSafe, double& vSafeMin, double& vSafeMinDist); /** @brief This method checks if the vehicle has advanced over one or several lanes @@ -1745,7 +1793,7 @@ void updateTimeLoss(double vNext); /// @brief whether the vehicle is a train that can reverse its direction at the current point in its route - bool canReverse() const; + bool canReverse(double speedThreshold = SUMO_const_haltingSpeed) const; /** @brief sets the braking lights on/off */ @@ -1763,8 +1811,12 @@ void updateOccupancyAndCurrentBestLane(const MSLane* startLane); /** @brief Returns the list of still pending stop edges + * also returns the first and last stop position */ - const ConstMSEdgeVector getStopEdges() const; + const ConstMSEdgeVector getStopEdges(double& firstPos, double& lastPos) const; + + /// @brief return list of route indices for the remaining stops + std::vector > getStopIndices() const; /// @brief get distance for coming to a stop (used for rerouting checks) double getBrakeGap() const; @@ -1786,8 +1838,7 @@ State myState; /// @brief This vehicle's driver state @see MSDriverState -// std::shared_ptr myDriverState; - std::shared_ptr myDriverState; + MSDevice_DriverState* myDriverState; /// @brief The flag myActionStep indicates whether the current time step is an action point for the vehicle. bool myActionStep; @@ -1851,7 +1902,7 @@ /// @brief the angle in radians (@todo consider moving this into myState) double myAngle; - /// @brief distance to the next stop or -1 if there is none + /// @brief distance to the next stop or doubleMax if there is none double myStopDist; /// @brief amount of time for which the vehicle is immune from collisions @@ -1945,7 +1996,7 @@ void checkRewindLinkLanes(const double lengthsInFront, DriveItemVector& lfLinks) const; /// @brief unregister approach from all upcoming links - void removeApproachingInformation(DriveItemVector& lfLinks) const; + void removeApproachingInformation(const DriveItemVector& lfLinks) const; /// @brief estimate leaving speed when accelerating across a link @@ -2001,9 +2052,6 @@ // @brief return the lane on which the back of this vehicle resides const MSLane* getBackLane() const; - // @brief get the position of the back bumper; - const Position getBackPosition() const; - /** @brief updates the vehicles state, given a next value for its speed. * This value can be negative in case of the ballistic update to indicate * a stop within the next timestep. (You can call this a 'hack' to @@ -2020,6 +2068,10 @@ /// @brief decide whether a red (or yellow light) may be ignore bool ignoreRed(const MSLink* link, bool canBrake) const; + + /// @brief check whether all stop.edge MSRouteIterators are valid and in order + bool haveValidStopEdges() const; + private: /* @brief The vehicle's knowledge about edge efforts/travel times; @see MSEdgeWeightsStorage * @note member is initialized on first access */ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleTransfer.cpp sumo-1.2.0+dfsg1/src/microsim/MSVehicleTransfer.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleTransfer.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleTransfer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,6 +30,7 @@ #include "MSLane.h" #include "MSEdge.h" #include "MSVehicle.h" +#include "MSParkingArea.h" #include #include "MSVehicleControl.h" #include "MSInsertionControl.h" @@ -41,11 +42,17 @@ // =========================================================================== MSVehicleTransfer* MSVehicleTransfer::myInstance = nullptr; const double MSVehicleTransfer::TeleportMinSpeed = 1; -const std::set MSVehicleTransfer::myEmptyVehicleSet; + // =========================================================================== // member method definitions // =========================================================================== +bool +MSVehicleTransfer::VehicleInformation::operator<(const VehicleInformation& v2) const { + return myVeh->getNumericalID() < v2.myVeh->getNumericalID(); +} + + void MSVehicleTransfer::add(const SUMOTime t, MSVehicle* veh) { if (veh->isParking()) { @@ -64,31 +71,33 @@ veh->onRemovalFromNet(MSMoveReminder::NOTIFICATION_TELEPORT); veh->enterLaneAtMove(veh->succEdge(1)->getLanes()[0], true); } - myVehicles.push_back(VehicleInformation(t, veh, - t + TIME2STEPS(veh->getEdge()->getCurrentTravelTime(TeleportMinSpeed)), - veh->isParking())); + myVehicles.push_back(VehicleInformation(t, veh, -1, veh->isParking())); } void MSVehicleTransfer::remove(MSVehicle* veh) { - for (VehicleInfVector::iterator i = myVehicles.begin(); i != myVehicles.end(); ++i) { + auto& vehInfos = myVehicles.getContainer(); + for (auto i = vehInfos.begin(); i != vehInfos.end(); ++i) { if (i->myVeh == veh) { if (i->myParking) { veh->getLane()->removeParking(veh); } - myVehicles.erase(i); + vehInfos.erase(i); break; } } + myVehicles.unlock(); } void MSVehicleTransfer::checkInsertions(SUMOTime time) { // go through vehicles - for (VehicleInfVector::iterator i = myVehicles.begin(); i != myVehicles.end();) { - // get the vehicle information + auto& vehInfos = myVehicles.getContainer(); + std::sort(vehInfos.begin(), vehInfos.end()); + for (auto i = vehInfos.begin(); i != vehInfos.end();) { + // vehicle information cannot be const because we need to assign the proceed time VehicleInformation& desc = *i; if (desc.myParking) { @@ -115,8 +124,17 @@ false, MSMoveReminder::NOTIFICATION_PARKING)) { MSNet::getInstance()->informVehicleStateListener(desc.myVeh, MSNet::VEHICLE_STATE_ENDING_PARKING); desc.myVeh->getLane()->removeParking(desc.myVeh); - i = myVehicles.erase(i); + i = vehInfos.erase(i); } else { + // blocked from entering the road + if (!desc.myVeh->signalSet(MSVehicle::VEH_SIGNAL_BLINKER_LEFT | MSVehicle::VEH_SIGNAL_BLINKER_RIGHT)) { + // signal wish to re-enter the road + desc.myVeh->switchOnSignal(MSNet::getInstance()->lefthand() ? MSVehicle::VEH_SIGNAL_BLINKER_RIGHT : MSVehicle::VEH_SIGNAL_BLINKER_LEFT); + if (desc.myVeh->getCurrentParkingArea() != nullptr) { + // update freePosition so other vehicles can help with insertion + desc.myVeh->getCurrentParkingArea()->notifyEgressBlocked(); + } + } i++; } } else { @@ -127,17 +145,20 @@ e->getFreeLane(nullptr, vclass, departPos)); // handle teleporting vehicles, lane may be 0 because permissions were modified by a closing rerouter or TraCI if (l != nullptr && l->freeInsertion(*(desc.myVeh), MIN2(l->getSpeedLimit(), desc.myVeh->getMaxSpeed()), 0, MSMoveReminder::NOTIFICATION_TELEPORT)) { - WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' ends teleporting on edge '" + e->getID() + "', time " + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' ends teleporting on edge '" + e->getID() + "', time " + time2string(time) + "."); MSNet::getInstance()->informVehicleStateListener(desc.myVeh, MSNet::VEHICLE_STATE_ENDING_TELEPORT); - i = myVehicles.erase(i); + i = vehInfos.erase(i); } else { // could not insert. maybe we should proceed in virtual space - if (desc.myProceedTime < time) { + if (desc.myProceedTime < 0) { + // initialize proceed time (delayed to avoid lane-order dependency in executeMove) + desc.myProceedTime = time + TIME2STEPS(e->getCurrentTravelTime(TeleportMinSpeed)); + } else if (desc.myProceedTime < time) { if (desc.myVeh->succEdge(1) == nullptr) { - WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' teleports beyond arrival edge '" + e->getID() + "', time " + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' teleports beyond arrival edge '" + e->getID() + "', time " + time2string(time) + "."); desc.myVeh->leaveLane(MSMoveReminder::NOTIFICATION_TELEPORT_ARRIVED); MSNet::getInstance()->getVehicleControl().scheduleVehicleRemoval(desc.myVeh); - i = myVehicles.erase(i); + i = vehInfos.erase(i); continue; } // let the vehicle move to the next edge @@ -151,12 +172,7 @@ } } } -} - - -bool -MSVehicleTransfer::hasPending() const { - return !myVehicles.empty(); + myVehicles.unlock(); } @@ -169,7 +185,7 @@ } -MSVehicleTransfer::MSVehicleTransfer() {} +MSVehicleTransfer::MSVehicleTransfer() : myVehicles(MSGlobals::gNumSimThreads > 1) {} MSVehicleTransfer::~MSVehicleTransfer() { @@ -178,16 +194,17 @@ void -MSVehicleTransfer::saveState(OutputDevice& out) const { - for (VehicleInfVector::const_iterator it = myVehicles.begin(); it != myVehicles.end(); ++it) { +MSVehicleTransfer::saveState(OutputDevice& out) { + for (const VehicleInformation& vehInfo : myVehicles.getContainer()) { out.openTag(SUMO_TAG_VEHICLETRANSFER); - out.writeAttr(SUMO_ATTR_ID, it->myVeh->getID()); - out.writeAttr(SUMO_ATTR_DEPART, it->myProceedTime); - if (it->myParking) { - out.writeAttr(SUMO_ATTR_PARKING, it->myVeh->getLane()->getID()); + out.writeAttr(SUMO_ATTR_ID, vehInfo.myVeh->getID()); + out.writeAttr(SUMO_ATTR_DEPART, vehInfo.myProceedTime); + if (vehInfo.myParking) { + out.writeAttr(SUMO_ATTR_PARKING, vehInfo.myVeh->getLane()->getID()); } out.closeTag(); } + myVehicles.unlock(); } @@ -210,6 +227,4 @@ } - /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleTransfer.h sumo-1.2.0+dfsg1/src/microsim/MSVehicleTransfer.h --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleTransfer.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleTransfer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,6 +30,7 @@ #include #include #include +#include // =========================================================================== @@ -98,14 +99,8 @@ void checkInsertions(SUMOTime time); - /** @brief Checks whether stored vehicles are present - * - * @return whether any vehicles wait for transfer - */ - bool hasPending() const; - /** @brief Saves the current state into the given stream */ - void saveState(OutputDevice& out) const; + void saveState(OutputDevice& out); /** @brief Loads one transfer vehicle state from the given descriptionn */ void loadState(const SUMOSAXAttributes& attrs, const SUMOTime offset, MSVehicleControl& vc); @@ -146,21 +141,17 @@ VehicleInformation(SUMOTime t, MSVehicle* veh, SUMOTime proceedTime, bool parking) : myTransferTime(t), myVeh(veh), myProceedTime(proceedTime), myParking(parking) { } + /// @brief sort by vehicle ID for repeatable parallel simulation + bool operator<(const VehicleInformation& v2) const; }; - /// @brief Definition of a container for vehicle information - typedef std::vector VehicleInfVector; - /// @brief The information about stored vehicles to move virtually - VehicleInfVector myVehicles; + FXSynchQue > myVehicles; /// @brief The static singleton-instance static MSVehicleTransfer* myInstance; - /// @brief an empty set for convenience - static const std::set myEmptyVehicleSet; - }; diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleType.cpp sumo-1.2.0+dfsg1/src/microsim/MSVehicleType.cpp --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleType.cpp 2018-11-21 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleType.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,6 +47,7 @@ #include "cfmodels/MSCFModel_ACC.h" #include "cfmodels/MSCFModel_CACC.h" #include "MSVehicleControl.h" +#include "cfmodels/MSCFModel_CC.h" #include "MSVehicleType.h" @@ -331,11 +332,16 @@ case SUMO_TAG_CF_CACC: vtype->myCarFollowModel = new MSCFModel_CACC(vtype); break; + case SUMO_TAG_CF_CC: + vtype->myCarFollowModel = new MSCFModel_CC(vtype); + break; case SUMO_TAG_CF_KRAUSS: default: vtype->myCarFollowModel = new MSCFModel_Krauss(vtype); break; } + // init further param values + vtype->initParameters(); vtype->check(); return vtype; } @@ -365,7 +371,7 @@ void MSVehicleType::check() { if (!myWarnedActionStepLengthTauOnce - && myParameter.wasSet(VTYPEPARS_ACTIONSTEPLENGTH_SET) + && myParameter.actionStepLength != DELTA_T && STEPS2TIME(myParameter.actionStepLength) > getCarFollowModel().getHeadwayTime()) { myWarnedActionStepLengthTauOnce = true; std::stringstream s; @@ -431,5 +437,48 @@ } +void +MSVehicleType::initParameters() { + if (myParameter.knowsParameter("carriageLength")) { + myParameter.carriageLength = StringUtils::toDouble(myParameter.getParameter("carriageLength")); + } else if (myParameter.wasSet(VTYPEPARS_SHAPE_SET)) { + switch (myParameter.shape) { + case SVS_BUS_FLEXIBLE: + myParameter.carriageLength = 8.25; // 16.5 overall, 2 modules http://de.wikipedia.org/wiki/Ikarus_180 + myParameter.carriageGap = 0; + break; + case SVS_RAIL: + myParameter.carriageLength = 24.5; // http://de.wikipedia.org/wiki/UIC-Y-Wagen_%28DR%29 + break; + case SVS_RAIL_CAR: + myParameter.carriageLength = 16.85; // 67.4m overall, 4 carriages http://de.wikipedia.org/wiki/DB-Baureihe_423 + break; + case SVS_RAIL_CARGO: + myParameter.carriageLength = 13.86; // UIC 571-1 http://de.wikipedia.org/wiki/Flachwagen + break; + case SVS_TRUCK_SEMITRAILER: + myParameter.carriageLength = 13.5; + myParameter.locomotiveLength = 2.5; + myParameter.carriageGap = 0.5; + break; + case SVS_TRUCK_1TRAILER: + myParameter.carriageLength = 6.75; + myParameter.locomotiveLength = 2.5 + 6.75; + myParameter.carriageGap = 0.5; + break; + default: + break; + } + } + if (myParameter.knowsParameter("locomotiveLength")) { + myParameter.locomotiveLength = StringUtils::toDouble(myParameter.getParameter("locomotiveLength")); + } else if (myParameter.locomotiveLength <= 0) { + myParameter.locomotiveLength = myParameter.carriageLength; + } + if (myParameter.knowsParameter("carriageGap")) { + myParameter.carriageGap = StringUtils::toDouble(myParameter.getParameter("carriageGap")); + } +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/MSVehicleType.h sumo-1.2.0+dfsg1/src/microsim/MSVehicleType.h --- sumo-1.1.0+dfsg1/src/microsim/MSVehicleType.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/MSVehicleType.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -555,6 +555,11 @@ */ void check(); +protected: + + // init further param values + void initParameters(); + private: /// @brief the parameter container SUMOVTypeParameter myParameter; diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/Makefile.in sumo-1.2.0+dfsg1/src/microsim/output/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/output/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,683 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/output -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) MSE3Collector.$(OBJEXT) \ - MSInductLoop.$(OBJEXT) MSInstantInductLoop.$(OBJEXT) \ - MSMeanData.$(OBJEXT) MSMeanData_Emissions.$(OBJEXT) \ - MSMeanData_Harmonoise.$(OBJEXT) MSMeanData_Net.$(OBJEXT) \ - MSMeanData_Amitran.$(OBJEXT) MSRouteProbe.$(OBJEXT) \ - MSVTypeProbe.$(OBJEXT) MSXMLRawOut.$(OBJEXT) \ - MSFCDExport.$(OBJEXT) MSAmitranTrajectories.$(OBJEXT) \ - MSBatteryExport.$(OBJEXT) MSStopOut.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmicrosimoutput.a -libmicrosimoutput_a_SOURCES = \ -MSCrossSection.h \ -MSDetectorControl.cpp MSDetectorControl.h \ -MSDetectorFileOutput.h \ -MSE2Collector.cpp MSE2Collector.h \ -MSE3Collector.cpp MSE3Collector.h \ -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_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 \ -MSBatteryExport.cpp MSBatteryExport.h \ -MSStopOut.cpp MSStopOut.h \ -MSEmissionExport.cpp MSEmissionExport.h \ -MSVTKExport.cpp MSVTKExport.h \ -MSFullExport.cpp MSFullExport.h \ -MSQueueExport.cpp MSQueueExport.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) --foreign src/microsim/output/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/output/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSAmitranTrajectories.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSBatteryExport.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSEmissionExport.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSFCDExport.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSFullExport.Po@am__quote@ -@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_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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRouteProbe.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSStopOut.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVTKExport.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVTypeProbe.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSXMLRawOut.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/output/MSAmitranTrajectories.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSAmitranTrajectories.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSAmitranTrajectories.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSAmitranTrajectories.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSAmitranTrajectories.h sumo-1.2.0+dfsg1/src/microsim/output/MSAmitranTrajectories.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSAmitranTrajectories.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSAmitranTrajectories.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSBatteryExport.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSBatteryExport.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSBatteryExport.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSBatteryExport.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSBatteryExport.h sumo-1.2.0+dfsg1/src/microsim/output/MSBatteryExport.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSBatteryExport.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSBatteryExport.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSCrossSection.h sumo-1.2.0+dfsg1/src/microsim/output/MSCrossSection.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSCrossSection.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSCrossSection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -48,7 +48,7 @@ * @param[in] lane The lane to cross * @param[in] pos The position at the lane */ - MSCrossSection(MSLane* lane, double pos) : myLane(lane) , myPosition(pos) {} + MSCrossSection(MSLane* lane, double pos) : myLane(lane), myPosition(pos) {} public: diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSDetectorControl.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSDetectorControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSDetectorControl.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSDetectorControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSDetectorControl.h sumo-1.2.0+dfsg1/src/microsim/output/MSDetectorControl.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSDetectorControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSDetectorControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSDetectorFileOutput.h sumo-1.2.0+dfsg1/src/microsim/output/MSDetectorFileOutput.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSDetectorFileOutput.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSDetectorFileOutput.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -64,16 +64,17 @@ class MSDetectorFileOutput : public Named { public: /// @brief Constructor - MSDetectorFileOutput(const std::string& id, const std::string& vTypes) - : Named(id) { + MSDetectorFileOutput(const std::string& id, const std::string& vTypes, const int detectPersons = false) : + Named(id), + myDetectPersons(detectPersons) { const std::vector vt = StringTokenizer(vTypes).getVector(); myVehicleTypes.insert(vt.begin(), vt.end()); } /// @brief Constructor - MSDetectorFileOutput(const std::string& id, const std::set& vTypes) - : Named(id), myVehicleTypes(vTypes) { - } + MSDetectorFileOutput(const std::string& id, const std::set& vTypes, const int detectPersons = false) + : Named(id), myVehicleTypes(vTypes), myDetectPersons(detectPersons) + { } /// @brief (virtual) destructor @@ -138,8 +139,10 @@ * @param[in] veh the vehicle of which the type is checked. * @return whether it should be measured */ - bool vehicleApplies(const SUMOVehicle& veh) const { - if (myVehicleTypes.empty() || myVehicleTypes.count(veh.getVehicleType().getID()) > 0) { + bool vehicleApplies(const SUMOTrafficObject& veh) const { + if (veh.isVehicle() == detectPersons()) { + return false; + } else if (myVehicleTypes.empty() || myVehicleTypes.count(veh.getVehicleType().getID()) > 0) { return true; } else { std::set vTypeDists = MSNet::getInstance()->getVehicleControl().getVTypeDistributionMembership(veh.getVehicleType().getID()); @@ -161,11 +164,17 @@ return !myVehicleTypes.empty(); } + inline bool detectPersons() const { + return myDetectPersons != 0; + } protected: /// @brief The vehicle types to look for (empty means all) std::set myVehicleTypes; + /// @brief Whether pedestrians shall be detected instead of vehicles + const int myDetectPersons; + private: /// @brief Invalidated copy constructor. MSDetectorFileOutput(const MSDetectorFileOutput&); diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSE2Collector.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSE2Collector.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSE2Collector.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSE2Collector.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -76,14 +76,14 @@ #ifdef DEBUG_E2_CONSTRUCTOR if DEBUG_COND { std::cout << "\n" << "Creating MSE2Collector " << id - << " with lane = " << lane->getID() - << " startPos = " << startPos - << " endPos = " << endPos - << " length = " << length - << " haltingTimeThreshold = " << haltingTimeThreshold - << " haltingSpeedThreshold = " << haltingSpeedThreshold - << " jamDistThreshold = " << jamDistThreshold - << std::endl; + << " with lane = " << lane->getID() + << " startPos = " << startPos + << " endPos = " << endPos + << " length = " << length + << " haltingTimeThreshold = " << haltingTimeThreshold + << " haltingSpeedThreshold = " << haltingSpeedThreshold + << " jamDistThreshold = " << jamDistThreshold + << std::endl; } #endif @@ -170,14 +170,14 @@ #ifdef DEBUG_E2_CONSTRUCTOR if DEBUG_COND { std::cout << "\n" << "Creating MSE2Collector " << id - << " with endLane = " << myLastLane->getID() - << " endPos = " << endPos - << " startLane = " << myFirstLane->getID() - << " startPos = " << startPos - << " haltingTimeThreshold = " << haltingTimeThreshold - << " haltingSpeedThreshold = " << haltingSpeedThreshold - << " jamDistThreshold = " << jamDistThreshold - << std::endl; + << " with endLane = " << myLastLane->getID() + << " endPos = " << endPos + << " startLane = " << myFirstLane->getID() + << " startPos = " << startPos + << " haltingTimeThreshold = " << haltingTimeThreshold + << " haltingSpeedThreshold = " << haltingSpeedThreshold + << " jamDistThreshold = " << jamDistThreshold + << std::endl; } #endif @@ -244,7 +244,6 @@ assert((myStartPos >= POSITION_EPS || myStartPos == 0) && myStartPos < myFirstLane->getLength()); - assert(myEndPos >= POSITION_EPS || myEndPos == myLastLane->getLength()); assert(myEndPos <= myLastLane->getLength() - POSITION_EPS || myEndPos == myLastLane->getLength()); assert(myFirstLane != myLastLane || myEndPos - myStartPos > 0); } @@ -343,7 +342,7 @@ #ifdef DEBUG_E2_CONSTRUCTOR if DEBUG_COND { std::cout << "Added lane " << lane->getID() - << " (length: " << lane->getLength() << ")" << std::endl; + << " (length: " << lane->getLength() << ")" << std::endl; } #endif @@ -446,9 +445,9 @@ #ifdef DEBUG_E2_CONSTRUCTOR if DEBUG_COND { std::cout << "\n" << "Initializing auxiliaries:" - << "\nFirst lane: " << myFirstLane->getID() << " (startPos = " << myStartPos << ")" - << "\nLast lane: " << myLastLane->getID() << " (endPos = " << myEndPos << ")" - << std::endl; + << "\nFirst lane: " << myFirstLane->getID() << " (startPos = " << myStartPos << ")" + << "\nLast lane: " << myLastLane->getID() << " (endPos = " << myEndPos << ")" + << std::endl; } #endif @@ -494,7 +493,7 @@ #ifdef DEBUG_E2_CONSTRUCTOR if DEBUG_COND { std::cout << "Offset for lane " << internal->getID() << " = " << myDetectorLength - << std::endl; + << std::endl; } #endif @@ -533,7 +532,7 @@ #ifdef DEBUG_E2_CONSTRUCTOR if DEBUG_COND { std::cout << "Offset for lane " << lane->getID() << " = " << myDetectorLength - << std::endl; + << std::endl; } #endif @@ -597,8 +596,12 @@ bool -MSE2Collector::notifyMove(SUMOVehicle& veh, double oldPos, +MSE2Collector::notifyMove(SUMOTrafficObject& tObject, double oldPos, double newPos, double newSpeed) { + if (!tObject.isVehicle()) { + return false; + } + SUMOVehicle& veh = static_cast(tObject); VehicleInfoMap::iterator vi = myVehicleInfos.find(veh.getID()); assert(vi != myVehicleInfos.end()); // all vehicles calling notifyMove() should have called notifyEnter() before @@ -614,10 +617,10 @@ #ifdef DEBUG_E2_NOTIFY_MOVE if DEBUG_COND { std::cout << "\n" << SIMTIME - << " MSE2Collector::notifyMove() (detID = " << myID << "on lane '" << myLane->getID() << "')" - << " called by vehicle '" << vehID << "'" - << " at relative position " << relPos - << ", distToDetectorEnd = " << vehInfo.distToDetectorEnd << std::endl; + << " MSE2Collector::notifyMove() (detID = " << myID << "on lane '" << myLane->getID() << "')" + << " called by vehicle '" << vehID << "'" + << " at relative position " << relPos + << ", distToDetectorEnd = " << vehInfo.distToDetectorEnd << std::endl; } #endif @@ -670,11 +673,11 @@ } bool -MSE2Collector::notifyLeave(SUMOVehicle& veh, double /* lastPos */, MSMoveReminder::Notification reason, const MSLane* enteredLane) { +MSE2Collector::notifyLeave(SUMOTrafficObject& veh, double /* lastPos */, MSMoveReminder::Notification reason, const MSLane* enteredLane) { #ifdef DEBUG_E2_NOTIFY_ENTER_AND_LEAVE if DEBUG_COND { std::cout << "\n" << SIMTIME << " notifyLeave() (detID = " << myID << "on lane '" << myLane->getID() << "')" - << "called by vehicle '" << veh.getID() << "'" << std::endl; + << "called by vehicle '" << veh.getID() << "'" << std::endl; } #endif @@ -720,12 +723,16 @@ bool -MSE2Collector::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane) { +MSE2Collector::notifyEnter(SUMOTrafficObject& tObject, MSMoveReminder::Notification reason, const MSLane* enteredLane) { + if (!tObject.isVehicle()) { + return false; + } + SUMOVehicle& veh = static_cast(tObject); #ifdef DEBUG_E2_NOTIFY_ENTER_AND_LEAVE if DEBUG_COND { std::cout << std::endl << SIMTIME << " notifyEnter() (detID = " << myID << " on lane '" << myLane->getID() << "')" - << " called by vehicle '" << veh.getID() - << "' entering lane '" << (enteredLane != 0 ? enteredLane->getID() : "NULL") << "'" << std::endl; + << " called by vehicle '" << veh.getID() + << "' entering lane '" << (enteredLane != 0 ? enteredLane->getID() : "NULL") << "'" << std::endl; } #endif @@ -743,7 +750,7 @@ // e.g. due to lane change manoeuver if (reason != NOTIFICATION_JUNCTION) { const double vehBackPos = veh.getBackPositionOnLane(enteredLane); - bool vehEnteredBehindDetectorEnd = myEndPos <= vehBackPos; + bool vehEnteredBehindDetectorEnd = (enteredLane == myLastLane) && myEndPos <= vehBackPos; if (vehEnteredBehindDetectorEnd) { // this vehicle cannot influence detector readings, do not subscribe // to move notifications @@ -776,9 +783,9 @@ #ifdef DEBUG_E2_NOTIFY_ENTER_AND_LEAVE if DEBUG_COND { std::cout << SIMTIME << " Vehicle '" << veh.getID() << "' on lane '" << veh.getLane()->getID() - << "' already known. No new VehicleInfo is created.\n" - << "enteredLane = " << enteredLane->getID() << "\nmyLanes[vi->offset] = " << myLanes[vi->second->currentOffsetIndex] - << std::endl; + << "' already known. No new VehicleInfo is created.\n" + << "enteredLane = " << enteredLane->getID() << "\nmyLanes[vi->offset] = " << myLanes[vi->second->currentOffsetIndex] + << std::endl; } #endif assert(myLanes[vi->second->currentOffsetIndex] == enteredLane->getID()); @@ -813,10 +820,10 @@ #ifdef DEBUG_E2_MAKE_VEHINFO if DEBUG_COND { std::cout << SIMTIME << " Making VehicleInfo for vehicle '" << veh.getID() << "'." - << "\ndistToDetectorEnd = " << distToDetectorEnd - << "\nveh.getPositionOnLane() = " << veh.getPositionOnLane() - << "\nentry lane offset (lane begin from detector begin) = " << entryOffset - << std::endl; + << "\ndistToDetectorEnd = " << distToDetectorEnd + << "\nveh.getPositionOnLane() = " << veh.getPositionOnLane() + << "\nentry lane offset (lane begin from detector begin) = " << entryOffset + << std::endl; } #endif return new VehicleInfo(veh.getID(), veh.getVehicleType().getID(), veh.getVehicleType().getLength(), veh.getVehicleType().getMinGap(), enteredLane, entryOffset, j, @@ -829,12 +836,12 @@ #ifdef DEBUG_E2_DETECTOR_UPDATE if DEBUG_COND { std::cout << "\n" << SIMTIME << " detectorUpdate() for detector '" << myID << "'" - << "\nmyCurrentMeanSpeed = " << myCurrentMeanSpeed - << "\nmyCurrentMeanLength = " << myCurrentMeanLength - << "\nmyNumberOfEnteredVehicles = " << myNumberOfEnteredVehicles - << "\nmyNumberOfLeftVehicles = " << myNumberOfLeftVehicles - << "\nmyNumberOfSeenVehicles = " << myNumberOfSeenVehicles - << std::endl; + << "\nmyCurrentMeanSpeed = " << myCurrentMeanSpeed + << "\nmyCurrentMeanLength = " << myCurrentMeanLength + << "\nmyNumberOfEnteredVehicles = " << myNumberOfEnteredVehicles + << "\nmyNumberOfLeftVehicles = " << myNumberOfLeftVehicles + << "\nmyNumberOfSeenVehicles = " << myNumberOfSeenVehicles + << std::endl; } #endif @@ -892,8 +899,8 @@ #ifdef DEBUG_E2_DETECTOR_UPDATE if DEBUG_COND { std::cout << " Vehicle '" << iv->second->id << "'" << ": '" - << iv->second->currentLane->getID() << "'" - << std::endl; + << iv->second->currentLane->getID() << "'" + << std::endl; } #endif } @@ -956,11 +963,11 @@ #ifdef DEBUG_E2_DETECTOR_UPDATE if DEBUG_COND { std::cout << SIMTIME << " integrateMoveNotification() for vehicle '" << mni->id << "'" - << "\ntimeOnDetector = " << mni->timeOnDetector - << "\nlengthOnDetector = " << mni->lengthOnDetector - << "\ntimeLoss = " << mni->timeLoss - << "\nspeed = " << mni->speed - << std::endl; + << "\ntimeOnDetector = " << mni->timeOnDetector + << "\nlengthOnDetector = " << mni->lengthOnDetector + << "\ntimeLoss = " << mni->timeLoss + << "\nspeed = " << mni->speed + << std::endl; } #endif @@ -991,8 +998,8 @@ #ifdef DEBUG_E2_NOTIFY_MOVE if DEBUG_COND { std::cout << SIMTIME << " makeMoveNotification() for vehicle '" << veh.getID() << "'" - << " oldPos = " << oldPos << " newPos = " << newPos << " newSpeed = " << newSpeed - << std::endl; + << " oldPos = " << oldPos << " newPos = " << newPos << " newSpeed = " << newSpeed + << std::endl; } #endif @@ -1019,15 +1026,17 @@ #ifdef DEBUG_E2_NOTIFY_MOVE if DEBUG_COND { std::cout << SIMTIME << " lengthOnDetector = " << lengthOnDetector - << "\nvehInfo.exitOffset = " << vehInfo.exitOffset - << " vehInfo.entryOffset = " << vehInfo.entryOffset - << " distToExit = " << distToExit - << std::endl; + << "\nvehInfo.exitOffset = " << vehInfo.exitOffset + << " vehInfo.entryOffset = " << vehInfo.entryOffset + << " distToExit = " << distToExit + << std::endl; } #endif /* Store new infos */ -return new MoveNotificationInfo(veh.getID(), oldPos, newPos, newSpeed, veh.getAcceleration(), myDetectorLength - (vehInfo.entryOffset + newPos), timeOnDetector, lengthOnDetector, timeLoss, stillOnDetector); +return new MoveNotificationInfo(veh.getID(), oldPos, newPos, newSpeed, veh.getAcceleration(), + myDetectorLength - (vehInfo.entryOffset + newPos), + timeOnDetector, lengthOnDetector, timeLoss, stillOnDetector); } void @@ -1152,7 +1161,7 @@ #ifdef DEBUG_E2_JAMS if DEBUG_COND { std::cout << "\n" << SIMTIME << " processJams()" - << "\nNumber of jams: " << jams.size() << std::endl; + << "\nNumber of jams: " << jams.size() << std::endl; } #endif @@ -1179,9 +1188,9 @@ #ifdef DEBUG_E2_JAMS if DEBUG_COND { std::cout << SIMTIME << " processing jam nr." << ((int) distance((std::vector::const_iterator) jams.begin(), i) + 1) - << "\njamLengthInMeters = " << jamLengthInMeters - << " jamLengthInVehicles = " << jamLengthInVehicles - << std::endl; + << "\njamLengthInMeters = " << jamLengthInMeters + << " jamLengthInVehicles = " << jamLengthInVehicles + << std::endl; } #endif } @@ -1243,11 +1252,11 @@ #ifdef DEBUG_E2_TIME_ON_DETECTOR if DEBUG_COND { std::cout << SIMTIME << " calculateTimeLoss() for vehicle '" << veh.getID() << "'" - << " oldPos = " << oldPos << " newPos = " << newPos - << " entryPos = " << entryPos << " exitPos = " << exitPos - << " timeOnDetector = " << timeOnDetector - << " timeLoss = " << timeLoss - << std::endl; + << " oldPos = " << oldPos << " newPos = " << newPos + << " entryPos = " << entryPos << " exitPos = " << exitPos + << " timeOnDetector = " << timeOnDetector + << " timeLoss = " << timeLoss + << std::endl; } #endif } @@ -1303,11 +1312,11 @@ if DEBUG_COND { std::stringstream ss; ss << "sampledSeconds=\"" << myVehicleSamples << "\" " - << "myTimeSamples=\"" << myTimeSamples << "\" " - << "myOccupancySum=\"" << myOccupancySum << "\" " - << "myMeanVehicleNumber=\"" << myMeanVehicleNumber << "\" " - << "nVehEntered=\"" << myNumberOfEnteredVehicles << "\" " - << "meanSpeed=\"" << meanSpeed << "\""; + << "myTimeSamples=\"" << myTimeSamples << "\" " + << "myOccupancySum=\"" << myOccupancySum << "\" " + << "myMeanVehicleNumber=\"" << myMeanVehicleNumber << "\" " + << "nVehEntered=\"" << myNumberOfEnteredVehicles << "\" " + << "meanSpeed=\"" << meanSpeed << "\""; std::cout << ss.str() << std::endl; } #endif diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSE2Collector.h sumo-1.2.0+dfsg1/src/microsim/output/MSE2Collector.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSE2Collector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSE2Collector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,13 +36,14 @@ #include #include #include -#include #include // =========================================================================== // class declarations // =========================================================================== class OutputDevice; +class SUMOVehicle; +class SUMOTrafficObject; // =========================================================================== @@ -288,7 +289,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyMove */ - virtual bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, + virtual bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); @@ -303,7 +304,7 @@ * @param[in] isLaneChange whether the vehicle changed from the lane * @see MSMoveReminder::notifyLeave */ - virtual bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + virtual bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Adds the vehicle to known vehicles if not beyond the dector @@ -318,7 +319,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - virtual bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane); + virtual bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane); /// @} diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSE3Collector.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSE3Collector.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSE3Collector.cpp 2018-11-26 23:00:43.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSE3Collector.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -56,25 +56,27 @@ bool -MSE3Collector::MSE3EntryReminder::notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane) { +MSE3Collector::MSE3EntryReminder::notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane) { #ifdef DEBUG_E3_NOTIFY_ENTER if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { std::cout << SIMTIME - << " MSE3EntryReminder::notifyEnter() (" << getDescription() << "on lane '" << myLane->getID() << "')" - << " vehicle '" << veh.getID() << "'" - << " enteredLane=" << enteredLane->getID() - << " reason=" << reason - << "\n"; + << " MSE3EntryReminder::notifyEnter() (" << getDescription() << "on lane '" << myLane->getID() << "')" + << " vehicle '" << veh.getID() << "'" + << " enteredLane=" << enteredLane->getID() + << " reason=" << reason + << "\n"; } #endif if (reason != NOTIFICATION_JUNCTION) { const double posOnLane = veh.getBackPositionOnLane(enteredLane) + veh.getVehicleType().getLength(); if (myLane == enteredLane && posOnLane > myPosition) { const auto& itVeh = myCollector.myEnteredContainer.find(&veh); - if (itVeh == myCollector.myEnteredContainer.end() || + if (itVeh == myCollector.myEnteredContainer.end() || itVeh->second.entryReminder != this) { #ifdef DEBUG_E3_NOTIFY_ENTER - if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) std::cout << " assume already known\n"; + if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { + std::cout << " assume already known\n"; + } #endif // if the vehicle changes into a covered section we assume it was already registered on another lane return false; @@ -86,23 +88,25 @@ bool -MSE3Collector::MSE3EntryReminder::notifyMove(SUMOVehicle& veh, double oldPos, +MSE3Collector::MSE3EntryReminder::notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed) { #ifdef DEBUG_E3_NOTIFY_MOVE if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { std::cout << SIMTIME - << " MSE3EntryReminder::notifyMove() (" << getDescription() << "on lane '" << myLane->getID() << "')" - << " vehicle '" << veh.getID() << "'" - << " entered. oldPos=" << oldPos << " newPos=" << newPos << " newSpeed=" << newSpeed - << " myPosition=" << myPosition - << "\n"; + << " MSE3EntryReminder::notifyMove() (" << getDescription() << "on lane '" << myLane->getID() << "')" + << " vehicle '" << veh.getID() << "'" + << " entered. oldPos=" << oldPos << " newPos=" << newPos << " newSpeed=" << newSpeed + << " myPosition=" << myPosition + << "\n"; } #endif if (myCollector.myEnteredContainer.find(&veh) == myCollector.myEnteredContainer.end() && newPos > myPosition) { if (oldPos > myPosition) { // was behind the detector already in the last step #ifdef DEBUG_E3_NOTIFY_MOVE - if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) std::cout << " already behind\n"; + if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { + std::cout << " already behind\n"; + } #endif return false; } else { @@ -114,7 +118,9 @@ const double fractionTimeOnDet = TS - timeBeforeEnter; myCollector.enter(veh, entryTime - fractionTimeOnDet, fractionTimeOnDet, this); #ifdef DEBUG_E3_NOTIFY_MOVE - if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) std::cout << " enter\n"; + if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { + std::cout << " enter\n"; + } #endif } } @@ -123,14 +129,14 @@ bool -MSE3Collector::MSE3EntryReminder::notifyLeave(SUMOVehicle& veh, double, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSE3Collector::MSE3EntryReminder::notifyLeave(SUMOTrafficObject& veh, double, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { #ifdef DEBUG_E3_NOTIFY_LEAVE if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { std::cout << SIMTIME - << " MSE3EntryReminder::notifyLeave() (" << getDescription() << "on lane '" << myLane->getID() << "')" - << " vehicle '" << veh.getID() << "'" - << " reason=" << reason - << "\n"; + << " MSE3EntryReminder::notifyLeave() (" << getDescription() << "on lane '" << myLane->getID() << "')" + << " vehicle '" << veh.getID() << "'" + << " reason=" << reason + << "\n"; } #endif if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { @@ -153,15 +159,15 @@ bool -MSE3Collector::MSE3LeaveReminder::notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane) { +MSE3Collector::MSE3LeaveReminder::notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane) { #ifdef DEBUG_E3_NOTIFY_ENTER if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { std::cout << SIMTIME - << " MSE3LeaveReminder::notifyEnter() (" << getDescription() << "on lane '" << myLane->getID() << "')" - << " vehicle '" << veh.getID() << "'" - << " enteredLane=" << enteredLane->getID() - << " reason=" << reason - << "\n"; + << " MSE3LeaveReminder::notifyEnter() (" << getDescription() << "on lane '" << myLane->getID() << "')" + << " vehicle '" << veh.getID() << "'" + << " enteredLane=" << enteredLane->getID() + << " reason=" << reason + << "\n"; } #endif if (reason != NOTIFICATION_JUNCTION) { @@ -170,7 +176,9 @@ // if the vehicle changes into a covered section we assume it was already registered on another lane // however, if it is not fully past the detector we still need to track it #ifdef DEBUG_E3_NOTIFY_ENTER - if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) std::cout << " assume already known\n"; + if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { + std::cout << " assume already known\n"; + } #endif return false; } @@ -180,16 +188,16 @@ bool -MSE3Collector::MSE3LeaveReminder::notifyMove(SUMOVehicle& veh, double oldPos, +MSE3Collector::MSE3LeaveReminder::notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed) { #ifdef DEBUG_E3_NOTIFY_MOVE if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { std::cout << SIMTIME - << " MSE3LeaveReminder::notifyMove() (" << getDescription() << " on lane '" << myLane->getID() << "')" - << " vehicle '" << veh.getID() << "'" - << " entered. oldPos=" << oldPos << " newPos=" << newPos << " newSpeed=" << newSpeed - << " myPosition=" << myPosition - << "\n"; + << " MSE3LeaveReminder::notifyMove() (" << getDescription() << " on lane '" << myLane->getID() << "')" + << " vehicle '" << veh.getID() << "'" + << " entered. oldPos=" << oldPos << " newPos=" << newPos << " newSpeed=" << newSpeed + << " myPosition=" << myPosition + << "\n"; } #endif if (newPos < myPosition) { @@ -204,7 +212,9 @@ const double leaveTimeFront = SIMTIME - TS + timeBeforeLeave; myCollector.leaveFront(veh, leaveTimeFront); #ifdef DEBUG_E3_NOTIFY_MOVE - if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) std::cout << " leaveFront\n"; + if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { + std::cout << " leaveFront\n"; + } #endif } const double backPos = newPos - veh.getVehicleType().getLength(); @@ -219,27 +229,31 @@ const double timeBeforeLeave = MSCFModel::passingTime(oldBackPos, myPosition, backPos, oldSpeed, newSpeed); myCollector.leave(veh, leaveStep - TS + timeBeforeLeave, timeBeforeLeave); #ifdef DEBUG_E3_NOTIFY_MOVE - if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) std::cout << " leave\n"; + if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { + std::cout << " leave\n"; + } #endif return false; } bool -MSE3Collector::MSE3LeaveReminder::notifyLeave(SUMOVehicle& veh , double /* lastPos */, MSMoveReminder::Notification reason, const MSLane* enteredLane) { +MSE3Collector::MSE3LeaveReminder::notifyLeave(SUMOTrafficObject& veh, double /* lastPos */, MSMoveReminder::Notification reason, const MSLane* enteredLane) { #ifdef DEBUG_E3_NOTIFY_LEAVE if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { std::cout << SIMTIME - << " MSE3LeaveReminder::notifyLeave() (" << getDescription() << "on lane '" << myLane->getID() << "')" - << " vehicle '" << veh.getID() << "'" - << " reason=" << reason - << "\n"; + << " MSE3LeaveReminder::notifyLeave() (" << getDescription() << "on lane '" << myLane->getID() << "')" + << " vehicle '" << veh.getID() << "'" + << " reason=" << reason + << "\n"; } #endif if (reason == MSMoveReminder::NOTIFICATION_LANE_CHANGE && &enteredLane->getEdge() == &myLane->getEdge()) { // keep the detector when changing while still on the exit detector but already on a new lane (#4803) #ifdef DEBUG_E3_NOTIFY_LEAVE - if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) std::cout << " remove reminder, keep in container\n"; + if (DEBUG_COND(myCollector) && DEBUG_COND_VEH(veh)) { + std::cout << " remove reminder, keep in container\n"; + } #endif return false; } @@ -300,7 +314,7 @@ void -MSE3Collector::enter(const SUMOVehicle& veh, const double entryTimestep, const double fractionTimeOnDet, MSE3EntryReminder* entryReminder) { +MSE3Collector::enter(const SUMOTrafficObject& veh, const double entryTimestep, const double fractionTimeOnDet, MSE3EntryReminder* entryReminder) { if (!vehicleApplies(veh)) { return; } @@ -335,7 +349,7 @@ void -MSE3Collector::leaveFront(const SUMOVehicle& veh, const double leaveTimestep) { +MSE3Collector::leaveFront(const SUMOTrafficObject& veh, const double leaveTimestep) { if (!vehicleApplies(veh)) { return; } @@ -350,7 +364,7 @@ void -MSE3Collector::leave(const SUMOVehicle& veh, const double leaveTimestep, const double fractionTimeOnDet) { +MSE3Collector::leave(const SUMOTrafficObject& veh, const double leaveTimestep, const double fractionTimeOnDet) { if (!vehicleApplies(veh)) { return; } @@ -413,7 +427,7 @@ double meanIntervalHaltsPerVehicleWithin = 0.; double meanIntervalDurationWithin = 0.; double meanTimeLossWithin = 0.; - for (std::map::iterator i = myEnteredContainer.begin(); i != myEnteredContainer.end(); ++i) { + for (std::map::iterator i = myEnteredContainer.begin(); i != myEnteredContainer.end(); ++i) { meanHaltsPerVehicleWithin += (double)(*i).second.haltings; meanIntervalHaltsPerVehicleWithin += (double)(*i).second.intervalHaltings; const double end = (*i).second.backLeaveTime == 0 ? STEPS2TIME(stopTime) : (*i).second.backLeaveTime; @@ -475,8 +489,8 @@ MSE3Collector::detectorUpdate(const SUMOTime step) { myCurrentMeanSpeed = 0; myCurrentHaltingsNumber = 0; - for (std::map::iterator pair = myEnteredContainer.begin(); pair != myEnteredContainer.end(); ++pair) { - const SUMOVehicle* veh = pair->first; + for (std::map::iterator pair = myEnteredContainer.begin(); pair != myEnteredContainer.end(); ++pair) { + const SUMOTrafficObject* veh = pair->first; #ifdef DEBUG_E3_DETECTORUPDATE //if (DEBUG_COND(*this) && DEBUG_COND_VEH(*veh)) { if (DEBUG_COND(*this)) { @@ -494,7 +508,7 @@ values.haltingBegin = step; } SUMOTime haltingDuration = step - values.haltingBegin; - if (haltingDuration >= myHaltingTimeThreshold + if (haltingDuration >= myHaltingTimeThreshold && haltingDuration < (myHaltingTimeThreshold + DELTA_T)) { values.haltings++; values.intervalHaltings++; @@ -533,7 +547,7 @@ 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-1.1.0+dfsg1/src/microsim/output/MSE3Collector.h sumo-1.2.0+dfsg1/src/microsim/output/MSE3Collector.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSE3Collector.h 2018-11-26 23:00:43.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSE3Collector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,7 +39,7 @@ // =========================================================================== // class declarations // =========================================================================== -class SUMOVehicle; +class SUMOTrafficObject; class OutputDevice; @@ -83,7 +83,7 @@ * @return True if vehicle enters the reminder. * @see Notification */ - bool notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane); + bool notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane); /** @brief Checks whether the vehicle enters * @@ -100,7 +100,7 @@ * @see MSMoveReminder::notifyMove * @see MSE3Collector::enter */ - bool notifyMove(SUMOVehicle& veh, double , double newPos, double); + bool notifyMove(SUMOTrafficObject& veh, double, double newPos, double); /** @brief Processes state changes of a vehicle @@ -113,7 +113,7 @@ * @param[in] reason The reason for the state change * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} @@ -161,7 +161,7 @@ * @return True if vehicle enters the reminder. * @see Notification */ - bool notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane); + bool notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane); /** @brief Checks whether the vehicle leaves * @@ -178,7 +178,7 @@ * @see MSMoveReminder::notifyMove * @see MSE3Collector::leave */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double); /** @brief Processes state changes of a vehicle * @@ -189,7 +189,7 @@ * @param[in] reason The reason for the state change * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); //@} @@ -244,7 +244,7 @@ * @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(const SUMOVehicle& veh, const double entryTimestep, const double fractionTimeOnDet, MSE3EntryReminder* entryReminder); + void enter(const SUMOTrafficObject& veh, const double entryTimestep, const double fractionTimeOnDet, MSE3EntryReminder* entryReminder); /** @brief Called if a vehicle front passes a leave-cross-section. @@ -252,7 +252,7 @@ * @param[in] veh The vehicle that left the area * @param[in] leaveTimestep The time in seconds the vehicle started crossing the line */ - void leaveFront(const SUMOVehicle& veh, const double leaveTimestep); + void leaveFront(const SUMOTrafficObject& veh, const double leaveTimestep); /** @brief Called if a vehicle back passes a leave-cross-section. @@ -263,7 +263,7 @@ * @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(const SUMOVehicle& veh, const double leaveTimestep, const double fractionTimeOnDet); + void leave(const SUMOTrafficObject& veh, const double leaveTimestep, const double fractionTimeOnDet); /// @name Methods returning current values @@ -395,7 +395,7 @@ }; /// @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::vector myLeftContainer; diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSEmissionExport.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSEmissionExport.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSEmissionExport.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSEmissionExport.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSEmissionExport.h sumo-1.2.0+dfsg1/src/microsim/output/MSEmissionExport.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSEmissionExport.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSEmissionExport.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSFCDExport.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSFCDExport.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSFCDExport.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSFCDExport.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,17 +29,18 @@ #include #include #include +#include #include #include #include #include -#include "MSFCDExport.h" #include #include #include #include #include #include +#include "MSFCDExport.h" // =========================================================================== @@ -134,7 +135,7 @@ void MSFCDExport::writeTransportable(OutputDevice& of, const MSEdge* e, MSTransportable* p, SumoXMLTag tag, bool useGeo, bool elevation) { - if (!MSDevice::equippedByParameter(p, "fcd", true)) { + if (p->getDevice(typeid(MSTransportableDevice_FCD)) == nullptr) { return; } Position pos = p->getPosition(); diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSFCDExport.h sumo-1.2.0+dfsg1/src/microsim/output/MSFCDExport.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSFCDExport.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSFCDExport.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSFullExport.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSFullExport.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSFullExport.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSFullExport.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSFullExport.h sumo-1.2.0+dfsg1/src/microsim/output/MSFullExport.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSFullExport.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSFullExport.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSInductLoop.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSInductLoop.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSInductLoop.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSInductLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -73,7 +73,7 @@ bool -MSInductLoop::notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* /* enteredLane */) { +MSInductLoop::notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* /* enteredLane */) { if (!vehicleApplies(veh)) { return false; } @@ -91,7 +91,7 @@ bool -MSInductLoop::notifyMove(SUMOVehicle& veh, double oldPos, +MSInductLoop::notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed) { if (newPos < myPosition) { // detector not reached yet @@ -134,7 +134,7 @@ bool -MSInductLoop::notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSInductLoop::notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (reason != MSMoveReminder::NOTIFICATION_JUNCTION) { leaveDetectorByLaneChange(veh, lastPos); return false; @@ -147,7 +147,7 @@ MSInductLoop::getCurrentSpeed() const { std::vector d = collectVehiclesOnDet(MSNet::getInstance()->getCurrentTimeStep() - DELTA_T); return d.size() != 0 - ? accumulate(d.begin(), d.end(), (double) 0.0, speedSum) / (double) d.size() + ? std::accumulate(d.begin(), d.end(), (double) 0.0, speedSum) / (double) d.size() : -1; } @@ -156,7 +156,7 @@ MSInductLoop::getCurrentLength() const { std::vector d = collectVehiclesOnDet(MSNet::getInstance()->getCurrentTimeStep() - DELTA_T); return d.size() != 0 - ? accumulate(d.begin(), d.end(), (double) 0.0, lengthSum) / (double) d.size() + ? std::accumulate(d.begin(), d.end(), (double) 0.0, lengthSum) / (double) d.size() : -1; } @@ -221,28 +221,33 @@ double occupancy = 0.; double speedSum = 0.; double lengthSum = 0.; + // to approximate the space mean speed + double inverseSpeedSum = 0.; for (std::deque< VehicleData >::const_iterator i = myVehicleDataCont.begin(); i != myVehicleDataCont.end(); ++i) { const double timeOnDetDuringInterval = i->leaveTimeM - MAX2(STEPS2TIME(startTime), i->entryTimeM); occupancy += MIN2(timeOnDetDuringInterval, t); speedSum += i->speedM; + assert(i->speedM > 0); + inverseSpeedSum += 1. / i->speedM; lengthSum += i->lengthM; } - for (std::map< SUMOVehicle*, double >::const_iterator i = myVehiclesOnDet.begin(); i != myVehiclesOnDet.end(); ++i) { + for (std::map< SUMOTrafficObject*, double >::const_iterator i = myVehiclesOnDet.begin(); i != myVehiclesOnDet.end(); ++i) { occupancy += STEPS2TIME(stopTime) - MAX2(STEPS2TIME(startTime), i->second); } occupancy = occupancy / t * (double) 100.; const double meanSpeed = myVehicleDataCont.size() != 0 ? speedSum / (double)myVehicleDataCont.size() : -1; + const double harmonicMeanSpeed = myVehicleDataCont.size() != 0 ? (double)myVehicleDataCont.size() / inverseSpeedSum : -1; const double meanLength = myVehicleDataCont.size() != 0 ? lengthSum / (double)myVehicleDataCont.size() : -1; dev.openTag(SUMO_TAG_INTERVAL).writeAttr(SUMO_ATTR_BEGIN, STEPS2TIME(startTime)).writeAttr(SUMO_ATTR_END, STEPS2TIME(stopTime)); dev.writeAttr(SUMO_ATTR_ID, StringUtils::escapeXML(getID())).writeAttr("nVehContrib", myVehicleDataCont.size()); - dev.writeAttr("flow", flow).writeAttr("occupancy", occupancy).writeAttr("speed", meanSpeed); + dev.writeAttr("flow", flow).writeAttr("occupancy", occupancy).writeAttr("speed", meanSpeed).writeAttr("harmonicMeanSpeed", harmonicMeanSpeed); dev.writeAttr("length", meanLength).writeAttr("nVehEntered", myEnteredVehicleNumber).closeTag(); reset(); } void -MSInductLoop::enterDetectorByMove(SUMOVehicle& veh, +MSInductLoop::enterDetectorByMove(SUMOTrafficObject& veh, double entryTimestep) { // // Debug (Leo) // std::cout << "enterDetectorByMove(), detector = '"<< myID <<"', veh = '" << veh.getID() << "'\n"; @@ -253,7 +258,7 @@ void -MSInductLoop::leaveDetectorByMove(SUMOVehicle& veh, +MSInductLoop::leaveDetectorByMove(SUMOTrafficObject& veh, double leaveTimestep) { // // Debug (Leo) @@ -273,7 +278,7 @@ void -MSInductLoop::leaveDetectorByLaneChange(SUMOVehicle& veh, double /* lastPos */) { +MSInductLoop::leaveDetectorByLaneChange(SUMOTrafficObject& veh, double /* lastPos */) { // // Debug (Leo) // std::cout << "leaveDetectorByLaneChange(), detector = '"<< myID <<"', veh = '" << veh.getID() << "'\n"; @@ -298,7 +303,7 @@ } } for (VehicleMap::const_iterator i = myVehiclesOnDet.begin(); i != myVehiclesOnDet.end(); ++i) { - SUMOVehicle* v = (*i).first; + SUMOTrafficObject* v = (*i).first; 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-1.1.0+dfsg1/src/microsim/output/MSInductLoop.h sumo-1.2.0+dfsg1/src/microsim/output/MSInductLoop.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSInductLoop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSInductLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -108,7 +108,7 @@ * @return True if vehicle enters the induction loop * @see Notification */ - bool notifyEnter(SUMOVehicle& veh, Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, Notification reason, const MSLane* enteredLane = 0); /** @brief Checks whether the vehicle shall be counted and/or shall still touch this MSMoveReminder * @@ -126,7 +126,7 @@ * @see enterDetectorByMove * @see leaveDetectorByMove */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /** @brief Dismisses the vehicle if it is on the detector due to a lane change @@ -143,7 +143,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); //@} @@ -283,6 +283,8 @@ */ virtual std::vector collectVehiclesOnDet(SUMOTime t, bool leaveTime = false) const; + /// @brief allows for special color in the gui version + virtual void setSpecialColor(const RGBColor* /*color*/) {}; protected: /// @name Methods that add and remove vehicles from internal container @@ -292,7 +294,7 @@ * @param veh The entering vehicle. * @param entryTimestep Timestep (not necessary integer) of entrance. */ - virtual void enterDetectorByMove(SUMOVehicle& veh, double entryTimestep); + virtual void enterDetectorByMove(SUMOTrafficObject& veh, double entryTimestep); /** @brief Processes a vehicle that leaves the detector @@ -303,14 +305,14 @@ * @param veh The leaving vehicle. * @param leaveTimestep Timestep (not necessary integer) of leaving. */ - virtual void leaveDetectorByMove(SUMOVehicle& veh, double leaveTimestep); + virtual void leaveDetectorByMove(SUMOTrafficObject& veh, double leaveTimestep); /** @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, double lastPos); + virtual void leaveDetectorByLaneChange(SUMOTrafficObject& veh, double lastPos); /// @} @@ -356,7 +358,7 @@ /// @brief Type of myVehiclesOnDet - typedef std::map< SUMOVehicle*, double > VehicleMap; + typedef std::map< SUMOTrafficObject*, double > VehicleMap; /// @brief Data for vehicles that have entered the detector (vehicle -> enter time) VehicleMap myVehiclesOnDet; diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSInstantInductLoop.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSInstantInductLoop.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSInstantInductLoop.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSInstantInductLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -59,7 +59,7 @@ bool -MSInstantInductLoop::notifyMove(SUMOVehicle& veh, double oldPos, +MSInstantInductLoop::notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed) { if (!vehicleApplies(veh)) { return false; @@ -86,7 +86,7 @@ const double newBackPos = newPos - veh.getVehicleType().getLength(); const double oldBackPos = oldPos - veh.getVehicleType().getLength(); if (newBackPos > myPosition) { - std::map::iterator i = myEntryTimes.find(&veh); + std::map::iterator i = myEntryTimes.find(&veh); if (i != myEntryTimes.end()) { // vehicle passed the detector const double timeBeforeLeave = MSCFModel::passingTime(oldBackPos, myPosition, newBackPos, oldSpeed, newSpeed); @@ -104,7 +104,7 @@ void -MSInstantInductLoop::write(const char* state, double t, SUMOVehicle& veh, double speed, const char* add, double addValue) { +MSInstantInductLoop::write(const char* state, double t, SUMOTrafficObject& veh, double speed, const char* add, double addValue) { myOutputDevice.openTag("instantOut").writeAttr( "id", getID()).writeAttr("time", toString(t)).writeAttr("state", state).writeAttr( "vehID", veh.getID()).writeAttr("speed", toString(speed)).writeAttr( @@ -118,13 +118,13 @@ bool -MSInstantInductLoop::notifyLeave(SUMOVehicle& veh, double /* lastPos */, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSInstantInductLoop::notifyLeave(SUMOTrafficObject& veh, double /* lastPos */, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { 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; } - std::map::iterator i = myEntryTimes.find(&veh); + std::map::iterator i = myEntryTimes.find(&veh); if (i != myEntryTimes.end()) { write("leave", SIMTIME, veh, veh.getSpeed()); myEntryTimes.erase(i); diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSInstantInductLoop.h sumo-1.2.0+dfsg1/src/microsim/output/MSInstantInductLoop.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSInstantInductLoop.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSInstantInductLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -38,6 +38,7 @@ class MSLane; class MSVehicle; class OutputDevice; +class SUMOTrafficObject; // =========================================================================== @@ -90,7 +91,7 @@ * @see enterDetectorByMove * @see leaveDetectorByMove */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /** @brief Dismisses the vehicle if it is on the detector due to a lane change @@ -107,7 +108,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); //@} @@ -149,7 +150,7 @@ * @param[in] add An optional attribute to report * @param[in] addValue The value of the optional attribute */ - void write(const char* state, double t, SUMOVehicle& veh, double speed, const char* add = 0, double addValue = -1); + void write(const char* state, double t, SUMOTrafficObject& veh, double speed, const char* add = 0, double addValue = -1); protected: @@ -163,7 +164,7 @@ double myLastExitTime; /// @brief The last exit time - std::map myEntryTimes; + std::map myEntryTimes; private: /// @brief Invalidated copy constructor. diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Amitran.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Amitran.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Amitran.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Amitran.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -78,7 +78,7 @@ void -MSMeanData_Amitran::MSLaneMeanDataValues::notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double /*meanSpeedVehicleOnLane*/, const double /*travelledDistanceFrontOnLane*/, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */) { +MSMeanData_Amitran::MSLaneMeanDataValues::notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double /*meanSpeedVehicleOnLane*/, const double /*travelledDistanceFrontOnLane*/, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */) { sampleSeconds += timeOnLane; travelledDistance += travelledDistanceVehicleOnLane; typedSamples[&veh.getVehicleType()] += timeOnLane; @@ -87,7 +87,7 @@ bool -MSMeanData_Amitran::MSLaneMeanDataValues::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSMeanData_Amitran::MSLaneMeanDataValues::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (myParent->vehicleApplies(veh)) { if (getLane() == nullptr || getLane() == static_cast(veh).getLane()) { if (reason == MSMoveReminder::NOTIFICATION_DEPARTED || reason == MSMoveReminder::NOTIFICATION_JUNCTION) { @@ -136,12 +136,13 @@ const bool withEmpty, const bool printDefaults, const bool withInternal, const bool trackVehicles, + const int detectPersons, const double maxTravelTime, const double minSamples, const double haltSpeed, const std::string& vTypes) : MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults, - withInternal, trackVehicles, maxTravelTime, minSamples, vTypes), + withInternal, trackVehicles, detectPersons, maxTravelTime, minSamples, vTypes), myHaltSpeed(haltSpeed) { } diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Amitran.h sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Amitran.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Amitran.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Amitran.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -100,7 +100,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); //@} bool isEmpty() const; @@ -120,7 +120,7 @@ /** @brief Internal notification about the vehicle moves * @see MSMoveReminder::notifyMoveInternal() */ - void notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */); + void notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */); private: /// @name Collected values @@ -152,6 +152,7 @@ * @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] detectPersons Whether pedestrians shall be detected instead of vehicles * @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 @@ -160,7 +161,7 @@ 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 bool withInternal, const bool trackVehicles, const int detectPersons, const double maxTravelTime, const double minSamples, const double haltSpeed, const std::string& vTypes); diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -70,7 +70,7 @@ bool -MSMeanData::MeanDataValues::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane) { +MSMeanData::MeanDataValues::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane) { #ifdef DEBUG_NOTIFY_ENTER std::cout << "\n" << SIMTIME << " MSMeanData_Net::MSLaneMeanDataValues: veh '" << veh.getID() << "' enters lane '" << enteredLane->getID() << "'" << std::endl; #else @@ -82,7 +82,7 @@ bool -MSMeanData::MeanDataValues::notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed) { +MSMeanData::MeanDataValues::notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed) { // if the vehicle has arrived, the reminder must be kept so it can be // notified of the arrival subsequently const double oldSpeed = veh.getPreviousSpeed(); @@ -252,7 +252,7 @@ bool -MSMeanData::MeanDataValues::notifyLeave(SUMOVehicle& /*veh*/, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSMeanData::MeanDataValues::notifyLeave(SUMOTrafficObject& /*veh*/, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (MSGlobals::gUseMesoSim) { return false; // reminder is re-added on every segment (@recheck for performance) } @@ -297,7 +297,7 @@ // FIXME: myTrackedData may still hold some undeleted TrackerEntries. When to delete those? (Leo), refers to #2251 // code below fails -// std::map::iterator j; +// std::map::iterator j; // for(j=myTrackedData.begin(); j!=myTrackedData.end();j++){ // delete j->second; // } @@ -323,13 +323,13 @@ void -MSMeanData::MeanDataValueTracker::notifyMoveInternal(const SUMOVehicle& veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane) { +MSMeanData::MeanDataValueTracker::notifyMoveInternal(const SUMOTrafficObject& veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane) { myTrackedData[&veh]->myValues->notifyMoveInternal(veh, frontOnLane, timeOnLane, meanSpeedFrontOnLane, meanSpeedVehicleOnLane, travelledDistanceFrontOnLane, travelledDistanceVehicleOnLane, meanLengthOnLane); } bool -MSMeanData::MeanDataValueTracker::notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSMeanData::MeanDataValueTracker::notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (myParent == nullptr || reason != MSMoveReminder::NOTIFICATION_SEGMENT) { myTrackedData[&veh]->myNumVehicleLeft++; } @@ -338,7 +338,7 @@ bool -MSMeanData::MeanDataValueTracker::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane) { +MSMeanData::MeanDataValueTracker::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane) { #ifdef DEBUG_NOTIFY_ENTER std::cout << "\n" << SIMTIME << " MSMeanData::MeanDataValueTracker: veh '" << veh.getID() << "' enters lane '" << enteredLane->getID() << "'" << std::endl; #else @@ -405,11 +405,13 @@ MSMeanData::MSMeanData(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 bool printDefaults, const bool withInternal, + const bool trackVehicles, + const int detectPersons, const double maxTravelTime, const double minSamples, const std::string& vTypes) : - MSDetectorFileOutput(id, vTypes), + MSDetectorFileOutput(id, vTypes, detectPersons), myMinSamples(minSamples), myMaxTravelTime(maxTravelTime), myDumpEmpty(withEmpty), @@ -426,7 +428,8 @@ MSMeanData::init() { const MSEdgeVector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) { - if ((myDumpInternal || !(*e)->isInternal()) && !(*e)->isCrossing() && !(*e)->isWalkingArea()) { + if ((myDumpInternal || !(*e)->isInternal()) && + ((detectPersons() && myDumpInternal) || (!(*e)->isCrossing() && !(*e)->isWalkingArea()))) { myEdges.push_back(*e); myMeasures.push_back(std::vector()); const std::vector& lanes = (*e)->getLanes(); diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Emissions.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Emissions.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Emissions.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Emissions.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -69,7 +69,7 @@ void -MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double /*travelledDistanceFrontOnLane*/, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */) { +MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double /*travelledDistanceFrontOnLane*/, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */) { sampleSeconds += timeOnLane; travelledDistance += travelledDistanceVehicleOnLane; const double a = veh.getAcceleration(); @@ -144,7 +144,7 @@ const double minSamples, const std::string& vTypes) : MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults, - withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) { + withInternal, trackVehicles, 0, maxTravelTime, minSamples, vTypes) { } diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Emissions.h sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Emissions.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Emissions.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Emissions.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -101,7 +101,7 @@ /** @brief Internal notification about the vehicle moves * @see MSMoveReminder::notifyMoveInternal() */ - void notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */); + void notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */); private: diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData.h sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,7 +39,7 @@ class OutputDevice; class MSEdge; class MSLane; -class SUMOVehicle; +class SUMOTrafficObject; typedef std::vector MSEdgeVector; @@ -94,7 +94,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - virtual bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + virtual bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Checks whether the reminder still has to be notified about the vehicle moves @@ -110,7 +110,7 @@ * * @return True if vehicle hasn't passed the reminder completely. */ - bool notifyMove(SUMOVehicle& veh, double oldPos, + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); @@ -122,7 +122,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyLeave */ - virtual bool notifyLeave(SUMOVehicle& veh, double lastPos, + virtual bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); @@ -208,7 +208,7 @@ /** @brief Internal notification about the vehicle moves * @see MSMoveReminder::notifyMoveInternal(). */ - void notifyMoveInternal(const SUMOVehicle& veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane); + void notifyMoveInternal(const SUMOTrafficObject& veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane); /** @brief Called if the vehicle leaves the reminder's lane @@ -220,7 +220,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Computes current values and adds them to their sums @@ -234,7 +234,7 @@ * @see MSMoveReminder::notifyEnter * @return Always true */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); //@} bool isEmpty() const; @@ -279,7 +279,7 @@ }; /// @brief The map of vehicles to data entries - std::map myTrackedData; + std::map myTrackedData; /// @brief The currently active meandata "intervals" std::list myCurrentData; @@ -297,6 +297,7 @@ * @param[in] withEmpty Information whether 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] detectPersons Whether pedestrians shall be detected instead of vehicles * @param[in] maxTravelTime the maximum travel time to use when calculating per vehicle output * @param[in] defaultEffort the value to use when calculating defaults * @param[in] minSamples the minimum number of sample seconds before the values are valid @@ -306,7 +307,8 @@ const SUMOTime dumpBegin, const SUMOTime dumpEnd, const bool useLanes, const bool withEmpty, const bool printDefaults, const bool withInternal, - const bool trackVehicles, const double minSamples, + const bool trackVehicles, const int detectPersons, + const double minSamples, const double maxTravelTime, const std::string& vTypes); diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.cpp 2018-10-26 22:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -75,7 +75,7 @@ void -MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double /*travelledDistanceFrontOnLane*/, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */) { +MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double /*travelledDistanceFrontOnLane*/, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */) { const double sn = HelpersHarmonoise::computeNoise(veh.getVehicleType().getEmissionClass(), // XXX: recheck, which value to use here for the speed. (Leo) Refs. #2579 (double) meanSpeedVehicleOnLane, veh.getAcceleration()); @@ -115,7 +115,7 @@ const double maxTravelTime, const double minSamples, const std::string& vTypes) : MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults, - withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) { + withInternal, trackVehicles, 0, maxTravelTime, minSamples, vTypes) { } diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.h sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Harmonoise.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -102,7 +102,7 @@ /** @brief Internal notification about the vehicle moves * @see MSMoveReminder::notifyMoveInternal() */ - void notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */); + void notifyMoveInternal(const SUMOTrafficObject& veh, const double /* frontOnLane */, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */); private: /// @name Collected values diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Net.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Net.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Net.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Net.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -117,7 +117,7 @@ void MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal( - const SUMOVehicle& veh, const double frontOnLane, + const SUMOTrafficObject& veh, const double frontOnLane, const double timeOnLane, const double /* meanSpeedFrontOnLane */, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, @@ -126,15 +126,18 @@ #ifdef DEBUG_OCCUPANCY if DEBUG_COND { std::cout << SIMTIME << "\n MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal()\n" - << " veh '" << veh.getID() << "' on lane '" << veh.getLane()->getID() << "'" - << ", timeOnLane=" << timeOnLane - << ", meanSpeedVehicleOnLane=" << meanSpeedVehicleOnLane - << ",\ntravelledDistanceFrontOnLane=" << travelledDistanceFrontOnLane - << ", travelledDistanceVehicleOnLane=" << travelledDistanceVehicleOnLane - << ", meanLengthOnLane=" << meanLengthOnLane - << std::endl; + << " veh '" << veh.getID() << "' on lane '" << veh.getLane()->getID() << "'" + << ", timeOnLane=" << timeOnLane + << ", meanSpeedVehicleOnLane=" << meanSpeedVehicleOnLane + << ",\ntravelledDistanceFrontOnLane=" << travelledDistanceFrontOnLane + << ", travelledDistanceVehicleOnLane=" << travelledDistanceVehicleOnLane + << ", meanLengthOnLane=" << meanLengthOnLane + << std::endl; } #endif + if (myParent != nullptr && !myParent->vehicleApplies(veh)) { + return; + } sampleSeconds += timeOnLane; travelledDistance += travelledDistanceVehicleOnLane; vehLengthSum += veh.getVehicleType().getLength() * timeOnLane; @@ -166,8 +169,9 @@ bool -MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { - if ((myParent == nullptr || myParent->vehicleApplies(veh)) && (getLane() == nullptr || getLane() == static_cast(veh).getLane())) { +MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { + if ((myParent == nullptr || myParent->vehicleApplies(veh)) && ( + getLane() == nullptr || !veh.isVehicle() || getLane() == static_cast(veh).getLane())) { if (MSGlobals::gUseMesoSim) { removeFromVehicleUpdateValues(veh); } @@ -190,14 +194,14 @@ bool -MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane) { +MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane) { #ifdef DEBUG_NOTIFY_ENTER std::cout << "\n" << SIMTIME << " MSMeanData_Net::MSLaneMeanDataValues: veh '" << veh.getID() << "' enters lane '" << enteredLane->getID() << "'" << std::endl; #else UNUSED_PARAMETER(enteredLane); #endif if (myParent == nullptr || myParent->vehicleApplies(veh)) { - if (getLane() == nullptr || getLane() == static_cast(veh).getLane()) { + if (getLane() == nullptr || !veh.isVehicle() || getLane() == static_cast(veh).getLane()) { if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { ++nVehDeparted; } else if (reason == MSMoveReminder::NOTIFICATION_LANE_CHANGE) { @@ -291,12 +295,13 @@ const bool withEmpty, const bool printDefaults, const bool withInternal, const bool trackVehicles, + const int detectPersons, const double maxTravelTime, const double minSamples, const double haltSpeed, const std::string& vTypes) : MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults, - withInternal, trackVehicles, maxTravelTime, minSamples, vTypes), + withInternal, trackVehicles, detectPersons, maxTravelTime, minSamples, vTypes), myHaltSpeed(haltSpeed) { } diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Net.h sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Net.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSMeanData_Net.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSMeanData_Net.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -97,7 +97,7 @@ * @see MSMoveReminder * @see MSMoveReminder::notifyLeave */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /** @brief Computes current values and adds them to their sums @@ -113,7 +113,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); //@} bool isEmpty() const; @@ -133,7 +133,7 @@ /** @brief Internal notification about the vehicle moves * @see MSMoveReminder::notifyMoveInternal */ - void notifyMoveInternal(const SUMOVehicle& veh, + void notifyMoveInternal(const SUMOTrafficObject& veh, const double frontOnLane, const double timeOnLane, const double, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, @@ -208,6 +208,7 @@ * @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] detectPersons Whether pedestrians shall be detected instead of vehicles * @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 @@ -216,7 +217,7 @@ MSMeanData_Net(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 bool withInternal, const bool trackVehicles, const int detectPersons, const double maxTravelTime, const double minSamples, const double haltSpeed, const std::string& vTypes); diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSQueueExport.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSQueueExport.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSQueueExport.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSQueueExport.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSQueueExport.h sumo-1.2.0+dfsg1/src/microsim/output/MSQueueExport.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSQueueExport.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSQueueExport.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSRouteProbe.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSRouteProbe.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSRouteProbe.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSRouteProbe.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -68,13 +68,16 @@ bool -MSRouteProbe::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { +MSRouteProbe::notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if (!vehicleApplies(veh)) { return false; } if (reason != MSMoveReminder::NOTIFICATION_SEGMENT && reason != MSMoveReminder::NOTIFICATION_LANE_CHANGE) { - if (myCurrentRouteDistribution.second->add(&veh.getRoute(), 1.)) { - veh.getRoute().addReference(); + SUMOVehicle* vehicle = dynamic_cast(&veh); + if (vehicle != nullptr) { + if (myCurrentRouteDistribution.second->add(&vehicle->getRoute(), 1.)) { + vehicle->getRoute().addReference(); + } } } return false; diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSRouteProbe.h sumo-1.2.0+dfsg1/src/microsim/output/MSRouteProbe.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSRouteProbe.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSRouteProbe.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -90,7 +90,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @} diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSStopOut.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSStopOut.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSStopOut.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSStopOut.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSStopOut.h sumo-1.2.0+dfsg1/src/microsim/output/MSStopOut.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSStopOut.h 2018-05-31 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSStopOut.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSVTKExport.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSVTKExport.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSVTKExport.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSVTKExport.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSVTKExport.h sumo-1.2.0+dfsg1/src/microsim/output/MSVTKExport.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSVTKExport.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSVTKExport.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSVTypeProbe.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSVTypeProbe.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSVTypeProbe.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSVTypeProbe.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSVTypeProbe.h sumo-1.2.0+dfsg1/src/microsim/output/MSVTypeProbe.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSVTypeProbe.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSVTypeProbe.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSXMLRawOut.cpp sumo-1.2.0+dfsg1/src/microsim/output/MSXMLRawOut.cpp --- sumo-1.1.0+dfsg1/src/microsim/output/MSXMLRawOut.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSXMLRawOut.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -117,17 +117,11 @@ void MSXMLRawOut::writeLane(OutputDevice& of, const MSLane& lane) { - of.openTag("lane") << " id=\"" << lane.myID << "\""; - if (lane.getVehicleNumber() != 0) { - for (std::vector::const_iterator veh = lane.myVehBuffer.begin(); - veh != lane.myVehBuffer.end(); ++veh) { - writeVehicle(of, **veh); - } - for (MSLane::VehCont::const_iterator veh = lane.myVehicles.begin(); - veh != lane.myVehicles.end(); ++veh) { - writeVehicle(of, **veh); - } + of.openTag("lane").writeAttr(SUMO_ATTR_ID, lane.getID()); + for (const MSBaseVehicle* const veh : lane.getVehiclesSecure()) { + writeVehicle(of, *veh); } + lane.releaseVehicles(); of.closeTag(); } diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/MSXMLRawOut.h sumo-1.2.0+dfsg1/src/microsim/output/MSXMLRawOut.h --- sumo-1.1.0+dfsg1/src/microsim/output/MSXMLRawOut.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/MSXMLRawOut.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/output/README_Contributing.md sumo-1.2.0+dfsg1/src/microsim/output/README_Contributing.md --- sumo-1.1.0+dfsg1/src/microsim/output/README_Contributing.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/output/README_Contributing.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,49 @@ +Please feel free to add and / or modify files here but keep in mind that +EPL requires that "derivative works" be licensed under the terms of the EPL +whereas "separate modules of software" may be licensed arbitrarily. +Modifications to the files and directories listed here are considered derivative work: + +- MSAmitranTrajectories.cpp +- MSAmitranTrajectories.h +- MSBatteryExport.cpp +- MSBatteryExport.h +- MSCrossSection.h +- MSDetectorControl.cpp +- MSDetectorControl.h +- MSDetectorFileOutput.h +- MSE2Collector.cpp +- MSE2Collector.h +- MSE3Collector.cpp +- MSE3Collector.h +- MSEmissionExport.cpp +- MSEmissionExport.h +- MSFCDExport.cpp +- MSFCDExport.h +- MSFullExport.cpp +- MSFullExport.h +- MSInductLoop.cpp +- MSInductLoop.h +- MSInstantInductLoop.cpp +- MSInstantInductLoop.h +- MSMeanData.cpp +- MSMeanData.h +- MSMeanData_Amitran.cpp +- MSMeanData_Amitran.h +- MSMeanData_Emissions.cpp +- MSMeanData_Emissions.h +- MSMeanData_Harmonoise.cpp +- MSMeanData_Harmonoise.h +- MSMeanData_Net.cpp +- MSMeanData_Net.h +- MSQueueExport.cpp +- MSQueueExport.h +- MSRouteProbe.cpp +- MSRouteProbe.h +- MSStopOut.cpp +- MSStopOut.h +- MSVTKExport.cpp +- MSVTKExport.h +- MSVTypeProbe.cpp +- MSVTypeProbe.h +- MSXMLRawOut.cpp +- MSXMLRawOut.h diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/Makefile.in sumo-1.2.0+dfsg1/src/microsim/pedestrians/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/Makefile.in 2018-12-17 23:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,638 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 - -EXTRA_DIST = MSPModel_Remote.cpp MSPModel_Remote.h hybridsim.proto -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) --foreign src/microsim/pedestrians/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/pedestrians/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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/pedestrians/MSPerson.cpp sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPerson.cpp --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPerson.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPerson.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -83,6 +83,10 @@ } } +MSTransportable::Stage* +MSPerson::MSPersonStage_Walking::clone() const { + return new MSPersonStage_Walking("dummyID", myRoute, myDestinationStop, myWalkingTime, mySpeed, myDepartPos, myArrivalPos, myDepartPosLat); +} const MSEdge* MSPerson::MSPersonStage_Walking::getEdge() const { @@ -140,6 +144,7 @@ MSPerson::MSPersonStage_Walking::proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous) { myDeparted = now; myRouteStep = myRoute.begin(); + myLastEdgeEntryTime = now; if (myWalkingTime == 0) { if (!person->proceed(net, now)) { MSNet::getInstance()->getPersonControl().erase(person); @@ -157,7 +162,14 @@ MSNet::getInstance()->getPersonControl().erase(person); return; } - (*myRouteStep)->addPerson(person); + const MSEdge* edge = *myRouteStep; + const MSLane* lane = getSidewalk(getEdge()); + if (lane != nullptr) { + for (MSMoveReminder* rem : lane->getMoveReminders()) { + rem->notifyEnter(*person, MSMoveReminder::NOTIFICATION_DEPARTED, lane); + } + } + edge->addPerson(person); } @@ -314,8 +326,19 @@ bool MSPerson::MSPersonStage_Walking::moveToNextEdge(MSPerson* person, SUMOTime currentTime, MSEdge* nextInternal) { ((MSEdge*)getEdge())->removePerson(person); + const MSLane* lane = getSidewalk(getEdge()); + const bool arrived = myRouteStep == myRoute.end() - 1; + if (lane != nullptr) { + for (MSMoveReminder* rem : lane->getMoveReminders()) { + rem->updateDetector(*person, 0.0, lane->getLength(), myLastEdgeEntryTime, currentTime, currentTime, true); + rem->notifyLeave(*person, + arrived ? getArrivalPos() : lane->getLength(), + arrived ? MSMoveReminder::NOTIFICATION_ARRIVED : MSMoveReminder::NOTIFICATION_JUNCTION); + } + } + myLastEdgeEntryTime = currentTime; //std::cout << SIMTIME << " moveToNextEdge person=" << person->getID() << "\n"; - if (myRouteStep == myRoute.end() - 1) { + if (arrived) { if (myDestinationStop != nullptr) { myDestinationStop->addTransportable(person); } @@ -331,6 +354,12 @@ } else { myCurrentInternalEdge = nextInternal; } + const MSLane* nextLane = getSidewalk(getEdge()); + if (nextLane != nullptr) { + for (MSMoveReminder* rem : nextLane->getMoveReminders()) { + rem->notifyEnter(*person, MSMoveReminder::NOTIFICATION_JUNCTION, nextLane); + } + } ((MSEdge*) getEdge())->addPerson(person); return false; } @@ -376,21 +405,30 @@ MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving() {} +MSTransportable::Stage* +MSPerson::MSPersonStage_Driving::clone() const { + return new MSPersonStage_Driving(myDestination, myDestinationStop, myArrivalPos, std::vector(myLines.begin(), myLines.end()), + myIntendedVehicleID, myIntendedDepart); +} void MSPerson::MSPersonStage_Driving::proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous) { - if (previous->getDestinationStop() != nullptr) { + const MSStoppingPlace* start = (previous->getStageType() == TRIP + ? previous->getOriginStop() + : previous->getDestinationStop()); + + if (start != nullptr) { // the arrival stop may have an access point - myWaitingEdge = &previous->getDestinationStop()->getLane().getEdge(); - myStopWaitPos = previous->getDestinationStop()->getWaitPosition(); - myWaitingPos = previous->getDestinationStop()->getWaitingPositionOnLane(); + myWaitingEdge = &start->getLane().getEdge(); + myStopWaitPos = start->getWaitPosition(person); + myWaitingPos = start->getWaitingPositionOnLane(person); } else { myWaitingEdge = previous->getEdge(); myStopWaitPos = Position::INVALID; myWaitingPos = previous->getEdgePos(now); } myWaitingSince = now; - SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(myWaitingEdge, myLines, myWaitingPos, person->getID()); + SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(person, myWaitingEdge, myWaitingPos); if (availableVehicle != nullptr && availableVehicle->getParameter().departProcedure == DEPART_TRIGGERED && !availableVehicle->hasDeparted()) { setVehicle(availableVehicle); myVehicle->addPerson(person); @@ -487,6 +525,10 @@ MSPerson::MSPersonStage_Access::~MSPersonStage_Access() {} +MSTransportable::Stage* +MSPerson::MSPersonStage_Access::clone() const { + return new MSPersonStage_Access(myDestination, myDestinationStop, myArrivalPos, myDist, myAmExit); +} void MSPerson::MSPersonStage_Access::proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* /* previous */) { @@ -574,7 +616,8 @@ if (bs != nullptr) { const double accessDist = bs->getAccessDistance(prior->getDestination()); if (accessDist > 0.) { - myStep = myPlan->insert(myStep, new MSPersonStage_Access(prior->getDestination(), bs, bs->getAccessPos(prior->getDestination()), accessDist, false)); + const double arrivalAtBs = (bs->getBeginLanePosition() + bs->getEndLanePosition()) / 2; + myStep = myPlan->insert(myStep, new MSPersonStage_Access(prior->getDestination(), bs, arrivalAtBs, accessDist, false)); } } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPerson.h sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPerson.h --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPerson.h 2018-10-10 12:28:12.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPerson.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -77,6 +77,8 @@ /// destructor ~MSPersonStage_Walking(); + Stage* clone() const; + /// proceeds to the next step virtual void proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous); @@ -189,6 +191,9 @@ /// the time the person is walking SUMOTime myWalkingTime; + /// the time the person entered the edge + SUMOTime myLastEdgeEntryTime; + /// @brief The route of the person ConstMSEdgeVector myRoute; @@ -243,6 +248,8 @@ /// destructor ~MSPersonStage_Driving(); + Stage* clone() const; + /// proceeds to the next step virtual void proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous); @@ -280,6 +287,8 @@ /// destructor ~MSPersonStage_Access(); + Stage* clone() const; + /// proceeds to the next step virtual void proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous); diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel.cpp sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel.cpp --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel.h sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel.h --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,15 +42,6 @@ #define DEBUG2 "disabled" #define DEBUGCOND(PEDID) (PEDID == DEBUG1 || PEDID == DEBUG2) -// =========================================================================== -// named (internal) constants -// =========================================================================== - - -// =========================================================================== -// static members -// =========================================================================== - // =========================================================================== // MSPModel_NonInteracting method definitions diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.h sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.h --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_NonInteracting.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.cpp sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.cpp --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.cpp 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -106,7 +106,7 @@ ClientContext context; Status st = myHybridsimStub->transferAgent(&context, req, &rpl); if (!st.ok()) { - throw ProcessError("Person: " + person->getID() + " could not be transferred to remote simulation"); + throw ProcessError("Person: " + person->getID() + " could not be transferred to remote simulation"); } if (!rpl.val()) { //TODO not yet implemented diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.h sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.h --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.h 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Remote.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.cpp sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.cpp --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.cpp 2018-12-17 23:00:33.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,10 +74,10 @@ // =========================================================================== MSPModel_Striping::WalkingAreaPaths MSPModel_Striping::myWalkingAreaPaths; +std::map > MSPModel_Striping::myWalkingAreaFoes; MSPModel_Striping::MinNextLengths MSPModel_Striping::myMinNextLengths; MSPModel_Striping::Pedestrians MSPModel_Striping::noPedestrians; - // model parameters (static to simplify access from class PState double MSPModel_Striping::stripeWidth; double MSPModel_Striping::dawdling; @@ -105,8 +105,8 @@ // =========================================================================== MSPModel_Striping::MSPModel_Striping(const OptionsCont& oc, MSNet* net) : - myNumActivePedestrians(0) { - net->getBeginOfTimestepEvents()->addEvent(new MovePedestrians(this), net->getCurrentTimeStep() + DELTA_T); + myNumActivePedestrians(0), + myAmActive(false) { initWalkingAreaPaths(net); // configurable parameters stripeWidth = oc.getFloat("pedestrian.striping.stripe-width"); @@ -125,11 +125,16 @@ PedestrianState* MSPModel_Striping::add(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, SUMOTime) { + MSNet* net = MSNet::getInstance(); + if (!myAmActive) { + net->getBeginOfTimestepEvents()->addEvent(new MovePedestrians(this), net->getCurrentTimeStep() + DELTA_T); + myAmActive = true; + } assert(person->getCurrentStageType() == MSTransportable::MOVING_WITHOUT_VEHICLE); const MSLane* lane = getSidewalk(person->getEdge()); if (lane == nullptr) { std::string error = "Person '" + person->getID() + "' could not find sidewalk on edge '" + person->getEdge()->getID() + "', time=" - + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."; + + time2string(net->getCurrentTimeStep()) + "."; if (OptionsCont::getOptions().getBool("ignore-route-errors")) { WRITE_WARNING(error); return nullptr; @@ -272,13 +277,14 @@ myActiveLanes.clear(); myNumActivePedestrians = 0; myWalkingAreaPaths.clear(); // need to recompute when lane pointers change + myWalkingAreaFoes.clear(); myMinNextLengths.clear(); } int MSPModel_Striping::numStripes(const MSLane* lane) { - return (int)floor(lane->getWidth() / stripeWidth); + return MAX2(1, (int)floor(lane->getWidth() / stripeWidth)); } int @@ -300,6 +306,28 @@ if (myWalkingAreaPaths.size() > 0) { return; } + // collect vehicle lanes that cross walkingareas + for (MSEdgeVector::const_iterator i = MSEdge::getAllEdges().begin(); i != MSEdge::getAllEdges().end(); ++i) { + const MSEdge* edge = *i; + if (!edge->isWalkingArea() && !edge->isCrossing()) { + for (MSLane* lane : edge->getLanes()) { + for (MSLink* link : lane->getLinkCont()) { + if (link->getWalkingAreaFoe() != nullptr) { + // link is an exit link + myWalkingAreaFoes[&link->getWalkingAreaFoe()->getEdge()].push_back(link->getLaneBefore()); + //std::cout << " wa=" << link->getWalkingAreaFoe()->getEdge().getID() << " foe=" << link->getLaneBefore()->getID() << "\n"; + } + if (link->getWalkingAreaFoeExit() != nullptr) { + // link is an exit link + myWalkingAreaFoes[&link->getWalkingAreaFoeExit()->getEdge()].push_back(link->getLaneBefore()); + //std::cout << " wa=" << link->getWalkingAreaFoeExit()->getEdge().getID() << " foe=" << link->getLaneBefore()->getID() << "\n"; + } + } + } + } + } + + // build walkingareaPaths for (MSEdgeVector::const_iterator i = MSEdge::getAllEdges().begin(); i != MSEdge::getAllEdges().end(); ++i) { const MSEdge* edge = *i; if (edge->isWalkingArea()) { @@ -527,7 +555,7 @@ if DEBUGCOND(ped) { std::cout << SIMTIME << " no next lane found for " << currentLane->getID() << " dir=" << ped.myDir << "\n"; } - if (usingInternalLanesStatic() && currentLane->getLinkCont().size() > 0) { + if (usingInternalLanesStatic() && currentLane->getLinkCont().size() > 0 && MSNet::getInstance()->hasPedestrianNetwork()) { WRITE_WARNING("Person '" + ped.myPerson->getID() + "' could not find route across junction '" + junction->getID() + "' from edge '" + currentEdge->getID() + "' to edge '" + nextRouteEdge->getID() + "', time=" + @@ -775,7 +803,7 @@ const double minY = stripeWidth * - 0.5 + NUMERICAL_EPS; const double maxY = stripeWidth * (numStripes(lane) - 0.5) - NUMERICAL_EPS; const WalkingAreaPath* debugPath = nullptr; - // need to handle each walkingAreaPath seperately and transform + // need to handle each walkingAreaPath separately and transform // coordinates beforehand std::set paths; for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end(); ++it) { @@ -824,6 +852,30 @@ } } } + auto itFoe = myWalkingAreaFoes.find(&lane->getEdge()); + if (itFoe != myWalkingAreaFoes.end()) { + // add vehicle foes on paths which cross this walkingarea + // translate the vehicle into a number of dummy-pedestrians + // that occupy the same space + for (const MSLane* foeLane : itFoe->second) { + for (auto itVeh = foeLane->anyVehiclesBegin(); itVeh != foeLane->anyVehiclesEnd(); ++itVeh) { + const MSVehicle* veh = *itVeh; + const Position relPos = path->shape.transformToVectorCoordinates(veh->getPosition()); + const Position relPos2 = path->shape.transformToVectorCoordinates(veh->getBackPosition()); + //std::cout << " pos=" << veh->getPosition() << " back=" << veh->getBackPosition() << " relPos=" << relPos << " relPos2=" << relPos2 << " shape=" << path->shape << "\n"; + if (addVehicleFoe(veh, lane, relPos, lateral_offset, minY, maxY, toDelete, transformedPeds) + && addVehicleFoe(veh, lane, relPos2, lateral_offset, minY, maxY, toDelete, transformedPeds)) { + // add in-between positions + const double length = veh->getVehicleType().getLength(); + for (double dist = stripeWidth; dist < length; dist += stripeWidth) { + const double relDist = dist / length; + Position between = (relPos * relDist) + (relPos2 * (1 - relDist)); + addVehicleFoe(veh, lane, between, lateral_offset, minY, maxY, toDelete, transformedPeds); + } + } + } + } + } moveInDirectionOnLane(transformedPeds, lane, currentTime, changedLane, dir); arriveAndAdvance(pedestrians, currentTime, changedLane, dir); // clean up @@ -839,6 +891,23 @@ } +bool +MSPModel_Striping::addVehicleFoe(const MSVehicle* veh, const MSLane* walkingarea, const Position& relPos, double lateral_offset, + double minY, double maxY, Pedestrians& toDelete, Pedestrians& transformedPeds) { + if (relPos != Position::INVALID) { + const double newY = relPos.y() + lateral_offset; + if (newY >= minY && newY <= maxY) { + PState* tp = new PStateVehicle(veh, walkingarea, relPos.x(), newY); + //std::cout << SIMTIME << " addVehicleFoe=" << veh->getID() << " rx=" << relPos.x() << " ry=" << newY << " s=" << tp->stripe() << " o=" << tp->otherStripe() << "\n"; + toDelete.push_back(tp); + transformedPeds.push_back(tp); + } + return true; + } else { + return false; + } +} + void MSPModel_Striping::arriveAndAdvance(Pedestrians& pedestrians, SUMOTime currentTime, std::set& changedLane, int dir) { // advance to the next lane / arrive at destination @@ -949,7 +1018,7 @@ Obstacles closedLink(stripes, Obstacle(p.myRelX + dir * (dist + NUMERICAL_EPS), 0, OBSTACLE_LINKCLOSED, "closedLink_" + link->getViaLaneOrLane()->getID(), 0)); p.mergeObstacles(currentObs, closedLink); if DEBUGCOND(p) { - std::cout << SIMTIME << " ped=" << p.myPerson->getID() << " obsWitTLS="; + std::cout << SIMTIME << " ped=" << p.myPerson->getID() << " obsWithTLS="; DEBUG_PRINT(currentObs); } // consider rerouting over another crossing @@ -1032,8 +1101,8 @@ // to brake, otherwise the person must be able to cross in time const double distToCrossBeforeVeh = (dir == FORWARD ? vo.xFwd : crossing->getLength() - vo.xBack); const double bGap = (prio - ? veh->getCarFollowModel().brakeGap(veh->getSpeed(), veh->getCarFollowModel().getMaxDecel(), 0) - : veh->getSpeed() * distToCrossBeforeVeh); // walking 1m/s + ? veh->getCarFollowModel().brakeGap(veh->getSpeed(), veh->getCarFollowModel().getMaxDecel(), 0) + : veh->getSpeed() * distToCrossBeforeVeh); // walking 1m/s double vehYmin; double vehYmax; // relY increases from left to right (the other way around from vehicles) @@ -1180,7 +1249,7 @@ xBack(ped.getMinX()), speed(ped.myDir * ped.mySpeed), type(OBSTACLE_PED), - description(ped.myPerson->getID()) { + description(ped.getID()) { assert(!ped.myWaitingToEnter); } @@ -1255,6 +1324,22 @@ myNLI = getNextLane(*this, lane, nullptr); } +MSPModel_Striping::PState::PState(): + myPerson(nullptr), + myStage(nullptr), + myLane(nullptr), + myRelX(0), + myRelY(0), + myDir(UNDEFINED_DIRECTION), + mySpeed(0), + myWaitingToEnter(false), + myWaitingTime(0), + myWalkingAreaPath(nullptr), + myAmJammed(false), + myRemoteXYPos(Position::INVALID), + myAngle(std::numeric_limits::max()) { +} + double MSPModel_Striping::PState::getMinX(const bool includeMinGap) const { @@ -1298,7 +1383,7 @@ MSPModel_Striping::PState::otherStripe(double relY) const { const int s = stripe(relY); const double offset = relY - s * stripeWidth; - const double threshold = MAX2(NUMERICAL_EPS, stripeWidth - SQUEEZE * myPerson->getVehicleType().getWidth()); + const double threshold = MAX2(NUMERICAL_EPS, stripeWidth - SQUEEZE * getWidth()); int result; if (offset > threshold) { result = s + 1; @@ -1555,7 +1640,13 @@ } // compute speed components along both axes const int next = (chosen == current ? current : (chosen < current ? current - 1 : current + 1)); - const double xDist = MIN3(distance[current], distance[other], distance[next]); + double xDist = MIN3(distance[current], distance[other], distance[next]); + if (next != chosen) { + // ensure that we do not collide with an obstacle in the stripe beyond + // next as this might become the 'other' stripe in the next step + const int nextOther = chosen < current ? current - 2 : current + 2; + xDist = MIN2(xDist, distance[nextOther]); + } // XXX preferred gap differs between approaching a standing obstacle or a moving obstacle const double preferredGap = NUMERICAL_EPS; double xSpeed = MIN2(vMax, MAX2(0., DIST2SPEED(xDist - preferredGap))); @@ -1812,19 +1903,19 @@ MSPModel_Striping::PState::mergeObstacles(Obstacles& into, const Obstacles& obs2) { for (int i = 0; i < (int)into.size(); ++i) { if (gDebugFlag1) { - std::cout << " i=" << i - << " into=" << into[i].description << " iDist=" << distanceTo(into[i]) - << " obs2=" << obs2[i].description << " oDist=" << distanceTo(obs2[i]) << "\n"; + std::cout << " i=" << i << " maxX=" << getMaxX(true) << " minX=" << getMinX(true) + << " into=" << into[i].description << " iDist=" << distanceTo(into[i], into[i].type == OBSTACLE_PED) + << " obs2=" << obs2[i].description << " oDist=" << distanceTo(obs2[i], obs2[i].type == OBSTACLE_PED) << "\n"; } - const double dO = distanceTo(obs2[i]); - const double dI = distanceTo(into[i]); + const double dO = distanceTo(obs2[i], obs2[i].type == OBSTACLE_PED); + const double dI = distanceTo(into[i], into[i].type == OBSTACLE_PED); if (dO < dI) { into[i] = obs2[i]; } else if (dO == dI - && into[i].type != OBSTACLE_PED - && into[i].type != OBSTACLE_VEHICLE - && (obs2[i].type == OBSTACLE_PED || - obs2[i].type == OBSTACLE_VEHICLE)) { + && into[i].type != OBSTACLE_PED + && into[i].type != OBSTACLE_VEHICLE + && (obs2[i].type == OBSTACLE_PED || + obs2[i].type == OBSTACLE_VEHICLE)) { into[i] = obs2[i]; } } @@ -1867,10 +1958,50 @@ } } +const std::string& +MSPModel_Striping::PState::getID() const { + return myPerson->getID(); +} + +double +MSPModel_Striping::PState::getWidth() const { + return myPerson->getVehicleType().getWidth(); +} + +// =========================================================================== +// MSPModel_Striping::PStateVehicle method definitions +// =========================================================================== + +MSPModel_Striping::PStateVehicle::PStateVehicle(const MSVehicle* veh, const MSLane* walkingarea, double relX, double relY): + myVehicle(veh) { + myLane = walkingarea; // to ensure correct limits when calling otherStripe() + myRelX = relX; + myRelY = relY; +} + +const std::string& +MSPModel_Striping::PStateVehicle::getID() const { + return myVehicle->getID(); +} + +double +MSPModel_Striping::PStateVehicle::getWidth() const { + return myVehicle->getVehicleType().getWidth(); +} + +double +MSPModel_Striping::PStateVehicle::getMinX(const bool /*includeMinGap*/) const { + return myRelX - myVehicle->getVehicleType().getWidth() / 2 - SAFETY_GAP ; +} + +double +MSPModel_Striping::PStateVehicle::getMaxX(const bool /*includeMinGap*/) const { + return myRelX + myVehicle->getVehicleType().getWidth() / 2 + SAFETY_GAP; +} + // =========================================================================== // MSPModel_Striping::MovePedestrians method definitions // =========================================================================== -// SUMOTime MSPModel_Striping::MovePedestrians::execute(SUMOTime currentTime) { diff -Nru sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.h sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.h --- sumo-1.1.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.h 2018-12-17 23:00:33.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/pedestrians/MSPModel_Striping.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -280,6 +280,7 @@ PState(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, const MSLane* lane); + ~PState() {}; MSPerson* myPerson; MSPerson::MSPersonStage_Walking* myStage; @@ -309,10 +310,10 @@ mutable double myAngle; /// @brief return the minimum position on the lane - double getMinX(const bool includeMinGap = true) const; + virtual double getMinX(const bool includeMinGap = true) const; /// @brief return the maximum position on the lane - double getMaxX(const bool includeMinGap = true) const; + virtual double getMaxX(const bool includeMinGap = true) const; /// @brief return the length of the pedestrian double getLength() const; @@ -354,8 +355,30 @@ /// @brief whether the pedestrian may ignore a red light bool ignoreRed(const MSLink* link) const; + + /// @brief return the person id + virtual const std::string& getID() const; + + /// @brief return the person width + virtual double getWidth() const; + + protected: + /// @brief constructor for PStateVehicle + PState(); }; + class PStateVehicle : public PState { + public: + PStateVehicle(const MSVehicle* veh, const MSLane* walkingarea, double relX, double relY); + const std::string& getID() const; + double getMinX(const bool includeMinGap = true) const; + double getMaxX(const bool includeMinGap = true) const; + double getWidth() const; + private: + const MSVehicle* myVehicle; + }; + + class MovePedestrians : public Command { public: MovePedestrians(MSPModel_Striping* model) : myModel(model) {}; @@ -380,7 +403,7 @@ if (p1->myRelX != p2->myRelX) { return myDir * p1->myRelX > myDir * p2->myRelX; } - return p1->myPerson->getID() < p2->myPerson->getID(); + return p1->getID() < p2->getID(); } private: @@ -454,6 +477,9 @@ static Obstacles getVehicleObstacles(const MSLane* lane, int dir, PState* ped = 0); static bool usingInternalLanesStatic(); + + static bool addVehicleFoe(const MSVehicle* veh, const MSLane* walkingarea, const Position& relPos, double lateral_offset, + double minY, double maxY, Pedestrians& toDelete, Pedestrians& transformedPeds); private: /// @brief the total number of active pedestrians int myNumActivePedestrians; @@ -461,8 +487,12 @@ /// @brief store of all lanes which have pedestrians on them ActiveLanes myActiveLanes; + /// @brief whether an event for pedestrian processing was added + bool myAmActive; + /// @brief store for walkinArea elements static WalkingAreaPaths myWalkingAreaPaths; + static std::map > myWalkingAreaFoes; static MinNextLengths myMinNextLengths; /// @brief empty pedestrian vector diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/Makefile.in sumo-1.2.0+dfsg1/src/microsim/traffic_lights/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,708 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/traffic_lights -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - MSDelayBasedTrafficLightLogic.$(OBJEXT) \ - MSOffTrafficLightLogic.$(OBJEXT) MSRailSignal.$(OBJEXT) \ - MSPhasedTrafficLightLogic.$(OBJEXT) MSPushButton.$(OBJEXT) \ - MSRailCrossing.$(OBJEXT) MSSimpleTrafficLightLogic.$(OBJEXT) \ - MSSOTLE2Sensors.$(OBJEXT) MSSOTLPolicyDesirability.$(OBJEXT) \ - MSSOTLPolicy5DFamilyStimulus.$(OBJEXT) \ - MSSOTLPolicy5DStimulus.$(OBJEXT) \ - MSSOTLPolicy3DStimulus.$(OBJEXT) MSSOTLPolicy.$(OBJEXT) \ - MSSOTLMarchingPolicy.$(OBJEXT) \ - MSSOTLCongestionPolicy.$(OBJEXT) MSSOTLPhasePolicy.$(OBJEXT) \ - MSSOTLPlatoonPolicy.$(OBJEXT) MSSOTLRequestPolicy.$(OBJEXT) \ - MSSOTLPolicyBasedTrafficLightLogic.$(OBJEXT) \ - MSSOTLPhaseTrafficLightLogic.$(OBJEXT) MSSOTLSensors.$(OBJEXT) \ - MSSOTLTrafficLightLogic.$(OBJEXT) \ - MSSOTLWaveTrafficLightLogic.$(OBJEXT) \ - MSSOTLHiLevelTrafficLightLogic.$(OBJEXT) \ - MSSwarmTrafficLightLogic.$(OBJEXT) \ - MSDeterministicHiLevelTrafficLightLogic.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmicrosimtls.a -libmicrosimtls_a_SOURCES = \ -MSActuatedTrafficLightLogic.cpp MSActuatedTrafficLightLogic.h \ -MSDelayBasedTrafficLightLogic.cpp MSDelayBasedTrafficLightLogic.h \ -MSOffTrafficLightLogic.cpp MSOffTrafficLightLogic.h \ -MSRailSignal.cpp MSRailSignal.h \ -MSPhaseDefinition.h \ -MSPhasedTrafficLightLogic.cpp MSPhasedTrafficLightLogic.h \ -MSPushButton.cpp MSPushButton.h \ -MSRailCrossing.cpp MSRailCrossing.h \ -MSSimpleTrafficLightLogic.cpp MSSimpleTrafficLightLogic.h \ -MSSOTLDefinitions.h \ -MSSOTLE2Sensors.cpp MSSOTLE2Sensors.h \ -MSSOTLPolicyDesirability.cpp MSSOTLPolicyDesirability.h \ -MSSOTLPolicy5DFamilyStimulus.cpp MSSOTLPolicy5DFamilyStimulus.h \ -MSSOTLPolicy5DStimulus.cpp MSSOTLPolicy5DStimulus.h \ -MSSOTLPolicy3DStimulus.cpp MSSOTLPolicy3DStimulus.h \ -MSSOTLPolicy.cpp MSSOTLPolicy.h \ -MSSOTLMarchingPolicy.cpp MSSOTLMarchingPolicy.h \ -MSSOTLCongestionPolicy.cpp MSSOTLCongestionPolicy.h \ -MSSOTLPhasePolicy.cpp MSSOTLPhasePolicy.h \ -MSSOTLPlatoonPolicy.cpp MSSOTLPlatoonPolicy.h \ -MSSOTLRequestPolicy.cpp MSSOTLRequestPolicy.h \ -MSSOTLPolicyBasedTrafficLightLogic.cpp MSSOTLPolicyBasedTrafficLightLogic.h \ -MSSOTLPhaseTrafficLightLogic.cpp MSSOTLPhaseTrafficLightLogic.h \ -MSSOTLSensors.cpp MSSOTLSensors.h \ -MSSOTLTrafficLightLogic.cpp MSSOTLTrafficLightLogic.h \ -MSSOTLWaveTrafficLightLogic.cpp MSSOTLWaveTrafficLightLogic.h \ -MSSOTLHiLevelTrafficLightLogic.cpp MSSOTLHiLevelTrafficLightLogic.h \ -MSSwarmTrafficLightLogic.cpp MSSwarmTrafficLightLogic.h \ -MSDeterministicHiLevelTrafficLightLogic.cpp MSDeterministicHiLevelTrafficLightLogic.h \ -MSTLLogicControl.cpp MSTLLogicControl.h \ -MSTrafficLightLogic.cpp MSTrafficLightLogic.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) --foreign src/microsim/traffic_lights/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/traffic_lights/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSActuatedTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDelayBasedTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDeterministicHiLevelTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSOffTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPhasedTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPushButton.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRailCrossing.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRailSignal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLCongestionPolicy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLE2Sensors.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLHiLevelTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLMarchingPolicy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPhasePolicy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPhaseTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPlatoonPolicy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPolicy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPolicy3DStimulus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPolicy5DFamilyStimulus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPolicy5DStimulus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPolicyBasedTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLPolicyDesirability.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLRequestPolicy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLSensors.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSOTLWaveTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSimpleTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSwarmTrafficLightLogic.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@ $(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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,9 +37,12 @@ #include "MSTrafficLightLogic.h" #include "MSActuatedTrafficLightLogic.h" #include +#include #include #include +//#define DEBUG_DETECTORS +#define DEBUG_COND (getID()=="26121229") // =========================================================================== // parameter defaults definitions @@ -65,7 +68,7 @@ myMaxGap = StringUtils::toDouble(getParameter("max-gap", DEFAULT_MAX_GAP)); myPassingTime = StringUtils::toDouble(getParameter("passing-time", DEFAULT_PASSING_TIME)); // passing-time seems obsolete... (Leo) myDetectorGap = StringUtils::toDouble(getParameter("detector-gap", DEFAULT_DETECTOR_GAP)); - myShowDetectors = StringUtils::toBool(getParameter("show-detectors", "false")); + myShowDetectors = StringUtils::toBool(getParameter("show-detectors", toString(OptionsCont::getOptions().getBool("tls.actuated.show-detectors")))); myFile = FileHelpers::checkForRelativity(getParameter("file", "NUL"), basePath); myFreq = TIME2STEPS(StringUtils::toDouble(getParameter("freq", "300"))); myVehicleTypes = getParameter("vTypes", ""); @@ -77,11 +80,33 @@ MSActuatedTrafficLightLogic::init(NLDetectorBuilder& nb) { MSTrafficLightLogic::init(nb); assert(myLanes.size() > 0); + bool warn = true; // warn only once + const int numLinks = (int)myLinks.size(); + + // Detector position should be computed based on road speed. If the position + // is quite far away and the minDur is short this may cause the following + // problems: + // + // 1) high flow failure: + // In a standing queue, no vehicle touches the detector. + // By the time the queue advances, the detector gap has been exceeded and the phase terminates prematurely + // + // 2) low flow failure + // The standing queue is fully between stop line and detector and there are no further vehicles. + // The minDur is too short to let all vehicles pass + // + // Problem 2) is not so critical because there is less potential for + // jamming in a low-flow situation. In contrast, problem 1) should be + // avoided as it has big jamming potential. We compute an upper bound for the + // detector disatnce to avoid it + + // change values for setting the loops and lanestate-detectors, here //SUMOTime inductLoopInterval = 1; // LaneVectorVector::const_iterator i2; LaneVector::const_iterator i; // build the induct loops + std::map laneInductLoopMap; double maxDetectorGap = 0; for (i2 = myLanes.begin(); i2 != myLanes.end(); ++i2) { const LaneVector& lanes = *i2; @@ -91,9 +116,21 @@ // do not build detectors on green verges or sidewalks continue; } + if (laneInductLoopMap.find(lane) != laneInductLoopMap.end()) { + // only build one detector per lane + continue; + } + const SUMOTime minDur = getMinimumMinDuration(lane); + if (minDur == std::numeric_limits::max()) { + // only build detector if this lane is relevant for an actuated phase + continue; + } double length = lane->getLength(); double speed = lane->getSpeedLimit(); - double inductLoopPosition = myDetectorGap * speed; + double inductLoopPosition = MIN2( + myDetectorGap * speed, + MAX2(1.0, (STEPS2TIME(minDur) - 1)) * DEFAULT_LENGTH_WITH_GAP); + // check whether the lane is long enough double ilpos = length - inductLoopPosition; if (ilpos < 0) { @@ -101,32 +138,217 @@ } // Build the induct loop and set it into the container std::string id = "TLS" + myID + "_" + myProgramID + "_InductLoopOn_" + lane->getID(); - if (myInductLoops.find(lane) == myInductLoops.end()) { - myInductLoops[lane] = nb.createInductLoop(id, lane, ilpos, myVehicleTypes, myShowDetectors); - MSNet::getInstance()->getDetectorControl().add(SUMO_TAG_INDUCTION_LOOP, myInductLoops[lane], myFile, myFreq); - } + MSInductLoop* loop = static_cast(nb.createInductLoop(id, lane, ilpos, myVehicleTypes, myShowDetectors)); + laneInductLoopMap[lane] = loop; + myInductLoops.push_back(loop); + MSNet::getInstance()->getDetectorControl().add(SUMO_TAG_INDUCTION_LOOP, loop, myFile, myFreq); maxDetectorGap = MAX2(maxDetectorGap, length - ilpos); + + if (warn && floor(floor(inductLoopPosition / DEFAULT_LENGTH_WITH_GAP) * myPassingTime) > STEPS2TIME(minDur)) { + // warn if the minGap is insufficient to clear vehicles between stop line and detector + WRITE_WARNING("At actuated tlLogic '" + getID() + "', minDur " + time2string(minDur) + " is too short for a detector gap of " + toString(inductLoopPosition) + "m."); + warn = false; + } } } - // warn if the minGap is insufficient to clear vehicles between stop line and detector - SUMOTime minMinDur = getMinimumMinDuration(); - if (floor(floor(maxDetectorGap / DEFAULT_LENGTH_WITH_GAP) * myPassingTime) > STEPS2TIME(minMinDur)) { - WRITE_WARNING("At actuated tlLogic '" + getID() + "', minDur " + time2string(minMinDur) + " is too short for a detector gap of " + toString(maxDetectorGap) + "m."); + // assign loops to phase index (myInductLoopsForPhase) + // check1: loops may not be used for a phase if there are other connections from the same lane that may not drive in that phase + // greenMinor is ambiguous as vehicles may not be able to drive + // Under the following condition we allow actuation from minor link: + // check1a : the minor link is minor in all phases + // check1b : there is another major link from the same lane in the current phase + // (Under these conditions we assume that the minor link is unimportant and traffic is mostly for the major link) + // + // check1c: when the lane has only one edge, we treat greenMinor as green as there would be no actuation otherwise + // + // check2: if there are two loops on subsequent lanes (joined tls) and the second one has a red link, the first loop may not be used + + // also assign loops to link index for validation: + // check if all links from actuated phases (minDur != maxDur) have an inductionloop in at least one phase + const SVCPermissions motorized = ~(SVC_PEDESTRIAN | SVC_BICYCLE); + std::map > linkToLoops; + std::set actuatedLinks; + + std::vector neverMajor(numLinks, true); + for (const MSPhaseDefinition* phase : myPhases) { + const std::string& state = phase->getState(); + for (int i = 0; i < numLinks; i++) { + if (state[i] == LINKSTATE_TL_GREEN_MAJOR) { + neverMajor[i] = false; + } + } + } + std::vector oneLane(numLinks, false); + for (int i = 0; i < numLinks; i++) { + for (MSLane* lane : getLanesAt(i)) { + // only count motorized vehicle lanes + int numMotorized = 0; + for (MSLane* l : lane->getEdge().getLanes()) { + if ((l->getPermissions() & motorized) != 0) { + numMotorized++; + } + } + if (numMotorized == 1) { + oneLane[i] = true; + break; + } + } + } + + + for (const MSPhaseDefinition* phase : myPhases) { + std::set loops; + if (phase->minDuration != phase->maxDuration) { + // actuated phase + const std::string& state = phase->getState(); + // collect indices of all green links for the phase + std::set greenLinks; + // collect green links for each induction loops (in this phase) + std::map > loopLinks; + + for (int i = 0; i < numLinks; i++) { + if (state[i] == LINKSTATE_TL_GREEN_MAJOR + || (state[i] == LINKSTATE_TL_GREEN_MINOR + && ((neverMajor[i] // check1a + && hasMajor(state, getLanesAt(i))) // check1b + || oneLane[i])) // check1c + ) { + greenLinks.insert(i); + actuatedLinks.insert(i); + } +#ifdef DEBUG_DETECTORS + //if (DEBUG_COND) { + // std::cout << " phase=" << myInductLoopsForPhase.size() << " i=" << i << " state=" << state[i] << " green=" << greenLinks.count(i) << " oneLane=" << oneLane[i] + // << " loopLanes="; + // for (MSLane* lane: getLanesAt(i)) { + // if (laneInductLoopMap.count(lane) != 0) { + // std::cout << lane->getID() << " "; + // } + // } + // std::cout << "\n"; + //} +#endif + for (MSLane* lane : getLanesAt(i)) { + if (laneInductLoopMap.count(lane) != 0) { + loopLinks[laneInductLoopMap[lane]].insert(i); + } + } + } + for (auto& item : loopLinks) { + bool usable = true; + // check1 + for (int j : item.second) { + if (greenLinks.count(j) == 0) { + usable = false; +#ifdef DEBUG_DETECTORS + if (DEBUG_COND) { + std::cout << " phase=" << myInductLoopsForPhase.size() << " check1: loopLane=" << item.first->getLane()->getID() << " notGreen=" << j << " oneLane[j]=" << oneLane[j] << "\n"; + } +#endif + break; + } + } + // check2 + if (usable) { + const MSLane* loopLane = item.first->getLane(); + for (MSLink* link : loopLane->getLinkCont()) { + const MSLane* next = link->getLane(); + if (laneInductLoopMap.count(next) != 0) { + MSInductLoop* nextLoop = laneInductLoopMap[next]; + for (int j : loopLinks[nextLoop]) { + if (greenLinks.count(j) == 0) { + usable = false; +#ifdef DEBUG_DETECTORS + if (DEBUG_COND) std::cout << " phase=" << myInductLoopsForPhase.size() << " check2: loopLane=" << item.first->getLane()->getID() + << " nextLane=" << next->getID() << " nextLink=" << j << " nextState=" << state[j] << "\n"; +#endif + break; + } + } + } + } + } + + if (usable) { + loops.insert(item.first); +#ifdef DEBUG_DETECTORS + //if (DEBUG_COND) std::cout << " phase=" << myInductLoopsForPhase.size() << " usableLoops=" << item.first->getID() << " links=" << joinToString(item.second, " ") << "\n"; +#endif + for (int j : item.second) { + linkToLoops[j].insert(item.first); + } + } + } + if (loops.size() == 0) { + WRITE_WARNING("At actuated tlLogic '" + getID() + "', actuated phase " + toString(myInductLoopsForPhase.size()) + " has no controlling detector"); + } + } +#ifdef DEBUG_DETECTORS + if (DEBUG_COND) { + std::cout << " phase=" << myInductLoopsForPhase.size() << " loops=" << joinNamedToString(loops, " ") << "\n"; + } + //if (DEBUG_COND) { + // std::cout << " linkToLoops:\n"; + // for (auto item : linkToLoops) { + // std::cout << " link=" << item.first << " loops=" << joinNamedToString(item.second, " ") << "\n"; + // } + //} +#endif + myInductLoopsForPhase.push_back(std::vector(loops.begin(), loops.end())); + } +#ifdef DEBUG_DETECTORS + //if (DEBUG_COND) { + // std::cout << "final linkToLoops:\n"; + // for (auto item : linkToLoops) { + // std::cout << " link=" << item.first << " loops=" << joinNamedToString(item.second, " ") << "\n"; + // } + //} +#endif + for (int i : actuatedLinks) { + if (linkToLoops[i].size() == 0 && myLinks[i].size() > 0 + && (myLinks[i].front()->getLaneBefore()->getPermissions() & motorized) != 0) { + WRITE_WARNING("At actuated tlLogic '" + getID() + "', linkIndex " + toString(i) + " has no controlling detector"); + } } } SUMOTime -MSActuatedTrafficLightLogic::getMinimumMinDuration() const { - SUMOTime result = SUMOTime_MAX; - for (auto phase : myPhases) { - if (phase->minDuration != phase->maxDuration) { - result = MIN2(result, phase->minDuration); +MSActuatedTrafficLightLogic::getMinimumMinDuration(MSLane* lane) const { + SUMOTime result = std::numeric_limits::max(); + for (const MSPhaseDefinition* phase : myPhases) { + const std::string& state = phase->getState(); + for (int i = 0; i < (int)state.size(); i++) { + if (state[i] == LINKSTATE_TL_GREEN_MAJOR || state[i] == LINKSTATE_TL_GREEN_MINOR) { + for (MSLane* cand : getLanesAt(i)) { + if (lane == cand) { + if (phase->minDuration != phase->maxDuration) { + result = MIN2(result, phase->minDuration); + } + } + } + } } } return result; } +bool +MSActuatedTrafficLightLogic::hasMajor(const std::string& state, const LaneVector& lanes) const { + for (int i = 0; i < (int)state.size(); i++) { + if (state[i] == LINKSTATE_TL_GREEN_MAJOR) { + for (MSLane* cand : getLanesAt(i)) { + for (MSLane* lane : lanes) { + if (lane == cand) { + return true; + } + } + } + } + } + return false; +} + // ------------ Switching and setting current rows SUMOTime @@ -146,6 +368,13 @@ } //stores the time the phase started myPhases[myStep]->myLastSwitch = MSNet::getInstance()->getCurrentTimeStep(); + // activate coloring + if (myShowDetectors && getCurrentPhaseDef().isGreenPhase()) { + for (MSInductLoop* loop : myInductLoopsForPhase[myStep]) { + loop->setSpecialColor(&RGBColor::GREEN); + } + } + // set the next event return getCurrentPhaseDef().minDuration; } @@ -177,6 +406,15 @@ //intergreen times should not be lenghtend assert((int)myPhases.size() > myStep); double result = std::numeric_limits::max(); + if (MSGlobals::gUseMesoSim) { + return result; + } + // switch off active colors + if (myShowDetectors) { + for (MSInductLoop* loop : myInductLoops) { + loop->setSpecialColor(nullptr); + } + } if (!getCurrentPhaseDef().isGreenPhase()) { return result; // end current phase } @@ -188,21 +426,11 @@ } // now the gapcontrol starts - const std::string& state = getCurrentPhaseDef().getState(); - for (int i = 0; i < (int) state.size(); i++) { - if (state[i] == LINKSTATE_TL_GREEN_MAJOR || state[i] == LINKSTATE_TL_GREEN_MINOR) { - const std::vector& lanes = getLanesAt(i); - for (LaneVector::const_iterator j = lanes.begin(); j != lanes.end(); j++) { - if (myInductLoops.find(*j) == myInductLoops.end()) { - continue; - } - if (!MSGlobals::gUseMesoSim) { // why not check outside the loop? (Leo) - const double actualGap = static_cast(myInductLoops.find(*j)->second)->getTimeSinceLastDetection(); - if (actualGap < myMaxGap) { - result = MIN2(result, actualGap); - } - } - } + for (MSInductLoop* loop : myInductLoopsForPhase[myStep]) { + loop->setSpecialColor(&RGBColor::GREEN); + const double actualGap = loop->getTimeSinceLastDetection(); + if (actualGap < myMaxGap) { + result = MIN2(result, actualGap); } } return result; diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -50,8 +50,8 @@ */ class MSActuatedTrafficLightLogic : public MSSimpleTrafficLightLogic { public: - /// @brief Definition of a map from lanes to induct loops lying on them - typedef std::map InductLoopMap; + /// @brief Definition of a map from phases to induct loops controlling them + typedef std::vector > InductLoopMap; public: /** @brief Constructor @@ -104,18 +104,23 @@ */ SUMOTime duration(const double detectionGap) const; - /// @brief get the minimum min duration for all stretchable phases - SUMOTime getMinimumMinDuration() const; + /// @brief get the minimum min duration for all stretchable phases that affect the given lane + SUMOTime getMinimumMinDuration(MSLane* lane) const; /** @brief Return the minimum detection gap of all detectors if the current phase should be extended and double::max otherwise */ double gapControl(); + + + /// @brief return whether there is a major link from the given lane in the given phase + bool hasMajor(const std::string& state, const LaneVector& lanes) const; /// @} protected: - /// A map from lanes to induct loops lying on them - InductLoopMap myInductLoops; + /// A map from phase to induction loops to be used for gap control + InductLoopMap myInductLoopsForPhase; + std::vector myInductLoops; /// The maximum gap to check in seconds double myMaxGap; diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDelayBasedTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSDeterministicHiLevelTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPhaseDefinition.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPhaseDefinition.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPhaseDefinition.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPhaseDefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -83,7 +83,10 @@ SUMOTime myLastSwitch; /// @brief The index of the phase that suceeds this one (or -1) - int nextPhase; + std::vector nextPhases; + + /// @brief Optional name or description for the current phase + std::string name; private: /// @brief The phase definition @@ -104,7 +107,8 @@ */ LaneIdVector targetLaneSet; - void init(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurationArg, SUMOTime maxDurationArg, int nextPhase) { + void init(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurationArg, SUMOTime maxDurationArg, + const std::vector nextPhases, const std::string& name) { this->duration = durationArg; this->state = stateArg; this->minDuration = minDurationArg < 0 ? durationArg : minDurationArg; @@ -113,13 +117,17 @@ this->myLastSwitch = string2time(OptionsCont::getOptions().getString("begin")); // SUMOTime-option //For SOTL phases //this->phaseType = phaseTypeArg; - this->nextPhase = nextPhase; + this->nextPhases = nextPhases; + this->name = name; } - void init(SUMOTime durationArg, SUMOTime minDurationArg, SUMOTime maxDurationArg, const std::string& stateArg, int nextPhase, LaneIdVector& targetLaneSetArg) { - init(durationArg, stateArg, minDurationArg, maxDurationArg, nextPhase); + void init(SUMOTime durationArg, SUMOTime minDurationArg, SUMOTime maxDurationArg, const std::string& stateArg, + const std::vector& nextPhases, const std::string& name, LaneIdVector* targetLaneSetArg) { + init(durationArg, stateArg, minDurationArg, maxDurationArg, nextPhases, name); //For SOTL target phases - this->targetLaneSet = targetLaneSetArg; + if (targetLaneSetArg != nullptr) { + this->targetLaneSet = *targetLaneSetArg; + } } @@ -131,14 +139,14 @@ * @param[in] durationArg The duration of the phase * @param[in] stateArg The state in the phase */ - MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, int nextPhase) { + MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, const std::vector& nextPhases, const std::string& name = "") { //PhaseType phaseType; phaseType = PhaseType(); phaseType[UNDEFINED_BIT] = 1; phaseType[TRANSIENT_NOTDECISIONAL_BIT] = 0; phaseType[TARGET_BIT] = 0; phaseType[COMMIT_BIT] = 0; - init(durationArg, stateArg, durationArg, durationArg, nextPhase); + init(durationArg, stateArg, durationArg, durationArg, nextPhases, name); } @@ -149,62 +157,27 @@ * @param[in] minDurationArg The minimum duration of the phase * @param[in] maxDurationArg The maximum duration of the phase */ - MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurationArg=-1, SUMOTime maxDurationArg=-1, int nextPhase=-1) { + MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurationArg = -1, SUMOTime maxDurationArg = -1, + const std::vector& nextPhases = std::vector(), const std::string& name = "") { //PhaseType phaseType; phaseType = PhaseType(); phaseType[UNDEFINED_BIT] = 1; phaseType[TRANSIENT_NOTDECISIONAL_BIT] = 0; phaseType[TARGET_BIT] = 0; phaseType[COMMIT_BIT] = 0; - init(durationArg, stateArg, minDurationArg, maxDurationArg, nextPhase); + init(durationArg, stateArg, minDurationArg, maxDurationArg, nextPhases, name); } /* * @brief Constructor for definitions for SOTL target step - * In this phase the duration is fixed, because min and max duration are unspecified - * @param[in] transient_notdecisional true means this is a transient phase, false is a decisional one - * @param[in] commit true means this is a commit phase, i.e. the traffic light logic can jump to a target phase form this phase - * @param[in] targetLaneSet identifies the lane-set to be considered when deciding the target phase to jump to - * @see MSPhaseDefinition::PhaseType - */ - MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, int nextPhase, bool transient_notdecisional, bool commit, LaneIdVector& targetLaneSetArg) { - if (targetLaneSetArg.size() == 0) { - MsgHandler::getErrorInstance()->inform("MSPhaseDefinition::MSPhaseDefinition -> targetLaneSetArg cannot be empty for a target phase"); - } - //PhaseType phaseType; - phaseType = PhaseType(); - phaseType[UNDEFINED_BIT] = 0; - phaseType[TRANSIENT_NOTDECISIONAL_BIT] = transient_notdecisional; - phaseType[TARGET_BIT] = 1; - phaseType[COMMIT_BIT] = commit; - init(durationArg, durationArg, durationArg, stateArg, nextPhase, targetLaneSetArg); - } - - /* - * @brief Constructor for definitions for SOTL non-target step - * In this phase the duration is fixed, because min and max duration are unspecified - * @param[in] phaseType Indicates the type of the step - */ - MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, int nextPhase, bool transient_notdecisional, bool commit) { - //PhaseType phaseType; - phaseType = PhaseType(); - phaseType[UNDEFINED_BIT] = 0; - phaseType[TRANSIENT_NOTDECISIONAL_BIT] = transient_notdecisional; - phaseType[TARGET_BIT] = 0; - phaseType[COMMIT_BIT] = commit; - init(durationArg, stateArg, durationArg, durationArg, nextPhase); - } - - - /* - * @brief Constructor for definitions for SOTL target step * In this phase the duration is constrained between min and max duration * @param[in] phaseType Indicates the type of the step * @param[in] targetLaneSet If not null, specifies this MSPhaseDefinition is a target step * @see MSPhaseDefinition::PhaseType */ - MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurationArg, SUMOTime maxDurationArg, int nextPhase, bool transient_notdecisional, bool commit, LaneIdVector& targetLaneSetArg) { - if (targetLaneSetArg.size() == 0) { + MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurationArg, SUMOTime maxDurationArg, + const std::vector& nextPhases, const std::string& name, bool transient_notdecisional, bool commit, LaneIdVector* targetLaneSetArg = nullptr) { + if (targetLaneSetArg != nullptr && targetLaneSetArg->size() == 0) { MsgHandler::getErrorInstance()->inform("MSPhaseDefinition::MSPhaseDefinition -> targetLaneSetArg cannot be empty for a target phase"); } //PhaseType phaseType; @@ -212,29 +185,11 @@ phaseType = PhaseType(); phaseType[UNDEFINED_BIT] = 0; phaseType[TRANSIENT_NOTDECISIONAL_BIT] = transient_notdecisional; - phaseType[TARGET_BIT] = 1; + phaseType[TARGET_BIT] = targetLaneSetArg == nullptr ? 0 : 1; phaseType[COMMIT_BIT] = commit; - init(durationArg, minDurationArg, maxDurationArg, stateArg, nextPhase, targetLaneSetArg); + init(durationArg, minDurationArg, maxDurationArg, stateArg, nextPhases, name, targetLaneSetArg); } - /* - * @brief Constructor for definitions for SOTL target step - * In this phase the duration is constrained between min and max duration - * @param[in] phaseType Indicates the type of the step - * @see MSPhaseDefinition::PhaseType - */ - MSPhaseDefinition(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurationArg, SUMOTime maxDurationArg, int nextPhase, bool transient_notdecisional, bool commit) { - //PhaseType phaseType; - phaseType = PhaseType(); - phaseType[UNDEFINED_BIT] = 0; - phaseType[TRANSIENT_NOTDECISIONAL_BIT] = transient_notdecisional; - phaseType[TARGET_BIT] = 0; - phaseType[COMMIT_BIT] = commit; - init(durationArg, stateArg, minDurationArg, maxDurationArg, nextPhase); - - } - - /// @brief Destructor virtual ~MSPhaseDefinition() { } @@ -254,8 +209,16 @@ return targetLaneSet; } - int getNextPhase() const { - return nextPhase; + const std::vector& getNextPhases() const { + return nextPhases; + } + + const std::string& getName() const { + return name; + } + + void setName(const std::string& _name) { + name = _name; } /** @brief Returns whether this phase is a pure "green" phase diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPhasedTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPushButton.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPushButton.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPushButton.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPushButton.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPushButton.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPushButton.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSPushButton.h 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSPushButton.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailCrossing.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.cpp 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,8 +29,11 @@ #include #include #include +#include #include #include +#include +#include #include "MSTrafficLightLogic.h" #include "MSRailSignal.h" #include @@ -44,8 +47,15 @@ #define MAX_BLOCK_LENGTH 20000 #define MAX_SIGNAL_WARNINGS 10 -//#define DEBUG_SUCCEEDINGBLOCKS -#define DEBUG_COND (getID() == "disabled") +//#define DEBUG_FORWARD_BLOCK +//#define DEBUG_BIDI_BLOCK +//#define DEBUG_BACKWARD_BLOCK + +//#define DEBUG_SIGNALSTATE +#define DEBUG_SIGNALSTATE_PRIORITY +#define DEBUG_COND (isSelected()) +//#define DEBUG_COND (getID() == "disabled") +//#define DEBUG_COND (true) // =========================================================================== // static value definitions @@ -67,149 +77,205 @@ 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] = (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 - const MSLane* approachingLane = link->getLaneBefore(); //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 - double blockLength = approachingLane->getLength(); - while (noRailSignal) { - std::vector incomingLanes = currentLane->getIncomingLanes(); - // ignore incoming lanes for non-rail classes - for (auto it = incomingLanes.begin(); it != incomingLanes.end();) { - if (((*it).lane->getPermissions() & SVC_RAIL_CLASSES) == 0) { - it = incomingLanes.erase(it); - } else { - it++; + + myConflictLanes.resize(myLinks.size()); + myConflictLinks.resize(myLinks.size()); + myRouteConflictLanes.resize(myLinks.size()); + myRouteConflictLinks.resize(myLinks.size()); + + myLastRerouteAttempt.resize(myLinks.size(), std::make_pair(nullptr, -1)); + + if (OptionsCont::getOptions().isSet("railsignal-block-output")) { + OutputDevice& od = OutputDevice::getDeviceByOption("railsignal-block-output"); + od.openTag("railSignal"); + od.writeAttr(SUMO_ATTR_ID, getID()); + } + + for (LinkVector& links : myLinks) { //for every link index + // collect lanes and links that are relevant for setting this signal + // for each index we collect + // - conflictLanes (signal must be red if any conflict lane is occupied) + // - conflictLinks (signal must be red if any conflict link is approached by a vehicle + // - that cannot break in time (arrivalSpeedBraking > 0) + // - approached by a vehicle with higher switching priority (see #3941) + // + // forwardBlock + // - search forward recursive from outgoing lane until controlled railSignal link found + // -> add all found lanes + // + // bidiBlock (if any forwardBlock edge edge has bidi edge) + // - search bidi backward recursive until first switch + // - from switch search backward recursive all other incoming until controlled rail signal link + // -> add final links + // + // backwardBlock + // - search backward recursive from incoming lanes (not bidi for current outgoing lane) + // until controlled railSignal link found + // -> add all found lanes + // -> add final links + // + // conditionalBlocks + // - for each conflict link (always signalized) that enters from a + // bidirectional track + // - search bidi backward recursive until first switch that is + // accessible from the bidi-direction + // - from switch search bidi backward recursive until controlled rail signal link + // -> add all found lanes + // -> add final links + + std::vector conflictLinks; + LaneSet visited; + + std::vector forwardBlock; + std::vector bidiBlock; + std::vector backwardBlock; + + // there should be only one link per index for railSignal + if (links.size() > 1) { + throw ProcessError("At railSignal '" + getID() + "' found " + toString(links.size()) + + " links controlled by index " + toString(links[0]->getTLIndex())); + } + for (MSLink* link : links) { + MSLane* toLane = link->getViaLaneOrLane(); //the lane this link is leading to + MSLane* fromBidi = link->getLaneBefore()->getBidiLane(); + if (fromBidi != nullptr) { + // do not extend to forward block beyond the entering track (in case of a loop) + visited.insert(fromBidi); + } + + collectForwardBlock(toLane, 0., forwardBlock, visited); +#ifdef DEBUG_FORWARD_BLOCK + if (DEBUG_COND) { + std::cout << "railSignal=" << getID() << " index=" << link->getTLIndex() << " forwardBlock=" << toString(forwardBlock) << "\n"; + } +#endif + + for (MSLane* forward : forwardBlock) { + if (forward->getEdge().getBidiEdge() != nullptr) { + MSLane* bidi = forward->getBidiLane(); + for (MSLink* bidiOutLink : bidi->getLinkCont()) { + if (bidiOutLink->getViaLane() != nullptr) { + bidiBlock.push_back(bidiOutLink->getViaLane()); + } } + collectBidiBlock(bidi, 0., false, bidiBlock, visited); + // assume bidirectional patches are continuous + break; } - MSLane* precedentLane; - if (!incomingLanes.empty()) { - precedentLane = incomingLanes.front().lane; - } else { - precedentLane = nullptr; - } - if (precedentLane == nullptr) { //if there is no preceeding lane - noRailSignal = false; - } else if (blockLength >= MAX_BLOCK_LENGTH) { // avoid huge blocks - WRITE_WARNING("Block before rail signal junction '" + getID() + - "' exceeds maximum length (stopped searching at lane '" + precedentLane->getID() + "' after " + toString(blockLength) + "m)."); - noRailSignal = false; - } else { - const MSJunction* junction = precedentLane->getEdge().getToJunction(); - if ((junction != nullptr) && (junction->getType() == NODETYPE_RAIL_SIGNAL || junction->getType() == NODETYPE_TRAFFIC_LIGHT)) { //if this junction exists and if it has a rail signal - noRailSignal = false; - } else { - afferentBlock.push_back(precedentLane); - blockLength += precedentLane->getLength(); - currentLane = precedentLane; - } + } +#ifdef DEBUG_BIDI_BLOCK + if (DEBUG_COND) { + std::cout << "railSignal=" << getID() << " index=" << link->getTLIndex() << " bidiBlock=" << toString(bidiBlock) << "\n"; + } +#endif + + // compute conflict links + for (MSLane* cl : forwardBlock) { + collectConflictLinks(cl, 0, backwardBlock, conflictLinks, visited, true); + } + for (MSLane* cl : bidiBlock) { + collectConflictLinks(cl, 0, backwardBlock, conflictLinks, visited, false); + } + + auto thisLinkIt = std::find(conflictLinks.begin(), conflictLinks.end(), link); + if (thisLinkIt != conflictLinks.end()) { + conflictLinks.erase(thisLinkIt); + } else { + WRITE_WARNING("At railSignal junction '" + getID() + "' link " + toString(link->getTLIndex()) + " with direction " + toString(link->getDirection()) + " should be uncontrolled"); + } + +#ifdef DEBUG_BACKWARD_BLOCK + if (DEBUG_COND) { + std::cout << "railSignal=" << getID() << " index=" << link->getTLIndex() << " backwardBlock=" << toString(backwardBlock); + std::cout << "railSignal=" << getID() << " index=" << link->getTLIndex() << " conflictLinks="; + for (MSLink* cl : conflictLinks) { + std::cout << toString(cl->getViaLaneOrLane()->getID()) << " "; } + std::cout << "\n"; } - myAfferentBlocks[link] = afferentBlock; +#endif - //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 noRailSignalLocal = true; //true if the considered lane is not ending at a rail signal - double blockLength = toLane->getLength(); - while (noRailSignalLocal) { - //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 != nullptr) && (junction->getType() == NODETYPE_RAIL_SIGNAL || junction->getType() == NODETYPE_TRAFFIC_LIGHT)) { //if this junctions exists and if it has a rail signal - noRailSignalLocal = false; - break; - } - } - if (noRailSignalLocal) { //if currentLane is not ending at a railSignal - //get the next lane - std::vector outGoingLanes; - // ignore outgoing lanes for non-rail classes - for (auto it : currentLane->getOutgoingViaLanes()) { - if ((it.first->getPermissions() & SVC_RAIL_CLASSES) != 0) { - outGoingLanes.push_back(it.first); - } - } - if (outGoingLanes.size() == 0) { //if the current lane has no outgoing lanes (deadend) - noRailSignalLocal = false; - } else if (blockLength > MAX_BLOCK_LENGTH) { - WRITE_WARNING("Block after rail signal junction '" + getID() + - "' exceeds maximum length (stopped searching at lane '" + currentLane->getID() + "' after " + toString(blockLength) + "m)."); - noRailSignalLocal = false; - } else { - if (outGoingLanes.size() > 1) { - if (myNumWarnings < MAX_SIGNAL_WARNINGS) { - WRITE_WARNING("Rail lane '" + currentLane->getID() + "' has more than one outgoing lane but does not have a rail signal at its end"); - } else if (myNumWarnings == MAX_SIGNAL_WARNINGS) { - WRITE_WARNING("Suppressing further signal warnings ..."); - } - myNumWarnings++; - } - const MSLane* nextLane = outGoingLanes.front(); - succeedingBlock.push_back(nextLane); - blockLength += nextLane->getLength(); - currentLane = nextLane; - } + // compute conditional conflict lanes and links + for (MSLink* cl : conflictLinks) { + std::vector routeConflictLanes; + std::vector routeConflictLinks; + MSLane* in = const_cast(cl->getLaneBefore()); + LaneSet rCVisited = visited; + // only collect if + // 1) the in-edge is bidirectional + // 2) the foe has no alternative track before reach meeting the end of the forwardBlock + // 3) the forward block has no alternative track between the end of the forward block and the conflict link + if (in->getEdge().getBidiEdge() != nullptr + && !hasAlternativeTrack(cl) + && !hasAlternativeTrackBetween(forwardBlock, cl)) { + collectBidiBlock(in, 0., false, routeConflictLanes, rCVisited); + std::vector rCBackwardBlock; + for (MSLane* rCLane : routeConflictLanes) { + collectConflictLinks(rCLane, 0, rCBackwardBlock, routeConflictLinks, rCVisited); } } - mySucceedingBlocks[toLane] = succeedingBlock; + myRouteConflictLanes[link->getTLIndex()].push_back(routeConflictLanes); + myRouteConflictLinks[link->getTLIndex()].push_back(routeConflictLinks); } - } - } -#ifdef DEBUG_SUCCEEDINGBLOCKS - if (DEBUG_COND) { - std::cout << "railSignal=" << getID() << " mySucceedingBlocks:\n"; - for (auto item : mySucceedingBlocks) { - std::cout << " toLane=" << item.first->getID() << " succ=" << toString(item.second) << "\n"; - } - } -#endif - for (std::map >::iterator it = mySucceedingBlocks.begin(); it != mySucceedingBlocks.end(); it++) { - std::queue revLanes; - for (std::vector::iterator laneIt = it->second.begin(); laneIt != it->second.end(); laneIt++) { - const MSLane* lane = *laneIt; - - const MSEdge* reverseEdge = lane->getEdge().getBidiEdge(); - if (reverseEdge != nullptr) { - const MSLane* revLane = reverseEdge->getLanes()[0]; - revLanes.push(revLane); - const MSLane* pred = revLane->getCanonicalPredecessorLane(); - if (pred != nullptr) { - const MSLink* msLink = pred->getLinkTo(revLane); - mySucceedingBlocksIncommingLinks[lane] = msLink; + if (OptionsCont::getOptions().isSet("railsignal-block-output")) { + OutputDevice& od = OutputDevice::getDeviceByOption("railsignal-block-output"); + od.openTag("link"); + od.writeAttr(SUMO_ATTR_TLLINKINDEX, link->getTLIndex()); + od.writeAttr(SUMO_ATTR_FROM, link->getLaneBefore()->getID()); + od.writeAttr(SUMO_ATTR_TO, link->getViaLaneOrLane()->getID()); + + od.openTag("forwardBlock"); + od.writeAttr(SUMO_ATTR_LANES, toString(forwardBlock)); + od.closeTag(); + od.openTag("bidiBlock"); + od.writeAttr(SUMO_ATTR_LANES, toString(bidiBlock)); + od.closeTag(); + od.openTag("backwardBlock"); + od.writeAttr(SUMO_ATTR_LANES, toString(backwardBlock)); + od.closeTag(); + od.openTag("conflictLinks"); + std::vector conflictLinkIDs; // railSignalID_tlIndex + for (MSLink* cl : conflictLinks) { + conflictLinkIDs.push_back(getTLLinkID(cl)); } + od.writeAttr("logicIndex", toString(conflictLinkIDs)); + for (int i = 0; i < (int)conflictLinks.size(); i++) { + const std::vector& rCLanes = myRouteConflictLanes[link->getTLIndex()][i]; + const std::vector& rCLinks = myRouteConflictLinks[link->getTLIndex()][i]; + if (rCLanes.size() > 0 || rCLinks.size() > 0) { + od.openTag("conflictLink"); + od.writeAttr("logicIndex", getTLLinkID(conflictLinks[i])); + if (rCLanes.size() > 0) { + od.writeAttr("lanes", toString(rCLanes)); + } + if (rCLinks.size() > 0) { + std::vector rCLinkIDs; + for (MSLink* rcl : rCLinks) { + rCLinkIDs.push_back(getTLLinkID(rcl)); + } + od.writeAttr("links", toString(rCLinkIDs)); + } + od.closeTag(); + } + } + od.closeTag(); // conflictLinks + od.closeTag(); // link } - } - while (!revLanes.empty()) { - const MSLane* revLane = revLanes.front(); - it->second.push_back(revLane); - revLanes.pop(); + std::vector conflictLanes; + conflictLanes.insert(conflictLanes.end(), forwardBlock.begin(), forwardBlock.end()); + conflictLanes.insert(conflictLanes.end(), bidiBlock.begin(), bidiBlock.end()); + conflictLanes.insert(conflictLanes.end(), backwardBlock.begin(), backwardBlock.end()); + myConflictLanes[link->getTLIndex()] = conflictLanes; + myConflictLinks[link->getTLIndex()] = conflictLinks; } } + if (OptionsCont::getOptions().isSet("railsignal-block-output")) { + OutputDevice& od = OutputDevice::getDeviceByOption("railsignal-block-output"); + od.closeTag(); + } updateCurrentPhase(); //check if this is necessary or if will be done already at another stage setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep()); @@ -235,80 +301,172 @@ return DELTA_T; } -std::string -MSRailSignal::getAppropriateState() { - std::string state(myLinks.size(), 'G'); //the state of the phase definition (all signal are green) - for (MSLane* lane : myOutgoingLanes) { - //check if the succeeding block is used by a train - bool succeedingBlockOccupied = false; - const std::vector& block = mySucceedingBlocks.at(lane); - for (const MSLane* l : block) { - if (!l->isEmpty()) { //if this lane is not empty - succeedingBlockOccupied = true; - break; - } - } - if (!succeedingBlockOccupied) { - // check whether approaching vehicles reserve the block - std::map::iterator it = mySucceedingBlocksIncommingLinks.find(lane); - if (it != mySucceedingBlocksIncommingLinks.end()) { - for (auto apprIt : it->second->getApproaching()) { - MSLink::ApproachingVehicleInformation info = apprIt.second; - if (info.arrivalSpeedBraking > 0) { - succeedingBlockOccupied = true; - break; - } - } +bool +MSRailSignal::conflictLaneOccupied(int index) const { + for (const MSLane* lane : myConflictLanes[index]) { + if (!lane->isEmpty()) { +#ifdef DEBUG_SIGNALSTATE + if (DEBUG_COND) { + std::cout << SIMTIME << " railSignal=" << getID() << " index=" << index << " conflictLane " << lane->getID() << " occupied\n"; } +#endif + return true; } + } + return false; +} + - /*-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 +bool +MSRailSignal::hasLinkConflict(int index) const { +#ifdef DEBUG_SIGNALSTATE_PRIORITY + //if (DEBUG_COND) std::cout << SIMTIME << " railSignal=" << getID() << " index=" << index << " hasLinkConflict...\n"; +#endif + MSLink* currentLink = myLinks[index][0]; + double foeMaxSpeed = -1; + double foeMinDist = std::numeric_limits::max(); + SUMOTime foeMinETA = std::numeric_limits::max(); + long long foeMinNumericalID = std::numeric_limits::max(); // tie braker + + // check for vehicles that enter the (unconditional) conflict area and + // resolve conflict according to priority + std::vector checkRouteConflict; + const auto& cLinks = myConflictLinks[index]; + for (int clIndex = 0; clIndex < (int)cLinks.size(); ++clIndex) { + if (myRouteConflictLanes[index][clIndex].size() > 0) { + // record links where the conditional conflict area may be occupied + checkRouteConflict.push_back(clIndex); + } + const MSLink* link = cLinks[clIndex]; + if (link->getApproaching().size() > 0) { + const MSTrafficLightLogic* foeTLL = link->getTLLogic(); + assert(foeTLL != nullptr); + const MSRailSignal* foeRS = dynamic_cast(foeTLL); + if (foeRS != nullptr) { + if (foeRS->conflictLaneOccupied(link->getTLIndex())) { +#ifdef DEBUG_SIGNALSTATE_PRIORITY + if (DEBUG_COND) std::cout << SIMTIME << " railSignal=" << getID() << " index=" << index + << " foeLink " << link->getViaLaneOrLane()->getID() << " (ignored)\n"; +#endif + continue; + } + } else if (link->getState() == LINKSTATE_TL_RED) { + // ignore foe vehicles waiting at a regular traffic light + continue; + } + } + for (auto apprIt : link->getApproaching()) { + MSLink::ApproachingVehicleInformation info = apprIt.second; + foeMaxSpeed = MAX2(apprIt.first->getSpeed(), foeMaxSpeed); + foeMinDist = MIN2(info.dist, foeMinDist); + if (info.willPass) { + foeMinETA = MIN2(info.arrivalTime, foeMinETA); + } + foeMinNumericalID = MIN2(foeMinNumericalID, apprIt.first->getNumericalID()); + } + } + SUMOVehicle* closest = nullptr; + if (foeMaxSpeed >= 0 || checkRouteConflict.size() > 0) { + // check against vehicles approaching this link + double maxSpeed = -1; + double minDist = std::numeric_limits::max(); + SUMOTime minETA = std::numeric_limits::max(); + long long minNumericalID = std::numeric_limits::max(); // tie braker + for (auto apprIt : currentLink->getApproaching()) { + MSLink::ApproachingVehicleInformation info = apprIt.second; + maxSpeed = MAX2(apprIt.first->getSpeed(), maxSpeed); + if (info.dist < minDist) { + minDist = info.dist; + closest = const_cast(apprIt.first); + } + if (info.willPass) { + minETA = MIN2(info.arrivalTime, minETA); + } + minNumericalID = MIN2(minNumericalID, apprIt.first->getNumericalID()); + } +#ifdef DEBUG_SIGNALSTATE_PRIORITY + if (DEBUG_COND) std::cout << SIMTIME << " railSignal=" << getID() << " index=" << index + << " fms=" << foeMaxSpeed << " ms=" << maxSpeed + << " fmd=" << foeMinDist << " md=" << minDist + << " fmE=" << foeMinETA << " mE=" << minETA + << " fmI=" << foeMinNumericalID << " mI=" << minNumericalID + << "\n"; +#endif + if (foeMinETA < minETA) { + return true; + } else if (foeMinETA == minETA) { + if (foeMaxSpeed > maxSpeed) { + return true; + } else if (foeMaxSpeed == maxSpeed) { + if (foeMinDist < minDist) { + return true; + } else if (foeMinDist == minDist) { + if (foeMinNumericalID < minNumericalID) { + return true; + } + } + } + } +#ifdef DEBUG_SIGNALSTATE_PRIORITY + //if (DEBUG_COND) std::cout << SIMTIME << " railSignal=" << getID() << " index=" << index << " closestVeh=" << Named::getIDSecure(closest) << " routeFoes " << toString(routeFoes) << "\n"; +#endif + if (closest != nullptr) { + for (int clIndex : checkRouteConflict) { + const MSEdge& firstBidi = myRouteConflictLanes[index][clIndex].front()->getEdge(); + const MSEdge* first = firstBidi.getBidiEdge(); + assert(first != nullptr); + if (std::find(closest->getCurrentRouteEdge(), closest->getRoute().end(), first) != closest->getRoute().end()) { + // vehicle wants to drive passt this conflict link + //const ConstMSEdgeVector& route = closest->getRoute().getEdges(); + for (const MSLane* cLane : myRouteConflictLanes[index][clIndex]) { + if (cLane->getVehicleNumberWithPartials() > 0) { + if (DEBUG_COND) std::cout << SIMTIME << " railSignal=" << getID() << " index=" << index + << " closestVeh=" << closest->getID() << " route edge " << cLane->getEdge().getID() << " blocked\n"; + // trigger rerouting + MSDevice_Routing* rDev = static_cast(closest->getDevice(typeid(MSDevice_Routing))); + if (rDev != nullptr) { + SUMOTime now = MSNet::getInstance()->getCurrentTimeStep(); + if (myLastRerouteAttempt[index].first != closest + // reroute each vehicle only once if no + // periodic routing is allowed, otherwise + // with the specified period + || (rDev->getPeriod() > 0 && myLastRerouteAttempt[index].second + rDev->getPeriod() <= now)) { + MSEdgeVector routeFoes; + routeFoes.push_back(const_cast(first)); + SUMOAbstractRouter& router = MSRoutingEngine::getRouterTT(routeFoes); + myLastRerouteAttempt[index] = std::make_pair(closest, now); + try { + closest->reroute(now, "railSignal:" + getID(), router, false, false, true); // silent + } catch (ProcessError& error) { +#ifdef DEBUG_SIGNALSTATE_PRIORITY + if (DEBUG_COND) { + std::cout << " rerouting failed: " << error.what() << "\n"; + } +#endif + } } } - break; // we don't have to check the other lanes of this block anymore + return true; } } - if (hasOccupiedBlock) { //we don't have to check the other blocks anymore - break; - } } } } } - return state; + return false; } void MSRailSignal::updateCurrentPhase() { - myCurrentPhase.setState(getAppropriateState()); + std::string state(myLinks.size(), 'G'); //the state of the phase definition (all signal are green) + for (int i = 0; i < (int)myLinks.size(); i++) { + if (conflictLaneOccupied(i) || hasLinkConflict(i)) { + state[i] = 'r'; + } + } + myCurrentPhase.setState(state); } @@ -356,5 +514,227 @@ } +void +MSRailSignal::collectForwardBlock(MSLane* toLane, double length, std::vector& forwardBlock, LaneSet& visited) { + while (toLane != nullptr) { + if (visited.count(toLane) != 0) { + return; + } + visited.insert(toLane); + forwardBlock.push_back(toLane); + length += toLane->getLength(); + if (length > MAX_BLOCK_LENGTH) { + if (myNumWarnings < MAX_SIGNAL_WARNINGS) { + WRITE_WARNING("Block after rail signal junction '" + getID() + + "' exceeds maximum length (stopped searching after lane '" + toLane->getID() + "' (length=" + toString(length) + "m)."); + } + myNumWarnings++; + return; + } + const MSLinkCont& links = toLane->getLinkCont(); + toLane = nullptr; + for (MSLink* link : links) { + if (link->getDirection() == LINKDIR_TURN) { + continue; + } + if (link->getTLLogic() != nullptr) { + if (link->getTLLogic() == this) { + WRITE_WARNING("Found circular block at railSignal junction '" + getID() + "' (" + toString(forwardBlock.size()) + " lanes, length " + toString(length) + ")"); + } + return; + } + if (toLane == nullptr) { + toLane = link->getViaLaneOrLane(); + } else { + collectForwardBlock(link->getViaLaneOrLane(), length, forwardBlock, visited); + } + } + } +} + + +void +MSRailSignal::collectBidiBlock(MSLane* toLane, double length, bool foundSwitch, std::vector& bidiBlock, LaneSet& visited) { + while (toLane != nullptr) { + //std::cout << " toLane=" << toLane->getID() << " length=" << length << " foundSwitch=" << foundSwitch << "\n"; + if (visited.count(toLane) != 0) { + return; + } + visited.insert(toLane); + bidiBlock.push_back(toLane); + length += toLane->getLength(); + if (length > MAX_BLOCK_LENGTH) { + if (myNumWarnings < MAX_SIGNAL_WARNINGS) { + WRITE_WARNING("Bidirectional block after rail signal junction '" + getID() + + "' exceeds maximum length (stopped searching after lane '" + toLane->getID() + "' (length=" + toString(length) + "m)."); + } + myNumWarnings++; + return; + } + const auto& incomingLaneInfos = toLane->getIncomingLanes(); + MSLane* prev = toLane; + toLane = nullptr; + for (const auto& ili : incomingLaneInfos) { + if (ili.viaLink->getDirection() == LINKDIR_TURN) { + continue; + } + if (ili.viaLink->getTLLogic() != nullptr) { + if (!foundSwitch && bidiBlock.size() > 1) { + // check wether this node is switch (first edge doesn't count) + for (MSLink* link : ili.lane->getLinkCont()) { + if (link->getDirection() == LINKDIR_TURN) { + continue; + } + if (link->getViaLaneOrLane() == prev) { + continue; + } + //std::cout << " ili.lane=" << ili.lane->getID() + // << " prev=" << prev->getID() + // << " linkDir=" << ili.viaLink->getDirection() + // << " linkIndex=" << ili.viaLink->getTLIndex() + // << "\n"; + foundSwitch = true; + break; + } + } + if (foundSwitch) { + return; + } + } + if (toLane == nullptr) { + toLane = ili.lane; + } else { + foundSwitch = true; + collectBidiBlock(ili.lane, length, true, bidiBlock, visited); + } + } + if (toLane != nullptr && !foundSwitch && prev->getEdge().getBidiEdge() != nullptr) { + // check switch in the other direction + MSLane* prevBidi = prev->getBidiLane(); + for (MSLink* link : prevBidi->getLinkCont()) { + if (link->getDirection() == LINKDIR_TURN) { + continue; + } + if (link->getViaLaneOrLane()->getEdge().getBidiEdge() != &toLane->getEdge()) { + //std::cout << " toLane=" << toLane->getID() + // << " prev=" << prev->getID() + // << " prevBidi=" << prevBidi->getID() + // << " linkLane=" << link->getViaLaneOrLane()->getEdge().getID() + // << " linkLaneBidi=" << Named::getIDSecure(link->getViaLaneOrLane()->getEdge().getBidiEdge()) + // << "\n"; + foundSwitch = true; + break; + } + } + } + } +} + + +void +MSRailSignal::collectConflictLinks(MSLane* toLane, double length, + std::vector& backwardBlock, + std::vector& conflictLinks, + LaneSet& visited, + bool checkFoes) { + while (toLane != nullptr) { + //std::cout << "collectConflictLinks " << getID() << " toLane=" << toLane->getID() << " length=" << length + // << " backward=" << toString(backwardBlock) + // << " conflictLinks=" << conflictLinks.size() + // << " visited=" << visited.size() + // << " checkFoes=" << checkFoes + // << "\n"; + const auto& incomingLaneInfos = toLane->getIncomingLanes(); + MSLane* orig = toLane; + toLane = nullptr; + for (const auto& ili : incomingLaneInfos) { + if (ili.viaLink->getDirection() == LINKDIR_TURN) { + continue; + } + if (visited.count(ili.lane) != 0) { + continue; + } + if (ili.viaLink->getTLLogic() != nullptr) { + conflictLinks.push_back(ili.viaLink); + continue; + } + backwardBlock.push_back(ili.lane); + visited.insert(ili.lane); + length += orig->getLength(); + if (length > MAX_BLOCK_LENGTH) { + if (myNumWarnings < MAX_SIGNAL_WARNINGS) { + WRITE_WARNING("incoming conflict block after rail signal junction '" + getID() + + "' exceeds maximum length (stopped searching after lane '" + orig->getID() + "' (length=" + toString(length) + "m)."); + } + myNumWarnings++; + return; + } + if (toLane == nullptr) { + toLane = ili.lane; + } else { + collectConflictLinks(ili.lane, length, backwardBlock, conflictLinks, visited, false); + } + } + if (checkFoes && orig->isInternal()) { + // check for crossed tracks + MSLink* link = orig->getIncomingLanes().front().viaLink; + if (link->getDirection() != LINKDIR_TURN) { + for (const MSLane* foeConst : link->getFoeLanes()) { + MSLane* foe = const_cast(foeConst); + if (visited.count(foe) == 0) { + backwardBlock.push_back(foe); + visited.insert(foe); + collectConflictLinks(foe, length, backwardBlock, conflictLinks, visited, false); + } + } + } + } + } +} + + +void +MSRailSignal::addLink(MSLink* link, MSLane* lane, int pos) { + if (pos >= 0) { + MSTrafficLightLogic::addLink(link, lane, pos); + } // ignore uncontrolled link +} + + +bool +MSRailSignal::hasAlternativeTrack(MSLink* link) { + for (MSLink* cand : link->getLaneBefore()->getLinkCont()) { + if (cand != link && cand->getTLLogic() != nullptr) { + return true; + } + } + return false; +} + +bool +MSRailSignal::hasAlternativeTrackBetween(const std::vector& forwardBlock, MSLink* cLink) { + // check if the forward block ends at a controlled switch + // note: link::myJunction not yet initialized here + const MSJunction* cLinkJunction = cLink->getLaneBefore()->getEdge().getToJunction(); + //std::cout << " forwardBlock=" << toString(forwardBlock) << " cLink_j=" << cLinkJunction->getID() << "\n"; + if (forwardBlock.back()->getEdge().getToJunction() == cLinkJunction) { + int numLinks = 0; + for (MSLink* cand : forwardBlock.back()->getLinkCont()) { + if (cand->getTLLogic() != nullptr) { + numLinks++; + if (numLinks > 1) { + return true; + } + } + } + } + return false; +} + +std::string +MSRailSignal::getTLLinkID(MSLink* link) { + return link->getTLLogic()->getID() + "_" + toString(link->getTLIndex()); +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSRailSignal.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -67,6 +67,13 @@ /// @brief Destructor ~MSRailSignal(); + /** @brief Adds a link on building + * @param[in] link The controlled link + * @param[in] lane The lane this link starts at + * @param[in] pos The link's index (signal group) within this program + */ + void addLink(MSLink* link, MSLane* lane, int pos); + /// @name Handling of controlled links /// @{ @@ -89,7 +96,8 @@ * * @return The state actually required for this signal. */ - std::string getAppropriateState(); + bool conflictLaneOccupied(int index) const; + bool hasLinkConflict(int index) const; /// @brief updates the current phase of the signal void updateCurrentPhase(); @@ -195,24 +203,54 @@ 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; + /* The conflict lanes for each link index + * If any of them is occupied the signal must be red */ + std::vector > myConflictLanes; + + /* The conflict links for each link index + * Conflict resolution must be performed if vehicles are approaching the + * current link and any of the conflict links */ + std::vector > myConflictLinks; + + /* Conflict lanes for each conflictLink of the current link + * linkIndex -> conflictLinkIndex -> lanes + * They must only be checked if the approaching vehicle's route enters the + * bidirectional block beyond that conflichLink */ + std::vector > > myRouteConflictLanes; + + /* Conflict links for each conflictLink of the current link + * linkIndex -> conflictLinkIndex -> links + * They must only be checked if the approaching vehicle's route enters the + * bidirectional block beyond that conflictLink, then they are treated like + * regular conflictLinks */ + std::vector > > myRouteConflictLinks; + + /// Storage for rerouting times to avoid superfluous calls + mutable std::vector > myLastRerouteAttempt; + + typedef std::set LaneSet; + + /// @brief collect conflict lanes in step 1 + void collectForwardBlock(MSLane* toLane, double length, std::vector& forwardBlock, LaneSet& visited); + + /// @brief collect bidirectional conflict lanes in step 2 + void collectBidiBlock(MSLane* toLane, double length, bool foundSwitch, std::vector& bidiBlock, LaneSet& visited); + + /// @brief collect additional conflict lanes and conflict links in step 3 + void collectConflictLinks(MSLane* toLane, double length, + std::vector& backwardBlock, + std::vector& conflictLinks, + LaneSet& visited, + bool checkFoes = false); - /// A map that maps an outgoing lane from the junction to its vector of lanes leading to the next signal - std::map > mySucceedingBlocks; + /// @brief whether there are other controlled links from the same incoming lane + static bool hasAlternativeTrack(MSLink* link); - /// A map of lanes to links of approaching vehicles of succeeding blocks - std::map mySucceedingBlocksIncommingLinks; + /// @brief whether there is an alternative track between the end of the forwardBlock and cLink + static bool hasAlternativeTrackBetween(const std::vector& forwardBlock, MSLink* cLink); + /// @brief return logicID_linkIndex + static std::string getTLLinkID(MSLink* link); protected: diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -69,8 +69,8 @@ } // increment the index - if (myPhases[myStep]->nextPhase >= 0) { - myStep = myPhases[myStep]->nextPhase; + if (myPhases[myStep]->nextPhases.size() > 0 && myPhases[myStep]->nextPhases.front() >= 0) { + myStep = myPhases[myStep]->nextPhases.front(); } else { myStep++; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLCongestionPolicy.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLDefinitions.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLDefinitions.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLDefinitions.h 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLDefinitions.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.h 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLE2Sensors.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -38,7 +38,7 @@ MSSOTLHiLevelTrafficLightLogic::~MSSOTLHiLevelTrafficLightLogic() { for (int i = 0; i < (int)policies.size(); i++) { - delete(policies[i]); + delete (policies[i]); } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLHiLevelTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLMarchingPolicy.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhasePolicy.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPhaseTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPlatoonPolicy.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy3DStimulus.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DFamilyStimulus.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy5DStimulus.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyBasedTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicyDesirability.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLPolicy.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLRequestPolicy.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLSensors.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSOTLWaveTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSSwarmTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.cpp 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -54,7 +54,7 @@ MSTLLogicControl::TLSLogicVariants::~TLSLogicVariants() { std::map::const_iterator j; for (std::map::iterator j = myVariants.begin(); j != myVariants.end(); ++j) { - delete(*j).second; + delete (*j).second; } for (std::vector::iterator i = mySwitchActions.begin(); i != mySwitchActions.end(); ++i) { delete *i; @@ -552,11 +552,11 @@ MSTLLogicControl::~MSTLLogicControl() { // delete tls for (std::map::const_iterator i = myLogics.begin(); i != myLogics.end(); ++i) { - delete(*i).second; + delete (*i).second; } // delete WAUTs for (std::map::const_iterator i = myWAUTs.begin(); i != myWAUTs.end(); ++i) { - delete(*i).second; + delete (*i).second; } } diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.h 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTLLogicControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -122,47 +122,55 @@ std::vector foundGreen(phases.front()->getState().size(), false); for (int i = 0; i < (int)phases.size(); ++i) { // warn about unused states - const int iNext = phases[i]->nextPhase < 0 ? (i + 1) % phases.size() : phases[i]->nextPhase; - if (iNext < 0 || iNext >= (int)phases.size()) { - throw ProcessError("Invalid nextPhase " + toString(iNext) + " in tlLogic '" + getID() - + "', program '" + getProgramID() + "' with " + toString(phases.size()) + " phases"); + std::vector nextPhases; + nextPhases.push_back((i + 1) % phases.size()); + bool iNextDefault = true; + if (phases[i]->nextPhases.size() > 0) { + nextPhases = phases[i]->nextPhases; + iNextDefault = false; } - const std::string optionalFrom = phases[i]->nextPhase < 0 ? "" : " from phase " + toString(i); - 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() + myIgnoredIndices.size()) { - WRITE_WARNING("Unused states in tlLogic '" + getID() - + "', program '" + getProgramID() + "' in phase " + toString(i) - + " after tl-index " + toString((int)myLanes.size() - 1)); - haveWarnedAboutUnusedStates = true; - } - // detect illegal states - const std::string::size_type illegal = state1.find_first_not_of(SUMOXMLDefinitions::ALLOWED_TLS_LINKSTATES); - if (std::string::npos != illegal) { - throw ProcessError("Illegal character '" + toString(state1[illegal]) + "' in tlLogic '" + getID() - + "', program '" + getProgramID() + "' in phase " + toString(i)); - } - // warn about transitions from green to red without intermediate yellow - 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" + optionalFrom + " to phase " + toString(iNext)); - return; // one warning per program is enough + for (int iNext : nextPhases) { + if (iNext < 0 || iNext >= (int)phases.size()) { + throw ProcessError("Invalid nextPhase " + toString(iNext) + " in tlLogic '" + getID() + + "', program '" + getProgramID() + "' with " + toString(phases.size()) + " phases"); + } + const std::string optionalFrom = iNextDefault ? "" : " from phase " + toString(i); + 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() + myIgnoredIndices.size()) { + WRITE_WARNING("Unused states in tlLogic '" + getID() + + "', program '" + getProgramID() + "' in phase " + toString(i) + + " after tl-index " + toString((int)myLanes.size() - 1)); + haveWarnedAboutUnusedStates = true; + } + // detect illegal states + const std::string::size_type illegal = state1.find_first_not_of(SUMOXMLDefinitions::ALLOWED_TLS_LINKSTATES); + if (std::string::npos != illegal) { + throw ProcessError("Illegal character '" + toString(state1[illegal]) + "' in tlLogic '" + getID() + + "', program '" + getProgramID() + "' in phase " + toString(i)); + } + // warn about transitions from green to red without intermediate yellow + 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" + optionalFrom + " to phase " + toString(iNext)); + return; // one warning per program is enough + } } } } - } - // warn about links that never get the green light - for (int j = 0; j < (int)state1.size(); ++j) { - LinkState ls = (LinkState)state1[j]; - if (ls == LINKSTATE_TL_GREEN_MAJOR || ls == LINKSTATE_TL_GREEN_MINOR) { - foundGreen[j] = true; + // warn about links that never get the green light + for (int j = 0; j < (int)state1.size(); ++j) { + LinkState ls = (LinkState)state1[j]; + if (ls == LINKSTATE_TL_GREEN_MAJOR || ls == LINKSTATE_TL_GREEN_MINOR) { + foundGreen[j] = true; + } } } } @@ -354,10 +362,16 @@ } -void +void MSTrafficLightLogic::ignoreLinkIndex(int pos) { myIgnoredIndices.insert(pos); } + +bool +MSTrafficLightLogic::isSelected() const { + return MSNet::getInstance()->isSelected(this); +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.h sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.h 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/traffic_lights/MSTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -338,6 +338,8 @@ /// @} + /// @brief whether this logic is selected in the GUI + bool isSelected() const; protected: /** diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/Makefile.in sumo-1.2.0+dfsg1/src/microsim/trigger/Makefile.in --- sumo-1.1.0+dfsg1/src/microsim/trigger/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,640 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/trigger -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = MSCalibrator.$(OBJEXT) \ - MSLaneSpeedTrigger.$(OBJEXT) MSTrigger.$(OBJEXT) \ - MSChargingStation.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libmicrosimtrigger.a -libmicrosimtrigger_a_SOURCES = MSCalibrator.cpp MSCalibrator.h \ -MSLaneSpeedTrigger.cpp MSLaneSpeedTrigger.h \ -MSTrigger.h MSTrigger.cpp \ -MSChargingStation.h MSChargingStation.cpp \ -MSTriggeredRerouter.cpp MSTriggeredRerouter.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) --foreign src/microsim/trigger/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/microsim/trigger/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCalibrator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSChargingStation.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)/MSTriggeredRerouter.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/microsim/trigger/MSCalibrator.cpp sumo-1.2.0+dfsg1/src/microsim/trigger/MSCalibrator.cpp --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSCalibrator.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSCalibrator.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include "MSCalibrator.h" @@ -517,7 +517,7 @@ } } -bool MSCalibrator::VehicleRemover::notifyEnter(SUMOVehicle& veh, Notification /* reason */, const MSLane* /* enteredLane */) { +bool MSCalibrator::VehicleRemover::notifyEnter(SUMOTrafficObject& veh, Notification /* reason */, const MSLane* /* enteredLane */) { if (myParent == nullptr) { return false; } diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSCalibrator.h sumo-1.2.0+dfsg1/src/microsim/trigger/MSCalibrator.h --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSCalibrator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSCalibrator.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -130,7 +130,7 @@ * @see Notification */ //@} - virtual bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + virtual bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); void disable() { myParent = 0; diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSChargingStation.cpp sumo-1.2.0+dfsg1/src/microsim/trigger/MSChargingStation.cpp --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSChargingStation.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSChargingStation.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSChargingStation.h sumo-1.2.0+dfsg1/src/microsim/trigger/MSChargingStation.h --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSChargingStation.h 2018-09-10 22:00:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSChargingStation.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.cpp sumo-1.2.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.cpp --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.h sumo-1.2.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.h --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSLaneSpeedTrigger.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSTrigger.cpp sumo-1.2.0+dfsg1/src/microsim/trigger/MSTrigger.cpp --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSTrigger.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSTrigger.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.cpp sumo-1.2.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.cpp --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -111,7 +111,7 @@ if (element == SUMO_TAG_INTERVAL) { bool ok = true; myCurrentIntervalBegin = attrs.getOptSUMOTimeReporting(SUMO_ATTR_BEGIN, nullptr, ok, -1); - myCurrentIntervalEnd = attrs.getOptSUMOTimeReporting(SUMO_ATTR_END, nullptr, ok, -1); + myCurrentIntervalEnd = attrs.getOptSUMOTimeReporting(SUMO_ATTR_END, nullptr, ok, SUMOTime_MAX); } if (element == SUMO_TAG_DEST_PROB_REROUTE) { // by giving probabilities of new destinations @@ -343,21 +343,25 @@ bool -MSTriggeredRerouter::notifyMove(SUMOVehicle& veh, double /*oldPos*/, +MSTriggeredRerouter::notifyMove(SUMOTrafficObject& veh, double /*oldPos*/, double /*newPos*/, double /*newSpeed*/) { return notifyEnter(veh, NOTIFICATION_JUNCTION); } bool -MSTriggeredRerouter::notifyLeave(SUMOVehicle& /*veh*/, double /*lastPos*/, +MSTriggeredRerouter::notifyLeave(SUMOTrafficObject& /*veh*/, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { return reason == NOTIFICATION_LANE_CHANGE; } bool -MSTriggeredRerouter::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification /*reason*/, const MSLane* /* enteredLane */) { +MSTriggeredRerouter::notifyEnter(SUMOTrafficObject& tObject, MSMoveReminder::Notification /*reason*/, const MSLane* /* enteredLane */) { + if (!tObject.isVehicle()) { + return false; + } + SUMOVehicle& veh = static_cast(tObject); if (!vehicleApplies(veh)) { return false; } @@ -390,43 +394,27 @@ if (rerouteDef->parkProbs.getOverallProb() > 0) { bool newDestination = false; - MSParkingArea* newParkingArea = rerouteParkingArea(rerouteDef, veh, newDestination); + ConstMSEdgeVector newRoute; + MSParkingArea* newParkingArea = rerouteParkingArea(rerouteDef, veh, newDestination, newRoute); if (newParkingArea != nullptr) { - const MSEdge* newEdge = &(newParkingArea->getLane().getEdge()); - - SUMOAbstractRouter& router = hasReroutingDevice - ? MSRoutingEngine::getRouterTT(rerouteDef->closed) - : MSNet::getInstance()->getRouterTT(rerouteDef->closed); - - // Compute the route from the current edge to the parking area edge - ConstMSEdgeVector edgesToPark; - router.compute(veh.getEdge(), newEdge, &veh, MSNet::getInstance()->getCurrentTimeStep(), edgesToPark); - - // Compute the route from the parking area edge to the end of the route - ConstMSEdgeVector edgesFromPark; - if (!newDestination) { - router.compute(newEdge, lastEdge, &veh, MSNet::getInstance()->getCurrentTimeStep(), edgesFromPark); - } else { - // adapt plans of any riders - for (MSTransportable* p : veh.getPersons()) { - p->rerouteParkingArea(veh.getNextParkingArea(), newParkingArea); - } - } - - // we have a new destination, let's replace the vehicle route - ConstMSEdgeVector edges = edgesToPark; - if (edgesFromPark.size() > 0) { - edges.insert(edges.end(), edgesFromPark.begin() + 1, edgesFromPark.end()); + // adapt plans of any riders + for (MSTransportable* p : veh.getPersons()) { + p->rerouteParkingArea(veh.getNextParkingArea(), newParkingArea); } if (newDestination) { + // update arrival parameters SUMOVehicleParameter* newParameter = new SUMOVehicleParameter(); *newParameter = veh.getParameter(); newParameter->arrivalPosProcedure = ARRIVAL_POS_GIVEN; newParameter->arrivalPos = newParkingArea->getEndLanePosition(); veh.replaceParameter(newParameter); } - const double routeCost = router.recomputeCosts(edges, &veh, MSNet::getInstance()->getCurrentTimeStep()); + + SUMOAbstractRouter& router = hasReroutingDevice + ? MSRoutingEngine::getRouterTT(rerouteDef->closed) + : MSNet::getInstance()->getRouterTT(rerouteDef->closed); + const double routeCost = router.recomputeCosts(newRoute, &veh, MSNet::getInstance()->getCurrentTimeStep()); ConstMSEdgeVector prevEdges(veh.getCurrentRouteEdge(), veh.getRoute().end()); const double previousCost = router.recomputeCosts(prevEdges, &veh, MSNet::getInstance()->getCurrentTimeStep()); const double savings = previousCost - routeCost; @@ -434,9 +422,11 @@ // << " prevEdges=" << toString(prevEdges) // << " newEdges=" << toString(edges) // << "\n"; - veh.replaceRouteEdges(edges, routeCost, savings, getID(), false, false, false); + std::string errorMsg; - if (!veh.replaceParkingArea(newParkingArea, errorMsg)) { + if (veh.replaceParkingArea(newParkingArea, errorMsg)) { + veh.replaceRouteEdges(newRoute, routeCost, savings, getID() + ":" + toString(SUMO_TAG_PARKING_ZONE_REROUTE), false, false, false); + } else { WRITE_WARNING("Vehicle '" + veh.getID() + "' at rerouter '" + getID() + "' could not reroute to new parkingArea '" + newParkingArea->getID() + "' reason=" + errorMsg + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); @@ -567,7 +557,7 @@ MSParkingArea* MSTriggeredRerouter::rerouteParkingArea(const MSTriggeredRerouter::RerouteInterval* rerouteDef, - SUMOVehicle& veh, bool& newDestination) const { + SUMOVehicle& veh, bool& newDestination, ConstMSEdgeVector& newRoute) const { // reroute destination from initial parking area to the near parking area // if the next stop is a parking area, it is included in the current // alternative set and if it can be observed to be full @@ -619,6 +609,7 @@ typedef std::map MSParkingAreaMap_t; ParkingParamMap_t weights; + std::map newRoutes; // The probability of choosing this area inside the zone weights["probability"] = getWeight(veh, "parking.probability.weight", 0.0); @@ -661,7 +652,7 @@ SUMOAbstractRouter& router = MSNet::getInstance()->getRouterTT(rerouteDef->closed); - std::vector probs = rerouteDef->parkProbs.getProbs(); + const std::vector& probs = rerouteDef->parkProbs.getProbs(); const double brakeGap = veh.getBrakeGap(); @@ -689,8 +680,22 @@ // Compute the route from the parking area edge to the end of the route ConstMSEdgeVector edgesFromPark; + const MSEdge* nextDestination = route.getLastEdge(); + double nextPos = veh.getArrivalPos(); + int nextDestinationIndex = route.size() - 1; if (!newDestination) { - router.compute(parkEdge, route.getLastEdge(), &veh, MSNet::getInstance()->getCurrentTimeStep(), edgesFromPark); + std::vector > stopIndices = veh.getStopIndices(); + if (stopIndices.size() > 1) { + nextDestinationIndex = stopIndices[1].first; + nextDestination = route.getEdges()[nextDestinationIndex]; + nextPos = stopIndices[1].second; + + } + if (parkEdge == nextDestination && nextPos < pa->getEndLanePosition()) { + router.computeLooped(parkEdge, nextDestination, &veh, MSNet::getInstance()->getCurrentTimeStep(), edgesFromPark); + } else { + router.compute(parkEdge, nextDestination, &veh, MSNet::getInstance()->getCurrentTimeStep(), edgesFromPark); + } } if (edgesFromPark.size() > 0 || newDestination) { @@ -747,6 +752,8 @@ maxValues["timeto"] = parkValues["timeto"]; } + ConstMSEdgeVector newEdges = edgesToPark; + if (newDestination) { parkValues["distancefrom"] = 0; parkValues["timefrom"] = 0; @@ -758,6 +765,8 @@ routeFromPark.begin(), routeFromPark.end() - 1, includeInternalLengths); // The time to reach this area parkValues["timefrom"] = router.recomputeCosts(edgesFromPark, &veh, MSNet::getInstance()->getCurrentTimeStep()); + newEdges.insert(newEdges.end(), edgesFromPark.begin() + 1, edgesFromPark.end()); + newEdges.insert(newEdges.end(), route.begin() + nextDestinationIndex + 1, route.end()); } if (parkValues["distancefrom"] > maxValues["distancefrom"]) { @@ -769,6 +778,7 @@ } parkAreas[pa] = parkValues; + newRoutes[pa] = newEdges; #ifdef DEBUG_PARKING if (DEBUGCOND) { @@ -819,6 +829,7 @@ if (nearParkArea == nullptr || parkingCost < minParkingCost) { minParkingCost = parkingCost; nearParkArea = it->first; + newRoute = newRoutes[nearParkArea]; } #ifdef DEBUG_PARKING diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.h sumo-1.2.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.h --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.h 2018-11-22 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSTriggeredRerouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -126,7 +126,7 @@ * @see MSMoveReminder::notifyEnter * @see MSMoveReminder::Notification */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// @name Methods called on vehicle movement / state change, overwriting MSDevice /// @{ @@ -139,7 +139,7 @@ * @param[in] newSpeed Moving speed. * @return True (always). */ - bool notifyMove(SUMOVehicle& veh, double oldPos, double newPos, double newSpeed); + bool notifyMove(SUMOTrafficObject& veh, double oldPos, double newPos, double newSpeed); /** @brief Removes the reminder * @@ -149,7 +149,7 @@ * @param[in] isLaneChange whether the vehicle changed from the lane * @return false if the vehicle left th edge */ - bool notifyLeave(SUMOVehicle& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); + bool notifyLeave(SUMOTrafficObject& veh, double lastPos, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0); /// Returns the rerouting definition valid for the given time and vehicle, 0 if none const RerouteInterval* getCurrentReroute(SUMOTime time, SUMOVehicle& veh) const; @@ -178,7 +178,7 @@ double getWeight(SUMOVehicle& veh, const std::string param, const double defaultWeight) const; MSParkingArea* rerouteParkingArea(const MSTriggeredRerouter::RerouteInterval* rerouteDef, - SUMOVehicle& veh, bool& newDestination) const; + SUMOVehicle& veh, bool& newDestination, ConstMSEdgeVector& newRoute) const; protected: diff -Nru sumo-1.1.0+dfsg1/src/microsim/trigger/MSTrigger.h sumo-1.2.0+dfsg1/src/microsim/trigger/MSTrigger.h --- sumo-1.1.0+dfsg1/src/microsim/trigger/MSTrigger.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/microsim/trigger/MSTrigger.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/Makefile.in sumo-1.2.0+dfsg1/src/netbuild/Makefile.in --- sumo-1.1.0+dfsg1/src/netbuild/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netbuild -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) NBAlgorithms_Railway.$(OBJEXT) \ - NBConnection.$(OBJEXT) NBContHelper.$(OBJEXT) \ - NBDistrict.$(OBJEXT) NBDistrictCont.$(OBJEXT) NBEdge.$(OBJEXT) \ - NBEdgeCont.$(OBJEXT) NBFrame.$(OBJEXT) \ - NBHeightMapper.$(OBJEXT) NBHelpers.$(OBJEXT) NBNode.$(OBJEXT) \ - NBNodeCont.$(OBJEXT) NBNodeShapeComputer.$(OBJEXT) \ - NBPTStop.$(OBJEXT) NBPTStopCont.$(OBJEXT) NBRequest.$(OBJEXT) \ - NBTrafficLightDefinition.$(OBJEXT) \ - NBTrafficLightLogic.$(OBJEXT) \ - NBTrafficLightLogicCont.$(OBJEXT) NBTypeCont.$(OBJEXT) \ - NBSign.$(OBJEXT) NBOwnTLDef.$(OBJEXT) NBLoadedTLDef.$(OBJEXT) \ - NBLoadedSUMOTLDef.$(OBJEXT) NBNetBuilder.$(OBJEXT) \ - NBParking.$(OBJEXT) NBPTLine.$(OBJEXT) NBPTLineCont.$(OBJEXT) \ - NBPTPlatform.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libnetbuild.a -libnetbuild_a_SOURCES = NBAlgorithms.cpp NBAlgorithms.h \ -NBAlgorithms_Ramps.cpp NBAlgorithms_Ramps.h \ -NBAlgorithms_Railway.cpp NBAlgorithms_Railway.h \ -NBCapacity2Lanes.h NBConnection.cpp NBConnection.h \ -NBConnectionDefs.h NBCont.h NBContHelper.cpp NBContHelper.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 \ -NBNodeShapeComputer.cpp NBNodeShapeComputer.h \ -NBPTStop.cpp NBPTStop.h \ -NBPTStopCont.cpp NBPTStopCont.h \ -NBRequest.cpp NBRequest.h \ -NBTrafficLightDefinition.cpp NBTrafficLightDefinition.h \ -NBTrafficLightLogic.cpp NBTrafficLightLogic.h \ -NBTrafficLightLogicCont.cpp NBTrafficLightLogicCont.h \ -NBTypeCont.cpp NBTypeCont.h \ -NBSign.cpp NBSign.h \ -NBOwnTLDef.cpp NBOwnTLDef.h \ -NBLoadedTLDef.cpp NBLoadedTLDef.h \ -NBLoadedSUMOTLDef.cpp NBLoadedSUMOTLDef.h \ -NBNetBuilder.cpp NBNetBuilder.h \ -NBParking.h NBParking.cpp \ -NBVehicle.h \ -NBPTLine.h NBPTLine.cpp \ -NBPTLineCont.h NBPTLineCont.cpp \ -NBPTPlatform.h NBPTPlatform.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) --foreign src/netbuild/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netbuild/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBAlgorithms.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBAlgorithms_Railway.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBAlgorithms_Ramps.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBConnection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBContHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBDistrict.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBDistrictCont.Po@am__quote@ -@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)/NBLoadedSUMOTLDef.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBLoadedTLDef.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBNetBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBNode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBNodeCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBNodeShapeComputer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBOwnTLDef.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBPTLine.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBPTLineCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBPTPlatform.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBPTStop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBPTStopCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBParking.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBRequest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBSign.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBTrafficLightDefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBTrafficLightLogicCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBTypeCont.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netbuild/NBAlgorithms.cpp sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -64,6 +64,11 @@ NBEdge* outedge = *j; for (std::vector::const_iterator k = incoming.begin(); k != incoming.end(); ++k) { NBEdge* e = *k; + if ((outedge->getPermissions() & e->getPermissions() & ~SVC_PEDESTRIAN) == 0 + && outedge->getPermissions() != SVC_PEDESTRIAN + && e->getPermissions() != SVC_PEDESTRIAN) { + continue; + } // @todo: check whether NBHelpers::relAngle is properly defined and whether it should really be used, here const double signedAngle = NBHelpers::normRelAngle(e->getAngleAtNode(node), outedge->getAngleAtNode(node)); if (signedAngle > 0 && signedAngle < 177 && e->getGeometry().back().distanceTo2D(outedge->getGeometry().front()) < POSITION_EPS) { @@ -156,6 +161,7 @@ NBNode* n = (*i).second; // the type may already be set from the data if (n->myType != NODETYPE_UNKNOWN && n->myType != NODETYPE_DEAD_END) { + n->myTypeWasGuessed = false; continue; } // check whether the node is a waterway node. Set to unregulated by default @@ -203,6 +209,7 @@ } // save type n->myType = type; + n->myTypeWasGuessed = true; } } @@ -254,7 +261,7 @@ bool -NBNodeTypeComputer::isRailwayNode(NBNode* n) { +NBNodeTypeComputer::isRailwayNode(const NBNode* n) { int numRailway = 0; int numNonRailway = 0; for (NBEdge* e : n->getIncomingEdges()) { @@ -272,31 +279,25 @@ // --------------------------------------------------------------------------- void NBEdgePriorityComputer::computeEdgePriorities(NBNodeCont& nc) { - for (std::map::const_iterator i = nc.begin(); i != nc.end(); ++i) { - computeEdgePrioritiesSingleNode((*i).second); - } -} - - -void -NBEdgePriorityComputer::computeEdgePrioritiesSingleNode(NBNode* node) { - // preset all junction's edge priorities to zero - for (EdgeVector::iterator j = node->myAllEdges.begin(); j != node->myAllEdges.end(); ++j) { - (*j)->setJunctionPriority(node, NBEdge::MINOR_ROAD); - } - node->markBentPriority(false); - // check if the junction is not a real junction - if (node->myIncomingEdges.size() == 1 && node->myOutgoingEdges.size() == 1) { - return; - } - // compute the priorities on junction when needed - if (node->getType() != NODETYPE_RIGHT_BEFORE_LEFT) { - if (node->getRightOfWay() == RIGHT_OF_WAY_EDGEPRIORITY) { - for (NBEdge* e : node->getIncomingEdges()) { - e->setJunctionPriority(node, e->getPriority()); + for (const auto& node : nc) { + // preset all junction's edge priorities to zero + for (NBEdge* const edge : node.second->myAllEdges) { + edge->setJunctionPriority(node.second, NBEdge::MINOR_ROAD); + } + node.second->markBentPriority(false); + // check if the junction is not a real junction + if (node.second->myIncomingEdges.size() == 1 && node.second->myOutgoingEdges.size() == 1) { + continue; + } + // compute the priorities on junction when needed + if (node.second->getType() != NODETYPE_RIGHT_BEFORE_LEFT && node.second->getType() != NODETYPE_ALLWAY_STOP && node.second->getType() != NODETYPE_NOJUNCTION) { + if (node.second->getRightOfWay() == RIGHT_OF_WAY_EDGEPRIORITY) { + for (NBEdge* e : node.second->getIncomingEdges()) { + e->setJunctionPriority(node.second, e->getPriority()); + } + } else { + setPriorityJunctionPriorities(*node.second); } - } else { - setPriorityJunctionPriorities(*node); } } } @@ -426,6 +427,7 @@ markBestParallel(n, bestFirst, bestSecond); } + void NBEdgePriorityComputer::markBestParallel(const NBNode& n, NBEdge* bestFirst, NBEdge* bestSecond) { // edges running parallel to the main direction should also be prioritised diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms.h sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms.h --- sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms.h 2018-11-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -213,7 +213,7 @@ static void validateRailCrossings(NBNodeCont& nc, NBTrafficLightLogicCont& tlc); /// @brief whether the given node only has rail edges - static bool isRailwayNode(NBNode* n); + static bool isRailwayNode(const NBNode* n); }; @@ -231,11 +231,6 @@ */ static void computeEdgePriorities(NBNodeCont& nc); - /** @brief Computes edge priorities within a single node - * @param[in] node the single node - */ - static void computeEdgePrioritiesSingleNode(NBNode* node); - private: /** @brief Sets the priorites in case of a priority junction * @param[in] n The node to set edges' priorities diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Railway.cpp sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Railway.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Railway.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Railway.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "NBNetBuilder.h" #include "NBAlgorithms.h" #include "NBNodeCont.h" @@ -618,7 +618,7 @@ WRITE_MESSAGE("Reversed " + toString(numReversed) + " sequences (count by length: " + joinToString(seqLengths, " ", ":") + ")"); for (auto& item : nb.getPTStopCont().getStops()) { if (reversedIDs.count(item.second->getEdgeId())) { - item.second->findLaneAndComputeBusStopExtend(nb.getEdgeCont()); + item.second->findLaneAndComputeBusStopExtent(nb.getEdgeCont()); } } } @@ -863,7 +863,8 @@ std::set addBidiStops; std::set addBidiEdges; std::set > visited; - for (NBPTLine* line : nb.getPTLineCont().getLines()) { + for (const auto& item : nb.getPTLineCont().getLines()) { + NBPTLine* line = item.second; std::vector stops = line->getStops(); if (stops.size() < 2) { continue; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Railway.h sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Railway.h --- sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Railway.h 2018-09-24 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Railway.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.cpp sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -177,7 +177,7 @@ NBEdge* last = cont; NBEdge* curr = cont; std::set incremented; - if (addLanes && toAdd > 0 && find(incremented.begin(), incremented.end(), cont) == incremented.end()) { + if (addLanes && toAdd > 0 && std::find(incremented.begin(), incremented.end(), cont) == incremented.end()) { double currLength = 0; while (curr != nullptr && currLength + curr->getGeometry().length() - POSITION_EPS < rampLength) { if (find(incremented.begin(), incremented.end(), curr) == incremented.end()) { @@ -213,7 +213,7 @@ } } // check whether a further split is necessary - if (curr != nullptr && !dontSplit && currLength - POSITION_EPS < rampLength && curr->getNumLanes() == firstLaneNumber && find(incremented.begin(), incremented.end(), curr) == incremented.end()) { + if (curr != nullptr && !dontSplit && currLength - POSITION_EPS < rampLength && curr->getNumLanes() == firstLaneNumber && std::find(incremented.begin(), incremented.end(), curr) == incremented.end()) { // there is enough place to build a ramp; do it bool wasFirst = first == curr; NBNode* rn = new NBNode(curr->getID() + "-AddedOnRampNode", curr->getGeometry().positionAtOffset(rampLength - currLength)); @@ -282,7 +282,7 @@ NBEdge* last = prev; NBEdge* curr = prev; std::set incremented; - if (toAdd > 0 && find(incremented.begin(), incremented.end(), prev) == incremented.end()) { + if (toAdd > 0 && std::find(incremented.begin(), incremented.end(), prev) == incremented.end()) { double currLength = 0; while (curr != nullptr && currLength + curr->getGeometry().length() - POSITION_EPS < rampLength) { if (find(incremented.begin(), incremented.end(), curr) == incremented.end()) { @@ -318,7 +318,7 @@ } } // check whether a further split is necessary - if (curr != nullptr && !dontSplit && currLength - POSITION_EPS < rampLength && curr->getNumLanes() == firstLaneNumber && find(incremented.begin(), incremented.end(), curr) == incremented.end()) { + if (curr != nullptr && !dontSplit && currLength - POSITION_EPS < rampLength && curr->getNumLanes() == firstLaneNumber && std::find(incremented.begin(), incremented.end(), curr) == incremented.end()) { // there is enough place to build a ramp; do it bool wasFirst = first == curr; Position pos = curr->getGeometry().positionAtOffset(curr->getGeometry().length() - (rampLength - currLength)); diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.h sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.h --- sumo-1.1.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.h 2018-08-14 22:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBAlgorithms_Ramps.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBCapacity2Lanes.h sumo-1.2.0+dfsg1/src/netbuild/NBCapacity2Lanes.h --- sumo-1.1.0+dfsg1/src/netbuild/NBCapacity2Lanes.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBCapacity2Lanes.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBConnection.cpp sumo-1.2.0+dfsg1/src/netbuild/NBConnection.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBConnection.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBConnection.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBConnectionDefs.h sumo-1.2.0+dfsg1/src/netbuild/NBConnectionDefs.h --- sumo-1.1.0+dfsg1/src/netbuild/NBConnectionDefs.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBConnectionDefs.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBConnection.h sumo-1.2.0+dfsg1/src/netbuild/NBConnection.h --- sumo-1.1.0+dfsg1/src/netbuild/NBConnection.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBConnection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBCont.h sumo-1.2.0+dfsg1/src/netbuild/NBCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBCont.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBContHelper.cpp sumo-1.2.0+dfsg1/src/netbuild/NBContHelper.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBContHelper.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBContHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -120,7 +120,6 @@ } - /* ------------------------------------------------------------------------- * methods from edge_with_destination_finder * ----------------------------------------------------------------------- */ @@ -133,6 +132,7 @@ return e->getToNode() == myDestinationNode; } + /* ------------------------------------------------------------------------- * methods from relative_outgoing_edge_sorter * ----------------------------------------------------------------------- */ @@ -165,57 +165,6 @@ /* ------------------------------------------------------------------------- - * methods from straightness_sorter - * ----------------------------------------------------------------------- */ -int -NBContHelper::straightness_sorter::operator()(NBEdge* e1, NBEdge* e2) const { - if (e1 == nullptr || e2 == nullptr) { - return -1; - } - double relAngle1 = NBHelpers::normRelAngle( - myReferenceAngle, myRefIncoming ? e1->getShapeStartAngle() : e1->getShapeEndAngle()); - double relAngle2 = NBHelpers::normRelAngle( - myReferenceAngle, myRefIncoming ? e2->getShapeStartAngle() : e2->getShapeEndAngle()); - const int geomIndex = myRefIncoming ? 0 : -1; - - //std::cout << " e1=" << e1->getID() << " e2=" << e2->getID() << " refA=" << myReferenceAngle << " initially a1=" << relAngle1 << " a2=" << relAngle2 << "\n"; - const double e1Length = e1->getGeometry().length2D(); - const double e2Length = e2->getGeometry().length2D(); - const double maxLookAhead = MAX2(e1Length, e2Length); - double lookAhead = MIN2(maxLookAhead, 2 * NBEdge::ANGLE_LOOKAHEAD); - while (fabs(relAngle1 - relAngle2) < 3.0) { - // look at further geometry segments to resolve ambiguity - const double offset1 = myRefIncoming ? lookAhead : e1Length - lookAhead; - const double offset2 = myRefIncoming ? lookAhead : e2Length - lookAhead; - const Position referencePos1 = e1->getGeometry().positionAtOffset2D(offset1); - const Position referencePos2 = e2->getGeometry().positionAtOffset2D(offset2); - - relAngle1 = NBHelpers::normRelAngle(myReferenceAngle, GeomHelper::legacyDegree( - e1->getGeometry()[geomIndex].angleTo2D(referencePos1), true)); - relAngle2 = NBHelpers::normRelAngle(myReferenceAngle, GeomHelper::legacyDegree( - e2->getGeometry()[geomIndex].angleTo2D(referencePos2), true)); - - if (lookAhead > maxLookAhead) { - break; - } - lookAhead *= 2; - } - if (fabs(relAngle1 - relAngle2) < 3.0) { - // use angle to end of reference edge as tiebraker - relAngle1 = NBHelpers::normRelAngle(myReferenceAngle, GeomHelper::legacyDegree( - myReferencePos.angleTo2D(e1->getLaneShape(0)[geomIndex]), true)); - relAngle2 = NBHelpers::normRelAngle(myReferenceAngle, GeomHelper::legacyDegree( - myReferencePos.angleTo2D(e2->getLaneShape(0)[geomIndex]), true)); - //std::cout << " tiebraker refPos=" << myReferencePos << " abs1=" - // << GeomHelper::legacyDegree(myReferencePos.angleTo2D(e1->getLaneShape(0).front()), true) - // << " abs2=" << GeomHelper::legacyDegree(myReferencePos.angleTo2D(e2->getLaneShape(0).front()), true) << "\n"; - } - //std::cout << " e1=" << e1->getID() << " e2=" << e2->getID() << " a1=" << relAngle1 << " a2=" << relAngle2 << "\n"; - return fabs(relAngle1) < fabs(relAngle2); -} - - -/* ------------------------------------------------------------------------- * methods from relative_incoming_edge_sorter * ----------------------------------------------------------------------- */ int @@ -258,8 +207,6 @@ } - - double NBContHelper::getMaxSpeed(const EdgeVector& edges) { if (edges.size() == 0) { diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBContHelper.h sumo-1.2.0+dfsg1/src/netbuild/NBContHelper.h --- sumo-1.1.0+dfsg1/src/netbuild/NBContHelper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBContHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -90,36 +90,6 @@ /** - * straightness_sorter - * Class to sort edges according to how straight they are in relation to the - * reference edge at the given node - */ - class straightness_sorter { - public: - /// constructor - explicit straightness_sorter(const NBNode* n, const NBEdge* e): - myRefIncoming(e->getToNode() == n) { - if (myRefIncoming) { - myReferencePos = e->getLaneShape(0).back(); - myReferenceAngle = e->getShapeEndAngle(); - } else { - myReferencePos = e->getLaneShape(0).front(); - myReferenceAngle = e->getShapeStartAngle(); - } - } - - public: - /// comparing operation - int operator()(NBEdge* e1, NBEdge* e2) const; - - private: - bool myRefIncoming; - Position myReferencePos; - double myReferenceAngle; - }; - - - /** * relative_incoming_edge_sorter * Class to sort edges by their angle in relation to an outgoing edge. * This is normally done to sort edges incoming at the starting node of this edge @@ -243,22 +213,42 @@ * edge_similar_direction_sorter * Class to sort edges by their angle in relation to the given edge * The resulting list should have the edge in the most similar direction - * to the given edge as her first entry + * to the given edge as its first entry */ class edge_similar_direction_sorter { public: /// constructor explicit edge_similar_direction_sorter(const NBEdge* const e) - : myAngle(e->getTotalAngle()) {} + : myAngle(e->getShapeEndAngle()) {} /// comparing operation - int operator()(NBEdge* e1, NBEdge* e2) const { - double d1 = GeomHelper::getMinAngleDiff(e1->getTotalAngle(), myAngle); - double d2 = GeomHelper::getMinAngleDiff(e2->getTotalAngle(), myAngle); - return d1 < d2; + int operator()(const NBEdge* e1, const NBEdge* e2) const { + const double d1 = angleDiff(e1->getShapeStartAngle(), myAngle); + const double d2 = angleDiff(e2->getShapeStartAngle(), myAngle); + if (fabs(fabs(d1) - fabs(d2)) < NUMERICAL_EPS) { + if (fabs(d1 - d2) > NUMERICAL_EPS) { + return d1 < d2; + } else { + return e1->getNumericalID() < e2->getNumericalID(); + } + } + return fabs(d1) < fabs(d2); } private: + double angleDiff(const double angle1, const double angle2) const { + double d = angle2 - angle1; + while (d >= 180.) { + d -= 360.; + } + while (d < -180.) { + d += 360.; + } + return d; + } + + + private: /// the angle to find the edge with the opposite direction double myAngle; }; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBDistrictCont.cpp sumo-1.2.0+dfsg1/src/netbuild/NBDistrictCont.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBDistrictCont.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBDistrictCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,7 +39,7 @@ NBDistrictCont::~NBDistrictCont() { for (DistrictCont::iterator i = myDistricts.begin(); i != myDistricts.end(); i++) { - delete((*i).second); + delete ((*i).second); } myDistricts.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBDistrictCont.h sumo-1.2.0+dfsg1/src/netbuild/NBDistrictCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBDistrictCont.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBDistrictCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBDistrict.cpp sumo-1.2.0+dfsg1/src/netbuild/NBDistrict.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBDistrict.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBDistrict.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -68,7 +68,7 @@ bool NBDistrict::addSource(NBEdge* const source, double weight) { - EdgeVector::iterator i = find(mySources.begin(), mySources.end(), source); + EdgeVector::iterator i = std::find(mySources.begin(), mySources.end(), source); if (i != mySources.end()) { return false; } @@ -81,7 +81,7 @@ bool NBDistrict::addSink(NBEdge* const sink, double weight) { - EdgeVector::iterator i = find(mySinks.begin(), mySinks.end(), sink); + EdgeVector::iterator i = std::find(mySinks.begin(), mySinks.end(), sink); if (i != mySinks.end()) { return false; } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBDistrict.h sumo-1.2.0+dfsg1/src/netbuild/NBDistrict.h --- sumo-1.1.0+dfsg1/src/netbuild/NBDistrict.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBDistrict.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBEdgeCont.cpp sumo-1.2.0+dfsg1/src/netbuild/NBEdgeCont.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBEdgeCont.cpp 2018-12-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBEdgeCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -136,11 +136,11 @@ void NBEdgeCont::clear() { for (EdgeCont::iterator i = myEdges.begin(); i != myEdges.end(); i++) { - delete((*i).second); + delete ((*i).second); } myEdges.clear(); for (EdgeCont::iterator i = myExtractedEdges.begin(); i != myExtractedEdges.end(); i++) { - delete((*i).second); + delete ((*i).second); } myExtractedEdges.clear(); } @@ -597,14 +597,6 @@ // build the new edges' geometries std::pair geoms = edge->getGeometry().splitAt(pos); - if (geoms.first[-1] != node->getPosition()) { - geoms.first.pop_back(); - geoms.first.push_back(node->getPosition()); - } - - if (geoms.second[0] != node->getPosition()) { - geoms.second[0] = node->getPosition(); - } // build and insert the edges NBEdge* one = new NBEdge(firstEdgeName, edge->myFrom, node, edge, geoms.first, noLanesFirstEdge); NBEdge* two = new NBEdge(secondEdgeName, node, edge->myTo, edge, geoms.second, noLanesSecondEdge); @@ -818,9 +810,9 @@ void -NBEdgeCont::appendTurnarounds(bool noTLSControlled, bool onlyDeadends) { +NBEdgeCont::appendTurnarounds(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike) { for (EdgeCont::iterator i = myEdges.begin(); i != myEdges.end(); i++) { - (*i).second->appendTurnaround(noTLSControlled, onlyDeadends, true); + (*i).second->appendTurnaround(noTLSControlled, onlyDeadends, noGeometryLike, true); } } @@ -828,7 +820,7 @@ void NBEdgeCont::appendTurnarounds(const std::set& ids, bool noTLSControlled) { for (std::set::const_iterator it = ids.begin(); it != ids.end(); it++) { - myEdges[*it]->appendTurnaround(noTLSControlled, false, false); + myEdges[*it]->appendTurnaround(noTLSControlled, false, false, false); } } @@ -1018,25 +1010,44 @@ void NBEdgeCont::addPostProcessConnection(const std::string& from, int fromLane, const std::string& to, int toLane, bool mayDefinitelyPass, bool keepClear, double contPos, double visibility, double speed, - const PositionVector& customShape, bool warnOnly) { - myConnections.push_back(PostProcessConnection(from, fromLane, to, toLane, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape, warnOnly)); + const PositionVector& customShape, bool uncontrolled, bool warnOnly) { + myConnections[from].push_back(PostProcessConnection(from, fromLane, to, toLane, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape, uncontrolled, warnOnly)); } +bool +NBEdgeCont::hasPostProcessConnection(const std::string& from, const std::string& to) { + if (myConnections.count(from) == 0) { + return false; + } else { + if (to == "") { + // wildcard + return true; + } + for (const auto& ppc : myConnections[from]) { + if (ppc.to == to) { + return true; + } + } + return false; + } +} void NBEdgeCont::recheckPostProcessConnections() { const bool warnOnly = OptionsCont::getOptions().exists("ignore-errors.connections") && OptionsCont::getOptions().getBool("ignore-errors.connections"); - for (std::vector::const_iterator i = myConnections.begin(); i != myConnections.end(); ++i) { - NBEdge* from = retrievePossiblySplit((*i).from, true); - NBEdge* to = retrievePossiblySplit((*i).to, false); - if (from == nullptr || to == nullptr || - !from->addLane2LaneConnection((*i).fromLane, to, (*i).toLane, NBEdge::L2L_USER, true, (*i).mayDefinitelyPass, - (*i).keepClear, (*i).contPos, (*i).visibility, (*i).speed, (*i).customShape)) { - const std::string msg = "Could not insert connection between '" + (*i).from + "' and '" + (*i).to + "' after build."; - if (warnOnly || (*i).warnOnly) { - WRITE_WARNING(msg); - } else { - WRITE_ERROR(msg); + for (const auto& item : myConnections) { + for (std::vector::const_iterator i = item.second.begin(); i != item.second.end(); ++i) { + NBEdge* from = retrievePossiblySplit((*i).from, true); + NBEdge* to = retrievePossiblySplit((*i).to, false); + if (from == nullptr || to == nullptr || + !from->addLane2LaneConnection((*i).fromLane, to, (*i).toLane, NBEdge::L2L_USER, true, (*i).mayDefinitelyPass, + (*i).keepClear, (*i).contPos, (*i).visibility, (*i).speed, (*i).customShape, (*i).uncontrolled)) { + const std::string msg = "Could not insert connection between '" + (*i).from + "' and '" + (*i).to + "' after build."; + if (warnOnly || (*i).warnOnly) { + WRITE_WARNING(msg); + } else { + WRITE_ERROR(msg); + } } } } @@ -1137,6 +1148,10 @@ do { visited.insert(e); const EdgeVector& edges = e->getToNode()->getEdges(); + if (e->getToNode()->getType() == NODETYPE_RIGHT_BEFORE_LEFT && !e->getToNode()->typeWasGuessed()) { + doLoop = false; + break; + } if (edges.size() < 2) { doLoop = false; break; @@ -1146,7 +1161,7 @@ doLoop = false; break; } - EdgeVector::const_iterator me = find(edges.begin(), edges.end(), e); + EdgeVector::const_iterator me = std::find(edges.begin(), edges.end(), e); NBContHelper::nextCW(edges, me); NBEdge* left = *me; double angle = fabs(NBHelpers::relAngle(e->getAngleAtNode(e->getToNode()), left->getAngleAtNode(e->getToNode()))); @@ -1155,7 +1170,7 @@ doLoop = false; break; } - EdgeVector::const_iterator loopClosed = find(loopEdges.begin(), loopEdges.end(), left); + EdgeVector::const_iterator loopClosed = std::find(loopEdges.begin(), loopEdges.end(), left); const int loopSize = (int)(loopEdges.end() - loopClosed); if (loopSize > 0) { // loop found @@ -1227,6 +1242,18 @@ } } +void +NBEdgeCont::removeRoundabout(const NBNode* node) { + for (auto it = myRoundabouts.begin(); it != myRoundabouts.end(); ++it) { + for (NBEdge* e : *it) { + if (e->getToNode() == node) { + myRoundabouts.erase(it); + return; + } + } + } +} + void NBEdgeCont::markRoundabouts() { @@ -1245,7 +1272,9 @@ if ((inEdge)->getStep() >= NBEdge::LANES2LANES_USER) { continue; } - inEdge->removeFromConnections(inEdge->getTurnDestination(), -1); + if (inEdge->getTurnDestination() != nullptr) { + inEdge->removeFromConnections(inEdge->getTurnDestination(), -1); + } } // let the connections to succeeding roundabout edge have a higher priority (*j)->setJunctionPriority(node, NBEdge::ROUNDABOUT); diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBEdgeCont.h sumo-1.2.0+dfsg1/src/netbuild/NBEdgeCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBEdgeCont.h 2018-12-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBEdgeCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -417,7 +417,7 @@ * @todo Recheck whether a visitor-pattern should be used herefor * @see NBEdge::appendTurnaround */ - void appendTurnarounds(bool noTLSControlled, bool onlyDeadends); + void appendTurnarounds(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike); /** @brief Appends turnarounds to all edges stored in the container @@ -441,7 +441,7 @@ * @todo Recheck usage * @see NBEdge::computeEdgeShape */ - void computeEdgeShapes(double smoothElevationThreshold=-1); + void computeEdgeShapes(double smoothElevationThreshold = -1); /** @brief Computes the shapes of all lanes of all edges stored in the container @@ -540,7 +540,10 @@ void addPostProcessConnection(const std::string& from, int fromLane, const std::string& to, int toLane, bool mayDefinitelyPass, bool keepClear, double contPos, double visibility, double speed, const PositionVector& customShape, - bool warnOnly = false); + bool uncontrolled, + bool warnOnly); + + bool hasPostProcessConnection(const std::string& from, const std::string& to = ""); /** @brief Try to set any stored connections @@ -563,6 +566,9 @@ /// @brief add user specified roundabout void addRoundabout(const EdgeSet& roundabout); + /// @brief remove roundabout that contains the given node + void removeRoundabout(const NBNode* node); + /// @brief mark edge priorities and prohibit turn-arounds for all roundabout edges void markRoundabouts(); @@ -616,11 +622,13 @@ PostProcessConnection(const std::string& from_, int fromLane_, const std::string& to_, int toLane_, bool mayDefinitelyPass_, bool keepClear_, double contPos_, double visibility_, double speed_, const PositionVector& customShape_, - bool warnOnly_ = false) : + bool uncontrolled_, + bool warnOnly_) : from(from_), fromLane(fromLane_), to(to_), toLane(toLane_), mayDefinitelyPass(mayDefinitelyPass_), keepClear(keepClear_), contPos(contPos_), visibility(visibility_), speed(speed_), customShape(customShape_), + uncontrolled(uncontrolled_), warnOnly(warnOnly_) { } /// @brief The id of the edge the connection starts at @@ -643,12 +651,14 @@ double speed; /// @brief custom shape for connection PositionVector customShape; + /// @brief whether this connection shall not be controlled by a traffic light + bool uncontrolled; /// @brief whether a failure to set this connection is a warning or an error bool warnOnly; }; /// @brief The list of connections to recheck - std::vector myConnections; + std::map > myConnections; /// @brief The type of the dictionary where an edge may be found by its id diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBEdge.cpp sumo-1.2.0+dfsg1/src/netbuild/NBEdge.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBEdge.cpp 2018-12-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,32 +29,32 @@ #include #include #include -#include "NBEdgeCont.h" -#include "NBNode.h" -#include "NBNodeCont.h" -#include "NBContHelper.h" -#include "NBHelpers.h" -#include "NBTrafficLightDefinition.h" #include #include -#include "NBTypeCont.h" -#include #include #include -#include #include #include #include -#include "NBEdge.h" +#include #include -#include +#include "NBEdgeCont.h" +#include "NBNode.h" +#include "NBNodeCont.h" +#include "NBContHelper.h" +#include "NBHelpers.h" +#include "NBTrafficLightDefinition.h" +#include "NBTypeCont.h" +#include "NBEdge.h" +//#define ADDITIONAL_WARNINGS //#define DEBUG_CONNECTION_GUESSING //#define DEBUG_ANGLES //#define DEBUG_NODE_BORDER -//#define DEBUGCOND (getID() == "disabled") +//#define DEBUG_REPLACECONNECTION +#define DEBUGCOND (getID() == "71746014#2") //#define DEBUGCOND (getID() == "22762377#1" || getID() == "146511467") -//#define DEBUGCOND2(obj) ((obj != 0 && (obj)->getID() == "disabled")) +#define DEBUGCOND2(obj) ((obj != 0 && (obj)->getID() == "71746014#2")) // =========================================================================== // static members @@ -161,7 +161,7 @@ // check whether the current lane was already used to connect the currently // regarded approached edge - std::vector::iterator j = find(lanes.begin(), lanes.end(), lane); + std::vector::iterator j = std::find(lanes.begin(), lanes.end(), lane); if (j == lanes.end()) { // if not, add it to the list lanes.push_back(lane); @@ -175,17 +175,31 @@ /* ------------------------------------------------------------------------- * NBEdge::MainDirections-methods * ----------------------------------------------------------------------- */ -NBEdge::MainDirections::MainDirections(const EdgeVector& outgoing, - NBEdge* parent, NBNode* to, int indexOfStraightest) { - if (outgoing.size() == 0) { +NBEdge::MainDirections::MainDirections(const EdgeVector& outgoing, NBEdge* parent, NBNode* to, const std::vector& availableLanes) : myStraightest(-1) { + NBContHelper::edge_similar_direction_sorter sorter(parent); + const NBEdge* straight = nullptr; + for (const NBEdge* const out : outgoing) { + const int outPerms = out->getPermissions(); + for (const int l : availableLanes) { + if ((parent->myLanes[l].permissions & outPerms) != 0) { + if (straight == nullptr || sorter(out, straight)) { + straight = out; + } + break; + } + } + } + if (straight == nullptr) { return; } + myStraightest = (int)std::distance(outgoing.begin(), std::find(outgoing.begin(), outgoing.end(), straight)); + // check whether the right turn has a higher priority assert(outgoing.size() > 0); - const LinkDirection straightestDir = to->getDirection(parent, outgoing[indexOfStraightest]); + const LinkDirection straightestDir = to->getDirection(parent, straight); #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND2(parent)) { - std::cout << " MainDirections edge=" << parent->getID() << " straightest=" << outgoing[indexOfStraightest]->getID() << " dir=" << toString(straightestDir) << "\n"; + std::cout << " MainDirections edge=" << parent->getID() << " straightest=" << straight->getID() << " dir=" << toString(straightestDir) << "\n"; } #endif if (NBNode::isTrafficLight(to->getType()) && @@ -201,23 +215,17 @@ // ok, the left turn belongs to the higher priorised edges on the junction // let's check, whether it has also a higher priority (lane number/speed) // than the current - EdgeVector tmp(outgoing); - sort(tmp.begin(), tmp.end(), NBContHelper::edge_similar_direction_sorter(parent)); - if (outgoing.back()->getPriority() > tmp[0]->getPriority()) { + if (outgoing.back()->getPriority() > straight->getPriority()) { myDirs.push_back(MainDirections::DIR_LEFTMOST); } else { - if (outgoing.back()->getNumLanes() > tmp[0]->getNumLanes()) { + if (outgoing.back()->getNumLanes() > straight->getNumLanes()) { myDirs.push_back(MainDirections::DIR_LEFTMOST); } } } // check whether the forward direction has a higher priority - // try to get the forward direction - EdgeVector tmp(outgoing); - sort(tmp.begin(), tmp.end(), NBContHelper::edge_similar_direction_sorter(parent)); - NBEdge* edge = *(tmp.begin()); // check whether it has a higher priority and is going straight - if (edge->getJunctionPriority(to) == 1 && to->getDirection(parent, edge) == LINKDIR_STRAIGHT) { + if (straight->getJunctionPriority(to) == 1 && to->getDirection(parent, straight) == LINKDIR_STRAIGHT) { myDirs.push_back(MainDirections::DIR_FORWARD); } } @@ -234,7 +242,7 @@ bool NBEdge::MainDirections::includes(Direction d) const { - return find(myDirs.begin(), myDirs.end(), d) != myDirs.end(); + return std::find(myDirs.begin(), myDirs.end(), d) != myDirs.end(); } @@ -274,6 +282,7 @@ myAmInnerEdge(false), myAmMacroscopicConnector(false), myStreetName(streetName), mySignalOffset(UNSPECIFIED_SIGNAL_OFFSET), + mySignalNode(nullptr), myIndex(-1) { init(nolanes, false, ""); } @@ -302,6 +311,7 @@ myAmInnerEdge(false), myAmMacroscopicConnector(false), myStreetName(streetName), mySignalOffset(UNSPECIFIED_SIGNAL_OFFSET), + mySignalNode(nullptr), myIndex(-1) { init(nolanes, tryIgnoreNodePositions, origID); } @@ -326,7 +336,8 @@ myAmInnerEdge(false), myAmMacroscopicConnector(false), myStreetName(tpl->getStreetName()), - mySignalOffset(to == tpl->myTo ? tpl->mySignalOffset : UNSPECIFIED_SIGNAL_OFFSET) { + mySignalOffset(to == tpl->myTo ? tpl->mySignalOffset : UNSPECIFIED_SIGNAL_OFFSET), + mySignalNode(to == tpl->myTo ? tpl->mySignalNode : nullptr) { init(numLanes > 0 ? numLanes : tpl->getNumLanes(), myGeom.size() > 0, ""); for (int i = 0; i < getNumLanes(); i++) { const int tplIndex = MIN2(i, tpl->getNumLanes() - 1); @@ -343,8 +354,7 @@ NBEdge::NBEdge() : - Named("DUMMY") -{ + Named("DUMMY") { } void @@ -485,8 +495,6 @@ std::cout << "init edge=" << getID() << "\n"; for (std::vector::iterator i = myConnections.begin(); i != myConnections.end(); ++i) { std::cout << " conn " << getID() << "_" << (*i).fromLane << " to " << Named::getIDSecure((*i).toEdge) << "_" << (*i).toLane << "\n"; - (*i).shape.mirrorX(); - (*i).viaShape.mirrorX(); } } #endif @@ -539,8 +547,8 @@ bool NBEdge::hasDefaultGeometryEndpoints() const { - return myGeom.front() == myFrom->getPosition() && - myGeom.back() == myTo->getPosition(); + return myGeom.front().almostSame(myFrom->getPosition(), 0.01) && + myGeom.back().almostSame(myTo->getPosition(), 0.01); } @@ -1069,7 +1077,7 @@ } if ((int)myLanes.size() <= lane || destEdge->getNumLanes() <= (int)destLane) { // problem might be corrigible in post-processing - WRITE_WARNING("Could not set connection from '" + getLaneIDInsecure(lane) + "' to '" + destEdge->getLaneIDInsecure(destLane) + "'."); + WRITE_WARNING("Could not set connection from '" + getLaneID(lane) + "' to '" + destEdge->getLaneID(destLane) + "'."); return false; } for (std::vector::iterator i = myConnections.begin(); i != myConnections.end();) { @@ -1107,18 +1115,14 @@ } -void -NBEdge::insertConnection(NBEdge::Connection connection) { - myConnections.push_back(connection); -} - - std::vector -NBEdge::getConnectionsFromLane(int lane) const { +NBEdge::getConnectionsFromLane(int lane, NBEdge* to, int toLane) const { std::vector ret; - for (std::vector::const_iterator i = myConnections.begin(); i != myConnections.end(); ++i) { - if ((*i).fromLane == lane) { - ret.push_back(*i); + for (const Connection& c : myConnections) { + if ((lane < 0 || c.fromLane == lane) + && (to == nullptr || to == c.toEdge) + && (toLane < 0 || toLane == c.toLane)) { + ret.push_back(c); } } return ret; @@ -1189,7 +1193,7 @@ 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); + EdgeVector::iterator forbidden = std::find(outgoing.begin(), outgoing.end(), it->toEdge); if (forbidden != outgoing.end()) { outgoing.erase(forbidden); } @@ -1236,12 +1240,12 @@ std::vector -NBEdge::getConnectionLanes(NBEdge* currentOutgoing) const { +NBEdge::getConnectionLanes(NBEdge* currentOutgoing, bool withBikes) const { std::vector ret; if (currentOutgoing != myTurnDestination) { - for (std::vector::const_iterator i = myConnections.begin(); i != myConnections.end(); ++i) { - if ((*i).toEdge == currentOutgoing) { - ret.push_back((*i).fromLane); + for (const Connection& c : myConnections) { + if (c.toEdge == currentOutgoing && (withBikes || getPermissions(c.fromLane) != SVC_BICYCLE)) { + ret.push_back(c.fromLane); } } } @@ -1278,7 +1282,8 @@ void -NBEdge::removeFromConnections(NBEdge* toEdge, int fromLane, int toLane, bool tryLater, const bool adaptToLaneRemoval) { +NBEdge::removeFromConnections(NBEdge* toEdge, int fromLane, int toLane, bool tryLater, const bool adaptToLaneRemoval, + const bool keepPossibleTurns) { // remove from "myConnections" const int fromLaneRemoved = adaptToLaneRemoval && fromLane >= 0 ? fromLane : -1; const int toLaneRemoved = adaptToLaneRemoval && toLane >= 0 ? toLane : -1; @@ -1320,7 +1325,7 @@ if (myTurnDestination == toEdge && fromLane < 0) { myTurnDestination = nullptr; } - if (myPossibleTurnDestination == toEdge && fromLane < 0) { + if (myPossibleTurnDestination == toEdge && fromLane < 0 && !keepPossibleTurns) { myPossibleTurnDestination = nullptr; } if (tryLater) { @@ -1399,8 +1404,17 @@ } // add new connections std::vector conns = origConns; + EdgeVector origTargets = getSuccessors(); for (std::vector::iterator i = conns.begin(); i != conns.end(); ++i) { - if ((*i).toEdge == which || (*i).toEdge == this) { + if ((*i).toEdge == which || (*i).toEdge == this + // if we already have connections to the target edge, do not add new ones as they are probably from a circular replacement + || std::find(origTargets.begin(), origTargets.end(), (*i).toEdge) != origTargets.end()) { +#ifdef DEBUG_REPLACECONNECTION + if (DEBUGCOND) { + std::cout << " replaceInConnections edge=" << getID() << " which=" << which->getID() + << " origTargets=" << toString(origTargets) << " newTarget=" << i->toEdge->getID() << " skipped\n"; + } +#endif continue; } if (which->getStep() == EDGE2EDGES) { @@ -1413,9 +1427,21 @@ if (laneMap.find(fromLane) == laneMap.end()) { if (fromLane >= 0 && fromLane <= minLane) { toUse = minLane; + // patch laneMap to avoid crossed-over connections + for (auto& item : laneMap) { + if (item.first < fromLane) { + item.second = MIN2(item.second, minLane); + } + } } if (fromLane >= 0 && fromLane >= maxLane) { toUse = maxLane; + // patch laneMap to avoid crossed-over connections + for (auto& item : laneMap) { + if (item.first > fromLane) { + item.second = MAX2(item.second, maxLane); + } + } } } else { toUse = laneMap[fromLane]; @@ -1423,6 +1449,13 @@ if (toUse == -1) { toUse = 0; } +#ifdef DEBUG_REPLACECONNECTION + if (DEBUGCOND) { + std::cout << " replaceInConnections edge=" << getID() << " which=" << which->getID() << " origTargets=" << toString(origTargets) + << " origFrom=" << fromLane << " laneMap=" << joinToString(laneMap, ":", ",") << " minLane=" << minLane << " maxLane=" << maxLane + << " newTarget=" << i->toEdge->getID() << " fromLane=" << toUse << " toLane=" << i->toLane << "\n"; + } +#endif setConnection(toUse, i->toEdge, i->toLane, L2L_COMPUTED, false, i->mayDefinitelyPass, i->keepClear, i->contPos, i->visibility, i->speed, i->customShape, i->uncontrolled); } @@ -1544,13 +1577,25 @@ } const bool foes = n.foes(this, con.toEdge, *i2, (*k2).toEdge); bool needsCont = n.needsCont(this, *i2, con, *k2); - const bool oppositeLeftIntersect = !foes && bothLeftIntersect(n, shape, dir, *i2, *k2, numPoints, width2); + bool oppositeLeftIntersect = !foes && bothLeftIntersect(n, shape, dir, *i2, *k2, numPoints, width2); + int shapeFlag = 0; + // do not warn if only bicycles pedestrians or delivery vehicles are involved as this is a typical occurence + SVCPermissions warn = SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_DELIVERY); + if (oppositeLeftIntersect + && (((*i2)->getPermissions((*k2).fromLane) & warn) != 0 + && ((*k2).toEdge->getPermissions((*k2).toLane) & warn) != 0)) { + // recompute with different curve parameters (unless + // the other connection is "unimportant" + shapeFlag = NBNode::AVOID_INTERSECTING_LEFT_TURNS; + shape = n.computeInternalLaneShape(this, con, numPoints, myTo, shapeFlag); + oppositeLeftIntersect = bothLeftIntersect(n, shape, dir, *i2, *k2, numPoints, width2, shapeFlag); + } const bool bothPrio = getJunctionPriority(&n) > 0 && (*i2)->getJunctionPriority(&n) > 0; //std::cout << "n=" << n.getID() << " e1=" << getID() << " prio=" << getJunctionPriority(&n) << " e2=" << (*i2)->getID() << " prio2=" << (*i2)->getJunctionPriority(&n) << " both=" << bothPrio << " bothLeftIntersect=" << bothLeftIntersect(n, shape, dir, *i2, *k2, numPoints, width2) << " needsCont=" << needsCont << "\n"; // compute the crossing point if (needsCont || (bothPrio && oppositeLeftIntersect)) { crossingPositions.second.push_back(index); - const PositionVector otherShape = n.computeInternalLaneShape(*i2, *k2, numPoints); + const PositionVector otherShape = n.computeInternalLaneShape(*i2, *k2, numPoints, 0, shapeFlag); const double minDV = firstIntersection(shape, otherShape, width2); if (minDV < shape.length() - POSITION_EPS && minDV > POSITION_EPS) { // !!!? assert(minDV >= 0); @@ -1566,8 +1611,6 @@ foeInternalLinks.push_back(index); } // only warn once per pair of intersecting turns - // do not warn if only bicycles pedestrians or delivery vehicles are involved as this is a typical occurence - SVCPermissions warn = SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_DELIVERY); if (oppositeLeftIntersect && getID() > (*i2)->getID() && (getPermissions(con.fromLane) & warn) != 0 && (con.toEdge->getPermissions(con.toLane) & warn) != 0 @@ -1601,7 +1644,7 @@ if (this == edge || con.toEdge == edge) { foeInternalLinks.push_back(index); if (con.toEdge == edge && - ((isRightTurn && getJunctionPriority(&n) > 0) || (isTurn && n.isTLControlled()))) { + ((isRightTurn && getJunctionPriority(&n) > 0) || (isTurn && con.tlID != ""))) { // build internal junctions (not for left turns at uncontrolled intersections) PositionVector crossingShape = crossing.shape; crossingShape.extrapolate(5.0); // sometimes shapes miss each other by a small margin @@ -1694,7 +1737,7 @@ assert(shape.size() >= 2); // get internal splits if any con.id = innerID + "_" + toString(edgeIndex); - if (crossingPositions.first >= 0) { + if (crossingPositions.first >= 0 && crossingPositions.first < shape.length()) { std::pair split = shape.splitAt(crossingPositions.first); con.shape = split.first; con.foeIncomingLanes = std::vector(tmpFoeIncomingLanes.begin(), tmpFoeIncomingLanes.end()); @@ -1755,7 +1798,7 @@ bool -NBEdge::bothLeftIntersect(const NBNode& n, const PositionVector& shape, LinkDirection dir, NBEdge* otherFrom, const NBEdge::Connection& otherCon, int numPoints, double width2) const { +NBEdge::bothLeftIntersect(const NBNode& n, const PositionVector& shape, LinkDirection dir, NBEdge* otherFrom, const NBEdge::Connection& otherCon, int numPoints, double width2, int shapeFlag) const { if (otherFrom == this) { // not an opposite pair return false; @@ -1763,7 +1806,7 @@ LinkDirection dir2 = n.getDirection(otherFrom, otherCon.toEdge); const bool bothLeft = (dir == LINKDIR_LEFT || dir == LINKDIR_PARTLEFT) && (dir2 == LINKDIR_LEFT || dir2 == LINKDIR_PARTLEFT); if (bothLeft) { - const PositionVector otherShape = n.computeInternalLaneShape(otherFrom, otherCon, numPoints); + const PositionVector otherShape = n.computeInternalLaneShape(otherFrom, otherCon, numPoints, 0, shapeFlag); const double minDV = firstIntersection(shape, otherShape, width2); if (minDV < shape.length() - POSITION_EPS && minDV > POSITION_EPS) { return true; @@ -2084,6 +2127,14 @@ bool NBEdge::computeEdge2Edges(bool noLeftMovers) { +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "computeEdge2Edges edge=" << getID() << " step=" << myStep << "\n"; + for (std::vector::iterator i = myConnections.begin(); i != myConnections.end(); ++i) { + std::cout << " conn " << getID() << "_" << (*i).fromLane << " to " << Named::getIDSecure((*i).toEdge) << "_" << (*i).toLane << "\n"; + } + } +#endif // return if this relationship has been build in previous steps or // during the import if (myStep >= EDGE2EDGES) { @@ -2109,6 +2160,14 @@ bool NBEdge::computeLanes2Edges() { +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "computeLanes2Edges edge=" << getID() << " step=" << myStep << "\n"; + for (std::vector::iterator i = myConnections.begin(); i != myConnections.end(); ++i) { + std::cout << " conn " << getID() << "_" << (*i).fromLane << " to " << Named::getIDSecure((*i).toEdge) << "_" << (*i).toLane << "\n"; + } + } +#endif // return if this relationship has been build in previous steps or // during the import if (myStep >= LANES2EDGES) { @@ -2138,8 +2197,6 @@ std::cout << "recheckLanes (initial) edge=" << getID() << "\n"; for (std::vector::iterator i = myConnections.begin(); i != myConnections.end(); ++i) { std::cout << " conn " << getID() << "_" << (*i).fromLane << " to " << Named::getIDSecure((*i).toEdge) << "_" << (*i).toLane << "\n"; - (*i).shape.mirrorX(); - (*i).viaShape.mirrorX(); } } #endif @@ -2221,7 +2278,7 @@ } // check delayed removals for (std::vector::iterator it = myConnectionsToDelete.begin(); it != myConnectionsToDelete.end(); ++it) { - removeFromConnections(it->toEdge, it->fromLane, it->toLane); + removeFromConnections(it->toEdge, it->fromLane, it->toLane, false, false, true); } // check involuntary dead end at "real" junctions if (getPermissions() != SVC_PEDESTRIAN) { @@ -2246,13 +2303,31 @@ } } } + // check for connections with bad access permissions +#ifdef ADDITIONAL_WARNINGS + for (const Connection& c : myConnections) { + SVCPermissions fromP = getPermissions(c.fromLane); + SVCPermissions toP = c.toEdge->getPermissions(c.toLane); + if ((fromP & SVC_PASSENGER) != 0 + && toP == SVC_BICYCLE) { + bool hasAlternative = false; + for (const Connection& c2 : myConnections) { + if (c.fromLane == c2.fromLane && c.toEdge == c2.toEdge + && (c.toEdge->getPermissions(c2.toLane) & SVC_PASSENGER) != 0) { + hasAlternative = true; + } + } + if (!hasAlternative) { + WRITE_WARNING("Road lane ends on bikeLane for connection " + c.getDescription(this)); + } + } + } +#endif #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { std::cout << "recheckLanes (final) edge=" << getID() << "\n"; for (std::vector::iterator i = myConnections.begin(); i != myConnections.end(); ++i) { std::cout << " conn " << getID() << "_" << (*i).fromLane << " to " << Named::getIDSecure((*i).toEdge) << "_" << (*i).toLane << "\n"; - (*i).shape.mirrorX(); - (*i).viaShape.mirrorX(); } } #endif @@ -2267,16 +2342,10 @@ myConnections.clear(); return; } - // precompute edge priorities; needed as some kind of assumptions for - // priorities of directions (see preparePriorities) - std::vector* priorities = prepareEdgePriorities(outgoing); - // compute the indices of lanes that should have connections (excluding - // forbidden lanes and pedestrian lanes that will be connected via walkingAreas) - #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { - std::cout << " divideOnEdges " << getID() << " outgoing=" << toString(*outgoing) << " prios=" << toString(*priorities) << "\n"; + std::cout << " divideOnEdges " << getID() << " outgoing=" << toString(*outgoing) << "\n"; } #endif @@ -2288,7 +2357,7 @@ } } if (availableLanes.size() > 0) { - divideSelectedLanesOnEdges(outgoing, availableLanes, priorities); + divideSelectedLanesOnEdges(outgoing, availableLanes); } // build connections for miscellaneous further modes (more than bike,peds,bus and without passenger) availableLanes.clear(); @@ -2300,7 +2369,7 @@ availableLanes.push_back(i); } if (availableLanes.size() > 0) { - divideSelectedLanesOnEdges(outgoing, availableLanes, priorities); + divideSelectedLanesOnEdges(outgoing, availableLanes); } // build connections for busses (possibly combined with bicycles) availableLanes.clear(); @@ -2312,7 +2381,7 @@ availableLanes.push_back(i); } if (availableLanes.size() > 0) { - divideSelectedLanesOnEdges(outgoing, availableLanes, priorities); + divideSelectedLanesOnEdges(outgoing, availableLanes); } // build connections for bicycles (possibly combined with pedestrians) availableLanes.clear(); @@ -2324,7 +2393,7 @@ availableLanes.push_back(i); } if (availableLanes.size() > 0) { - divideSelectedLanesOnEdges(outgoing, availableLanes, priorities); + divideSelectedLanesOnEdges(outgoing, availableLanes); } // clean up unassigned fromLanes for (std::vector::iterator i = myConnections.begin(); i != myConnections.end();) { @@ -2335,36 +2404,29 @@ } } sortOutgoingConnectionsByIndex(); - - delete priorities; } void -NBEdge::divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector& availableLanes, const std::vector* priorities) { - //std::cout << "divideSelectedLanesOnEdges " << getID() << " out=" << toString(*outgoing) << " prios=" << toString(*priorities) << " avail=" << toString(availableLanes) << "\n"; - // compute the sum of priorities (needed for normalisation) - int prioSum = computePrioritySum(*priorities); - // compute the resulting number of lanes that should be used to - // reach the following edge - const int numOutgoing = (int) outgoing->size(); - std::vector resultingLanes; - resultingLanes.reserve(numOutgoing); - double sumResulting = 0.; // the sum of resulting lanes - double minResulting = 10000.; // the least number of lanes to reach an edge +NBEdge::divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector& availableLanes) { + const std::vector& priorities = prepareEdgePriorities(outgoing, availableLanes); + if (priorities.empty()) { + return; + } +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "divideSelectedLanesOnEdges " << getID() << " out=" << toString(*outgoing) << " prios=" << toString(priorities) << " avail=" << toString(availableLanes) << "\n"; + } +#endif + // compute the resulting number of lanes that should be used to reach the following edge + const int numOutgoing = (int)outgoing->size(); + std::vector resultingLanesFactor; + resultingLanesFactor.reserve(numOutgoing); + int minResulting = std::numeric_limits::max(); for (int i = 0; i < numOutgoing; i++) { - // res will be the number of lanes which are meant to reach the - // current outgoing edge - double res = - (double)(*priorities)[i] * - (double) availableLanes.size() / (double) prioSum; - // do not let this number be greater than the number of available lanes - if (res > availableLanes.size()) { - res = (double) availableLanes.size(); - } - // add it to the list - resultingLanes.push_back(res); - sumResulting += res; + // res / minResulting will be the number of lanes which are meant to reach the current outgoing edge + const int res = priorities[i] * (int)availableLanes.size(); + resultingLanesFactor.push_back(res); if (minResulting > res && res > 0) { // prevent minResulting from becoming 0 minResulting = res; @@ -2379,18 +2441,17 @@ EdgeVector transition; transition.reserve(numOutgoing); for (int i = 0; i < numOutgoing; i++) { - // tmpNo will be the number of connections from this edge - // to the next edge - assert(i < (int)resultingLanes.size()); - const int tmpNum = (int)std::ceil(resultingLanes[i] / minResulting); + // tmpNum will be the number of connections from this edge to the next edge + assert(i < (int)resultingLanesFactor.size()); + const int tmpNum = (resultingLanesFactor[i] + minResulting - 1) / minResulting; // integer division rounding up numVirtual += tmpNum; - for (double j = 0; j < tmpNum; j++) { + for (int j = 0; j < tmpNum; j++) { transition.push_back((*outgoing)[i]); } } #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { - std::cout << " prioSum=" << prioSum << " sumResulting=" << sumResulting << " minResulting=" << minResulting << " numVirtual=" << numVirtual << " availLanes=" << toString(availableLanes) << " resLanes=" << toString(resultingLanes) << " transition=" << toString(transition) << "\n"; + std::cout << " minResulting=" << minResulting << " numVirtual=" << numVirtual << " availLanes=" << toString(availableLanes) << " resLanes=" << toString(resultingLanesFactor) << " transition=" << toString(transition) << "\n"; } #endif @@ -2399,12 +2460,10 @@ ToEdgeConnectionsAdder adder(transition); Bresenham::compute(&adder, static_cast(availableLanes.size()), numVirtual); const std::map >& l2eConns = adder.getBuiltConnections(); - for (EdgeVector::const_iterator i = outgoing->begin(); i != outgoing->end(); ++i) { - NBEdge* target = (*i); + for (NBEdge* const target : *outgoing) { assert(l2eConns.find(target) != l2eConns.end()); - const std::vector lanes = (l2eConns.find(target))->second; - for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { - const int fromIndex = availableLanes[*j]; + for (const int j : l2eConns.find(target)->second) { + const int fromIndex = availableLanes[j]; if ((getPermissions(fromIndex) & target->getPermissions()) == 0) { // exclude connection if fromLane and toEdge have no common permissions continue; @@ -2419,7 +2478,7 @@ // @todo To decide which target lanes are still available we need to do a // preliminary lane-to-lane assignment in regard to permissions (rather than to ordering) const int numConsToTarget = (int)count_if(myConnections.begin(), myConnections.end(), connections_toedge_finder(target, true)); - int targetLanes = (int)target->getNumLanes(); + int targetLanes = target->getNumLanes(); if (target->getPermissions(0) == SVC_PEDESTRIAN) { --targetLanes; } @@ -2428,9 +2487,9 @@ // the speed limit is taken from rural roads (which allow cycles) // (pending implementation of #1859) if (getPermissions(fromIndex) == SVC_BICYCLE && getSpeed() <= (101 / 3.6)) { - for (int ii = 0; ii < (int)myLanes.size(); ++ii) { - if (myLanes[ii].permissions != SVC_PEDESTRIAN) { - myLanes[ii].permissions |= SVC_BICYCLE; + for (NBEdge::Lane& lane : myLanes) { + if (lane.permissions != SVC_PEDESTRIAN) { + lane.permissions |= SVC_BICYCLE; } } } @@ -2439,6 +2498,15 @@ if (myLanes[fromIndex].connectionsDone) { // we already have complete information about connections from // this lane. do not add anything else +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << " connectionsDone from " << getID() << "_" << fromIndex << ": "; + for (const Connection& c : getConnectionsFromLane(fromIndex)) { + std::cout << c.getDescription(this) << ", "; + } + std::cout << "\n"; + } +#endif continue; } myConnections.push_back(Connection(fromIndex, target, -1)); @@ -2455,18 +2523,18 @@ void -NBEdge::addStraightConnections(const EdgeVector* outgoing, const std::vector& availableLanes, const std::vector* priorities) { - // ensure sufficient straight connections for the (hightest-priority straight target) +NBEdge::addStraightConnections(const EdgeVector* outgoing, const std::vector& availableLanes, const std::vector& priorities) { + // ensure sufficient straight connections for the (highest-priority) straight target const int numOutgoing = (int) outgoing->size(); NBEdge* target = nullptr; NBEdge* rightOfTarget = nullptr; NBEdge* leftOfTarget = nullptr; int maxPrio = 0; for (int i = 0; i < numOutgoing; i++) { - if (maxPrio < (*priorities)[i]) { + if (maxPrio < priorities[i]) { const LinkDirection dir = myTo->getDirection(this, (*outgoing)[i]); if (dir == LINKDIR_STRAIGHT) { - maxPrio = (*priorities)[i]; + maxPrio = priorities[i]; target = (*outgoing)[i]; rightOfTarget = i == 0 ? outgoing->back() : (*outgoing)[i - 1]; leftOfTarget = i + 1 == numOutgoing ? outgoing->front() : (*outgoing)[i + 1]; @@ -2536,45 +2604,38 @@ } -std::vector* -NBEdge::prepareEdgePriorities(const EdgeVector* outgoing) { - // copy the priorities first - std::vector* priorities = new std::vector(); - if (outgoing->size() == 0) { +const std::vector +NBEdge::prepareEdgePriorities(const EdgeVector* outgoing, const std::vector& availableLanes) { + std::vector priorities; + MainDirections mainDirections(*outgoing, this, myTo, availableLanes); + const int dist = mainDirections.getStraightest(); + if (dist == -1) { return priorities; } - priorities->reserve(outgoing->size()); - EdgeVector::const_iterator i; - for (i = outgoing->begin(); i != outgoing->end(); i++) { - //int prio = (*i)->getJunctionPriority(myTo); - int prio = NBNode::isTrafficLight(myTo->getType()) ? 0 : (*i)->getJunctionPriority(myTo); + // copy the priorities first + priorities.reserve(outgoing->size()); + for (const NBEdge* const out : *outgoing) { + int prio = NBNode::isTrafficLight(myTo->getType()) ? 0 : out->getJunctionPriority(myTo); assert((prio + 1) * 2 > 0); prio = (prio + 1) * 2; - priorities->push_back(prio); + priorities.push_back(prio); } // when the right turning direction has not a higher priority, divide // the importance by 2 due to the possibility to leave the junction // faster from this lane - EdgeVector tmp(*outgoing); - sort(tmp.begin(), tmp.end(), NBContHelper::straightness_sorter(myTo, this)); - i = find(outgoing->begin(), outgoing->end(), *(tmp.begin())); - int dist = (int) distance(outgoing->begin(), i); - MainDirections mainDirections(*outgoing, this, myTo, dist); #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) std::cout << " prepareEdgePriorities " << getID() << " outgoing=" << toString(*outgoing) - << " priorities1=" << toString(*priorities) - << " tmp=" << toString(tmp) - << " mainDirs=" << toString(mainDirections.myDirs) + << " priorities1=" << toString(priorities) << " dist=" << dist << "\n"; #endif if (dist != 0 && !mainDirections.includes(MainDirections::DIR_RIGHTMOST)) { - assert(priorities->size() > 0); - (*priorities)[0] /= 2; + assert(priorities.size() > 0); + priorities[0] /= 2; #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { - std::cout << " priorities2=" << toString(*priorities) << "\n"; + std::cout << " priorities2=" << toString(priorities) << "\n"; } #endif } @@ -2582,62 +2643,51 @@ // when no higher priority exists, let the forward direction be // the main direction if (mainDirections.empty()) { - assert(dist < (int)priorities->size()); - (*priorities)[dist] *= 2; + assert(dist < (int)priorities.size()); + priorities[dist] *= 2; #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { - std::cout << " priorities3=" << toString(*priorities) << "\n"; + std::cout << " priorities3=" << toString(priorities) << "\n"; } #endif } if (NBNode::isTrafficLight(myTo->getType())) { - (*priorities)[dist] += 1; + priorities[dist] += 1; } else { // try to ensure separation of left turns if (mainDirections.includes(MainDirections::DIR_RIGHTMOST) && mainDirections.includes(MainDirections::DIR_LEFTMOST)) { - (*priorities)[0] /= 4; - (*priorities)[(int)priorities->size() - 1] /= 2; + priorities[0] /= 4; + priorities[(int)priorities.size() - 1] /= 2; #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { - std::cout << " priorities6=" << toString(*priorities) << "\n"; + std::cout << " priorities6=" << toString(priorities) << "\n"; } #endif } } if (mainDirections.includes(MainDirections::DIR_FORWARD)) { if (myLanes.size() > 2) { - (*priorities)[dist] *= 2; + priorities[dist] *= 2; #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { - std::cout << " priorities4=" << toString(*priorities) << "\n"; + std::cout << " priorities4=" << toString(priorities) << "\n"; } #endif } else { - (*priorities)[dist] *= 3; + priorities[dist] *= 3; #ifdef DEBUG_CONNECTION_GUESSING if (DEBUGCOND) { - std::cout << " priorities5=" << toString(*priorities) << "\n"; + std::cout << " priorities5=" << toString(priorities) << "\n"; } #endif } } - // return return priorities; } -int -NBEdge::computePrioritySum(const std::vector& priorities) { - int sum = 0; - for (std::vector::const_iterator i = priorities.begin(); i != priorities.end(); i++) { - sum += *i; - } - return sum; -} - - void -NBEdge::appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool checkPermissions) { +NBEdge::appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike, bool checkPermissions) { // do nothing if no turnaround is known if (myTurnDestination == nullptr || myTo->getType() == NODETYPE_RAIL_CROSSING) { return; @@ -2647,7 +2697,17 @@ if (noTLSControlled && myTo->isTLControlled()) { return; } - if (onlyDeadends && myTo->getOutgoingEdges().size() > 1) { + bool isDeadEnd = true; + for (const Connection& c : myConnections) { + if ((c.toEdge->getPermissions(c.toLane) + & getPermissions(c.fromLane) + & SVC_PASSENGER) != 0 + || (c.toEdge->getPermissions() & getPermissions()) == getPermissions()) { + isDeadEnd = false; + break; + } + } + if (onlyDeadends && !isDeadEnd) { return; } const int fromLane = (int)myLanes.size() - 1; @@ -2676,6 +2736,14 @@ return; } }; + if (noGeometryLike && myTo->geometryLike() && !isDeadEnd) { + // make sure the turnDestination has other incoming edges + EdgeVector turnIncoming = myTurnDestination->getIncomingEdges(); + if (turnIncoming.size() > 1) { + // this edge is always part of incoming + return; + } + } setConnection(fromLane, myTurnDestination, toLane, L2L_VALIDATED); } @@ -2735,12 +2803,12 @@ bool NBEdge::mayBeTLSControlled(int fromLane, NBEdge* toEdge, int toLane) const { - TLSDisabledConnection tpl; - tpl.fromLane = fromLane; - tpl.to = toEdge; - tpl.toLane = toLane; - std::vector::const_iterator i = find_if(myTLSDisabledConnections.begin(), myTLSDisabledConnections.end(), tls_disable_finder(tpl)); - return i == myTLSDisabledConnections.end(); + for (const Connection& c : myConnections) { + if (c.fromLane == fromLane && c.toEdge == toEdge && c.toLane == toLane && c.uncontrolled) { + return false; + } + } + return true; } @@ -2751,12 +2819,7 @@ const int toLane = c.getToLane(); const int tlIndex = c.getTLIndex(); // check whether the connection was not set as not to be controled previously - TLSDisabledConnection tpl; - tpl.fromLane = fromLane; - tpl.to = toEdge; - tpl.toLane = toLane; - std::vector::iterator i = find_if(myTLSDisabledConnections.begin(), myTLSDisabledConnections.end(), tls_disable_finder(tpl)); - if (i != myTLSDisabledConnections.end()) { + if (!mayBeTLSControlled(fromLane, toEdge, toLane)) { return false; } @@ -2817,16 +2880,6 @@ } -void -NBEdge::disableConnection4TLS(int fromLane, NBEdge* toEdge, int toLane) { - TLSDisabledConnection c; - c.fromLane = fromLane; - c.to = toEdge; - c.toLane = toLane; - myTLSDisabledConnections.push_back(c); -} - - PositionVector NBEdge::getCWBoundaryLine(const NBNode& n) const { PositionVector ret; @@ -2950,7 +3003,7 @@ // all lanes must go to the possible continuation std::vector conns = getConnectionLanes(possContinuation); const int offset = MAX2(0, getFirstNonPedestrianLaneIndex(NBNode::FORWARD, true)); - if (conns.size() != myLanes.size() - offset) { + if (conns.size() < myLanes.size() - offset) { reason = "some lanes disconnected"; return false; } @@ -2986,12 +3039,16 @@ myConnections = e->myConnections; myTurnDestination = e->myTurnDestination; myPossibleTurnDestination = e->myPossibleTurnDestination; + myConnectionsToDelete = e->myConnectionsToDelete; // set the node myTo = e->myTo; myToBorder = e->myToBorder; + if (e->knowsParameter("origTo")) { + setParameter("origTo", e->getParameter("origTo")); + } if (e->getSignalOffset() != UNSPECIFIED_SIGNAL_OFFSET) { mySignalOffset = e->getSignalOffset(); - } else { + } else if (mySignalOffset != UNSPECIFIED_SIGNAL_OFFSET) { mySignalOffset += e->getLength(); } computeAngle(); // myEndAngle may be different now @@ -3024,12 +3081,6 @@ } -std::string -NBEdge::getLaneIDInsecure(int lane) const { - return myID + "_" + toString(lane); -} - - bool NBEdge::isNearEnough2BeJoined2(NBEdge* e, double threshold) const { std::vector distances = myGeom.distances(e->getGeometry()); @@ -3385,6 +3436,15 @@ return -1; } +int +NBEdge::getSpecialLane(SVCPermissions permissions) const { + for (int i = 0; i < (int)myLanes.size(); i++) { + if (myLanes[i].permissions == permissions) { + return i; + } + } + return -1; +} int NBEdge::getFirstAllowedLaneIndex(int direction) const { @@ -3480,9 +3540,11 @@ void NBEdge::addRestrictedLane(double width, SUMOVehicleClass vclass) { - if (myLanes[0].permissions == vclass) { - WRITE_WARNING("Edge '" + getID() + "' already has a dedicated lane for " + toString(vclass) + "s. Not adding another one."); - return; + for (const Lane& lane : myLanes) { + if (lane.permissions == vclass) { + WRITE_WARNING("Edge '" + getID() + "' already has a dedicated lane for " + toString(vclass) + "s. Not adding another one."); + return; + } } if (myLaneSpreadFunction == LANESPREAD_CENTER) { myGeom.move2side(width / 2); @@ -3581,7 +3643,15 @@ geom.push_front_noDoublePos(getFromNode()->getCenter()); result = geom.length(); } - return MAX2(result, POSITION_EPS); + double avgEndOffset = 0; + for (const Lane& lane : myLanes) { + avgEndOffset += lane.endOffset; + } + if (isBidiRail()) { + avgEndOffset += myPossibleTurnDestination->getEndOffset(); + } + avgEndOffset /= myLanes.size(); + return MAX2(result - avgEndOffset, POSITION_EPS); } void @@ -3606,9 +3676,9 @@ //std::cout << "getSuccessors edge=" << getID() << " svc=" << toString(vClass) << " cons=" << myConnections.size() << "\n"; for (const Connection& con : myConnections) { if (con.fromLane >= 0 && con.toLane >= 0 && con.toEdge != nullptr && - (getPermissions(con.fromLane) - & con.toEdge->getPermissions(con.toLane) & vClass) != 0 - && find(mySuccessors.begin(), mySuccessors.end(), con.toEdge) == mySuccessors.end()) { + (vClass == SVC_IGNORING || (getPermissions(con.fromLane) + & con.toEdge->getPermissions(con.toLane) & vClass) != 0) + && std::find(mySuccessors.begin(), mySuccessors.end(), con.toEdge) == mySuccessors.end()) { mySuccessors.push_back(con.toEdge); //std::cout << " succ=" << con.toEdge->getID() << "\n"; } @@ -3626,7 +3696,7 @@ if (con.fromLane >= 0 && con.toLane >= 0 && con.toEdge != nullptr && (getPermissions(con.fromLane) & con.toEdge->getPermissions(con.toLane) & vClass) != 0 - && find(myViaSuccessors.begin(), myViaSuccessors.end(), pair) == myViaSuccessors.end()) { + && std::find(myViaSuccessors.begin(), myViaSuccessors.end(), pair) == myViaSuccessors.end()) { myViaSuccessors.push_back(pair); } } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBEdge.h sumo-1.2.0+dfsg1/src/netbuild/NBEdge.h --- sumo-1.1.0+dfsg1/src/netbuild/NBEdge.h 2018-12-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -578,9 +578,15 @@ return mySignalOffset; } + /// @brief Returns the node that (possibly) represents a traffic signal controlling at the end of this edge + NBNode* getSignalNode() const { + return mySignalNode; + } + /// @brief sets the offset of a traffic signal from the end of this edge - void setSignalOffset(double offset) { + void setSignalOffset(double offset, NBNode* signalNode) { mySignalOffset = offset; + mySignalNode = signalNode; } /** @brief Returns the lane definitions @@ -597,6 +603,9 @@ */ int getFirstNonPedestrianLaneIndex(int direction, bool exclusive = false) const; + /// @brief return index of the first lane that allows the given permissions + int getSpecialLane(SVCPermissions permissions) const; + /** @brief return the first lane that permits at least 1 vClass or the last lane if search direction of there is no such lane * @param[in] direction The direction in which the lanes shall be checked */ @@ -684,7 +693,7 @@ * but may differ in actual geomtric length. * @note Depends on previous call to NBNodeCont::computeNodeShapes */ - void computeEdgeShape(double smoothElevationThreshold=-1); + void computeEdgeShape(double smoothElevationThreshold = -1); /** @brief Returns the shape of the nth lane * @return The shape of the lane given by its index (counter from right) @@ -818,18 +827,17 @@ const PositionVector& customShape = PositionVector::EMPTY, const bool uncontrolled = UNSPECIFIED_CONNECTION_UNCONTROLLED); - /// @brief insert a previously created NBEdge::connection - void insertConnection(NBEdge::Connection connection); - /** @brief Returns connections from a given lane * * This method goes through "myConnections" and copies those which are * starting at the given lane. * @param[in] lane The lane which connections shall be returned + * @param[in] to The target Edge (ignore nullptr) + * @param[in] toLane The target lane (ignore if > 0) * @return The connections from the given lane * @see NBEdge::Connection */ - std::vector getConnectionsFromLane(int lane) const; + std::vector getConnectionsFromLane(int lane, NBEdge* to = nullptr, int toLane = -1) const; /** @brief Returns the specified connection * This method goes through "myConnections" and returns the specified one @@ -893,7 +901,7 @@ /** @brief Returns the list of lanes that may be used to reach the given edge * @return Lanes approaching the given edge */ - std::vector getConnectionLanes(NBEdge* currentOutgoing) const; + std::vector getConnectionLanes(NBEdge* currentOutgoing, bool withBikes = true) const; /// @brief sorts the outgoing connections by their angle relative to their junction void sortOutgoingConnectionsByAngle(); @@ -915,7 +923,7 @@ * @param[in] tryLater If the connection does not exist, try again during recheckLanes() * @param[in] adaptToLaneRemoval we are in the process of removing a complete lane, adapt all connections accordingly */ - void removeFromConnections(NBEdge* toEdge, int fromLane = -1, int toLane = -1, bool tryLater = false, const bool adaptToLaneRemoval = false); + void removeFromConnections(NBEdge* toEdge, int fromLane = -1, int toLane = -1, bool tryLater = false, const bool adaptToLaneRemoval = false, const bool keepPossibleTurns = false); /// @brief remove an existent connection of edge bool removeFromConnections(NBEdge::Connection connectionToRemove); @@ -1052,7 +1060,7 @@ * of this edge to the leftmost lane of myTurnDestination). * @param[in] noTLSControlled Whether the turnaround shall not be connected if this edge is controlled by a tls */ - void appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool checkPermissions); + void appendTurnaround(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike, bool checkPermissions); /** @brief Returns the node at the given edges length (using an epsilon) @note When no node is existing at the given position, 0 is returned @@ -1101,12 +1109,9 @@ */ NBEdge* getTurnDestination(bool possibleDestination = false) const; - /// @brief get Lane ID (Secure) + /// @brief get lane ID std::string getLaneID(int lane) const; - /// @brief get Lane ID (Insecure) - std::string getLaneIDInsecure(int lane) const; - /// @brief get lane speed double getLaneSpeed(int lane) const; @@ -1346,16 +1351,18 @@ /// @brief enum of possible directions enum Direction { DIR_RIGHTMOST, DIR_LEFTMOST, DIR_FORWARD }; - /// @brief list of the main direction within the following junction relative to the edge - std::vector myDirs; - public: /// @brief constructor - MainDirections(const EdgeVector& outgoing, NBEdge* parent, NBNode* to, int indexOfStraightest); + MainDirections(const EdgeVector& outgoing, NBEdge* parent, NBNode* to, const std::vector& availableLanes); /// @brief destructor ~MainDirections(); + /// @brief returns the index of the straightmost among the given outgoing edges + int getStraightest() const { + return myStraightest; + } + /// @brief returns the information whether no following street has a higher priority bool empty() const; @@ -1363,6 +1370,12 @@ bool includes(Direction d) const; private: + /// @brief the index of the straightmost among the given outgoing edges + int myStraightest; + + /// @brief list of the main direction within the following junction relative to the edge + std::vector myDirs; + /// @brief Invalidated copy constructor. MainDirections(const MainDirections&); @@ -1399,16 +1412,13 @@ void divideOnEdges(const EdgeVector* outgoing); /// @brief divide selected lanes on edges - void divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector& availableLanes, const std::vector* priorities); + void divideSelectedLanesOnEdges(const EdgeVector* outgoing, const std::vector& availableLanes); /// @brief add some straight connections - void addStraightConnections(const EdgeVector* outgoing, const std::vector& availableLanes, const std::vector* priorities); + void addStraightConnections(const EdgeVector* outgoing, const std::vector& availableLanes, const std::vector& priorities); /// @brief recomputes the edge priorities and manipulates them for a distribution of lanes on edges which is more like in real-life - std::vector* prepareEdgePriorities(const EdgeVector* outgoing); - - /// @brief computes the sum of the given list's entries (sic!) - static int computePrioritySum(const std::vector& priorities); + const std::vector prepareEdgePriorities(const EdgeVector* outgoing, const std::vector& availableLanes); /// @name Setting and getting connections /// @{ @@ -1430,7 +1440,7 @@ void computeAngle(); /// @brief determine conflict between opposite left turns - bool bothLeftIntersect(const NBNode& n, const PositionVector& shape, LinkDirection dir, NBEdge* otherFrom, const NBEdge::Connection& otherCon, int numPoints, double width2) const; + bool bothLeftIntersect(const NBNode& n, const PositionVector& shape, LinkDirection dir, NBEdge* otherFrom, const NBEdge::Connection& otherCon, int numPoints, double width2, int shapeFlag = 0) const; /// @brief add a lane of the given width, restricted to the given class and shift existing connections void addRestrictedLane(double width, SUMOVehicleClass vclass); @@ -1521,16 +1531,6 @@ /// @brief Information whether this edge is a (macroscopic) connector bool myAmMacroscopicConnector; - /// @brief TLS Disabled Connections - struct TLSDisabledConnection { - int fromLane; - NBEdge* to; - int toLane; - }; - - /// @brief vector with the disabled connections - std::vector myTLSDisabledConnections; - /// @brief The street name (or whatever arbitrary string you wish to attach) std::string myStreetName; @@ -1539,6 +1539,7 @@ /// @brief the offset of a traffic light signal from the end of this edge (-1 for None) double mySignalOffset; + NBNode* mySignalNode; /// @brief intersection borders (because the node shape might be invalid) /// @{ @@ -1557,35 +1558,6 @@ mutable NBConstEdgePairVector myViaSuccessors; public: - /// @class tls_disable_finder - class tls_disable_finder { - public: - /// @brief constructor - tls_disable_finder(const TLSDisabledConnection& tpl) : myDefinition(tpl) { } - - /// @brief operator () - bool operator()(const TLSDisabledConnection& e) const { - if (e.to != myDefinition.to) { - return false; - } - if (e.fromLane != myDefinition.fromLane) { - return false; - } - if (e.toLane != myDefinition.toLane) { - return false; - } - return true; - } - - private: - /// @brief definition of disable connection - TLSDisabledConnection myDefinition; - - private: - /// @brief invalidated assignment operator - tls_disable_finder& operator=(const tls_disable_finder& s); - }; - /// @class connections_toedge_finder class connections_toedge_finder { diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBFrame.cpp sumo-1.2.0+dfsg1/src/netbuild/NBFrame.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBFrame.cpp 2018-12-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -106,6 +106,9 @@ oc.addSynonyme("no-turnarounds.tls", "no-tls-turnarounds", true); oc.addDescription("no-turnarounds.tls", "Junctions", "Disables building turnarounds at tls-controlled junctions"); + oc.doRegister("no-turnarounds.geometry", new Option_Bool(true)); + oc.addDescription("no-turnarounds.geometry", "Junctions", "Disables building turnarounds at geometry-like junctions"); + oc.doRegister("no-turnarounds.except-deadend", new Option_Bool(false)); oc.addDescription("no-turnarounds.except-deadend", "Junctions", "Disables building turnarounds except at dead end junctions"); @@ -582,7 +585,7 @@ WRITE_ERROR("tls.layout must be 'opposites' or 'incoming'"); ok = false; } - if (!oc.isDefault("default.right-of-way") && + if (!oc.isDefault("default.right-of-way") && !SUMOXMLDefinitions::RightOfWayValues.hasString(oc.getString("default.right-of-way"))) { WRITE_ERROR("default.right-of-way must be one of '" + toString(SUMOXMLDefinitions::RightOfWayValues.getStrings()) + "'"); ok = false; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBFrame.h sumo-1.2.0+dfsg1/src/netbuild/NBFrame.h --- sumo-1.1.0+dfsg1/src/netbuild/NBFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBHeightMapper.cpp sumo-1.2.0+dfsg1/src/netbuild/NBHeightMapper.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBHeightMapper.cpp 2018-11-14 23:00:56.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBHeightMapper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBHeightMapper.h sumo-1.2.0+dfsg1/src/netbuild/NBHeightMapper.h --- sumo-1.1.0+dfsg1/src/netbuild/NBHeightMapper.h 2018-11-14 23:00:56.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBHeightMapper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBHelpers.cpp sumo-1.2.0+dfsg1/src/netbuild/NBHelpers.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBHelpers.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBHelpers.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -46,11 +46,11 @@ double NBHelpers::relAngle(double angle1, double angle2) { angle2 -= angle1; - if (angle2 > 180) { - angle2 = (360 - angle2) * -1; + while (angle2 > 180.) { + angle2 -= 360.; } - while (angle2 < -180) { - angle2 = 360 + angle2; + while (angle2 < -180.) { + angle2 += 360.; } return angle2; } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBHelpers.h sumo-1.2.0+dfsg1/src/netbuild/NBHelpers.h --- sumo-1.1.0+dfsg1/src/netbuild/NBHelpers.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBHelpers.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBLinkPossibilityMatrix.h sumo-1.2.0+dfsg1/src/netbuild/NBLinkPossibilityMatrix.h --- sumo-1.1.0+dfsg1/src/netbuild/NBLinkPossibilityMatrix.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBLinkPossibilityMatrix.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.cpp sumo-1.2.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -56,14 +56,13 @@ NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(NBTrafficLightDefinition* def, NBTrafficLightLogic* logic) : - // 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()), + // allow for adding a new program for the same def: take the offset and programID from the new logic + NBTrafficLightDefinition(def->getID(), logic->getProgramID(), logic->getOffset(), def->getType()), myTLLogic(new NBTrafficLightLogic(logic)), myOriginalNodes(def->getNodes().begin(), def->getNodes().end()), myReconstructAddedConnections(false), myReconstructRemovedConnections(false), myPhasesLoaded(false) { - assert(def->getOffset() == logic->getOffset()); assert(def->getType() == logic->getType()); myControlledLinks = def->getControlledLinks(); myControlledNodes = def->getNodes(); @@ -121,7 +120,7 @@ void NBLoadedSUMOTLDef::setTLControllingInformation() const { if (myReconstructAddedConnections) { - NBOwnTLDef dummy(DummyID, myControlledNodes, 0, TLTYPE_STATIC); + NBOwnTLDef dummy(DummyID, myControlledNodes, 0, getType()); dummy.setParticipantsInformation(); dummy.setTLControllingInformation(); for (std::vector::const_iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { @@ -167,8 +166,8 @@ void -NBLoadedSUMOTLDef::addPhase(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur) { - myTLLogic->addStep(duration, state, minDur, maxDur); +NBLoadedSUMOTLDef::addPhase(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur, const std::vector& next, const std::string& name) { + myTLLogic->addStep(duration, state, minDur, maxDur, next, name); } @@ -250,7 +249,7 @@ 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); + EdgeVector::iterator k = std::find(myOutgoing.begin(), myOutgoing.end(), edge); if (k != myOutgoing.end()) { if (myControlledInnerEdges.count(edge->getID()) == 0) { bool controlled = false; @@ -453,7 +452,7 @@ if (!myPhasesLoaded && !(netedit && hasValidIndices())) { // rebuild the logic from scratch // XXX if a connection with the same from- and to-edge already exisits, its states could be copied instead - NBOwnTLDef dummy(DummyID, myControlledNodes, 0, TLTYPE_STATIC); + NBOwnTLDef dummy(DummyID, myControlledNodes, 0, getType()); dummy.setParticipantsInformation(); dummy.setProgramID(getProgramID()); dummy.setTLControllingInformation(); @@ -488,7 +487,7 @@ for (NBConnectionVector::iterator it = myControlledLinks.begin(); it != myControlledLinks.end();) { const NBConnection con = (*it); if (// edge still exists - find(myIncomingEdges.begin(), myIncomingEdges.end(), con.getFrom()) != myIncomingEdges.end() + std::find(myIncomingEdges.begin(), myIncomingEdges.end(), con.getFrom()) != myIncomingEdges.end() // connection still exists && con.getFrom()->hasConnectionTo(con.getTo(), con.getToLane(), con.getFromLane()) // connection is still set to be controlled diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.h sumo-1.2.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.h --- sumo-1.1.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBLoadedSUMOTLDef.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -97,7 +97,7 @@ * @param[in] minDur The minimum duration of the phase to add * @param[in] maxDur The maximum duration of the phase to add */ - void addPhase(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur); + void addPhase(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur, const std::vector& next, const std::string& name); /// @brief mark phases as load void phasesLoaded() { diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBLoadedTLDef.cpp sumo-1.2.0+dfsg1/src/netbuild/NBLoadedTLDef.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBLoadedTLDef.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBLoadedTLDef.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -275,7 +275,7 @@ NBLoadedTLDef::~NBLoadedTLDef() { for (SignalGroupCont::iterator i = mySignalGroups.begin(); i != mySignalGroups.end(); ++i) { - delete(*i).second; + delete (*i).second; } } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBLoadedTLDef.h sumo-1.2.0+dfsg1/src/netbuild/NBLoadedTLDef.h --- sumo-1.1.0+dfsg1/src/netbuild/NBLoadedTLDef.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBLoadedTLDef.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNetBuilder.cpp sumo-1.2.0+dfsg1/src/netbuild/NBNetBuilder.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBNetBuilder.cpp 2018-12-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNetBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -435,7 +435,7 @@ before = SysUtils::getCurrentMillis(); PROGRESS_BEGIN_MESSAGE("Processing turnarounds"); if (!oc.getBool("no-turnarounds")) { - myEdgeCont.appendTurnarounds(oc.getBool("no-turnarounds.tls"), oc.getBool("no-turnarounds.except-deadend")); + myEdgeCont.appendTurnarounds(oc.getBool("no-turnarounds.tls"), oc.getBool("no-turnarounds.except-deadend"), oc.getBool("no-turnarounds.geometry")); } else { myEdgeCont.appendTurnarounds(explicitTurnarounds, oc.getBool("no-turnarounds.tls")); } @@ -524,7 +524,7 @@ PROGRESS_BEGIN_MESSAGE("stretching junctions to smooth geometries"); myEdgeCont.computeLaneShapes(); myNodeCont.computeNodeShapes(); - myEdgeCont.computeEdgeShapes(); + myEdgeCont.computeEdgeShapes(oc.getBool("geometry.max-grade.fix") ? oc.getFloat("geometry.max-grade") / 100 : -1); for (std::map::const_iterator i = myNodeCont.begin(); i != myNodeCont.end(); ++i) { (*i).second->buildInnerEdges(); } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNetBuilder.h sumo-1.2.0+dfsg1/src/netbuild/NBNetBuilder.h --- sumo-1.1.0+dfsg1/src/netbuild/NBNetBuilder.h 2018-08-10 22:00:20.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNetBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,6 +31,7 @@ #include #include #include +#include #include "NBEdgeCont.h" #include "NBTypeCont.h" #include "NBNodeCont.h" @@ -187,6 +188,10 @@ return myParkingCont; } + ShapeContainer& getShapeCont() { + return myShapeCont; + } + /// @brief notify about style of loaded network (Without Crossings) bool haveNetworkCrossings() { return myNetworkHaveCrossings; @@ -252,6 +257,9 @@ NBParkingCont myParkingCont; + /// @brief container for loaded polygon data + ShapeContainer myShapeCont; + /// @brief flag to indicate that network has crossings bool myNetworkHaveCrossings; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNodeCont.cpp sumo-1.2.0+dfsg1/src/netbuild/NBNodeCont.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBNodeCont.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNodeCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -57,7 +57,7 @@ #include "NBParking.h" //#define DEBUG_JOINJUNCTIONS -#define DEBUGNODEID "1311774270" +#define DEBUGNODEID "C1" //#define DEBUGNODEID "5548037023" #define DEBUGCOND(obj) ((obj != 0 && (obj)->getID() == DEBUGNODEID)) @@ -156,7 +156,7 @@ myRTree.Remove(pos, pos, node); node->removeTrafficLights(); if (remember) { - myExtractedNodes.insert(node); + myExtractedNodes[node->getID()] = node; } return true; } @@ -489,8 +489,8 @@ const double length = e->getLoadedLength(); #ifdef DEBUG_JOINJUNCTIONS if (DEBUGCOND(s)) { - std::cout << "generateNodeClusters: consider s=" << s->getID() - << " clusterNode=" << n->getID() << " edge=" << e->getID() << " length=" << length << " with cluster " << joinNamedToString(c, ' ') << "\n"; + std::cout << "generateNodeClusters: consider s=" << s->getID() + << " clusterNode=" << n->getID() << " edge=" << e->getID() << " length=" << length << " with cluster " << joinNamedToString(c, ' ') << "\n"; } #endif if (railAndPeds && n->getType() != NODETYPE_RAIL_CROSSING) { @@ -578,44 +578,67 @@ void -NBNodeCont::addCluster2Join(std::set cluster) { +NBNodeCont::addCluster2Join(std::set cluster, NBNode* node) { // error handling has to take place here since joins could be loaded from multiple files - for (std::set::const_iterator it = cluster.begin(); it != cluster.end(); it++) { - if (myJoinExclusions.count(*it) > 0) { - WRITE_WARNING("Ignoring join-cluster because junction '" + *it + "' was already excluded from joining"); + std::set validCluster; + for (std::string nodeID : cluster) { + if (myJoinExclusions.count(nodeID) > 0) { + WRITE_WARNING("Ignoring join-cluster because junction '" + nodeID + "' was already excluded from joining"); return; - } else if (myJoined.count(*it) > 0) { - WRITE_WARNING("Ignoring join-cluster because junction '" + *it + "' already occurred in another join-cluster"); + } else if (myJoined.count(nodeID) > 0) { + WRITE_WARNING("Ignoring join-cluster because junction '" + nodeID + "' already occurred in another join-cluster"); return; } else { - myJoined.insert(*it); + NBNode* node = retrieve(nodeID); + if (node != nullptr) { + validCluster.insert(nodeID); + } else { + if (StringUtils::startsWith(nodeID, "cluster_")) { + // assume join directive came from a pre-processed network. try to use component IDs + std::set subIDs; + for (std::string nID : StringTokenizer(nodeID.substr(8), "_").getVector()) { + NBNode* node = retrieve(nID); + if (node != nullptr) { + validCluster.insert(nID); + } else { + WRITE_ERROR("Unknown junction '" + nodeID + "' in join-cluster (componentID)"); + } + } + } else { + WRITE_ERROR("Unknown junction '" + nodeID + "' in join-cluster"); + } + } } } - myClusters2Join.push_back(cluster); + for (std::string nodeID : validCluster) { + myJoined.insert(nodeID); + } + myClusters2Join.push_back(std::make_pair(validCluster, node)); } int NBNodeCont::joinLoadedClusters(NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc) { - NodeClusters clusters; - for (std::vector >::iterator it = myClusters2Join.begin(); it != myClusters2Join.end(); it++) { + int numJoined = 0; + for (auto& item : myClusters2Join) { // verify loaded cluster NodeSet cluster; - for (std::set::iterator it_id = it->begin(); it_id != it->end(); it_id++) { - NBNode* node = retrieve(*it_id); + for (std::string nodeID : item.first) { + NBNode* node = retrieve(nodeID); if (node == nullptr) { - WRITE_WARNING("Ignoring unknown junction '" + *it_id + "' while joining"); + WRITE_ERROR("unknown junction '" + nodeID + "' while joining"); } else { cluster.insert(node); } } if (cluster.size() > 1) { - clusters.push_back(cluster); + joinNodeCluster(cluster, dc, ec, tlc, item.second); + numJoined++; + myJoinExclusions.insert(item.second->getID()); } } - joinNodeClusters(clusters, dc, ec, tlc); myClusters2Join.clear(); // make save for recompute - return (int)clusters.size(); + return numJoined; } @@ -770,7 +793,10 @@ for (NBEdge* e : n->getEdges()) { NBNode* neighbor = e->getFromNode() == n ? e->getToNode() : e->getFromNode(); if (cluster.count(neighbor) == 0) { - if ((e->getPermissions() & SVC_PASSENGER) != 0 || clusterDist <= pedestrianFringeThreshold || touchingCluster) { + if ((e->getPermissions() & SVC_PASSENGER) != 0 + || isRailway(e->getPermissions()) // join railway crossings + || clusterDist <= pedestrianFringeThreshold + || touchingCluster) { outsideNeighbors.insert(neighbor); } } else { @@ -871,14 +897,19 @@ } } } + int numTLS = 0; + for (NBNode* n : cluster) { + if (n->isTLControlled()) { + numTLS++; + }; + } + const bool hasTLS = numTLS > 0; // prevent removal of long edges unless there is weak circle or a traffic light if (cluster.size() > 2) { // find the nodes with the biggests physical distance between them double maxDist = -1; - bool hasTLS = false; NBEdge* maxEdge = nullptr; for (NBNode* n1 : cluster) { - hasTLS |= n1->isTLControlled(); for (NBNode* n2 : cluster) { NBEdge* e1 = n1->getConnectionTo(n2); NBEdge* e2 = n2->getConnectionTo(n1); @@ -928,6 +959,54 @@ } } } + // prevent joining of simple merging/spreading structures + if (!hasTLS && cluster.size() >= 2) { + int entryNodes = 0; + int exitNodes = 0; + int outsideIncoming = 0; + int outsideOutgoing = 0; + int edgesWithin = 0; + for (NBNode* n : cluster) { + bool foundOutsideIncoming = false; + for (NBEdge* e : n->getIncomingEdges()) { + if (cluster.count(e->getFromNode()) == 0) { + // edge entering from outside the cluster + outsideIncoming++; + foundOutsideIncoming = true; + } else { + edgesWithin++; + } + } + if (foundOutsideIncoming) { + entryNodes++; + } + bool foundOutsideOutgoing = false; + for (NBEdge* e : n->getOutgoingEdges()) { + if (cluster.count(e->getToNode()) == 0) { + // edge leaving cluster + outsideOutgoing++; + foundOutsideOutgoing = true; + } + } + if (foundOutsideOutgoing) { + exitNodes++; + } + } + if (entryNodes < 2) { + reason = "only 1 entry node"; + return false; + } + if (exitNodes < 2) { + reason = "only 1 exit node"; + return false; + } + if (cluster.size() == 2) { + if (edgesWithin == 1 && outsideIncoming < 3 && outsideOutgoing < 3) { + reason = "only 1 edge within and no cross-traffic"; + return false; + } + } + } return true; } @@ -1003,79 +1082,180 @@ void NBNodeCont::joinNodeClusters(NodeClusters clusters, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc) { - for (NodeClusters::iterator i = clusters.begin(); i != clusters.end(); ++i) { - NodeSet cluster = *i; - assert(cluster.size() > 1); - Position pos; - bool setTL; - std::string id = "cluster"; - TrafficLightType type; - SumoXMLNodeType nodeType = NODETYPE_UNKNOWN; - analyzeCluster(cluster, id, pos, setTL, type, nodeType); + for (NodeSet cluster : clusters) { + joinNodeCluster(cluster, dc, ec, tlc); + } +} + + +void +NBNodeCont::joinNodeCluster(NodeSet cluster, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc, NBNode* predefined) { + const bool origNames = OptionsCont::getOptions().getBool("output.original-names"); + assert(cluster.size() > 1); + Position pos; + bool setTL; + std::string id = "cluster"; + TrafficLightType type; + SumoXMLNodeType nodeType = NODETYPE_UNKNOWN; + analyzeCluster(cluster, id, pos, setTL, type, nodeType); + NBNode* newNode = nullptr; + if (predefined != nullptr) { + newNode = predefined; + } else { if (!insert(id, pos)) { // should not fail WRITE_WARNING("Could not join junctions " + id); - continue; + return;; } - NBNode* newNode = retrieve(id); - newNode->reinit(pos, nodeType); - if (setTL) { - NBTrafficLightDefinition* tlDef = new NBOwnTLDef(id, newNode, 0, type); - if (!tlc.insert(tlDef)) { - // actually, nothing should fail here - delete tlDef; - throw ProcessError("Could not allocate tls '" + id + "'."); - } + newNode = retrieve(id); + } + std::string tlID = id; + if (predefined != nullptr) { + if (predefined->getType() != NODETYPE_UNKNOWN) { + nodeType = predefined->getType(); } - // collect edges - std::set allEdges; - for (NBNode* n : cluster) { - const EdgeVector& edges = n->getEdges(); - allEdges.insert(edges.begin(), edges.end()); + Position ppos = predefined->getPosition(); + if (ppos.x() != Position::INVALID.x()) { + pos.setx(ppos.x()); + } + if (ppos.y() != Position::INVALID.y()) { + pos.sety(ppos.y()); + } + if (ppos.z() != Position::INVALID.z()) { + pos.setz(ppos.z()); } + } + newNode->reinit(pos, nodeType); + if (setTL && !newNode->isTLControlled()) { + NBTrafficLightDefinition* tlDef = new NBOwnTLDef(tlID, newNode, 0, type); + if (!tlc.insert(tlDef)) { + // actually, nothing should fail here + delete tlDef; + throw ProcessError("Could not allocate tls '" + id + "'."); + } + } + // collect edges + EdgeSet allEdges; + for (NBNode* n : cluster) { + const EdgeVector& edges = n->getEdges(); + allEdges.insert(edges.begin(), edges.end()); + } + // determine edges with are incoming or fully inside + EdgeSet clusterIncoming; + EdgeSet inside; + for (NBEdge* e : allEdges) { + if (cluster.count(e->getToNode()) > 0) { + if (cluster.count(e->getFromNode()) > 0) { + inside.insert(e); + } else { + clusterIncoming.insert(e); + } + } + } +#ifdef DEBUG_JOINJUNCTIONS + std::cout << "joining cluster " << joinNamedToString(cluster, ' ') << "\n" + << " incoming=" << toString(clusterIncoming) << "\n" + << " inside=" << toString(inside) << "\n"; +#endif - // remap and remove edges which are completely within the new intersection - for (std::set::iterator j = allEdges.begin(); j != allEdges.end();) { - NBEdge* e = (*j); - NBNode* from = e->getFromNode(); - NBNode* to = e->getToNode(); - if (cluster.count(from) > 0 && cluster.count(to) > 0) { - for (std::set::iterator l = allEdges.begin(); l != allEdges.end(); ++l) { - if (e != *l) { - (*l)->replaceInConnections(e, e->getConnections()); + // determine possible connectivity from outside edges + std::map reachable; + for (NBEdge* e : clusterIncoming) { + EdgeVector open; + EdgeSet seen; + open.push_back(e); + while (open.size() > 0) { + NBEdge* cur = open.back(); + //std::cout << " e=" << e->getID() << " cur=" << cur->getID() << " open=" << toString(open) << "\n"; + seen.insert(cur); + open.pop_back(); + if (cluster.count(cur->getToNode()) == 0) { + //std::cout << " continue\n"; + continue; + } + const auto& cons = cur->getConnections(); + if (cons.size() == 0 || ec.hasPostProcessConnection(cur->getID()) || cur->getStep() == NBEdge::INIT) { + // check permissions to determine reachability + for (NBEdge* out : cur->getToNode()->getOutgoingEdges()) { + if (seen.count(out) == 0 + && allEdges.count(out) != 0 + && (out->getPermissions() & cur->getPermissions() & ~SVC_PEDESTRIAN) != 0) { + open.push_back(out); } } - ec.extract(dc, e, true); - allEdges.erase(j++); // erase does not invalidate the other iterators } else { - ++j; + // check existing connections + for (const auto& con : cons) { + if (con.toEdge != nullptr + && seen.count(con.toEdge) == 0 + && allEdges.count(con.toEdge) != 0) { + open.push_back(con.toEdge); + } + } } } + seen.erase(e); + for (NBEdge* reached : seen) { + // filter out inside edges from reached + if (inside.count(reached) == 0) { + reachable[e].insert(reached); + } + } +#ifdef DEBUG_JOINJUNCTIONS + std::cout << " reachable e=" << e->getID() << " seen=" << toString(seen) << " reachable=" << toString(reachable[e]) << "\n"; +#endif + } - // remap edges which are incoming / outgoing - for (std::set::iterator j = allEdges.begin(); j != allEdges.end(); ++j) { - NBEdge* e = (*j); - std::vector conns = e->getConnections(); - const bool outgoing = cluster.count(e->getFromNode()) > 0; - NBNode* from = outgoing ? newNode : e->getFromNode(); - NBNode* to = outgoing ? e->getToNode() : newNode; - e->reinitNodes(from, to); - // re-add connections which previously existed and may still valid. - // connections to removed edges will be ignored - for (std::vector::iterator k = conns.begin(); k != conns.end(); ++k) { - e->addLane2LaneConnection((*k).fromLane, (*k).toEdge, (*k).toLane, NBEdge::L2L_USER, false, (*k).mayDefinitelyPass); - if ((*k).fromLane >= 0 && (*k).fromLane < e->getNumLanes() && e->getLaneStruct((*k).fromLane).connectionsDone) { - // @note (see NIImporter_DlrNavteq::ConnectedLanesHandler) - e->declareConnectionsAsLoaded(NBEdge::INIT); - } + // remap and remove edges which are completely within the new intersection + for (NBEdge* e : inside) { + for (NBEdge* e2 : allEdges) { + if (e != e2) { + e2->replaceInConnections(e, e->getConnections()); + } + } + ec.extract(dc, e, true); + allEdges.erase(e); + } + + // remap edges which are incoming / outgoing + for (NBEdge* e : allEdges) { + std::vector conns = e->getConnections(); + const bool outgoing = cluster.count(e->getFromNode()) > 0; + NBNode* from = outgoing ? newNode : e->getFromNode(); + NBNode* to = outgoing ? e->getToNode() : newNode; + if (origNames) { + if (outgoing) { + e->setParameter("origFrom", e->getFromNode()->getID()); + } else { + e->setParameter("origTo", e->getToNode()->getID()); } } - // remove original nodes - registerJoinedCluster(cluster); - for (NodeSet::const_iterator j = cluster.begin(); j != cluster.end(); ++j) { - erase(*j); + e->reinitNodes(from, to); + // re-add connections which previously existed and may still valid. + // connections to removed edges will be ignored + for (std::vector::iterator k = conns.begin(); k != conns.end(); ++k) { + e->addLane2LaneConnection((*k).fromLane, (*k).toEdge, (*k).toLane, NBEdge::L2L_USER, false, (*k).mayDefinitelyPass); + if ((*k).fromLane >= 0 && (*k).fromLane < e->getNumLanes() && e->getLaneStruct((*k).fromLane).connectionsDone) { + // @note (see NIImporter_DlrNavteq::ConnectedLanesHandler) + e->declareConnectionsAsLoaded(NBEdge::INIT); + } + } + } + // disable connections that were impossible with the old topology + for (NBEdge* in : newNode->getIncomingEdges()) { + for (NBEdge* out : newNode->getOutgoingEdges()) { + if (reachable[in].count(out) == 0 && !ec.hasPostProcessConnection(in->getID(), out->getID())) { + //std::cout << " removeUnreachable in=" << in->getID() << " out=" << out->getID() << "\n"; + in->removeFromConnections(out, -1, -1, true, false, true); + } } } + + // remove original nodes + registerJoinedCluster(cluster); + for (NBNode* n : cluster) { + erase(n); + } } @@ -1158,6 +1338,52 @@ return !tooFast && f >= laneSpeedThreshold && c.size() != 0; } +bool +NBNodeCont::onlyCrossings(const NodeSet& c) const { + // check whether all component nodes are solely pedestrian crossings + // (these work fine without joining) + for (NBNode* node : c) { + EdgeVector nonPedIncoming; + EdgeVector nonPedOutgoing; + for (NBEdge* e : node->getIncomingEdges()) { + if (e->getPermissions() != SVC_PEDESTRIAN) { + nonPedIncoming.push_back(e); + } + } + for (NBEdge* e : node->getOutgoingEdges()) { + if (e->getPermissions() != SVC_PEDESTRIAN) { + nonPedOutgoing.push_back(e); + } + } + if (!node->geometryLike(nonPedIncoming, nonPedOutgoing)) { + //for (NBNode* node : c) { + // if (node->getID() == "2480337678") { + // std::cout << " node=" << node->getID() << " nonPedIncoming=" << toString(nonPedIncoming) << " nonPedOutgoing=" << toString(nonPedOutgoing) << "\n"; + // } + //} + return false; + } + } + return true; +} + + +bool +NBNodeCont::customTLID(const NodeSet& c) const { + for (NBNode* node : c) { + if (node->isTLControlled()) { + const std::string tlID = (*node->getControllingTLS().begin())->getID(); + if (tlID != node->getID() + && !StringUtils::startsWith(tlID, "joinedS_") + && !StringUtils::startsWith(tlID, "joinedG_") + && !StringUtils::startsWith(tlID, "GS")) { + return true; + } + } + } + return false; +} + void NBNodeCont::guessTLs(OptionsCont& oc, NBTrafficLightLogicCont& tlc) { @@ -1186,7 +1412,7 @@ if (oc.exists("tls.taz-nodes") && oc.getBool("tls.taz-nodes")) { for (NodeCont::iterator i = myNodes.begin(); i != myNodes.end(); i++) { NBNode* cur = (*i).second; - if (cur->isNearDistrict() && find(ncontrolled.begin(), ncontrolled.end(), cur) == ncontrolled.end()) { + if (cur->isNearDistrict() && std::find(ncontrolled.begin(), ncontrolled.end(), cur) == ncontrolled.end()) { setAsTLControlled(cur, tlc, type); } } @@ -1200,9 +1426,30 @@ 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()); + std::set seen; + std::set > check; + for (NBEdge* edge : node->getOutgoingEdges()) { + double offset = edge->getLength(); + edge->setSignalOffset(offset, node); + seen.insert(edge); + check.insert(std::make_pair(edge, offset)); + } + // propagate signalOffset until the next real intersection + while (check.size() > 0) { + NBEdge* edge = check.begin()->first; + const double offset = check.begin()->second; + check.erase(check.begin()); + NBNode* nextNode = edge->getToNode(); + if (nextNode->geometryLike() && !nextNode->isTLControlled()) { + for (NBEdge* edge : nextNode->getOutgoingEdges()) { + if (seen.count(edge) == 0) { + double offset2 = offset + edge->getLength(); + edge->setSignalOffset(offset2, node); + seen.insert(edge); + check.insert(std::make_pair(edge, offset2)); + } + } + } } } } @@ -1214,17 +1461,23 @@ } const EdgeVector& incoming = node->getIncomingEdges(); const EdgeVector& outgoing = node->getOutgoingEdges(); - if (!node->isTLControlled() && incoming.size() > 1 && !node->geometryLike() && !NBNodeTypeComputer::isRailwayNode(node)) { + if (!node->isTLControlled() && incoming.size() > 1 && !node->geometryLike() + && !NBNodeTypeComputer::isRailwayNode(node) + && node->getType() != NODETYPE_RAIL_CROSSING) { 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) { + if ((inEdge->getSignalOffset() == NBEdge::UNSPECIFIED_SIGNAL_OFFSET || inEdge->getSignalOffset() > signalDist) + && inEdge->getPermissions() != SVC_TRAM) { + //if (node->getID() == "cluster_2292787672_259083790") std::cout << " noTLS, edge=" << inEdge->getID() << " offset=" << inEdge->getSignalOffset() << "\n"; isTLS = false; break; } - if (inEdge->getSignalOffset() == inEdge->getLength()) { - signals.push_back(inEdge->getFromNode()); + NBNode* signal = inEdge->getSignalNode(); + if (signal != nullptr) { + //if (true || node->getID() == "cluster_2648427269_3180391961_3180391964_736234762") std::cout << " edge=" << inEdge->getID() << " signalNode=" << signal->getID() << " offset=" << inEdge->getSignalOffset() << "\n"; + signals.push_back(signal); } } // outgoing edges may be tagged with pedestrian crossings. These @@ -1233,6 +1486,7 @@ const NBEdge* outEdge = *it_i; NBNode* cand = outEdge->getToNode(); if (cand->isTLControlled() && cand->geometryLike() && outEdge->getLength() <= signalDist) { + //if (true || node->getID() == "cluster_2648427269_3180391961_3180391964_736234762") std::cout << " node=" << node->getID() << " outEdge=" << outEdge->getID() << " signalNode=" << cand->getID() << " len=" << outEdge->getLength() << "\n"; signals.push_back(cand); } } @@ -1244,6 +1498,7 @@ tlc.removeFully((*j)->getID()); } } + //if (true) std::cout << " node=" << node->getID() << " signals=" << toString(signals) << "\n"; NBTrafficLightDefinition* tlDef = new NBOwnTLDef("GS_" + node->getID(), node, 0, type); // @todo patch endOffset for all incoming lanes according to the signal positions if (!tlc.insert(tlDef)) { @@ -1273,7 +1528,7 @@ // regard only junctions which are not yet controlled and are not // forbidden to be controlled for (NodeSet::iterator j = c.begin(); j != c.end();) { - if ((*j)->isTLControlled() || find(ncontrolled.begin(), ncontrolled.end(), *j) != ncontrolled.end()) { + if ((*j)->isTLControlled() || std::find(ncontrolled.begin(), ncontrolled.end(), *j) != ncontrolled.end()) { c.erase(j++); } else { ++j; @@ -1329,7 +1584,7 @@ NBNodeCont::joinTLS(NBTrafficLightLogicCont& tlc, double maxdist) { NodeClusters cands; generateNodeClusters(maxdist, cands); - int index = 0; + IDSupplier idSupplier("joinedS_"); for (NodeSet& c : cands) { for (NodeSet::iterator j = c.begin(); j != c.end();) { if (!(*j)->isTLControlled()) { @@ -1338,7 +1593,7 @@ ++j; } } - if (c.size() < 2) { + if (c.size() < 2 || onlyCrossings(c) || customTLID(c)) { continue; } // figure out type of the joined TLS @@ -1355,11 +1610,14 @@ tlc.removeFully(j->getID()); } } - id = "joinedS_" + toString(index++); std::vector nodes; for (NBNode* j : c) { nodes.push_back(j); } + id = idSupplier.getNext(); + while (tlc.getPrograms(id).size() > 0) { + id = idSupplier.getNext(); + } NBTrafficLightDefinition* tlDef = new NBOwnTLDef(id, nodes, 0, type); if (!tlc.insert(tlDef)) { // actually, nothing should fail here @@ -1428,11 +1686,11 @@ void NBNodeCont::clear() { for (NodeCont::iterator i = myNodes.begin(); i != myNodes.end(); i++) { - delete((*i).second); + delete ((*i).second); } myNodes.clear(); - for (std::set::iterator i = myExtractedNodes.begin(); i != myExtractedNodes.end(); i++) { - delete(*i); + for (auto& item : myExtractedNodes) { + delete item.second; } myExtractedNodes.clear(); } @@ -1553,11 +1811,15 @@ if (node->isTLControlled() && (!geometryLike || node->geometryLike())) { // make a copy of tldefs const std::set tldefs = node->getControllingTLS(); + if (geometryLike && (*tldefs.begin())->getNodes().size() > 1) { + // do not remove joined tls when only removing geometry-like tls + continue; + } 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()); + (*it_o)->setSignalOffset((*it_o)->getLength(), nullptr); } } for (std::set::const_iterator it = tldefs.begin(); it != tldefs.end(); ++it) { @@ -1588,7 +1850,8 @@ std::vector avoid = getAllNames(); std::set reserve; if (reservedIDs) { - NBHelpers::loadPrefixedIDsFomFile(OptionsCont::getOptions().getString("reserved-ids"), "node:", reserve); + NBHelpers::loadPrefixedIDsFomFile(OptionsCont::getOptions().getString("reserved-ids"), "node:", reserve); // backward compatibility + NBHelpers::loadPrefixedIDsFomFile(OptionsCont::getOptions().getString("reserved-ids"), "junction:", reserve); // selection format avoid.insert(avoid.end(), reserve.begin(), reserve.end()); } IDSupplier idSupplier("", avoid); diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNodeCont.h sumo-1.2.0+dfsg1/src/netbuild/NBNodeCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBNodeCont.h 2018-10-07 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNodeCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -135,7 +135,7 @@ /** @brief add ids of nodes which shall be joined into a single node * @param[in] cluster The cluster to add */ - void addCluster2Join(std::set cluster); + void addCluster2Join(std::set cluster, NBNode* node); /// @brief Joins loaded junction clusters (see NIXMLNodesHandler) int joinLoadedClusters(NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc); @@ -241,6 +241,13 @@ void setAsTLControlled(NBNode* node, NBTrafficLightLogicCont& tlc, TrafficLightType type, std::string id = ""); /// @} + /** @brief Returns whether the node with the id was deleted explicitly + */ + bool wasRemoved(std::string id) const { + return myExtractedNodes.count(id) != 0; + } + + /// @brief Renames the node. Throws exception if newID already exists void rename(NBNode* node, const std::string& newID); @@ -329,6 +336,7 @@ /// @brief joins the given node clusters void joinNodeClusters(NodeClusters clusters, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc); + void joinNodeCluster(NodeSet clusters, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc, NBNode* predefined = nullptr); /// @} @@ -340,6 +348,12 @@ * @return Whether this node cluster shall be controlled by a tls */ bool shouldBeTLSControlled(const NodeSet& c, double laneSpeedThreshold) const; + + /// @brief check wheter the set of nodes only contains pedestrian crossings + bool onlyCrossings(const NodeSet& c) const; + + /// @brief check wheter the set of nodes contains traffic lights with custom id + bool customTLID(const NodeSet& c) const; /// @} @@ -354,13 +368,13 @@ NodeCont myNodes; /// @brief The extracted nodes which are kept for reference - std::set myExtractedNodes; + NodeCont myExtractedNodes; /// @brief set of node ids which should not be joined std::set myJoinExclusions; /// @brief loaded sets of node ids to join (cleared after use) - std::vector > myClusters2Join; + std::vector, NBNode*> > myClusters2Join; /// @brief sets of node ids which were joined std::vector > myJoinedClusters; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNode.cpp sumo-1.2.0+dfsg1/src/netbuild/NBNode.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBNode.cpp 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNode.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -68,12 +67,14 @@ // minimum length for a weaving section at a combined on-off ramp #define MIN_WEAVE_LENGTH 20.0 +//#define DEBUG_CONNECTION_GUESSING //#define DEBUG_SMOOTH_GEOM //#define DEBUG_PED_STRUCTURES //#define DEBUG_EDGE_SORTING //#define DEBUGCOND true -#define DEBUGCOND (getID() == "C") -#define DEBUGCOND2(obj) ((obj != 0 && (obj)->getID() == "disabled")) +#define DEBUG_NODE_ID "F" +#define DEBUGCOND (getID() == DEBUG_NODE_ID) +#define DEBUGCOND2(obj) ((obj != 0 && (obj)->getID() == DEBUG_NODE_ID)) // =========================================================================== // static members @@ -84,6 +85,7 @@ const int NBNode::AVOID_WIDE_LEFT_TURN(1); const int NBNode::AVOID_WIDE_RIGHT_TURN(2); const int NBNode::FOUR_CONTROL_POINTS(4); +const int NBNode::AVOID_INTERSECTING_LEFT_TURNS(8); // =========================================================================== // method definitions @@ -92,17 +94,16 @@ * NBNode::ApproachingDivider-methods * ----------------------------------------------------------------------- */ NBNode::ApproachingDivider::ApproachingDivider( - EdgeVector* approaching, NBEdge* currentOutgoing) : - myApproaching(approaching), myCurrentOutgoing(currentOutgoing) { - // check whether origin lanes have been given - assert(myApproaching != 0); + const EdgeVector& approaching, NBEdge* currentOutgoing) : + myApproaching(approaching), + myCurrentOutgoing(currentOutgoing), + myIsBikeEdge(currentOutgoing->getPermissions() == SVC_BICYCLE) { // 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); + for (const NBEdge* const approachingEdge : myApproaching) { + for (const NBEdge::Connection& con : approachingEdge->getConnections()) { + if (con.toEdge == myCurrentOutgoing) { + approachedLanes.insert(con.toLane); } } } @@ -112,11 +113,14 @@ // to make it available anyway for (int i = 0; i < currentOutgoing->getNumLanes(); ++i) { if ((currentOutgoing->getPermissions(i) == SVC_PEDESTRIAN + // don't consider bicycle lanes as targets unless the target + // edge is exclusively for bicycles + || (currentOutgoing->getPermissions(i) == SVC_BICYCLE && !myIsBikeEdge) || isForbidden(currentOutgoing->getPermissions(i))) && approachedLanes.count(i) == 0) { continue; } - myAvailableLanes.push_back((int)i); + myAvailableLanes.push_back(i); } } @@ -126,53 +130,61 @@ void NBNode::ApproachingDivider::execute(const int src, const int dest) { - assert((int)myApproaching->size() > src); + assert((int)myApproaching.size() > src); // get the origin edge - NBEdge* incomingEdge = (*myApproaching)[src]; + NBEdge* incomingEdge = myApproaching[src]; if (incomingEdge->getStep() == NBEdge::LANES2LANES_DONE || incomingEdge->getStep() == NBEdge::LANES2LANES_USER) { return; } - std::vector approachingLanes = - incomingEdge->getConnectionLanes(myCurrentOutgoing); - assert(approachingLanes.size() != 0); + if (myAvailableLanes.size() == 0) { + return; + } + std::vector approachingLanes = incomingEdge->getConnectionLanes(myCurrentOutgoing, myIsBikeEdge || incomingEdge->getPermissions() == SVC_BICYCLE); + if (approachingLanes.size() == 0) { + return; + } +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND2(incomingEdge->getToNode())) { + std::cout << "Bre:ex src=" << src << " dest=" << dest << " in=" << incomingEdge->getID() << " apLanes=" << toString(approachingLanes) << "\n"; + } + +#endif std::deque* approachedLanes = spread(approachingLanes, dest); assert(approachedLanes->size() <= myAvailableLanes.size()); // set lanes for (int i = 0; i < (int)approachedLanes->size(); i++) { assert((int)approachingLanes.size() > i); int approached = myAvailableLanes[(*approachedLanes)[i]]; - incomingEdge->setConnection((int) approachingLanes[i], myCurrentOutgoing, - approached, NBEdge::L2L_COMPUTED); + incomingEdge->setConnection(approachingLanes[i], myCurrentOutgoing, approached, NBEdge::L2L_COMPUTED); } delete approachedLanes; } std::deque* -NBNode::ApproachingDivider::spread(const std::vector& approachingLanes, - int dest) const { +NBNode::ApproachingDivider::spread(const std::vector& approachingLanes, int dest) const { std::deque* ret = new std::deque(); - int noLanes = (int) approachingLanes.size(); + const int numLanes = (int)approachingLanes.size(); // when only one lane is approached, we check, whether the double-value // is assigned more to the left or right lane - if (noLanes == 1) { + if (numLanes == 1) { ret->push_back(dest); return ret; } - int noOutgoingLanes = (int)myAvailableLanes.size(); + const int numOutgoingLanes = (int)myAvailableLanes.size(); // ret->push_back(dest); int noSet = 1; int roffset = 1; int loffset = 1; - while (noSet < noLanes) { + while (noSet < numLanes) { // It may be possible, that there are not enough lanes the source // lanes may be divided on // In this case, they remain unset // !!! this is only a hack. It is possible, that this yields in // uncommon divisions - if (noOutgoingLanes == noSet) { + if (numOutgoingLanes == noSet) { return ret; } @@ -181,7 +193,7 @@ // // check whether the left boundary of the approached street has // been overridden; if so, move all lanes to the right - if (dest + loffset >= noOutgoingLanes) { + if (dest + loffset >= numOutgoingLanes) { loffset -= 1; roffset += 1; for (int i = 0; i < (int)ret->size(); i++) { @@ -195,12 +207,12 @@ loffset += 1; // as above - if (noOutgoingLanes == noSet) { + if (numOutgoingLanes == noSet) { return ret; } // now we try to append the next lane to the right side, when needed - if (noSet < noLanes) { + if (noSet < numLanes) { // check whether the right boundary of the approached street has // been overridden; if so, move all lanes to the right if (dest < roffset) { @@ -218,6 +230,7 @@ return ret; } + NBNode::Crossing::Crossing(const NBNode* _node, const EdgeVector& _edges, double _width, bool _priority, int _customTLIndex, int _customTLIndex2, const PositionVector& _customShape) : Parameterised(), node(_node), @@ -247,10 +260,12 @@ myRadius(UNSPECIFIED_RADIUS), myKeepClear(OptionsCont::getOptions().getBool("default.junctions.keep-clear")), myRightOfWay(SUMOXMLDefinitions::RightOfWayValues.get(OptionsCont::getOptions().getString("default.right-of-way"))), + myFringeType(FRINGE_TYPE_DEFAULT), myDiscardAllCrossings(false), myCrossingsLoadedFromSumoNet(0), myDisplacementError(0), - myIsBentPriority(false) { + myIsBentPriority(false), + myTypeWasGuessed(false) { if (!SUMOXMLDefinitions::isValidNetID(myID)) { throw ProcessError("Invalid node id '" + myID + "'."); } @@ -267,10 +282,12 @@ myRadius(UNSPECIFIED_RADIUS), myKeepClear(OptionsCont::getOptions().getBool("default.junctions.keep-clear")), myRightOfWay(SUMOXMLDefinitions::RightOfWayValues.get(OptionsCont::getOptions().getString("default.right-of-way"))), + myFringeType(FRINGE_TYPE_DEFAULT), myDiscardAllCrossings(false), myCrossingsLoadedFromSumoNet(0), myDisplacementError(0), - myIsBentPriority(false) { + myIsBentPriority(false), + myTypeWasGuessed(false) { if (!SUMOXMLDefinitions::isValidNetID(myID)) { throw ProcessError("Invalid node id '" + myID + "'."); } @@ -495,7 +512,7 @@ ret.push_back(endShape.front()); return ret; } else { - return bezier(init, numPoints).smoothedZFront(); + return init.bezier(numPoints).smoothedZFront(); } } @@ -624,14 +641,22 @@ } else if (lengthenBeg || lengthenEnd) { init.push_back(begShapeEndLineRev.positionAtOffset2D(100 - minControlLength)); init.push_back(endShapeBegLine.positionAtOffset2D(100 - minControlLength)); - } else if ((shapeFlag & AVOID_WIDE_LEFT_TURN) != 0 && angle > DEG2RAD(85) && (distBeg > 20 || distEnd > 20)) { + } else if ((shapeFlag & AVOID_WIDE_LEFT_TURN) != 0 + // there are two reasons for enabling special geometry rules: + // 1) sharp edge angles which could cause overshoot + // 2) junction geometries with a large displacement between opposite left turns + // which would cause the default geometry to overlap + && ((shapeFlag & AVOID_INTERSECTING_LEFT_TURNS) != 0 + || (angle > DEG2RAD(95) && (distBeg > 20 || distEnd > 20)))) { + //std::cout << " bezierControlPoints intersect=" << intersect << " dist=" << dist << " distBeg=" << distBeg << " distEnd=" << distEnd << " angle=" << RAD2DEG(angle) << " flag=" << shapeFlag << "\n"; + const double factor = ((shapeFlag & AVOID_INTERSECTING_LEFT_TURNS) == 0 ? 1 + : MIN2(0.6, 16 / dist)); + init.push_back(begShapeEndLineRev.positionAtOffset2D(100 - MIN2(distBeg * factor / 1.2, dist * factor / 1.8))); + init.push_back(endShapeBegLine.positionAtOffset2D(100 - MIN2(distEnd * factor / 1.2, dist * factor / 1.8))); + } else if ((shapeFlag & AVOID_WIDE_RIGHT_TURN) != 0 && angle < DEG2RAD(-95) && (distBeg > 20 || distEnd > 20)) { //std::cout << " bezierControlPoints intersect=" << intersect << " distBeg=" << distBeg << " distEnd=" << distEnd << "\n"; - init.push_back(begShapeEndLineRev.positionAtOffset2D(100 - 10.0)); - init.push_back(endShapeBegLine.positionAtOffset2D(100 - 10.0)); - } else if ((shapeFlag & AVOID_WIDE_RIGHT_TURN) != 0 && angle < DEG2RAD(-85) && (distBeg > 20 || distEnd > 20)) { - //std::cout << " bezierControlPoints intersect=" << intersect << " distBeg=" << distBeg << " distEnd=" << distEnd << "\n"; - init.push_back(begShapeEndLineRev.positionAtOffset2D(100 - 10.0)); - init.push_back(endShapeBegLine.positionAtOffset2D(100 - 10.0)); + init.push_back(begShapeEndLineRev.positionAtOffset2D(100 - MIN2(distBeg / 1.4, dist / 2))); + init.push_back(endShapeBegLine.positionAtOffset2D(100 - MIN2(distEnd / 1.4, dist / 2))); } else { double z; const double z1 = begShapeEndLineRev.positionAtOffset2D(begShapeEndLineRev.nearest_offset_to_point2D(intersect)).z(); @@ -657,7 +682,7 @@ PositionVector -NBNode::computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints, NBNode* recordError) const { +NBNode::computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints, NBNode* recordError, int shapeFlag) const { if (con.fromLane >= fromE->getNumLanes()) { throw ProcessError("Connection '" + con.getDescription(fromE) + "' starts at a non-existant lane."); } @@ -712,10 +737,14 @@ double extrapolateBeg = 5. * fromE->getNumLanes(); double extrapolateEnd = 5. * con.toEdge->getNumLanes(); LinkDirection dir = getDirection(fromE, con.toEdge); - int shapeFlag = 0; if (dir == LINKDIR_LEFT || dir == LINKDIR_TURN) { - shapeFlag = AVOID_WIDE_LEFT_TURN; + shapeFlag += AVOID_WIDE_LEFT_TURN; + } +#ifdef DEBUG_SMOOTH_GEOM + if (DEBUGCOND) { + std::cout << "computeInternalLaneShape node " << getID() << " fromE=" << fromE->getID() << " toE=" << con.toEdge->getID() << "\n"; } +#endif ret = computeSmoothShape(fromShape, toShape, numPoints, fromE->getTurnDestination() == con.toEdge, extrapolateBeg, extrapolateEnd, recordError, shapeFlag); @@ -726,6 +755,10 @@ beg.append(ret); ret = beg; } + if (con.toEdge->isBidiRail() && con.toEdge->getTurnDestination(true)->getEndOffset() > 0) { + PositionVector end = toShape.getSubpart(0, con.toEdge->getTurnDestination(true)->getEndOffset()); + ret.append(end); + } return ret; } @@ -839,7 +872,7 @@ bool NBNode::tlsContConflict(const NBEdge* from, const NBEdge::Connection& c, const NBEdge* foeFrom, const NBEdge::Connection& foe) const { - return (foe.haveVia && isTLControlled() + return (foe.haveVia && isTLControlled() && c.tlLinkIndex >= 0 && foe.tlLinkIndex >= 0 && !foeFrom->isTurningDirectionAt(foe.toEdge) && foes(from, c.toEdge, foeFrom, foe.toEdge) && !needsCont(foeFrom, from, foe, c)); @@ -990,6 +1023,11 @@ // will be added later or not... return; } +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "l2l node=" << getID() << " specialCase a\n"; + } +#endif const int inOffset = MAX2(0, in->getFirstNonPedestrianLaneIndex(FORWARD, true)); const int outOffset = MAX2(0, out->getFirstNonPedestrianLaneIndex(FORWARD, true)); if (in->getStep() <= NBEdge::LANES2EDGES @@ -1020,7 +1058,15 @@ && in2 != out && in1->isConnectedTo(out) && in2->isConnectedTo(out) + && in1->getSpecialLane(SVC_BICYCLE) == -1 + && in2->getSpecialLane(SVC_BICYCLE) == -1 + && out->getSpecialLane(SVC_BICYCLE) == -1 && isLongEnough(out, MIN_WEAVE_LENGTH)) { +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "l2l node=" << getID() << " specialCase b\n"; + } +#endif // for internal: check which one is the rightmost double a1 = in1->getAngleAtNode(this); double a2 = in2->getAngleAtNode(this); @@ -1055,6 +1101,11 @@ && !in->isTurningDirectionAt(out1) && !in->isTurningDirectionAt(out2) ) { +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "l2l node=" << getID() << " specialCase c\n"; + } +#endif // for internal: check which one is the rightmost if (NBContHelper::relative_outgoing_edge_sorter(in)(out2, out1)) { std::swap(out1, out2); @@ -1075,6 +1126,11 @@ // will be added later or not... return; } +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "l2l node=" << getID() << " specialCase d\n"; + } +#endif const int inOffset = MAX2(0, in->getFirstNonPedestrianLaneIndex(FORWARD, true)); const int outOffset = MAX2(0, out->getFirstNonPedestrianLaneIndex(FORWARD, true)); if (in->getStep() <= NBEdge::LANES2EDGES @@ -1097,6 +1153,11 @@ // will be added later or not... return; } +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "l2l node=" << getID() << " specialCase f\n"; + } +#endif int inOffset = MAX2(0, in->getFirstNonPedestrianLaneIndex(FORWARD, true)); const int outOffset = MAX2(0, out->getFirstNonPedestrianLaneIndex(FORWARD, true)); const int reduction = (in->getNumLanes() - inOffset) - (out->getNumLanes() - outOffset); @@ -1118,21 +1179,30 @@ // for every outgoing edge, compute the distribution of the node's // incoming edges on this edge when approaching this edge // the incoming edges' steps will then also be marked as LANE2LANE_RECHECK... - EdgeVector::reverse_iterator i; - for (i = myOutgoingEdges.rbegin(); i != myOutgoingEdges.rend(); i++) { - NBEdge* currentOutgoing = *i; + EdgeVector approaching; + for (NBEdge* currentOutgoing : myOutgoingEdges) { // get the information about edges that do approach this edge - EdgeVector* approaching = getEdgesThatApproach(currentOutgoing); - const int numApproaching = (int)approaching->size(); + getEdgesThatApproach(currentOutgoing, approaching); + const int numApproaching = (int)approaching.size(); if (numApproaching != 0) { ApproachingDivider divider(approaching, currentOutgoing); Bresenham::compute(÷r, numApproaching, divider.numAvailableLanes()); } - delete approaching; +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "l2l node=" << getID() << " bresenham:\n"; + for (NBEdge* e : myIncomingEdges) { + const std::vector& elv = e->getConnections(); + for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { + std::cout << " " << e->getID() << "_" << (*k).fromLane << " -> " << (*k).toEdge->getID() << "_" << (*k).toLane << "\n"; + } + } + } +#endif + int bikeLaneTarget = currentOutgoing->getSpecialLane(SVC_BICYCLE); // ensure that all modes have a connection if possible - for (EdgeVector::const_iterator i = myIncomingEdges.begin(); i != myIncomingEdges.end(); i++) { - NBEdge* incoming = *i; + for (NBEdge* incoming : myIncomingEdges) { if (incoming->getConnectionLanes(currentOutgoing).size() > 0 && incoming->getStep() <= NBEdge::LANES2LANES_DONE) { // no connections are needed for pedestrians during this step // no satisfaction is possible if the outgoing edge disallows @@ -1141,14 +1211,18 @@ const std::vector& elv = incoming->getConnections(); for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { const NBEdge::Connection& c = *k; - if (c.toEdge == currentOutgoing) { + if (c.toEdge == currentOutgoing && c.toLane >= 0) { const SVCPermissions satisfied = (incoming->getPermissions(c.fromLane) & c.toEdge->getPermissions(c.toLane)); //std::cout << " from=" << c.fromLane << " to=" << c.toEdge->getID() << "_" << c.toLane << " satisfied=" << getVehicleClassNames(satisfied) << "\n"; unsatisfied &= ~satisfied; } } if (unsatisfied != 0) { - //std::cout << " unsatisfied modes from edge=" << incoming->getID() << " toEdge=" << currentOutgoing->getID() << " deadModes=" << getVehicleClassNames(unsatisfied) << "\n"; +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << " unsatisfied modes from edge=" << incoming->getID() << " toEdge=" << currentOutgoing->getID() << " deadModes=" << getVehicleClassNames(unsatisfied) << "\n"; + } +#endif int fromLane = 0; while (unsatisfied != 0 && fromLane < incoming->getNumLanes()) { if ((incoming->getPermissions(fromLane) & unsatisfied) != 0) { @@ -1156,16 +1230,71 @@ const SVCPermissions satisfied = incoming->getPermissions(fromLane) & currentOutgoing->getPermissions(toLane) & unsatisfied; if (satisfied != 0 && !incoming->getLaneStruct(fromLane).connectionsDone) { incoming->setConnection((int)fromLane, currentOutgoing, toLane, NBEdge::L2L_COMPUTED); - //std::cout << " new connection from=" << fromLane << " to=" << currentOutgoing->getID() << "_" << toLane << " satisfies=" << getVehicleClassNames(satisfied) << "\n"; +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << " new connection from=" << fromLane << " to=" << currentOutgoing->getID() << "_" << toLane << " satisfies=" << getVehicleClassNames(satisfied) << "\n"; + } +#endif unsatisfied &= ~satisfied; } } } fromLane++; } - //if (unsatisfied != 0) { - // std::cout << " still unsatisfied modes from edge=" << incoming->getID() << " toEdge=" << currentOutgoing->getID() << " deadModes=" << getVehicleClassNames(unsatisfied) << "\n"; - //} +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + if (unsatisfied != 0) { + std::cout << " still unsatisfied modes from edge=" << incoming->getID() << " toEdge=" << currentOutgoing->getID() << " deadModes=" << getVehicleClassNames(unsatisfied) << "\n"; + } + } +#endif + } + } + // prevent dead-end bicycle lanes (they were excluded by the ApproachingDivider) + // and the bicycle mode might already be satisfied by other lanes + // assume that left-turns and turn-arounds are better satisfied from lanes to the left + LinkDirection dir = getDirection(incoming, currentOutgoing); + if (incoming->getStep() <= NBEdge::LANES2LANES_DONE + && ((bikeLaneTarget >= 0 && dir != LINKDIR_TURN) + || dir == LINKDIR_RIGHT || dir == LINKDIR_PARTRIGHT || dir == LINKDIR_STRAIGHT)) { + bool builtConnection = false; + for (int i = 0; i < (int)incoming->getNumLanes(); i++) { + if (incoming->getPermissions(i) == SVC_BICYCLE + && incoming->getConnectionsFromLane(i, currentOutgoing).size() == 0) { + // find a dedicated bike lane as target + if (bikeLaneTarget >= 0) { + incoming->setConnection(i, currentOutgoing, bikeLaneTarget, NBEdge::L2L_COMPUTED); + builtConnection = true; + } else { + // use any lane that allows bicycles + for (int i2 = 0; i2 < (int)currentOutgoing->getNumLanes(); i2++) { + if ((currentOutgoing->getPermissions(i2) & SVC_BICYCLE) != 0) { + // possibly a double-connection + // XXX could use 'true' here but this requires additional work on tls generation + incoming->setConnection(i, currentOutgoing, i2, NBEdge::L2L_COMPUTED, false); + builtConnection = true; + break; + } + } + } + } + } + if (!builtConnection && bikeLaneTarget >= 0 + && incoming->getConnectionsFromLane(-1, currentOutgoing, bikeLaneTarget).size() == 0) { + // find origin lane that allows bicycles + int start = 0; + int end = (int)incoming->getNumLanes(); + int inc = 1; + if (dir == LINKDIR_TURN || dir == LINKDIR_LEFT || dir == LINKDIR_PARTLEFT) { + std::swap(start, end); + inc = -1; + } + for (int i = start; i < end; i += inc) { + if ((incoming->getPermissions(i) & SVC_BICYCLE) != 0) { + incoming->setConnection(i, currentOutgoing, bikeLaneTarget, NBEdge::L2L_COMPUTED); + break; + } + } } } } @@ -1187,19 +1316,22 @@ // In this case, we have to mark the incoming edges as being in state // LANE2LANE( not RECHECK) by hand if (myOutgoingEdges.size() == 0) { - for (i = myIncomingEdges.rbegin(); i != myIncomingEdges.rend(); i++) { - (*i)->markAsInLane2LaneState(); + for (NBEdge* incoming : myIncomingEdges) { + incoming->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"; - // } - //} +#ifdef DEBUG_CONNECTION_GUESSING + if (DEBUGCOND) { + std::cout << "final connections at " << getID() << "\n"; + for (NBEdge* e : myIncomingEdges) { + const std::vector& elv = e->getConnections(); + for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { + std::cout << " " << e->getID() << "_" << (*k).fromLane << " -> " << (*k).toEdge->getID() << "_" << (*k).toLane << "\n"; + } + } + } +#endif } bool @@ -1218,36 +1350,36 @@ return true; } -EdgeVector* -NBNode::getEdgesThatApproach(NBEdge* currentOutgoing) { + +void +NBNode::getEdgesThatApproach(NBEdge* currentOutgoing, EdgeVector& approaching) { // get the position of the node to get the approaching nodes of - EdgeVector::const_iterator i = find(myAllEdges.begin(), - myAllEdges.end(), currentOutgoing); + EdgeVector::const_iterator i = std::find(myAllEdges.begin(), + myAllEdges.end(), currentOutgoing); // get the first possible approaching edge NBContHelper::nextCW(myAllEdges, i); // go through the list of edges clockwise and add the edges - EdgeVector* approaching = new EdgeVector(); + approaching.clear(); for (; *i != currentOutgoing;) { // check only incoming edges if ((*i)->getToNode() == this && (*i)->getTurnDestination() != currentOutgoing) { std::vector connLanes = (*i)->getConnectionLanes(currentOutgoing); if (connLanes.size() != 0) { - approaching->push_back(*i); + approaching.push_back(*i); } } NBContHelper::nextCW(myAllEdges, i); } - return approaching; } void NBNode::replaceOutgoing(NBEdge* which, NBEdge* by, int laneOff) { // replace the edge in the list of outgoing nodes - EdgeVector::iterator i = find(myOutgoingEdges.begin(), myOutgoingEdges.end(), which); + EdgeVector::iterator i = std::find(myOutgoingEdges.begin(), myOutgoingEdges.end(), which); if (i != myOutgoingEdges.end()) { (*i) = by; - i = find(myAllEdges.begin(), myAllEdges.end(), which); + i = std::find(myAllEdges.begin(), myAllEdges.end(), which); (*i) = by; } // replace the edge in connections of incoming edges @@ -1280,10 +1412,10 @@ void NBNode::replaceIncoming(NBEdge* which, NBEdge* by, int laneOff) { // replace the edge in the list of incoming nodes - EdgeVector::iterator i = find(myIncomingEdges.begin(), myIncomingEdges.end(), which); + EdgeVector::iterator i = std::find(myIncomingEdges.begin(), myIncomingEdges.end(), which); if (i != myIncomingEdges.end()) { (*i) = by; - i = find(myAllEdges.begin(), myAllEdges.end(), which); + i = std::find(myAllEdges.begin(), myAllEdges.end(), which); (*i) = by; } // replace within the connetion prohibition dependencies @@ -1385,13 +1517,13 @@ bool NBNode::hasIncoming(const NBEdge* const e) const { - return find(myIncomingEdges.begin(), myIncomingEdges.end(), e) != myIncomingEdges.end(); + return std::find(myIncomingEdges.begin(), myIncomingEdges.end(), e) != myIncomingEdges.end(); } bool NBNode::hasOutgoing(const NBEdge* const e) const { - return find(myOutgoingEdges.begin(), myOutgoingEdges.end(), e) != myOutgoingEdges.end(); + return std::find(myOutgoingEdges.begin(), myOutgoingEdges.end(), e) != myOutgoingEdges.end(); } @@ -1458,14 +1590,14 @@ void NBNode::removeEdge(NBEdge* edge, bool removeFromConnections) { - EdgeVector::iterator i = find(myAllEdges.begin(), myAllEdges.end(), edge); + EdgeVector::iterator i = std::find(myAllEdges.begin(), myAllEdges.end(), edge); if (i != myAllEdges.end()) { myAllEdges.erase(i); - i = find(myOutgoingEdges.begin(), myOutgoingEdges.end(), edge); + i = std::find(myOutgoingEdges.begin(), myOutgoingEdges.end(), edge); if (i != myOutgoingEdges.end()) { myOutgoingEdges.erase(i); } else { - i = find(myIncomingEdges.begin(), myIncomingEdges.end(), edge); + i = std::find(myIncomingEdges.begin(), myIncomingEdges.end(), edge); if (i != myIncomingEdges.end()) { myIncomingEdges.erase(i); } else { @@ -1611,7 +1743,7 @@ return false; } bool result = false; - EdgeVector::const_iterator it = find(myAllEdges.begin(), myAllEdges.end(), from); + EdgeVector::const_iterator it = std::find(myAllEdges.begin(), myAllEdges.end(), from); if (fromLane < fromLane2) { // conflict if 'to' comes before 'to2' going clockwise starting at 'from' while (*it != to2) { @@ -1779,7 +1911,7 @@ if (abs((int) angle) + 1 < 45) { // check whether there is a straighter edge EdgeVector::const_iterator i = - find(myOutgoingEdges.begin(), myOutgoingEdges.end(), outgoing); + std::find(myOutgoingEdges.begin(), myOutgoingEdges.end(), outgoing); if (leftHand) { NBContHelper::nextCCW(myOutgoingEdges, i); } else { @@ -1805,7 +1937,7 @@ if (angle > 0) { // check whether any other edge goes further to the right EdgeVector::const_iterator i = - find(myAllEdges.begin(), myAllEdges.end(), outgoing); + std::find(myAllEdges.begin(), myAllEdges.end(), outgoing); if (leftHand) { NBContHelper::nextCCW(myAllEdges, i); } else { @@ -1828,7 +1960,7 @@ } // check whether any other edge goes further to the left EdgeVector::const_iterator i = - find(myAllEdges.begin(), myAllEdges.end(), outgoing); + std::find(myAllEdges.begin(), myAllEdges.end(), outgoing); if (leftHand) { NBContHelper::nextCW(myAllEdges, i); } else { @@ -1838,7 +1970,7 @@ if ((*i)->getFromNode() == this && !incoming->isTurningDirectionAt(*i) && (vehPerm & (*i)->getPermissions()) != 0) { - //std::cout << incoming->getID() << " -> " << outgoing->getID() << " partLeft because auf " << (*i)->getID() << "\n"; + //std::cout << incoming->getID() << " -> " << outgoing->getID() << " partLeft because auf " << (*i)->getID() << " turn=" << incoming->getTurnDestination(true) << "\n"; return LINKDIR_PARTLEFT; } if (leftHand) { @@ -1872,7 +2004,12 @@ if (myType == NODETYPE_ZIPPER && mustBrake(incoming, outgoing, fromlane, toLane, false)) { return LINKSTATE_ZIPPER; } - if ((!incoming->isInternal() && mustBrake(incoming, outgoing, fromlane, toLane, true)) && !mayDefinitelyPass) { + if (!mayDefinitelyPass + && mustBrake(incoming, outgoing, fromlane, toLane, true) + // legacy mode + && (!incoming->isInternal() || getDirection(incoming, outgoing) != LINKDIR_STRAIGHT) + // avoid linkstate minor at pure railway nodes + && (incoming->getPriority() != outgoing->getPriority() || !NBNodeTypeComputer::isRailwayNode(this))) { return myType == NODETYPE_PRIORITY_STOP ? LINKSTATE_STOP : LINKSTATE_MINOR; // minor road } // traffic lights are not regarded here @@ -2290,7 +2427,7 @@ std::vector NBNode::getCrossings() const { std::vector result; - for (auto c : myCrossings) { + for (Crossing* const c : myCrossings) { if (c->valid) { result.push_back(c); } @@ -2819,9 +2956,9 @@ } } -bool +bool NBNode::includes(const std::set& super, - const std::set& sub) { + const std::set& sub) { // for some reason std::include does not work reliably for (const NBEdge* e : sub) { if (super.count(const_cast(e)) == 0) { @@ -2843,8 +2980,8 @@ } for (auto c : getCrossings()) { const EdgeVector& edges = c->edges; - EdgeVector::const_iterator it1 = find(edges.begin(), edges.end(), e1); - EdgeVector::const_iterator it2 = find(edges.begin(), edges.end(), e2); + EdgeVector::const_iterator it1 = std::find(edges.begin(), edges.end(), e1); + EdgeVector::const_iterator it2 = std::find(edges.begin(), edges.end(), e2); if (it1 != edges.end() && it2 != edges.end()) { return true; } @@ -2856,10 +2993,10 @@ EdgeVector NBNode::edgesBetween(const NBEdge* e1, const NBEdge* e2) const { EdgeVector result; - EdgeVector::const_iterator it = find(myAllEdges.begin(), myAllEdges.end(), e1); + EdgeVector::const_iterator it = std::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); + EdgeVector::const_iterator it_end = std::find(myAllEdges.begin(), myAllEdges.end(), e2); assert(it_end != myAllEdges.end()); while (it != it_end) { result.push_back(*it); @@ -2880,21 +3017,26 @@ bool NBNode::geometryLike() const { - if (myIncomingEdges.size() == 1 && myOutgoingEdges.size() == 1) { + return geometryLike(myIncomingEdges, myOutgoingEdges); +} + +bool +NBNode::geometryLike(const EdgeVector& incoming, const EdgeVector& outgoing) const { + if (incoming.size() == 1 && outgoing.size() == 1) { return true; } - if (myIncomingEdges.size() == 2 && myOutgoingEdges.size() == 2) { + if (incoming.size() == 2 && outgoing.size() == 2) { // check whether the incoming and outgoing edges are pairwise (near) parallel and // thus the only cross-connections could be turn-arounds - NBEdge* in0 = myIncomingEdges[0]; - NBEdge* in1 = myIncomingEdges[1]; - NBEdge* out0 = myOutgoingEdges[0]; - NBEdge* out1 = myOutgoingEdges[1]; + NBEdge* in0 = incoming[0]; + NBEdge* in1 = incoming[1]; + NBEdge* out0 = outgoing[0]; + NBEdge* out1 = outgoing[1]; if ((in0->isTurningDirectionAt(out0) || in0->isTurningDirectionAt(out1)) && (in1->isTurningDirectionAt(out0) || in1->isTurningDirectionAt(out1))) { return true; } - for (EdgeVector::const_iterator it = myIncomingEdges.begin(); it != myIncomingEdges.end(); ++it) { + for (EdgeVector::const_iterator it = incoming.begin(); it != incoming.end(); ++it) { NBEdge* inEdge = *it; double angle0 = fabs(NBHelpers::relAngle(inEdge->getAngleAtNode(this), out0->getAngleAtNode(this))); double angle1 = fabs(NBHelpers::relAngle(inEdge->getAngleAtNode(this), out1->getAngleAtNode(this))); @@ -2908,7 +3050,6 @@ return false; } - void NBNode::setRoundabout() { if (myType == NODETYPE_RIGHT_BEFORE_LEFT) { @@ -3203,21 +3344,22 @@ } } -std::vector +std::vector > NBNode::getEndPoints() const { // using a set would be nicer but we want to have some slack in position identification - std::vector result; + std::vector >result; for (NBEdge* e : myAllEdges) { Position pos = this == e->getFromNode() ? e->getGeometry().front() : e->getGeometry().back(); + const std::string origID = e->getParameter(this == e->getFromNode() ? "origFrom" : "origTo"); bool unique = true; - for (Position p2 : result) { - if (pos.almostSame(p2)) { + for (const auto& pair : result) { + if (pos.almostSame(pair.first) || (origID != "" && pair.second == origID)) { unique = false; break; } } if (unique) { - result.push_back(pos); + result.push_back(std::make_pair(pos, origID)); } } return result; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNode.h sumo-1.2.0+dfsg1/src/netbuild/NBNode.h --- sumo-1.1.0+dfsg1/src/netbuild/NBNode.h 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNode.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -86,22 +86,12 @@ * but may also be transposed in full when there is not enough space. */ class ApproachingDivider : public Bresenham::BresenhamCallBack { - private: - /// @brief The list of edges that approach the current edge - EdgeVector* myApproaching; - - /// @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); + ApproachingDivider(const EdgeVector& approaching, NBEdge* currentOutgoing); /// @brief Destructor ~ApproachingDivider(); @@ -117,6 +107,23 @@ /// @brief the method that spreads the wished number of lanes from the the lane given by the bresenham-call to both left and right std::deque* spread(const std::vector& approachingLanes, int dest) const; + private: + /// @brief The list of edges that approach the current edge + const EdgeVector& myApproaching; + + /// @brief The approached current edge + NBEdge* myCurrentOutgoing; + + /// @brief The available lanes to which connections shall be built + std::vector myAvailableLanes; + + /// @brief whether the outgoing edge is exclusively used by bikes + bool myIsBikeEdge; + + private: + /// @brief Invalidated assignment operator. + ApproachingDivider& operator=(const ApproachingDivider&) = delete; + }; /** @struct Crossing @@ -208,6 +215,7 @@ static const int AVOID_WIDE_RIGHT_TURN; static const int AVOID_WIDE_LEFT_TURN; static const int FOUR_CONTROL_POINTS; + static const int AVOID_INTERSECTING_LEFT_TURNS; public: /**@brief Constructor @@ -282,6 +290,11 @@ RightOfWay getRightOfWay() const { return myRightOfWay; } + + /// @brief Returns fringe type + FringeType getFringeType() const { + return myFringeType; + } /// @} /// @name Methods for dealing with assigned traffic lights @@ -507,6 +520,11 @@ myRightOfWay = rightOfWay; } + /// @brief set method for computing right-of-way + void setFringeType(FringeType fringeType) { + myFringeType = fringeType; + } + /// @brief return whether the shape was set by the user bool hasCustomShape() const { return myHaveCustomPoly; @@ -543,7 +561,7 @@ * @param[in] recordError The node itself if the displacement error during shape computation shall be recorded * @return The shape of the internal lane */ - PositionVector computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints, NBNode* recordError = 0) const; + PositionVector computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints, NBNode* recordError = 0, int shapeFlag = 0) const; /**@brief Compute a smooth curve between the given geometries * @param[in] begShape The geometry at the start @@ -623,6 +641,7 @@ /// @brief whether this is structurally similar to a geometry node bool geometryLike() const; + bool geometryLike(const EdgeVector& incoming, const EdgeVector& outgoing) const; /// @brief update the type of this node as a roundabout void setRoundabout(); @@ -740,22 +759,27 @@ } /// @brief return whether a priority road turns at this node - bool isBentPriority() { + bool isBentPriority() const { return myIsBentPriority; } + /// @brief return whether a priority road turns at this node + bool typeWasGuessed() const { + return myTypeWasGuessed; + } + /// @brief detects whether a given junction splits or merges lanes while keeping constant road width bool isConstantWidthTransition() const; /// @brief return list of unique endpoint coordinates of all edges at this node - std::vector getEndPoints() const; + std::vector > getEndPoints() const; private: /// @brief sets the priorites in case of a priority junction void setPriorityJunctionPriorities(); /// @brief returns a list of edges which are connected to the given outgoing edge - EdgeVector* getEdgesThatApproach(NBEdge* currentOutgoing); + void getEdgesThatApproach(NBEdge* currentOutgoing, EdgeVector& approaching); /// @brief replace incoming connections prohibitions void replaceInConnectionProhibitions(NBEdge* which, NBEdge* by, int whichLaneOff, int byLaneOff); @@ -780,7 +804,7 @@ /// @brief returns whether sub is a subset of super static bool includes(const std::set& super, - const std::set& sub); + const std::set& sub); private: /// @brief The position the node lies at @@ -834,6 +858,9 @@ /// @brief how to compute right of way for this node RightOfWay myRightOfWay; + /// @brief fringe type of this node + FringeType myFringeType; + /// @brief whether to discard all pedestrian crossings bool myDiscardAllCrossings; @@ -848,6 +875,9 @@ */ bool myIsBentPriority; + /// @brief whether the node type was guessed rather than loaded + bool myTypeWasGuessed; + private: /// @brief invalidated copy constructor diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNodeShapeComputer.cpp sumo-1.2.0+dfsg1/src/netbuild/NBNodeShapeComputer.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBNodeShapeComputer.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNodeShapeComputer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -555,39 +555,38 @@ 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(); i++) { + for (NBEdge* const edge : myNode.myAllEdges) { // store current edge's boundary as current ccw/cw boundary try { - geomsCCW[*i] = (*i)->getCCWBoundaryLine(myNode); + geomsCCW[edge] = edge->getCCWBoundaryLine(myNode); } catch (InvalidArgument& e) { WRITE_WARNING("While computing intersection geometry at junction '" + myNode.getID() + "': " + std::string(e.what())); - geomsCCW[*i] = (*i)->getGeometry(); + geomsCCW[edge] = edge->getGeometry(); } try { - geomsCW[*i] = (*i)->getCWBoundaryLine(myNode); + geomsCW[edge] = edge->getCWBoundaryLine(myNode); } catch (InvalidArgument& e) { WRITE_WARNING("While computing intersection geometry at junction '" + myNode.getID() + "': " + std::string(e.what())); - geomsCW[*i] = (*i)->getGeometry(); + geomsCW[edge] = edge->getGeometry(); } // ensure the boundary is valid - if (geomsCCW[*i].length2D() < NUMERICAL_EPS) { - geomsCCW[*i] = (*i)->getGeometry(); + if (geomsCCW[edge].length2D() < NUMERICAL_EPS) { + geomsCCW[edge] = edge->getGeometry(); } - if (geomsCW[*i].length2D() < NUMERICAL_EPS) { - geomsCW[*i] = (*i)->getGeometry(); + if (geomsCW[edge].length2D() < NUMERICAL_EPS) { + geomsCW[edge] = edge->getGeometry(); } // extend the boundary by extroplating it by 100m - geomsCCW[*i].extrapolate2D(100, true); - geomsCW[*i].extrapolate2D(100, true); + geomsCCW[edge].extrapolate2D(100, true); + geomsCW[edge].extrapolate2D(100, true); } // 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 double angleChangeLookahead = 35; EdgeSet foundOpposite; - for (i = myNode.myAllEdges.begin(); i != myNode.myAllEdges.end(); i++) { + for (EdgeVector::const_iterator i = myNode.myAllEdges.begin(); i != myNode.myAllEdges.end(); i++) { EdgeVector::const_iterator j; if (i == myNode.myAllEdges.end() - 1) { j = myNode.myAllEdges.begin(); @@ -712,7 +711,7 @@ EdgeVector newAll = myNode.myAllEdges; for (NBEdge* e1 : all) { // determine which of the edges marks the outer boundary - auto e2NewAll = find(newAll.begin(), newAll.end(), e1); + auto e2NewAll = std::find(newAll.begin(), newAll.end(), e1); #ifdef DEBUG_NODE_SHAPE if (DEBUGCOND) std::cout << "computeUniqueDirectionList e1=" << e1->getID() << " deleted=" << (e2NewAll == newAll.end()) @@ -721,7 +720,7 @@ if (e2NewAll == newAll.end()) { continue; } - auto e1It = find(all.begin(), all.end(), e1); + auto e1It = std::find(all.begin(), all.end(), e1); auto bestCCW = e1It; auto bestCW = e1It; bool changed = true; @@ -733,7 +732,7 @@ std::cout << " e2=" << e2->getID() << "\n"; } #endif - auto e2It = find(all.begin(), all.end(), e2); + auto e2It = std::find(all.begin(), all.end(), e2); if (e2It + 1 == bestCCW || (e2It == (all.end() - 1) && bestCCW == all.begin())) { bestCCW = e2It; changed = true; @@ -763,7 +762,7 @@ } // clean up for (NBEdge* e2 : same[e1]) { - auto e2NewAll = find(newAll.begin(), newAll.end(), e2); + auto e2NewAll = std::find(newAll.begin(), newAll.end(), e2); if (e2NewAll != newAll.end()) { newAll.erase(e2NewAll); } @@ -894,7 +893,7 @@ maxLeftAngle = angle; // all edges clockwise between in and out count as extra width extraWidthLeft = 0; - EdgeVector::const_iterator pIn = find(myNode.getEdges().begin(), myNode.getEdges().end(), in); + EdgeVector::const_iterator pIn = std::find(myNode.getEdges().begin(), myNode.getEdges().end(), in); NBContHelper::nextCW(myNode.getEdges(), pIn); while (*pIn != out) { extraWidthLeft += (*pIn)->getTotalWidth(); diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBNodeShapeComputer.h sumo-1.2.0+dfsg1/src/netbuild/NBNodeShapeComputer.h --- sumo-1.1.0+dfsg1/src/netbuild/NBNodeShapeComputer.h 2018-06-21 22:00:28.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBNodeShapeComputer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBOwnTLDef.cpp sumo-1.2.0+dfsg1/src/netbuild/NBOwnTLDef.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBOwnTLDef.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBOwnTLDef.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,10 +37,17 @@ #include #include +#define HEIGH_WEIGHT 2 +#define LOW_WEIGHT .5; + #define MIN_GREEN_TIME 5 //#define DEBUG_STREAM_ORDERING -#define DEBUGCOND true +//#define DEBUG_PHASES +//#define DEBUGCOND (getID() == "cluster_251050941_280598736_280598739_28902891_3142549227_3142550438") +//#define DEBUGEDGE(edge) (edge->getID() == "23209153#1" || edge->getID() == "319583927#0") +//#define DEBUGCOND (true) +//#define DEBUGEDGE(edge) (true) // =========================================================================== // member method definitions @@ -82,10 +89,10 @@ case LINKDIR_STRAIGHT: case LINKDIR_PARTLEFT: case LINKDIR_PARTRIGHT: - return 2.; + return HEIGH_WEIGHT; case LINKDIR_LEFT: case LINKDIR_RIGHT: - return .5; + return LOW_WEIGHT; default: break; } @@ -107,14 +114,46 @@ if (e2->getTurnDestination() == (*e2c).toEdge) { continue; } - if (!forbids(e1, (*e1c).toEdge, e2, (*e2c).toEdge, true)) { - val += getDirectionalWeight(e1->getToNode()->getDirection(e1, (*e1c).toEdge)); - val += getDirectionalWeight(e2->getToNode()->getDirection(e2, (*e2c).toEdge)); + const double sign = (forbids(e1, (*e1c).toEdge, e2, (*e2c).toEdge, true) + || forbids(e2, (*e2c).toEdge, e1, (*e1c).toEdge, true)) ? -1 : 1; + double w1; + double w2; + if (e1->getJunctionPriority(e1->getToNode()) == e2->getJunctionPriority(e2->getToNode())) { + w1 = getDirectionalWeight(e1->getToNode()->getDirection(e1, (*e1c).toEdge)); + w2 = getDirectionalWeight(e2->getToNode()->getDirection(e2, (*e2c).toEdge)); + } else { + if (e1->getJunctionPriority(e1->getToNode()) > e2->getJunctionPriority(e2->getToNode())) { + w1 = HEIGH_WEIGHT; + w2 = LOW_WEIGHT; + } else { + w1 = LOW_WEIGHT; + w2 = HEIGH_WEIGHT; + } + if (sign == -1) { + // extra penalty if edges with different junction priority are in conflict + w1 *= 2; + w2 *= 2; + } } + val += sign * w1; + val += sign * w2; +#ifdef DEBUG_STREAM_ORDERING + if (DEBUGCOND && DEBUGEDGE(e2) && DEBUGEDGE(e1)) { + std::cout << " sign=" << sign << " w1=" << w1 << " w2=" << w2 << " val=" << val + << " c1=" << (*e1c).getDescription(e1) + << " c2=" << (*e2c).getDescription(e2) + << "\n"; + } +#endif } } } } +#ifdef DEBUG_STREAM_ORDERING + if (DEBUGCOND && DEBUGEDGE(e2) && DEBUGEDGE(e1)) { + std::cout << " computeUnblockedWeightedStreamNumber e1=" << e1->getID() << " e2=" << e2->getID() << " val=" << val << "\n"; + } +#endif return val; } @@ -122,7 +161,7 @@ std::pair NBOwnTLDef::getBestCombination(const EdgeVector& edges) { std::pair bestPair(static_cast(nullptr), static_cast(nullptr)); - double bestValue = -1; + double bestValue = -std::numeric_limits::max(); for (EdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) { for (EdgeVector::const_iterator j = i + 1; j != edges.end(); ++j) { const double value = computeUnblockedWeightedStreamNumber(*i, *j); @@ -142,6 +181,16 @@ } } } + if (bestValue <= 0) { + // do not group edges + bestPair.second = nullptr; + + } +#ifdef DEBUG_STREAM_ORDERING + if (DEBUGCOND) { + std::cout << " getBestCombination bestValue=" << bestValue << " best=" << Named::getIDSecure(bestPair.first) << ", " << Named::getIDSecure(bestPair.second) << "\n"; + } +#endif return bestPair; } @@ -176,7 +225,9 @@ #endif incoming.erase(find(incoming.begin(), incoming.end(), ret.first)); - incoming.erase(find(incoming.begin(), incoming.end(), ret.second)); + if (ret.second != nullptr) { + incoming.erase(find(incoming.begin(), incoming.end(), ret.second)); + } return ret; } @@ -191,7 +242,7 @@ myRightOnRedConflicts.clear(); const SUMOTime brakingTime = TIME2STEPS(brakingTimeSeconds); const SUMOTime leftTurnTime = TIME2STEPS(OptionsCont::getOptions().getInt("tls.left-green.time")); - const SUMOTime minDur = myType == TLTYPE_STATIC ? UNSPECIFIED_DURATION : TIME2STEPS(OptionsCont::getOptions().getInt("tls.min-dur")); + const SUMOTime minMinDur = myType == TLTYPE_STATIC ? UNSPECIFIED_DURATION : TIME2STEPS(OptionsCont::getOptions().getInt("tls.min-dur")); const SUMOTime maxDur = myType == TLTYPE_STATIC ? UNSPECIFIED_DURATION : TIME2STEPS(OptionsCont::getOptions().getInt("tls.max-dur")); // build complete lists first @@ -200,47 +251,58 @@ std::vector isTurnaround; std::vector hasTurnLane; std::vector fromLanes; - int noLanesAll = 0; + std::vector toLanes; int noLinksAll = 0; - for (int i1 = 0; i1 < (int)incoming.size(); i1++) { - int noLanes = incoming[i1]->getNumLanes(); - noLanesAll += noLanes; - for (int i2 = 0; i2 < noLanes; i2++) { - NBEdge* fromEdge = incoming[i1]; - std::vector approached = fromEdge->getConnectionsFromLane(i2); - noLinksAll += (int) approached.size(); + for (NBEdge* const fromEdge : incoming) { + const int numLanes = fromEdge->getNumLanes(); + for (int i2 = 0; i2 < numLanes; i2++) { + bool hasLeft = false; bool hasStraight = false; - for (int i3 = 0; i3 < (int)approached.size(); i3++) { - if (!fromEdge->mayBeTLSControlled(i2, approached[i3].toEdge, approached[i3].toLane)) { - --noLinksAll; + bool hasRight = false; + bool hasTurnaround = false; + for (const NBEdge::Connection& approached : fromEdge->getConnectionsFromLane(i2)) { + if (!fromEdge->mayBeTLSControlled(i2, approached.toEdge, approached.toLane)) { continue; } - assert(i3 < (int)approached.size()); - NBEdge* toEdge = approached[i3].toEdge; fromEdges.push_back(fromEdge); - fromLanes.push_back((int)i2); - toEdges.push_back(toEdge); - if (toEdge != nullptr) { - isTurnaround.push_back(fromEdge->isTurningDirectionAt(toEdge)); + fromLanes.push_back(i2); + toLanes.push_back(approached.toLane); + toEdges.push_back(approached.toEdge); + if (approached.toEdge != nullptr) { + isTurnaround.push_back(fromEdge->isTurningDirectionAt(approached.toEdge)); } else { isTurnaround.push_back(true); } - if (fromEdge->getToNode()->getDirection(fromEdge, toEdge) == LINKDIR_STRAIGHT) { + LinkDirection dir = fromEdge->getToNode()->getDirection(fromEdge, approached.toEdge); + if (dir == LINKDIR_STRAIGHT) { hasStraight = true; + } else if (dir == LINKDIR_RIGHT || dir == LINKDIR_PARTRIGHT) { + hasRight = true; + } else if (dir == LINKDIR_LEFT || dir == LINKDIR_PARTLEFT) { + hasLeft = true; + } else if (dir == LINKDIR_TURN) { + hasTurnaround = true; } + noLinksAll++; } - for (int i3 = 0; i3 < (int)approached.size(); i3++) { - hasTurnLane.push_back(!hasStraight); + for (const NBEdge::Connection& approached : fromEdge->getConnectionsFromLane(i2)) { + if (!fromEdge->mayBeTLSControlled(i2, approached.toEdge, approached.toLane)) { + continue; + } + hasTurnLane.push_back( + (hasLeft && !hasStraight && !hasRight) + || (!hasLeft && !hasTurnaround && hasRight)); } + //std::cout << " from=" << fromEdge->getID() << "_" << i2 << " hasTurnLane=" << hasTurnLane.back() << " s=" << hasStraight << " l=" << hasLeft << " r=" << hasRight << " t=" << hasTurnaround << "\n"; } } // collect crossings std::vector crossings; - for (std::vector::iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { - const std::vector& c = (*i)->getCrossings(); + for (NBNode* const node : myControlledNodes) { + const std::vector& c = node->getCrossings(); if (!onlyConts) { // set tl indices for crossings - (*i)->setCrossingTLIndices(getID(), noLinksAll); + node->setCrossingTLIndices(getID(), noLinksAll); } copy(c.begin(), c.end(), std::back_inserter(crossings)); noLinksAll += (int)c.size(); @@ -251,11 +313,16 @@ const SUMOTime greenTime = TIME2STEPS(OptionsCont::getOptions().getInt("tls.green.time")); const SUMOTime allRedTime = TIME2STEPS(OptionsCont::getOptions().getInt("tls.allred.time")); const double minorLeftSpeedThreshold = OptionsCont::getOptions().getFloat("tls.minor-left.max-speed"); - const double groupOpposites = OptionsCont::getOptions().getString("tls.layout") == "opposites"; + // left-turn phases do not work well for joined tls, so we build incoming instead + const double groupOpposites = (OptionsCont::getOptions().getString("tls.layout") == "opposites" + && (myControlledNodes.size() <= 2 || corridorLike())); + // build all phases std::vector greenPhases; // indices of green phases std::vector hadGreenMajor(noLinksAll, false); while (toProc.size() > 0) { + bool groupTram = false; + bool groupOther = false; std::pair chosen; if (groupOpposites) { if (incoming.size() == 2) { @@ -271,27 +338,60 @@ } } else { chosen = getBestPair(toProc); + if (chosen.second == nullptr && chosen.first->getPermissions() == SVC_TRAM) { + groupTram = true; + for (auto it = toProc.begin(); it != toProc.end();) { + if ((*it)->getPermissions() == SVC_TRAM) { + it = toProc.erase(it); + } else { + it++; + } + } + } } } else { - chosen = std::pair(toProc[0], static_cast(nullptr)); + NBEdge* chosenEdge = toProc[0]; + chosen = std::pair(chosenEdge, static_cast(nullptr)); toProc.erase(toProc.begin()); + SVCPermissions perms = chosenEdge->getPermissions(); + if (perms == SVC_TRAM) { + groupTram = true; + } else if ((perms & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_DELIVERY)) == 0) { + groupOther = true; + } + // group all edges with the same permissions into a single phase (later) + if (groupTram || groupOther) { + for (auto it = toProc.begin(); it != toProc.end();) { + if ((*it)->getPermissions() == perms) { + it = toProc.erase(it); + } else { + it++; + } + } + } } int pos = 0; std::string state((int) noLinksAll, 'r'); - //std::cout << " computing " << getID() << " prog=" << getProgramID() << " cho1=" << Named::getIDSecure(chosen.first) << " cho2=" << Named::getIDSecure(chosen.second) << " toProc=" << toString(toProc) << "\n"; +#ifdef DEBUG_PHASES + if (DEBUGCOND) { + std::cout << " computing " << getID() << " prog=" << getProgramID() << " cho1=" << Named::getIDSecure(chosen.first) << " cho2=" << Named::getIDSecure(chosen.second) << " toProc=" << toString(toProc) << " bentPrio=" << chosen.first->getToNode()->isBentPriority() << "\n"; + } +#endif // plain straight movers - for (int i1 = 0; i1 < (int) incoming.size(); ++i1) { - NBEdge* fromEdge = incoming[i1]; + double maxSpeed = 0; + bool haveGreen = false; + for (const NBEdge* const fromEdge : incoming) { const bool inChosen = fromEdge == chosen.first || fromEdge == chosen.second; //chosen.find(fromEdge)!=chosen.end(); const int numLanes = fromEdge->getNumLanes(); for (int i2 = 0; i2 < numLanes; i2++) { - std::vector approached = fromEdge->getConnectionsFromLane(i2); - for (int i3 = 0; i3 < (int)approached.size(); ++i3) { - if (!fromEdge->mayBeTLSControlled(i2, approached[i3].toEdge, approached[i3].toLane)) { + for (const NBEdge::Connection& approached : fromEdge->getConnectionsFromLane(i2)) { + if (!fromEdge->mayBeTLSControlled(i2, approached.toEdge, approached.toLane)) { continue; } if (inChosen) { state[pos] = 'G'; + haveGreen = true; + maxSpeed = MAX2(maxSpeed, fromEdge->getSpeed()); } else { state[pos] = 'r'; } @@ -299,27 +399,35 @@ } } } - //std::cout << " state after plain straight movers=" << state << "\n"; + if (!haveGreen) { + continue; + } + +#ifdef DEBUG_PHASES + if (DEBUGCOND) { + std::cout << " state after plain straight movers " << state << "\n"; + } +#endif // correct behaviour for those that are not in chosen, but may drive, though - state = allowFollowersOfChosen(state, fromEdges, toEdges); + state = allowCompatible(state, fromEdges, toEdges, fromLanes, toLanes); + if (groupTram) { + state = allowByVClass(state, fromEdges, toEdges, SVC_TRAM); + } else if (groupOther) { + state = allowByVClass(state, fromEdges, toEdges, SVC_PEDESTRIAN | SVC_BICYCLE | SVC_DELIVERY); + } +#ifdef DEBUG_PHASES + if (DEBUGCOND) { + std::cout << " state after grouping by vClass " << state << "\n"; + } +#endif if (groupOpposites || chosen.first->getToNode()->getType() == NODETYPE_TRAFFIC_LIGHT_RIGHT_ON_RED) { - for (int i1 = 0; i1 < pos; ++i1) { - if (state[i1] == 'G') { - continue; - } - bool isForbidden = false; - for (int i2 = 0; i2 < pos && !isForbidden; ++i2) { - if (state[i2] == 'G' && !isTurnaround[i2] && - (forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1], true) || forbids(fromEdges[i1], toEdges[i1], fromEdges[i2], toEdges[i2], true))) { - isForbidden = true; - } - } - if (!isForbidden && !hasCrossing(fromEdges[i1], toEdges[i1], crossings)) { - state[i1] = 'G'; - } - } + state = allowUnrelated(state, fromEdges, toEdges, isTurnaround, crossings); + } +#ifdef DEBUG_PHASES + if (DEBUGCOND) { + std::cout << " state after finding allowUnrelated " << state << "\n"; } - //std::cout << " state after finding additional 'G's=" << state << "\n"; +#endif // correct behaviour for those that have to wait (mainly left-mover) bool haveForbiddenLeftMover = false; std::vector rightTurnConflicts(pos, false); @@ -329,7 +437,11 @@ hadGreenMajor[i1] = true; } } - //std::cout << " state after correcting left movers=" << state << "\n"; +#ifdef DEBUG_PHASES + if (DEBUGCOND) { + std::cout << " state after correcting left movers=" << state << "\n"; + } +#endif std::vector leftGreen(pos, false); // check whether at least one left-turn lane exist @@ -339,15 +451,19 @@ foundLeftTurnLane = true; } } - const bool buildLeftGreenPhase = haveForbiddenLeftMover && !myHaveSinglePhase && leftTurnTime > 0 && foundLeftTurnLane; + const bool buildLeftGreenPhase = (haveForbiddenLeftMover && !myHaveSinglePhase && leftTurnTime > 0 && foundLeftTurnLane + && groupOpposites && !groupTram && !groupOther); // find indices for exclusive left green phase and apply option minor-left.max-speed for (int i1 = 0; i1 < pos; ++i1) { - if (state[i1] == 'g' && !rightTurnConflicts[i1]) { + if (state[i1] == 'g' && !rightTurnConflicts[i1] + // only activate turn-around together with a real left-turn + && (!isTurnaround[i1] || (i1 > 0 && leftGreen[i1 - 1]))) { leftGreen[i1] = true; if (fromEdges[i1]->getSpeed() > minorLeftSpeedThreshold) { if (buildLeftGreenPhase) { state[i1] = 'r'; + //std::cout << " disabling minorLeft " << i1 << " (speed=" << fromEdges[i1]->getSpeed() << " thresh=" << minorLeftSpeedThreshold << ")\n"; } else if (!isTurnaround[i1]) { WRITE_WARNING("Minor green from edge '" + fromEdges[i1]->getID() + "' to edge '" + toEdges[i1]->getID() + "' exceeds " + toString(minorLeftSpeedThreshold) + "m/s. Maybe a left-turn lane is missing."); @@ -356,8 +472,41 @@ } } +#ifdef DEBUG_PHASES + if (DEBUGCOND) { + std::cout << getID() << " state=" << state << " buildLeft=" << buildLeftGreenPhase << " hFLM=" << haveForbiddenLeftMover << " turnLane=" << foundLeftTurnLane + << " \nrtC=" << toString(rightTurnConflicts) + << " \nhTL=" << toString(hasTurnLane) + << " \nlGr=" << toString(leftGreen) + << "\n"; + } +#endif + const std::string vehicleState = state; // backup state before pedestrian modifications greenPhases.push_back((int)logic->getPhases().size()); + + // 5s at 50km/h, 10s at 80km/h, rounded to full seconds + const double minDurBySpeed = maxSpeed * 3.6 / 6 - 3.3; + SUMOTime minDur = MAX2(minMinDur, TIME2STEPS(floor(minDurBySpeed + 0.5))); + if (chosen.first->getPermissions() == SVC_TRAM && (chosen.second == nullptr || chosen.second->getPermissions() == SVC_TRAM)) { + // shorter minDuration for tram phase (only if the phase is + // exclusively for tram) + bool tramExclusive = true; + for (int i1 = 0; i1 < (int)fromEdges.size(); ++i1) { + if (state[i1] == 'G') { + SVCPermissions linkPerm = (fromEdges[i1]->getPermissions() & toEdges[i1]->getPermissions()); + if (linkPerm != SVC_TRAM) { + tramExclusive = false; + break; + } + } + } + if (tramExclusive) { + // one tram per actuated phase + minDur = TIME2STEPS(1); + } + } + state = addPedestrianPhases(logic, greenTime, minDur, maxDur, state, crossings, fromEdges, toEdges); // pedestrians have 'r' from here on for (int i1 = pos; i1 < pos + (int)crossings.size(); ++i1) { @@ -369,7 +518,10 @@ if (state[i1] != 'G' && state[i1] != 'g') { continue; } - if ((vehicleState[i1] >= 'a' && vehicleState[i1] <= 'z') && buildLeftGreenPhase && !rightTurnConflicts[i1]) { + if ((vehicleState[i1] >= 'a' && vehicleState[i1] <= 'z') + && buildLeftGreenPhase + && !rightTurnConflicts[i1] + && leftGreen[i1]) { continue; } state[i1] = 'y'; @@ -388,11 +540,11 @@ state[i1] = 'r'; continue; } - if (state[i1] == 'g' || leftGreen[i1]) { + if (leftGreen[i1]) { state[i1] = 'G'; } } - state = allowFollowersOfChosen(state, fromEdges, toEdges); + state = allowCompatible(state, fromEdges, toEdges, fromLanes, toLanes); state = correctConflicting(state, fromEdges, toEdges, isTurnaround, fromLanes, hadGreenMajor, haveForbiddenLeftMover, rightTurnConflicts); // add step @@ -637,7 +789,43 @@ std::string -NBOwnTLDef::allowFollowersOfChosen(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges) { +NBOwnTLDef::allowCompatible(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, + const std::vector& fromLanes, const std::vector& toLanes) { + state = allowSingleEdge(state, fromEdges); + state = allowFollowers(state, fromEdges, toEdges); + state = allowPredecessors(state, fromEdges, toEdges, fromLanes, toLanes); + return state; +} + + +std::string +NBOwnTLDef::allowSingleEdge(std::string state, const EdgeVector& fromEdges) { + // if only one edge has green, ensure sure that all connections from that edge are green + const int size = (int)fromEdges.size(); + NBEdge* greenEdge = nullptr; + for (int i1 = 0; i1 < size; ++i1) { + if (state[i1] == 'G') { + if (greenEdge == nullptr) { + greenEdge = fromEdges[i1]; + } else if (greenEdge != fromEdges[i1]) { + return state; + } + } + } + if (greenEdge != nullptr) { + for (int i1 = 0; i1 < size; ++i1) { + if (fromEdges[i1] == greenEdge) { + state[i1] = 'G'; + } + } + } + return state; +} + + +std::string +NBOwnTLDef::allowFollowers(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges) { + // check continuation within joined traffic lights bool check = true; while (check) { check = false; @@ -645,10 +833,14 @@ if (state[i1] == 'G') { continue; } + //if (forbidden(state, i1, fromEdges, toEdges)) { + // continue; + //} bool followsChosen = false; - for (int i2 = 0; i2 < (int)fromEdges.size() && !followsChosen; ++i2) { + for (int i2 = 0; i2 < (int)fromEdges.size(); ++i2) { if (state[i2] == 'G' && fromEdges[i1] == toEdges[i2]) { followsChosen = true; + break; } } if (followsChosen) { @@ -662,6 +854,86 @@ std::string +NBOwnTLDef::allowPredecessors(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, + const std::vector& fromLanes, const std::vector& toLanes) { + // also allow predecessors of chosen edges if the lanes match and there is no conflict + // (must be done after the followers are done because followers are less specific) + bool check = true; + while (check) { + check = false; + for (int i1 = 0; i1 < (int)fromEdges.size(); ++i1) { + if (state[i1] == 'G') { + continue; + } + if (forbidden(state, i1, fromEdges, toEdges)) { + continue; + } + bool preceedsChosen = false; + for (int i2 = 0; i2 < (int)fromEdges.size(); ++i2) { + if (state[i2] == 'G' && fromEdges[i2] == toEdges[i1] + && fromLanes[i2] == toLanes[i1]) { + preceedsChosen = true; + break; + } + } + if (preceedsChosen) { + state[i1] = 'G'; + check = true; + } + } + } + return state; +} + + +std::string +NBOwnTLDef::allowUnrelated(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, + const std::vector& isTurnaround, + const std::vector& crossings) { + for (int i1 = 0; i1 < (int)fromEdges.size(); ++i1) { + if (state[i1] == 'G') { + continue; + } + bool isForbidden = false; + for (int i2 = 0; i2 < (int)fromEdges.size(); ++i2) { + if (state[i2] == 'G' && !isTurnaround[i2] && + (forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1], true) || forbids(fromEdges[i1], toEdges[i1], fromEdges[i2], toEdges[i2], true))) { + isForbidden = true; + break; + } + } + if (!isForbidden && !hasCrossing(fromEdges[i1], toEdges[i1], crossings)) { + state[i1] = 'G'; + } + } + return state; +} + + +std::string +NBOwnTLDef::allowByVClass(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, SVCPermissions perm) { + for (int i1 = 0; i1 < (int)fromEdges.size(); ++i1) { + SVCPermissions linkPerm = (fromEdges[i1]->getPermissions() & toEdges[i1]->getPermissions()); + if ((linkPerm & ~perm) == 0) { + state[i1] = 'G'; + } + } + return state; +} + + +bool +NBOwnTLDef::forbidden(const std::string& state, int index, const EdgeVector& fromEdges, const EdgeVector& toEdges) { + for (int i2 = 0; i2 < (int)fromEdges.size(); ++i2) { + if (state[i2] == 'G' && foes(fromEdges[i2], toEdges[i2], fromEdges[index], toEdges[index])) { + return true; + } + } + return false; +} + + +std::string NBOwnTLDef::correctConflicting(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, const std::vector& isTurnaround, const std::vector& fromLanes, @@ -680,7 +952,7 @@ if (forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1], true, controlledWithin) || rightTurnConflicts[i1]) { state[i1] = 'g'; myNeedsContRelation.insert(StreamPair(fromEdges[i1], toEdges[i1], fromEdges[i2], toEdges[i2])); - if (!isTurnaround[i1] && !hadGreenMajor[i1]) { + if (!isTurnaround[i1] && !hadGreenMajor[i1] && !rightTurnConflicts[i1]) { haveForbiddenLeftMover = true; } } @@ -810,4 +1082,29 @@ return -1; } } + + +bool +NBOwnTLDef::corridorLike() const { + if (getID() == DummyID) { + // avoid infinite recursion + return true; + } + assert(myControlledNodes.size() >= 2); + NBOwnTLDef dummy(DummyID, myControlledNodes, 0, TLTYPE_STATIC); + dummy.setParticipantsInformation(); + NBTrafficLightLogic* tllDummy = dummy.computeLogicAndConts(0, true); + int greenPhases = 0; + for (const auto& phase : tllDummy->getPhases()) { + if (phase.state.find_first_of("gG") != std::string::npos) { + greenPhases++; + } + } + delete tllDummy; + for (std::vector::const_iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { + (*i)->removeTrafficLight(&dummy); + } + return greenPhases <= 2; +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBOwnTLDef.h sumo-1.2.0+dfsg1/src/netbuild/NBOwnTLDef.h --- sumo-1.1.0+dfsg1/src/netbuild/NBOwnTLDef.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBOwnTLDef.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -168,6 +168,10 @@ protected: + + /// @brief test whether a joined tls with layout 'opposites' would be built without dedicated left-turn phase + bool corridorLike() const; + /** @brief Returns the weight of a stream given its direction * @param[in] dir The direction of the stream * @return This stream's weight @@ -215,8 +219,25 @@ static EdgeVector getConnectedOuterEdges(const EdgeVector& incoming); - /// @brief allow connections that follow on of the chosen edges - std::string allowFollowersOfChosen(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges); + /// @brief allow connections that are compatible with the chosen edges + std::string allowCompatible(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, + const std::vector& fromLanes, const std::vector& toLanes); + + std::string allowSingleEdge(std::string state, const EdgeVector& fromEdges); + + std::string allowFollowers(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges); + + std::string allowPredecessors(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, + const std::vector& fromLanes, const std::vector& toLanes); + + std::string allowUnrelated(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, + const std::vector& isTurnaround, + const std::vector& crossings); + + std::string allowByVClass(std::string state, const EdgeVector& fromEdges, const EdgeVector& toEdges, SVCPermissions perm); + + /// @brief whether the given index is forbidden by a green link in the current state + bool forbidden(const std::string& state, int index, const EdgeVector& fromEdges, const EdgeVector& toEdges); /** @brief change 'G' to 'g' for conflicting connections * @param[in] state diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBParking.cpp sumo-1.2.0+dfsg1/src/netbuild/NBParking.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBParking.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBParking.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBParking.h sumo-1.2.0+dfsg1/src/netbuild/NBParking.h --- sumo-1.1.0+dfsg1/src/netbuild/NBParking.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBParking.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTLineCont.cpp sumo-1.2.0+dfsg1/src/netbuild/NBPTLineCont.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBPTLineCont.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTLineCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "NBPTLineCont.h" #include "NBPTStop.h" #include "NBEdge.h" @@ -37,36 +37,28 @@ // method definitions // =========================================================================== -NBPTLineCont::NBPTLineCont() - : - myIdCnt(0) { } +NBPTLineCont::NBPTLineCont() { } NBPTLineCont::~NBPTLineCont() { for (auto& myPTLine : myPTLines) { - delete myPTLine; + delete myPTLine.second; } myPTLines.clear(); } void -NBPTLineCont::insert(NBPTLine* pLine) { - pLine->setId(myIdCnt++); - myPTLines.push_back(pLine); +NBPTLineCont::insert(NBPTLine* ptLine) { + myPTLines[ptLine->getLineID()] = ptLine; } + void NBPTLineCont::process(NBEdgeCont& cont) { for (auto& myPTLine : myPTLines) { - reviseStops(myPTLine, cont); - - constructRoute(myPTLine, cont); - - - // - - - + reviseStops(myPTLine.second, cont); + constructRoute(myPTLine.second, cont); } } + void NBPTLineCont::reviseStops(NBPTLine* myPTLine, NBEdgeCont& cont) { std::vector stops = myPTLine->getStops(); for (auto& stop : stops) { @@ -294,8 +286,8 @@ void NBPTLineCont::addEdges2Keep(const OptionsCont& oc, std::set& into) { if (oc.isSet("ptline-output")) { - for (auto line : myPTLines) { - for (auto edge : line->getRoute()) { + for (auto& item : myPTLines) { + for (auto edge : item.second->getRoute()) { into.insert(edge->getID()); } } @@ -323,7 +315,8 @@ router = new DijkstraRouter >( ec.getAllEdges(), true, &NBEdge::getTravelTimeStatic, nullptr, true); - for (NBPTLine* line : myPTLines) { + for (auto& item : myPTLines) { + NBPTLine* line = item.second; std::vector stops = line->getStops(); if (stops.size() < 2) { continue; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTLineCont.h sumo-1.2.0+dfsg1/src/netbuild/NBPTLineCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBPTLineCont.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTLineCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -20,7 +20,7 @@ #include -#include "utils/vehicle/SUMOAbstractRouter.h" +#include "utils/router/SUMOAbstractRouter.h" #include "NBPTLine.h" #include "NBEdgeCont.h" @@ -34,23 +34,9 @@ ~NBPTLineCont(); /// @brief insert new line - void insert(NBPTLine* pLine); + void insert(NBPTLine* ptLine); - /** @brief Returns the pointer to the begin of the stored pt lines - * @return The iterator to the beginning of stored pt lines - */ - std::vector::const_iterator begin() const { - return myPTLines.begin(); - } - - /** @brief Returns the pointer to the end of the stored pt lines - * @return The iterator to the end of stored pt lines - */ - std::vector::const_iterator end() const { - return myPTLines.end(); - } - - const std::vector& getLines() const { + const std::map& getLines() const { return myPTLines; } @@ -69,9 +55,8 @@ static const int BWD; /// @brief The map of names to pt lines - std::vector myPTLines; + std::map myPTLines; - long long int myIdCnt; void reviseStops(NBPTLine* myPTLine, NBEdgeCont& cont); void constructRoute(NBPTLine* myPTLine, NBEdgeCont& cont); diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTLine.cpp sumo-1.2.0+dfsg1/src/netbuild/NBPTLine.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBPTLine.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTLine.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,10 +24,10 @@ #include "NBPTLine.h" #include "NBPTStop.h" -NBPTLine::NBPTLine(const std::string& name, const std::string& type, const std::string& ref, int interval, const std::string& nightService) : +NBPTLine::NBPTLine(const std::string& id, const std::string& name, const std::string& type, const std::string& ref, int interval, const std::string& nightService) : myName(name), myType(type), - myPTLineId(-1), + myPTLineId(id), myRef(ref != "" ? ref : name), myInterval(interval), myNightService(nightService) { @@ -37,14 +37,6 @@ myPTStops.push_back(pStop); } -const std::string& NBPTLine::getName() const { - return myName; -} - -long long int -NBPTLine::getLineID() const { - return myPTLineId; -} std::vector NBPTLine::getStops() { return myPTStops; @@ -94,9 +86,7 @@ device.closeTag(); } -void NBPTLine::setId(long long int id) { - myPTLineId = id; -} + void NBPTLine::addWayNode(long long int way, long long int node) { std::string wayStr = toString(way); if (wayStr != myCurrentWay) { diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTLine.h sumo-1.2.0+dfsg1/src/netbuild/NBPTLine.h --- sumo-1.1.0+dfsg1/src/netbuild/NBPTLine.h 2018-07-25 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTLine.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,11 +34,18 @@ class NBPTLine { public: - explicit NBPTLine(const std::string& name, const std::string& type, const std::string& ref, int interval, const std::string& nightService); + explicit NBPTLine(const std::string& id, const std::string& name, + const std::string& type, const std::string& ref, int interval, const std::string& nightService); void addPTStop(NBPTStop* pStop); - long long int getLineID() const; - const std::string& getName() const ; + + const std::string& getLineID() const { + return myPTLineId; + } + + const std::string& getName() const { + return myName; + } const std::string& getType() const { return myType; @@ -46,7 +53,6 @@ std::vector getStops(); void write(OutputDevice& device, NBEdgeCont& ec); - void setId(long long int id); void addWayNode(long long int way, long long int node); void setMyNumOfStops(int numStops); @@ -74,7 +80,7 @@ private: std::string myCurrentWay; - long long int myPTLineId; + std::string myPTLineId; std::string myRef; int myInterval; std::string myNightService; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTPlatform.cpp sumo-1.2.0+dfsg1/src/netbuild/NBPTPlatform.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBPTPlatform.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTPlatform.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTPlatform.h sumo-1.2.0+dfsg1/src/netbuild/NBPTPlatform.h --- sumo-1.1.0+dfsg1/src/netbuild/NBPTPlatform.h 2018-04-20 22:00:45.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTPlatform.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTStopCont.cpp sumo-1.2.0+dfsg1/src/netbuild/NBPTStopCont.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBPTStopCont.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTStopCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -59,7 +59,7 @@ void NBPTStopCont::localizePTStops(NBEdgeCont& cont) { std::vector reverseStops; - //frst pass localize pt stop at correct side of the street; create stop for opposite side if needed + //first pass localize pt stop at correct side of the street; create stop for opposite side if needed for (auto& myPTStop : myPTStops) { NBPTStop* stop = myPTStop.second; @@ -67,7 +67,7 @@ bool multipleStopPositions = stop->getIsMultipleStopPositions(); bool platformsDefined = !stop->getPlatformCands().empty(); if (!platformsDefined) { - //create pt stop for reverse edge if edge exist + //create pt stop for reverse edge if edge exists NBPTStop* reverseStop = getReverseStop(stop, cont); if (reverseStop != nullptr) { reverseStops.push_back(reverseStop); @@ -97,7 +97,7 @@ for (auto i = myPTStops.begin(); i != myPTStops.end();) { NBPTStop* stop = i->second; - if (!stop->findLaneAndComputeBusStopExtend(cont)) { + if (!stop->findLaneAndComputeBusStopExtent(cont)) { WRITE_WARNING("Could not find corresponding edge or compatible lane for pt stop: " + i->second->getName() + ". Thus, it will be removed!"); EdgeVector edgeVector = cont.getGeneratedFrom((*i).second->getOrigEdgeId()); @@ -136,7 +136,7 @@ stop->getLength(), stop->getName(), stop->getPermissions()); - if (bidiStop->findLaneAndComputeBusStopExtend(ec)) { + if (bidiStop->findLaneAndComputeBusStopExtent(ec)) { toAdd.push_back(bidiStop); stop->setBidiStop(bidiStop); bidiStop->setBidiStop(stop); diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTStopCont.h sumo-1.2.0+dfsg1/src/netbuild/NBPTStopCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBPTStopCont.h 2018-08-07 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTStopCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTStop.cpp sumo-1.2.0+dfsg1/src/netbuild/NBPTStop.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBPTStop.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTStop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -74,7 +74,7 @@ void -NBPTStop::computExtent(double center, double edgeLength) { +NBPTStop::computeExtent(double center, double edgeLength) { myStartPos = MAX2(0.0, center - myPTStopLength / 2.); myEndPos = MIN2(center + myPTStopLength / 2., edgeLength); } @@ -166,7 +166,7 @@ bool NBPTStop::setEdgeId(std::string edgeId, NBEdgeCont& ec) { myEdgeId = edgeId; - return findLaneAndComputeBusStopExtend(ec); + return findLaneAndComputeBusStopExtent(ec); } @@ -195,7 +195,7 @@ bool -NBPTStop::findLaneAndComputeBusStopExtend(NBEdgeCont& ec) { +NBPTStop::findLaneAndComputeBusStopExtent(NBEdgeCont& ec) { NBEdge* edge = ec.getByID(myEdgeId); if (edge != nullptr) { int laneNr = -1; @@ -209,8 +209,8 @@ if (laneNr != -1) { myLaneId = edge->getLaneID(laneNr); const PositionVector& shape = edge->getLaneShape(laneNr); - double offset = shape.nearest_offset_to_point2D(getPosition(), true); - computExtent(offset, shape.length()); + double offset = shape.nearest_offset_to_point2D(getPosition(), false); + computeExtent(offset, shape.length()); return true; } } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBPTStop.h sumo-1.2.0+dfsg1/src/netbuild/NBPTStop.h --- sumo-1.1.0+dfsg1/src/netbuild/NBPTStop.h 2018-08-08 22:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBPTStop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -59,7 +59,6 @@ const std::string getName() const; const Position& getPosition() const; SVCPermissions getPermissions() const; - void computExtent(double center, double d); void write(OutputDevice& device); void reshiftPosition(const double offsetX, const double offsetY); @@ -70,7 +69,7 @@ bool setEdgeId(std::string edgeId, NBEdgeCont& ec); void registerAdditionalEdge(std::string wayId, std::string edgeId); void addPlatformCand(NBPTPlatform platform); - bool findLaneAndComputeBusStopExtend(NBEdgeCont& ec); + bool findLaneAndComputeBusStopExtent(NBEdgeCont& ec); void setMyPTStopId(std::string id); void addAccess(std::string laneID, double offset, double length); @@ -90,6 +89,9 @@ } private: + void computeExtent(double center, double d); + +private: std::string myPTStopId; Position myPosition; std::string myEdgeId; diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBRequest.cpp sumo-1.2.0+dfsg1/src/netbuild/NBRequest.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBRequest.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBRequest.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -161,11 +161,11 @@ void NBRequest::computeRightOutgoingLinkCrossings(NBEdge* from, NBEdge* to) { - EdgeVector::const_iterator pfrom = find(myAll.begin(), myAll.end(), from); + EdgeVector::const_iterator pfrom = std::find(myAll.begin(), myAll.end(), from); while (*pfrom != to) { NBContHelper::nextCCW(myAll, pfrom); if ((*pfrom)->getToNode() == myJunction) { - EdgeVector::const_iterator pto = find(myAll.begin(), myAll.end(), to); + EdgeVector::const_iterator pto = std::find(myAll.begin(), myAll.end(), to); while (*pto != from) { if (!((*pto)->getToNode() == myJunction)) { setBlocking(from, to, *pfrom, *pto); @@ -179,11 +179,11 @@ void NBRequest::computeLeftOutgoingLinkCrossings(NBEdge* from, NBEdge* to) { - EdgeVector::const_iterator pfrom = find(myAll.begin(), myAll.end(), from); + EdgeVector::const_iterator pfrom = std::find(myAll.begin(), myAll.end(), from); while (*pfrom != to) { NBContHelper::nextCW(myAll, pfrom); if ((*pfrom)->getToNode() == myJunction) { - EdgeVector::const_iterator pto = find(myAll.begin(), myAll.end(), to); + EdgeVector::const_iterator pto = std::find(myAll.begin(), myAll.end(), to); while (*pto != from) { if (!((*pto)->getToNode() == myJunction)) { setBlocking(from, to, *pfrom, *pto); @@ -253,8 +253,8 @@ } #ifdef DEBUG_SETBLOCKING if (DEBUGCOND) std::cout << "setBlocking" - << " 1:" << from1->getID() << "->" << to1->getID() - << " 2:" << from2->getID() << "->" << to2->getID() << "\n"; + << " 1:" << from1->getID() << "->" << to1->getID() + << " 2:" << from2->getID() << "->" << to2->getID() << "\n"; #endif // check the priorities if required by node type if (myJunction->getType() != NODETYPE_RIGHT_BEFORE_LEFT) { @@ -262,9 +262,9 @@ int from2p = from2->getJunctionPriority(myJunction); #ifdef DEBUG_SETBLOCKING if (DEBUGCOND) std::cout << "setBlocking" - << " 1:" << from1->getID() << "->" << to1->getID() - << " 2:" << from2->getID() << "->" << to2->getID() - << " p1=" << from1p << " p2=" << from2p << "\n"; + << " 1:" << from1->getID() << "->" << to1->getID() + << " 2:" << from2->getID() << "->" << to2->getID() + << " p1=" << from1p << " p2=" << from2p << "\n"; #endif // check if one of the connections is higher priorised when incoming into // the junction, the connection road will yield @@ -284,9 +284,9 @@ LinkDirection ld2 = myJunction->getDirection(from2, to2); #ifdef DEBUG_SETBLOCKING if (DEBUGCOND) std::cout << "setBlocking" - << " 1:" << from1->getID() << "->" << to1->getID() - << " 2:" << from2->getID() << "->" << to2->getID() - << " dir1=" << toString(ld1) << " dir2=" << toString(ld2) << "\n"; + << " 1:" << from1->getID() << "->" << to1->getID() + << " 2:" << from2->getID() << "->" << to2->getID() + << " dir1=" << toString(ld1) << " dir2=" << toString(ld2) << "\n"; #endif if (ld1 == LINKDIR_STRAIGHT) { if (ld2 != LINKDIR_STRAIGHT) { @@ -325,7 +325,7 @@ // compute the yielding due to the right-before-left rule // get the position of the incoming lanes in the junction-wheel - EdgeVector::const_iterator c1 = find(myAll.begin(), myAll.end(), from1); + EdgeVector::const_iterator c1 = std::find(myAll.begin(), myAll.end(), from1); NBContHelper::nextCW(myAll, c1); // go through next edges clockwise... while (*c1 != from1 && *c1 != from2) { @@ -337,7 +337,7 @@ NBContHelper::nextCW(myAll, c1); } // get the position of the incoming lanes in the junction-wheel - EdgeVector::const_iterator c2 = find(myAll.begin(), myAll.end(), from2); + EdgeVector::const_iterator c2 = std::find(myAll.begin(), myAll.end(), from2); NBContHelper::nextCW(myAll, c2); // go through next edges clockwise... while (*c2 != from2 && *c2 != from1) { @@ -349,17 +349,17 @@ NBContHelper::nextCW(myAll, c2); } #ifdef DEBUG_SETBLOCKING - if (DEBUGCOND) std::cout << "setBlocking" - << " 1:" << from1->getID() << "->" << to1->getID() - << " 2:" << from2->getID() << "->" << to2->getID() - << " noDecision\n"; + if (DEBUGCOND) std::cout << "setBlocking" + << " 1:" << from1->getID() << "->" << to1->getID() + << " 2:" << from2->getID() << "->" << to2->getID() + << " noDecision\n"; #endif } int NBRequest::distanceCounterClockwise(NBEdge* from, NBEdge* to) { - EdgeVector::const_iterator p = find(myAll.begin(), myAll.end(), from); + EdgeVector::const_iterator p = std::find(myAll.begin(), myAll.end(), from); int ret = 0; do { ret++; @@ -371,7 +371,7 @@ return ret; } -const std::string& +const std::string& NBRequest::getFoes(int linkIndex) const { assert(linkIndex >= 0); assert(linkIndex < (int)myFoes.size()); @@ -661,9 +661,9 @@ << "\n"; } #endif - const bool hasLaneConflict = (!(checkLaneFoes || checkLaneFoesByClass(queryCon, *i, connected[k]) - || checkLaneFoesByCooperation(from, queryCon, *i, connected[k])) - || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane)); + const bool hasLaneConflict = (!(checkLaneFoes || checkLaneFoesByClass(queryCon, *i, connected[k]) + || checkLaneFoesByCooperation(from, queryCon, *i, connected[k])) + || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane)); if ((myForbids[idx2][idx] && hasLaneConflict) || NBNode::rightTurnConflict(from, to, fromLane, *i, connected[k].toEdge, connected[k].fromLane, lefthand) || mergeConflict(from, queryCon, *i, connected[k], false) @@ -713,8 +713,8 @@ int size = (int) connected.size(); for (int k = size; k-- > 0;) { const bool hasLaneConflict = (!(checkLaneFoes || checkLaneFoesByClass(queryCon, *i, connected[k]) - || checkLaneFoesByCooperation(from, queryCon, *i, connected[k])) - || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane)); + || checkLaneFoesByCooperation(from, queryCon, *i, connected[k])) + || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane)); if ((foes(from, to, (*i), connected[k].toEdge) && hasLaneConflict) || NBNode::rightTurnConflict(from, to, fromLane, *i, connected[k].toEdge, connected[k].fromLane, lefthand) || myJunction->turnFoes(from, to, fromLane, *i, connected[k].toEdge, connected[k].fromLane, lefthand) @@ -825,7 +825,7 @@ bool NBRequest::checkLaneFoesByCooperation(const NBEdge* from, const NBEdge::Connection& con, - const NBEdge* prohibitorFrom, const NBEdge::Connection& prohibitorCon) const { + const NBEdge* prohibitorFrom, const NBEdge::Connection& prohibitorCon) const { if (con.toEdge != prohibitorCon.toEdge) { return false; } @@ -841,7 +841,7 @@ } for (const auto& c : prohibitorFrom->getConnections()) { if (c.toEdge == con.toEdge && fromTargetLanes.count(c.toLane) != 0) { - //std::cout << " con=" << con->getDescription(from) << " foe=" << prohibitorCon.getDescription(prohibitorFrom) + //std::cout << " con=" << con->getDescription(from) << " foe=" << prohibitorCon.getDescription(prohibitorFrom) // << " no cooperation (targets=" << joinToString(fromTargetLanes, ' ') << " index=" << c.toLane << "\n"; return false; } @@ -873,8 +873,8 @@ int NBRequest::getIndex(const NBEdge* const from, const NBEdge* const to) const { - EdgeVector::const_iterator fp = find(myIncoming.begin(), myIncoming.end(), from); - EdgeVector::const_iterator tp = find(myOutgoing.begin(), myOutgoing.end(), to); + EdgeVector::const_iterator fp = std::find(myIncoming.begin(), myIncoming.end(), from); + EdgeVector::const_iterator tp = std::find(myOutgoing.begin(), myOutgoing.end(), to); if (fp == myIncoming.end() || tp == myOutgoing.end()) { return -1; } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBRequest.h sumo-1.2.0+dfsg1/src/netbuild/NBRequest.h --- sumo-1.1.0+dfsg1/src/netbuild/NBRequest.h 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBRequest.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -225,8 +225,8 @@ const NBEdge* prohibitorFrom, const NBEdge::Connection& prohibitorCon) const; /// @brief whether the given connections must be checked for lane conflicts due to disjunct target lanes - bool checkLaneFoesByCooperation(const NBEdge* from, const NBEdge::Connection& con, - const NBEdge* prohibitorFrom, const NBEdge::Connection& prohibitorCon) const; + bool checkLaneFoesByCooperation(const NBEdge* from, const NBEdge::Connection& con, + const NBEdge* prohibitorFrom, const NBEdge::Connection& prohibitorCon) const; /** @brief return whether the given laneToLane connections prohibit each other * under the assumption that the edge2edge connections are in conflict diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBSign.cpp sumo-1.2.0+dfsg1/src/netbuild/NBSign.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBSign.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBSign.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBSign.h sumo-1.2.0+dfsg1/src/netbuild/NBSign.h --- sumo-1.1.0+dfsg1/src/netbuild/NBSign.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBSign.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightDefinition.cpp sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightDefinition.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightDefinition.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightDefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -200,7 +200,7 @@ for (EdgeVector::iterator j = myIncomingEdges.begin(); j != myIncomingEdges.end(); ++j) { 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); + EdgeVector::iterator k = std::find(myOutgoing.begin(), myOutgoing.end(), edge); if (k != myOutgoing.end()) { myEdgesWithin.push_back(edge); } else { @@ -465,10 +465,16 @@ if (el.toEdge != nullptr && el.toLane >= (int) el.toEdge->getNumLanes()) { throw ProcessError("Connection '" + incoming->getID() + "_" + toString(j) + "->" + el.toEdge->getID() + "_" + toString(el.toLane) + "' yields in a not existing lane."); } - if (incoming->getToNode()->getType() != NODETYPE_RAIL_CROSSING || !isRailway(incoming->getPermissions())) { - myControlledLinks.push_back(NBConnection(incoming, el.fromLane, el.toEdge, el.toLane, tlIndex++)); - } else { + if (incoming->getToNode()->getType() == NODETYPE_RAIL_CROSSING + && isRailway(incoming->getPermissions())) { + // railways stay uncontrolled at rail crossing but they + // must be registered in MSRailCrossing myControlledLinks.push_back(NBConnection(incoming, el.fromLane, el.toEdge, el.toLane, -1)); + } else if (incoming->getToNode()->getType() == NODETYPE_RAIL_SIGNAL + && incoming->getToNode()->getDirection(incoming, el.toEdge) == LINKDIR_TURN) { + // turnarounds stay uncontrolled at rail signal + } else { + myControlledLinks.push_back(NBConnection(incoming, el.fromLane, el.toEdge, el.toLane, tlIndex++)); } } } @@ -525,7 +531,7 @@ return std::find(myRightOnRedConflicts.begin(), myRightOnRedConflicts.end(), std::make_pair(index, foeIndex)) != myRightOnRedConflicts.end(); } -std::string +std::string NBTrafficLightDefinition::getDescription() const { return getID() + ':' + getProgramID() + '@' + toString(this); } diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightDefinition.h sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightDefinition.h --- sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightDefinition.h 2018-09-25 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightDefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.cpp sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.h sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.h 2018-09-21 22:00:20.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogicCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogic.cpp sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogic.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogic.cpp 2018-10-19 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogic.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -67,15 +67,15 @@ NBTrafficLightLogic::~NBTrafficLightLogic() {} void -NBTrafficLightLogic::addStep(SUMOTime duration, const std::string& state, int index) { +NBTrafficLightLogic::addStep(SUMOTime duration, const std::string& state, const std::vector& next, const std::string& name, int index) { addStep(duration, state, NBTrafficLightDefinition::UNSPECIFIED_DURATION, NBTrafficLightDefinition::UNSPECIFIED_DURATION, - index); + next, name, index); } void -NBTrafficLightLogic::addStep(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur, int index) { +NBTrafficLightLogic::addStep(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur, const std::vector& next, const std::string& name, int index) { // check state size if (myNumLinks == 0) { // initialize @@ -94,7 +94,7 @@ // insert at the end index = (int)myPhases.size(); } - myPhases.insert(myPhases.begin() + index, PhaseDefinition(duration, state, minDur, maxDur)); + myPhases.insert(myPhases.begin() + index, PhaseDefinition(duration, state, minDur, maxDur, next, name)); } @@ -211,6 +211,17 @@ myPhases[phaseIndex].maxDur = duration; } +void +NBTrafficLightLogic::setPhaseNext(int phaseIndex, const std::vector& next) { + assert(phaseIndex < (int)myPhases.size()); + myPhases[phaseIndex].next = next; +} + +void +NBTrafficLightLogic::setPhaseName(int phaseIndex, const std::string& name) { + assert(phaseIndex < (int)myPhases.size()); + myPhases[phaseIndex].name = name; +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogic.h sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogic.h --- sumo-1.1.0+dfsg1/src/netbuild/NBTrafficLightLogic.h 2018-10-19 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTrafficLightLogic.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -65,15 +65,23 @@ /// @brief The state definition std::string state; + /// @brief next phase indices or empty list + std::vector next; + /// @brief option phase name + std::string name; + /** @brief Constructor * @param[in] durationArg The duration of the phase * @param[in] stateArg Signals per link */ - PhaseDefinition(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurArg, SUMOTime maxDurArg) : + PhaseDefinition(SUMOTime durationArg, const std::string& stateArg, SUMOTime minDurArg, SUMOTime maxDurArg, const std::vector& nextArg, const std::string& nameArg) : duration(durationArg), minDur(minDurArg), maxDur(maxDurArg), - state(stateArg) { } + state(stateArg), + next(nextArg), + name(nameArg) + { } /// @brief Destructor ~PhaseDefinition() { } @@ -83,7 +91,12 @@ * @return Whether this and the given phases are same */ bool operator!=(const PhaseDefinition& pd) const { - return pd.duration != duration || pd.state != state; + return (pd.duration != duration + || pd.minDur != minDur + || pd.maxDur != maxDur + || pd.state != state + || pd.next != next + || pd.name != name); } }; @@ -116,12 +129,16 @@ * @param[in] state The state definition of a tls phase * @param[in] minDur The minimum duration of the phase to add * @param[in] maxDur The maximum duration of the phase to add + * @param[in] name The name of the phase + * @param[in] next The index of the next phase * @param[in] index The index of the new phase (-1 means append to end) * @note: the length of the state has to match the number of links * and the length given in previous calls to addStep (throws ProcessError) */ - void addStep(SUMOTime duration, const std::string& state, int index = -1); - void addStep(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur, int index = -1); + void addStep(SUMOTime duration, const std::string& state, + const std::vector& next = std::vector(), const std::string& name = "", int index = -1); + void addStep(SUMOTime duration, const std::string& state, SUMOTime minDur, SUMOTime maxDur, + const std::vector& next = std::vector(), const std::string& name = "", int index = -1); /** @brief Modifies the state for an existing phase (used by NETEDIT) @@ -138,6 +155,8 @@ void setPhaseDuration(int phaseIndex, SUMOTime duration); void setPhaseMinDuration(int phaseIndex, SUMOTime duration); void setPhaseMaxDuration(int phaseIndex, SUMOTime duration); + void setPhaseNext(int phaseIndex, const std::vector& next); + void setPhaseName(int phaseIndex, const std::string& name); /* @brief deletes the phase at the given index * @note thhrows InvalidArgument on out-of range index diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTypeCont.cpp sumo-1.2.0+dfsg1/src/netbuild/NBTypeCont.cpp --- sumo-1.1.0+dfsg1/src/netbuild/NBTypeCont.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTypeCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBTypeCont.h sumo-1.2.0+dfsg1/src/netbuild/NBTypeCont.h --- sumo-1.1.0+dfsg1/src/netbuild/NBTypeCont.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBTypeCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/NBVehicle.h sumo-1.2.0+dfsg1/src/netbuild/NBVehicle.h --- sumo-1.1.0+dfsg1/src/netbuild/NBVehicle.h 2018-07-25 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/NBVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netbuild/_netbuild.dox sumo-1.2.0+dfsg1/src/netbuild/_netbuild.dox --- sumo-1.1.0+dfsg1/src/netbuild/_netbuild.dox 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netbuild/_netbuild.dox 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,19 @@ +/** + @file _netbuild.dox + @defgoup netbuild Network Building Module + @brief builds SUMO-networks froman internal representation + + @addtogroup netbuild + @{ + + netbuild stores a representation of the road graph (edges/nodes/...) and offers classes and methods + for transferring this representation into loadable sumo networks. + + The internal representation is meant to be filled by classes from the @ref netimport or @ref netgen modules. + + The process of building networks is encapsulated in NBNetBuilder::compute(). Here, the following steps are performed: + + + + @} +*/ \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/src/netconvert_main.cpp sumo-1.2.0+dfsg1/src/netconvert_main.cpp --- sumo-1.1.0+dfsg1/src/netconvert_main.cpp 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netconvert_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/CMakeLists.txt sumo-1.2.0+dfsg1/src/netedit/additionals/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/netedit/additionals/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -25,10 +25,8 @@ GNEParkingSpace.cpp GNETAZ.h GNETAZ.cpp - GNETAZSource.h - GNETAZSource.cpp - GNETAZSink.h - GNETAZSink.cpp + GNETAZSourceSink.h + GNETAZSourceSink.cpp GNEDetector.h GNEDetector.cpp GNEDetectorE1.h @@ -39,10 +37,8 @@ GNEDetectorE2.cpp GNEDetectorE3.h GNEDetectorE3.cpp - GNEDetectorEntry.h - GNEDetectorEntry.cpp - GNEDetectorExit.h - GNEDetectorExit.cpp + GNEDetectorEntryExit.h + GNEDetectorEntryExit.cpp GNERerouter.h GNERerouter.cpp GNERouteProbe.h @@ -53,10 +49,6 @@ GNECalibrator.cpp GNECalibratorFlow.h GNECalibratorFlow.cpp - GNECalibratorVehicleType.h - GNECalibratorVehicleType.cpp - GNECalibratorRoute.h - GNECalibratorRoute.cpp GNEVariableSpeedSign.h GNEVariableSpeedSign.cpp GNEVariableSpeedSignStep.h diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAccess.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAccess.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAccess.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAccess.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,11 +37,11 @@ // =========================================================================== GNEAccess::GNEAccess(GNEAdditional* busStop, GNELane* lane, GNEViewNet* viewNet, const std::string& pos, const std::string& length, bool friendlyPos, bool blockMovement) : - GNEAdditional(busStop, viewNet, GLO_ACCESS, SUMO_TAG_ACCESS, "", blockMovement), - myLane(lane), - myPositionOverLane(pos), - myLength(length), - myFriendlyPosition(friendlyPos) { + GNEAdditional(busStop, viewNet, GLO_ACCESS, SUMO_TAG_ACCESS, "", blockMovement, +{}, {lane}, {}, {busStop}, {}, {}, {}, {}, {}, {}), +myPositionOverLane(pos), +myLength(length), +myFriendlyPosition(friendlyPos) { } @@ -56,7 +56,7 @@ newPosition.add(offset); // filtern position using snap to active grid newPosition = myViewNet->snapToActiveGrid(newPosition); - myPositionOverLane = toString(myLane->getShape().nearest_offset_to_point2D(newPosition, false)); + myPositionOverLane = toString(getLaneParents().front()->getShape().nearest_offset_to_point2D(newPosition, false)); // Update geometry updateGeometry(false); } @@ -67,7 +67,7 @@ if (!myBlockMovement) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, myPositionOverLane, true, myMove.firstOriginalLanePosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, myPositionOverLane, true, myMove.firstOriginalLanePosition)); undoList->p_end(); } } @@ -84,24 +84,24 @@ myGeometry.clearGeometry(); // Get shape of lane parent - myGeometry.shape = myLane->getShape(); + myGeometry.shape = getLaneParents().front()->getShape(); // set start position double fixedPositionOverLane; if (!canParse(myPositionOverLane)) { - fixedPositionOverLane = myLane->getParentEdge().getNBEdge()->getFinalLength(); + fixedPositionOverLane = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); } else if (parse(myPositionOverLane) < 0) { fixedPositionOverLane = 0; - } else if (parse(myPositionOverLane) > myLane->getParentEdge().getNBEdge()->getFinalLength()) { - fixedPositionOverLane = myLane->getParentEdge().getNBEdge()->getFinalLength(); + } else if (parse(myPositionOverLane) > getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) { + fixedPositionOverLane = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); } else { fixedPositionOverLane = parse(myPositionOverLane); } // obtain position - myGeometry.shape[0] = myLane->getShape().positionAtOffset(fixedPositionOverLane * myLane->getLengthGeometryFactor()); + myGeometry.shape[0] = getLaneParents().front()->getShape().positionAtOffset(fixedPositionOverLane * getLaneParents().front()->getLengthGeometryFactor()); // Save rotation (angle) of the vector constructed by points f and s - myGeometry.shapeRotations.push_back(myLane->getShape().rotationDegreeAtOffset(fixedPositionOverLane) * -1); + myGeometry.shapeRotations.push_back(getLaneParents().front()->getShape().rotationDegreeAtOffset(fixedPositionOverLane) * -1); // Set block icon position myBlockIcon.position = myGeometry.shape.getLineCenter(); @@ -110,7 +110,7 @@ myBlockIcon.offset = Position(-1, 0); // Set block icon rotation, and using their rotation for logo - myBlockIcon.setRotation(myLane); + myBlockIcon.setRotation(getLaneParents().front()); // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -122,15 +122,15 @@ Position GNEAccess::getPositionInView() const { if (!canParse(myPositionOverLane)) { - return myLane->getShape().front(); + return getLaneParents().front()->getShape().front(); } else { double posOverLane = parse(myPositionOverLane); if (posOverLane < 0) { - return myLane->getShape().front(); - } else if (posOverLane > myLane->getShape().length()) { - return myLane->getShape().back(); + return getLaneParents().front()->getShape().front(); + } else if (posOverLane > getLaneParents().front()->getShape().length()) { + return getLaneParents().front()->getShape().back(); } else { - return myLane->getShape().positionAtOffset(posOverLane); + return getLaneParents().front()->getShape().positionAtOffset(posOverLane); } } } @@ -143,7 +143,7 @@ return true; } else { if (canParse(myPositionOverLane)) { - return (parse(myPositionOverLane) >= 0) && ((parse(myPositionOverLane)) <= myLane->getParentEdge().getNBEdge()->getFinalLength()); + return (parse(myPositionOverLane) >= 0) && ((parse(myPositionOverLane)) <= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()); } else { return false; } @@ -153,13 +153,13 @@ GNEEdge& GNEAccess::getEdge() const { - return myLane->getParentEdge(); + return getLaneParents().front()->getParentEdge(); } std::string GNEAccess::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -201,7 +201,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_POSITION: return toString(myPositionOverLane); case SUMO_ATTR_LENGTH: @@ -211,7 +211,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: return toString(myBlockMovement); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_SELECTED: return toString(isAttributeCarrierSelected()); case GNE_ATTR_GENERIC: @@ -236,7 +236,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -252,8 +252,8 @@ case SUMO_ATTR_LANE: { GNELane* lane = myViewNet->getNet()->retrieveLane(value, false); if (lane != nullptr) { - if (myLane->getParentEdge().getID() != lane->getParentEdge().getID()) { - return GNEAdditionalHandler::accessCanBeCreated(myFirstAdditionalParent, lane->getParentEdge()); + if (getLaneParents().front()->getParentEdge().getID() != lane->getParentEdge().getID()) { + return GNEAdditionalHandler::accessCanBeCreated(getAdditionalParents().at(0), lane->getParentEdge()); } else { return true; } @@ -295,7 +295,7 @@ std::string GNEAccess::getHierarchyName() const { - return getTagStr() + ": " + myLane->getParentEdge().getID(); + return getTagStr() + ": " + getLaneParents().front()->getParentEdge().getID(); } // =========================================================================== @@ -309,7 +309,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_POSITION: myPositionOverLane = value; @@ -336,8 +336,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAccess.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAccess.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAccess.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAccess.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -122,9 +122,6 @@ /// @} protected: - /// @brief lane in which this Access is placed - GNELane* myLane; - /// @brief position over lane std::string myPositionOverLane; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditional.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditional.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditional.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditional.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,11 +21,13 @@ #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -41,101 +43,171 @@ // member method definitions // =========================================================================== -GNEAdditional::GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement) : - GUIGlObject(type, id), - GNEAttributeCarrier(tag), - Parameterised(), - myViewNet(viewNet), - myAdditionalName(additionalName), - myBlockMovement(blockMovement), - myFirstAdditionalParent(nullptr), - mySecondAdditionalParent(nullptr), - myBlockIcon(this), - myChildConnections(this) { +// --------------------------------------------------------------------------- +// GNEAdditional::AdditionalGeometry - methods +// --------------------------------------------------------------------------- + +GNEAdditional::AdditionalGeometry::AdditionalGeometry() {} + + +void +GNEAdditional::AdditionalGeometry::clearGeometry() { + shape.clear(); + multiShape.clear(); + shapeRotations.clear(); + shapeLengths.clear(); + multiShapeRotations.clear(); + multiShapeLengths.clear(); + multiShapeUnified.clear(); } -GNEAdditional::GNEAdditional(GNEAdditional* singleAdditionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement) : - GUIGlObject(type, singleAdditionalParent->generateAdditionalChildID(tag)), - GNEAttributeCarrier(tag), - Parameterised(), - myViewNet(viewNet), - myAdditionalName(additionalName), - myBlockMovement(blockMovement), - myFirstAdditionalParent(singleAdditionalParent), - mySecondAdditionalParent(nullptr), - myBlockIcon(this), - myChildConnections(this) { - // check that additional parent is of expected type - assert(singleAdditionalParent->getTagProperty().getTag() == myTagProperty.getParentTag()); +void +GNEAdditional::AdditionalGeometry::calculateMultiShapeUnified() { + // merge all multishape parts in a single shape + for (auto i : multiShape) { + multiShapeUnified.append(i); + } } -GNEAdditional::GNEAdditional(GNEAdditional* firstAdditionalParent, GNEAdditional* secondAdditionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement) : - GUIGlObject(type, firstAdditionalParent->generateAdditionalChildID(tag)), - GNEAttributeCarrier(tag), - Parameterised(), - myViewNet(viewNet), - myAdditionalName(additionalName), - myBlockMovement(blockMovement), - myFirstAdditionalParent(firstAdditionalParent), - mySecondAdditionalParent(secondAdditionalParent), - myBlockIcon(this), - myChildConnections(this) { - // check that additional parent is of expected type - assert(firstAdditionalParent->getTagProperty().getTag() == myTagProperty.getParentTag()); +void +GNEAdditional::AdditionalGeometry::calculateShapeRotationsAndLengths() { + // Get number of parts of the shape + int numberOfSegments = (int)shape.size() - 1; + // If number of segments is more than 0 + if (numberOfSegments >= 0) { + // Reserve memory (To improve efficiency) + shapeRotations.reserve(numberOfSegments); + shapeLengths.reserve(numberOfSegments); + // For every part of the shape + for (int i = 0; i < numberOfSegments; ++i) { + // Obtain first position + const Position& f = shape[i]; + // Obtain next position + const Position& s = shape[i + 1]; + // Save distance between position into myShapeLengths + shapeLengths.push_back(f.distanceTo(s)); + // Save rotation (angle) of the vector constructed by points f and s + shapeRotations.push_back((double)atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); + } + } } -GNEAdditional::GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, std::vector edgeChilds) : +void +GNEAdditional::AdditionalGeometry::calculateMultiShapeRotationsAndLengths() { + // Get number of parts of the shape for every part shape + std::vector numberOfSegments; + for (auto i : multiShape) { + // numseg cannot be 0 + int numSeg = (int)i.size() - 1; + numberOfSegments.push_back((numSeg >= 0) ? numSeg : 0); + multiShapeRotations.push_back(std::vector()); + multiShapeLengths.push_back(std::vector()); + } + // If number of segments is more than 0 + for (int i = 0; i < (int)multiShape.size(); i++) { + // Reserve size for every part + multiShapeRotations.back().reserve(numberOfSegments.at(i)); + multiShapeLengths.back().reserve(numberOfSegments.at(i)); + // iterate over each segment + for (int j = 0; j < numberOfSegments.at(i); j++) { + // Obtain first position + const Position& f = multiShape[i][j]; + // Obtain next position + const Position& s = multiShape[i][j + 1]; + // Save distance between position into myShapeLengths + multiShapeLengths.at(i).push_back(f.distanceTo(s)); + // Save rotation (angle) of the vector constructed by points f and s + multiShapeRotations.at(i).push_back((double)atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); + } + } +} + +// --------------------------------------------------------------------------- +// GNEAdditional - methods +// --------------------------------------------------------------------------- + +GNEAdditional::GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds) : GUIGlObject(type, id), GNEAttributeCarrier(tag), Parameterised(), + GNEHierarchicalElementParents(this, edgeParents, laneParents, shapeParents, additionalParents, demandElementParents), + GNEHierarchicalElementChilds(this, edgeChilds, laneChilds, shapeChilds, additionalChilds, demandElementChilds), myViewNet(viewNet), myAdditionalName(additionalName), myBlockMovement(blockMovement), - myFirstAdditionalParent(nullptr), - mySecondAdditionalParent(nullptr), - myEdgeChilds(edgeChilds), - myBlockIcon(this), - myChildConnections(this) { + myBlockIcon(this) { } -GNEAdditional::GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, std::vector laneChilds) : - GUIGlObject(type, id), +GNEAdditional::GNEAdditional(GNEAdditional* additionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds) : + GUIGlObject(type, additionalParent->generateChildID(tag)), GNEAttributeCarrier(tag), Parameterised(), + GNEHierarchicalElementParents(this, edgeParents, laneParents, shapeParents, additionalParents, demandElementParents), + GNEHierarchicalElementChilds(this, edgeChilds, laneChilds, shapeChilds, additionalChilds, demandElementChilds), myViewNet(viewNet), myAdditionalName(additionalName), myBlockMovement(blockMovement), - myFirstAdditionalParent(nullptr), - mySecondAdditionalParent(nullptr), - myLaneChilds(laneChilds), - myBlockIcon(this), - myChildConnections(this) { + myBlockIcon(this) { } GNEAdditional::~GNEAdditional() {} +std::string +GNEAdditional::generateChildID(SumoXMLTag childTag) { + int counter = (int)getAdditionalChilds().size(); + while (myViewNet->getNet()->retrieveAdditional(childTag, getID() + toString(childTag) + toString(counter), false) != nullptr) { + counter++; + } + return (getID() + toString(childTag) + toString(counter)); +} + + +const GNEAdditional::AdditionalGeometry& +GNEAdditional::getAdditionalGeometry() const { + return myGeometry; +} + + void GNEAdditional::writeAdditional(OutputDevice& device) const { - // obtain tag properties - const TagProperties& tagProperties = myTagProperty; // first check if minimum number of childs is correct - if ((tagProperties.hasMinimumNumberOfChilds() || tagProperties.hasMinimumNumberOfChilds()) && !checkAdditionalChildRestriction()) { + if ((myTagProperty.hasMinimumNumberOfChilds() || myTagProperty.hasMinimumNumberOfChilds()) && !checkAdditionalChildRestriction()) { WRITE_WARNING(getTagStr() + " with ID='" + getID() + "' cannot be written"); } else { // Open Tag or synonym Tag - if (tagProperties.hasTagSynonym()) { - device.openTag(tagProperties.getTagSynonym()); + if (myTagProperty.hasTagSynonym()) { + device.openTag(myTagProperty.getTagSynonym()); } else { device.openTag(myTagProperty.getTag()); } // iterate over attributes and write it - for (auto i : tagProperties) { + for (auto i : myTagProperty) { // obtain attribute std::string attribute = getAttribute(i.first); if (i.second.isOptional() && i.second.hasDefaultValue() && !i.second.isCombinable()) { @@ -151,13 +223,13 @@ if (i.first != SUMO_ATTR_DISALLOW) { writePermissions(device, parseVehicleClasses(attribute)); } - } else if(tagProperties.canMaskXYZPositions() && (i.first == SUMO_ATTR_POSITION)) { + } else if (myTagProperty.canMaskXYZPositions() && (i.first == SUMO_ATTR_POSITION)) { // get position attribute and write it separate Position pos = parse(getAttribute(SUMO_ATTR_POSITION)); device.writeAttr(SUMO_ATTR_X, toString(pos.x())); device.writeAttr(SUMO_ATTR_Y, toString(pos.y())); // write 0 only if is different from 0 (the default value) - if(pos.z() != 0) { + if (pos.z() != 0) { device.writeAttr(SUMO_ATTR_Z, toString(pos.z())); } } else { @@ -176,13 +248,13 @@ if (i.first != SUMO_ATTR_DISALLOW) { writePermissions(device, parseVehicleClasses(attribute)); } - } else if(tagProperties.canMaskXYZPositions() && (i.first == SUMO_ATTR_POSITION)) { + } else if (myTagProperty.canMaskXYZPositions() && (i.first == SUMO_ATTR_POSITION)) { // get position attribute and write it separate Position pos = parse(getAttribute(SUMO_ATTR_POSITION)); device.writeAttr(SUMO_ATTR_X, toString(pos.x())); device.writeAttr(SUMO_ATTR_Y, toString(pos.y())); // write 0 only if is different from 0 (the default value) - if(pos.z() != 0) { + if (pos.z() != 0) { device.writeAttr(SUMO_ATTR_Z, toString(pos.z())); } } else { @@ -192,14 +264,14 @@ } } // iterate over childs and write it in XML (or in a different file) - if (tagProperties.canWriteChildsSeparate() && tagProperties.hasAttribute(SUMO_ATTR_FILE) && !getAttribute(SUMO_ATTR_FILE).empty()) { + if (myTagProperty.canWriteChildsSeparate() && myTagProperty.hasAttribute(SUMO_ATTR_FILE) && !getAttribute(SUMO_ATTR_FILE).empty()) { // we assume that rerouter values files is placed in the same folder as the additional file - OutputDevice& deviceChilds = OutputDevice::getDevice(FileHelpers::getFilePath(OptionsCont::getOptions().getString("sumo-additionals-file")) + getAttribute(SUMO_ATTR_FILE)); + OutputDevice& deviceChilds = OutputDevice::getDevice(FileHelpers::getFilePath(OptionsCont::getOptions().getString("additional-files")) + getAttribute(SUMO_ATTR_FILE)); deviceChilds.writeXMLHeader("rerouterValue", "additional_file.xsd"); // save childs in a different filename - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { // avoid to write two times additionals that haben two parents (Only write as child of first parent) - if (i->getSecondAdditionalParent() == nullptr) { + if (i->getAdditionalParents().size() < 1) { i->writeAdditional(deviceChilds); } else if (myTagProperty.getTag() == i->getTagProperty().getParentTag()) { i->writeAdditional(deviceChilds); @@ -207,9 +279,9 @@ } deviceChilds.close(); } else { - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { // avoid to write two times additionals that haben two parents (Only write as child of first parent) - if (i->getSecondAdditionalParent() == nullptr) { + if (i->getAdditionalParents().size() < 2) { i->writeAdditional(device); } else if (myTagProperty.getTag() == i->getTagProperty().getParentTag()) { i->writeAdditional(device); @@ -224,19 +296,19 @@ } -bool +bool GNEAdditional::isAdditionalValid() const { return true; } -std::string +std::string GNEAdditional::getAdditionalProblem() const { return ""; } -void +void GNEAdditional::fixAdditionalProblem() { throw InvalidArgument(getTagStr() + " cannot fix any problem"); } @@ -250,34 +322,41 @@ void GNEAdditional::startGeometryMoving() { - // always save original position over view - myMove.originalViewPosition = getPositionInView(); - // obtain tag properties (to improve code legibility) - const TagProperties& tagProperties = myTagProperty; - // check if position over lane or lanes has to be saved - if (tagProperties.canBePlacedOverLane()) { - if(tagProperties.canMaskStartEndPos()) { + // only move if additional is drawable + if (myTagProperty.isDrawable()) { + // always save original position over view + myMove.originalViewPosition = getPositionInView(); + // check if position over lane or lanes has to be saved + if (myTagProperty.hasAttribute(SUMO_ATTR_LANE)) { + if (myTagProperty.canMaskStartEndPos()) { + // obtain start and end position + myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_STARTPOS); + myMove.secondOriginalPosition = getAttribute(SUMO_ATTR_ENDPOS); + } else { + // obtain position attribute + myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_POSITION); + } + } else if (myTagProperty.hasAttribute(SUMO_ATTR_LANES) && + myTagProperty.hasAttribute(SUMO_ATTR_POSITION) && + myTagProperty.hasAttribute(SUMO_ATTR_ENDPOS)) { // obtain start and end position - myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_STARTPOS); - myMove.secondOriginalPosition = getAttribute(SUMO_ATTR_ENDPOS); - } else { - // obtain position attribute myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_POSITION); + myMove.secondOriginalPosition = getAttribute(SUMO_ATTR_ENDPOS); + } + // save current centering boundary + myMove.movingGeometryBoundary = getCenteringBoundary(); + // start geometry in all childs + for (const auto& i : getDemandElementChilds()) { + i->startGeometryMoving(); } - } else if (tagProperties.canBePlacedOverLanes()) { - // obtain start and end position - myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_POSITION); - myMove.secondOriginalPosition = getAttribute(SUMO_ATTR_ENDPOS); } - // save current centering boundary - myMove.movingGeometryBoundary = getCenteringBoundary(); } void GNEAdditional::endGeometryMoving() { // check that endGeometryMoving was called only once - if (myMove.movingGeometryBoundary.isInitialised()) { + if (myTagProperty.isDrawable() && myMove.movingGeometryBoundary.isInitialised()) { // Remove object from net myViewNet->getNet()->removeGLObjectFromGrid(this); // reset myMovingGeometryBoundary @@ -286,6 +365,10 @@ updateGeometry(false); // add object into grid again (using the new centering boundary) myViewNet->getNet()->addGLObjectIntoGrid(this); + // start geometry in all childs + for (const auto& i : getDemandElementChilds()) { + i->endGeometryMoving(); + } } } @@ -308,256 +391,6 @@ } -GNEAdditional* -GNEAdditional::getFirstAdditionalParent() const { - return myFirstAdditionalParent; -} - - -GNEAdditional* -GNEAdditional::getSecondAdditionalParent() const { - return mySecondAdditionalParent; -} - - -std::string -GNEAdditional::generateAdditionalChildID(SumoXMLTag childTag) { - int counter = 0; - while (myViewNet->getNet()->retrieveAdditional(childTag, getID() + toString(childTag) + toString(counter), false) != nullptr) { - counter++; - } - return (getID() + toString(childTag) + toString(counter)); -} - - -void -GNEAdditional::addAdditionalChild(GNEAdditional* additional) { - // First check that additional wasn't already inserted - if (std::find(myAdditionalChilds.begin(), myAdditionalChilds.end(), additional) != myAdditionalChilds.end()) { - throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' was already inserted in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myAdditionalChilds.push_back(additional); - // Check if childs has to be sorted automatically - if (myTagProperty.canAutomaticSortChilds()) { - sortAdditionalChilds(); - } - // update additional parent after add additional (note: by default non-implemented) - updateAdditionalParent(); - // update geometry (for set geometry of lines between Parents and Childs) - updateGeometry(true); - } -} - - -void -GNEAdditional::removeAdditionalChild(GNEAdditional* additional) { - // First check that additional was already inserted - auto it = std::find(myAdditionalChilds.begin(), myAdditionalChilds.end(), additional); - if (it == myAdditionalChilds.end()) { - throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myAdditionalChilds.erase(it); - // Check if childs has to be sorted automatically - if (myTagProperty.canAutomaticSortChilds()) { - sortAdditionalChilds(); - } - // update additional parent after add additional (note: by default non-implemented) - updateAdditionalParent(); - // update geometry (for remove geometry of lines between Parents and Childs) - updateGeometry(true); - } -} - - -const std::vector& -GNEAdditional::getAdditionalChilds() const { - return myAdditionalChilds; -} - - -void -GNEAdditional::sortAdditionalChilds() { - if (myTagProperty.getTag() == SUMO_TAG_E3DETECTOR) { - // we need to sort Entry/Exits due additional.xds model - std::vector sortedEntryExits; - // obtain all entrys - for (auto i : myAdditionalChilds) { - if (i->getTagProperty().getTag() == SUMO_TAG_DET_ENTRY) { - sortedEntryExits.push_back(i); - } - } - // obtain all exits - for (auto i : myAdditionalChilds) { - if (i->getTagProperty().getTag() == SUMO_TAG_DET_EXIT) { - sortedEntryExits.push_back(i); - } - } - // change myAdditionalChilds for sortedEntryExits - if (sortedEntryExits.size() == myAdditionalChilds.size()) { - myAdditionalChilds = sortedEntryExits; - } else { - throw ProcessError("Some additional childs were lost during sorting"); - } - } else if (myTagProperty.getTag() == SUMO_TAG_TAZ) { - // we need to sort Entry/Exits due additional.xds model - std::vector sortedTAZSourceSink; - // obtain all TAZSources - for (auto i : myAdditionalChilds) { - if (i->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) { - sortedTAZSourceSink.push_back(i); - } - } - // obtain all TAZSinks - for (auto i : myAdditionalChilds) { - if (i->getTagProperty().getTag() == SUMO_TAG_TAZSINK) { - sortedTAZSourceSink.push_back(i); - } - } - // change myAdditionalChilds for sortedEntryExits - if (sortedTAZSourceSink.size() == myAdditionalChilds.size()) { - myAdditionalChilds = sortedTAZSourceSink; - } else { - throw ProcessError("Some additional childs were lost during sorting"); - } - } else { - // declare a vector to keep sorted childs - std::vector, GNEAdditional*> > sortedChilds; - // iterate over additional childs - for (auto i : myAdditionalChilds) { - sortedChilds.push_back(std::make_pair(std::make_pair(0., 0.), i)); - // set begin/start attribute - if (i->getTagProperty().hasAttribute(SUMO_ATTR_TIME) && canParse(i->getAttribute(SUMO_ATTR_TIME))) { - sortedChilds.back().first.first = parse(i->getAttribute(SUMO_ATTR_TIME)); - } else if (i->getTagProperty().hasAttribute(SUMO_ATTR_BEGIN) && canParse(i->getAttribute(SUMO_ATTR_BEGIN))) { - sortedChilds.back().first.first = parse(i->getAttribute(SUMO_ATTR_BEGIN)); - } - // set end attribute - if (i->getTagProperty().hasAttribute(SUMO_ATTR_END) && canParse(i->getAttribute(SUMO_ATTR_END))) { - sortedChilds.back().first.second = parse(i->getAttribute(SUMO_ATTR_END)); - } else { - sortedChilds.back().first.second = sortedChilds.back().first.first; - } - } - // sort childs - std::sort(sortedChilds.begin(), sortedChilds.end()); - // make sure that number of sorted childs is the same as the additional childs - if (sortedChilds.size() == myAdditionalChilds.size()) { - myAdditionalChilds.clear(); - for (auto i : sortedChilds) { - myAdditionalChilds.push_back(i.second); - } - } else { - throw ProcessError("Some additional childs were lost during sorting"); - } - } -} - - -bool -GNEAdditional::checkAdditionalChildsOverlapping() const { - // declare a vector to keep sorted childs - std::vector, GNEAdditional*> > sortedChilds; - // iterate over additional childs - for (auto i : myAdditionalChilds) { - sortedChilds.push_back(std::make_pair(std::make_pair(0., 0.), i)); - // set begin/start attribute - if (i->getTagProperty().hasAttribute(SUMO_ATTR_TIME) && canParse(i->getAttribute(SUMO_ATTR_TIME))) { - sortedChilds.back().first.first = parse(i->getAttribute(SUMO_ATTR_TIME)); - } else if (i->getTagProperty().hasAttribute(SUMO_ATTR_BEGIN) && canParse(i->getAttribute(SUMO_ATTR_BEGIN))) { - sortedChilds.back().first.first = parse(i->getAttribute(SUMO_ATTR_BEGIN)); - } - // set end attribute - if (i->getTagProperty().hasAttribute(SUMO_ATTR_END) && canParse(i->getAttribute(SUMO_ATTR_END))) { - sortedChilds.back().first.second = parse(i->getAttribute(SUMO_ATTR_END)); - } else { - sortedChilds.back().first.second = sortedChilds.back().first.first; - } - } - // sort childs - std::sort(sortedChilds.begin(), sortedChilds.end()); - // make sure that number of sorted childs is the same as the additional childs - if (sortedChilds.size() == myAdditionalChilds.size()) { - if (sortedChilds.size() <= 1) { - return true; - } else { - // check overlapping - for (int i = 0; i < (int)sortedChilds.size() - 1; i++) { - if (sortedChilds.at(i).first.second > sortedChilds.at(i + 1).first.first) { - return false; - } - } - } - return true; - } else { - throw ProcessError("Some additional childs were lost during sorting"); - } -} - - -void -GNEAdditional::addEdgeChild(GNEEdge* edge) { - // Check that edge is valid and doesn't exist previously - if (edge == nullptr) { - throw InvalidArgument("Trying to add an empty " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else if (std::find(myEdgeChilds.begin(), myEdgeChilds.end(), edge) != myEdgeChilds.end()) { - throw InvalidArgument("Trying to add a duplicate " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myEdgeChilds.push_back(edge); - } -} - - -void -GNEAdditional::removeEdgeChild(GNEEdge* edge) { - // Check that edge is valid and exist previously - if (edge == nullptr) { - throw InvalidArgument("Trying to remove an empty " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else if (std::find(myEdgeChilds.begin(), myEdgeChilds.end(), edge) == myEdgeChilds.end()) { - throw InvalidArgument("Trying to remove a non previously inserted " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myEdgeChilds.erase(std::find(myEdgeChilds.begin(), myEdgeChilds.end(), edge)); - } -} - - -const std::vector& -GNEAdditional::getEdgeChilds() const { - return myEdgeChilds; -} - - -void -GNEAdditional::addLaneChild(GNELane* lane) { - // Check that lane is valid and doesn't exist previously - if (lane == nullptr) { - throw InvalidArgument("Trying to add an empty " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else if (std::find(myLaneChilds.begin(), myLaneChilds.end(), lane) != myLaneChilds.end()) { - throw InvalidArgument("Trying to add a duplicate " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myLaneChilds.push_back(lane); - } -} - - -void -GNEAdditional::removeLaneChild(GNELane* lane) { - // Check that lane is valid and exist previously - if (lane == nullptr) { - throw InvalidArgument("Trying to remove an empty " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else if (std::find(myLaneChilds.begin(), myLaneChilds.end(), lane) == myLaneChilds.end()) { - throw InvalidArgument("Trying to remove a non previously inserted " + toString(SUMO_TAG_EDGE) + " child in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myLaneChilds.erase(std::find(myLaneChilds.begin(), myLaneChilds.end(), lane)); - } -} - - -const std::vector& -GNEAdditional::getLaneChilds() const { - return myLaneChilds; -} - - GUIGLObjectPopupMenu* GNEAdditional::getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) { GUIGLObjectPopupMenu* ret = new GUIGLObjectPopupMenu(app, parent, *this); @@ -611,7 +444,7 @@ // Create table GUIParameterTableWindow* ret = new GUIParameterTableWindow(app, *this, myTagProperty.getNumberOfAttributes()); // Iterate over attributes - for (const auto &i : myTagProperty) { + for (const auto& i : myTagProperty) { // Add attribute and set it dynamic if aren't unique if (i.second.isUnique()) { ret->mkItem(toString(i.first).c_str(), false, getAttribute(i.first)); @@ -639,135 +472,18 @@ Boundary b = myGeometry.multiShapeUnified.getBoxBoundary(); b.grow(20); return b; - } else if (myFirstAdditionalParent) { - return myFirstAdditionalParent->getCenteringBoundary(); + } else if (getAdditionalParents().size() > 0) { + return getAdditionalParents().at(0)->getCenteringBoundary(); } else { return Boundary(-0.1, -0.1, 0.1, 0.1); } } +// --------------------------------------------------------------------------- +// GNEAdditional::BlockIcon - methods +// --------------------------------------------------------------------------- -bool -GNEAdditional::isRouteValid(const std::vector& edges, bool report) { - if (edges.size() == 0) { - // routes cannot be empty - return false; - } else if (edges.size() == 1) { - // routes with a single edge are valid - return true; - } else { - // iterate over edges to check that compounds a chain - auto it = edges.begin(); - while (it != edges.end() - 1) { - GNEEdge* currentEdge = *it; - GNEEdge* nextEdge = *(it + 1); - // consecutive edges aren't allowed - if (currentEdge->getID() == nextEdge->getID()) { - return false; - } - // make sure that edges are consecutives - if (std::find(currentEdge->getGNEJunctionDestiny()->getGNEOutgoingEdges().begin(), - currentEdge->getGNEJunctionDestiny()->getGNEOutgoingEdges().end(), - nextEdge) == currentEdge->getGNEJunctionDestiny()->getGNEOutgoingEdges().end()) { - if (report) { - WRITE_WARNING("Parameter 'Route' invalid. " + currentEdge->getTagStr() + " '" + currentEdge->getID() + - "' ins't consecutive to " + nextEdge->getTagStr() + " '" + nextEdge->getID() + "'"); - } - return false; - } - it++; - } - } - return true; -} - - -void -GNEAdditional::updateAdditionalParent() { - // by default nothing to do -} - - -GNEAdditional::AdditionalGeometry::AdditionalGeometry() {} - - -void -GNEAdditional::AdditionalGeometry::clearGeometry() { - shape.clear(); - multiShape.clear(); - shapeRotations.clear(); - shapeLengths.clear(); - multiShapeRotations.clear(); - multiShapeLengths.clear(); - multiShapeUnified.clear(); -} - - -void -GNEAdditional::AdditionalGeometry::calculateMultiShapeUnified() { - // merge all multishape parts in a single shape - for (auto i : multiShape) { - multiShapeUnified.append(i); - } -} - - -void -GNEAdditional::AdditionalGeometry::calculateShapeRotationsAndLengths() { - // Get number of parts of the shape - int numberOfSegments = (int)shape.size() - 1; - // If number of segments is more than 0 - if (numberOfSegments >= 0) { - // Reserve memory (To improve efficiency) - shapeRotations.reserve(numberOfSegments); - shapeLengths.reserve(numberOfSegments); - // For every part of the shape - for (int i = 0; i < numberOfSegments; ++i) { - // Obtain first position - const Position& f = shape[i]; - // Obtain next position - const Position& s = shape[i + 1]; - // Save distance between position into myShapeLengths - shapeLengths.push_back(f.distanceTo(s)); - // Save rotation (angle) of the vector constructed by points f and s - shapeRotations.push_back((double)atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); - } - } -} - - -void -GNEAdditional::AdditionalGeometry::calculateMultiShapeRotationsAndLengths() { - // Get number of parts of the shape for every part shape - std::vector numberOfSegments; - for (auto i : multiShape) { - // numseg cannot be 0 - int numSeg = (int)i.size() - 1; - numberOfSegments.push_back((numSeg>=0)? numSeg : 0); - multiShapeRotations.push_back(std::vector()); - multiShapeLengths.push_back(std::vector()); - } - // If number of segments is more than 0 - for (int i = 0; i < (int)multiShape.size(); i++) { - // Reserve size for every part - multiShapeRotations.back().reserve(numberOfSegments.at(i)); - multiShapeLengths.back().reserve(numberOfSegments.at(i)); - // iterate over each segment - for (int j = 0; j < numberOfSegments.at(i); j++) { - // Obtain first position - const Position& f = multiShape[i][j]; - // Obtain next position - const Position& s = multiShape[i][j + 1]; - // Save distance between position into myShapeLengths - multiShapeLengths.at(i).push_back(f.distanceTo(s)); - // Save rotation (angle) of the vector constructed by points f and s - multiShapeRotations.at(i).push_back((double)atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); - } - } -} - - -GNEAdditional::BlockIcon::BlockIcon(GNEAdditional *additional) : +GNEAdditional::BlockIcon::BlockIcon(GNEAdditional* additional) : myAdditional(additional), rotation(0.) {} @@ -832,124 +548,14 @@ } } - -GNEAdditional::ChildConnections::ChildConnections(GNEAdditional *additional) : - myAdditional(additional) {} - - -void -GNEAdditional::ChildConnections::update() { - // first clear connection positions - connectionPositions.clear(); - symbolsPositionAndRotation.clear(); - - // calculate position and rotation of every simbol for every edge - for (auto i : myAdditional->myEdgeChilds) { - for (auto j : i->getLanes()) { - std::pair posRot; - // set position and lenght depending of shape's lengt - if (j->getShape().length() - 6 > 0) { - posRot.first = j->getShape().positionAtOffset(j->getShape().length() - 6); - posRot.second = j->getShape().rotationDegreeAtOffset(j->getShape().length() - 6); - } else { - posRot.first = j->getShape().positionAtOffset(j->getShape().length()); - posRot.second = j->getShape().rotationDegreeAtOffset(j->getShape().length()); - } - symbolsPositionAndRotation.push_back(posRot); - } - } - - // calculate position and rotation of every symbol for every lane - for (auto i : myAdditional->myLaneChilds) { - std::pair posRot; - // set position and lenght depending of shape's lengt - if (i->getShape().length() - 6 > 0) { - posRot.first = i->getShape().positionAtOffset(i->getShape().length() - 6); - posRot.second = i->getShape().rotationDegreeAtOffset(i->getShape().length() - 6); - } else { - posRot.first = i->getShape().positionAtOffset(i->getShape().length()); - posRot.second = i->getShape().rotationDegreeAtOffset(i->getShape().length()); - } - symbolsPositionAndRotation.push_back(posRot); - } - - // calculate position for every additional child - for (auto i : myAdditional->myAdditionalChilds) { - // check that position is different of position - if (i->getPositionInView() != myAdditional->getPositionInView()) { - std::vector posConnection; - double A = std::abs(i->getPositionInView().x() - myAdditional->getPositionInView().x()); - double B = std::abs(i->getPositionInView().y() - myAdditional->getPositionInView().y()); - // Set positions of connection's vertex. Connection is build from Entry to E3 - posConnection.push_back(i->getPositionInView()); - if (myAdditional->getPositionInView().x() > i->getPositionInView().x()) { - if (myAdditional->getPositionInView().y() > i->getPositionInView().y()) { - posConnection.push_back(Position(i->getPositionInView().x() + A, i->getPositionInView().y())); - } else { - posConnection.push_back(Position(i->getPositionInView().x(), i->getPositionInView().y() - B)); - } - } else { - if (myAdditional->getPositionInView().y() > i->getPositionInView().y()) { - posConnection.push_back(Position(i->getPositionInView().x(), i->getPositionInView().y() + B)); - } else { - posConnection.push_back(Position(i->getPositionInView().x() - A, i->getPositionInView().y())); - } - } - posConnection.push_back(myAdditional->getPositionInView()); - connectionPositions.push_back(posConnection); - } - } - - // calculate geometry for connections between parent and childs - for (auto i : symbolsPositionAndRotation) { - std::vector posConnection; - double A = std::abs(i.first.x() - myAdditional->getPositionInView().x()); - double B = std::abs(i.first.y() - myAdditional->getPositionInView().y()); - // Set positions of connection's vertex. Connection is build from Entry to E3 - posConnection.push_back(i.first); - if (myAdditional->getPositionInView().x() > i.first.x()) { - if (myAdditional->getPositionInView().y() > i.first.y()) { - posConnection.push_back(Position(i.first.x() + A, i.first.y())); - } else { - posConnection.push_back(Position(i.first.x(), i.first.y() - B)); - } - } else { - if (myAdditional->getPositionInView().y() > i.first.y()) { - posConnection.push_back(Position(i.first.x(), i.first.y() + B)); - } else { - posConnection.push_back(Position(i.first.x() - A, i.first.y())); - } - } - posConnection.push_back(myAdditional->getPositionInView()); - connectionPositions.push_back(posConnection); - } -} - - -void -GNEAdditional::ChildConnections::draw() const { - // Iterate over myConnectionPositions - for (auto i : connectionPositions) { - // Add a draw matrix - glPushMatrix(); - // traslate in the Z axis - glTranslated(0, 0, myAdditional->getType() - 0.01); - // Set color of the base - GLHelper::setColor(RGBColor(255, 235, 0)); - for (auto j = i.begin(); (j + 1) != i.end(); j++) { - // Draw Lines - GLHelper::drawLine((*j), (*(j + 1))); - } - // Pop draw matrix - glPopMatrix(); - } -} - +// --------------------------------------------------------------------------- +// GNEAdditional - protected methods +// --------------------------------------------------------------------------- void GNEAdditional::setDefaultValues() { // iterate over attributes and set default value - for (const auto &i : myTagProperty) { + for (const auto& i : myTagProperty) { if (i.second.hasDefaultValue()) { setAttribute(i.first, i.second.getDefaultValue()); } @@ -973,7 +579,7 @@ } -bool +bool GNEAdditional::isValidDetectorID(const std::string& newID) const { if (SUMOXMLDefinitions::isValidDetectorID(newID) && (myViewNet->getNet()->retrieveAdditional(myTagProperty.getTag(), newID, false) == nullptr)) { return true; @@ -998,66 +604,6 @@ } -GNEEdge* -GNEAdditional::changeEdge(GNEEdge* oldEdge, const std::string& newEdgeID) { - if (oldEdge == nullptr) { - throw InvalidArgument(getTagStr() + " with ID '" + getMicrosimID() + "' doesn't belong to an " + toString(SUMO_TAG_EDGE)); - } else { - oldEdge->removeAdditionalChild(this); - GNEEdge* newEdge = myViewNet->getNet()->retrieveEdge(newEdgeID); - newEdge->addAdditionalChild(this); - updateGeometry(true); - return newEdge; - } -} - - -GNELane* -GNEAdditional::changeLane(GNELane* oldLane, const std::string& newLaneID) { - if (oldLane == nullptr) { - throw InvalidArgument(getTagStr() + " with ID '" + getMicrosimID() + "' doesn't belong to a " + toString(SUMO_TAG_LANE)); - } else { - oldLane->removeAdditionalChild(this); - GNELane* newLane = myViewNet->getNet()->retrieveLane(newLaneID); - newLane->addAdditionalChild(this); - updateGeometry(true); - return newLane; - } -} - - -void -GNEAdditional::changeFirstAdditionalParent(const std::string& newAdditionalParentID) { - if (myFirstAdditionalParent == nullptr) { - throw InvalidArgument(getTagStr() + " with ID '" + getMicrosimID() + "' doesn't have an additional parent"); - } else { - // remove this additional of the childs of parent additional - myFirstAdditionalParent->removeAdditionalChild(this); - // set new additional parent - myFirstAdditionalParent = myViewNet->getNet()->retrieveAdditional(myFirstAdditionalParent->getTagProperty().getTag(), newAdditionalParentID); - // add this additional int the childs of parent additional - myFirstAdditionalParent->addAdditionalChild(this); - updateGeometry(true); - } -} - - -void -GNEAdditional::changeSecondAdditionalParent(const std::string& newAdditionalParentID) { - if (mySecondAdditionalParent == nullptr) { - throw InvalidArgument(getTagStr() + " with ID '" + getMicrosimID() + "' doesn't have an additional parent"); - } else { - // remove this additional of the childs of parent additional - mySecondAdditionalParent->removeAdditionalChild(this); - // set new additional parent - mySecondAdditionalParent = myViewNet->getNet()->retrieveAdditional(mySecondAdditionalParent->getTagProperty().getTag(), newAdditionalParentID); - // add this additional int the childs of parent additional - mySecondAdditionalParent->addAdditionalChild(this); - updateGeometry(true); - } -} - - void GNEAdditional::selectAttributeCarrier(bool changeFlag) { if (!myViewNet) { @@ -1096,6 +642,16 @@ bool +GNEAdditional::drawUsingSelectColor() const { + if (mySelected && (myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK)) { + return true; + } else { + return false; + } +} + + +bool GNEAdditional::checkAdditionalChildRestriction() const { // throw exception because this function mus be implemented in child (see GNEE3Detector) throw ProcessError("Calling non-implemented function checkAdditionalChildRestriction during saving of " + getTagStr() + ". It muss be reimplemented in child class"); @@ -1152,10 +708,4 @@ } } - -void -GNEAdditional::mouseOverObject(const GUIVisualizationSettings&) const { -} - - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditional.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditional.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditional.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditional.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,8 @@ #include -#include +#include +#include #include #include #include @@ -32,8 +33,6 @@ // class declarations // =========================================================================== -class GNEEdge; -class GNELane; class GNEViewNet; class GUIGLObjectPopupMenu; @@ -45,9 +44,49 @@ * @class GNEAdditional * @brief An Element which don't belongs to GNENet but has influency in the simulation */ -class GNEAdditional : public GUIGlObject, public GNEAttributeCarrier, public Parameterised { +class GNEAdditional : public GUIGlObject, public GNEAttributeCarrier, public Parameterised, public GNEHierarchicalElementParents, public GNEHierarchicalElementChilds { public: + + /// @brief struct for pack all variables related with geometry of elemement + struct AdditionalGeometry { + /// @brief constructor + AdditionalGeometry(); + + /// @brief reset geometry + void clearGeometry(); + + /// @brief calculate multi shape unified + void calculateMultiShapeUnified(); + + /// @brief calculate shape rotations and lenghts + void calculateShapeRotationsAndLengths(); + + /// @brief calculate multi shape rotations and lenghts + void calculateMultiShapeRotationsAndLengths(); + + /// @brief The shape of the additional element + PositionVector shape; + + /// @brief The multi-shape of the additional element (used by certain additionals) + std::vector multiShape; + + /// @brief The rotations of the single shape parts + std::vector shapeRotations; + + /// @brief The lengths of the single shape parts + std::vector shapeLengths; + + /// @brief The rotations of the multi-shape parts + std::vector > multiShapeRotations; + + /// @brief The lengths of the multi-shape shape parts + std::vector > multiShapeLengths; + + /// @brief multi shape unified + PositionVector multiShapeUnified; + }; + /**@brief Constructor * @param[in] id Gl-id of the additional element (Must be unique) * @param[in] viewNet pointer to GNEViewNet of this additional element belongs @@ -55,55 +94,68 @@ * @param[in] tag Type of xml tag that define the additional element (SUMO_TAG_BUS_STOP, SUMO_TAG_REROUTER, etc...) * @param[in] name Additional name * @param[in] block movement enable or disable additional movement - */ - GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement); - - /**@brief Constructor used by Additionals that have another additional as parent - * @param[in] singleAdditionalParent pointer to single additional parent - * @param[in] viewNet pointer to GNEViewNet of this additional element belongs - * @param[in] type GUIGlObjectType of additional - * @param[in] tag Type of xml tag that define the additional element (SUMO_TAG_BUS_STOP, SUMO_TAG_REROUTER, etc...) - * @param[in] name Additional name - * @param[in] block movement enable or disable additional movement - */ - GNEAdditional(GNEAdditional* singleAdditionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement); + * @param[in] edgeParents vector of edge parents + * @param[in] laneParents vector of lane parents + * @param[in] shapeParents vector of shape parents + * @param[in] additionalParents vector of additional parents + * @param[in] demandElementChilds vector of demandElement parents + * @param[in] edgeChilds vector of edge childs + * @param[in] laneChilds vector of lane childs + * @param[in] shapeChilds vector of shape childs + * @param[in] additionalChilds vector of additional childs + * @param[in] demandElementChilds vector of demandElement childs + */ + GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds); /**@brief Constructor used by Additionals that have two additionals as parent - * @param[in] additionalParent pointer to first additional parent - * @param[in] additionalParent pointer to second additional parent - * @param[in] viewNet pointer to GNEViewNet of this additional element belongs - * @param[in] type GUIGlObjectType of additional - * @param[in] tag Type of xml tag that define the additional element (SUMO_TAG_BUS_STOP, SUMO_TAG_REROUTER, etc...) - * @param[in] name Additional name - * @param[in] block movement enable or disable additional movement - */ - GNEAdditional(GNEAdditional* firstAdditionalParent, GNEAdditional* secondAdditionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement); - - /**@brief Constructor used by Additionals that have Edge childs - * @param[in] id Gl-id of the additional element (Must be unique) - * @param[in] viewNet pointer to GNEViewNet of this additional element belongs - * @param[in] type GUIGlObjectType of additional - * @param[in] tag Type of xml tag that define the additional element (SUMO_TAG_BUS_STOP, SUMO_TAG_REROUTER, etc...) - * @param[in] name Additional name - * @param[in] block movement enable or disable additional movement - * @param[in] edgeChilds vector of edge childs - */ - GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, std::vector edgeChilds); - - /**@brief Constructor used by Additionals that have lane childs - * @param[in] id Gl-id of the additional element (Must be unique) - * @param[in] viewNet pointer to GNEViewNet of this additional element belongs - * @param[in] type GUIGlObjectType of additional - * @param[in] tag Type of xml tag that define the additional element (SUMO_TAG_BUS_STOP, SUMO_TAG_REROUTER, etc...) - * @param[in] name Additional name - * @param[in] block movement enable or disable additional movement - * @param[in] laneChilds vector of lane childs + * @param[in] additionalParent pointer to additional parent pointer (used to generate an ID) + * @param[in] viewNet pointer to GNEViewNet of this additional element belongs + * @param[in] type GUIGlObjectType of additional + * @param[in] tag Type of xml tag that define the additional element (SUMO_TAG_BUS_STOP, SUMO_TAG_REROUTER, etc...) + * @param[in] name Additional name + * @param[in] block movement enable or disable additional movement + * @param[in] edgeParents vector of edge parents + * @param[in] laneParents vector of lane parents + * @param[in] shapeParents vector of shape parents + * @param[in] additionalParents vector of additional parents + * @param[in] demandElementChilds vector of demandElement parents + * @param[in] edgeChilds vector of edge childs + * @param[in] laneChilds vector of lane childs + * @param[in] shapeChilds vector of shape childs + * @param[in] additionalChilds vector of additional childs + * @param[in] demandElementChilds vector of demandElement childs */ - GNEAdditional(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, std::vector laneChilds); + GNEAdditional(GNEAdditional* additionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds); /// @brief Destructor ~GNEAdditional(); + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + + /// @brief obtain AdditionalGeometry + const AdditionalGeometry& getAdditionalGeometry() const; + /// @name members and functions relative to write additionals into XML /// @{ /**@brief writte additional element into a xml file @@ -114,10 +166,10 @@ /// @brief check if current additional is valid to be writed into XML (by default true, can be reimplemented in childs) virtual bool isAdditionalValid() const; - /// @brief return a string with the current additional problem (by default empty, can be reimplemented in childs) + /// @brief return a string with the current additional problem (by default empty, can be reimplemented in childs) virtual std::string getAdditionalProblem() const; - /// @brief fix additional problem (by default throw an exception, has to be reimplemented in childs) + /// @brief fix additional problem (by default throw an exception, has to be reimplemented in childs) virtual void fixAdditionalProblem(); /// @} @@ -161,53 +213,6 @@ /// @brief Check if additional item is currently blocked (i.e. cannot be moved with mouse) bool isAdditionalBlocked() const; - // @brief get first additional parent - GNEAdditional* getFirstAdditionalParent() const; - - // @brief get second additional parent - GNEAdditional* getSecondAdditionalParent() const; - - /// @brief gererate a new ID for an additional child - std::string generateAdditionalChildID(SumoXMLTag childTag); - - /// @name members and functions relative to additional's childs - /// @{ - - /// @brief add additional child to this additional - void addAdditionalChild(GNEAdditional* additional); - - /// @brief remove additional child from this additional - void removeAdditionalChild(GNEAdditional* additional); - - /// @brief return vector of additionals that have as Parent this edge (For example, Calibrators) - const std::vector& getAdditionalChilds() const; - - /// @brief sort childs (used by Rerouters and VSS) - void sortAdditionalChilds(); - - /// @brief check if childs are overlapped (Used by Rerouters) - bool checkAdditionalChildsOverlapping() const; - - /// @brief add edge child - void addEdgeChild(GNEEdge* edge); - - /// @brief remove edge child - void removeEdgeChild(GNEEdge* edge); - - /// @brief get edge chidls - const std::vector& getEdgeChilds() const; - - /// @brief add lane child - void addLaneChild(GNELane* lane); - - /// @brief remove lane child - void removeLaneChild(GNELane* lane); - - /// @brief get lanes of VSS - const std::vector& getLaneChilds() const; - - /// @} - /// @name inherited from GUIGlObject /// @{ @@ -234,6 +239,11 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the additional name + const std::string getOptionalName() const { + return myAdditionalName; + } + /**@brief Draws the object * @param[in] s The settings for the current view (may influence drawing) * @see GUIGlObject::drawGL @@ -252,6 +262,9 @@ /// @brief check if attribute carrier is selected bool isAttributeCarrierSelected() const; + /// @brief check if attribute carrier must be drawn using selecting color. + bool drawUsingSelectColor() const; + /* @brief method for getting the Attribute of an XML key * @param[in] key The attribute key * @return string with the value associated to key @@ -293,54 +306,7 @@ /// @} - /** @brief check if a route is valid - * @param[in] edges vector with the route's edges - * @param[in] report enable or disable writting warnings if route isn't valid - */ - static bool isRouteValid(const std::vector& edges, bool report); - - /// @brief update parent after add or remove a child (can be reimplemented, for example used for stadistics) - virtual void updateAdditionalParent(); - protected: - /// @brief struct for pack all variables related with geometry of elemement - struct AdditionalGeometry { - /// @brief constructor - AdditionalGeometry(); - - /// @brief reset geometry - void clearGeometry(); - - /// @brief calculate multi shape unified - void calculateMultiShapeUnified(); - - /// @brief calculate shape rotations and lenghts - void calculateShapeRotationsAndLengths(); - - /// @brief calculate multi shape rotations and lenghts - void calculateMultiShapeRotationsAndLengths(); - - /// @brief The shape of the additional element - PositionVector shape; - - /// @brief The multi-shape of the additional element (used by certain additionals) - std::vector multiShape; - - /// @brief The rotations of the single shape parts - std::vector shapeRotations; - - /// @brief The lengths of the single shape parts - std::vector shapeLengths; - - /// @brief The rotations of the multi-shape parts - std::vector > multiShapeRotations; - - /// @brief The lengths of the multi-shape shape parts - std::vector > multiShapeLengths; - - /// @brief multi shape unified - PositionVector multiShapeUnified; - }; /// @brief struct for pack all variables related with additional move struct AdditionalMove { @@ -360,7 +326,7 @@ /// @brief struct for pack all variables and functions related with Block Icon struct BlockIcon { /// @brief constructor - BlockIcon(GNEAdditional *additional); + BlockIcon(GNEAdditional* additional); /// @brief set Rotation of block Icon (must be called in updateGeometry(bool updateGrid) function) void setRotation(GNELane* additionalLane = nullptr); @@ -370,7 +336,7 @@ private: /// @brief pointer to additional parent - GNEAdditional *myAdditional; + GNEAdditional* myAdditional; public: /// @brief position of the block icon @@ -383,28 +349,6 @@ double rotation; }; - /// @brief struct for pack all variables and functions relative to connections between Additionals and their childs - struct ChildConnections { - /// @brief constructor - ChildConnections(GNEAdditional *additional); - - /// @brief update Connection's geometry - void update(); - - /// @brief draw connections between Parent and childrens - void draw() const; - - /// @brief position and rotation of every symbol over lane - std::vector > symbolsPositionAndRotation; - - /// @brief Matrix with the Vertex's positions of connections between parents an their childs - std::vector connectionPositions; - - private: - /// @brief pointer to additional parent - GNEAdditional *myAdditional; - }; - /// @brief The GNEViewNet this additional element belongs GNEViewNet* myViewNet; @@ -420,27 +364,9 @@ /// @brief boolean to check if additional element is blocked (i.e. cannot be moved with mouse) bool myBlockMovement; - /// @brief pointer to first Additional parent - GNEAdditional* myFirstAdditionalParent; - - /// @brief pointer to second Additional parent - GNEAdditional* mySecondAdditionalParent; - - /// @brief vector with the Additional childs - std::vector myAdditionalChilds; - - /// @brief vector with the edge childs of this additional - std::vector myEdgeChilds; - - /// @brief vector with the lane childs of this additional - std::vector myLaneChilds; - /// @brief variable BlockIcon BlockIcon myBlockIcon; - /// @brief variable ChildConnections - ChildConnections myChildConnections; - /// @brief change all attributes of additional with their default values (note: this cannot be undo) void setDefaultValues(); @@ -462,29 +388,6 @@ */ void changeAdditionalID(const std::string& newID); - /**@brief change edge of additional - * @throw exception if oldEdge doesn't belong to an edge - * @throw exception if edge with ID newEdgeID doesn't exist - */ - GNEEdge* changeEdge(GNEEdge* oldEdge, const std::string& newEdgeID); - - /**@brief change lane of additional - * @throw exception if oldLane doesn't belong to an edge - * @throw exception if lane with ID newLaneID doesn't exist - */ - GNELane* changeLane(GNELane* oldLane, const std::string& newLaneID); - - /**@brief change first additional parent of additional - * @throw exception if this additional doesn't have previously a defined Additional parent - * @throw exception if additional with ID newAdditionalParentID doesn't exist - */ - void changeFirstAdditionalParent(const std::string& newAdditionalParentID); - - /**@brief change second additional parent of additional - * @throw exception if this additional doesn't have previously a defined Additional parent - * @throw exception if additional with ID newAdditionalParentID doesn't exist - */ - void changeSecondAdditionalParent(const std::string& newAdditionalParentID); /// @} private: @@ -496,9 +399,6 @@ /// @brief method for setting the attribute and nothing else (used in GNEChange_Attribute) virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0; - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /// @brief Invalidated copy constructor. GNEAdditional(const GNEAdditional&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -33,8 +33,6 @@ #include "GNEAccess.h" #include "GNECalibrator.h" #include "GNECalibratorFlow.h" -#include "GNECalibratorRoute.h" -#include "GNECalibratorVehicleType.h" #include "GNEChargingStation.h" #include "GNEClosingLaneReroute.h" #include "GNEClosingReroute.h" @@ -43,8 +41,7 @@ #include "GNEDetectorE1.h" #include "GNEDetectorE2.h" #include "GNEDetectorE3.h" -#include "GNEDetectorEntry.h" -#include "GNEDetectorExit.h" +#include "GNEDetectorEntryExit.h" #include "GNEDetectorE1Instant.h" #include "GNEParkingArea.h" #include "GNEParkingSpace.h" @@ -57,23 +54,25 @@ #include "GNEVariableSpeedSign.h" #include "GNEVariableSpeedSignStep.h" #include "GNETAZ.h" -#include "GNETAZSource.h" -#include "GNETAZSink.h" +#include "GNETAZSourceSink.h" // =========================================================================== -// member method definitions +// GNEAdditionalHandler method definitions // =========================================================================== GNEAdditionalHandler::GNEAdditionalHandler(const std::string& file, GNEViewNet* viewNet, bool undoAdditionals, GNEAdditional* additionalParent) : - SUMOSAXHandler(file), + ShapeHandler(file, *viewNet->getNet()), myViewNet(viewNet), myUndoAdditionals(undoAdditionals), myAdditionalParent(additionalParent) { + // check if we're loading values of another additionals (example: Rerouter values) if (additionalParent) { myHierarchyInsertedAdditionals.insertElement(additionalParent->getTagProperty().getTag()); myHierarchyInsertedAdditionals.commitElementInsertion(additionalParent); } + // define default values for shapes + setDefaults("", RGBColor::RED, Shape::DEFAULT_LAYER_POI, true); } @@ -95,2438 +94,2391 @@ myHierarchyInsertedAdditionals.insertElement(tag); // Call parse and build depending of tag switch (tag) { - case SUMO_TAG_BUS_STOP: - parseAndBuildBusStop(attrs, tag); - break; - case SUMO_TAG_TRAIN_STOP: - parseAndBuildBusStop(attrs, SUMO_TAG_BUS_STOP); - break; - case SUMO_TAG_ACCESS: - parseAndBuildAccess(attrs, tag); - break; - case SUMO_TAG_CONTAINER_STOP: - parseAndBuildContainerStop(attrs, tag); - break; - case SUMO_TAG_CHARGING_STATION: - parseAndBuildChargingStation(attrs, tag); - break; - case SUMO_TAG_E1DETECTOR: - case SUMO_TAG_INDUCTION_LOOP: - parseAndBuildDetectorE1(attrs, tag); - break; - case SUMO_TAG_E2DETECTOR: - case SUMO_TAG_LANE_AREA_DETECTOR: - parseAndBuildDetectorE2(attrs, tag); - break; - case SUMO_TAG_E3DETECTOR: - case SUMO_TAG_ENTRY_EXIT_DETECTOR: - parseAndBuildDetectorE3(attrs, tag); - break; - case SUMO_TAG_DET_ENTRY: - parseAndBuildDetectorEntry(attrs, tag); - break; - case SUMO_TAG_DET_EXIT: - parseAndBuildDetectorExit(attrs, tag); - break; - case SUMO_TAG_INSTANT_INDUCTION_LOOP: - parseAndBuildDetectorE1Instant(attrs, tag); - break; - case SUMO_TAG_ROUTEPROBE: - parseAndBuildRouteProbe(attrs, tag); - break; - case SUMO_TAG_VAPORIZER: - parseAndBuildVaporizer(attrs, tag); - break; - case SUMO_TAG_TAZ: - parseAndBuildTAZ(attrs, tag); - break; - case SUMO_TAG_TAZSOURCE: - parseAndBuildTAZSource(attrs, tag); - break; - case SUMO_TAG_TAZSINK: - parseAndBuildTAZSink(attrs, tag); - break; - case SUMO_TAG_VSS: - parseAndBuildVariableSpeedSign(attrs, tag); - break; - case SUMO_TAG_STEP: - parseAndBuildVariableSpeedSignStep(attrs, tag); - break; - case SUMO_TAG_CALIBRATOR: - parseAndBuildCalibrator(attrs, tag); - break; - case SUMO_TAG_PARKING_AREA: - parseAndBuildParkingArea(attrs, tag); - break; - case SUMO_TAG_PARKING_SPACE: - parseAndBuildParkingSpace(attrs, tag); - break; - case SUMO_TAG_VTYPE: - parseAndBuildCalibratorVehicleType(attrs, tag); - break; - case SUMO_TAG_ROUTE: - parseAndBuildCalibratorRoute(attrs, tag); - break; - case SUMO_TAG_FLOW: - parseAndBuildCalibratorFlow(attrs, tag); - break; - case SUMO_TAG_REROUTER: - parseAndBuildRerouter(attrs, tag); - break; - case SUMO_TAG_INTERVAL: - parseAndBuildRerouterInterval(attrs, tag); - break; - case SUMO_TAG_CLOSING_LANE_REROUTE: - parseAndBuildRerouterClosingLaneReroute(attrs, tag); - break; - case SUMO_TAG_CLOSING_REROUTE: - parseAndBuildRerouterClosingReroute(attrs, tag); - break; - case SUMO_TAG_DEST_PROB_REROUTE: - parseAndBuildRerouterDestProbReroute(attrs, tag); - break; - case SUMO_TAG_PARKING_ZONE_REROUTE: - parseAndBuildRerouterParkingAreaReroute(attrs, tag); - break; - case SUMO_TAG_ROUTE_PROB_REROUTE: - parseAndBuildRerouterRouteProbReroute(attrs, tag); - break; + case SUMO_TAG_POLY: + return parseAndBuildPoly(attrs); + case SUMO_TAG_POI: + return parseAndBuildPOI(attrs); default: - break; + // build additional + buildAdditional(myViewNet, true, tag, attrs, &myHierarchyInsertedAdditionals); } } } void -GNEAdditionalHandler::myEndElement(int) { +GNEAdditionalHandler::myEndElement(int element) { + // Obtain tag of element + SumoXMLTag tag = static_cast(element); + switch (tag) { + case SUMO_TAG_TAZ: { + GNETAZ* TAZ = dynamic_cast(myHierarchyInsertedAdditionals.getLastInsertedAdditional()); + if (TAZ != nullptr) { + if (TAZ->getShape().size() == 0) { + Boundary b; + if (TAZ->getAdditionalChilds().size() > 0) { + for (const auto& i : TAZ->getAdditionalChilds()) { + b.add(i->getCenteringBoundary()); + } + PositionVector boundaryShape; + boundaryShape.push_back(Position(b.xmin(), b.ymin())); + boundaryShape.push_back(Position(b.xmax(), b.ymin())); + boundaryShape.push_back(Position(b.xmax(), b.ymax())); + boundaryShape.push_back(Position(b.xmin(), b.ymax())); + boundaryShape.push_back(Position(b.xmin(), b.ymin())); + TAZ->setAttribute(SUMO_ATTR_SHAPE, toString(boundaryShape), myViewNet->getUndoList()); + } + } + } + break; + } + default: + break; + } // pop last inserted element myHierarchyInsertedAdditionals.popElement(); + // execute myEndElement of ShapeHandler (needed to update myLastParameterised) + ShapeHandler::myEndElement(element); } -void -GNEAdditionalHandler::parseAndBuildVaporizer(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Vaporizer - const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_BEGIN, abort); - double end = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_END, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_NAME, abort); - // Continue if all parameters were successfully loaded - if (!abort) { - // get GNEEdge - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(edgeID, false); - // check that all parameters are valid - if (edge == nullptr) { - WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(tag) + " is not known."); - } else if (myViewNet->getNet()->retrieveAdditional(tag, edgeID, false) != nullptr) { - WRITE_WARNING("There is already a " + toString(tag) + " in the edge '" + edgeID + "'."); - } else if (begin > end) { - WRITE_WARNING("Time interval of " + toString(tag) + " isn't valid. Attribute '" + toString(SUMO_ATTR_BEGIN) + "' is greater than attribute '" + toString(SUMO_ATTR_END) + "'."); - } else { - // build vaporizer - myHierarchyInsertedAdditionals.commitElementInsertion(buildVaporizer(myViewNet, myUndoAdditionals, edge, begin, end, name)); - } +Position +GNEAdditionalHandler::getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat) { + std::string edgeID; + int laneIndex; + NBHelpers::interpretLaneID(laneID, edgeID, laneIndex); + NBEdge* edge = myViewNet->getNet()->retrieveEdge(edgeID)->getNBEdge(); + if (edge == nullptr || laneIndex < 0 || edge->getNumLanes() <= laneIndex) { + WRITE_ERROR("Lane '" + laneID + "' to place poi '" + poiID + "' on is not known."); + return Position::INVALID; + } + if (lanePos < 0) { + lanePos = edge->getLength() + lanePos; } + if (lanePos < 0 || lanePos > edge->getLength()) { + WRITE_WARNING("lane position " + toString(lanePos) + " for poi '" + poiID + "' is not valid."); + } + return edge->getLanes()[laneIndex].shape.positionAtOffset(lanePos, -lanePosLat); } -void -GNEAdditionalHandler::parseAndBuildTAZ(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Vaporizer - const std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - const PositionVector shape = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_SHAPE, abort); - RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_COLOR, abort); - std::vector edgeIDs; - if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { - std::string parsedAttribute = attrs.get(SUMO_ATTR_EDGES, id.c_str(), abort, false); - edgeIDs = GNEAttributeCarrier::parse >(parsedAttribute); - } - // check if all edge IDs are valid - std::vector edges; - for (auto i : edgeIDs) { - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(i, false); - if (edge == nullptr) { - WRITE_WARNING("Invalid " + toString(SUMO_TAG_EDGE) + " with ID = '" + i + "'."); - abort = true; - } else { - edges.push_back(edge); - } - } - // Continue if all parameters were successfully loaded - if (!abort) { - // check that all parameters are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildTAZ(myViewNet, myUndoAdditionals, id, shape, color, edges, false)); - } +bool +GNEAdditionalHandler::buildAdditional(GNEViewNet* viewNet, bool allowUndoRedo, SumoXMLTag tag, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + // Call parse and build depending of tag + switch (tag) { + case SUMO_TAG_BUS_STOP: + case SUMO_TAG_TRAIN_STOP: + return parseAndBuildBusStop(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_ACCESS: + return parseAndBuildAccess(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_CONTAINER_STOP: + return parseAndBuildContainerStop(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_CHARGING_STATION: + return parseAndBuildChargingStation(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_E1DETECTOR: + case SUMO_TAG_INDUCTION_LOOP: + return parseAndBuildDetectorE1(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_E2DETECTOR: + case SUMO_TAG_E2DETECTOR_MULTILANE: + case SUMO_TAG_LANE_AREA_DETECTOR: + return parseAndBuildDetectorE2(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_E3DETECTOR: + case SUMO_TAG_ENTRY_EXIT_DETECTOR: + return parseAndBuildDetectorE3(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_DET_ENTRY: + return parseAndBuildDetectorEntry(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_DET_EXIT: + return parseAndBuildDetectorExit(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_INSTANT_INDUCTION_LOOP: + return parseAndBuildDetectorE1Instant(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_ROUTEPROBE: + return parseAndBuildRouteProbe(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_VAPORIZER: + return parseAndBuildVaporizer(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_TAZ: + return parseAndBuildTAZ(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_TAZSOURCE: + return parseAndBuildTAZSource(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_TAZSINK: + return parseAndBuildTAZSink(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_VSS: + return parseAndBuildVariableSpeedSign(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_STEP: + return parseAndBuildVariableSpeedSignStep(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_CALIBRATOR: + case SUMO_TAG_LANECALIBRATOR: + return parseAndBuildCalibrator(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_PARKING_AREA: + return parseAndBuildParkingArea(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_PARKING_SPACE: + return parseAndBuildParkingSpace(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_CALIBRATORFLOW: + return parseAndBuildCalibratorFlow(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_REROUTER: + return parseAndBuildRerouter(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_INTERVAL: + return parseAndBuildRerouterInterval(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_CLOSING_LANE_REROUTE: + return parseAndBuildRerouterClosingLaneReroute(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_CLOSING_REROUTE: + return parseAndBuildRerouterClosingReroute(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_DEST_PROB_REROUTE: + return parseAndBuildRerouterDestProbReroute(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_PARKING_ZONE_REROUTE: + return parseAndBuildRerouterParkingAreaReroute(viewNet, allowUndoRedo, attrs, insertedAdditionals); + case SUMO_TAG_ROUTE_PROB_REROUTE: + return parseAndBuildRerouterRouteProbReroute(viewNet, allowUndoRedo, attrs, insertedAdditionals); + default: + return false; } } -void -GNEAdditionalHandler::parseAndBuildTAZSource(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Vaporizer - const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - const double departWeight = GNEAttributeCarrier::parseAttributeFromXML(attrs, edgeID, tag, SUMO_ATTR_WEIGHT, abort); - // Continue if all parameters were successfully loaded - if (!abort) { - // get edge and TAZ - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(edgeID, false); - GNEAdditional* TAZ = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_TAZ); - // check that all parameters are valid - if (edge == nullptr) { - WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(tag) + " is not known."); - } else if (TAZ == nullptr) { - WRITE_WARNING("A " + toString(tag) + " must be declared within the definition of a " + toString(SUMO_TAG_TAZ) + "."); +GNEAdditional* +GNEAdditionalHandler::buildBusStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, int personCapacity, bool friendlyPosition, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, id, false) == nullptr) { + GNEBusStop* busStop = new GNEBusStop(id, lane, viewNet, startPos, endPos, name, lines, personCapacity, friendlyPosition, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_BUS_STOP)); + viewNet->getUndoList()->add(new GNEChange_Additional(busStop, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildTAZSource(myViewNet, myUndoAdditionals, TAZ, edge, departWeight)); + viewNet->getNet()->insertAdditional(busStop); + lane->addAdditionalChild(busStop); + busStop->incRef("buildBusStop"); } + return busStop; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_BUS_STOP) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildTAZSink(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Vaporizer - const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - const double arrivalWeight = GNEAttributeCarrier::parseAttributeFromXML(attrs, edgeID, tag, SUMO_ATTR_WEIGHT, abort); - // Continue if all parameters were successfully loaded - if (!abort) { - // get edge and TAZ - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(edgeID, false); - GNEAdditional* TAZ = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_TAZ); - // check that all parameters are valid - if (edge == nullptr) { - WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(tag) + " is not known."); - } else if (TAZ == nullptr) { - WRITE_WARNING("A " + toString(tag) + " must be declared within the definition of a " + toString(SUMO_TAG_TAZ) + "."); +GNEAdditional* +GNEAdditionalHandler::buildAccess(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* busStop, GNELane* lane, const std::string& pos, const std::string& length, bool friendlyPos, bool blockMovement) { + // Check if busStop parent and lane is correct + if (lane == nullptr) { + throw ProcessError("Could not build " + toString(SUMO_TAG_ACCESS) + " in netedit; " + toString(SUMO_TAG_LANE) + " doesn't exist."); + } else if (busStop == nullptr) { + throw ProcessError("Could not build " + toString(SUMO_TAG_ACCESS) + " in netedit; " + toString(SUMO_TAG_BUS_STOP) + " parent doesn't exist."); + } else if (!accessCanBeCreated(busStop, lane->getParentEdge())) { + throw ProcessError("Could not build " + toString(SUMO_TAG_ACCESS) + " in netedit; " + toString(SUMO_TAG_BUS_STOP) + " parent already owns a Acces in the edge '" + lane->getParentEdge().getID() + "'"); + } else { + GNEAccess* access = new GNEAccess(busStop, lane, viewNet, pos, length, friendlyPos, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_ACCESS)); + viewNet->getUndoList()->add(new GNEChange_Additional(access, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildTAZSink(myViewNet, myUndoAdditionals, TAZ, edge, arrivalWeight)); + viewNet->getNet()->insertAdditional(access); + lane->addAdditionalChild(access); + busStop->addAdditionalChild(access); + access->incRef("buildAccess"); } + return access; } } -void -GNEAdditionalHandler::parseAndBuildRouteProbe(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of RouteProbe - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string edgeId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_EDGE, abort); - std::string freq = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FREQUENCY, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FILE, abort); - double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_BEGIN, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get edge - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(edgeId, false); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (edge == nullptr) { - // Write error if lane isn't valid - WRITE_WARNING("The edge '" + edgeId + "' to use within the " + toString(tag) + " '" + id + "' is not known."); +GNEAdditional* +GNEAdditionalHandler::buildContainerStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, bool friendlyPosition, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CONTAINER_STOP, id, false) == nullptr) { + GNEContainerStop* containerStop = new GNEContainerStop(id, lane, viewNet, startPos, endPos, name, lines, friendlyPosition, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CONTAINER_STOP)); + viewNet->getUndoList()->add(new GNEChange_Additional(containerStop, true), true); + viewNet->getUndoList()->p_end(); } else { - // Freq needs an extra check, because it can be empty - if (GNEAttributeCarrier::canParse(freq)) { - if (GNEAttributeCarrier::parse(freq) < 0) { - WRITE_WARNING(toString(SUMO_ATTR_FREQUENCY) + "of " + toString(tag) + "'" + id + "' cannot be negative."); - freq = ""; - } - } else { - if (freq.empty()) { - WRITE_WARNING(toString(SUMO_ATTR_FREQUENCY) + "of " + toString(tag) + "'" + id + "' cannot be parsed to float."); - } - freq = ""; - } - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildRouteProbe(myViewNet, myUndoAdditionals, id, edge, freq, name, file, begin)); + viewNet->getNet()->insertAdditional(containerStop); + lane->addAdditionalChild(containerStop); + containerStop->incRef("buildContainerStop"); } + return containerStop; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_CONTAINER_STOP) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildCalibratorRoute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attribute of calibrator routes - std::string routeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string edgeIDs = GNEAttributeCarrier::parseAttributeFromXML(attrs, routeID, tag, SUMO_ATTR_EDGES, abort); - RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, routeID, tag, SUMO_ATTR_COLOR, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain edges (And show warnings if isn't valid) - std::vector edges; - if (GNEAttributeCarrier::canParse >(myViewNet->getNet(), edgeIDs, true)) { - edges = GNEAttributeCarrier::parse >(myViewNet->getNet(), edgeIDs); - } - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTE, routeID, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + routeID + "'."); - } else if (edges.size() == 0) { - WRITE_WARNING("Routes needs at least one edge."); +GNEAdditional* +GNEAdditionalHandler::buildChargingStation(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, + double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay, bool friendlyPosition, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CHARGING_STATION, id, false) == nullptr) { + GNEChargingStation* chargingStation = new GNEChargingStation(id, lane, viewNet, startPos, endPos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, friendlyPosition, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CHARGING_STATION)); + viewNet->getUndoList()->add(new GNEChange_Additional(chargingStation, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildCalibratorRoute(myViewNet, myUndoAdditionals, routeID, edges, color)); + viewNet->getNet()->insertAdditional(chargingStation); + lane->addAdditionalChild(chargingStation); + chargingStation->incRef("buildChargingStation"); } + return chargingStation; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_CHARGING_STATION) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildCalibratorVehicleType(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attribute of calibrator vehicle types - std::string vehicleTypeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - double accel = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_ACCEL, abort); - double decel = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_DECEL, abort); - double sigma = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_SIGMA, abort); - double tau = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_TAU, abort); - double length = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_LENGTH, abort); - double minGap = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_MINGAP, abort); - double maxSpeed = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_MAXSPEED, abort); - double speedFactor = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_SPEEDFACTOR, abort); - double speedDev = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_SPEEDDEV, abort); - RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_COLOR, abort); - SUMOVehicleClass vClass = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_VCLASS, abort); - std::string emissionClass = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_EMISSIONCLASS, abort); - SUMOVehicleShape shape = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_GUISHAPE, abort); - double width = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_WIDTH, abort); - std::string filename = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_IMGFILE, abort); - double impatience = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_IMPATIENCE, abort); - std::string laneChangeModel = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_LANE_CHANGE_MODEL, abort); - std::string carFollowModel = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_CAR_FOLLOW_MODEL, abort); - int personCapacity = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_PERSON_CAPACITY, abort); - int containerCapacity = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_CONTAINER_CAPACITY, abort); - double boardingDuration = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_BOARDING_DURATION, abort); - double loadingDuration = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_LOADING_DURATION, abort); - std::string latAlignment = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_LATALIGNMENT, abort); - double minGapLat = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_MINGAP_LAT, abort); - double maxSpeedLat = GNEAttributeCarrier::parseAttributeFromXML(attrs, vehicleTypeID, tag, SUMO_ATTR_MAXSPEED_LAT, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_VTYPE, vehicleTypeID, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + vehicleTypeID + "'."); +GNEAdditional* +GNEAdditionalHandler::buildParkingArea(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, + bool friendlyPosition, int roadSideCapacity, bool onRoad, double width, const std::string& length, double angle, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, id, false) == nullptr) { + GNEParkingArea* parkingArea = new GNEParkingArea(id, lane, viewNet, startPos, endPos, name, friendlyPosition, roadSideCapacity, onRoad, width, length, angle, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_PARKING_AREA)); + viewNet->getUndoList()->add(new GNEChange_Additional(parkingArea, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildVehicleType(myViewNet, true, vehicleTypeID, accel, decel, sigma, tau, length, minGap, maxSpeed, speedFactor, speedDev, color, vClass, emissionClass, shape, width, - filename, impatience, laneChangeModel, carFollowModel, personCapacity, containerCapacity, boardingDuration, loadingDuration, latAlignment, minGapLat, maxSpeedLat)); + viewNet->getNet()->insertAdditional(parkingArea); + lane->addAdditionalChild(parkingArea); + parkingArea->incRef("buildParkingArea"); } + return parkingArea; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_PARKING_AREA) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildCalibratorFlow(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of calibrator flows - std::string vehicleTypeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_TYPE, abort); - std::string routeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ROUTE, abort); - std::string vehsPerHour = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_VEHSPERHOUR, abort); - std::string speed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_SPEED, abort); - RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_COLOR, abort); - std::string departLane = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_DEPARTLANE, abort); - std::string departPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_DEPARTPOS, abort); - std::string departSpeed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_DEPARTSPEED, abort); - std::string arrivalLane = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ARRIVALLANE, abort); - std::string arrivalPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ARRIVALPOS, abort); - std::string arrivalSpeed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ARRIVALSPEED, abort); - std::string line = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_LINE, abort); - int personNumber = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_PERSON_NUMBER, abort); - int containerNumber = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_CONTAINER_NUMBER, abort); - bool reroute = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_REROUTE, abort); - std::string departPosLat = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_DEPARTPOS_LAT, abort); - std::string arrivalPosLat = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ARRIVALPOS_LAT, abort); - double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_BEGIN, abort); - double end = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_END, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain route, vehicle type and calibrator parent - GNEAdditional* calibrator = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_CALIBRATOR); - GNEAdditional* route = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTE, routeID, false); - GNEAdditional* vtype = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_VTYPE, vehicleTypeID, false); - // check that all elements are valid - if (route == nullptr) { - WRITE_WARNING(toString(SUMO_TAG_FLOW) + " cannot be created; their " + toString(SUMO_TAG_ROUTE) + " with ID = '" + routeID + "' doesn't exist"); - abort = true; - } else if (vtype == nullptr) { - WRITE_WARNING(toString(SUMO_TAG_FLOW) + " cannot be created; their " + toString(SUMO_TAG_VTYPE) + " with ID = '" + vehicleTypeID + "' doesn't exist"); - abort = true; - } else if ((vehsPerHour.empty()) && (speed.empty())) { - WRITE_WARNING(toString(SUMO_TAG_FLOW) + " cannot be created; At least parameters " + toString(SUMO_ATTR_VEHSPERHOUR) + " or " + toString(SUMO_ATTR_SPEED) + " has to be defined"); - abort = true; - } else if (calibrator != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildCalibratorFlow(myViewNet, true, calibrator, route, vtype, vehsPerHour, speed, color, departLane, departPos, departSpeed, arrivalLane, arrivalPos, arrivalSpeed, - line, personNumber, containerNumber, reroute, departPosLat, arrivalPosLat, begin, end)); - } +GNEAdditional* +GNEAdditionalHandler::buildParkingSpace(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* parkingAreaParent, Position pos, double width, double length, double angle, bool blockMovement) { + GNEParkingSpace* parkingSpace = new GNEParkingSpace(viewNet, parkingAreaParent, pos, width, length, angle, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_PARKING_SPACE)); + viewNet->getUndoList()->add(new GNEChange_Additional(parkingSpace, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(parkingSpace); + parkingAreaParent->addAdditionalChild(parkingSpace); + parkingSpace->incRef("buildParkingSpace"); } + return parkingSpace; } -void -GNEAdditionalHandler::parseGenericParameter(const SUMOSAXAttributes& attrs) { - if (myHierarchyInsertedAdditionals.getLastInsertedAdditional()) { - // first check if given additional supports generic parameters - if (myHierarchyInsertedAdditionals.getLastInsertedAdditional()->getTagProperty().hasGenericParameters()) { - bool ok = true; - std::string key; - if (attrs.hasAttribute(SUMO_ATTR_KEY)) { - // obtain key - key = attrs.get(SUMO_ATTR_KEY, nullptr, ok); - if (key.empty()) { - WRITE_WARNING("Error parsing key from additional generic parameter. Key cannot be empty"); - ok = false; - } - if (!SUMOXMLDefinitions::isValidTypeID(key)) { - WRITE_WARNING("Error parsing key from additional generic parameter. Key contains invalid characters"); - ok = false; - } - } else { - WRITE_WARNING("Error parsing key from additional generic parameter. Key doesn't exist"); - ok = false; - } - // circumventing empty string test - const std::string val = attrs.hasAttribute(SUMO_ATTR_VALUE) ? attrs.getString(SUMO_ATTR_VALUE) : ""; - if (!SUMOXMLDefinitions::isValidAttribute(val)) { - WRITE_WARNING("Error parsing value from additional generic parameter. Value contains invalid characters"); - ok = false; - } - // set parameter in last inserted additional - if (ok) { - WRITE_DEBUG("Inserting generic parameter '" + key + "|" + val + "' into additional " + myHierarchyInsertedAdditionals.getLastInsertedAdditional()->getTagStr() + "."); - myHierarchyInsertedAdditionals.getLastInsertedAdditional()->setParameter(key, val); - } +GNEAdditional* +GNEAdditionalHandler::buildDetectorE1(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E1DETECTOR, id, false) == nullptr) { + GNEDetectorE1* detectorE1 = new GNEDetectorE1(id, lane, viewNet, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E1DETECTOR)); + viewNet->getUndoList()->add(new GNEChange_Additional(detectorE1, true), true); + viewNet->getUndoList()->p_end(); } else { - WRITE_WARNING("Additionals of type '" + myHierarchyInsertedAdditionals.getLastInsertedAdditional()->getTagStr() + "' doesn't support Generic Parameters"); + viewNet->getNet()->insertAdditional(detectorE1); + lane->addAdditionalChild(detectorE1); + detectorE1->incRef("buildDetectorE1"); } + return detectorE1; } else { - WRITE_WARNING("Generic Parameters has to be declared within the definition of an additional element"); + throw ProcessError("Could not build " + toString(SUMO_TAG_E1DETECTOR) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildVariableSpeedSign(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of VSS - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FILE, abort); // deprecated - std::string lanesIDs = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LANES, abort); - Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_POSITION, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain lanes - std::vector lanes; - if (GNEAttributeCarrier::canParse >(myViewNet->getNet(), lanesIDs, true)) { - lanes = GNEAttributeCarrier::parse >(myViewNet->getNet(), lanesIDs); - } - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (lanes.size() == 0) { - WRITE_WARNING("A Variable Speed Sign needs at least one lane."); +GNEAdditional* +GNEAdditionalHandler::buildSingleLaneDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double length, double freq, const std::string& filename, + const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E2DETECTOR, id, false) == nullptr) { + GNEDetectorE2* detectorE2 = new GNEDetectorE2(id, lane, viewNet, pos, length, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E2DETECTOR)); + viewNet->getUndoList()->add(new GNEChange_Additional(detectorE2, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildVariableSpeedSign(myViewNet, myUndoAdditionals, id, pos, lanes, name, false)); - } - } -} - -void -GNEAdditionalHandler::parseAndBuildVariableSpeedSignStep(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // Load step values - double time = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_TIME, abort); - double speed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_SPEED, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get Variable Speed Signal - GNEAdditional* variableSpeedSign = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_VSS); - // check that all parameters are valid - if (variableSpeedSign != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildVariableSpeedSignStep(myViewNet, true, variableSpeedSign, time, speed)); + viewNet->getNet()->insertAdditional(detectorE2); + lane->addAdditionalChild(detectorE2); + detectorE2->incRef("buildDetectorE2"); } + return detectorE2; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_E2DETECTOR) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildRerouter(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Rerouter - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string edgesIDs = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_EDGES, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FILE, abort); - double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_PROB, abort); - bool off = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_OFF, abort); - double timeThreshold = attrs.getOpt(SUMO_ATTR_HALTING_TIME_THRESHOLD, id.c_str(), abort, 0); - const std::string vTypes = attrs.getOpt(SUMO_ATTR_VTYPES, id.c_str(), abort, ""); - Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_POSITION, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain edges - std::vector edges; - if (GNEAttributeCarrier::canParse >(myViewNet->getNet(), edgesIDs, true)) { - edges = GNEAttributeCarrier::parse >(myViewNet->getNet(), edgesIDs); - } - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (edges.size() == 0) { - WRITE_WARNING("A rerouter needs at least one Edge"); +GNEAdditional* +GNEAdditionalHandler::buildMultiLaneDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, const std::vector& lanes, double pos, double endPos, double freq, const std::string& filename, + const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E2DETECTOR_MULTILANE, id, false) == nullptr) { + GNEDetectorE2* detectorE2 = new GNEDetectorE2(id, lanes, viewNet, pos, endPos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E2DETECTOR_MULTILANE)); + viewNet->getUndoList()->add(new GNEChange_Additional(detectorE2, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildRerouter(myViewNet, myUndoAdditionals, id, pos, edges, probability, name, file, off, timeThreshold, vTypes, false)); + viewNet->getNet()->insertAdditional(detectorE2); + for (auto i : lanes) { + i->addAdditionalChild(detectorE2); + } + detectorE2->incRef("buildDetectorE2Multilane"); } + // check E2 integrity + detectorE2->checkE2MultilaneIntegrity(); + return detectorE2; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_E2DETECTOR_MULTILANE) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildRerouterInterval(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Rerouter - double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_BEGIN, abort); - double end = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_END, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain rerouter - GNEAdditional* rerouter = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_REROUTER); - // special case for load multiple intervals in the same rerouter - if (rerouter == nullptr) { - GNEAdditional* lastInsertedRerouterInterval = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_INTERVAL); - if (lastInsertedRerouterInterval) { - rerouter = lastInsertedRerouterInterval->getFirstAdditionalParent(); - } - } - // check that rerouterInterval can be created - if (begin >= end) { - WRITE_WARNING(toString(tag) + " cannot be created; Attribute " + toString(SUMO_ATTR_END) + " must be greather than " + toString(SUMO_ATTR_BEGIN) + "."); - } else if (rerouter != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildRerouterInterval(myViewNet, true, rerouter, begin, end)); +GNEAdditional* +GNEAdditionalHandler::buildDetectorE3(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, double freq, const std::string& filename, const std::string& vehicleTypes, + const std::string& name, const double timeThreshold, double speedThreshold, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, id, false) == nullptr) { + GNEDetectorE3* detectorE3 = new GNEDetectorE3(id, viewNet, pos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E3DETECTOR)); + viewNet->getUndoList()->add(new GNEChange_Additional(detectorE3, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(detectorE3); + detectorE3->incRef("buildDetectorE3"); } + return detectorE3; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_E3DETECTOR) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildRerouterClosingLaneReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Rerouter - std::string laneID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string allow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ALLOW, abort); - std::string disallow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_DISALLOW, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain lane and rerouter interval - GNELane* lane = myViewNet->getNet()->retrieveLane(laneID, false, true); - GNEAdditional* rerouterInterval = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_INTERVAL); - // check that all elements are valid - if (lane == nullptr) { - WRITE_WARNING("The lane '" + laneID + "' to use within the " + toString(tag) + " is not known."); - } else if (rerouterInterval != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildClosingLaneReroute(myViewNet, true, rerouterInterval, lane, parseVehicleClasses(allow, disallow))); +GNEAdditional* +GNEAdditionalHandler::buildDetectorEntry(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement) { + // Check if Detector E3 parent and lane is correct + if (lane == nullptr) { + throw ProcessError("Could not build " + toString(SUMO_TAG_DET_ENTRY) + " in netedit; " + toString(SUMO_TAG_LANE) + " doesn't exist."); + } else if (E3Parent == nullptr) { + throw ProcessError("Could not build " + toString(SUMO_TAG_DET_ENTRY) + " in netedit; " + toString(SUMO_TAG_E3DETECTOR) + " parent doesn't exist."); + } else { + GNEDetectorEntryExit* entry = new GNEDetectorEntryExit(SUMO_TAG_DET_ENTRY, viewNet, E3Parent, lane, pos, friendlyPos, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_DET_ENTRY)); + viewNet->getUndoList()->add(new GNEChange_Additional(entry, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(entry); + lane->addAdditionalChild(entry); + E3Parent->addAdditionalChild(entry); + entry->incRef("buildDetectorEntry"); } + return entry; } } -void -GNEAdditionalHandler::parseAndBuildRerouterClosingReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Rerouter - std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string allow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ALLOW, abort); - std::string disallow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_DISALLOW, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain edge and rerouter interval - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(edgeID, false); - GNEAdditional* rerouterInterval = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_INTERVAL); - // check that all elements are valid - if (edge == nullptr) { - WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(tag) + " is not known."); - } else if (rerouterInterval != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildClosingReroute(myViewNet, true, rerouterInterval, edge, parseVehicleClasses(allow, disallow))); +GNEAdditional* +GNEAdditionalHandler::buildDetectorExit(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement) { + // Check if Detector E3 parent and lane is correct + if (lane == nullptr) { + throw ProcessError("Could not build " + toString(SUMO_TAG_DET_EXIT) + " in netedit; " + toString(SUMO_TAG_LANE) + " doesn't exist."); + } else if (E3Parent == nullptr) { + throw ProcessError("Could not build " + toString(SUMO_TAG_DET_EXIT) + " in netedit; " + toString(SUMO_TAG_E3DETECTOR) + " parent doesn't exist."); + } else { + GNEDetectorEntryExit* exit = new GNEDetectorEntryExit(SUMO_TAG_DET_EXIT, viewNet, E3Parent, lane, pos, friendlyPos, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_DET_EXIT)); + viewNet->getUndoList()->add(new GNEChange_Additional(exit, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(exit); + lane->addAdditionalChild(exit); + E3Parent->addAdditionalChild(exit); + exit->incRef("buildDetectorExit"); } + return exit; } } -void -GNEAdditionalHandler::parseAndBuildRerouterDestProbReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Rerouter - std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_PROB, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain edge and rerouter interval - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(edgeID, false); - GNEAdditional* rerouterInterval = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_INTERVAL); - // check that all elements are valid - if (edge == nullptr) { - WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(tag) + " is not known."); - } else if (rerouterInterval != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(builDestProbReroute(myViewNet, true, rerouterInterval, edge, probability)); +GNEAdditional* +GNEAdditionalHandler::buildDetectorE1Instant(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_INSTANT_INDUCTION_LOOP, id, false) == nullptr) { + GNEDetectorE1Instant* detectorE1Instant = new GNEDetectorE1Instant(id, lane, viewNet, pos, filename, vehicleTypes, name, friendlyPos, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_INSTANT_INDUCTION_LOOP)); + viewNet->getUndoList()->add(new GNEChange_Additional(detectorE1Instant, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(detectorE1Instant); + lane->addAdditionalChild(detectorE1Instant); + detectorE1Instant->incRef("buildDetectorE1Instant"); } + return detectorE1Instant; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_INSTANT_INDUCTION_LOOP) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildRerouterParkingAreaReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Rerouter - std::string parkingAreaID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_PROB, abort); - bool visible = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_VISIBLE, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain edge and rerouter interval - GNEAdditional* parkingArea = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, parkingAreaID, false); - GNEAdditional* rerouterInterval = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_INTERVAL); - // check that all elements are valid - if (parkingArea == nullptr) { - WRITE_WARNING("The parkingArea '" + parkingAreaID + "' to use within the " + toString(tag) + " is not known."); - } else if (rerouterInterval != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(builParkingAreaReroute(myViewNet, true, rerouterInterval, parkingArea, probability, visible)); +GNEAdditional* +GNEAdditionalHandler::buildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& name, const std::string& outfile, const double freq, const std::string& routeprobe) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CALIBRATOR, id, false) == nullptr) { + GNECalibrator* calibrator = new GNECalibrator(id, viewNet, lane, pos, freq, name, outfile, routeprobe); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CALIBRATOR)); + viewNet->getUndoList()->add(new GNEChange_Additional(calibrator, true), true); + viewNet->getUndoList()->p_end(); + // center after creation + viewNet->centerTo(calibrator->getGlID(), false); + } else { + viewNet->getNet()->insertAdditional(calibrator); + lane->addAdditionalChild(calibrator); + calibrator->incRef("buildCalibrator"); } + return calibrator; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_CALIBRATOR) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildRerouterRouteProbReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Rerouter - std::string routeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_PROB, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // obtain rerouter interval - GNEAdditional* rerouterInterval = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_INTERVAL); - // check that all elements are valid - if (rerouterInterval != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildRouteProbReroute(myViewNet, true, rerouterInterval, routeID, probability)); +GNEAdditional* +GNEAdditionalHandler::buildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, double pos, const std::string& name, const std::string& outfile, const double freq, const std::string& routeprobe) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CALIBRATOR, id, false) == nullptr) { + GNECalibrator* calibrator = new GNECalibrator(id, viewNet, edge, pos, freq, name, outfile, routeprobe); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CALIBRATOR)); + viewNet->getUndoList()->add(new GNEChange_Additional(calibrator, true), true); + viewNet->getUndoList()->p_end(); + // center after creation + viewNet->centerTo(calibrator->getGlID(), false); + } else { + viewNet->getNet()->insertAdditional(calibrator); + edge->addAdditionalChild(calibrator); + calibrator->incRef("buildCalibrator"); } + return calibrator; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_CALIBRATOR) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildBusStop(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of bus stop - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LANE, abort); - std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_STARTPOS, abort); - std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ENDPOS, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - std::vector lines = GNEAttributeCarrier::parseAttributeFromXML >(attrs, id, tag, SUMO_ATTR_LINES, abort); - bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (lane == nullptr) { - // Write error if lane isn't valid - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " '" + id + "' is not known."); - } else if (!fixStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), POSITION_EPS, friendlyPosition)) { - // Write error if position isn't valid - WRITE_WARNING("Invalid position for " + toString(tag) + " with ID = '" + id + "'."); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildBusStop(myViewNet, myUndoAdditionals, id, lane, startPos, endPos, name, lines, friendlyPosition, false)); - } +GNEAdditional* +GNEAdditionalHandler::buildCalibratorFlow(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* calibratorParent, GNEDemandElement* route, GNEDemandElement* vType, + const std::string& vehsPerHour, const std::string& speed, const RGBColor& color, const std::string& departLane, const std::string& departPos, + const std::string& departSpeed, const std::string& arrivalLane, const std::string& arrivalPos, const std::string& arrivalSpeed, const std::string& line, + int personNumber, int containerNumber, bool reroute, const std::string& departPosLat, const std::string& arrivalPosLat, double begin, double end) { + + // create Flow and add it to calibrator parent + GNECalibratorFlow* flow = new GNECalibratorFlow(calibratorParent, vType, route, vehsPerHour, speed, color, departLane, departPos, departSpeed, + arrivalLane, arrivalPos, arrivalSpeed, line, personNumber, containerNumber, reroute, + departPosLat, arrivalPosLat, begin, end); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + flow->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(flow, true), true); + viewNet->getUndoList()->p_end(); + } else { + calibratorParent->addAdditionalChild(flow); + flow->incRef("buildCalibratorFlow"); } + return flow; } -void -GNEAdditionalHandler::parseAndBuildContainerStop(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of container stop - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LANE, abort); - std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_STARTPOS, abort); - std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ENDPOS, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - std::vector lines = GNEAttributeCarrier::parseAttributeFromXML >(attrs, id, tag, SUMO_ATTR_LINES, abort); - bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (lane == nullptr) { - // Write error if lane isn't valid - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " '" + id + "' is not known."); - } else if (!fixStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), POSITION_EPS, friendlyPosition)) { - // write error if position isn't valid - WRITE_WARNING("Invalid position for " + toString(tag) + " with ID = '" + id + "'."); +GNEAdditional* +GNEAdditionalHandler::buildRerouter(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, const std::vector& edges, double prob, const std::string& name, const std::string& file, bool off, double timeThreshold, const std::string& vTypes, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_REROUTER, id, false) == nullptr) { + GNERerouter* rerouter = new GNERerouter(id, viewNet, pos, edges, name, file, prob, off, timeThreshold, vTypes, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_REROUTER)); + viewNet->getUndoList()->add(new GNEChange_Additional(rerouter, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildContainerStop(myViewNet, myUndoAdditionals, id, lane, startPos, endPos, name, lines, friendlyPosition, false)); + viewNet->getNet()->insertAdditional(rerouter); + // add this rerouter as parent of all edges + for (auto i : edges) { + i->addAdditionalParent(rerouter); + } + rerouter->incRef("buildRerouter"); + } + // parse rerouter childs + if (!file.empty()) { + // we assume that rerouter values files is placed in the same folder as the additional file + std::string currentAdditionalFilename = FileHelpers::getFilePath(OptionsCont::getOptions().getString("additional-files")); + // Create additional handler for parse rerouter values + GNEAdditionalHandler rerouterValuesHandler(currentAdditionalFilename + file, viewNet, allowUndoRedo, rerouter); + // disable validation for rerouters + XMLSubSys::setValidation("never", "auto"); + // Run parser + if (!XMLSubSys::runParser(rerouterValuesHandler, currentAdditionalFilename + file, false)) { + WRITE_MESSAGE("Loading of " + file + " failed."); + } + // enable validation for rerouters + XMLSubSys::setValidation("auto", "auto"); } + return rerouter; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_REROUTER) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildAccess(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Entry - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_LANE, abort); - std::string position = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_POSITION, abort); - std::string length = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_LENGTH, abort); - bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Check if parsing of parameters was correct - if (!abort) { - double posDouble = GNEAttributeCarrier::parse(position); - // get lane and busStop parent - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - GNEAdditional* busStop = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_BUS_STOP); - // check that all parameters are valid - if (lane == nullptr) { - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " is not known."); - } else if (busStop == nullptr) { - WRITE_WARNING("A " + toString(tag) + " must be declared within the definition of a " + toString(SUMO_TAG_BUS_STOP) + "."); - } else if (!checkAndFixDetectorPosition(posDouble, lane->getLaneShapeLength(), friendlyPos)) { - WRITE_WARNING("Invalid position for " + toString(tag) + "."); - } else if (!accessCanBeCreated(busStop, lane->getParentEdge())) { - WRITE_WARNING("Edge '" + lane->getParentEdge().getID() + "' already has an Access for busStop '" + busStop->getID() + "'"); +GNEAdditional* +GNEAdditionalHandler::buildRerouterInterval(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterParent, double begin, double end) { + // check if new interval will produce a overlapping + if (checkOverlappingRerouterIntervals(rerouterParent, begin, end)) { + // create rerouter interval and add it into rerouter parent + GNERerouterInterval* rerouterInterval = new GNERerouterInterval(rerouterParent, begin, end); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + rerouterInterval->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(rerouterInterval, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildAccess(myViewNet, myUndoAdditionals, busStop, lane, toString(posDouble), length, friendlyPos, false)); + rerouterParent->addAdditionalChild(rerouterInterval); + rerouterInterval->incRef("buildRerouterInterval"); } + return rerouterInterval; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_INTERVAL) + " with begin '" + toString(begin) + "' and '" + toString(end) + "' in '" + rerouterParent->getID() + "' due overlapping."); } } -void -GNEAdditionalHandler::parseAndBuildChargingStation(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of charging station - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LANE, abort); - std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_STARTPOS, abort); - std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ENDPOS, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - double chargingPower = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_CHARGINGPOWER, abort); - double efficiency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_EFFICIENCY, abort); - bool chargeInTransit = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_CHARGEINTRANSIT, abort); - double chargeDelay = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_CHARGEDELAY, abort); - bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (lane == nullptr) { - // Write error if lane isn't valid - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " '" + id + "' is not known."); - } else if (!fixStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), POSITION_EPS, friendlyPosition)) { - // write error if position isn't valid - WRITE_WARNING("Invalid position for " + toString(tag) + " with ID = '" + id + "'."); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildChargingStation(myViewNet, myUndoAdditionals, id, lane, startPos, endPos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, friendlyPosition, false)); - } +GNEAdditional* +GNEAdditionalHandler::buildClosingLaneReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNELane* closedLane, SVCPermissions permissions) { + // create closing lane reorute + GNEClosingLaneReroute* closingLaneReroute = new GNEClosingLaneReroute(rerouterIntervalParent, closedLane, permissions); + // add it to interval parent depending of allowUndoRedo + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + closingLaneReroute->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(closingLaneReroute, true), true); + viewNet->getUndoList()->p_end(); + } else { + rerouterIntervalParent->addAdditionalChild(closingLaneReroute); + closingLaneReroute->incRef("buildClosingLaneReroute"); } + return closingLaneReroute; } -void -GNEAdditionalHandler::parseAndBuildParkingArea(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of charging station - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LANE, abort); - std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_STARTPOS, abort); - std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ENDPOS, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FRIENDLY_POS, abort); - int roadSideCapacity = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ROADSIDE_CAPACITY, abort); - bool onRoad = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ONROAD, abort); - double width = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_WIDTH, abort); - std::string length = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LENGTH, abort); - double angle = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ANGLE, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (lane == nullptr) { - // Write error if lane isn't valid - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " '" + id + "' is not known."); - } else if (!fixStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), POSITION_EPS, friendlyPosition)) { - // write error if position isn't valid - WRITE_WARNING("Invalid position for " + toString(tag) + " with ID = '" + id + "'."); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildParkingArea(myViewNet, myUndoAdditionals, id, lane, startPos, endPos, name, friendlyPosition, roadSideCapacity, onRoad, width, length, angle, false)); - } +GNEAdditional* +GNEAdditionalHandler::buildClosingReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* closedEdge, SVCPermissions permissions) { + // create closing reroute + GNEClosingReroute* closingReroute = new GNEClosingReroute(rerouterIntervalParent, closedEdge, permissions); + // add it to interval parent depending of allowUndoRedo + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + closingReroute->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(closingReroute, true), true); + viewNet->getUndoList()->p_end(); + } else { + rerouterIntervalParent->addAdditionalChild(closingReroute); + closingReroute->incRef("buildClosingReroute"); } + return closingReroute; } -void -GNEAdditionalHandler::parseAndBuildParkingSpace(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Parking Spaces - Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_POSITION, abort); - double width = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_WIDTH, abort); - double length = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_LENGTH, abort); - double angle = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ANGLE, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get Parking Area Parent - GNEAdditional* parkingAreaParent = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_PARKING_AREA); - // check that Parking Area Parent exists - if (parkingAreaParent != nullptr) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildParkingSpace(myViewNet, myUndoAdditionals, parkingAreaParent, pos, width, length, angle, false)); - } +GNEAdditional* +GNEAdditionalHandler::builDestProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* newEdgeDestination, double probability) { + // create dest probability reroute + GNEDestProbReroute* destProbReroute = new GNEDestProbReroute(rerouterIntervalParent, newEdgeDestination, probability); + // add it to interval parent depending of allowUndoRedo + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + destProbReroute->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(destProbReroute, true), true); + viewNet->getUndoList()->p_end(); + } else { + rerouterIntervalParent->addAdditionalChild(destProbReroute); + destProbReroute->incRef("builDestProbReroute"); } + return destProbReroute; } -void -GNEAdditionalHandler::parseAndBuildCalibrator(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // due there is two differents calibrators, has to be parsed in a different way - std::string edgeID, laneId, id; - SumoXMLTag typeOfCalibrator = tag; - // change tag depending of XML parmeters - if (attrs.hasAttribute(SUMO_ATTR_EDGE)) { - typeOfCalibrator = SUMO_TAG_CALIBRATOR; - id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", typeOfCalibrator, SUMO_ATTR_ID, abort); - edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_EDGE, abort); - std::string outfile = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_OUTPUT, abort); - double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_POSITION, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - double freq = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_FREQUENCY, abort); - std::string routeProbe = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ROUTEPROBE, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer and edge - GNEEdge* edge = myViewNet->getNet()->retrieveEdge(edgeID, false); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(typeOfCalibrator, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(typeOfCalibrator) + " with the same ID='" + id + "'."); - } else if (edge == nullptr) { - WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(typeOfCalibrator) + " '" + id + "' is not known."); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildCalibrator(myViewNet, myUndoAdditionals, id, edge, position, name, outfile, freq, routeProbe)); - } - } - } else if (attrs.hasAttribute(SUMO_ATTR_LANE)) { - typeOfCalibrator = SUMO_TAG_LANECALIBRATOR; - id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", typeOfCalibrator, SUMO_ATTR_ID, abort); - laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_LANE, abort); - std::string outfile = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_OUTPUT, abort); - double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_POSITION, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - double freq = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, typeOfCalibrator, SUMO_ATTR_FREQUENCY, abort); - std::string routeProbe = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_ROUTEPROBE, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(typeOfCalibrator, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(typeOfCalibrator) + " with the same ID='" + id + "'."); - } else if (lane == nullptr) { - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(typeOfCalibrator) + " '" + id + "' is not known."); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildCalibrator(myViewNet, myUndoAdditionals, id, lane, position, name, outfile, freq, routeProbe)); - } +GNEAdditional* +GNEAdditionalHandler::builParkingAreaReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEAdditional* newParkingArea, double probability, bool visible) { + // create dest probability reroute + GNEParkingAreaReroute* parkingAreaReroute = new GNEParkingAreaReroute(rerouterIntervalParent, newParkingArea, probability, visible); + // add it to interval parent depending of allowUndoRedo + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + parkingAreaReroute->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(parkingAreaReroute, true), true); + viewNet->getUndoList()->p_end(); + } else { + rerouterIntervalParent->addAdditionalChild(parkingAreaReroute); + parkingAreaReroute->incRef("builParkingAreaReroute"); + } + return parkingAreaReroute; +} + + +GNEAdditional* +GNEAdditionalHandler::buildRouteProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, const std::string& newRouteId, double probability) { + // create rout prob rereoute + GNERouteProbReroute* routeProbReroute = new GNERouteProbReroute(rerouterIntervalParent, newRouteId, probability); + // add it to interval parent depending of allowUndoRedo + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + routeProbReroute->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(routeProbReroute, true), true); + viewNet->getUndoList()->p_end(); + } else { + rerouterIntervalParent->addAdditionalChild(routeProbReroute); + routeProbReroute->incRef("buildRouteProbReroute"); + } + return routeProbReroute; +} + + +GNEAdditional* +GNEAdditionalHandler::buildRouteProbe(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, const std::string& freq, const std::string& name, const std::string& file, double begin) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTEPROBE, id, false) == nullptr) { + GNERouteProbe* routeProbe = new GNERouteProbe(id, viewNet, edge, freq, name, file, begin); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_ROUTEPROBE)); + viewNet->getUndoList()->add(new GNEChange_Additional(routeProbe, true), true); + viewNet->getUndoList()->p_end(); + // center after creation + viewNet->centerTo(routeProbe->getGlID(), false); + } else { + viewNet->getNet()->insertAdditional(routeProbe); + edge->addAdditionalChild(routeProbe); + routeProbe->incRef("buildRouteProbe"); } + return routeProbe; } else { - WRITE_WARNING("additional " + toString(tag) + " must have either a lane or an edge attribute."); + throw ProcessError("Could not build " + toString(SUMO_TAG_ROUTEPROBE) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildDetectorE1(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of E1 - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LANE, abort); - double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_POSITION, abort); - double frequency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FREQUENCY, abort); - std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FILE, abort); - std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_VTYPES, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (lane == nullptr) { - // Write error if lane isn't valid - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " '" + id + "' is not known."); - } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { - WRITE_WARNING("Invalid position for " + toString(tag) + " with ID = '" + id + "'."); +GNEAdditional* +GNEAdditionalHandler::buildVariableSpeedSign(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, const std::vector& lanes, const std::string& name, bool blockMovement) { + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_VSS, id, false) == nullptr) { + GNEVariableSpeedSign* variableSpeedSign = new GNEVariableSpeedSign(id, viewNet, pos, lanes, name, blockMovement); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_VSS)); + viewNet->getUndoList()->add(new GNEChange_Additional(variableSpeedSign, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildDetectorE1(myViewNet, myUndoAdditionals, id, lane, position, frequency, file, vehicleTypes, name, friendlyPos, false)); + viewNet->getNet()->insertAdditional(variableSpeedSign); + // add this VSS as parent of all edges + for (auto i : lanes) { + i->addAdditionalParent(variableSpeedSign); + } + variableSpeedSign->incRef("buildVariableSpeedSign"); } + return variableSpeedSign; + } else { + throw ProcessError("Could not build " + toString(SUMO_TAG_VSS) + " with ID '" + id + "' in netedit; probably declared twice."); } } -void -GNEAdditionalHandler::parseAndBuildDetectorE2(const SUMOSAXAttributes& attrs, const SumoXMLTag& /* tag */) { - // Tag E2 detectors can build either E2 single lanes or E2 multilanes, depending of attribute "lanes" - SumoXMLTag E2Tag = attrs.hasAttribute(SUMO_ATTR_LANES)? SUMO_TAG_E2DETECTOR_MULTILANE : SUMO_TAG_E2DETECTOR; - bool abort = false; - // start parsing ID - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", E2Tag, SUMO_ATTR_ID, abort); - // parse attributes of E2 SingleLanes - std::string laneId = (E2Tag == SUMO_TAG_E2DETECTOR)?GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_LANE, abort):""; - double length = (E2Tag == SUMO_TAG_E2DETECTOR)?GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_LENGTH, abort):0; - // parse attributes of E2 Multilanes - std::string laneIds = (E2Tag == SUMO_TAG_E2DETECTOR_MULTILANE)?GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_LANES, abort):""; - double endPos = (E2Tag == SUMO_TAG_E2DETECTOR_MULTILANE)?GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_ENDPOS, abort):0; - // parse common attributes - double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_POSITION, abort); - double frequency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_FREQUENCY, abort); - std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_FILE, abort); - std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_VTYPES, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_NAME, abort); - double haltingTimeThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_HALTING_TIME_THRESHOLD, abort); - double haltingSpeedThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_HALTING_SPEED_THRESHOLD, abort); - double jamDistThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_JAM_DIST_THRESHOLD, abort); - bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_FRIENDLY_POS, abort); - // cont attribute is deprecated - GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_CONT, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // check if at leas lane or laneIDS are defined - if(laneId.empty() && laneIds.empty()) { - WRITE_WARNING("A " + toString(E2Tag) + " needs at least a lane or a list of lanes."); - } else { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // get list of lanes - std::vector lanes; - bool laneConsecutives = true; - if(GNEAttributeCarrier::canParse >(myViewNet->getNet(), laneIds, false)) { - lanes = GNEAttributeCarrier::parse >(myViewNet->getNet(), laneIds); - // check if lanes are consecutives - laneConsecutives = GNEAttributeCarrier::lanesConsecutives(lanes); - } - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(E2Tag, id, false) != nullptr) { - // write error if neither lane nor lane aren't defined - WRITE_WARNING("There is another " + toString(E2Tag) + " with the same ID='" + id + "'."); - } else if (attrs.hasAttribute(SUMO_ATTR_LANE) && (lane == nullptr)) { - // Write error if lane isn't valid - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(E2Tag) + " '" + id + "' is not known."); - } else if (attrs.hasAttribute(SUMO_ATTR_LANES) && lanes.empty()) { - // Write error if lane isn't valid - WRITE_WARNING("The list of lanes cannot be empty."); - } else if (attrs.hasAttribute(SUMO_ATTR_LANES) && lanes.empty()) { - // Write error if lane isn't valid - WRITE_WARNING("The list of lanes '" + laneIds + "' to use within the " + toString(E2Tag) + " '" + id + "' isn't valid."); - } else if (!lanes.empty() && !laneConsecutives) { - WRITE_WARNING("The lanes '" + laneIds + "' to use within the " + toString(E2Tag) + " '" + id + "' aren't consecutives."); - } else if (lane && !fixE2DetectorPosition(position, length, lane->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) { - WRITE_WARNING("Invalid position for " + toString(E2Tag) + " with ID = '" + id + "'."); - } else if (!lanes.empty() && !fixE2DetectorPosition(position, length, lanes.front()->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) { - WRITE_WARNING("Invalid position for " + toString(E2Tag) + " with ID = '" + id + "'."); - } else if (!lanes.empty() && !fixE2DetectorPosition(endPos, length, lanes.back()->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) { - WRITE_WARNING("Invalid end position for " + toString(E2Tag) + " with ID = '" + id + "'."); - } else if (lane) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildSingleLaneDetectorE2(myViewNet, myUndoAdditionals, id, lane, position, length, frequency, file, vehicleTypes, name, haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold, friendlyPos, false)); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildMultiLaneDetectorE2(myViewNet, myUndoAdditionals, id, lanes, position, endPos, frequency, file, vehicleTypes, name, haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold, friendlyPos, false)); - } - } +GNEAdditional* +GNEAdditionalHandler::buildVariableSpeedSignStep(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* VSSParent, double time, double speed) { + // create Variable Speed Sign + GNEVariableSpeedSignStep* variableSpeedSignStep = new GNEVariableSpeedSignStep(VSSParent, time, speed); + // add it depending of allow undoRedo + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + variableSpeedSignStep->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_Additional(variableSpeedSignStep, true), true); + viewNet->getUndoList()->p_end(); + } else { + VSSParent->addAdditionalChild(variableSpeedSignStep); + variableSpeedSignStep->incRef("buildVariableSpeedSignStep"); } + return variableSpeedSignStep; } -void -GNEAdditionalHandler::parseAndBuildDetectorE3(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of E3 - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - double frequency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FREQUENCY, abort); - std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FILE, abort); - std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_VTYPES, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - double haltingTimeThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_HALTING_TIME_THRESHOLD, abort); - double haltingSpeedThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_HALTING_SPEED_THRESHOLD, abort); - Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_POSITION, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildDetectorE3(myViewNet, myUndoAdditionals, id, pos, frequency, file, vehicleTypes, name, haltingTimeThreshold, haltingSpeedThreshold, false)); - } +GNEAdditional* +GNEAdditionalHandler::buildVaporizer(GNEViewNet* viewNet, bool allowUndoRedo, GNEEdge* edge, double startTime, double end, const std::string& name) { + GNEVaporizer* vaporizer = new GNEVaporizer(viewNet, edge, startTime, end, name); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_VAPORIZER)); + viewNet->getUndoList()->add(new GNEChange_Additional(vaporizer, true), true); + viewNet->getUndoList()->p_end(); + // center after creation + viewNet->centerTo(vaporizer->getGlID(), false); + } else { + viewNet->getNet()->insertAdditional(vaporizer); + edge->addAdditionalChild(vaporizer); + vaporizer->incRef("buildVaporizer"); } + return vaporizer; } -void -GNEAdditionalHandler::parseAndBuildDetectorEntry(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Entry - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_LANE, abort); - double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_POSITION, abort); - bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Check if parsing of parameters was correct - if (!abort) { - // get lane and E3 parent - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - GNEAdditional* E3Parent = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_E3DETECTOR); - // check that all parameters are valid - if (lane == nullptr) { - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " is not known."); - } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { - WRITE_WARNING("Invalid position for " + toString(tag) + "."); - } else if (E3Parent) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildDetectorEntry(myViewNet, myUndoAdditionals, E3Parent, lane, position, friendlyPos, false)); +GNEAdditional* +GNEAdditionalHandler::buildTAZ(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, const PositionVector& shape, const RGBColor& color, const std::vector& edges, bool blockMovement) { + GNETAZ* TAZ = new GNETAZ(id, viewNet, shape, color, blockMovement); + // disable updating geometry of TAZ childs during insertion (because in large nets provokes slowdowns) + viewNet->getNet()->disableUpdateGeometry(); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZ)); + viewNet->getUndoList()->add(new GNEChange_Additional(TAZ, true), true); + // create TAZEdges + for (auto i : edges) { + // create TAZ Source using GNEChange_Additional + GNETAZSourceSink* TAZSource = new GNETAZSourceSink(SUMO_TAG_TAZSOURCE, TAZ, i, 1); + viewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true); + // create TAZ Sink using GNEChange_Additional + GNETAZSourceSink* TAZSink = new GNETAZSourceSink(SUMO_TAG_TAZSINK, TAZ, i, 1); + viewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true); + } + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(TAZ); + TAZ->incRef("buildTAZ"); + for (auto i : edges) { + // create TAZ Source + GNETAZSourceSink* TAZSource = new GNETAZSourceSink(SUMO_TAG_TAZSOURCE, TAZ, i, 1); + TAZSource->incRef("buildTAZ"); + TAZ->addAdditionalChild(TAZSource); + // create TAZ Sink + GNETAZSourceSink* TAZSink = new GNETAZSourceSink(SUMO_TAG_TAZSINK, TAZ, i, 1); + TAZSink->incRef("buildTAZ"); + TAZ->addAdditionalChild(TAZSink); } } + // enable updating geometry again and update geometry of TAZ + viewNet->getNet()->enableUpdateGeometry(); + // update TAZ Frame + TAZ->updateGeometry(true); + TAZ->updateAdditionalParent(); + return TAZ; } -void -GNEAdditionalHandler::parseAndBuildDetectorExit(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of Exit - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_LANE, abort); - double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_POSITION, abort); - bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Check if parsing of parameters was correct - if (!abort) { - // get lane and E3 parent - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - GNEAdditional* E3Parent = myHierarchyInsertedAdditionals.retrieveAdditionalParent(myViewNet, SUMO_TAG_E3DETECTOR); - // check that all parameters are valid - if (lane == nullptr) { - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " is not known."); - } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { - WRITE_WARNING("Invalid position for " + toString(tag) + "."); - } else if (E3Parent) { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildDetectorExit(myViewNet, myUndoAdditionals, E3Parent, lane, position, friendlyPos, false)); +GNEAdditional* +GNEAdditionalHandler::buildTAZSource(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* TAZ, GNEEdge* edge, double departWeight) { + GNEAdditional* TAZSink = nullptr; + // first check if a TAZSink in the same edge for the same TAZ + for (auto i : TAZ->getAdditionalChilds()) { + if ((i->getTagProperty().getTag() == SUMO_TAG_TAZSINK) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { + TAZSink = i; } } -} - - -void -GNEAdditionalHandler::parseAndBuildDetectorE1Instant(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag) { - bool abort = false; - // parse attributes of E1Instant - std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", tag, SUMO_ATTR_ID, abort); - std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_LANE, abort); - double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_POSITION, abort); - std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FILE, abort); - std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_VTYPES, abort); - std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_NAME, abort); - bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, tag, SUMO_ATTR_FRIENDLY_POS, abort); - // Continue if all parameters were sucesfully loaded - if (!abort) { - // get pointer to lane - GNELane* lane = myViewNet->getNet()->retrieveLane(laneId, false, true); - // check that all elements are valid - if (myViewNet->getNet()->retrieveAdditional(tag, id, false) != nullptr) { - WRITE_WARNING("There is another " + toString(tag) + " with the same ID='" + id + "'."); - } else if (lane == nullptr) { - // Write error if lane isn't valid - WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(tag) + " '" + id + "' is not known."); - } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { - WRITE_WARNING("Invalid position for " + toString(tag) + " with ID = '" + id + "'."); + // check if TAZSink has to be created + if (TAZSink == nullptr) { + // Create TAZ with weight 0 (default) + TAZSink = new GNETAZSourceSink(SUMO_TAG_TAZSINK, TAZ, edge, 1); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSINK)); + viewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true); + viewNet->getUndoList()->p_end(); } else { - // save ID of last created element - myHierarchyInsertedAdditionals.commitElementInsertion(buildDetectorE1Instant(myViewNet, myUndoAdditionals, id, lane, position, file, vehicleTypes, name, friendlyPos, false)); + viewNet->getNet()->insertAdditional(TAZSink); + TAZSink->incRef("buildTAZSource"); } } + // now check check if TAZSource exist + GNEAdditional* TAZSource = nullptr; + // first check if a TAZSink in the same edge for the same TAZ + for (auto i : TAZ->getAdditionalChilds()) { + if ((i->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { + TAZSource = i; + } + } + // check if TAZSource has to be created + if (TAZSource == nullptr) { + // Create TAZ only with departWeight + TAZSource = new GNETAZSourceSink(SUMO_TAG_TAZSOURCE, TAZ, edge, departWeight); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSOURCE)); + viewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(TAZSource); + TAZSource->incRef("buildTAZSource"); + } + } else { + // update TAZ Attribute + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("update " + toString(SUMO_TAG_TAZSOURCE)); + TAZSource->setAttribute(SUMO_ATTR_WEIGHT, toString(departWeight), viewNet->getUndoList()); + viewNet->getUndoList()->p_end(); + } else { + TAZSource->setAttribute(SUMO_ATTR_WEIGHT, toString(departWeight), nullptr); + TAZSource->incRef("buildTAZSource"); + } + } + return TAZSource; } GNEAdditional* -GNEAdditionalHandler::buildAdditional(GNEViewNet* viewNet, bool allowUndoRedo, SumoXMLTag tag, std::map values) { - // create additional depending of the tag - switch (tag) { - case SUMO_TAG_BUS_STOP: { - // obtain specify attributes of busStop - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - std::string startPos = values[SUMO_ATTR_STARTPOS]; - std::string endPos = values[SUMO_ATTR_ENDPOS]; - std::string name = values[SUMO_ATTR_NAME]; - std::vector lines = GNEAttributeCarrier::parse >(values[SUMO_ATTR_LINES]); - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build busStop - if (lane) { - return buildBusStop(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, lines, friendlyPos, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_ACCESS: { - // obtain specify attributes of detector E2 - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - GNEAdditional* busStop = viewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, values[GNE_ATTR_PARENT], false); - std::string pos = values[SUMO_ATTR_POSITION]; - std::string length = values[SUMO_ATTR_LENGTH]; - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector E2 - if (lane && busStop) { - if (accessCanBeCreated(busStop, lane->getParentEdge())) { - return buildAccess(viewNet, allowUndoRedo, busStop, lane, pos, length, friendlyPos, blockMovement); - } else { - WRITE_WARNING(toString(SUMO_TAG_BUS_STOP) + "'" + busStop->getID() + "' already owns a Acces in the edge '" + lane->getParentEdge().getID() + "'"); - return nullptr; - } - } else { - return nullptr; - } - } - case SUMO_TAG_CONTAINER_STOP: { - // obtain specify attributes of containerStop - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - std::string startPos = values[SUMO_ATTR_STARTPOS]; - std::string endPos = values[SUMO_ATTR_ENDPOS]; - std::string name = values[SUMO_ATTR_NAME]; - std::vector lines = GNEAttributeCarrier::parse >(values[SUMO_ATTR_LINES]); - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build containerStop - if (lane) { - return buildContainerStop(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, lines, friendlyPos, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_CHARGING_STATION: { - // obtain specify attributes of chargingStation - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - std::string startPos = values[SUMO_ATTR_STARTPOS]; - std::string endPos = values[SUMO_ATTR_ENDPOS]; - std::string name = values[SUMO_ATTR_NAME]; - double chargingPower = GNEAttributeCarrier::parse(values[SUMO_ATTR_CHARGINGPOWER]); - double efficiency = GNEAttributeCarrier::parse(values[SUMO_ATTR_EFFICIENCY]); - bool chargeInTransit = GNEAttributeCarrier::parse(values[SUMO_ATTR_CHARGEINTRANSIT]); - double chargeDelay = GNEAttributeCarrier::parse(values[SUMO_ATTR_CHARGEDELAY]); - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build chargingStation - if (lane) { - return buildChargingStation(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, friendlyPos, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_PARKING_AREA: { - // obtain specify attributes of Parking Area - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - std::string startPos = values[SUMO_ATTR_STARTPOS]; - std::string endPos = values[SUMO_ATTR_ENDPOS]; - std::string name = values[SUMO_ATTR_NAME]; - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - int roadSideCapacity = GNEAttributeCarrier::parse(values[SUMO_ATTR_ROADSIDE_CAPACITY]); - bool onRoad = GNEAttributeCarrier::parse(values[SUMO_ATTR_ONROAD]); - double width = GNEAttributeCarrier::parse(values[SUMO_ATTR_WIDTH]); - std::string lenght = values[SUMO_ATTR_LENGTH]; - double angle = GNEAttributeCarrier::parse(values[SUMO_ATTR_ANGLE]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build Parking Area - if (lane) { - return buildParkingArea(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, friendlyPos, roadSideCapacity, onRoad, width, lenght, angle, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_PARKING_SPACE: { - // obtain specify attributes of Parking Space - Position pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - double width = GNEAttributeCarrier::parse(values[SUMO_ATTR_WIDTH]); - double lenght = GNEAttributeCarrier::parse(values[SUMO_ATTR_LENGTH]); - double angle = GNEAttributeCarrier::parse(values[SUMO_ATTR_ANGLE]); - GNEAdditional* parkingArea = viewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, values[GNE_ATTR_PARENT], false); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build Parking - return buildParkingSpace(viewNet, allowUndoRedo, parkingArea, pos, width, lenght, angle, blockMovement); - } - case SUMO_TAG_E1DETECTOR: { - // obtain specify attributes of detector E1 - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - double freq = GNEAttributeCarrier::parse(values[SUMO_ATTR_FREQUENCY]); - std::string filename = values[SUMO_ATTR_FILE]; - std::string vehicleTypes = values[SUMO_ATTR_VTYPES]; - std::string name = values[SUMO_ATTR_NAME]; - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector E1 - if (lane) { - return buildDetectorE1(viewNet, allowUndoRedo, id, lane, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_E2DETECTOR: { - // obtain specify attributes of detector E2 - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - double freq = GNEAttributeCarrier::parse(values[SUMO_ATTR_FREQUENCY]); - double length = GNEAttributeCarrier::parse(values[SUMO_ATTR_LENGTH]); - std::string filename = values[SUMO_ATTR_FILE]; - std::string vehicleTypes = values[SUMO_ATTR_VTYPES]; - std::string name = values[SUMO_ATTR_NAME]; - double timeThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_HALTING_TIME_THRESHOLD]); - double speedThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_HALTING_SPEED_THRESHOLD]); - double jamThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_JAM_DIST_THRESHOLD]); - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector E2 - if (lane) { - return buildSingleLaneDetectorE2(viewNet, allowUndoRedo, id, lane, pos, length, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_E2DETECTOR_MULTILANE: { - // obtain specify attributes of detector E2 - std::string id = values[SUMO_ATTR_ID]; - std::vector lanes = GNEAttributeCarrier::parse >(viewNet->getNet(), values[SUMO_ATTR_LANES]); - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - double endPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_ENDPOS]); - double freq = GNEAttributeCarrier::parse(values[SUMO_ATTR_FREQUENCY]); - std::string filename = values[SUMO_ATTR_FILE]; - std::string vehicleTypes = values[SUMO_ATTR_VTYPES]; - std::string name = values[SUMO_ATTR_NAME]; - double timeThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_HALTING_TIME_THRESHOLD]); - double speedThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_HALTING_SPEED_THRESHOLD]); - double jamThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_JAM_DIST_THRESHOLD]); - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector E2 - if (lanes.size() > 0) { - return buildMultiLaneDetectorE2(viewNet, allowUndoRedo, id, lanes, pos, endPos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_E3DETECTOR: { - // obtain specify attributes of detector E3 - std::string id = values[SUMO_ATTR_ID]; - Position pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - double freq = GNEAttributeCarrier::parse(values[SUMO_ATTR_FREQUENCY]); - std::string filename = values[SUMO_ATTR_FILE]; - std::string vehicleTypes = values[SUMO_ATTR_VTYPES]; - std::string name = values[SUMO_ATTR_NAME]; - double timeThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_HALTING_TIME_THRESHOLD]); - double speedThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_HALTING_SPEED_THRESHOLD]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector E3 - return buildDetectorE3(viewNet, allowUndoRedo, id, pos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, blockMovement); - } - case SUMO_TAG_DET_ENTRY: { - // obtain specify attributes of detector Entry - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - GNEAdditional* E3 = viewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, values[GNE_ATTR_PARENT], false); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector Entry - if (lane && E3) { - return buildDetectorEntry(viewNet, allowUndoRedo, E3, lane, pos, friendlyPos, blockMovement); - } else { - return nullptr; - } - } - case SUMO_TAG_DET_EXIT: { - // obtain specify attributes of Detector Exit - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - GNEAdditional* E3 = viewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, values[GNE_ATTR_PARENT], false); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector Exit - if (lane && E3) { - return buildDetectorExit(viewNet, allowUndoRedo, E3, lane, pos, friendlyPos, blockMovement); - } else { - return nullptr; - } +GNEAdditionalHandler::buildTAZSink(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* TAZ, GNEEdge* edge, double arrivalWeight) { + GNEAdditional* TAZSource = nullptr; + // first check if a TAZSink in the same edge for the same TAZ + for (auto i : TAZ->getAdditionalChilds()) { + if ((i->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { + TAZSource = i; } - case SUMO_TAG_INSTANT_INDUCTION_LOOP: { - // obtain specify attributes of detector E1Instant - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - std::string filename = values[SUMO_ATTR_FILE]; - std::string vehicleTypes = values[SUMO_ATTR_VTYPES]; - std::string name = values[SUMO_ATTR_NAME]; - bool friendlyPos = GNEAttributeCarrier::parse(values[SUMO_ATTR_FRIENDLY_POS]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // Build detector E1Instant - if (lane) { - return buildDetectorE1Instant(viewNet, allowUndoRedo, id, lane, pos, filename, vehicleTypes, name, friendlyPos, blockMovement); - } else { - return nullptr; - } + } + // check if TAZSource has to be created + if (TAZSource == nullptr) { + // Create TAZ with empty value + TAZSource = new GNETAZSourceSink(SUMO_TAG_TAZSOURCE, TAZ, edge, 1); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSOURCE)); + viewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(TAZSource); + TAZSource->incRef("buildTAZSink"); } - case SUMO_TAG_VSS: { - // obtain specify attributes of variable speed signal - std::string id = values[SUMO_ATTR_ID]; - Position pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - std::vector lanes = GNEAttributeCarrier::parse >(viewNet->getNet(), values[SUMO_ATTR_LANES]); - std::string name = values[SUMO_ATTR_NAME]; - // get rest of parameters - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // build VSS - return buildVariableSpeedSign(viewNet, allowUndoRedo, id, pos, lanes, name, blockMovement); - } - case SUMO_TAG_CALIBRATOR: { - // obtain specify attributes of calibrator - std::string id = values[SUMO_ATTR_ID]; - GNEEdge* edge = viewNet->getNet()->retrieveEdge(values[SUMO_ATTR_EDGE], false); - // get rest of parameters - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - std::string name = values[SUMO_ATTR_NAME]; - std::string outfile = values[SUMO_ATTR_OUTPUT]; - double freq = GNEAttributeCarrier::parse(values[SUMO_ATTR_FREQUENCY]); - std::string routeProbe = values[SUMO_ATTR_ROUTEPROBE]; - // Build calibrator edge - if (edge) { - return buildCalibrator(viewNet, allowUndoRedo, id, edge, pos, name, outfile, freq, routeProbe); - } else { - return nullptr; - } + } + GNEAdditional* TAZSink = nullptr; + // first check if a TAZSink in the same edge for the same TAZ + for (auto i : TAZ->getAdditionalChilds()) { + if ((i->getTagProperty().getTag() == SUMO_TAG_TAZSINK) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { + TAZSink = i; } - case SUMO_TAG_LANECALIBRATOR: { - // obtain specify attributes of calibrator - std::string id = values[SUMO_ATTR_ID]; - GNELane* lane = viewNet->getNet()->retrieveLane(values[SUMO_ATTR_LANE], false); - // get rest of parameters - double pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - std::string name = values[SUMO_ATTR_NAME]; - std::string outfile = values[SUMO_ATTR_OUTPUT]; - double freq = GNEAttributeCarrier::parse(values[SUMO_ATTR_FREQUENCY]); - std::string routeProbe = values[SUMO_ATTR_ROUTEPROBE]; - // Build calibrator lane - if (lane) { - return buildCalibrator(viewNet, allowUndoRedo, id, lane, pos, name, outfile, freq, routeProbe); - } else { - return nullptr; - } + } + // check if TAZSink has to be created + if (TAZSink == nullptr) { + // Create TAZ only with arrivalWeight + TAZSink = new GNETAZSourceSink(SUMO_TAG_TAZSINK, TAZ, edge, arrivalWeight); + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSINK)); + viewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertAdditional(TAZSink); + TAZSink->incRef("buildTAZSink"); } - case SUMO_TAG_REROUTER: { - // obtain specify attributes of rerouter - std::string id = values[SUMO_ATTR_ID]; - Position pos = GNEAttributeCarrier::parse(values[SUMO_ATTR_POSITION]); - std::vector edges = GNEAttributeCarrier::parse >(viewNet->getNet(), values[SUMO_ATTR_EDGES]); - // Get rest of parameters - bool off = GNEAttributeCarrier::parse(values[SUMO_ATTR_OFF]); - double prob = GNEAttributeCarrier::parse(values[SUMO_ATTR_PROB]); - double timeThreshold = GNEAttributeCarrier::parse(values[SUMO_ATTR_HALTING_TIME_THRESHOLD]); - const std::string vTypes = values[SUMO_ATTR_VTYPES]; - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - std::string name = values[SUMO_ATTR_NAME]; - std::string file = values[SUMO_ATTR_FILE]; - // Build rerouter - return buildRerouter(viewNet, allowUndoRedo, id, pos, edges, prob, name, file, off, timeThreshold, vTypes, blockMovement); - } - case SUMO_TAG_ROUTEPROBE: { - // obtain specify attributes of RouteProbe - std::string id = values[SUMO_ATTR_ID]; - GNEEdge* edge = viewNet->getNet()->retrieveEdge(values[SUMO_ATTR_EDGE], false); - std::string freq = values[SUMO_ATTR_FREQUENCY]; - std::string name = values[SUMO_ATTR_NAME]; - std::string filename = values[SUMO_ATTR_FILE]; - double begin = GNEAttributeCarrier::parse(values[SUMO_ATTR_BEGIN]); - // Build RouteProbe - if (edge) { - return buildRouteProbe(viewNet, allowUndoRedo, id, edge, freq, name, filename, begin); - } else { - return nullptr; - } + } else { + // update TAZ Attribute + if (allowUndoRedo) { + viewNet->getUndoList()->p_begin("update " + toString(SUMO_TAG_TAZSINK)); + TAZSink->setAttribute(SUMO_ATTR_WEIGHT, toString(arrivalWeight), viewNet->getUndoList()); + viewNet->getUndoList()->p_end(); + } else { + TAZSink->setAttribute(SUMO_ATTR_WEIGHT, toString(arrivalWeight), nullptr); + TAZSink->incRef("buildTAZSink"); } - case SUMO_TAG_VAPORIZER: { - // obtain specify attributes of vaporizer - GNEEdge* edge = viewNet->getNet()->retrieveEdge(values[SUMO_ATTR_EDGE], false); - double begin = GNEAttributeCarrier::parse(values[SUMO_ATTR_BEGIN]); - double end = GNEAttributeCarrier::parse(values[SUMO_ATTR_END]); - std::string name = values[SUMO_ATTR_NAME]; - // Build Vaporizer - if (edge) { - if (begin > end) { - WRITE_WARNING("Time interval of " + toString(tag) + " isn't valid. Attribute '" + toString(SUMO_ATTR_BEGIN) + "' is greater than attribute '" + toString(SUMO_ATTR_END) + "'."); - } else if (viewNet->getNet()->retrieveAdditional(tag, edge->getID(), false) == nullptr) { - return buildVaporizer(viewNet, allowUndoRedo, edge, begin, end, name); - } else { - WRITE_WARNING("There is already a " + toString(tag) + " in the edge '" + edge->getID() + "'."); - } - } - return nullptr; + } + return TAZSink; +} + + +double +GNEAdditionalHandler::getPosition(double pos, GNELane& lane, bool friendlyPos, const std::string& additionalID) { + if (pos < 0) { + pos = lane.getLaneShapeLength() + pos; + } + if (pos > lane.getLaneShapeLength()) { + if (friendlyPos) { + pos = lane.getLaneShapeLength() - (double) 0.1; + } else { + WRITE_WARNING("The position of additional '" + additionalID + "' lies beyond the lane's '" + lane.getID() + "' length."); } - case SUMO_TAG_TAZ: { - // obtain specify attributes of vaporizer - std::string id = values[SUMO_ATTR_ID]; - PositionVector shape = GNEAttributeCarrier::parse(values[SUMO_ATTR_SHAPE]); - RGBColor color = GNEAttributeCarrier::parse(values[SUMO_ATTR_COLOR]); - std::vector edgeIDs = GNEAttributeCarrier::parse >(values[SUMO_ATTR_EDGES]); - bool blockMovement = GNEAttributeCarrier::parse(values[GNE_ATTR_BLOCK_MOVEMENT]); - // check if all edge IDs are valid - std::vector edges; - for (auto i : edgeIDs) { - GNEEdge* edge = viewNet->getNet()->retrieveEdge(i, false); - if (edge == nullptr) { - WRITE_WARNING("Invalid " + toString(SUMO_TAG_EDGE) + " with ID = '" + i + "'."); - return nullptr; - } else { - edges.push_back(edge); - } - } - // Build TAZ - return buildTAZ(viewNet, allowUndoRedo, id, shape, color, edges, blockMovement); + } + return pos; +} + + +bool GNEAdditionalHandler::checkAndFixDetectorPosition(double& pos, const double laneLength, const bool friendlyPos) { + if (fabs(pos) > laneLength) { + if (!friendlyPos) { + return false; + } else if (pos < 0) { + pos = 0; + } else if (pos > laneLength) { + pos = laneLength - 0.01; } - default: - return nullptr; } + return true; } -GNEAdditional* -GNEAdditionalHandler::buildBusStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, bool friendlyPosition, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, id, false) == nullptr) { - GNEBusStop* busStop = new GNEBusStop(id, lane, viewNet, startPos, endPos, name, lines, friendlyPosition, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_BUS_STOP)); - viewNet->getUndoList()->add(new GNEChange_Additional(busStop, true), true); - viewNet->getUndoList()->p_end(); - } else { - viewNet->getNet()->insertAdditional(busStop); - lane->addAdditionalChild(busStop); - busStop->incRef("buildBusStop"); +bool GNEAdditionalHandler::fixE2DetectorPosition(double& pos, double& length, const double laneLength, const bool friendlyPos) { + if ((pos < 0) || ((pos + length) > laneLength)) { + if (!friendlyPos) { + return false; + } else if (pos < 0) { + pos = 0; + } else if (pos > laneLength) { + pos = laneLength - 0.01; + length = 0; + } else if ((pos + length) > laneLength) { + length = laneLength - pos - 0.01; } - return busStop; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_BUS_STOP) + " with ID '" + id + "' in netedit; probably declared twice."); } + return true; } -GNEAdditional* -GNEAdditionalHandler::buildAccess(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* busStop, GNELane* lane, const std::string& pos, const std::string& length, bool friendlyPos, bool blockMovement) { - // Check if busStop parent and lane is correct - if (lane == nullptr) { - throw ProcessError("Could not build " + toString(SUMO_TAG_ACCESS) + " in netedit; " + toString(SUMO_TAG_LANE) + " doesn't exist."); - } else if (busStop == nullptr) { - throw ProcessError("Could not build " + toString(SUMO_TAG_ACCESS) + " in netedit; " + toString(SUMO_TAG_BUS_STOP) + " parent doesn't exist."); - } else if (!accessCanBeCreated(busStop, lane->getParentEdge())) { - throw ProcessError("Could not build " + toString(SUMO_TAG_ACCESS) + " in netedit; " + toString(SUMO_TAG_BUS_STOP) + " parent already owns a Acces in the edge '" + lane->getParentEdge().getID() + "'"); - } else { - GNEAccess* access = new GNEAccess(busStop, lane, viewNet, pos, length, friendlyPos, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_ACCESS)); - viewNet->getUndoList()->add(new GNEChange_Additional(access, true), true); - viewNet->getUndoList()->p_end(); - } else { - viewNet->getNet()->insertAdditional(access); - lane->addAdditionalChild(access); - busStop->addAdditionalChild(access); - access->incRef("buildAccess"); +bool +GNEAdditionalHandler::accessCanBeCreated(GNEAdditional* busStopParent, GNEEdge& edge) { + // check that busStopParent is a busStop + assert(busStopParent->getTagProperty().getTag() == SUMO_TAG_BUS_STOP); + // check if exist another acces for the same busStop in the given edge + for (auto i : busStopParent->getAdditionalChilds()) { + for (auto j : edge.getLanes()) { + if (i->getAttribute(SUMO_ATTR_LANE) == j->getID()) { + return false; + } } - return access; } + return true; } -GNEAdditional* -GNEAdditionalHandler::buildContainerStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, bool friendlyPosition, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CONTAINER_STOP, id, false) == nullptr) { - GNEContainerStop* containerStop = new GNEContainerStop(id, lane, viewNet, startPos, endPos, name, lines, friendlyPosition, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CONTAINER_STOP)); - viewNet->getUndoList()->add(new GNEChange_Additional(containerStop, true), true); - viewNet->getUndoList()->p_end(); - } else { - viewNet->getNet()->insertAdditional(containerStop); - lane->addAdditionalChild(containerStop); - containerStop->incRef("buildContainerStop"); +bool +GNEAdditionalHandler::checkOverlappingRerouterIntervals(GNEAdditional* rerouter, double newBegin, double newEnd) { + // check that rerouter is correct + assert(rerouter->getTagProperty().getTag() == SUMO_TAG_REROUTER); + // declare a vector to keep sorted rerouter childs + std::vector> sortedIntervals; + // iterate over additional childs + for (auto i : rerouter->getAdditionalChilds()) { + sortedIntervals.push_back(std::make_pair(0., 0.)); + // set begin and end + sortedIntervals.back().first = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_BEGIN)); + sortedIntervals.back().second = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_END)); + } + // add new intervals + sortedIntervals.push_back(std::make_pair(newBegin, newEnd)); + // sort childs + std::sort(sortedIntervals.begin(), sortedIntervals.end()); + // check overlapping after sorting + for (int i = 0; i < (int)sortedIntervals.size() - 1; i++) { + if (sortedIntervals.at(i).second > sortedIntervals.at(i + 1).first) { + return false; } - return containerStop; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_CONTAINER_STOP) + " with ID '" + id + "' in netedit; probably declared twice."); } + return true; } -GNEAdditional* -GNEAdditionalHandler::buildChargingStation(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, - double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay, bool friendlyPosition, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CHARGING_STATION, id, false) == nullptr) { - GNEChargingStation* chargingStation = new GNEChargingStation(id, lane, viewNet, startPos, endPos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, friendlyPosition, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CHARGING_STATION)); - viewNet->getUndoList()->add(new GNEChange_Additional(chargingStation, true), true); - viewNet->getUndoList()->p_end(); + + +bool +GNEAdditionalHandler::parseAndBuildVaporizer(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Vaporizer + const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_VAPORIZER, SUMO_ATTR_ID, abort); + double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_VAPORIZER, SUMO_ATTR_BEGIN, abort); + double end = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_VAPORIZER, SUMO_ATTR_END, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_VAPORIZER, SUMO_ATTR_NAME, abort); + // Continue if all parameters were successfully loaded + if (!abort) { + // get GNEEdge + GNEEdge* edge = viewNet->getNet()->retrieveEdge(edgeID, false); + // check that all parameters are valid + if (edge == nullptr) { + WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(SUMO_TAG_VAPORIZER) + " is not known."); + } else if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_VAPORIZER, edgeID, false) != nullptr) { + WRITE_WARNING("There is already a " + toString(SUMO_TAG_VAPORIZER) + " in the edge '" + edgeID + "'."); + } else if (begin > end) { + WRITE_WARNING("Time interval of " + toString(SUMO_TAG_VAPORIZER) + " isn't valid. Attribute '" + toString(SUMO_ATTR_BEGIN) + "' is greater than attribute '" + toString(SUMO_ATTR_END) + "'."); } else { - viewNet->getNet()->insertAdditional(chargingStation); - lane->addAdditionalChild(chargingStation); - chargingStation->incRef("buildChargingStation"); + // build vaporizer + GNEAdditional* additionalCreated = buildVaporizer(viewNet, allowUndoRedo, edge, begin, end, name); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return chargingStation; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_CHARGING_STATION) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildParkingArea(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, - bool friendlyPosition, int roadSideCapacity, bool onRoad, double width, const std::string& length, double angle, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, id, false) == nullptr) { - GNEParkingArea* parkingArea = new GNEParkingArea(id, lane, viewNet, startPos, endPos, name, friendlyPosition, roadSideCapacity, onRoad, width, length, angle, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_PARKING_AREA)); - viewNet->getUndoList()->add(new GNEChange_Additional(parkingArea, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildTAZ(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Vaporizer + const std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_TAZ, SUMO_ATTR_ID, abort); + const PositionVector shape = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_TAZ, SUMO_ATTR_SHAPE, abort); + RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_TAZ, SUMO_ATTR_COLOR, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_TAZ, GNE_ATTR_BLOCK_MOVEMENT, abort); + } + // check edges + std::vector edgeIDs; + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + std::string parsedAttribute = attrs.get(SUMO_ATTR_EDGES, id.c_str(), abort, false); + edgeIDs = GNEAttributeCarrier::parse >(parsedAttribute); + } + // check if all edge IDs are valid + std::vector edges; + for (auto i : edgeIDs) { + GNEEdge* edge = viewNet->getNet()->retrieveEdge(i, false); + if (edge == nullptr) { + WRITE_WARNING("Invalid " + toString(SUMO_TAG_EDGE) + " with ID = '" + i + "' within taz '" + id + "'."); + abort = true; } else { - viewNet->getNet()->insertAdditional(parkingArea); - lane->addAdditionalChild(parkingArea); - parkingArea->incRef("buildParkingArea"); + edges.push_back(edge); } - return parkingArea; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_PARKING_AREA) + " with ID '" + id + "' in netedit; probably declared twice."); } + // Continue if all parameters were successfully loaded + if (!abort) { + // check that all parameters are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_TAZ, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_TAZ) + " with the same ID='" + id + "'."); + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildTAZ(viewNet, allowUndoRedo, id, shape, color, edges, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } + } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildParkingSpace(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* parkingAreaParent, Position pos, double width, double length, double angle, bool blockMovement) { - GNEParkingSpace* parkingSpace = new GNEParkingSpace(viewNet, parkingAreaParent, pos, width, length, angle, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_PARKING_SPACE)); - viewNet->getUndoList()->add(new GNEChange_Additional(parkingSpace, true), true); - viewNet->getUndoList()->p_end(); - } else { - viewNet->getNet()->insertAdditional(parkingSpace); - parkingAreaParent->addAdditionalChild(parkingSpace); - parkingSpace->incRef("buildParkingSpace"); +bool +GNEAdditionalHandler::parseAndBuildTAZSource(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Vaporizer + const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_TAZSOURCE, SUMO_ATTR_ID, abort); + const double departWeight = GNEAttributeCarrier::parseAttributeFromXML(attrs, edgeID, SUMO_TAG_TAZSOURCE, SUMO_ATTR_WEIGHT, abort); + // Continue if all parameters were successfully loaded + if (!abort) { + // get edge and TAZ + GNEEdge* edge = viewNet->getNet()->retrieveEdge(edgeID, false); + GNEAdditional* TAZ = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + TAZ = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_TAZ); + } else { + bool ok = true; + TAZ = viewNet->getNet()->retrieveAdditional(SUMO_TAG_TAZ, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all parameters are valid + if (edge == nullptr) { + WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(SUMO_TAG_TAZSOURCE) + " is not known."); + } else if (TAZ == nullptr) { + WRITE_WARNING("A " + toString(SUMO_TAG_TAZSOURCE) + " must be declared within the definition of a " + toString(SUMO_TAG_TAZ) + "."); + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildTAZSource(viewNet, allowUndoRedo, TAZ, edge, departWeight); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } - return parkingSpace; + return false; } -GNEAdditional* -GNEAdditionalHandler::buildDetectorE1(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E1DETECTOR, id, false) == nullptr) { - GNEDetectorE1* detectorE1 = new GNEDetectorE1(id, lane, viewNet, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E1DETECTOR)); - viewNet->getUndoList()->add(new GNEChange_Additional(detectorE1, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildTAZSink(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Vaporizer + const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_TAZSINK, SUMO_ATTR_ID, abort); + const double arrivalWeight = GNEAttributeCarrier::parseAttributeFromXML(attrs, edgeID, SUMO_TAG_TAZSINK, SUMO_ATTR_WEIGHT, abort); + // Continue if all parameters were successfully loaded + if (!abort) { + // get edge and TAZ + GNEEdge* edge = viewNet->getNet()->retrieveEdge(edgeID, false); + GNEAdditional* TAZ = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + TAZ = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_TAZ); } else { - viewNet->getNet()->insertAdditional(detectorE1); - lane->addAdditionalChild(detectorE1); - detectorE1->incRef("buildDetectorE1"); + bool ok = true; + TAZ = viewNet->getNet()->retrieveAdditional(SUMO_TAG_TAZ, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all parameters are valid + if (edge == nullptr) { + WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(SUMO_TAG_TAZSINK) + " is not known."); + } else if (TAZ == nullptr) { + WRITE_WARNING("A " + toString(SUMO_TAG_TAZSINK) + " must be declared within the definition of a " + toString(SUMO_TAG_TAZ) + "."); + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildTAZSink(viewNet, allowUndoRedo, TAZ, edge, arrivalWeight); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return detectorE1; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_E1DETECTOR) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildSingleLaneDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double length, double freq, const std::string& filename, - const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E2DETECTOR, id, false) == nullptr) { - GNEDetectorE2* detectorE2 = new GNEDetectorE2(id, lane, viewNet, pos, length, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E2DETECTOR)); - viewNet->getUndoList()->add(new GNEChange_Additional(detectorE2, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildRouteProbe(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of RouteProbe + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ROUTEPROBE, SUMO_ATTR_ID, abort); + std::string edgeId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_ROUTEPROBE, SUMO_ATTR_EDGE, abort); + std::string freq = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_ROUTEPROBE, SUMO_ATTR_FREQUENCY, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_ROUTEPROBE, SUMO_ATTR_NAME, abort); + std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_ROUTEPROBE, SUMO_ATTR_FILE, abort); + double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_ROUTEPROBE, SUMO_ATTR_BEGIN, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get edge + GNEEdge* edge = viewNet->getNet()->retrieveEdge(edgeId, false); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTEPROBE, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_ROUTEPROBE) + " with the same ID='" + id + "'."); + } else if (edge == nullptr) { + // Write error if lane isn't valid + WRITE_WARNING("The edge '" + edgeId + "' to use within the " + toString(SUMO_TAG_ROUTEPROBE) + " '" + id + "' is not known."); } else { - viewNet->getNet()->insertAdditional(detectorE2); - lane->addAdditionalChild(detectorE2); - detectorE2->incRef("buildDetectorE2"); + // Freq needs an extra check, because it can be empty + if (GNEAttributeCarrier::canParse(freq)) { + if (GNEAttributeCarrier::parse(freq) < 0) { + WRITE_WARNING(toString(SUMO_ATTR_FREQUENCY) + "of " + toString(SUMO_TAG_ROUTEPROBE) + "'" + id + "' cannot be negative."); + freq = ""; + } + } else { + if (freq.empty()) { + WRITE_WARNING(toString(SUMO_ATTR_FREQUENCY) + "of " + toString(SUMO_TAG_ROUTEPROBE) + "'" + id + "' cannot be parsed to float."); + } + freq = ""; + } + // save ID of last created element + GNEAdditional* additionalCreated = buildRouteProbe(viewNet, allowUndoRedo, id, edge, freq, name, file, begin); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return detectorE2; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_E2DETECTOR) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildMultiLaneDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, const std::vector &lanes, double pos, double endPos, double freq, const std::string& filename, - const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E2DETECTOR_MULTILANE, id, false) == nullptr) { - GNEDetectorE2* detectorE2 = new GNEDetectorE2(id, lanes, viewNet, pos, endPos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E2DETECTOR_MULTILANE)); - viewNet->getUndoList()->add(new GNEChange_Additional(detectorE2, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildCalibratorFlow(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of calibrator flows + std::string vehicleTypeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_TYPE, abort); + std::string routeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_ROUTE, abort); + std::string vehsPerHour = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_VEHSPERHOUR, abort); + std::string speed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_SPEED, abort); + RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_COLOR, abort); + std::string departLane = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_DEPARTLANE, abort); + std::string departPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_DEPARTPOS, abort); + std::string departSpeed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_DEPARTSPEED, abort); + std::string arrivalLane = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_ARRIVALLANE, abort); + std::string arrivalPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_ARRIVALPOS, abort); + std::string arrivalSpeed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_ARRIVALSPEED, abort); + std::string line = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_LINE, abort); + int personNumber = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_PERSON_NUMBER, abort); + int containerNumber = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_CONTAINER_NUMBER, abort); + bool reroute = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_REROUTE, abort); + std::string departPosLat = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_DEPARTPOS_LAT, abort); + std::string arrivalPosLat = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_ARRIVALPOS_LAT, abort); + double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_BEGIN, abort); + double end = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATORFLOW, SUMO_ATTR_END, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain route, vehicle type and calibrator parent + GNEDemandElement* route = viewNet->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, routeID, false); + GNEDemandElement* vtype = viewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, vehicleTypeID, false); + GNEAdditional* calibrator = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + calibrator = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_CALIBRATOR); } else { - viewNet->getNet()->insertAdditional(detectorE2); - for (auto i : lanes) { - i->addAdditionalChild(detectorE2); + bool ok = true; + calibrator = viewNet->getNet()->retrieveAdditional(SUMO_TAG_CALIBRATOR, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all elements are valid + if (route == nullptr) { + WRITE_WARNING(toString(SUMO_TAG_CALIBRATORFLOW) + " cannot be created; their " + toString(SUMO_TAG_ROUTE) + " with ID = '" + routeID + "' doesn't exist"); + abort = true; + } else if (vtype == nullptr) { + WRITE_WARNING(toString(SUMO_TAG_CALIBRATORFLOW) + " cannot be created; their " + toString(SUMO_TAG_VTYPE) + " with ID = '" + vehicleTypeID + "' doesn't exist"); + abort = true; + } else if ((vehsPerHour.empty()) && (speed.empty())) { + WRITE_WARNING(toString(SUMO_TAG_CALIBRATORFLOW) + " cannot be created; At least parameters " + toString(SUMO_ATTR_VEHSPERHOUR) + " or " + toString(SUMO_ATTR_SPEED) + " has to be defined"); + abort = true; + } else if (calibrator != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = buildCalibratorFlow(viewNet, allowUndoRedo, calibrator, route, vtype, vehsPerHour, speed, color, departLane, departPos, departSpeed, arrivalLane, arrivalPos, arrivalSpeed, + line, personNumber, containerNumber, reroute, departPosLat, arrivalPosLat, begin, end); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); } - detectorE2->incRef("buildDetectorE2Multilane"); + return true; } - // check E2 integrity - detectorE2->checkE2MultilaneIntegrity(); - return detectorE2; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_E2DETECTOR_MULTILANE) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildDetectorE3(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, double freq, const std::string& filename, const std::string& vehicleTypes, - const std::string& name, const double timeThreshold, double speedThreshold, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, id, false) == nullptr) { - GNEDetectorE3* detectorE3 = new GNEDetectorE3(id, viewNet, pos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_E3DETECTOR)); - viewNet->getUndoList()->add(new GNEChange_Additional(detectorE3, true), true); - viewNet->getUndoList()->p_end(); +void +GNEAdditionalHandler::parseAndBuildPoly(const SUMOSAXAttributes& attrs) { + bool abort = false; + // parse attributes of polygons + std::string polygonID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_POLY, SUMO_ATTR_ID, abort); + PositionVector shape = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_SHAPE, abort); + double layer = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_LAYER, abort); + bool fill = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_POLY, SUMO_ATTR_FILL, abort); + double lineWidth = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_LINEWIDTH, abort); + std::string type = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_TYPE, abort); + RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_COLOR, abort); + double angle = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_ANGLE, abort); + std::string imgFile = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_IMGFILE, abort); + bool relativePath = GNEAttributeCarrier::parseAttributeFromXML(attrs, polygonID, SUMO_TAG_POLY, SUMO_ATTR_RELATIVEPATH, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // check if shape must be loaded as geo attribute + bool geo = false; + const GeoConvHelper* gch = myGeoConvHelper != nullptr ? myGeoConvHelper : &GeoConvHelper::getFinal(); + if (attrs.getOpt(SUMO_ATTR_GEO, polygonID.c_str(), abort, false)) { + geo = true; + bool success = true; + for (int i = 0; i < (int)shape.size(); i++) { + success &= gch->x2cartesian_const(shape[i]); + } + if (!success) { + WRITE_WARNING("Unable to project coordinates for polygon '" + polygonID + "'."); + return; + } + } + // check if img file is absolute + if (imgFile != "" && !FileHelpers::isAbsolute(imgFile)) { + imgFile = FileHelpers::getConfigurationRelative(getFileName(), imgFile); + } + // create polygon, or show an error if polygon already exists + if (!myShapeContainer.addPolygon(polygonID, type, color, layer, angle, imgFile, relativePath, shape, geo, fill, lineWidth, false)) { + WRITE_WARNING("Polygon with ID '" + polygonID + "' already exists."); } else { - viewNet->getNet()->insertAdditional(detectorE3); - detectorE3->incRef("buildDetectorE3"); + // update myLastParameterised with the last inserted Polygon + myLastParameterised = myShapeContainer.getPolygons().get(polygonID); } - return detectorE3; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_E3DETECTOR) + " with ID '" + id + "' in netedit; probably declared twice."); } } -GNEAdditional* -GNEAdditionalHandler::buildDetectorEntry(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement) { - // Check if Detector E3 parent and lane is correct - if (lane == nullptr) { - throw ProcessError("Could not build " + toString(SUMO_TAG_DET_ENTRY) + " in netedit; " + toString(SUMO_TAG_LANE) + " doesn't exist."); - } else if (E3Parent == nullptr) { - throw ProcessError("Could not build " + toString(SUMO_TAG_DET_ENTRY) + " in netedit; " + toString(SUMO_TAG_E3DETECTOR) + " parent doesn't exist."); - } else { - GNEDetectorEntry* entry = new GNEDetectorEntry(viewNet, E3Parent, lane, pos, friendlyPos, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_DET_ENTRY)); - viewNet->getUndoList()->add(new GNEChange_Additional(entry, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildVariableSpeedSign(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of VSS + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_VSS, SUMO_ATTR_ID, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_VSS, SUMO_ATTR_NAME, abort); + GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_VSS, SUMO_ATTR_FILE, abort); // deprecated + std::string lanesIDs = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_VSS, SUMO_ATTR_LANES, abort); + Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_VSS, SUMO_ATTR_POSITION, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_VSS, GNE_ATTR_BLOCK_MOVEMENT, abort); + } + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain lanes + std::vector lanes; + if (GNEAttributeCarrier::canParse >(viewNet->getNet(), lanesIDs, true)) { + lanes = GNEAttributeCarrier::parse >(viewNet->getNet(), lanesIDs); + } + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_VSS, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_VSS) + " with the same ID='" + id + "'."); + } else if (lanes.size() == 0) { + WRITE_WARNING("A Variable Speed Sign needs at least one lane."); } else { - viewNet->getNet()->insertAdditional(entry); - lane->addAdditionalChild(entry); - E3Parent->addAdditionalChild(entry); - entry->incRef("buildDetectorEntry"); + // save ID of last created element + GNEAdditional* additionalCreated = buildVariableSpeedSign(viewNet, allowUndoRedo, id, pos, lanes, name, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return entry; } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildDetectorExit(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement) { - // Check if Detector E3 parent and lane is correct - if (lane == nullptr) { - throw ProcessError("Could not build " + toString(SUMO_TAG_DET_ENTRY) + " in netedit; " + toString(SUMO_TAG_LANE) + " doesn't exist."); - } else if (E3Parent == nullptr) { - throw ProcessError("Could not build " + toString(SUMO_TAG_DET_ENTRY) + " in netedit; " + toString(SUMO_TAG_E3DETECTOR) + " parent doesn't exist."); - } else { - GNEDetectorExit* exit = new GNEDetectorExit(viewNet, E3Parent, lane, pos, friendlyPos, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_DET_EXIT)); - viewNet->getUndoList()->add(new GNEChange_Additional(exit, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildVariableSpeedSignStep(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // Load step values + double time = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_STEP, SUMO_ATTR_TIME, abort); + double speed = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_STEP, SUMO_ATTR_SPEED, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get Variable Speed Signal + GNEAdditional* variableSpeedSign = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + variableSpeedSign = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_VSS); } else { - viewNet->getNet()->insertAdditional(exit); - lane->addAdditionalChild(exit); - E3Parent->addAdditionalChild(exit); - exit->incRef("buildDetectorExit"); + bool ok = true; + variableSpeedSign = viewNet->getNet()->retrieveAdditional(SUMO_TAG_VSS, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all parameters are valid + if (variableSpeedSign != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = buildVariableSpeedSignStep(viewNet, allowUndoRedo, variableSpeedSign, time, speed); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return exit; } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildDetectorE1Instant(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_INSTANT_INDUCTION_LOOP, id, false) == nullptr) { - GNEDetectorE1Instant* detectorE1Instant = new GNEDetectorE1Instant(id, lane, viewNet, pos, filename, vehicleTypes, name, friendlyPos, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_INSTANT_INDUCTION_LOOP)); - viewNet->getUndoList()->add(new GNEChange_Additional(detectorE1Instant, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildRerouter(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Rerouter + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_REROUTER, SUMO_ATTR_ID, abort); + std::string edgesIDs = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_REROUTER, SUMO_ATTR_EDGES, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_REROUTER, SUMO_ATTR_NAME, abort); + std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_REROUTER, SUMO_ATTR_FILE, abort); + double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_REROUTER, SUMO_ATTR_PROB, abort); + bool off = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_REROUTER, SUMO_ATTR_OFF, abort); + double timeThreshold = attrs.getOpt(SUMO_ATTR_HALTING_TIME_THRESHOLD, id.c_str(), abort, 0); + const std::string vTypes = attrs.getOpt(SUMO_ATTR_VTYPES, id.c_str(), abort, ""); + Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_REROUTER, SUMO_ATTR_POSITION, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_REROUTER, GNE_ATTR_BLOCK_MOVEMENT, abort); + } + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain edges + std::vector edges; + if (GNEAttributeCarrier::canParse >(viewNet->getNet(), edgesIDs, true)) { + edges = GNEAttributeCarrier::parse >(viewNet->getNet(), edgesIDs); + } + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_REROUTER, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_REROUTER) + " with the same ID='" + id + "'."); + } else if (edges.size() == 0) { + WRITE_WARNING("A rerouter needs at least one Edge"); } else { - viewNet->getNet()->insertAdditional(detectorE1Instant); - lane->addAdditionalChild(detectorE1Instant); - detectorE1Instant->incRef("buildDetectorE1Instant"); + // save ID of last created element + GNEAdditional* additionalCreated = buildRerouter(viewNet, allowUndoRedo, id, pos, edges, probability, name, + file, off, timeThreshold, vTypes, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return detectorE1Instant; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_INSTANT_INDUCTION_LOOP) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& name, const std::string& outfile, const double freq, const std::string& routeprobe) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CALIBRATOR, id, false) == nullptr) { - GNECalibrator* calibrator = new GNECalibrator(id, viewNet, lane, pos, freq, name, outfile, routeprobe); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CALIBRATOR)); - viewNet->getUndoList()->add(new GNEChange_Additional(calibrator, true), true); - viewNet->getUndoList()->p_end(); - // center after creation - viewNet->centerTo(calibrator->getGlID(), false); +bool +GNEAdditionalHandler::parseAndBuildRerouterInterval(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Rerouter + double begin = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_INTERVAL, SUMO_ATTR_BEGIN, abort); + double end = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_INTERVAL, SUMO_ATTR_END, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain rerouter + GNEAdditional* rerouter; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + rerouter = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_REROUTER); } else { - viewNet->getNet()->insertAdditional(calibrator); - lane->addAdditionalChild(calibrator); - calibrator->incRef("buildCalibrator"); + bool ok = true; + rerouter = viewNet->getNet()->retrieveAdditional(SUMO_TAG_REROUTER, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // special case for load multiple intervals in the same rerouter + if (rerouter == nullptr) { + GNEAdditional* lastInsertedRerouterInterval = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + lastInsertedRerouterInterval = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_INTERVAL); + } else { + bool ok = true; + lastInsertedRerouterInterval = viewNet->getNet()->retrieveAdditional(SUMO_TAG_INTERVAL, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + if (lastInsertedRerouterInterval) { + rerouter = lastInsertedRerouterInterval->getAdditionalParents().at(0); + } + } + // check that rerouterInterval can be created + if (begin >= end) { + WRITE_WARNING(toString(SUMO_TAG_INTERVAL) + " cannot be created; Attribute " + toString(SUMO_ATTR_END) + " must be greather than " + toString(SUMO_ATTR_BEGIN) + "."); + } else if (rerouter != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = buildRerouterInterval(viewNet, allowUndoRedo, rerouter, begin, end); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return calibrator; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_CALIBRATOR) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, double pos, const std::string& name, const std::string& outfile, const double freq, const std::string& routeprobe) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CALIBRATOR, id, false) == nullptr) { - GNECalibrator* calibrator = new GNECalibrator(id, viewNet, edge, pos, freq, name, outfile, routeprobe); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_CALIBRATOR)); - viewNet->getUndoList()->add(new GNEChange_Additional(calibrator, true), true); - viewNet->getUndoList()->p_end(); - // center after creation - viewNet->centerTo(calibrator->getGlID(), false); +bool +GNEAdditionalHandler::parseAndBuildRerouterClosingLaneReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Rerouter + std::string laneID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CLOSING_LANE_REROUTE, SUMO_ATTR_ID, abort); + std::string allow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CLOSING_LANE_REROUTE, SUMO_ATTR_ALLOW, abort); + std::string disallow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CLOSING_LANE_REROUTE, SUMO_ATTR_DISALLOW, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain lane and rerouter interval + GNELane* lane = viewNet->getNet()->retrieveLane(laneID, false, true); + GNEAdditional* rerouterInterval = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + rerouterInterval = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_INTERVAL); } else { - viewNet->getNet()->insertAdditional(calibrator); - edge->addAdditionalChild(calibrator); - calibrator->incRef("buildCalibrator"); + bool ok = true; + rerouterInterval = viewNet->getNet()->retrieveAdditional(SUMO_TAG_INTERVAL, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all elements are valid + if (lane == nullptr) { + WRITE_WARNING("The lane '" + laneID + "' to use within the " + toString(SUMO_TAG_CLOSING_LANE_REROUTE) + " is not known."); + } else if (rerouterInterval != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = buildClosingLaneReroute(viewNet, allowUndoRedo, rerouterInterval, lane, parseVehicleClasses(allow, disallow)); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return calibrator; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_CALIBRATOR) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildCalibratorRoute(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& routeID, const std::vector& edges, const RGBColor& color) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTE, routeID, false) == nullptr) { - // create route and add it to calibrator parent - GNECalibratorRoute* route = new GNECalibratorRoute(viewNet, routeID, edges, color); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + route->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(route, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildRerouterClosingReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Rerouter + std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CLOSING_REROUTE, SUMO_ATTR_ID, abort); + std::string allow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CLOSING_REROUTE, SUMO_ATTR_ALLOW, abort); + std::string disallow = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CLOSING_REROUTE, SUMO_ATTR_DISALLOW, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain edge and rerouter interval + GNEEdge* edge = viewNet->getNet()->retrieveEdge(edgeID, false); + GNEAdditional* rerouterInterval = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + rerouterInterval = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_INTERVAL); } else { - viewNet->getNet()->insertAdditional(route); - route->incRef("buildCalibratorRoute"); + bool ok = true; + rerouterInterval = viewNet->getNet()->retrieveAdditional(SUMO_TAG_INTERVAL, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all elements are valid + if (edge == nullptr) { + WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(SUMO_TAG_CLOSING_REROUTE) + " is not known."); + } else if (rerouterInterval != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = buildClosingReroute(viewNet, allowUndoRedo, rerouterInterval, edge, parseVehicleClasses(allow, disallow)); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return route; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_ROUTE) + " with ID '" + routeID + "' in netedit; probably declared twice."); } - + return false; } -GNEAdditional* -GNEAdditionalHandler::buildVehicleType(GNEViewNet* viewNet, bool allowUndoRedo, std::string vehicleTypeID, - double accel, double decel, double sigma, double tau, double length, double minGap, double maxSpeed, - double speedFactor, double speedDev, const RGBColor& color, SUMOVehicleClass vClass, const std::string& emissionClass, - SUMOVehicleShape shape, double width, const std::string& filename, double impatience, const std::string& laneChangeModel, - const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration, - double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_VTYPE, vehicleTypeID, false) == nullptr) { - // create vehicle type and add it to calibrator parent - GNECalibratorVehicleType* vType = new GNECalibratorVehicleType(viewNet, vehicleTypeID, accel, decel, sigma, tau, length, minGap, maxSpeed, - speedFactor, speedDev, color, vClass, emissionClass, shape, width, filename, impatience, - laneChangeModel, carFollowModel, personCapacity, containerCapacity, boardingDuration, - loadingDuration, latAlignment, minGapLat, maxSpeedLat); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + vType->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(vType, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildRerouterDestProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Rerouter + std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DEST_PROB_REROUTE, SUMO_ATTR_ID, abort); + double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DEST_PROB_REROUTE, SUMO_ATTR_PROB, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain edge and rerouter interval + GNEEdge* edge = viewNet->getNet()->retrieveEdge(edgeID, false); + GNEAdditional* rerouterInterval = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + rerouterInterval = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_INTERVAL); } else { - viewNet->getNet()->insertAdditional(vType); - vType->incRef("buildCalibratorVehicleType"); + bool ok = true; + rerouterInterval = viewNet->getNet()->retrieveAdditional(SUMO_TAG_INTERVAL, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all elements are valid + if (edge == nullptr) { + WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(SUMO_TAG_DEST_PROB_REROUTE) + " is not known."); + } else if (rerouterInterval != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = builDestProbReroute(viewNet, allowUndoRedo, rerouterInterval, edge, probability); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return vType; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_VTYPE) + " with ID '" + vehicleTypeID + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildCalibratorFlow(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* calibratorParent, GNEAdditional* route, GNEAdditional* vtype, - const std::string& vehsPerHour, const std::string& speed, const RGBColor& color, const std::string& departLane, const std::string& departPos, - const std::string& departSpeed, const std::string& arrivalLane, const std::string& arrivalPos, const std::string& arrivalSpeed, const std::string& line, - int personNumber, int containerNumber, bool reroute, const std::string& departPosLat, const std::string& arrivalPosLat, double begin, double end) { - - // create Flow and add it to calibrator parent - GNECalibratorFlow* flow = new GNECalibratorFlow(calibratorParent, vtype, route, vehsPerHour, speed, color, departLane, departPos, departSpeed, - arrivalLane, arrivalPos, arrivalSpeed, line, personNumber, containerNumber, reroute, - departPosLat, arrivalPosLat, begin, end); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + flow->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(flow, true), true); - viewNet->getUndoList()->p_end(); - } else { - calibratorParent->addAdditionalChild(flow); - flow->incRef("buildCalibratorFlow"); +bool +GNEAdditionalHandler::parseAndBuildRerouterParkingAreaReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Rerouter + std::string parkingAreaID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_ZONE_REROUTE, SUMO_ATTR_ID, abort); + double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_ZONE_REROUTE, SUMO_ATTR_PROB, abort); + bool visible = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_ZONE_REROUTE, SUMO_ATTR_VISIBLE, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain edge and rerouter interval + GNEAdditional* parkingArea = viewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, parkingAreaID, false); + GNEAdditional* rerouterInterval = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + rerouterInterval = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_INTERVAL); + } else { + bool ok = true; + rerouterInterval = viewNet->getNet()->retrieveAdditional(SUMO_TAG_INTERVAL, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all elements are valid + if (parkingArea == nullptr) { + WRITE_WARNING("The parkingArea '" + parkingAreaID + "' to use within the " + toString(SUMO_TAG_PARKING_ZONE_REROUTE) + " is not known."); + } else if (rerouterInterval != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = builParkingAreaReroute(viewNet, allowUndoRedo, rerouterInterval, parkingArea, probability, visible); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } - return flow; + return false; } -GNEAdditional* -GNEAdditionalHandler::buildRerouter(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, const std::vector& edges, double prob, const std::string& name, const std::string& file, bool off, double timeThreshold, const std::string& vTypes, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_REROUTER, id, false) == nullptr) { - GNERerouter* rerouter = new GNERerouter(id, viewNet, pos, edges, name, file, prob, off, timeThreshold, vTypes, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_REROUTER)); - viewNet->getUndoList()->add(new GNEChange_Additional(rerouter, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildRerouterRouteProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Rerouter + std::string routeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ROUTE_PROB_REROUTE, SUMO_ATTR_ID, abort); + double probability = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ROUTE_PROB_REROUTE, SUMO_ATTR_PROB, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // obtain rerouter interval + GNEAdditional* rerouterInterval = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + rerouterInterval = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_INTERVAL); } else { - viewNet->getNet()->insertAdditional(rerouter); - // add this rerouter as parent of all edges - for (auto i : edges) { - i->addAdditionalParent(rerouter); - } - rerouter->incRef("buildRerouter"); + bool ok = true; + rerouterInterval = viewNet->getNet()->retrieveAdditional(SUMO_TAG_INTERVAL, attrs.get(GNE_ATTR_PARENT, "", ok)); } - // parse rerouter childs - if (!file.empty()) { - // we assume that rerouter values files is placed in the same folder as the additional file - std::string currentAdditionalFilename = FileHelpers::getFilePath(OptionsCont::getOptions().getString("sumo-additionals-file")); - // Create additional handler for parse rerouter values - GNEAdditionalHandler rerouterValuesHandler(currentAdditionalFilename + file, viewNet, allowUndoRedo, rerouter); - // disable validation for rerouters - XMLSubSys::setValidation("never", "auto"); - // Run parser - if (!XMLSubSys::runParser(rerouterValuesHandler, currentAdditionalFilename + file, false)) { - WRITE_MESSAGE("Loading of " + file + " failed."); + // check that all elements are valid + if (rerouterInterval != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = buildRouteProbReroute(viewNet, allowUndoRedo, rerouterInterval, routeID, probability); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); } - // enable validation for rerouters - XMLSubSys::setValidation("auto", "auto"); + return true; } - return rerouter; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_REROUTER) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildRerouterInterval(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterParent, double begin, double end) { - // check if new interval will produce a overlapping - if (checkOverlappingRerouterIntervals(rerouterParent, begin, end)) { - // create rerouter interval and add it into rerouter parent - GNERerouterInterval* rerouterInterval = new GNERerouterInterval(rerouterParent, begin, end); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + rerouterInterval->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(rerouterInterval, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildBusStop(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of bus stop + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_BUS_STOP, SUMO_ATTR_ID, abort); + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_BUS_STOP, SUMO_ATTR_LANE, abort); + std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_BUS_STOP, SUMO_ATTR_STARTPOS, abort); + std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_BUS_STOP, SUMO_ATTR_ENDPOS, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_BUS_STOP, SUMO_ATTR_NAME, abort); + std::vector lines = GNEAttributeCarrier::parseAttributeFromXML >(attrs, id, SUMO_TAG_BUS_STOP, SUMO_ATTR_LINES, abort); + const int personCapacity = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_BUS_STOP, SUMO_ATTR_PERSON_CAPACITY, abort); + bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_BUS_STOP, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_BUS_STOP, GNE_ATTR_BLOCK_MOVEMENT, abort); + } + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_BUS_STOP) + " with the same ID='" + id + "'."); + } else if (lane == nullptr) { + // Write error if lane isn't valid + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_BUS_STOP) + " '" + id + "' is not known."); + } else if (!GNEStoppingPlace::checkStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), friendlyPosition)) { + // Write error if position isn't valid + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_BUS_STOP) + " with ID = '" + id + "'."); } else { - rerouterParent->addAdditionalChild(rerouterInterval); - rerouterInterval->incRef("buildRerouterInterval"); + // save ID of last created element + GNEAdditional* additionalCreated = buildBusStop(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, lines, personCapacity, friendlyPosition, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return rerouterInterval; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_INTERVAL) + " with begin '" + toString(begin) + "' and '" + toString(end) + "' in '" + rerouterParent->getID() + "' due overlapping."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildClosingLaneReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNELane* closedLane, SVCPermissions permissions) { - // create closing lane reorute - GNEClosingLaneReroute* closingLaneReroute = new GNEClosingLaneReroute(rerouterIntervalParent, closedLane, permissions); - // add it to interval parent depending of allowUndoRedo - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + closingLaneReroute->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(closingLaneReroute, true), true); - viewNet->getUndoList()->p_end(); - } else { - rerouterIntervalParent->addAdditionalChild(closingLaneReroute); - closingLaneReroute->incRef("buildClosingLaneReroute"); +bool +GNEAdditionalHandler::parseAndBuildContainerStop(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of container stop + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CONTAINER_STOP, SUMO_ATTR_ID, abort); + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CONTAINER_STOP, SUMO_ATTR_LANE, abort); + std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CONTAINER_STOP, SUMO_ATTR_STARTPOS, abort); + std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CONTAINER_STOP, SUMO_ATTR_ENDPOS, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CONTAINER_STOP, SUMO_ATTR_NAME, abort); + std::vector lines = GNEAttributeCarrier::parseAttributeFromXML >(attrs, id, SUMO_TAG_CONTAINER_STOP, SUMO_ATTR_LINES, abort); + bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CONTAINER_STOP, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CONTAINER_STOP, GNE_ATTR_BLOCK_MOVEMENT, abort); } - return closingLaneReroute; -} - - -GNEAdditional* -GNEAdditionalHandler::buildClosingReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* closedEdge, SVCPermissions permissions) { - // create closing reroute - GNEClosingReroute* closingReroute = new GNEClosingReroute(rerouterIntervalParent, closedEdge, permissions); - // add it to interval parent depending of allowUndoRedo - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + closingReroute->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(closingReroute, true), true); - viewNet->getUndoList()->p_end(); - } else { - rerouterIntervalParent->addAdditionalChild(closingReroute); - closingReroute->incRef("buildClosingReroute"); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CONTAINER_STOP, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_CONTAINER_STOP) + " with the same ID='" + id + "'."); + } else if (lane == nullptr) { + // Write error if lane isn't valid + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_CONTAINER_STOP) + " '" + id + "' is not known."); + } else if (!GNEStoppingPlace::checkStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), friendlyPosition)) { + // write error if position isn't valid + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_CONTAINER_STOP) + " with ID = '" + id + "'."); + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildContainerStop(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, lines, friendlyPosition, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } - return closingReroute; + return false; } -GNEAdditional* -GNEAdditionalHandler::builDestProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* newEdgeDestination, double probability) { - // create dest probability reroute - GNEDestProbReroute* destProbReroute = new GNEDestProbReroute(rerouterIntervalParent, newEdgeDestination, probability); - // add it to interval parent depending of allowUndoRedo - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + destProbReroute->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(destProbReroute, true), true); - viewNet->getUndoList()->p_end(); - } else { - rerouterIntervalParent->addAdditionalChild(destProbReroute); - destProbReroute->incRef("builDestProbReroute"); +bool +GNEAdditionalHandler::parseAndBuildAccess(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Entry + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ACCESS, SUMO_ATTR_LANE, abort); + std::string position = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ACCESS, SUMO_ATTR_POSITION, abort); + std::string length = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ACCESS, SUMO_ATTR_LENGTH, abort); + bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ACCESS, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ACCESS, GNE_ATTR_BLOCK_MOVEMENT, abort); } - return destProbReroute; -} - - -GNEAdditional* -GNEAdditionalHandler::builParkingAreaReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEAdditional* newParkingArea, double probability, bool visible) { - // create dest probability reroute - GNEParkingAreaReroute* parkingAreaReroute = new GNEParkingAreaReroute(rerouterIntervalParent, newParkingArea, probability, visible); - // add it to interval parent depending of allowUndoRedo - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + parkingAreaReroute->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(parkingAreaReroute, true), true); - viewNet->getUndoList()->p_end(); - } else { - rerouterIntervalParent->addAdditionalChild(parkingAreaReroute); - parkingAreaReroute->incRef("builParkingAreaReroute"); + // Check if parsing of parameters was correct + if (!abort) { + double posDouble = GNEAttributeCarrier::parse(position); + // get lane and busStop parent + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + GNEAdditional* busStop = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + busStop = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_BUS_STOP); + } else { + bool ok = true; + busStop = viewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all parameters are valid + if (lane == nullptr) { + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_ACCESS) + " is not known."); + } else if (busStop == nullptr) { + WRITE_WARNING("A " + toString(SUMO_TAG_ACCESS) + " must be declared within the definition of a " + toString(SUMO_TAG_BUS_STOP) + "."); + } else if (!checkAndFixDetectorPosition(posDouble, lane->getLaneShapeLength(), friendlyPos)) { + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_ACCESS) + "."); + } else if (!accessCanBeCreated(busStop, lane->getParentEdge())) { + WRITE_WARNING("Edge '" + lane->getParentEdge().getID() + "' already has an Access for busStop '" + busStop->getID() + "'"); + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildAccess(viewNet, allowUndoRedo, busStop, lane, toString(posDouble), length, friendlyPos, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } - return parkingAreaReroute; + return false; } -GNEAdditional* -GNEAdditionalHandler::buildRouteProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, const std::string& newRouteId, double probability) { - // create rout prob rereoute - GNERouteProbReroute* routeProbReroute = new GNERouteProbReroute(rerouterIntervalParent, newRouteId, probability); - // add it to interval parent depending of allowUndoRedo - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + routeProbReroute->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(routeProbReroute, true), true); - viewNet->getUndoList()->p_end(); - } else { - rerouterIntervalParent->addAdditionalChild(routeProbReroute); - routeProbReroute->incRef("buildRouteProbReroute"); +bool +GNEAdditionalHandler::parseAndBuildChargingStation(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of charging station + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CHARGING_STATION, SUMO_ATTR_ID, abort); + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_LANE, abort); + std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_STARTPOS, abort); + std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_ENDPOS, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_NAME, abort); + double chargingPower = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_CHARGINGPOWER, abort); + double efficiency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_EFFICIENCY, abort); + bool chargeInTransit = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_CHARGEINTRANSIT, abort); + double chargeDelay = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_CHARGEDELAY, abort); + bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CHARGING_STATION, GNE_ATTR_BLOCK_MOVEMENT, abort); } - return routeProbReroute; -} - - -GNEAdditional* -GNEAdditionalHandler::buildRouteProbe(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, const std::string& freq, const std::string& name, const std::string& file, double begin) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTEPROBE, id, false) == nullptr) { - GNERouteProbe* routeProbe = new GNERouteProbe(id, viewNet, edge, freq, name, file, begin); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_ROUTEPROBE)); - viewNet->getUndoList()->add(new GNEChange_Additional(routeProbe, true), true); - viewNet->getUndoList()->p_end(); - // center after creation - viewNet->centerTo(routeProbe->getGlID(), false); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CHARGING_STATION, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_CHARGING_STATION) + " with the same ID='" + id + "'."); + } else if (lane == nullptr) { + // Write error if lane isn't valid + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_CHARGING_STATION) + " '" + id + "' is not known."); + } else if (!GNEStoppingPlace::checkStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), friendlyPosition)) { + // write error if position isn't valid + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_CHARGING_STATION) + " with ID = '" + id + "'."); } else { - viewNet->getNet()->insertAdditional(routeProbe); - edge->addAdditionalChild(routeProbe); - routeProbe->incRef("buildRouteProbe"); + // save ID of last created element + GNEAdditional* additionalCreated = buildChargingStation(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, chargingPower, + efficiency, chargeInTransit, chargeDelay, friendlyPosition, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } - return routeProbe; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_ROUTEPROBE) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildVariableSpeedSign(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, const std::vector& lanes, const std::string& name, bool blockMovement) { - if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_VSS, id, false) == nullptr) { - GNEVariableSpeedSign* variableSpeedSign = new GNEVariableSpeedSign(id, viewNet, pos, lanes, name, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_VSS)); - viewNet->getUndoList()->add(new GNEChange_Additional(variableSpeedSign, true), true); - viewNet->getUndoList()->p_end(); +bool +GNEAdditionalHandler::parseAndBuildParkingArea(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of charging station + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_AREA, SUMO_ATTR_ID, abort); + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_LANE, abort); + std::string startPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_STARTPOS, abort); + std::string endPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_ENDPOS, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_NAME, abort); + bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_FRIENDLY_POS, abort); + int roadSideCapacity = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_ROADSIDE_CAPACITY, abort); + bool onRoad = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_ONROAD, abort); + double width = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_WIDTH, abort); + std::string length = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_LENGTH, abort); + double angle = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, SUMO_ATTR_ANGLE, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_PARKING_AREA, GNE_ATTR_BLOCK_MOVEMENT, abort); + } + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_PARKING_AREA) + " with the same ID='" + id + "'."); + } else if (lane == nullptr) { + // Write error if lane isn't valid + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_PARKING_AREA) + " '" + id + "' is not known."); + } else if (!GNEStoppingPlace::checkStoppinPlacePosition(startPos, endPos, lane->getParentEdge().getNBEdge()->getFinalLength(), friendlyPosition)) { + // write error if position isn't valid + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_PARKING_AREA) + " with ID = '" + id + "'."); } else { - viewNet->getNet()->insertAdditional(variableSpeedSign); - // add this VSS as parent of all edges - for (auto i : lanes) { - i->addAdditionalParent(variableSpeedSign); + // save ID of last created element + GNEAdditional* additionalCreated = buildParkingArea(viewNet, allowUndoRedo, id, lane, startPos, endPos, name, friendlyPosition, + roadSideCapacity, onRoad, width, length, angle, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); } - variableSpeedSign->incRef("buildVariableSpeedSign"); + return true; } - return variableSpeedSign; - } else { - throw ProcessError("Could not build " + toString(SUMO_TAG_VSS) + " with ID '" + id + "' in netedit; probably declared twice."); } + return false; } -GNEAdditional* -GNEAdditionalHandler::buildVariableSpeedSignStep(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* VSSParent, double time, double speed) { - // create Variable Speed Sign - GNEVariableSpeedSignStep* variableSpeedSignStep = new GNEVariableSpeedSignStep(VSSParent, time, speed); - // add it depending of allow undoRedo - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + variableSpeedSignStep->getTagStr()); - viewNet->getUndoList()->add(new GNEChange_Additional(variableSpeedSignStep, true), true); - viewNet->getUndoList()->p_end(); - } else { - VSSParent->addAdditionalChild(variableSpeedSignStep); - variableSpeedSignStep->incRef("buildVariableSpeedSignStep"); +bool +GNEAdditionalHandler::parseAndBuildParkingSpace(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Parking Spaces + Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_SPACE, SUMO_ATTR_POSITION, abort); + double width = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_SPACE, SUMO_ATTR_WIDTH, abort); + double length = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_SPACE, SUMO_ATTR_LENGTH, abort); + double angle = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_SPACE, SUMO_ATTR_ANGLE, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_PARKING_SPACE, GNE_ATTR_BLOCK_MOVEMENT, abort); } - return variableSpeedSignStep; -} - - -GNEAdditional* -GNEAdditionalHandler::buildVaporizer(GNEViewNet* viewNet, bool allowUndoRedo, GNEEdge* edge, double startTime, double end, const std::string& name) { - GNEVaporizer* vaporizer = new GNEVaporizer(viewNet, edge, startTime, end, name); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_VAPORIZER)); - viewNet->getUndoList()->add(new GNEChange_Additional(vaporizer, true), true); - viewNet->getUndoList()->p_end(); - // center after creation - viewNet->centerTo(vaporizer->getGlID(), false); - } else { - viewNet->getNet()->insertAdditional(vaporizer); - edge->addAdditionalChild(vaporizer); - vaporizer->incRef("buildVaporizer"); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get Parking Area Parent + GNEAdditional* parkingAreaParent = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + parkingAreaParent = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_PARKING_AREA); + } else { + bool ok = true; + parkingAreaParent = viewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that Parking Area Parent exists + if (parkingAreaParent != nullptr) { + // save ID of last created element + GNEAdditional* additionalCreated = buildParkingSpace(viewNet, allowUndoRedo, parkingAreaParent, pos, width, length, angle, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } - return vaporizer; + return false; } -GNEAdditional* -GNEAdditionalHandler::buildTAZ(GNEViewNet* viewNet, bool allowUndoRedo, const std::string &id, const PositionVector &shape, const RGBColor &color, const std::vector &edges, bool blockMovement) { - GNETAZ* TAZ = new GNETAZ(id, viewNet, shape, color, blockMovement); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZ)); - viewNet->getUndoList()->add(new GNEChange_Additional(TAZ, true), true); - // create TAZEdges - for (auto i : edges) { - // create TAZ Source using GNEChange_Additional - GNETAZSource* TAZSource = new GNETAZSource(TAZ, i, 1); - viewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true); - // create TAZ Sink using GNEChange_Additional - GNETAZSink* TAZSink = new GNETAZSink(TAZ, i, 1); - viewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true); +bool +GNEAdditionalHandler::parseAndBuildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // due there is two differents calibrators, has to be parsed in a different way + std::string edgeID, laneId, id; + // change tag depending of XML parmeters + if (attrs.hasAttribute(SUMO_ATTR_EDGE)) { + id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_CALIBRATOR, SUMO_ATTR_ID, abort); + edgeID = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CALIBRATOR, SUMO_ATTR_EDGE, abort); + std::string outfile = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CALIBRATOR, SUMO_ATTR_OUTPUT, abort); + double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CALIBRATOR, SUMO_ATTR_POSITION, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CALIBRATOR, SUMO_ATTR_NAME, abort); + double freq = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CALIBRATOR, SUMO_ATTR_FREQUENCY, abort); + std::string routeProbe = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_CALIBRATOR, SUMO_ATTR_ROUTEPROBE, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer and edge + GNEEdge* edge = viewNet->getNet()->retrieveEdge(edgeID, false); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_CALIBRATOR, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_CALIBRATOR) + " with the same ID='" + id + "'."); + } else if (edge == nullptr) { + WRITE_WARNING("The edge '" + edgeID + "' to use within the " + toString(SUMO_TAG_CALIBRATOR) + " '" + id + "' is not known."); + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildCalibrator(viewNet, allowUndoRedo, id, edge, position, name, outfile, freq, routeProbe); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } - viewNet->getUndoList()->p_end(); - } else { - viewNet->getNet()->insertAdditional(TAZ); - TAZ->incRef("buildTAZ"); - for (auto i : edges) { - // create TAZ Source - GNETAZSource* TAZSource = new GNETAZSource(TAZ, i, 1); - TAZSource->incRef("buildTAZ"); - TAZ->addAdditionalChild(TAZSource); - // create TAZ Sink - GNETAZSink* TAZSink = new GNETAZSink(TAZ, i, 1); - TAZSink->incRef("buildTAZ"); - TAZ->addAdditionalChild(TAZSink); + } else if (attrs.hasAttribute(SUMO_ATTR_LANE)) { + id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_LANECALIBRATOR, SUMO_ATTR_ID, abort); + laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_LANECALIBRATOR, SUMO_ATTR_LANE, abort); + std::string outfile = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_LANECALIBRATOR, SUMO_ATTR_OUTPUT, abort); + double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_LANECALIBRATOR, SUMO_ATTR_POSITION, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_LANECALIBRATOR, SUMO_ATTR_NAME, abort); + double freq = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_LANECALIBRATOR, SUMO_ATTR_FREQUENCY, abort); + std::string routeProbe = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_LANECALIBRATOR, SUMO_ATTR_ROUTEPROBE, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_LANECALIBRATOR, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_CALIBRATOR) + " with the same ID='" + id + "'."); + } else if (lane == nullptr) { + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_CALIBRATOR) + " '" + id + "' is not known."); + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildCalibrator(viewNet, allowUndoRedo, id, lane, position, name, outfile, freq, routeProbe); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } + } else { + WRITE_WARNING("additional " + toString(SUMO_TAG_CALIBRATOR) + " must have either a lane or an edge attribute."); } - return TAZ; + return false; } -GNEAdditional* -GNEAdditionalHandler::buildTAZSource(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge, double departWeight) { - GNEAdditional *TAZSink = nullptr; - // first check if a TAZSink in the same edge for the same TAZ - for (auto i : TAZ->getAdditionalChilds()) { - if((i->getTagProperty().getTag() == SUMO_TAG_TAZSINK) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { - TAZSink = i; - } +bool +GNEAdditionalHandler::parseAndBuildDetectorE1(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of E1 + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_E1DETECTOR, SUMO_ATTR_ID, abort); + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, SUMO_ATTR_LANE, abort); + double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, SUMO_ATTR_POSITION, abort); + double frequency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, SUMO_ATTR_FREQUENCY, abort); + std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, SUMO_ATTR_FILE, abort); + std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, SUMO_ATTR_VTYPES, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, SUMO_ATTR_NAME, abort); + bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E1DETECTOR, GNE_ATTR_BLOCK_MOVEMENT, abort); } - // check if TAZSink has to be created - if(TAZSink == nullptr) { - // Create TAZ with weight 0 (default) - TAZSink = new GNETAZSink(TAZ, edge, 1); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSINK)); - viewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true); - viewNet->getUndoList()->p_end(); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E1DETECTOR, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_E1DETECTOR) + " with the same ID='" + id + "'."); + } else if (lane == nullptr) { + // Write error if lane isn't valid + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_E1DETECTOR) + " '" + id + "' is not known."); + } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_E1DETECTOR) + " with ID = '" + id + "'."); } else { - viewNet->getNet()->insertAdditional(TAZSink); - TAZSink->incRef("buildTAZSource"); + // save ID of last created element + GNEAdditional* additionalCreated = buildDetectorE1(viewNet, allowUndoRedo, id, lane, position, frequency, file, vehicleTypes, name, friendlyPos, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } } - // now check check if TAZSource exist - GNEAdditional *TAZSource = nullptr; - // first check if a TAZSink in the same edge for the same TAZ - for (auto i : TAZ->getAdditionalChilds()) { - if((i->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { - TAZSource = i; - } + return false; +} + + +bool +GNEAdditionalHandler::parseAndBuildDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + // Tag E2 detectors can build either E2 single lanes or E2 multilanes, depending of attribute "lanes" + SumoXMLTag E2Tag = attrs.hasAttribute(SUMO_ATTR_LANES) ? SUMO_TAG_E2DETECTOR_MULTILANE : SUMO_TAG_E2DETECTOR; + bool abort = false; + // start parsing ID + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", E2Tag, SUMO_ATTR_ID, abort); + // parse attributes of E2 SingleLanes + std::string laneId = (E2Tag == SUMO_TAG_E2DETECTOR) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_LANE, abort) : ""; + double length = (E2Tag == SUMO_TAG_E2DETECTOR) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_LENGTH, abort) : 0; + // parse attributes of E2 Multilanes + std::string laneIds = (E2Tag == SUMO_TAG_E2DETECTOR_MULTILANE) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_LANES, abort) : ""; + double endPos = (E2Tag == SUMO_TAG_E2DETECTOR_MULTILANE) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_ENDPOS, abort) : 0; + // parse common attributes + double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_POSITION, abort); + double frequency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_FREQUENCY, abort); + std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_FILE, abort); + std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_VTYPES, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_NAME, abort); + double haltingTimeThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_HALTING_TIME_THRESHOLD, abort); + double haltingSpeedThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_HALTING_SPEED_THRESHOLD, abort); + double jamDistThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_JAM_DIST_THRESHOLD, abort); + bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, GNE_ATTR_BLOCK_MOVEMENT, abort); } - // check if TAZSource has to be created - if(TAZSource == nullptr) { - // Create TAZ only with departWeight - TAZSource = new GNETAZSource(TAZ, edge, departWeight); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSOURCE)); - viewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true); - viewNet->getUndoList()->p_end(); - } else { - viewNet->getNet()->insertAdditional(TAZSource); - TAZSource->incRef("buildTAZSource"); - } - } else { - // update TAZ Attribute - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("update " + toString(SUMO_TAG_TAZSOURCE)); - TAZSource->setAttribute(SUMO_ATTR_WEIGHT, toString(departWeight), viewNet->getUndoList()); - viewNet->getUndoList()->p_end(); + // cont attribute is deprecated + GNEAttributeCarrier::parseAttributeFromXML(attrs, id, E2Tag, SUMO_ATTR_CONT, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // check if at leas lane or laneIDS are defined + if (laneId.empty() && laneIds.empty()) { + WRITE_WARNING("A " + toString(E2Tag) + " needs at least a lane or a list of lanes."); } else { - TAZSource->setAttribute(SUMO_ATTR_WEIGHT, toString(departWeight), nullptr); - TAZSource->incRef("buildTAZSource"); + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // get list of lanes + std::vector lanes; + bool laneConsecutives = true; + if (GNEAttributeCarrier::canParse >(viewNet->getNet(), laneIds, false)) { + lanes = GNEAttributeCarrier::parse >(viewNet->getNet(), laneIds); + // check if lanes are consecutives + laneConsecutives = GNEAttributeCarrier::lanesConsecutives(lanes); + } + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(E2Tag, id, false) != nullptr) { + // write error if neither lane nor lane aren't defined + WRITE_WARNING("There is another " + toString(E2Tag) + " with the same ID='" + id + "'."); + } else if (attrs.hasAttribute(SUMO_ATTR_LANE) && (lane == nullptr)) { + // Write error if lane isn't valid + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(E2Tag) + " '" + id + "' is not known."); + } else if (attrs.hasAttribute(SUMO_ATTR_LANES) && lanes.empty()) { + // Write error if lane isn't valid + WRITE_WARNING("The list of lanes cannot be empty."); + } else if (attrs.hasAttribute(SUMO_ATTR_LANES) && lanes.empty()) { + // Write error if lane isn't valid + WRITE_WARNING("The list of lanes '" + laneIds + "' to use within the " + toString(E2Tag) + " '" + id + "' isn't valid."); + } else if (!lanes.empty() && !laneConsecutives) { + WRITE_WARNING("The lanes '" + laneIds + "' to use within the " + toString(E2Tag) + " '" + id + "' aren't consecutives."); + } else if (lane && !fixE2DetectorPosition(position, length, lane->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) { + WRITE_WARNING("Invalid position for " + toString(E2Tag) + " with ID = '" + id + "'."); + } else if (!lanes.empty() && !fixE2DetectorPosition(position, length, lanes.front()->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) { + WRITE_WARNING("Invalid position for " + toString(E2Tag) + " with ID = '" + id + "'."); + } else if (!lanes.empty() && !fixE2DetectorPosition(endPos, length, lanes.back()->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) { + WRITE_WARNING("Invalid end position for " + toString(E2Tag) + " with ID = '" + id + "'."); + } else if (lane) { + // save ID of last created element + GNEAdditional* additionalCreated = buildSingleLaneDetectorE2(viewNet, allowUndoRedo, id, lane, position, length, frequency, file, vehicleTypes, + name, haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold, friendlyPos, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } else { + // save ID of last created element + GNEAdditional* additionalCreated = buildMultiLaneDetectorE2(viewNet, allowUndoRedo, id, lanes, position, endPos, frequency, file, vehicleTypes, + name, haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold, friendlyPos, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } } - return TAZSource; + return false; } -GNEAdditional* -GNEAdditionalHandler::buildTAZSink(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge, double arrivalWeight) { - GNEAdditional *TAZSource = nullptr; - // first check if a TAZSink in the same edge for the same TAZ - for (auto i : TAZ->getAdditionalChilds()) { - if((i->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { - TAZSource = i; - } +bool +GNEAdditionalHandler::parseAndBuildDetectorE3(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of E3 + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_E3DETECTOR, SUMO_ATTR_ID, abort); + double frequency = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, SUMO_ATTR_FREQUENCY, abort); + std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, SUMO_ATTR_FILE, abort); + std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, SUMO_ATTR_VTYPES, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, SUMO_ATTR_NAME, abort); + double haltingTimeThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, SUMO_ATTR_HALTING_TIME_THRESHOLD, abort); + double haltingSpeedThreshold = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, SUMO_ATTR_HALTING_SPEED_THRESHOLD, abort); + Position pos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, SUMO_ATTR_POSITION, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_E3DETECTOR, GNE_ATTR_BLOCK_MOVEMENT, abort); } - // check if TAZSource has to be created - if(TAZSource == nullptr) { - // Create TAZ with empty value - TAZSource = new GNETAZSource(TAZ, edge, 1); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSOURCE)); - viewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true); - viewNet->getUndoList()->p_end(); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_E3DETECTOR) + " with the same ID='" + id + "'."); } else { - viewNet->getNet()->insertAdditional(TAZSource); - TAZSource->incRef("buildTAZSink"); + // save ID of last created element + GNEAdditional* additionalCreated = buildDetectorE3(viewNet, allowUndoRedo, id, pos, frequency, file, vehicleTypes, name, haltingTimeThreshold, haltingSpeedThreshold, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } } - GNEAdditional *TAZSink = nullptr; - // first check if a TAZSink in the same edge for the same TAZ - for (auto i : TAZ->getAdditionalChilds()) { - if((i->getTagProperty().getTag() == SUMO_TAG_TAZSINK) && (i->getAttribute(SUMO_ATTR_EDGE) == edge->getID())) { - TAZSink = i; - } + return false; +} + + +bool +GNEAdditionalHandler::parseAndBuildDetectorEntry(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Entry + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_ENTRY, SUMO_ATTR_LANE, abort); + double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_ENTRY, SUMO_ATTR_POSITION, abort); + bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_ENTRY, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_ENTRY, GNE_ATTR_BLOCK_MOVEMENT, abort); } - // check if TAZSink has to be created - if(TAZSink == nullptr) { - // Create TAZ only with arrivalWeight - TAZSink = new GNETAZSink(TAZ, edge, arrivalWeight); - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("add " + toString(SUMO_TAG_TAZSINK)); - viewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true); - viewNet->getUndoList()->p_end(); + // Check if parsing of parameters was correct + if (!abort) { + // get lane and E3 parent + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + GNEAdditional* E3Parent = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + E3Parent = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_E3DETECTOR); } else { - viewNet->getNet()->insertAdditional(TAZSink); - TAZSink->incRef("buildTAZSink"); + bool ok = true; + E3Parent = viewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, attrs.get(GNE_ATTR_PARENT, "", ok)); } - } else { - // update TAZ Attribute - if (allowUndoRedo) { - viewNet->getUndoList()->p_begin("update " + toString(SUMO_TAG_TAZSINK)); - TAZSink->setAttribute(SUMO_ATTR_WEIGHT, toString(arrivalWeight), viewNet->getUndoList()); - viewNet->getUndoList()->p_end(); - } else { - TAZSink->setAttribute(SUMO_ATTR_WEIGHT, toString(arrivalWeight), nullptr); - TAZSink->incRef("buildTAZSink"); + // check that all parameters are valid + if (lane == nullptr) { + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_DET_ENTRY) + " is not known."); + } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_DET_ENTRY) + "."); + } else if (E3Parent) { + // save ID of last created element + GNEAdditional* additionalCreated = buildDetectorEntry(viewNet, allowUndoRedo, E3Parent, lane, position, friendlyPos, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } } - return TAZSink; + return false; } -std::string -GNEAdditionalHandler::getFileName(const SUMOSAXAttributes& attrs, const std::string& base, const bool allowEmpty) { - // get the file name to read further definitions from - bool ok = true; - std::string file = attrs.getOpt(SUMO_ATTR_FILE, nullptr, ok, ""); - if (file == "") { - if (allowEmpty) { - return file; - } - WRITE_WARNING("No filename given."); - } - // check whether absolute or relative filenames are given - if (!FileHelpers::isAbsolute(file)) { - return FileHelpers::getConfigurationRelative(base, file); +bool +GNEAdditionalHandler::parseAndBuildDetectorExit(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of Exit + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_EXIT, SUMO_ATTR_LANE, abort); + double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_EXIT, SUMO_ATTR_POSITION, abort); + bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_EXIT, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_DET_EXIT, GNE_ATTR_BLOCK_MOVEMENT, abort); + } + // Check if parsing of parameters was correct + if (!abort) { + // get lane and E3 parent + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + GNEAdditional* E3Parent = nullptr; + // obtain parent depending if we're loading or creating it using GNEAdditionalFrame + if (insertedAdditionals) { + E3Parent = insertedAdditionals->retrieveAdditionalParent(viewNet, SUMO_TAG_E3DETECTOR); + } else { + bool ok = true; + E3Parent = viewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, attrs.get(GNE_ATTR_PARENT, "", ok)); + } + // check that all parameters are valid + if (lane == nullptr) { + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_DET_EXIT) + " is not known."); + } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_DET_EXIT) + "."); + } else if (E3Parent) { + // save ID of last created element + GNEAdditional* additionalCreated = buildDetectorExit(viewNet, allowUndoRedo, E3Parent, lane, position, friendlyPos, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; + } } - return file; + return false; } -double -GNEAdditionalHandler::getPosition(double pos, GNELane& lane, bool friendlyPos , const std::string& additionalID) { - if (pos < 0) { - pos = lane.getLaneShapeLength() + pos; +bool +GNEAdditionalHandler::parseAndBuildDetectorE1Instant(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals) { + bool abort = false; + // parse attributes of E1Instant + std::string id = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_ATTR_ID, abort); + std::string laneId = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_ATTR_LANE, abort); + double position = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_ATTR_POSITION, abort); + std::string file = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_ATTR_FILE, abort); + std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_ATTR_VTYPES, abort); + std::string name = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_ATTR_NAME, abort); + bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_ATTR_FRIENDLY_POS, abort); + // parse Netedit attributes + bool blockMovement = false; + if (attrs.hasAttribute(GNE_ATTR_BLOCK_MOVEMENT)) { + blockMovement = GNEAttributeCarrier::parseAttributeFromXML(attrs, id, SUMO_TAG_INSTANT_INDUCTION_LOOP, GNE_ATTR_BLOCK_MOVEMENT, abort); } - if (pos > lane.getLaneShapeLength()) { - if (friendlyPos) { - pos = lane.getLaneShapeLength() - (double) 0.1; + // Continue if all parameters were sucesfully loaded + if (!abort) { + // get pointer to lane + GNELane* lane = viewNet->getNet()->retrieveLane(laneId, false, true); + // check that all elements are valid + if (viewNet->getNet()->retrieveAdditional(SUMO_TAG_INSTANT_INDUCTION_LOOP, id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_INSTANT_INDUCTION_LOOP) + " with the same ID='" + id + "'."); + } else if (lane == nullptr) { + // Write error if lane isn't valid + WRITE_WARNING("The lane '" + laneId + "' to use within the " + toString(SUMO_TAG_INSTANT_INDUCTION_LOOP) + " '" + id + "' is not known."); + } else if (!checkAndFixDetectorPosition(position, lane->getLaneShapeLength(), friendlyPos)) { + WRITE_WARNING("Invalid position for " + toString(SUMO_TAG_INSTANT_INDUCTION_LOOP) + " with ID = '" + id + "'."); } else { - WRITE_WARNING("The position of additional '" + additionalID + "' lies beyond the lane's '" + lane.getID() + "' length."); + // save ID of last created element + GNEAdditional* additionalCreated = buildDetectorE1Instant(viewNet, allowUndoRedo, id, lane, position, file, vehicleTypes, name, friendlyPos, blockMovement); + // check if insertion has to be commited + if (insertedAdditionals) { + insertedAdditionals->commitElementInsertion(additionalCreated); + } + return true; } } - return pos; + return false; } +// =========================================================================== +// private method definitions +// =========================================================================== -bool -GNEAdditionalHandler::fixStoppinPlacePosition(std::string& startPos, std::string& endPos, const double laneLength, const double minLength, const bool friendlyPos) { - // first check if startPos and endPos were defined - if (GNEAttributeCarrier::canParse(startPos) && GNEAttributeCarrier::canParse(endPos)) { - // first parse strings to numerical values - double startPosDouble = GNEAttributeCarrier::parse(startPos); - double endPosDouble = GNEAttributeCarrier::parse(endPos); - - // fix both positions - if (minLength > laneLength) { - return false; - } - if (startPosDouble < 0) { - startPosDouble += laneLength; - } - if (endPosDouble < 0) { - endPosDouble += laneLength; - } - if ((endPosDouble < minLength) || (endPosDouble > laneLength)) { - if (!friendlyPos) { - return false; - } - if (endPosDouble < minLength) { - endPosDouble = minLength; - } - if (endPosDouble > laneLength) { - endPosDouble = laneLength; - } - } - if ((startPosDouble < 0) || (startPosDouble > (endPosDouble - minLength))) { - if (!friendlyPos) { - return false; - } - if (startPosDouble < 0) { - startPosDouble = 0; - } - if (startPosDouble > (endPosDouble - minLength)) { - startPosDouble = (endPosDouble - minLength); - } - } - // Modify original positions - startPos = toString(startPosDouble); - endPos = toString(endPosDouble); - } else if (GNEAttributeCarrier::canParse(startPos)) { - // check that endPosition is valid - if (endPos.empty() || !GNEAttributeCarrier::canParse(endPos)) { - // first parse to double only startPos - double startPosDouble = GNEAttributeCarrier::parse(startPos); - // fix both positions - if (minLength > laneLength) { - return false; - } - if (startPosDouble < 0) { - startPosDouble += laneLength; - } - if ((startPosDouble < 0) || startPosDouble > (laneLength - minLength)) { - if (!friendlyPos) { - return false; - } - if (startPosDouble < 0) { - startPosDouble = 0; +void +GNEAdditionalHandler::parseAndBuildPOI(const SUMOSAXAttributes& attrs) { + bool abort = false; + // parse attributes of POIs + std::string POIID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_POI, SUMO_ATTR_ID, abort); + // POIs can be defined using a X,Y position,... + Position pos = attrs.hasAttribute(SUMO_ATTR_X) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_POSITION, abort) : Position::INVALID; + // ... a Lon-Lat,... + double lon = attrs.hasAttribute(SUMO_ATTR_LON) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_LON, abort) : GNEAttributeCarrier::INVALID_POSITION; + double lat = attrs.hasAttribute(SUMO_ATTR_LAT) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_LAT, abort) : GNEAttributeCarrier::INVALID_POSITION; + // .. or as Lane-PosLane + std::string laneID = attrs.hasAttribute(SUMO_ATTR_LANE) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POILANE, SUMO_ATTR_LANE, abort) : ""; + double lanePos = attrs.hasAttribute(SUMO_ATTR_POSITION) ? GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POILANE, SUMO_ATTR_POSITION, abort) : GNEAttributeCarrier::INVALID_POSITION; + double lanePosLat = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POILANE, SUMO_ATTR_POSITION_LAT, abort); + // continue with common parameters + double layer = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_LAYER, abort); + std::string type = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_TYPE, abort); + RGBColor color = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_COLOR, abort); + double angle = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_ANGLE, abort); + std::string imgFile = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_IMGFILE, abort); + bool relativePath = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_RELATIVEPATH, abort); + double width = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_WIDTH, abort); + double height = GNEAttributeCarrier::parseAttributeFromXML(attrs, POIID, SUMO_TAG_POI, SUMO_ATTR_HEIGHT, abort); + // Continue if all parameters were sucesfully loaded + if (!abort) { + // check if img file is absolute + if (imgFile != "" && !FileHelpers::isAbsolute(imgFile)) { + imgFile = FileHelpers::getConfigurationRelative(getFileName(), imgFile); + } + // check if lane exist + if (laneID != "" && !myViewNet->getNet()->retrieveLane(laneID, false)) { + WRITE_WARNING("The lane '" + laneID + "' to use within the PoI '" + POIID + "' is not known."); + return; + } + // check position + bool useGeo = false; + // if position is invalid, then is either a POILane or a GEOPoi + if (pos == Position::INVALID) { + // try computing x,y from lane,pos + if (laneID != "") { + // if LaneID is defined, then is a POILane + pos = getLanePos(POIID, laneID, lanePos, lanePosLat); + } else { + // try computing x,y from lon,lat + if (lat == GNEAttributeCarrier::INVALID_POSITION || lon == GNEAttributeCarrier::INVALID_POSITION) { + WRITE_WARNING("Either (x, y), (lon, lat) or (lane, pos) must be specified for PoI '" + POIID + "'."); + return; + } else if (!GeoConvHelper::getFinal().usingGeoProjection()) { + WRITE_WARNING("(lon, lat) is specified for PoI '" + POIID + "' but no geo-conversion is specified for the network."); + return; } - if (startPosDouble > (laneLength - minLength)) { - startPosDouble = (laneLength - minLength); + // set GEO Position + pos.set(lon, lat); + useGeo = true; + if (!GeoConvHelper::getFinal().x2cartesian_const(pos)) { + WRITE_WARNING("Unable to project coordinates for PoI '" + POIID + "'."); + return; } } - // Modify only start position - startPos = toString(startPosDouble); - } else { - return false; } - } else if (GNEAttributeCarrier::canParse(endPos)) { - // check that endPosition is valid - if (startPos.empty() || !GNEAttributeCarrier::canParse(startPos)) { - // first parse to double only endPos - double endPosDouble = GNEAttributeCarrier::parse(endPos); - // fix both positions - if (minLength > laneLength) { - return false; - } - if (endPosDouble < 0) { - endPosDouble += laneLength; - } - if ((endPosDouble < minLength) || (endPosDouble > laneLength)) { - if (!friendlyPos) { - return false; - } - if (endPosDouble < minLength) { - endPosDouble = minLength; - } - if (endPosDouble > laneLength) { - endPosDouble = laneLength; - } - } - if (0 > (endPosDouble - minLength)) { - if (!friendlyPos) { - return false; - } - } - // Modify only end position - endPos = toString(endPosDouble); + // create POI, or show an error if POI already exists + if (!myShapeContainer.addPOI(POIID, type, color, pos, useGeo, laneID, lanePos, lanePosLat, layer, angle, imgFile, relativePath, width, height, false)) { + WRITE_WARNING("POI with ID '" + POIID + "' already exists."); } else { - return false; + // update myLastParameterised with the last inserted POI + myLastParameterised = myShapeContainer.getPOIs().get(POIID); } } - return true; } -bool GNEAdditionalHandler::checkAndFixDetectorPosition(double& pos, const double laneLength, const bool friendlyPos) { - if ((pos < 0) || (pos > laneLength)) { - if (!friendlyPos) { - return false; - } else if (pos < 0) { - pos = 0; - } else if (pos > laneLength) { - pos = laneLength - 0.01; +void +GNEAdditionalHandler::parseGenericParameter(const SUMOSAXAttributes& attrs) { + // we have two cases: if we're parsing a Shape or we're parsing an Additional + if (getLastParameterised()) { + bool ok = true; + std::string key; + if (attrs.hasAttribute(SUMO_ATTR_KEY)) { + // obtain key + key = attrs.get(SUMO_ATTR_KEY, nullptr, ok); + if (key.empty()) { + WRITE_WARNING("Error parsing key from shape generic parameter. Key cannot be empty"); + ok = false; + } + if (!SUMOXMLDefinitions::isValidTypeID(key)) { + WRITE_WARNING("Error parsing key from shape generic parameter. Key contains invalid characters"); + ok = false; + } + } else { + WRITE_WARNING("Error parsing key from shape generic parameter. Key doesn't exist"); + ok = false; } - } - return true; -} - - -bool GNEAdditionalHandler::fixE2DetectorPosition(double& pos, double& length, const double laneLength, const bool friendlyPos) { - if ((pos < 0) || ((pos + length) > laneLength)) { - if (!friendlyPos) { - return false; - } else if (pos < 0) { - pos = 0; - } else if (pos > laneLength) { - pos = laneLength - 0.01; - length = 0; - } else if ((pos + length) > laneLength) { - length = laneLength - pos - 0.01; + // circumventing empty string test + const std::string val = attrs.hasAttribute(SUMO_ATTR_VALUE) ? attrs.getString(SUMO_ATTR_VALUE) : ""; + if (!SUMOXMLDefinitions::isValidAttribute(val)) { + WRITE_WARNING("Error parsing value from shape generic parameter. Value contains invalid characters"); + ok = false; + } + // set parameter in last inserted additional + if (ok) { + WRITE_DEBUG("Inserting generic parameter '" + key + "|" + val + "' into shape."); + getLastParameterised()->setParameter(key, val); } - } - return true; -} - - -bool -GNEAdditionalHandler::accessCanBeCreated(GNEAdditional* busStopParent, GNEEdge& edge) { - // check that busStopParent is a busStop - assert(busStopParent->getTagProperty().getTag() == SUMO_TAG_BUS_STOP); - // check if exist another acces for the same busStop in the given edge - for (auto i : busStopParent->getAdditionalChilds()) { - for (auto j : edge.getLanes()) { - if (i->getAttribute(SUMO_ATTR_LANE) == j->getID()) { - return false; + } else if (myHierarchyInsertedAdditionals.getLastInsertedAdditional()) { + // first check if given additional supports generic parameters + if (myHierarchyInsertedAdditionals.getLastInsertedAdditional()->getTagProperty().hasGenericParameters()) { + bool ok = true; + std::string key; + if (attrs.hasAttribute(SUMO_ATTR_KEY)) { + // obtain key + key = attrs.get(SUMO_ATTR_KEY, nullptr, ok); + if (key.empty()) { + WRITE_WARNING("Error parsing key from additional generic parameter. Key cannot be empty"); + ok = false; + } + if (!SUMOXMLDefinitions::isValidTypeID(key)) { + WRITE_WARNING("Error parsing key from additional generic parameter. Key contains invalid characters"); + ok = false; + } + } else { + WRITE_WARNING("Error parsing key from additional generic parameter. Key doesn't exist"); + ok = false; } + // circumventing empty string test + const std::string val = attrs.hasAttribute(SUMO_ATTR_VALUE) ? attrs.getString(SUMO_ATTR_VALUE) : ""; + if (!SUMOXMLDefinitions::isValidAttribute(val)) { + WRITE_WARNING("Error parsing value from additional generic parameter. Value contains invalid characters"); + ok = false; + } + // set parameter in last inserted additional + if (ok) { + WRITE_DEBUG("Inserting generic parameter '" + key + "|" + val + "' into additional " + myHierarchyInsertedAdditionals.getLastInsertedAdditional()->getTagStr() + "."); + myHierarchyInsertedAdditionals.getLastInsertedAdditional()->setParameter(key, val); + } + } else { + WRITE_WARNING("Additionals of type '" + myHierarchyInsertedAdditionals.getLastInsertedAdditional()->getTagStr() + "' doesn't support Generic Parameters"); } + } else { + WRITE_WARNING("Generic Parameters has to be declared within the definition of an additional or a shape element"); } - return true; -} - - -bool -GNEAdditionalHandler::checkOverlappingRerouterIntervals(GNEAdditional* rerouter, double newBegin, double newEnd) { - // check that rerouter is correct - assert(rerouter->getTagProperty().getTag() == SUMO_TAG_REROUTER); - // declare a vector to keep sorted rerouter childs - std::vector> sortedIntervals; - // iterate over additional childs - for (auto i : rerouter->getAdditionalChilds()) { - sortedIntervals.push_back(std::make_pair(0., 0.)); - // set begin and end - sortedIntervals.back().first = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_BEGIN)); - sortedIntervals.back().second = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_END)); - } - // add new intervals - sortedIntervals.push_back(std::make_pair(newBegin, newEnd)); - // sort childs - std::sort(sortedIntervals.begin(), sortedIntervals.end()); - // check overlapping after sorting - for (int i = 0; i < (int)sortedIntervals.size() - 1; i++) { - if (sortedIntervals.at(i).second > sortedIntervals.at(i + 1).first) { - return false; - } - } - return true; } +// =========================================================================== +// GNEAdditionalHandler::HierarchyInsertedAdditionals method definitions +// =========================================================================== void GNEAdditionalHandler::HierarchyInsertedAdditionals::insertElement(SumoXMLTag tag) { @@ -2555,7 +2507,7 @@ WRITE_WARNING("A " + toString(myInsertedElements.back().first) + " must be declared within the definition of a " + toString(expectedTag) + "."); return nullptr; } else { - if(myInsertedElements.size() < 2) { + if (myInsertedElements.size() < 2) { // additional was hierarchically bad loaded, then return nullptr return nullptr; } else if ((myInsertedElements.end() - 2)->second == nullptr) { @@ -2579,7 +2531,7 @@ } -GNEAdditional* +GNEAdditional* GNEAdditionalHandler::HierarchyInsertedAdditionals::getLastInsertedAdditional() const { // ierate in reverse mode over myInsertedElements to obtain last inserted additional for (std::vector >::const_reverse_iterator i = myInsertedElements.rbegin(); i != myInsertedElements.rend(); i++) { diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEAdditionalHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -12,7 +12,7 @@ /// @date Nov 2015 /// @version $Id$ /// -// Builds trigger objects for netedit +// Builds additional objects for netedit /****************************************************************************/ #ifndef GNEAdditionalHandler_h #define GNEAdditionalHandler_h @@ -23,10 +23,10 @@ #include -#include -#include #include +#include #include +#include // =========================================================================== @@ -37,22 +37,47 @@ class GNEEdge; class GNELane; class GNEAdditional; +class GNEDemandElement; // =========================================================================== // class definitions // =========================================================================== /// @class GNEAdditionalHandler -/// @brief Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..) -class GNEAdditionalHandler : public SUMOSAXHandler { +/// @brief Builds additional objects for GNENet (busStops, chargingStations, detectors, etc..) +class GNEAdditionalHandler : public ShapeHandler { public: + + /// @brief Stack used to save the last inserted element + struct HierarchyInsertedAdditionals { + + /// @brief insert new element (called only in function myStartElement) + void insertElement(SumoXMLTag tag); + + /// @brief commit element insertion (used to save last correct created element) + void commitElementInsertion(GNEAdditional* additionalCreated); + + /// @brief pop last inserted element (used only in function myEndElement) + void popElement(); + + /// @brief retrieve additional parent correspond to current status of myInsertedElements + GNEAdditional* retrieveAdditionalParent(GNEViewNet* viewNet, SumoXMLTag expectedTag) const; + + /// @brief return last additional inserted + GNEAdditional* getLastInsertedAdditional() const; + + private: + /// @brief vector used as stack + std::vector > myInsertedElements; + }; + /// @brief Constructor GNEAdditionalHandler(const std::string& file, GNEViewNet* viewNet, bool undoAdditionals = true, GNEAdditional* additionalParent = nullptr); /// @brief Destructor ~GNEAdditionalHandler(); - /// @name inherited from GenericSAXHandler + /// @name inherited from ShapeHandler /// @{ /**@brief Called on the opening of a tag; * @param[in] element ID of the currently opened element @@ -69,218 +94,27 @@ */ void myEndElement(int element); - /// @} - - /// @name parsing methods - /// - /// These methods parse the attributes for each of the described trigger - /// and call the according methods to build the trigger - /// @{ - /**@brief Builds a Vaporizer - * @param[in] attrs SAX-attributes which define the vaporizer - * @param[in] tag of the additional - * @note recheck throwing the exception - */ - void parseAndBuildVaporizer(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Builds a TAZ - * @param[in] attrs SAX-attributes which define the vaporizer - * @param[in] tag of the additional - * @note recheck throwing the exception - */ - void parseAndBuildTAZ(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Builds a TAZ Source - * @param[in] attrs SAX-attributes which define the vaporizer - * @param[in] tag of the additional - * @note recheck throwing the exception - */ - void parseAndBuildTAZSource(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Builds a TAZ Sink - * @param[in] attrs SAX-attributes which define the vaporizer - * @param[in] tag of the additional - * @note recheck throwing the exception + /**@brief get lane position + * @param[in] poi poi ID + * @param[in] laneID lane ID + * @param[in] SlanePos position in the lane */ - void parseAndBuildTAZSink(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Variable Speed Signal (lane speed trigger) - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - * @see buildLaneSpeedTrigger - */ - void parseAndBuildVariableSpeedSign(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Variable Speed Signal Step - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - * @see buildLaneSpeedTrigger - */ - void parseAndBuildVariableSpeedSignStep(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a rerouter - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRerouter(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Rerouter Interval - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRerouterInterval(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Closing Lane reroute - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRerouterClosingLaneReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Closing Reroute - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRerouterClosingReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Destiny Prob Reroute - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRerouterDestProbReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a parkingAreaReroute - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRerouterParkingAreaReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Route Prob Reroute - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRerouterRouteProbReroute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a bus stop - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildBusStop(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses values and adds access to the current bus stop - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildAccess(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a container stop - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildContainerStop(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a charging station - * @param[in] attrs SAXattributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildChargingStation(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a parking area - * @param[in] attrs SAXattributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildParkingArea(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a parking space - * @param[in] attrs SAXattributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildParkingSpace(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a mesoscopic or microscopic calibrator - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildCalibrator(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a induction loop detector (E1) - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildDetectorE1(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a lane area detector (E2) - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildDetectorE2(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a multi entry exit detector (E3) - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildDetectorE3(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Entry detector - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildDetectorEntry(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Exit detector - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildDetectorExit(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds a Instant induction loop detector (E1Instant) - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildDetectorE1Instant(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses his values and builds routeProbe - * @param[in] attrs SAX-attributes which define the trigger - * @param[in] tag of the additional - */ - void parseAndBuildRouteProbe(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses route values of Calibrators - * @param[in] attrs SAX-attributes which define the routes - * @param[in] tag of the additional - */ - void parseAndBuildCalibratorRoute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses vehicle type values of Calibrators - * @param[in] attrs SAX-attributes which define the vehicle types - * @param[in] tag of the additional - */ - void parseAndBuildCalibratorVehicleType(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parses flow values of Calibrators - * @param[in] attrs SAX-attributes which define the flows - * @param[in] tag of the additional - */ - void parseAndBuildCalibratorFlow(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag); - - /**@brief Parse generic parameter and insert it in the last created additional - * @param[in] attrs SAX-attributes which define the generic parameter - */ - void parseGenericParameter(const SUMOSAXAttributes& attrs); - + Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat); /// @} /// @name building methods /// - /// Called with parsed values, these methods build the trigger. + /// Called with parsed values, these methods build the additional. /// @{ /**@brief Build additionals * @param[in] viewNet pointer to viewNet in wich additional will be created * @param[in] allowUndoRedo enable or disable remove created additional with ctrl + Z / ctrl + Y * @param[in] tag tag of the additiona lto create - * @param[in] values map with the attributes and values of the additional to create + * @param[in] attrs SUMOSAXAttributes with attributes + * @param[in] HierarchyInsertedAdditionals pointer to HierarchyInsertedAdditionals (can be null) * @return true if was sucesfully created, false in other case */ - static GNEAdditional* buildAdditional(GNEViewNet* viewNet, bool allowUndoRedo, SumoXMLTag tag, std::map values); + static bool buildAdditional(GNEViewNet* viewNet, bool allowUndoRedo, SumoXMLTag tag, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); /**@brief Builds a bus stop * @param[in] viewNet viewNet in which element will be inserted @@ -296,7 +130,7 @@ * @return true if was sucesfully created, false in other case * @exception InvalidArgument If the bus stop can not be added to the net (is duplicate) */ - static GNEAdditional* buildBusStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, bool friendlyPosition, bool blockMovement); + static GNEAdditional* buildBusStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, int personCapacity, bool friendlyPosition, bool blockMovement); /**@brief Builds an Access * @param[in] viewNet viewNet in which element will be inserted @@ -421,7 +255,7 @@ * @exception InvalidArgument If the detector can not be added to the net (is duplicate) */ static GNEAdditional* buildSingleLaneDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double length, double freq, const std::string& filename, - const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); + const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); /**@brief Builds a multi-lane Area Detector (E2) * @param[in] viewNet viewNet in which element will be inserted @@ -442,8 +276,8 @@ * @return true if was sucesfully created, false in other case * @exception InvalidArgument If the detector can not be added to the net (is duplicate) */ - static GNEAdditional* buildMultiLaneDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, const std::vector &lanes, double pos, double endPos, double freq, const std::string& filename, - const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); + static GNEAdditional* buildMultiLaneDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, const std::vector& lanes, double pos, double endPos, double freq, const std::string& filename, + const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); /**@brief Builds a multi entry exit detector (E3) * @param[in] viewNet viewNet in which element will be inserted @@ -535,25 +369,32 @@ */ static GNEAdditional* buildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, double pos, const std::string& name, const std::string& outfile, double freq, const std::string& routeprobe); - /** - DOCUMENTAR - */ - static GNEAdditional* buildCalibratorRoute(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& routeID, const std::vector& edges, const RGBColor& color); - - /** - DOCUMENTAR - */ - static GNEAdditional* buildVehicleType(GNEViewNet* viewNet, bool allowUndoRedo, std::string vehicleTypeID, - double accel, double decel, double sigma, double tau, double length, double minGap, double maxSpeed, - double speedFactor, double speedDev, const RGBColor& color, SUMOVehicleClass vClass, const std::string& emissionClass, - SUMOVehicleShape shape, double width, const std::string& filename, double impatience, const std::string& laneChangeModel, - const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration, - double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat); - - /** - DOCUMENTAR + /**@brief builds a calibrator flow + * @param[in] viewNet viewNet in which element will be inserted + * @param[in] allowUndoRedo enable or disable remove created additional with ctrl + Z / ctrl + Y + * @param[in] type The id of the vehicle's flow type to use for this vehicle's flow. + * @param[in] route The id of the route the vehicle's flow shall drive along + * @param[in] vehsPerHour number of vehicles per hour, equally spaced (not together with period or probability) + * @param[in] speed The speed with which the vehicles shall enter the network. NOTE: this attribute is exclusive of CalibratorFlows! + * @param[in] color This vehicle's flow's color + * @param[in] departLane The lane on which the vehicle's flow shall be inserted; see #departLane. default: "first" + * @param[in] departPos The position at which the vehicle's flow shall enter the net; see #departPos. default: "base" + * @param[in] departSpeed The speed with which the vehicle's flow shall enter the network; see #departSpeed. default: 0 + * @param[in] arrivalLane The lane at which the vehicle's flow shall leave the network; see #arrivalLane. default: "current" + * @param[in] arrivalPos The position at which the vehicle's flow shall leave the network; see #arrivalPos. default: "max" + * @param[in] arrivalSpeed The speed with which the vehicle's flow shall leave the network; see #arrivalSpeed. default: "current" + * @param[in] line A string specifying the id of a public transport line which can be used when specifying person rides + * @param[in] personNumber The number of occupied seats when the vehicle's flow is inserted. default: 0 + * @param[in] containerNumber The number of occupied container places when the vehicle's flow is inserted. default: 0 + * @param[in] reroute List of intermediate edges that shall be passed on rerouting. + * @param[in] via List of intermediate edges that shall be passed on rerouting. + * @param[in] departPosLat The lateral position on the departure lane at which the vehicle's flow shall enter the net; see Simulation/SublaneModel. default: "center" + * @param[in] arrivalPosLat The lateral position on the arrival lane at which the vehicle's flow shall arrive; see Simulation/SublaneModel. by default the vehicle's flow does not care about lateral arrival position + * @param[in] begin first vehicle's flow departure time + * @param[in] end end of departure interval (if undefined, defaults to 24 hours) + * @return true if was sucesfully created, false in other case */ - static GNEAdditional* buildCalibratorFlow(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* calibratorParent, GNEAdditional* route, GNEAdditional* vtype, + static GNEAdditional* buildCalibratorFlow(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* calibratorParent, GNEDemandElement* route, GNEDemandElement* vType, const std::string& vehsPerHour, const std::string& speed, const RGBColor& color, const std::string& departLane, const std::string& departPos, const std::string& departSpeed, const std::string& arrivalLane, const std::string& arrivalPos, const std::string& arrivalSpeed, const std::string& line, int personNumber, int containerNumber, bool reroute, const std::string& departPosLat, @@ -622,11 +463,11 @@ */ static GNEAdditional* buildRouteProbe(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, const std::string& freq, const std::string& name, const std::string& file, double begin); - /**@brief Builds a VariableSpeedSign (lane speed trigger) + /**@brief Builds a VariableSpeedSign (lane speed additional) * @param[in] viewNet viewNet in which element will be inserted * @param[in] allowUndoRedo enable or disable remove created additional with ctrl + Z / ctrl + Y - * @param[in] id The id of the lane speed trigger - * @param[in] destLanes List of lanes affected by this speed trigger + * @param[in] id The id of the lane speed additional + * @param[in] destLanes List of lanes affected by this speed additional * @param[in] name Calibrator name * @param[in] blockMovemet enable or disable block movement * @return true if was sucesfully created, false in other case @@ -645,7 +486,7 @@ */ static GNEAdditional* buildVariableSpeedSignStep(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* VSSParent, double time, double speed); - /**@brief Builds a vaporizer (lane speed trigger) + /**@brief Builds a vaporizer (lane speed additional) * @param[in] viewNet viewNet in which element will be inserted * @param[in] allowUndoRedo enable or disable remove created additional with ctrl + Z / ctrl + Y * @param[in] edge edge in which this vaporizer is placed @@ -662,12 +503,12 @@ * @param[in] allowUndoRedo enable or disable remove created additional with ctrl + Z / ctrl + Y * @param[in] id TAZ ID * @param[in] shape TAZ shape - * @param[in] edges list of edges (note: This will create GNETAZSources/Sinks with default values) + * @param[in] edges list of edges (note: This will create GNETAZSourceSinks/Sinks with default values) * @param[in] blockMovemet enable or disable block movement * @return true if was sucesfully created, false in other case * @exception ProcessError If the XML definition file is errornous */ - static GNEAdditional* buildTAZ(GNEViewNet* viewNet, bool allowUndoRedo, const std::string &id, const PositionVector &shape, const RGBColor &color, const std::vector &edges, bool blockMovement); + static GNEAdditional* buildTAZ(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, const PositionVector& shape, const RGBColor& color, const std::vector& edges, bool blockMovement); /**@brief Builds a TAZSource (Traffic Assignment Zone) * @param[in] viewNet viewNet in which element will be inserted @@ -678,7 +519,7 @@ * @return true if was sucesfully created, false in other case * @exception ProcessError If the XML definition file is errornous */ - static GNEAdditional* buildTAZSource(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge, double departWeight); + static GNEAdditional* buildTAZSource(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* TAZ, GNEEdge* edge, double departWeight); /**@brief Builds a TAZSink (Traffic Assignment Zone) * @param[in] viewNet viewNet in which element will be inserted @@ -689,15 +530,7 @@ * @return true if was sucesfully created, false in other case * @exception ProcessError If the XML definition file is errornous */ - static GNEAdditional* buildTAZSink(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge,double arrivalWeight); - - /**@brief Helper method to obtain the filename - * @param[in] attrs The attributes to obtain the file name from - * @param[in] base The base path (the path the loaded additional file lies in) - * @return The (expanded) path to the named file - * @todo Recheck usage of the helper class - */ - std::string getFileName(const SUMOSAXAttributes& attrs, const std::string& base, const bool allowEmpty = false); + static GNEAdditional* buildTAZSink(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* TAZ, GNEEdge* edge, double arrivalWeight); /**@brief extracts the position, checks whether it shall be mirrored and checks whether it is within the lane. * @param[in] pos position of additional over lane @@ -708,16 +541,6 @@ */ double getPosition(double pos, GNELane& lane, bool friendlyPos, const std::string& additionalID); - /**@brief check if the position of an stoppingPlace over a lane is valid - * @param[in] startPos Start position of stoppingPlace - * @param[in] endPos End position of stoppingPlace - * @param[in] laneLength Length of the lane - * @param[in] minLength Min length of the stoppingPlace - * @param[in] friendlyPos Attribute of stoppingPlace - * @return true if the stoppingPlace position is valid, false in otherweise - */ - static bool fixStoppinPlacePosition(std::string& startPos, std::string& endPos, const double laneLength, const double minLength, const bool friendlyPos); - /**@brief check if the position of a detector over a lane is valid * @param[in] pos pos position of detector * @param[in] laneLength Length of the lane @@ -741,29 +564,171 @@ /// @brief check if an overlapping is produced in rerouter if a interval with certain begin and end is inserted static bool checkOverlappingRerouterIntervals(GNEAdditional* rerouter, double newBegin, double newEnd); -private: - /// @brief Stack used to save the last inserted element - struct HierarchyInsertedAdditionals { +protected: + /// @name parsing methods + /// + /// These methods parse the attributes for each of the described additional + /// and call the according methods to build the additional + /// @{ + /**@brief Builds a Vaporizer + * @param[in] attrs SAX-attributes which define the vaporizer + */ + static bool parseAndBuildVaporizer(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); - /// @brief insert new element (called only in function myStartElement) - void insertElement(SumoXMLTag tag); + /**@brief Builds a TAZ + * @param[in] attrs SAX-attributes which define the vaporizer + */ + static bool parseAndBuildTAZ(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); - /// @brief commit element insertion (used to save last correct created element) - void commitElementInsertion(GNEAdditional* additionalCreated); + /**@brief Builds a TAZ Source + * @param[in] attrs SAX-attributes which define the vaporizer + */ + static bool parseAndBuildTAZSource(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); - /// @brief pop last inserted element (used only in function myEndElement) - void popElement(); + /**@brief Builds a TAZ Sink + * @param[in] attrs SAX-attributes which define the vaporizer + */ + static bool parseAndBuildTAZSink(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); - /// @brief retrieve additional parent correspond to current status of myInsertedElements - GNEAdditional* retrieveAdditionalParent(GNEViewNet* viewNet, SumoXMLTag expectedTag) const; + /**@brief Parses his values and builds a Variable Speed Signal (GNEViewNet* viewNet, bool allowUndoRedo, lane speed additional) + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildVariableSpeedSign(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); - /// @brief return last additional inserted - GNEAdditional* getLastInsertedAdditional() const; + /**@brief Parses his values and builds a Variable Speed Signal Step + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildVariableSpeedSignStep(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); - private: - /// @brief vector used as stack - std::vector > myInsertedElements; - }; + /**@brief Parses his values and builds a rerouter + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRerouter(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Rerouter Interval + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRerouterInterval(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Closing Lane reroute + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRerouterClosingLaneReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Closing Reroute + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRerouterClosingReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Destiny Prob Reroute + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRerouterDestProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a parkingAreaReroute + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRerouterParkingAreaReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Route Prob Reroute + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRerouterRouteProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a bus stop + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildBusStop(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses values and adds access to the current bus stop + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildAccess(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a container stop + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildContainerStop(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a charging station + * @param[in] attrs SAXattributes which define the additional + */ + static bool parseAndBuildChargingStation(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a parking area + * @param[in] attrs SAXattributes which define the additional + */ + static bool parseAndBuildParkingArea(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a parking space + * @param[in] attrs SAXattributes which define the additional + * @param[in] tag of the additional + */ + static bool parseAndBuildParkingSpace(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a mesoscopic or microscopic calibrator + * @param[in] attrs SAX-attributes which define the additional + * @param[in] tag of the additional + */ + static bool parseAndBuildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a induction loop detector (GNEViewNet* viewNet, bool allowUndoRedo, E1) + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildDetectorE1(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a lane area detector (GNEViewNet* viewNet, bool allowUndoRedo, E2) + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a multi entry exit detector (GNEViewNet* viewNet, bool allowUndoRedo, E3) + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildDetectorE3(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Entry detector + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildDetectorEntry(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Exit detector + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildDetectorExit(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds a Instant induction loop detector (GNEViewNet* viewNet, bool allowUndoRedo, E1Instant) + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildDetectorE1Instant(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses his values and builds routeProbe + * @param[in] attrs SAX-attributes which define the additional + */ + static bool parseAndBuildRouteProbe(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /**@brief Parses flow values of Calibrators + * @param[in] attrs SAX-attributes which define the flows + */ + static bool parseAndBuildCalibratorFlow(GNEViewNet* viewNet, bool allowUndoRedo, const SUMOSAXAttributes& attrs, HierarchyInsertedAdditionals* insertedAdditionals); + + /// @} + +private: + /**@brief Parses his values and builds a Poly + * @param[in] attrs SAX-attributes which define the Poly + */ + void parseAndBuildPoly(const SUMOSAXAttributes& attrs); + + /**@brief Parses his values and builds a POI + * @param[in] attrs SAX-attributes which define the shape + */ + void parseAndBuildPOI(const SUMOSAXAttributes& attrs); + + /**@brief Parse generic parameter and insert it in the last created additional + * @param[in] attrs SAX-attributes which define the generic parameter + */ + void parseGenericParameter(const SUMOSAXAttributes& attrs); /// @brief pointer to View's Net GNEViewNet* myViewNet; @@ -776,6 +741,12 @@ /// @brief HierarchyInsertedAdditionals used for insert childs HierarchyInsertedAdditionals myHierarchyInsertedAdditionals; + + /// @brief invalidate copy constructor + GNEAdditionalHandler(const GNEAdditionalHandler& s) = delete; + + /// @brief invalidate assignment operator + GNEAdditionalHandler& operator=(const GNEAdditionalHandler& s) = delete; }; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEBusStop.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEBusStop.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEBusStop.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEBusStop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -33,14 +34,16 @@ #include "GNEBusStop.h" #include "GNEAccess.h" +#include "GNEAdditionalHandler.h" // =========================================================================== // method definitions // =========================================================================== -GNEBusStop::GNEBusStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, bool friendlyPosition, bool blockMovement) : +GNEBusStop::GNEBusStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, int personCapacity, bool friendlyPosition, bool blockMovement) : GNEStoppingPlace(id, viewNet, GLO_BUS_STOP, SUMO_TAG_BUS_STOP, lane, startPos, endPos, name, friendlyPosition, blockMovement), - myLines(lines) { + myLines(lines), + myPersonCapacity(personCapacity) { } @@ -58,7 +61,7 @@ double offsetSign = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1; // Update common geometry of stopping place - setStoppingPlaceGeometry(myLane->getParentEdge().getNBEdge()->getLaneWidth(myLane->getIndex()) / 2); + setStoppingPlaceGeometry(getLaneParents().front()->getParentEdge().getNBEdge()->getLaneWidth(getLaneParents().front()->getIndex()) / 2); // Obtain a copy of the shape PositionVector tmpShape = myGeometry.shape; @@ -73,7 +76,12 @@ myBlockIcon.position = myGeometry.shape.getLineCenter(); // Set block icon rotation, and using their rotation for sign - myBlockIcon.setRotation(myLane); + myBlockIcon.setRotation(getLaneParents().front()); + + // update demand element childs (GNEStops) + for (const auto& i : getDemandElementChilds()) { + i->updateGeometry(updateGrid); + } // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -95,7 +103,7 @@ // Start with the drawing of the area traslating matrix to origin glTranslated(0, 0, getType()); // Set color of the base - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_busStop); @@ -121,7 +129,7 @@ } } else if (s.scale * exaggeration >= 10) { // draw lines between BusStops and Acces - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { GLHelper::drawBoxLine(i->getShape()[0], RAD2DEG(mySignPos.angleTo2D(i->getShape()[0])) - 90, mySignPos.distanceTo2D(i->getShape()[0]), .05); } // Add a draw matrix for details @@ -134,7 +142,7 @@ glTranslated(mySignPos.x(), mySignPos.y(), 0); glRotated(-1 * myBlockIcon.rotation, 0, 0, 1); // draw line with a color depending of the selection status - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText(myLines[i].c_str(), Position(1.2, (double)i), .1, 1.f, s.selectionColor, 0, FONS_ALIGN_LEFT); } else { GLHelper::drawText(myLines[i].c_str(), Position(1.2, (double)i), .1, 1.f, s.SUMO_color_busStop, 0, FONS_ALIGN_LEFT); @@ -147,7 +155,7 @@ // scale matrix depending of the exaggeration glScaled(exaggeration, exaggeration, 1); // Set color of the externe circle - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_busStop); @@ -157,7 +165,7 @@ // Traslate to front glTranslated(0, 0, .1); // Set color of the interne circle - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(s.SUMO_color_busStop_sign); @@ -166,7 +174,7 @@ GLHelper::drawFilledCircle(myCircleInWidth, circleResolution); // If the scale * exageration is equal or more than 4.5, draw H if (s.scale * exaggeration >= 4.5) { - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("H", Position(), .1, myCircleInText, s.selectedAdditionalColor, myBlockIcon.rotation); } else { GLHelper::drawText("H", Position(), .1, myCircleInText, s.SUMO_color_busStop, myBlockIcon.rotation); @@ -199,7 +207,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_STARTPOS: return toString(myStartPosition); case SUMO_ATTR_ENDPOS: @@ -210,6 +218,8 @@ return toString(myFriendlyPosition); case SUMO_ATTR_LINES: return joinToString(myLines, " "); + case SUMO_ATTR_PERSON_CAPACITY: + return toString(myPersonCapacity); case GNE_ATTR_BLOCK_MOVEMENT: return toString(myBlockMovement); case GNE_ATTR_SELECTED: @@ -230,10 +240,10 @@ switch (key) { case SUMO_ATTR_ID: { // change ID of BusStop - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); // Change Ids of all Acces childs - for (auto i : myAdditionalChilds) { - i->setAttribute(SUMO_ATTR_ID, generateAdditionalChildID(SUMO_TAG_ACCESS), undoList); + for (auto i : getAdditionalChilds()) { + i->setAttribute(SUMO_ATTR_ID, generateChildID(SUMO_TAG_ACCESS), undoList); } break; } @@ -243,10 +253,11 @@ case SUMO_ATTR_NAME: case SUMO_ATTR_FRIENDLY_POS: case SUMO_ATTR_LINES: + case SUMO_ATTR_PERSON_CAPACITY: case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -268,32 +279,18 @@ case SUMO_ATTR_STARTPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(value, myEndPosition, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myEndPosition)) { - // Check that new start Position is smaller that end position - return (parse(value) < parse(myEndPosition)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_ENDPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(myStartPosition, value, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myStartPosition)) { - // Check that new start Position is smaller that end position - return (parse(myStartPosition) < parse(value)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_NAME: return SUMOXMLDefinitions::isValidAttribute(value); @@ -301,6 +298,8 @@ return canParse(value); case SUMO_ATTR_LINES: return canParse >(value); + case SUMO_ATTR_PERSON_CAPACITY: + return canParse(value) && (parse(value) > 0 || parse(value) == -1); case GNE_ATTR_BLOCK_MOVEMENT: return canParse(value); case GNE_ATTR_SELECTED: @@ -323,7 +322,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_STARTPOS: myStartPosition = value; @@ -340,6 +339,9 @@ case SUMO_ATTR_LINES: myLines = GNEAttributeCarrier::parse >(value); break; + case SUMO_ATTR_PERSON_CAPACITY: + myPersonCapacity = GNEAttributeCarrier::parse(value); + break; case GNE_ATTR_BLOCK_MOVEMENT: myBlockMovement = parse(value); break; @@ -356,8 +358,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEBusStop.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEBusStop.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEBusStop.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEBusStop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -46,7 +46,7 @@ * @param[in] friendlyPos enable or disable friendly position * @param[in] block movement enable or disable additional movement */ - GNEBusStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, bool friendlyPosition, bool blockMovement); + GNEBusStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector& lines, int personCapacity, bool friendlyPosition, bool blockMovement); /// @brief Destructor ~GNEBusStop(); @@ -93,6 +93,9 @@ /// @brief The list of lines that are assigned to this stop std::vector myLines; + /// @brief maximum number of persons that can wait at this stop + int myPersonCapacity; + private: /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibrator.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibrator.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibrator.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibrator.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,24 +37,22 @@ // =========================================================================== GNECalibrator::GNECalibrator(const std::string& id, GNEViewNet* viewNet, GNEEdge* edge, double pos, double frequency, const std::string& name, const std::string& output, const std::string& routeprobe) : - GNEAdditional(id, viewNet, GLO_CALIBRATOR, SUMO_TAG_CALIBRATOR, name, false), - myEdge(edge), - myLane(nullptr), - myPositionOverLane(pos), - myFrequency(frequency), - myOutput(output), - myRouteProbe(routeprobe) { + GNEAdditional(id, viewNet, GLO_CALIBRATOR, SUMO_TAG_CALIBRATOR, name, false, { + edge +}, {}, {}, {}, {}, {}, {}, {}, {}, {}), +myPositionOverLane(pos), +myFrequency(frequency), +myOutput(output), +myRouteProbe(routeprobe) { } GNECalibrator::GNECalibrator(const std::string& id, GNEViewNet* viewNet, GNELane* lane, double pos, double frequency, const std::string& name, const std::string& output, const std::string& routeprobe) : - GNEAdditional(id, viewNet, GLO_CALIBRATOR, SUMO_TAG_LANECALIBRATOR, name, false), - myEdge(nullptr), - myLane(lane), - myPositionOverLane(pos), - myFrequency(frequency), - myOutput(output), - myRouteProbe(routeprobe) { + GNEAdditional(id, viewNet, GLO_CALIBRATOR, SUMO_TAG_LANECALIBRATOR, name, false, {}, {lane}, {}, {}, {}, {}, {}, {}, {}, {}), +myPositionOverLane(pos), +myFrequency(frequency), +myOutput(output), +myRouteProbe(routeprobe) { } @@ -84,17 +82,17 @@ myGeometry.clearGeometry(); // get shape depending of we have a edge or a lane - if (myLane) { + if (getLaneParents().size() > 0) { // Get shape of lane parent - myGeometry.shape.push_back(myLane->getShape().positionAtOffset(myPositionOverLane)); + myGeometry.shape.push_back(getLaneParents().front()->getShape().positionAtOffset(myPositionOverLane)); // Save rotation (angle) of the vector constructed by points f and s - myGeometry.shapeRotations.push_back(myLane->getShape().rotationDegreeAtOffset(myPositionOverLane) * -1); - } else if (myEdge) { - for (auto i : myEdge->getLanes()) { + myGeometry.shapeRotations.push_back(getLaneParents().front()->getShape().rotationDegreeAtOffset(myPositionOverLane) * -1); + } else if (getEdgeParents().size() > 0) { + for (auto i : getEdgeParents().front()->getLanes()) { // Get shape of lane parent myGeometry.shape.push_back(i->getShape().positionAtOffset(myPositionOverLane)); // Save rotation (angle) of the vector constructed by points f and s - myGeometry.shapeRotations.push_back(myEdge->getLanes().at(0)->getShape().rotationDegreeAtOffset(myPositionOverLane) * -1); + myGeometry.shapeRotations.push_back(getEdgeParents().front()->getLanes().at(0)->getShape().rotationDegreeAtOffset(myPositionOverLane) * -1); } } else { throw ProcessError("Both myEdge and myLane aren't defined"); @@ -109,7 +107,7 @@ Position GNECalibrator::getPositionInView() const { - PositionVector shape = myLane ? myLane->getShape() : myEdge->getLanes().at(0)->getShape(); + PositionVector shape = (getLaneParents().size() > 0) ? getLaneParents().front()->getShape() : getEdgeParents().front()->getLanes().at(0)->getShape(); if (myPositionOverLane < 0) { return shape.front(); } else if (myPositionOverLane > shape.length()) { @@ -123,10 +121,10 @@ std::string GNECalibrator::getParentName() const { // get parent name depending of we have a edge or a lane - if (myLane) { - return myLane->getMicrosimID(); - } else if (myEdge) { - return myEdge->getLanes().at(0)->getMicrosimID(); + if (getLaneParents().size() > 0) { + return getLaneParents().front()->getMicrosimID(); + } else if (getEdgeParents().size() > 0) { + return getEdgeParents().front()->getLanes().at(0)->getMicrosimID(); } else { throw ProcessError("Both myEdge and myLane aren't defined"); } @@ -151,7 +149,7 @@ glScaled(exaggeration, exaggeration, 1); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(RGBColor(255, 204, 0)); @@ -169,13 +167,13 @@ // draw text if isn't being drawn for selecting if ((s.scale * exaggeration >= 1.) && !s.drawForSelecting) { // set color depending of selection status - RGBColor textColor = isAttributeCarrierSelected() ? s.selectionColor : RGBColor::BLACK; + RGBColor textColor = drawUsingSelectColor() ? s.selectionColor : RGBColor::BLACK; // draw "C" GLHelper::drawText("C", Position(0, 1.5), 0.1, 3, textColor, 180); // draw "edge" or "lane " - if (myLane) { + if (getLaneParents().size() > 0) { GLHelper::drawText("lane", Position(0, 3), .1, 1, textColor, 180); - } else if (myEdge) { + } else if (getEdgeParents().size() > 0) { GLHelper::drawText("edge", Position(0, 3), .1, 1, textColor, 180); } else { throw ProcessError("Both myEdge and myLane aren't defined"); @@ -208,9 +206,9 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_EDGE: - return myEdge->getID(); + return getEdgeParents().front()->getID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_POSITION: return toString(myPositionOverLane); case SUMO_ATTR_FREQUENCY: @@ -247,7 +245,7 @@ case SUMO_ATTR_ROUTEPROBE: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -277,7 +275,7 @@ if (canParse(value)) { // obtain position and check if is valid double newPosition = parse(value); - PositionVector shape = myLane ? myLane->getShape() : myEdge->getLanes().at(0)->getShape(); + PositionVector shape = (getLaneParents().size() > 0) ? getLaneParents().front()->getShape() : getEdgeParents().front()->getLanes().at(0)->getShape(); if ((newPosition < 0) || (newPosition > shape.length())) { return false; } else { @@ -326,10 +324,10 @@ changeAdditionalID(value); break; case SUMO_ATTR_EDGE: - myEdge = changeEdge(myEdge, value); + changeEdgeParents(this, value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_POSITION: myPositionOverLane = parse(value); @@ -359,8 +357,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,6 +23,7 @@ #include #include #include +#include #include "GNECalibratorFlow.h" @@ -33,38 +34,40 @@ GNECalibratorFlow::GNECalibratorFlow(GNEAdditional* calibratorParent) : - GNEAdditional(calibratorParent, calibratorParent->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_FLOW, "", false), - myVehicleType(calibratorParent->getViewNet()->getNet()->retrieveAdditional(SUMO_TAG_VTYPE, DEFAULT_VTYPE_ID)), - myRoute(calibratorParent->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE).begin()->second) { + GNEAdditional(calibratorParent, calibratorParent->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CALIBRATORFLOW, "", false, +{}, {}, {}, {calibratorParent}, {}, {}, {}, {}, {}, {}), +myVehicleType(calibratorParent->getViewNet()->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, DEFAULT_VTYPE_ID)), +myRoute(calibratorParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).begin()->second) { // fill calibrator flows with default values setDefaultValues(); } -GNECalibratorFlow::GNECalibratorFlow(GNEAdditional* calibratorParent, GNEAdditional* vehicleType, GNEAdditional* route, const std::string& vehsPerHour, const std::string& speed, +GNECalibratorFlow::GNECalibratorFlow(GNEAdditional* calibratorParent, GNEDemandElement* vehicleType, GNEDemandElement* route, const std::string& vehsPerHour, const std::string& speed, const RGBColor& color, const std::string& departLane, const std::string& departPos, const std::string& departSpeed, const std::string& arrivalLane, const std::string& arrivalPos, const std::string& arrivalSpeed, const std::string& line, int personNumber, int containerNumber, bool reroute, const std::string& departPosLat, const std::string& arrivalPosLat, double begin, double end) : - GNEAdditional(calibratorParent, calibratorParent->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_FLOW, "", false), - myVehicleType(vehicleType), - myRoute(route), - myVehsPerHour(vehsPerHour), - mySpeed(speed), - myColor(color), - myDepartLane(departLane), - myDepartPos(departPos), - myDepartSpeed(departSpeed), - myArrivalLane(arrivalLane), - myArrivalPos(arrivalPos), - myArrivalSpeed(arrivalSpeed), - myLine(line), - myPersonNumber(personNumber), - myContainerNumber(containerNumber), - myReroute(reroute), - myDepartPosLat(departPosLat), - myArrivalPosLat(arrivalPosLat), - myBegin(begin), - myEnd(end) { + GNEAdditional(calibratorParent, calibratorParent->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CALIBRATORFLOW, "", false, +{}, {}, {}, {calibratorParent}, {}, {}, {}, {}, {}, {}), +myVehicleType(vehicleType), +myRoute(route), +myVehsPerHour(vehsPerHour), +mySpeed(speed), +myColor(color), +myDepartLane(departLane), +myDepartPos(departPos), +myDepartSpeed(departSpeed), +myArrivalLane(arrivalLane), +myArrivalPos(arrivalPos), +myArrivalSpeed(arrivalSpeed), +myLine(line), +myPersonNumber(personNumber), +myContainerNumber(containerNumber), +myReroute(reroute), +myDepartPosLat(departPosLat), +myArrivalPosLat(arrivalPosLat), +myBegin(begin), +myEnd(end) { } @@ -91,13 +94,13 @@ Position GNECalibratorFlow::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNECalibratorFlow::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -151,7 +154,7 @@ case SUMO_ATTR_ARRIVALPOS_LAT: return myArrivalPosLat; case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -187,7 +190,7 @@ case SUMO_ATTR_DEPARTPOS_LAT: case SUMO_ATTR_ARRIVALPOS_LAT: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -201,7 +204,7 @@ case SUMO_ATTR_ID: return isValidAdditionalID(value); case SUMO_ATTR_TYPE: - return SUMOXMLDefinitions::isValidTypeID(value) && (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_VTYPE, value, false) != nullptr); + return SUMOXMLDefinitions::isValidTypeID(value) && (myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, value, false) != nullptr); case SUMO_ATTR_ROUTE: return SUMOXMLDefinitions::isValidVehicleID(value) && (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTE, value, false) != nullptr); case SUMO_ATTR_VEHSPERHOUR: @@ -314,10 +317,10 @@ changeAdditionalID(value); break; case SUMO_ATTR_TYPE: - myVehicleType = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_VTYPE, value); + myVehicleType = myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, value); break; case SUMO_ATTR_ROUTE: - myRoute = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_ROUTE, value); + myRoute = myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, value); break; case SUMO_ATTR_VEHSPERHOUR: myVehsPerHour = value; @@ -376,6 +379,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorFlow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,8 +30,6 @@ class GNECalibrator; class GNECalibratorDialog; -class GNECalibratorVehicleType; -class GNECalibratorRoute; // =========================================================================== // class definitions @@ -47,7 +45,7 @@ GNECalibratorFlow(GNEAdditional* calibratorParent); /// @brief parameter constructor - GNECalibratorFlow(GNEAdditional* calibratorParent, GNEAdditional* vehicleType, GNEAdditional* route, const std::string& vehsPerHour, const std::string& speed, + GNECalibratorFlow(GNEAdditional* calibratorParent, GNEDemandElement* vehicleType, GNEDemandElement* route, const std::string& vehsPerHour, const std::string& speed, const RGBColor& color, const std::string& departLane, const std::string& departPos, const std::string& departSpeed, const std::string& arrivalLane, const std::string& arrivalPos, const std::string& arrivalSpeed, const std::string& line, int personNumber, int containerNumber, bool reroute, const std::string& departPosLat, const std::string& arrivalPosLat, double begin, double end); @@ -120,10 +118,10 @@ protected: /// @brief type of flow - GNEAdditional* myVehicleType; + GNEDemandElement* myVehicleType; /// @brief route in which this flow is used - GNEAdditional* myRoute; + GNEDemandElement* myRoute; /// @brief flows per hour (String instead float because can be empty) std::string myVehsPerHour; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibrator.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibrator.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibrator.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibrator.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ class GNERouteProbe; class GNECalibratorFlow; -class GNECalibratorRoute; +class GNERoute; // =========================================================================== // class definitions @@ -140,12 +140,6 @@ /// @} protected: - /// @brief The edge in which Calibrators are placed - GNEEdge* myEdge; - - /// @brief The lane in which CalibratorLane are placed - GNELane* myLane; - /// @brief position over Lane double myPositionOverLane; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,185 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorRoute.cpp -/// @author Pablo Alvarez Lopez -/// @date March 2016 -/// @version $Id$ -/// -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== - -#include -#include -#include -#include - -#include "GNECalibratorRoute.h" - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNECalibratorRoute::GNECalibratorRoute(GNEViewNet* viewNet) : - GNEAdditional(viewNet->getNet()->generateAdditionalID(SUMO_TAG_ROUTE), viewNet, GLO_CALIBRATOR, SUMO_TAG_ROUTE, "", false) { - // fill route type with default values - setDefaultValues(); -} - - -GNECalibratorRoute::GNECalibratorRoute(GNEViewNet* viewNet, const std::string& routeID, const std::vector& edges, const RGBColor& color) : - GNEAdditional(routeID, viewNet, GLO_CALIBRATOR, SUMO_TAG_ROUTE, "", false), - myEdges(edges), - myColor(color) { -} - - -GNECalibratorRoute::~GNECalibratorRoute() {} - - -const std::vector& -GNECalibratorRoute::getGNEEdges() const { - return myEdges; -} - - -void -GNECalibratorRoute::moveGeometry(const Position&) { - // This additional cannot be moved -} - - -void -GNECalibratorRoute::commitGeometryMoving(GNEUndoList*) { - // This additional cannot be moved -} - - -void -GNECalibratorRoute::updateGeometry(bool /*updateGrid*/) { - // Currently this additional doesn't own a Geometry -} - - -Position -GNECalibratorRoute::getPositionInView() const { - return Position(); -} - - -std::string -GNECalibratorRoute::getParentName() const { - return myViewNet->getNet()->getMicrosimID(); -} - - -void -GNECalibratorRoute::drawGL(const GUIVisualizationSettings&) const { - // Currently This additional isn't drawn -} - - -std::string -GNECalibratorRoute::getAttribute(SumoXMLAttr key) const { - switch (key) { - case SUMO_ATTR_ID: - return getAdditionalID(); - case SUMO_ATTR_EDGES: - return parseIDs(myEdges); - case SUMO_ATTR_COLOR: - return toString(myColor); - case GNE_ATTR_GENERIC: - return getGenericParametersStr(); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -void -GNECalibratorRoute::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { - if (value == getAttribute(key)) { - return; //avoid needless changes, later logic relies on the fact that attributes have changed - } - switch (key) { - case SUMO_ATTR_ID: - case SUMO_ATTR_EDGES: - case SUMO_ATTR_COLOR: - case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -bool -GNECalibratorRoute::isValid(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - return isValidAdditionalID(value); - case SUMO_ATTR_EDGES: - if (canParse >(myViewNet->getNet(), value, false)) { - // all edges exist, then check if compounds a valid route - return GNEAdditional::isRouteValid(parse >(myViewNet->getNet(), value), false); - } else { - return false; - } - case SUMO_ATTR_COLOR: - return canParse(value); - case GNE_ATTR_GENERIC: - return isGenericParametersValid(value); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -std::string -GNECalibratorRoute::getPopUpID() const { - return getTagStr() + ": " + getID(); -} - - -std::string -GNECalibratorRoute::getHierarchyName() const { - return getTagStr(); -} - -// =========================================================================== -// private -// =========================================================================== - -void -GNECalibratorRoute::setAttribute(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - changeAdditionalID(value); - break; - case SUMO_ATTR_EDGES: - myEdges = parse >(myViewNet->getNet(), value); - break; - case SUMO_ATTR_COLOR: - myColor = parse(value); - break; - case GNE_ATTR_GENERIC: - setGenericParametersStr(value); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorRoute.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,137 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorRoute.h -/// @author Pablo Alvarez Lopez -/// @date Nov 2015 -/// @version $Id$ -/// -// Route used by GNECalibrators -/****************************************************************************/ -#ifndef GNECalibratorRoute_h -#define GNECalibratorRoute_h - - -// =========================================================================== -// included modules -// =========================================================================== - -#include "GNEAdditional.h" - -// =========================================================================== -// class declaration -// =========================================================================== - -class GNEEdge; - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GNECalibratorRoute - * vehicle route used by GNECalibrators - */ -class GNECalibratorRoute : public GNEAdditional { - -public: - /// @brief default constructor (used only in GNECalibratorDialog) - GNECalibratorRoute(GNEViewNet* viewNet); - - /// @brief parameter constructor - GNECalibratorRoute(GNEViewNet* viewNet, const std::string& routeID, const std::vector& edges, const RGBColor& color); - - /// @brief destructor - ~GNECalibratorRoute(); - - /// @brief get GNEEdges of Calibrator ROute - const std::vector& getGNEEdges() const; - - /// @name Functions related with geometry of element - /// @{ - /**@brief change the position of the element geometry without saving in undoList - * @param[in] offset Position used for calculate new position of geometry without updating RTree - */ - void moveGeometry(const Position& offset); - - /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) - * @param[in] undoList The undoList on which to register changes - */ - void commitGeometryMoving(GNEUndoList* undoList); - - /// @brief update pre-computed geometry information - void updateGeometry(bool updateGrid); - - /// @brief Returns position of additional in view - Position getPositionInView() const; - /// @} - - /// @name inherited from GUIGlObject - /// @{ - /**@brief Returns the name of the parent object - * @return This object's parent id - */ - std::string getParentName() 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 inherited from GNEAttributeCarrier - /// @{ - /* @brief method for getting the Attribute of an XML key - * @param[in] key The attribute key - * @return string with the value associated to key - */ - std::string getAttribute(SumoXMLAttr key) const; - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - * @param[in] net optionally the GNENet to inform about gui updates - */ - void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - */ - bool isValid(SumoXMLAttr key, const std::string& value); - - /// @brief get PopPup ID (Used in AC Hierarchy) - std::string getPopUpID() const; - - /// @brief get Hierarchy Name (Used in AC Hierarchy) - std::string getHierarchyName() const; - /// @} - -protected: - /// @brief edges of route - std::vector myEdges; - - /// @brief color of ROute - RGBColor myColor; - -private: - /// @brief method for setting the attribute and nothing else - void setAttribute(SumoXMLAttr key, const std::string& value); - - /// @brief Invalidated copy constructor. - GNECalibratorRoute(GNECalibratorRoute*) = delete; - - /// @brief Invalidated assignment operator. - GNECalibratorRoute& operator=(GNECalibratorRoute*) = delete; -}; - -#endif -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,401 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorVehicleType.cpp -/// @author Pablo Alvarez Lopez -/// @date March 2016 -/// @version $Id$ -/// -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== - -#include -#include -#include -#include - -#include "GNECalibratorVehicleType.h" - - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNECalibratorVehicleType::GNECalibratorVehicleType(GNEViewNet* viewNet) : - GNEAdditional(viewNet->getNet()->generateAdditionalID(SUMO_TAG_VTYPE), viewNet, GLO_CALIBRATOR, SUMO_TAG_VTYPE, "", false) { - // fill calibrator vehicle type with default values - setDefaultValues(); -} - - -GNECalibratorVehicleType::GNECalibratorVehicleType(GNEViewNet* viewNet, const std::string& id) : - GNEAdditional(id, viewNet, GLO_CALIBRATOR, SUMO_TAG_VTYPE, "", false) { - // fill calibrator vehicle type with default values - setDefaultValues(); -} - - -GNECalibratorVehicleType::GNECalibratorVehicleType(GNEViewNet* viewNet, std::string vehicleTypeID, - double accel, double decel, double sigma, double tau, double length, double minGap, double maxSpeed, - double speedFactor, double speedDev, const RGBColor& color, SUMOVehicleClass vClass, const std::string& emissionClass, - SUMOVehicleShape shape, double width, const std::string& filename, double impatience, const std::string& laneChangeModel, - const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration, - double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat) : - GNEAdditional(vehicleTypeID, viewNet, GLO_CALIBRATOR, SUMO_TAG_VTYPE, "", false), - myAccel(accel), - myDecel(decel), - mySigma(sigma), - myTau(tau), - myLength(length), - myMinGap(minGap), - myMaxSpeed(maxSpeed), - mySpeedFactor(speedFactor), - mySpeedDev(speedDev), - myColor(color), - myVClass(vClass), - myEmissionClass(emissionClass), - myShape(shape), - myWidth(width), - myFilename(filename), - myImpatience(impatience), - myLaneChangeModel(laneChangeModel), - myCarFollowModel(carFollowModel), - myPersonCapacity(personCapacity), - myContainerCapacity(containerCapacity), - myBoardingDuration(boardingDuration), - myLoadingDuration(loadingDuration), - myLatAlignment(latAlignment), - myMinGapLat(minGapLat), - myMaxSpeedLat(maxSpeedLat) { -} - - -GNECalibratorVehicleType::~GNECalibratorVehicleType() {} - - -void -GNECalibratorVehicleType::moveGeometry(const Position&) { - // This additional cannot be moved -} - - -void -GNECalibratorVehicleType::commitGeometryMoving(GNEUndoList*) { - // This additional cannot be moved -} - - -void -GNECalibratorVehicleType::updateGeometry(bool /*updateGrid*/) { - // Currently this additional doesn't own a Geometry -} - - -Position -GNECalibratorVehicleType::getPositionInView() const { - return Position(); -} - - -std::string -GNECalibratorVehicleType::getParentName() const { - return myViewNet->getNet()->getMicrosimID(); -} - - -void -GNECalibratorVehicleType::drawGL(const GUIVisualizationSettings&) const { - // Currently This additional isn't drawn -} - - -std::string -GNECalibratorVehicleType::getAttribute(SumoXMLAttr key) const { - switch (key) { - case SUMO_ATTR_ID: - return getAdditionalID(); - case SUMO_ATTR_ACCEL: - return toString(myAccel); - case SUMO_ATTR_DECEL: - return toString(myDecel); - case SUMO_ATTR_SIGMA: - return toString(mySigma); - case SUMO_ATTR_TAU: - return toString(myTau); - case SUMO_ATTR_LENGTH: - return toString(myLength); - case SUMO_ATTR_MINGAP: - return toString(myMinGap); - case SUMO_ATTR_MAXSPEED: - return toString(myMaxSpeed); - case SUMO_ATTR_SPEEDFACTOR: - return toString(mySpeedFactor); - case SUMO_ATTR_SPEEDDEV: - return toString(mySpeedDev); - case SUMO_ATTR_COLOR: - return toString(myColor); - case SUMO_ATTR_VCLASS: - return toString(myVClass); - case SUMO_ATTR_EMISSIONCLASS: - return myEmissionClass; - case SUMO_ATTR_GUISHAPE: - return getVehicleShapeName(myShape); - case SUMO_ATTR_WIDTH: - return toString(myWidth); - case SUMO_ATTR_IMGFILE: - return myFilename; - case SUMO_ATTR_IMPATIENCE: - return toString(myImpatience); - case SUMO_ATTR_LANE_CHANGE_MODEL: - return myLaneChangeModel; - case SUMO_ATTR_CAR_FOLLOW_MODEL: - return myCarFollowModel; - case SUMO_ATTR_PERSON_CAPACITY: - return toString(myPersonCapacity); - case SUMO_ATTR_CONTAINER_CAPACITY: - return toString(myContainerCapacity); - case SUMO_ATTR_BOARDING_DURATION: - return toString(myBoardingDuration); - case SUMO_ATTR_LOADING_DURATION: - return toString(myLoadingDuration); - case SUMO_ATTR_LATALIGNMENT: - return myLatAlignment; - case SUMO_ATTR_MINGAP_LAT: - return toString(myMinGapLat); - case SUMO_ATTR_MAXSPEED_LAT: - return toString(myMaxSpeedLat); - case GNE_ATTR_GENERIC: - return getGenericParametersStr(); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -void -GNECalibratorVehicleType::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { - if (value == getAttribute(key)) { - return; //avoid needless changes, later logic relies on the fact that attributes have changed - } - switch (key) { - case SUMO_ATTR_ID: - case SUMO_ATTR_ACCEL: - case SUMO_ATTR_DECEL: - case SUMO_ATTR_SIGMA: - case SUMO_ATTR_TAU: - case SUMO_ATTR_LENGTH: - case SUMO_ATTR_MINGAP: - case SUMO_ATTR_MAXSPEED: - case SUMO_ATTR_SPEEDFACTOR: - case SUMO_ATTR_SPEEDDEV: - case SUMO_ATTR_COLOR: - case SUMO_ATTR_VCLASS: - case SUMO_ATTR_EMISSIONCLASS: - case SUMO_ATTR_GUISHAPE: - case SUMO_ATTR_WIDTH: - case SUMO_ATTR_IMGFILE: - case SUMO_ATTR_IMPATIENCE: - case SUMO_ATTR_LANE_CHANGE_MODEL: - case SUMO_ATTR_CAR_FOLLOW_MODEL: - case SUMO_ATTR_PERSON_CAPACITY: - case SUMO_ATTR_CONTAINER_CAPACITY: - case SUMO_ATTR_BOARDING_DURATION: - case SUMO_ATTR_LOADING_DURATION: - case SUMO_ATTR_LATALIGNMENT: - case SUMO_ATTR_MINGAP_LAT: - case SUMO_ATTR_MAXSPEED_LAT: - case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -bool -GNECalibratorVehicleType::isValid(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - return isValidAdditionalID(value); - case SUMO_ATTR_ACCEL: - return canParse(value); - case SUMO_ATTR_DECEL: - return canParse(value); - case SUMO_ATTR_SIGMA: - return canParse(value) && (parse(value) >= 0) && (parse(value) <= 1); - case SUMO_ATTR_TAU: - return canParse(value); - case SUMO_ATTR_LENGTH: - return canParse(value) && (parse(value) > 0); - case SUMO_ATTR_MINGAP: - return canParse(value); - case SUMO_ATTR_MAXSPEED: - return canParse(value); - case SUMO_ATTR_SPEEDFACTOR: - return canParse(value); - case SUMO_ATTR_SPEEDDEV: - return canParse(value); - case SUMO_ATTR_COLOR: - return canParse(value); - case SUMO_ATTR_VCLASS: - return canParseVehicleClasses(value); - case SUMO_ATTR_EMISSIONCLASS: - if ((value == "zero") || (value == "LDV") || (value == "LDV_G_EU0") || (value == "LDV_G_EU1") || (value == "LDV_G_EU2") || (value == "LDV_G_EU3") || (value == "LDV_G_EU4") || (value == "LDV_G_EU5") || - (value == "LDV_G_EU6") || (value == "LDV_G_East") || (value == "LDV_D_EU0") || (value == "LDV_D_EU1") || (value == "LDV_D_EU2") || (value == "LDV_D_EU3") || (value == "LDV_D_EU4") || (value == "LDV_D_EU5") || (value == "LDV_D_EU6") || - (value == "PC") || (value == "PC_Alternative") || (value == "PC_G_EU0") || (value == "PC_G_EU1") || (value == "PC_G_EU2") || (value == "PC_G_EU3") || (value == "PC_G_EU4") || (value == "PC_G_EU5") || (value == "PC_G_EU6") || (value == "PC_G_East") || - (value == "PC_D_EU0") || (value == "PC_D_EU1") || (value == "PC_D_EU2") || (value == "PC_D_EU3") || (value == "PC_D_EU4") || (value == "PC_D_EU5") || (value == "PC_D_EU6") || (value == "Bus") || (value == "Coach") || (value == "HDV") || (value == "HDV_G") || - (value == "HDV_D_EU0") || (value == "HDV_D_EU1") || (value == "HDV_D_EU2") || (value == "HDV_D_EU3") || (value == "HDV_D_EU4") || (value == "HDV_D_EU5") || (value == "HDV_D_EU6") || (value == "HDV_D_East")) { - return true; - } else { - return false; - } - case SUMO_ATTR_GUISHAPE: - return canParseVehicleShape(value); - case SUMO_ATTR_WIDTH: - return canParse(value); - case SUMO_ATTR_IMGFILE: - return SUMOXMLDefinitions::isValidFilename(value); - case SUMO_ATTR_IMPATIENCE: - return canParse(value); - case SUMO_ATTR_LANE_CHANGE_MODEL: - return SUMOXMLDefinitions::LaneChangeModels.hasString(value); - case SUMO_ATTR_CAR_FOLLOW_MODEL: - return SUMOXMLDefinitions::CarFollowModels.hasString(value); - case SUMO_ATTR_PERSON_CAPACITY: - return canParse(value); - case SUMO_ATTR_CONTAINER_CAPACITY: - return canParse(value); - case SUMO_ATTR_BOARDING_DURATION: - return canParse(value); - case SUMO_ATTR_LOADING_DURATION: - return canParse(value); - case SUMO_ATTR_LATALIGNMENT: - return SUMOXMLDefinitions::LateralAlignments.hasString(value); - case SUMO_ATTR_MINGAP_LAT: - return canParse(value); - case SUMO_ATTR_MAXSPEED_LAT: - return canParse(value); - case GNE_ATTR_GENERIC: - return isGenericParametersValid(value); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -std::string -GNECalibratorVehicleType::getPopUpID() const { - return getTagStr() + ": " + getID(); -} - - -std::string -GNECalibratorVehicleType::getHierarchyName() const { - return getTagStr(); -} - -// =========================================================================== -// private -// =========================================================================== - -void -GNECalibratorVehicleType::setAttribute(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - changeAdditionalID(value); - break; - case SUMO_ATTR_ACCEL: - myAccel = parse(value); - break; - case SUMO_ATTR_DECEL: - myDecel = parse(value); - break; - case SUMO_ATTR_SIGMA: - mySigma = parse(value); - break; - case SUMO_ATTR_TAU: - myTau = parse(value); - break; - case SUMO_ATTR_LENGTH: - myLength = parse(value); - break; - case SUMO_ATTR_MINGAP: - myMinGap = parse(value); - break; - case SUMO_ATTR_MAXSPEED: - myMaxSpeed = parse(value); - break; - case SUMO_ATTR_SPEEDFACTOR: - mySpeedFactor = parse(value); - break; - case SUMO_ATTR_SPEEDDEV: - mySpeedDev = parse(value); - break; - case SUMO_ATTR_COLOR: - myColor = parse(value); - break; - case SUMO_ATTR_VCLASS: - myVClass = getVehicleClassID(value); - break; - case SUMO_ATTR_EMISSIONCLASS: - myEmissionClass = value; - break; - case SUMO_ATTR_GUISHAPE: - myShape = getVehicleShapeID(value); - break; - case SUMO_ATTR_WIDTH: - myWidth = parse(value); - break; - case SUMO_ATTR_IMGFILE: - myFilename = value; - break; - case SUMO_ATTR_IMPATIENCE: - myImpatience = parse(value); - break; - case SUMO_ATTR_LANE_CHANGE_MODEL: - myLaneChangeModel = value; - break; - case SUMO_ATTR_CAR_FOLLOW_MODEL: - myCarFollowModel = value; - break; - case SUMO_ATTR_PERSON_CAPACITY: - myPersonCapacity = parse(value); - break; - case SUMO_ATTR_CONTAINER_CAPACITY: - myContainerCapacity = parse(value); - break; - case SUMO_ATTR_BOARDING_DURATION: - myBoardingDuration = parse(value); - break; - case SUMO_ATTR_LOADING_DURATION: - myLoadingDuration = parse(value); - break; - case SUMO_ATTR_LATALIGNMENT: - myLatAlignment = value; - break; - case SUMO_ATTR_MINGAP_LAT: - myMinGapLat = parse(value); - break; - case SUMO_ATTR_MAXSPEED_LAT: - myMaxSpeedLat = parse(value); - break; - case GNE_ATTR_GENERIC: - setGenericParametersStr(value); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNECalibratorVehicleType.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,213 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorVehicleType.h -/// @author Pablo Alvarez Lopez -/// @date Nov 2015 -/// @version $Id$ -/// -// VehicleType used by GNECalibrators -/****************************************************************************/ -#ifndef GNECalibratorVehicleType_h -#define GNECalibratorVehicleType_h - - -// =========================================================================== -// included modules -// =========================================================================== - -#include "GNEAdditional.h" - -// =========================================================================== -// class declaration -// =========================================================================== - -class GNECalibrator; -class GNECalibratorDialog; - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GNECalibratorVehicleType - * vehicleType vehicleType used by GNECalibrators - */ -class GNECalibratorVehicleType : public GNEAdditional { - -public: - /// @brief constructor (Used only in GNECalibratorDialog) - GNECalibratorVehicleType(GNEViewNet* viewNet); - - /// @brief constructor in which ID can be specified - GNECalibratorVehicleType(GNEViewNet* viewNet, const std::string& id); - - /// @brief parameter constructor - GNECalibratorVehicleType(GNEViewNet* viewNet, std::string vehicleTypeID, - double accel, double decel, double sigma, double tau, double length, double minGap, - double maxSpeed, double speedFactor, double speedDev, const RGBColor& color, - SUMOVehicleClass vClass, const std::string& emissionClass, SUMOVehicleShape shape, - double width, const std::string& filename, double impatience, const std::string& laneChangeModel, - const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration, - double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat); - - /// @brief destructor - ~GNECalibratorVehicleType(); - - /// @name Functions related with geometry of element - /// @{ - /**@brief change the position of the element geometry without saving in undoList - * @param[in] offset Position used for calculate new position of geometry without updating RTree - */ - void moveGeometry(const Position& offset); - - /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) - * @param[in] undoList The undoList on which to register changes - */ - void commitGeometryMoving(GNEUndoList* undoList); - - /// @brief update pre-computed geometry information - void updateGeometry(bool updateGrid); - - /// @brief Returns position of additional in view - Position getPositionInView() const; - /// @} - - /// @name inherited from GUIGlObject - /// @{ - /**@brief Returns the name of the parent object - * @return This object's parent id - */ - std::string getParentName() 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 inherited from GNEAttributeCarrier - /// @{ - /* @brief method for getting the Attribute of an XML key - * @param[in] key The attribute key - * @return string with the value associated to key - */ - std::string getAttribute(SumoXMLAttr key) const; - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - * @param[in] net optionally the GNENet to inform about gui updates - */ - void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - */ - bool isValid(SumoXMLAttr key, const std::string& value); - - /// @brief get PopPup ID (Used in AC Hierarchy) - std::string getPopUpID() const; - - /// @brief get Hierarchy Name (Used in AC Hierarchy) - std::string getHierarchyName() const; - /// @} - -private: - /// @brief The acceleration ability of vehicles of this type (in m/s^2) - double myAccel; - - /// @brief The deceleration ability of vehicles of this type (in m/s^2) - double myDecel; - - /// @brief Car-following model parameter - double mySigma; - - /// @brief Car-following model parameter - double myTau; - - /// @brief The vehicle's netto-length (length) (in m) - double myLength; - - /// @brief Empty space after leader [m] - double myMinGap; - - /// @brief The vehicle's maximum velocity (in m/s) - double myMaxSpeed; - - /// @brief The vehicles expected multiplicator for lane speed limits - double mySpeedFactor; - - /// @brief The deviation of the speedFactor; see below for details - double mySpeedDev; - - /// @brief This vehicle type's color - RGBColor myColor; - - /// @brief An abstract vehicle class - SUMOVehicleClass myVClass; - - /// @brief An abstract emission class - std::string myEmissionClass; - - /// @brief How this vehicle is rendered - SUMOVehicleShape myShape; - - /// @brief The vehicle's width [m] (only used for drawing) - double myWidth; - - /// @brief Image file for rendering vehicles of this type (should be grayscale to allow functional coloring) - std::string myFilename; - - /// @brief Willingess of drivers to impede vehicles with higher priority. See below for semantics. - double myImpatience; - - /// @brief The model used for changing lanes - std::string myLaneChangeModel; - - /// @brief The model used for car following - std::string myCarFollowModel; - - /// @brief The number of persons (excluding an autonomous driver) the vehicle can transport. - int myPersonCapacity; - - /// @brief The number of containers the vehicle can transport. - int myContainerCapacity; - - /// @brief The time required by a person to board the vehicle. - double myBoardingDuration; - - /// @brief The time required to load a container onto the vehicle. - double myLoadingDuration; - - /// @brief The preferred lateral alignment when using the sublane-model. One of (left, right, center, compact, nice, arbitrary). - std::string myLatAlignment; - - /// @brief The minimum lateral gap at a speed difference of 100km/h when using the sublane-model - double myMinGapLat; - - /// @brief The maximum lateral speed when using the sublane-model - double myMaxSpeedLat; - -private: - /// @brief method for setting the attribute and nothing else - void setAttribute(SumoXMLAttr key, const std::string& value); - - /// @brief Invalidated copy constructor. - GNECalibratorVehicleType(GNECalibratorVehicleType*) = delete; - - /// @brief Invalidated assignment operator - GNECalibratorVehicleType* operator=(GNECalibratorVehicleType*) = delete; -}; - -#endif -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEChargingStation.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEChargingStation.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEChargingStation.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEChargingStation.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -75,7 +75,7 @@ myBlockIcon.position = myGeometry.shape.getLineCenter(); // Set block icon rotation, and using their rotation for sign - myBlockIcon.setRotation(myLane); + myBlockIcon.setRotation(getLaneParents().front()); // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -97,7 +97,7 @@ // Traslate matrix glTranslated(0, 0, getType()); // Set Color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_chargingStation); @@ -127,7 +127,7 @@ // push a new matrix for charging power glPushMatrix(); // draw line with a color depending of the selection status - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText((toString(myChargingPower) + " W").c_str(), mySignPos + Position(1.2, 0), .1, 1.f, s.selectionColor, myBlockIcon.rotation, FONS_ALIGN_LEFT); } else { GLHelper::drawText((toString(myChargingPower) + " W").c_str(), mySignPos + Position(1.2, 0), .1, 1.f, s.SUMO_color_chargingStation, myBlockIcon.rotation, FONS_ALIGN_LEFT); @@ -139,7 +139,7 @@ // Scale matrix glScaled(exaggeration, exaggeration, 1); // Set base color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_chargingStation); @@ -149,7 +149,7 @@ // Move to top glTranslated(0, 0, .1); // Set sign color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(s.SUMO_color_chargingStation_sign); @@ -158,7 +158,7 @@ GLHelper::drawFilledCircle(myCircleInWidth, circleResolution); // Draw sign 'C' if (s.scale * exaggeration >= 4.5) { - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("C", Position(), .1, myCircleInText, s.selectedAdditionalColor, myBlockIcon.rotation); } else { GLHelper::drawText("C", Position(), .1, myCircleInText, s.SUMO_color_chargingStation, myBlockIcon.rotation); @@ -191,7 +191,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_STARTPOS: return toString(myStartPosition); case SUMO_ATTR_ENDPOS: @@ -239,7 +239,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -261,32 +261,18 @@ case SUMO_ATTR_STARTPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(value, myEndPosition, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myEndPosition)) { - // Check that new start Position is smaller that end position - return (parse(value) < parse(myEndPosition)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_ENDPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(myStartPosition, value, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myStartPosition)) { - // Check that new start Position is smaller that end position - return (parse(myStartPosition) < parse(value)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_NAME: return SUMOXMLDefinitions::isValidAttribute(value); @@ -322,7 +308,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_STARTPOS: myStartPosition = value; @@ -364,8 +350,8 @@ default: throw InvalidArgument(getTagStr() + "attribute '" + toString(key) + "' not allowed"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEChargingStation.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEChargingStation.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEChargingStation.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEChargingStation.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,17 +36,19 @@ // =========================================================================== GNEClosingLaneReroute::GNEClosingLaneReroute(GNERerouterIntervalDialog* rerouterIntervalDialog) : - GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_CLOSING_LANE_REROUTE, "", false), - myClosedLane(rerouterIntervalDialog->getEditedAdditional()->getFirstAdditionalParent()->getEdgeChilds().at(0)->getLanes().at(0)) { + GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_CLOSING_LANE_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}), +myClosedLane(rerouterIntervalDialog->getEditedAdditional()->getAdditionalParents().at(0)->getEdgeChilds().at(0)->getLanes().at(0)) { // fill closing lane reroute interval with default values setDefaultValues(); } GNEClosingLaneReroute::GNEClosingLaneReroute(GNEAdditional* rerouterIntervalParent, GNELane* closedLane, SVCPermissions permissions) : - GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_CLOSING_LANE_REROUTE, "", false), - myClosedLane(closedLane), - myPermissions(permissions) { + GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_CLOSING_LANE_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalParent}, {}, {}, {}, {}, {}, {}), +myClosedLane(closedLane), +myPermissions(permissions) { } @@ -73,13 +75,13 @@ Position GNEClosingLaneReroute::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNEClosingLaneReroute::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -101,7 +103,7 @@ case SUMO_ATTR_DISALLOW: return getVehicleClassNames(invertPermissions(myPermissions)); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -121,7 +123,7 @@ case SUMO_ATTR_ALLOW: case SUMO_ATTR_DISALLOW: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -183,6 +185,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingLaneReroute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingReroute.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingReroute.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingReroute.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingReroute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -35,17 +35,19 @@ // =========================================================================== GNEClosingReroute::GNEClosingReroute(GNERerouterIntervalDialog* rerouterIntervalDialog) : - GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CLOSING_REROUTE, "", false), - myClosedEdge(rerouterIntervalDialog->getEditedAdditional()->getFirstAdditionalParent()->getEdgeChilds().at(0)) { + GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CLOSING_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}), +myClosedEdge(rerouterIntervalDialog->getEditedAdditional()->getAdditionalParents().at(0)->getEdgeChilds().at(0)) { // fill closing reroute interval with default values setDefaultValues(); } GNEClosingReroute::GNEClosingReroute(GNEAdditional* rerouterIntervalParent, GNEEdge* closedEdge, SVCPermissions permissions) : - GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CLOSING_REROUTE, "", false), - myClosedEdge(closedEdge), - myPermissions(permissions) { + GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CLOSING_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalParent}, {}, {}, {}, {}, {}, {}), +myClosedEdge(closedEdge), +myPermissions(permissions) { } @@ -72,13 +74,13 @@ Position GNEClosingReroute::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNEClosingReroute::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -100,7 +102,7 @@ case SUMO_ATTR_DISALLOW: return getVehicleClassNames(invertPermissions(myPermissions)); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -120,7 +122,7 @@ case SUMO_ATTR_ALLOW: case SUMO_ATTR_DISALLOW: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -183,6 +185,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingReroute.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingReroute.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEClosingReroute.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEClosingReroute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEContainerStop.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEContainerStop.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEContainerStop.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEContainerStop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -56,7 +56,7 @@ double offsetSign = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1; // Update common geometry of stopping place - setStoppingPlaceGeometry(myLane->getParentEdge().getNBEdge()->getLaneWidth(myLane->getIndex()) / 2); + setStoppingPlaceGeometry(getLaneParents().front()->getParentEdge().getNBEdge()->getLaneWidth(getLaneParents().front()->getIndex()) / 2); // Obtain a copy of the shape PositionVector tmpShape = myGeometry.shape; @@ -71,7 +71,7 @@ myBlockIcon.position = myGeometry.shape.getLineCenter(); // Set block icon rotation, and using their rotation for sign - myBlockIcon.setRotation(myLane); + myBlockIcon.setRotation(getLaneParents().front()); // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -93,7 +93,7 @@ // Start with the drawing of the area traslating matrix to origin glTranslated(0, 0, getType()); // Set color of the base - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_containerStop); @@ -128,7 +128,7 @@ glTranslated(mySignPos.x(), mySignPos.y(), 0); glRotated(-1 * myBlockIcon.rotation, 0, 0, 1); // draw line with a color depending of the selection status - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText(myLines[i].c_str(), Position(1.2, (double)i), .1, 1.f, s.selectionColor, 0, FONS_ALIGN_LEFT); } else { GLHelper::drawText(myLines[i].c_str(), Position(1.2, (double)i), .1, 1.f, s.SUMO_color_containerStop, 0, FONS_ALIGN_LEFT); @@ -141,7 +141,7 @@ // scale matrix depending of the exaggeration glScaled(exaggeration, exaggeration, 1); // Set color of the externe circle - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_containerStop); @@ -151,7 +151,7 @@ // Traslate to front glTranslated(0, 0, .1); // Set color of the inner circle - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(s.SUMO_color_containerStop_sign); @@ -160,7 +160,7 @@ GLHelper::drawFilledCircle(myCircleInWidth, circleResolution); // If the scale * exageration is equal or more than 4.5, draw H if (s.scale * exaggeration >= 4.5) { - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("C", Position(), .1, myCircleInText, s.selectedAdditionalColor, myBlockIcon.rotation); } else { GLHelper::drawText("C", Position(), .1, myCircleInText, s.SUMO_color_containerStop, myBlockIcon.rotation); @@ -192,7 +192,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_STARTPOS: return toString(myStartPosition); case SUMO_ATTR_ENDPOS: @@ -231,7 +231,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -253,32 +253,18 @@ case SUMO_ATTR_STARTPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(value, myEndPosition, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myEndPosition)) { - // Check that new start Position is smaller that end position - return (parse(value) < parse(myEndPosition)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_ENDPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(myStartPosition, value, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myStartPosition)) { - // Check that new start Position is smaller that end position - return (parse(myStartPosition) < parse(value)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_NAME: return SUMOXMLDefinitions::isValidAttribute(value); @@ -308,7 +294,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_STARTPOS: myStartPosition = value; @@ -341,8 +327,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEContainerStop.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEContainerStop.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEContainerStop.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEContainerStop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,17 +34,19 @@ // =========================================================================== GNEDestProbReroute::GNEDestProbReroute(GNERerouterIntervalDialog* rerouterIntervalDialog) : - GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_DEST_PROB_REROUTE, "", false), - myNewEdgeDestination(rerouterIntervalDialog->getEditedAdditional()->getFirstAdditionalParent()->getEdgeChilds().at(0)) { + GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_DEST_PROB_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}), +myNewEdgeDestination(rerouterIntervalDialog->getEditedAdditional()->getAdditionalParents().at(0)->getEdgeChilds().at(0)) { // fill dest prob reroute interval with default values setDefaultValues(); } GNEDestProbReroute::GNEDestProbReroute(GNEAdditional* rerouterIntervalParent, GNEEdge* newEdgeDestination, double probability): - GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_DEST_PROB_REROUTE, "", false), - myNewEdgeDestination(newEdgeDestination), - myProbability(probability) { + GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_DEST_PROB_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalParent}, {}, {}, {}, {}, {}, {}), +myNewEdgeDestination(newEdgeDestination), +myProbability(probability) { } @@ -70,13 +72,13 @@ Position GNEDestProbReroute::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNEDestProbReroute::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -96,7 +98,7 @@ case SUMO_ATTR_PROB: return toString(myProbability); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -115,7 +117,7 @@ case SUMO_ATTR_EDGE: case SUMO_ATTR_PROB: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -173,6 +175,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDestProbReroute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetector.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetector.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetector.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetector.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,6 +21,8 @@ #include #include +#include +#include #include "GNEDetector.h" @@ -30,23 +32,26 @@ // =========================================================================== GNEDetector::GNEDetector(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, - double pos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement) : - GNEAdditional(id, viewNet, type, tag, name, blockMovement), - myPositionOverLane(pos), - myFreq(freq), - myFilename(filename), - myVehicleTypes(vehicleTypes), - myFriendlyPosition(friendlyPos) { + double pos, double freq, const std::string& filename, const std::string& vehicleTypes, + const std::string& name, bool friendlyPos, bool blockMovement, const std::vector& laneParents) : + GNEAdditional(id, viewNet, type, tag, name, blockMovement, {}, laneParents, {}, {}, {}, {}, {}, {}, {}, {}), + myPositionOverLane(pos), + myFreq(freq), + myFilename(filename), + myVehicleTypes(vehicleTypes), +myFriendlyPosition(friendlyPos) { } GNEDetector::GNEDetector(GNEAdditional* additionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, - double pos, double freq, const std::string& filename, const std::string& name, bool friendlyPos, bool blockMovement) : - GNEAdditional(additionalParent, viewNet, type, tag, name, blockMovement), - myPositionOverLane(pos), - myFreq(freq), - myFilename(filename), - myFriendlyPosition(friendlyPos) { + double pos, double freq, const std::string& filename, + const std::string& name, bool friendlyPos, bool blockMovement, const std::vector& laneParents) : + GNEAdditional(additionalParent, viewNet, type, tag, name, blockMovement, +{}, laneParents, {}, {additionalParent}, {}, {}, {}, {}, {}, {}), +myPositionOverLane(pos), +myFreq(freq), +myFilename(filename), +myFriendlyPosition(friendlyPos) { } @@ -59,18 +64,29 @@ } +GNELane* +GNEDetector::getLane() const { + return getLaneParents().front(); +} + + Position GNEDetector::getPositionInView() const { - if (myPositionOverLane < 0) { - return getLane()->getShape().front(); - } else if (myPositionOverLane > getLane()->getShape().length()) { - return getLane()->getShape().back(); - } else { - return getLane()->getShape().positionAtOffset(myPositionOverLane); - } + return getLane()->getShape().positionAtOffset(getGeometryPositionOverLane()); } +double +GNEDetector::getGeometryPositionOverLane() const { + double fixedPos = myPositionOverLane; + const double len = getLane()->getParentEdge().getNBEdge()->getFinalLength(); + if (fixedPos < 0) { + fixedPos += len; + } + GNEAdditionalHandler::checkAndFixDetectorPosition(fixedPos, len, true); + return fixedPos * getLane()->getLengthGeometryFactor(); +} + std::string GNEDetector::getParentName() const { return getLane()->getMicrosimID(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,8 +37,9 @@ // =========================================================================== GNEDetectorE1::GNEDetectorE1(const std::string& id, GNELane* lane, GNEViewNet* viewNet, double pos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement) : - GNEDetector(id, viewNet, GLO_E1DETECTOR, SUMO_TAG_E1DETECTOR, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement), - myLane(lane) { + GNEDetector(id, viewNet, GLO_E1DETECTOR, SUMO_TAG_E1DETECTOR, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement, { + lane +}) { } @@ -46,38 +47,39 @@ } -bool +bool GNEDetectorE1::isAdditionalValid() const { // with friendly position enabled position are "always fixed" if (myFriendlyPosition) { return true; } else { - return (myPositionOverLane >= 0) && (myPositionOverLane <= myLane->getParentEdge().getNBEdge()->getFinalLength()); + return fabs(myPositionOverLane) <= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); } } -std::string +std::string GNEDetectorE1::getAdditionalProblem() const { - // declare variable for error position + // declare variable for error position std::string errorPosition; + const double len = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); // check positions over lane - if (myPositionOverLane < 0) { + if (myPositionOverLane < -len) { errorPosition = (toString(SUMO_ATTR_POSITION) + " < 0"); } - if (myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength()) { + if (myPositionOverLane > len) { errorPosition = (toString(SUMO_ATTR_POSITION) + " > lanes's length"); } return errorPosition; } -void +void GNEDetectorE1::fixAdditionalProblem() { // declare new position double newPositionOverLane = myPositionOverLane; // fix pos and lenght checkAndFixDetectorPosition - GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, myLane->getParentEdge().getNBEdge()->getFinalLength(), true); + GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), true); // set new position setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myViewNet->getUndoList()); } @@ -90,7 +92,11 @@ newPosition.add(offset); // filtern position using snap to active grid newPosition = myViewNet->snapToActiveGrid(newPosition); - myPositionOverLane = myLane->getShape().nearest_offset_to_point2D(newPosition, false); + const bool storeNegative = myPositionOverLane < 0; + myPositionOverLane = getLaneParents().front()->getShape().nearest_offset_to_point2D(newPosition, false); + if (storeNegative) { + myPositionOverLane -= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + } // Update geometry updateGeometry(false); } @@ -100,7 +106,7 @@ GNEDetectorE1::commitGeometryMoving(GNEUndoList* undoList) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); undoList->p_end(); } @@ -116,8 +122,7 @@ myGeometry.clearGeometry(); // obtain position over lane - double fixedPositionOverLane = myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength() ? myLane->getParentEdge().getNBEdge()->getFinalLength() : myPositionOverLane < 0 ? 0 : myPositionOverLane; - myGeometry.shape.push_back(myLane->getShape().positionAtOffset(fixedPositionOverLane * myLane->getLengthGeometryFactor())); + myGeometry.shape.push_back(getPositionInView()); // Obtain first position Position f = myGeometry.shape[0] - Position(1, 0); @@ -126,7 +131,7 @@ Position s = myGeometry.shape[0] + Position(1, 0); // Save rotation (angle) of the vector constructed by points f and s - myGeometry.shapeRotations.push_back(myLane->getShape().rotationDegreeAtOffset(fixedPositionOverLane) * -1); + myGeometry.shapeRotations.push_back(getLaneParents().front()->getShape().rotationDegreeAtOffset(getGeometryPositionOverLane()) * -1); // Set block icon position myBlockIcon.position = myGeometry.shape.getLineCenter(); @@ -135,7 +140,7 @@ myBlockIcon.offset = Position(-1, 0); // Set block icon rotation, and using their rotation for logo - myBlockIcon.setRotation(myLane); + myBlockIcon.setRotation(getLaneParents().front()); // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -144,12 +149,6 @@ } -GNELane* -GNEDetectorE1::getLane() const { - return myLane; -} - - void GNEDetectorE1::drawGL(const GUIVisualizationSettings& s) const { // get values @@ -159,7 +158,7 @@ const double exaggeration = s.addSize.getExaggeration(s, this); // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_E1); @@ -185,7 +184,7 @@ // outline if isn't being drawn for selecting if ((width * exaggeration > 1) && !s.drawForSelecting) { // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(RGBColor::WHITE); @@ -203,7 +202,7 @@ // position indicator if isn't being drawn for selecting if ((width * exaggeration > 1) && !s.drawForSelecting) { // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(RGBColor::WHITE); @@ -229,7 +228,7 @@ //move to logo position glTranslated(-1, 0, 0); // draw E1 logo - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("E1", Position(), .1, 1.5, s.selectionColor); } else { GLHelper::drawText("E1", Position(), .1, 1.5, RGBColor::BLACK); @@ -261,7 +260,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_POSITION: return toString(myPositionOverLane); case SUMO_ATTR_FREQUENCY: @@ -303,7 +302,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -324,7 +323,7 @@ return false; } case SUMO_ATTR_POSITION: - return canParse(value); + return canParse(value) && fabs(parse(value)) < getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); case SUMO_ATTR_FREQUENCY: return (canParse(value) && (parse(value) >= 0)); case SUMO_ATTR_NAME: @@ -361,7 +360,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_POSITION: myPositionOverLane = parse(value); @@ -397,8 +396,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -64,12 +64,6 @@ void fixAdditionalProblem(); /// @} - /// @name inherited from GNEDetector - /// @{ - /// @brief get lane - GNELane* getLane() const; - /// @} - /// @name Functions related with geometry of element /// @{ /**@brief change the position of the element geometry without saving in undoList @@ -118,10 +112,6 @@ bool isValid(SumoXMLAttr key, const std::string& value); /// @} -protected: - /// @brief The lane in which this detector is placed - GNELane* myLane; - private: /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,8 +37,9 @@ // =========================================================================== GNEDetectorE1Instant::GNEDetectorE1Instant(const std::string& id, GNELane* lane, GNEViewNet* viewNet, double pos, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement) : - GNEDetector(id, viewNet, GLO_E1DETECTOR_INSTANT, SUMO_TAG_INSTANT_INDUCTION_LOOP, pos, 0, filename, vehicleTypes, name, friendlyPos, blockMovement), - myLane(lane) { + GNEDetector(id, viewNet, GLO_E1DETECTOR_INSTANT, SUMO_TAG_INSTANT_INDUCTION_LOOP, pos, 0, filename, vehicleTypes, name, friendlyPos, blockMovement, { + lane +}) { } @@ -46,38 +47,39 @@ } -bool +bool GNEDetectorE1Instant::isAdditionalValid() const { // with friendly position enabled position are "always fixed" if (myFriendlyPosition) { return true; } else { - return (myPositionOverLane >= 0) && (myPositionOverLane <= myLane->getParentEdge().getNBEdge()->getFinalLength()); + return fabs(myPositionOverLane) <= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); } } -std::string +std::string GNEDetectorE1Instant::getAdditionalProblem() const { - // declare variable for error position + // declare variable for error position std::string errorPosition; + const double len = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); // check positions over lane - if (myPositionOverLane < 0) { + if (myPositionOverLane < -len) { errorPosition = (toString(SUMO_ATTR_POSITION) + " < 0"); } - if (myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength()) { + if (myPositionOverLane > len) { errorPosition = (toString(SUMO_ATTR_POSITION) + " > lanes's length"); } return errorPosition; } -void +void GNEDetectorE1Instant::fixAdditionalProblem() { // declare new position double newPositionOverLane = myPositionOverLane; // fix pos and lenght checkAndFixDetectorPosition - GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, myLane->getParentEdge().getNBEdge()->getFinalLength(), true); + GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), true); // set new position setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myViewNet->getUndoList()); } @@ -90,7 +92,11 @@ newPosition.add(offset); // filtern position using snap to active grid newPosition = myViewNet->snapToActiveGrid(newPosition); - myPositionOverLane = myLane->getShape().nearest_offset_to_point2D(newPosition, false); + const bool storeNegative = myPositionOverLane < 0; + myPositionOverLane = getLaneParents().front()->getShape().nearest_offset_to_point2D(newPosition, false); + if (storeNegative) { + myPositionOverLane -= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + } // Update geometry updateGeometry(false); } @@ -100,7 +106,7 @@ GNEDetectorE1Instant::commitGeometryMoving(GNEUndoList* undoList) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); undoList->p_end(); } @@ -116,8 +122,7 @@ myGeometry.clearGeometry(); // obtain position over lane - double fixedPositionOverLane = myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength() ? myLane->getParentEdge().getNBEdge()->getFinalLength() : myPositionOverLane < 0 ? 0 : myPositionOverLane; - myGeometry.shape.push_back(myLane->getShape().positionAtOffset(fixedPositionOverLane * myLane->getLengthGeometryFactor())); + myGeometry.shape.push_back(getPositionInView()); // Obtain first position Position f = myGeometry.shape[0] - Position(1, 0); @@ -126,7 +131,7 @@ Position s = myGeometry.shape[0] + Position(1, 0); // Save rotation (angle) of the vector constructed by points f and s - myGeometry.shapeRotations.push_back(myLane->getShape().rotationDegreeAtOffset(fixedPositionOverLane) * -1); + myGeometry.shapeRotations.push_back(getLaneParents().front()->getShape().rotationDegreeAtOffset(getGeometryPositionOverLane()) * -1); // Set block icon position myBlockIcon.position = myGeometry.shape.getLineCenter(); @@ -135,7 +140,7 @@ myBlockIcon.offset = Position(-1, 0); // Set block icon rotation, and using their rotation for logo - myBlockIcon.setRotation(myLane); + myBlockIcon.setRotation(getLaneParents().front()); // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -144,12 +149,6 @@ } -GNELane* -GNEDetectorE1Instant::getLane() const { - return myLane; -} - - void GNEDetectorE1Instant::drawGL(const GUIVisualizationSettings& s) const { // get values @@ -159,7 +158,7 @@ const double exaggeration = s.addSize.getExaggeration(s, this); // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(s.SUMO_color_E1Instant); @@ -185,7 +184,7 @@ // outline if isn't being drawn for selecting if ((width * exaggeration > 1) && !s.drawForSelecting) { // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(RGBColor::WHITE); @@ -203,7 +202,7 @@ // position indicator if isn't being drawn for selecting if ((width * exaggeration > 1) && !s.drawForSelecting) { // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(RGBColor::WHITE); @@ -229,7 +228,7 @@ //move to logo position glTranslated(-1, 0, 0); // draw E1 logo - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("E1", Position(), .1, 1.5, s.selectionColor); } else { GLHelper::drawText("E1", Position(), .1, 1.5, RGBColor::BLACK); @@ -254,7 +253,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_POSITION: return toString(myPositionOverLane); case SUMO_ATTR_NAME: @@ -293,7 +292,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -314,7 +313,7 @@ return false; } case SUMO_ATTR_POSITION: - return canParse(value); + return canParse(value) && fabs(parse(value)) < getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); case SUMO_ATTR_NAME: return SUMOXMLDefinitions::isValidAttribute(value); case SUMO_ATTR_FILE: @@ -349,7 +348,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_POSITION: myPositionOverLane = parse(value); @@ -382,8 +381,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE1Instant.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -120,10 +120,6 @@ bool isValid(SumoXMLAttr key, const std::string& value); /// @} -protected: - /// @brief The lane in which this detector is placed - GNELane* myLane; - private: /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE2.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE2.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE2.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE2.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -40,21 +40,21 @@ GNEDetectorE2::GNEDetectorE2(const std::string& id, GNELane* lane, GNEViewNet* viewNet, double pos, double length, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement) : - GNEDetector(id, viewNet, GLO_E2DETECTOR, SUMO_TAG_E2DETECTOR, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement), - myLanes({lane}), - myLength(length), - myEndPositionOverLane(0.), - myTimeThreshold(timeThreshold), - mySpeedThreshold(speedThreshold), - myJamThreshold(jamThreshold), - myE2valid(true) { + GNEDetector(id, viewNet, GLO_E2DETECTOR, SUMO_TAG_E2DETECTOR, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement, { + lane +}), +myLength(length), +myEndPositionOverLane(0.), +myTimeThreshold(timeThreshold), +mySpeedThreshold(speedThreshold), +myJamThreshold(jamThreshold), +myE2valid(true) { } GNEDetectorE2::GNEDetectorE2(const std::string& id, std::vector lanes, GNEViewNet* viewNet, double pos, double endPos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement) : - GNEDetector(id, viewNet, GLO_E2DETECTOR, SUMO_TAG_E2DETECTOR_MULTILANE, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement), - myLanes(lanes), + GNEDetector(id, viewNet, GLO_E2DETECTOR, SUMO_TAG_E2DETECTOR_MULTILANE, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement, lanes), myEndPositionOverLane(endPos), myTimeThreshold(timeThreshold), mySpeedThreshold(speedThreshold), @@ -67,14 +67,14 @@ } -bool +bool GNEDetectorE2::isAdditionalValid() const { - if(myLanes.size() == 1) { + if (getLaneParents().size() == 1) { // with friendly position enabled position are "always fixed" if (myFriendlyPosition) { return true; } else { - return (myPositionOverLane >= 0) && ((myPositionOverLane + myLength) <= myLanes.front()->getParentEdge().getNBEdge()->getFinalLength()); + return (myPositionOverLane >= 0) && ((myPositionOverLane + myLength) <= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()); } } else { // first check if there is connection between all consecutive lanes @@ -83,8 +83,8 @@ if (myFriendlyPosition) { return true; } else { - return (myPositionOverLane >= 0) && ((myPositionOverLane) <= myLanes.back()->getParentEdge().getNBEdge()->getFinalLength() && - myEndPositionOverLane >= 0) && ((myEndPositionOverLane) <= myLanes.back()->getParentEdge().getNBEdge()->getFinalLength()); + return (myPositionOverLane >= 0) && ((myPositionOverLane) <= getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength() && + myEndPositionOverLane >= 0) && ((myEndPositionOverLane) <= getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength()); } } else { return false; @@ -93,19 +93,19 @@ } -std::string +std::string GNEDetectorE2::getAdditionalProblem() const { - // declare variable for error position + // declare variable for error position std::string errorFirstLanePosition, separator, errorLastLanePosition; - if(myLanes.size() == 1) { + if (getLaneParents().size() == 1) { // check positions over lane if (myPositionOverLane < 0) { errorFirstLanePosition = (toString(SUMO_ATTR_POSITION) + " < 0"); } - if (myPositionOverLane > myLanes.front()->getParentEdge().getNBEdge()->getFinalLength()) { + if (myPositionOverLane > getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) { errorFirstLanePosition = (toString(SUMO_ATTR_POSITION) + " > lanes's length"); } - if ((myPositionOverLane + myLength) > myLanes.front()->getParentEdge().getNBEdge()->getFinalLength()) { + if ((myPositionOverLane + myLength) > getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) { errorFirstLanePosition = (toString(SUMO_ATTR_POSITION) + " + " + toString(SUMO_ATTR_LENGTH) + " > lanes's length"); } } else { @@ -114,14 +114,14 @@ if (myPositionOverLane < 0) { errorFirstLanePosition = (toString(SUMO_ATTR_POSITION) + " < 0"); } - if (myPositionOverLane > myLanes.front()->getParentEdge().getNBEdge()->getFinalLength()) { + if (myPositionOverLane > getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) { errorFirstLanePosition = (toString(SUMO_ATTR_POSITION) + " > lanes's length"); } // check positions over last lane if (myEndPositionOverLane < 0) { errorLastLanePosition = (toString(SUMO_ATTR_ENDPOS) + " < 0"); } - if (myEndPositionOverLane > myLanes.back()->getParentEdge().getNBEdge()->getFinalLength()) { + if (myEndPositionOverLane > getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength()) { errorLastLanePosition = (toString(SUMO_ATTR_ENDPOS) + " > lanes's length"); } } else { @@ -137,38 +137,38 @@ } -void +void GNEDetectorE2::fixAdditionalProblem() { - if(myLanes.size() == 1) { + if (getLaneParents().size() == 1) { // obtain position and lenght double newPositionOverLane = myPositionOverLane; double newLength = myLength; // fix pos and lenght using fixE2DetectorPosition - GNEAdditionalHandler::fixE2DetectorPosition(newPositionOverLane, newLength, myLanes.at(0)->getParentEdge().getNBEdge()->getFinalLength(), true); + GNEAdditionalHandler::fixE2DetectorPosition(newPositionOverLane, newLength, getLaneParents().at(0)->getParentEdge().getNBEdge()->getFinalLength(), true); // set new position and length setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myViewNet->getUndoList()); setAttribute(SUMO_ATTR_LENGTH, toString(myLength), myViewNet->getUndoList()); } else { - if(!myE2valid) { + if (!myE2valid) { // build connections between all consecutive lanes bool foundConnection = true; int i = 0; // iterate over all lanes, and stop if myE2valid is false - while (i < ((int)myLanes.size()-1)) { + while (i < ((int)getLaneParents().size() - 1)) { // change foundConnection to false foundConnection = false; // if a connection betwen "from" lane and "to" lane of connection is found, change myE2valid to true again - for (auto j : myLanes.at(i)->getParentEdge().getGNEConnections()) { - if(j->getLaneFrom() == myLanes.at(i) && j->getLaneTo() == myLanes.at(i+1)) { + for (auto j : getLaneParents().at(i)->getParentEdge().getGNEConnections()) { + if (j->getLaneFrom() == getLaneParents().at(i) && j->getLaneTo() == getLaneParents().at(i + 1)) { foundConnection = true; } } // if connection wasn't found - if(!foundConnection) { + if (!foundConnection) { // create new connection manually - NBEdge::Connection newCon(myLanes.at(i)->getIndex(), myLanes.at(i+1)->getParentEdge().getNBEdge(), myLanes.at(i+1)->getIndex()); + NBEdge::Connection newCon(getLaneParents().at(i)->getIndex(), getLaneParents().at(i + 1)->getParentEdge().getNBEdge(), getLaneParents().at(i + 1)->getIndex()); // allow to undo creation of new lane - myViewNet->getUndoList()->add(new GNEChange_Connection(&myLanes.at(i)->getParentEdge(), newCon, false, true), true); + myViewNet->getUndoList()->add(new GNEChange_Connection(&getLaneParents().at(i)->getParentEdge(), newCon, false, true), true); } // update lane iterator i++; @@ -177,13 +177,13 @@ // declare new position double newPositionOverLane = myPositionOverLane; // fix pos and lenght checkAndFixDetectorPosition - GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, myLanes.front()->getParentEdge().getNBEdge()->getFinalLength(), true); + GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), true); // set new position setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myViewNet->getUndoList()); // declare new end position double newEndPositionOverLane = myEndPositionOverLane; // fix pos and lenght checkAndFixDetectorPosition - GNEAdditionalHandler::checkAndFixDetectorPosition(newEndPositionOverLane, myLanes.back()->getParentEdge().getNBEdge()->getFinalLength(), true); + GNEAdditionalHandler::checkAndFixDetectorPosition(newEndPositionOverLane, getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength(), true); // set new position setAttribute(SUMO_ATTR_ENDPOS, toString(newEndPositionOverLane), myViewNet->getUndoList()); } @@ -198,17 +198,27 @@ newPosition.add(offset); // filtern position using snap to active grid newPosition = myViewNet->snapToActiveGrid(newPosition); - double offsetLane = myLanes.front()->getShape().nearest_offset_to_point2D(newPosition, false) - myLanes.front()->getShape().nearest_offset_to_point2D(myMove.originalViewPosition, false); + double offsetLane = getLaneParents().front()->getShape().nearest_offset_to_point2D(newPosition, false) - getLaneParents().front()->getShape().nearest_offset_to_point2D(myMove.originalViewPosition, false); // move geometry depending of number of lanes - if(myLanes.size() == 1) { - myPositionOverLane = parse(myMove.firstOriginalLanePosition) + offsetLane; + if (getLaneParents().size() == 1) { + // calculate new position over lane + double newPositionOverLane = parse(myMove.firstOriginalLanePosition) + offsetLane; + // obtain lane length + double laneLenght = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength() * getLane()->getLengthGeometryFactor(); + if (newPositionOverLane < 0) { + myPositionOverLane = 0; + } else if (newPositionOverLane + myLength > laneLenght) { + myPositionOverLane = laneLenght - myLength; + } else { + myPositionOverLane = newPositionOverLane; + } } else { // calculate new start and end positions double newStartPosition = parse(myMove.firstOriginalLanePosition) + offsetLane; double newEndPosition = parse(myMove.secondOriginalPosition) + offsetLane; // change start and end position of E2 detector ONLY if both extremes aren't overpassed - if((newStartPosition >= 0) && (newStartPosition <= myLanes.front()->getLaneShapeLength()) && - (newEndPosition >= 0) && (newEndPosition <= myLanes.back()->getLaneShapeLength())) { + if ((newStartPosition >= 0) && (newStartPosition <= getLaneParents().front()->getLaneShapeLength()) && + (newEndPosition >= 0) && (newEndPosition <= getLaneParents().back()->getLaneShapeLength())) { myPositionOverLane = newStartPosition; myEndPositionOverLane = newEndPosition; } @@ -221,15 +231,15 @@ void GNEDetectorE2::commitGeometryMoving(GNEUndoList* undoList) { // commit geometry moving depending of number of lanes - if(myLanes.size() == 1) { + if (getLaneParents().size() == 1) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); undoList->p_end(); } else { undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_ENDPOS, toString(myEndPositionOverLane), true, myMove.secondOriginalPosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_ENDPOS, toString(myEndPositionOverLane), true, myMove.secondOriginalPosition)); undoList->p_end(); } } @@ -249,15 +259,15 @@ double startPosFixed, endPosFixed; // calculate start and end positions dependin of number of lanes - if (myLanes.size() == 1) { + if (getLaneParents().size() == 1) { // set shape lane as detector shape - myGeometry.shape = myLanes.front()->getShape(); + myGeometry.shape = getLaneParents().front()->getShape(); // set start position if (myPositionOverLane < 0) { startPosFixed = 0; - } else if (myPositionOverLane > myLanes.back()->getParentEdge().getNBEdge()->getFinalLength()) { - startPosFixed = myLanes.back()->getParentEdge().getNBEdge()->getFinalLength(); + } else if (myPositionOverLane > getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength()) { + startPosFixed = getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength(); } else { startPosFixed = myPositionOverLane; } @@ -265,68 +275,68 @@ // set end position if ((myPositionOverLane + myLength) < 0) { endPosFixed = 0; - } else if ((myPositionOverLane + myLength) > myLanes.back()->getParentEdge().getNBEdge()->getFinalLength()) { - endPosFixed = myLanes.back()->getParentEdge().getNBEdge()->getFinalLength(); + } else if ((myPositionOverLane + myLength) > getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength()) { + endPosFixed = getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength(); } else { endPosFixed = (myPositionOverLane + myLength); } - + // Cut shape using as delimitators fixed start position and fixed end position - myGeometry.shape = myGeometry.shape.getSubpart(startPosFixed * myLanes.front()->getLengthGeometryFactor(), endPosFixed * myLanes.back()->getLengthGeometryFactor()); - + myGeometry.shape = myGeometry.shape.getSubpart(startPosFixed * getLaneParents().front()->getLengthGeometryFactor(), endPosFixed * getLaneParents().back()->getLengthGeometryFactor()); + // Get calculate lenghts and rotations myGeometry.calculateShapeRotationsAndLengths(); // Set block icon position myBlockIcon.position = myGeometry.shape.getLineCenter(); - } else if (myLanes.size() > 1) { + } else if (getLaneParents().size() > 1) { // start with the first lane shape - myGeometry.multiShape.push_back(myLanes.front()->getShape()); - + myGeometry.multiShape.push_back(getLaneParents().front()->getShape()); + // set start position if (myPositionOverLane < 0) { startPosFixed = 0; - } else if (myPositionOverLane > myLanes.front()->getParentEdge().getNBEdge()->getFinalLength()) { - startPosFixed = myLanes.front()->getParentEdge().getNBEdge()->getFinalLength(); + } else if (myPositionOverLane > getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) { + startPosFixed = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); } else { startPosFixed = myPositionOverLane; } // Cut shape using as delimitators fixed start position and fixed end position - myGeometry.multiShape[0] = myGeometry.multiShape[0].getSubpart(startPosFixed * myLanes.front()->getLengthGeometryFactor(), myLanes.front()->getParentEdge().getNBEdge()->getFinalLength()); - + myGeometry.multiShape[0] = myGeometry.multiShape[0].getSubpart(startPosFixed * getLaneParents().front()->getLengthGeometryFactor(), getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()); + // declare last shape - PositionVector lastShape = myLanes.back()->getShape(); + PositionVector lastShape = getLaneParents().back()->getShape(); // set end position if (myEndPositionOverLane < 0) { endPosFixed = 0; - } else if (myEndPositionOverLane > myLanes.back()->getParentEdge().getNBEdge()->getFinalLength()) { - endPosFixed = myLanes.back()->getParentEdge().getNBEdge()->getFinalLength(); + } else if (myEndPositionOverLane > getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength()) { + endPosFixed = getLaneParents().back()->getParentEdge().getNBEdge()->getFinalLength(); } else { endPosFixed = myEndPositionOverLane; } // Cut shape using as delimitators fixed start position and fixed end position - lastShape = lastShape.getSubpart(0, endPosFixed * myLanes.back()->getLengthGeometryFactor()); + lastShape = lastShape.getSubpart(0, endPosFixed * getLaneParents().back()->getLengthGeometryFactor()); // add first shape connection (if exist, in other case leave it empty) - myGeometry.multiShape.push_back(PositionVector{myLanes.at(0)->getShape().back(), myLanes.at(1)->getShape().front()}); - for (auto j : myLanes.at(0)->getParentEdge().getGNEConnections()) { - if (j->getLaneTo() == myLanes.at(1)) { + myGeometry.multiShape.push_back(PositionVector{getLaneParents().at(0)->getShape().back(), getLaneParents().at(1)->getShape().front()}); + for (auto j : getLaneParents().at(0)->getParentEdge().getGNEConnections()) { + if (j->getLaneTo() == getLaneParents().at(1)) { myGeometry.multiShape.back() = j->getShape(); } } // append shapes of intermediate lanes AND connections (if exist) - for (int i = 1; i < ((int)myLanes.size() - 1); i++) { + for (int i = 1; i < ((int)getLaneParents().size() - 1); i++) { // add lane shape - myGeometry.multiShape.push_back(myLanes.at(i)->getShape()); + myGeometry.multiShape.push_back(getLaneParents().at(i)->getShape()); // add empty shape for connection - myGeometry.multiShape.push_back(PositionVector{myLanes.at(i)->getShape().back(), myLanes.at(i+1)->getShape().front()}); + myGeometry.multiShape.push_back(PositionVector{getLaneParents().at(i)->getShape().back(), getLaneParents().at(i + 1)->getShape().front()}); // set connection shape (if exist). In other case, insert an empty shape - for (auto j : myLanes.at(i)->getParentEdge().getGNEConnections()) { - if (j->getLaneTo() == myLanes.at(i+1)) { + for (auto j : getLaneParents().at(i)->getParentEdge().getGNEConnections()) { + if (j->getLaneTo() == getLaneParents().at(i + 1)) { myGeometry.multiShape.back() = j->getShape(); } } @@ -352,7 +362,7 @@ myBlockIcon.offset = Position(-0.75, 0); // Set block icon rotation, and using their rotation for draw logo - myBlockIcon.setRotation(myLanes.front()); + myBlockIcon.setRotation(getLaneParents().front()); // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -367,18 +377,18 @@ } -void +void GNEDetectorE2::checkE2MultilaneIntegrity() { // we assume that E2 is valid myE2valid = true; int i = 0; // iterate over all lanes, and stop if myE2valid is false - while (i < ((int)myLanes.size()-1) && myE2valid) { + while (i < ((int)getLaneParents().size() - 1) && myE2valid) { // set myE2valid to false myE2valid = false; // if a connection betwen "from" lane and "to" lane of connection is found, change myE2valid to true again - for (auto j : myLanes.at(i)->getParentEdge().getGNEConnections()) { - if(j->getLaneFrom() == myLanes.at(i) && j->getLaneTo() == myLanes.at(i+1)) { + for (auto j : getLaneParents().at(i)->getParentEdge().getGNEConnections()) { + if (j->getLaneFrom() == getLaneParents().at(i) && j->getLaneTo() == getLaneParents().at(i + 1)) { myE2valid = true; } } @@ -388,12 +398,6 @@ } -GNELane* -GNEDetectorE2::getLane() const { - return myLanes.front(); -} - - void GNEDetectorE2::drawGL(const GUIVisualizationSettings& s) const { // Start drawing adding an gl identificator @@ -406,11 +410,11 @@ glTranslated(0, 0, getType()); // Set color of the base - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { // set color depending if is or isn't valid - if(myE2valid) { + if (myE2valid) { GLHelper::setColor(s.SUMO_color_E2); } else { GLHelper::setColor(RGBColor::RED); @@ -421,14 +425,14 @@ const double exaggeration = s.addSize.getExaggeration(s, this); // check if we have to drawn a E2 single lane or a E2 multiLane - if(myGeometry.shape.size() > 0) { + if (myGeometry.shape.size() > 0) { // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration GLHelper::drawBoxLines(myGeometry.shape, myGeometry.shapeRotations, myGeometry.shapeLengths, exaggeration); } else { // iterate over multishapes for (int i = 0; i < (int)myGeometry.multiShape.size(); i++) { // don't draw shapes over connections if "show connections" is enabled - if (!myViewNet->showConnections() || (i%2==0)) { + if (!myViewNet->getViewOptions().showConnections() || (i % 2 == 0)) { GLHelper::drawBoxLines(myGeometry.multiShape.at(i), myGeometry.multiShapeRotations.at(i), myGeometry.multiShapeLengths.at(i), exaggeration); } } @@ -440,7 +444,7 @@ // Check if the distance is enougth to draw details and isn't being drawn for selecting if ((s.scale * exaggeration >= 10) && !s.drawForSelecting) { // draw logo depending if this is an Multilane E2 detector - if(myTagProperty.getTag() == SUMO_TAG_E2DETECTOR) { + if (myTagProperty.getTag() == SUMO_TAG_E2DETECTOR) { // Push matrix glPushMatrix(); // Traslate to center of detector @@ -450,7 +454,7 @@ //move to logo position glTranslated(-0.75, 0, 0); // draw E2 logo - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("E2", Position(), .1, 1.5, s.selectionColor); } else { GLHelper::drawText("E2", Position(), .1, 1.5, RGBColor::BLACK); @@ -465,7 +469,7 @@ //move to logo position glTranslated(-1.5, 0, 0); // draw E2 logo - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("E2", Position(), .1, 1.5, s.selectionColor); } else { GLHelper::drawText("E2", Position(), .1, 1.5, RGBColor::BLACK); @@ -474,7 +478,7 @@ glTranslated(1.2, 0, 0); // Rotate depending of myBlockIcon.rotation glRotated(90, 0, 0, 1); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("multi", Position(), .1, 0.9, s.selectedAdditionalColor); } else { GLHelper::drawText("multi", Position(), .1, 0.9, RGBColor::BLACK); @@ -493,7 +497,7 @@ } // check if dotted contour has to be drawn if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { - if(myGeometry.shape.size() > 0) { + if (myGeometry.shape.size() > 0) { GLHelper::drawShapeDottedContour(getType(), myGeometry.shape, exaggeration); } else { GLHelper::drawShapeDottedContour(getType(), myGeometry.multiShapeUnified, exaggeration); @@ -511,7 +515,7 @@ return getAdditionalID(); case SUMO_ATTR_LANE: case SUMO_ATTR_LANES: - return parseIDs(myLanes); + return parseIDs(getLaneParents()); case SUMO_ATTR_POSITION: return toString(myPositionOverLane); case SUMO_ATTR_ENDPOS: @@ -569,7 +573,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -646,7 +650,7 @@ break; case SUMO_ATTR_LANE: case SUMO_ATTR_LANES: - myLanes = parse >(myViewNet->getNet(), value); + changeLaneParents(this, value); checkE2MultilaneIntegrity(); break; case SUMO_ATTR_POSITION: @@ -698,8 +702,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE2.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE2.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE2.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE2.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,7 +52,7 @@ * @param[in] block movement enable or disable additional movement */ GNEDetectorE2(const std::string& id, GNELane* lane, GNEViewNet* viewNet, double pos, double length, double freq, const std::string& filename, const std::string& vehicleTypes, - const std::string& name , const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); + const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); /**@brief Constructor for Multi-Lane detectors * @param[in] id The storage of gl-ids to get the one for this lane representation from @@ -71,7 +71,7 @@ * @param[in] block movement enable or disable additional movement */ GNEDetectorE2(const std::string& id, std::vector lanes, GNEViewNet* viewNet, double pos, double endPos, double freq, const std::string& filename, const std::string& vehicleTypes, - const std::string& name , const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); + const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement); /// @brief Destructor ~GNEDetectorE2(); @@ -94,12 +94,6 @@ /// @brief check if E2 is valid (all of their lanes are connected, it must called after every operation which involves lane's connections) void checkE2MultilaneIntegrity(); - /// @name inherited from GNEDetector - /// @{ - /// @brief get lane - GNELane* getLane() const; - /// @} - /// @name Functions related with geometry of element /// @{ /**@brief change the position of the element geometry without saving in undoList @@ -149,9 +143,6 @@ /// @} protected: - /// @brief E2 lanes (Single lanes uses only the first lane) - std::vector myLanes; - /// @brief E2 detector length double myLength; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE3.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE3.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE3.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE3.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,13 +36,13 @@ // =========================================================================== GNEDetectorE3::GNEDetectorE3(const std::string& id, GNEViewNet* viewNet, Position pos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, bool blockMovement) : - GNEAdditional(id, viewNet, GLO_E3DETECTOR, SUMO_TAG_E3DETECTOR, name, blockMovement), - myPosition(pos), - myFreq(freq), - myFilename(filename), - myVehicleTypes(vehicleTypes), - myTimeThreshold(timeThreshold), - mySpeedThreshold(speedThreshold) { + GNEAdditional(id, viewNet, GLO_E3DETECTOR, SUMO_TAG_E3DETECTOR, name, blockMovement, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}), + myPosition(pos), + myFreq(freq), + myFilename(filename), + myVehicleTypes(vehicleTypes), + myTimeThreshold(timeThreshold), +mySpeedThreshold(speedThreshold) { } @@ -103,7 +103,7 @@ GNEDetectorE3::commitGeometryMoving(GNEUndoList* undoList) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); undoList->p_end(); } @@ -130,7 +130,7 @@ } else { glColor3d(1, 1, 1); glRotated(180, 0, 0, 1); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_E3SELECTED), 1); } else { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_E3), 1); @@ -143,7 +143,7 @@ // Show Lock icon depending of the Edit mode myBlockIcon.draw(0.4); // Draw connections - myChildConnections.draw(); + myChildConnections.draw(getType()); } // Draw name if isn't being drawn for selecting if (!s.drawForSelecting) { @@ -201,10 +201,10 @@ switch (key) { case SUMO_ATTR_ID: { // change ID of Entry - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); // Change Ids of all Entry/Exits childs - for (auto i : myAdditionalChilds) { - i->setAttribute(SUMO_ATTR_ID, generateAdditionalChildID(i->getTagProperty().getTag()), undoList); + for (auto i : getAdditionalChilds()) { + i->setAttribute(SUMO_ATTR_ID, generateChildID(i->getTagProperty().getTag()), undoList); } break; } @@ -218,7 +218,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -266,7 +266,7 @@ int numEntrys = 0; int numExits = 0; // iterate over additional chidls and obtain number of entrys and exits - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { if (i->getTagProperty().getTag() == SUMO_TAG_DET_ENTRY) { numEntrys++; } else if (i->getTagProperty().getTag() == SUMO_TAG_DET_EXIT) { @@ -343,8 +343,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE3.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE3.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorE3.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorE3.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,372 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNEDetectorEntry.cpp -/// @author Pablo Alvarez Lopez -/// @date Nov 2015 -/// @version $Id$ -/// -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GNEDetectorEntry.h" -#include "GNEAdditionalHandler.h" - - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNEDetectorEntry::GNEDetectorEntry(GNEViewNet* viewNet, GNEAdditional* parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement) : - GNEDetector(parent, viewNet, GLO_DET_ENTRY, SUMO_TAG_DET_ENTRY, pos, 0, "", "", friendlyPos, blockMovement), - myLane(lane) { -} - - -GNEDetectorEntry::~GNEDetectorEntry() {} - - -bool -GNEDetectorEntry::isAdditionalValid() const { - // with friendly position enabled position are "always fixed" - if (myFriendlyPosition) { - return true; - } else { - return (myPositionOverLane >= 0) && (myPositionOverLane <= myLane->getParentEdge().getNBEdge()->getFinalLength()); - } -} - - -std::string -GNEDetectorEntry::getAdditionalProblem() const { - // declare variable for error position - std::string errorPosition; - // check positions over lane - if (myPositionOverLane < 0) { - errorPosition = (toString(SUMO_ATTR_POSITION) + " < 0"); - } - if (myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength()) { - errorPosition = (toString(SUMO_ATTR_POSITION) + " > lanes's length"); - } - return errorPosition; -} - - -void -GNEDetectorEntry::fixAdditionalProblem() { - // declare new position - double newPositionOverLane = myPositionOverLane; - // fix pos and lenght checkAndFixDetectorPosition - GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, myLane->getParentEdge().getNBEdge()->getFinalLength(), true); - // set new position - setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myViewNet->getUndoList()); -} - - -void -GNEDetectorEntry::moveGeometry(const Position& offset) { - // Calculate new position using old position - Position newPosition = myMove.originalViewPosition; - newPosition.add(offset); - // filtern position using snap to active grid - newPosition = myViewNet->snapToActiveGrid(newPosition); - myPositionOverLane = myLane->getShape().nearest_offset_to_point2D(newPosition, false); - // Update geometry - updateGeometry(false); -} - - -void -GNEDetectorEntry::commitGeometryMoving(GNEUndoList* undoList) { - // commit new position allowing undo/redo - undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); - undoList->p_end(); -} - - -void -GNEDetectorEntry::updateGeometry(bool updateGrid) { - // first check if object has to be removed from grid (SUMOTree) - if (updateGrid) { - myViewNet->getNet()->removeGLObjectFromGrid(this); - } - - // Clear all containers - myGeometry.clearGeometry(); - - // obtain position over lane - double fixedPositionOverLane = myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength() ? myLane->getParentEdge().getNBEdge()->getFinalLength() : myPositionOverLane < 0 ? 0 : myPositionOverLane; - myGeometry.shape.push_back(myLane->getShape().positionAtOffset(fixedPositionOverLane * myLane->getLengthGeometryFactor())); - - // Save rotation (angle) of the vector constructed by points f and s - myGeometry.shapeRotations.push_back(myLane->getShape().rotationDegreeAtOffset(fixedPositionOverLane) * -1); - - // Set block icon position - myBlockIcon.position = myGeometry.shape.getLineCenter(); - - // Set block icon rotation, and using their rotation for logo - myBlockIcon.setRotation(myLane); - - // last step is to check if object has to be added into grid (SUMOTree) again - if (updateGrid) { - myViewNet->getNet()->addGLObjectIntoGrid(this); - } - - // update E3 parent Geometry - myFirstAdditionalParent->updateGeometry(updateGrid); -} - - -GNELane* -GNEDetectorEntry::getLane() const { - return myLane; -} - - -void -GNEDetectorEntry::drawGL(const GUIVisualizationSettings& s) const { - // Start drawing adding gl identificator - glPushName(getGlID()); - - // Push detector matrix - glPushMatrix(); - glTranslated(0, 0, getType()); - - // Set initial values - if (isAttributeCarrierSelected()) { - GLHelper::setColor(s.selectedAdditionalColor); - } else { - GLHelper::setColor(s.SUMO_color_E3Entry); - } - const double exaggeration = s.addSize.getExaggeration(s, this); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - // Push polygon matrix - glPushMatrix(); - glScaled(exaggeration, exaggeration, 1); - glTranslated(myGeometry.shape[0].x(), myGeometry.shape[0].y(), 0); - glRotated(myGeometry.shapeRotations[0], 0, 0, 1); - - // draw details if isn't being drawn for selecting - if (!s.drawForSelecting) { - // Draw polygon - glBegin(GL_LINES); - glVertex2d(1.7, 0); - glVertex2d(-1.7, 0); - glEnd(); - glBegin(GL_QUADS); - glVertex2d(-1.7, .5); - glVertex2d(-1.7, -.5); - glVertex2d(1.7, -.5); - glVertex2d(1.7, .5); - glEnd(); - - // first Arrow - glTranslated(1.5, 0, 0); - GLHelper::drawBoxLine(Position(0, 4), 0, 2, .05); - GLHelper::drawTriangleAtEnd(Position(0, 4), Position(0, 1), (double) 1, (double) .25); - - // second Arrow - glTranslated(-3, 0, 0); - GLHelper::drawBoxLine(Position(0, 4), 0, 2, .05); - GLHelper::drawTriangleAtEnd(Position(0, 4), Position(0, 1), (double) 1, (double) .25); - } else { - // Draw square in drawy for selecting mode - glBegin(GL_QUADS); - glVertex2d(-1.7, 4.3); - glVertex2d(-1.7, -.5); - glVertex2d(1.7, -.5); - glVertex2d(1.7, 4.3); - glEnd(); - } - - // Pop polygon matrix - glPopMatrix(); - - // Pop detector matrix - glPopMatrix(); - - // Check if the distance is enought to draw details - if (!s.drawForSelecting && ((s.scale * exaggeration) >= 10)) { - // Push matrix - glPushMatrix(); - // Traslate to center of detector - glTranslated(myGeometry.shape.getLineCenter().x(), myGeometry.shape.getLineCenter().y(), getType() + 0.1); - // Rotate depending of myBlockIcon.rotation - glRotated(myBlockIcon.rotation, 0, 0, -1); - //move to logo position - glTranslated(1.9, 0, 0); - // draw Entry logo if isn't being drawn for selecting - if (s.drawForSelecting) { - GLHelper::setColor(s.SUMO_color_E3Entry); - GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1); - } else if (isAttributeCarrierSelected()) { - GLHelper::drawText("E3", Position(), .1, 2.8, s.selectedAdditionalColor); - } else { - GLHelper::drawText("E3", Position(), .1, 2.8, s.SUMO_color_E3Entry); - } - //move to logo position - glTranslated(1.7, 0, 0); - // Rotate depending of myBlockIcon.rotation - glRotated(90, 0, 0, 1); - // draw Entry text if isn't being drawn for selecting - if (s.drawForSelecting) { - GLHelper::setColor(s.SUMO_color_E3Entry); - GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1); - } else if (isAttributeCarrierSelected()) { - GLHelper::drawText("Entry", Position(), .1, 1, s.selectedAdditionalColor); - } else { - GLHelper::drawText("Entry", Position(), .1, 1, s.SUMO_color_E3Entry); - } - // pop matrix - glPopMatrix(); - // Show Lock icon depending of the Edit mode and if isn't being drawn for selecting - if (!s.drawForSelecting) { - myBlockIcon.draw(0.4); - } - } - // Draw name if isn't being drawn for selecting - if (!s.drawForSelecting) { - drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); - } - // check if dotted contour has to be drawn - if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { - GLHelper::drawShapeDottedContour(getType(), myGeometry.shape[0], 3.4, 5, myGeometry.shapeRotations[0], 0, 2); - } - // pop gl identificator - glPopName(); -} - - -std::string -GNEDetectorEntry::getAttribute(SumoXMLAttr key) const { - switch (key) { - case SUMO_ATTR_ID: - return getAdditionalID(); - case SUMO_ATTR_LANE: - return myLane->getID(); - case SUMO_ATTR_POSITION: - return toString(myPositionOverLane); - case SUMO_ATTR_FRIENDLY_POS: - return toString(myFriendlyPosition); - case GNE_ATTR_BLOCK_MOVEMENT: - return toString(myBlockMovement); - case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); - case GNE_ATTR_SELECTED: - return toString(isAttributeCarrierSelected()); - case GNE_ATTR_GENERIC: - return getGenericParametersStr(); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -void -GNEDetectorEntry::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { - if (value == getAttribute(key)) { - return; //avoid needless changes, later logic relies on the fact that attributes have changed - } - switch (key) { - case SUMO_ATTR_ID: - case SUMO_ATTR_LANE: - case SUMO_ATTR_POSITION: - case SUMO_ATTR_FRIENDLY_POS: - case GNE_ATTR_BLOCK_MOVEMENT: - case GNE_ATTR_PARENT: - case GNE_ATTR_SELECTED: - case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -bool -GNEDetectorEntry::isValid(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - return isValidAdditionalID(value); - case SUMO_ATTR_LANE: - return (myViewNet->getNet()->retrieveLane(value, false) != nullptr); - case SUMO_ATTR_POSITION: - return canParse(value); - case SUMO_ATTR_FRIENDLY_POS: - return canParse(value); - case GNE_ATTR_BLOCK_MOVEMENT: - return canParse(value); - case GNE_ATTR_PARENT: - return (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, value, false) != nullptr); - case GNE_ATTR_SELECTED: - return canParse(value); - case GNE_ATTR_GENERIC: - return isGenericParametersValid(value); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - -void -GNEDetectorEntry::setAttribute(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - changeAdditionalID(value); - break; - case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); - break; - case SUMO_ATTR_POSITION: - myPositionOverLane = parse(value); - break; - case SUMO_ATTR_FRIENDLY_POS: - myFriendlyPosition = parse(value); - break; - case GNE_ATTR_BLOCK_MOVEMENT: - myBlockMovement = parse(value); - break; - case GNE_ATTR_PARENT: - changeFirstAdditionalParent(value); - break; - case GNE_ATTR_SELECTED: - if (parse(value)) { - selectAttributeCarrier(); - } else { - unselectAttributeCarrier(); - } - break; - case GNE_ATTR_GENERIC: - setGenericParametersStr(value); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { - updateGeometry(true); - } -} - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,398 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDetectorEntryExit.cpp +/// @author Pablo Alvarez Lopez +/// @date Nov 2015 +/// @version $Id$ +/// +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEDetectorEntryExit.h" +#include "GNEAdditionalHandler.h" + + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEDetectorEntryExit::GNEDetectorEntryExit(SumoXMLTag entryExitTag, GNEViewNet* viewNet, GNEAdditional* parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement) : + GNEDetector(parent, viewNet, GLO_DET_ENTRY, entryExitTag, pos, 0, "", "", friendlyPos, blockMovement, { + lane +}) { + //check that this is a TAZ Source OR a TAZ Sink + if ((entryExitTag != SUMO_TAG_DET_ENTRY) && (entryExitTag != SUMO_TAG_DET_EXIT)) { + throw InvalidArgument("Invalid E3 Child Tag"); + } +} + + +GNEDetectorEntryExit::~GNEDetectorEntryExit() {} + + +bool +GNEDetectorEntryExit::isAdditionalValid() const { + // with friendly position enabled position are "always fixed" + if (myFriendlyPosition) { + return true; + } else { + return fabs(myPositionOverLane) <= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + } +} + + +std::string +GNEDetectorEntryExit::getAdditionalProblem() const { + // declare variable for error position + std::string errorPosition; + const double len = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + // check positions over lane + if (myPositionOverLane < -len) { + errorPosition = (toString(SUMO_ATTR_POSITION) + " < 0"); + } + if (myPositionOverLane > len) { + errorPosition = (toString(SUMO_ATTR_POSITION) + " > lanes's length"); + } + return errorPosition; +} + + +void +GNEDetectorEntryExit::fixAdditionalProblem() { + // declare new position + double newPositionOverLane = myPositionOverLane; + // fix pos and lenght checkAndFixDetectorPosition + GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), true); + // set new position + setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myViewNet->getUndoList()); +} + + +void +GNEDetectorEntryExit::moveGeometry(const Position& offset) { + // Calculate new position using old position + Position newPosition = myMove.originalViewPosition; + newPosition.add(offset); + // filtern position using snap to active grid + newPosition = myViewNet->snapToActiveGrid(newPosition); + const bool storeNegative = myPositionOverLane < 0; + myPositionOverLane = getLaneParents().front()->getShape().nearest_offset_to_point2D(newPosition, false); + if (storeNegative) { + myPositionOverLane -= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + } + // Update geometry + updateGeometry(false); +} + + +void +GNEDetectorEntryExit::commitGeometryMoving(GNEUndoList* undoList) { + // commit new position allowing undo/redo + undoList->p_begin("position of " + getTagStr()); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); + undoList->p_end(); +} + + +void +GNEDetectorEntryExit::updateGeometry(bool updateGrid) { + // first check if object has to be removed from grid (SUMOTree) + if (updateGrid) { + myViewNet->getNet()->removeGLObjectFromGrid(this); + } + + // Clear all containers + myGeometry.clearGeometry(); + + // obtain position over lane + myGeometry.shape.push_back(getPositionInView()); + + // Obtain first position + Position f = myGeometry.shape[0] - Position(1, 0); + + // Obtain next position + Position s = myGeometry.shape[0] + Position(1, 0); + + // Save rotation (angle) of the vector constructed by points f and s + myGeometry.shapeRotations.push_back(getLaneParents().front()->getShape().rotationDegreeAtOffset(getGeometryPositionOverLane()) * -1); + + // Set block icon position + myBlockIcon.position = myGeometry.shape.getLineCenter(); + + // Set offset of the block icon + myBlockIcon.offset = Position(-1, 0); + + // Set block icon rotation, and using their rotation for logo + myBlockIcon.setRotation(getLaneParents().front()); + + // last step is to check if object has to be added into grid (SUMOTree) again + if (updateGrid) { + myViewNet->getNet()->addGLObjectIntoGrid(this); + } + + // update E3 parent Geometry + getAdditionalParents().at(0)->updateGeometry(updateGrid); +} + + +void +GNEDetectorEntryExit::drawGL(const GUIVisualizationSettings& s) const { + // Start drawing adding gl identificator + glPushName(getGlID()); + + // Push detector matrix + glPushMatrix(); + glTranslated(0, 0, getType()); + + // Set color + if (drawUsingSelectColor()) { + GLHelper::setColor(s.selectedAdditionalColor); + } else if (myTagProperty.getTag() == SUMO_TAG_DET_ENTRY) { + GLHelper::setColor(s.SUMO_color_E3Entry); + } else if (myTagProperty.getTag() == SUMO_TAG_DET_EXIT) { + GLHelper::setColor(s.SUMO_color_E3Exit); + } + + // Set initial values + const double exaggeration = s.addSize.getExaggeration(s, this); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + + // Push polygon matrix + glPushMatrix(); + glScaled(exaggeration, exaggeration, 1); + glTranslated(myGeometry.shape[0].x(), myGeometry.shape[0].y(), 0); + glRotated(myGeometry.shapeRotations[0], 0, 0, 1); + + // draw details if isn't being drawn for selecting + if (!s.drawForSelecting) { + // Draw polygon + glBegin(GL_LINES); + glVertex2d(1.7, 0); + glVertex2d(-1.7, 0); + glEnd(); + glBegin(GL_QUADS); + glVertex2d(-1.7, .5); + glVertex2d(-1.7, -.5); + glVertex2d(1.7, -.5); + glVertex2d(1.7, .5); + glEnd(); + + // first Arrow + glTranslated(1.5, 0, 0); + GLHelper::drawBoxLine(Position(0, 4), 0, 2, .05); + GLHelper::drawTriangleAtEnd(Position(0, 4), Position(0, 1), (double) 1, (double) .25); + + // second Arrow + glTranslated(-3, 0, 0); + GLHelper::drawBoxLine(Position(0, 4), 0, 2, .05); + GLHelper::drawTriangleAtEnd(Position(0, 4), Position(0, 1), (double) 1, (double) .25); + } else { + // Draw square in drawy for selecting mode + glBegin(GL_QUADS); + glVertex2d(-1.7, 4.3); + glVertex2d(-1.7, -.5); + glVertex2d(1.7, -.5); + glVertex2d(1.7, 4.3); + glEnd(); + } + + // Pop polygon matrix + glPopMatrix(); + + // Pop detector matrix + glPopMatrix(); + + // Check if the distance is enought to draw details + if (!s.drawForSelecting && ((s.scale * exaggeration) >= 10)) { + // Push matrix + glPushMatrix(); + // Traslate to center of detector + glTranslated(myGeometry.shape.getLineCenter().x(), myGeometry.shape.getLineCenter().y(), getType() + 0.1); + // Rotate depending of myBlockIcon.rotation + glRotated(myBlockIcon.rotation, 0, 0, -1); + //move to logo position + glTranslated(1.9, 0, 0); + // draw Entry or Exit logo if isn't being drawn for selecting + if (s.drawForSelecting) { + GLHelper::setColor(s.SUMO_color_E3Entry); + GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1); + } else if (drawUsingSelectColor()) { + GLHelper::drawText("E3", Position(), .1, 2.8, s.selectedAdditionalColor); + } else if (myTagProperty.getTag() == SUMO_TAG_DET_ENTRY) { + GLHelper::drawText("E3", Position(), .1, 2.8, s.SUMO_color_E3Entry); + } else if (myTagProperty.getTag() == SUMO_TAG_DET_EXIT) { + GLHelper::drawText("E3", Position(), .1, 2.8, s.SUMO_color_E3Exit); + } + //move to logo position + glTranslated(1.7, 0, 0); + // Rotate depending of myBlockIcon.rotation + glRotated(90, 0, 0, 1); + // draw Entry or Exit text if isn't being drawn for selecting + if (s.drawForSelecting) { + GLHelper::setColor(s.SUMO_color_E3Entry); + GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1); + } else if (drawUsingSelectColor()) { + if (myTagProperty.getTag() == SUMO_TAG_DET_ENTRY) { + GLHelper::drawText("Entry", Position(), .1, 1, s.selectedAdditionalColor); + } else if (myTagProperty.getTag() == SUMO_TAG_DET_EXIT) { + GLHelper::drawText("Exit", Position(), .1, 1, s.selectedAdditionalColor); + } + } else { + if (myTagProperty.getTag() == SUMO_TAG_DET_ENTRY) { + GLHelper::drawText("Entry", Position(), .1, 1, s.SUMO_color_E3Entry); + } else if (myTagProperty.getTag() == SUMO_TAG_DET_EXIT) { + GLHelper::drawText("Exit", Position(), .1, 1, s.SUMO_color_E3Exit); + } + } + // pop matrix + glPopMatrix(); + // Show Lock icon depending of the Edit mode and if isn't being drawn for selecting + if (!s.drawForSelecting) { + myBlockIcon.draw(0.4); + } + } + // Draw name if isn't being drawn for selecting + if (!s.drawForSelecting) { + drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); + } + // check if dotted contour has to be drawn + if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { + GLHelper::drawShapeDottedContour(getType(), myGeometry.shape[0], 3.4, 5, myGeometry.shapeRotations[0], 0, 2); + } + // pop gl identificator + glPopName(); +} + + +std::string +GNEDetectorEntryExit::getAttribute(SumoXMLAttr key) const { + switch (key) { + case SUMO_ATTR_ID: + return getAdditionalID(); + case SUMO_ATTR_LANE: + return getLaneParents().front()->getID(); + case SUMO_ATTR_POSITION: + return toString(myPositionOverLane); + case SUMO_ATTR_FRIENDLY_POS: + return toString(myFriendlyPosition); + case GNE_ATTR_BLOCK_MOVEMENT: + return toString(myBlockMovement); + case GNE_ATTR_PARENT: + return getAdditionalParents().at(0)->getID(); + case GNE_ATTR_SELECTED: + return toString(isAttributeCarrierSelected()); + case GNE_ATTR_GENERIC: + return getGenericParametersStr(); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +void +GNEDetectorEntryExit::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { + if (value == getAttribute(key)) { + return; //avoid needless changes, later logic relies on the fact that attributes have changed + } + switch (key) { + case SUMO_ATTR_ID: + case SUMO_ATTR_LANE: + case SUMO_ATTR_POSITION: + case SUMO_ATTR_FRIENDLY_POS: + case GNE_ATTR_BLOCK_MOVEMENT: + case GNE_ATTR_PARENT: + case GNE_ATTR_SELECTED: + case GNE_ATTR_GENERIC: + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNEDetectorEntryExit::isValid(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + return isValidAdditionalID(value); + case SUMO_ATTR_LANE: + return (myViewNet->getNet()->retrieveLane(value, false) != nullptr); + case SUMO_ATTR_POSITION: + return canParse(value) && fabs(parse(value)) < getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + case SUMO_ATTR_FRIENDLY_POS: + return canParse(value); + case GNE_ATTR_BLOCK_MOVEMENT: + return canParse(value); + case GNE_ATTR_PARENT: + return (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, value, false) != nullptr); + case GNE_ATTR_SELECTED: + return canParse(value); + case GNE_ATTR_GENERIC: + return isGenericParametersValid(value); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + +void +GNEDetectorEntryExit::setAttribute(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + changeAdditionalID(value); + break; + case SUMO_ATTR_LANE: + changeLaneParents(this, value); + break; + case SUMO_ATTR_POSITION: + myPositionOverLane = parse(value); + break; + case SUMO_ATTR_FRIENDLY_POS: + myFriendlyPosition = parse(value); + break; + case GNE_ATTR_BLOCK_MOVEMENT: + myBlockMovement = parse(value); + break; + case GNE_ATTR_PARENT: + changeAdditionalParent(this, value, 0); + break; + case GNE_ATTR_SELECTED: + if (parse(value)) { + selectAttributeCarrier(); + } else { + unselectAttributeCarrier(); + } + break; + case GNE_ATTR_GENERIC: + setGenericParametersStr(value); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntryExit.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,129 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDetectorEntryExit.h +/// @author Pablo Alvarez Lopez +/// @date Nov 2015 +/// @version $Id$ +/// +// +/****************************************************************************/ +#ifndef GNEDetectorEntryExit_h +#define GNEDetectorEntryExit_h + + +// =========================================================================== +// included modules +// =========================================================================== + +#include "GNEDetector.h" + +// =========================================================================== +// class declarations +// =========================================================================== +class GNEDetectorE3; + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEDetectorEntryExit + * Class for detector of type Entry + */ +class GNEDetectorEntryExit : public GNEDetector { + +public: + /**@brief Constructor + * @param[in] entryExitTag Child Tag (Either SUMO_TAG_DET_ENTRY or SUMO_TAG_DET_EXIT) + * @param[in] viewNet pointer to GNEViewNet of this additional element belongs + * @param[in] parent pointer to GNEDetectorE3 of this GNEDetectorEntryExit belongs + * @param[in] lane Lane of this detector is placed + * @param[in] pos position of the detector on the lane + * @param[in] friendlyPos enable or disable friendly positions + * @param[in] block movement enable or disable additional movement + */ + GNEDetectorEntryExit(SumoXMLTag entryExitTag, GNEViewNet* viewNet, GNEAdditional* parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement); + + /// @brief destructor + ~GNEDetectorEntryExit(); + + /// @name members and functions relative to write additionals into XML + /// @{ + /// @brief check if current additional is valid to be writed into XML + bool isAdditionalValid() const; + + /// @brief return a string with the current additional problem + std::string getAdditionalProblem() const; + + /// @brief fix additional problem + void fixAdditionalProblem(); + /// @} + + /// @name Functions related with geometry of element + /// @{ + /**@brief change the position of the element geometry without saving in undoList + * @param[in] offset Position used for calculate new position of geometry without updating RTree + */ + void moveGeometry(const Position& offset); + + /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) + * @param[in] undoList The undoList on which to register changes + */ + void commitGeometryMoving(GNEUndoList* undoList); + + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + /// @} + + /// @name inherited from GUIGlObject + /// @{ + /**@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; + /// @} + + /// @name inherited from GNEAttributeCarrier + /// @{ + /* @brief method for getting the Attribute of an XML key + * @param[in] key The attribute key + * @return string with the value associated to key + */ + std::string getAttribute(SumoXMLAttr key) const; + + /* @brief method for setting the attribute and letting the object perform additional changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + */ + void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); + + /* @brief method for checking if the key and their correspond attribute are valids + * @param[in] key The attribute key + * @param[in] value The value asociated to key key + * @return true if the value is valid, false in other case + */ + bool isValid(SumoXMLAttr key, const std::string& value); + /// @} + +private: + /// @brief set attribute after validation + void setAttribute(SumoXMLAttr key, const std::string& value); + + /// @brief Invalidated copy constructor. + GNEDetectorEntryExit(const GNEDetectorEntryExit&) = delete; + + /// @brief Invalidated assignment operator. + GNEDetectorEntryExit& operator=(const GNEDetectorEntryExit&) = delete; +}; + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorEntry.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNEDetectorEntry.h -/// @author Pablo Alvarez Lopez -/// @date Nov 2015 -/// @version $Id$ -/// -// -/****************************************************************************/ -#ifndef GNEDetectorEntry_h -#define GNEDetectorEntry_h - - -// =========================================================================== -// included modules -// =========================================================================== - -#include "GNEDetector.h" - -// =========================================================================== -// class declarations -// =========================================================================== -class GNEDetectorE3; - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GNEDetectorEntry - * Class for detector of type Entry - */ -class GNEDetectorEntry : public GNEDetector { - -public: - /**@brief Constructor - * @param[in] viewNet pointer to GNEViewNet of this additional element belongs - * @param[in] parent pointer to GNEDetectorE3 of this Entry belongs - * @param[in] lane Lane of this StoppingPlace belongs - * @param[in] pos position of the detector on the lane - * @param[in] friendlyPos enable or disable friendly positions - * @param[in] block movement enable or disable additional movement - */ - GNEDetectorEntry(GNEViewNet* viewNet, GNEAdditional* parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement); - - /// @brief destructor - ~GNEDetectorEntry(); - - /// @name members and functions relative to write additionals into XML - /// @{ - /// @brief check if current additional is valid to be writed into XML - bool isAdditionalValid() const; - - /// @brief return a string with the current additional problem - std::string getAdditionalProblem() const; - - /// @brief fix additional problem - void fixAdditionalProblem(); - /// @} - - /// @name inherited from GNEDetector - /// @{ - /// @brief get lane - GNELane* getLane() const; - /// @} - - /// @name Functions related with geometry of element - /// @{ - /**@brief change the position of the element geometry without saving in undoList - * @param[in] offset Position used for calculate new position of geometry without updating RTree - */ - void moveGeometry(const Position& offset); - - /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) - * @param[in] undoList The undoList on which to register changes - */ - void commitGeometryMoving(GNEUndoList* undoList); - - /// @brief update pre-computed geometry information - void updateGeometry(bool updateGrid); - /// @} - - /// @name inherited from GUIGlObject - /// @{ - /**@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; - /// @} - - /// @name inherited from GNEAttributeCarrier - /// @{ - /* @brief method for getting the Attribute of an XML key - * @param[in] key The attribute key - * @return string with the value associated to key - */ - std::string getAttribute(SumoXMLAttr key) const; - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - */ - void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); - - /* @brief method for checking if the key and their correspond attribute are valids - * @param[in] key The attribute key - * @param[in] value The value asociated to key key - * @return true if the value is valid, false in other case - */ - bool isValid(SumoXMLAttr key, const std::string& value); - /// @} - -protected: - /// @brief The lane in which this detector is placed - GNELane* myLane; - -private: - /// @brief set attribute after validation - void setAttribute(SumoXMLAttr key, const std::string& value); - - /// @brief Invalidated copy constructor. - GNEDetectorEntry(const GNEDetectorEntry&) = delete; - - /// @brief Invalidated assignment operator. - GNEDetectorEntry& operator=(const GNEDetectorEntry&) = delete; -}; - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorExit.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorExit.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorExit.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorExit.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,372 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNEDetectorExit.cpp -/// @author Pablo Alvarez Lopez -/// @date Nov 2015 -/// @version $Id$ -/// -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GNEDetectorExit.h" -#include "GNEAdditionalHandler.h" - - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNEDetectorExit::GNEDetectorExit(GNEViewNet* viewNet, GNEAdditional* parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement) : - GNEDetector(parent, viewNet, GLO_DET_EXIT, SUMO_TAG_DET_EXIT, pos, 0, "", "", friendlyPos, blockMovement), - myLane(lane) { -} - - -GNEDetectorExit::~GNEDetectorExit() {} - - -bool -GNEDetectorExit::isAdditionalValid() const { - // with friendly position enabled position are "always fixed" - if (myFriendlyPosition) { - return true; - } else { - return (myPositionOverLane >= 0) && (myPositionOverLane <= myLane->getParentEdge().getNBEdge()->getFinalLength()); - } -} - - -std::string -GNEDetectorExit::getAdditionalProblem() const { - // declare variable for error position - std::string errorPosition; - // check positions over lane - if (myPositionOverLane < 0) { - errorPosition = (toString(SUMO_ATTR_POSITION) + " < 0"); - } - if (myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength()) { - errorPosition = (toString(SUMO_ATTR_POSITION) + " > lanes's length"); - } - return errorPosition; -} - - -void -GNEDetectorExit::fixAdditionalProblem() { - // declare new position - double newPositionOverLane = myPositionOverLane; - // fix pos and lenght checkAndFixDetectorPosition - GNEAdditionalHandler::checkAndFixDetectorPosition(newPositionOverLane, myLane->getParentEdge().getNBEdge()->getFinalLength(), true); - // set new position - setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myViewNet->getUndoList()); -} - - -void -GNEDetectorExit::moveGeometry(const Position& offset) { - // Calculate new position using old position - Position newPosition = myMove.originalViewPosition; - newPosition.add(offset); - // filtern position using snap to active grid - newPosition = myViewNet->snapToActiveGrid(newPosition); - myPositionOverLane = myLane->getShape().nearest_offset_to_point2D(newPosition, false); - // Update geometry - updateGeometry(false); -} - - -void -GNEDetectorExit::commitGeometryMoving(GNEUndoList* undoList) { - // commit new position allowing undo/redo - undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPositionOverLane), true, myMove.firstOriginalLanePosition)); - undoList->p_end(); -} - - -void -GNEDetectorExit::updateGeometry(bool updateGrid) { - // first check if object has to be removed from grid (SUMOTree) - if (updateGrid) { - myViewNet->getNet()->removeGLObjectFromGrid(this); - } - - // Clear all containers - myGeometry.clearGeometry(); - - // obtain position over lane - double fixedPositionOverLane = myPositionOverLane > myLane->getParentEdge().getNBEdge()->getFinalLength() ? myLane->getParentEdge().getNBEdge()->getFinalLength() : myPositionOverLane < 0 ? 0 : myPositionOverLane; - myGeometry.shape.push_back(myLane->getShape().positionAtOffset(fixedPositionOverLane * myLane->getLengthGeometryFactor())); - - // Save rotation (angle) of the vector constructed by points f and s - myGeometry.shapeRotations.push_back(myLane->getShape().rotationDegreeAtOffset(fixedPositionOverLane) * -1); - - // Set block icon position - myBlockIcon.position = myGeometry.shape.getLineCenter(); - - // Set block icon rotation, and using their rotation for logo - myBlockIcon.setRotation(myLane); - - // last step is to check if object has to be added into grid (SUMOTree) again - if (updateGrid) { - myViewNet->getNet()->addGLObjectIntoGrid(this); - } - - // update E3 parent Geometry - myFirstAdditionalParent->updateGeometry(updateGrid); -} - - -GNELane* -GNEDetectorExit::getLane() const { - return myLane; -} - - -void -GNEDetectorExit::drawGL(const GUIVisualizationSettings& s) const { - // Start drawing adding gl identificator - glPushName(getGlID()); - - // Push detector matrix - glPushMatrix(); - glTranslated(0, 0, getType()); - - // Set initial values - if (isAttributeCarrierSelected()) { - GLHelper::setColor(s.selectedAdditionalColor); - } else { - GLHelper::setColor(s.SUMO_color_E3Exit); - } - const double exaggeration = s.addSize.getExaggeration(s, this); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - // Push polygon matrix - glPushMatrix(); - glScaled(exaggeration, exaggeration, 1); - glTranslated(myGeometry.shape[0].x(), myGeometry.shape[0].y(), 0); - glRotated(myGeometry.shapeRotations[0], 0, 0, 1); - - // draw details if isn't being drawn for selecting - if (!s.drawForSelecting) { - // Draw polygon - glBegin(GL_LINES); - glVertex2d(1.7, 0); - glVertex2d(-1.7, 0); - glEnd(); - glBegin(GL_QUADS); - glVertex2d(-1.7, .5); - glVertex2d(-1.7, -.5); - glVertex2d(1.7, -.5); - glVertex2d(1.7, .5); - glEnd(); - - // first Arrow - glTranslated(1.5, 0, 0); - GLHelper::drawBoxLine(Position(0, 4), 0, 2, .05); - GLHelper::drawTriangleAtEnd(Position(0, 4), Position(0, 1), (double) 1, (double) .25); - - // second Arrow - glTranslated(-3, 0, 0); - GLHelper::drawBoxLine(Position(0, 4), 0, 2, .05); - GLHelper::drawTriangleAtEnd(Position(0, 4), Position(0, 1), (double) 1, (double) .25); - } else { - // Draw square in drawy for selecting mode - glBegin(GL_QUADS); - glVertex2d(-1.7, 4.3); - glVertex2d(-1.7, -.5); - glVertex2d(1.7, -.5); - glVertex2d(1.7, 4.3); - glEnd(); - } - - // Pop polygon matrix - glPopMatrix(); - - // Pop detector matrix - glPopMatrix(); - - // Check if the distance is enought to draw details - if (!s.drawForSelecting && ((s.scale * exaggeration) >= 10)) { - // Push matrix - glPushMatrix(); - // Traslate to center of detector - glTranslated(myGeometry.shape.getLineCenter().x(), myGeometry.shape.getLineCenter().y(), getType() + 0.1); - // Rotate depending of myBlockIcon.rotation - glRotated(myBlockIcon.rotation, 0, 0, -1); - //move to logo position - glTranslated(1.9, 0, 0); - // draw Entry logo if isn't being drawn for selecting - if (s.drawForSelecting) { - GLHelper::setColor(s.SUMO_color_E3Exit); - GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1); - } else if (isAttributeCarrierSelected()) { - GLHelper::drawText("E3", Position(), .1, 2.8, s.selectedAdditionalColor); - } else { - GLHelper::drawText("E3", Position(), .1, 2.8, s.SUMO_color_E3Exit); - } - //move to logo position - glTranslated(1.7, 0, 0); - // Rotate depending of myBlockIcon.rotation - glRotated(90, 0, 0, 1); - // draw Entry text if isn't being drawn for selecting - if (s.drawForSelecting) { - GLHelper::setColor(s.SUMO_color_E3Exit); - GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1); - } else if (isAttributeCarrierSelected()) { - GLHelper::drawText("Exit", Position(), .1, 1, s.selectedAdditionalColor); - } else { - GLHelper::drawText("Exit", Position(), .1, 1, s.SUMO_color_E3Exit); - } - // pop matrix - glPopMatrix(); - // Show Lock icon depending of the Edit mode and if isn't being drawn for selecting - if (!s.drawForSelecting) { - myBlockIcon.draw(0.4); - } - } - // Draw name if isn't being drawn for selecting - if (!s.drawForSelecting) { - drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); - } - // check if dotted contour has to be drawn - if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { - GLHelper::drawShapeDottedContour(getType(), myGeometry.shape[0], 3.4, 5, myGeometry.shapeRotations[0], 0, 2); - } - // pop gl identificator - glPopName(); -} - - -std::string -GNEDetectorExit::getAttribute(SumoXMLAttr key) const { - switch (key) { - case SUMO_ATTR_ID: - return getAdditionalID(); - case SUMO_ATTR_LANE: - return myLane->getID(); - case SUMO_ATTR_POSITION: - return toString(myPositionOverLane); - case SUMO_ATTR_FRIENDLY_POS: - return toString(myFriendlyPosition); - case GNE_ATTR_BLOCK_MOVEMENT: - return toString(myBlockMovement); - case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); - case GNE_ATTR_SELECTED: - return toString(isAttributeCarrierSelected()); - case GNE_ATTR_GENERIC: - return getGenericParametersStr(); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -void -GNEDetectorExit::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { - if (value == getAttribute(key)) { - return; //avoid needless changes, later logic relies on the fact that attributes have changed - } - switch (key) { - case SUMO_ATTR_ID: - case SUMO_ATTR_LANE: - case SUMO_ATTR_POSITION: - case SUMO_ATTR_FRIENDLY_POS: - case GNE_ATTR_BLOCK_MOVEMENT: - case GNE_ATTR_PARENT: - case GNE_ATTR_SELECTED: - case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -bool -GNEDetectorExit::isValid(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - return isValidAdditionalID(value); - case SUMO_ATTR_LANE: - return (myViewNet->getNet()->retrieveLane(value, false) != nullptr); - case SUMO_ATTR_POSITION: - return canParse(value); - case SUMO_ATTR_FRIENDLY_POS: - return canParse(value); - case GNE_ATTR_BLOCK_MOVEMENT: - return canParse(value); - case GNE_ATTR_PARENT: - return (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_E3DETECTOR, value, false) != nullptr); - case GNE_ATTR_SELECTED: - return canParse(value); - case GNE_ATTR_GENERIC: - return isGenericParametersValid(value); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - -void -GNEDetectorExit::setAttribute(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - changeAdditionalID(value); - break; - case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); - break; - case SUMO_ATTR_POSITION: - myPositionOverLane = parse(value); - break; - case SUMO_ATTR_FRIENDLY_POS: - myFriendlyPosition = parse(value); - break; - case GNE_ATTR_BLOCK_MOVEMENT: - myBlockMovement = parse(value); - break; - case GNE_ATTR_PARENT: - changeFirstAdditionalParent(value); - break; - case GNE_ATTR_SELECTED: - if (parse(value)) { - selectAttributeCarrier(); - } else { - unselectAttributeCarrier(); - } - break; - case GNE_ATTR_GENERIC: - setGenericParametersStr(value); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { - updateGeometry(true); - } -} - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorExit.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorExit.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetectorExit.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetectorExit.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNEDetectorExit.h -/// @author Pablo Alvarez Lopez -/// @date Nov 2015 -/// @version $Id$ -/// -// -/****************************************************************************/ -#ifndef GNEDetectorExit_h -#define GNEDetectorExit_h - - -// =========================================================================== -// included modules -// =========================================================================== - -#include "GNEDetector.h" - -// =========================================================================== -// class declarations -// =========================================================================== -class GNEDetectorE3; - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GNEDetectorExit - * class for detector of type exit - */ -class GNEDetectorExit : public GNEDetector { - -public: - /**@brief Constructor - * @param[in] viewNet pointer to GNEViewNet of this additional element belongs - * @param[in] parent pointer to GNEDetectorE3 of this Exit belongs - * @param[in] lane Lane of this StoppingPlace belongs - * @param[in] pos position of the detector on the lane - * @param[in] friendlyPos enable or disable friendly positions - * @param[in] block movement enable or disable additional movement - */ - GNEDetectorExit(GNEViewNet* viewNet, GNEAdditional* parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement); - - /// @brief destructor - ~GNEDetectorExit(); - - /// @name members and functions relative to write additionals into XML - /// @{ - /// @brief check if current additional is valid to be writed into XML - bool isAdditionalValid() const; - - /// @brief return a string with the current additional problem - std::string getAdditionalProblem() const; - - /// @brief fix additional problem - void fixAdditionalProblem(); - /// @} - - /// @name inherited from GNEDetector - /// @{ - /// @brief get lane - GNELane* getLane() const; - /// @} - - /// @name Functions related with geometry of element - /// @{ - /**@brief change the position of the element geometry without saving in undoList - * @param[in] offset Position used for calculate new position of geometry without updating RTree - */ - void moveGeometry(const Position& offset); - - /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) - * @param[in] undoList The undoList on which to register changes - */ - void commitGeometryMoving(GNEUndoList* undoList); - - /// @brief update pre-computed geometry information - void updateGeometry(bool updateGrid); - /// @} - - /// @name inherited from GUIGlObject - /// @{ - /**@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; - /// @} - - /// @name inherited from GNEAttributeCarrier - /// @{ - /* @brief method for getting the Attribute of an XML key - * @param[in] key The attribute key - * @return string with the value associated to key - */ - std::string getAttribute(SumoXMLAttr key) const; - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - */ - void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); - - /* @brief method for checking if the key and their correspond attribute are valids - * @param[in] key The attribute key - * @param[in] value The value asociated to key key - * @return true if the value is valid, false in other case - */ - bool isValid(SumoXMLAttr key, const std::string& value); - /// @} - -protected: - /// @brief The lane in which this detector is placed - GNELane* myLane; - -private: - /// @brief set attribute after validation - void setAttribute(SumoXMLAttr key, const std::string& value); - - /// @brief Invalidated copy constructor. - GNEDetectorExit(const GNEDetectorExit&); - - /// @brief Invalidated assignment operator. - GNEDetectorExit& operator=(const GNEDetectorExit&) = delete; -}; - - -#endif -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetector.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetector.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEDetector.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEDetector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -46,8 +46,10 @@ * @param[in] name detector name * @param[in] friendlyPos enable or disable friendly positions * @param[in] block movement enable or disable additional movement + * @param[in] laneParents vector of lane parents */ - GNEDetector(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, double pos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement); + GNEDetector(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, double pos, double freq, const std::string& filename, + const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement, const std::vector& laneParents); /**@brief Constructor. * @param[in] additionalParent additional parent of this detector (ID will be generated automatically) @@ -60,8 +62,10 @@ * @param[in] name detector name * @param[in] friendlyPos enable or disable friendly positions * @param[in] block movement enable or disable additional movement + * @param[in] laneParents vector of lane parents */ - GNEDetector(GNEAdditional* additionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, double pos, double freq, const std::string& filename, const std::string& name, bool friendlyPos, bool blockMovement); + GNEDetector(GNEAdditional* additionalParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, double pos, double freq, const std::string& filename, + const std::string& name, bool friendlyPos, bool blockMovement, const std::vector& laneParents); /// @brief Destructor ~GNEDetector(); @@ -79,11 +83,14 @@ /// @} /// @brief get lane - virtual GNELane* getLane() const = 0; + GNELane* getLane() const; /// @brief get position over lane double getPositionOverLane() const; + /// @brief get position over lane that is applicable to the shape + double getGeometryPositionOverLane() const; + /// @name Functions related with geometry of element /// @{ /**@brief change the position of the element geometry without saving in undoList diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingArea.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingArea.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingArea.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingArea.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -61,7 +61,7 @@ double offsetSign = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1; // Update common geometry of stopping place - setStoppingPlaceGeometry(myLane->getParentEdge().getNBEdge()->getLaneWidth(myLane->getIndex()) / 2 + myWidth); + setStoppingPlaceGeometry(getLaneParents().front()->getParentEdge().getNBEdge()->getLaneWidth(getLaneParents().front()->getIndex()) / 2 + myWidth); // Obtain a copy of the shape PositionVector tmpShape = myGeometry.shape; @@ -76,7 +76,7 @@ myBlockIcon.position = myGeometry.shape.getLineCenter(); // Set block icon rotation, and using their rotation for sign - myBlockIcon.setRotation(myLane); + myBlockIcon.setRotation(getLaneParents().front()); // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -98,7 +98,7 @@ // Traslate matrix glTranslated(0, 0, getType()); // Set Color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(RGBColor(83, 89, 172, 255)); @@ -130,7 +130,7 @@ // Scale matrix glScaled(exaggeration, exaggeration, 1); // Set base color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(RGBColor(83, 89, 172, 255)); @@ -140,7 +140,7 @@ // Move to top glTranslated(0, 0, .1); // Set sign color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(RGBColor(177, 184, 186, 171)); @@ -149,7 +149,7 @@ GLHelper::drawFilledCircle(myCircleInWidth, circleResolution); // Draw sign 'C' if (s.scale * exaggeration >= 4.5) { - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::drawText("P", Position(), .1, myCircleInText, s.selectedAdditionalColor, myBlockIcon.rotation); } else { GLHelper::drawText("P", Position(), .1, myCircleInText, RGBColor(83, 89, 172, 255), myBlockIcon.rotation); @@ -182,7 +182,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANE: - return myLane->getID(); + return getLaneParents().front()->getID(); case SUMO_ATTR_STARTPOS: return toString(myStartPosition); case SUMO_ATTR_ENDPOS: @@ -221,10 +221,10 @@ switch (key) { case SUMO_ATTR_ID: { // change ID of Entry - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); // Change Ids of all Parking Spaces - for (auto i : myAdditionalChilds) { - i->setAttribute(SUMO_ATTR_ID, generateAdditionalChildID(SUMO_TAG_PARKING_SPACE), undoList); + for (auto i : getAdditionalChilds()) { + i->setAttribute(SUMO_ATTR_ID, generateChildID(SUMO_TAG_PARKING_SPACE), undoList); } break; } @@ -241,7 +241,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -263,32 +263,18 @@ case SUMO_ATTR_STARTPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(value, myEndPosition, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myEndPosition)) { - // Check that new start Position is smaller that end position - return (parse(value) < parse(myEndPosition)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_ENDPOS: if (value.empty()) { return true; + } else if (canParse(value)) { + return checkStoppinPlacePosition(myStartPosition, value, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); } else { - if (canParse(value)) { - if (canParse(myStartPosition)) { - // Check that new start Position is smaller that end position - return (parse(myStartPosition) < parse(value)); - } else { - return true; - } - } else { - return false; - } + return false; } case SUMO_ATTR_NAME: return SUMOXMLDefinitions::isValidAttribute(value); @@ -330,7 +316,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANE: - myLane = changeLane(myLane, value); + changeLaneParents(this, value); break; case SUMO_ATTR_STARTPOS: myStartPosition = value; @@ -375,8 +361,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingArea.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingArea.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingArea.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingArea.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -49,8 +49,8 @@ * @param[in] angle ParkingArea's angle * @param[in] block movement enable or disable additional movement */ - GNEParkingArea(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const std::string& startPos, const std::string& endPos, const std::string& name, bool friendlyPosition, int roadSideCapacity, - bool onRoad, double width, const std::string& length, double angle, bool blockMovement); + GNEParkingArea(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const std::string& startPos, const std::string& endPos, const std::string& name, bool friendlyPosition, int roadSideCapacity, + bool onRoad, double width, const std::string& length, double angle, bool blockMovement); /// @brief Destructor ~GNEParkingArea(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -33,18 +33,18 @@ // =========================================================================== GNEParkingAreaReroute::GNEParkingAreaReroute(GNERerouterIntervalDialog* rerouterIntervalDialog) : - GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), - rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_PARKING_AREA).begin()->second, - rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_PARKING_ZONE_REROUTE, "", false) { + GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_PARKING_ZONE_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_PARKING_AREA).begin()->second}, {}, {}, {}, {}, {}, {}) { // fill route type with default values setDefaultValues(); } GNEParkingAreaReroute::GNEParkingAreaReroute(GNEAdditional* rerouterIntervalParent, GNEAdditional* newParkingArea, double probability, bool visible): - GNEAdditional(rerouterIntervalParent, newParkingArea, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_PARKING_ZONE_REROUTE, "", false), - myProbability(probability), - myVisible(visible) { + GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_PARKING_ZONE_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalParent, newParkingArea}, {}, {}, {}, {}, {}, {}), +myProbability(probability), +myVisible(visible) { } @@ -71,13 +71,13 @@ Position GNEParkingAreaReroute::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNEParkingAreaReroute::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -93,13 +93,13 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_PARKING: - return mySecondAdditionalParent->getID(); + return getAdditionalParents().at(1)->getID(); case SUMO_ATTR_PROB: return toString(myProbability); case SUMO_ATTR_VISIBLE: return toString(myVisible); case GNE_ATTR_PARENT: - return toString(myFirstAdditionalParent->getID()); + return toString(getAdditionalParents().at(0)->getID()); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -119,7 +119,7 @@ case SUMO_ATTR_PROB: case SUMO_ATTR_VISIBLE: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -154,7 +154,7 @@ std::string GNEParkingAreaReroute::getHierarchyName() const { - return getTagStr() + ": " + getSecondAdditionalParent()->getID(); + return getTagStr() + ": " + getAdditionalParents().at(1)->getID(); } // =========================================================================== @@ -168,7 +168,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_PARKING: - changeSecondAdditionalParent(value); + changeAdditionalParent(this, value, 1); break; case SUMO_ATTR_PROB: myProbability = parse(value); @@ -182,6 +182,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingAreaReroute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingSpace.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingSpace.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingSpace.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingSpace.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,12 +34,13 @@ // method definitions // =========================================================================== -GNEParkingSpace::GNEParkingSpace(GNEViewNet* viewNet, GNEAdditional* parkingAreaParent, const Position &pos, double width, double length, double angle, bool blockMovement) : - GNEAdditional(parkingAreaParent, viewNet, GLO_PARKING_SPACE, SUMO_TAG_PARKING_SPACE, "", blockMovement), - myPosition(pos), - myWidth(width), - myLength(length), - myAngle(angle) { +GNEParkingSpace::GNEParkingSpace(GNEViewNet* viewNet, GNEAdditional* parkingAreaParent, const Position& pos, double width, double length, double angle, bool blockMovement) : + GNEAdditional(parkingAreaParent, viewNet, GLO_PARKING_SPACE, SUMO_TAG_PARKING_SPACE, "", blockMovement, +{}, {}, {}, {parkingAreaParent}, {}, {}, {}, {}, {}, {}), +myPosition(pos), +myWidth(width), +myLength(length), +myAngle(angle) { } @@ -61,7 +62,7 @@ GNEParkingSpace::commitGeometryMoving(GNEUndoList* undoList) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); undoList->p_end(); } @@ -91,7 +92,7 @@ std::string GNEParkingSpace::getParentName() const { - return myFirstAdditionalParent->getMicrosimID(); + return getAdditionalParents().at(0)->getMicrosimID(); } @@ -106,7 +107,7 @@ // only drawn small box if isn't being drawn for selecting if (!s.drawForSelecting) { // Set Color depending of selection - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(RGBColor(0, 255, 0, 255)); @@ -116,7 +117,7 @@ // Traslate matrix and draw blue innen glTranslated(0, 0, 0.1); // Set Color depending of selection - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(RGBColor(255, 200, 200, 255)); @@ -155,7 +156,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: return toString(myBlockMovement); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_SELECTED: return toString(isAttributeCarrierSelected()); case GNE_ATTR_GENERIC: @@ -181,7 +182,7 @@ case GNE_ATTR_PARENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -253,7 +254,7 @@ myBlockMovement = parse(value); break; case GNE_ATTR_PARENT: - changeFirstAdditionalParent(value); + changeAdditionalParent(this, value, 0); break; case GNE_ATTR_SELECTED: if (parse(value)) { @@ -268,8 +269,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingSpace.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingSpace.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEParkingSpace.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEParkingSpace.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -48,7 +48,7 @@ * @param[in] angle ParkingArea's angle * @param[in] block movement enable or disable additional movement */ - GNEParkingSpace(GNEViewNet* viewNet, GNEAdditional* parkingAreaParent, const Position &pos, double width, double length, double angle, bool blockMovement); + GNEParkingSpace(GNEViewNet* viewNet, GNEAdditional* parkingAreaParent, const Position& pos, double width, double length, double angle, bool blockMovement); /// @brief Destructor ~GNEParkingSpace(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPOI.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPOI.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPOI.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPOI.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -45,8 +45,7 @@ const Position& pos, bool geo, double layer, double angle, const std::string& imgFile, bool relativePath, double width, double height, bool movementBlocked) : GUIPointOfInterest(id, type, color, pos, geo, "", 0, 0, layer, angle, imgFile, relativePath, width, height), - GNEShape(net, SUMO_TAG_POI, movementBlocked), - myGNELane(nullptr) { + GNEShape(net, SUMO_TAG_POI, movementBlocked, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}) { // set GEO Position myGEOPosition = pos; GeoConvHelper::getFinal().cartesian2geo(myGEOPosition); @@ -57,14 +56,23 @@ double layer, double angle, const std::string& imgFile, bool relativePath, GNELane* lane, double posOverLane, double posLat, double width, double height, bool movementBlocked) : GUIPointOfInterest(id, type, color, Position(), false, lane->getID(), posOverLane, posLat, layer, angle, imgFile, relativePath, width, height), - GNEShape(net, SUMO_TAG_POILANE, movementBlocked), - myGNELane(lane) { + GNEShape(net, SUMO_TAG_POILANE, movementBlocked, {}, {lane}, {}, {}, {}, {}, {}, {}, {}, {}) { } GNEPOI::~GNEPOI() {} +std::string +GNEPOI::generateChildID(SumoXMLTag childTag) { + int counter = myNet->getPOIs().size(); + while (myNet->retrievePOI(getID() + toString(childTag) + toString(counter), false) != nullptr) { + counter++; + } + return (getID() + toString(childTag) + toString(counter)); +} + + void GNEPOI::startGeometryMoving() { // always save original position over view @@ -77,7 +85,7 @@ void GNEPOI::endGeometryMoving() { // check that endGeometryMoving was called only once - if (myGNELane && myMovingGeometryBoundary.isInitialised()) { + if ((getLaneParents().size() > 0) && myMovingGeometryBoundary.isInitialised()) { // Remove object from net myNet->removeGLObjectFromGrid(this); // reset myMovingGeometryBoundary @@ -92,11 +100,11 @@ void GNEPOI::writeShape(OutputDevice& device) { - if (myGNELane) { + if (getLaneParents().size() > 0) { // obtain fixed position over lane - double fixedPositionOverLane = myPosOverLane > myGNELane->getShape().length() ? myGNELane->getShape().length() : myPosOverLane < 0 ? 0 : myPosOverLane; + double fixedPositionOverLane = myPosOverLane > getLaneParents().at(0)->getShape().length() ? getLaneParents().at(0)->getShape().length() : myPosOverLane < 0 ? 0 : myPosOverLane; // write POILane using POI::writeXML - writeXML(device, false, 0, myGNELane->getID(), fixedPositionOverLane, myPosLat); + writeXML(device, false, 0, getLaneParents().at(0)->getID(), fixedPositionOverLane, myPosLat); } else { writeXML(device, myGeo); } @@ -112,8 +120,8 @@ // filtern position using snap to active grid newPosition = myNet->getViewNet()->snapToActiveGrid(newPosition); // set position depending of POI Type - if (myGNELane) { - myPosOverLane = myGNELane->getShape().nearest_offset_to_point2D(newPosition, false); + if (getLaneParents().size() > 0) { + myPosOverLane = getLaneParents().at(0)->getShape().nearest_offset_to_point2D(newPosition, false); } else { set(newPosition); } @@ -130,38 +138,32 @@ Position myNewPosition(*this); set(oldPos); // commit new position allowing undo/redo - if (myGNELane) { + if (getLaneParents().size() > 0) { // restore old position before commit new position - double originalPosOverLane = myGNELane->getShape().nearest_offset_to_point2D(oldPos, false); + double originalPosOverLane = getLaneParents().at(0)->getShape().nearest_offset_to_point2D(oldPos, false); undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPosOverLane), true, toString(originalPosOverLane))); + undoList->p_add(new GNEChange_Attribute(this, myNet, SUMO_ATTR_POSITION, toString(myPosOverLane), true, toString(originalPosOverLane))); undoList->p_end(); } else { undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myNewPosition), true, toString(oldPos))); + undoList->p_add(new GNEChange_Attribute(this, myNet, SUMO_ATTR_POSITION, toString(myNewPosition), true, toString(oldPos))); undoList->p_end(); } } } -GNELane* -GNEPOI::getLane() const { - return myGNELane; -} - - void GNEPOI::updateGeometry(bool updateGrid) { // first check if object has to be removed from grid (SUMOTree) if (updateGrid) { myNet->removeGLObjectFromGrid(this); } - if (myGNELane) { + if (getLaneParents().size() > 0) { // obtain fixed position over lane - double fixedPositionOverLane = myPosOverLane > myGNELane->getLaneShapeLength() ? myGNELane->getLaneShapeLength() : myPosOverLane < 0 ? 0 : myPosOverLane; + double fixedPositionOverLane = myPosOverLane > getLaneParents().at(0)->getLaneShapeLength() ? getLaneParents().at(0)->getLaneShapeLength() : myPosOverLane < 0 ? 0 : myPosOverLane; // set new position regarding to lane - set(myGNELane->getShape().positionAtOffset(fixedPositionOverLane * myGNELane->getLengthGeometryFactor(), -myPosLat)); + set(getLaneParents().at(0)->getShape().positionAtOffset(fixedPositionOverLane * getLaneParents().at(0)->getLengthGeometryFactor(), -myPosLat)); } // last step is to check if object has to be added into grid (SUMOTree) again if (updateGrid) { @@ -197,7 +199,7 @@ // build selection and show parameters menu myNet->getViewNet()->buildSelectionACPopupEntry(ret, this); buildShowParamsPopupEntry(ret); - if (myGNELane) { + if (getLaneParents().size() > 0) { // build shape header buildShapePopupOptions(app, ret, getShapeType()); // add option for convert to GNEPOI @@ -235,11 +237,11 @@ // first clear vertices myPOIVertices.clear(); // check if POI can be drawn - if(checkDraw(s)) { + if (checkDraw(s)) { // push name (needed for getGUIGlObjectsUnderCursor(...) glPushName(getGlID()); // draw inner polygon - drawInnerPOI(s); + drawInnerPOI(s, drawUsingSelectColor()); // draw an orange square mode if there is an image(see #4036) if (!getShapeImgFile().empty() && OptionsCont::getOptions().getBool("gui-testing")) { // Add a draw matrix for drawing logo @@ -277,7 +279,7 @@ case SUMO_ATTR_LANE: return myLane; case SUMO_ATTR_POSITION: - if (myGNELane) { + if (getLaneParents().size() > 0) { return toString(myPosOverLane); } else { return toString(*this); @@ -341,7 +343,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -359,7 +361,7 @@ case SUMO_ATTR_LANE: return (myNet->retrieveLane(value, false) != nullptr); case SUMO_ATTR_POSITION: - if (myGNELane) { + if (getLaneParents().size() > 0) { return canParse(value); } else { return canParse(value); @@ -475,15 +477,12 @@ break; case SUMO_ATTR_LANE: myLane = value; - myGNELane->removeShapeChild(this); - myGNELane = myNet->retrieveLane(value); - myGNELane->addShapeChild(this); - updateGeometry(true); + changeLaneParents(this, value); break; case SUMO_ATTR_POSITION: { // first remove object from grid due position is used for boundary myNet->removeGLObjectFromGrid(this); - if (myGNELane) { + if (getLaneParents().size() > 0) { myPosOverLane = parse(value); } else { set(parse(value)); @@ -571,16 +570,10 @@ default: throw InvalidArgument(getTagStr() + " attribute '" + toString(key) + "' not allowed"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } - -void -GNEPOI::mouseOverObject(const GUIVisualizationSettings&) const { -} - - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPOI.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPOI.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPOI.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPOI.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -89,6 +89,9 @@ /// @brief Destructor ~GNEPOI(); + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + /// @name functions for edit geometry /// @{ /// @brief begin movement (used when user click over edge to start a movement, to avoid problems with problems with GL Tree) @@ -127,9 +130,6 @@ GUIGlID getGlID() const; /// @} - /// @brief get GNELane - GNELane* getLane() const; - /// @name inherited from GUIGlObject /// @{ /**@brief Returns the name of the parent object @@ -206,9 +206,6 @@ /// @brief Position of POI in GEO coordinates (Only used by POIs that aren't placed over lanes) Position myGEOPosition; - /// @brief GNElane in which this POILane is placed (Only used by POIs placed over lanes) - GNELane* myGNELane; - private: /// @brief position used for move POILanes Position myOriginalViewPosition; @@ -216,9 +213,6 @@ /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /// @brief Invalidated copy constructor. GNEPOI(const GNEPOI&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPoly.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPoly.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPoly.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPoly.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,12 +47,12 @@ GNEPoly::GNEPoly(GNENet* net, const std::string& id, const std::string& type, const PositionVector& shape, bool geo, bool fill, double lineWidth, const RGBColor& color, double layer, double angle, const std::string& imgFile, bool relativePath, bool movementBlocked, bool shapeBlocked) : GUIPolygon(id, type, color, shape, geo, fill, lineWidth, layer, angle, imgFile, relativePath), - GNEShape(net, SUMO_TAG_POLY, movementBlocked), - myNetElementShapeEdited(nullptr), - myBlockShape(shapeBlocked), - myClosedShape(shape.front() == shape.back()), - mySimplifiedShape(false), - myCurrentMovingVertexIndex(-1) { + GNEShape(net, SUMO_TAG_POLY, movementBlocked, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}), + myNetElementShapeEdited(nullptr), + myBlockShape(shapeBlocked), + myClosedShape(shape.front() == shape.back()), + mySimplifiedShape(false), +myCurrentMovingVertexIndex(-1) { // check if imgFile is valid if (!imgFile.empty() && GUITexturesHelper::getTextureID(imgFile) == -1) { setShapeImgFile(""); @@ -68,6 +68,16 @@ GNEPoly::~GNEPoly() {} +std::string +GNEPoly::generateChildID(SumoXMLTag childTag) { + int counter = myNet->getPolygons().size(); + while (myNet->retrievePolygon(getID() + toString(childTag) + toString(counter), false) != nullptr) { + counter++; + } + return (getID() + toString(childTag) + toString(counter)); +} + + void GNEPoly::startGeometryMoving() { // save current centering boundary @@ -165,7 +175,7 @@ if (myNetElementShapeEdited == nullptr) { // commit new shape undoList->p_begin("moving " + toString(SUMO_ATTR_SHAPE) + " of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_SHAPE, toString(shapeToCommit))); + undoList->p_add(new GNEChange_Attribute(this, myNet, SUMO_ATTR_SHAPE, toString(shapeToCommit))); undoList->p_end(); } else { // set new shape calling private setAttribute function @@ -270,8 +280,9 @@ // push name (needed for getGUIGlObjectsUnderCursor(...) glPushName(getGlID()); // first check if inner polygon can be drawn - if(checkDraw(s)) { - drawInnerPolygon(s); + if (checkDraw(s)) { + // draw inner polygon + drawInnerPolygon(s, drawUsingSelectColor()); } // draw details of Netedit double circleWidth = myHintSize * MIN2((double)1, s.polySize.getExaggeration(s, this)); @@ -281,12 +292,12 @@ if (s.scale * circleWidth > 1.) { // set values relative to mouse position regarding to shape bool mouseOverVertex = false; - bool modeMove = myNet->getViewNet()->getCurrentEditMode() == GNE_MODE_MOVE; + bool modeMove = myNet->getViewNet()->getEditModes().networkEditMode == GNE_NMODE_MOVE; Position mousePosition = myNet->getViewNet()->getPositionInformation(); double distanceToShape = myShape.distance2D(mousePosition); // set colors RGBColor invertedColor, darkerColor; - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { invertedColor = s.selectionColor.invertedColor(); darkerColor = s.selectionColor.changedBrightness(-32); } else { @@ -316,7 +327,7 @@ GLHelper::drawFilledCircle(circleWidth, circleResolution); glPopMatrix(); // draw elevation or special symbols (Start, End and Block) - if (!s.drawForSelecting && myNet->getViewNet()->editingElevation()) { + if (!s.drawForSelecting && myNet->getViewNet()->getMoveOptions().editingElevation()) { // Push matrix glPushMatrix(); // Traslate to center of detector @@ -641,7 +652,7 @@ case GNE_ATTR_CLOSE_SHAPE: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -775,7 +786,7 @@ void GNEPoly::setAttribute(SumoXMLAttr key, const std::string& value) { // first remove object from grid due almost modificactions affects to boundary (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + if ((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { myNet->removeGLObjectFromGrid(this); } switch (key) { @@ -887,22 +898,9 @@ throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } // add object into grid again (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + if ((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { myNet->addGLObjectIntoGrid(this); } } - -void -GNEPoly::mouseOverObject(const GUIVisualizationSettings&) const { - // only continue if there isn't already a AC under cursor - if (myNet->getViewNet()->getDottedAC() == nullptr) { - // check if cursor is within the shape - if (getShape().around(myNet->getViewNet()->getPositionInformation())) { - myNet->getViewNet()->setDottedAC(this); - } - } -} - - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPoly.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPoly.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEPoly.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEPoly.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,6 +71,9 @@ /// @brief Destructor ~GNEPoly(); + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + /// @name functions for edit geometry /// @{ /// @brief begin movement (used when user click over edge to start a movement, to avoid problems with problems with GL Tree) @@ -249,9 +252,6 @@ /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /// @brief Invalidated copy constructor. GNEPoly(const GNEPoly&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouter.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouter.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouter.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,13 +39,14 @@ // =========================================================================== GNERerouter::GNERerouter(const std::string& id, GNEViewNet* viewNet, const Position& pos, const std::vector& edges, const std::string& name, const std::string& filename, double probability, bool off, double timeThreshold, const std::string& vTypes, bool blockMovement) : - GNEAdditional(id, viewNet, GLO_REROUTER, SUMO_TAG_REROUTER, name, blockMovement, edges), - myPosition(pos), - myFilename(filename), - myProbability(probability), - myOff(off), - myTimeThreshold(timeThreshold), - myVTypes(vTypes) { + GNEAdditional(id, viewNet, GLO_REROUTER, SUMO_TAG_REROUTER, name, blockMovement, +{}, {}, {}, {}, {}, edges, {}, {}, {}, {}), +myPosition(pos), +myFilename(filename), +myProbability(probability), +myOff(off), +myTimeThreshold(timeThreshold), +myVTypes(vTypes) { } @@ -113,7 +114,7 @@ GNERerouter::commitGeometryMoving(GNEUndoList* undoList) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); undoList->p_end(); } @@ -141,7 +142,7 @@ } else { glColor3d(1, 1, 1); glRotated(180, 0, 0, 1); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_REROUTERSELECTED), 1); } else { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_REROUTER), 1); @@ -191,7 +192,7 @@ } // Draw connections - myChildConnections.draw(); + myChildConnections.draw(getType()); } // check if dotted contour has to be drawn if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { @@ -220,7 +221,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_EDGES: - return parseIDs(myEdgeChilds); + return parseIDs(getEdgeChilds()); case SUMO_ATTR_POSITION: return toString(myPosition); case SUMO_ATTR_NAME: @@ -255,10 +256,10 @@ switch (key) { case SUMO_ATTR_ID: { // change ID of Rerouter Interval - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); // Change Ids of all Rerouter interval childs - for (auto i : myAdditionalChilds) { - i->setAttribute(SUMO_ATTR_ID, generateAdditionalChildID(SUMO_TAG_INTERVAL), undoList); + for (auto i : getAdditionalChilds()) { + i->setAttribute(SUMO_ATTR_ID, generateChildID(SUMO_TAG_INTERVAL), undoList); } break; } @@ -273,7 +274,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -343,19 +344,9 @@ case SUMO_ATTR_ID: changeAdditionalID(value); break; - case SUMO_ATTR_EDGES: { - // remove references of this rerouter in all edge childs - for (auto i : myEdgeChilds) { - i->removeAdditionalParent(this); - } - // set new edges - myEdgeChilds = parse >(myViewNet->getNet(), value); - // add references to this rerouter in all newedge childs - for (auto i : myEdgeChilds) { - i->addAdditionalParent(this); - } + case SUMO_ATTR_EDGES: + changeEdgeChilds(this, value); break; - } case SUMO_ATTR_POSITION: myPosition = parse(value); break; @@ -393,8 +384,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouter.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouter.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouter.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouterInterval.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouterInterval.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouterInterval.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouterInterval.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -20,27 +20,30 @@ // =========================================================================== #include -#include "GNERerouterInterval.h" #include #include #include +#include +#include "GNERerouterInterval.h" // =========================================================================== // member method definitions // =========================================================================== GNERerouterInterval::GNERerouterInterval(GNERerouterDialog* rerouterDialog) : - GNEAdditional(rerouterDialog->getEditedAdditional(), rerouterDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_INTERVAL, "", false) { + GNEAdditional(rerouterDialog->getEditedAdditional(), rerouterDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_INTERVAL, "", false, +{}, {}, {}, {rerouterDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}) { // fill reroute interval with default values setDefaultValues(); } GNERerouterInterval::GNERerouterInterval(GNEAdditional* rerouterParent, double begin, double end) : - GNEAdditional(rerouterParent, rerouterParent->getViewNet(), GLO_REROUTER, SUMO_TAG_INTERVAL, "", false), - myBegin(begin), - myEnd(end) { + GNEAdditional(rerouterParent, rerouterParent->getViewNet(), GLO_REROUTER, SUMO_TAG_INTERVAL, "", false, +{}, {}, {}, {rerouterParent}, {}, {}, {}, {}, {}, {}), +myBegin(begin), +myEnd(end) { } @@ -66,13 +69,13 @@ Position GNERerouterInterval::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNERerouterInterval::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -92,7 +95,7 @@ case SUMO_ATTR_END: return toString(myEnd); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -109,17 +112,17 @@ switch (key) { case SUMO_ATTR_ID: { // change ID of Rerouter Interval - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); // Change Ids of all Rerouter childs - for (auto i : myAdditionalChilds) { - i->setAttribute(SUMO_ATTR_ID, generateAdditionalChildID(i->getTagProperty().getTag()), undoList); + for (auto i : getAdditionalChilds()) { + i->setAttribute(SUMO_ATTR_ID, generateChildID(i->getTagProperty().getTag()), undoList); } break; } case SUMO_ATTR_BEGIN: case SUMO_ATTR_END: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -177,6 +180,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouterInterval.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouterInterval.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERerouterInterval.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERerouterInterval.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbe.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbe.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbe.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbe.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -38,12 +38,13 @@ // =========================================================================== GNERouteProbe::GNERouteProbe(const std::string& id, GNEViewNet* viewNet, GNEEdge* edge, const std::string& frequency, const std::string& name, const std::string& filename, double begin) : - GNEAdditional(id, viewNet, GLO_ROUTEPROBE, SUMO_TAG_ROUTEPROBE, name, false), - myEdge(edge), - myFrequency(frequency), - myFilename(filename), - myBegin(begin), - myRelativePositionY(0) { + GNEAdditional(id, viewNet, GLO_ROUTEPROBE, SUMO_TAG_ROUTEPROBE, name, false, { + edge +}, {}, {}, {}, {}, {}, {}, {}, {}, {}), +myFrequency(frequency), +myFilename(filename), +myBegin(begin), +myRelativePositionY(0) { } @@ -62,21 +63,15 @@ myGeometry.clearGeometry(); // obtain relative position of routeProbe in edge - myRelativePositionY = 2 * myEdge->getRouteProbeRelativePosition(this); + myRelativePositionY = 2 * getEdgeParents().front()->getRouteProbeRelativePosition(this); // get lanes of edge - GNELane* firstLane = myEdge->getLanes().at(0); + GNELane* firstLane = getEdgeParents().front()->getLanes().at(0); // Get shape of lane parent double offset = firstLane->getShape().length() < 0.5 ? firstLane->getShape().length() : 0.5; myGeometry.shape.push_back(firstLane->getShape().positionAtOffset(offset)); - // Obtain first position - Position f = myGeometry.shape[0] - Position(1, 0); - - // Obtain next position - Position s = myGeometry.shape[0] + Position(1, 0); - // Save rotation (angle) of the vector constructed by points f and s myGeometry.shapeRotations.push_back(firstLane->getShape().rotationDegreeAtOffset(offset) * -1); @@ -98,11 +93,11 @@ Position GNERouteProbe::getPositionInView() const { - if (myEdge->getLanes().front()->getShape().length() < 0.5) { - return myEdge->getLanes().front()->getShape().front(); + if (getEdgeParents().front()->getLanes().front()->getShape().length() < 0.5) { + return getEdgeParents().front()->getLanes().front()->getShape().front(); } else { - Position A = myEdge->getLanes().front()->getShape().positionAtOffset(0.5); - Position B = myEdge->getLanes().back()->getShape().positionAtOffset(0.5); + Position A = getEdgeParents().front()->getLanes().front()->getShape().positionAtOffset(0.5); + Position B = getEdgeParents().front()->getLanes().back()->getShape().positionAtOffset(0.5); // return Middle point return Position((A.x() + B.x()) / 2, (A.y() + B.y()) / 2); @@ -124,7 +119,7 @@ std::string GNERouteProbe::getParentName() const { - return myEdge->getMicrosimID(); + return getEdgeParents().front()->getMicrosimID(); } @@ -135,10 +130,10 @@ double width = (double) 2.0 * s.scale; glLineWidth(1.0); const double exaggeration = s.addSize.getExaggeration(s, this); - const int numberOfLanes = int(myEdge->getLanes().size()); + const int numberOfLanes = int(getEdgeParents().front()->getLanes().size()); // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(RGBColor(255, 216, 0)); @@ -165,7 +160,7 @@ // position indicator (White) if ((width * exaggeration > 1) && !s.drawForSelecting) { - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(RGBColor::WHITE); @@ -193,7 +188,7 @@ } else { glColor3d(1, 1, 1); glRotated(-90, 0, 0, 1); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_ROUTEPROBESELECTED), 1); } else { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_ROUTEPROBE), 1); @@ -228,7 +223,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_EDGE: - return myEdge->getID(); + return getEdgeParents().front()->getID(); case SUMO_ATTR_NAME: return myAdditionalName; case SUMO_ATTR_FILE: @@ -261,7 +256,7 @@ case SUMO_ATTR_BEGIN: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -324,7 +319,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_EDGE: - myEdge = changeEdge(myEdge, value); + changeEdgeParents(this, value); break; case SUMO_ATTR_NAME: myAdditionalName = value; @@ -351,8 +346,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbe.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbe.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbe.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbe.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -111,9 +111,6 @@ /// @} protected: - /// @brief The edge in which this RouteProbe is placed - GNEEdge* myEdge; - /// @brief Frequency of RouteProbe std::string myFrequency; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -33,10 +33,11 @@ // =========================================================================== GNERouteProbReroute::GNERouteProbReroute(GNERerouterIntervalDialog* rerouterIntervalDialog) : - GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_ROUTE_PROB_REROUTE, "", false) { + GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_ROUTE_PROB_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}) { // if exist a reroute, set newRoute ID - if (rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE).size() > 0) { - myNewRouteId = rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE).begin()->first; + if (rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).size() > 0) { + myNewRouteId = rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).begin()->first; } // fill route prob reroute interval with default values setDefaultValues(); @@ -44,9 +45,10 @@ GNERouteProbReroute::GNERouteProbReroute(GNEAdditional* rerouterIntervalParent, const std::string& newRouteId, double probability) : - GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_ROUTE_PROB_REROUTE, "", false), - myNewRouteId(newRouteId), - myProbability(probability) { + GNEAdditional(rerouterIntervalParent, rerouterIntervalParent->getViewNet(), GLO_REROUTER, SUMO_TAG_ROUTE_PROB_REROUTE, "", false, +{}, {}, {}, {rerouterIntervalParent}, {}, {}, {}, {}, {}, {}), +myNewRouteId(newRouteId), +myProbability(probability) { } @@ -73,13 +75,13 @@ Position GNERouteProbReroute::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNERouteProbReroute::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -99,7 +101,7 @@ case SUMO_ATTR_PROB: return toString(myProbability); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -118,7 +120,7 @@ case SUMO_ATTR_ROUTE: case SUMO_ATTR_PROB: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -176,6 +178,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNERouteProbReroute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEShape.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEShape.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEShape.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEShape.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -35,8 +36,20 @@ // method definitions // =========================================================================== -GNEShape::GNEShape(GNENet* net, SumoXMLTag tag, bool movementBlocked) : +GNEShape::GNEShape(GNENet* net, SumoXMLTag tag, bool movementBlocked, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds) : GNEAttributeCarrier(tag), + GNEHierarchicalElementParents(this, edgeParents, laneParents, shapeParents, additionalParents, demandElementParents), + GNEHierarchicalElementChilds(this, edgeChilds, laneChilds, shapeChilds, additionalChilds, demandElementChilds), myNet(net), myBlockMovement(movementBlocked) { } @@ -130,6 +143,16 @@ } +bool +GNEShape::drawUsingSelectColor() const { + if (mySelected && (myNet->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK)) { + return true; + } else { + return false; + } +} + + std::string GNEShape::getPopUpID() const { return getTagStr() + ": " + getID(); @@ -141,10 +164,4 @@ return getTagStr(); } - -void -GNEShape::mouseOverObject(const GUIVisualizationSettings&) const { -} - - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEShape.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEShape.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEShape.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEShape.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,25 +24,49 @@ #include -#include +#include +#include // =========================================================================== // class definitions // =========================================================================== -class GNEShape : public GNEAttributeCarrier { +class GNEShape : public GNEAttributeCarrier, public GNEHierarchicalElementParents, public GNEHierarchicalElementChilds { public: /**@brief Constructor. * @param[in] net The net to inform about gui updates * @param[in] tag sumo xml tag of the element * @param[in] movementBlocked if movement of POI is blocked - */ - GNEShape(GNENet* net, SumoXMLTag tag, bool movementBlocked); + * @param[in] edgeParents vector of edge parents + * @param[in] laneParents vector of lane parents + * @param[in] shapeParents vector of shape parents + * @param[in] additionalParents vector of additional parents + * @param[in] demandElementChilds vector of demandElement parents + * @param[in] edgeChilds vector of edge childs + * @param[in] laneChilds vector of lane childs + * @param[in] shapeChilds vector of shape childs + * @param[in] additionalChilds vector of additional childs + * @param[in] demandElementChilds vector of demandElement childs + */ + GNEShape(GNENet* net, SumoXMLTag tag, bool movementBlocked, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds); /// @brief Destructor ~GNEShape(); + /// @brief gererate a new ID for an element child + virtual std::string generateChildID(SumoXMLTag childTag) = 0; + /**@brief update pre-computed geometry information * @note: must be called when geometry changes (i.e. lane moved) and implemented in ALL childrens */ @@ -119,6 +143,9 @@ /// @brief check if attribute carrier is selected bool isAttributeCarrierSelected() const; + /// @brief check if attribute carrier must be drawn using selecting color. + bool drawUsingSelectColor() const; + /* @brief method for getting the Attribute of an XML key * @param[in] key The attribute key * @return string with the value associated to key @@ -174,9 +201,6 @@ /// @brief set attribute after validation virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0; - /// @brief method for check if mouse is over objects - virtual void mouseOverObject(const GUIVisualizationSettings& s) const = 0; - /// @brief Invalidated copy constructor. GNEShape(const GNEShape&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,6 @@ #include #include "GNEStoppingPlace.h" -#include "GNEAdditionalHandler.h" // =========================================================================== // static members @@ -43,58 +42,76 @@ // member method definitions // =========================================================================== -GNEStoppingPlace::GNEStoppingPlace(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, bool friendlyPosition, bool blockMovement) : - GNEAdditional(id, viewNet, type, tag, name, blockMovement), - myLane(lane), - myStartPosition(startPos), - myEndPosition(endPos), - myFriendlyPosition(friendlyPosition) { +GNEStoppingPlace::GNEStoppingPlace(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, GNELane* lane, const std::string& startPos, const std::string& endPos, + const std::string& name, bool friendlyPosition, bool blockMovement) : + GNEAdditional(id, viewNet, type, tag, name, blockMovement, {}, {lane}, {}, {}, {}, {}, {}, {}, {}, {}), + myStartPosition(startPos), + myEndPosition(endPos), +myFriendlyPosition(friendlyPosition) { } GNEStoppingPlace::~GNEStoppingPlace() {} -bool +bool GNEStoppingPlace::isAdditionalValid() const { // with friendly position enabled position are "always fixed" if (myFriendlyPosition) { return true; } else { + // obtain lane length + double laneLenght = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength() * getLaneParents().front()->getLengthGeometryFactor(); + // calculate start and end positions + double startPos = canParse(myStartPosition) ? parse(myStartPosition) : 0; + double endPos = canParse(myEndPosition) ? parse(myEndPosition) : laneLenght; + // check if position has to be fixed + if (startPos < 0) { + startPos += laneLenght; + } + if (endPos < 0) { + endPos += laneLenght; + } + // check values if (myStartPosition.empty() && myEndPosition.empty()) { return true; } else if (myStartPosition.empty()) { - return (canParse(myEndPosition) && (parse(myEndPosition) <= myLane->getParentEdge().getNBEdge()->getFinalLength())); + return (endPos <= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()); } else if (myEndPosition.empty()) { - return (canParse(myStartPosition) && (parse(myStartPosition) >= 0)); + return (startPos >= 0); } else { - return canParse(myStartPosition) && canParse(myEndPosition) && - (parse(myStartPosition) >= 0) && - (parse(myEndPosition) <= myLane->getParentEdge().getNBEdge()->getFinalLength()) && - ((parse(myEndPosition) - parse(myStartPosition)) >= POSITION_EPS); + return ((startPos >= 0) && (endPos <= getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) && ((endPos - startPos) >= POSITION_EPS)); } } } -std::string +std::string GNEStoppingPlace::getAdditionalProblem() const { - // declare variables + // calculate start and end positions + double startPos = canParse(myStartPosition) ? parse(myStartPosition) : 0; + double endPos = canParse(myEndPosition) ? parse(myEndPosition) : getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + // obtain lane lenght + double laneLenght = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + // check if position has to be fixed + if (startPos < 0) { + startPos += laneLenght; + } + if (endPos < 0) { + endPos += laneLenght; + } + // declare variables std::string errorStart, separator, errorEnd; // check positions over lane - if(canParse(myStartPosition)) { - if (parse(myStartPosition) < 0) { - errorStart = (toString(SUMO_ATTR_STARTPOS) + " < 0"); - } else if (parse(myStartPosition) > myLane->getParentEdge().getNBEdge()->getFinalLength()) { - errorStart = (toString(SUMO_ATTR_STARTPOS) + " > lanes's length"); - } - } - if(canParse(myEndPosition)) { - if (parse(myEndPosition) < 0) { - errorEnd = (toString(SUMO_ATTR_ENDPOS) + " < 0"); - } else if (parse(myEndPosition) > myLane->getParentEdge().getNBEdge()->getFinalLength()) { - errorEnd = (toString(SUMO_ATTR_ENDPOS) + " > lanes's length"); - } + if (startPos < 0) { + errorStart = (toString(SUMO_ATTR_STARTPOS) + " < 0"); + } else if (startPos > getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) { + errorStart = (toString(SUMO_ATTR_STARTPOS) + " > lanes's length"); + } + if (endPos < 0) { + errorEnd = (toString(SUMO_ATTR_ENDPOS) + " < 0"); + } else if (endPos > getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()) { + errorEnd = (toString(SUMO_ATTR_ENDPOS) + " > lanes's length"); } // check separator if ((errorStart.size() > 0) && (errorEnd.size() > 0)) { @@ -104,31 +121,106 @@ } -void +void GNEStoppingPlace::fixAdditionalProblem() { // declare new start and end position std::string newStartPos = myStartPosition; std::string newEndPos = myEndPosition; - // fix start and end positions using fixStoppinPlacePosition (0.01 is used to avoid precision problems) - GNEAdditionalHandler::fixStoppinPlacePosition(newStartPos, newEndPos, myLane->getLaneParametricLength() - 0.01, POSITION_EPS + 0.01, true); + // fix start and end positions using fixStoppinPlacePosition + fixStoppinPlacePosition(newStartPos, newEndPos, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), true); // set new start and end positions setAttribute(SUMO_ATTR_STARTPOS, newStartPos, myViewNet->getUndoList()); setAttribute(SUMO_ATTR_ENDPOS, newEndPos, myViewNet->getUndoList()); } +bool +GNEStoppingPlace::checkStoppinPlacePosition(const std::string& startPosStr, const std::string& endPosStr, const double laneLength, const bool friendlyPos) { + // obtain start and end position in double format, depending if it can be parsed to double + double startPos = GNEAttributeCarrier::canParse(startPosStr) ? GNEAttributeCarrier::parse(startPosStr) : 0; + double endPos = GNEAttributeCarrier::canParse(endPosStr) ? GNEAttributeCarrier::parse(endPosStr) : laneLength; + // return check stop pos (note: this is the same function of SUMORouteHandler::checkStopPos) + if (POSITION_EPS > laneLength) { + return false; + } + if (startPos < 0) { + startPos += laneLength; + } + if (endPos < 0) { + endPos += laneLength; + } + if (endPos < POSITION_EPS || endPos > laneLength) { + if (!friendlyPos) { + return false; + } + } + if (startPos < 0 || startPos > endPos - POSITION_EPS) { + if (!friendlyPos) { + return false; + } + } + return true; +} + + +bool +GNEStoppingPlace::fixStoppinPlacePosition(std::string& startPosStr, std::string& endPosStr, const double laneLength, const bool friendlyPos) { + // obtain start and end position in double format + double startPos = fabs(canParse(startPosStr) ? parse(startPosStr) : 0); + double endPos = fabs(parse(endPosStr) ? parse(endPosStr) : laneLength); + double minLength = POSITION_EPS + 0.01; + // return check stop pos (note: this is the same function of SUMORouteHandler::checkStopPos) + if (minLength > laneLength) { + return false; + } + if (startPos < 0) { + startPos += laneLength; + } + if (endPos < 0) { + endPos += laneLength; + } + if (endPos < minLength || endPos > laneLength) { + if (!friendlyPos) { + return false; + } + if (endPos < minLength) { + endPos = minLength; + } + if (endPos > laneLength) { + endPos = laneLength; + } + } + if (startPos < 0 || startPos > endPos - minLength) { + if (!friendlyPos) { + return false; + } + if (startPos < 0) { + startPos = 0; + } + if (startPos > endPos - minLength) { + startPos = endPos - minLength; + } + } + startPosStr = toString(startPos); + endPosStr = toString(endPos); + return true; +} + + Position GNEStoppingPlace::getPositionInView() const { - double startPos = canParse(myStartPosition) ? parse(myStartPosition) : 0; - double endPos = canParse(myEndPosition) ? parse(myEndPosition) : myLane->getShape().length(); + // calculate start and end positions as absolute values + double startPos = fabs(canParse(myStartPosition) ? parse(myStartPosition) : 0); + double endPos = fabs(canParse(myEndPosition) ? parse(myEndPosition) : getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()); + // obtain position in view depending if both positions are defined if (myStartPosition.empty() && myEndPosition.empty()) { - return myLane->getShape().positionAtOffset(myLane->getShape().length() / 2); + return getLaneParents().front()->getShape().positionAtOffset(getLaneParents().front()->getShape().length() / 2); } else if (myStartPosition.empty()) { - return myLane->getShape().positionAtOffset(endPos); + return getLaneParents().front()->getShape().positionAtOffset(endPos); } else if (myEndPosition.empty()) { - return myLane->getShape().positionAtOffset(startPos); + return getLaneParents().front()->getShape().positionAtOffset(startPos); } else { - return myLane->getShape().positionAtOffset((startPos + endPos) / 2.0); + return getLaneParents().front()->getShape().positionAtOffset((startPos + endPos) / 2.0); } } @@ -142,14 +234,32 @@ newPosition.add(offset); // filtern position using snap to active grid newPosition = myViewNet->snapToActiveGrid(newPosition); - double offsetLane = myLane->getShape().nearest_offset_to_point2D(newPosition, false) - myLane->getShape().nearest_offset_to_point2D(myMove.originalViewPosition, false); - // check if start position must be moved - if (!myStartPosition.empty()) { - myStartPosition = toString(parse(myMove.firstOriginalLanePosition) + offsetLane); - } - // check if start position must be moved - if (!myStartPosition.empty()) { - myEndPosition = toString(parse(myMove.secondOriginalPosition) + offsetLane); + double offsetLane = getLaneParents().front()->getShape().nearest_offset_to_point2D(newPosition, false) - getLaneParents().front()->getShape().nearest_offset_to_point2D(myMove.originalViewPosition, false); + // check if both position has to be moved + if (!myStartPosition.empty() && !myEndPosition.empty()) { + // calculate stoppingPlace lenght and lane lenght (After apply geometry factor) + double stoppingPlaceLenght = fabs(parse(myMove.secondOriginalPosition) - parse(myMove.firstOriginalLanePosition)); + double laneLengt = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength() * getLaneParents().front()->getLengthGeometryFactor(); + // avoid changing stopping place's lenght + if ((parse(myMove.firstOriginalLanePosition) + offsetLane) < 0) { + myStartPosition = "0"; + myEndPosition = toString(stoppingPlaceLenght); + } else if ((parse(myMove.secondOriginalPosition) + offsetLane) > laneLengt) { + myStartPosition = toString(laneLengt - stoppingPlaceLenght); + myEndPosition = toString(laneLengt); + } else { + myStartPosition = toString(parse(myMove.firstOriginalLanePosition) + offsetLane); + myEndPosition = toString(parse(myMove.secondOriginalPosition) + offsetLane); + } + } else { + // check if start position must be moved + if (!myStartPosition.empty()) { + myStartPosition = toString(parse(myMove.firstOriginalLanePosition) + offsetLane); + } + // check if start position must be moved + if (!myEndPosition.empty()) { + myEndPosition = toString(parse(myMove.secondOriginalPosition) + offsetLane); + } } // Update geometry updateGeometry(false); @@ -163,22 +273,16 @@ if (!myStartPosition.empty() || !myEndPosition.empty()) { undoList->p_begin("position of " + getTagStr()); if (!myStartPosition.empty()) { - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_STARTPOS, myStartPosition, true, myMove.firstOriginalLanePosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_STARTPOS, myStartPosition, true, myMove.firstOriginalLanePosition)); } if (!myEndPosition.empty()) { - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_ENDPOS, myEndPosition, true, myMove.secondOriginalPosition)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_ENDPOS, myEndPosition, true, myMove.secondOriginalPosition)); } undoList->p_end(); } } -GNELane* -GNEStoppingPlace::getLane() const { - return myLane; -} - - double GNEStoppingPlace::getStartPosition() const { if (canParse(myStartPosition)) { @@ -194,14 +298,14 @@ if (canParse(myEndPosition)) { return parse(myEndPosition); } else { - return myLane->getLaneShapeLength(); + return getLaneParents().front()->getLaneShapeLength(); } } std::string GNEStoppingPlace::getParentName() const { - return myLane->getMicrosimID(); + return getLaneParents().front()->getMicrosimID(); } @@ -214,43 +318,49 @@ double offsetSign = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1; // Get shape of lane parent - myGeometry.shape = myLane->getShape(); + myGeometry.shape = getLaneParents().front()->getShape(); // Move shape to side myGeometry.shape.move2side(movingToSide * offsetSign); - // set start position - double startPosFixed; - if (!canParse(myStartPosition)) { - startPosFixed = 0; - } else if (parse(myStartPosition) < 0) { - startPosFixed = 0; - } else if (parse(myStartPosition) > myLane->getParentEdge().getNBEdge()->getFinalLength()) { - startPosFixed = myLane->getParentEdge().getNBEdge()->getFinalLength(); - } else { - startPosFixed = parse(myStartPosition); - } - - // set end position - double endPosFixed; - if (!canParse(myEndPosition)) { - endPosFixed = myLane->getParentEdge().getNBEdge()->getFinalLength(); - } else if (parse(myEndPosition) < 0) { - endPosFixed = 0; - } else if (parse(myEndPosition) > myLane->getParentEdge().getNBEdge()->getFinalLength()) { - endPosFixed = myLane->getParentEdge().getNBEdge()->getFinalLength(); - } else { - endPosFixed = parse(myEndPosition); - } - // Cut shape using as delimitators fixed start position and fixed end position - myGeometry.shape = myGeometry.shape.getSubpart(startPosFixed * myLane->getLengthGeometryFactor(), endPosFixed * myLane->getLengthGeometryFactor()); + myGeometry.shape = myGeometry.shape.getSubpart(getStartGeometryPositionOverLane(), getEndGeometryPositionOverLane()); // Get calculate lenghts and rotations myGeometry.calculateShapeRotationsAndLengths(); } +double +GNEStoppingPlace::getStartGeometryPositionOverLane() const { + if (myStartPosition.empty()) { + return 0; + } else { + double fixedPos = parse(myStartPosition); + const double len = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + if (fixedPos < 0) { + fixedPos += len; + } + return fixedPos * getLaneParents().front()->getLengthGeometryFactor(); + } +} + + +double +GNEStoppingPlace::getEndGeometryPositionOverLane() const { + if (myEndPosition.empty()) { + return getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + } else { + double fixedPos = parse(myEndPosition); + const double len = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + if (fixedPos < 0) { + fixedPos += len; + } + return fixedPos * getLaneParents().front()->getLengthGeometryFactor(); + } +} + + std::string GNEStoppingPlace::getPopUpID() const { return getTagStr() + ": " + getID(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEStoppingPlace.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,7 +47,8 @@ * @param[in] friendlyPos enable or disable friendly position * @param[in] block movement enable or disable additional movement */ - GNEStoppingPlace(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, bool friendlyPosition, bool blockMovement); + GNEStoppingPlace(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, GNELane* lane, const std::string& startPos, const std::string& endPos, + const std::string& name, bool friendlyPosition, bool blockMovement); /// @brief Destructor ~GNEStoppingPlace(); @@ -64,8 +65,23 @@ void fixAdditionalProblem(); /// @} - /// @brief get Lane - GNELane* getLane() const; + /**@brief check if the position of an stoppingPlace over a lane is valid (without modifications) + * @param[in] startPosStr Start position of stoppingPlace in string format + * @param[in] endPosStr End position of stoppingPlace in string format + * @param[in] laneLength Length of the lane + * @param[in] friendlyPos Attribute of stoppingPlace + * @return true if the stoppingPlace position is valid, false in otherweise + */ + static bool checkStoppinPlacePosition(const std::string& startPosStr, const std::string& endPosStr, const double laneLength, const bool friendlyPos); + + /**@brief check if the position of an stoppingPlace over a la can be fixed + * @param[in] startPosStr Start position of stoppingPlace in string format (note: it can be modified) + * @param[in] endPosStr End position of stoppingPlace in string format (note: it can be modified) + * @param[in] laneLength Length of the lane in which stopping place is placed + * @param[in] friendlyPos boolean attribute of stoppingPlace + * @return true if the stoppingPlace position was sucesfully fixed, false in other case + */ + static bool fixStoppinPlacePosition(std::string& startPosStr, std::string& endPosStr, const double laneLength, const bool friendlyPos); /// @brief get start Position double getStartPosition() const; @@ -135,9 +151,6 @@ /// @} protected: - /// @brief The lane in which this lane is placed - GNELane* myLane; - /// @brief The relative start position this stopping place is located at (optional, if empty takes 0) std::string myStartPosition; @@ -150,9 +163,6 @@ /// @brief The position of the sign Position mySignPos; - /// @brief set geometry common to all stopping places - void setStoppingPlaceGeometry(double movingToSide); - /// @brief circle width resolution for all stopping places static const double myCircleWidth; @@ -165,6 +175,15 @@ /// @brief text inner circle width resolution for all stopping places static const double myCircleInText; + /// @brief set geometry common to all stopping places + void setStoppingPlaceGeometry(double movingToSide); + + /// @brief get start position over lane that is applicable to the shape + double getStartGeometryPositionOverLane() const; + + /// @brief get end position over lane that is applicable to the shape + double getEndGeometryPositionOverLane() const; + private: /// @brief set attribute after validation virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZ.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZ.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZ.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZ.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -42,16 +43,16 @@ // member method definitions // =========================================================================== GNETAZ::GNETAZ(const std::string& id, GNEViewNet* viewNet, PositionVector shape, RGBColor color, bool blockMovement) : - GNEAdditional(id, viewNet, GLO_TAZ, SUMO_TAG_TAZ, "", blockMovement), - myColor(color), - myBlockShape(false), - myCurrentMovingVertexIndex(-1), - myMaxWeightSource(0), - myMinWeightSource(0), - myAverageWeightSource(0), - myMaxWeightSink(0), - myMinWeightSink(0), - myAverageWeightSink(0) { + GNEAdditional(id, viewNet, GLO_TAZ, SUMO_TAG_TAZ, "", blockMovement, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}), + myColor(color), + myBlockShape(false), + myCurrentMovingVertexIndex(-1), + myMaxWeightSource(0), + myMinWeightSource(0), + myAverageWeightSource(0), + myMaxWeightSink(0), + myMinWeightSink(0), +myAverageWeightSink(0) { // set TAZ shape myGeometry.shape = shape; } @@ -87,12 +88,12 @@ GNETAZ::commitGeometryMoving(GNEUndoList* undoList) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_SHAPE, toString(myGeometry.shape[0]), true, toString(myMove.originalViewPosition))); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_SHAPE, toString(myGeometry.shape[0]), true, toString(myMove.originalViewPosition))); undoList->p_end(); } -int +int GNETAZ::moveVertexShape(const int index, const Position& oldPos, const Position& offset) { // only move shape if block movement block shape are disabled if (!myBlockMovement && !myBlockShape && (index != -1)) { @@ -127,7 +128,7 @@ } -void +void GNETAZ::moveEntireShape(const PositionVector& oldShape, const Position& offset) { // only move shape if block movement is disabled and block shape is enabled if (!myBlockMovement && myBlockShape) { @@ -143,7 +144,7 @@ } -void +void GNETAZ::commitShapeChange(const PositionVector& oldShape, GNEUndoList* undoList) { if (!myBlockMovement) { // disable current moving vertex @@ -164,13 +165,13 @@ } // commit new shape undoList->p_begin("moving " + toString(SUMO_ATTR_SHAPE) + " of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_SHAPE, toString(shapeToCommit))); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_SHAPE, toString(shapeToCommit))); undoList->p_end(); } } -int +int GNETAZ::getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid) { // check if position has to be snapped to grid if (snapToGrid) { @@ -191,7 +192,7 @@ } -void +void GNETAZ::deleteGeometryPoint(const Position& pos, bool allowUndo) { if (myGeometry.shape.size() > 2) { // obtain index @@ -224,7 +225,7 @@ } -bool +bool GNETAZ::isShapeBlocked() const { return myBlockShape; } @@ -250,7 +251,7 @@ if (myGeometry.shape.size() > 1) { glPushMatrix(); glTranslated(0, 0, 128); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(myColor); @@ -265,12 +266,12 @@ if (s.scale * myHintSize > 1.) { // set values relative to mouse position regarding to shape bool mouseOverVertex = false; - bool modeMove = myViewNet->getCurrentEditMode() == GNE_MODE_MOVE; + bool modeMove = myViewNet->getEditModes().networkEditMode == GNE_NMODE_MOVE; Position mousePosition = myViewNet->getPositionInformation(); double distanceToShape = myGeometry.shape.distance2D(mousePosition); // set colors RGBColor invertedColor, darkerColor; - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { invertedColor = s.selectionColor.invertedColor(); darkerColor = s.selectionColor.changedBrightness(-32); } else { @@ -333,14 +334,14 @@ return toString(myColor); case SUMO_ATTR_EDGES: { std::vector edgeIDs; - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { edgeIDs.push_back(i->getAttribute(SUMO_ATTR_EDGE)); } return toString(edgeIDs); } case GNE_ATTR_BLOCK_MOVEMENT: return toString(myBlockMovement); - case GNE_ATTR_BLOCK_SHAPE: + case GNE_ATTR_BLOCK_SHAPE: return toString(myBlockShape); case GNE_ATTR_SELECTED: return toString(isAttributeCarrierSelected()); @@ -378,7 +379,7 @@ case GNE_ATTR_BLOCK_SHAPE: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -427,7 +428,7 @@ } -void +void GNETAZ::updateAdditionalParent() { // reset all stadistic variables myMaxWeightSource = 0; @@ -440,7 +441,7 @@ int numberOfSources = 0; int numberOfSinks = 0; // iterate over additional childs - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { if (i->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) { double weight = parse(i->getAttribute(SUMO_ATTR_WEIGHT)); // check max Weight @@ -515,6 +516,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZ.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZ.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZ.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZ.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSink.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSink.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSink.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSink.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNETAZSink.cpp -/// @author Pablo Alvarez Lopez -/// @date Apr 2017 -/// @version $Id$ -/// -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include - -#include "GNETAZSink.h" - - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNETAZSink::GNETAZSink(GNEAdditional* TAZParent, GNEEdge* edge, double arrivalWeight) : - GNEAdditional(TAZParent, TAZParent->getViewNet(), GLO_TAZ, SUMO_TAG_TAZSINK, "", false), - myEdge(edge), - myArrivalWeight(arrivalWeight) { - // set edge as child - addEdgeChild(edge); -} - - -GNETAZSink::~GNETAZSink() {} - - -void -GNETAZSink::moveGeometry(const Position&) { - // This additional cannot be moved -} - - -void -GNETAZSink::commitGeometryMoving(GNEUndoList*) { - // This additional cannot be moved -} - - -void -GNETAZSink::updateGeometry(bool /*updateGrid*/) { - // Currently this additional doesn't own a Geometry -} - - -Position -GNETAZSink::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); -} - - -std::string -GNETAZSink::getParentName() const { - return myFirstAdditionalParent->getID(); -} - - -void -GNETAZSink::drawGL(const GUIVisualizationSettings&) const { - // Currently This additional isn't drawn -} - - -std::string -GNETAZSink::getAttribute(SumoXMLAttr key) const { - switch (key) { - case SUMO_ATTR_ID: - return getAdditionalID(); - case SUMO_ATTR_EDGE: - return myEdge->getID(); - case SUMO_ATTR_WEIGHT: - return toString(myArrivalWeight); - case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); - case GNE_ATTR_GENERIC: - return getGenericParametersStr(); - case GNE_ATTR_TAZCOLOR: { - // obtain max and min weight source - double maxWeightSink = parse(myFirstAdditionalParent->getAttribute(GNE_ATTR_MAX_SINK)); - double minWeightSink = parse(myFirstAdditionalParent->getAttribute(GNE_ATTR_MIN_SINK)); - // avoid division between zero - if ((maxWeightSink - minWeightSink) == 0) { - return "0"; - } else { - // calculate percentage relative to the max and min weight - double percentage = (myArrivalWeight - minWeightSink) / (maxWeightSink - minWeightSink); - // convert percentage to a value between [0-9] (because we have only 10 colors) - if(percentage >= 1) { - return "9"; - } else if(percentage < 0) { - return "0"; - } else { - return toString((int)(percentage*10)); - } - } - } - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -void -GNETAZSink::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { - // this additional is the only that can edit a variable directly, see GNEAdditionalHandler::buildTAZEdge(...) - if(undoList == nullptr) { - setAttribute(key, value); - } else { - if (value == getAttribute(key)) { - return; //avoid needless changes, later logic relies on the fact that attributes have changed - } - switch (key) { - case SUMO_ATTR_ID: - case SUMO_ATTR_WEIGHT: - case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } - } -} - - -bool -GNETAZSink::isValid(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - return isValidAdditionalID(value); - case SUMO_ATTR_WEIGHT: - return canParse(value) && (parse(value) >= 0); - case GNE_ATTR_GENERIC: - return isGenericParametersValid(value); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -std::string -GNETAZSink::getPopUpID() const { - return getTagStr(); -} - - -std::string -GNETAZSink::getHierarchyName() const { - return getTagStr() + ": " + getAttribute(SUMO_ATTR_WEIGHT); -} - -// =========================================================================== -// private -// =========================================================================== - -void -GNETAZSink::setAttribute(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - changeAdditionalID(value); - break; - case SUMO_ATTR_WEIGHT: - myArrivalWeight = parse(value); - // update statictis of TAZ parent - myFirstAdditionalParent->updateAdditionalParent(); - break; - case GNE_ATTR_GENERIC: - setGenericParametersStr(value); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSink.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSink.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSink.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSink.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNETAZSink.h -/// @author Pablo Alvarez Lopez -/// @date Apr 2017 -/// @version $Id$ -/// -// -/****************************************************************************/ -#ifndef GNETAZSink_h -#define GNETAZSink_h - - -// =========================================================================== -// included modules -// =========================================================================== - -#include "GNEAdditional.h" - -// =========================================================================== -// class declarations -// =========================================================================== - -class GNETAZ; -class GNEEdge; - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GNETAZSink - * class used to represent a interval used in Traffic Assignment Zones - */ -class GNETAZSink : public GNEAdditional { - -public: - /// @brief constructor - GNETAZSink(GNEAdditional* TAZParent, GNEEdge* edge, double arrivalWeight); - - /// @brief destructor - ~GNETAZSink(); - - /// @name Functions related with geometry of element - /// @{ - /**@brief change the position of the element geometry without saving in undoList - * @param[in] offset Position used for calculate new position of geometry without updating RTree - */ - void moveGeometry(const Position& offset); - - /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) - * @param[in] undoList The undoList on which to register changes - */ - void commitGeometryMoving(GNEUndoList* undoList); - - /// @brief update pre-computed geometry information - void updateGeometry(bool updateGrid); - - /// @brief Returns position of additional in view - Position getPositionInView() const; - /// @} - - /// @name inherited from GUIGlObject - /// @{ - /**@brief Returns the name of the parent object - * @return This object's parent id - */ - std::string getParentName() 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 inherited from GNEAttributeCarrier - /// @{ - /* @brief method for getting the Attribute of an XML key - * @param[in] key The attribute key - * @return string with the value associated to key - */ - std::string getAttribute(SumoXMLAttr key) const; - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - * @param[in] net optionally the GNENet to inform about gui updates - */ - void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - */ - bool isValid(SumoXMLAttr key, const std::string& value); - - /// @brief get PopPup ID (Used in AC Hierarchy) - std::string getPopUpID() const; - - /// @brief get Hierarchy Name (Used in AC Hierarchy) - std::string getHierarchyName() const; - /// @} - -protected: - /// @brief edge - GNEEdge *myEdge; - - /// @brief arrival Weight - double myArrivalWeight; - -private: - /// @brief method for setting the attribute and nothing else - void setAttribute(SumoXMLAttr key, const std::string& value); - - /// @brief Invalidated copy constructor. - GNETAZSink(const GNETAZSink&) = delete; - - /// @brief Invalidated assignment operator - GNETAZSink& operator=(const GNETAZSink&) = delete; -}; - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSource.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSource.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSource.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSource.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNETAZSource.cpp -/// @author Pablo Alvarez Lopez -/// @date Apr 2017 -/// @version $Id$ -/// -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include - -#include "GNETAZSource.h" - - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNETAZSource::GNETAZSource(GNEAdditional* TAZParent, GNEEdge* edge, double departWeight) : - GNEAdditional(TAZParent, TAZParent->getViewNet(), GLO_TAZ, SUMO_TAG_TAZSOURCE, "", false), - myEdge(edge), - myDepartWeight(departWeight) { - // set edge as child - addEdgeChild(edge); -} - - -GNETAZSource::~GNETAZSource() {} - - -void -GNETAZSource::moveGeometry(const Position&) { - // This additional cannot be moved -} - - -void -GNETAZSource::commitGeometryMoving(GNEUndoList*) { - // This additional cannot be moved -} - - -void -GNETAZSource::updateGeometry(bool /*updateGrid*/) { - // Currently this additional doesn't own a Geometry -} - - -Position -GNETAZSource::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); -} - - -std::string -GNETAZSource::getParentName() const { - return myFirstAdditionalParent->getID(); -} - - -void -GNETAZSource::drawGL(const GUIVisualizationSettings&) const { - // Currently This additional isn't drawn -} - - -std::string -GNETAZSource::getAttribute(SumoXMLAttr key) const { - switch (key) { - case SUMO_ATTR_ID: - return getAdditionalID(); - case SUMO_ATTR_EDGE: - return myEdge->getID(); - case SUMO_ATTR_WEIGHT: - return toString(myDepartWeight); - case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); - case GNE_ATTR_GENERIC: - return getGenericParametersStr(); - case GNE_ATTR_TAZCOLOR: { - // obtain max and min weight source - double maxWeightSource = parse(myFirstAdditionalParent->getAttribute(GNE_ATTR_MAX_SOURCE)); - double minWeightSource = parse(myFirstAdditionalParent->getAttribute(GNE_ATTR_MIN_SOURCE)); - // avoid division between zero - if ((maxWeightSource - minWeightSource) == 0) { - return "0"; - } else { - // calculate percentage relative to the max and min weight - double percentage = (myDepartWeight - minWeightSource) / (maxWeightSource - minWeightSource); - // convert percentage to a value between [0-9] (because we have only 10 colors) - if(percentage >= 1) { - return "9"; - } else if(percentage < 0) { - return "0"; - } else { - return toString((int)(percentage*10)); - } - } - } - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -void -GNETAZSource::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { - // this additional is the only that can edit a variable directly, see GNEAdditionalHandler::buildTAZEdge(...) - if(undoList == nullptr) { - setAttribute(key, value); - } else { - if (value == getAttribute(key)) { - return; //avoid needless changes, later logic relies on the fact that attributes have changed - } - switch (key) { - case SUMO_ATTR_ID: - case SUMO_ATTR_WEIGHT: - case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } - } -} - - -bool -GNETAZSource::isValid(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - return isValidAdditionalID(value); - case SUMO_ATTR_WEIGHT: - return canParse(value) && (parse(value) >= 0); - case GNE_ATTR_GENERIC: - return isGenericParametersValid(value); - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -std::string -GNETAZSource::getPopUpID() const { - return getTagStr(); -} - - -std::string -GNETAZSource::getHierarchyName() const { - return getTagStr() + ": " + getAttribute(SUMO_ATTR_WEIGHT); -} - -// =========================================================================== -// private -// =========================================================================== - -void -GNETAZSource::setAttribute(SumoXMLAttr key, const std::string& value) { - switch (key) { - case SUMO_ATTR_ID: - changeAdditionalID(value); - break; - case SUMO_ATTR_WEIGHT: - myDepartWeight = parse(value); - // update statictis of TAZ parent - myFirstAdditionalParent->updateAdditionalParent(); - break; - case GNE_ATTR_GENERIC: - setGenericParametersStr(value); - break; - default: - throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); - } -} - - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSource.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSource.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSource.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSource.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNETAZSource.h -/// @author Pablo Alvarez Lopez -/// @date Apr 2017 -/// @version $Id$ -/// -// -/****************************************************************************/ -#ifndef GNETAZSource_h -#define GNETAZSource_h - - -// =========================================================================== -// included modules -// =========================================================================== - -#include "GNEAdditional.h" - -// =========================================================================== -// class declarations -// =========================================================================== - -class GNETAZ; -class GNETAZSink; - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GNETAZSource - * class used to represent a interval used in Traffic Assignment Zones - */ -class GNETAZSource : public GNEAdditional { - -public: - /// @brief constructor - GNETAZSource(GNEAdditional* TAZParent, GNEEdge* edge, double departWeight); - - /// @brief destructor - ~GNETAZSource(); - - /// @name Functions related with geometry of element - /// @{ - /**@brief change the position of the element geometry without saving in undoList - * @param[in] offset Position used for calculate new position of geometry without updating RTree - */ - void moveGeometry(const Position& offset); - - /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) - * @param[in] undoList The undoList on which to register changes - */ - void commitGeometryMoving(GNEUndoList* undoList); - - /// @brief update pre-computed geometry information - void updateGeometry(bool updateGrid); - - /// @brief Returns position of additional in view - Position getPositionInView() const; - /// @} - - /// @name inherited from GUIGlObject - /// @{ - /**@brief Returns the name of the parent object - * @return This object's parent id - */ - std::string getParentName() 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 inherited from GNEAttributeCarrier - /// @{ - /* @brief method for getting the Attribute of an XML key - * @param[in] key The attribute key - * @return string with the value associated to key - */ - std::string getAttribute(SumoXMLAttr key) const; - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - * @param[in] net optionally the GNENet to inform about gui updates - */ - void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); - - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - */ - bool isValid(SumoXMLAttr key, const std::string& value); - - /// @brief get PopPup ID (Used in AC Hierarchy) - std::string getPopUpID() const; - - /// @brief get Hierarchy Name (Used in AC Hierarchy) - std::string getHierarchyName() const; - /// @} - -protected: - /// @brief edge - GNEEdge *myEdge; - - /// @brief depart Weight - double myDepartWeight; - -private: - /// @brief method for setting the attribute and nothing else - void setAttribute(SumoXMLAttr key, const std::string& value); - - /// @brief Invalidated copy constructor. - GNETAZSource(const GNETAZSource&) = delete; - - /// @brief Invalidated assignment operator - GNETAZSource& operator=(const GNETAZSource&) = delete; -}; - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,212 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNETAZSourceSink.cpp +/// @author Pablo Alvarez Lopez +/// @date Apr 2017 +/// @version $Id$ +/// +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include + +#include "GNETAZSourceSink.h" + + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNETAZSourceSink::GNETAZSourceSink(SumoXMLTag sourceSinkTag, GNEAdditional* TAZParent, GNEEdge* edge, double departWeight) : + GNEAdditional(TAZParent, TAZParent->getViewNet(), GLO_TAZ, sourceSinkTag, "", false, { + edge +}, {}, {}, {TAZParent}, {}, {}, {}, {}, {}, {}), +myDepartWeight(departWeight) { + //check that this is a TAZ Source OR a TAZ Sink + if ((sourceSinkTag != SUMO_TAG_TAZSOURCE) && (sourceSinkTag != SUMO_TAG_TAZSINK)) { + throw InvalidArgument("Invalid TAZ Child Tag"); + } +} + + +GNETAZSourceSink::~GNETAZSourceSink() {} + + +double +GNETAZSourceSink::getDepartWeight() const { + return myDepartWeight; +} + + +void +GNETAZSourceSink::moveGeometry(const Position&) { + // This additional cannot be moved +} + + +void +GNETAZSourceSink::commitGeometryMoving(GNEUndoList*) { + // This additional cannot be moved +} + + +void +GNETAZSourceSink::updateGeometry(bool /*updateGrid*/) { + // Currently this additional doesn't own a Geometry +} + + +Position +GNETAZSourceSink::getPositionInView() const { + return getAdditionalParents().at(0)->getPositionInView(); +} + + +std::string +GNETAZSourceSink::getParentName() const { + return getAdditionalParents().at(0)->getID(); +} + + +void +GNETAZSourceSink::drawGL(const GUIVisualizationSettings&) const { + // Currently This additional isn't drawn +} + + +std::string +GNETAZSourceSink::getAttribute(SumoXMLAttr key) const { + switch (key) { + case SUMO_ATTR_ID: + return getAdditionalID(); + case SUMO_ATTR_EDGE: + return getEdgeParents().front()->getID(); + case SUMO_ATTR_WEIGHT: + return toString(myDepartWeight); + case GNE_ATTR_PARENT: + return getAdditionalParents().at(0)->getID(); + case GNE_ATTR_GENERIC: + return getGenericParametersStr(); + case GNE_ATTR_TAZCOLOR: { + // obtain max and min weight source + double maxWeightSource = parse(getAdditionalParents().at(0)->getAttribute(GNE_ATTR_MAX_SOURCE)); + double minWeightSource = parse(getAdditionalParents().at(0)->getAttribute(GNE_ATTR_MIN_SOURCE)); + // avoid division between zero + if ((maxWeightSource - minWeightSource) == 0) { + return "0"; + } else { + // calculate percentage relative to the max and min weight + double percentage = (myDepartWeight - minWeightSource) / (maxWeightSource - minWeightSource); + // convert percentage to a value between [0-9] (because we have only 10 colors) + if (percentage >= 1) { + return "9"; + } else if (percentage < 0) { + return "0"; + } else { + return toString((int)(percentage * 10)); + } + } + } + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +void +GNETAZSourceSink::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { + // this additional is the only that can edit a variable directly, see GNEAdditionalHandler::buildTAZEdge(...) + if (undoList == nullptr) { + setAttribute(key, value); + } else { + if (value == getAttribute(key)) { + return; //avoid needless changes, later logic relies on the fact that attributes have changed + } + switch (key) { + case SUMO_ATTR_ID: + case SUMO_ATTR_WEIGHT: + case GNE_ATTR_GENERIC: + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } + } +} + + +bool +GNETAZSourceSink::isValid(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + return isValidAdditionalID(value); + case SUMO_ATTR_WEIGHT: + return canParse(value) && (parse(value) >= 0); + case GNE_ATTR_GENERIC: + return isGenericParametersValid(value); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +std::string +GNETAZSourceSink::getPopUpID() const { + return getTagStr(); +} + + +std::string +GNETAZSourceSink::getHierarchyName() const { + return getTagStr() + ": " + getAttribute(SUMO_ATTR_WEIGHT); +} + +Boundary +GNETAZSourceSink::getCenteringBoundary() const { + return getEdgeParents().front()->getNBEdge()->getGeometry().getBoxBoundary(); +} + +// =========================================================================== +// private +// =========================================================================== + +void +GNETAZSourceSink::setAttribute(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + changeAdditionalID(value); + break; + case SUMO_ATTR_WEIGHT: + myDepartWeight = parse(value); + // update statictis of TAZ parent + getAdditionalParents().at(0)->updateAdditionalParent(); + break; + case GNE_ATTR_GENERIC: + setGenericParametersStr(value); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNETAZSourceSink.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,143 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNETAZSourceSink.h +/// @author Pablo Alvarez Lopez +/// @date Apr 2017 +/// @version $Id$ +/// +// +/****************************************************************************/ +#ifndef GNETAZSourceSink_h +#define GNETAZSourceSink_h + + +// =========================================================================== +// included modules +// =========================================================================== + +#include "GNEAdditional.h" + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNETAZ; +class GNETAZSink; + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNETAZSourceSink + * class used to represent a interval used in Traffic Assignment Zones + */ +class GNETAZSourceSink : public GNEAdditional { + +public: + /**@brief Constructor + * @param[in] sourceSinkTag Child Tag (Either SUMO_TAG_TAZSOURCE or SUMO_TAG_TAZINK) + * @param[in] parent pointer to TAZ of this TAZSourceSinks belongs + * @param[in] edge Edge of this TAZ Child belongs + * @param[in] departWeight depart weight of this TAZ child + */ + GNETAZSourceSink(SumoXMLTag sourceSinkTag, GNEAdditional* TAZParent, GNEEdge* edge, double departWeight); + + /// @brief destructor + ~GNETAZSourceSink(); + + /// @brief get depart weight + double getDepartWeight() const; + + /// @name Functions related with geometry of element + /// @{ + /**@brief change the position of the element geometry without saving in undoList + * @param[in] offset Position used for calculate new position of geometry without updating RTree + */ + void moveGeometry(const Position& offset); + + /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) + * @param[in] undoList The undoList on which to register changes + */ + void commitGeometryMoving(GNEUndoList* undoList); + + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + + /// @brief Returns position of additional in view + Position getPositionInView() const; + /// @} + + /// @name inherited from GUIGlObject + /// @{ + /**@brief Returns the name of the parent object + * @return This object's parent id + */ + std::string getParentName() 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 inherited from GNEAttributeCarrier + /// @{ + /* @brief method for getting the Attribute of an XML key + * @param[in] key The attribute key + * @return string with the value associated to key + */ + std::string getAttribute(SumoXMLAttr key) const; + + /* @brief method for setting the attribute and letting the object perform additional changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + * @param[in] net optionally the GNENet to inform about gui updates + */ + void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); + + /* @brief method for setting the attribute and letting the object perform additional changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + */ + bool isValid(SumoXMLAttr key, const std::string& value); + + /// @brief get PopPup ID (Used in AC Hierarchy) + std::string getPopUpID() const; + + /// @brief get Hierarchy Name (Used in AC Hierarchy) + std::string getHierarchyName() const; + + /**@brief Returns the boundary to which the view shall be centered in order to show the object + * @return The boundary the object is within + */ + Boundary getCenteringBoundary() const; + /// @} + +protected: + /// @brief depart Weight + double myDepartWeight; + +private: + /// @brief method for setting the attribute and nothing else + void setAttribute(SumoXMLAttr key, const std::string& value); + + /// @brief Invalidated copy constructor. + GNETAZSourceSink(const GNETAZSourceSink&) = delete; + + /// @brief Invalidated assignment operator + GNETAZSourceSink& operator=(const GNETAZSourceSink&) = delete; +}; + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVaporizer.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVaporizer.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVaporizer.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVaporizer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,10 +37,11 @@ // =========================================================================== GNEVaporizer::GNEVaporizer(GNEViewNet* viewNet, GNEEdge* edge, double begin, double end, const std::string& name) : - GNEAdditional(edge->getID(), viewNet, GLO_VAPORIZER, SUMO_TAG_VAPORIZER, name, false), - myEdge(edge), - myBegin(begin), - myEnd(end) { + GNEAdditional(edge->getID(), viewNet, GLO_VAPORIZER, SUMO_TAG_VAPORIZER, name, false, { + edge +}, {}, {}, {}, {}, {}, {}, {}, {}, {}), +myBegin(begin), +myEnd(end) { } @@ -59,18 +60,12 @@ myGeometry.clearGeometry(); // get lanes of edge - GNELane* firstLane = myEdge->getLanes().at(0); + GNELane* firstLane = getEdgeParents().front()->getLanes().at(0); // Get shape of lane parent double offset = firstLane->getShape().length() < 2.5 ? firstLane->getShape().length() : 2.5; myGeometry.shape.push_back(firstLane->getShape().positionAtOffset(offset)); - // Obtain first position - Position f = myGeometry.shape[0] - Position(1, 0); - - // Obtain next position - Position s = myGeometry.shape[0] + Position(1, 0); - // Save rotation (angle) of the vector constructed by points f and s myGeometry.shapeRotations.push_back(firstLane->getShape().rotationDegreeAtOffset(0) * -1); @@ -92,11 +87,11 @@ Position GNEVaporizer::getPositionInView() const { - if (myEdge->getLanes().front()->getShape().length() < 2.5) { - return myEdge->getLanes().front()->getShape().front(); + if (getEdgeParents().front()->getLanes().front()->getShape().length() < 2.5) { + return getEdgeParents().front()->getLanes().front()->getShape().front(); } else { - Position A = myEdge->getLanes().front()->getShape().positionAtOffset(2.5); - Position B = myEdge->getLanes().back()->getShape().positionAtOffset(2.5); + Position A = getEdgeParents().front()->getLanes().front()->getShape().positionAtOffset(2.5); + Position B = getEdgeParents().front()->getLanes().back()->getShape().positionAtOffset(2.5); // return Middle point return Position((A.x() + B.x()) / 2, (A.y() + B.y()) / 2); @@ -118,7 +113,7 @@ std::string GNEVaporizer::getParentName() const { - return myEdge->getMicrosimID(); + return getEdgeParents().front()->getMicrosimID(); } @@ -129,10 +124,10 @@ double width = (double) 2.0 * s.scale; glLineWidth(1.0); const double exaggeration = s.addSize.getExaggeration(s, this); - const int numberOfLanes = int(myEdge->getLanes().size()); + const int numberOfLanes = int(getEdgeParents().front()->getLanes().size()); // set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectedAdditionalColor); } else { GLHelper::setColor(RGBColor(120, 216, 0)); @@ -158,7 +153,7 @@ // draw position indicator (White) if isn't being drawn for selecting if ((width * exaggeration > 1) && !s.drawForSelecting) { - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GLHelper::setColor(s.selectionColor); } else { GLHelper::setColor(RGBColor::WHITE); @@ -186,7 +181,7 @@ } else { glColor3d(1, 1, 1); glRotated(-90, 0, 0, 1); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_VAPORIZERSELECTED), 1); } else { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_VAPORIZER), 1); @@ -250,7 +245,7 @@ case SUMO_ATTR_NAME: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -313,7 +308,7 @@ case SUMO_ATTR_ID: case SUMO_ATTR_EDGE: changeAdditionalID(value); - myEdge = changeEdge(myEdge, value); + changeEdgeParents(this, value); break; case SUMO_ATTR_BEGIN: myBegin = parse(value); @@ -337,8 +332,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVaporizer.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVaporizer.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVaporizer.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVaporizer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -109,9 +109,6 @@ /// @} protected: - /// @brief The edge in which this vaporizer is placed - GNEEdge* myEdge; - /// @brief begin time of vaporizer double myBegin; diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -38,8 +38,8 @@ // =========================================================================== GNEVariableSpeedSign::GNEVariableSpeedSign(const std::string& id, GNEViewNet* viewNet, const Position& pos, const std::vector& lanes, const std::string& name, bool blockMovement) : - GNEAdditional(id, viewNet, GLO_VSS, SUMO_TAG_VSS, name, blockMovement, lanes), - myPosition(pos) { + GNEAdditional(id, viewNet, GLO_VSS, SUMO_TAG_VSS, name, blockMovement, {}, {}, {}, {}, {}, {}, lanes, {}, {}, {}), +myPosition(pos) { } @@ -107,7 +107,7 @@ GNEVariableSpeedSign::commitGeometryMoving(GNEUndoList* undoList) { // commit new position allowing undo/redo undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_POSITION, toString(myPosition), true, toString(myMove.originalViewPosition))); undoList->p_end(); } @@ -134,7 +134,7 @@ } else { glColor3d(1, 1, 1); glRotated(180, 0, 0, 1); - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_VARIABLESPEEDSIGNSELECTED), 1); } else { GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(GNETEXTURE_VARIABLESPEEDSIGN), 1); @@ -187,7 +187,7 @@ } // Draw connections - myChildConnections.draw(); + myChildConnections.draw(getType()); } // Pop symbol matrix @@ -222,7 +222,7 @@ case SUMO_ATTR_ID: return getAdditionalID(); case SUMO_ATTR_LANES: - return parseIDs(myLaneChilds); + return parseIDs(getLaneChilds()); case SUMO_ATTR_POSITION: return toString(myPosition); case SUMO_ATTR_NAME: @@ -247,10 +247,10 @@ switch (key) { case SUMO_ATTR_ID: { // change ID of Rerouter Interval - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); // Change Ids of all Variable Speed Sign - for (auto i : myAdditionalChilds) { - i->setAttribute(SUMO_ATTR_ID, generateAdditionalChildID(SUMO_TAG_STEP), undoList); + for (auto i : getAdditionalChilds()) { + i->setAttribute(SUMO_ATTR_ID, generateChildID(SUMO_TAG_STEP), undoList); } break; } @@ -260,7 +260,7 @@ case GNE_ATTR_BLOCK_MOVEMENT: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -317,7 +317,7 @@ changeAdditionalID(value); break; case SUMO_ATTR_LANES: - myLaneChilds = parse >(myViewNet->getNet(), value); + changeLaneChilds(this, value); break; case SUMO_ATTR_POSITION: myPosition = parse(value); @@ -341,8 +341,8 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSign.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.cpp sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.cpp --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,6 +23,7 @@ #include #include #include +#include #include "GNEVariableSpeedSignStep.h" @@ -32,12 +33,13 @@ // =========================================================================== GNEVariableSpeedSignStep::GNEVariableSpeedSignStep(GNEVariableSpeedSignDialog* variableSpeedSignDialog) : - GNEAdditional(variableSpeedSignDialog->getEditedAdditional(), variableSpeedSignDialog->getEditedAdditional()->getViewNet(), GLO_VSS, SUMO_TAG_STEP, "", false) { + GNEAdditional(variableSpeedSignDialog->getEditedAdditional(), variableSpeedSignDialog->getEditedAdditional()->getViewNet(), GLO_VSS, SUMO_TAG_STEP, "", false, +{}, {}, {}, {variableSpeedSignDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}) { // fill VSS Step with default values setDefaultValues(); // set time Attribute manually - if (myFirstAdditionalParent->getAdditionalChilds().size() > 0) { - myTime = parse(myFirstAdditionalParent->getAdditionalChilds().back()->getAttribute(SUMO_ATTR_TIME)) + 1; + if (getAdditionalParents().at(0)->getAdditionalChilds().size() > 0) { + myTime = parse(getAdditionalParents().at(0)->getAdditionalChilds().back()->getAttribute(SUMO_ATTR_TIME)) + 1; } else { myTime = 0; } @@ -45,9 +47,10 @@ GNEVariableSpeedSignStep::GNEVariableSpeedSignStep(GNEAdditional* variableSpeedSignParent, double time, double speed) : - GNEAdditional(variableSpeedSignParent, variableSpeedSignParent->getViewNet(), GLO_VSS, SUMO_TAG_STEP, "", false), - myTime(time), - mySpeed(speed) { + GNEAdditional(variableSpeedSignParent, variableSpeedSignParent->getViewNet(), GLO_VSS, SUMO_TAG_STEP, "", false, +{}, {}, {}, {variableSpeedSignParent}, {}, {}, {}, {}, {}, {}), +myTime(time), +mySpeed(speed) { } @@ -80,13 +83,13 @@ Position GNEVariableSpeedSignStep::getPositionInView() const { - return myFirstAdditionalParent->getPositionInView(); + return getAdditionalParents().at(0)->getPositionInView(); } std::string GNEVariableSpeedSignStep::getParentName() const { - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); } @@ -106,7 +109,7 @@ case SUMO_ATTR_SPEED: return toString(mySpeed); case GNE_ATTR_PARENT: - return myFirstAdditionalParent->getID(); + return getAdditionalParents().at(0)->getID(); case GNE_ATTR_GENERIC: return getGenericParametersStr(); default: @@ -125,7 +128,7 @@ case SUMO_ATTR_TIME: case SUMO_ATTR_SPEED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -148,7 +151,7 @@ } // check that there isn't duplicate times int counter = 0; - for (auto i : myFirstAdditionalParent->getAdditionalChilds()) { + for (auto i : getAdditionalParents().at(0)->getAdditionalChilds()) { if (parse(i->getAttribute(SUMO_ATTR_TIME)) == newTime) { counter++; } @@ -158,7 +161,7 @@ return false; } case SUMO_ATTR_SPEED: - return canParse(value) && (parse(value) >= 0); + return canParse(value); case GNE_ATTR_GENERIC: return isGenericParametersValid(value); default: @@ -200,6 +203,10 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.h sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.h --- sumo-1.1.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/GNEVariableSpeedSignStep.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/Makefile.am sumo-1.2.0+dfsg1/src/netedit/additionals/Makefile.am --- sumo-1.1.0+dfsg1/src/netedit/additionals/Makefile.am 2018-10-28 23:00:27.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -17,18 +17,14 @@ GNEDetectorE1Instant.cpp GNEDetectorE1Instant.h \ GNEDetectorE2.cpp GNEDetectorE2.h \ GNEDetectorE3.cpp GNEDetectorE3.h \ -GNEDetectorEntry.cpp GNEDetectorEntry.h \ -GNEDetectorExit.cpp GNEDetectorExit.h \ +GNEDetectorEntryExit.cpp GNEDetectorEntryExit.h \ GNERerouter.cpp GNERerouter.h \ GNERouteProbe.cpp GNERouteProbe.h \ GNEVaporizer.cpp GNEVaporizer.h \ GNETAZ.cpp GNETAZ.h \ -GNETAZSource.cpp GNETAZSource.h \ -GNETAZSink.cpp GNETAZSink.h \ +GNETAZSourceSink.cpp GNETAZSourceSink.h \ GNECalibrator.cpp GNECalibrator.h \ GNECalibratorFlow.cpp GNECalibratorFlow.h \ -GNECalibratorVehicleType.cpp GNECalibratorVehicleType.h \ -GNECalibratorRoute.cpp GNECalibratorRoute.h \ GNEVariableSpeedSign.cpp GNEVariableSpeedSign.h \ GNEVariableSpeedSignStep.cpp GNEVariableSpeedSignStep.h \ GNEClosingLaneReroute.cpp GNEClosingLaneReroute.h \ diff -Nru sumo-1.1.0+dfsg1/src/netedit/additionals/Makefile.in sumo-1.2.0+dfsg1/src/netedit/additionals/Makefile.in --- sumo-1.1.0+dfsg1/src/netedit/additionals/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/additionals/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,722 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netedit/additionals -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libneteditadditionals_a_AR = $(AR) $(ARFLAGS) -libneteditadditionals_a_LIBADD = -am_libneteditadditionals_a_OBJECTS = GNEPOI.$(OBJEXT) \ - GNEPoly.$(OBJEXT) GNEAdditionalHandler.$(OBJEXT) \ - GNEAdditional.$(OBJEXT) GNEShape.$(OBJEXT) \ - GNEChargingStation.$(OBJEXT) GNEStoppingPlace.$(OBJEXT) \ - GNEBusStop.$(OBJEXT) GNEAccess.$(OBJEXT) \ - GNEContainerStop.$(OBJEXT) GNEParkingArea.$(OBJEXT) \ - GNEParkingSpace.$(OBJEXT) GNEDetector.$(OBJEXT) \ - GNEDetectorE1.$(OBJEXT) GNEDetectorE1Instant.$(OBJEXT) \ - GNEDetectorE2.$(OBJEXT) GNEDetectorE3.$(OBJEXT) \ - GNEDetectorEntry.$(OBJEXT) GNEDetectorExit.$(OBJEXT) \ - GNERerouter.$(OBJEXT) GNERouteProbe.$(OBJEXT) \ - GNEVaporizer.$(OBJEXT) GNETAZ.$(OBJEXT) GNETAZSource.$(OBJEXT) \ - GNETAZSink.$(OBJEXT) GNECalibrator.$(OBJEXT) \ - GNECalibratorFlow.$(OBJEXT) GNECalibratorVehicleType.$(OBJEXT) \ - GNECalibratorRoute.$(OBJEXT) GNEVariableSpeedSign.$(OBJEXT) \ - GNEVariableSpeedSignStep.$(OBJEXT) \ - GNEClosingLaneReroute.$(OBJEXT) \ - GNEParkingAreaReroute.$(OBJEXT) GNEClosingReroute.$(OBJEXT) \ - GNEDestProbReroute.$(OBJEXT) GNERouteProbReroute.$(OBJEXT) \ - GNERerouterInterval.$(OBJEXT) -libneteditadditionals_a_OBJECTS = \ - $(am_libneteditadditionals_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 = $(libneteditadditionals_a_SOURCES) -DIST_SOURCES = $(libneteditadditionals_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libneteditadditionals.a -libneteditadditionals_a_SOURCES = GNEPOI.cpp GNEPOI.h \ -GNEPoly.cpp GNEPoly.h \ -GNEAdditionalHandler.cpp GNEAdditionalHandler.h \ -GNEAdditional.cpp GNEAdditional.h \ -GNEShape.cpp GNEShape.h \ -GNEChargingStation.cpp GNEChargingStation.h \ -GNEStoppingPlace.cpp GNEStoppingPlace.h \ -GNEBusStop.cpp GNEBusStop.h \ -GNEAccess.cpp GNEAccess.h \ -GNEContainerStop.cpp GNEContainerStop.h \ -GNEParkingArea.cpp GNEParkingArea.h \ -GNEParkingSpace.cpp GNEParkingSpace.h \ -GNEDetector.cpp GNEDetector.h \ -GNEDetectorE1.cpp GNEDetectorE1.h \ -GNEDetectorE1Instant.cpp GNEDetectorE1Instant.h \ -GNEDetectorE2.cpp GNEDetectorE2.h \ -GNEDetectorE3.cpp GNEDetectorE3.h \ -GNEDetectorEntry.cpp GNEDetectorEntry.h \ -GNEDetectorExit.cpp GNEDetectorExit.h \ -GNERerouter.cpp GNERerouter.h \ -GNERouteProbe.cpp GNERouteProbe.h \ -GNEVaporizer.cpp GNEVaporizer.h \ -GNETAZ.cpp GNETAZ.h \ -GNETAZSource.cpp GNETAZSource.h \ -GNETAZSink.cpp GNETAZSink.h \ -GNECalibrator.cpp GNECalibrator.h \ -GNECalibratorFlow.cpp GNECalibratorFlow.h \ -GNECalibratorVehicleType.cpp GNECalibratorVehicleType.h \ -GNECalibratorRoute.cpp GNECalibratorRoute.h \ -GNEVariableSpeedSign.cpp GNEVariableSpeedSign.h \ -GNEVariableSpeedSignStep.cpp GNEVariableSpeedSignStep.h \ -GNEClosingLaneReroute.cpp GNEClosingLaneReroute.h \ -GNEParkingAreaReroute.cpp GNEParkingAreaReroute.h \ -GNEClosingReroute.cpp GNEClosingReroute.h \ -GNEDestProbReroute.cpp GNEDestProbReroute.h \ -GNERouteProbReroute.cpp GNERouteProbReroute.h \ -GNERerouterInterval.cpp GNERerouterInterval.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) --foreign src/netedit/additionals/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netedit/additionals/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) - -libneteditadditionals.a: $(libneteditadditionals_a_OBJECTS) $(libneteditadditionals_a_DEPENDENCIES) $(EXTRA_libneteditadditionals_a_DEPENDENCIES) - $(AM_V_at)-rm -f libneteditadditionals.a - $(AM_V_AR)$(libneteditadditionals_a_AR) libneteditadditionals.a $(libneteditadditionals_a_OBJECTS) $(libneteditadditionals_a_LIBADD) - $(AM_V_at)$(RANLIB) libneteditadditionals.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEAccess.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEAdditional.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEAdditionalHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEBusStop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibrator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibratorFlow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibratorRoute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibratorVehicleType.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChargingStation.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEClosingLaneReroute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEClosingReroute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEContainerStop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDestProbReroute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDetector.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDetectorE1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDetectorE1Instant.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDetectorE2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDetectorE3.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDetectorEntry.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDetectorExit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEPOI.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEParkingArea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEParkingAreaReroute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEParkingSpace.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEPoly.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNERerouter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNERerouterInterval.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNERouteProbReroute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNERouteProbe.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEShape.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEStoppingPlace.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNETAZ.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNETAZSink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNETAZSource.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEVaporizer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEVariableSpeedSign.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEVariableSpeedSignStep.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netedit/changes/CMakeLists.txt sumo-1.2.0+dfsg1/src/netedit/changes/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/netedit/changes/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -17,6 +17,8 @@ GNEChange_TLS.cpp GNEChange_Additional.h GNEChange_Additional.cpp + GNEChange_DemandElement.h + GNEChange_DemandElement.cpp GNEChange_Shape.h GNEChange_Shape.cpp ) diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Additional.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Additional.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Additional.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Additional.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,9 +23,12 @@ #include #include #include +#include #include -#include +#include +#include #include +#include #include "GNEChange_Additional.h" @@ -41,29 +44,17 @@ GNEChange_Additional::GNEChange_Additional(GNEAdditional* additional, bool forward) : GNEChange(additional->getViewNet()->getNet(), forward), myAdditional(additional), - myFirstAdditionalParent(myAdditional->getFirstAdditionalParent()), - mySecondAdditionalParent(myAdditional->getSecondAdditionalParent()), + myEdgeParents(myAdditional->getEdgeParents()), + myLaneParents(myAdditional->getLaneParents()), + myShapeParents(myAdditional->getShapeParents()), + myAdditionalParents(myAdditional->getAdditionalParents()), + myDemandElementParents(myAdditional->getDemandElementParents()), myEdgeChilds(myAdditional->getEdgeChilds()), - myLaneChilds(myAdditional->getLaneChilds()) { + myLaneChilds(myAdditional->getLaneChilds()), + myShapeChilds(myAdditional->getShapeChilds()), + myAdditionalChilds(myAdditional->getAdditionalChilds()), + myDemandElementChilds(myAdditional->getDemandElementChilds()) { myAdditional->incRef("GNEChange_Additional"); - // handle additionals with lane parent - if (additional->getTagProperty().canBePlacedOverLane()) { - myLaneParents.push_back(myNet->retrieveLane(myAdditional->getAttribute(SUMO_ATTR_LANE))); - } - if (additional->getTagProperty().canBePlacedOverLanes()) { - myLaneParents = GNEAttributeCarrier::parse >(additional->getViewNet()->getNet(), myAdditional->getAttribute(SUMO_ATTR_LANES)); - } - // handle additionals with edge parent (with an exception) - if (additional->getTagProperty().canBePlacedOverEdge() && (additional->getTagProperty().getTag() != SUMO_TAG_VAPORIZER)) { - myEdgeParents.push_back(myNet->retrieveEdge(myAdditional->getAttribute(SUMO_ATTR_EDGE))); - } - if (additional->getTagProperty().canBePlacedOverEdges()) { - myEdgeParents = GNEAttributeCarrier::parse >(additional->getViewNet()->getNet(), myAdditional->getAttribute(SUMO_ATTR_EDGES)); - } - // special case for Vaporizers - if (myAdditional->getTagProperty().getTag() == SUMO_TAG_VAPORIZER) { - myEdgeParents.push_back(myNet->retrieveEdge(myAdditional->getAttribute(SUMO_ATTR_ID))); - } } @@ -75,7 +66,7 @@ WRITE_DEBUG("Deleting unreferenced " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "'"); // make sure that additional isn't in net before removing if (myNet->additionalExist(myAdditional)) { - myNet->deleteAdditional(myAdditional); + myNet->deleteAdditional(myAdditional, false); } delete myAdditional; } @@ -87,68 +78,80 @@ if (myForward) { // show extra information for tests WRITE_DEBUG("Removing " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); - // delete additional of test - myNet->deleteAdditional(myAdditional); - // 1 - If additional own a lane parent, remove it from lane - for (auto i : myLaneParents) { + // delete additional from net + myNet->deleteAdditional(myAdditional, false); + // Remove additional from parent elements + for (const auto& i : myEdgeParents) { + i->removeAdditionalChild(myAdditional); + } + for (const auto& i : myLaneParents) { + i->removeAdditionalChild(myAdditional); + } + for (const auto& i : myShapeParents) { i->removeAdditionalChild(myAdditional); } - // 2 - If additional own a edge parent, remove it from edge - for (auto i : myEdgeParents) { + for (const auto& i : myAdditionalParents) { i->removeAdditionalChild(myAdditional); } - // 3 - If additional has a first parent, remove it from their additional childs - if (myFirstAdditionalParent) { - myFirstAdditionalParent->removeAdditionalChild(myAdditional); + for (const auto& i : myDemandElementParents) { + i->removeAdditionalChild(myAdditional); + } + // Remove additional from child elements + for (const auto& i : myEdgeChilds) { + i->removeAdditionalParent(myAdditional); + } + for (const auto& i : myLaneChilds) { + i->removeAdditionalParent(myAdditional); } - // 4 - If additiona has a second parent, remove it from their additional childs - if (mySecondAdditionalParent) { - mySecondAdditionalParent->removeAdditionalChild(myAdditional); + for (const auto& i : myShapeChilds) { + i->removeAdditionalChild(myAdditional); } - // 5 - if Additional has edge childs, remove it of their additional parents - for (auto i : myEdgeChilds) { + for (const auto& i : myAdditionalChilds) { i->removeAdditionalParent(myAdditional); } - // 6 - if Additional has lane childs, remove it of their additional parents - for (auto i : myLaneChilds) { + for (const auto& i : myDemandElementChilds) { i->removeAdditionalParent(myAdditional); } } else { // show extra information for tests WRITE_DEBUG("Adding " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); - // insert additional of test + // insert additional into net myNet->insertAdditional(myAdditional); - // 1 - If additional own a Lane parent, add it to lane - for (auto i : myLaneParents) { + // add additional in parent elements + for (const auto& i : myEdgeParents) { + i->addAdditionalChild(myAdditional); + } + for (const auto& i : myLaneParents) { i->addAdditionalChild(myAdditional); } - // 2 - If additional own a edge parent, add it to edge - for (auto i : myEdgeParents) { + for (const auto& i : myShapeParents) { i->addAdditionalChild(myAdditional); } - // 3 - If additional has a parent, add it into additional parent - if (myFirstAdditionalParent) { - myFirstAdditionalParent->addAdditionalChild(myAdditional); + for (const auto& i : myAdditionalParents) { + i->addAdditionalChild(myAdditional); + } + for (const auto& i : myDemandElementParents) { + i->addAdditionalChild(myAdditional); + } + // add additional in child elements + for (const auto& i : myEdgeChilds) { + i->addAdditionalParent(myAdditional); + } + for (const auto& i : myLaneChilds) { + i->addAdditionalParent(myAdditional); } - // 4 - If additional has a parent, add it into additional parent - if (mySecondAdditionalParent) { - mySecondAdditionalParent->addAdditionalChild(myAdditional); + for (const auto& i : myShapeChilds) { + i->addAdditionalChild(myAdditional); } - // 5 - if Additional has edge childs, add id into additional parents - for (auto i : myEdgeChilds) { + for (const auto& i : myAdditionalChilds) { i->addAdditionalParent(myAdditional); } - // 6 - if Additional has lane childs, add id into additional parents - for (auto i : myLaneChilds) { + for (const auto& i : myDemandElementChilds) { i->addAdditionalParent(myAdditional); } } // Requiere always save additionals myNet->requiereSaveAdditionals(true); - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); - } } @@ -159,66 +162,78 @@ WRITE_DEBUG("Adding " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); // insert additional into net myNet->insertAdditional(myAdditional); - // 1 - If additional own a Lane parent, add it to lane - for (auto i : myLaneParents) { + // add additional in parent elements + for (const auto& i : myEdgeParents) { + i->addAdditionalChild(myAdditional); + } + for (const auto& i : myLaneParents) { + i->addAdditionalChild(myAdditional); + } + for (const auto& i : myShapeParents) { + i->addAdditionalChild(myAdditional); + } + for (const auto& i : myAdditionalParents) { i->addAdditionalChild(myAdditional); } - // 2 - If additional own a edge parent, add it to edge - for (auto i : myEdgeParents) { + for (const auto& i : myDemandElementParents) { i->addAdditionalChild(myAdditional); } - // 3 - If additional has a parent, add it into additional parent - if (myFirstAdditionalParent) { - myFirstAdditionalParent->addAdditionalChild(myAdditional); + // add additional in child elements + for (const auto& i : myEdgeChilds) { + i->addAdditionalParent(myAdditional); + } + for (const auto& i : myLaneChilds) { + i->addAdditionalParent(myAdditional); } - // 4 - If additional has a parent, add it into additional parent - if (mySecondAdditionalParent) { - mySecondAdditionalParent->addAdditionalChild(myAdditional); + for (const auto& i : myShapeChilds) { + i->addAdditionalChild(myAdditional); } - // 5 - if Additional has edge childs, add id into additional parents - for (auto i : myEdgeChilds) { + for (const auto& i : myAdditionalChilds) { i->addAdditionalParent(myAdditional); } - // 6 - if Additional has lane childs, add id into additional parents - for (auto i : myLaneChilds) { + for (const auto& i : myDemandElementChilds) { i->addAdditionalParent(myAdditional); } } else { // show extra information for tests WRITE_DEBUG("Removing " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); - // delete additional of test - myNet->deleteAdditional(myAdditional); - // 1 - If additional own a lane parent, remove it from lane - for (auto i : myLaneParents) { + // delete additional from net + myNet->deleteAdditional(myAdditional, false); + // Remove additional from parent elements + for (const auto& i : myEdgeParents) { + i->removeAdditionalChild(myAdditional); + } + for (const auto& i : myLaneParents) { + i->removeAdditionalChild(myAdditional); + } + for (const auto& i : myShapeParents) { + i->removeAdditionalChild(myAdditional); + } + for (const auto& i : myAdditionalParents) { i->removeAdditionalChild(myAdditional); } - // 2 - If additional own a edge parent, remove it from edge - for (auto i : myEdgeParents) { + for (const auto& i : myDemandElementParents) { i->removeAdditionalChild(myAdditional); } - // 3 - If additiona has a first parent, remove it from their additional childs - if (myFirstAdditionalParent) { - myFirstAdditionalParent->removeAdditionalChild(myAdditional); + // Remove additional from child elements + for (const auto& i : myEdgeChilds) { + i->removeAdditionalParent(myAdditional); + } + for (const auto& i : myLaneChilds) { + i->removeAdditionalParent(myAdditional); } - // 4 - If additiona has a second parent, remove it from their additional childs - if (mySecondAdditionalParent) { - mySecondAdditionalParent->removeAdditionalChild(myAdditional); + for (const auto& i : myShapeChilds) { + i->removeAdditionalChild(myAdditional); } - // 5 - if Additional has edge childs, remove it of their additional parents - for (auto i : myEdgeChilds) { + for (const auto& i : myAdditionalChilds) { i->removeAdditionalParent(myAdditional); } - // 6 - if Additional has lane childs, remove it of their additional parents - for (auto i : myLaneChilds) { + for (const auto& i : myDemandElementChilds) { i->removeAdditionalParent(myAdditional); } } // Requiere always save additionals myNet->requiereSaveAdditionals(true); - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); - } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Additional.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Additional.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Additional.h 2018-09-27 22:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Additional.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,13 +27,13 @@ // =========================================================================== // class declarations // =========================================================================== -class GNEAdditional; + class GNEViewNet; -class GNEDetectorEntry; -class GNEDetectorExit; -class GNEDetectorE3; -class GNELane; class GNEEdge; +class GNELane; +class GNEShape; +class GNEAdditional; +class GNEDemandElement; // =========================================================================== // class definitions @@ -76,23 +76,35 @@ */ GNEAdditional* myAdditional; - /// @brief pointer to lane parents (used by additionals with lane parent) - std::vector myLaneParents; + /// @brief reference to vector of edge parents + const std::vector& myEdgeParents; + + /// @brief reference to vector of lane parents + const std::vector& myLaneParents; + + /// @brief reference to vector of shape parents + const std::vector& myShapeParents; + + /// @brief reference to vector of additional parents + const std::vector& myAdditionalParents; + + /// @brief reference to vector of demand element parents + const std::vector& myDemandElementParents; - /// @brief pointer to edge parents (used by additionals with edge parents) - std::vector myEdgeParents; + /// @brief reference to vector of edge childs + const std::vector& myEdgeChilds; - /// @brief pointer to first additional parent (used by additional with parents, for example Entry/exits) - GNEAdditional* myFirstAdditionalParent; + /// @brief reference to vector of lane childs + const std::vector& myLaneChilds; - /// @brief pointer to second additional parent (used by additional with parents, for example Entry/exits) - GNEAdditional* mySecondAdditionalParent; + /// @brief reference to vector of shape childs + const std::vector& myShapeChilds; - /// @brief list of Edge childs (used by Rerouters) - std::vector myEdgeChilds; + /// @brief reference to vector of additional childs + const std::vector& myAdditionalChilds; - /// @brief list of Edge childs (used by VSS) - std::vector myLaneChilds; + /// @brief reference to vector of demand element childs + const std::vector& myDemandElementChilds; }; #endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Attribute.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Attribute.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Attribute.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Attribute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -12,7 +12,7 @@ /// @date Mar 2011 /// @version $Id$ /// -// A network change in which something is moved (for undo/redo) +// A network change in which something is changed (for undo/redo) /****************************************************************************/ // =========================================================================== @@ -22,9 +22,12 @@ #include #include +#include #include #include #include +#include +#include #include "GNEChange_Attribute.h" @@ -37,70 +40,65 @@ // member method definitions // =========================================================================== -GNEChange_Attribute::GNEChange_Attribute(GNENetElement* netElement, +GNEChange_Attribute::GNEChange_Attribute(GNEAttributeCarrier* ac, GNENet* net, SumoXMLAttr key, const std::string& value, bool customOrigValue, const std::string& origValue) : - GNEChange(nullptr, true), - myAC(netElement), + GNEChange(net, true), + myAC(ac), myKey(key), - myOrigValue(customOrigValue ? origValue : netElement->getAttribute(key)), + myForceChange(false), + myOrigValue(customOrigValue ? origValue : ac->getAttribute(key)), myNewValue(value), - myNet(netElement->getNet()), - myNetElement(netElement), - myAdditional(nullptr), - myShape(nullptr) { - assert(myAC && (myNetElement || myAdditional || myShape)); + myOldParametersSet(0), + myNewParametersSet(0) { myAC->incRef("GNEChange_Attribute " + toString(myKey)); } -GNEChange_Attribute::GNEChange_Attribute(GNEAdditional* additional, - SumoXMLAttr key, const std::string& value, - bool customOrigValue, const std::string& origValue) : - GNEChange(nullptr, true), - myAC(additional), +GNEChange_Attribute::GNEChange_Attribute(GNEAttributeCarrier* ac, GNENet* net, + bool forceChange, SumoXMLAttr key, const std::string& value) : + GNEChange(net, true), + myAC(ac), myKey(key), - myOrigValue(customOrigValue ? origValue : additional->getAttribute(key)), + myForceChange(forceChange), + myOrigValue(ac->getAttribute(key)), myNewValue(value), - myNet(additional->getViewNet()->getNet()), - myNetElement(nullptr), - myAdditional(additional), - myShape(nullptr) { - assert(myAC && (myNetElement || myAdditional || myShape)); + myOldParametersSet(0), + myNewParametersSet(0) { myAC->incRef("GNEChange_Attribute " + toString(myKey)); } -GNEChange_Attribute::GNEChange_Attribute(GNEShape* shape, - SumoXMLAttr key, const std::string& value, - bool customOrigValue, const std::string& origValue) : - GNEChange(nullptr, true), - myAC(shape), - myKey(key), - myOrigValue(customOrigValue ? origValue : shape->getAttribute(key)), - myNewValue(value), - myNet(shape->getNet()), - myNetElement(nullptr), - myAdditional(nullptr), - myShape(shape) { - assert(myAC && (myNetElement || myAdditional || myShape)); - myAC->incRef("GNEChange_Attribute " + toString(myKey)); +GNEChange_Attribute::GNEChange_Attribute(GNEAttributeCarrier* ac, + GNENet* net, const int oldParametersSet, const int newParametersSet) : + GNEChange(net, true), + myAC(ac), + myKey(SUMO_ATTR_NOTHING), + myForceChange(false), + myOldParametersSet(oldParametersSet), + myNewParametersSet(newParametersSet) { + myAC->incRef("GNEChange_Attribute parameterSet " + toString(newParametersSet)); } GNEChange_Attribute::~GNEChange_Attribute() { - assert(myAC); - myAC->decRef("GNEChange_Attribute " + toString(myKey)); + // check if we're editing the value of an attribute or changing a disjoint attribute + if (myKey != SUMO_ATTR_NOTHING) { + myAC->decRef("GNEChange_Attribute " + toString(myKey)); + } else { + myAC->decRef("GNEChange_Attribute parameterSet " + toString(myNewParametersSet)); + } + // remove if is unreferenced if (myAC->unreferenced()) { // show extra information for tests WRITE_DEBUG("Deleting unreferenced " + myAC->getTagStr() + " '" + myAC->getID() + "' in GNEChange_Attribute"); // Check if attribute carrier is a shape - if (myShape) { - // remove shape using pecify functions - if (myShape->getTagProperty().getTag() == SUMO_TAG_POLY) { - myNet->removePolygon(myShape->getID()); - } else if ((myShape->getTagProperty().getTag() == SUMO_TAG_POI) || (myShape->getTagProperty().getTag() == SUMO_TAG_POILANE)) { - myNet->removePOI(myShape->getID()); + if (myAC->getTagProperty().isShape()) { + // remove shape using specific functions + if (myAC->getTagProperty().getTag() == SUMO_TAG_POLY) { + myNet->removePolygon(myAC->getID()); + } else if ((myAC->getTagProperty().getTag() == SUMO_TAG_POI) || (myAC->getTagProperty().getTag() == SUMO_TAG_POILANE)) { + myNet->removePOI(myAC->getID()); } } else { delete myAC; @@ -111,18 +109,26 @@ void GNEChange_Attribute::undo() { - // show extra information for tests - WRITE_DEBUG("Setting previous attribute " + toString(myKey) + " '" + myOrigValue + "' into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); - // set original value - myAC->setAttribute(myKey, myOrigValue); - // check if netElements, additional or shapes has to be saved (only if key isn't GNE_ATTR_SELECTED) - if (myKey != GNE_ATTR_SELECTED) { - if (myNetElement) { - myNet->requiereSaveNet(true); - } else if (myAdditional) { - myNet->requiereSaveAdditionals(true); - } else if (myShape) { - myNet->requiereSaveShapes(true); + // check if we're editing the value of an attribute or changing a disjoint attribute + if (myKey == SUMO_ATTR_NOTHING) { + // show extra information for tests + WRITE_DEBUG("Setting previous parameterSet '" + toString(myNewParametersSet) + "' into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); + // set original disjoint attribute + myAC->setDisjointAttribute(myOldParametersSet); + } else { + // show extra information for tests + WRITE_DEBUG("Setting previous attribute " + toString(myKey) + " '" + myOrigValue + "' into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); + // set original value + myAC->setAttribute(myKey, myOrigValue); + // check if netElements, additional or shapes has to be saved (only if key isn't GNE_ATTR_SELECTED) + if (myKey != GNE_ATTR_SELECTED) { + if (myAC->getTagProperty().isNetElement()) { + myNet->requiereSaveNet(true); + } else if (myAC->getTagProperty().isAdditional() || myAC->getTagProperty().isShape()) { + myNet->requiereSaveAdditionals(true); + } else if (myAC->getTagProperty().isDemandElement()) { + myNet->requiereSaveDemandElements(true); + } } } } @@ -130,18 +136,27 @@ void GNEChange_Attribute::redo() { - // show extra information for tests - WRITE_DEBUG("Setting new attribute " + toString(myKey) + " '" + myNewValue + "' into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); - // set new value - myAC->setAttribute(myKey, myNewValue); - // check if netElements, additional or shapes has to be saved (only if key isn't GNE_ATTR_SELECTED) - if (myKey != GNE_ATTR_SELECTED) { - if (myNetElement) { - myNet->requiereSaveNet(true); - } else if (myAdditional) { - myNet->requiereSaveAdditionals(true); - } else if (myShape) { - myNet->requiereSaveShapes(true); + // check if we're editing the value of an attribute or changing a disjoint attribute + if (myKey == SUMO_ATTR_NOTHING) { + // show extra information for tests + WRITE_DEBUG("Setting new parameterSet '" + toString(myNewParametersSet) + "' into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); + // set original disjoint attribute + myAC->setDisjointAttribute(myNewParametersSet); + + } else { + // show extra information for tests + WRITE_DEBUG("Setting new attribute " + toString(myKey) + " '" + myNewValue + "' into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); + // set new value + myAC->setAttribute(myKey, myNewValue); + // check if netElements, additional or shapes has to be saved (only if key isn't GNE_ATTR_SELECTED) + if (myKey != GNE_ATTR_SELECTED) { + if (myAC->getTagProperty().isNetElement()) { + myNet->requiereSaveNet(true); + } else if (myAC->getTagProperty().isAdditional() || myAC->getTagProperty().isShape()) { + myNet->requiereSaveAdditionals(true); + } else if (myAC->getTagProperty().isDemandElement()) { + myNet->requiereSaveDemandElements(true); + } } } } @@ -149,7 +164,14 @@ bool GNEChange_Attribute::trueChange() { - return myOrigValue != myNewValue; + // check if we're editing the value of an attribute or changing a disjoint attribute + if (myForceChange) { + return true; + } else if (myKey == SUMO_ATTR_NOTHING) { + return (myOldParametersSet != myNewParametersSet); + } else { + return (myOrigValue != myNewValue); + } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Attribute.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Attribute.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Attribute.h 2018-08-13 22:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Attribute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,6 +34,7 @@ class GNEAttributeCarrier; class GNENetElement; class GNEAdditional; +class GNEDemandElement; class GNEShape; class GNENet; @@ -48,41 +49,42 @@ FXDECLARE_ABSTRACT(GNEChange_Attribute) public: - /**@brief Constructor for NetElements + /**@brief Constructor * @param[in] ac The attribute-carrier to be modified + * @param[in] net Net in which AC is saved * @param[in] key The attribute key * @param[in] value The new value - * @param[in] testingMode flag to indicate if netedit is running in testing mode */ - GNEChange_Attribute(GNENetElement* netElement, + GNEChange_Attribute(GNEAttributeCarrier* ac, + GNENet* net, const SumoXMLAttr key, const std::string& value, bool customOrigValue = false, const std::string& origValue = ""); - /**@brief Constructor for Additionals + /**@brief Constructor * @param[in] ac The attribute-carrier to be modified + * @param[in] net Net in which AC is saved + * @param[in] forceChange enable or disable force change * @param[in] key The attribute key * @param[in] value The new value - * @param[in] testingMode flag to indicate if netedit is running in testing mode */ - GNEChange_Attribute(GNEAdditional* additional, + GNEChange_Attribute(GNEAttributeCarrier* ac, + GNENet* net, + bool forceChange, const SumoXMLAttr key, - const std::string& value, - bool customOrigValue = false, - const std::string& origValue = ""); + const std::string& value); - /**@brief Constructor for Shapes + /**@brief Constructor used for disjoint attributes * @param[in] ac The attribute-carrier to be modified - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] testingMode flag to indicate if netedit is running in testing mode + * @param[in] net Net in which AC is saved + * @param[in] oldParametersSet The old ParameterSet + * @param[in] newParametersSet The new ParameterSet */ - GNEChange_Attribute(GNEShape* shape, - const SumoXMLAttr key, - const std::string& value, - bool customOrigValue = false, - const std::string& origValue = ""); + GNEChange_Attribute(GNEAttributeCarrier* ac, + GNENet* net, + const int oldParametersSet, + const int newParametersSet); /// @brief Destructor ~GNEChange_Attribute(); @@ -111,26 +113,23 @@ */ GNEAttributeCarrier* myAC; - /// @brief The attribute name - SumoXMLAttr myKey; + /// @brief The attribute name (or the original attribute if we're editing a disjoint attribute) + const SumoXMLAttr myKey; - /// @brief the original value - std::string myOrigValue; + /// @brief flag used to force set attributes + bool myForceChange; /// @brief the original value - std::string myNewValue; - - /// @brief pointer to Net (used to simplify code) - GNENet* myNet; + const std::string myOrigValue; - /// @brief used if AC is an net element - GNENetElement* myNetElement; + /// @brief the original value + const std::string myNewValue; - /// @brief used if AC is an additional element - GNEAdditional* myAdditional; + /// @brief old parameter set (used for disjoint attributes) + const int myOldParametersSet; - /// @brief used if AC is a shape element - GNEShape* myShape; + /// @brief new parameter set (used for disjoint attributes) + const int myNewParametersSet; }; #endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Connection.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Connection.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Connection.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Connection.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,8 +22,9 @@ #include #include -#include #include +#include +#include #include "GNEChange_Connection.h" @@ -69,10 +70,6 @@ // add connection into edge myEdge->addConnection(myNBEdgeConnection, mySelected); } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); - } // enable save netElements myNet->requiereSaveNet(true); } @@ -96,10 +93,6 @@ // remove connection from edge myEdge->removeConnection(myNBEdgeConnection); } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); - } // enable save netElements myNet->requiereSaveNet(true); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Connection.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Connection.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Connection.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Connection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Crossing.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Crossing.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Crossing.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Crossing.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,9 +23,10 @@ #include #include #include -#include #include #include +#include +#include #include "GNEChange_Crossing.h" @@ -111,10 +112,6 @@ // Update view myNet->getViewNet()->update(); } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); - } // enable save netElements myNet->requiereSaveNet(true); } @@ -157,10 +154,6 @@ // Update view myNet->getViewNet()->update(); } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); - } // enable save netElements myNet->requiereSaveNet(true); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Crossing.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Crossing.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Crossing.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Crossing.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,257 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEChange_DemandElement.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// A network change in which a busStop is created or deleted +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEChange_DemandElement.h" + +// =========================================================================== +// FOX-declarations +// =========================================================================== +FXIMPLEMENT_ABSTRACT(GNEChange_DemandElement, GNEChange, nullptr, 0) + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEChange_DemandElement::GNEChange_DemandElement(GNEDemandElement* demandElement, bool forward) : + GNEChange(demandElement->getViewNet()->getNet(), forward), + myDemandElement(demandElement), + myEdgeParents(demandElement->getEdgeParents()), + myLaneParents(demandElement->getLaneParents()), + myShapeParents(demandElement->getShapeParents()), + myAdditionalParents(demandElement->getAdditionalParents()), + myDemandElementParents(demandElement->getDemandElementParents()), + myEdgeChilds(demandElement->getEdgeChilds()), + myLaneChilds(demandElement->getLaneChilds()), + myShapeChilds(demandElement->getShapeChilds()), + myAdditionalChilds(demandElement->getAdditionalChilds()), + myDemandElementChilds(demandElement->getDemandElementChilds()) { + myDemandElement->incRef("GNEChange_DemandElement"); +} + + +GNEChange_DemandElement::~GNEChange_DemandElement() { + assert(myDemandElement); + myDemandElement->decRef("GNEChange_DemandElement"); + if (myDemandElement->unreferenced()) { + // show extra information for tests + WRITE_DEBUG("Deleting unreferenced " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "'"); + // make sure that element isn't in net before removing + if (myNet->demandElementExist(myDemandElement)) { + myNet->deleteDemandElement(myDemandElement, false); + } + delete myDemandElement; + } +} + + +void +GNEChange_DemandElement::undo() { + if (myForward) { + // show extra information for tests + WRITE_DEBUG("Removing " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); + // delete demand element from net + myNet->deleteDemandElement(myDemandElement, false); + // Remove element from parent elements + for (const auto& i : myEdgeParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myLaneParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myShapeParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myAdditionalParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myDemandElementParents) { + i->removeDemandElementChild(myDemandElement); + } + // Remove element from child elements + for (const auto& i : myEdgeChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myLaneChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myShapeChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myAdditionalChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myDemandElementChilds) { + i->removeDemandElementParent(myDemandElement); + } + } else { + // show extra information for tests + WRITE_DEBUG("Adding " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); + // insert demand element into net + myNet->insertDemandElement(myDemandElement); + // add element in parent elements + for (const auto& i : myEdgeParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myLaneParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myShapeParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myAdditionalParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myDemandElementParents) { + i->addDemandElementChild(myDemandElement); + } + // add element in child elements + for (const auto& i : myEdgeChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myLaneChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myShapeChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myAdditionalChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myDemandElementChilds) { + i->addDemandElementParent(myDemandElement); + } + } + // Requiere always save elements + myNet->requiereSaveDemandElements(true); +} + + +void +GNEChange_DemandElement::redo() { + if (myForward) { + // show extra information for tests + WRITE_DEBUG("Adding " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); + // insert demand element into net + myNet->insertDemandElement(myDemandElement); + // add element in parent elements + for (const auto& i : myEdgeParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myLaneParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myShapeParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myAdditionalParents) { + i->addDemandElementChild(myDemandElement); + } + for (const auto& i : myDemandElementParents) { + i->addDemandElementChild(myDemandElement); + } + // add element in child elements + for (const auto& i : myEdgeChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myLaneChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myShapeChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myAdditionalChilds) { + i->addDemandElementParent(myDemandElement); + } + for (const auto& i : myDemandElementChilds) { + i->addDemandElementParent(myDemandElement); + } + } else { + // show extra information for tests + WRITE_DEBUG("Removing " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); + // delete demand element from net + myNet->deleteDemandElement(myDemandElement, false); + // Remove element from parent elements + for (const auto& i : myEdgeParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myLaneParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myShapeParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myAdditionalParents) { + i->removeDemandElementChild(myDemandElement); + } + for (const auto& i : myDemandElementParents) { + i->removeDemandElementChild(myDemandElement); + } + // Remove element from child elements + for (const auto& i : myEdgeChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myLaneChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myShapeChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myAdditionalChilds) { + i->removeDemandElementParent(myDemandElement); + } + for (const auto& i : myDemandElementChilds) { + i->removeDemandElementParent(myDemandElement); + } + } + // Requiere always save elements + myNet->requiereSaveDemandElements(true); +} + + +FXString +GNEChange_DemandElement::undoName() const { + if (myForward) { + return ("Undo create " + myDemandElement->getTagStr()).c_str(); + } else { + return ("Undo delete " + myDemandElement->getTagStr()).c_str(); + } +} + + +FXString +GNEChange_DemandElement::redoName() const { + if (myForward) { + return ("Redo create " + myDemandElement->getTagStr()).c_str(); + } else { + return ("Redo delete " + myDemandElement->getTagStr()).c_str(); + } +} diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_DemandElement.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,111 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEChange_DemandElement.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// A network change in which a demand element element is created or deleted +/****************************************************************************/ +#ifndef GNEChange_DemandElement_h +#define GNEChange_DemandElement_h + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "GNEChange.h" + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEViewNet; +class GNEEdge; +class GNELane; +class GNEShape; +class GNEAdditional; +class GNEDemandElement; + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEChange_DemandElement + * A network change in which a demand element element is created or deleted + */ +class GNEChange_DemandElement : public GNEChange { + FXDECLARE_ABSTRACT(GNEChange_DemandElement) + +public: + /**@brief Constructor for creating/deleting an demand element element + * @param[in] demand element The demand element element to be created/deleted + * @param[in] forward Whether to create/delete (true/false) + */ + GNEChange_DemandElement(GNEDemandElement* demandElement, bool forward); + + /// @brief Destructor + ~GNEChange_DemandElement(); + + /// @name inherited from GNEChange + /// @{ + /// @brief get undo Name + FXString undoName() const; + + /// @brief get Redo name + FXString redoName() const; + + /// @brief undo action + void undo(); + + /// @brief redo action + void redo(); + /// @} + +private: + /**@brief full information regarding the demand element element that is to be created/deleted + * @note we assume shared responsibility for the pointer (via reference counting) + */ + GNEDemandElement* myDemandElement; + + /// @brief reference to vector of edge parents + const std::vector& myEdgeParents; + + /// @brief reference to vector of lane parents + const std::vector& myLaneParents; + + /// @brief reference to vector of shape parents + const std::vector& myShapeParents; + + /// @brief reference to vector of additional parents + const std::vector& myAdditionalParents; + + /// @brief reference to vector of demand element parents + const std::vector& myDemandElementParents; + + /// @brief reference to vector of edge childs + const std::vector& myEdgeChilds; + + /// @brief reference to vector of lane childs + const std::vector& myLaneChilds; + + /// @brief reference to vector of shape childs + const std::vector& myShapeChilds; + + /// @brief reference to vector of additional childs + const std::vector& myAdditionalChilds; + + /// @brief reference to vector of demand element childs + const std::vector& myDemandElementChilds; +}; + +#endif +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Edge.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Edge.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Edge.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Edge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,8 +22,14 @@ #include #include -#include +#include +#include +#include +#include #include +#include +#include + #include "GNEChange_Edge.h" @@ -40,8 +46,23 @@ /// @brief constructor for creating an edge GNEChange_Edge::GNEChange_Edge(GNEEdge* edge, bool forward): GNEChange(edge->getNet(), forward), - myEdge(edge) { - assert(myNet); + myEdge(edge), + myEdgeShapeParents(edge->getShapeParents()), + myEdgeAdditionalParents(edge->getAdditionalParents()), + myEdgeDemandElementParents(edge->getDemandElementParents()), + myEdgeShapeChilds(edge->getShapeChilds()), + myEdgeAdditionalChilds(edge->getAdditionalChilds()), + myEdgeDemandElementChilds(edge->getDemandElementChilds()) { + // now save all hierarchical elements of edge's lane + for (const auto& i : edge->getLanes()) { + myLaneShapeParents.push_back(i->getShapeParents()); + myLaneAdditionalParents.push_back(i->getAdditionalParents()); + myLaneDemandElementParents.push_back(i->getDemandElementParents()); + myLaneShapeChilds.push_back(i->getShapeChilds()); + myLaneAdditionalChilds.push_back(i->getAdditionalChilds()); + myLaneDemandElementChilds.push_back(i->getDemandElementChilds()); + } + edge->incRef("GNEChange_Edge"); } @@ -62,17 +83,99 @@ if (myForward) { // show extra information for tests WRITE_DEBUG("Removing " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); + // Remove edge from parent elements + for (const auto& i : myEdgeShapeParents) { + i->removeEdgeChild(myEdge); + } + for (const auto& i : myEdgeAdditionalParents) { + i->removeEdgeChild(myEdge); + } + for (const auto& i : myEdgeDemandElementParents) { + i->removeEdgeChild(myEdge); + } + // Remove edge from child elements + for (const auto& i : myEdgeShapeChilds) { + i->removeEdgeParent(myEdge); + } + for (const auto& i : myEdgeAdditionalChilds) { + i->removeEdgeParent(myEdge); + } + for (const auto& i : myEdgeDemandElementChilds) { + i->removeEdgeParent(myEdge); + } + // repeat operations for all lane's edge + for (int i = 0; i < (int)myEdge->getLanes().size(); i++) { + // Remove every lane's edge from parent elements + for (const auto& j : myLaneShapeParents.at(i)) { + j->removeLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalParents.at(i)) { + j->removeLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementParents.at(i)) { + j->removeLaneChild(myEdge->getLanes().at(i)); + } + // Remove every lane's edge from child elements + for (const auto& j : myLaneShapeChilds.at(i)) { + j->removeLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalChilds.at(i)) { + j->removeLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementChilds.at(i)) { + j->removeLaneParent(myEdge->getLanes().at(i)); + } + } // delete edge from net - myNet->deleteSingleEdge(myEdge); + myNet->deleteSingleEdge(myEdge, false); } else { // show extra information for tests WRITE_DEBUG("Adding " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); // insert edge into net myNet->insertEdge(myEdge); - } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); + // add edge in parent elements + for (const auto& i : myEdgeShapeParents) { + i->addEdgeChild(myEdge); + } + for (const auto& i : myEdgeAdditionalParents) { + i->addEdgeChild(myEdge); + } + for (const auto& i : myEdgeDemandElementParents) { + i->addEdgeChild(myEdge); + } + // add edge in child elements + for (const auto& i : myEdgeShapeChilds) { + i->addEdgeParent(myEdge); + } + for (const auto& i : myEdgeAdditionalChilds) { + i->addEdgeParent(myEdge); + } + for (const auto& i : myEdgeDemandElementChilds) { + i->addEdgeParent(myEdge); + } + // repeat operations for all lane's edge + for (int i = 0; i < (int)myEdge->getLanes().size(); i++) { + // add lane's edge in parent elements + for (const auto& j : myLaneShapeParents.at(i)) { + j->addLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalParents.at(i)) { + j->addLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementParents.at(i)) { + j->addLaneChild(myEdge->getLanes().at(i)); + } + // add lane's edge in child elements + for (const auto& j : myLaneShapeChilds.at(i)) { + j->addLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalChilds.at(i)) { + j->addLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementChilds.at(i)) { + j->addLaneParent(myEdge->getLanes().at(i)); + } + } } // enable save netElements myNet->requiereSaveNet(true); @@ -86,15 +189,97 @@ WRITE_DEBUG("Adding " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); // insert edge into net myNet->insertEdge(myEdge); + // add edge in parent elements + for (const auto& i : myEdgeShapeParents) { + i->addEdgeChild(myEdge); + } + for (const auto& i : myEdgeAdditionalParents) { + i->addEdgeChild(myEdge); + } + for (const auto& i : myEdgeDemandElementParents) { + i->addEdgeChild(myEdge); + } + // add edge in child elements + for (const auto& i : myEdgeShapeChilds) { + i->addEdgeParent(myEdge); + } + for (const auto& i : myEdgeAdditionalChilds) { + i->addEdgeParent(myEdge); + } + for (const auto& i : myEdgeDemandElementChilds) { + i->addEdgeParent(myEdge); + } + // repeat operations for all lane's edge + for (int i = 0; i < (int)myEdge->getLanes().size(); i++) { + // add lane's edge in parent elements + for (const auto& j : myLaneShapeParents.at(i)) { + j->addLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalParents.at(i)) { + j->addLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementParents.at(i)) { + j->addLaneChild(myEdge->getLanes().at(i)); + } + // add lane's edge in child elements + for (const auto& j : myLaneShapeChilds.at(i)) { + j->addLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalChilds.at(i)) { + j->addLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementChilds.at(i)) { + j->addLaneParent(myEdge->getLanes().at(i)); + } + } } else { // show extra information for tests WRITE_DEBUG("Removing " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); - // delte edge from net - myNet->deleteSingleEdge(myEdge); - } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); + // Remove edge from parent elements + for (const auto& i : myEdgeShapeParents) { + i->removeEdgeChild(myEdge); + } + for (const auto& i : myEdgeAdditionalParents) { + i->removeEdgeChild(myEdge); + } + for (const auto& i : myEdgeDemandElementParents) { + i->removeEdgeChild(myEdge); + } + // Remove edge from child elements + for (const auto& i : myEdgeShapeChilds) { + i->removeEdgeParent(myEdge); + } + for (const auto& i : myEdgeAdditionalChilds) { + i->removeEdgeParent(myEdge); + } + for (const auto& i : myEdgeDemandElementChilds) { + i->removeEdgeParent(myEdge); + } + // repeat operations for all lane's edge + for (int i = 0; i < (int)myEdge->getLanes().size(); i++) { + // Remove every lane's edge from parent elements + for (const auto& j : myLaneShapeParents.at(i)) { + j->removeLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalParents.at(i)) { + j->removeLaneChild(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementParents.at(i)) { + j->removeLaneChild(myEdge->getLanes().at(i)); + } + // Remove every lane's edge from child elements + for (const auto& j : myLaneShapeChilds.at(i)) { + j->removeLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneAdditionalChilds.at(i)) { + j->removeLaneParent(myEdge->getLanes().at(i)); + } + for (const auto& j : myLaneDemandElementChilds.at(i)) { + j->removeLaneParent(myEdge->getLanes().at(i)); + } + } + // delete edge from net + myNet->deleteSingleEdge(myEdge, false); } // enable save netElements myNet->requiereSaveNet(true); diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Edge.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Edge.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Edge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Edge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -80,6 +80,42 @@ * @note we assume shared responsibility for the pointer (via reference counting) */ GNEEdge* myEdge; + + /// @brief reference to vector of shape parents + const std::vector& myEdgeShapeParents; + + /// @brief reference to vector of additional parents + const std::vector& myEdgeAdditionalParents; + + /// @brief reference to vector of demand element parents + const std::vector& myEdgeDemandElementParents; + + /// @brief reference to vector of shape childs + const std::vector& myEdgeShapeChilds; + + /// @brief reference to vector of additional childs + const std::vector& myEdgeAdditionalChilds; + + /// @brief vector of references to vector of demand element childs (used by lanes) + const std::vector& myEdgeDemandElementChilds; + + /// @brief vector of references to vector of shape parents (used by lanes) + std::vector > myLaneShapeParents; + + /// @brief vector of references to vector of additional parents (used by lanes) + std::vector > myLaneAdditionalParents; + + /// @brief vector of references to vector of demand element parents (used by lanes) + std::vector > myLaneDemandElementParents; + + /// @brief vector of references to vector of shape childs (used by lanes) + std::vector > myLaneShapeChilds; + + /// @brief vector of references to vector of additional childs (used by lanes) + std::vector > myLaneAdditionalChilds; + + /// @brief vector of references to vector of demand element childs (used by lanes) + std::vector > myLaneDemandElementChilds; }; #endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange.h 2018-09-27 22:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Junction.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Junction.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Junction.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Junction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,8 +22,9 @@ #include #include -#include #include +#include +#include #include "GNEChange_Junction.h" @@ -63,17 +64,13 @@ // show extra information for tests WRITE_DEBUG("Removing " + myJunction->getTagStr() + " '" + myJunction->getID() + "' from " + toString(SUMO_TAG_NET)); // add junction to net - myNet->deleteSingleJunction(myJunction); + myNet->deleteSingleJunction(myJunction, false); } else { // show extra information for tests WRITE_DEBUG("Adding " + myJunction->getTagStr() + " '" + myJunction->getID() + "' into " + toString(SUMO_TAG_NET)); // delete junction from net myNet->insertJunction(myJunction); } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); - } // enable save netElements myNet->requiereSaveNet(true); } @@ -90,11 +87,7 @@ // show extra information for tests WRITE_DEBUG("Removing " + myJunction->getTagStr() + " '" + myJunction->getID() + "' from " + toString(SUMO_TAG_NET)); // delete junction from net - myNet->deleteSingleJunction(myJunction); - } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); + myNet->deleteSingleJunction(myJunction, false); } // enable save netElements myNet->requiereSaveNet(true); diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Junction.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Junction.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Junction.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Junction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Lane.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Lane.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Lane.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Lane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,8 +23,12 @@ #include #include #include -#include +#include +#include +#include #include +#include +#include #include "GNEChange_Lane.h" @@ -51,10 +55,13 @@ if (myLane) { // non-zero pointer is passsed in case of removal or duplication myLane->incRef("GNEChange_Lane"); - // Save additionals of lane - myAdditionalChilds = myLane->getAdditionalChilds(); - // Save POILanes of lane + // Save hierarchy elements of lane + myShapeParents = myLane->getShapeParents(); + myAdditionalParents = myLane->getAdditionalParents(); + myDemandElementParents = myLane->getDemandElementParents(); myShapeChilds = myLane->getShapeChilds(); + myAdditionalChilds = myLane->getAdditionalChilds(); + myDemandElementChilds = myLane->getDemandElementChilds(); } else { assert(forward); } @@ -91,13 +98,25 @@ } // remove lane from edge myEdge->removeLane(myLane, false); - // Remove additionals vinculated with this lane - for (auto i : myAdditionalChilds) { - myNet->deleteAdditional(i); - } - // Remove Shapes vinculated with this lane of net - for (auto i : myShapeChilds) { - myNet->removeShape(i); + // Remove lane from parent elements + for (const auto& i : myShapeParents) { + i->removeLaneChild(myLane); + } + for (const auto& i : myAdditionalParents) { + i->removeLaneChild(myLane); + } + for (const auto& i : myDemandElementParents) { + i->removeLaneChild(myLane); + } + // Remove lane from child elements + for (const auto& i : myShapeChilds) { + i->removeLaneParent(myLane); + } + for (const auto& i : myAdditionalChilds) { + i->removeLaneParent(myLane); + } + for (const auto& i : myDemandElementChilds) { + i->removeLaneParent(myLane); } } else { // show extra information for tests @@ -109,18 +128,26 @@ // add lane and their attributes to edge // (lane removal is reverted, no need to recompute connections) myEdge->addLane(myLane, myLaneAttrs, false); - // add additional sets vinculated with this lane of net - for (auto i : myAdditionalChilds) { - myNet->insertAdditional(i); - } - // add Shapes vinculated with this lane in net - for (auto i : myShapeChilds) { - myNet->removeShape(i); + // add lane in parent elements + for (const auto& i : myShapeParents) { + i->addLaneChild(myLane); + } + for (const auto& i : myAdditionalParents) { + i->addLaneChild(myLane); + } + for (const auto& i : myDemandElementParents) { + i->addLaneChild(myLane); + } + // add lane in child elements + for (const auto& i : myShapeChilds) { + i->addLaneParent(myLane); + } + for (const auto& i : myAdditionalChilds) { + i->addLaneParent(myLane); + } + for (const auto& i : myDemandElementChilds) { + i->addLaneParent(myLane); } - } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); } // enable save netElements myNet->requiereSaveNet(true); @@ -138,13 +165,25 @@ } // add lane and their attributes to edge myEdge->addLane(myLane, myLaneAttrs, myRecomputeConnections); - // add additional vinculated with this lane of net - for (auto i : myAdditionalChilds) { - myNet->insertAdditional(i); - } - // add shapes vinculated with this lane in net - for (auto i : myShapeChilds) { - myNet->removeShape(i); + // add lane in parent elements + for (const auto& i : myShapeParents) { + i->addLaneChild(myLane); + } + for (const auto& i : myAdditionalParents) { + i->addLaneChild(myLane); + } + for (const auto& i : myDemandElementParents) { + i->addLaneChild(myLane); + } + // add additional in child elements + for (const auto& i : myShapeChilds) { + i->addLaneParent(myLane); + } + for (const auto& i : myAdditionalChilds) { + i->addLaneParent(myLane); + } + for (const auto& i : myDemandElementChilds) { + i->addLaneParent(myLane); } } else { // show extra information for tests @@ -153,20 +192,28 @@ } else { WRITE_DEBUG("Removing nullptr " + toString(SUMO_TAG_LANE) + " from " + toString(SUMO_TAG_EDGE)); } + // Remove lane from parent elements + for (const auto& i : myShapeParents) { + i->removeLaneChild(myLane); + } + for (const auto& i : myAdditionalParents) { + i->removeLaneChild(myLane); + } + for (const auto& i : myDemandElementParents) { + i->removeLaneChild(myLane); + } + // Remove additional from child elements + for (const auto& i : myShapeChilds) { + i->removeLaneParent(myLane); + } + for (const auto& i : myAdditionalChilds) { + i->removeLaneParent(myLane); + } + for (const auto& i : myDemandElementChilds) { + i->removeLaneParent(myLane); + } // remove lane from edge myEdge->removeLane(myLane, myRecomputeConnections); - // Remove additional vinculated with this lane of net - for (auto i : myAdditionalChilds) { - myNet->deleteAdditional(i); - } - // Remove shapes vinculated with this lane of net - for (auto i : myShapeChilds) { - myNet->removeShape(i); - } - } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); } // enable save netElements myNet->requiereSaveNet(true); diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Lane.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Lane.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Lane.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Lane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -86,17 +86,26 @@ /// @brief we need to preserve the attributes explicitly because they are not contained withing GNELane itself const NBEdge::Lane myLaneAttrs; - /// @brief we need to preserve the list of additionals vinculated with this lane - std::vector myAdditionalChilds; + /// @bried whether to recompute connection when adding a new lane + bool myRecomputeConnections; + + /// @brief vector of shape parents + std::vector myShapeParents; + + /// @brief vector of additional parents + std::vector myAdditionalParents; - /// @brief we need to preserve the list of shapes vinculated with this lane + /// @brief vector of demand element parents + std::vector myDemandElementParents; + + /// @brief vector of shape childs std::vector myShapeChilds; - /// @brief we need to preserve the list of additional sets in which this lane is a child - std::vector myFirstAdditionalParents; + /// @brief vector of additional childs + std::vector myAdditionalChilds; - /// @bried whether to recompute connection when adding a new lane - bool myRecomputeConnections; + /// @brief vector of demand element childs + std::vector myDemandElementChilds; }; #endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Shape.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Shape.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Shape.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Shape.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,9 +21,14 @@ #include #include +#include +#include #include -#include +#include +#include +#include #include +#include #include "GNEChange_Shape.h" @@ -38,8 +43,17 @@ GNEChange_Shape::GNEChange_Shape(GNEShape* shape, bool forward) : GNEChange(shape->getNet(), forward), - myShape(shape) { - assert(myNet); + myShape(shape), + myEdgeParents(shape->getEdgeParents()), + myLaneParents(shape->getLaneParents()), + myShapeParents(shape->getShapeParents()), + myAdditionalParents(shape->getAdditionalParents()), + myDemandElementParents(shape->getDemandElementParents()), + myEdgeChilds(shape->getEdgeChilds()), + myLaneChilds(shape->getLaneChilds()), + myShapeChilds(shape->getShapeChilds()), + myAdditionalChilds(shape->getAdditionalChilds()), + myDemandElementChilds(shape->getDemandElementChilds()) { myShape->incRef("GNEChange_Shape"); } @@ -73,16 +87,76 @@ // show extra information for tests WRITE_DEBUG("Removing " + myShape->getTagStr() + " '" + myShape->getID() + "' from viewNet"); // remove shape from net - myNet->removeShape(myShape); + myNet->removeShape(myShape, false); + // Remove element from parent elements + for (const auto& i : myEdgeParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myLaneParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myShapeParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myAdditionalParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myDemandElementParents) { + i->removeShapeChild(myShape); + } + // Remove element from child elements + for (const auto& i : myEdgeChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myLaneChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myShapeChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myAdditionalChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myDemandElementChilds) { + i->removeShapeParent(myShape); + } } else { // show extra information for tests WRITE_DEBUG("Adding " + myShape->getTagStr() + " '" + myShape->getID() + "' into viewNet"); // Add shape in net - myNet->insertShape(myShape); - } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); + myNet->insertShape(myShape, false); + // add element in parent elements + for (const auto& i : myEdgeParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myLaneParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myShapeParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myAdditionalParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myDemandElementParents) { + i->addShapeChild(myShape); + } + // add element in child elements + for (const auto& i : myEdgeChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myLaneChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myShapeChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myAdditionalChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myDemandElementChilds) { + i->addShapeParent(myShape); + } } } @@ -93,16 +167,76 @@ // show extra information for tests WRITE_DEBUG("Adding " + myShape->getTagStr() + " '" + myShape->getID() + "' into viewNet"); // Add shape in net - myNet->insertShape(myShape); + myNet->insertShape(myShape, false); + // add element in parent elements + for (const auto& i : myEdgeParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myLaneParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myShapeParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myAdditionalParents) { + i->addShapeChild(myShape); + } + for (const auto& i : myDemandElementParents) { + i->addShapeChild(myShape); + } + // add element in child elements + for (const auto& i : myEdgeChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myLaneChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myShapeChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myAdditionalChilds) { + i->addShapeParent(myShape); + } + for (const auto& i : myDemandElementChilds) { + i->addShapeParent(myShape); + } } else { // show extra information for tests WRITE_DEBUG("Removing " + myShape->getTagStr() + " '" + myShape->getID() + "' from viewNet"); // remove shape from net - myNet->removeShape(myShape); - } - // check if inspector frame has to be updated - if (myNet->getViewNet()->getViewParent()->getInspectorFrame()->shown()) { - myNet->getViewNet()->getViewParent()->getInspectorFrame()->getACHierarchy()->refreshACHierarchy(); + myNet->removeShape(myShape, false); + // Remove element from parent elements + for (const auto& i : myEdgeParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myLaneParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myShapeParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myAdditionalParents) { + i->removeShapeChild(myShape); + } + for (const auto& i : myDemandElementParents) { + i->removeShapeChild(myShape); + } + // Remove element from child elements + for (const auto& i : myEdgeChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myLaneChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myShapeChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myAdditionalChilds) { + i->removeShapeParent(myShape); + } + for (const auto& i : myDemandElementChilds) { + i->removeShapeParent(myShape); + } } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Shape.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Shape.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_Shape.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_Shape.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,6 +71,36 @@ private: /// @brief pointer to shape GNEShape* myShape; + + /// @brief reference to vector of edge parents + const std::vector& myEdgeParents; + + /// @brief reference to vector of lane parents + const std::vector& myLaneParents; + + /// @brief reference to vector of shape parents + const std::vector& myShapeParents; + + /// @brief reference to vector of additional parents + const std::vector& myAdditionalParents; + + /// @brief reference to vector of demand element parents + const std::vector& myDemandElementParents; + + /// @brief reference to vector of edge childs + const std::vector& myEdgeChilds; + + /// @brief reference to vector of lane childs + const std::vector& myLaneChilds; + + /// @brief reference to vector of shape childs + const std::vector& myShapeChilds; + + /// @brief reference to vector of additional childs + const std::vector& myAdditionalChilds; + + /// @brief reference to vector of demand element childs + const std::vector& myDemandElementChilds; }; #endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_TLS.cpp sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_TLS.cpp --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_TLS.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_TLS.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,6 +25,9 @@ #include #include #include +#include +#include +#include #include "GNEChange_TLS.h" diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_TLS.h sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_TLS.h --- sumo-1.1.0+dfsg1/src/netedit/changes/GNEChange_TLS.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/GNEChange_TLS.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/Makefile.am sumo-1.2.0+dfsg1/src/netedit/changes/Makefile.am --- sumo-1.1.0+dfsg1/src/netedit/changes/Makefile.am 2018-06-26 22:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -9,4 +9,5 @@ GNEChange_Attribute.cpp GNEChange_Attribute.h \ GNEChange_TLS.cpp GNEChange_TLS.h \ GNEChange_Additional.cpp GNEChange_Additional.h \ +GNEChange_DemandElement.cpp GNEChange_DemandElement.h \ GNEChange_Shape.cpp GNEChange_Shape.h diff -Nru sumo-1.1.0+dfsg1/src/netedit/changes/Makefile.in sumo-1.2.0+dfsg1/src/netedit/changes/Makefile.in --- sumo-1.1.0+dfsg1/src/netedit/changes/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/changes/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,653 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netedit/changes -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libneteditchanges_a_AR = $(AR) $(ARFLAGS) -libneteditchanges_a_LIBADD = -am_libneteditchanges_a_OBJECTS = GNEChange.$(OBJEXT) \ - GNEChange_Junction.$(OBJEXT) GNEChange_Edge.$(OBJEXT) \ - GNEChange_Crossing.$(OBJEXT) GNEChange_Lane.$(OBJEXT) \ - GNEChange_Connection.$(OBJEXT) GNEChange_Attribute.$(OBJEXT) \ - GNEChange_TLS.$(OBJEXT) GNEChange_Additional.$(OBJEXT) \ - GNEChange_Shape.$(OBJEXT) -libneteditchanges_a_OBJECTS = $(am_libneteditchanges_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 = $(libneteditchanges_a_SOURCES) -DIST_SOURCES = $(libneteditchanges_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libneteditchanges.a -libneteditchanges_a_SOURCES = GNEChange.cpp GNEChange.h \ -GNEChange_Junction.cpp GNEChange_Junction.h \ -GNEChange_Edge.cpp GNEChange_Edge.h \ -GNEChange_Crossing.cpp GNEChange_Crossing.h \ -GNEChange_Lane.cpp GNEChange_Lane.h \ -GNEChange_Connection.cpp GNEChange_Connection.h \ -GNEChange_Attribute.cpp GNEChange_Attribute.h \ -GNEChange_TLS.cpp GNEChange_TLS.h \ -GNEChange_Additional.cpp GNEChange_Additional.h \ -GNEChange_Shape.cpp GNEChange_Shape.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) --foreign src/netedit/changes/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netedit/changes/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) - -libneteditchanges.a: $(libneteditchanges_a_OBJECTS) $(libneteditchanges_a_DEPENDENCIES) $(EXTRA_libneteditchanges_a_DEPENDENCIES) - $(AM_V_at)-rm -f libneteditchanges.a - $(AM_V_AR)$(libneteditchanges_a_AR) libneteditchanges.a $(libneteditchanges_a_OBJECTS) $(libneteditchanges_a_LIBADD) - $(AM_V_at)$(RANLIB) libneteditchanges.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Additional.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Attribute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Connection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Crossing.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Edge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Junction.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Lane.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_Shape.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEChange_TLS.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netedit/CMakeLists.txt sumo-1.2.0+dfsg1/src/netedit/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/netedit/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -3,6 +3,7 @@ add_subdirectory(dialogs) add_subdirectory(frames) add_subdirectory(netelements) +add_subdirectory(demandelements) set(netedit_SRCS netedit_main.cpp @@ -14,12 +15,18 @@ GNENet.cpp GNEViewNet.h GNEViewNet.cpp + GNEViewNetHelper.h + GNEViewNetHelper.cpp GNEViewParent.h GNEViewParent.cpp GNEUndoList.h GNEUndoList.cpp GNEAttributeCarrier.h GNEAttributeCarrier.cpp + GNEHierarchicalElementParents.h + GNEHierarchicalElementParents.cpp + GNEHierarchicalElementChilds.h + GNEHierarchicalElementChilds.cpp GNEReferenceCounter.h GNEEvent_NetworkLoaded.h ) @@ -27,8 +34,11 @@ add_executable(netedit ${netedit_SRCS} netedit.rc) set_target_properties(netedit PROPERTIES OUTPUT_NAME netedit${BINARY_SUFFIX}) set_target_properties(netedit PROPERTIES OUTPUT_NAME_DEBUG netedit${BINARY_SUFFIX}D) -target_link_libraries(netedit utils_gui_windows utils_gui_globjects utils_gui_div utils_gui_settings utils_gui_images utils_gui_cursors utils_gui_tracker - utils_foxtools foreign_eulerspiral netedit_frames netedit_changes netedit_netelements netedit_additionals netedit_dialogs utils_gui_windows utils_foxtools ${netconvertlibs} ${FOX_LIBRARY} ${GL2PS_LIBRARIES}) +target_link_libraries(netedit utils_gui_cursors utils_gui_shortcuts + utils_foxtools foreign_eulerspiral netedit_frames netedit_changes + netedit_netelements netedit_demandelements utils_gui_div + utils_gui_settings utils_gui_images netedit_additionals netedit_dialogs + utils_gui_windows utils_gui_globjects utils_gui_tracker utils_foxtools utils_vehicle utils_emissions foreign_phemlight ${netconvertlibs} ${FOX_LIBRARY} ${GL2PS_LIBRARIES}) if (MSVC) set_target_properties(netedit PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") target_link_libraries(netedit opengl32 glu32) diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/CMakeLists.txt sumo-1.2.0+dfsg1/src/netedit/demandelements/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/netedit/demandelements/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,17 @@ +set(netedit_demandelements_SRCS + GNERouteHandler.h + GNERouteHandler.cpp + GNEDemandElement.h + GNEDemandElement.cpp + GNERoute.h + GNERoute.cpp + GNEVehicleType.h + GNEVehicleType.cpp + GNEVehicle.h + GNEVehicle.cpp + GNEStop.h + GNEStop.cpp + ) + +add_library(netedit_demandelements STATIC ${netedit_demandelements_SRCS}) +set_property(TARGET netedit_demandelements PROPERTY PROJECT_LABEL "z_netedit_demandelements") diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEDemandElement.cpp sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEDemandElement.cpp --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEDemandElement.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEDemandElement.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,538 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDemandElement.cpp +/// @author Pablo Alvarez Lopez +/// @date Dec 2018 +/// @version $Id$ +/// +// A abstract class for demand elements +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEDemandElement.h" + +// =========================================================================== +// static members +// =========================================================================== + +GNEDemandElement::RouteCalculator* GNEDemandElement::myRouteCalculatorInstance = nullptr; + +// =========================================================================== +// member method definitions +// =========================================================================== + +// --------------------------------------------------------------------------- +// GNEDemandElement::RouteCalculator - methods +// --------------------------------------------------------------------------- + +GNEDemandElement::RouteCalculator::RouteCalculator(GNENet* net) : + myNet(net) { + myDijkstraRouter = new DijkstraRouter >( + myNet->getNetBuilder()->getEdgeCont().getAllEdges(), + true, &NBEdge::getTravelTimeStatic, nullptr, true); +} + + +GNEDemandElement::RouteCalculator::~RouteCalculator() { + delete myDijkstraRouter; +} + + +void +GNEDemandElement::RouteCalculator::updateDijkstraRouter() { + // simply delete and create myDijkstraRouter again + if (myDijkstraRouter) { + delete myDijkstraRouter; + } + myDijkstraRouter = new DijkstraRouter >( + myNet->getNetBuilder()->getEdgeCont().getAllEdges(), + true, &NBEdge::getTravelTimeStatic, nullptr, true); +} + + +std::vector +GNEDemandElement::RouteCalculator::calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector& edges) const { + // declare a solution vector + std::vector solution; + // declare temporal vehicle + NBVehicle tmpVehicle("temporalNBVehicle", vClass); + // iterate over every selected edges + for (int i = 1; i < (int)edges.size(); i++) { + // declare a temporal route in which save route between two last edges + std::vector partialRoute; + myDijkstraRouter->compute(edges.at(i - 1)->getNBEdge(), edges.at(i)->getNBEdge(), &tmpVehicle, 10, partialRoute); + // save partial route in solution + for (const auto& j : partialRoute) { + solution.push_back(j); + } + } + return solution; +} + + +std::vector > +GNEDemandElement::RouteCalculator::calculateDijkstraPartialRoute(SUMOVehicleClass vClass, const std::vector& edges) const { + // declare a solution matrix + std::vector > solution; + // declare temporal vehicle + NBVehicle tmpVehicle("temporalNBVehicle", vClass); + // iterate over every selected edges + for (int i = 1; i < (int)edges.size(); i++) { + // add a temporal route in which save route between two last edges + solution.push_back(std::vector()); + myDijkstraRouter->compute(edges.at(i - 1)->getNBEdge(), edges.at(i)->getNBEdge(), &tmpVehicle, 10, solution.back()); + } + // return matrix solution + return solution; +} + + +bool +GNEDemandElement::RouteCalculator::areEdgesConsecutives(SUMOVehicleClass vClass, GNEEdge* from, GNEEdge* to) const { + // first calculate a route between from and to edge + std::vector route = calculateDijkstraRoute(vClass, {from, to}); + // if route is empty, return false + if (route.empty()) { + return false; + } else { + // iterate over route and check if from and to edge are consecutives + for (int i = 0; i < (int)route.size(); i++) { + if ((route.at(i)->getID() == from->getID()) && + ((i + 1) < (int)route.size()) && + (route.at(i + 1)->getID() == to->getID())) { + return true; + } + } + return false; + } +} + +// --------------------------------------------------------------------------- +// GNEDemandElement - methods +// --------------------------------------------------------------------------- + +GNEDemandElement::GNEDemandElement(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds) : + GUIGlObject(type, id), + GNEAttributeCarrier(tag), + Parameterised(), + GNEHierarchicalElementParents(this, edgeParents, laneParents, shapeParents, additionalParents, demandElementParents), + GNEHierarchicalElementChilds(this, edgeChilds, laneChilds, shapeChilds, additionalChilds, demandElementChilds), + myViewNet(viewNet) { +} + + +GNEDemandElement::GNEDemandElement(GNEDemandElement* demandElementParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds) : + GUIGlObject(type, demandElementParent->generateChildID(tag)), + GNEAttributeCarrier(tag), + Parameterised(), + GNEHierarchicalElementParents(this, edgeParents, laneParents, shapeParents, additionalParents, demandElementParents), + GNEHierarchicalElementChilds(this, edgeChilds, laneChilds, shapeChilds, additionalChilds, demandElementChilds), + myViewNet(viewNet) { +} + + +std::string +GNEDemandElement::generateChildID(SumoXMLTag childTag) { + int counter = (int)getDemandElementChilds().size(); + while (myViewNet->getNet()->retrieveDemandElement(childTag, getID() + toString(childTag) + toString(counter), false) != nullptr) { + counter++; + } + return (getID() + toString(childTag) + toString(counter)); +} + + +GNEDemandElement::~GNEDemandElement() {} + + +bool +GNEDemandElement::isDemandElementValid() const { + return true; +} + + +std::string +GNEDemandElement::getDemandElementProblem() const { + return ""; +} + + +void +GNEDemandElement::fixDemandElementProblem() { + throw InvalidArgument(getTagStr() + " cannot fix any problem"); +} + + +void +GNEDemandElement::openDemandElementDialog() { + throw InvalidArgument(getTagStr() + " doesn't have an demand element dialog"); +} + + +std::string +GNEDemandElement::getBegin() const { + throw InvalidArgument(getTagStr() + " doesn't have an begin time"); +} + + +void +GNEDemandElement::startGeometryMoving() { + // always save original position over view + myMove.originalViewPosition = getPositionInView(); + // check if position over lane or lanes has to be saved + if (myTagProperty.hasAttribute(SUMO_ATTR_LANE)) { + if (myTagProperty.canMaskStartEndPos()) { + // obtain start and end position + myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_STARTPOS); + myMove.secondOriginalPosition = getAttribute(SUMO_ATTR_ENDPOS); + } else { + // obtain position attribute + myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_POSITION); + } + } else if (myTagProperty.hasAttribute(SUMO_ATTR_LANES)) { + // obtain start and end position + myMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_POSITION); + myMove.secondOriginalPosition = getAttribute(SUMO_ATTR_ENDPOS); + } + // save current centering boundary + myMove.movingGeometryBoundary = getCenteringBoundary(); + // Iterate over demand element childs and start geometry moving + for (auto i : getDemandElementChilds()) { + i->startGeometryMoving(); + } +} + + +void +GNEDemandElement::endGeometryMoving() { + // check that endGeometryMoving was called only once + if (myMove.movingGeometryBoundary.isInitialised()) { + // Remove object from net + myViewNet->getNet()->removeGLObjectFromGrid(this); + // reset myMovingGeometryBoundary + myMove.movingGeometryBoundary.reset(); + // update geometry without updating grid + updateGeometry(false); + // Iterate over demand element childs and end geometry moving + for (auto i : getDemandElementChilds()) { + i->endGeometryMoving(); + } + // add object into grid again (using the new centering boundary) + myViewNet->getNet()->addGLObjectIntoGrid(this); + } +} + + +GNEViewNet* +GNEDemandElement::getViewNet() const { + return myViewNet; +} + + +void +GNEDemandElement::createRouteCalculatorInstance(GNENet* net) { + if (myRouteCalculatorInstance == nullptr) { + myRouteCalculatorInstance = new RouteCalculator(net); + } else { + throw ProcessError("Instance already created"); + } +} + + +void +GNEDemandElement::deleteRouteCalculatorInstance() { + if (myRouteCalculatorInstance) { + delete myRouteCalculatorInstance; + myRouteCalculatorInstance = nullptr; + } else { + throw ProcessError("Instance wasn't created"); + } +} + + +GNEDemandElement::RouteCalculator* +GNEDemandElement::getRouteCalculatorInstance() { + if (myRouteCalculatorInstance) { + return myRouteCalculatorInstance; + } else { + throw ProcessError("Instance wasn't created"); + } +} + + +GUIGLObjectPopupMenu* +GNEDemandElement::getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) { + GUIGLObjectPopupMenu* ret = new GUIGLObjectPopupMenu(app, parent, *this); + // build header + buildPopupHeader(ret, app); + // build menu command for center button and copy cursor position to clipboard + buildCenterPopupEntry(ret); + buildPositionCopyEntry(ret, false); + // buld menu commands for names + new FXMenuCommand(ret, ("Copy " + getTagStr() + " name to clipboard").c_str(), nullptr, ret, MID_COPY_NAME); + new FXMenuCommand(ret, ("Copy " + getTagStr() + " typed name to clipboard").c_str(), nullptr, ret, MID_COPY_TYPED_NAME); + new FXMenuSeparator(ret); + // build selection and show parameters menu + myViewNet->buildSelectionACPopupEntry(ret, this); + buildShowParamsPopupEntry(ret); + // show option to open demand element dialog + if (myTagProperty.hasDialog()) { + new FXMenuCommand(ret, ("Open " + getTagStr() + " Dialog").c_str(), getIcon(), &parent, MID_OPEN_ADDITIONAL_DIALOG); + new FXMenuSeparator(ret); + } + new FXMenuCommand(ret, ("Cursor position in view: " + toString(getPositionInView().x()) + "," + toString(getPositionInView().y())).c_str(), nullptr, nullptr, 0); + return ret; +} + + +GUIParameterTableWindow* +GNEDemandElement::getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { + // Create table + GUIParameterTableWindow* ret = new GUIParameterTableWindow(app, *this, myTagProperty.getNumberOfAttributes()); + // Iterate over attributes + for (const auto& i : myTagProperty) { + // Add attribute and set it dynamic if aren't unique + if (i.second.isUnique()) { + ret->mkItem(toString(i.first).c_str(), false, getAttribute(i.first)); + } else { + ret->mkItem(toString(i.first).c_str(), true, getAttribute(i.first)); + } + } + // close building + ret->closeBuilding(); + return ret; +} + + +Boundary +GNEDemandElement::getCenteringBoundary() const { + // Return Boundary depending if myMovingGeometryBoundary is initialised (important for move geometry) + if (myMove.movingGeometryBoundary.isInitialised()) { + return myMove.movingGeometryBoundary; + } else if (myGeometry.shape.size() > 0) { + Boundary b = myGeometry.shape.getBoxBoundary(); + b.grow(20); + return b; + } else { + return Boundary(-0.1, -0.1, 0.1, 0.1); + } +} + + +bool +GNEDemandElement::isRouteValid(const std::vector& edges, bool report) { + if (edges.size() == 0) { + // routes cannot be empty + return false; + } else if (edges.size() == 1) { + // routes with a single edge are valid + return true; + } else { + // iterate over edges to check that compounds a chain + auto it = edges.begin(); + while (it != edges.end() - 1) { + GNEEdge* currentEdge = *it; + GNEEdge* nextEdge = *(it + 1); + // consecutive edges aren't allowed + if (currentEdge->getID() == nextEdge->getID()) { + return false; + } + // make sure that edges are consecutives + if (std::find(currentEdge->getGNEJunctionDestiny()->getGNEOutgoingEdges().begin(), + currentEdge->getGNEJunctionDestiny()->getGNEOutgoingEdges().end(), + nextEdge) == currentEdge->getGNEJunctionDestiny()->getGNEOutgoingEdges().end()) { + if (report) { + WRITE_WARNING("Parameter 'Route' invalid. " + currentEdge->getTagStr() + " '" + currentEdge->getID() + + "' ins't consecutive to " + nextEdge->getTagStr() + " '" + nextEdge->getID() + "'"); + } + return false; + } + it++; + } + } + return true; +} + + +GNEDemandElement::DemandElementGeometry::DemandElementGeometry() {} + + +void +GNEDemandElement::DemandElementGeometry::clearGeometry() { + shape.clear(); + shapeRotations.clear(); + shapeLengths.clear(); +} + + +void +GNEDemandElement::DemandElementGeometry::calculateShapeRotationsAndLengths() { + // Get number of parts of the shape + int numberOfSegments = (int)shape.size() - 1; + // If number of segments is more than 0 + if (numberOfSegments >= 0) { + // Reserve memory (To improve efficiency) + shapeRotations.reserve(numberOfSegments); + shapeLengths.reserve(numberOfSegments); + // For every part of the shape + for (int i = 0; i < numberOfSegments; ++i) { + // Obtain first position + const Position& f = shape[i]; + // Obtain next position + const Position& s = shape[i + 1]; + // Save distance between position into myShapeLengths + shapeLengths.push_back(f.distanceTo(s)); + // Save rotation (angle) of the vector constructed by points f and s + shapeRotations.push_back((double)atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); + } + } +} + + +const std::string& +GNEDemandElement::getDemandElementID() const { + return getMicrosimID(); +} + + +bool +GNEDemandElement::isValidDemandElementID(const std::string& newID) const { + if (SUMOXMLDefinitions::isValidVehicleID(newID) && (myViewNet->getNet()->retrieveDemandElement(myTagProperty.getTag(), newID, false) == nullptr)) { + return true; + } else { + return false; + } +} + + +void +GNEDemandElement::changeDemandElementID(const std::string& newID) { + if (myViewNet->getNet()->retrieveDemandElement(myTagProperty.getTag(), newID, false) != nullptr) { + throw InvalidArgument("An DemandElement with tag " + getTagStr() + " and ID = " + newID + " already exists"); + } else { + // Save old ID + std::string oldID = getMicrosimID(); + // set New ID + setMicrosimID(newID); + // update demand element ID in the container of net + myViewNet->getNet()->updateDemandElementID(oldID, this); + } +} + + +bool +GNEDemandElement::isAttributeCarrierSelected() const { + return mySelected; +} + + +bool +GNEDemandElement::drawUsingSelectColor() const { + if (mySelected && (myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND)) { + return true; + } else { + return false; + } +} + + +bool +GNEDemandElement::checkDemandElementChildRestriction() const { + // throw exception because this function mus be implemented in child (see GNEE3Detector) + throw ProcessError("Calling non-implemented function checkDemandElementChildRestriction during saving of " + getTagStr() + ". It muss be reimplemented in child class"); +} + + +std::string +GNEDemandElement::getGenericParametersStr() const { + std::string result; + // Generate an string using the following structure: "key1=value1|key2=value2|... + for (auto i : getParametersMap()) { + result += i.first + "=" + i.second + "|"; + } + // remove the last "|" + if (!result.empty()) { + result.pop_back(); + } + return result; +} + + +std::vector > +GNEDemandElement::getGenericParameters() const { + std::vector > result; + // iterate over parameters map and fill result + for (auto i : getParametersMap()) { + result.push_back(std::make_pair(i.first, i.second)); + } + return result; +} + + +void +GNEDemandElement::setGenericParametersStr(const std::string& value) { + // clear parameters + clearParameter(); + // separate value in a vector of string using | as separator + std::vector parsedValues; + StringTokenizer stValues(value, "|", true); + while (stValues.hasNext()) { + parsedValues.push_back(stValues.next()); + } + // check that parsed values (A=B)can be parsed in generic parameters + for (auto i : parsedValues) { + std::vector parsedParameters; + StringTokenizer stParam(i, "=", true); + while (stParam.hasNext()) { + parsedParameters.push_back(stParam.next()); + } + // Check that parsed parameters are exactly two and contains valid chracters + if (parsedParameters.size() == 2 && SUMOXMLDefinitions::isValidGenericParameterKey(parsedParameters.front()) && SUMOXMLDefinitions::isValidGenericParameterValue(parsedParameters.back())) { + setParameter(parsedParameters.front(), parsedParameters.back()); + } + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEDemandElement.h sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEDemandElement.h --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEDemandElement.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEDemandElement.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,402 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDemandElement.h +/// @author Pablo Alvarez Lopez +/// @date Dec 2018 +/// @version $Id$ +/// +// A abstract class for demand elements +/****************************************************************************/ +#ifndef GNEDemandElement_h +#define GNEDemandElement_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEViewNet; +class GNEEdge; +class GNELane; +class GNEAdditional; +class GNEDemandElement; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNEDemandElement + * @brief An Element which don't belongs to GNENet but has influency in the simulation + */ +class GNEDemandElement : public GUIGlObject, public GNEAttributeCarrier, public Parameterised, public GNEHierarchicalElementParents, public GNEHierarchicalElementChilds { + +public: + /// @brief class used to calculate routes in nets + class RouteCalculator { + + public: + /// @brief constructor + RouteCalculator(GNENet* net); + + /// @brief destructor + ~RouteCalculator(); + + /// @brief update DijkstraRoute (called when SuperMode Demand is selected) + void updateDijkstraRouter(); + + /// @brief calculate Dijkstra route (and save it in a single vector + std::vector calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector& edges) const; + + /// @brief calculate partial Dijkstra route (and save it in a Matrix vector) + std::vector > calculateDijkstraPartialRoute(SUMOVehicleClass vClass, const std::vector& edges) const; + + /// @ brief check if exist a route between the two given consecutives edges + bool areEdgesConsecutives(SUMOVehicleClass vClass, GNEEdge* from, GNEEdge* to) const; + + private: + /// @brief pointer to net + GNENet* myNet; + + /// @brief SUMO Abstract DijkstraRouter + SUMOAbstractRouter* myDijkstraRouter; + }; + + /**@brief Constructor + * @param[in] id Gl-id of the demand element element (Must be unique) + * @param[in] viewNet pointer to GNEViewNet of this demand element element belongs + * @param[in] type GUIGlObjectType of demand element + * @param[in] tag Type of xml tag that define the demand element element (SUMO_TAG_ROUTE, SUMO_TAG_VEHICLE, etc...) + * @param[in] edgeParents vector of edge parents + * @param[in] laneParents vector of lane parents + * @param[in] shapeParents vector of shape parents + * @param[in] additionalParents vector of additional parents + * @param[in] demandElementChilds vector of demandElement parents + * @param[in] edgeChilds vector of edge childs + * @param[in] laneChilds vector of lane childs + * @param[in] shapeChilds vector of shape childs + * @param[in] additionalChilds vector of additional childs + * @param[in] demandElementChilds vector of demandElement childs + */ + GNEDemandElement(const std::string& id, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds); + + /**@brief Constructor + * @param[in] demandElementParent pointer to demand element parent pointer (used to generate an ID) + * @param[in] viewNet pointer to GNEViewNet of this demand element element belongs + * @param[in] type GUIGlObjectType of demand element + * @param[in] tag Type of xml tag that define the demand element element (SUMO_TAG_ROUTE, SUMO_TAG_VEHICLE, etc...) + * @param[in] edgeParents vector of edge parents + * @param[in] laneParents vector of lane parents + * @param[in] shapeParents vector of shape parents + * @param[in] additionalParents vector of additional parents + * @param[in] demandElementChilds vector of demandElement parents + * @param[in] edgeChilds vector of edge childs + * @param[in] laneChilds vector of lane childs + * @param[in] shapeChilds vector of shape childs + * @param[in] additionalChilds vector of additional childs + * @param[in] demandElementChilds vector of demandElement childs + */ + GNEDemandElement(GNEDemandElement* demandElementParent, GNEViewNet* viewNet, GUIGlObjectType type, SumoXMLTag tag, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds); + + /// @brief Destructor + ~GNEDemandElement(); + + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + + /// @name members and functions relative to write demand elements into XML + /// @{ + /**@brief writte demand element element into a xml file + * @param[in] device device in which write parameters of demand element element + */ + virtual void writeDemandElement(OutputDevice& device) const = 0; + + /// @brief check if current demand element is valid to be writed into XML (by default true, can be reimplemented in childs) + virtual bool isDemandElementValid() const; + + /// @brief return a string with the current demand element problem (by default empty, can be reimplemented in childs) + virtual std::string getDemandElementProblem() const; + + /// @brief fix demand element problem (by default throw an exception, has to be reimplemented in childs) + virtual void fixDemandElementProblem(); + /// @} + + /**@brief open DemandElement Dialog + * @note: if demand element needs an demand element dialog, this function has to be implemented in childrens (see GNERerouter and GNEVariableSpeedSign) + * @throw invalid argument if demand element doesn't have an demand element Dialog + */ + virtual void openDemandElementDialog(); + + /**@brief get begin time of demand element + * @note: used by demand elements of type "Vehicle", and it has to be implemented as childs + * @throw invalid argument if demand element doesn't has a begin time + */ + virtual std::string getBegin() const; + + /// @name Functions related with geometry of element + /// @{ + /// @brief begin movement (used when user click over demand element to start a movement, to avoid problems with problems with GL Tree) + void startGeometryMoving(); + + /// @brief begin movement (used when user click over demand element to start a movement, to avoid problems with problems with GL Tree) + void endGeometryMoving(); + + /**@brief change the position of the element geometry without saving in undoList + * @param[in] offset Position used for calculate new position of geometry without updating RTree + */ + virtual void moveGeometry(const Position& offset) = 0; + + /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) + * @param[in] undoList The undoList on which to register changes + */ + virtual void commitGeometryMoving(GNEUndoList* undoList) = 0; + + /// @brief update pre-computed geometry information + virtual void updateGeometry(bool updateGrid) = 0; + + /// @brief Returns position of demand element in view + virtual Position getPositionInView() const = 0; + /// @} + + /// @brief Returns a pointer to GNEViewNet in which demand element element is located + GNEViewNet* getViewNet() const; + + /// @brief get color + virtual const RGBColor& getColor() const = 0; + + /// @name members and functions relative to RouteCalculator isntance + /// @{ + + /// @brief create instance of RouteCalculator + static void createRouteCalculatorInstance(GNENet* net); + + /// @brief delete instance of RouteCalculator + static void deleteRouteCalculatorInstance(); + + /// @brief obtain instance of RouteCalculator + static RouteCalculator* getRouteCalculatorInstance(); + + /// @} + + /// @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 + */ + Boundary getCenteringBoundary() const; + + /**@brief Draws the object + * @param[in] s The settings for the current view (may influence drawing) + * @see GUIGlObject::drawGL + */ + virtual void drawGL(const GUIVisualizationSettings& s) const = 0; + /// @} + + /// @name inherited from GNEAttributeCarrier + /// @{ + /// @brief select attribute carrier using GUIGlobalSelection + virtual void selectAttributeCarrier(bool changeFlag = true) = 0; + + /// @brief unselect attribute carrier using GUIGlobalSelection + virtual void unselectAttributeCarrier(bool changeFlag = true) = 0; + + /// @brief check if attribute carrier is selected + bool isAttributeCarrierSelected() const; + + /// @brief check if attribute carrier must be drawn using selecting color. + bool drawUsingSelectColor() const; + + /* @brief method for getting the Attribute of an XML key + * @param[in] key The attribute key + * @return string with the value associated to key + */ + virtual std::string getAttribute(SumoXMLAttr key) const = 0; + + /**@brief method for setting the attribute and letting the object perform demand element changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + */ + virtual void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) = 0; + + /**@brief method for checking if the key and their conrrespond attribute are valids + * @param[in] key The attribute key + * @param[in] value The value asociated to key key + * @return true if the value is valid, false in other case + */ + virtual bool isValid(SumoXMLAttr key, const std::string& value) = 0; + + /// @brief get PopPup ID (Used in AC Hierarchy) + virtual std::string getPopUpID() const = 0; + + /// @brief get Hierarchy Name (Used in AC Hierarchy) + virtual std::string getHierarchyName() const = 0; + /// @} + + /// @name Functions related with Generic Paramters + /// @{ + + /// @brief return generic parameters in string format + std::string getGenericParametersStr() const; + + /// @brief return generic parameters as vector of pairs format + std::vector > getGenericParameters() const; + + /// @brief set generic parameters in string format + void setGenericParametersStr(const std::string& value); + + /// @} + + /** @brief check if a route is valid + * @param[in] edges vector with the route's edges + * @param[in] report enable or disable writting warnings if route isn't valid + */ + static bool isRouteValid(const std::vector& edges, bool report); + +protected: + /// @brief struct for pack all variables related with geometry of elemement + struct DemandElementGeometry { + /// @brief constructor + DemandElementGeometry(); + + /// @brief reset geometry + void clearGeometry(); + + /// @brief calculate multi shape rotations and lenghts + void calculateShapeRotationsAndLengths(); + + /// @brief The shape of the demand element + PositionVector shape; + + /// @brief The rotations of the single shape parts + std::vector shapeRotations; + + /// @brief The lengths of the single shape parts + std::vector shapeLengths; + }; + + /// @brief struct for pack all variables related with demand element move + struct DemandElementMove { + /// @brief boundary used during moving of elements (to avoid insertion in RTREE + Boundary movingGeometryBoundary; + + /// @brief value for saving first original position over lane before moving + Position originalViewPosition; + + /// @brief value for saving first original position over lane before moving + std::string firstOriginalLanePosition; + + /// @brief value for saving second original position over lane before moving + std::string secondOriginalPosition; + }; + + /// @brief The GNEViewNet this demand element element belongs + GNEViewNet* myViewNet; + + /// @brief geometry to be precomputed in updateGeometry(...) + DemandElementGeometry myGeometry; + + /// @brief variable DemandElementMove + DemandElementMove myMove; + + /// @name Functions relative to change values in setAttribute(...) + /// @{ + + /// @brief returns DemandElement ID + const std::string& getDemandElementID() const; + + /// @brief check if a new demand element ID is valid + bool isValidDemandElementID(const std::string& newID) const; + + /**@brief change ID of demand element + * @throw exception if exist already an demand element whith the same ID + * @throw exception if ID isn't valid + */ + void changeDemandElementID(const std::string& newID); + + /// @} + +private: + /**@brief check restriction with the number of childs + * @throw ProcessError if itis called without be reimplemented in child class + */ + virtual bool checkDemandElementChildRestriction() const; + + /// @brief method for setting the attribute and nothing else (used in GNEChange_Attribute) + virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0; + + /// @brief RouteCalculator instance + static RouteCalculator* myRouteCalculatorInstance; + + /// @brief Invalidated copy constructor. + GNEDemandElement(const GNEDemandElement&) = delete; + + /// @brief Invalidated assignment operator. + GNEDemandElement& operator=(const GNEDemandElement&) = delete; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERoute.cpp sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERoute.cpp --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERoute.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERoute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,383 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERoute.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// A class for visualizing routes in Netedit +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNERoute.h" + + +// =========================================================================== +// method definitions +// =========================================================================== + +GNERoute::GNERoute(GNEViewNet* viewNet) : + GNEDemandElement(viewNet->getNet()->generateDemandElementID(SUMO_TAG_ROUTE), viewNet, GLO_ROUTE, SUMO_TAG_ROUTE, +{}, {}, {}, {}, {}, {}, {}, {}, {}, {}), +myColor(RGBColor::YELLOW) { +} + + +GNERoute::GNERoute(GNEViewNet* viewNet, const std::string& routeID, const std::vector& edges, const RGBColor& color) : + GNEDemandElement(routeID, viewNet, GLO_ROUTE, SUMO_TAG_ROUTE, + edges, {}, {}, {}, {}, {}, {}, {}, {}, {}), +myColor(color) { +} + + +GNERoute::~GNERoute() {} + + +const RGBColor& +GNERoute::getColor() const { + return myColor; +} + + +void +GNERoute::writeDemandElement(OutputDevice& device) const { + device.openTag(SUMO_TAG_ROUTE); + device.writeAttr(SUMO_ATTR_ID, getDemandElementID()); + device.writeAttr(SUMO_ATTR_EDGES, parseIDs(getEdgeParents())); + device.writeAttr(SUMO_ATTR_COLOR, toString(myColor)); + // write stops associated to this route + for (const auto& i : getDemandElementChilds()) { + if (i->getTagProperty().isStop()) { + i->writeDemandElement(device); + } + } + device.closeTag(); +} + + +bool +GNERoute::isDemandElementValid() const { + if (getEdgeParents().size() == 0) { + return false; + } else if (getEdgeParents().size() == 1) { + return true; + } else { + // check if exist at least a connection between every edge + for (int i = 1; i < (int)getEdgeParents().size(); i++) { + if (getRouteCalculatorInstance()->areEdgesConsecutives(SVC_PASSENGER, getEdgeParents().at(i - 1), getEdgeParents().at(i)) == false) { + return false; + } + } + // there is connections bewteen all edges, then return true + return true; + } +} + + +void +GNERoute::moveGeometry(const Position&) { + // This additional cannot be moved +} + + +void +GNERoute::commitGeometryMoving(GNEUndoList*) { + // This additional cannot be moved +} + + +void +GNERoute::updateGeometry(bool updateGrid) { + // first check if object has to be removed from grid (SUMOTree) + if (updateGrid) { + myViewNet->getNet()->removeGLObjectFromGrid(this); + } + + // Clear all containers + myGeometry.clearGeometry(); + + // calculate start and end positions depending of number of lanes + if (getEdgeParents().size() == 1) { + // append shape + myGeometry.shape = getEdgeParents().back()->getLanes().front()->getShape(); + + // calculate multi shape rotation and lengths + myGeometry.calculateShapeRotationsAndLengths(); + + } else if (getEdgeParents().size() > 1) { + // declare a vector of shapes + std::vector multiShape; + + // start with the first lane shape + multiShape.push_back(getEdgeParents().front()->getLanes().front()->getShape()); + + // add first shape connection (if exist, in other case leave it empty) + multiShape.push_back(PositionVector{getEdgeParents().at(0)->getLanes().front()->getShape().back(), getEdgeParents().at(1)->getLanes().front()->getShape().front()}); + for (auto j : getEdgeParents().at(0)->getGNEConnections()) { + if (j->getLaneTo() == getEdgeParents().at(1)->getLanes().front()) { + multiShape.back() = j->getShape(); + } + } + + // append shapes of intermediate lanes AND connections (if exist) + for (int i = 1; i < ((int)getEdgeParents().size() - 1); i++) { + // add lane shape + multiShape.push_back(getEdgeParents().at(i)->getLanes().front()->getShape()); + // add empty shape for connection + multiShape.push_back(PositionVector{getEdgeParents().at(i)->getLanes().front()->getShape().back(), getEdgeParents().at(i + 1)->getLanes().front()->getShape().front()}); + // set connection shape (if exist). In other case, insert an empty shape + for (auto j : getEdgeParents().at(i)->getGNEConnections()) { + if (j->getLaneTo() == getEdgeParents().at(i + 1)->getLanes().front()) { + multiShape.back() = j->getShape(); + } + } + } + + // append last shape + multiShape.push_back(getEdgeParents().back()->getLanes().front()->getShape()); + + // calculate unified shape + for (auto i : multiShape) { + myGeometry.shape.append(i); + } + myGeometry.shape.removeDoublePoints(); + + // calculate multi shape rotation and lengths + myGeometry.calculateShapeRotationsAndLengths(); + } + + // last step is to check if object has to be added into grid (SUMOTree) again + if (updateGrid) { + myViewNet->getNet()->addGLObjectIntoGrid(this); + } + + // update demand element childs + for (const auto& i : getDemandElementChilds()) { + i->updateGeometry(updateGrid); + } +} + + +Position +GNERoute::getPositionInView() const { + return Position(); +} + + +std::string +GNERoute::getParentName() const { + return myViewNet->getNet()->getMicrosimID(); +} + + +void +GNERoute::drawGL(const GUIVisualizationSettings& s) const { + // only drawn in super mode demand + if (myViewNet->getViewOptions().showDemandElements()) { + // calculate route width + double routeWidth = s.addSize.getExaggeration(s, this) * 0.66; + + // Start drawing adding an gl identificator + glPushName(getGlID()); + + // Add a draw matrix + glPushMatrix(); + + // Start with the drawing of the area traslating matrix to origin + glTranslated(0, 0, getType()); + + // Set color of the base + if (drawUsingSelectColor()) { + GLHelper::setColor(s.selectedAdditionalColor); + } else { + GLHelper::setColor(myColor); + } + + // draw route + GLHelper::drawBoxLines(myGeometry.shape, myGeometry.shapeRotations, myGeometry.shapeLengths, routeWidth); + + // Pop last matrix + glPopMatrix(); + + // Draw name if isn't being drawn for selecting + if (!s.drawForSelecting) { + drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); + } + + // check if dotted contour has to be drawn + if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { + GLHelper::drawShapeDottedContour(getType(), myGeometry.shape, routeWidth); + } + + // Pop name + glPopName(); + } +} + + +void +GNERoute::selectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.select(dynamic_cast(this)->getGlID()); + // add object of list into selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->addedLockedObject(GLO_ROUTE); + if (changeFlag) { + mySelected = true; + } + } +} + + +void +GNERoute::unselectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.deselect(dynamic_cast(this)->getGlID()); + // remove object of list of selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->removeLockedObject(GLO_ROUTE); + if (changeFlag) { + mySelected = false; + + } + } +} + + +std::string +GNERoute::getAttribute(SumoXMLAttr key) const { + switch (key) { + case SUMO_ATTR_ID: + return getDemandElementID(); + case SUMO_ATTR_EDGES: + return parseIDs(getEdgeParents()); + case SUMO_ATTR_COLOR: + return toString(myColor); + case GNE_ATTR_SELECTED: + return toString(isAttributeCarrierSelected()); + case GNE_ATTR_GENERIC: + return getGenericParametersStr(); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +void +GNERoute::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { + if (value == getAttribute(key)) { + return; //avoid needless changes, later logic relies on the fact that attributes have changed + } + switch (key) { + case SUMO_ATTR_ID: + case SUMO_ATTR_EDGES: + case SUMO_ATTR_COLOR: + case GNE_ATTR_SELECTED: + case GNE_ATTR_GENERIC: + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNERoute::isValid(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + return isValidDemandElementID(value); + case SUMO_ATTR_EDGES: + if (canParse >(myViewNet->getNet(), value, false)) { + // all edges exist, then check if compounds a valid route + return GNEDemandElement::isRouteValid(parse >(myViewNet->getNet(), value), false); + } else { + return false; + } + case SUMO_ATTR_COLOR: + return canParse(value); + case GNE_ATTR_SELECTED: + return canParse(value); + case GNE_ATTR_GENERIC: + return isGenericParametersValid(value); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +std::string +GNERoute::getPopUpID() const { + return getTagStr(); +} + + +std::string +GNERoute::getHierarchyName() const { + return getTagStr() + ": " + getAttribute(SUMO_ATTR_ID) ; +} + +// =========================================================================== +// private +// =========================================================================== + +void +GNERoute::setAttribute(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + changeDemandElementID(value); + break; + case SUMO_ATTR_EDGES: + changeEdgeParents(this, value); + break; + case SUMO_ATTR_COLOR: + myColor = parse(value); + break; + case GNE_ATTR_SELECTED: + if (parse(value)) { + selectAttributeCarrier(); + } else { + unselectAttributeCarrier(); + } + break; + case GNE_ATTR_GENERIC: + setGenericParametersStr(value); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERoute.h sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERoute.h --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERoute.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERoute.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,154 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERoute.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// A class for visualizing routes in Netedit +/****************************************************************************/ +#ifndef GNERoute_h +#define GNERoute_h + + +// =========================================================================== +// included modules +// =========================================================================== + +#include "GNEDemandElement.h" + +// =========================================================================== +// class declarations +// =========================================================================== +class GNEEdge; + + +// =========================================================================== +// class definitions +// =========================================================================== + +class GNERoute : public GNEDemandElement { +public: + /** default constructor + * @param[in] viewNet view in which this Route is placed + */ + GNERoute(GNEViewNet* viewNet); + + /** parameter constructor + * @param[in] viewNet view in which this Route is placed + * @param[in] routeID unique route ID + * @param[in] edges list of consecutive edges of this route + * @param[in] color RGBColor of this route + */ + GNERoute(GNEViewNet* viewNet, const std::string& routeID, const std::vector& edges, const RGBColor& color); + + /// @brief destructor + ~GNERoute(); + + /// @brief get color + const RGBColor& getColor() const; + + /**@brief writte demand element element into a xml file + * @param[in] device device in which write parameters of demand element element + */ + void writeDemandElement(OutputDevice& device) const; + + /// @brief check if current demand element is valid to be writed into XML (by default true, can be reimplemented in childs) + bool isDemandElementValid() const; + + /// @name Functions related with geometry of element + /// @{ + /**@brief change the position of the element geometry without saving in undoList + * @param[in] offset Position used for calculate new position of geometry without updating RTree + */ + void moveGeometry(const Position& offset); + + /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) + * @param[in] undoList The undoList on which to register changes + */ + void commitGeometryMoving(GNEUndoList* undoList); + + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + + /// @brief Returns position of additional in view + Position getPositionInView() const; + /// @} + + /// @name inherited from GUIGlObject + /// @{ + /**@brief Returns the name of the parent object + * @return This object's parent id + */ + std::string getParentName() 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 inherited from GNEAttributeCarrier + /// @{ + /// @brief select attribute carrier using GUIGlobalSelection + void selectAttributeCarrier(bool changeFlag = true); + + /// @brief unselect attribute carrier using GUIGlobalSelection + void unselectAttributeCarrier(bool changeFlag = true); + + /* @brief method for getting the Attribute of an XML key + * @param[in] key The attribute key + * @return string with the value associated to key + */ + std::string getAttribute(SumoXMLAttr key) const; + + /* @brief method for setting the attribute and letting the object perform additional changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + * @param[in] net optionally the GNENet to inform about gui updates + */ + void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); + + /* @brief method for setting the attribute and letting the object perform additional changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + */ + bool isValid(SumoXMLAttr key, const std::string& value); + + /// @brief get PopPup ID (Used in AC Hierarchy) + std::string getPopUpID() const; + + /// @brief get Hierarchy Name (Used in AC Hierarchy) + std::string getHierarchyName() const; + /// @} + +protected: + /// @brief route color + RGBColor myColor; + +private: + /// @brief method for setting the attribute and nothing else + void setAttribute(SumoXMLAttr key, const std::string& value); + + /// @brief Invalidated copy constructor. + GNERoute(GNERoute*) = delete; + + /// @brief Invalidated assignment operator. + GNERoute& operator=(GNERoute*) = delete; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERouteHandler.cpp sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERouteHandler.cpp --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERouteHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERouteHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,527 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERouteHandler.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// Builds demand objects for netedit +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNERouteHandler.h" +#include "GNERoute.h" +#include "GNEStop.h" +#include "GNEVehicle.h" +#include "GNEVehicleType.h" + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNERouteHandler::GNERouteHandler(const std::string& file, GNEViewNet* viewNet, bool undoDemandElements) : + SUMORouteHandler(file, ""), + myViewNet(viewNet), + myUndoDemandElements(undoDemandElements) { +} + + +GNERouteHandler::~GNERouteHandler() {} + + +void +GNERouteHandler::buildVehicle(GNEViewNet* viewNet, bool undoDemandElements, SUMOVehicleParameter* vehicleParameters) { + // first check if vehicle parameter was sucesfulyl created + if (vehicleParameters) { + // now check if exist another vehicle with the same ID + if (viewNet->getNet()->retrieveDemandElement(SUMO_TAG_VEHICLE, vehicleParameters->id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_VEHICLE) + " with the same ID='" + vehicleParameters->id + "'."); + } else { + // obtain routes and vtypes + GNEDemandElement* vType = viewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, vehicleParameters->vtypeid, false); + GNEDemandElement* route = viewNet->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, vehicleParameters->routeid, false); + if (vType == nullptr) { + WRITE_WARNING("Invalid vehicle Type '" + vehicleParameters->vtypeid + "' used in vehicle '" + vehicleParameters->id + "'."); + } else if (route == nullptr) { + WRITE_WARNING("Invalid route '" + vehicleParameters->routeid + "' used in vehicle '" + vehicleParameters->id + "'."); + } else { + // create vehicle using vehicleParameters + GNEVehicle* vehicle = new GNEVehicle(SUMO_TAG_VEHICLE, viewNet, *vehicleParameters, vType, route); + if (undoDemandElements) { + viewNet->getUndoList()->p_begin("add " + vehicle->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_DemandElement(vehicle, true), true); + viewNet->getUndoList()->p_end(); + // iterate over stops of vehicleParameters and create stops associated with it + for (const auto& i : vehicleParameters->stops) { + buildStop(viewNet, true, i, vehicle, false); + } + } else { + viewNet->getNet()->insertDemandElement(vehicle); + vType->addDemandElementChild(vehicle); + vehicle->incRef("buildVehicle"); + // iterate over stops of vehicleParameters and create stops associated with it + for (const auto& i : vehicleParameters->stops) { + buildStop(viewNet, false, i, vehicle, false); + } + } + } + } + } +} + + +void +GNERouteHandler::buildFlow(GNEViewNet* viewNet, bool undoDemandElements, SUMOVehicleParameter* flowParameters) { + // first check if flow parameter was sucesfulyl created + if (flowParameters) { + // now check if exist another flow with the same ID + if (viewNet->getNet()->retrieveDemandElement(SUMO_TAG_FLOW, flowParameters->id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_FLOW) + " with the same ID='" + flowParameters->id + "'."); + } else { + // obtain routes and vtypes + GNEDemandElement* vType = viewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, flowParameters->vtypeid, false); + GNEDemandElement* route = viewNet->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, flowParameters->routeid, false); + if (vType == nullptr) { + WRITE_WARNING("Invalid flow Type '" + flowParameters->vtypeid + "' used in flow '" + flowParameters->id + "'."); + } else if (route == nullptr) { + WRITE_WARNING("Invalid route '" + flowParameters->routeid + "' used in flow '" + flowParameters->id + "'."); + } else { + // create flow using flowParameters + GNEVehicle* flow = new GNEVehicle(SUMO_TAG_FLOW, viewNet, *flowParameters, vType, route); + if (undoDemandElements) { + viewNet->getUndoList()->p_begin("add " + flow->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_DemandElement(flow, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertDemandElement(flow); + vType->addDemandElementChild(flow); + flow->incRef("buildFlow"); + } + } + } + } +} + + +void +GNERouteHandler::buildTrip(GNEViewNet* viewNet, bool undoDemandElements, SUMOVehicleParameter* tripParameters, const std::vector& edges) { + // first check if trip parameter was sucesfulyl created + if (tripParameters) { + // now check if exist another trip with the same ID + if (viewNet->getNet()->retrieveDemandElement(SUMO_TAG_TRIP, tripParameters->id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_TRIP) + " with the same ID='" + tripParameters->id + "'."); + } else { + // obtain vtypes + GNEDemandElement* vType = viewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, tripParameters->vtypeid, false); + if (vType == nullptr) { + WRITE_WARNING("Invalid trip Type '" + tripParameters->vtypeid + "' used in trip '" + tripParameters->id + "'."); + } else { + // check if route exist + std::vector routeEdges; + NBVehicle tmpVehicle("temporalNBVehicle", GNEAttributeCarrier::parse(vType->getAttribute(SUMO_ATTR_VCLASS))); + SUMOAbstractRouter* route; + // create Dijkstra route + route = new DijkstraRouter >( + viewNet->getNet()->getNetBuilder()->getEdgeCont().getAllEdges(), true, &NBEdge::getTravelTimeStatic, nullptr, true); + // check if route is valid + if (!route->compute(edges.front()->getNBEdge(), edges.back()->getNBEdge(), &tmpVehicle, 10, routeEdges)) { + WRITE_WARNING("There isn't a route bewteen edges '" + edges.front()->getID() + "' and '" + edges.back()->getID() + "'."); + } + // delete route + delete route; + // create trip using tripParameters + GNEVehicle* trip = new GNEVehicle(viewNet, *tripParameters, vType, edges); + if (undoDemandElements) { + viewNet->getUndoList()->p_begin("add " + trip->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_DemandElement(trip, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertDemandElement(trip); + vType->addDemandElementChild(trip); + trip->incRef("buildTrip"); + } + } + } + } +} + + +void +GNERouteHandler::buildStop(GNEViewNet* viewNet, bool undoDemandElements, const SUMOVehicleParameter::Stop& stopParameters, GNEDemandElement* stopParent, bool friendlyPosition) { + // declare pointers to stopping place and lane and obtain it + GNEAdditional* stoppingPlace = nullptr; + GNELane* lane = nullptr; + SumoXMLTag stopTagType = SUMO_TAG_NOTHING; + if (stopParameters.busstop.size() > 0) { + stoppingPlace = viewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, stopParameters.busstop, false); + stopTagType = SUMO_TAG_STOP_BUSSTOP; + } else if (stopParameters.containerstop.size() > 0) { + stoppingPlace = viewNet->getNet()->retrieveAdditional(SUMO_TAG_CONTAINER_STOP, stopParameters.containerstop, false); + stopTagType = SUMO_TAG_STOP_CONTAINERSTOP; + } else if (stopParameters.chargingStation.size() > 0) { + stoppingPlace = viewNet->getNet()->retrieveAdditional(SUMO_TAG_CHARGING_STATION, stopParameters.chargingStation, false); + stopTagType = SUMO_TAG_STOP_CHARGINGSTATION; + } else if (stopParameters.parkingarea.size() > 0) { + stoppingPlace = viewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, stopParameters.parkingarea, false); + stopTagType = SUMO_TAG_STOP_PARKINGAREA; + } else if (stopParameters.lane.size() > 0) { + lane = viewNet->getNet()->retrieveLane(stopParameters.lane, false); + stopTagType = SUMO_TAG_STOP_LANE; + } + // check if values are correct + if (stoppingPlace && lane) { + WRITE_WARNING("A stop must be defined either over a stoppingPlace or over a lane"); + } else if (!stoppingPlace && !lane) { + WRITE_WARNING("A stop requires a stoppingPlace or a lane"); + } else if (stoppingPlace) { + // create stop using stopParameters and stoppingPlace + GNEStop* stop = new GNEStop(stopTagType, viewNet, stopParameters, stoppingPlace, stopParent); + // add it depending of undoDemandElements + if (undoDemandElements) { + viewNet->getUndoList()->p_begin("add " + stop->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_DemandElement(stop, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertDemandElement(stop); + stoppingPlace->addDemandElementChild(stop); + stopParent->addDemandElementChild(stop); + stop->incRef("buildStoppingPlaceStop"); + } + } else { + // create stop using stopParameters and lane + GNEStop* stop = new GNEStop(viewNet, stopParameters, lane, friendlyPosition, stopParent); + // add it depending of undoDemandElements + if (undoDemandElements) { + viewNet->getUndoList()->p_begin("add " + stop->getTagStr()); + viewNet->getUndoList()->add(new GNEChange_DemandElement(stop, true), true); + viewNet->getUndoList()->p_end(); + } else { + viewNet->getNet()->insertDemandElement(stop); + lane->addDemandElementChild(stop); + stopParent->addDemandElementChild(stop); + stop->incRef("buildLaneStop"); + } + } +} + + +void +GNERouteHandler::openVehicleTypeDistribution(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::closeVehicleTypeDistribution() { + // currently unused +} + + +void +GNERouteHandler::openRoute(const SUMOSAXAttributes& attrs) { + myAbort = false; + // parse attribute of routes + myRouteID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_ROUTE, SUMO_ATTR_ID, myAbort); + myEdgeIDs = GNEAttributeCarrier::parseAttributeFromXML(attrs, myRouteID, SUMO_TAG_ROUTE, SUMO_ATTR_EDGES, myAbort); + myRouteColor = GNEAttributeCarrier::parseAttributeFromXML(attrs, myRouteID, SUMO_TAG_ROUTE, SUMO_ATTR_COLOR, myAbort); + +} + + +void +GNERouteHandler::openTrip(const SUMOSAXAttributes& attrs) { + myAbort = false; + // parse attributes of Trips + myFromID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_TRIP, SUMO_ATTR_FROM, myAbort); + myToID = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_TRIP, SUMO_ATTR_TO, myAbort); + // attribute VIA is optional + if (attrs.hasAttribute(SUMO_ATTR_VIA)) { + myViaIDs = GNEAttributeCarrier::parseAttributeFromXML(attrs, "", SUMO_TAG_TRIP, SUMO_ATTR_VIA, myAbort); + } else { + myViaIDs.clear(); + } +} + + +void +GNERouteHandler::closeRoute(const bool /* mayBeDisconnected */) { + // obtain edges (And show warnings if isn't valid) + std::vector edges; + if (GNEAttributeCarrier::canParse >(myViewNet->getNet(), myEdgeIDs, true)) { + edges = GNEAttributeCarrier::parse >(myViewNet->getNet(), myEdgeIDs); + } + // check that all elements are valid + if (myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, myRouteID, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_ROUTE) + " with the same ID='" + myRouteID + "'."); + } else if (edges.size() == 0) { + WRITE_WARNING("Routes needs at least one edge."); + } else { + // creaste GNERoute + GNERoute* route = new GNERoute(myViewNet, myRouteID, edges, myRouteColor); + if (myUndoDemandElements) { + myViewNet->getUndoList()->p_begin("add " + route->getTagStr()); + myViewNet->getUndoList()->add(new GNEChange_DemandElement(route, true), true); + myViewNet->getUndoList()->p_end(); + } else { + myViewNet->getNet()->insertDemandElement(route); + for (const auto& i : edges) { + i->addDemandElementChild(route); + } + route->incRef("buildRoute"); + } + } +} + + +void +GNERouteHandler::openRouteDistribution(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::closeRouteDistribution() { + // currently unused +} + + +void +GNERouteHandler::closeVehicle() { + // build vehicle + buildVehicle(myViewNet, myUndoDemandElements, myVehicleParameter); +} + + +void +GNERouteHandler::closeVType() { + // first check that VType was sucesfully created + if (myCurrentVType) { + // first check if loaded VType is a default vtype + if ((myCurrentVType->id == DEFAULT_VTYPE_ID) || (myCurrentVType->id == DEFAULT_PEDTYPE_ID) || (myCurrentVType->id == DEFAULT_BIKETYPE_ID)) { + // overwrite default vehicle type + GNEVehicleType::overwriteVType(myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, myCurrentVType->id, false), myCurrentVType, myViewNet->getUndoList()); + } else if (myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, myCurrentVType->id, false) != nullptr) { + WRITE_WARNING("There is another " + toString(SUMO_TAG_VTYPE) + " with the same ID='" + myCurrentVType->id + "'."); + } else { + // create VType using myCurrentVType + GNEVehicleType* vType = new GNEVehicleType(myViewNet, *myCurrentVType); + if (myUndoDemandElements) { + myViewNet->getUndoList()->p_begin("add " + vType->getTagStr()); + myViewNet->getUndoList()->add(new GNEChange_DemandElement(vType, true), true); + myViewNet->getUndoList()->p_end(); + } else { + myViewNet->getNet()->insertDemandElement(vType); + vType->incRef("buildVType"); + } + } + } +} + + +void +GNERouteHandler::closePerson() { + // currently unused +} + +void +GNERouteHandler::closePersonFlow() { + // currently unused +} + +void +GNERouteHandler::closeContainer() { + // currently unused +} + + +void +GNERouteHandler::closeFlow() { + // build flow + buildFlow(myViewNet, myUndoDemandElements, myVehicleParameter); +} + + +void +GNERouteHandler::closeTrip() { + // force reroute + myVehicleParameter->parametersSet |= VEHPARS_FORCE_REROUTE; + // obtain from and to edges + GNEEdge* from = myViewNet->getNet()->retrieveEdge(myFromID, false); + GNEEdge* to = myViewNet->getNet()->retrieveEdge(myToID, false); + // check if edges are valid + if (from == nullptr) { + WRITE_WARNING("Invalid 'from' edge used in trip '" + myVehicleParameter->vtypeid + "'."); + } else if (to == nullptr) { + WRITE_WARNING("Invalid 'to' edge used in trip '" + myVehicleParameter->vtypeid + "'."); + } else if (!GNEAttributeCarrier::canParse >(myViewNet->getNet(), myEdgeIDs, false)) { + WRITE_WARNING("Invalid 'via' edges used in trip '" + myVehicleParameter->vtypeid + "'."); + } else { + // obtain via + std::vector via = GNEAttributeCarrier::parse >(myViewNet->getNet(), myEdgeIDs); + // build edges (from - via - to) + std::vector edges; + edges.push_back(from); + for (const auto& i : via) { + edges.push_back(i); + } + // check that from and to edge are different + if (from != to) { + edges.push_back(to); + } + // build trips + buildTrip(myViewNet, true, myVehicleParameter, edges); + } +} + + +void +GNERouteHandler::addStop(const SUMOSAXAttributes& attrs) { + std::string errorSuffix; + if (myVehicleParameter != nullptr) { + errorSuffix = " in vehicle '" + myVehicleParameter->id + "'."; + } else { + errorSuffix = " in route '" + myActiveRouteID + "'."; + } + SUMOVehicleParameter::Stop stop; + bool ok = parseStop(stop, attrs, errorSuffix, MsgHandler::getErrorInstance()); + if (!ok) { + return; + } + // try to parse the assigned bus stop + if (stop.busstop != "") { + // ok, we have a bus stop + GNEBusStop* bs = dynamic_cast(myViewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, stop.busstop, false)); + if (bs == nullptr) { + WRITE_ERROR("The busStop '" + stop.busstop + "' is not known" + errorSuffix); + return; + } + // obtain lane + stop.lane = bs->getAttribute(SUMO_ATTR_LANE); + } //try to parse the assigned container stop + else if (stop.containerstop != "") { + // ok, we have obviously a container stop + GNEAdditional* cs = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_CONTAINER_STOP, stop.busstop, false); + if (cs == nullptr) { + WRITE_ERROR("The containerStop '" + stop.containerstop + "' is not known" + errorSuffix); + return; + } + stop.lane = cs->getAttribute(SUMO_ATTR_LANE); + } //try to parse the assigned parking area + else if (stop.parkingarea != "") { + // ok, we have obviously a parking area + GNEAdditional* pa = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, stop.busstop, false); + if (pa == nullptr) { + WRITE_ERROR("The parkingArea '" + stop.parkingarea + "' is not known" + errorSuffix); + return; + } + stop.lane = pa->getAttribute(SUMO_ATTR_LANE); + } else if (stop.chargingStation != "") { + // ok, we have a charging station + GNEAdditional* cs = myViewNet->getNet()->retrieveAdditional(SUMO_TAG_CHARGING_STATION, stop.busstop, false); + if (cs == nullptr) { + WRITE_ERROR("The chargingStation '" + stop.chargingStation + "' is not known" + errorSuffix); + return; + } + stop.lane = cs->getAttribute(SUMO_ATTR_LANE); + } else { + // no, the lane and the position should be given + // get the lane + stop.lane = attrs.getOpt(SUMO_ATTR_LANE, nullptr, ok, ""); + GNELane* lane = myViewNet->getNet()->retrieveLane(stop.lane, false); + // check if lane is valid + if (ok && stop.lane != "") { + if (lane == nullptr) { + WRITE_ERROR("The lane '" + stop.lane + "' for a stop is not known" + errorSuffix); + return; + } + } else { + WRITE_ERROR("A stop must be placed on a busStop, a chargingStation, a containerStop a parkingArea or a lane" + errorSuffix); + return; + } + // calculate start and end position + stop.endPos = attrs.getOpt(SUMO_ATTR_ENDPOS, nullptr, ok, lane->getLaneParametricLength()); + if (attrs.hasAttribute(SUMO_ATTR_POSITION)) { + WRITE_WARNING("Deprecated attribute 'pos' in description of stop" + errorSuffix); + stop.endPos = attrs.getOpt(SUMO_ATTR_POSITION, nullptr, ok, stop.endPos); + } + stop.startPos = attrs.getOpt(SUMO_ATTR_STARTPOS, nullptr, ok, MAX2(0., stop.endPos - 2 * POSITION_EPS)); + const bool friendlyPos = attrs.getOpt(SUMO_ATTR_FRIENDLY_POS, nullptr, ok, false); + if (!ok || !checkStopPos(stop.startPos, stop.endPos, lane->getLaneParametricLength(), POSITION_EPS, friendlyPos)) { + WRITE_ERROR("Invalid start or end position for stop on lane '" + stop.lane + "'" + errorSuffix); + return; + } + } + if (myVehicleParameter != nullptr) { + myVehicleParameter->stops.push_back(stop); + } else { + myActiveRouteStops.push_back(stop); + } +} + + +void +GNERouteHandler::addPersonTrip(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::addWalk(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::addPerson(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::addContainer(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::addRide(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::addTransport(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + + +void +GNERouteHandler::addTranship(const SUMOSAXAttributes& /*attrs*/) { + // currently unused +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERouteHandler.h sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERouteHandler.h --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNERouteHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNERouteHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,170 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERouteHandler.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// Builds demand objects for netedit +/****************************************************************************/ +#ifndef GNERouteHandler_h +#define GNERouteHandler_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEViewNet; +class GNEEdge; +class GNETAZ; +class GNEDemandElement; + +// =========================================================================== +// class definitions +// =========================================================================== + +/// @class GNERouteHandler +/// @brief Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..) +class GNERouteHandler : public SUMORouteHandler { +public: + /// @brief Constructor + GNERouteHandler(const std::string& file, GNEViewNet* viewNet, bool undoDemandElements = true); + + /// @brief Destructor + ~GNERouteHandler(); + + /// @brief build vehicle + static void buildVehicle(GNEViewNet* viewNet, bool undoDemandElements, SUMOVehicleParameter* vehicleParameters); + + /// @brief build flow + static void buildFlow(GNEViewNet* viewNet, bool undoDemandElements, SUMOVehicleParameter* flowParameters); + + /// @brief build trip + static void buildTrip(GNEViewNet* viewNet, bool undoDemandElements, SUMOVehicleParameter* tripParameters, const std::vector& edges); + + /// @brief build stop + static void buildStop(GNEViewNet* viewNet, bool undoDemandElements, const SUMOVehicleParameter::Stop& stopParameters, GNEDemandElement* stopParent, bool friendlyPosition); + +protected: + /// @brief opens a type distribution for reading + void openVehicleTypeDistribution(const SUMOSAXAttributes& attrs); + + /// @brief closes (ends) the building of a distribution + void closeVehicleTypeDistribution(); + + /// @brief opens a route for reading + void openRoute(const SUMOSAXAttributes& attrs); + + /// @brief opens a trip for reading + void openTrip(const SUMOSAXAttributes& attrs); + + /**closes (ends) the building of a route. + * Afterwards no edges may be added to it; + * this method may throw exceptions when + * a) the route is empty or + * b) another route with the same id already exists + */ + void closeRoute(const bool mayBeDisconnected = false); + + /// @brief opens a route distribution for reading + void openRouteDistribution(const SUMOSAXAttributes& attrs); + + /// @brief closes (ends) the building of a distribution + void closeRouteDistribution(); + + /// @brief Ends the processing of a vehicle + void closeVehicle(); + + /// @brief Ends the processing of a vehicle Type + void closeVType(); + + /// @brief Ends the processing of a person + void closePerson(); + + /// @brief Ends the processing of a personFlow + void closePersonFlow(); + + /// @brief Ends the processing of a container + void closeContainer(); + + /// @brief Ends the processing of a flow + void closeFlow(); + + /// @brief Ends the processing of a trip + void closeTrip(); + + /// @brief Processing of a stop + void addStop(const SUMOSAXAttributes& attrs); + + /// @brief add a routing request for a walking or intermodal person + void addPersonTrip(const SUMOSAXAttributes& attrs); + + /// @brief add a fully specified walk + void addWalk(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a person + void addPerson(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a container + void addContainer(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a ride + void addRide(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a transport + void addTransport(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a tranship + void addTranship(const SUMOSAXAttributes& attrs); + +private: + /// @brief flag used for parsing route attribute + bool myAbort; + + /// @brief string for saving parsed Route ID + std::string myRouteID; + + /// @brief string for saving parsed edges + std::string myEdgeIDs; + + /// @brief string for saving parsed route colors + RGBColor myRouteColor; + + /// @brief string for saving parsed from edge ID + std::string myFromID; + + /// @brief string for saving parsed to edge ID + std::string myToID; + + /// @brief string for saving parsed via edges IDs + std::string myViaIDs; + + /// @brief pointer to View's Net + GNEViewNet* myViewNet; + + /// @brief flag to check if created demand elements must be undo and redo + bool myUndoDemandElements; +}; + + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEStop.cpp sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEStop.cpp --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEStop.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEStop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,723 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEStop.cpp +/// @author Pablo Alvarez Lopez +/// @date March 2019 +/// @version $Id$ +/// +// Representation of Stops in NETEDIT +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEStop.h" + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEStop::GNEStop(SumoXMLTag tag, GNEViewNet* viewNet, const SUMOVehicleParameter::Stop& stopParameter, GNEAdditional* stoppingPlace, GNEDemandElement* stopParent) : + GNEDemandElement(stopParent, viewNet, GLO_STOP, tag, {}, {}, {}, {stoppingPlace}, {stopParent}, {}, {}, {}, {}, {}), + SUMOVehicleParameter::Stop(stopParameter), +myFriendlyPosition(false) { +} + + +GNEStop::GNEStop(GNEViewNet* viewNet, const SUMOVehicleParameter::Stop& stopParameter, GNELane* lane, bool friendlyPosition, GNEDemandElement* stopParent) : + GNEDemandElement(stopParent, viewNet, GLO_STOP, SUMO_TAG_STOP_LANE, {}, {lane}, {}, {}, {stopParent}, {}, {}, {}, {}, {}), +SUMOVehicleParameter::Stop(stopParameter), +myFriendlyPosition(friendlyPosition) { +} + + +GNEStop::~GNEStop() {} + + +std::string +GNEStop::getBegin() const { + return ""; +} + + +const RGBColor& +GNEStop::getColor() const { + return RGBColor::BLACK; +} + + +void +GNEStop::writeDemandElement(OutputDevice& device) const { + write(device); +} + + +void +GNEStop::moveGeometry(const Position& offset) { + // only move if at leats start or end positions is defined + if ((getLaneParents().size() > 0) && ((parametersSet & STOP_START_SET) || (parametersSet & STOP_END_SET))) { + // Calculate new position using old position + Position newPosition = myMove.originalViewPosition; + newPosition.add(offset); + // filtern position using snap to active grid + newPosition = myViewNet->snapToActiveGrid(newPosition); + double offsetLane = getLaneParents().front()->getShape().nearest_offset_to_point2D(newPosition, false) - getLaneParents().front()->getShape().nearest_offset_to_point2D(myMove.originalViewPosition, false); + // check if both position has to be moved + if ((parametersSet & STOP_START_SET) && (parametersSet & STOP_END_SET)) { + // calculate stoppingPlace lenght and lane lenght (After apply geometry factor) + double stoppingPlaceLenght = fabs(parse(myMove.secondOriginalPosition) - parse(myMove.firstOriginalLanePosition)); + double laneLengt = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength() * getLaneParents().front()->getLengthGeometryFactor(); + // avoid changing stopping place's lenght + if ((parse(myMove.firstOriginalLanePosition) + offsetLane) < 0) { + startPos = 0; + endPos = stoppingPlaceLenght; + std::cout << "A" << std::endl; + } else if ((parse(myMove.secondOriginalPosition) + offsetLane) > laneLengt) { + startPos = laneLengt - stoppingPlaceLenght; + endPos = laneLengt; + std::cout << "B" << std::endl; + } else { + startPos = parse(myMove.firstOriginalLanePosition) + offsetLane; + endPos = parse(myMove.secondOriginalPosition) + offsetLane; + std::cout << toString(offsetLane) << " | " << toString(startPos) << " " << toString(endPos) << std::endl; + } + } else { + // check if start position must be moved + if ((parametersSet & STOP_START_SET)) { + startPos = parse(myMove.firstOriginalLanePosition) + offsetLane; + } + // check if start position must be moved + if ((parametersSet & STOP_END_SET)) { + endPos = parse(myMove.secondOriginalPosition) + offsetLane; + } + } + // Update geometry + updateGeometry(false); + } +} + + +void +GNEStop::commitGeometryMoving(GNEUndoList* undoList) { + // only commit geometry moving if at leats start or end positions is defined + if ((getLaneParents().size() > 0) && ((parametersSet & STOP_START_SET) || (parametersSet & STOP_END_SET))) { + undoList->p_begin("position of " + getTagStr()); + if (parametersSet & STOP_START_SET) { + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_STARTPOS, toString(startPos), true, myMove.firstOriginalLanePosition)); + } + if (parametersSet & STOP_END_SET) { + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), SUMO_ATTR_ENDPOS, toString(endPos), true, myMove.secondOriginalPosition)); + } + undoList->p_end(); + } +} + + +void +GNEStop::updateGeometry(bool updateGrid) { + // first check if object has to be removed from grid (SUMOTree) + if (updateGrid) { + myViewNet->getNet()->removeGLObjectFromGrid(this); + } + // Clear all containers + myGeometry.clearGeometry(); + //only update Stops over lanes, because other uses the geometry of stopping place parent + if (getLaneParents().size() > 0) { + // Cut shape using as delimitators fixed start position and fixed end position + myGeometry.shape = getLaneParents().front()->getShape().getSubpart(getStartGeometryPositionOverLane(), getEndGeometryPositionOverLane()); + // Get calculate lenghts and rotations + myGeometry.calculateShapeRotationsAndLengths(); + } else if (getAdditionalParents().size() > 0) { + // copy geometry of additional + myGeometry.shape = getAdditionalParents().at(0)->getAdditionalGeometry().shape; + myGeometry.shapeLengths = getAdditionalParents().at(0)->getAdditionalGeometry().shapeLengths; + myGeometry.shapeRotations = getAdditionalParents().at(0)->getAdditionalGeometry().shapeRotations; + } + // last step is to check if object has to be added into grid (SUMOTree) again + if (updateGrid) { + myViewNet->getNet()->addGLObjectIntoGrid(this); + } +} + + +Position +GNEStop::getPositionInView() const { + if (getLaneParents().size() > 0) { + // calculate start and end positions as absolute values + double start = fabs(parametersSet & STOP_START_SET ? startPos : 0); + double end = fabs(parametersSet & STOP_END_SET ? endPos : getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength()); + // obtain position in view depending if both positions are defined + if (!(parametersSet & STOP_START_SET) && !(parametersSet & STOP_END_SET)) { + return getLaneParents().front()->getShape().positionAtOffset(getLaneParents().front()->getShape().length() / 2); + } else if (!(parametersSet & STOP_START_SET)) { + return getLaneParents().front()->getShape().positionAtOffset(end); + } else if (!(parametersSet & STOP_END_SET)) { + return getLaneParents().front()->getShape().positionAtOffset(start); + } else { + return getLaneParents().front()->getShape().positionAtOffset((start + end) / 2.0); + } + } else if (getDemandElementParents().size() > 0) { + return getDemandElementParents().front()->getPositionInView(); + } else { + throw ProcessError("Invalid Stop parent"); + } +} + + +std::string +GNEStop::getParentName() const { + if (getDemandElementParents().size() > 0) { + return getDemandElementParents().front()->getID(); + } else if (getAdditionalParents().size() > 0) { + return getAdditionalParents().front()->getID(); + } else if (getLaneParents().size() > 0) { + return getLaneParents().front()->getID(); + } else { + throw ProcessError("Invalid parent"); + } +} + + +void +GNEStop::drawGL(const GUIVisualizationSettings& s) const { + // only drawn in super mode demand + if (myViewNet->getViewOptions().showDemandElements()) { + // Obtain exaggeration of the draw + const double exaggeration = s.addSize.getExaggeration(s, this); + // Start drawing adding an gl identificator + glPushName(getGlID()); + // Add a draw matrix + glPushMatrix(); + // Start with the drawing of the area traslating matrix to origin + glTranslated(0, 0, getType()); + // Set color of the base + if (drawUsingSelectColor()) { + GLHelper::setColor(s.selectedAdditionalColor); + } else { + GLHelper::setColor(s.SUMO_color_stops); + } + // draw lines depending if it's placed over a lane or over a stoppingPlace + if (getLaneParents().size() > 0) { + // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration + GLHelper::drawBoxLines(myGeometry.shape, myGeometry.shapeRotations, myGeometry.shapeLengths, exaggeration * 0.1, 0, + getLaneParents().front()->getParentEdge().getNBEdge()->getLaneWidth(getLaneParents().front()->getIndex()) * 0.5); + GLHelper::drawBoxLines(myGeometry.shape, myGeometry.shapeRotations, myGeometry.shapeLengths, exaggeration * 0.1, 0, + getLaneParents().front()->getParentEdge().getNBEdge()->getLaneWidth(getLaneParents().front()->getIndex()) * -0.5); + } else { + // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration + GLHelper::drawBoxLines(myGeometry.shape, myGeometry.shapeRotations, myGeometry.shapeLengths, exaggeration * 0.1, 0, exaggeration * -1); + GLHelper::drawBoxLines(myGeometry.shape, myGeometry.shapeRotations, myGeometry.shapeLengths, exaggeration * 0.1, 0, exaggeration); + } + // pop draw matrix + glPopMatrix(); + // Add a draw matrix + glPushMatrix(); + // move to geometry front + glTranslated(myGeometry.shape.back().x(), myGeometry.shape.back().y(), getType()); + glRotated(myGeometry.shapeRotations.back(), 0, 0, 1); + // draw front of Stop depending if it's placed over a lane or over a stoppingPlace + if (getLaneParents().size() > 0) { + // draw front of Stop + GLHelper::drawBoxLine(Position(0, 0), 0, exaggeration * 0.5, + getLaneParents().front()->getParentEdge().getNBEdge()->getLaneWidth(getLaneParents().front()->getIndex()) * 0.5); + } else { + // draw front of Stop + GLHelper::drawBoxLine(Position(0, 0), 0, exaggeration * 0.5, exaggeration); + } + // move to "S" position + glTranslated(0, 1, 0); + // draw "S" symbol + GLHelper::drawText("S", Position(), .1, 2.8, s.SUMO_color_stops); + // move to subtitle positin + glTranslated(0, 1.4, 0); + // draw subtitle depending of tag + if (myTagProperty.getTag() == SUMO_TAG_STOP_BUSSTOP) { + GLHelper::drawText("busStop", Position(), .1, .5, s.SUMO_color_stops, 180); + } else if (myTagProperty.getTag() == SUMO_TAG_STOP_CONTAINERSTOP) { + GLHelper::drawText("container", Position(), .1, .5, s.SUMO_color_stops, 180); + glTranslated(0, 0.5, 0); + GLHelper::drawText("Stop", Position(), .1, .5, s.SUMO_color_stops, 180); + } else if (myTagProperty.getTag() == SUMO_TAG_STOP_CHARGINGSTATION) { + GLHelper::drawText("charging", Position(), .1, .5, s.SUMO_color_stops, 180); + glTranslated(0, 0.5, 0); + GLHelper::drawText("Station", Position(), .1, .5, s.SUMO_color_stops, 180); + } else if (myTagProperty.getTag() == SUMO_TAG_STOP_PARKINGAREA) { + GLHelper::drawText("parking", Position(), .1, .5, s.SUMO_color_stops, 180); + glTranslated(0, 0.5, 0); + GLHelper::drawText("Area", Position(), .1, .5, s.SUMO_color_stops, 180); + } else if (myTagProperty.getTag() == SUMO_TAG_STOP_LANE) { + GLHelper::drawText("lane", Position(), .1, 1, s.SUMO_color_stops, 180); + } + // pop draw matrix + glPopMatrix(); + // Draw name if isn't being drawn for selecting + drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); + // check if dotted contour has to be drawn + if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { + // draw dooted contour depending if it's placed over a lane or over a stoppingPlace + if (getLaneParents().size() > 0) { + GLHelper::drawShapeDottedContour(getType(), myGeometry.shape, getLaneParents().front()->getParentEdge().getNBEdge()->getLaneWidth(getLaneParents().front()->getIndex()) * 0.5); + } else { + GLHelper::drawShapeDottedContour(getType(), myGeometry.shape, exaggeration); + } + } + // Pop name + glPopName(); + } +} + + +void +GNEStop::selectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.select(dynamic_cast(this)->getGlID()); + // add object of list into selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->addedLockedObject(GLO_VEHICLE); + if (changeFlag) { + mySelected = true; + } + } +} + + +void +GNEStop::unselectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.deselect(dynamic_cast(this)->getGlID()); + // remove object of list of selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->removeLockedObject(GLO_VEHICLE); + if (changeFlag) { + mySelected = false; + + } + } +} + + +std::string +GNEStop::getAttribute(SumoXMLAttr key) const { + switch (key) { + case SUMO_ATTR_ID: + return getDemandElementID(); + case SUMO_ATTR_DURATION: + return time2string(duration); + case SUMO_ATTR_UNTIL: + return time2string(until); + case SUMO_ATTR_INDEX: + if (index == STOP_INDEX_END) { + return "end"; + } else if (index == STOP_INDEX_FIT) { + return "fit"; + } else { + return toString(index); + } + case SUMO_ATTR_TRIGGERED: + if (parametersSet & STOP_TRIGGER_SET) { + return toString(triggered); + } else { + return ""; + } + case SUMO_ATTR_CONTAINER_TRIGGERED: + if (parametersSet & STOP_CONTAINER_TRIGGER_SET) { + return toString(containerTriggered); + } else { + return ""; + } + case SUMO_ATTR_EXPECTED: + if (parametersSet & STOP_EXPECTED_SET) { + return toString(awaitedPersons); + } else { + return ""; + } + case SUMO_ATTR_EXPECTED_CONTAINERS: + if (parametersSet & STOP_EXPECTED_CONTAINERS_SET) { + return toString(awaitedContainers); + } else { + return ""; + } + case SUMO_ATTR_PARKING: + if (parametersSet & STOP_PARKING_SET) { + return toString(parking); + } else { + return ""; + } + case SUMO_ATTR_ACTTYPE: + return ""; // CHECK + case SUMO_ATTR_TRIP_ID: + if (parametersSet & STOP_TRIP_ID_SET) { + return tripId; + } else { + return ""; + } + // specific of Stops over stoppingPlaces + case SUMO_ATTR_BUS_STOP: + case SUMO_ATTR_CONTAINER_STOP: + case SUMO_ATTR_CHARGING_STATION: + case SUMO_ATTR_PARKING_AREA: + return getAdditionalParents().front()->getID(); + // specific of stops over lanes + case SUMO_ATTR_LANE: + return getLaneParents().front()->getID(); + case SUMO_ATTR_STARTPOS: + if (parametersSet & STOP_START_SET) { + return toString(startPos); + } else { + return ""; + } + case SUMO_ATTR_ENDPOS: + if (parametersSet & STOP_END_SET) { + return toString(endPos); + } else { + return ""; + } + case SUMO_ATTR_FRIENDLY_POS: + return toString(myFriendlyPosition); + // + case GNE_ATTR_SELECTED: + return toString(isAttributeCarrierSelected()); + case GNE_ATTR_GENERIC: + return getGenericParametersStr(); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +void +GNEStop::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { + if (value == getAttribute(key)) { + return; //avoid needless changes, later logic relies on the fact that attributes have changed + } + switch (key) { + case SUMO_ATTR_ID: + case SUMO_ATTR_DURATION: + case SUMO_ATTR_UNTIL: + case SUMO_ATTR_INDEX: + case SUMO_ATTR_TRIGGERED: + case SUMO_ATTR_CONTAINER_TRIGGERED: + case SUMO_ATTR_EXPECTED: + case SUMO_ATTR_EXPECTED_CONTAINERS: + case SUMO_ATTR_PARKING: + case SUMO_ATTR_ACTTYPE: + case SUMO_ATTR_TRIP_ID: + // specific of Stops over stoppingPlaces + case SUMO_ATTR_BUS_STOP: + case SUMO_ATTR_CONTAINER_STOP: + case SUMO_ATTR_CHARGING_STATION: + case SUMO_ATTR_PARKING_AREA: + // specific of stops over lanes + case SUMO_ATTR_LANE: + case SUMO_ATTR_STARTPOS: + case SUMO_ATTR_ENDPOS: + case SUMO_ATTR_FRIENDLY_POS: + // + case GNE_ATTR_GENERIC: + case GNE_ATTR_SELECTED: + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNEStop::isValid(SumoXMLAttr key, const std::string& value) { + // declare string error + std::string error; + switch (key) { + case SUMO_ATTR_ID: + return isValidDemandElementID(value); + case SUMO_ATTR_DURATION: + case SUMO_ATTR_UNTIL: + if (canParse(value)) { + return parse(value) >= 0; + } else { + return false; + } + case SUMO_ATTR_INDEX: + if ((value == "fit") || (value == "end")) { + return true; + } else if (canParse(value)) { + return (parse(value) >= 0); + } else { + return false; + } + case SUMO_ATTR_TRIGGERED: + return canParse(value); + case SUMO_ATTR_CONTAINER_TRIGGERED: + return canParse(value); + case SUMO_ATTR_EXPECTED: + case SUMO_ATTR_EXPECTED_CONTAINERS: + if (value.empty()) { + return true; + } else { + return canParse >(value); + } + case SUMO_ATTR_PARKING: + return canParse(value); + case SUMO_ATTR_ACTTYPE: + return false; // CHECK + case SUMO_ATTR_TRIP_ID: + return SUMOXMLDefinitions::isValidAttribute(value); + // specific of Stops over stoppingPlaces + case SUMO_ATTR_BUS_STOP: + return (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_BUS_STOP, value, false) != nullptr); + case SUMO_ATTR_CONTAINER_STOP: + return (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_CONTAINER_STOP, value, false) != nullptr); + case SUMO_ATTR_CHARGING_STATION: + return (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_CHARGING_STATION, value, false) != nullptr); + case SUMO_ATTR_PARKING_AREA: + return (myViewNet->getNet()->retrieveAdditional(SUMO_TAG_PARKING_AREA, value, false) != nullptr); + // specific of stops over lanes + case SUMO_ATTR_LANE: + if (myViewNet->getNet()->retrieveLane(value, false) != nullptr) { + return true; + } else { + return false; + } + case SUMO_ATTR_STARTPOS: + if (value.empty()) { + return true; + } else if (canParse(value)) { + return GNEStoppingPlace::checkStoppinPlacePosition(value, toString(endPos), getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); + } else { + return false; + } + case SUMO_ATTR_ENDPOS: + if (value.empty()) { + return true; + } else if (canParse(value)) { + return GNEStoppingPlace::checkStoppinPlacePosition(toString(startPos), value, getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(), myFriendlyPosition); + } else { + return false; + } + case SUMO_ATTR_FRIENDLY_POS: + return canParse(value); + // + case GNE_ATTR_SELECTED: + return canParse(value); + case GNE_ATTR_GENERIC: + return isGenericParametersValid(value); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNEStop::isDisjointAttributeSet(const SumoXMLAttr attr) const { + switch (attr) { + case SUMO_ATTR_EXPECTED: + return triggered; + case SUMO_ATTR_EXPECTED_CONTAINERS: + return containerTriggered; + default: + return true; + }; +} + + +std::string +GNEStop::getPopUpID() const { + return getTagStr(); +} + + +std::string +GNEStop::getHierarchyName() const { + if (getAdditionalParents().size() > 0) { + return "stop: " + getAdditionalParents().front()->getTagStr(); + } else { + return "stop: lane"; + } +} + + +double +GNEStop::getStartGeometryPositionOverLane() const { + if (parametersSet & STOP_START_SET) { + double fixedPos = endPos; + const double len = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + if (fixedPos < 0) { + fixedPos += len; + } + return fixedPos * getLaneParents().front()->getLengthGeometryFactor(); + } else { + return 0; + } +} + + +double +GNEStop::getEndGeometryPositionOverLane() const { + if (parametersSet & STOP_END_SET) { + double fixedPos = startPos; + const double len = getLaneParents().front()->getParentEdge().getNBEdge()->getFinalLength(); + if (fixedPos < 0) { + fixedPos += len; + } + return fixedPos * getLaneParents().front()->getLengthGeometryFactor(); + } else { + return 0; + } +} + +// =========================================================================== +// private +// =========================================================================== + +void +GNEStop::setAttribute(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + changeDemandElementID(value); + break; + case SUMO_ATTR_DURATION: + duration = string2time(value); + break; + case SUMO_ATTR_UNTIL: + until = string2time(value); + break; + case SUMO_ATTR_INDEX: + if (value == "fit") { + index = STOP_INDEX_FIT; + } else if (value == "end") { + index = STOP_INDEX_END; + } else { + index = parse(value); + } + break; + case SUMO_ATTR_TRIGGERED: + if (value.empty()) { + parametersSet &= ~STOP_TRIGGER_SET; + } else { + triggered = parse(value); + parametersSet |= STOP_TRIGGER_SET; + } + break; + case SUMO_ATTR_CONTAINER_TRIGGERED: + if (value.empty()) { + parametersSet &= ~STOP_CONTAINER_TRIGGER_SET; + } else { + containerTriggered = parse(value); + parametersSet |= STOP_CONTAINER_TRIGGER_SET; + } + break; + case SUMO_ATTR_EXPECTED: + if (value.empty()) { + parametersSet &= ~STOP_EXPECTED_SET; + } else { + awaitedPersons = parse >(value); + parametersSet |= STOP_EXPECTED_SET; + } + break; + case SUMO_ATTR_EXPECTED_CONTAINERS: + if (value.empty()) { + parametersSet &= ~STOP_EXPECTED_CONTAINERS_SET; + } else { + awaitedContainers = parse >(value); + parametersSet |= STOP_EXPECTED_CONTAINERS_SET; + } + break; + case SUMO_ATTR_PARKING: + if (value.empty()) { + parametersSet &= ~STOP_PARKING_SET; + } else { + parking = parse(value); + parametersSet |= STOP_PARKING_SET; + } + break; + case SUMO_ATTR_ACTTYPE: + // CHECK + break; + case SUMO_ATTR_TRIP_ID: + if (value.empty()) { + parametersSet &= ~STOP_TRIP_ID_SET; + } else { + tripId = value; + parametersSet |= STOP_TRIP_ID_SET; + } + break; + // specific of Stops over stoppingPlaces + case SUMO_ATTR_BUS_STOP: + case SUMO_ATTR_CONTAINER_STOP: + case SUMO_ATTR_CHARGING_STATION: + case SUMO_ATTR_PARKING_AREA: + changeAdditionalParent(this, value, 0); + break; + // specific of Stops over lanes + case SUMO_ATTR_LANE: + changeLaneParents(this, value); + break; + case SUMO_ATTR_STARTPOS: + if (value.empty()) { + parametersSet &= ~STOP_START_SET; + } else { + startPos = parse(value); + parametersSet |= STOP_START_SET; + } + break; + case SUMO_ATTR_ENDPOS: + if (value.empty()) { + parametersSet &= ~STOP_END_SET; + } else { + endPos = parse(value); + parametersSet |= STOP_END_SET; + } + break; + case SUMO_ATTR_FRIENDLY_POS: + myFriendlyPosition = parse(value); + break; + // + case GNE_ATTR_SELECTED: + if (parse(value)) { + selectAttributeCarrier(); + } else { + unselectAttributeCarrier(); + } + break; + case GNE_ATTR_GENERIC: + setGenericParametersStr(value); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEStop.h sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEStop.h --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEStop.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEStop.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,158 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEStop.h +/// @author Pablo Alvarez Lopez +/// @date March 2019 +/// @version $Id$ +/// +// Representation of Stops in NETEDIT +/****************************************************************************/ +#ifndef GNEStop_h +#define GNEStop_h + + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include "GNEDemandElement.h" + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEStop + */ +class GNEStop : public GNEDemandElement, public SUMOVehicleParameter::Stop { + +public: + /// @brief constructor used for stops over stoppingPlaces + GNEStop(SumoXMLTag tag, GNEViewNet* viewNet, const SUMOVehicleParameter::Stop& stopParameter, GNEAdditional* stoppingPlace, GNEDemandElement* stopParent); + + /// @brief constructor used for stops over lanes + GNEStop(GNEViewNet* viewNet, const SUMOVehicleParameter::Stop& stopParameter, GNELane* lane, bool friendlyPosition, GNEDemandElement* stopParent); + + /// @brief destructor + ~GNEStop(); + + /**@brief get begin time of demand element + * @note: used by demand elements of type "Vehicle", and it has to be implemented as childs + * @throw invalid argument if demand element doesn't has a begin time + */ + std::string getBegin() const; + + /// @brief get color + const RGBColor& getColor() const; + + /**@brief writte demand element element into a xml file + * @param[in] device device in which write parameters of demand element element + */ + void writeDemandElement(OutputDevice& device) const; + + /// @name Functions related with geometry of element + /// @{ + /**@brief change the position of the element geometry without saving in undoList + * @param[in] offset Position used for calculate new position of geometry without updating RTree + */ + void moveGeometry(const Position& offset); + + /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) + * @param[in] undoList The undoList on which to register changes + */ + void commitGeometryMoving(GNEUndoList* undoList); + + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + + /// @brief Returns position of demand element in view + Position getPositionInView() const; + /// @} + + /// @name inherited from GUIGlObject + /// @{ + /**@brief Returns the name of the parent object + * @return This object's parent id + */ + std::string getParentName() 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 inherited from GNEAttributeCarrier + /// @{ + /// @brief select attribute carrier using GUIGlobalSelection + void selectAttributeCarrier(bool changeFlag = true); + + /// @brief unselect attribute carrier using GUIGlobalSelection + void unselectAttributeCarrier(bool changeFlag = true); + + /* @brief method for getting the Attribute of an XML key + * @param[in] key The attribute key + * @return string with the value associated to key + */ + std::string getAttribute(SumoXMLAttr key) const; + + /* @brief method for setting the attribute and letting the object perform demand element changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + * @param[in] net optionally the GNENet to inform about gui updates + */ + void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); + + /* @brief method for setting the attribute and letting the object perform demand element changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + */ + bool isValid(SumoXMLAttr key, const std::string& value); + + /* @brief method for check if certain attribute is set (used by ACs with disjoint attributes) + * @param[in] key The attribute key + * @return true if it's set, false in other case + */ + bool isDisjointAttributeSet(const SumoXMLAttr attr) const; + + /// @brief get PopPup ID (Used in AC Hierarchy) + std::string getPopUpID() const; + + /// @brief get Hierarchy Name (Used in AC Hierarchy) + std::string getHierarchyName() const; + /// @} + + /// @brief get start position over lane that is applicable to the shape + double getStartGeometryPositionOverLane() const; + + /// @brief get end position over lane that is applicable to the shape + double getEndGeometryPositionOverLane() const; + +protected: + /// @brief Flag for friendly position + bool myFriendlyPosition; + +private: + /// @brief method for setting the attribute and nothing else + void setAttribute(SumoXMLAttr key, const std::string& value); + + /// @brief Invalidated copy constructor. + GNEStop(const GNEStop&) = delete; + + /// @brief Invalidated assignment operator + GNEStop& operator=(const GNEStop&) = delete; +}; + +#endif +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicle.cpp sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicle.cpp --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicle.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,1061 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicle.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// Representation of vehicles in NETEDIT +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEVehicle.h" + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEVehicle::GNEVehicle(SumoXMLTag tag, GNEViewNet* viewNet, const std::string& vehicleID, GNEDemandElement* vehicleType, GNEDemandElement* route) : + GNEDemandElement(vehicleID, viewNet, (tag == SUMO_TAG_FLOW) ? GLO_FLOW : GLO_VEHICLE, tag, +{}, {}, {}, {}, {vehicleType, route}, {}, {}, {}, {}, {}), +SUMOVehicleParameter() { + // SUMOVehicleParameter ID has to be set manually + id = vehicleID; + // set manually vtypeID (needed for saving) + vtypeid = vehicleType->getID(); +} + + +GNEVehicle::GNEVehicle(SumoXMLTag tag, GNEViewNet* viewNet, const SUMOVehicleParameter& vehicleParameter, GNEDemandElement* vehicleType, GNEDemandElement* route) : + GNEDemandElement(vehicleParameter.id, viewNet, (tag == SUMO_TAG_FLOW) ? GLO_FLOW : GLO_VEHICLE, tag, +{}, {}, {}, {}, {vehicleType, route}, {}, {}, {}, {}, {}), +SUMOVehicleParameter(vehicleParameter) { + // SUMOVehicleParameter ID has to be set manually + id = vehicleParameter.id; + // set manually vtypeID (needed for saving) + vtypeid = vehicleType->getID(); +} + + +GNEVehicle::GNEVehicle(GNEViewNet* viewNet, const std::string& tripID, GNEDemandElement* vehicleType, const std::vector& edges) : + GNEDemandElement(tripID, viewNet, GLO_TRIP, SUMO_TAG_TRIP, { + edges +}, {}, {}, {}, {vehicleType}, {}, {}, {}, {}, {}), +SUMOVehicleParameter() { +} + + +GNEVehicle::GNEVehicle(GNEViewNet* viewNet, const SUMOVehicleParameter& tripParameter, GNEDemandElement* vehicleType, const std::vector& edges) : + GNEDemandElement(tripParameter.id, viewNet, GLO_TRIP, SUMO_TAG_TRIP, { + edges +}, {}, {}, {}, {vehicleType}, {}, {}, {}, {}, {}), +SUMOVehicleParameter(tripParameter) { +} + + +GNEVehicle::~GNEVehicle() {} + + +std::string +GNEVehicle::getBegin() const { + // obtain depart depending if is a Vehicle, trip or flow + std::string departStr; + if (myTagProperty.getTag() == SUMO_TAG_FLOW) { + departStr = toString(depart); + } else { + departStr = getDepart(); + } + // we need to handle depart as a tuple of 20 numbers (format: 000000...00) + departStr.reserve(20 - departStr.size()); + // add 0s at the beginning of departStr until we have 20 numbers + for (int i = (int)departStr.size(); i < 20; i++) { + departStr.insert(departStr.begin(), '0'); + } + return departStr; +} + + +const RGBColor& +GNEVehicle::getColor() const { + return color; +} + + +void +GNEVehicle::writeDemandElement(OutputDevice& device) const { + write(device, OptionsCont::getOptions(), myTagProperty.getTag()); + // write specific attribute depeding of vehicle type + if (myTagProperty.getTag() == SUMO_TAG_VEHICLE) { + // write manually route + device.writeAttr(SUMO_ATTR_ROUTE, getDemandElementParents().at(1)->getID()); + } else if (myTagProperty.getTag() == SUMO_TAG_FLOW) { + // write flow values depending if it was set + if (isDisjointAttributeSet(SUMO_ATTR_END)) { + device.writeAttr(SUMO_ATTR_END, time2string(repetitionEnd)); + } + if (isDisjointAttributeSet(SUMO_ATTR_NUMBER)) { + device.writeAttr(SUMO_ATTR_NUMBER, repetitionNumber); + } + if (isDisjointAttributeSet(SUMO_ATTR_VEHSPERHOUR)) { + device.writeAttr(SUMO_ATTR_VEHSPERHOUR, 3600. / STEPS2TIME(repetitionOffset)); + } + if (isDisjointAttributeSet(SUMO_ATTR_PERIOD)) { + device.writeAttr(SUMO_ATTR_PERIOD, time2string(repetitionOffset)); + } + if (isDisjointAttributeSet(SUMO_ATTR_PROB)) { + device.writeAttr(SUMO_ATTR_PROB, repetitionProbability); + } + } else if (myTagProperty.getTag() == SUMO_TAG_TRIP) { + // write manually from/to edges (it correspond to fron and back edge parents) + device.writeAttr(SUMO_ATTR_FROM, getEdgeParents().front()->getID()); + device.writeAttr(SUMO_ATTR_TO, getEdgeParents().back()->getID()); + // write via only if there is more than two edges + if (getEdgeParents().size() > 2) { + std::vector viaEdges; + for (int i = 1; i < (int)getEdgeParents().size() - 1; i++) { + viaEdges.push_back(getEdgeParents().at(i)); + } + device.writeAttr(SUMO_ATTR_VIA, toString(viaEdges)); + } + } else { + throw ProcessError("Invalid vehicle tag"); + } + // write stops associated to this vehicle + for (const auto& i : getDemandElementChilds()) { + i->writeDemandElement(device); + } + // close vehicle tag + device.closeTag(); +} + + +void +GNEVehicle::moveGeometry(const Position&) { + // This demand element cannot be moved +} + + +void +GNEVehicle::commitGeometryMoving(GNEUndoList*) { + // This demand element cannot be moved +} + + +void +GNEVehicle::updateGeometry(bool updateGrid) { + // first check if object has to be removed from grid (SUMOTree) + if (updateGrid) { + myViewNet->getNet()->removeGLObjectFromGrid(this); + } + + // obtain lenght + const double length = parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_LENGTH)) ; + + // Clear geometry container + myGeometry.clearGeometry(); + + // get lanes of edge + GNELane* vehicleLane; + // check if vehicle is defined over a route + if (getDemandElementParents().size() == 2) { + vehicleLane = getDemandElementParents().at(1)->getEdgeParents().at(0)->getLanes().at(0); + } else if (getEdgeParents().size() > 0) { + vehicleLane = getEdgeParents().front()->getLanes().at(0); + } else { + throw ProcessError("Invalid vehicle tag"); + } + + // Get shape of lane parent + double offset = vehicleLane->getShape().length() < length ? vehicleLane->getShape().length() : length; + myGeometry.shape.push_back(vehicleLane->getShape().positionAtOffset(offset)); + + // Save rotation (angle) + myGeometry.shapeRotations.push_back(vehicleLane->getShape().rotationDegreeAtOffset(offset) * -1); + + // calculate route for trip (Only in Demand mode) + if ((myTagProperty.getTag() == SUMO_TAG_TRIP) && (myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND)) { + // update temporal route + myTemporalRoute = getRouteCalculatorInstance()->calculateDijkstraRoute(parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_VCLASS)), getEdgeParents()); + + if (myTemporalRoute.size() > 1) { + // declare a vector of shapes + std::vector multiShape; + + // start with the first lane shape + multiShape.push_back(myTemporalRoute.front()->getLanes().front().shape); + + // add first shape connection (if exist, in other case leave it empty) + multiShape.push_back(PositionVector{myTemporalRoute.at(0)->getLanes().front().shape.back(), myTemporalRoute.at(1)->getLanes().front().shape.front()}); + + // append shapes of intermediate lanes AND connections (if exist) + for (int i = 1; i < ((int)myTemporalRoute.size() - 1); i++) { + // add lane shape + multiShape.push_back(myTemporalRoute.at(i)->getLanes().front().shape); + // add empty shape for connection + multiShape.push_back(PositionVector{myTemporalRoute.at(i)->getLanes().front().shape.back(), myTemporalRoute.at(i + 1)->getLanes().front().shape.front()}); + } + + // append last shape + multiShape.push_back(myTemporalRoute.back()->getLanes().front().shape); + + // calculate unified shape + for (auto i : multiShape) { + myGeometry.shape.append(i); + } + myGeometry.shape.removeDoublePoints(); + } + } + + // last step is to check if object has to be added into grid (SUMOTree) again + if (updateGrid) { + myViewNet->getNet()->addGLObjectIntoGrid(this); + } +} + + +Position +GNEVehicle::getPositionInView() const { + // obtain lane depending of edited vehicle type + GNELane* lane = nullptr; + if (getDemandElementParents().size() == 2) { + lane = getDemandElementParents().at(1)->getEdgeParents().at(0)->getLanes().front(); + } else if (getEdgeParents().size() > 0) { + lane = getEdgeParents().front()->getLanes().front(); + } else { + throw ProcessError("Invalid vehicle tag"); + } + if (lane->getShape().length() < 2.5) { + return lane->getShape().front(); + } else { + Position A = lane->getShape().positionAtOffset(2.5); + Position B = lane->getShape().positionAtOffset(2.5); + // return Middle point + return Position((A.x() + B.x()) / 2, (A.y() + B.y()) / 2); + } +} + + +std::string +GNEVehicle::getParentName() const { + if (myTagProperty.getTag() == SUMO_TAG_VEHICLE) { + return getDemandElementParents().at(1)->getID(); + } else if (myTagProperty.getTag() == SUMO_TAG_FLOW) { + return getDemandElementParents().at(1)->getID(); + } else if (myTagProperty.getTag() == SUMO_TAG_TRIP) { + return getEdgeParents().front()->getID(); + } else { + throw ProcessError("Invalid vehicle tag"); + } +} + + +void +GNEVehicle::drawGL(const GUIVisualizationSettings& s) const { + // only drawn in super mode demand + if (myViewNet->getViewOptions().showDemandElements()) { + // declare common attributes + const double upscale = s.vehicleSize.getExaggeration(s, this); + const double width = parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_WIDTH)); + const double length = parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_LENGTH)); + double vehicleSizeSquared = width * length * upscale * width * length * upscale; + // first check if if mouse is enought near to this vehicle to draw it + if (s.drawForSelecting && (myViewNet->getPositionInformation().distanceSquaredTo2D(myGeometry.shape.front()) >= (vehicleSizeSquared + 2))) { + // first push name + glPushName(getGlID()); + // push draw matrix + glPushMatrix(); + // translate to drawing position + glTranslated(myGeometry.shape.front().x(), myGeometry.shape.front().y(), getType()); + glRotated(myGeometry.shapeRotations.front(), 0, 0, 1); + GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1); + // Pop last matrix + glPopMatrix(); + // pop name + glPopName(); + } else { + SUMOVehicleShape shape = getVehicleShapeID(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_GUISHAPE)); + // first push name + glPushName(getGlID()); + // push draw matrix + glPushMatrix(); + // translate to drawing position + glTranslated(myGeometry.shape.front().x(), myGeometry.shape.front().y(), getType()); + glRotated(myGeometry.shapeRotations.front(), 0, 0, 1); + // set lane color + setColor(s); + double upscaleLength = upscale; + if (upscale > 1 && length > 5) { + // reduce the length/width ratio because this is not usefull at high zoom + upscaleLength = MAX2(1.0, upscaleLength * (5 + sqrt(length - 5)) / length); + } + glScaled(upscale, upscaleLength, 1); + // check if we're drawing in selecting mode + if (s.drawForSelecting) { + // draw vehicle as a box and don't draw the rest of details + GUIBaseVehicleHelper::drawAction_drawVehicleAsBoxPlus(width, length); + } else { + // draw the vehicle + switch (s.vehicleQuality) { + case 0: + // in "normal" mode draw vehicle as poly + //GUIBaseVehicleHelper::drawAction_drawVehicleAsTrianglePlus(width, length); + GUIBaseVehicleHelper::drawAction_drawVehicleAsPoly(s, shape, width, length); + break; + case 1: + GUIBaseVehicleHelper::drawAction_drawVehicleAsBoxPlus(width, length); + break; + default: + GUIBaseVehicleHelper::drawAction_drawVehicleAsPoly(s, shape, width, length); + break; + } + // check if min gap has to be drawn + if (s.drawMinGap) { + const double minGap = -1 * parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_MINGAP)); + glColor3d(0., 1., 0.); + glBegin(GL_LINES); + glVertex2d(0., 0); + glVertex2d(0., minGap); + glVertex2d(-.5, minGap); + glVertex2d(.5, minGap); + glEnd(); + } + // drawing name at GLO_MAX fails unless translating z + glTranslated(0, MIN2(length / 2, double(5)), -getType()); + glScaled(1 / upscale, 1 / upscaleLength, 1); + glRotated(-1 * myGeometry.shapeRotations.front(), 0, 0, 1); + drawName(Position(0, 0), s.scale, getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_GUISHAPE) == "pedestrian" ? s.personName : s.vehicleName, s.angle); + // draw line + if (s.vehicleName.show && line != "") { + glTranslated(0, 0.6 * s.vehicleName.scaledSize(s.scale), 0); + GLHelper::drawTextSettings(s.vehicleName, "line:" + line, Position(0, 0), s.scale, s.angle); + } + } + // pop draw matrix + glPopMatrix(); + + // check if dotted contour has to be drawn + if (!s.drawForSelecting && (myViewNet->getDottedAC() == this)) { + GLHelper::drawShapeDottedContour(getType(), myGeometry.shape.front(), width, length, myGeometry.shapeRotations.front(), 0, length / 2); + // check if draw temporal route must be drawed (only for Tags + if (myTagProperty.getTag() == SUMO_TAG_TRIP) { + if (myTemporalRoute.size() > 1) { + // Add a draw matrix + glPushMatrix(); + // Start with the drawing of the area traslating matrix to origin + glTranslated(0, 0, getType() - 0.01); + // set orange color + GLHelper::setColor(RGBColor::ORANGE); + // set line width + glLineWidth(5); + // draw first line + GLHelper::drawLine(myTemporalRoute.at(0)->getLanes().front().shape.front(), + myTemporalRoute.at(0)->getLanes().front().shape.back()); + // draw rest of lines + for (int i = 1; i < (int)myTemporalRoute.size(); i++) { + GLHelper::drawLine(myTemporalRoute.at(i - 1)->getLanes().front().shape.back(), + myTemporalRoute.at(i)->getLanes().front().shape.front()); + GLHelper::drawLine(myTemporalRoute.at(i)->getLanes().front().shape.front(), + myTemporalRoute.at(i)->getLanes().front().shape.back()); + } + // Pop last matrix + glPopMatrix(); + } else { + // Add a draw matrix + glPushMatrix(); + // Start with the drawing of the area traslating matrix to origin + glTranslated(0, 0, getType() - 0.01); + // set orange color + GLHelper::setColor(RGBColor::RED); + // set line width + glLineWidth(5); + // draw first line + GLHelper::drawLine(getEdgeParents().front()->getNBEdge()->getLanes().front().shape.front(), getEdgeParents().back()->getNBEdge()->getLanes().front().shape.back()); + // Pop last matrix + glPopMatrix(); + } + } + } + // pop name + glPopName(); + } + } +} + + +void +GNEVehicle::selectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.select(dynamic_cast(this)->getGlID()); + // add object of list into selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->addedLockedObject(GLO_VEHICLE); + if (changeFlag) { + mySelected = true; + } + } +} + + +void +GNEVehicle::unselectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.deselect(dynamic_cast(this)->getGlID()); + // remove object of list of selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->removeLockedObject(GLO_VEHICLE); + if (changeFlag) { + mySelected = false; + + } + } +} + + +std::string +GNEVehicle::getAttribute(SumoXMLAttr key) const { + // declare string error + std::string error; + switch (key) { + case SUMO_ATTR_ID: + return getDemandElementID(); + case SUMO_ATTR_TYPE: + return getDemandElementParents().at(0)->getID(); + case SUMO_ATTR_COLOR: + return toString(color); + case SUMO_ATTR_DEPARTLANE: + return getDepartLane(); + case SUMO_ATTR_DEPARTPOS: + return getDepartPos(); + case SUMO_ATTR_DEPARTSPEED: + return getDepartSpeed(); + case SUMO_ATTR_ARRIVALLANE: + return getArrivalLane(); + case SUMO_ATTR_ARRIVALPOS: + return getArrivalPos(); + case SUMO_ATTR_ARRIVALSPEED: + return getArrivalSpeed(); + case SUMO_ATTR_LINE: + return line; + case SUMO_ATTR_PERSON_NUMBER: + return toString(personNumber); + case SUMO_ATTR_CONTAINER_NUMBER: + return toString(containerNumber); + case SUMO_ATTR_REROUTE: + return toString("false"); // check + case SUMO_ATTR_VIA: { + if (getEdgeParents().size() > 2) { + std::vector viaEdges; + for (int i = 1; i < (int)getEdgeParents().size() - 1; i++) { + viaEdges.push_back(getEdgeParents().at(i)); + } + return parseIDs(viaEdges); + } else { + return ""; + } + } + case SUMO_ATTR_DEPARTPOS_LAT: + return getDepartPosLat(); + case SUMO_ATTR_ARRIVALPOS_LAT: + return getArrivalPosLat(); + // Specific of vehicles + case SUMO_ATTR_DEPART: + return toString(depart); + case SUMO_ATTR_ROUTE: + return getDemandElementParents().at(1)->getID(); + // Specific of Trips + case SUMO_ATTR_FROM: + return getEdgeParents().front()->getID(); + case SUMO_ATTR_TO: + return getEdgeParents().back()->getID(); + // Specific of flows + case SUMO_ATTR_BEGIN: + return time2string(depart); + case SUMO_ATTR_END: + return time2string(repetitionEnd); + case SUMO_ATTR_VEHSPERHOUR: + return time2string(repetitionOffset); + case SUMO_ATTR_PERIOD: + return time2string(repetitionOffset); + case SUMO_ATTR_PROB: + return toString(repetitionProbability); + case SUMO_ATTR_NUMBER: + return toString(repetitionNumber); + // + case GNE_ATTR_SELECTED: + return toString(isAttributeCarrierSelected()); + case GNE_ATTR_GENERIC: + return getGenericParametersStr(); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +void +GNEVehicle::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { + if (value == getAttribute(key)) { + return; //avoid needless changes, later logic relies on the fact that attributes have changed + } + switch (key) { + case SUMO_ATTR_ID: + case SUMO_ATTR_TYPE: + case SUMO_ATTR_COLOR: + case SUMO_ATTR_DEPARTLANE: + case SUMO_ATTR_DEPARTPOS: + case SUMO_ATTR_DEPARTSPEED: + case SUMO_ATTR_ARRIVALLANE: + case SUMO_ATTR_ARRIVALPOS: + case SUMO_ATTR_ARRIVALSPEED: + case SUMO_ATTR_LINE: + case SUMO_ATTR_PERSON_NUMBER: + case SUMO_ATTR_CONTAINER_NUMBER: + case SUMO_ATTR_REROUTE: + case SUMO_ATTR_VIA: + case SUMO_ATTR_DEPARTPOS_LAT: + case SUMO_ATTR_ARRIVALPOS_LAT: + // Specific of vehicles + case SUMO_ATTR_DEPART: + case SUMO_ATTR_ROUTE: + // Specific of Trips + case SUMO_ATTR_FROM: + case SUMO_ATTR_TO: + // + // Specific of flows + case SUMO_ATTR_BEGIN: + case SUMO_ATTR_END: + case SUMO_ATTR_NUMBER: + case SUMO_ATTR_VEHSPERHOUR: + case SUMO_ATTR_PERIOD: + case SUMO_ATTR_PROB: + // + case GNE_ATTR_GENERIC: + case GNE_ATTR_SELECTED: + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNEVehicle::isValid(SumoXMLAttr key, const std::string& value) { + // declare string error + std::string error; + switch (key) { + case SUMO_ATTR_ID: + return isValidDemandElementID(value); + case SUMO_ATTR_TYPE: + return SUMOXMLDefinitions::isValidTypeID(value) && (myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, value, false) != nullptr); + case SUMO_ATTR_COLOR: + return canParse(value); + case SUMO_ATTR_DEPARTLANE: { + int dummyDepartLane; + DepartLaneDefinition dummyDepartLaneProcedure; + parseDepartLane(value, toString(SUMO_TAG_VEHICLE), id, dummyDepartLane, dummyDepartLaneProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_DEPARTPOS: { + double dummyDepartPos; + DepartPosDefinition dummyDepartPosProcedure; + parseDepartPos(value, toString(SUMO_TAG_VEHICLE), id, dummyDepartPos, dummyDepartPosProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_DEPARTSPEED: { + double dummyDepartSpeed; + DepartSpeedDefinition dummyDepartSpeedProcedure; + parseDepartSpeed(value, toString(SUMO_TAG_VEHICLE), id, dummyDepartSpeed, dummyDepartSpeedProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_ARRIVALLANE: { + int dummyArrivalLane; + ArrivalLaneDefinition dummyArrivalLaneProcedure; + parseArrivalLane(value, toString(SUMO_TAG_VEHICLE), id, dummyArrivalLane, dummyArrivalLaneProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_ARRIVALPOS: { + double dummyArrivalPos; + ArrivalPosDefinition dummyArrivalPosProcedure; + parseArrivalPos(value, toString(SUMO_TAG_VEHICLE), id, dummyArrivalPos, dummyArrivalPosProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_ARRIVALSPEED: { + double dummyArrivalSpeed; + ArrivalSpeedDefinition dummyArrivalSpeedProcedure; + parseArrivalSpeed(value, toString(SUMO_TAG_VEHICLE), id, dummyArrivalSpeed, dummyArrivalSpeedProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_LINE: + return true; + case SUMO_ATTR_PERSON_NUMBER: + return canParse(value) && parse(value) >= 0; + case SUMO_ATTR_CONTAINER_NUMBER: + return canParse(value) && parse(value) >= 0; + case SUMO_ATTR_REROUTE: + return true; // check + case SUMO_ATTR_VIA: + if (value.empty()) { + return true; + } else { + return canParse >(myViewNet->getNet(), value, false); + } + case SUMO_ATTR_DEPARTPOS_LAT: { + double dummyDepartPosLat; + DepartPosLatDefinition dummyDepartPosLatProcedure; + parseDepartPosLat(value, toString(SUMO_TAG_VEHICLE), id, dummyDepartPosLat, dummyDepartPosLatProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_ARRIVALPOS_LAT: { + double dummyArrivalPosLat; + ArrivalPosLatDefinition dummyArrivalPosLatProcedure; + parseArrivalPosLat(value, toString(SUMO_TAG_VEHICLE), id, dummyArrivalPosLat, dummyArrivalPosLatProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + // Specific of vehicles + case SUMO_ATTR_DEPART: { + SUMOTime dummyDepart; + DepartDefinition dummyDepartProcedure; + parseDepart(value, toString(SUMO_TAG_VEHICLE), id, dummyDepart, dummyDepartProcedure, error); + // if error is empty, given value is valid + return error.empty(); + } + case SUMO_ATTR_ROUTE: + return SUMOXMLDefinitions::isValidVehicleID(value) && (myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, value, false) != nullptr); + // Specific of Trips + case SUMO_ATTR_FROM: + case SUMO_ATTR_TO: + return SUMOXMLDefinitions::isValidVehicleID(value) && (myViewNet->getNet()->retrieveEdge(value, false) != nullptr); + // Specific of flows + case SUMO_ATTR_BEGIN: + if (canParse(value)) { + return (parse(value) >= 0); + } else { + return false; + } + case SUMO_ATTR_END: + if (value.empty()) { + return true; + } else if (canParse(value)) { + return (parse(value) >= 0); + } else { + return false; + } + case SUMO_ATTR_VEHSPERHOUR: + if (value.empty()) { + return true; + } else if (canParse(value)) { + return (parse(value) > 0); + } else { + return false; + } + case SUMO_ATTR_PERIOD: + if (value.empty()) { + return true; + } else if (canParse(value)) { + return (parse(value) > 0); + } else { + return false; + } + case SUMO_ATTR_PROB: + if (value.empty()) { + return true; + } else if (canParse(value)) { + return (parse(value) >= 0); + } else { + return false; + } + case SUMO_ATTR_NUMBER: + if (canParse(value)) { + return (parse(value) >= 0); + } else { + return false; + } + // + case GNE_ATTR_SELECTED: + return canParse(value); + case GNE_ATTR_GENERIC: + return isGenericParametersValid(value); + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNEVehicle::isDisjointAttributeSet(const SumoXMLAttr attr) const { + switch (attr) { + case SUMO_ATTR_END: + return (parametersSet & VEHPARS_END_SET) != 0; + case SUMO_ATTR_NUMBER: + return (parametersSet & VEHPARS_NUMBER_SET) != 0; + case SUMO_ATTR_VEHSPERHOUR: + return (parametersSet & VEHPARS_VPH_SET) != 0; + case SUMO_ATTR_PERIOD: + return (parametersSet & VEHPARS_PERIOD_SET) != 0; + case SUMO_ATTR_PROB: + return (parametersSet & VEHPARS_PROB_SET) != 0; + default: + return true; + }; +} + + +void +GNEVehicle::setDisjointAttribute(const SumoXMLAttr attr, GNEUndoList* undoList) { + // obtain a copy of parameter sets + int parametersSetCopy = parametersSet; + // modify parametersSetCopy depending of attr + switch (attr) { + case SUMO_ATTR_END: { + // give more priority to end + parametersSetCopy = VEHPARS_END_SET | VEHPARS_NUMBER_SET; + break; + } + case SUMO_ATTR_NUMBER: + parametersSetCopy ^= VEHPARS_END_SET; + parametersSetCopy |= VEHPARS_NUMBER_SET; + break; + case SUMO_ATTR_VEHSPERHOUR: { + // give more priority to end + if ((parametersSetCopy & VEHPARS_END_SET) && (parametersSetCopy & VEHPARS_NUMBER_SET)) { + parametersSetCopy = VEHPARS_END_SET; + } else if (parametersSetCopy & VEHPARS_END_SET) { + parametersSetCopy = VEHPARS_END_SET; + } else if (parametersSetCopy & VEHPARS_NUMBER_SET) { + parametersSetCopy = VEHPARS_NUMBER_SET; + } + // set VehsPerHour + parametersSetCopy |= VEHPARS_VPH_SET; + break; + } + case SUMO_ATTR_PERIOD: { + // give more priority to end + if ((parametersSetCopy & VEHPARS_END_SET) && (parametersSetCopy & VEHPARS_NUMBER_SET)) { + parametersSetCopy = VEHPARS_END_SET; + } else if (parametersSetCopy & VEHPARS_END_SET) { + parametersSetCopy = VEHPARS_END_SET; + } else if (parametersSetCopy & VEHPARS_NUMBER_SET) { + parametersSetCopy = VEHPARS_NUMBER_SET; + } + // set period + parametersSetCopy |= VEHPARS_PERIOD_SET; + break; + } + case SUMO_ATTR_PROB: { + // give more priority to end + if ((parametersSetCopy & VEHPARS_END_SET) && (parametersSetCopy & VEHPARS_NUMBER_SET)) { + parametersSetCopy = VEHPARS_END_SET; + } else if (parametersSetCopy & VEHPARS_END_SET) { + parametersSetCopy = VEHPARS_END_SET; + } else if (parametersSetCopy & VEHPARS_NUMBER_SET) { + parametersSetCopy = VEHPARS_NUMBER_SET; + } + // set probability + parametersSetCopy |= VEHPARS_PROB_SET; + break; + } + default: + break; + } + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), parametersSet, parametersSetCopy)); +} + + +std::string +GNEVehicle::getPopUpID() const { + return getTagStr(); +} + + +std::string +GNEVehicle::getHierarchyName() const { + return getTagStr() + ": " + getAttribute(SUMO_ATTR_ID) ; +} + +// =========================================================================== +// protected +// =========================================================================== + +void +GNEVehicle::setColor(const GUIVisualizationSettings& s) const { + const GUIColorer& c = s.vehicleColorer; + + switch (c.getActive()) { + case 0: { + //test for emergency vehicle + if (getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_GUISHAPE) == "emergency") { + GLHelper::setColor(RGBColor::WHITE); + break; + } + //test for firebrigade + if (getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_GUISHAPE) == "firebrigade") { + GLHelper::setColor(RGBColor::RED); + break; + } + //test for police car + if (getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_GUISHAPE) == "police") { + GLHelper::setColor(RGBColor::BLUE); + break; + } + if (wasSet(VEHPARS_COLOR_SET)) { + GLHelper::setColor(color); + break; + } + if (getDemandElementParents().at(0)->isDisjointAttributeSet(SUMO_ATTR_COLOR)) { + GLHelper::setColor(getDemandElementParents().at(0)->getColor()); + break; + } + if (&(getDemandElementParents().at(1)->getColor()) != &RGBColor::DEFAULT_COLOR) { + GLHelper::setColor(getDemandElementParents().at(1)->getColor()); + } else { + GLHelper::setColor(c.getScheme().getColor(0)); + } + break; + } + case 2: { + if (wasSet(VEHPARS_COLOR_SET)) { + GLHelper::setColor(color); + } else { + GLHelper::setColor(c.getScheme().getColor(0)); + } + break; + } + case 3: { + if (getDemandElementParents().at(0)->isDisjointAttributeSet(SUMO_ATTR_COLOR)) { + GLHelper::setColor(getDemandElementParents().at(0)->getColor()); + } else { + GLHelper::setColor(c.getScheme().getColor(0)); + } + break; + } + case 4: { + if (getDemandElementParents().at(1)->getColor() != RGBColor::DEFAULT_COLOR) { + GLHelper::setColor(getDemandElementParents().at(1)->getColor()); + } else { + GLHelper::setColor(c.getScheme().getColor(0)); + } + break; + } + case 5: { + Position p = getDemandElementParents().at(1)->getEdgeParents().at(0)->getLanes().at(0)->getShape()[0]; + const Boundary& b = myViewNet->getNet()->getBoundary(); + Position center = b.getCenter(); + double hue = 180. + atan2(center.x() - p.x(), center.y() - p.y()) * 180. / M_PI; + double sat = p.distanceTo(center) / center.distanceTo(Position(b.xmin(), b.ymin())); + GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); + break; + } + case 6: { + Position p = getDemandElementParents().at(1)->getEdgeParents().back()->getLanes().at(0)->getShape()[-1]; + const Boundary& b = myViewNet->getNet()->getBoundary(); + Position center = b.getCenter(); + double hue = 180. + atan2(center.x() - p.x(), center.y() - p.y()) * 180. / M_PI; + double sat = p.distanceTo(center) / center.distanceTo(Position(b.xmin(), b.ymin())); + GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); + break; + } + case 7: { + Position pb = getDemandElementParents().at(1)->getEdgeParents().at(0)->getLanes().at(0)->getShape()[0]; + Position pe = getDemandElementParents().at(1)->getEdgeParents().back()->getLanes().at(0)->getShape()[-1]; + const Boundary& b = myViewNet->getNet()->getBoundary(); + double hue = 180. + atan2(pb.x() - pe.x(), pb.y() - pe.y()) * 180. / M_PI; + Position minp(b.xmin(), b.ymin()); + Position maxp(b.xmax(), b.ymax()); + double sat = pb.distanceTo(pe) / minp.distanceTo(maxp); + GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); + break; + } + case 29: { // color randomly (by pointer hash) + std::hash ptr_hash; + const double hue = (double)(ptr_hash(this) % 360); // [0-360] + const double sat = ((ptr_hash(this) / 360) % 67) / 100.0 + 0.33; // [0.33-1] + GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); + break; + } + default: { + GLHelper::setColor(c.getScheme().getColor(0)); + } + } +} + +// =========================================================================== +// private +// =========================================================================== + +void +GNEVehicle::setAttribute(SumoXMLAttr key, const std::string& value) { + // declare string error + std::string error; + switch (key) { + case SUMO_ATTR_ID: + changeDemandElementID(value); + break; + case SUMO_ATTR_TYPE: + changeDemandElementParent(this, value, 0); + // set manually vtypeID (needed for saving) + vtypeid = value; + break; + case SUMO_ATTR_COLOR: + color = parse(value); + break; + case SUMO_ATTR_DEPARTLANE: + parseDepartLane(value, toString(SUMO_TAG_VEHICLE), id, departLane, departLaneProcedure, error); + break; + case SUMO_ATTR_DEPARTPOS: + parseDepartPos(value, toString(SUMO_TAG_VEHICLE), id, departPos, departPosProcedure, error); + break; + case SUMO_ATTR_DEPARTSPEED: + parseDepartSpeed(value, toString(SUMO_TAG_VEHICLE), id, departSpeed, departSpeedProcedure, error); + break; + case SUMO_ATTR_ARRIVALLANE: + parseArrivalLane(value, toString(SUMO_TAG_VEHICLE), id, arrivalLane, arrivalLaneProcedure, error); + break; + case SUMO_ATTR_ARRIVALPOS: + parseArrivalPos(value, toString(SUMO_TAG_VEHICLE), id, arrivalPos, arrivalPosProcedure, error); + break; + case SUMO_ATTR_ARRIVALSPEED: + parseArrivalSpeed(value, toString(SUMO_TAG_VEHICLE), id, arrivalSpeed, arrivalSpeedProcedure, error); + break; + case SUMO_ATTR_LINE: + line = value; + break; + case SUMO_ATTR_PERSON_NUMBER: + personNumber = parse(value); + break; + case SUMO_ATTR_CONTAINER_NUMBER: + containerNumber = parse(value); + break; + case SUMO_ATTR_REROUTE: + // check + break; + case SUMO_ATTR_VIA: + // change edge parents + changeEdgeParents(this, getEdgeParents().front()->getID() + " " + value + " " + getEdgeParents().back()->getID()); + // recalculate temporal route (Only in Demand mode) + if (myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) { + myTemporalRoute = getRouteCalculatorInstance()->calculateDijkstraRoute(parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_VCLASS)), getEdgeParents()); + } + break; + case SUMO_ATTR_DEPARTPOS_LAT: + parseDepartPosLat(value, toString(SUMO_TAG_VEHICLE), id, departPosLat, departPosLatProcedure, error); + break; + case SUMO_ATTR_ARRIVALPOS_LAT: + parseArrivalPosLat(value, toString(SUMO_TAG_VEHICLE), id, arrivalPosLat, arrivalPosLatProcedure, error); + break; + // Specific of vehicles + case SUMO_ATTR_DEPART: { + std::string oldDepart = getBegin(); + parseDepart(value, toString(SUMO_TAG_VEHICLE), id, depart, departProcedure, error); + myViewNet->getNet()->updateDemandElementBegin(oldDepart, this); + break; + } + case SUMO_ATTR_ROUTE: + changeDemandElementParent(this, value, 1); + break; + // Specific of Trips + case SUMO_ATTR_FROM: { + std::vector newEdges; + newEdges.push_back(value); + for (int i = 1; i < (int)getEdgeParents().size(); i++) { + newEdges.push_back(getEdgeParents().at(i)->getID()); + } + // change edge parents + changeEdgeParents(this, toString(newEdges)); + // recalculate temporal route (Only in Demand mode) + if (myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) { + myTemporalRoute = getRouteCalculatorInstance()->calculateDijkstraRoute(parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_VCLASS)), getEdgeParents()); + } + break; + } + case SUMO_ATTR_TO: { + std::vector newEdges; + for (int i = 0; i < (int)getEdgeParents().size() - 1; i++) { + newEdges.push_back(getEdgeParents().at(i)->getID()); + } + newEdges.push_back(value); + // change edge parents + changeEdgeParents(this, toString(newEdges)); + // recalculate temporal route + myTemporalRoute = getRouteCalculatorInstance()->calculateDijkstraRoute(parse(getDemandElementParents().at(0)->getAttribute(SUMO_ATTR_VCLASS)), getEdgeParents()); + break; + } + // Specific of flows + case SUMO_ATTR_BEGIN: { + std::string oldBegin = getBegin(); + depart = string2time(value); + myViewNet->getNet()->updateDemandElementBegin(oldBegin, this); + break; + } + case SUMO_ATTR_END: + repetitionEnd = string2time(value); + break; + case SUMO_ATTR_VEHSPERHOUR: + repetitionOffset = string2time(value); + break; + case SUMO_ATTR_PERIOD: + repetitionOffset = string2time(value); + break; + case SUMO_ATTR_PROB: + repetitionProbability = parse(value); + break; + case SUMO_ATTR_NUMBER: + repetitionNumber = parse(value); + break; + // + case GNE_ATTR_SELECTED: + if (parse(value)) { + selectAttributeCarrier(); + } else { + unselectAttributeCarrier(); + } + break; + case GNE_ATTR_GENERIC: + setGenericParametersStr(value); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicle.h sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicle.h --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicle.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,167 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicle.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// Representation of vehicles in NETEDIT +/****************************************************************************/ +#ifndef GNEVehicle_h +#define GNEVehicle_h + + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include "GNEDemandElement.h" + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEVehicle + */ +class GNEVehicle : public GNEDemandElement, public SUMOVehicleParameter { + +public: + /// @brief constructor for vehicles and flows + GNEVehicle(SumoXMLTag tag, GNEViewNet* viewNet, const std::string& vehicleID, GNEDemandElement* vehicleType, GNEDemandElement* route); + + /// @brief constructor for vehicles + GNEVehicle(SumoXMLTag tag, GNEViewNet* viewNet, const SUMOVehicleParameter& vehicleParameter, GNEDemandElement* vehicleType, GNEDemandElement* route); + + /// @brief constructor for Trips (note: Edges : from + via + to) + GNEVehicle(GNEViewNet* viewNet, const std::string& tripID, GNEDemandElement* vehicleType, const std::vector& edges); + + /// @brief parameter constructor for Trips (note: Edges : from + via + to) + GNEVehicle(GNEViewNet* viewNet, const SUMOVehicleParameter& tripParameter, GNEDemandElement* vehicleType, const std::vector& edges); + + /// @brief destructor + ~GNEVehicle(); + + /**@brief get begin time of demand element + * @note: used by demand elements of type "Vehicle", and it has to be implemented as childs + * @throw invalid argument if demand element doesn't has a begin time + */ + std::string getBegin() const; + + /// @brief get color + const RGBColor& getColor() const; + + /**@brief writte demand element element into a xml file + * @param[in] device device in which write parameters of demand element element + */ + void writeDemandElement(OutputDevice& device) const; + + /// @name Functions related with geometry of element + /// @{ + /**@brief change the position of the element geometry without saving in undoList + * @param[in] offset Position used for calculate new position of geometry without updating RTree + */ + void moveGeometry(const Position& offset); + + /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) + * @param[in] undoList The undoList on which to register changes + */ + void commitGeometryMoving(GNEUndoList* undoList); + + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + + /// @brief Returns position of demand element in view + Position getPositionInView() const; + /// @} + + /// @name inherited from GUIGlObject + /// @{ + /**@brief Returns the name of the parent object + * @return This object's parent id + */ + std::string getParentName() 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 inherited from GNEAttributeCarrier + /// @{ + /// @brief select attribute carrier using GUIGlobalSelection + void selectAttributeCarrier(bool changeFlag = true); + + /// @brief unselect attribute carrier using GUIGlobalSelection + void unselectAttributeCarrier(bool changeFlag = true); + + /* @brief method for getting the Attribute of an XML key + * @param[in] key The attribute key + * @return string with the value associated to key + */ + std::string getAttribute(SumoXMLAttr key) const; + + /* @brief method for setting the attribute and letting the object perform demand element changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + * @param[in] net optionally the GNENet to inform about gui updates + */ + void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); + + /* @brief method for setting the attribute and letting the object perform demand element changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + */ + bool isValid(SumoXMLAttr key, const std::string& value); + + /* @brief method for check if certain attribute is set (used by ACs with disjoint attributes) + * @param[in] key The attribute key + * @return true if it's set, false in other case + */ + bool isDisjointAttributeSet(const SumoXMLAttr attr) const; + + /* @brief method for set certain attribute is set (used by ACs with disjoint attributes) + * @param[in] attr The attribute key + * @param[in] undoList The undoList on which to register changes + */ + void setDisjointAttribute(const SumoXMLAttr attr, GNEUndoList* undoList); + + /// @brief get PopPup ID (Used in AC Hierarchy) + std::string getPopUpID() const; + + /// @brief get Hierarchy Name (Used in AC Hierarchy) + std::string getHierarchyName() const; + /// @} + +protected: + /// @brief vector with temporal route edges (only used for Trip visualization) + std::vector myTemporalRoute; + + /// @brief sets the color according to the currente settings + void setColor(const GUIVisualizationSettings& s) const; + +private: + /// @brief method for setting the attribute and nothing else + void setAttribute(SumoXMLAttr key, const std::string& value); + + /// @brief Invalidated copy constructor. + GNEVehicle(const GNEVehicle&) = delete; + + /// @brief Invalidated assignment operator + GNEVehicle& operator=(const GNEVehicle&) = delete; +}; + +#endif +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicleType.cpp sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicleType.cpp --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicleType.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicleType.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,1118 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleType.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// Definition of Vehicle Types in NETEDIT +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEVehicleType.h" + + +// =========================================================================== +// member method definitions +// =========================================================================== + + +GNEVehicleType::GNEVehicleType(GNEViewNet* viewNet, const std::string& vTypeID, SUMOVehicleClass defaultVClass) : + GNEDemandElement(vTypeID, viewNet, GLO_VTYPE, SUMO_TAG_VTYPE, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}), + SUMOVTypeParameter(vTypeID), + myDefaultVehicleType(true), +myDefaultVehicleTypeModified(false) { + // set default vehicle class + vehicleClass = defaultVClass; + parametersSet |= VTYPEPARS_VEHICLECLASS_SET; +} + + +GNEVehicleType::GNEVehicleType(GNEViewNet* viewNet, const SUMOVTypeParameter& vTypeParameter) : + GNEDemandElement(vTypeParameter.id, viewNet, GLO_VTYPE, SUMO_TAG_VTYPE, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}), +SUMOVTypeParameter(vTypeParameter), +myDefaultVehicleType(false), +myDefaultVehicleTypeModified(false) { +} + + +GNEVehicleType::GNEVehicleType(GNEViewNet* viewNet, const std::string& vTypeID, GNEVehicleType* vTypeOriginal) : + GNEDemandElement(vTypeID, viewNet, GLO_VTYPE, SUMO_TAG_VTYPE, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}), +SUMOVTypeParameter(*vTypeOriginal), +myDefaultVehicleType(false), +myDefaultVehicleTypeModified(false) { + // change manually the ID (to avoid to use the ID of vTypeOriginal) + id = vTypeID; +} + + +GNEVehicleType::~GNEVehicleType() {} + + +const RGBColor& +GNEVehicleType::getColor() const { + return color; +} + + +void +GNEVehicleType::writeDemandElement(OutputDevice& device) const { + // only write default vehicle types if it was modified + if (myDefaultVehicleType) { + if (myDefaultVehicleTypeModified) { + write(device); + } + } else { + write(device); + } +} + + +void +GNEVehicleType::moveGeometry(const Position&) { + // This additional cannot be moved +} + + +void +GNEVehicleType::commitGeometryMoving(GNEUndoList*) { + // This additional cannot be moved +} + + +void +GNEVehicleType::updateGeometry(bool /*updateGrid*/) { + // Currently this additional doesn't own a Geometry +} + + +Position +GNEVehicleType::getPositionInView() const { + return Position(); +} + + +std::string +GNEVehicleType::getParentName() const { + return myViewNet->getNet()->getMicrosimID(); +} + + +void +GNEVehicleType::drawGL(const GUIVisualizationSettings&) const { + // Currently This additional isn't drawn +} + + +void +GNEVehicleType::selectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.select(dynamic_cast(this)->getGlID()); + // add object of list into selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->addedLockedObject(GLO_VTYPE); + if (changeFlag) { + mySelected = true; + } + } +} + + +void +GNEVehicleType::unselectAttributeCarrier(bool changeFlag) { + if (!myViewNet) { + throw ProcessError("ViewNet cannot be nullptr"); + } else { + gSelected.deselect(dynamic_cast(this)->getGlID()); + // remove object of list of selected objects + myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->removeLockedObject(GLO_VTYPE); + if (changeFlag) { + mySelected = false; + + } + } +} + + +std::string +GNEVehicleType::getAttribute(SumoXMLAttr key) const { + switch (key) { + case SUMO_ATTR_ID: + return getDemandElementID(); + // CFM Values + case SUMO_ATTR_ACCEL: + case SUMO_ATTR_DECEL: + case SUMO_ATTR_APPARENTDECEL: + case SUMO_ATTR_EMERGENCYDECEL: + case SUMO_ATTR_SIGMA: + case SUMO_ATTR_TAU: + // this CFM has default values + return getCFParamString(key, myTagProperty.getDefaultValue(key)); + // JM Values + case SUMO_ATTR_JM_CROSSING_GAP: + case SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME: + case SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME: + case SUMO_ATTR_JM_DRIVE_RED_SPEED: + case SUMO_ATTR_JM_IGNORE_FOE_PROB: + case SUMO_ATTR_JM_IGNORE_FOE_SPEED: + case SUMO_ATTR_JM_SIGMA_MINOR: + case SUMO_ATTR_JM_TIMEGAP_MINOR: + // this JM has default values + return getJMParamString(key, myTagProperty.getDefaultValue(key)); + case SUMO_ATTR_IMPATIENCE: + if (wasSet(VTYPEPARS_IMPATIENCE_SET)) { + return toString(impatience); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_IMPATIENCE); + } + // + case SUMO_ATTR_COLLISION_MINGAP_FACTOR: + case SUMO_ATTR_TMP1: + case SUMO_ATTR_TMP2: + case SUMO_ATTR_TMP3: + case SUMO_ATTR_TMP4: + case SUMO_ATTR_TMP5: + case SUMO_ATTR_CF_PWAGNER2009_TAULAST: + case SUMO_ATTR_CF_PWAGNER2009_APPROB: + case SUMO_ATTR_CF_IDMM_ADAPT_FACTOR: + case SUMO_ATTR_CF_IDMM_ADAPT_TIME: + case SUMO_ATTR_CF_WIEDEMANN_SECURITY: + case SUMO_ATTR_CF_WIEDEMANN_ESTIMATION: + case SUMO_ATTR_TRAIN_TYPE: + case SUMO_ATTR_K: + case SUMO_ATTR_CF_KERNER_PHI: + case SUMO_ATTR_CF_IDM_DELTA: + case SUMO_ATTR_CF_IDM_STEPPING: + return getCFParamString(key, ""); + /// @} + + case SUMO_ATTR_LENGTH: + if (wasSet(VTYPEPARS_LENGTH_SET)) { + return toString(length); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_LENGTH); + } + case SUMO_ATTR_MINGAP: + if (wasSet(VTYPEPARS_MINGAP_SET)) { + return toString(minGap); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_MINGAP); + } + case SUMO_ATTR_MAXSPEED: + if (wasSet(VTYPEPARS_MAXSPEED_SET)) { + return toString(maxSpeed); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_MAXSPEED); + } + case SUMO_ATTR_SPEEDFACTOR: + if (wasSet(VTYPEPARS_SPEEDFACTOR_SET)) { + return toString(speedFactor.getParameter()[0]); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_SPEEDFACTOR); + } + case SUMO_ATTR_SPEEDDEV: + if (wasSet(VTYPEPARS_SPEEDFACTOR_SET)) { + return toString(speedFactor.getParameter()[1]); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_SPEEDDEV); + } + case SUMO_ATTR_COLOR: + if (wasSet(VTYPEPARS_COLOR_SET)) { + return toString(color); + } else { + return ""; + } + case SUMO_ATTR_VCLASS: + if (wasSet(VTYPEPARS_VEHICLECLASS_SET)) { + return toString(vehicleClass); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_VCLASS); + } + case SUMO_ATTR_EMISSIONCLASS: + if (wasSet(VTYPEPARS_EMISSIONCLASS_SET)) { + return PollutantsInterface::getName(emissionClass); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_EMISSIONCLASS); + } + case SUMO_ATTR_GUISHAPE: + if (wasSet(VTYPEPARS_SHAPE_SET)) { + return getVehicleShapeName(shape); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_GUISHAPE); + } + case SUMO_ATTR_WIDTH: + if (wasSet(VTYPEPARS_WIDTH_SET)) { + return toString(width); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_WIDTH); + } + case SUMO_ATTR_IMGFILE: + if (wasSet(VTYPEPARS_IMGFILE_SET)) { + return imgFile; + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_IMGFILE); + } + case SUMO_ATTR_LANE_CHANGE_MODEL: + if (wasSet(VTYPEPARS_LANE_CHANGE_MODEL_SET)) { + return SUMOXMLDefinitions::LaneChangeModels.getString(lcModel); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_LANE_CHANGE_MODEL); + } + case SUMO_ATTR_CAR_FOLLOW_MODEL: + if (wasSet(VTYPEPARS_CAR_FOLLOW_MODEL)) { + return SUMOXMLDefinitions::CarFollowModels.getString(cfModel); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_CAR_FOLLOW_MODEL); + } + case SUMO_ATTR_PERSON_CAPACITY: + if (wasSet(VTYPEPARS_PERSON_CAPACITY)) { + return toString(personCapacity); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_PERSON_CAPACITY); + } + case SUMO_ATTR_CONTAINER_CAPACITY: + if (wasSet(VTYPEPARS_CONTAINER_CAPACITY)) { + return toString(containerCapacity); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_CONTAINER_CAPACITY); + } + case SUMO_ATTR_BOARDING_DURATION: + if (wasSet(VTYPEPARS_BOARDING_DURATION)) { + return time2string(boardingDuration); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_BOARDING_DURATION); + } + case SUMO_ATTR_LOADING_DURATION: + if (wasSet(VTYPEPARS_LOADING_DURATION)) { + return time2string(loadingDuration); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_LOADING_DURATION); + } + case SUMO_ATTR_LATALIGNMENT: + if (wasSet(VTYPEPARS_LATALIGNMENT_SET)) { + return toString(latAlignment); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_LATALIGNMENT); + } + break; + case SUMO_ATTR_MINGAP_LAT: + if (wasSet(VTYPEPARS_MINGAP_LAT_SET)) { + return toString(minGapLat); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_MINGAP_LAT); + } + case SUMO_ATTR_MAXSPEED_LAT: + if (wasSet(VTYPEPARS_MAXSPEED_LAT_SET)) { + return toString(maxSpeedLat); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_MAXSPEED_LAT); + } + case SUMO_ATTR_ACTIONSTEPLENGTH: + if (wasSet(VTYPEPARS_ACTIONSTEPLENGTH_SET)) { + return time2string(actionStepLength); + } else { + return myTagProperty.getDefaultValue(SUMO_ATTR_ACTIONSTEPLENGTH); + } + case GNE_ATTR_GENERIC: + return getGenericParametersStr(); + case GNE_ATTR_DEFAULT_VTYPE_MODIFIED: + if (myDefaultVehicleType) { + return toString(myDefaultVehicleTypeModified); + } else { + return toString(false); + } + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + /* + VTYPEPARS_PROBABILITY_SET + VTYPEPARS_HASDRIVERSTATE_SET + VTYPEPARS_HEIGHT_SET; + VTYPEPARS_OSGFILE_SET; + */ + } +} + + +void +GNEVehicleType::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) { + if (value == getAttribute(key)) { + return; //avoid needless changes, later logic relies on the fact that attributes have changed + } + switch (key) { + case SUMO_ATTR_ID: + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value)); + break; + /// CFM Values + case SUMO_ATTR_ACCEL: + case SUMO_ATTR_DECEL: + case SUMO_ATTR_APPARENTDECEL: + case SUMO_ATTR_EMERGENCYDECEL: + case SUMO_ATTR_SIGMA: + case SUMO_ATTR_TAU: + case SUMO_ATTR_COLLISION_MINGAP_FACTOR: + case SUMO_ATTR_TMP1: + case SUMO_ATTR_TMP2: + case SUMO_ATTR_TMP3: + case SUMO_ATTR_TMP4: + case SUMO_ATTR_TMP5: + case SUMO_ATTR_CF_PWAGNER2009_TAULAST: + case SUMO_ATTR_CF_PWAGNER2009_APPROB: + case SUMO_ATTR_CF_IDMM_ADAPT_FACTOR: + case SUMO_ATTR_CF_IDMM_ADAPT_TIME: + case SUMO_ATTR_CF_WIEDEMANN_SECURITY: + case SUMO_ATTR_CF_WIEDEMANN_ESTIMATION: + case SUMO_ATTR_TRAIN_TYPE: + case SUMO_ATTR_K: + case SUMO_ATTR_CF_KERNER_PHI: + case SUMO_ATTR_CF_IDM_DELTA: + case SUMO_ATTR_CF_IDM_STEPPING: + // JM Values + case SUMO_ATTR_JM_CROSSING_GAP: + case SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME: + case SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME: + case SUMO_ATTR_JM_DRIVE_RED_SPEED: + case SUMO_ATTR_JM_IGNORE_FOE_PROB: + case SUMO_ATTR_JM_IGNORE_FOE_SPEED: + case SUMO_ATTR_JM_SIGMA_MINOR: + case SUMO_ATTR_JM_TIMEGAP_MINOR: + case SUMO_ATTR_IMPATIENCE: + // + case SUMO_ATTR_LENGTH: + case SUMO_ATTR_MINGAP: + case SUMO_ATTR_MAXSPEED: + case SUMO_ATTR_SPEEDFACTOR: + case SUMO_ATTR_SPEEDDEV: + case SUMO_ATTR_COLOR: + case SUMO_ATTR_VCLASS: + case SUMO_ATTR_EMISSIONCLASS: + case SUMO_ATTR_GUISHAPE: + case SUMO_ATTR_WIDTH: + case SUMO_ATTR_IMGFILE: + case SUMO_ATTR_LANE_CHANGE_MODEL: + case SUMO_ATTR_CAR_FOLLOW_MODEL: + case SUMO_ATTR_PERSON_CAPACITY: + case SUMO_ATTR_CONTAINER_CAPACITY: + case SUMO_ATTR_BOARDING_DURATION: + case SUMO_ATTR_LOADING_DURATION: + case SUMO_ATTR_LATALIGNMENT: + case SUMO_ATTR_MINGAP_LAT: + case SUMO_ATTR_MAXSPEED_LAT: + case SUMO_ATTR_ACTIONSTEPLENGTH: + case GNE_ATTR_GENERIC: + // if we change the original value of a default vehicle Type, change also flag "myDefaultVehicleType" + if (myDefaultVehicleType) { + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), true, GNE_ATTR_DEFAULT_VTYPE_MODIFIED, "true")); + } + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), true, key, value)); + break; + case GNE_ATTR_DEFAULT_VTYPE_MODIFIED: + undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), true, key, value)); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNEVehicleType::isValid(SumoXMLAttr key, const std::string& value) { + // a empty value is always valid except for IDs + if ((key != SUMO_ATTR_ID) && value.empty()) { + return true; + } + + switch (key) { + case SUMO_ATTR_ID: + return isValidDemandElementID(value); + // CFM Values + case SUMO_ATTR_SIGMA: + return canParse(value) && (parse(value) >= 0) && (parse(value) <= 1); + case SUMO_ATTR_ACCEL: + case SUMO_ATTR_DECEL: + case SUMO_ATTR_APPARENTDECEL: + case SUMO_ATTR_EMERGENCYDECEL: + case SUMO_ATTR_TAU: + case SUMO_ATTR_COLLISION_MINGAP_FACTOR: + case SUMO_ATTR_TMP1: + case SUMO_ATTR_TMP2: + case SUMO_ATTR_TMP3: + case SUMO_ATTR_TMP4: + case SUMO_ATTR_TMP5: + case SUMO_ATTR_CF_PWAGNER2009_TAULAST: + case SUMO_ATTR_CF_PWAGNER2009_APPROB: + case SUMO_ATTR_CF_IDMM_ADAPT_FACTOR: + case SUMO_ATTR_CF_IDMM_ADAPT_TIME: + case SUMO_ATTR_CF_WIEDEMANN_SECURITY: + case SUMO_ATTR_CF_WIEDEMANN_ESTIMATION: + case SUMO_ATTR_K: + case SUMO_ATTR_CF_KERNER_PHI: + case SUMO_ATTR_CF_IDM_DELTA: + case SUMO_ATTR_CF_IDM_STEPPING: + return canParse(value); + case SUMO_ATTR_TRAIN_TYPE: + // rail string + return SUMOXMLDefinitions::TrainTypes.hasString(value); + // JM Values + case SUMO_ATTR_JM_CROSSING_GAP: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME: + return canParse(value) && (parse(value) >= -1); + case SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME: + return canParse(value) && (parse(value) >= -1); + case SUMO_ATTR_JM_DRIVE_RED_SPEED: + if (value == "maxSpeed") { + return true; + } else { + return canParse(value) && (parse(value) > 0); + } + case SUMO_ATTR_JM_IGNORE_FOE_PROB: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_JM_IGNORE_FOE_SPEED: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_JM_SIGMA_MINOR: + if (value == "sigma") { + return true; + } else { + return canParse(value) && (parse(value) > 0); + } + case SUMO_ATTR_JM_TIMEGAP_MINOR: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_IMPATIENCE: + return canParse(value) && (parse(value) >= 0); + // + case SUMO_ATTR_LENGTH: + return canParse(value) && (parse(value) > 0); + case SUMO_ATTR_MINGAP: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_MAXSPEED: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_SPEEDFACTOR: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_SPEEDDEV: + return canParse(value) && (parse(value) >= 0); + case SUMO_ATTR_COLOR: + if (value.empty()) { + return true; + } else { + return canParse(value); + } + case SUMO_ATTR_VCLASS: + return canParseVehicleClasses(value); + case SUMO_ATTR_EMISSIONCLASS: + /** check **/ + return true; + case SUMO_ATTR_GUISHAPE: + if (value == "all") { + return false; + } else { + return canParseVehicleShape(value); + } + case SUMO_ATTR_WIDTH: + return canParse(value); + case SUMO_ATTR_IMGFILE: + return SUMOXMLDefinitions::isValidFilename(value); + case SUMO_ATTR_LANE_CHANGE_MODEL: + return SUMOXMLDefinitions::LaneChangeModels.hasString(value); + case SUMO_ATTR_CAR_FOLLOW_MODEL: + return SUMOXMLDefinitions::CarFollowModels.hasString(value); + case SUMO_ATTR_PERSON_CAPACITY: + return canParse(value); + case SUMO_ATTR_CONTAINER_CAPACITY: + return canParse(value); + case SUMO_ATTR_BOARDING_DURATION: + return canParse(value); + case SUMO_ATTR_LOADING_DURATION: + return canParse(value); + case SUMO_ATTR_LATALIGNMENT: + return SUMOXMLDefinitions::LateralAlignments.hasString(value); + case SUMO_ATTR_MINGAP_LAT: + return canParse(value); + case SUMO_ATTR_MAXSPEED_LAT: + return canParse(value); + case SUMO_ATTR_ACTIONSTEPLENGTH: + return canParse(value) && (parse(value) > 0); + case GNE_ATTR_GENERIC: + return isGenericParametersValid(value); + case GNE_ATTR_DEFAULT_VTYPE_MODIFIED: + if (myDefaultVehicleType) { + return canParse(value); + } else { + return false; + } + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } +} + + +bool +GNEVehicleType::isDisjointAttributeSet(const SumoXMLAttr /*attr*/) const { + return true; +} + + +std::string +GNEVehicleType::getPopUpID() const { + return getTagStr(); +} + + +std::string +GNEVehicleType::getHierarchyName() const { + return getTagStr() + ": " + getAttribute(SUMO_ATTR_ID) ; +} + + +void +GNEVehicleType::overwriteVType(GNEDemandElement* vType, SUMOVTypeParameter* newVTypeParameter, GNEUndoList* undoList) { + // open undo list and overwritte all values of default VType + undoList->p_begin("update default " + vType->getTagStr() + " '" + DEFAULT_VTYPE_ID + "'"); + // CFM values + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_ACCEL, "").empty()) { + vType->setAttribute(SUMO_ATTR_ACCEL, toString(newVTypeParameter->getCFParam(SUMO_ATTR_ACCEL, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_DECEL, "").empty()) { + vType->setAttribute(SUMO_ATTR_DECEL, toString(newVTypeParameter->getCFParam(SUMO_ATTR_DECEL, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_APPARENTDECEL, "").empty()) { + vType->setAttribute(SUMO_ATTR_APPARENTDECEL, toString(newVTypeParameter->getCFParam(SUMO_ATTR_APPARENTDECEL, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_EMERGENCYDECEL, "").empty()) { + vType->setAttribute(SUMO_ATTR_EMERGENCYDECEL, toString(newVTypeParameter->getCFParam(SUMO_ATTR_EMERGENCYDECEL, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_SIGMA, "").empty()) { + vType->setAttribute(SUMO_ATTR_SIGMA, toString(newVTypeParameter->getCFParam(SUMO_ATTR_SIGMA, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_TAU, "").empty()) { + vType->setAttribute(SUMO_ATTR_TAU, toString(newVTypeParameter->getCFParam(SUMO_ATTR_TAU, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_COLLISION_MINGAP_FACTOR, "").empty()) { + vType->setAttribute(SUMO_ATTR_COLLISION_MINGAP_FACTOR, toString(newVTypeParameter->getCFParam(SUMO_ATTR_COLLISION_MINGAP_FACTOR, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_TMP1, "").empty()) { + vType->setAttribute(SUMO_ATTR_TMP1, toString(newVTypeParameter->getCFParam(SUMO_ATTR_TMP1, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_TMP2, "").empty()) { + vType->setAttribute(SUMO_ATTR_TMP2, toString(newVTypeParameter->getCFParam(SUMO_ATTR_TMP2, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_TMP3, "").empty()) { + vType->setAttribute(SUMO_ATTR_TMP3, toString(newVTypeParameter->getCFParam(SUMO_ATTR_TMP3, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_TMP4, "").empty()) { + vType->setAttribute(SUMO_ATTR_TMP4, toString(newVTypeParameter->getCFParam(SUMO_ATTR_TMP4, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_TMP5, "").empty()) { + vType->setAttribute(SUMO_ATTR_TMP5, toString(newVTypeParameter->getCFParam(SUMO_ATTR_TMP5, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_PWAGNER2009_TAULAST, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_PWAGNER2009_TAULAST, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_PWAGNER2009_TAULAST, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_PWAGNER2009_APPROB, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_PWAGNER2009_APPROB, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_PWAGNER2009_APPROB, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_IDMM_ADAPT_TIME, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_IDMM_ADAPT_TIME, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_IDMM_ADAPT_TIME, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_WIEDEMANN_SECURITY, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_WIEDEMANN_SECURITY, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_WIEDEMANN_SECURITY, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_TRAIN_TYPE, "").empty()) { + vType->setAttribute(SUMO_ATTR_TRAIN_TYPE, toString(newVTypeParameter->getCFParam(SUMO_ATTR_TRAIN_TYPE, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_K, "").empty()) { + vType->setAttribute(SUMO_ATTR_K, toString(newVTypeParameter->getCFParam(SUMO_ATTR_K, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_KERNER_PHI, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_KERNER_PHI, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_KERNER_PHI, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_IDM_DELTA, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_IDM_DELTA, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_IDM_DELTA, 0)), undoList); + } + if (!newVTypeParameter->getCFParamString(SUMO_ATTR_CF_IDM_STEPPING, "").empty()) { + vType->setAttribute(SUMO_ATTR_CF_IDM_STEPPING, toString(newVTypeParameter->getCFParam(SUMO_ATTR_CF_IDM_STEPPING, 0)), undoList); + } + // JM values + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_CROSSING_GAP, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_CROSSING_GAP, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_CROSSING_GAP, 0)), undoList); + } + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, 0)), undoList); + } + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, 0)), undoList); + } + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_DRIVE_RED_SPEED, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_DRIVE_RED_SPEED, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_DRIVE_RED_SPEED, 0)), undoList); + } + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_IGNORE_FOE_PROB, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_IGNORE_FOE_PROB, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_IGNORE_FOE_PROB, 0)), undoList); + } + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_IGNORE_FOE_SPEED, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_IGNORE_FOE_SPEED, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_IGNORE_FOE_SPEED, 0)), undoList); + } + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_SIGMA_MINOR, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_SIGMA_MINOR, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_SIGMA_MINOR, 0)), undoList); + } + if (!newVTypeParameter->getJMParamString(SUMO_ATTR_JM_TIMEGAP_MINOR, "").empty()) { + vType->setAttribute(SUMO_ATTR_JM_TIMEGAP_MINOR, toString(newVTypeParameter->getCFParam(SUMO_ATTR_JM_TIMEGAP_MINOR, 0)), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_IMPATIENCE_SET)) { + vType->setAttribute(SUMO_ATTR_IMPATIENCE, toString(newVTypeParameter->impatience), undoList); + } + // + if (newVTypeParameter->wasSet(VTYPEPARS_LENGTH_SET)) { + vType->setAttribute(SUMO_ATTR_LENGTH, toString(newVTypeParameter->length), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_MINGAP_SET)) { + vType->setAttribute(SUMO_ATTR_MINGAP, toString(newVTypeParameter->minGap), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_MAXSPEED_SET)) { + vType->setAttribute(SUMO_ATTR_MAXSPEED, toString(newVTypeParameter->maxSpeed), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_SPEEDFACTOR_SET)) { + vType->setAttribute(SUMO_ATTR_SPEEDFACTOR, toString(newVTypeParameter->speedFactor.getParameter()[0]), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_SPEEDFACTOR_SET)) { + vType->setAttribute(SUMO_ATTR_SPEEDDEV, toString(newVTypeParameter->speedFactor.getParameter()[1]), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_COLOR_SET)) { + vType->setAttribute(SUMO_ATTR_COLOR, toString(newVTypeParameter->color), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_EMISSIONCLASS_SET)) { + vType->setAttribute(SUMO_ATTR_EMISSIONCLASS, PollutantsInterface::getName(newVTypeParameter->emissionClass), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_SHAPE_SET)) { + vType->setAttribute(SUMO_ATTR_GUISHAPE, getVehicleShapeName(newVTypeParameter->shape), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_WIDTH_SET)) { + vType->setAttribute(SUMO_ATTR_WIDTH, toString(newVTypeParameter->width), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_HEIGHT_SET)) { + vType->setAttribute(SUMO_ATTR_HEIGHT, toString(newVTypeParameter->height), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_IMGFILE_SET)) { + vType->setAttribute(SUMO_ATTR_IMGFILE, toString(newVTypeParameter->imgFile), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_LANE_CHANGE_MODEL_SET)) { + vType->setAttribute(SUMO_ATTR_LANE_CHANGE_MODEL, SUMOXMLDefinitions::LaneChangeModels.getString(newVTypeParameter->lcModel), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_CAR_FOLLOW_MODEL)) { + vType->setAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL, SUMOXMLDefinitions::CarFollowModels.getString(newVTypeParameter->cfModel), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_PERSON_CAPACITY)) { + vType->setAttribute(SUMO_ATTR_PERSON_CAPACITY, toString(newVTypeParameter->personCapacity), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_CONTAINER_CAPACITY)) { + vType->setAttribute(SUMO_ATTR_CONTAINER_CAPACITY, toString(newVTypeParameter->containerCapacity), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_BOARDING_DURATION)) { + vType->setAttribute(SUMO_ATTR_BOARDING_DURATION, toString(newVTypeParameter->boardingDuration), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_LOADING_DURATION)) { + vType->setAttribute(SUMO_ATTR_LOADING_DURATION, toString(newVTypeParameter->loadingDuration), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_LATALIGNMENT_SET)) { + vType->setAttribute(SUMO_ATTR_LATALIGNMENT, toString(newVTypeParameter->latAlignment), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_MINGAP_LAT_SET)) { + vType->setAttribute(SUMO_ATTR_MINGAP_LAT, toString(newVTypeParameter->minGapLat), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_MAXSPEED_LAT_SET)) { + vType->setAttribute(SUMO_ATTR_MAXSPEED_LAT, toString(newVTypeParameter->maxSpeedLat), undoList); + } + if (newVTypeParameter->wasSet(VTYPEPARS_ACTIONSTEPLENGTH_SET)) { + vType->setAttribute(SUMO_ATTR_ACTIONSTEPLENGTH, toString(newVTypeParameter->actionStepLength), undoList); + } + // parse generic parameters + std::string genericParametersStr; + // Generate an string using the following structure: "key1=value1|key2=value2|... + for (auto i : newVTypeParameter->getParametersMap()) { + genericParametersStr += i.first + "=" + i.second + "|"; + } + // remove the last "|" + if (!genericParametersStr.empty()) { + genericParametersStr.pop_back(); + } + if (genericParametersStr != vType->getGenericParametersStr()) { + vType->setAttribute(GNE_ATTR_GENERIC, genericParametersStr, undoList); + } + // close undo list + undoList->p_end(); +} + +// =========================================================================== +// private +// =========================================================================== + +void +GNEVehicleType::setAttribute(SumoXMLAttr key, const std::string& value) { + switch (key) { + case SUMO_ATTR_ID: + changeDemandElementID(value); + break; + // CFM Values + case SUMO_ATTR_ACCEL: + case SUMO_ATTR_DECEL: + case SUMO_ATTR_APPARENTDECEL: + case SUMO_ATTR_EMERGENCYDECEL: + case SUMO_ATTR_SIGMA: + case SUMO_ATTR_TAU: + case SUMO_ATTR_COLLISION_MINGAP_FACTOR: + case SUMO_ATTR_TMP1: + case SUMO_ATTR_TMP2: + case SUMO_ATTR_TMP3: + case SUMO_ATTR_TMP4: + case SUMO_ATTR_TMP5: + case SUMO_ATTR_CF_PWAGNER2009_TAULAST: + case SUMO_ATTR_CF_PWAGNER2009_APPROB: + case SUMO_ATTR_CF_IDMM_ADAPT_FACTOR: + case SUMO_ATTR_CF_IDMM_ADAPT_TIME: + case SUMO_ATTR_CF_WIEDEMANN_SECURITY: + case SUMO_ATTR_CF_WIEDEMANN_ESTIMATION: + case SUMO_ATTR_TRAIN_TYPE: + case SUMO_ATTR_K: + case SUMO_ATTR_CF_KERNER_PHI: + case SUMO_ATTR_CF_IDM_DELTA: + case SUMO_ATTR_CF_IDM_STEPPING: + // empty values means that value isnt't set + if (value.empty()) { + const auto it = cfParameter.find(key); + if (it != cfParameter.end()) { + cfParameter.erase(it); + } + } else { + cfParameter[key] = value; + } + break; + // JM Values + case SUMO_ATTR_JM_CROSSING_GAP: + case SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME: + case SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME: + case SUMO_ATTR_JM_DRIVE_RED_SPEED: + case SUMO_ATTR_JM_IGNORE_FOE_PROB: + case SUMO_ATTR_JM_IGNORE_FOE_SPEED: + case SUMO_ATTR_JM_SIGMA_MINOR: + case SUMO_ATTR_JM_TIMEGAP_MINOR: + // empty values means that value isnt't set + if (value.empty()) { + const auto it = jmParameter.find(key); + if (it != jmParameter.end()) { + jmParameter.erase(it); + } + } else { + jmParameter[key] = value; + } + break; + case SUMO_ATTR_IMPATIENCE: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + impatience = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_IMPATIENCE_SET; + } else { + // set default value + impatience = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_IMPATIENCE_SET; + } + break; + // + case SUMO_ATTR_LENGTH: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + length = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_LENGTH_SET; + } else { + // set default value + length = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_LENGTH_SET; + } + break; + case SUMO_ATTR_MINGAP: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + minGap = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_MINGAP_SET; + } else { + // set default value + minGap = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_MINGAP_SET; + } + break; + case SUMO_ATTR_MAXSPEED: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + maxSpeed = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_MAXSPEED_SET; + } else { + // set default value + maxSpeed = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_MAXSPEED_SET; + } + break; + case SUMO_ATTR_SPEEDFACTOR: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + speedFactor.getParameter()[0] = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_SPEEDFACTOR_SET; + } else { + // set default value + speedFactor.getParameter()[0] = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_SPEEDFACTOR_SET; + } + break; + case SUMO_ATTR_SPEEDDEV: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + speedFactor.getParameter()[1] = parse(value); + } else { + // set default value + speedFactor.getParameter()[1] = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_SPEEDFACTOR_SET; + } + break; + case SUMO_ATTR_COLOR: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + color = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_COLOR_SET; + } else { + // unset parameter + parametersSet &= ~VTYPEPARS_COLOR_SET; + } + break; + case SUMO_ATTR_VCLASS: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + vehicleClass = getVehicleClassID(value); + // mark parameter as set + parametersSet |= VTYPEPARS_VEHICLECLASS_SET; + } else { + // set default value + vehicleClass = getVehicleClassID(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_VEHICLECLASS_SET; + } + break; + case SUMO_ATTR_EMISSIONCLASS: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + emissionClass = PollutantsInterface::getClassByName(value); + // mark parameter as set + parametersSet |= VTYPEPARS_EMISSIONCLASS_SET; + } else { + // set default value + emissionClass = PollutantsInterface::getClassByName("unknown"); + // unset parameter + parametersSet &= ~VTYPEPARS_EMISSIONCLASS_SET; + } + break; + case SUMO_ATTR_GUISHAPE: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + shape = getVehicleShapeID(value); + // mark parameter as set + parametersSet |= VTYPEPARS_SHAPE_SET; + } else { + // set default value + shape = getVehicleShapeID(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_SHAPE_SET; + } + break; + case SUMO_ATTR_WIDTH: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + width = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_WIDTH_SET; + } else { + // set default value + width = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_WIDTH_SET; + } + break; + case SUMO_ATTR_IMGFILE: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + imgFile = value; + // mark parameter as set + parametersSet |= VTYPEPARS_IMGFILE_SET; + } else { + // set default value + imgFile = myTagProperty.getDefaultValue(key); + // unset parameter + parametersSet &= ~VTYPEPARS_IMGFILE_SET; + } + break; + case SUMO_ATTR_LANE_CHANGE_MODEL: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + lcModel = SUMOXMLDefinitions::LaneChangeModels.get(value); + // mark parameter as set + parametersSet |= VTYPEPARS_LANE_CHANGE_MODEL_SET; + } else { + // set default value + lcModel = SUMOXMLDefinitions::LaneChangeModels.get(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_LANE_CHANGE_MODEL_SET; + } + break; + case SUMO_ATTR_CAR_FOLLOW_MODEL: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + cfModel = SUMOXMLDefinitions::CarFollowModels.get(value); + // mark parameter as set + parametersSet |= VTYPEPARS_CAR_FOLLOW_MODEL; + } else { + // set default value + cfModel = SUMOXMLDefinitions::CarFollowModels.get(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_CAR_FOLLOW_MODEL; + } + break; + case SUMO_ATTR_PERSON_CAPACITY: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + personCapacity = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_PERSON_CAPACITY; + } else { + // set default value + personCapacity = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_PERSON_CAPACITY; + } + break; + case SUMO_ATTR_CONTAINER_CAPACITY: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + containerCapacity = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_CONTAINER_CAPACITY; + } else { + // set default value + containerCapacity = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_CONTAINER_CAPACITY; + } + break; + case SUMO_ATTR_BOARDING_DURATION: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + boardingDuration = string2time(value); + // mark parameter as set + parametersSet |= VTYPEPARS_BOARDING_DURATION; + } else { + // set default value + boardingDuration = string2time(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_BOARDING_DURATION; + } + break; + case SUMO_ATTR_LOADING_DURATION: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + loadingDuration = string2time(value); + // mark parameter as set + parametersSet |= VTYPEPARS_LOADING_DURATION; + } else { + // set default value + loadingDuration = string2time(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_LOADING_DURATION; + } + break; + case SUMO_ATTR_LATALIGNMENT: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + latAlignment = SUMOXMLDefinitions::LateralAlignments.get(value); + // mark parameter as set + parametersSet |= VTYPEPARS_LATALIGNMENT_SET; + } else { + // set default value + latAlignment = SUMOXMLDefinitions::LateralAlignments.get(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_LATALIGNMENT_SET; + } + break; + case SUMO_ATTR_MINGAP_LAT: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + minGapLat = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_MINGAP_LAT_SET; + } else { + // set default value + minGapLat = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_MINGAP_LAT_SET; + } + break; + case SUMO_ATTR_MAXSPEED_LAT: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + maxSpeedLat = parse(value); + // mark parameter as set + parametersSet |= VTYPEPARS_MAXSPEED_LAT_SET; + } else { + // set default value + maxSpeedLat = parse(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_MAXSPEED_LAT_SET; + } + break; + case SUMO_ATTR_ACTIONSTEPLENGTH: + if (!value.empty() && (value != myTagProperty.getDefaultValue(key))) { + actionStepLength = string2time(value); + // mark parameter as set + parametersSet |= VTYPEPARS_ACTIONSTEPLENGTH_SET; + } else { + // set default value + actionStepLength = string2time(myTagProperty.getDefaultValue(key)); + // unset parameter + parametersSet &= ~VTYPEPARS_ACTIONSTEPLENGTH_SET; + } + break; + case GNE_ATTR_GENERIC: + setGenericParametersStr(value); + break; + case GNE_ATTR_DEFAULT_VTYPE_MODIFIED: + myDefaultVehicleTypeModified = parse(value); + break; + default: + throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); + } + /* + // mark parameter as set + parametersSet |= VTYPEPARS_HASDRIVERSTATE_SET; + // mark parameter as set + parametersSet |= VTYPEPARS_PROBABILITY_SET; + // mark parameter as set + parametersSet |= VTYPEPARS_HEIGHT_SET; + // mark parameter as set + parametersSet |= VTYPEPARS_OSGFILE_SET; + */ + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { + updateGeometry(true); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicleType.h sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicleType.h --- sumo-1.1.0+dfsg1/src/netedit/demandelements/GNEVehicleType.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/GNEVehicleType.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,157 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleType.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2018 +/// @version $Id$ +/// +// Definition of Vehicle Types in NETEDIT +/****************************************************************************/ +#ifndef GNECalibratorVehicleType_h +#define GNECalibratorVehicleType_h + + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include "GNEDemandElement.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEVehicleType + * vehicleType vehicleType used by GNECalibrators + */ +class GNEVehicleType : public GNEDemandElement, public SUMOVTypeParameter { + +public: + /// @brief constructor for default VTypes + GNEVehicleType(GNEViewNet* viewNet, const std::string& vTypeID, SUMOVehicleClass defaultVClass); + + /// @brief constructor + GNEVehicleType(GNEViewNet* viewNet, const SUMOVTypeParameter& vTypeParameter); + + /// @brief copy constructor + GNEVehicleType(GNEViewNet* viewNet, const std::string& vTypeID, GNEVehicleType* vTypeOriginal); + + /// @brief destructor + ~GNEVehicleType(); + + /// @brief get color + const RGBColor& getColor() const; + + /**@brief writte demand element element into a xml file + * @param[in] device device in which write parameters of demand element element + */ + void writeDemandElement(OutputDevice& device) const; + + /// @name Functions related with geometry of element + /// @{ + /**@brief change the position of the element geometry without saving in undoList + * @param[in] offset Position used for calculate new position of geometry without updating RTree + */ + void moveGeometry(const Position& offset); + + /**@brief commit geometry changes in the attributes of an element after use of moveGeometry(...) + * @param[in] undoList The undoList on which to register changes + */ + void commitGeometryMoving(GNEUndoList* undoList); + + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + + /// @brief Returns position of additional in view + Position getPositionInView() const; + /// @} + + /// @name inherited from GUIGlObject + /// @{ + /**@brief Returns the name of the parent object + * @return This object's parent id + */ + std::string getParentName() 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 inherited from GNEAttributeCarrier + /// @{ + /// @brief select attribute carrier using GUIGlobalSelection + void selectAttributeCarrier(bool changeFlag = true); + + /// @brief unselect attribute carrier using GUIGlobalSelection + void unselectAttributeCarrier(bool changeFlag = true); + + /* @brief method for getting the Attribute of an XML key + * @param[in] key The attribute key + * @return string with the value associated to key + */ + std::string getAttribute(SumoXMLAttr key) const; + + /* @brief method for setting the attribute and letting the object perform additional changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + * @param[in] net optionally the GNENet to inform about gui updates + */ + void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList); + + /* @brief method for setting the attribute and letting the object perform additional changes + * @param[in] key The attribute key + * @param[in] value The new value + * @param[in] undoList The undoList on which to register changes + */ + bool isValid(SumoXMLAttr key, const std::string& value); + + /* @brief method for check if certain attribute is set (used by ACs with disjoint attributes) + * @param[in] key The attribute key + * @return true if it's set, false in other case + */ + bool isDisjointAttributeSet(const SumoXMLAttr attr) const; + + /// @brief get PopPup ID (Used in AC Hierarchy) + std::string getPopUpID() const; + + /// @brief get Hierarchy Name (Used in AC Hierarchy) + std::string getHierarchyName() const; + /// @} + + /// @brief overwrite all values of GNEVehicleType with a SUMOVTypeParameter + static void overwriteVType(GNEDemandElement* vType, SUMOVTypeParameter* newVTypeParameter, GNEUndoList* undoList); + +protected: + /// @brief flag to check if this GNEVehicleType is a default vehicle Type (For Vehicles, Pedestrians...) + bool myDefaultVehicleType; + + /// @brief flag to check if this default GNEVehicleType was modified + bool myDefaultVehicleTypeModified; + +private: + /// @brief method for setting the attribute and nothing else + void setAttribute(SumoXMLAttr key, const std::string& value); + + /// @brief Invalidated copy constructor. + GNEVehicleType(GNEVehicleType*) = delete; + + /// @brief Invalidated assignment operator + GNEVehicleType* operator=(GNEVehicleType*) = delete; +}; + +#endif +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/demandelements/Makefile.am sumo-1.2.0+dfsg1/src/netedit/demandelements/Makefile.am --- sumo-1.1.0+dfsg1/src/netedit/demandelements/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/demandelements/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,8 @@ +noinst_LIBRARIES = libneteditdemandelements.a + +libneteditdemandelements_a_SOURCES = GNERouteHandler.cpp GNERouteHandler.h \ +GNEDemandElement.cpp GNEDemandElement.h \ +GNERoute.cpp GNERoute.h \ +GNEVehicleType.cpp GNEVehicleType.h \ +GNEVehicle.cpp GNEVehicle.h \ +GNEStop.cpp GNEStop.h diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/CMakeLists.txt sumo-1.2.0+dfsg1/src/netedit/dialogs/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/netedit/dialogs/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -7,10 +7,14 @@ GNEDialog_AllowDisallow.cpp GNEGenericParameterDialog.h GNEGenericParameterDialog.cpp - GNEDialog_FixAdditionalPositions.h - GNEDialog_FixAdditionalPositions.cpp + GNEDialog_FixAdditionalElements.h + GNEDialog_FixAdditionalElements.cpp + GNEDialog_FixDemandElements.h + GNEDialog_FixDemandElements.cpp GNEAdditionalDialog.h GNEAdditionalDialog.cpp + GNEDemandElementDialog.h + GNEDemandElementDialog.cpp GNERerouterDialog.h GNERerouterDialog.cpp GNERerouterIntervalDialog.h @@ -19,10 +23,10 @@ GNECalibratorDialog.cpp GNECalibratorFlowDialog.h GNECalibratorFlowDialog.cpp - GNECalibratorRouteDialog.h - GNECalibratorRouteDialog.cpp - GNECalibratorVehicleTypeDialog.h - GNECalibratorVehicleTypeDialog.cpp + GNERouteDialog.h + GNERouteDialog.cpp + GNEVehicleTypeDialog.h + GNEVehicleTypeDialog.cpp GNEDialogACChooser.h GNEDialogACChooser.cpp ) diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.cpp 2018-11-01 23:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -51,7 +51,7 @@ // =========================================================================== GNEAdditionalDialog::GNEAdditionalDialog(GNEAdditional* editedAdditional, bool updatingElement, int width, int height) : - FXTopWindow(editedAdditional->getViewNet(), ("Edit '" + editedAdditional->getID() + "' data").c_str(), editedAdditional->getIcon(), editedAdditional->getIcon(), GUIDesignDialogBoxExplicit, 0, 0, width, height, 0, 0, 0, 0, 4, 4), + FXTopWindow(editedAdditional->getViewNet(), ("Edit '" + editedAdditional->getID() + "' data").c_str(), editedAdditional->getIcon(), editedAdditional->getIcon(), GUIDesignDialogBoxExplicit(width, height)), myEditedAdditional(editedAdditional), myUpdatingElement(updatingElement), myChangesDescription("change " + editedAdditional->getTagStr() + " values"), diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEAdditionalDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,18 +27,19 @@ #include #include #include +#include +#include #include #include +#include #include -#include #include -#include +#include -#include #include "GNECalibratorDialog.h" #include "GNECalibratorFlowDialog.h" -#include "GNECalibratorRouteDialog.h" -#include "GNECalibratorVehicleTypeDialog.h" +#include "GNERouteDialog.h" +#include "GNEVehicleTypeDialog.h" // =========================================================================== // FOX callback mapping @@ -93,7 +94,7 @@ // create add buton and label for flows in right frame FXHorizontalFrame* buttonAndLabelFlow = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame); myAddFlow = new FXButton(buttonAndLabelFlow, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_FLOW, GUIDesignButtonIcon); - myLabelFlow = new FXLabel(buttonAndLabelFlow, ("Add new " + toString(SUMO_TAG_FLOW) + "s").c_str(), nullptr, GUIDesignLabelThick); + myLabelFlow = new FXLabel(buttonAndLabelFlow, ("Add new " + toString(SUMO_TAG_CALIBRATORFLOW) + "s").c_str(), nullptr, GUIDesignLabelThick); // Create table in right frame myFlowList = new FXTable(columnRight, this, MID_GNE_CALIBRATORDIALOG_TABLE_FLOW, GUIDesignTableAdditionals); @@ -151,8 +152,8 @@ long GNECalibratorDialog::onCmdAddRoute(FXObject*, FXSelector, void*) { - // create nes calibrator route and configure it with GNECalibratorRouteDialog - GNECalibratorRouteDialog(new GNECalibratorRoute(myEditedAdditional->getViewNet()), false); + // create nes calibrator route and configure it with GNERouteDialog + GNERouteDialog(new GNERoute(myEditedAdditional->getViewNet()), false); // update routes table updateRouteTable(); return 1; @@ -162,9 +163,9 @@ long GNECalibratorDialog::onCmdClickedRoute(FXObject*, FXSelector, void*) { // check if some delete button was pressed - for (int i = 0; i < (int)myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE).size(); i++) { + for (int i = 0; i < (int)myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).size(); i++) { // obtain rerouter - GNEAdditional* routeToEdit = myEditedAdditional->getViewNet()->getNet()->retrieveAdditional(SUMO_TAG_ROUTE, myRouteList->getItem(i, 0)->getText().text()); + GNEDemandElement* routeToEdit = myEditedAdditional->getViewNet()->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, myRouteList->getItem(i, 0)->getText().text()); if (myRouteList->getItem(i, 2)->hasFocus()) { // find all flows that contains route to delete as "route" parameter std::vector calibratorFlowsToErase; @@ -179,8 +180,8 @@ WRITE_DEBUG("Opening FXMessageBox of type 'question'"); // open question dialog box std::string message = ("Deletio n of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() + "' will remove " + - toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?"); - FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW) + "s").c_str(), "%s", message.c_str()); + toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_CALIBRATORFLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?"); + FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_CALIBRATORFLOW) + "s").c_str(), "%s", message.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc // write warning if netedit is running in testing mode if (answer == 2) { @@ -198,7 +199,7 @@ myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true); } // remove route of calibrator routes - myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(routeToEdit, false), true); + myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true); // update flows and route table updateFlowTable(); updateRouteTable(); @@ -206,14 +207,14 @@ } } else { // remove route - myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(routeToEdit, false), true); + myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true); // update routes table updateRouteTable(); return 1; } } else if (myRouteList->getItem(i, 0)->hasFocus() || myRouteList->getItem(i, 1)->hasFocus()) { // modify route of calibrator routes - GNECalibratorRouteDialog(routeToEdit, true); + GNERouteDialog(routeToEdit, true); // update routes table updateRouteTable(); // update Flows routes also because Route ID could be changed @@ -228,15 +229,15 @@ long GNECalibratorDialog::onCmdAddFlow(FXObject*, FXSelector, void*) { - // only add flow if there is CalibratorRoutes and Calibrator vehicle types - if (myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE).size() > 0) { + // only add flow if there is at least a GNERoute (There is always a Vehicle Type) + if (myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).size() > 0) { // create new calibrator and configure it with GNECalibratorFlowDialog GNECalibratorFlowDialog(new GNECalibratorFlow(myEditedAdditional), false); // update flows table updateFlowTable(); return 1; } else { - throw ProcessError("myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE) cannot be empty"); + throw ProcessError("myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE) cannot be empty"); } } @@ -266,8 +267,9 @@ long GNECalibratorDialog::onCmdAddVehicleType(FXObject*, FXSelector, void*) { - // create new calibrator flow and configure it with GNECalibratorVehicleTypeDialog - GNECalibratorVehicleTypeDialog(new GNECalibratorVehicleType(myEditedAdditional->getViewNet()), false); + // create a new Vehicle Type and configure it with GNEVehicleTypeDialog + std::string vehicleTypeID = myEditedAdditional->getViewNet()->getNet()->generateDemandElementID(SUMO_TAG_VTYPE); + GNEVehicleTypeDialog(new GNEVehicleType(myEditedAdditional->getViewNet(), vehicleTypeID, SVC_PASSENGER), false); // update vehicle types table updateVehicleTypeTable(); return 1; @@ -277,9 +279,9 @@ long GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) { // check if some delete button was pressed - for (int i = 0; i < (int)myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_VTYPE).size(); i++) { + for (int i = 0; i < (int)myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE).size(); i++) { // obtain vehicle type - GNEAdditional* vType = myEditedAdditional->getViewNet()->getNet()->retrieveAdditional(SUMO_TAG_VTYPE, myVehicleTypeList->getItem(i, 0)->getText().text()); + GNEDemandElement* vType = myEditedAdditional->getViewNet()->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, myVehicleTypeList->getItem(i, 0)->getText().text()); // Make sure that default vehicle isn't edited if ((i == 0) && (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus() || myVehicleTypeList->getItem(i, 2)->hasFocus())) { FXMessageBox::warning(getApp(), MBOX_OK, @@ -296,8 +298,8 @@ // if there are flows that has vehicle type to remove as "vehicle type" parameter if (calibratorFlowsToErase.size() > 0) { std::string message = ("Deletion of " + toString(SUMO_TAG_VTYPE) + " '" + myVehicleTypeList->getItem(i, 0)->getText().text() + "' will remove " + - toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?"); - FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW) + "s").c_str(), "%s", message.c_str()); + toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_CALIBRATORFLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?"); + FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_CALIBRATORFLOW) + "s").c_str(), "%s", message.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc // write warning if netedit is running in testing mode if (answer == 2) { @@ -315,7 +317,7 @@ myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true); } // remove vehicle type of calibrator vehicle types - myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(vType, false), true); + myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true); // update flows and vehicle types table updateFlowTable(); updateVehicleTypeTable(); @@ -323,14 +325,14 @@ } } else { // remove vehicle type of calibrator vehicle types - myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(vType, false), true); + myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true); // update vehicle types table updateVehicleTypeTable(); return 1; } } else if (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus()) { - // modify vehicle type of calibratorVehicleTypes - GNECalibratorVehicleTypeDialog(vType, true); + // modify vehicle type + GNEVehicleTypeDialog(vType, true); // update vehicle types table updateVehicleTypeTable(); // update Flows routes also because VType ID could be changed @@ -348,7 +350,7 @@ // clear table myRouteList->clearItems(); // set number of rows - myRouteList->setTableSize(int(myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE).size()), 3); + myRouteList->setTableSize(int(myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).size()), 3); // Configure list myRouteList->setVisibleColumns(4); myRouteList->setColumnWidth(0, 136); @@ -362,7 +364,7 @@ int indexRow = 0; FXTableItem* item = nullptr; // iterate over routes - for (auto i : myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE)) { + for (auto i : myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE)) { // Set ID item = new FXTableItem(toString(i.second->getAttribute(SUMO_ATTR_ID)).c_str()); myRouteList->setItem(indexRow, 0, item); @@ -426,7 +428,7 @@ // clear table myVehicleTypeList->clearItems(); // set number of rows - myVehicleTypeList->setTableSize(int(myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_VTYPE).size()), 3); + myVehicleTypeList->setTableSize(int(myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE).size()), 3); // Configure list myVehicleTypeList->setVisibleColumns(4); myVehicleTypeList->setColumnWidth(0, 136); @@ -440,7 +442,7 @@ int indexRow = 0; FXTableItem* item = nullptr; // iterate over vehicle types - for (auto i : myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_VTYPE)) { + for (auto i : myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE)) { // Set id item = new FXTableItem(i.second->getAttribute(SUMO_ATTR_ID).c_str()); myVehicleTypeList->setItem(indexRow, 0, item); @@ -467,14 +469,14 @@ void GNECalibratorDialog::updateFlowAndLabelButton() { // disable AddFlow button if no route is defined - if (myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE).size() == 0) { + if (myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).size() == 0) { myAddFlow->disable(); myFlowList->disable(); myLabelFlow->setText("No routes defined"); } else { myAddFlow->enable(); myFlowList->enable(); - myLabelFlow->setText(("Add new " + toString(SUMO_TAG_FLOW) + "s").c_str()); + myLabelFlow->setText(("Add new " + toString(SUMO_TAG_CALIBRATORFLOW) + "s").c_str()); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,9 +31,9 @@ // =========================================================================== class GNECalibrator; -class GNECalibratorRoute; +class GNERoute; class GNECalibratorFlow; -class GNECalibratorVehicleType; +class GNEVehicleType; // =========================================================================== // class definitions diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.cpp 2018-11-01 23:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,9 +32,10 @@ #include #include #include -#include -#include +#include #include +#include + #include #include "GNECalibratorFlowDialog.h" @@ -64,7 +65,7 @@ myInvalidAttr(SUMO_ATTR_VEHSPERHOUR) { // change default header std::string typeOfOperation = updatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr() + " for "; - changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getFirstAdditionalParent()->getTagStr() + " '" + myEditedAdditional->getFirstAdditionalParent()->getID() + "'"); + changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getAdditionalParents().at(0)->getTagStr() + " '" + myEditedAdditional->getAdditionalParents().at(0)->getID() + "'"); // Create auxiliar frames for tables FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame); @@ -134,13 +135,13 @@ myTextFieldEnd = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); // fill comboBox of VTypes - for (auto i : myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_VTYPE)) { + for (auto i : myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE)) { myComboBoxVehicleType->appendItem(i.first.c_str()); } myComboBoxVehicleType->setNumVisible((int)myComboBoxVehicleType->getNumItems()); // fill comboBox of Routes - for (auto i : myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE)) { + for (auto i : myEditedAdditional->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE)) { myComboBoxRoute->appendItem(i.first.c_str()); } myComboBoxRoute->setNumVisible((int)myComboBoxRoute->getNumItems()); @@ -168,7 +169,7 @@ GNECalibratorFlowDialog::onCmdAccept(FXObject*, FXSelector, void*) { std::string operation1 = myUpdatingElement ? ("updating") : ("creating"); std::string operation2 = myUpdatingElement ? ("updated") : ("created"); - std::string parentTagString = myEditedAdditional->getFirstAdditionalParent()->getTagStr(); + std::string parentTagString = myEditedAdditional->getAdditionalParents().at(0)->getTagStr(); std::string tagString = myEditedAdditional->getTagStr(); if (myCalibratorFlowValid == false) { // write warning if netedit is running in testing mode @@ -182,7 +183,7 @@ // write warning if netedit is running in testing mode WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; - } else if (!myEditedAdditional->getFirstAdditionalParent()->checkAdditionalChildsOverlapping()) { + } else if (!myEditedAdditional->getAdditionalParents().at(0)->checkAdditionalChildsOverlapping()) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning dialog box diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorFlowDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.cpp 2018-11-01 23:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,192 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorRouteDialog.cpp -/// @author Pablo Alvarez Lopez -/// @date March 2017 -/// @version $Id$ -/// -// Dialog for edit calibrator routes -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GNECalibratorRouteDialog.h" - - -// =========================================================================== -// FOX callback mapping -// =========================================================================== - -FXDEFMAP(GNECalibratorRouteDialog) GNECalibratorRouteDialogMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GNECalibratorRouteDialog::onCmdSetVariable), -}; - -// Object implementation -FXIMPLEMENT(GNECalibratorRouteDialog, GNEAdditionalDialog, GNECalibratorRouteDialogMap, ARRAYNUMBER(GNECalibratorRouteDialogMap)) - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNECalibratorRouteDialog::GNECalibratorRouteDialog(GNEAdditional* editedCalibratorRoute, bool updatingElement) : - GNEAdditionalDialog(editedCalibratorRoute, updatingElement, 400, 120), - myCalibratorRouteValid(true) { - // change default header - std::string typeOfOperation = + " for "; - changeAdditionalDialogHeader(myUpdatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr()); - - // Create auxiliar frames for data - FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame); - FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); - FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); - - // create ID's elements - new FXLabel(columnLeft, toString(SUMO_ATTR_ID).c_str(), nullptr, GUIDesignLabelLeftThick); - myTextFieldRouteID = new FXTextField(columnRight, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // create list of edge's elements - new FXLabel(columnLeft, toString(SUMO_ATTR_EDGES).c_str(), nullptr, GUIDesignLabelLeftThick); - myTextFieldEdges = new FXTextField(columnRight, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // create color's elements - new FXLabel(columnLeft, toString(SUMO_ATTR_COLOR).c_str(), nullptr, GUIDesignLabelLeftThick); - myTextFieldColor = new FXTextField(columnRight, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // update tables - updateCalibratorRouteValues(); - - // start a undo list for editing local to this additional - initChanges(); - - // add element if we aren't updating an existent element - if (myUpdatingElement == false) { - myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(myEditedAdditional, true), true); - // Routes are created without edges - myCalibratorRouteValid = false; - myInvalidAttr = SUMO_ATTR_EDGES; - } - - // open as modal dialog - openAsModalDialog(); -} - - -GNECalibratorRouteDialog::~GNECalibratorRouteDialog() {} - - -long -GNECalibratorRouteDialog::onCmdAccept(FXObject*, FXSelector, void*) { - if (myCalibratorRouteValid == false) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); - std::string operation1 = myUpdatingElement ? ("updating") : ("creating"); - std::string operation2 = myUpdatingElement ? ("updated") : ("created"); - std::string tagString = myEditedAdditional->getTagStr(); - // open warning dialog box - FXMessageBox::warning(getApp(), MBOX_OK, - ("Error " + operation1 + " " + tagString).c_str(), "%s", - (tagString + " cannot be " + operation2 + " because parameter " + toString(myInvalidAttr) + " is invalid.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); - return 0; - } else { - // accept changes before closing dialog - acceptChanges(); - // stop dialgo sucesfully - getApp()->stopModal(this, TRUE); - return 1; - } -} - - -long -GNECalibratorRouteDialog::onCmdCancel(FXObject*, FXSelector, void*) { - // cancel changes - cancelChanges(); - // Stop Modal - getApp()->stopModal(this, FALSE); - return 1; -} - - -long -GNECalibratorRouteDialog::onCmdReset(FXObject*, FXSelector, void*) { - // reset changes - resetChanges(); - // update fields - updateCalibratorRouteValues(); - return 1; -} - - -long -GNECalibratorRouteDialog::onCmdSetVariable(FXObject*, FXSelector, void*) { - // At start we assumed, that all values are valid - myCalibratorRouteValid = true; - myInvalidAttr = SUMO_ATTR_NOTHING; - // set color of myTextFieldRouteID, depending if current value is valid or not - if (myEditedAdditional->getID() == myTextFieldRouteID->getText().text()) { - myTextFieldRouteID->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_ID, myTextFieldRouteID->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else if (myEditedAdditional->isValid(SUMO_ATTR_ID, myTextFieldRouteID->getText().text())) { - myTextFieldRouteID->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_ID, myTextFieldRouteID->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldRouteID->setTextColor(FXRGB(255, 0, 0)); - myCalibratorRouteValid = false; - myInvalidAttr = SUMO_ATTR_ID; - } - // set color of myTextFieldRouteEdges, depending if current value is valEdges or not - if (myEditedAdditional->isValid(SUMO_ATTR_EDGES, myTextFieldEdges->getText().text())) { - myTextFieldEdges->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_EDGES, myTextFieldEdges->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldEdges->setTextColor(FXRGB(255, 0, 0)); - myCalibratorRouteValid = false; - myInvalidAttr = SUMO_ATTR_EDGES; - } - // set color of myTextFieldColor, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_COLOR, myTextFieldColor->getText().text())) { - myTextFieldColor->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_COLOR, myTextFieldColor->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldColor->setTextColor(FXRGB(255, 0, 0)); - myCalibratorRouteValid = false; - myInvalidAttr = SUMO_ATTR_COLOR; - } - return 1; -} - - -void -GNECalibratorRouteDialog::updateCalibratorRouteValues() { - myTextFieldRouteID->setText(myEditedAdditional->getID().c_str()); - myTextFieldEdges->setText(myEditedAdditional->getAttribute(SUMO_ATTR_EDGES).c_str()); - myTextFieldColor->setText(myEditedAdditional->getAttribute(SUMO_ATTR_COLOR).c_str()); -} - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorRouteDialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorRouteDialog.h -/// @author Pablo Alvarez Lopez -/// @date March 2017 -/// @version $Id$ -/// -// Dialog for edit calibrator routes -/****************************************************************************/ -#ifndef GNECalibratorRouteDialog_h -#define GNECalibratorRouteDialog_h - -// =========================================================================== -// included modules -// =========================================================================== - -#include - -#include "GNEAdditionalDialog.h" - -// =========================================================================== -// class declarations -// =========================================================================== - -class GNECalibratorRoute; - -// =========================================================================== -// class definitions -// =========================================================================== - -/** - * @class GNECalibratorRouteDialog - * @brief Dialog for edit Calibrator Routes - */ - -class GNECalibratorRouteDialog : public GNEAdditionalDialog { - /// @brief FOX-declaration - FXDECLARE(GNECalibratorRouteDialog) - -public: - /// @brief constructor - GNECalibratorRouteDialog(GNEAdditional* editedCalibratorRoute, bool updatingElement); - - /// @brief destructor - ~GNECalibratorRouteDialog(); - - /// @name FOX-callbacks - /// @{ - /// @brief event after press accept button - long onCmdAccept(FXObject*, FXSelector, void*); - - /// @brief event after press cancel button - long onCmdCancel(FXObject*, FXSelector, void*); - - /// @brief event after press reset button - long onCmdReset(FXObject*, FXSelector, void*); - - /// @brief event after change value - long onCmdSetVariable(FXObject*, FXSelector, void*); - /// @} - -protected: - /// @brief FOX needs this - GNECalibratorRouteDialog() {} - - /// @brief flag to check if current calibrator vehicleType is valid - bool myCalibratorRouteValid; - - /// @brief current sumo attribute invalid - SumoXMLAttr myInvalidAttr; - - /// @brief route ID - FXTextField* myTextFieldRouteID; - - /// @brief list of edges (string) - FXTextField* myTextFieldEdges; - - /// @brief color of route - FXTextField* myTextFieldColor; - - /// @brief update data fields - void updateCalibratorRouteValues(); - -private: - /// @brief Invalidated copy constructor. - GNECalibratorRouteDialog(const GNECalibratorRouteDialog&) = delete; - - /// @brief Invalidated assignment operator. - GNECalibratorRouteDialog& operator=(const GNECalibratorRouteDialog&) = delete; -}; - -#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.cpp 2018-11-01 23:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,627 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorVehicleTypeDialog.cpp -/// @author Pablo Alvarez Lopez -/// @date March 2017 -/// @version $Id$ -/// -// Dialog for edit calibrator vehicleTypes -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GNECalibratorVehicleTypeDialog.h" - - -// =========================================================================== -// FOX callback mapping -// =========================================================================== - -FXDEFMAP(GNECalibratorVehicleTypeDialog) GNECalibratorVehicleTypeDialogMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GNECalibratorVehicleTypeDialog::onCmdSetVariable), -}; - -// Object implementation -FXIMPLEMENT(GNECalibratorVehicleTypeDialog, GNEAdditionalDialog, GNECalibratorVehicleTypeDialogMap, ARRAYNUMBER(GNECalibratorVehicleTypeDialogMap)) - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNECalibratorVehicleTypeDialog::GNECalibratorVehicleTypeDialog(GNEAdditional* editedCalibratorVehicleType, bool updatingElement) : - GNEAdditionalDialog(editedCalibratorVehicleType, updatingElement, 500, 370), - myCalibratorVehicleTypeValid(true), - myInvalidAttr(SUMO_ATTR_NOTHING) { - // change default header - changeAdditionalDialogHeader(updatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr()); - - // Create auxiliar frames for values - FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame); - FXVerticalFrame* columnLeftLabel = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); - FXVerticalFrame* columnLeftValues = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); - FXVerticalFrame* columnRightLabel = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); - FXVerticalFrame* columnRightValues = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); - - // create FXComboBox for VClass - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_VCLASS).c_str(), nullptr, GUIDesignLabelThick); - myComboBoxVClass = new FXComboBox(columnLeftLabel, GUIDesignComboBoxNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignComboBox); - myComboBoxVClassLabelImage = new FXLabel(columnLeftValues, "", nullptr, GUIDesignLabelIconExtendedx46Ticked); - myComboBoxVClassLabelImage->setBackColor(FXRGBA(255, 255, 255, 255)); - // fill combo Box with all VClass - std::vector VClassStrings = SumoVehicleClassStrings.getStrings(); - for (auto i : VClassStrings) { - if (i != SumoVehicleClassStrings.getString(SVC_IGNORING)) { - myComboBoxVClass->appendItem(i.c_str()); - } - } - // only show 10 VClasses - myComboBoxVClass->setNumVisible(10); - - // create combo bof for vehicle shapes - new FXLabel(columnRightLabel, toString(SUMO_ATTR_GUISHAPE).c_str(), nullptr, GUIDesignLabelThick); - myComboBoxShape = new FXComboBox(columnRightLabel, GUIDesignComboBoxNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignComboBox); - myComboBoxShapeLabelImage = new FXLabel(columnRightValues, "", nullptr, GUIDesignLabelIconExtendedx46Ticked); - myComboBoxShapeLabelImage->setBackColor(FXRGBA(255, 255, 255, 255)); - // fill combo Box with all vehicle shapes - std::vector VShapeStrings = SumoVehicleShapeStrings.getStrings(); - for (auto i : VShapeStrings) { - if (i != SumoVehicleShapeStrings.getString(SVS_UNKNOWN)) { - myComboBoxShape->appendItem(i.c_str()); - } - } - // only show 10 Shapes - myComboBoxShape->setNumVisible(10); - - // 01 create FXTextField and Label for vehicleTypeID - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ID).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldVehicleTypeID = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // 02 create FXTextField and Label for Accel - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ACCEL).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldAccel = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 03 create FXTextField and Label for Decel - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_DECEL).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldDecel = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 04 create FXTextField and Label for Sigma - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_SIGMA).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldSigma = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 05 create FXTextField and Label for Tau - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_TAU).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldTau = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 06 create FXTextField and Label for Length - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_LENGTH).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldLength = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 07 create FXTextField and Label for MinGap - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_MINGAP).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldMinGap = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 08 create FXTextField and Label for MaxSpeed - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_MAXSPEED).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldMaxSpeed = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 09 create FXTextField and Label for SpeedFactor - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_SPEEDFACTOR).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldSpeedFactor = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 10 create FXTextField and Label for SpeedDev - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_SPEEDDEV).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldSpeedDev = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 11 create FXTextField and Label for Color - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_COLOR).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldColor = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // 12 create FXTextField and Label for EmissionClass - new FXLabel(columnLeftLabel, toString(SUMO_ATTR_EMISSIONCLASS).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldEmissionClass = new FXTextField(columnLeftValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // 01 create FXTextField and Label for Width - new FXLabel(columnRightLabel, toString(SUMO_ATTR_WIDTH).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldWidth = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 02 create FXTextField and Label for Filename - new FXLabel(columnRightLabel, toString(SUMO_ATTR_IMGFILE).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldFilename = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // 03 create FXTextField and Label for Impatience - new FXLabel(columnRightLabel, toString(SUMO_ATTR_IMPATIENCE).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldImpatience = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 04 create FXTextField and Label for LaneChangeModel - new FXLabel(columnRightLabel, toString(SUMO_ATTR_LANE_CHANGE_MODEL).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldLaneChangeModel = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 05 create FXTextField and Label for CarFollowModel - new FXLabel(columnRightLabel, toString(SUMO_ATTR_CAR_FOLLOW_MODEL).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldCarFollowModel = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 06 create FXTextField and Label for PersonCapacity - new FXLabel(columnRightLabel, toString(SUMO_ATTR_PERSON_CAPACITY).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldPersonCapacity = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldInt); - - // 07 create FXTextField and Label for ContainerCapacity - new FXLabel(columnRightLabel, toString(SUMO_ATTR_CONTAINER_CAPACITY).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldContainerCapacity = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldInt); - - // 08 create FXTextField and Label for BoardingDuration - new FXLabel(columnRightLabel, toString(SUMO_ATTR_BOARDING_DURATION).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldBoardingDuration = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 09 create FXTextField and Label for LoadingDuration - new FXLabel(columnRightLabel, toString(SUMO_ATTR_LOADING_DURATION).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldLoadingDuration = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 10 create FXTextField and Label for LatAlignment - new FXLabel(columnRightLabel, toString(SUMO_ATTR_LATALIGNMENT).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldLatAlignment = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); - - // 11 create FXTextField and Label for MinGapLat - new FXLabel(columnRightLabel, toString(SUMO_ATTR_MINGAP_LAT).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldMinGapLat = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // 12 create FXTextField and Label for MaxSpeedLat - new FXLabel(columnRightLabel, toString(SUMO_ATTR_MAXSPEED_LAT).c_str(), nullptr, GUIDesignLabelThick); - myTextFieldMaxSpeedLat = new FXTextField(columnRightValues, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextFieldReal); - - // update fields - updateCalibratorVehicleTypeValues(); - - // start a undo list for editing local to this additional - initChanges(); - - // add element if we aren't updating an existent element - if (myUpdatingElement == false) { - myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(myEditedAdditional, true), true); - } - - // open as modal dialog - openAsModalDialog(); -} - - -GNECalibratorVehicleTypeDialog::~GNECalibratorVehicleTypeDialog() {} - - -long -GNECalibratorVehicleTypeDialog::onCmdAccept(FXObject*, FXSelector, void*) { - if (myCalibratorVehicleTypeValid == false) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); - std::string operation1 = myUpdatingElement ? ("updating") : ("creating"); - std::string operation2 = myUpdatingElement ? ("updated") : ("created"); - std::string tagString = myEditedAdditional->getTagStr(); - // open warning dialogBox - FXMessageBox::warning(getApp(), MBOX_OK, - ("Error " + operation1 + " " + tagString).c_str(), "%s", - (tagString + " cannot be " + operation2 + - " because parameter " + toString(myInvalidAttr) + - " is invalid.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); - return 0; - } else { - // accept changes before closing dialog - acceptChanges(); - // stop dialgo sucesfully - getApp()->stopModal(this, TRUE); - return 1; - } -} - - -long -GNECalibratorVehicleTypeDialog::onCmdCancel(FXObject*, FXSelector, void*) { - // cancel changes - cancelChanges(); - // Stop Modal - getApp()->stopModal(this, FALSE); - return 1; -} - - -long -GNECalibratorVehicleTypeDialog::onCmdReset(FXObject*, FXSelector, void*) { - // reset changes - resetChanges(); - // update fields - updateCalibratorVehicleTypeValues(); - return 1; -} - - -long -GNECalibratorVehicleTypeDialog::onCmdSetVariable(FXObject*, FXSelector, void*) { - // At start we assumed, that all values are valid - myCalibratorVehicleTypeValid = true; - myInvalidAttr = SUMO_ATTR_NOTHING; - // set color of myComboBoxShape, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text())) { - myComboBoxShape->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myComboBoxShape->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_GUISHAPE; - } - // set color of myComboBoxVClass, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_VCLASS, myComboBoxVClass->getText().text())) { - myComboBoxVClass->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_VCLASS, myComboBoxVClass->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - setVClassLabelImage(); - } else { - myComboBoxVClass->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_VCLASS; - } - // set color of myTextFieldVehicleTypeID, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text())) { - myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else if (myEditedAdditional->getAttribute(SUMO_ATTR_ID) == myTextFieldVehicleTypeID->getText().text()) { - myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldVehicleTypeID->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_ID; - } - // set color of myTextFieldAccel, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_ACCEL, myTextFieldAccel->getText().text())) { - myTextFieldAccel->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_ACCEL, myTextFieldAccel->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldAccel->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_ACCEL; - } - // set color of myTextFieldDecel, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_DECEL, myTextFieldDecel->getText().text())) { - myTextFieldDecel->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_DECEL, myTextFieldDecel->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldDecel->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_DECEL; - } - // set color of myTextFieldSigma, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_SIGMA, myTextFieldSigma->getText().text())) { - myTextFieldSigma->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_SIGMA, myTextFieldSigma->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldSigma->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_SIGMA; - } - // set color of myTextFieldTau, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_TAU, myTextFieldTau->getText().text())) { - myTextFieldTau->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_TAU, myTextFieldTau->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldTau->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_TAU; - } - // set color of myTextFieldLength, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_LENGTH, myTextFieldLength->getText().text())) { - myTextFieldLength->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_LENGTH, myTextFieldLength->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldLength->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_LENGTH; - } - // set color of myTextFieldMinGap, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_MINGAP, myTextFieldMinGap->getText().text())) { - myTextFieldMinGap->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_MINGAP, myTextFieldMinGap->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldMinGap->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_MINGAP; - } - // set color of myTextFieldMaxSpeed, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_MAXSPEED, myTextFieldMaxSpeed->getText().text())) { - myTextFieldMaxSpeed->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_MAXSPEED, myTextFieldMaxSpeed->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldMaxSpeed->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_MAXSPEED; - } - // set color of myTextFieldSpeedFactor, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_SPEEDFACTOR, myTextFieldSpeedFactor->getText().text())) { - myTextFieldSpeedFactor->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_SPEEDFACTOR, myTextFieldSpeedFactor->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldSpeedFactor->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_SPEEDFACTOR; - } - // set color of myTextFieldSpeedDev, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_SPEEDDEV, myTextFieldSpeedDev->getText().text())) { - myTextFieldSpeedDev->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_SPEEDDEV, myTextFieldSpeedDev->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldSpeedDev->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_SPEEDDEV; - } - // set color of myTextFieldColor, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_COLOR, myTextFieldColor->getText().text())) { - myTextFieldColor->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_COLOR, myTextFieldColor->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldColor->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_COLOR; - } - // set color of myTextFieldEmissionClass, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_EMISSIONCLASS, myTextFieldEmissionClass->getText().text())) { - myTextFieldEmissionClass->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_EMISSIONCLASS, myTextFieldEmissionClass->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldEmissionClass->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_EMISSIONCLASS; - } - // set color of myTextFieldWidth, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_WIDTH, myTextFieldWidth->getText().text())) { - myTextFieldWidth->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_WIDTH, myTextFieldWidth->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldWidth->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_WIDTH; - } - // set color of myTextFieldFilename, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_IMGFILE, myTextFieldFilename->getText().text())) { - myTextFieldFilename->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_IMGFILE, myTextFieldFilename->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldFilename->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_IMGFILE; - } - // set color of myTextFieldImpatience, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_IMPATIENCE, myTextFieldImpatience->getText().text())) { - myTextFieldImpatience->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_IMPATIENCE, myTextFieldImpatience->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldImpatience->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_IMPATIENCE; - } - // set color of myTextFieldLaneChangeModel, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_LANE_CHANGE_MODEL, myTextFieldLaneChangeModel->getText().text())) { - myTextFieldLaneChangeModel->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_LANE_CHANGE_MODEL, myTextFieldLaneChangeModel->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldLaneChangeModel->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_LANE_CHANGE_MODEL; - } - // set color of myTextFieldCarFollowModel, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_CAR_FOLLOW_MODEL, myTextFieldCarFollowModel->getText().text())) { - myTextFieldCarFollowModel->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL, myTextFieldCarFollowModel->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldCarFollowModel->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_CAR_FOLLOW_MODEL; - } - // set color of myTextFieldPersonCapacity, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_PERSON_CAPACITY, myTextFieldPersonCapacity->getText().text())) { - myTextFieldPersonCapacity->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_PERSON_CAPACITY, myTextFieldPersonCapacity->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldPersonCapacity->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_PERSON_CAPACITY; - } - // set color of myTextFieldContainerCapacity, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_CONTAINER_CAPACITY, myTextFieldContainerCapacity->getText().text())) { - myTextFieldContainerCapacity->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_CONTAINER_CAPACITY, myTextFieldContainerCapacity->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldContainerCapacity->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_CONTAINER_CAPACITY; - } - // set color of myTextFieldBoardingDuration, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_BOARDING_DURATION, myTextFieldBoardingDuration->getText().text())) { - myTextFieldBoardingDuration->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_BOARDING_DURATION, myTextFieldBoardingDuration->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldBoardingDuration->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_BOARDING_DURATION; - } - // set color of myTextFieldLoadingDuration, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_LOADING_DURATION, myTextFieldLoadingDuration->getText().text())) { - myTextFieldLoadingDuration->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_LOADING_DURATION, myTextFieldLoadingDuration->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldLoadingDuration->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_LOADING_DURATION; - } - // set color of myTextFieldLatAlignment, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_LATALIGNMENT, myTextFieldLatAlignment->getText().text())) { - myTextFieldLatAlignment->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_LATALIGNMENT, myTextFieldLatAlignment->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldLatAlignment->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_LATALIGNMENT; - } - // set color of myTextFieldMinGapLat, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_MINGAP, myTextFieldMinGapLat->getText().text())) { - myTextFieldMinGapLat->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_MINGAP, myTextFieldMinGapLat->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldMinGapLat->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_MINGAP_LAT; - } - // set color of myTextFieldVehicleTypeID, depending if current value is valid or not - if (myEditedAdditional->isValid(SUMO_ATTR_MAXSPEED, myTextFieldMaxSpeedLat->getText().text())) { - myTextFieldMaxSpeedLat->setTextColor(FXRGB(0, 0, 0)); - myEditedAdditional->setAttribute(SUMO_ATTR_MAXSPEED, myTextFieldMaxSpeedLat->getText().text(), myEditedAdditional->getViewNet()->getUndoList()); - } else { - myTextFieldMaxSpeedLat->setTextColor(FXRGB(255, 0, 0)); - myCalibratorVehicleTypeValid = false; - myInvalidAttr = SUMO_ATTR_MAXSPEED_LAT; - } - return 1; -} - - -void -GNECalibratorVehicleTypeDialog::updateCalibratorVehicleTypeValues() { - //set values of myEditedAdditional int fields - myTextFieldVehicleTypeID->setText(myEditedAdditional->getAttribute(SUMO_ATTR_ID).c_str()); - myComboBoxVClass->setText(myEditedAdditional->getAttribute(SUMO_ATTR_VCLASS).c_str()); - myComboBoxShape->setText(myEditedAdditional->getAttribute(SUMO_ATTR_GUISHAPE).c_str()); - myTextFieldAccel->setText(myEditedAdditional->getAttribute(SUMO_ATTR_ACCEL).c_str()); - myTextFieldDecel->setText(myEditedAdditional->getAttribute(SUMO_ATTR_DECEL).c_str()); - myTextFieldSigma->setText(myEditedAdditional->getAttribute(SUMO_ATTR_SIGMA).c_str()); - myTextFieldTau->setText(myEditedAdditional->getAttribute(SUMO_ATTR_TAU).c_str()); - myTextFieldLength->setText(myEditedAdditional->getAttribute(SUMO_ATTR_LENGTH).c_str()); - myTextFieldMinGap->setText(myEditedAdditional->getAttribute(SUMO_ATTR_MINGAP).c_str()); - myTextFieldMaxSpeed->setText(myEditedAdditional->getAttribute(SUMO_ATTR_MAXSPEED).c_str()); - myTextFieldSpeedFactor->setText(myEditedAdditional->getAttribute(SUMO_ATTR_SPEEDFACTOR).c_str()); - myTextFieldSpeedDev->setText(myEditedAdditional->getAttribute(SUMO_ATTR_SPEEDDEV).c_str()); - myTextFieldColor->setText(myEditedAdditional->getAttribute(SUMO_ATTR_COLOR).c_str()); - myTextFieldEmissionClass->setText(myEditedAdditional->getAttribute(SUMO_ATTR_EMISSIONCLASS).c_str()); - myTextFieldWidth->setText(myEditedAdditional->getAttribute(SUMO_ATTR_WIDTH).c_str()); - myTextFieldFilename->setText(myEditedAdditional->getAttribute(SUMO_ATTR_IMGFILE).c_str()); - myTextFieldImpatience->setText(myEditedAdditional->getAttribute(SUMO_ATTR_IMPATIENCE).c_str()); - myTextFieldLaneChangeModel->setText(myEditedAdditional->getAttribute(SUMO_ATTR_LANE_CHANGE_MODEL).c_str()); - myTextFieldCarFollowModel->setText(myEditedAdditional->getAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL).c_str()); - myTextFieldPersonCapacity->setText(myEditedAdditional->getAttribute(SUMO_ATTR_PERSON_CAPACITY).c_str()); - myTextFieldContainerCapacity->setText(myEditedAdditional->getAttribute(SUMO_ATTR_CONTAINER_CAPACITY).c_str()); - myTextFieldBoardingDuration->setText(myEditedAdditional->getAttribute(SUMO_ATTR_BOARDING_DURATION).c_str()); - myTextFieldLoadingDuration->setText(myEditedAdditional->getAttribute(SUMO_ATTR_LOADING_DURATION).c_str()); - myTextFieldLatAlignment->setText(myEditedAdditional->getAttribute(SUMO_ATTR_LATALIGNMENT).c_str()); - myTextFieldMinGapLat->setText(myEditedAdditional->getAttribute(SUMO_ATTR_MINGAP_LAT).c_str()); - myTextFieldMaxSpeedLat->setText(myEditedAdditional->getAttribute(SUMO_ATTR_MAXSPEED_LAT).c_str()); - // set image labels - setVClassLabelImage(); -} - - -void -GNECalibratorVehicleTypeDialog::setVClassLabelImage() { - // set Icon in label depending of current VClass - switch (getVehicleClassID(myEditedAdditional->getAttribute(SUMO_ATTR_VCLASS))) { - case SVC_PRIVATE: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PRIVATE)); - break; - case SVC_EMERGENCY: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_EMERGENCY)); - break; - case SVC_AUTHORITY: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_AUTHORITY)); - break; - case SVC_ARMY: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_ARMY)); - break; - case SVC_VIP: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_VIP)); - break; - case SVC_PASSENGER: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PASSENGER)); - break; - case SVC_HOV: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_HOV)); - break; - case SVC_TAXI: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TAXI)); - break; - case SVC_BUS: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_BUS)); - break; - case SVC_COACH: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_COACH)); - break; - case SVC_DELIVERY: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_DELIVERY)); - break; - case SVC_TRUCK: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRUCK)); - break; - case SVC_TRAILER: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRAILER)); - break; - case SVC_TRAM: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRAM)); - break; - case SVC_RAIL_URBAN: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL_URBAN)); - break; - case SVC_RAIL: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL)); - break; - case SVC_RAIL_ELECTRIC: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL_ELECTRIC)); - break; - case SVC_MOTORCYCLE: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_MOTORCYCLE)); - break; - case SVC_MOPED: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_MOPED)); - break; - case SVC_BICYCLE: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_BICYCLE)); - break; - case SVC_PEDESTRIAN: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PEDESTRIAN)); - break; - case SVC_E_VEHICLE: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_EVEHICLE)); - break; - case SVC_SHIP: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_SHIP)); - break; - case SVC_CUSTOM1: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_CUSTOM1)); - break; - case SVC_CUSTOM2: - myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_CUSTOM2)); - break; - default: - throw InvalidArgument("Invalid " + toString(SUMO_ATTR_VCLASS) + " " + myEditedAdditional->getAttribute(SUMO_ATTR_VCLASS)); - break; - } -} - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNECalibratorVehicleTypeDialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,177 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNECalibratorVehicleTypeDialog.h -/// @author Pablo Alvarez Lopez -/// @date March 2017 -/// @version $Id$ -/// -// Dialog for edit calibrator vehicleTypes -/****************************************************************************/ -#ifndef GNECalibratorVehicleTypeDialog_h -#define GNECalibratorVehicleTypeDialog_h - -// =========================================================================== -// included modules -// =========================================================================== - -#include - -#include "GNEAdditionalDialog.h" - -// =========================================================================== -// class declarations -// =========================================================================== - -class GNECalibratorVehicleType; - -// =========================================================================== -// class definitions -// =========================================================================== - -/** - * @class GNECalibratorVehicleTypeDialog - * @brief Dialog for edit rerouter intervals - */ - -class GNECalibratorVehicleTypeDialog : public GNEAdditionalDialog { - /// @brief FOX-declaration - FXDECLARE(GNECalibratorVehicleTypeDialog) - -public: - /// @brief constructor - GNECalibratorVehicleTypeDialog(GNEAdditional* editedCalibratorVehicleType, bool updatingElement); - - /// @brief destructor - ~GNECalibratorVehicleTypeDialog(); - - /// @name FOX-callbacks - /// @{ - /// @brief event after press accept button - long onCmdAccept(FXObject*, FXSelector, void*); - - /// @brief event after press cancel button - long onCmdCancel(FXObject*, FXSelector, void*); - - /// @brief event after press reset button - long onCmdReset(FXObject*, FXSelector, void*); - - /// @event after change a variable of vehicle type - long onCmdSetVariable(FXObject*, FXSelector, void*); - /// @} - -protected: - /// @brief FOX needs this - GNECalibratorVehicleTypeDialog() {} - - /// @brief flag to check if current calibrator vehicleType is valid - bool myCalibratorVehicleTypeValid; - - /// @brief current sumo attribute invalid - SumoXMLAttr myInvalidAttr; - - /// @brief FXTextfield for vehicleTypeID - FXTextField* myTextFieldVehicleTypeID; - - /// @brief FXComboBox for VClass - FXComboBox* myComboBoxVClass; - - /// @brief label with image of VClass - FXLabel* myComboBoxVClassLabelImage; - - /// @brief FXComboBox for Shape - FXComboBox* myComboBoxShape; - - /// @brief label with image of Shape - FXLabel* myComboBoxShapeLabelImage; - - /// @brief FXTextfield for Accel - FXTextField* myTextFieldAccel; - - /// @brief FXTextfield for Decel - FXTextField* myTextFieldDecel; - - /// @brief FXTextfield for Sigma - FXTextField* myTextFieldSigma; - - /// @brief FXTextfield for Tau - FXTextField* myTextFieldTau; - - /// @brief FXTextfield for Length - FXTextField* myTextFieldLength; - - /// @brief FXTextfield for MinGap - FXTextField* myTextFieldMinGap; - - /// @brief FXTextfield for MaxSpeed - FXTextField* myTextFieldMaxSpeed; - - /// @brief FXTextfield for SpeedFactor - FXTextField* myTextFieldSpeedFactor; - - /// @brief FXTextfield for SpeedDev - FXTextField* myTextFieldSpeedDev; - - /// @brief FXTextfield for Color - FXTextField* myTextFieldColor; - - /// @brief FXTextfield for EmissionClass - FXTextField* myTextFieldEmissionClass; - - /// @brief FXTextfield for Width - FXTextField* myTextFieldWidth; - - /// @brief FXTextfield for Filename - FXTextField* myTextFieldFilename; - - /// @brief FXTextfield for Impatience - FXTextField* myTextFieldImpatience; - - /// @brief FXTextfield for LaneChangeModel - FXTextField* myTextFieldLaneChangeModel; - - /// @brief FXTextfield for CarFollowModel - FXTextField* myTextFieldCarFollowModel; - - /// @brief FXTextfield for PersonCapacity - FXTextField* myTextFieldPersonCapacity; - - /// @brief FXTextfield for ContainerCapacity - FXTextField* myTextFieldContainerCapacity; - - /// @brief FXTextfield for BoardingDuration - FXTextField* myTextFieldBoardingDuration; - - /// @brief FXTextfield for LoadingDuration - FXTextField* myTextFieldLoadingDuration; - - /// @brief FXTextfield for LatAlignment - FXTextField* myTextFieldLatAlignment; - - /// @brief FXTextfield for MinGapLat - FXTextField* myTextFieldMinGapLat; - - /// @brief FXTextfield for MaxSpeedLat - FXTextField* myTextFieldMaxSpeedLat; - - /// @brief update data fields - void updateCalibratorVehicleTypeValues(); - - /// @brief set VClass texture - void setVClassLabelImage(); - -private: - /// @brief Invalidated copy constructor. - GNECalibratorVehicleTypeDialog(const GNECalibratorVehicleTypeDialog&) = delete; - - /// @brief Invalidated assignment operator. - GNECalibratorVehicleTypeDialog& operator=(const GNECalibratorVehicleTypeDialog&) = delete; -}; - -#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,150 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDemandElementDialog.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2018 +/// @version $Id$ +/// +// A abstract class for editing additional elements +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "GNEDemandElementDialog.h" + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNEDemandElementDialog) GNEDemandElementDialogMap[] = { + FXMAPFUNC(SEL_KEYPRESS, 0, GNEDemandElementDialog::onKeyPress), + FXMAPFUNC(SEL_KEYRELEASE, 0, GNEDemandElementDialog::onKeyRelease), + FXMAPFUNC(SEL_CLOSE, 0, GNEDemandElementDialog::onCmdCancel), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GNEDemandElementDialog::onCmdAccept), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GNEDemandElementDialog::onCmdCancel), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONRESET, GNEDemandElementDialog::onCmdReset), +}; + +// Object abstract implementation +FXIMPLEMENT_ABSTRACT(GNEDemandElementDialog, FXTopWindow, GNEDemandElementDialogMap, ARRAYNUMBER(GNEDemandElementDialogMap)) + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEDemandElementDialog::GNEDemandElementDialog(GNEDemandElement* editedDemandElement, bool updatingElement, int width, int height) : + FXTopWindow(editedDemandElement->getViewNet(), ("Edit '" + editedDemandElement->getID() + "' data").c_str(), editedDemandElement->getIcon(), editedDemandElement->getIcon(), GUIDesignDialogBoxExplicit(width, height)), + myEditedDemandElement(editedDemandElement), + myUpdatingElement(updatingElement), + myChangesDescription("change " + editedDemandElement->getTagStr() + " values"), + myNumberOfChanges(0) { + // create main frame + FXVerticalFrame* mainFrame = new FXVerticalFrame(this, GUIDesignAuxiliarFrame); + // Create frame for contents + myContentFrame = new FXVerticalFrame(mainFrame, GUIDesignContentsFrame); + // create buttons centered + FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(mainFrame, GUIDesignHorizontalFrame); + new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); + myAcceptButton = new FXButton(buttonsFrame, "accept\t\tclose accepting changes", GUIIconSubSys::getIcon(ICON_ACCEPT), this, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GUIDesignButtonAccept); + myCancelButton = new FXButton(buttonsFrame, "cancel\t\tclose discarding changes", GUIIconSubSys::getIcon(ICON_CANCEL), this, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GUIDesignButtonCancel); + myResetButton = new FXButton(buttonsFrame, "reset\t\treset to previous values", GUIIconSubSys::getIcon(ICON_RESET), this, MID_GNE_ADDITIONALDIALOG_BUTTONRESET, GUIDesignButtonReset); + new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); +} + + +GNEDemandElementDialog::~GNEDemandElementDialog() { + // return focus to GNEViewNet to avoid minimization + getParent()->setFocus(); +} + + +FXint +GNEDemandElementDialog::openAsModalDialog(FXuint placement) { + // create Dialog + create(); + // show in the given position + show(placement); + // refresh APP + getApp()->refresh(); + // open as modal dialog (will block all windows until stop() or stopModal() is called) + return getApp()->runModalFor(this); +} + + +GNEDemandElement* +GNEDemandElementDialog::getEditedDemandElement() const { + return myEditedDemandElement; +} + + +long +GNEDemandElementDialog::onKeyPress(FXObject* sender, FXSelector sel, void* ptr) { + return FXTopWindow::onKeyPress(sender, sel, ptr); +} + + +long +GNEDemandElementDialog::onKeyRelease(FXObject* sender, FXSelector sel, void* ptr) { + return FXTopWindow::onKeyRelease(sender, sel, ptr); +} + + +void +GNEDemandElementDialog::changeDemandElementDialogHeader(const std::string& newHeader) { + // change FXDialogBox title + setTitle(newHeader.c_str()); +} + + +void +GNEDemandElementDialog::initChanges() { + // init commandGroup + myEditedDemandElement->getViewNet()->getUndoList()->p_begin(myChangesDescription); + // save number of command group changes + myNumberOfChanges = myEditedDemandElement->getViewNet()->getUndoList()->currentCommandGroupSize(); +} + + +void +GNEDemandElementDialog::acceptChanges() { + // commit changes or abort last command group depending of number of changes did + if (myNumberOfChanges < myEditedDemandElement->getViewNet()->getUndoList()->currentCommandGroupSize()) { + myEditedDemandElement->getViewNet()->getUndoList()->p_end(); + } else { + myEditedDemandElement->getViewNet()->getUndoList()->p_abortLastCommandGroup(); + } +} + + +void +GNEDemandElementDialog::cancelChanges() { + myEditedDemandElement->getViewNet()->getUndoList()->p_abortLastCommandGroup(); +} + + +void +GNEDemandElementDialog::resetChanges() { + // abort last command group an start editing again + myEditedDemandElement->getViewNet()->getUndoList()->p_abortLastCommandGroup(); + myEditedDemandElement->getViewNet()->getUndoList()->p_begin(myChangesDescription); +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDemandElementDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,132 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDemandElementDialog.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2018 +/// @version $Id$ +/// +// A abstract class for editing additional elements +/****************************************************************************/ +#ifndef GNEDemandElementDialog_h +#define GNEDemandElementDialog_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include +#include +#include + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEDemandElement; +class GNEUndoList; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNEDemandElementDialog + * @brief Dialog to edit sequences, parameters, etc.. of DemandElements + */ +class GNEDemandElementDialog : protected FXTopWindow { + /// @brief FOX-declaration abstract + FXDECLARE_ABSTRACT(GNEDemandElementDialog) + +public: + /// @brief constructor + GNEDemandElementDialog(GNEDemandElement* parent, bool updatingElement, int width, int height); + + /// @brief destructor + ~GNEDemandElementDialog(); + + /// @brief get edited DemandElement + GNEDemandElement* getEditedDemandElement() const; + + /// @name FOX-callbacks + /// @{ + /// @brief event after press accept button + virtual long onCmdAccept(FXObject* sender, FXSelector sel, void* ptr) = 0; + + /// @brief event after press cancel button + virtual long onCmdCancel(FXObject* sender, FXSelector sel, void* ptr) = 0; + + /// @brief event after press cancel button + virtual long onCmdReset(FXObject*, FXSelector, void*) = 0; + + /// @brief event after press a key + long onKeyPress(FXObject* sender, FXSelector sel, void* ptr); + + /// @brief event after release a key + long onKeyRelease(FXObject* sender, FXSelector sel, void* ptr); + + /// @} + +protected: + /// @brief FOX needs this + GNEDemandElementDialog() {} + + /// @brief pointer to edited aditional + GNEDemandElement* myEditedDemandElement; + + /// @brief flag to indicate if additional are being created or modified (cannot be changed after open dialog) + bool myUpdatingElement; + + /// @brief frame for contents + FXVerticalFrame* myContentFrame; + + /// @brief execute dialog as modal + FXint openAsModalDialog(FXuint placement = PLACEMENT_CURSOR); + + /// @brief change additional dialog header + void changeDemandElementDialogHeader(const std::string& newHeader); + + /// @brief init a new group of changes that will be do it in dialog + void initChanges(); + + /// @brief Accept changes did in this dialog. + void acceptChanges(); + + /// @brief Cancel changes did in this dialog. + void cancelChanges(); + + /// @brief reset changes did in this dialog. + void resetChanges(); + +private: + /// @brief accept button + FXButton* myAcceptButton; + + /// @brief cancel button + FXButton* myCancelButton; + + /// @brief cancel button + FXButton* myResetButton; + + /// @brief description of changes did in this additional dialog + std::string myChangesDescription; + + /// @brief number of GNEChanges_... in dialog + int myNumberOfChanges; + + /// @brief Invalidated copy constructor + GNEDemandElementDialog(const GNEDemandElementDialog&) = delete; + + /// @brief Invalidated assignment operator + GNEDemandElementDialog& operator=(const GNEDemandElementDialog&) = delete; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_About.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_About.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_About.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_About.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -66,13 +66,13 @@ WRITE_DEBUG(("Modules: " + modules).c_str()); // copyright notice - new FXLabel(this, "Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo); + new FXLabel(this, "Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo); new FXLabel(this, "This application is based on code provided by the Eclipse SUMO project.", nullptr, GUIDesignLabelAboutInfo); new FXLabel(this, "These core components are available under the conditions of the Eclipse Public License v2.", nullptr, GUIDesignLabelAboutInfo); (new FXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("http://www.eclipse.org/legal/epl-v20.html"); // link to homepage - (new FXLinkLabel(this, "http://sumo.dlr.de", nullptr, GUIDesignLabelCenter))->setTipText("http://sumo.dlr.de"); + (new FXLinkLabel(this, "https://sumo.dlr.de", nullptr, GUIDesignLabelCenter))->setTipText("https://sumo.dlr.de"); // centered ok-button FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame); diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_About.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_About.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_About.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_About.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.cpp 2018-10-03 22:01:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -51,8 +51,7 @@ GUIDialog_GLObjChooser(viewParent, icon, title.c_str(), std::vector(), GUIGlObjectStorage::gIDStorage), myACs(ACs), myViewParent(viewParent), - myLocateTLS(title.find("TLS") != std::string::npos) -{ + myLocateTLS(title.find("TLS") != std::string::npos) { // @note refresh must be called here because the base class constructor cannot // call the virtual function getObjectName std::vector ids; @@ -93,7 +92,7 @@ return tlDef->getID() + " (" + o->getMicrosimID() + ")"; } } else { - return o->getMicrosimID(); + return GUIDialog_GLObjChooser::getObjectName(o); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.h 2018-10-03 22:01:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialogACChooser.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.cpp 2018-11-01 23:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,8 +24,8 @@ #include #include #include +#include #include -#include #include #include @@ -70,7 +70,7 @@ new FXLabel(myOptionsFrame, "Allow all vehicles", nullptr, GUIDesignLabelLeftThick); mySelectOnlyNonRoadVClassButton = new FXButton(myOptionsFrame, "", GUIIconSubSys::getIcon(ICON_OK), this, MID_GNE_ALLOWDISALLOW_SELECTONLYNONROAD, GUIDesignButtonIcon); new FXLabel(myOptionsFrame, "Allow only non-road vehicles", nullptr, GUIDesignLabelLeftThick); - myUnselectAllVClassButton = new FXButton(myOptionsFrame, "", GUIIconSubSys::getIcon(ICON_OK), this, MID_GNE_ALLOWDISALLOW_UNSELECTALL, GUIDesignButtonIcon); + myUnselectAllVClassButton = new FXButton(myOptionsFrame, "", GUIIconSubSys::getIcon(ICON_CANCEL), this, MID_GNE_ALLOWDISALLOW_UNSELECTALL, GUIDesignButtonIcon); new FXLabel(myOptionsFrame, "Disallow all vehicles", nullptr, GUIDesignLabelLeftThick); // create groupbox for vehicles FXGroupBox* myGroupBoxVehiclesFrame = new FXGroupBox(mainFrame, ("Select " + toString(SUMO_ATTR_VCLASS) + "es").c_str(), GUIDesignGroupBoxFrame); @@ -207,20 +207,17 @@ // iterate over myVClassMap and set all icons as true for (auto i : myVClassMap) { i.second.first->setIcon(GUIIconSubSys::getIcon(ICON_ACCEPT)); - i.second.second->setText((getVehicleClassNames(i.first) + " allowed").c_str()); } } else { // declare string vector for saving all vclasses - std::vector allowStringVector; - SUMOSAXAttributes::parseStringVector(myAC->getAttribute(SUMO_ATTR_ALLOW), allowStringVector); + const std::vector& allowStringVector = StringTokenizer(myAC->getAttribute(SUMO_ATTR_ALLOW)).getVector(); + const std::set allowSet(allowStringVector.begin(), allowStringVector.end()); // iterate over myVClassMap and set icons for (auto i : myVClassMap) { - if (std::find(allowStringVector.begin(), allowStringVector.end(), getVehicleClassNames(i.first)) != allowStringVector.end()) { + if (allowSet.count(getVehicleClassNames(i.first)) > 0) { i.second.first->setIcon(GUIIconSubSys::getIcon(ICON_ACCEPT)); - i.second.second->setText((getVehicleClassNames(i.first) + " allowed").c_str()); } else { i.second.first->setIcon(GUIIconSubSys::getIcon(ICON_CANCEL)); - i.second.second->setText((getVehicleClassNames(i.first) + " disallowed").c_str()); } } } @@ -239,7 +236,7 @@ FXHorizontalFrame* buttonAndStatusFrame = new FXHorizontalFrame(buttonAndInformationFrame, GUIDesignAuxiliarHorizontalFrame); // create status and text button myVClassMap[vclass].first = new FXButton(buttonAndStatusFrame, "", GUIIconSubSys::getIcon(ICON_EMPTY), this, MID_GNE_ALLOWDISALLOW_CHANGE, GUIDesignButtonIcon); - myVClassMap[vclass].second = new FXLabel(buttonAndStatusFrame, "status", nullptr, GUIDesignLabelLeftThick); + myVClassMap[vclass].second = new FXLabel(buttonAndStatusFrame, toString(vclass).c_str(), nullptr, GUIDesignLabelLeftThick); // create label for description of vehicle new FXLabel(buttonAndInformationFrame, description.c_str(), nullptr, GUIDesignLabelLeftThick); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_AllowDisallow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,392 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDialog_FixAdditionalElements.cpp +/// @author Pablo Alvarez Lopez +/// @date Jul 2017 +/// @version $Id$ +/// +// Dialog used to fix additional elements +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEDialog_FixAdditionalElements.h" + + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNEDialog_FixAdditionalElements) GNEDialog_FixAdditionalElementsMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_CHOOSEN_OPERATION, GNEDialog_FixAdditionalElements::onCmdSelectOption), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GNEDialog_FixAdditionalElements::onCmdAccept), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GNEDialog_FixAdditionalElements::onCmdCancel), +}; + +// Object implementation +FXIMPLEMENT(GNEDialog_FixAdditionalElements, FXDialogBox, GNEDialog_FixAdditionalElementsMap, ARRAYNUMBER(GNEDialog_FixAdditionalElementsMap)) + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEDialog_FixAdditionalElements::GNEDialog_FixAdditionalElements(GNEViewNet* viewNet, const std::vector& invalidSingleLaneAdditionals, const std::vector& invalidMultiLaneAdditionals) : + FXDialogBox(viewNet->getApp(), ("Fix additional problems"), GUIDesignDialogBoxExplicit(500, 380)), + myViewNet(viewNet) { + // set busStop icon for this dialog + setIcon(GUIIconSubSys::getIcon(ICON_BUSSTOP)); + // create main frame + myMainFrame = new FXVerticalFrame(this, GUIDesignAuxiliarFrame); + // create AdditionalList + myAdditionalList = new AdditionalList(this, invalidSingleLaneAdditionals, invalidMultiLaneAdditionals); + // create position options + myPositionOptions = new PositionOptions(this); + // create consecutive lane options + myConsecutiveLaneOptions = new ConsecutiveLaneOptions(this); + // check if position options has to be disabled + if (myAdditionalList->myInvalidSingleLaneAdditionals.empty()) { + myPositionOptions->disablePositionOptions(); + } + // check if consecutive lane options has to be disabled + if (myAdditionalList->myInvalidMultiLaneAdditionals.empty()) { + myConsecutiveLaneOptions->disableConsecutiveLaneOptions(); + } + // create dialog buttons bot centered + FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(myMainFrame, GUIDesignHorizontalFrame); + new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); + myAcceptButton = new FXButton(buttonsFrame, FXWindow::tr("&Accept"), GUIIconSubSys::getIcon(ICON_ACCEPT), this, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GUIDesignButtonAccept); + myCancelButton = new FXButton(buttonsFrame, FXWindow::tr("&Cancel"), GUIIconSubSys::getIcon(ICON_CANCEL), this, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GUIDesignButtonCancel); + new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); + // set focus in accept button + myAcceptButton->setFocus(); +} + + +GNEDialog_FixAdditionalElements::~GNEDialog_FixAdditionalElements() { +} + + +long +GNEDialog_FixAdditionalElements::onCmdSelectOption(FXObject* obj, FXSelector, void*) { + myPositionOptions->selectOption(obj); + myConsecutiveLaneOptions->selectOption(obj); + return 1; +} + + +long +GNEDialog_FixAdditionalElements::onCmdAccept(FXObject*, FXSelector, void*) { + bool continueSaving = true; + // first check options from single lane additionals + if (myAdditionalList->myInvalidSingleLaneAdditionals.size() > 0) { + if (myPositionOptions->activateFriendlyPositionAndSave->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("change " + toString(SUMO_ATTR_FRIENDLY_POS) + " of invalid additionals"); + // iterate over invalid single lane elements to enable friendly position + for (auto i : myAdditionalList->myInvalidSingleLaneAdditionals) { + i->setAttribute(SUMO_ATTR_FRIENDLY_POS, "true", myViewNet->getUndoList()); + } + myViewNet->getUndoList()->p_end(); + } else if (myPositionOptions->fixPositionsAndSave->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("fix positions of invalid additionals"); + // iterate over invalid single lane elements to fix positions + for (auto i : myAdditionalList->myInvalidSingleLaneAdditionals) { + i->fixAdditionalProblem(); + } + myViewNet->getUndoList()->p_end(); + } else if (myPositionOptions->selectInvalidStopsAndCancel->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("select invalid additionals"); + // iterate over invalid single lane elements to select all elements + for (auto i : myAdditionalList->myInvalidSingleLaneAdditionals) { + i->setAttribute(GNE_ATTR_SELECTED, "true", myViewNet->getUndoList()); + } + myViewNet->getUndoList()->p_end(); + // abort saving + continueSaving = false; + } + } + // now check options from multi lane additionals + if (myAdditionalList->myInvalidMultiLaneAdditionals.size() > 0) { + myViewNet->getUndoList()->p_begin("fix multilane additionals problems"); + // fix problems of consecutive lanes + if (myConsecutiveLaneOptions->buildConnectionBetweenLanes->getCheck() == TRUE) { + // iterate over invalid single lane elements to enable friendly position + for (auto i : myAdditionalList->myInvalidMultiLaneAdditionals) { + i->fixAdditionalProblem(); + } + // we need to check if after first fix there is still Invalid MultiL-ane Additionals with errors + auto copyOfInvalidMultiLaneAdditionals = myAdditionalList->myInvalidMultiLaneAdditionals; + myAdditionalList->myInvalidMultiLaneAdditionals.clear(); + for (auto i : copyOfInvalidMultiLaneAdditionals) { + if (!i->isAdditionalValid()) { + myAdditionalList->myInvalidMultiLaneAdditionals.push_back(i); + } + } + } else if (myConsecutiveLaneOptions->removeInvalidElements->getCheck() == TRUE) { + // iterate over invalid single lane elements to fix positions + for (auto i : myAdditionalList->myInvalidMultiLaneAdditionals) { + myViewNet->getNet()->deleteAdditional(i, myViewNet->getUndoList()); + } + // clear myInvalidMultiLaneAdditionals due there isn't more invalid multi lane additionals + myAdditionalList->myInvalidMultiLaneAdditionals.clear(); + } + // fix problem of positions + if (myPositionOptions->activateFriendlyPositionAndSave->getCheck() == TRUE) { + // iterate over invalid single lane elements to enable friendly position + for (auto i : myAdditionalList->myInvalidSingleLaneAdditionals) { + i->setAttribute(SUMO_ATTR_FRIENDLY_POS, "true", myViewNet->getUndoList()); + } + } else if (myPositionOptions->fixPositionsAndSave->getCheck() == TRUE) { + // iterate over invalid single lane elements to fix positions + for (auto i : myAdditionalList->myInvalidSingleLaneAdditionals) { + i->fixAdditionalProblem(); + } + } + myViewNet->getUndoList()->p_end(); + } + if (continueSaving) { + // stop modal with TRUE (continue saving) + getApp()->stopModal(this, TRUE); + } else { + // stop modal with TRUE (abort saving) + getApp()->stopModal(this, FALSE); + } + return 1; +} + + +long +GNEDialog_FixAdditionalElements::onCmdCancel(FXObject*, FXSelector, void*) { + // Stop Modal (abort saving) + getApp()->stopModal(this, FALSE); + return 1; +} + +// --------------------------------------------------------------------------- +// GNEDialog_FixDemandElements::DemandList - methods +// --------------------------------------------------------------------------- + +GNEDialog_FixAdditionalElements::AdditionalList::AdditionalList(GNEDialog_FixAdditionalElements* fixAdditionalPositions, const std::vector& invalidSingleLaneAdditionals, const std::vector& invalidMultiLaneAdditionals) : + FXGroupBox(fixAdditionalPositions->myMainFrame, "Stopping places and E2 detectors with conflicts", GUIDesignGroupBoxFrameFill), + myInvalidSingleLaneAdditionals(invalidSingleLaneAdditionals), + myInvalidMultiLaneAdditionals(invalidMultiLaneAdditionals) { + // Create table, copy intervals and update table + myTable = new FXTable(this, this, MID_GNE_FIXSTOPPINGPLACES_CHANGE, GUIDesignTableAdditionals); + myTable->setSelBackColor(FXRGBA(255, 255, 255, 255)); + myTable->setSelTextColor(FXRGBA(0, 0, 0, 255)); + myTable->setEditable(false); + // clear table + myTable->clearItems(); + // set number of rows + myTable->setTableSize(int(myInvalidSingleLaneAdditionals.size() + myInvalidMultiLaneAdditionals.size()), 3); + // Configure list + myTable->setVisibleColumns(4); + myTable->setColumnWidth(0, GUIDesignTableIconCellWidth); + myTable->setColumnWidth(1, 160); + myTable->setColumnWidth(2, 280); + myTable->setColumnText(0, ""); + myTable->setColumnText(1, toString(SUMO_ATTR_ID).c_str()); + myTable->setColumnText(2, "Conflict"); + myTable->getRowHeader()->setWidth(0); + // Declare index for rows and pointer to FXTableItem + int indexRow = 0; + FXTableItem* item = nullptr; + // iterate over single lane additionals + for (auto i : myInvalidSingleLaneAdditionals) { + // Set icon + item = new FXTableItem("", i->getIcon()); + item->setIconPosition(FXTableItem::CENTER_X); + myTable->setItem(indexRow, 0, item); + // Set ID + item = new FXTableItem(i->getID().c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 1, item); + // Set conflict + item = new FXTableItem(i->getAdditionalProblem().c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 2, item); + // Update index + indexRow++; + } + // iterate over multi lane additionals + for (auto i : myInvalidMultiLaneAdditionals) { + // Set icon + item = new FXTableItem("", i->getIcon()); + item->setIconPosition(FXTableItem::CENTER_X); + myTable->setItem(indexRow, 0, item); + // Set ID + item = new FXTableItem(i->getID().c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 1, item); + // set conflict + item = new FXTableItem((i->getAdditionalProblem()).c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 2, item); + // Update index + indexRow++; + } +} + +// --------------------------------------------------------------------------- +// GNEDialog_FixAdditionalElements::PositionOptions - methods +// --------------------------------------------------------------------------- + +GNEDialog_FixAdditionalElements::PositionOptions::PositionOptions(GNEDialog_FixAdditionalElements* fixAdditionalPositions) : + FXGroupBox(fixAdditionalPositions->myMainFrame, "Select a solution for StoppingPlaces and E2 detectors", GUIDesignGroupBoxFrame) { + // create horizontal frames for radio buttons + FXHorizontalFrame* RadioButtons = new FXHorizontalFrame(this, GUIDesignHorizontalFrame); + // create Vertical Frame for left options + FXVerticalFrame* RadioButtonsLeft = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + activateFriendlyPositionAndSave = new FXRadioButton(RadioButtonsLeft, "Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + saveInvalid = new FXRadioButton(RadioButtonsLeft, "Save invalid positions\t\tSave stopping places and E2 detectors with invalid positions", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // create Vertical Frame for right options + FXVerticalFrame* RadioButtonsRight = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + fixPositionsAndSave = new FXRadioButton(RadioButtonsRight, "Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + selectInvalidStopsAndCancel = new FXRadioButton(RadioButtonsRight, "Select invalid additionals\t\tCancel saving of additionals and select invalid stopping places and E2 detectors", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // leave option "activateFriendlyPositionAndSave" as default + activateFriendlyPositionAndSave->setCheck(true); +} + + +void +GNEDialog_FixAdditionalElements::PositionOptions::selectOption(FXObject* option) { + if (option == activateFriendlyPositionAndSave) { + activateFriendlyPositionAndSave->setCheck(true); + fixPositionsAndSave->setCheck(false); + saveInvalid->setCheck(false); + selectInvalidStopsAndCancel->setCheck(false); + } else if (option == fixPositionsAndSave) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(true); + saveInvalid->setCheck(false); + selectInvalidStopsAndCancel->setCheck(false); + } else if (option == saveInvalid) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(false); + saveInvalid->setCheck(true); + selectInvalidStopsAndCancel->setCheck(false); + } else if (option == selectInvalidStopsAndCancel) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(false); + saveInvalid->setCheck(false); + selectInvalidStopsAndCancel->setCheck(true); + } +} + + +void +GNEDialog_FixAdditionalElements::PositionOptions::enablePositionOptions() { + activateFriendlyPositionAndSave->enable(); + fixPositionsAndSave->enable(); + saveInvalid->enable(); + selectInvalidStopsAndCancel->enable(); +} + + +void +GNEDialog_FixAdditionalElements::PositionOptions::disablePositionOptions() { + activateFriendlyPositionAndSave->disable(); + fixPositionsAndSave->disable(); + saveInvalid->disable(); + selectInvalidStopsAndCancel->disable(); +} + +// --------------------------------------------------------------------------- +// GNEDialog_FixAdditionalElements::ConsecutiveLaneOptions - methods +// --------------------------------------------------------------------------- + +GNEDialog_FixAdditionalElements::ConsecutiveLaneOptions::ConsecutiveLaneOptions(GNEDialog_FixAdditionalElements* fixAdditionalPositions) : + FXGroupBox(fixAdditionalPositions->myMainFrame, "Select a solution for Multilane E2 detectors", GUIDesignGroupBoxFrame) { + // create horizontal frames for radio buttons + FXHorizontalFrame* RadioButtons = new FXHorizontalFrame(this, GUIDesignHorizontalFrame); + // create Vertical Frame for left options + FXVerticalFrame* RadioButtonsLeft = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + buildConnectionBetweenLanes = new FXRadioButton(RadioButtonsLeft, "Build connections between lanes\t\tNew connections will be created between non-connected lanes", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + removeInvalidElements = new FXRadioButton(RadioButtonsLeft, "Remove invalid E2 detectors\t\tRemove Multilane E2 Detectors with non-connected lanes", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // add a vertical separator beween both options + new FXVerticalSeparator(RadioButtons, GUIDesignVerticalSeparator); + // create Vertical Frame for right options + FXVerticalFrame* RadioButtonsRight = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + activateFriendlyPositionAndSave = new FXRadioButton(RadioButtonsRight, "Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + fixPositionsAndSave = new FXRadioButton(RadioButtonsRight, "Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // leave option "buildConnectionBetweenLanes" and "activateFriendlyPositionAndSave" as default + buildConnectionBetweenLanes->setCheck(true); + activateFriendlyPositionAndSave->setCheck(true); +} + + +void +GNEDialog_FixAdditionalElements::ConsecutiveLaneOptions::selectOption(FXObject* option) { + // set top buttons + if (option == buildConnectionBetweenLanes) { + buildConnectionBetweenLanes->setCheck(true); + removeInvalidElements->setCheck(false); + } else if (option == removeInvalidElements) { + buildConnectionBetweenLanes->setCheck(false); + removeInvalidElements->setCheck(true); + } + // set down buttons + if (option == activateFriendlyPositionAndSave) { + activateFriendlyPositionAndSave->setCheck(true); + fixPositionsAndSave->setCheck(false); + } else if (option == fixPositionsAndSave) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(true); + } +} + + +void +GNEDialog_FixAdditionalElements::ConsecutiveLaneOptions::enableConsecutiveLaneOptions() { + buildConnectionBetweenLanes->enable(); + removeInvalidElements->enable(); + activateFriendlyPositionAndSave->enable(); + fixPositionsAndSave->enable(); +} + + +void +GNEDialog_FixAdditionalElements::ConsecutiveLaneOptions::disableConsecutiveLaneOptions() { + buildConnectionBetweenLanes->disable(); + removeInvalidElements->disable(); + activateFriendlyPositionAndSave->disable(); + fixPositionsAndSave->disable(); +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalElements.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,174 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDialog_FixAdditionalElements.h +/// @author Pablo Alvarez Lopez +/// @date Jul 2017 +/// @version $Id$ +/// +// Dialog used to fix additional elements +/****************************************************************************/ +#ifndef GNEDialog_FixAdditionalElements_h +#define GNEDialog_FixAdditionalElements_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include + +// =========================================================================== +// class declarations +// =========================================================================== +class GNEStoppingPlace; +class GNEDetector; +class GNEViewNet; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNEDialog_FixAdditionalElements + * @brief Dialog for edit rerouters + */ +class GNEDialog_FixAdditionalElements : public FXDialogBox { + /// @brief FOX-declaration + FXDECLARE(GNEDialog_FixAdditionalElements) + +public: + /// @brief Constructor + GNEDialog_FixAdditionalElements(GNEViewNet* viewNet, const std::vector& invalidSingleLaneAdditionals, const std::vector& invalidMultiLaneAdditionals); + + /// @brief destructor + ~GNEDialog_FixAdditionalElements(); + + /// @name FOX-callbacks + /// @{ + /// @brief event when user select a option + long onCmdSelectOption(FXObject* obj, FXSelector, void*); + + /// @brief event after press accept button + long onCmdAccept(FXObject*, FXSelector, void*); + + /// @brief event after press cancel button + long onCmdCancel(FXObject*, FXSelector, void*); + /// @} + +protected: + /// @brief groupbox for list + class AdditionalList : protected FXGroupBox { + + public: + /// @brief constructor + AdditionalList(GNEDialog_FixAdditionalElements* fixAdditionalPositions, const std::vector& invalidSingleLaneAdditionals, const std::vector& invalidMultiLaneAdditionals); + + /// @brief vector with the invalid single-lane additionals + std::vector myInvalidSingleLaneAdditionals; + + /// @brief vector with the invalid multi-lane additionals + std::vector myInvalidMultiLaneAdditionals; + + /// @brief list with the stoppingPlaces and detectors + FXTable* myTable; + }; + + /// @brief groupbox for group all radio buttons related to additionals with single lanes + class PositionOptions : public FXGroupBox { + + public: + /// @brief build Position Options + PositionOptions(GNEDialog_FixAdditionalElements* fixAdditionalPositions); + + /// @brief select option + void selectOption(FXObject* option); + + /// @brief enable position options + void enablePositionOptions(); + + /// @brief disable position options + void disablePositionOptions(); + + /// @brief Option "Activate friendlyPos and save" + FXRadioButton* activateFriendlyPositionAndSave; + + /// @brief Option "Fix Positions and save" + FXRadioButton* fixPositionsAndSave; + + /// @brief Option "Save invalid" + FXRadioButton* saveInvalid; + + /// @brief Option "Select invalid stops and cancel" + FXRadioButton* selectInvalidStopsAndCancel; + }; + + /// @brief groupbox for group all radio buttons related to additionals with consecutive lanes + class ConsecutiveLaneOptions : public FXGroupBox { + + public: + /// @brief build consecutive lane Options + ConsecutiveLaneOptions(GNEDialog_FixAdditionalElements* fixAdditionalPositions); + + /// @brief select option + void selectOption(FXObject* option); + + /// @brief enable consecutive lane options + void enableConsecutiveLaneOptions(); + + /// @brief disable consecutive lane options + void disableConsecutiveLaneOptions(); + + /// @brief Option "build connections between lanes" + FXRadioButton* buildConnectionBetweenLanes; + + /// @brief Option "remove invalid elements" + FXRadioButton* removeInvalidElements; + + /// @brief Option "Activate friendlyPos and save" + FXRadioButton* activateFriendlyPositionAndSave; + + /// @brief Option "Fix Positions and save" + FXRadioButton* fixPositionsAndSave; + }; + + /// @brief FOX needs this + GNEDialog_FixAdditionalElements() {} + + /// @brief view net + GNEViewNet* myViewNet; + + /// @brief main + FXVerticalFrame* myMainFrame; + + /// @brief Additional List + AdditionalList* myAdditionalList; + + /// @brief position options + PositionOptions* myPositionOptions; + + /// @brief consecutive lane options + ConsecutiveLaneOptions* myConsecutiveLaneOptions; + + /// @brief accept button + FXButton* myAcceptButton; + + /// @brief cancel button + FXButton* myCancelButton; + +private: + /// @brief Invalidated copy constructor. + GNEDialog_FixAdditionalElements(const GNEDialog_FixAdditionalElements&) = delete; + + /// @brief Invalidated assignment operator. + GNEDialog_FixAdditionalElements& operator=(const GNEDialog_FixAdditionalElements&) = delete; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,382 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNEDialog_FixAdditionalPositions.cpp -/// @author Pablo Alvarez Lopez -/// @date Jul 2017 -/// @version $Id$ -/// -// Dialog used to fix invalid stopping places -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GNEDialog_FixAdditionalPositions.h" - - -// =========================================================================== -// FOX callback mapping -// =========================================================================== - -FXDEFMAP(GNEDialog_FixAdditionalPositions) GNEDialog_FixAdditionalPositionsMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_CHOOSEN_OPERATION, GNEDialog_FixAdditionalPositions::onCmdSelectOption), - FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GNEDialog_FixAdditionalPositions::onCmdAccept), - FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GNEDialog_FixAdditionalPositions::onCmdCancel), -}; - -// Object implementation -FXIMPLEMENT(GNEDialog_FixAdditionalPositions, FXDialogBox, GNEDialog_FixAdditionalPositionsMap, ARRAYNUMBER(GNEDialog_FixAdditionalPositionsMap)) - -// =========================================================================== -// member method definitions -// =========================================================================== - -GNEDialog_FixAdditionalPositions::GNEDialog_FixAdditionalPositions(GNEViewNet* viewNet, const std::vector& invalidSingleLaneAdditionals, const std::vector& invalidMultiLaneAdditionals) : - FXDialogBox(viewNet->getApp(), ("Fix additional problems"), GUIDesignDialogBoxExplicit, 0, 0, 478, 350, 0, 0, 0, 0), - myViewNet(viewNet), - myInvalidSingleLaneAdditionals(invalidSingleLaneAdditionals), - myInvalidMultiLaneAdditionals(invalidMultiLaneAdditionals) { - // set busStop icon for this dialog - setIcon(GUIIconSubSys::getIcon(ICON_BUSSTOP)); - // create main frame - FXVerticalFrame* mainFrame = new FXVerticalFrame(this, GUIDesignAuxiliarFrame); - // create label for table - new FXLabel(mainFrame, "List of Stopping places and E2 detectors with conflicts", nullptr, GUIDesignLabelCenterThick); - // Create table, copy intervals and update table - myTable = new FXTable(mainFrame, this, MID_GNE_FIXSTOPPINGPLACES_CHANGE, GUIDesignTableAdditionals); - myTable->setSelBackColor(FXRGBA(255, 255, 255, 255)); - myTable->setSelTextColor(FXRGBA(0, 0, 0, 255)); - myTable->setEditable(false); - // clear table - myTable->clearItems(); - // set number of rows - myTable->setTableSize(int(myInvalidSingleLaneAdditionals.size() + myInvalidMultiLaneAdditionals.size()), 3); - // Configure list - myTable->setVisibleColumns(4); - myTable->setColumnWidth(0, GUIDesignTableIconCellWidth); - myTable->setColumnWidth(1, 160); - myTable->setColumnWidth(2, 280); - myTable->setColumnText(0, ""); - myTable->setColumnText(1, toString(SUMO_ATTR_ID).c_str()); - myTable->setColumnText(2, "Conflict"); - myTable->getRowHeader()->setWidth(0); - // Declare index for rows and pointer to FXTableItem - int indexRow = 0; - FXTableItem* item = nullptr; - // iterate over single lane additionals - for (auto i : myInvalidSingleLaneAdditionals) { - // Set icon - item = new FXTableItem("", i->getIcon()); - item->setIconPosition(FXTableItem::CENTER_X); - myTable->setItem(indexRow, 0, item); - // Set ID - item = new FXTableItem(i->getID().c_str()); - item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); - myTable->setItem(indexRow, 1, item); - // Set conflict - item = new FXTableItem(i->getAdditionalProblem().c_str()); - item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); - myTable->setItem(indexRow, 2, item); - // Update index - indexRow++; - } - // iterate over multi lane additionals - for (auto i : myInvalidMultiLaneAdditionals) { - // Set icon - item = new FXTableItem("", i->getIcon()); - item->setIconPosition(FXTableItem::CENTER_X); - myTable->setItem(indexRow, 0, item); - // Set ID - item = new FXTableItem(i->getID().c_str()); - item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); - myTable->setItem(indexRow, 1, item); - // set conflict - item = new FXTableItem((i->getAdditionalProblem()).c_str()); - item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); - myTable->setItem(indexRow, 2, item); - // Update index - indexRow++; - } - // create position options - myPositionOptions.buildPositionOptions(this, mainFrame); - // check if position options has to be disabled - if(myInvalidSingleLaneAdditionals.empty()) { - myPositionOptions.disablePositionOptions(); - } - // create consecutive lane options - myConsecutiveLaneOptions.buildConsecutiveLaneOptions(this, mainFrame); - // check if consecutive lane options has to be disabled - if(myInvalidMultiLaneAdditionals.empty()) { - myConsecutiveLaneOptions.disableConsecutiveLaneOptions(); - } - // create dialog buttons bot centered - new FXHorizontalSeparator(mainFrame, GUIDesignHorizontalSeparator); - FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(mainFrame, GUIDesignHorizontalFrame); - new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); - myAcceptButton = new FXButton(buttonsFrame, FXWindow::tr("&Accept"), GUIIconSubSys::getIcon(ICON_ACCEPT), this, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GUIDesignButtonAccept); - myCancelButton = new FXButton(buttonsFrame, FXWindow::tr("&Cancel"), GUIIconSubSys::getIcon(ICON_CANCEL), this, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GUIDesignButtonCancel); - new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); - // set focus in accept button - myAcceptButton->setFocus(); -} - - -GNEDialog_FixAdditionalPositions::~GNEDialog_FixAdditionalPositions() { -} - - -long -GNEDialog_FixAdditionalPositions::onCmdSelectOption(FXObject* obj, FXSelector, void*) { - myPositionOptions.selectOption(obj); - myConsecutiveLaneOptions.selectOption(obj); - return 1; -} - - -long -GNEDialog_FixAdditionalPositions::onCmdAccept(FXObject*, FXSelector, void*) { - bool continueSaving = true; - // first check options from single lane additionals - if(myInvalidSingleLaneAdditionals.size() > 0) { - if (myPositionOptions.activateFriendlyPositionAndSave->getCheck() == TRUE) { - myViewNet->getUndoList()->p_begin("change " + toString(SUMO_ATTR_FRIENDLY_POS) + " of invalid additionals"); - // iterate over invalid single lane elements to enable friendly position - for (auto i : myInvalidSingleLaneAdditionals) { - i->setAttribute(SUMO_ATTR_FRIENDLY_POS, "true", myViewNet->getUndoList()); - } - myViewNet->getUndoList()->p_end(); - } else if (myPositionOptions.fixPositionsAndSave->getCheck() == TRUE) { - myViewNet->getUndoList()->p_begin("fix positions of invalid additionals"); - // iterate over invalid single lane elements to fix positions - for (auto i : myInvalidSingleLaneAdditionals) { - i->fixAdditionalProblem(); - } - myViewNet->getUndoList()->p_end(); - } else if (myPositionOptions.selectInvalidStopsAndCancel->getCheck() == TRUE) { - myViewNet->getUndoList()->p_begin("select invalid additionals"); - // iterate over invalid single lane elements to select all elements - for (auto i : myInvalidSingleLaneAdditionals) { - i->setAttribute(GNE_ATTR_SELECTED, "true", myViewNet->getUndoList()); - } - myViewNet->getUndoList()->p_end(); - // abort saving - continueSaving = false; - } - } - // now check options from multi lane additionals - if(myInvalidMultiLaneAdditionals.size() > 0) { - myViewNet->getUndoList()->p_begin("fix multilane additionals problems"); - // fix problems of consecutive lanes - if (myConsecutiveLaneOptions.buildConnectionBetweenLanes->getCheck() == TRUE) { - // iterate over invalid single lane elements to enable friendly position - for (auto i : myInvalidMultiLaneAdditionals) { - i->fixAdditionalProblem(); - } - // we need to check if after first fix there is still Invalid MultiL-ane Additionals with errors - auto copyOfInvalidMultiLaneAdditionals = myInvalidMultiLaneAdditionals; - myInvalidMultiLaneAdditionals.clear(); - for (auto i : copyOfInvalidMultiLaneAdditionals) { - if(!i->isAdditionalValid()) { - myInvalidMultiLaneAdditionals.push_back(i); - } - } - } else if (myConsecutiveLaneOptions.removeInvalidElements->getCheck() == TRUE) { - // iterate over invalid single lane elements to fix positions - for (auto i : myInvalidMultiLaneAdditionals) { - myViewNet->getViewParent()->getAdditionalFrame()->removeAdditional(i); - } - // clear myInvalidMultiLaneAdditionals due tere isn't more invalid multi lane additionals - myInvalidMultiLaneAdditionals.clear(); - } - // fix problem of positions - if (myPositionOptions.activateFriendlyPositionAndSave->getCheck() == TRUE) { - // iterate over invalid single lane elements to enable friendly position - for (auto i : myInvalidSingleLaneAdditionals) { - i->setAttribute(SUMO_ATTR_FRIENDLY_POS, "true", myViewNet->getUndoList()); - } - } else if (myPositionOptions.fixPositionsAndSave->getCheck() == TRUE) { - // iterate over invalid single lane elements to fix positions - for (auto i : myInvalidSingleLaneAdditionals) { - i->fixAdditionalProblem(); - } - } - myViewNet->getUndoList()->p_end(); - } - if(continueSaving) { - // stop modal with TRUE (continue saving) - getApp()->stopModal(this, TRUE); - } else { - // stop modal with TRUE (abort saving) - getApp()->stopModal(this, FALSE); - } - return 1; -} - - -long -GNEDialog_FixAdditionalPositions::onCmdCancel(FXObject*, FXSelector, void*) { - // Stop Modal (abort saving) - getApp()->stopModal(this, FALSE); - return 1; -} - - -void -GNEDialog_FixAdditionalPositions::PositionOptions::buildPositionOptions(GNEDialog_FixAdditionalPositions *fixAdditionalPositions, FXVerticalFrame* mainFrame) { - // create label for elements - new FXLabel(mainFrame, "Select a solution for StoppingPlaces and E2 detectors:", nullptr, GUIDesignLabelCenterThick); - // create horizontal frames for radio buttons - FXHorizontalFrame* RadioButtons = new FXHorizontalFrame(mainFrame, GUIDesignHorizontalFrame); - // create Vertical Frame for left options - FXVerticalFrame* RadioButtonsLeft = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); - activateFriendlyPositionAndSave = new FXRadioButton(RadioButtonsLeft, "Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - saveInvalid = new FXRadioButton(RadioButtonsLeft, "Save invalid positions\t\tSave stopping places and E2 detectors with invalid positions", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - // create Vertical Frame for right options - FXVerticalFrame* RadioButtonsRight = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); - fixPositionsAndSave = new FXRadioButton(RadioButtonsRight, "Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - selectInvalidStopsAndCancel = new FXRadioButton(RadioButtonsRight, "Select invalid additionals\t\tCancel saving of additionals and select invalid stopping places and E2 detectors", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - // leave option "activateFriendlyPositionAndSave" as default - activateFriendlyPositionAndSave->setCheck(true); -} - - -void -GNEDialog_FixAdditionalPositions::PositionOptions::selectOption(FXObject* option) { - if (option == activateFriendlyPositionAndSave) { - activateFriendlyPositionAndSave->setCheck(true); - fixPositionsAndSave->setCheck(false); - saveInvalid->setCheck(false); - selectInvalidStopsAndCancel->setCheck(false); - } else if (option == fixPositionsAndSave) { - activateFriendlyPositionAndSave->setCheck(false); - fixPositionsAndSave->setCheck(true); - saveInvalid->setCheck(false); - selectInvalidStopsAndCancel->setCheck(false); - } else if (option == saveInvalid) { - activateFriendlyPositionAndSave->setCheck(false); - fixPositionsAndSave->setCheck(false); - saveInvalid->setCheck(true); - selectInvalidStopsAndCancel->setCheck(false); - } else if (option == selectInvalidStopsAndCancel) { - activateFriendlyPositionAndSave->setCheck(false); - fixPositionsAndSave->setCheck(false); - saveInvalid->setCheck(false); - selectInvalidStopsAndCancel->setCheck(true); - } -} - - -void -GNEDialog_FixAdditionalPositions::PositionOptions::enablePositionOptions() { - activateFriendlyPositionAndSave->enable(); - fixPositionsAndSave->enable(); - saveInvalid->enable(); - selectInvalidStopsAndCancel->enable(); -} - - -void -GNEDialog_FixAdditionalPositions::PositionOptions::disablePositionOptions() { - activateFriendlyPositionAndSave->disable(); - fixPositionsAndSave->disable(); - saveInvalid->disable(); - selectInvalidStopsAndCancel->disable(); -} - - -void -GNEDialog_FixAdditionalPositions::ConsecutiveLaneOptions::buildConsecutiveLaneOptions(GNEDialog_FixAdditionalPositions *fixAdditionalPositions, FXVerticalFrame* mainFrame) { - // create label for elements - new FXLabel(mainFrame, "Select a solution for Multilane E2 detectors:", nullptr, GUIDesignLabelCenterThick); - // create horizontal frames for radio buttons - FXHorizontalFrame* RadioButtons = new FXHorizontalFrame(mainFrame, GUIDesignHorizontalFrame); - // create Vertical Frame for left options - FXVerticalFrame* RadioButtonsLeft = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); - buildConnectionBetweenLanes = new FXRadioButton(RadioButtonsLeft, "Build connections between lanes\t\tNew connections will be created between non-connected lanes", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - removeInvalidElements = new FXRadioButton(RadioButtonsLeft, "Remove invalid E2 detectors\t\tRemove Multilane E2 Detectors with non-connected lanes", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - // add a vertical separator beween both options - new FXVerticalSeparator(RadioButtons, GUIDesignVerticalSeparator); - // create Vertical Frame for right options - FXVerticalFrame* RadioButtonsRight = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); - activateFriendlyPositionAndSave = new FXRadioButton(RadioButtonsRight, "Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - fixPositionsAndSave = new FXRadioButton(RadioButtonsRight, "Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed", - fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); - // leave option "buildConnectionBetweenLanes" and "activateFriendlyPositionAndSave" as default - buildConnectionBetweenLanes->setCheck(true); - activateFriendlyPositionAndSave->setCheck(true); -} - - -void -GNEDialog_FixAdditionalPositions::ConsecutiveLaneOptions::selectOption(FXObject* option) { - // set top buttons - if (option == buildConnectionBetweenLanes) { - buildConnectionBetweenLanes->setCheck(true); - removeInvalidElements->setCheck(false); - } else if (option == removeInvalidElements) { - buildConnectionBetweenLanes->setCheck(false); - removeInvalidElements->setCheck(true); - } - // set down buttons - if (option == activateFriendlyPositionAndSave) { - activateFriendlyPositionAndSave->setCheck(true); - fixPositionsAndSave->setCheck(false); - } else if (option == fixPositionsAndSave) { - activateFriendlyPositionAndSave->setCheck(false); - fixPositionsAndSave->setCheck(true); - } -} - - -void -GNEDialog_FixAdditionalPositions::ConsecutiveLaneOptions::enableConsecutiveLaneOptions() { - buildConnectionBetweenLanes->enable(); - removeInvalidElements->enable(); - activateFriendlyPositionAndSave->enable(); - fixPositionsAndSave->enable(); -} - - -void -GNEDialog_FixAdditionalPositions::ConsecutiveLaneOptions::disableConsecutiveLaneOptions() { - buildConnectionBetweenLanes->disable(); - removeInvalidElements->disable(); - activateFriendlyPositionAndSave->disable(); - fixPositionsAndSave->disable(); -} - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.h 2018-10-01 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixAdditionalPositions.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GNEDialog_FixAdditionalPositions.h -/// @author Pablo Alvarez Lopez -/// @date Jul 2017 -/// @version $Id$ -/// -// Dialog used to fix invalid stopping places -/****************************************************************************/ -#ifndef GNEDialog_FixAdditionalPositions_h -#define GNEDialog_FixAdditionalPositions_h - -// =========================================================================== -// included modules -// =========================================================================== - -#include - -#include - -// =========================================================================== -// class declarations -// =========================================================================== -class GNEStoppingPlace; -class GNEDetector; -class GNEViewNet; - -// =========================================================================== -// class definitions -// =========================================================================== - -/** - * @class GNEDialog_FixAdditionalPositions - * @brief Dialog for edit rerouters - */ -class GNEDialog_FixAdditionalPositions : public FXDialogBox { - /// @brief FOX-declaration - FXDECLARE(GNEDialog_FixAdditionalPositions) - -public: - /// @brief Constructor - GNEDialog_FixAdditionalPositions(GNEViewNet* viewNet, const std::vector& invalidSingleLaneAdditionals, const std::vector& invalidMultiLaneAdditionals); - - /// @brief destructor - ~GNEDialog_FixAdditionalPositions(); - - /// @name FOX-callbacks - /// @{ - /// @brief event when user select a option - long onCmdSelectOption(FXObject* obj, FXSelector, void*); - - /// @brief event after press accept button - long onCmdAccept(FXObject*, FXSelector, void*); - - /// @brief event after press cancel button - long onCmdCancel(FXObject*, FXSelector, void*); - /// @} - -protected: - /// @brief struct for group all radio buttons related with position - struct PositionOptions { - /// @brief build Position Options - void buildPositionOptions(GNEDialog_FixAdditionalPositions *fixAdditionalPositions, FXVerticalFrame* mainFrame); - - /// @brief select option - void selectOption(FXObject* option); - - /// @brief enable position options - void enablePositionOptions(); - - /// @brief disable position options - void disablePositionOptions(); - - /// @brief Option "Activate friendlyPos and save" - FXRadioButton* activateFriendlyPositionAndSave; - - /// @brief Option "Fix Positions and save" - FXRadioButton* fixPositionsAndSave; - - /// @brief Option "Save invalid" - FXRadioButton* saveInvalid; - - /// @brief Option "Select invalid stops and cancel" - FXRadioButton* selectInvalidStopsAndCancel; - }; - - /// @brief struct for group all radio buttons related with position - struct ConsecutiveLaneOptions { - /// @brief build consecutive lane Options - void buildConsecutiveLaneOptions(GNEDialog_FixAdditionalPositions *fixAdditionalPositions, FXVerticalFrame* mainFrame); - - /// @brief select option - void selectOption(FXObject* option); - - /// @brief enable consecutive lane options - void enableConsecutiveLaneOptions(); - - /// @brief disable consecutive lane options - void disableConsecutiveLaneOptions(); - - /// @brief Option "build connections between lanes" - FXRadioButton* buildConnectionBetweenLanes; - - /// @brief Option "remove invalid elements" - FXRadioButton* removeInvalidElements; - - /// @brief Option "Activate friendlyPos and save" - FXRadioButton* activateFriendlyPositionAndSave; - - /// @brief Option "Fix Positions and save" - FXRadioButton* fixPositionsAndSave; - }; - - /// @brief FOX needs this - GNEDialog_FixAdditionalPositions() {} - - /// @brief view net - GNEViewNet* myViewNet; - - /// @brief vector with the invalid single-lane additionals - std::vector myInvalidSingleLaneAdditionals; - - /// @brief vector with the invalid multi-lane additionals - std::vector myInvalidMultiLaneAdditionals; - - /// @brief list with the stoppingPlaces and detectors - FXTable* myTable; - - /// @brief struct with position options - PositionOptions myPositionOptions; - - /// @brief struct with the consecutive lane options - ConsecutiveLaneOptions myConsecutiveLaneOptions; - - /// @brief accept button - FXButton* myAcceptButton; - - /// @brief cancel button - FXButton* myCancelButton; - -private: - /// @brief Invalidated copy constructor. - GNEDialog_FixAdditionalPositions(const GNEDialog_FixAdditionalPositions&) = delete; - - /// @brief Invalidated assignment operator. - GNEDialog_FixAdditionalPositions& operator=(const GNEDialog_FixAdditionalPositions&) = delete; -}; - -#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,386 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDialog_FixDemandElements.cpp +/// @author Pablo Alvarez Lopez +/// @date Jul 2017 +/// @version $Id$ +/// +// Dialog used to fix demand elements during saving +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEDialog_FixDemandElements.h" + + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNEDialog_FixDemandElements) GNEDialog_FixDemandElementsMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_CHOOSEN_OPERATION, GNEDialog_FixDemandElements::onCmdSelectOption), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GNEDialog_FixDemandElements::onCmdAccept), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GNEDialog_FixDemandElements::onCmdCancel), +}; + +// Object implementation +FXIMPLEMENT(GNEDialog_FixDemandElements, FXDialogBox, GNEDialog_FixDemandElementsMap, ARRAYNUMBER(GNEDialog_FixDemandElementsMap)) + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEDialog_FixDemandElements::GNEDialog_FixDemandElements(GNEViewNet* viewNet, const std::vector& invalidDemandElements) : + FXDialogBox(viewNet->getApp(), "Fix demand elements problems", GUIDesignDialogBoxExplicit(500, 380)), + myViewNet(viewNet) { + // set busStop icon for this dialog + setIcon(GUIIconSubSys::getIcon(ICON_ROUTE)); + // create main frame + myMainFrame = new FXVerticalFrame(this, GUIDesignAuxiliarFrame); + // create demand list + myDemandList = new DemandList(this, invalidDemandElements); + // create fix route options + myFixRouteOptions = new FixRouteOptions(this); + // create route options + myFixVehicleOptions = new FixVehicleOptions(this); + // check if fix route options has to be disabled + if (myDemandList->myInvalidRoutes.empty()) { + myFixRouteOptions->disableFixRouteOptions(); + } + // check if fix vehicle options has to be disabled + if (myDemandList->myInvalidVehicles.empty()) { + myFixVehicleOptions->disableFixVehicleOptions(); + } + // create dialog buttons bot centered + FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(myMainFrame, GUIDesignHorizontalFrame); + new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); + myAcceptButton = new FXButton(buttonsFrame, FXWindow::tr("&Accept"), GUIIconSubSys::getIcon(ICON_ACCEPT), this, MID_GNE_ADDITIONALDIALOG_BUTTONACCEPT, GUIDesignButtonAccept); + myCancelButton = new FXButton(buttonsFrame, FXWindow::tr("&Cancel"), GUIIconSubSys::getIcon(ICON_CANCEL), this, MID_GNE_ADDITIONALDIALOG_BUTTONCANCEL, GUIDesignButtonCancel); + new FXHorizontalFrame(buttonsFrame, GUIDesignAuxiliarHorizontalFrame); + // set focus in accept button + myAcceptButton->setFocus(); +} + + +GNEDialog_FixDemandElements::~GNEDialog_FixDemandElements() { +} + + +long +GNEDialog_FixDemandElements::onCmdSelectOption(FXObject* obj, FXSelector, void*) { + myFixRouteOptions->selectOption(obj); + myFixVehicleOptions->selectOption(obj); + return 1; +} + + +long +GNEDialog_FixDemandElements::onCmdAccept(FXObject*, FXSelector, void*) { + bool continueSaving = true; + // first check options from single lane additionals + if (myDemandList->myInvalidRoutes.size() > 0) { + if (myFixRouteOptions->activateFriendlyPositionAndSave->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("change " + toString(SUMO_ATTR_FRIENDLY_POS) + " of invalid additionals"); + // iterate over invalid single lane elements to enable friendly position + for (auto i : myDemandList->myInvalidRoutes) { + i->setAttribute(SUMO_ATTR_FRIENDLY_POS, "true", myViewNet->getUndoList()); + } + myViewNet->getUndoList()->p_end(); + } else if (myFixRouteOptions->fixPositionsAndSave->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("fix positions of invalid additionals"); + // iterate over invalid single lane elements to fix positions + for (auto i : myDemandList->myInvalidRoutes) { + i->fixDemandElementProblem(); + } + myViewNet->getUndoList()->p_end(); + } else if (myFixRouteOptions->selectInvalidStopsAndCancel->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("select invalid additionals"); + // iterate over invalid single lane elements to select all elements + for (auto i : myDemandList->myInvalidRoutes) { + i->setAttribute(GNE_ATTR_SELECTED, "true", myViewNet->getUndoList()); + } + myViewNet->getUndoList()->p_end(); + // abort saving + continueSaving = false; + } + } + + // first check options from single lane additionals + if (myDemandList->myInvalidVehicles.size() > 0) { + if (myFixRouteOptions->activateFriendlyPositionAndSave->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("change " + toString(SUMO_ATTR_FRIENDLY_POS) + " of invalid additionals"); + // iterate over invalid single lane elements to enable friendly position + for (auto i : myDemandList->myInvalidVehicles) { + i->setAttribute(SUMO_ATTR_FRIENDLY_POS, "true", myViewNet->getUndoList()); + } + myViewNet->getUndoList()->p_end(); + } else if (myFixRouteOptions->fixPositionsAndSave->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("fix positions of invalid additionals"); + // iterate over invalid single lane elements to fix positions + for (auto i : myDemandList->myInvalidVehicles) { + i->fixDemandElementProblem(); + } + myViewNet->getUndoList()->p_end(); + } else if (myFixRouteOptions->selectInvalidStopsAndCancel->getCheck() == TRUE) { + myViewNet->getUndoList()->p_begin("select invalid additionals"); + // iterate over invalid single lane elements to select all elements + for (auto i : myDemandList->myInvalidVehicles) { + i->setAttribute(GNE_ATTR_SELECTED, "true", myViewNet->getUndoList()); + } + myViewNet->getUndoList()->p_end(); + // abort saving + continueSaving = false; + } + } + if (continueSaving) { + // stop modal with TRUE (continue saving) + getApp()->stopModal(this, TRUE); + } else { + // stop modal with TRUE (abort saving) + getApp()->stopModal(this, FALSE); + } + return 1; +} + + +long +GNEDialog_FixDemandElements::onCmdCancel(FXObject*, FXSelector, void*) { + // Stop Modal (abort saving) + getApp()->stopModal(this, FALSE); + return 1; +} + +// --------------------------------------------------------------------------- +// GNEDialog_FixDemandElements::DemandList - methods +// --------------------------------------------------------------------------- + +GNEDialog_FixDemandElements::DemandList::DemandList(GNEDialog_FixDemandElements* fixAdditionalPositions, const std::vector& invalidDemandElements) : + FXGroupBox(fixAdditionalPositions->myMainFrame, "Routes and Vehicles with conflicts", GUIDesignGroupBoxFrameFill) { + // Create table, copy intervals and update table + myTable = new FXTable(this, this, MID_GNE_FIXSTOPPINGPLACES_CHANGE, GUIDesignTableAdditionals); + myTable->setSelBackColor(FXRGBA(255, 255, 255, 255)); + myTable->setSelTextColor(FXRGBA(0, 0, 0, 255)); + myTable->setEditable(false); + // separate demand elements in two groups + for (const auto& i : invalidDemandElements) { + if (i->getTagProperty().isVehicle()) { + myInvalidVehicles.push_back(i); + } else { + myInvalidRoutes.push_back(i); + } + } + // clear table + myTable->clearItems(); + // set number of rows + myTable->setTableSize((int)(myInvalidRoutes.size() + myInvalidVehicles.size()), 3); + // Configure list + myTable->setVisibleColumns(4); + myTable->setColumnWidth(0, GUIDesignTableIconCellWidth); + myTable->setColumnWidth(1, 160); + myTable->setColumnWidth(2, 280); + myTable->setColumnText(0, ""); + myTable->setColumnText(1, toString(SUMO_ATTR_ID).c_str()); + myTable->setColumnText(2, "Conflict"); + myTable->getRowHeader()->setWidth(0); + // Declare index for rows and pointer to FXTableItem + int indexRow = 0; + FXTableItem* item = nullptr; + // iterate over invalid routes + for (auto i : myInvalidRoutes) { + // Set icon + item = new FXTableItem("", i->getIcon()); + item->setIconPosition(FXTableItem::CENTER_X); + myTable->setItem(indexRow, 0, item); + // Set ID + item = new FXTableItem(i->getID().c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 1, item); + // Set conflict + item = new FXTableItem(i->getDemandElementProblem().c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 2, item); + // Update index + indexRow++; + } + // iterate over invalid vehicles + for (auto i : myInvalidVehicles) { + // Set icon + item = new FXTableItem("", i->getIcon()); + item->setIconPosition(FXTableItem::CENTER_X); + myTable->setItem(indexRow, 0, item); + // Set ID + item = new FXTableItem(i->getID().c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 1, item); + // Set conflict + item = new FXTableItem(i->getDemandElementProblem().c_str()); + item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y); + myTable->setItem(indexRow, 2, item); + // Update index + indexRow++; + } +} + + +// --------------------------------------------------------------------------- +// GNEDialog_FixDemandElements::FixRouteOptions - methods +// --------------------------------------------------------------------------- + +GNEDialog_FixDemandElements::FixRouteOptions::FixRouteOptions(GNEDialog_FixDemandElements* fixAdditionalPositions) : + FXGroupBox(fixAdditionalPositions->myMainFrame, "Solution for routes", GUIDesignGroupBoxFrame) { + // create horizontal frames for radio buttons + FXHorizontalFrame* RadioButtons = new FXHorizontalFrame(this, GUIDesignHorizontalFrame); + // create Vertical Frame for left options + FXVerticalFrame* RadioButtonsLeft = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + activateFriendlyPositionAndSave = new FXRadioButton(RadioButtonsLeft, "Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + saveInvalid = new FXRadioButton(RadioButtonsLeft, "Save invalid positions\t\tSave stopping places and E2 detectors with invalid positions", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // create Vertical Frame for right options + FXVerticalFrame* RadioButtonsRight = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + fixPositionsAndSave = new FXRadioButton(RadioButtonsRight, "Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + selectInvalidStopsAndCancel = new FXRadioButton(RadioButtonsRight, "Select invalid additionals\t\tCancel saving of additionals and select invalid stopping places and E2 detectors", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // leave option "activateFriendlyPositionAndSave" as default + activateFriendlyPositionAndSave->setCheck(true); +} + + +void +GNEDialog_FixDemandElements::FixRouteOptions::selectOption(FXObject* option) { + if (option == activateFriendlyPositionAndSave) { + activateFriendlyPositionAndSave->setCheck(true); + fixPositionsAndSave->setCheck(false); + saveInvalid->setCheck(false); + selectInvalidStopsAndCancel->setCheck(false); + } else if (option == fixPositionsAndSave) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(true); + saveInvalid->setCheck(false); + selectInvalidStopsAndCancel->setCheck(false); + } else if (option == saveInvalid) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(false); + saveInvalid->setCheck(true); + selectInvalidStopsAndCancel->setCheck(false); + } else if (option == selectInvalidStopsAndCancel) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(false); + saveInvalid->setCheck(false); + selectInvalidStopsAndCancel->setCheck(true); + } +} + + +void +GNEDialog_FixDemandElements::FixRouteOptions::enableFixRouteOptions() { + activateFriendlyPositionAndSave->enable(); + fixPositionsAndSave->enable(); + saveInvalid->enable(); + selectInvalidStopsAndCancel->enable(); +} + + +void +GNEDialog_FixDemandElements::FixRouteOptions::disableFixRouteOptions() { + activateFriendlyPositionAndSave->disable(); + fixPositionsAndSave->disable(); + saveInvalid->disable(); + selectInvalidStopsAndCancel->disable(); +} + +// --------------------------------------------------------------------------- +// GNEDialog_FixDemandElements::FixVehicleOptions - methods +// --------------------------------------------------------------------------- + +GNEDialog_FixDemandElements::FixVehicleOptions::FixVehicleOptions(GNEDialog_FixDemandElements* fixAdditionalPositions) : + FXGroupBox(fixAdditionalPositions->myMainFrame, "Solution for vehicles", GUIDesignGroupBoxFrame) { + // create horizontal frames for radio buttons + FXHorizontalFrame* RadioButtons = new FXHorizontalFrame(this, GUIDesignHorizontalFrame); + // create Vertical Frame for left options + FXVerticalFrame* RadioButtonsLeft = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + buildConnectionBetweenLanes = new FXRadioButton(RadioButtonsLeft, "Build connections between lanes\t\tNew connections will be created between non-connected lanes", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + removeInvalidElements = new FXRadioButton(RadioButtonsLeft, "Remove invalid E2 detectors\t\tRemove Multilane E2 Detectors with non-connected lanes", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // add a vertical separator beween both options + new FXVerticalSeparator(this, GUIDesignVerticalSeparator); + // create Vertical Frame for right options + FXVerticalFrame* RadioButtonsRight = new FXVerticalFrame(RadioButtons, GUIDesignAuxiliarVerticalFrame); + activateFriendlyPositionAndSave = new FXRadioButton(RadioButtonsRight, "Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + fixPositionsAndSave = new FXRadioButton(RadioButtonsRight, "Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed", + fixAdditionalPositions, MID_CHOOSEN_OPERATION, GUIDesignRadioButton); + // leave option "buildConnectionBetweenLanes" and "activateFriendlyPositionAndSave" as default + buildConnectionBetweenLanes->setCheck(true); + activateFriendlyPositionAndSave->setCheck(true); +} + + +void +GNEDialog_FixDemandElements::FixVehicleOptions::selectOption(FXObject* option) { + // set top buttons + if (option == buildConnectionBetweenLanes) { + buildConnectionBetweenLanes->setCheck(true); + removeInvalidElements->setCheck(false); + } else if (option == removeInvalidElements) { + buildConnectionBetweenLanes->setCheck(false); + removeInvalidElements->setCheck(true); + } + // set down buttons + if (option == activateFriendlyPositionAndSave) { + activateFriendlyPositionAndSave->setCheck(true); + fixPositionsAndSave->setCheck(false); + } else if (option == fixPositionsAndSave) { + activateFriendlyPositionAndSave->setCheck(false); + fixPositionsAndSave->setCheck(true); + } +} + + +void +GNEDialog_FixDemandElements::FixVehicleOptions::enableFixVehicleOptions() { + buildConnectionBetweenLanes->enable(); + removeInvalidElements->enable(); + activateFriendlyPositionAndSave->enable(); + fixPositionsAndSave->enable(); +} + + +void +GNEDialog_FixDemandElements::FixVehicleOptions::disableFixVehicleOptions() { + buildConnectionBetweenLanes->disable(); + removeInvalidElements->disable(); + activateFriendlyPositionAndSave->disable(); + fixPositionsAndSave->disable(); +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEDialog_FixDemandElements.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,173 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEDialog_FixDemandElements.h +/// @author Pablo Alvarez Lopez +/// @date March 2019 +/// @version $Id$ +/// +// Dialog used to fix demand elements during saving +/****************************************************************************/ +#ifndef GNEDialog_FixDemandElements_h +#define GNEDialog_FixDemandElements_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include + +// =========================================================================== +// class declarations +// =========================================================================== +class GNEDemandElement; +class GNEViewNet; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNEDialog_FixDemandElements + * @brief Dialog for edit rerouters + */ +class GNEDialog_FixDemandElements : public FXDialogBox { + /// @brief FOX-declaration + FXDECLARE(GNEDialog_FixDemandElements) + +public: + /// @brief Constructor + GNEDialog_FixDemandElements(GNEViewNet* viewNet, const std::vector& invalidDemandElements); + + /// @brief destructor + ~GNEDialog_FixDemandElements(); + + /// @name FOX-callbacks + /// @{ + /// @brief event when user select a option + long onCmdSelectOption(FXObject* obj, FXSelector, void*); + + /// @brief event after press accept button + long onCmdAccept(FXObject*, FXSelector, void*); + + /// @brief event after press cancel button + long onCmdCancel(FXObject*, FXSelector, void*); + /// @} + +protected: + /// @brief groupbox for list + class DemandList : protected FXGroupBox { + + public: + /// @brief constructor + DemandList(GNEDialog_FixDemandElements* fixAdditionalPositions, const std::vector& invalidDemandElements); + + /// @brief vector with the invalid routes + std::vector myInvalidRoutes; + + /// @brief vector with the invalid vehicles + std::vector myInvalidVehicles; + + /// @brief list with the demand elements + FXTable* myTable; + }; + + /// @brief groupbox for all radio buttons related with fix route options + class FixRouteOptions : protected FXGroupBox { + + public: + /// @brief constructor + FixRouteOptions(GNEDialog_FixDemandElements* fixAdditionalPositions); + + /// @brief select option + void selectOption(FXObject* option); + + /// @brief enable position options + void enableFixRouteOptions(); + + /// @brief disable position options + void disableFixRouteOptions(); + + /// @brief Option "Activate friendlyPos and save" + FXRadioButton* activateFriendlyPositionAndSave; + + /// @brief Option "Fix Positions and save" + FXRadioButton* fixPositionsAndSave; + + /// @brief Option "Save invalid" + FXRadioButton* saveInvalid; + + /// @brief Option "Select invalid stops and cancel" + FXRadioButton* selectInvalidStopsAndCancel; + }; + + /// @brief groupbox for all radio buttons related with fix vehicle options + class FixVehicleOptions : protected FXGroupBox { + + public: + /// @brief constructor + FixVehicleOptions(GNEDialog_FixDemandElements* fixAdditionalPositions); + + /// @brief select option + void selectOption(FXObject* option); + + /// @brief enable consecutive lane options + void enableFixVehicleOptions(); + + /// @brief disable consecutive lane options + void disableFixVehicleOptions(); + + /// @brief Option "build connections between lanes" + FXRadioButton* buildConnectionBetweenLanes; + + /// @brief Option "remove invalid elements" + FXRadioButton* removeInvalidElements; + + /// @brief Option "Activate friendlyPos and save" + FXRadioButton* activateFriendlyPositionAndSave; + + /// @brief Option "Fix Positions and save" + FXRadioButton* fixPositionsAndSave; + }; + + /// @brief FOX needs this + GNEDialog_FixDemandElements() {} + + /// @brief view net + GNEViewNet* myViewNet; + + /// @brief main frame + FXVerticalFrame* myMainFrame; + + /// @brief list with the demand elements + DemandList* myDemandList; + + /// @brief fix route options + FixRouteOptions* myFixRouteOptions; + + /// @brief fix vehicle options + FixVehicleOptions* myFixVehicleOptions; + + /// @brief accept button + FXButton* myAcceptButton; + + /// @brief cancel button + FXButton* myCancelButton; + +private: + /// @brief Invalidated copy constructor. + GNEDialog_FixDemandElements(const GNEDialog_FixDemandElements&) = delete; + + /// @brief Invalidated assignment operator. + GNEDialog_FixDemandElements& operator=(const GNEDialog_FixDemandElements&) = delete; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -152,7 +152,7 @@ long -GNEGenericParameterDialog::GenericParametersValues::onPaint(FXObject* o, FXSelector f , void* p) { +GNEGenericParameterDialog::GenericParametersValues::onPaint(FXObject* o, FXSelector f, void* p) { // size of key label has to be updated in every interation if (myGenericParameterRows.size() > 0) { myKeyLabel->setWidth(myGenericParameterRows.front()->keyField->getWidth()); @@ -503,7 +503,7 @@ // --------------------------------------------------------------------------- GNEGenericParameterDialog::GNEGenericParameterDialog(GNEViewNet* viewNet, std::vector >* genericParameters) : - FXDialogBox(viewNet->getApp(), "Edit generic parameters", GUIDesignDialogBoxExplicitStretchable, 0, 0, 400, 300), + FXDialogBox(viewNet->getApp(), "Edit generic parameters", GUIDesignDialogBoxExplicitStretchable(400, 300)), myViewNet(viewNet), myCopyOfGenericParameters(*genericParameters) { assert(genericParameters); diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEGenericParameterDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -83,7 +83,7 @@ /// @name FOX-callbacks /// @{ /// @brief on paint function (reimplemented from FXGroupBox) - long onPaint(FXObject* o, FXSelector f , void* p); + long onPaint(FXObject* o, FXSelector f, void* p); /// @brief event when user change an attribute long onCmdSetAttribute(FXObject*, FXSelector, void*); diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.cpp 2018-11-01 23:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -127,7 +127,7 @@ } // change default header std::string typeOfOperation = myUpdatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr() + " for "; - changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getFirstAdditionalParent()->getTagStr() + " '" + myEditedAdditional->getFirstAdditionalParent()->getID() + "'"); + changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getAdditionalParents().at(0)->getTagStr() + " '" + myEditedAdditional->getAdditionalParents().at(0)->getID() + "'"); // Create auxiliar frames for tables FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame); @@ -190,7 +190,7 @@ } // disable add routeProbReroute Button and change label if the rerouter has multiple edges (random routes can only work from one edge) - if (rerouterInterval->getFirstAdditionalParent()->getEdgeChilds().size() > 1) { + if (rerouterInterval->getAdditionalParents().at(0)->getEdgeChilds().size() > 1) { myAddRouteProbReroute->disable(); routeProbRerouteLabel->setText("Rerouter has more than one edge"); } @@ -221,8 +221,8 @@ long GNERerouterIntervalDialog::onCmdAccept(FXObject*, FXSelector, void*) { // set strings for dialogs - std::string errorTitle = "Error" + toString(myUpdatingElement ? "updating" : "creating") + " " + myEditedAdditional->getTagStr() + " of " + myEditedAdditional->getFirstAdditionalParent()->getTagStr(); - std::string operationType = myEditedAdditional->getFirstAdditionalParent()->getTagStr() + "'s " + myEditedAdditional->getTagStr() + " cannot be " + (myUpdatingElement ? "updated" : "created") + " because "; + std::string errorTitle = "Error" + toString(myUpdatingElement ? "updating" : "creating") + " " + myEditedAdditional->getTagStr() + " of " + myEditedAdditional->getAdditionalParents().at(0)->getTagStr(); + std::string operationType = myEditedAdditional->getAdditionalParents().at(0)->getTagStr() + "'s " + myEditedAdditional->getTagStr() + " cannot be " + (myUpdatingElement ? "updated" : "created") + " because "; if (myBeginEndValid == false) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERerouterIntervalDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERouteDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERouteDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERouteDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERouteDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,192 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERouteDialog.cpp +/// @author Pablo Alvarez Lopez +/// @date March 2017 +/// @version $Id$ +/// +// Dialog for edit calibrator routes +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNERouteDialog.h" + + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNERouteDialog) GNERouteDialogMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GNERouteDialog::onCmdSetVariable), +}; + +// Object implementation +FXIMPLEMENT(GNERouteDialog, GNEDemandElementDialog, GNERouteDialogMap, ARRAYNUMBER(GNERouteDialogMap)) + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNERouteDialog::GNERouteDialog(GNEDemandElement* editedCalibratorRoute, bool updatingElement) : + GNEDemandElementDialog(editedCalibratorRoute, updatingElement, 400, 120), + myCalibratorRouteValid(true) { + // change default header + std::string typeOfOperation = + " for "; + changeDemandElementDialogHeader(myUpdatingElement ? "Edit " + myEditedDemandElement->getTagStr() + " of " : "Create " + myEditedDemandElement->getTagStr()); + + // Create auxiliar frames for data + FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame); + FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); + FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame); + + // create ID's elements + new FXLabel(columnLeft, toString(SUMO_ATTR_ID).c_str(), nullptr, GUIDesignLabelLeftThick); + myTextFieldRouteID = new FXTextField(columnRight, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); + + // create list of edge's elements + new FXLabel(columnLeft, toString(SUMO_ATTR_EDGES).c_str(), nullptr, GUIDesignLabelLeftThick); + myTextFieldEdges = new FXTextField(columnRight, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); + + // create color's elements + new FXLabel(columnLeft, toString(SUMO_ATTR_COLOR).c_str(), nullptr, GUIDesignLabelLeftThick); + myTextFieldColor = new FXTextField(columnRight, GUIDesignTextFieldNCol, this, MID_GNE_CALIBRATORDIALOG_SET_VARIABLE, GUIDesignTextField); + + // update tables + updateCalibratorRouteValues(); + + // start a undo list for editing local to this demand element + initChanges(); + + // add element if we aren't updating an existent element + if (myUpdatingElement == false) { + myEditedDemandElement->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(myEditedDemandElement, true), true); + // Routes are created without edges + myCalibratorRouteValid = false; + myInvalidAttr = SUMO_ATTR_EDGES; + } + + // open as modal dialog + openAsModalDialog(); +} + + +GNERouteDialog::~GNERouteDialog() {} + + +long +GNERouteDialog::onCmdAccept(FXObject*, FXSelector, void*) { + if (myCalibratorRouteValid == false) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); + std::string operation1 = myUpdatingElement ? ("updating") : ("creating"); + std::string operation2 = myUpdatingElement ? ("updated") : ("created"); + std::string tagString = myEditedDemandElement->getTagStr(); + // open warning dialog box + FXMessageBox::warning(getApp(), MBOX_OK, + ("Error " + operation1 + " " + tagString).c_str(), "%s", + (tagString + " cannot be " + operation2 + " because parameter " + toString(myInvalidAttr) + " is invalid.").c_str()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); + return 0; + } else { + // accept changes before closing dialog + acceptChanges(); + // stop dialgo sucesfully + getApp()->stopModal(this, TRUE); + return 1; + } +} + + +long +GNERouteDialog::onCmdCancel(FXObject*, FXSelector, void*) { + // cancel changes + cancelChanges(); + // Stop Modal + getApp()->stopModal(this, FALSE); + return 1; +} + + +long +GNERouteDialog::onCmdReset(FXObject*, FXSelector, void*) { + // reset changes + resetChanges(); + // update fields + updateCalibratorRouteValues(); + return 1; +} + + +long +GNERouteDialog::onCmdSetVariable(FXObject*, FXSelector, void*) { + // At start we assumed, that all values are valid + myCalibratorRouteValid = true; + myInvalidAttr = SUMO_ATTR_NOTHING; + // set color of myTextFieldRouteID, depending if current value is valid or not + if (myEditedDemandElement->getID() == myTextFieldRouteID->getText().text()) { + myTextFieldRouteID->setTextColor(FXRGB(0, 0, 0)); + myEditedDemandElement->setAttribute(SUMO_ATTR_ID, myTextFieldRouteID->getText().text(), myEditedDemandElement->getViewNet()->getUndoList()); + } else if (myEditedDemandElement->isValid(SUMO_ATTR_ID, myTextFieldRouteID->getText().text())) { + myTextFieldRouteID->setTextColor(FXRGB(0, 0, 0)); + myEditedDemandElement->setAttribute(SUMO_ATTR_ID, myTextFieldRouteID->getText().text(), myEditedDemandElement->getViewNet()->getUndoList()); + } else { + myTextFieldRouteID->setTextColor(FXRGB(255, 0, 0)); + myCalibratorRouteValid = false; + myInvalidAttr = SUMO_ATTR_ID; + } + // set color of myTextFieldRouteEdges, depending if current value is valEdges or not + if (myEditedDemandElement->isValid(SUMO_ATTR_EDGES, myTextFieldEdges->getText().text())) { + myTextFieldEdges->setTextColor(FXRGB(0, 0, 0)); + myEditedDemandElement->setAttribute(SUMO_ATTR_EDGES, myTextFieldEdges->getText().text(), myEditedDemandElement->getViewNet()->getUndoList()); + } else { + myTextFieldEdges->setTextColor(FXRGB(255, 0, 0)); + myCalibratorRouteValid = false; + myInvalidAttr = SUMO_ATTR_EDGES; + } + // set color of myTextFieldColor, depending if current value is valid or not + if (myEditedDemandElement->isValid(SUMO_ATTR_COLOR, myTextFieldColor->getText().text())) { + myTextFieldColor->setTextColor(FXRGB(0, 0, 0)); + myEditedDemandElement->setAttribute(SUMO_ATTR_COLOR, myTextFieldColor->getText().text(), myEditedDemandElement->getViewNet()->getUndoList()); + } else { + myTextFieldColor->setTextColor(FXRGB(255, 0, 0)); + myCalibratorRouteValid = false; + myInvalidAttr = SUMO_ATTR_COLOR; + } + return 1; +} + + +void +GNERouteDialog::updateCalibratorRouteValues() { + myTextFieldRouteID->setText(myEditedDemandElement->getID().c_str()); + myTextFieldEdges->setText(myEditedDemandElement->getAttribute(SUMO_ATTR_EDGES).c_str()); + myTextFieldColor->setText(myEditedDemandElement->getAttribute(SUMO_ATTR_COLOR).c_str()); +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERouteDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERouteDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNERouteDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNERouteDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,99 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERouteDialog.h +/// @author Pablo Alvarez Lopez +/// @date March 2017 +/// @version $Id$ +/// +// Dialog for edit calibrator routes +/****************************************************************************/ +#ifndef GNERouteDialog_h +#define GNERouteDialog_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include "GNEDemandElementDialog.h" + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNERoute; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNERouteDialog + * @brief Dialog for edit Calibrator Routes + */ + +class GNERouteDialog : public GNEDemandElementDialog { + /// @brief FOX-declaration + FXDECLARE(GNERouteDialog) + +public: + /// @brief constructor + GNERouteDialog(GNEDemandElement* editedCalibratorRoute, bool updatingElement); + + /// @brief destructor + ~GNERouteDialog(); + + /// @name FOX-callbacks + /// @{ + /// @brief event after press accept button + long onCmdAccept(FXObject*, FXSelector, void*); + + /// @brief event after press cancel button + long onCmdCancel(FXObject*, FXSelector, void*); + + /// @brief event after press reset button + long onCmdReset(FXObject*, FXSelector, void*); + + /// @brief event after change value + long onCmdSetVariable(FXObject*, FXSelector, void*); + /// @} + +protected: + /// @brief FOX needs this + GNERouteDialog() {} + + /// @brief flag to check if current calibrator vehicleType is valid + bool myCalibratorRouteValid; + + /// @brief current sumo attribute invalid + SumoXMLAttr myInvalidAttr; + + /// @brief route ID + FXTextField* myTextFieldRouteID; + + /// @brief list of edges (string) + FXTextField* myTextFieldEdges; + + /// @brief color of route + FXTextField* myTextFieldColor; + + /// @brief update data fields + void updateCalibratorRouteValues(); + +private: + /// @brief Invalidated copy constructor. + GNERouteDialog(const GNERouteDialog&) = delete; + + /// @brief Invalidated assignment operator. + GNERouteDialog& operator=(const GNERouteDialog&) = delete; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -207,7 +207,7 @@ myStepsTable->setColumnWidth(2, GUIDesignTableIconCellWidth); myStepsTable->setColumnWidth(3, GUIDesignTableIconCellWidth); myStepsTable->setColumnText(0, "timeStep"); - myStepsTable->setColumnText(1, "speed (km/h)"); + myStepsTable->setColumnText(1, "speed (m/s)"); myStepsTable->setColumnText(2, ""); myStepsTable->setColumnText(3, ""); myStepsTable->getRowHeader()->setWidth(0); diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVariableSpeedSignDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.cpp sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.cpp --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,1182 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleTypeDialog.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// Dialog for edit vehicleTypes +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEVehicleTypeDialog.h" + + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNEVehicleTypeDialog::VTypeAtributes) VTypeAtributesMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEVehicleTypeDialog::VTypeAtributes::onCmdSetVariable), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_DIALOG, GNEVehicleTypeDialog::VTypeAtributes::onCmdSetColor) +}; + +FXDEFMAP(GNEVehicleTypeDialog::CarFollowingModelParameters) CarFollowingModelParametersMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEVehicleTypeDialog::CarFollowingModelParameters::onCmdSetVariable), +}; + +// Object implementation +FXIMPLEMENT(GNEVehicleTypeDialog::VTypeAtributes, FXVerticalFrame, VTypeAtributesMap, ARRAYNUMBER(VTypeAtributesMap)) +FXIMPLEMENT(GNEVehicleTypeDialog::CarFollowingModelParameters, FXGroupBox, CarFollowingModelParametersMap, ARRAYNUMBER(CarFollowingModelParametersMap)) + +// =========================================================================== +// member method definitions +// =========================================================================== + +// --------------------------------------------------------------------------- +// GNEVehicleTypeDialog::VClassRow - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeDialog::VTypeAtributes::VClassRow::VClassRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column) : + FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame), + myVTypeAtributesParent(VTypeAtributesParent) { + // create two auxiliar frames + FXVerticalFrame* verticalFrameLabelAndComboBox = new FXVerticalFrame(this, GUIDesignAuxiliarVerticalFrame); + // create FXComboBox for VClass + new FXLabel(verticalFrameLabelAndComboBox, toString(SUMO_ATTR_VCLASS).c_str(), nullptr, GUIDesignLabelAttribute150); + myComboBoxVClass = new FXComboBox(verticalFrameLabelAndComboBox, GUIDesignComboBoxNCol, + VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox); + myComboBoxVClassLabelImage = new FXLabel(this, "", nullptr, GUIDesignLabelTickedIcon180x46); + myComboBoxVClassLabelImage->setBackColor(FXRGBA(255, 255, 255, 255)); + // fill combo Box with all VClass + std::vector VClassStrings = SumoVehicleClassStrings.getStrings(); + for (auto i : VClassStrings) { + if (i != SumoVehicleClassStrings.getString(SVC_IGNORING)) { + myComboBoxVClass->appendItem(i.c_str()); + } + } + // only show 10 VClasses + myComboBoxVClass->setNumVisible(10); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VClassRow::setVariable() { + // set color of myComboBoxVClass, depending if current value is valid or not + myComboBoxVClass->setTextColor(FXRGB(0, 0, 0)); + if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_VCLASS, myComboBoxVClass->getText().text())) { + myComboBoxVClass->setTextColor(FXRGB(0, 0, 0)); + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_VCLASS, myComboBoxVClass->getText().text(), + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + setVClassLabelImage(); + } else { + myComboBoxVClass->setTextColor(FXRGB(255, 0, 0)); + myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false; + myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_VCLASS; + } +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VClassRow::updateValues() { + myComboBoxVClass->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_VCLASS).c_str()); + setVClassLabelImage(); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VClassRow::setVClassLabelImage() { + // by default vclass is passenger + if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_VCLASS).empty()) { + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PASSENGER)); + } else { + // set Icon in label depending of current VClass + switch (getVehicleClassID(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_VCLASS))) { + case SVC_PRIVATE: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PRIVATE)); + break; + case SVC_EMERGENCY: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_EMERGENCY)); + break; + case SVC_AUTHORITY: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_AUTHORITY)); + break; + case SVC_ARMY: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_ARMY)); + break; + case SVC_VIP: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_VIP)); + break; + case SVC_PASSENGER: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PASSENGER)); + break; + case SVC_HOV: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_HOV)); + break; + case SVC_TAXI: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TAXI)); + break; + case SVC_BUS: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_BUS)); + break; + case SVC_COACH: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_COACH)); + break; + case SVC_DELIVERY: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_DELIVERY)); + break; + case SVC_TRUCK: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRUCK)); + break; + case SVC_TRAILER: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRAILER)); + break; + case SVC_TRAM: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRAM)); + break; + case SVC_RAIL_URBAN: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL_URBAN)); + break; + case SVC_RAIL: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL)); + break; + case SVC_RAIL_ELECTRIC: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL_ELECTRIC)); + break; + case SVC_MOTORCYCLE: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_MOTORCYCLE)); + break; + case SVC_MOPED: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_MOPED)); + break; + case SVC_BICYCLE: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_BICYCLE)); + break; + case SVC_PEDESTRIAN: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PEDESTRIAN)); + break; + case SVC_E_VEHICLE: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_EVEHICLE)); + break; + case SVC_SHIP: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_SHIP)); + break; + case SVC_CUSTOM1: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_CUSTOM1)); + break; + case SVC_CUSTOM2: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_CUSTOM2)); + break; + default: + myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_IGNORING)); + break; + } + } +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeDialog::VShapeRow - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::VShapeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column) : + FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame), + myVTypeAtributesParent(VTypeAtributesParent) { + // create two auxiliar frames + FXVerticalFrame* verticalFrameLabelAndComboBox = new FXVerticalFrame(this, GUIDesignAuxiliarVerticalFrame); + // create combo for for vehicle shapes + new FXLabel(verticalFrameLabelAndComboBox, toString(SUMO_ATTR_GUISHAPE).c_str(), nullptr, GUIDesignLabelAttribute150); + myComboBoxShape = new FXComboBox(verticalFrameLabelAndComboBox, GUIDesignComboBoxNCol, + VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox); + myComboBoxShapeLabelImage = new FXLabel(this, "", nullptr, GUIDesignLabelTickedIcon180x46); + myComboBoxShapeLabelImage->setBackColor(FXRGBA(255, 255, 255, 255)); + // fill combo Box with all vehicle shapes + std::vector VShapeStrings = SumoVehicleShapeStrings.getStrings(); + for (auto i : VShapeStrings) { + if (i != SumoVehicleShapeStrings.getString(SVS_UNKNOWN)) { + myComboBoxShape->appendItem(i.c_str()); + } + } + // only show 10 Shapes + myComboBoxShape->setNumVisible(10); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::setVariable() { + // set color of myComboBoxShape, depending if current value is valid or not + if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text())) { + myComboBoxShape->setTextColor(FXRGB(0, 0, 0)); + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text(), + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + setVShapeLabelImage(); + } else { + myComboBoxShape->setTextColor(FXRGB(255, 0, 0)); + myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false; + myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_GUISHAPE; + } +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::updateValues() { + myComboBoxShape->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_GUISHAPE).c_str()); + setVShapeLabelImage(); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::setVShapeLabelImage() { + // set Icon in label depending of current VClass + switch (getVehicleShapeID(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_GUISHAPE))) { + case SVS_UNKNOWN: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_UNKNOWN)); + break; + case SVS_PEDESTRIAN: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PEDESTRIAN)); + break; + case SVS_BICYCLE: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BICYCLE)); + break; + case SVS_MOPED: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_MOPED)); + break; + case SVS_MOTORCYCLE: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_MOTORCYCLE)); + break; + case SVS_PASSENGER: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER)); + break; + case SVS_PASSENGER_SEDAN: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_SEDAN)); + break; + case SVS_PASSENGER_HATCHBACK: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_HATCHBACK)); + break; + case SVS_PASSENGER_WAGON: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_WAGON)); + break; + case SVS_PASSENGER_VAN: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_VAN)); + break; + case SVS_DELIVERY: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_DELIVERY)); + break; + case SVS_TRUCK: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_TRUCK)); + break; + case SVS_TRUCK_SEMITRAILER: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_TRUCK_SEMITRAILER)); + break; + case SVS_TRUCK_1TRAILER: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_TRUCK_1TRAILER)); + break; + case SVS_BUS: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS)); + break; + case SVS_BUS_COACH: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS_COACH)); + break; + case SVS_BUS_FLEXIBLE: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS_FLEXIBLE)); + break; + case SVS_BUS_TROLLEY: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS_TROLLEY)); + break; + case SVS_RAIL: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RAIL)); + break; + case SVS_RAIL_CAR: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RAIL_CAR)); + break; + case SVS_RAIL_CARGO: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RAIL_CARGO)); + break; + case SVS_E_VEHICLE: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_E_VEHICLE)); + break; + case SVS_ANT: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_ANT)); + break; + case SVS_SHIP: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_SHIP)); + break; + case SVS_EMERGENCY: + case SVS_FIREBRIGADE: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_EMERGENCY)); + break; + case SVS_POLICE: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_POLICE)); + break; + case SVS_RICKSHAW: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RICKSHAW)); + break; + default: + myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_IGNORING)); + break; + } +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeDialog::VTypeAtributes - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::VTypeAttributeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr, int type) : + FXHorizontalFrame(verticalFrame, GUIDesignAuxiliarHorizontalFrame), + myVTypeAtributesParent(VTypeAtributesParent), + myAttr(attr), + myComboBox(nullptr) { + new FXLabel(this, toString(attr).c_str(), nullptr, GUIDesignLabelAttribute150); + if (type == 0) { + myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Int); + } else if (type == 1) { + myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real); + } else { + myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180); + } +} + + +GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::VTypeAttributeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr, const std::vector& values) : + FXHorizontalFrame(verticalFrame, GUIDesignAuxiliarHorizontalFrame), + myVTypeAtributesParent(VTypeAtributesParent), + myAttr(attr), + myTextField(nullptr) { + new FXLabel(this, toString(attr).c_str(), nullptr, GUIDesignLabelAttribute150); + myComboBox = new FXComboBox(this, GUIDesignComboBoxNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox); + // fill combo Box with values + for (auto i : values) { + myComboBox->appendItem(i.c_str()); + } + myComboBox->setNumVisible(myComboBox->getNumItems()); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::setVariable() { + if (myComboBox) { + // set color of myComboBox, depending if current value is valid or not + if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myComboBox->getText().text())) { + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myComboBox->getText().text(), + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + // update value after setting it + updateValue(); + } else { + myComboBox->setTextColor(FXRGB(255, 0, 0)); + // mark VType as invalid + myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false; + myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr; + } + } else { + // set color of textField, depending if current value is valid or not + if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) { + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(), + myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + // update value after setting it + updateValue(); + } else { + myTextField->setTextColor(FXRGB(255, 0, 0)); + // mark VType as invalid + myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false; + myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr; + } + } +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::updateValue() { + if (myComboBox) { + // set text of myComboBox using current value of VType + myComboBox->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str()); + // set color depending if is a default value + if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myComboBox->getText().text()) { + myComboBox->setTextColor(FXRGB(0, 0, 0)); + } else { + myComboBox->setTextColor(FXRGB(195, 195, 195)); + } + } else { + // set text of myTextField using current value of VType + myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str()); + // set color depending if is a default value + if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) { + myTextField->setTextColor(FXRGB(0, 0, 0)); + } else { + myTextField->setTextColor(FXRGB(195, 195, 195)); + } + } +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeDialog::VTypeAtributes - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeDialog::VTypeAtributes::VTypeAtributes(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column) : + FXVerticalFrame(column, GUIDesignAuxiliarVerticalFrame), + myVehicleTypeDialog(vehicleTypeDialog) { + // create attributes for common attributes + FXGroupBox* commonAttributes = new FXGroupBox(this, "Vehicle Type attributes", GUIDesignGroupBoxFrame); + // create horizontal frame for columns of attributes + FXHorizontalFrame* columnsCommonVTypeAttributes = new FXHorizontalFrame(commonAttributes, GUIDesignAuxiliarHorizontalFrame); + // build left attributes + buildAttributesA(new FXVerticalFrame(columnsCommonVTypeAttributes, GUIDesignAuxiliarFrame)); + // build right attributes + buildAttributesB(new FXVerticalFrame(columnsCommonVTypeAttributes, GUIDesignAuxiliarFrame)); + // create attribute for Junction Model Attributes + FXGroupBox* JMAttributes = new FXGroupBox(this, "Junction Model attributes", GUIDesignGroupBoxFrame); + // create horizontal frame for columns of Junction Model attributes + FXHorizontalFrame* columnsJMVTypeAttributes = new FXHorizontalFrame(JMAttributes, GUIDesignAuxiliarHorizontalFrame); + // build left attributes + buildJunctionModelAttributesA(new FXVerticalFrame(columnsJMVTypeAttributes, GUIDesignAuxiliarFrame)); + // build right attributes + buildJunctionModelAttributesB(new FXVerticalFrame(columnsJMVTypeAttributes, GUIDesignAuxiliarFrame)); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::buildAttributesA(FXVerticalFrame* column) { + // 01 Create VClassRow + myVClassRow = new VClassRow(this, column); + + // 02 create FXTextField and Label for vehicleTypeID + FXHorizontalFrame* row = new FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame); + new FXLabel(row, toString(SUMO_ATTR_ID).c_str(), nullptr, GUIDesignLabelAttribute150); + myTextFieldVehicleTypeID = new FXTextField(row, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real); + + // 03 create FXTextField and Button for Color + row = new FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame); + myButtonColor = new FXButton(row, toString(SUMO_ATTR_COLOR).c_str(), nullptr, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonRectangular150x23); + myTextFieldColor = new FXTextField(row, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180); + + // 04 create FXTextField and Label for Length + myLength = new VTypeAttributeRow(this, column, SUMO_ATTR_LENGTH, 1); + + // 05 create FXTextField and Label for MinGap + myMinGap = new VTypeAttributeRow(this, column, SUMO_ATTR_MINGAP, 1); + + // 06 create FXTextField and Label for MaxSpeed + myMaxSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_MAXSPEED, 1); + + // 07 create FXTextField and Label for SpeedFactor + mySpeedFactor = new VTypeAttributeRow(this, column, SUMO_ATTR_SPEEDFACTOR, 1); + + // 08 create FXTextField and Label for SpeedDev + mySpeedDev = new VTypeAttributeRow(this, column, SUMO_ATTR_SPEEDDEV, 1); + + // 09 create FXTextField and Label for EmissionClass + myEmissionClass = new VTypeAttributeRow(this, column, SUMO_ATTR_EMISSIONCLASS, 1); + + // 10 create FXTextField and Label for Width + myWidth = new VTypeAttributeRow(this, column, SUMO_ATTR_WIDTH, 1); + + // 11 create FXTextField and Label for Filename + myFilename = new VTypeAttributeRow(this, column, SUMO_ATTR_IMGFILE, 3); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::buildAttributesB(FXVerticalFrame* column) { + // 01 Create VShapeRow + myVShapeRow = new VShapeRow(this, column); + + // 02 create VTypeAttributeRow and Label for LaneChangeModel + myLaneChangeModel = new VTypeAttributeRow(this, column, SUMO_ATTR_LANE_CHANGE_MODEL, SUMOXMLDefinitions::LaneChangeModels.getStrings()); + + // 03 create VTypeAttributeRow and Label for PersonCapacity + myPersonCapacity = new VTypeAttributeRow(this, column, SUMO_ATTR_PERSON_CAPACITY, 0); + + // 04 create VTypeAttributeRow and Label for ContainerCapacity + myContainerCapacity = new VTypeAttributeRow(this, column, SUMO_ATTR_CONTAINER_CAPACITY, 0); + + // 05 create VTypeAttributeRow and Label for BoardingDuration + myBoardingDuration = new VTypeAttributeRow(this, column, SUMO_ATTR_BOARDING_DURATION, 1); + + // 06 create VTypeAttributeRow and Label for LoadingDuration + myLoadingDuration = new VTypeAttributeRow(this, column, SUMO_ATTR_LOADING_DURATION, 1); + + // 07 create ComboBox and Label for LatAlignment + myLatAlignment = new VTypeAttributeRow(this, column, SUMO_ATTR_LATALIGNMENT, SUMOXMLDefinitions::LateralAlignments.getStrings()); + + // 08 create VTypeAttributeRow and Label for MinGapLat + myMinGapLat = new VTypeAttributeRow(this, column, SUMO_ATTR_MINGAP_LAT, 1); + + // 09 create VTypeAttributeRow and Label for MaxSpeedLat + myMaxSpeedLat = new VTypeAttributeRow(this, column, SUMO_ATTR_MAXSPEED_LAT, 1); + + // 10 create VTypeAttributeRow and Label for ActionStepLenght + myActionStepLenght = new VTypeAttributeRow(this, column, SUMO_ATTR_ACTIONSTEPLENGTH, 1); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::buildJunctionModelAttributesA(FXVerticalFrame* column) { + // 01 create VTypeAttributeRow and Label for JMCrossingGap + myJMCrossingGap = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_CROSSING_GAP, 1); + + // 02 create VTypeAttributeRow and Label for JMIgnoreKeepclearTime + myJMIgnoreKeepclearTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, 1); + + // 03 create VTypeAttributeRow and Label for JMDriveAfterRedTime + myJMDriveAfterRedTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, 1); + + // 04 create VTypeAttributeRow and Label for JMDriveRedSpeed + myJMDriveRedSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_RED_SPEED, 2); + + // 05 create VTypeAttributeRow and Label for JMIgnoreFoeProb + myJMIgnoreFoeProb = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_FOE_PROB, 1); +} + + +void +GNEVehicleTypeDialog::VTypeAtributes::buildJunctionModelAttributesB(FXVerticalFrame* column) { + // 01 create VTypeAttributeRow and Label for JMIgnoreFoeSpeed + myJMIgnoreFoeSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_FOE_SPEED, 1); + + // 02 create VTypeAttributeRow and Label for JMSigmaMinor + myJMSigmaMinor = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_SIGMA_MINOR, 2); + + // 03 create VTypeAttributeRow and Label for JMTimeGapMinor + myJMTimeGapMinor = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_TIMEGAP_MINOR, 1); + + // 04 create VTypeAttributeRow and Label for Impatience + myJMImpatience = new VTypeAttributeRow(this, column, SUMO_ATTR_IMPATIENCE, 1); +} + +void +GNEVehicleTypeDialog::VTypeAtributes::updateValues() { + //set values of myEditedDemandElement into fields + myTextFieldVehicleTypeID->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_ID).c_str()); + // set field color + myTextFieldColor->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_COLOR).c_str()); + // set color depending if is a default value + if (myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(SUMO_ATTR_COLOR) != myTextFieldColor->getText().text()) { + myTextFieldColor->setTextColor(FXRGB(0, 0, 0)); + } else { + myTextFieldColor->setTextColor(FXRGB(195, 195, 195)); + } + // set variables of special rows VType and VShape + myVClassRow->updateValues(); + myVShapeRow->updateValues(); + // update rows + myLaneChangeModel->updateValue(); + myLatAlignment->updateValue(); + myLength->updateValue(); + myMinGap->updateValue(); + myMaxSpeed->updateValue(); + mySpeedFactor->updateValue(); + mySpeedDev->updateValue(); + myEmissionClass->updateValue(); + myWidth->updateValue(); + myFilename->updateValue(); + myPersonCapacity->updateValue(); + myContainerCapacity->updateValue(); + myBoardingDuration->updateValue(); + myLoadingDuration->updateValue(); + myMinGapLat->updateValue(); + myMaxSpeedLat->updateValue(); + // JM Parameters + myJMCrossingGap->updateValue(); + myJMIgnoreKeepclearTime->updateValue(); + myJMDriveAfterRedTime->updateValue(); + myJMDriveRedSpeed->updateValue(); + myJMIgnoreFoeProb->updateValue(); + myJMIgnoreFoeSpeed->updateValue(); + myJMSigmaMinor->updateValue(); + myJMTimeGapMinor->updateValue(); + myJMImpatience->updateValue(); +} + + +long +GNEVehicleTypeDialog::VTypeAtributes::onCmdSetVariable(FXObject*, FXSelector, void*) { + // At start we assumed, that all values are valid + myVehicleTypeDialog->myVehicleTypeValid = true; + myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_NOTHING; + // set color of myTextFieldVehicleTypeID, depending if current value is valid or not + if (myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text())) { + myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0)); + myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + } else if (myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_ID) == myTextFieldVehicleTypeID->getText().text()) { + myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0)); + myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + } else { + myTextFieldVehicleTypeID->setTextColor(FXRGB(255, 0, 0)); + myVehicleTypeDialog->myVehicleTypeValid = false; + myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_ID; + } + // set color of myTextFieldColor, depending if current value is valid or not + if (myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_COLOR, myTextFieldColor->getText().text())) { + // set color depending if is a default value + if (myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(SUMO_ATTR_COLOR) != myTextFieldColor->getText().text()) { + myTextFieldColor->setTextColor(FXRGB(0, 0, 0)); + } else { + myTextFieldColor->setTextColor(FXRGB(195, 195, 195)); + } + myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_COLOR, myTextFieldColor->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + } else { + myTextFieldColor->setTextColor(FXRGB(255, 0, 0)); + myVehicleTypeDialog->myVehicleTypeValid = false; + myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_COLOR; + } + // set variables of special rows VType and VShape + myVClassRow->setVariable(); + myVShapeRow->setVariable(); + // set attributes in rows + myLaneChangeModel->setVariable(); + myLatAlignment->setVariable(); + myLength->setVariable(); + myMinGap->setVariable(); + myMaxSpeed->setVariable(); + mySpeedFactor->setVariable(); + mySpeedDev->setVariable(); + myEmissionClass->setVariable(); + myWidth->setVariable(); + myFilename->setVariable(); + myPersonCapacity->setVariable(); + myContainerCapacity->setVariable(); + myBoardingDuration->setVariable(); + myLoadingDuration->setVariable(); + myMinGapLat->setVariable(); + myMaxSpeedLat->setVariable(); + // JM Variables + myJMCrossingGap->setVariable(); + myJMIgnoreKeepclearTime->setVariable(); + myJMDriveAfterRedTime->setVariable(); + myJMDriveRedSpeed->setVariable(); + myJMIgnoreFoeProb->setVariable(); + myJMIgnoreFoeSpeed->setVariable(); + myJMSigmaMinor->setVariable(); + myJMTimeGapMinor->setVariable(); + myJMImpatience->setVariable(); + return true; +} + + +long +GNEVehicleTypeDialog::VTypeAtributes::onCmdSetColor(FXObject*, FXSelector, void*) { + // create FXColorDialog + FXColorDialog colordialog(this, tr("Color Dialog")); + colordialog.setTarget(this); + // If previous attribute wasn't correct, set black as default color + if (GNEAttributeCarrier::canParse(myTextFieldColor->getText().text())) { + colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myTextFieldColor->getText().text()))); + } else { + colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::BLACK)); + } + // execute dialog to get a new color + if (colordialog.execute()) { + std::string newValue = toString(MFXUtils::getRGBColor(colordialog.getRGBA())); + myTextFieldColor->setText(newValue.c_str()); + if (myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_COLOR, newValue)) { + myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_COLOR, newValue, myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + // If previously value was incorrect, change font color to black + myTextFieldColor->setTextColor(FXRGB(0, 0, 0)); + myTextFieldColor->killFocus(); + } + } + return 1; +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeDialog::VShapeRow - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelParameters(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column) : + FXGroupBox(column, "Car Following Model", GUIDesignGroupBoxFrame), + myVehicleTypeDialog(vehicleTypeDialog) { + + // create vertical frame for rows + myVerticalFrameRows = new FXVerticalFrame(this, GUIDesignAuxiliarFrame); + + // declare combo box + FXHorizontalFrame* row = new FXHorizontalFrame(myVerticalFrameRows, GUIDesignAuxiliarHorizontalFrame); + new FXLabel(row, "Algorithm", nullptr, GUIDesignLabelAttribute150); + myComboBoxCarFollowModel = new FXComboBox(row, GUIDesignComboBoxNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox); + + // fill combo Box with all Car following models + std::vector CFModels = SUMOXMLDefinitions::CarFollowModels.getStrings(); + for (auto i : CFModels) { + myComboBoxCarFollowModel->appendItem(i.c_str()); + } + myComboBoxCarFollowModel->setNumVisible(10); + + // 01 create FX and Label for Accel + myAccelRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_ACCEL); + myRows.push_back(myAccelRow); + + // 02 create FX and Label for Decel + myDecelRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_DECEL); + myRows.push_back(myDecelRow); + + // 03 create FX and Label for Apparent decel + myApparentDecelRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_APPARENTDECEL); + myRows.push_back(myApparentDecelRow); + + // 04 create FX and Label for emergency decel + myEmergencyDecelRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_EMERGENCYDECEL); + myRows.push_back(myEmergencyDecelRow); + + // 05 create FX and Label for Sigma + mySigmaRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_SIGMA); + myRows.push_back(mySigmaRow); + + // 06 create FX and Label for Tau + myTauRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_TAU); + myRows.push_back(myTauRow); + + // 07 myMinGapFactor FX and Label for MinGapFactor + myMinGapFactorRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_COLLISION_MINGAP_FACTOR); + myRows.push_back(myMinGapFactorRow); + + // 08 create FX and Label for K + myKRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_K); + myRows.push_back(myKRow); + + // 09 create FX and Label for PHI + myPhiRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_KERNER_PHI); + myRows.push_back(myPhiRow); + + // 10 create FX and Label for Deleta + myDeltaRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_IDM_DELTA); + myRows.push_back(myDeltaRow); + + // 11 create FX and Label for Stepping + mySteppingRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_IDM_STEPPING); + myRows.push_back(mySteppingRow); + + // 12 create FX and Label for Security + mySecurityRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_WIEDEMANN_SECURITY); + myRows.push_back(mySecurityRow); + + // 13 create FX and Label for Estimation + myEstimationRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_WIEDEMANN_ESTIMATION); + myRows.push_back(myEstimationRow); + + // 14 create FX and Label for TMP1 + myTmp1Row = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_TMP1); + myRows.push_back(myTmp1Row); + + // 15 create FX and Label for TMP2 + myTmp2Row = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_TMP2); + myRows.push_back(myTmp2Row); + + // 16 create FX and Label for TMP3 + myTmp3Row = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_TMP3); + myRows.push_back(myTmp3Row); + + // 17 create FX and Label for TMP4 + myTmp4Row = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_TMP4); + myRows.push_back(myTmp4Row); + + // 18 create FX and Label for TMP5 + myTmp5Row = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_TMP5); + myRows.push_back(myTmp5Row); + + // 19 create FX and Label for Estimation + myTrainTypeRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_TRAIN_TYPE); + myRows.push_back(myTrainTypeRow); + + // 20 create FX and Label for Tau Last + myTrauLastRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_PWAGNER2009_TAULAST); + myRows.push_back(myTrauLastRow); + + // 21 create FX and Label for Aprob + myAprobRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_PWAGNER2009_APPROB); + myRows.push_back(myAprobRow); + + // 22 create FX and Label for Adapt Factor + myAdaptFactorRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_IDMM_ADAPT_FACTOR); + myRows.push_back(myAdaptFactorRow); + + // 23 create FX and Label for Adapt Time + myAdaptTimeRow = new CarFollowingModelRow(this, myVerticalFrameRows, SUMO_ATTR_CF_IDMM_ADAPT_TIME); + myRows.push_back(myAdaptTimeRow); + + // create myLabelIncompleteAttribute + myLabelIncompleteAttribute = new FXLabel(myVerticalFrameRows, "Some attributes wasn't\nimplemented yet", nullptr, GUIDesignLabelAboutInfoCenter); + myLabelIncompleteAttribute->hide(); + + // show or hidde ComboBox depending of current selected CFM + refreshCFMFields(); +} + + +void +GNEVehicleTypeDialog::CarFollowingModelParameters::refreshCFMFields() { + // start hidding all rows + for (const auto& i : myRows) { + i->hide(); + } + // hide myLabelIncompleteAttribute + myLabelIncompleteAttribute->hide(); + // show textfield depending of current CFM + if (SUMOXMLDefinitions::CarFollowModels.hasString(myComboBoxCarFollowModel->getText().text())) { + // show textfield depending of selected CFM + switch (SUMOXMLDefinitions::CarFollowModels.get(myComboBoxCarFollowModel->getText().text())) { + case SUMO_TAG_CF_KRAUSS: + case SUMO_TAG_CF_KRAUSS_ORIG1: + case SUMO_TAG_CF_KRAUSS_PLUS_SLOPE: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myApparentDecelRow->show(); + myEmergencyDecelRow->show(); + mySigmaRow->show(); + break; + case SUMO_TAG_CF_KRAUSSX: + myTauRow->show(); + myTmp1Row->show(); + myTmp2Row->show(); + myTmp3Row->show(); + myTmp4Row->show(); + myTmp5Row->show(); + break; + case SUMO_TAG_CF_SMART_SK: + case SUMO_TAG_CF_DANIEL1: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + mySigmaRow->show(); + myMinGapFactorRow->show(); + myTmp1Row->show(); + myTmp2Row->show(); + myTmp3Row->show(); + myTmp4Row->show(); + myTmp5Row->show(); + break; + case SUMO_TAG_CF_PWAGNER2009: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + mySigmaRow->show(); + myMinGapFactorRow->show(); + myTrauLastRow->show(); + myAprobRow->show(); + break; + case SUMO_TAG_CF_IDM: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + mySteppingRow->show(); + myMinGapFactorRow->show(); + break; + case SUMO_TAG_CF_IDMM: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + mySteppingRow->show(); + myMinGapFactorRow->show(); + myAdaptFactorRow->show(); + myAdaptTimeRow->show(); + break; + case SUMO_TAG_CF_BKERNER: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + myKRow->show(); + myPhiRow->show(); + myMinGapFactorRow->show(); + break; + case SUMO_TAG_CF_WIEDEMANN: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + myMinGapFactorRow->show(); + mySecurityRow->show(); + myEstimationRow->show(); + break; + case SUMO_TAG_CF_RAIL: + myTauRow->show(); + myTrainTypeRow->show(); + break; + case SUMO_TAG_CF_ACC: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + myMinGapFactorRow->show(); + // show myLabelIncompleteAttribute + myLabelIncompleteAttribute->show(); + /** + The follow parameters has to be added: + SUMO_ATTR_SC_GAIN + SUMO_ATTR_GCC_GAIN_SPEED + SUMO_ATTR_GCC_GAIN_SPACE + SUMO_ATTR_GC_GAIN_SPEED + SUMO_ATTR_GC_GAIN_SPACE + SUMO_ATTR_CA_GAIN_SPEED + SUMO_ATTR_CA_GAIN_SPACE + */ + break; + case SUMO_TAG_CF_CACC: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + myEmergencyDecelRow->show(); + myMinGapFactorRow->show(); + // show myLabelIncompleteAttribute + myLabelIncompleteAttribute->show(); + /** + The follow parameters has to be added: + SUMO_ATTR_SC_GAIN_CACC + SUMO_ATTR_GCC_GAIN_GAP_CACC + SUMO_ATTR_GCC_GAIN_GAP_DOT_CACC + SUMO_ATTR_GC_GAIN_GAP_CACC + SUMO_ATTR_GC_GAIN_GAP_DOT_CACC + SUMO_ATTR_CA_GAIN_GAP_CACC + SUMO_ATTR_CA_GAIN_GAP_DOT_CACC + SUMO_ATTR_GCC_GAIN_SPEED + SUMO_ATTR_GCC_GAIN_SPACE + SUMO_ATTR_GC_GAIN_SPEED + SUMO_ATTR_GC_GAIN_SPACE + SUMO_ATTR_CA_GAIN_SPEED + SUMO_ATTR_CA_GAIN_SPACE + */ + break; + case SUMO_TAG_CF_CC: + myTauRow->show(); + myAccelRow->show(); + myDecelRow->show(); + // show myLabelIncompleteAttribute + myLabelIncompleteAttribute->show(); + /** + The follow parameters has to be added: + SUMO_ATTR_CF_CC_C1 + SUMO_ATTR_CF_CC_CCDECEL + SUMO_ATTR_CF_CC_CONSTSPACING + SUMO_ATTR_CF_CC_KP + SUMO_ATTR_CF_CC_LAMBDA + SUMO_ATTR_CF_CC_OMEGAN + SUMO_ATTR_CF_CC_TAU + SUMO_ATTR_CF_CC_XI + SUMO_ATTR_CF_CC_LANES_COUNT + SUMO_ATTR_CF_CC_CCACCEL + SUMO_ATTR_CF_CC_PLOEG_KP + SUMO_ATTR_CF_CC_PLOEG_KD + SUMO_ATTR_CF_CC_PLOEG_H + SUMO_ATTR_CF_CC_FLATBED_KA + SUMO_ATTR_CF_CC_FLATBED_KV + SUMO_ATTR_CF_CC_FLATBED_KP + SUMO_ATTR_CF_CC_FLATBED_D + SUMO_ATTR_CF_CC_FLATBED_H + */ + break; + default: + break; + } + } + myVerticalFrameRows->recalc(); + update(); +} + + +void +GNEVehicleTypeDialog::CarFollowingModelParameters::updateValues() { + //set values of myEditedDemandElement into fields + if (myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL).empty()) { + myComboBoxCarFollowModel->setCurrentItem(0); + } else { + myComboBoxCarFollowModel->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL).c_str()); + } + // refresh fields + refreshCFMFields(); + // update value in all Rows + for (const auto& i : myRows) { + i->updateValue(); + } +} + + +long +GNEVehicleTypeDialog::CarFollowingModelParameters::onCmdSetVariable(FXObject*, FXSelector, void*) { + // At start we assumed, that all values are valid + myVehicleTypeDialog->myVehicleTypeValid = true; + myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_NOTHING; + // set color of myTextFieldCarFollowModel, depending if current value is valid or not + if (myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text())) { + myComboBoxCarFollowModel->setTextColor(FXRGB(0, 0, 0)); + myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + } else { + myComboBoxCarFollowModel->setTextColor(FXRGB(255, 0, 0)); + myVehicleTypeDialog->myVehicleTypeValid = false; + myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_CAR_FOLLOW_MODEL; + } + // set variable in all Rows + for (const auto& i : myRows) { + i->setVariable(); + } + // refresh fields + refreshCFMFields(); + return true; +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeDialog - public methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeDialog::GNEVehicleTypeDialog(GNEDemandElement* editedVehicleType, bool updatingElement) : + GNEDemandElementDialog(editedVehicleType, updatingElement, 1022, 506), + myVehicleTypeValid(true), + myInvalidAttr(SUMO_ATTR_NOTHING) { + + // change default header + changeDemandElementDialogHeader(updatingElement ? "Edit " + myEditedDemandElement->getTagStr() : "Create " + myEditedDemandElement->getTagStr()); + + // Create auxiliar frames for values + FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignAuxiliarHorizontalFrame); + + // create vehicle type attributes + myVTypeAtributes = new VTypeAtributes(this, columns); + + // create car following model parameters + myCarFollowingModelParameters = new CarFollowingModelParameters(this, columns); + + // start a undo list for editing local to this additional + initChanges(); + + // add element if we aren't updating an existent element + if (myUpdatingElement == false) { + myEditedDemandElement->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(myEditedDemandElement, true), true); + } + + // update values of Vehicle Type common attributes + myVTypeAtributes->updateValues(); + + // update values of Car Following Model Parameters + myCarFollowingModelParameters->updateValues(); + + // open as modal dialog + openAsModalDialog(); +} + + +GNEVehicleTypeDialog::~GNEVehicleTypeDialog() {} + + +long +GNEVehicleTypeDialog::onCmdAccept(FXObject*, FXSelector, void*) { + if (myVehicleTypeValid == false) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); + std::string operation1 = myUpdatingElement ? ("updating") : ("creating"); + std::string operation2 = myUpdatingElement ? ("updated") : ("created"); + std::string tagString = myEditedDemandElement->getTagStr(); + // open warning dialogBox + FXMessageBox::warning(getApp(), MBOX_OK, + ("Error " + operation1 + " " + tagString).c_str(), "%s", + (tagString + " cannot be " + operation2 + + " because parameter " + toString(myInvalidAttr) + + " is invalid.").c_str()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); + return 0; + } else { + // accept changes before closing dialog + acceptChanges(); + // stop dialgo sucesfully + getApp()->stopModal(this, TRUE); + return 1; + } +} + + +long +GNEVehicleTypeDialog::onCmdCancel(FXObject*, FXSelector, void*) { + // cancel changes + cancelChanges(); + // Stop Modal + getApp()->stopModal(this, FALSE); + return 1; +} + + +long +GNEVehicleTypeDialog::onCmdReset(FXObject*, FXSelector, void*) { + // reset changes + resetChanges(); + // update values of Vehicle Type common attributes + myVTypeAtributes->updateValues(); + // update values of Car Following Model Parameters + myCarFollowingModelParameters->updateValues(); + return 1; +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeDialog - private methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::CarFollowingModelRow(CarFollowingModelParameters* carFollowingModelParametersParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr) : + FXHorizontalFrame(verticalFrame, GUIDesignAuxiliarHorizontalFrame), + myCarFollowingModelParametersParent(carFollowingModelParametersParent), + myAttr(attr) { + myLabel = new FXLabel(this, toString(attr).c_str(), nullptr, GUIDesignLabelAttribute150); + textField = new FXTextField(this, GUIDesignTextFieldNCol, carFollowingModelParametersParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real); +} + + +void +GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::setVariable() { + // set color of textField, depending if current value is valid or not + if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, textField->getText().text())) { + // set color depending if is a default value + if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != textField->getText().text()) { + textField->setTextColor(FXRGB(0, 0, 0)); + } else { + textField->setTextColor(FXRGB(195, 195, 195)); + } + myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, textField->getText().text(), + myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList()); + // update value after setting it + updateValue(); + } else { + textField->setTextColor(FXRGB(255, 0, 0)); + // mark VType as invalid + myCarFollowingModelParametersParent->myVehicleTypeDialog->myVehicleTypeValid = false; + myCarFollowingModelParametersParent->myVehicleTypeDialog->myInvalidAttr = myAttr; + } +} + + +void +GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::updateValue() { + // set text of myTextField using current value of VType + textField->setText(myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str()); + // set color depending if is a default value + if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != textField->getText().text()) { + textField->setTextColor(FXRGB(0, 0, 0)); + } else { + textField->setTextColor(FXRGB(195, 195, 195)); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.h sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.h --- sumo-1.1.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/GNEVehicleTypeDialog.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,454 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleTypeDialog.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2019 +/// @version $Id$ +/// +// Dialog for edit vehicleTypes +/****************************************************************************/ +#ifndef GNEVehicleTypeDialog_h +#define GNEVehicleTypeDialog_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include "GNEDemandElementDialog.h" + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEVehicleType; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNEVehicleTypeDialog + * @brief Dialog for edit rerouter intervals + */ + +class GNEVehicleTypeDialog : public GNEDemandElementDialog { + +public: + /// @brief class for VClasses + class VTypeAtributes : protected FXVerticalFrame { + /// @brief FOX-declaration + FXDECLARE(GNEVehicleTypeDialog::VTypeAtributes) + + public: + /// @brief class for VClasses + class VClassRow : protected FXHorizontalFrame { + + public: + /// @brief constructor + VClassRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column); + + /// @brief set variables + void setVariable(); + + /// @brief update values + void updateValues(); + + protected: + /// @brief set VClass texture + void setVClassLabelImage(); + + /// @brief FXComboBox for VClass + FXComboBox* myComboBoxVClass; + + /// @brief label with image of VClass + FXLabel* myComboBoxVClassLabelImage; + + private: + /// @brief pointer to VTypeAtributes parent + VTypeAtributes* myVTypeAtributesParent; + }; + + /// @brief class for VShapeRow + class VShapeRow : protected FXHorizontalFrame { + + public: + /// @brief constructor + VShapeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column); + + /// @brief set variables + void setVariable(); + + /// @brief update values + void updateValues(); + + protected: + /// @brief set VShape texture + void setVShapeLabelImage(); + + /// @brief FXComboBox for Shape + FXComboBox* myComboBoxShape; + + /// @brief label with image of Shape + FXLabel* myComboBoxShapeLabelImage; + + private: + /// @brief pointer to VTypeAtributes parent + VTypeAtributes* myVTypeAtributesParent; + }; + + /// @brief class used for represent rows with Vehicle Type parameters + class VTypeAttributeRow : protected FXHorizontalFrame { + public: + /// @brief constructor fox TextFields (type: 0 -> int, 1 -> float, other: string) + VTypeAttributeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr, int type); + + /// @brief constructor for comboBox + VTypeAttributeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr, const std::vector& values); + + /// @brief set Variablen in VehicleType + void setVariable(); + + /// @brief update value of Vehicle Type + void updateValue(); + + private: + /// @brief pointer to VTypeAttributeParameters parent + VTypeAtributes* myVTypeAtributesParent; + + /// @brief edited attribute + SumoXMLAttr myAttr; + + /// @brief text field + FXTextField* myTextField; + + /// @brief ComboBox for attributes with limited values + FXComboBox* myComboBox; + }; + + /// @brief constructor + VTypeAtributes(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column); + + /// @brief build commmon attributes (A) + void buildAttributesA(FXVerticalFrame* column); + + /// @brief build commmon attributes (B) + void buildAttributesB(FXVerticalFrame* column); + + /// @brief build JunctionModel attributes (A) + void buildJunctionModelAttributesA(FXVerticalFrame* column); + + /// @brief build JunctionModel attributes (B) + void buildJunctionModelAttributesB(FXVerticalFrame* column); + + /// @brief update values + void updateValues(); + + /// @name FOX-callbacks + /// @{ + /// @event called after change a Vehicle Type parameter + long onCmdSetVariable(FXObject*, FXSelector, void*); + + /// @event called after change a Vehicle Type color + long onCmdSetColor(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief fox need this + VTypeAtributes() {} + + /// @brief FXTextfield for vehicleTypeID + FXTextField* myTextFieldVehicleTypeID; + + /// @name Common Attributes + /// @{ + + /// @brief vehicle class row + VClassRow* myVClassRow; + + /// @brief FXButton for Color + FXButton* myButtonColor; + + /// @brief FXTextField for Color + FXTextField* myTextFieldColor; + + /// @brief VTypeAttributeRow for Length + VTypeAttributeRow* myLength; + + /// @brief VTypeAttributeRow for MinGap + VTypeAttributeRow* myMinGap; + + /// @brief VTypeAttributeRow for MaxSpeed + VTypeAttributeRow* myMaxSpeed; + + /// @brief VTypeAttributeRow for SpeedFactor + VTypeAttributeRow* mySpeedFactor; + + /// @brief VTypeAttributeRow for SpeedDev + VTypeAttributeRow* mySpeedDev; + + /// @brief VTypeAttributeRow for EmissionClass + VTypeAttributeRow* myEmissionClass; + + /// @brief vehicle shape row + VShapeRow* myVShapeRow; + + /// @brief VTypeAttributeRow for Width + VTypeAttributeRow* myWidth; + + /// @brief VTypeAttributeRow for Filename + VTypeAttributeRow* myFilename; + + /// @brief VTypeAttributeRow for LaneChangeModel + VTypeAttributeRow* myLaneChangeModel; + + /// @brief VTypeAttributeRow for PersonCapacity + VTypeAttributeRow* myPersonCapacity; + + /// @brief VTypeAttributeRow for ContainerCapacity + VTypeAttributeRow* myContainerCapacity; + + /// @brief VTypeAttributeRow for BoardingDuration + VTypeAttributeRow* myBoardingDuration; + + /// @brief VTypeAttributeRow for LoadingDuration + VTypeAttributeRow* myLoadingDuration; + + /// @brief VTypeAttributeRow for LatAlignment + VTypeAttributeRow* myLatAlignment; + + /// @brief VTypeAttributeRow for MinGapLat + VTypeAttributeRow* myMinGapLat; + + /// @brief VTypeAttributeRow for MaxSpeedLat + VTypeAttributeRow* myMaxSpeedLat; + + /// @brief VTypeAttributeRow for ActionStepLenght + VTypeAttributeRow* myActionStepLenght; + + /// @} + + /// @name JM Attributes + /// @{ + + /// @brief VTypeAttributeRow for Crossing Gap + VTypeAttributeRow* myJMCrossingGap; + + /// @brief VTypeAttributeRow for Ignore Keep Clear Time + VTypeAttributeRow* myJMIgnoreKeepclearTime; + + /// @brief VTypeAttributeRow for Drive After Red Time + VTypeAttributeRow* myJMDriveAfterRedTime; + + /// @brief VTypeAttributeRow for Drive Red Speed + VTypeAttributeRow* myJMDriveRedSpeed; + + /// @brief VTypeAttributeRow for Ignore FOE Probability + VTypeAttributeRow* myJMIgnoreFoeProb; + + /// @brief VTypeAttributeRow for Ignore FOE Speed + VTypeAttributeRow* myJMIgnoreFoeSpeed; + + /// @brief VTypeAttributeRow for Sigma Minor + VTypeAttributeRow* myJMSigmaMinor; + + /// @brief VTypeAttributeRow for Time GAP Minor + VTypeAttributeRow* myJMTimeGapMinor; + + /// @brief VTypeAttributeRow for Impatience + VTypeAttributeRow* myJMImpatience; + + /// @} + + private: + /// @brief pointer to Vehicle Type dialog parent + GNEVehicleTypeDialog* myVehicleTypeDialog; + }; + + /// @brief class for CarFollowingModel + class CarFollowingModelParameters : public FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNEVehicleTypeDialog::CarFollowingModelParameters) + + public: + /// @brief constructor + CarFollowingModelParameters(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column); + + /// @brief refresh Car Following Model Fields + void refreshCFMFields(); + + /// @brief update values + void updateValues(); + + /// @name FOX-callbacks + /// @{ + /// @event called after change a CFM variable + long onCmdSetVariable(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief fox need this + CarFollowingModelParameters() {} + + /// @brief class used for represent rows with Car Following Model parameters + class CarFollowingModelRow : public FXHorizontalFrame { + public: + /// @brief constructor + CarFollowingModelRow(CarFollowingModelParameters* carFollowingModelParametersParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr); + + /// @brief set Variablen in VehicleType + void setVariable(); + + /// @brief update value of Vehicle Type + void updateValue(); + + private: + /// @brief pointer to CarFollowingModelParameters parent + CarFollowingModelParameters* myCarFollowingModelParametersParent; + + /// @brief edited attribute + SumoXMLAttr myAttr; + + /// @brief text field + FXTextField* textField; + + /// @label Label with the Row attribute + FXLabel* myLabel; + }; + + private: + /// @brief pointer to Vehicle Type dialog parent + GNEVehicleTypeDialog* myVehicleTypeDialog; + + /// @brief vector with the Car Following Model Row + std::vector myRows; + + /// @brief Row for CarFollowModel + FXComboBox* myComboBoxCarFollowModel; + + /// @brief Vertical Frame for CarFollowingModelRow + FXVerticalFrame* myVerticalFrameRows; + + /// @brief Row for Accel + CarFollowingModelRow* myAccelRow; + + /// @brief Row for Decel + CarFollowingModelRow* myDecelRow; + + /// @brief Row for aparent Decel + CarFollowingModelRow* myApparentDecelRow; + + /// @brief Row for emergency Decel + CarFollowingModelRow* myEmergencyDecelRow; + + /// @brief Row for Sigma + CarFollowingModelRow* mySigmaRow; + + /// @brief Row for Tau + CarFollowingModelRow* myTauRow; + + /// @brief Row for MinGapFactor + CarFollowingModelRow* myMinGapFactorRow; + + /// @brief Row for MinGap (only for Kerner) + CarFollowingModelRow* myKRow; + + /// @brief Row for MinGap (only for Kerner) + CarFollowingModelRow* myPhiRow; + + /// @brief Row for MinGap (only for IDM) + CarFollowingModelRow* myDeltaRow; + + /// @brief Row for MinGap(only for IDM) + CarFollowingModelRow* mySteppingRow; + + /// @brief Row for Security (only for Wiedemann) + CarFollowingModelRow* mySecurityRow; + + /// @brief Row for Estimation (only for Wiedemann) + CarFollowingModelRow* myEstimationRow; + + /// @brief Row for TMP1 + CarFollowingModelRow* myTmp1Row; + + /// @brief Row for TMP2 + CarFollowingModelRow* myTmp2Row; + + /// @brief Row for TMP3 + CarFollowingModelRow* myTmp3Row; + + /// @brief Row for TMP4 + CarFollowingModelRow* myTmp4Row; + + /// @brief Row for TMP5 + CarFollowingModelRow* myTmp5Row; + + /// @brief Row for TrainType + CarFollowingModelRow* myTrainTypeRow; + + /// @brief Row for TauLast + CarFollowingModelRow* myTrauLastRow; + + /// @brief Row for Aprob + CarFollowingModelRow* myAprobRow; + + /// @brief Row for Adapt Factor + CarFollowingModelRow* myAdaptFactorRow; + + /// @brief Row for Adapt Time + CarFollowingModelRow* myAdaptTimeRow; + + /// @brief temporal label for incomplete attributes + FXLabel* myLabelIncompleteAttribute; + }; + + /// @brief constructor + GNEVehicleTypeDialog(GNEDemandElement* editedVehicleType, bool updatingElement); + + /// @brief destructor + ~GNEVehicleTypeDialog(); + + /// @name FOX-callbacks + /// @{ + /// @brief event after press accept button + long onCmdAccept(FXObject*, FXSelector, void*); + + /// @brief event after press cancel button + long onCmdCancel(FXObject*, FXSelector, void*); + + /// @brief event after press reset button + long onCmdReset(FXObject*, FXSelector, void*); + + /// @event after change a variable of vehicle type + long onCmdSetVariable(FXObject*, FXSelector, void*); + /// @} + +private: + /// @brief flag to check if current vehicleType is valid + bool myVehicleTypeValid; + + /// @brief current sumo attribute invalid + SumoXMLAttr myInvalidAttr; + + /// @brief Vehicle Type Common Attributes + VTypeAtributes* myVTypeAtributes; + + /// @brief Car Following model parameters + CarFollowingModelParameters* myCarFollowingModelParameters; + + /// @brief Invalidated copy constructor. + GNEVehicleTypeDialog(const GNEVehicleTypeDialog&) = delete; + + /// @brief Invalidated assignment operator. + GNEVehicleTypeDialog& operator=(const GNEVehicleTypeDialog&) = delete; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/Makefile.am sumo-1.2.0+dfsg1/src/netedit/dialogs/Makefile.am --- sumo-1.1.0+dfsg1/src/netedit/dialogs/Makefile.am 2018-08-07 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -4,12 +4,14 @@ GNEDialog_About.cpp GNEDialog_About.h \ GNEDialog_AllowDisallow.cpp GNEDialog_AllowDisallow.h \ GNEGenericParameterDialog.cpp GNEGenericParameterDialog.h \ -GNEDialog_FixAdditionalPositions.cpp GNEDialog_FixAdditionalPositions.h \ +GNEDialog_FixAdditionalElements.cpp GNEDialog_FixAdditionalElements.h \ +GNEDialog_FixDemandElements.cpp GNEDialog_FixDemandElements.h \ GNEAdditionalDialog.cpp GNEAdditionalDialog.h \ +GNEDemandElementDialog.cpp GNEDemandElementDialog.h \ GNERerouterDialog.cpp GNERerouterDialog.h \ GNERerouterIntervalDialog.cpp GNERerouterIntervalDialog.h \ GNECalibratorDialog.cpp GNECalibratorDialog.h \ GNECalibratorFlowDialog.cpp GNECalibratorFlowDialog.h \ -GNECalibratorRouteDialog.cpp GNECalibratorRouteDialog.h \ -GNECalibratorVehicleTypeDialog.cpp GNECalibratorVehicleTypeDialog.h \ +GNERouteDialog.cpp GNERouteDialog.h \ +GNEVehicleTypeDialog.cpp GNEVehicleTypeDialog.h \ GNEDialogACChooser.cpp GNEDialogACChooser.h diff -Nru sumo-1.1.0+dfsg1/src/netedit/dialogs/Makefile.in sumo-1.2.0+dfsg1/src/netedit/dialogs/Makefile.in --- sumo-1.1.0+dfsg1/src/netedit/dialogs/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/dialogs/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,664 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netedit/dialogs -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libneteditdialogs_a_AR = $(AR) $(ARFLAGS) -libneteditdialogs_a_LIBADD = -am_libneteditdialogs_a_OBJECTS = GNEVariableSpeedSignDialog.$(OBJEXT) \ - GNEDialog_About.$(OBJEXT) GNEDialog_AllowDisallow.$(OBJEXT) \ - GNEGenericParameterDialog.$(OBJEXT) \ - GNEDialog_FixAdditionalPositions.$(OBJEXT) \ - GNEAdditionalDialog.$(OBJEXT) GNERerouterDialog.$(OBJEXT) \ - GNERerouterIntervalDialog.$(OBJEXT) \ - GNECalibratorDialog.$(OBJEXT) \ - GNECalibratorFlowDialog.$(OBJEXT) \ - GNECalibratorRouteDialog.$(OBJEXT) \ - GNECalibratorVehicleTypeDialog.$(OBJEXT) \ - GNEDialogACChooser.$(OBJEXT) -libneteditdialogs_a_OBJECTS = $(am_libneteditdialogs_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 = $(libneteditdialogs_a_SOURCES) -DIST_SOURCES = $(libneteditdialogs_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libneteditdialogs.a -libneteditdialogs_a_SOURCES = GNEVariableSpeedSignDialog.cpp GNEVariableSpeedSignDialog.h \ -GNEDialog_About.cpp GNEDialog_About.h \ -GNEDialog_AllowDisallow.cpp GNEDialog_AllowDisallow.h \ -GNEGenericParameterDialog.cpp GNEGenericParameterDialog.h \ -GNEDialog_FixAdditionalPositions.cpp GNEDialog_FixAdditionalPositions.h \ -GNEAdditionalDialog.cpp GNEAdditionalDialog.h \ -GNERerouterDialog.cpp GNERerouterDialog.h \ -GNERerouterIntervalDialog.cpp GNERerouterIntervalDialog.h \ -GNECalibratorDialog.cpp GNECalibratorDialog.h \ -GNECalibratorFlowDialog.cpp GNECalibratorFlowDialog.h \ -GNECalibratorRouteDialog.cpp GNECalibratorRouteDialog.h \ -GNECalibratorVehicleTypeDialog.cpp GNECalibratorVehicleTypeDialog.h \ -GNEDialogACChooser.cpp GNEDialogACChooser.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) --foreign src/netedit/dialogs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netedit/dialogs/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) - -libneteditdialogs.a: $(libneteditdialogs_a_OBJECTS) $(libneteditdialogs_a_DEPENDENCIES) $(EXTRA_libneteditdialogs_a_DEPENDENCIES) - $(AM_V_at)-rm -f libneteditdialogs.a - $(AM_V_AR)$(libneteditdialogs_a_AR) libneteditdialogs.a $(libneteditdialogs_a_OBJECTS) $(libneteditdialogs_a_LIBADD) - $(AM_V_at)$(RANLIB) libneteditdialogs.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEAdditionalDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibratorDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibratorFlowDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibratorRouteDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECalibratorVehicleTypeDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDialogACChooser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDialog_About.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDialog_AllowDisallow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDialog_FixAdditionalPositions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEGenericParameterDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNERerouterDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNERerouterIntervalDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEVariableSpeedSignDialog.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netedit/frames/CMakeLists.txt sumo-1.2.0+dfsg1/src/netedit/frames/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/netedit/frames/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -19,6 +19,16 @@ GNEDeleteFrame.cpp GNEPolygonFrame.h GNEPolygonFrame.cpp + GNECreateEdgeFrame.h + GNECreateEdgeFrame.cpp + GNERouteFrame.h + GNERouteFrame.cpp + GNEStopFrame.h + GNEStopFrame.cpp + GNEVehicleFrame.h + GNEVehicleFrame.cpp + GNEVehicleTypeFrame.h + GNEVehicleTypeFrame.cpp GNEProhibitionFrame.h GNEProhibitionFrame.cpp ) diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include "GNEAdditionalFrame.h" @@ -87,7 +89,7 @@ GNEAdditionalFrame::SelectorLaneParents::~SelectorLaneParents() {} -void +void GNEAdditionalFrame::SelectorLaneParents::showSelectorLaneParentsModul() { // abort current selection before show abortConsecutiveLaneSelector(); @@ -96,7 +98,7 @@ } -void +void GNEAdditionalFrame::SelectorLaneParents::hideSelectorLaneParentsModul() { // abort current selection before hide abortConsecutiveLaneSelector(); @@ -105,8 +107,8 @@ } -void -GNEAdditionalFrame::SelectorLaneParents::startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition) { +void +GNEAdditionalFrame::SelectorLaneParents::startConsecutiveLaneSelector(GNELane* lane, const Position& clickedPosition) { // Only start selection if SelectorLaneParents modul is shown if (shown()) { // change buttons @@ -118,7 +120,7 @@ } -bool +bool GNEAdditionalFrame::SelectorLaneParents::stopConsecutiveLaneSelector() { // obtain tagproperty (only for improve code legibility) const auto& tagValues = myAdditionalFrameParent->myItemSelector->getCurrentTagProperties(); @@ -130,7 +132,7 @@ return false; } // Declare map to keep attributes from Frames from Frame - std::map valuesMap = myAdditionalFrameParent->myAdditionalAttributes->getAttributesAndValues(); + std::map valuesMap = myAdditionalFrameParent->myAdditionalAttributes->getAttributesAndValues(true); // fill valuesOfElement with Netedit attributes from Frame myAdditionalFrameParent->myNeteditAttributes->getNeteditAttributesAndValues(valuesMap, nullptr); // Generate id of element @@ -146,26 +148,31 @@ // Obtain clicked position over last lane valuesMap[SUMO_ATTR_ENDPOS] = toString(mySelectedLanes.back().second); // parse common attributes - if(!myAdditionalFrameParent->buildAdditionalCommonAttributes(valuesMap, tagValues)) { + if (!myAdditionalFrameParent->buildAdditionalCommonAttributes(valuesMap, tagValues)) { return false; } // show warning dialogbox and stop check if input parameters are valid if (myAdditionalFrameParent->myAdditionalAttributes->areValuesValid() == false) { myAdditionalFrameParent->myAdditionalAttributes->showWarningMessage(); return false; - } else if (GNEAdditionalHandler::buildAdditional(myAdditionalFrameParent->myViewNet, true, myAdditionalFrameParent->myItemSelector->getCurrentTagProperties().getTag(), valuesMap)) { - // abort consecutive lane selector - abortConsecutiveLaneSelector(); - return true; } else { - return false; + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, myAdditionalFrameParent->getPredefinedTagsMML(), toString(tagValues.getTag())); + // try to build additional + if (GNEAdditionalHandler::buildAdditional(myAdditionalFrameParent->myViewNet, true, myAdditionalFrameParent->myItemSelector->getCurrentTagProperties().getTag(), SUMOSAXAttrs, nullptr)) { + // abort consecutive lane selector + abortConsecutiveLaneSelector(); + return true; + } else { + return false; + } } } -void +void GNEAdditionalFrame::SelectorLaneParents::abortConsecutiveLaneSelector() { - // reset color of all candidate lanes + // reset color of all candidate lanes for (auto i : myCandidateLanes) { i->setSpecialColor(nullptr); } @@ -185,10 +192,10 @@ } -bool -GNEAdditionalFrame::SelectorLaneParents::addSelectedLane(GNELane *lane, const Position &clickedPosition) { +bool +GNEAdditionalFrame::SelectorLaneParents::addSelectedLane(GNELane* lane, const Position& clickedPosition) { // first check that lane exist - if(lane == nullptr) { + if (lane == nullptr) { return false; } // check that lane wasn't already selected @@ -199,11 +206,11 @@ } } // check that there is candidate lanes - if(mySelectedLanes.size() > 0) { + if (mySelectedLanes.size() > 0) { if (myCandidateLanes.empty()) { WRITE_WARNING("Only candidate lanes are allowed"); return false; - } else if((myCandidateLanes.size() > 0) && (std::find(myCandidateLanes.begin(), myCandidateLanes.end(), lane) == myCandidateLanes.end())) { + } else if ((myCandidateLanes.size() > 0) && (std::find(myCandidateLanes.begin(), myCandidateLanes.end(), lane) == myCandidateLanes.end())) { WRITE_WARNING("Only consecutive lanes are allowed"); return false; } @@ -214,7 +221,7 @@ lane->setSpecialColor(&mySelectedLaneColor); // restore original color of candidates (except already selected) for (auto i : myCandidateLanes) { - if(!isLaneSelected(i)) { + if (!isLaneSelected(i)) { i->setSpecialColor(nullptr); } } @@ -222,8 +229,8 @@ myCandidateLanes.clear(); // fill candidate lanes for (auto i : lane->getParentEdge().getGNEConnections()) { - // check that possible candidate lane isn't already selected - if((lane == i->getLaneFrom()) && (!isLaneSelected(i->getLaneTo()))) { + // check that possible candidate lane isn't already selected + if ((lane == i->getLaneFrom()) && (!isLaneSelected(i->getLaneTo()))) { // set candidate lane i->getLaneTo()->setSpecialColor(&myCandidateLaneColor); myCandidateLanes.push_back(i->getLaneTo()); @@ -235,9 +242,9 @@ } -void +void GNEAdditionalFrame::SelectorLaneParents::removeLastSelectedLane() { - if(mySelectedLanes.size() > 1) { + if (mySelectedLanes.size() > 1) { mySelectedLanes.pop_back(); } else { WRITE_WARNING("First lane cannot be removed"); @@ -245,13 +252,13 @@ } -bool +bool GNEAdditionalFrame::SelectorLaneParents::isSelectingLanes() const { return myStopSelectingButton->isEnabled(); } -bool +bool GNEAdditionalFrame::SelectorLaneParents::isShown() const { return shown(); } @@ -276,7 +283,7 @@ } -long +long GNEAdditionalFrame::SelectorLaneParents::onCmdAbortSelection(FXObject*, FXSelector, void*) { abortConsecutiveLaneSelector(); return 0; @@ -284,7 +291,7 @@ bool -GNEAdditionalFrame::SelectorLaneParents::isLaneSelected(GNELane *lane) const { +GNEAdditionalFrame::SelectorLaneParents::isLaneSelected(GNELane* lane) const { for (auto i : mySelectedLanes) { if (i.first == lane) { return true; @@ -304,7 +311,7 @@ // Create label with the type of SelectorAdditionalParent myFirstAdditionalParentsLabel = new FXLabel(this, "No additional selected", nullptr, GUIDesignLabelLeftThick); // Create list - myFirstAdditionalParentsList = new FXList(this, this, MID_GNE_SET_TYPE, GUIDesignListSingleElement, 0, 0, 0, 100); + myFirstAdditionalParentsList = new FXList(this, this, MID_GNE_SET_TYPE, GUIDesignListSingleElementFixedHeight); // Hide List hideSelectorAdditionalParentModul(); } @@ -344,7 +351,7 @@ bool GNEAdditionalFrame::SelectorAdditionalParent::showSelectorAdditionalParentModul(SumoXMLTag additionalType) { // make sure that we're editing an additional tag - auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL, false); + auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL, false); for (auto i : listOfTags) { if (i == additionalType) { myAdditionalTypeParent = additionalType; @@ -390,7 +397,7 @@ myEdgesSearch = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_ADDITIONALFRAME_SEARCH, GUIDesignTextField); // Create list - myList = new FXList(this, this, MID_GNE_ADDITIONALFRAME_SELECT, GUIDesignList, 0, 0, 0, 100); + myList = new FXList(this, this, MID_GNE_ADDITIONALFRAME_SELECT, GUIDesignListFixedHeight, 0, 0, 0, 100); // Create horizontal frame FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); @@ -545,7 +552,7 @@ myLanesSearch = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_ADDITIONALFRAME_SEARCH, GUIDesignTextField); // Create list - myList = new FXList(this, this, MID_GNE_ADDITIONALFRAME_SELECT, GUIDesignList, 0, 0, 0, 100); + myList = new FXList(this, this, MID_GNE_ADDITIONALFRAME_SELECT, GUIDesignListFixedHeight, 0, 0, 0, 100); // Create horizontal frame FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); @@ -685,10 +692,10 @@ GNEFrame(horizontalFrameParent, viewNet, "Additionals") { // create item Selector modul for additionals - myItemSelector = new ItemSelector(this, GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL); + myItemSelector = new ItemSelector(this, GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL); // Create additional parameters - myAdditionalAttributes = new ACAttributes(this); + myAdditionalAttributes = new AttributesCreator(this); // Create Netedit parameter myNeteditAttributes = new NeteditAttributes(this); @@ -713,7 +720,7 @@ GNEAdditionalFrame::~GNEAdditionalFrame() {} -void +void GNEAdditionalFrame::show() { // refresh item selector myItemSelector->refreshTagProperties(); @@ -723,21 +730,21 @@ bool -GNEAdditionalFrame::addAdditional(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) { +GNEAdditionalFrame::addAdditional(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { // first check that current selected additional is valid if (myItemSelector->getCurrentTagProperties().getTag() == SUMO_TAG_NOTHING) { myViewNet->setStatusBarText("Current selected additional isn't valid."); return false; } - + // obtain tagproperty (only for improve code legibility) const auto& tagValues = myItemSelector->getCurrentTagProperties(); // Declare map to keep attributes from Frames from Frame - std::map valuesMap = myAdditionalAttributes->getAttributesAndValues(); + std::map valuesMap = myAdditionalAttributes->getAttributesAndValues(true); // fill netedit attributes - if(!myNeteditAttributes->getNeteditAttributesAndValues(valuesMap, objectsUnderCursor.getLaneFront())) { + if (!myNeteditAttributes->getNeteditAttributesAndValues(valuesMap, objectsUnderCursor.getLaneFront())) { return false; } @@ -746,29 +753,17 @@ return false; } // If consecutive Lane Selector is enabled, it means that either we're selecting lanes or we're finished or we'rent started - if(tagValues.canBePlacedOverEdge()) { + if (tagValues.hasAttribute(SUMO_ATTR_EDGE)) { return buildAdditionalOverEdge(valuesMap, objectsUnderCursor.getLaneFront(), tagValues); - } else if(tagValues.canBePlacedOverLane()) { + } else if (tagValues.hasAttribute(SUMO_ATTR_LANE)) { return buildAdditionalOverLane(valuesMap, objectsUnderCursor.getLaneFront(), tagValues); - } else if(tagValues.canBePlacedOverLanes()) { + } else if (tagValues.hasAttribute(SUMO_ATTR_LANES)) { return buildAdditionalOverLanes(valuesMap, objectsUnderCursor.getLaneFront(), tagValues); } else { return buildAdditionalOverView(valuesMap, tagValues); } } -void -GNEAdditionalFrame::removeAdditional(GNEAdditional* additional) { - myViewNet->getUndoList()->p_begin("delete " + additional->getTagStr()); - // first remove all additional childs of this additional calling this function recursively - while (additional->getAdditionalChilds().size() > 0) { - removeAdditional(additional->getAdditionalChilds().front()); - } - // remove additional - myViewNet->getUndoList()->add(new GNEChange_Additional(additional, false), true); - myViewNet->getUndoList()->p_end(); -} - void GNEAdditionalFrame::showSelectorLaneChildsModul() { @@ -781,16 +776,16 @@ } -GNEAdditionalFrame::SelectorLaneParents* +GNEAdditionalFrame::SelectorLaneParents* GNEAdditionalFrame::getConsecutiveLaneSelector() const { return mySelectorLaneParents; } -void -GNEAdditionalFrame::enableModuls(const GNEAttributeCarrier::TagProperties &tagProperties) { +void +GNEAdditionalFrame::enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties) { // show additional attributes modul - myAdditionalAttributes->showACAttributesModul(tagProperties); + myAdditionalAttributes->showAttributesCreatorModul(tagProperties); // show netedit attributes myNeteditAttributes->showNeteditAttributesModul(tagProperties); // Show myAdditionalFrameParent if we're adding a additional with parent @@ -807,7 +802,7 @@ } // Show SelectorLaneChilds or consecutive lane selector if we're adding an additional that own the attribute SUMO_ATTR_LANES if (tagProperties.hasAttribute(SUMO_ATTR_LANES)) { - if(tagProperties.hasParent() && tagProperties.getParentTag() == SUMO_TAG_LANE) { + if (tagProperties.hasParent() && tagProperties.getParentTag() == SUMO_TAG_LANE) { // show selector lane parent and hide selector lane child mySelectorLaneParents->showSelectorLaneParentsModul(); mySelectorLaneChilds->hideSelectorLaneChildsModul(); @@ -823,10 +818,10 @@ } -void +void GNEAdditionalFrame::disableModuls() { // hide all moduls if additional isn't valid - myAdditionalAttributes->hideACAttributesModul(); + myAdditionalAttributes->hideAttributesCreatorModul(); myNeteditAttributes->hideNeteditAttributesModul(); mySelectorAdditionalParent->hideSelectorAdditionalParentModul(); mySelectorEdgeChilds->hideSelectorEdgeChildsModul(); @@ -840,13 +835,18 @@ // obtain current number of additionals to generate a new index faster int additionalIndex = myViewNet->getNet()->getNumberOfAdditionals(myItemSelector->getCurrentTagProperties().getTag()); // obtain tag Properties (only for improve code legilibility - const auto &tagProperties = myItemSelector->getCurrentTagProperties(); + const auto& tagProperties = myItemSelector->getCurrentTagProperties(); if (netElement) { - // generate ID using netElement - while (myViewNet->getNet()->retrieveAdditional(tagProperties.getTag(), tagProperties.getTagStr() + "_" + netElement->getID() + "_" + toString(additionalIndex), false) != nullptr) { - additionalIndex++; + // special case for vaporizers + if (tagProperties.getTag() == SUMO_TAG_VAPORIZER) { + return netElement->getID(); + } else { + // generate ID using netElement + while (myViewNet->getNet()->retrieveAdditional(tagProperties.getTag(), tagProperties.getTagStr() + "_" + netElement->getID() + "_" + toString(additionalIndex), false) != nullptr) { + additionalIndex++; + } + return tagProperties.getTagStr() + "_" + netElement->getID() + "_" + toString(additionalIndex); } - return tagProperties.getTagStr() + "_" + netElement->getID() + "_" + toString(additionalIndex); } else { // generate ID without netElement while (myViewNet->getNet()->retrieveAdditional(tagProperties.getTag(), tagProperties.getTagStr() + "_" + toString(additionalIndex), false) != nullptr) { @@ -857,8 +857,8 @@ } -bool -GNEAdditionalFrame::buildAdditionalWithParent(std::map &valuesMap, GNEAdditional* additionalParent, const GNEAttributeCarrier::TagProperties &tagValues) { +bool +GNEAdditionalFrame::buildAdditionalWithParent(std::map& valuesMap, GNEAdditional* additionalParent, const GNEAttributeCarrier::TagProperties& tagValues) { // if user click over an additional element parent, mark int in AdditionalParentSelector if (additionalParent && (additionalParent->getTagProperty().getTag() == tagValues.getParentTag())) { valuesMap[GNE_ATTR_PARENT] = additionalParent->getID(); @@ -875,8 +875,8 @@ } -bool -GNEAdditionalFrame::buildAdditionalCommonAttributes(std::map &valuesMap, const GNEAttributeCarrier::TagProperties &tagValues) { +bool +GNEAdditionalFrame::buildAdditionalCommonAttributes(std::map& valuesMap, const GNEAttributeCarrier::TagProperties& tagValues) { // If additional has a interval defined by a begin or end, check that is valid if (tagValues.hasAttribute(SUMO_ATTR_STARTTIME) && tagValues.hasAttribute(SUMO_ATTR_END)) { double begin = GNEAttributeCarrier::parse(valuesMap[SUMO_ATTR_STARTTIME]); @@ -894,7 +894,7 @@ } } // If element own a list of SelectorEdgeChilds as attribute - if (tagValues.hasAttribute(SUMO_ATTR_EDGES) && !tagValues.canBePlacedOverEdges()) { + if (tagValues.hasAttribute(SUMO_ATTR_EDGES) && valuesMap[SUMO_ATTR_EDGES].empty()) { // obtain edge IDs valuesMap[SUMO_ATTR_EDGES] = mySelectorEdgeChilds->getEdgeIdsSelected(); // check if attribute has at least one edge @@ -904,7 +904,7 @@ } } // get values of mySelectorLaneChilds, if tag correspond to an element that has lanes as childs - if (tagValues.hasAttribute(SUMO_ATTR_LANES) && !tagValues.canBePlacedOverLanes()) { + if (tagValues.hasAttribute(SUMO_ATTR_LANES) && valuesMap[SUMO_ATTR_LANES].empty()) { // obtain lane IDs valuesMap[SUMO_ATTR_LANES] = mySelectorLaneChilds->getLaneIdsSelected(); // check if attribute has at least a lane @@ -918,8 +918,8 @@ } -bool -GNEAdditionalFrame::buildAdditionalOverEdge(std::map &valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties &tagValues) { +bool +GNEAdditionalFrame::buildAdditionalOverEdge(std::map& valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties& tagValues) { // check that edge exist if (lane) { // Get attribute lane's edge @@ -930,28 +930,33 @@ return false; } // parse common attributes - if(!buildAdditionalCommonAttributes(valuesMap, tagValues)) { + if (!buildAdditionalCommonAttributes(valuesMap, tagValues)) { return false; } // show warning dialogbox and stop check if input parameters are valid if (!myAdditionalAttributes->areValuesValid()) { myAdditionalAttributes->showWarningMessage(); return false; - } else if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), valuesMap) != nullptr) { - // Refresh additional Parent Selector (For additionals that have a limited number of childs) - mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); - // clear selected eddges and lanes - mySelectorEdgeChilds->onCmdClearSelection(nullptr, 0, nullptr); - mySelectorLaneChilds->onCmdClearSelection(nullptr, 0, nullptr); - return true; } else { - return false; + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(tagValues.getTag())); + // try to build additional + if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), SUMOSAXAttrs, nullptr)) { + // Refresh additional Parent Selector (For additionals that have a limited number of childs) + mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); + // clear selected eddges and lanes + mySelectorEdgeChilds->onCmdClearSelection(nullptr, 0, nullptr); + mySelectorLaneChilds->onCmdClearSelection(nullptr, 0, nullptr); + return true; + } else { + return false; + } } } -bool -GNEAdditionalFrame::buildAdditionalOverLane(std::map &valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties &tagValues) { +bool +GNEAdditionalFrame::buildAdditionalOverLane(std::map& valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties& tagValues) { // check that lane exist if (lane != nullptr) { // Get attribute lane @@ -966,37 +971,42 @@ // set attribute position as mouse position over lane valuesMap[SUMO_ATTR_POSITION] = toString(mousePositionOverLane); // parse common attributes - if(!buildAdditionalCommonAttributes(valuesMap, tagValues)) { + if (!buildAdditionalCommonAttributes(valuesMap, tagValues)) { return false; } // show warning dialogbox and stop check if input parameters are valid if (!myAdditionalAttributes->areValuesValid()) { myAdditionalAttributes->showWarningMessage(); return false; - } else if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), valuesMap)) { - // Refresh additional Parent Selector (For additionals that have a limited number of childs) - mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); - // clear selected eddges and lanes - mySelectorEdgeChilds->onCmdClearSelection(nullptr, 0, nullptr); - mySelectorLaneChilds->onCmdClearSelection(nullptr, 0, nullptr); - return true; } else { - return false; + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(tagValues.getTag())); + // try to build additional + if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), SUMOSAXAttrs, nullptr)) { + // Refresh additional Parent Selector (For additionals that have a limited number of childs) + mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); + // clear selected eddges and lanes + mySelectorEdgeChilds->onCmdClearSelection(nullptr, 0, nullptr); + mySelectorLaneChilds->onCmdClearSelection(nullptr, 0, nullptr); + return true; + } else { + return false; + } } } - bool -GNEAdditionalFrame::buildAdditionalOverLanes(std::map &valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties &tagValues) { - // stop if lane isn't valid - if(lane == nullptr) { +bool +GNEAdditionalFrame::buildAdditionalOverLanes(std::map& valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties& tagValues) { + // stop if lane isn't valid + if (lane == nullptr) { return false; } - if(mySelectorLaneParents->isSelectingLanes()) { + if (mySelectorLaneParents->isSelectingLanes()) { // select clicked lane, but don't build additional mySelectorLaneParents->addSelectedLane(lane, myViewNet->getPositionInformation()); return false; - } else if(mySelectorLaneParents->getSelectedLanes().empty()) { + } else if (mySelectorLaneParents->getSelectedLanes().empty()) { // if there isn't selected lanes, that means that we will be start selecting lanes mySelectorLaneParents->startConsecutiveLaneSelector(lane, myViewNet->getPositionInformation()); return false; @@ -1010,58 +1020,68 @@ } valuesMap[SUMO_ATTR_LANES] = joinToString(laneIDs, " "); // Check if clicked position over first lane has to be obtained - if(tagValues.hasAttribute(SUMO_ATTR_POSITION)) { + if (tagValues.hasAttribute(SUMO_ATTR_POSITION)) { valuesMap[SUMO_ATTR_POSITION] = toString(mySelectorLaneParents->getSelectedLanes().front().second); } // Check if clicked position over last lane has to be obtained - if(tagValues.hasAttribute(SUMO_ATTR_ENDPOS)) { + if (tagValues.hasAttribute(SUMO_ATTR_ENDPOS)) { valuesMap[SUMO_ATTR_ENDPOS] = toString(mySelectorLaneParents->getSelectedLanes().back().second); } // parse common attributes - if(!buildAdditionalCommonAttributes(valuesMap, tagValues)) { + if (!buildAdditionalCommonAttributes(valuesMap, tagValues)) { return false; } // show warning dialogbox and stop check if input parameters are valid if (myAdditionalAttributes->areValuesValid() == false) { myAdditionalAttributes->showWarningMessage(); return false; - } else if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), valuesMap)) { - // Refresh additional Parent Selector (For additionals that have a limited number of childs) - mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); - // abort lane selector - mySelectorLaneParents->abortConsecutiveLaneSelector(); - return true; } else { - // additional cannot be build - return false; + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(tagValues.getTag())); + // try to build additional + if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), SUMOSAXAttrs, nullptr)) { + // Refresh additional Parent Selector (For additionals that have a limited number of childs) + mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); + // abort lane selector + mySelectorLaneParents->abortConsecutiveLaneSelector(); + return true; + } else { + // additional cannot be build + return false; + } } } - } +} bool -GNEAdditionalFrame::buildAdditionalOverView(std::map &valuesMap, const GNEAttributeCarrier::TagProperties &tagValues) { +GNEAdditionalFrame::buildAdditionalOverView(std::map& valuesMap, const GNEAttributeCarrier::TagProperties& tagValues) { // Generate id of element valuesMap[SUMO_ATTR_ID] = generateID(nullptr); // Obtain position as the clicked position over view valuesMap[SUMO_ATTR_POSITION] = toString(myViewNet->snapToActiveGrid(myViewNet->getPositionInformation())); // parse common attributes - if(!buildAdditionalCommonAttributes(valuesMap, tagValues)) { + if (!buildAdditionalCommonAttributes(valuesMap, tagValues)) { return false; } // show warning dialogbox and stop check if input parameters are valid if (myAdditionalAttributes->areValuesValid() == false) { myAdditionalAttributes->showWarningMessage(); return false; - } else if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), valuesMap)) { - // Refresh additional Parent Selector (For additionals that have a limited number of childs) - mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); - // clear selected eddges and lanes - mySelectorEdgeChilds->onCmdClearSelection(nullptr, 0, nullptr); - mySelectorLaneChilds->onCmdClearSelection(nullptr, 0, nullptr); - return true; } else { - return false; + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(tagValues.getTag())); + // try to build additional + if (GNEAdditionalHandler::buildAdditional(myViewNet, true, myItemSelector->getCurrentTagProperties().getTag(), SUMOSAXAttrs, nullptr)) { + // Refresh additional Parent Selector (For additionals that have a limited number of childs) + mySelectorAdditionalParent->refreshSelectorAdditionalParentModul(); + // clear selected eddges and lanes + mySelectorEdgeChilds->onCmdClearSelection(nullptr, 0, nullptr); + mySelectorLaneChilds->onCmdClearSelection(nullptr, 0, nullptr); + return true; + } else { + return false; + } } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEAdditionalFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,7 +34,7 @@ class GNEAdditionalFrame : public GNEFrame { public: - + // =========================================================================== // class SelectorLaneParents // =========================================================================== @@ -56,7 +56,7 @@ void hideSelectorLaneParentsModul(); /// @brief start selection of consecutive lanes - void startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition); + void startConsecutiveLaneSelector(GNELane* lane, const Position& clickedPosition); /// @brief stop selection of consecutive lanes bool stopConsecutiveLaneSelector(); @@ -65,7 +65,7 @@ void abortConsecutiveLaneSelector(); /// @brief return true if lane can be selected as consecutive lane - bool addSelectedLane(GNELane *lane, const Position &clickedPosition); + bool addSelectedLane(GNELane* lane, const Position& clickedPosition); /// @brief remove last added point void removeLastSelectedLane(); @@ -77,10 +77,10 @@ bool isShown() const; /// @brief get selected lane color - const RGBColor &getSelectedLaneColor() const; + const RGBColor& getSelectedLaneColor() const; /// @brief get current selected lanes - const std::vector > &getSelectedLanes() const; + const std::vector >& getSelectedLanes() const; /// @name FOX-callbacks /// @{ @@ -118,7 +118,7 @@ RGBColor mySelectedLaneColor; /// @brief check if certain lane is selected - bool isLaneSelected(GNELane *lane) const; + bool isLaneSelected(GNELane* lane) const; }; // =========================================================================== @@ -316,12 +316,7 @@ * @param objectsUnderCursor collection of objects under cursor after click over view * @return true if additional was sucesfully added */ - bool addAdditional(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor); - - /**@brief remove an additional element previously added - * @param[in] additional element to erase - */ - void removeAdditional(GNEAdditional* additional); + bool addAdditional(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); /// @brief show selector lane child and update use selected edges/lanes void showSelectorLaneChildsModul(); @@ -330,8 +325,8 @@ GNEAdditionalFrame::SelectorLaneParents* getConsecutiveLaneSelector() const; protected: - /// @brief enable moduls depending of item selected in ItemSelector - void enableModuls(const GNEAttributeCarrier::TagProperties &tagProperties); + /// @brief enable moduls depending of item selected in ItemSelector + void enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties); /// @brief disable moduls if element selected in itemSelector isn't valid void disableModuls(); @@ -341,32 +336,32 @@ std::string generateID(GNENetElement* netElement) const; /// @brief build common additional attributes - bool buildAdditionalCommonAttributes(std::map &valuesMap, const GNEAttributeCarrier::TagProperties &tagValues); + bool buildAdditionalCommonAttributes(std::map& valuesMap, const GNEAttributeCarrier::TagProperties& tagValues); /// @brief build additional with Parent - bool buildAdditionalWithParent(std::map &valuesMap, GNEAdditional* parent, const GNEAttributeCarrier::TagProperties &tagValues); + bool buildAdditionalWithParent(std::map& valuesMap, GNEAdditional* parent, const GNEAttributeCarrier::TagProperties& tagValues); /// @brief build additional over an edge (parent of lane) - bool buildAdditionalOverEdge(std::map &valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties &tagValues); + bool buildAdditionalOverEdge(std::map& valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties& tagValues); /// @brief build additional over a single lane - bool buildAdditionalOverLane(std::map &valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties &tagValues); + bool buildAdditionalOverLane(std::map& valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties& tagValues); /// @brief build additional over lanes - bool buildAdditionalOverLanes(std::map &valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties &tagValues); + bool buildAdditionalOverLanes(std::map& valuesMap, GNELane* lane, const GNEAttributeCarrier::TagProperties& tagValues); /// @brief build additional over view - bool buildAdditionalOverView(std::map &valuesMap, const GNEAttributeCarrier::TagProperties &tagValues); + bool buildAdditionalOverView(std::map& valuesMap, const GNEAttributeCarrier::TagProperties& tagValues); /// @brief item selector ItemSelector* myItemSelector; /// @brief internal additional attributes - ACAttributes* myAdditionalAttributes; + AttributesCreator* myAdditionalAttributes; /// @brief Netedit parameter NeteditAttributes* myNeteditAttributes; - + /// @brief Modul for select lane parents (currently only consecutives) SelectorLaneParents* mySelectorLaneParents; diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEConnectorFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEConnectorFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEConnectorFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEConnectorFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,10 +29,12 @@ #include #include #include +#include #include #include #include #include +#include #include "GNEConnectorFrame.h" #include "GNESelectorFrame.h" @@ -69,7 +71,7 @@ // GNEConnectorFrame::CurrentLane - methods // --------------------------------------------------------------------------- -GNEConnectorFrame::CurrentLane::CurrentLane(GNEConnectorFrame* connectorFrameParent) : +GNEConnectorFrame::CurrentLane::CurrentLane(GNEConnectorFrame* connectorFrameParent) : FXGroupBox(connectorFrameParent->myContentFrame, "Lane", GUIDesignGroupBoxFrame) { // create lane label myCurrentLaneLabel = new FXLabel(this, "No lane selected", 0, GUIDesignLabelLeft); @@ -79,9 +81,9 @@ GNEConnectorFrame::CurrentLane::~CurrentLane() {} -void -GNEConnectorFrame::CurrentLane::updateCurrentLaneLabel(const std::string &laneID) { - if(laneID.empty()) { +void +GNEConnectorFrame::CurrentLane::updateCurrentLaneLabel(const std::string& laneID) { + if (laneID.empty()) { myCurrentLaneLabel->setText("No lane selected"); } else { myCurrentLaneLabel->setText((std::string("Current Lane: ") + laneID).c_str()); @@ -92,7 +94,7 @@ // GNEConnectorFrame::ConnectionModifications - methods // --------------------------------------------------------------------------- -GNEConnectorFrame::ConnectionModifications::ConnectionModifications(GNEConnectorFrame* connectorFrameParent) : +GNEConnectorFrame::ConnectionModifications::ConnectionModifications(GNEConnectorFrame* connectorFrameParent) : FXGroupBox(connectorFrameParent->myContentFrame, "Modifications", GUIDesignGroupBoxFrame), myConnectorFrameParent(connectorFrameParent) { @@ -102,6 +104,9 @@ // Create "OK" button mySaveButton = new FXButton(this, "OK\t\tSave connection modifications (Enter)", GUIIconSubSys::getIcon(ICON_ACCEPT), this, MID_OK, GUIDesignButton); + + // Create checkbox for protect routes + myProtectRoutesCheckBox = new FXCheckButton(this, "Protect routes", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); } @@ -125,6 +130,18 @@ long GNEConnectorFrame::ConnectionModifications::onCmdSaveModifications(FXObject*, FXSelector, void*) { if (myConnectorFrameParent->myCurrentEditedLane != 0) { + // check if routes has to be protected + if (myProtectRoutesCheckBox->isEnabled() && (myProtectRoutesCheckBox->getCheck() == TRUE)) { + for (const auto& i : myConnectorFrameParent->myCurrentEditedLane->getParentEdge().getDemandElementChilds()) { + if (!i->isDemandElementValid()) { + FXMessageBox::warning(getApp(), MBOX_OK, + "Error saving connection operations", "%s", + ("Connection edition cannot be saved because route '" + i->getID() + "' is broken.").c_str()); + return 1; + } + } + } + // finish route editing myConnectorFrameParent->getViewNet()->getUndoList()->p_end(); if (myConnectorFrameParent->myNumChanges) { myConnectorFrameParent->getViewNet()->setStatusBarText("Changes accepted"); @@ -139,7 +156,7 @@ // GNEConnectorFrame::ConnectionOperations - methods // --------------------------------------------------------------------------- -GNEConnectorFrame::ConnectionOperations::ConnectionOperations(GNEConnectorFrame* connectorFrameParent) : +GNEConnectorFrame::ConnectionOperations::ConnectionOperations(GNEConnectorFrame* connectorFrameParent) : FXGroupBox(connectorFrameParent->myContentFrame, "Operations", GUIDesignGroupBoxFrame), myConnectorFrameParent(connectorFrameParent) { @@ -293,7 +310,7 @@ // GNEConnectorFrame::ConnectionSelection - methods // --------------------------------------------------------------------------- -GNEConnectorFrame::ConnectionSelection::ConnectionSelection(GNEConnectorFrame* connectorFrameParent) : +GNEConnectorFrame::ConnectionSelection::ConnectionSelection(GNEConnectorFrame* connectorFrameParent) : FXGroupBox(connectorFrameParent->myContentFrame, "Selection", GUIDesignGroupBoxFrame) { // create Selection Hint myHoldShiftLabel = new FXLabel(this, "Hold while clicking\nto create unyielding\nconnections (pass=true).", 0, GUIDesignLabelFrameInformation); @@ -307,7 +324,7 @@ // GNEConnectorFrame::ConnectionLegend - methods // --------------------------------------------------------------------------- -GNEConnectorFrame::ConnectionLegend::ConnectionLegend(GNEConnectorFrame* connectorFrameParent) : +GNEConnectorFrame::ConnectionLegend::ConnectionLegend(GNEConnectorFrame* connectorFrameParent) : FXGroupBox(connectorFrameParent->myContentFrame, "Legend", GUIDesignGroupBoxFrame), mySourceColor(RGBColor::CYAN), myTargetColor(RGBColor::GREEN), @@ -340,31 +357,31 @@ GNEConnectorFrame::ConnectionLegend::~ConnectionLegend() {} -const RGBColor& +const RGBColor& GNEConnectorFrame::ConnectionLegend::getSourceColor() const { return mySourceColor; } -const RGBColor& +const RGBColor& GNEConnectorFrame::ConnectionLegend::getTargetColor() const { return myTargetColor; } -const RGBColor& +const RGBColor& GNEConnectorFrame::ConnectionLegend::getPotentialTargetColor() const { return myPotentialTargetColor; } -const RGBColor& +const RGBColor& GNEConnectorFrame::ConnectionLegend::getTargetPassColor() const { return myTargetPassColor; } -const RGBColor& +const RGBColor& GNEConnectorFrame::ConnectionLegend::getConflictColor() const { return myConflictColor; } @@ -397,7 +414,7 @@ void -GNEConnectorFrame::handleLaneClick(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) { +GNEConnectorFrame::handleLaneClick(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { // build connection buildConnection(objectsUnderCursor.getLaneFront(), myViewNet->getKeyPressed().shiftKeyPressed(), myViewNet->getKeyPressed().controlKeyPressed(), true); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEConnectorFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEConnectorFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEConnectorFrame.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEConnectorFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -48,7 +48,7 @@ ~CurrentLane(); /// @brief set current junction label - void updateCurrentLaneLabel(const std::string &laneID); + void updateCurrentLaneLabel(const std::string& laneID); private: /// @brief Label for current Lane @@ -93,6 +93,9 @@ /// @brief "OK" button FXButton* mySaveButton; + + /// @brief protect routes checkbox + FXCheckButton* myProtectRoutesCheckBox; }; // =========================================================================== @@ -194,19 +197,19 @@ ~ConnectionLegend(); /// @brief get color for the from-lane of a connection - const RGBColor &getSourceColor() const; + const RGBColor& getSourceColor() const; /// @brief get color for the to-lane of a connection - const RGBColor &getTargetColor() const; - + const RGBColor& getTargetColor() const; + /// @brief get color for potential to-lane targets (currently unconnected) - const RGBColor &getPotentialTargetColor() const; + const RGBColor& getPotentialTargetColor() const; /// @brief get color for the to-lane of a connection with pass attribute - const RGBColor &getTargetPassColor() const; + const RGBColor& getTargetPassColor() const; /// @brief get color for a to-lane that cannot be used because another connection conflicts - const RGBColor &getConflictColor() const; + const RGBColor& getConflictColor() const; private: /// @brief source label @@ -252,10 +255,10 @@ /**@brief either sets the current lane or toggles the connection of the * @param objectsUnderCursor collection of objects under cursor after click over view */ - void handleLaneClick(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor); + void handleLaneClick(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); /// @brief get pointer to ConnectionModifications modul - ConnectionModifications *getConnectionModifications() const; + ConnectionModifications* getConnectionModifications() const; private: /// @brief the status of a target lane @@ -287,19 +290,19 @@ LaneStatus getLaneStatus(const std::vector& connections, GNELane* targetLane); /// @brief CurrentLane modul - CurrentLane *myCurrentLane; + CurrentLane* myCurrentLane; /// @brief ConnectionModifications modul - ConnectionModifications *myConnectionModifications; + ConnectionModifications* myConnectionModifications; /// @brief ConnectionOperations modul - ConnectionOperations *myConnectionOperations; + ConnectionOperations* myConnectionOperations; /// @brief ConnectionSelection modul - ConnectionSelection *myConnectionSelection; + ConnectionSelection* myConnectionSelection; /// @brief ConnectionLegend modul - ConnectionLegend *myConnectionLegend; + ConnectionLegend* myConnectionLegend; /// @brief the lane of which connections are to be modified GNELane* myCurrentEditedLane; diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,154 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNECreateEdgeFrame.cpp +/// @author Mirko Barthauer (Technische Universitaet Braunschweig) +/// @date May 2018 +/// @version $Id$ +/// +// The Widget for editing connection prohibits +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNECreateEdgeFrame.h" +#include "GNEInspectorFrame.h" + +// =========================================================================== +// FOX callback mapping +// =========================================================================== +FXDEFMAP(GNECreateEdgeFrame) GNECreateEdgeFrameMap[] = { + /** currently unused **/ + FXMAPFUNC(SEL_COMMAND, MID_CANCEL, GNECreateEdgeFrame::onCmdCancel), + FXMAPFUNC(SEL_COMMAND, MID_OK, GNECreateEdgeFrame::onCmdOK) + /** **/ +}; + +// Object implementation +FXIMPLEMENT(GNECreateEdgeFrame, FXVerticalFrame, GNECreateEdgeFrameMap, ARRAYNUMBER(GNECreateEdgeFrameMap)) + +// =========================================================================== +// static members +// =========================================================================== + + +// =========================================================================== +// method definitions +// =========================================================================== + +GNECreateEdgeFrame::GNECreateEdgeFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) : + GNEFrame(horizontalFrameParent, viewNet, "Create Edge"), + myCreateEdgeSource(nullptr) { +} + + +GNECreateEdgeFrame::~GNECreateEdgeFrame() {} + + +void +GNECreateEdgeFrame::processClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool opossiteEdge, bool chainEdge) { + if (!myViewNet->getUndoList()->hasCommandGroup()) { + myViewNet->getUndoList()->p_begin("create new " + toString(SUMO_TAG_EDGE)); + } + if (!objectsUnderCursor.getJunctionFront()) { + objectsUnderCursor.setCreatedJunction(myViewNet->getNet()->createJunction(myViewNet->snapToActiveGrid(clickedPosition), myViewNet->getUndoList())); + } + if (myCreateEdgeSource == nullptr) { + myCreateEdgeSource = objectsUnderCursor.getJunctionFront(); + myCreateEdgeSource->markAsCreateEdgeSource(); + update(); + } else { + if (myCreateEdgeSource != objectsUnderCursor.getJunctionFront()) { + // may fail to prevent double edges + GNEEdge* newEdge = myViewNet->getNet()->createEdge( + myCreateEdgeSource, objectsUnderCursor.getJunctionFront(), myViewNet->getViewParent()->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate(), myViewNet->getUndoList()); + if (newEdge) { + // create another edge, if create opposite edge is enabled + if (opossiteEdge) { + myViewNet->getNet()->createEdge(objectsUnderCursor.getJunctionFront(), myCreateEdgeSource, myViewNet->getViewParent()->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate(), myViewNet->getUndoList(), "-" + newEdge->getNBEdge()->getID()); + } + myCreateEdgeSource->unMarkAsCreateEdgeSource(); + + if (myViewNet->getUndoList()->hasCommandGroup()) { + myViewNet->getUndoList()->p_end(); + } else { + std::cout << "edge created without an open CommandGroup )-:\n"; + } + if (chainEdge) { + myCreateEdgeSource = objectsUnderCursor.getJunctionFront(); + myCreateEdgeSource->markAsCreateEdgeSource(); + myViewNet->getUndoList()->p_begin("create new " + toString(SUMO_TAG_EDGE)); + } else { + myCreateEdgeSource = nullptr; + } + } else { + myViewNet->setStatusBarText("An " + toString(SUMO_TAG_EDGE) + " with the same geometry already exists!"); + } + } else { + myViewNet->setStatusBarText("Start- and endpoint for an " + toString(SUMO_TAG_EDGE) + " must be distinct!"); + } + update(); + } +} + + +void GNECreateEdgeFrame::abortEdgeCreation() { + // if myCreateEdgeSource exist, unmark ist as create edge source + if (myCreateEdgeSource != nullptr) { + // remove current created edge source + myCreateEdgeSource->unMarkAsCreateEdgeSource(); + myCreateEdgeSource = nullptr; + } +} + + +void +GNECreateEdgeFrame::show() { + GNEFrame::show(); +} + + +void +GNECreateEdgeFrame::hide() { + GNEFrame::hide(); +} + + +long +GNECreateEdgeFrame::onCmdCancel(FXObject*, FXSelector, void*) { + /** unused **/ + return 1; +} + + +long +GNECreateEdgeFrame::onCmdOK(FXObject*, FXSelector, void*) { + /** unused **/ + return 1; +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNECreateEdgeFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,85 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNECreateEdgeFrame.h +/// @author Pablo Alvarez Lopez +/// @date Dec 2018 +/// @version $Id$ +/// +// The Widget for create edges (and junctions) +/****************************************************************************/ +#ifndef GNECreateEdgeFrame_h +#define GNECreateEdgeFrame_h + +// =========================================================================== +// included modules +// =========================================================================== +#include "GNEFrame.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNECreateEdgeFrame + * The Widget for create edges + */ +class GNECreateEdgeFrame : public GNEFrame { + /// @brief FOX-declaration + FXDECLARE(GNECreateEdgeFrame) + +public: + /**@brief Constructor + * @brief parent FXHorizontalFrame in which this GNEFrame is placed + * @brief viewNet viewNet that uses this GNEFrame + */ + GNECreateEdgeFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet); + + /// @brief Destructor + ~GNECreateEdgeFrame(); + + /**@brief handle processClick and set the relative colouring + * @param[in] clickedPosition clicked position over ViewNet + * @param objectsUnderCursor collection of objects under cursor after click over view (note: in this case use non-constant reference due setCreatedJunction) + * @param oppositeEdge automatically create an opposite edge + * @param chainEdge create edges in chain mode + */ + void processClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool oppositeEdge, bool chainEdge); + + /// @brief abort current edge creation + void abortEdgeCreation(); + + /// @brief show prohibition frame + void show(); + + /// @brief hide prohibition frame + void hide(); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user presses the OK-Button saves any edge modifications + long onCmdOK(FXObject*, FXSelector, void*); + + /// @brief Called when the user presses the Cancel-button discards any edge modifications + long onCmdCancel(FXObject*, FXSelector, void*); + +protected: + /// @brief FOX needs this + GNECreateEdgeFrame() {} + +private: + /// @brief source junction for new edge + GNEJunction* myCreateEdgeSource; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNECrossingFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNECrossingFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNECrossingFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNECrossingFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -66,7 +67,7 @@ // GNECrossingFrame::CurrentJunction - methods // --------------------------------------------------------------------------- -GNECrossingFrame::CurrentJunction::CurrentJunction(GNECrossingFrame* crossingFrameParent) : +GNECrossingFrame::CurrentJunction::CurrentJunction(GNECrossingFrame* crossingFrameParent) : FXGroupBox(crossingFrameParent->myContentFrame, "Junction", GUIDesignGroupBoxFrame) { // create junction label myCurrentJunctionLabel = new FXLabel(this, "No junction selected", 0, GUIDesignLabelLeft); @@ -76,9 +77,9 @@ GNECrossingFrame::CurrentJunction::~CurrentJunction() {} -void -GNECrossingFrame::CurrentJunction::updateCurrentJunctionLabel(const std::string &junctionID) { - if(junctionID.empty()) { +void +GNECrossingFrame::CurrentJunction::updateCurrentJunctionLabel(const std::string& junctionID) { + if (junctionID.empty()) { myCurrentJunctionLabel->setText("No junction selected"); } else { myCurrentJunctionLabel->setText((std::string("Current Junction: ") + junctionID).c_str()); @@ -451,7 +452,7 @@ // GNECrossingFrame::CreateCrossing - methods // --------------------------------------------------------------------------- -GNECrossingFrame::CreateCrossing::CreateCrossing(GNECrossingFrame* crossingFrameParent) : +GNECrossingFrame::CreateCrossing::CreateCrossing(GNECrossingFrame* crossingFrameParent) : FXGroupBox(crossingFrameParent->myContentFrame, "Create", GUIDesignGroupBoxFrame), myCrossingFrameParent(crossingFrameParent) { // Create groupbox for create crossings @@ -471,12 +472,12 @@ if (myCrossingFrameParent->myEdgeSelector->getCurrentJunction()->getNBNode()->checkCrossingDuplicated(myCrossingFrameParent->myCrossingParameters->getCrossingEdges()) == false) { // create new crossing myCrossingFrameParent->myViewNet->getUndoList()->add(new GNEChange_Crossing(myCrossingFrameParent->myEdgeSelector->getCurrentJunction(), - myCrossingFrameParent->myCrossingParameters->getCrossingEdges(), - myCrossingFrameParent->myCrossingParameters->getCrossingWidth(), - myCrossingFrameParent->myCrossingParameters->getCrossingPriority(), - -1, -1, - PositionVector::EMPTY, - false, true), true); + myCrossingFrameParent->myCrossingParameters->getCrossingEdges(), + myCrossingFrameParent->myCrossingParameters->getCrossingWidth(), + myCrossingFrameParent->myCrossingParameters->getCrossingPriority(), + -1, -1, + PositionVector::EMPTY, + false, true), true); // clear selected edges myCrossingFrameParent->myEdgeSelector->onCmdClearSelection(0, 0, 0); } else { @@ -515,10 +516,10 @@ myCreateCrossing = new CreateCrossing(this); // Create groupbox and labels for legends - FXGroupBox *groupBoxLegend = new FXGroupBox(myContentFrame, "Legend", GUIDesignGroupBoxFrame); - FXLabel *colorCandidateLabel = new FXLabel(groupBoxLegend, "Candidate", 0, GUIDesignLabelLeft); + FXGroupBox* groupBoxLegend = new FXGroupBox(myContentFrame, "Legend", GUIDesignGroupBoxFrame); + FXLabel* colorCandidateLabel = new FXLabel(groupBoxLegend, "Candidate", 0, GUIDesignLabelLeft); colorCandidateLabel->setBackColor(MFXUtils::getFXColor(getEdgeCandidateColor())); - FXLabel *colorSelectedLabel = new FXLabel(groupBoxLegend, "Selected", 0, GUIDesignLabelLeft); + FXLabel* colorSelectedLabel = new FXLabel(groupBoxLegend, "Selected", 0, GUIDesignLabelLeft); colorSelectedLabel->setBackColor(MFXUtils::getFXColor(getEdgeCandidateSelectedColor())); // disable edge selector @@ -540,7 +541,7 @@ void -GNECrossingFrame::addCrossing(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) { +GNECrossingFrame::addCrossing(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { // If current element is a junction if (objectsUnderCursor.getJunctionFront()) { // change label @@ -566,11 +567,11 @@ } -void +void GNECrossingFrame::createCrossingHotkey() { if (myEdgeSelector->getCurrentJunction()) { // simply call onCmdCreateCrossing of CreateCrossing modul - myCreateCrossing->onCmdCreateCrossing(0,0,0); + myCreateCrossing->onCmdCreateCrossing(0, 0, 0); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNECrossingFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNECrossingFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNECrossingFrame.h 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNECrossingFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -48,7 +48,7 @@ ~CurrentJunction(); /// @brief set current junction label - void updateCurrentJunctionLabel(const std::string &junctionID); + void updateCurrentJunctionLabel(const std::string& junctionID); private: /// @brief Label for current Junction @@ -260,7 +260,7 @@ /**@brief add Crossing element * @param objectsUnderCursor collection of objects under cursor after click over view */ - void addCrossing(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor); + void addCrossing(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); /// @brief create crossing (used when user press ENTER key in Crossing mode) void createCrossingHotkey(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEDeleteFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEDeleteFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEDeleteFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEDeleteFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -8,7 +8,7 @@ // SPDX-License-Identifier: EPL-2.0 /****************************************************************************/ /// @file GNEDeleteFrame.cpp -/// @author Pablo Alvarez Lopex +/// @author Pablo Alvarez Lopez /// @date Dec 2016 /// @version $Id$ /// @@ -29,7 +29,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -46,13 +48,17 @@ FXGroupBox(deleteFrameParent->myContentFrame, "Options", GUIDesignGroupBoxFrame), myDeleteFrameParent(deleteFrameParent) { - // Create checkbox for enabling/disabling automatic deletion of additionals childs (by default, enabled) - myForceDeleteAdditionals = new FXCheckButton(this, "Force deletion of additionals", deleteFrameParent, MID_GNE_DELETEFRAME_AUTODELETEADDITIONALS, GUIDesignCheckButtonAttribute); + // Create checkbox for enable/disable automatic deletion of additionals childs (by default, enabled) + myForceDeleteAdditionals = new FXCheckButton(this, "Force deletion of additionals", deleteFrameParent, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); myForceDeleteAdditionals->setCheck(TRUE); - // Create checkbox for enabling/disabling delete only geomtery point(by default, disabled) - myDeleteOnlyGeometryPoints = new FXCheckButton(this, "Delete only geometryPoints", deleteFrameParent, MID_GNE_DELETEFRAME_ONLYGEOMETRYPOINTS, GUIDesignCheckButtonAttribute); + // Create checkbox for enable/disable delete only geomtery point(by default, disabled) + myDeleteOnlyGeometryPoints = new FXCheckButton(this, "Delete only geometryPoints", deleteFrameParent, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); myDeleteOnlyGeometryPoints->setCheck(FALSE); + + // Create checkbox for enable/disable delete only geomtery point(by default, disabled) + myProtectDemandElements = new FXCheckButton(this, "Protect demand elements", deleteFrameParent, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); + myProtectDemandElements->setCheck(TRUE); } @@ -70,6 +76,12 @@ return (myDeleteOnlyGeometryPoints->getCheck() == TRUE); } + +bool +GNEDeleteFrame::DeleteOptions::protectDemandElements() const { + return (myProtectDemandElements->getCheck() == TRUE); +} + // =========================================================================== // method definitions // =========================================================================== @@ -86,10 +98,11 @@ GNEDeleteFrame::~GNEDeleteFrame() {} + void GNEDeleteFrame::show() { - if (myViewNet->getNet()->getSelectedAttributeCarriers().size() == 1) { - myACHierarchy->showACHierarchy(*myViewNet->getNet()->getSelectedAttributeCarriers().begin()); + if (myViewNet->getNet()->getSelectedAttributeCarriers(false).size() == 1) { + myACHierarchy->showACHierarchy(*myViewNet->getNet()->getSelectedAttributeCarriers(false).begin()); } else { myACHierarchy->hideACHierarchy(); } @@ -106,56 +119,79 @@ void GNEDeleteFrame::removeSelectedAttributeCarriers() { - // remove all selected attribute carriers + // remove all selected attribute carrier susing the following parent-child sequence myViewNet->getUndoList()->p_begin("remove selected items"); - while (myViewNet->getNet()->getSelectedAttributeCarriers().size() > 0) { - removeAttributeCarrier(*myViewNet->getNet()->getSelectedAttributeCarriers().begin(), true); + // disable update geometry + myViewNet->getNet()->disableUpdateGeometry(); + // delete selected attribute carrier //junctions + while (myViewNet->getNet()->retrieveJunctions(true).size() > 0) { + myViewNet->getNet()->deleteJunction(myViewNet->getNet()->retrieveJunctions(true).front(), myViewNet->getUndoList()); + } + // edges + while (myViewNet->getNet()->retrieveEdges(true).size() > 0) { + myViewNet->getNet()->deleteEdge(myViewNet->getNet()->retrieveEdges(true).front(), myViewNet->getUndoList(), false); + } + // lanes + while (myViewNet->getNet()->retrieveLanes(true).size() > 0) { + myViewNet->getNet()->deleteLane(myViewNet->getNet()->retrieveLanes(true).front(), myViewNet->getUndoList(), false); + } + // connections + while (myViewNet->getNet()->retrieveConnections(true).size() > 0) { + myViewNet->getNet()->deleteConnection(myViewNet->getNet()->retrieveConnections(true).front(), myViewNet->getUndoList()); + } + // crossings + while (myViewNet->getNet()->retrieveCrossings(true).size() > 0) { + myViewNet->getNet()->deleteCrossing(myViewNet->getNet()->retrieveCrossings(true).front(), myViewNet->getUndoList()); + } + // shapes + while (myViewNet->getNet()->retrieveShapes(true).size() > 0) { + myViewNet->getNet()->deleteShape(myViewNet->getNet()->retrieveShapes(true).front(), myViewNet->getUndoList()); + } + // additionals + while (myViewNet->getNet()->retrieveAdditionals(true).size() > 0) { + myViewNet->getNet()->deleteAdditional(myViewNet->getNet()->retrieveAdditionals(true).front(), myViewNet->getUndoList()); } + // demand elements + while (myViewNet->getNet()->retrieveDemandElements(true).size() > 0) { + myViewNet->getNet()->deleteDemandElement(myViewNet->getNet()->retrieveDemandElements(true).front(), myViewNet->getUndoList()); + } + // enable update geometry + myViewNet->getNet()->enableUpdateGeometry(); + // finish deletion myViewNet->getUndoList()->p_end(); } void -GNEDeleteFrame::removeAttributeCarrier(GNEAttributeCarrier* ac, bool ignoreOptions) { - // obtain clicked position - Position clickedPosition = myViewNet->getPositionInformation(); - if (myDeleteOptions->deleteOnlyGeometryPoints() && !ignoreOptions) { - // check type of of GL object - switch (ac->getTagProperty().getTag()) { - case SUMO_TAG_EDGE: { - GNEEdge* edge = dynamic_cast(ac); - if (edge && (edge->getVertexIndex(clickedPosition, false, false) != -1)) { - edge->deleteGeometryPoint(clickedPosition); +GNEDeleteFrame::removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool ignoreOptions) { + // first check if there is at leas an AC under cursor) + if (objectsUnderCursor.getAttributeCarrierFront()) { + // disable update geometry + myViewNet->getNet()->disableUpdateGeometry(); + // obtain clicked position + Position clickedPosition = myViewNet->getPositionInformation(); + // first check if we'll only delete a geometry point + if (myDeleteOptions->deleteOnlyGeometryPoints() && !ignoreOptions) { + // check type of of object under cursor object with geometry points + if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_EDGE) { + if (objectsUnderCursor.getEdgeFront()->getVertexIndex(clickedPosition, false, false) != -1) { + objectsUnderCursor.getEdgeFront()->deleteGeometryPoint(clickedPosition); } - break; - } - case SUMO_TAG_POLY: { - GNEPoly* polygon = dynamic_cast(ac); - if (polygon && (polygon->getVertexIndex(clickedPosition, false, false) != -1)) { - polygon->deleteGeometryPoint(clickedPosition); + } else if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_POLY) { + if (objectsUnderCursor.getPolyFront()->getVertexIndex(clickedPosition, false, false) != -1) { + objectsUnderCursor.getPolyFront()->deleteGeometryPoint(clickedPosition); } - break; - } - case SUMO_TAG_TAZ: { - GNETAZ* TAZ = dynamic_cast(ac); - if (TAZ && TAZ->getVertexIndex(clickedPosition, false, false) != -1) { - TAZ->deleteGeometryPoint(clickedPosition); + } else if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_TAZ) { + if (objectsUnderCursor.getTAZFront()->getVertexIndex(clickedPosition, false, false) != -1) { + objectsUnderCursor.getTAZFront()->deleteGeometryPoint(clickedPosition); } - break; } - default: { - break; - } - } - } else { - // check type of of GL object - switch (ac->getTagProperty().getTag()) { - case SUMO_TAG_JUNCTION: { - GNEJunction* junction = dynamic_cast(ac); - assert(junction); + } else { + // check type of of object under cursor object + if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_JUNCTION) { // obtain number of additionals of junction's childs int numberOfAdditionals = 0; - for (auto i : junction->getGNEEdges()) { + for (const auto& i : objectsUnderCursor.getJunctionFront()->getGNEEdges()) { numberOfAdditionals += (int)i->getAdditionalChilds().size(); for (auto j : i->getLanes()) { UNUSED_PARAMETER(j); @@ -164,124 +200,178 @@ } // Check if junction can be deleted if (myDeleteOptions->forceDeleteAdditionals() || ignoreOptions) { - myViewNet->getNet()->deleteJunction(junction, myViewNet->getUndoList()); + myViewNet->getNet()->deleteJunction(objectsUnderCursor.getJunctionFront(), myViewNet->getUndoList()); } else { if (numberOfAdditionals > 0) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'Force deletion needed'"); std::string plural = numberOfAdditionals > 1 ? "s" : ""; // Open warning DialogBox - FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + junction->getTagStr()).c_str(), "%s", - (junction->getTagStr() + " '" + junction->getID() + "' cannot be deleted because owns " + + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + objectsUnderCursor.getJunctionFront()->getTagStr()).c_str(), "%s", + (objectsUnderCursor.getJunctionFront()->getTagStr() + " '" + objectsUnderCursor.getJunctionFront()->getID() + "' cannot be deleted because owns " + toString(numberOfAdditionals) + " additional child" + plural + ".\n Check 'Force deletion of additionals' to force deletion.").c_str()); // write warning if netedit is running in testing mode WRITE_DEBUG("Closed FXMessageBox 'Force deletion needed' with 'OK'"); } else { - myViewNet->getNet()->deleteJunction(junction, myViewNet->getUndoList()); + myViewNet->getNet()->deleteJunction(objectsUnderCursor.getJunctionFront(), myViewNet->getUndoList()); } } - break; - } - case SUMO_TAG_EDGE: { - GNEEdge* edge = dynamic_cast(ac); - assert(edge); + } else if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_EDGE) { // check if click was over a geometry point or over a shape's edge - if (edge->getVertexIndex(clickedPosition, false, false) != -1) { - edge->deleteGeometryPoint(clickedPosition); + if (objectsUnderCursor.getEdgeFront()->getVertexIndex(clickedPosition, false, false) != -1) { + objectsUnderCursor.getEdgeFront()->deleteGeometryPoint(clickedPosition); } else { - int numberOfAdditionalChilds = (int)edge->getAdditionalChilds().size(); - int numberOfAdditionalParents = (int)edge->getAdditionalParents().size(); + // obtain additional childs and parents + int numberOfAdditionalChilds = (int)objectsUnderCursor.getEdgeFront()->getAdditionalChilds().size(); + int numberOfAdditionalParents = (int)objectsUnderCursor.getEdgeFront()->getAdditionalParents().size(); // Iterate over lanes and obtain total number of additional childs - for (auto i : edge->getLanes()) { + for (const auto& i : objectsUnderCursor.getEdgeFront()->getLanes()) { numberOfAdditionalChilds += (int)i->getAdditionalChilds().size(); + numberOfAdditionalParents = (int)i->getAdditionalParents().size(); + } + // obtain demand elements childs and parents + int numberOfDemandElementChilds = (int)objectsUnderCursor.getEdgeFront()->getDemandElementChilds().size(); + int numberOfDemandElementParents = (int)objectsUnderCursor.getEdgeFront()->getDemandElementParents().size(); + // Iterate over lanes and obtain total number of demand elements childs + for (const auto& i : objectsUnderCursor.getEdgeFront()->getLanes()) { + numberOfDemandElementChilds += (int)i->getDemandElementChilds().size(); + numberOfDemandElementParents = (int)i->getDemandElementParents().size(); } // Check if edge can be deleted - if (myDeleteOptions->forceDeleteAdditionals() || ignoreOptions) { + if ((myDeleteOptions->forceDeleteAdditionals() && !myDeleteOptions->protectDemandElements()) || ignoreOptions) { // when deleting a single edge, keep all unaffected connections as they were - myViewNet->getNet()->deleteEdge(edge, myViewNet->getUndoList(), false); + myViewNet->getNet()->deleteEdge(objectsUnderCursor.getEdgeFront(), myViewNet->getUndoList(), false); } else { - if (numberOfAdditionalChilds > 0) { + // declare strings to save certain messages used in FXMessageBox to improve code legilibly + std::string tagstr = objectsUnderCursor.getEdgeFront()->getTagStr(); + std::string id = objectsUnderCursor.getEdgeFront()->getID(); + // check number of additional childs + if ((numberOfAdditionalChilds > 0) && !myDeleteOptions->forceDeleteAdditionals()) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'Force deletion needed'"); std::string plural = numberOfAdditionalChilds > 1 ? "s" : ""; // Open warning DialogBox - FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + edge->getTagStr()).c_str(), "%s", - (edge->getTagStr() + " '" + edge->getID() + "' cannot be deleted because owns " + - toString(numberOfAdditionalChilds) + " additional" + plural + ".\n Check 'Force deletion of additionals' to force deletion.").c_str()); + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because owns " + toString(numberOfAdditionalChilds) + " additional" + plural + + ".\n Check 'Force deletion of additionals' to force deletion.").c_str()); // write warning if netedit is running in testing mode WRITE_DEBUG("Closed FXMessageBox 'Force deletion needed' with 'OK'"); - } else if (numberOfAdditionalParents > 0) { + } else if ((numberOfAdditionalChilds > 0) && !myDeleteOptions->forceDeleteAdditionals()) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'Force deletion needed'"); std::string plural = numberOfAdditionalParents > 1 ? "s" : ""; // Open warning DialogBox - FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + edge->getTagStr()).c_str(), "%s", - (edge->getTagStr() + " '" + edge->getID() + "' cannot be deleted because is part of " + - toString(numberOfAdditionalParents) + " additional" + plural + ".\n Check 'Force deletion of additionals' to force deletion.").c_str()); + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because is part of " + toString(numberOfAdditionalParents) + " additional" + plural + + ".\n Check 'Force deletion of additionals' to force deletion.").c_str()); // write warning if netedit is running in testing mode WRITE_DEBUG("Closed FXMessageBox 'Force deletion needed' with 'OK'"); + } else if ((numberOfDemandElementChilds > 0) && myDeleteOptions->protectDemandElements()) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox 'Unprotect demand elements'"); + std::string plural = numberOfDemandElementChilds > 1 ? "s" : ""; + // Open warning DialogBox + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because owns " + toString(numberOfDemandElementChilds) + " demand element" + plural + + ".\n Uncheck 'Protect demand elements' to force deletion.").c_str()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox 'Unprotect demand elements' with 'OK'"); + } else if ((numberOfDemandElementParents > 0) && myDeleteOptions->protectDemandElements()) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox 'Unprotect demand elements'"); + std::string plural = numberOfDemandElementParents > 1 ? "s" : ""; + // Open warning DialogBox + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because is part of " + toString(numberOfDemandElementParents) + " demand element" + plural + + ".\n Uncheck 'Protect demand elements' to force deletion.").c_str()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox 'Unprotect demand elements' with 'OK'"); } else { - // when deleting a single edge, keep all unaffected connections as they were - myViewNet->getNet()->deleteEdge(edge, myViewNet->getUndoList(), false); + // if all ok, then delete edge + myViewNet->getNet()->deleteEdge(objectsUnderCursor.getEdgeFront(), myViewNet->getUndoList(), false); } } } - break; - } - case SUMO_TAG_LANE: { - GNELane* lane = dynamic_cast(ac); - assert(lane); + } else if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_LANE) { + // obtain additional childs and parents + int numberOfAdditionalChilds = (int)objectsUnderCursor.getLaneFront()->getAdditionalChilds().size(); + int numberOfAdditionalParents = (int)objectsUnderCursor.getLaneFront()->getAdditionalParents().size(); + // obtain demand elements childs and parents + int numberOfDemandElementChilds = (int)objectsUnderCursor.getLaneFront()->getDemandElementChilds().size(); + int numberOfDemandElementParents = (int)objectsUnderCursor.getLaneFront()->getDemandElementParents().size(); // Check if lane can be deleted - if (myDeleteOptions->forceDeleteAdditionals() || ignoreOptions) { + if ((myDeleteOptions->forceDeleteAdditionals() && !myDeleteOptions->protectDemandElements()) || ignoreOptions) { // when deleting a single lane, keep all unaffected connections as they were - myViewNet->getNet()->deleteLane(lane, myViewNet->getUndoList(), false); + myViewNet->getNet()->deleteLane(objectsUnderCursor.getLaneFront(), myViewNet->getUndoList(), false); } else { - if (lane->getAdditionalChilds().size() == 0) { - // when deleting a single lane, keep all unaffected connections as they were - myViewNet->getNet()->deleteLane(lane, myViewNet->getUndoList(), false); - } else { + // declare strings to save certain messages used in FXMessageBox to improve code legilibly + std::string tagstr = objectsUnderCursor.getLaneFront()->getTagStr(); + std::string id = objectsUnderCursor.getLaneFront()->getID(); + // check number of additional childs + if ((numberOfAdditionalChilds > 0) && !myDeleteOptions->forceDeleteAdditionals()) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'Force deletion needed'"); - // open warning box - FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + lane->getTagStr()).c_str(), "%s", - (lane->getTagStr() + " '" + lane->getID() + "' cannot be deleted because it has " + - toString(lane->getAdditionalChilds().size()) + " additional childs.\n Check 'Force deletion of Additionals' to force deletion.").c_str()); + std::string plural = numberOfAdditionalChilds > 1 ? "s" : ""; + // Open warning DialogBox + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because owns " + toString(numberOfAdditionalChilds) + " additional" + plural + + ".\n Check 'Force deletion of additionals' to force deletion.").c_str()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox 'Force deletion needed' with 'OK'"); + } else if ((numberOfAdditionalChilds > 0) && !myDeleteOptions->forceDeleteAdditionals()) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox 'Force deletion needed'"); + std::string plural = numberOfAdditionalParents > 1 ? "s" : ""; + // Open warning DialogBox + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because is part of " + toString(numberOfAdditionalParents) + " additional" + plural + + ".\n Check 'Force deletion of additionals' to force deletion.").c_str()); // write warning if netedit is running in testing mode WRITE_DEBUG("Closed FXMessageBox 'Force deletion needed' with 'OK'"); + } else if ((numberOfDemandElementChilds > 0) && myDeleteOptions->protectDemandElements()) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox 'Unprotect demand elements'"); + std::string plural = numberOfDemandElementChilds > 1 ? "s" : ""; + // Open warning DialogBox + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because owns " + toString(numberOfDemandElementChilds) + " demand element" + plural + + ".\n Uncheck 'Protect demand elements' to force deletion.").c_str()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox 'Unprotect demand elements' with 'OK'"); + } else if ((numberOfDemandElementParents > 0) && myDeleteOptions->protectDemandElements()) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox 'Unprotect demand elements'"); + std::string plural = numberOfDemandElementParents > 1 ? "s" : ""; + // Open warning DialogBox + FXMessageBox::warning(getViewNet()->getApp(), MBOX_OK, ("Problem deleting " + tagstr).c_str(), "%s", + (tagstr + " '" + id + "' cannot be deleted because is part of " + toString(numberOfDemandElementParents) + " demand element" + plural + + ".\n Uncheck 'Protect demand elements' to force deletion.").c_str()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox 'Unprotect demand elements' with 'OK'"); + } else { + // if all ok, then delete lane + myViewNet->getNet()->deleteLane(objectsUnderCursor.getLaneFront(), myViewNet->getUndoList(), false); } } - break; - } - case SUMO_TAG_CROSSING: { - GNECrossing* crossing = dynamic_cast(ac); - assert(crossing); - myViewNet->getNet()->deleteCrossing(crossing, myViewNet->getUndoList()); - break; - } - case SUMO_TAG_CONNECTION: { - GNEConnection* connection = dynamic_cast(ac); - assert(connection); - myViewNet->getNet()->deleteConnection(connection, myViewNet->getUndoList()); - break; - } - default: { - // obtain tag property (only for improve code legibility) - const auto& tagValue = ac->getTagProperty(); - if (tagValue.isAdditional()) { - GNEAdditional* additional = dynamic_cast(ac); - assert(additional); - myViewNet->getViewParent()->getAdditionalFrame()->removeAdditional(additional); - } else if (tagValue.isShape()) { - GNEShape* shape = dynamic_cast(ac); - assert(shape); - myViewNet->getNet()->deleteShape(shape, myViewNet->getUndoList()); - } - break; + } else if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_CROSSING) { + myViewNet->getNet()->deleteCrossing(objectsUnderCursor.getCrossingFront(), myViewNet->getUndoList()); + } else if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_CONNECTION) { + myViewNet->getNet()->deleteConnection(objectsUnderCursor.getConnectionFront(), myViewNet->getUndoList()); + } else if (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_TAZ) { + myViewNet->getNet()->deleteAdditional(objectsUnderCursor.getTAZFront(), myViewNet->getUndoList()); + } else if (objectsUnderCursor.getAttributeCarrierFront() && (objectsUnderCursor.getAdditionalFront() == objectsUnderCursor.getAttributeCarrierFront())) { + myViewNet->getNet()->deleteAdditional(objectsUnderCursor.getAdditionalFront(), myViewNet->getUndoList()); + } else if (objectsUnderCursor.getShapeFront() && (objectsUnderCursor.getShapeFront() == objectsUnderCursor.getAttributeCarrierFront())) { + myViewNet->getNet()->deleteShape(objectsUnderCursor.getShapeFront(), myViewNet->getUndoList()); + } else if (objectsUnderCursor.getDemandElementFront() && (objectsUnderCursor.getDemandElementFront() == objectsUnderCursor.getAttributeCarrierFront())) { + myViewNet->getNet()->deleteDemandElement(objectsUnderCursor.getDemandElementFront(), myViewNet->getUndoList()); } } + // enable update geometry + myViewNet->getNet()->enableUpdateGeometry(); + // update view to show changes + myViewNet->update(); } - // update view to show changes - myViewNet->update(); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEDeleteFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEDeleteFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEDeleteFrame.h 2018-10-28 23:00:27.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEDeleteFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -8,7 +8,7 @@ // SPDX-License-Identifier: EPL-2.0 /****************************************************************************/ /// @file GNEDeleteFrame.h -/// @author Pablo Alvarez Lopex +/// @author Pablo Alvarez Lopez /// @date Dec 2016 /// @version $Id$ /// @@ -52,15 +52,21 @@ /// @brief check if only delete geometry points checkbox is enabled bool deleteOnlyGeometryPoints() const; + /// @brief check if protect demand elements checkbox is enabled + bool protectDemandElements() const; + private: /// @brief pointer to delete Frame Parent GNEDeleteFrame* myDeleteFrameParent; - /// @brief checkbox for enable/disable automatically delete additionals childs + /// @brief checkbox for enable/disable automatic deletion of additionals childs FXCheckButton* myForceDeleteAdditionals; /// @brief checkbox for enable/disable delete only geometry points FXCheckButton* myDeleteOnlyGeometryPoints; + + /// @brief checkbox for enable/disable automatic deletion of demand childs + FXCheckButton* myProtectDemandElements; }; /**@brief Constructor @@ -82,10 +88,10 @@ void removeSelectedAttributeCarriers(); /**@brief remove attribute carrier (element) - * @param ac Attribute Carrier to remove + * @param objectsUnderCursor objects under cursors * @param ignoreOptions ignore delete options and ALWAYS remove AC */ - void removeAttributeCarrier(GNEAttributeCarrier* ac, bool ignoreOptions = false); + void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool ignoreOptions = false); /// @brief get delete options DeleteOptions* getDeleteOptions() const; diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,29 +21,31 @@ #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 "GNEFrame.h" #include "GNEInspectorFrame.h" -#include "GNEFrame.h" #include "GNEDeleteFrame.h" @@ -52,51 +54,74 @@ // =========================================================================== FXDEFMAP(GNEFrame::ItemSelector) ItemSelectorMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_TYPE, GNEFrame::ItemSelector::onCmdSelectItem), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_TYPE, GNEFrame::ItemSelector::onCmdSelectItem) +}; + +FXDEFMAP(GNEFrame::AttributesCreator) AttributesCreatorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEFrame::AttributesCreator::onCmdHelp) +}; + +FXDEFMAP(GNEFrame::AttributesCreator::RowCreator) RowCreatorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_TEXT, GNEFrame::AttributesCreator::RowCreator::onCmdSetAttribute), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_BOOL, GNEFrame::AttributesCreator::RowCreator::onCmdSetBooleanAttribute), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_DIALOG, GNEFrame::AttributesCreator::RowCreator::onCmdSetColorAttribute), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_RADIOBUTTON, GNEFrame::AttributesCreator::RowCreator::onCmdSelectRadioButton) }; -FXDEFMAP(GNEFrame::ACAttributeRow) ACAttributeRowMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_TEXT, GNEFrame::ACAttributeRow::onCmdSetAttribute), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_BOOL, GNEFrame::ACAttributeRow::onCmdSetBooleanAttribute), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_DIALOG, GNEFrame::ACAttributeRow::onCmdSetColorAttribute), +FXDEFMAP(GNEFrame::AttributesEditor) AttributesEditorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEFrame::AttributesEditor::onCmdAttributesEditorHelp) }; -FXDEFMAP(GNEFrame::ACAttributes) ACAttributesMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEFrame::ACAttributes::onCmdHelp), +FXDEFMAP(GNEFrame::AttributesEditor::RowEditor) RowEditorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEFrame::AttributesEditor::RowEditor::onCmdSetAttribute), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_DIALOG, GNEFrame::AttributesEditor::RowEditor::onCmdOpenAttributeDialog), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_RADIOBUTTON, GNEFrame::AttributesEditor::RowEditor::onCmdSetDisjointAttribute) +}; + +FXDEFMAP(GNEFrame::AttributesEditorExtended) AttributesEditorExtendedMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_DIALOG, GNEFrame::AttributesEditorExtended::onCmdOpenDialog) }; FXDEFMAP(GNEFrame::ACHierarchy) ACHierarchyMap[] = { FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_CENTER, GNEFrame::ACHierarchy::onCmdCenterItem), FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_INSPECT, GNEFrame::ACHierarchy::onCmdInspectItem), FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_DELETE, GNEFrame::ACHierarchy::onCmdDeleteItem), - FXMAPFUNC(SEL_RIGHTBUTTONRELEASE, MID_GNE_DELETEFRAME_CHILDS, GNEFrame::ACHierarchy::onCmdShowChildMenu), + FXMAPFUNC(SEL_RIGHTBUTTONRELEASE, MID_GNE_DELETEFRAME_CHILDS, GNEFrame::ACHierarchy::onCmdShowChildMenu) }; FXDEFMAP(GNEFrame::GenericParametersEditor) GenericParametersEditorMap[] = { FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_DIALOG, GNEFrame::GenericParametersEditor::onCmdEditGenericParameter), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEFrame::GenericParametersEditor::onCmdSetGenericParameter), + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEFrame::GenericParametersEditor::onCmdSetGenericParameter) }; FXDEFMAP(GNEFrame::DrawingShape) DrawingShapeMap[] = { FXMAPFUNC(SEL_COMMAND, MID_GNE_STARTDRAWING, GNEFrame::DrawingShape::onCmdStartDrawing), FXMAPFUNC(SEL_COMMAND, MID_GNE_STOPDRAWING, GNEFrame::DrawingShape::onCmdStopDrawing), - FXMAPFUNC(SEL_COMMAND, MID_GNE_ABORTDRAWING, GNEFrame::DrawingShape::onCmdAbortDrawing), + FXMAPFUNC(SEL_COMMAND, MID_GNE_ABORTDRAWING, GNEFrame::DrawingShape::onCmdAbortDrawing) }; FXDEFMAP(GNEFrame::NeteditAttributes) NeteditAttributesMap[] = { FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEFrame::NeteditAttributes::onCmdSetNeteditAttribute), - FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEFrame::NeteditAttributes::onCmdHelp), + FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEFrame::NeteditAttributes::onCmdHelp) }; // Object implementation -FXIMPLEMENT(GNEFrame::ItemSelector, FXGroupBox, ItemSelectorMap, ARRAYNUMBER(ItemSelectorMap)) -FXIMPLEMENT(GNEFrame::ACAttributeRow, FXHorizontalFrame, ACAttributeRowMap, ARRAYNUMBER(ACAttributeRowMap)) -FXIMPLEMENT(GNEFrame::ACAttributes, FXGroupBox, ACAttributesMap, ARRAYNUMBER(ACAttributesMap)) -FXIMPLEMENT(GNEFrame::ACHierarchy, FXGroupBox, ACHierarchyMap, ARRAYNUMBER(ACHierarchyMap)) -FXIMPLEMENT(GNEFrame::GenericParametersEditor, FXGroupBox, GenericParametersEditorMap, ARRAYNUMBER(GenericParametersEditorMap)) -FXIMPLEMENT(GNEFrame::DrawingShape, FXGroupBox, DrawingShapeMap, ARRAYNUMBER(DrawingShapeMap)) -FXIMPLEMENT(GNEFrame::NeteditAttributes, FXGroupBox, NeteditAttributesMap, ARRAYNUMBER(NeteditAttributesMap)) +FXIMPLEMENT(GNEFrame::ItemSelector, FXGroupBox, ItemSelectorMap, ARRAYNUMBER(ItemSelectorMap)) +FXIMPLEMENT(GNEFrame::AttributesCreator, FXGroupBox, AttributesCreatorMap, ARRAYNUMBER(AttributesCreatorMap)) +FXIMPLEMENT(GNEFrame::AttributesCreator::RowCreator, FXHorizontalFrame, RowCreatorMap, ARRAYNUMBER(RowCreatorMap)) +FXIMPLEMENT(GNEFrame::AttributesEditor, FXGroupBox, AttributesEditorMap, ARRAYNUMBER(AttributesEditorMap)) +FXIMPLEMENT(GNEFrame::AttributesEditor::RowEditor, FXHorizontalFrame, RowEditorMap, ARRAYNUMBER(RowEditorMap)) +FXIMPLEMENT(GNEFrame::AttributesEditorExtended, FXGroupBox, AttributesEditorExtendedMap, ARRAYNUMBER(AttributesEditorExtendedMap)) +FXIMPLEMENT(GNEFrame::ACHierarchy, FXGroupBox, ACHierarchyMap, ARRAYNUMBER(ACHierarchyMap)) +FXIMPLEMENT(GNEFrame::GenericParametersEditor, FXGroupBox, GenericParametersEditorMap, ARRAYNUMBER(GenericParametersEditorMap)) +FXIMPLEMENT(GNEFrame::DrawingShape, FXGroupBox, DrawingShapeMap, ARRAYNUMBER(DrawingShapeMap)) +FXIMPLEMENT(GNEFrame::NeteditAttributes, FXGroupBox, NeteditAttributesMap, ARRAYNUMBER(NeteditAttributesMap)) + +// =========================================================================== +// static members +// =========================================================================== +FXFont* GNEFrame::myFrameHeaderFont = nullptr; // =========================================================================== // method definitions @@ -106,33 +131,38 @@ // GNEFrame::ItemSelector - methods // --------------------------------------------------------------------------- -GNEFrame::ItemSelector::ItemSelector(GNEFrame* frameParent, GNEAttributeCarrier::TAGProperty type, bool onlyDrawables) : +GNEFrame::ItemSelector::ItemSelector(GNEFrame* frameParent, GNEAttributeCarrier::TagType type, bool onlyDrawables) : FXGroupBox(frameParent->myContentFrame, "Element", GUIDesignGroupBoxFrame), myFrameParent(frameParent) { // first check that property is valid switch (type) { - case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_NETELEMENT: - setText("NetElement element"); + case GNEAttributeCarrier::TagType::TAGTYPE_NETELEMENT: + setText("Net element"); break; - case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL: + case GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL: setText("Additional element"); break; - case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_SHAPE: + case GNEAttributeCarrier::TagType::TAGTYPE_SHAPE: setText("Shape element"); break; - case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_TAZ: + case GNEAttributeCarrier::TagType::TAGTYPE_TAZ: setText("TAZ element"); break; + case GNEAttributeCarrier::TagType::TAGTYPE_VEHICLE: + setText("Vehicle"); + break; + case GNEAttributeCarrier::TagType::TAGTYPE_STOP: + setText("Stop"); + break; default: throw ProcessError("invalid tag property"); - } // fill myListOfTags myListOfTags = GNEAttributeCarrier::allowedTagsByCategory(type, onlyDrawables); // Create FXComboBox myTypeMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_TYPE, GUIDesignComboBox); // fill myTypeMatchBox with list of tags - for (const auto &i : myListOfTags) { + for (const auto& i : myListOfTags) { myTypeMatchBox->appendItem(toString(i).c_str()); } // Set visible items @@ -145,6 +175,23 @@ GNEFrame::ItemSelector::~ItemSelector() {} +void +GNEFrame::ItemSelector::showItemSelector(bool enableModuls) { + show(); + // check if parent moduls has to be enabled + if (enableModuls && (myCurrentTagProperties.getTag() != SUMO_TAG_NOTHING)) { + myFrameParent->enableModuls(myCurrentTagProperties); + } +} + + +void +GNEFrame::ItemSelector::hideItemSelector() { + hide(); + myFrameParent->disableModuls(); +} + + const GNEAttributeCarrier::TagProperties& GNEFrame::ItemSelector::getCurrentTagProperties() const { return myCurrentTagProperties; @@ -153,6 +200,8 @@ void GNEFrame::ItemSelector::setCurrentTypeTag(SumoXMLTag typeTag) { + // set empty tag properties + myCurrentTagProperties = GNEAttributeCarrier::TagProperties(); // make sure that tag is in myTypeMatchBox for (int i = 0; i < (int)myTypeMatchBox->getNumItems(); i++) { if (myTypeMatchBox->getItem(i).text() == toString(typeTag)) { @@ -172,17 +221,17 @@ } -void +void GNEFrame::ItemSelector::refreshTagProperties() { // simply call onCmdSelectItem (to avoid duplicated code) - onCmdSelectItem(0,0,0); + onCmdSelectItem(0, 0, 0); } long GNEFrame::ItemSelector::onCmdSelectItem(FXObject*, FXSelector, void*) { // Check if value of myTypeMatchBox correspond of an allowed additional tags - for (const auto &i : myListOfTags) { + for (const auto& i : myListOfTags) { if (toString(i) == myTypeMatchBox->getText().text()) { // set color of myTypeMatchBox to black (valid) myTypeMatchBox->setTextColor(FXRGB(0, 0, 0)); @@ -207,16 +256,221 @@ } // --------------------------------------------------------------------------- -// GNEFrame::ACAttributeRow - methods +// GNEFrame::NeteditAttributes- methods // --------------------------------------------------------------------------- -GNEFrame::ACAttributeRow::ACAttributeRow(ACAttributes* ACAttributesParent) : - FXHorizontalFrame(ACAttributesParent, GUIDesignAuxiliarHorizontalFrame), - myACAttributesParent(ACAttributesParent), - myXMLAttr(SUMO_ATTR_NOTHING) { - // Create visual elements +GNEFrame::AttributesCreator::AttributesCreator(GNEFrame* frameParent) : + FXGroupBox(frameParent->myContentFrame, "Internal attributes", GUIDesignGroupBoxFrame), + myFrameParent(frameParent) { + // Create single parameters + for (int i = 0; i < GNEAttributeCarrier::getHigherNumberOfAttributes(); i++) { + myRows.push_back(new RowCreator(this)); + } + // Create help button + new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular); +} + + +GNEFrame::AttributesCreator::~AttributesCreator() { +} + + +void +GNEFrame::AttributesCreator::showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties& tagProperties) { + // get current tag Properties + myTagProperties = tagProperties; + // Hide all fields + for (int i = 0; i < (int)myRows.size(); i++) { + myRows.at(i)->hideParameter(); + } + // iterate over tag attributes and show it + for (auto i : myTagProperties) { + // make sure that only non-unique attributes are shown (And depending of includeExtendedAttributes) + if (!i.second.isUnique()) { + myRows.at(i.second.getPositionListed())->showParameter(i.second); + } + } + // update disjoint attributes + updateDisjointAttributes(nullptr); + // recalc frame and show again + recalc(); + show(); +} + + +void +GNEFrame::AttributesCreator::hideAttributesCreatorModul() { + hide(); +} + + +std::map +GNEFrame::AttributesCreator::getAttributesAndValues(bool includeAll) const { + std::map values; + // get standard parameters + for (int i = 0; i < (int)myRows.size(); i++) { + if (myRows.at(i)->getAttrProperties().getAttr() != SUMO_ATTR_NOTHING) { + // ignore default values (except for disjont attributes, that has to be always writted) + if (myRows.at(i)->isRowEnabled() && + (includeAll || myTagProperties.isDisjointAttributes(myRows.at(i)->getAttrProperties().getAttr()) || !myRows.at(i)->getAttrProperties().hasDefaultValue() || (myRows.at(i)->getAttrProperties().getDefaultValue() != myRows.at(i)->getValue()))) { + values[myRows.at(i)->getAttrProperties().getAttr()] = myRows.at(i)->getValue(); + } + } + } + return values; +} + + +void +GNEFrame::AttributesCreator::showWarningMessage(std::string extra) const { + std::string errorMessage; + // iterate over standar parameters + for (auto i : myTagProperties) { + if (errorMessage.empty()) { + // Return string with the error if at least one of the parameter isn't valid + std::string attributeValue = myRows.at(i.second.getPositionListed())->isAttributeValid(); + if (attributeValue.size() != 0) { + errorMessage = attributeValue; + } + } + } + // show warning box if input parameters aren't invalid + if (extra.size() == 0) { + errorMessage = "Invalid input parameter of " + myTagProperties.getTagStr() + ": " + errorMessage; + } else { + errorMessage = "Invalid input parameter of " + myTagProperties.getTagStr() + ": " + extra; + } + + // set message in status bar + myFrameParent->getViewNet()->setStatusBarText(errorMessage); + // Write Warning in console if we're in testing mode + WRITE_DEBUG(errorMessage); +} + + +bool +GNEFrame::AttributesCreator::areValuesValid() const { + // iterate over standar parameters + for (auto i : myTagProperties) { + // Return false if error message of attriuve isn't empty + if (myRows.at(i.second.getPositionListed())->isAttributeValid().size() != 0) { + return false; + } + } + return true; +} + + +void +GNEFrame::AttributesCreator::updateDisjointAttributes(AttributesCreator::RowCreator* row) { + // currently only Flows supports disjoint attributes + if (myTagProperties.getTag() == SUMO_TAG_FLOW) { + // obtain all rows (to improve code legibility) + RowCreator* endRow = myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_END).getPositionListed()]; + RowCreator* numberRow = myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_NUMBER).getPositionListed()]; + RowCreator* vehsperhourRow = myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_VEHSPERHOUR).getPositionListed()]; + RowCreator* periodRow = myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_PERIOD).getPositionListed()]; + RowCreator* probabilityRow = myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_PROB).getPositionListed()]; + if (row == nullptr) { + // by default flows uses end and number + endRow->setRadioButtonCheck(true); + numberRow->setRadioButtonCheck(true); + vehsperhourRow->setRadioButtonCheck(false); + periodRow->setRadioButtonCheck(false); + probabilityRow->setRadioButtonCheck(false); + } else { + // check what row was clicked + switch (row->getAttrProperties().getAttr()) { + // end has more priority as number + case SUMO_ATTR_END: + endRow->setRadioButtonCheck(true); + // disable other combinations + vehsperhourRow->setRadioButtonCheck(false); + periodRow->setRadioButtonCheck(false); + probabilityRow->setRadioButtonCheck(false); + break; + case SUMO_ATTR_NUMBER: + numberRow->setRadioButtonCheck(true); + // disable number if begin and end are enabled because end has more priority as number + if (endRow->getRadioButtonCheck()) { + endRow->setRadioButtonCheck(false); + } else { + // disable other combinations + vehsperhourRow->setRadioButtonCheck(false); + periodRow->setRadioButtonCheck(false); + probabilityRow->setRadioButtonCheck(false); + } + break; + case SUMO_ATTR_VEHSPERHOUR: + // disable number if begin and end are enabled because end has more priority as number + if (endRow->getRadioButtonCheck() && numberRow->getRadioButtonCheck()) { + numberRow->setRadioButtonCheck(false); + } + // disable other combinations + vehsperhourRow->setRadioButtonCheck(true); + periodRow->setRadioButtonCheck(false); + probabilityRow->setRadioButtonCheck(false); + break; + case SUMO_ATTR_PERIOD: + // disable number if begin and end are enabled because end has more priority as number + if (endRow->getRadioButtonCheck() && numberRow->getRadioButtonCheck()) { + numberRow->setRadioButtonCheck(false); + } + // disable other combinations + vehsperhourRow->setRadioButtonCheck(false); + periodRow->setRadioButtonCheck(true); + probabilityRow->setRadioButtonCheck(false); + break; + case SUMO_ATTR_PROB: + // disable number if begin and end are enabled because end has more priority as number + if (endRow->getRadioButtonCheck() && numberRow->getRadioButtonCheck()) { + numberRow->setRadioButtonCheck(false); + } + // disable other combinations + vehsperhourRow->setRadioButtonCheck(false); + periodRow->setRadioButtonCheck(false); + probabilityRow->setRadioButtonCheck(true); + break; + default: + break; + } + } + } else if (myTagProperties.isStop()) { + // check if expected has to be enabled or disabled + if (myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_TRIGGERED).getPositionListed()]->getValue() == "1") { + myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_EXPECTED).getPositionListed()]->enableRow(); + } else { + myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_EXPECTED).getPositionListed()]->disableRow(); + } + // check if expected contaienrs has to be enabled or disabled + if (myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_CONTAINER_TRIGGERED).getPositionListed()]->getValue() == "1") { + myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_EXPECTED_CONTAINERS).getPositionListed()]->enableRow(); + } else { + myRows[myTagProperties.getAttributeProperties(SUMO_ATTR_EXPECTED_CONTAINERS).getPositionListed()]->disableRow(); + } + } +} + + +long +GNEFrame::AttributesCreator::onCmdHelp(FXObject*, FXSelector, void*) { + // open Help attributes dialog + myFrameParent->openHelpAttributesDialog(myTagProperties); + return 1; +} + +// --------------------------------------------------------------------------- +// GNEFrame::AttributesCreator::RowCreator - methods +// --------------------------------------------------------------------------- + +GNEFrame::AttributesCreator::RowCreator::RowCreator(AttributesCreator* AttributesCreatorParent) : + FXHorizontalFrame(AttributesCreatorParent, GUIDesignAuxiliarHorizontalFrame), + myAttributesCreatorParent(AttributesCreatorParent) { + // Create left visual elements myLabel = new FXLabel(this, "name", nullptr, GUIDesignLabelAttribute); myColorEditor = new FXButton(this, "ColorButton", nullptr, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonAttribute); + myRadioButton = new FXRadioButton(this, "name", this, MID_GNE_SET_ATTRIBUTE_RADIOBUTTON, GUIDesignRadioButtonAttribute); + // Create right visual elements myTextFieldInt = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE_TEXT, GUIDesignTextFieldInt); myTextFieldReal = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE_TEXT, GUIDesignTextFieldReal); myTextFieldStrings = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE_TEXT, GUIDesignTextField); @@ -226,33 +480,40 @@ } -GNEFrame::ACAttributeRow::~ACAttributeRow() {} - - void -GNEFrame::ACAttributeRow::showParameter(const SumoXMLAttr attr, const GNEAttributeCarrier::AttributeProperties &attrProperties, const std::string &value) { +GNEFrame::AttributesCreator::RowCreator::showParameter(const GNEAttributeCarrier::AttributeProperties& attrProperties) { myAttrProperties = attrProperties; - myXMLAttr = attr; myInvalidValue = ""; - // show label or button for edit colors + // show label, button for edit colors or radio button if (myAttrProperties.isColor()) { myColorEditor->setTextColor(FXRGB(0, 0, 0)); - myColorEditor->setText(toString(myXMLAttr).c_str()); + myColorEditor->setText(myAttrProperties.getAttrStr().c_str()); myColorEditor->show(); + } else if (myAttributesCreatorParent->myTagProperties.isDisjointAttributes(myAttrProperties.getAttr())) { + myRadioButton->setText(myAttrProperties.getAttrStr().c_str()); + myRadioButton->show(); } else { - myLabel->setText(toString(myXMLAttr).c_str()); + myLabel->setText(myAttrProperties.getAttrStr().c_str()); myLabel->show(); } if (myAttrProperties.isInt()) { myTextFieldInt->setTextColor(FXRGB(0, 0, 0)); - myTextFieldInt->setText(value.c_str()); + myTextFieldInt->setText(attrProperties.getDefaultValue().c_str()); myTextFieldInt->show(); + // if it's associated to a radio button and is disabled, then disabled myTextFieldInt + if (myRadioButton->shown() && (myRadioButton->getCheck() == FALSE)) { + myTextFieldInt->disable(); + } } else if (myAttrProperties.isFloat()) { myTextFieldReal->setTextColor(FXRGB(0, 0, 0)); - myTextFieldReal->setText(value.c_str()); + myTextFieldReal->setText(attrProperties.getDefaultValue().c_str()); myTextFieldReal->show(); + // if it's associated to a radio button and is disabled, then disable myTextFieldReal + if (myRadioButton->shown() && (myRadioButton->getCheck() == FALSE)) { + myTextFieldReal->disable(); + } } else if (myAttrProperties.isBool()) { - if (GNEAttributeCarrier::parse(value)) { + if (GNEAttributeCarrier::parse(attrProperties.getDefaultValue())) { myBoolCheckButton->setCheck(true); myBoolCheckButton->setText("true"); } else { @@ -260,38 +521,47 @@ myBoolCheckButton->setText("false"); } myBoolCheckButton->show(); + // if it's associated to a radio button and is disabled, then disable myBoolCheckButton + if (myRadioButton->shown() && (myRadioButton->getCheck() == FALSE)) { + myBoolCheckButton->disable(); + } } else { myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->setText(value.c_str()); + myTextFieldStrings->setText(attrProperties.getDefaultValue().c_str()); myTextFieldStrings->show(); + // if it's associated to a radio button and is disabled, then disable myTextFieldStrings + if (myRadioButton->shown() && (myRadioButton->getCheck() == FALSE)) { + myTextFieldStrings->disable(); + } } show(); } void -GNEFrame::ACAttributeRow::hideParameter() { - myXMLAttr = SUMO_ATTR_NOTHING; +GNEFrame::AttributesCreator::RowCreator::hideParameter() { + myAttrProperties = GNEAttributeCarrier::AttributeProperties(); myLabel->hide(); myTextFieldInt->hide(); myTextFieldReal->hide(); myTextFieldStrings->hide(); myBoolCheckButton->hide(); myColorEditor->hide(); + myRadioButton->hide(); hide(); } -SumoXMLAttr -GNEFrame::ACAttributeRow::getAttr() const { - return myXMLAttr; +const GNEAttributeCarrier::AttributeProperties& +GNEFrame::AttributesCreator::RowCreator::getAttrProperties() const { + return myAttrProperties; } std::string -GNEFrame::ACAttributeRow::getValue() const { +GNEFrame::AttributesCreator::RowCreator::getValue() const { if (myAttrProperties.isBool()) { - return (myBoolCheckButton->getCheck() == 1) ? "true" : "false"; + return (myBoolCheckButton->getCheck() == 1) ? "1" : "0"; } else if (myAttrProperties.isInt()) { return myTextFieldInt->getText().text(); } else if (myAttrProperties.isFloat() || myAttrProperties.isTime()) { @@ -302,20 +572,105 @@ } +bool +GNEFrame::AttributesCreator::RowCreator::getRadioButtonCheck() const { + if (shown()) { + return myRadioButton->getCheck() == TRUE; + } else { + return false; + } +} + + +void +GNEFrame::AttributesCreator::RowCreator::setRadioButtonCheck(bool value) { + if (shown()) { + // set radio button + myRadioButton->setCheck(value); + // enable or disable input fields + if (value) { + if (myAttrProperties.isBool()) { + myBoolCheckButton->enable(); + } else if (myAttrProperties.isInt()) { + myTextFieldInt->enable(); + } else if (myAttrProperties.isFloat() || myAttrProperties.isTime()) { + myTextFieldReal->enable(); + } else { + myTextFieldStrings->enable(); + } + } else { + if (myAttrProperties.isBool()) { + myBoolCheckButton->disable(); + } else if (myAttrProperties.isInt()) { + myTextFieldInt->disable(); + } else if (myAttrProperties.isFloat() || myAttrProperties.isTime()) { + myTextFieldReal->disable(); + } else { + myTextFieldStrings->disable(); + } + } + } +} + + +void +GNEFrame::AttributesCreator::RowCreator::enableRow() { + if (myAttrProperties.isBool()) { + return myBoolCheckButton->enable(); + } else if (myAttrProperties.isInt()) { + return myTextFieldInt->enable(); + } else if (myAttrProperties.isFloat() || myAttrProperties.isTime()) { + return myTextFieldReal->enable(); + } else { + return myTextFieldStrings->enable(); + } +} + + +void +GNEFrame::AttributesCreator::RowCreator::disableRow() { + if (myAttrProperties.isBool()) { + return myBoolCheckButton->disable(); + } else if (myAttrProperties.isInt()) { + return myTextFieldInt->disable(); + } else if (myAttrProperties.isFloat() || myAttrProperties.isTime()) { + return myTextFieldReal->disable(); + } else { + return myTextFieldStrings->disable(); + } +} + + +bool +GNEFrame::AttributesCreator::RowCreator::isRowEnabled() const { + if (!shown()) { + return false; + } else if (myAttrProperties.isBool()) { + return myBoolCheckButton->isEnabled(); + } else if (myAttrProperties.isInt()) { + return myTextFieldInt->isEnabled(); + } else if (myAttrProperties.isFloat() || myAttrProperties.isTime()) { + return myTextFieldReal->isEnabled(); + } else { + return myTextFieldStrings->isEnabled(); + } +} + + const std::string& -GNEFrame::ACAttributeRow::isAttributeValid() const { +GNEFrame::AttributesCreator::RowCreator::isAttributeValid() const { return myInvalidValue; } -GNEFrame::ACAttributes* -GNEFrame::ACAttributeRow::getACAttributesParent() const { - return myACAttributesParent; +GNEFrame::AttributesCreator* +GNEFrame::AttributesCreator::RowCreator::getAttributesCreatorParent() const { + return myAttributesCreatorParent; } long -GNEFrame::ACAttributeRow::onCmdSetAttribute(FXObject*, FXSelector, void*) { +GNEFrame::AttributesCreator::RowCreator::onCmdSetAttribute(FXObject*, FXSelector, void*) { // We assume that current value is valid myInvalidValue = ""; // Check if format of current value of myTextField is correct @@ -325,10 +680,10 @@ int intValue = GNEAttributeCarrier::parse(myTextFieldInt->getText().text()); // Check if int value must be positive if (myAttrProperties.isPositive() && (intValue < 0)) { - myInvalidValue = "'" + toString(myXMLAttr) + "' cannot be negative"; + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' cannot be negative"; } } else { - myInvalidValue = "'" + toString(myXMLAttr) + "' doesn't have a valid 'int' format"; + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' doesn't have a valid 'int' format"; } } else if (myAttrProperties.isTime()) { // time attributes work as positive doubles @@ -337,10 +692,10 @@ double doubleValue = GNEAttributeCarrier::parse(myTextFieldReal->getText().text()); // Check if parsed value is negative if (doubleValue < 0) { - myInvalidValue = "'" + toString(myXMLAttr) + "' cannot be negative"; + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' cannot be negative"; } } else { - myInvalidValue = "'" + toString(myXMLAttr) + "' doesn't have a valid 'time' format"; + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' doesn't have a valid 'time' format"; } } else if (myAttrProperties.isFloat()) { if (GNEAttributeCarrier::canParse(myTextFieldReal->getText().text())) { @@ -348,29 +703,29 @@ double doubleValue = GNEAttributeCarrier::parse(myTextFieldReal->getText().text()); // Check if double value must be positive if (myAttrProperties.isPositive() && (doubleValue < 0)) { - myInvalidValue = "'" + toString(myXMLAttr) + "' cannot be negative"; + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' cannot be negative"; // check if double value is a probability } else if (myAttrProperties.isProbability() && ((doubleValue < 0) || doubleValue > 1)) { - myInvalidValue = "'" + toString(myXMLAttr) + "' takes only values between 0 and 1"; - } else if (myAttrProperties.hasAttrRange() && ((doubleValue < myAttrProperties.getMinimumRange()) || doubleValue > myAttrProperties.getMaximumRange())) { - myInvalidValue = "'" + toString(myXMLAttr) + "' takes only values between " + toString(myAttrProperties.getMinimumRange())+ " and " + toString(myAttrProperties.getMaximumRange()); - } else if ((myACAttributesParent->myTagProperties.getTag() == SUMO_TAG_E2DETECTOR) && (myXMLAttr == SUMO_ATTR_LENGTH) && (doubleValue == 0)) { + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' takes only values between 0 and 1"; + } else if (myAttrProperties.hasAttrRange() && ((doubleValue < myAttrProperties.getMinimumRange()) || doubleValue > myAttrProperties.getMaximumRange())) { + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' takes only values between " + toString(myAttrProperties.getMinimumRange()) + " and " + toString(myAttrProperties.getMaximumRange()); + } else if ((myAttributesCreatorParent->myTagProperties.getTag() == SUMO_TAG_E2DETECTOR) && (myAttrProperties.getAttr() == SUMO_ATTR_LENGTH) && (doubleValue == 0)) { myInvalidValue = "E2 length cannot be 0"; } } else { - myInvalidValue = "'" + toString(myXMLAttr) + "' doesn't have a valid 'float' format"; + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' doesn't have a valid 'float' format"; } } else if (myAttrProperties.isColor()) { // check if filename format is valid if (GNEAttributeCarrier::canParse(myTextFieldStrings->getText().text()) == false) { - myInvalidValue = "'" + toString(myXMLAttr) + "' doesn't have a valid 'RBGColor' format"; + myInvalidValue = "'" + myAttrProperties.getAttrStr() + "' doesn't have a valid 'RBGColor' format"; } } else if (myAttrProperties.isFilename()) { std::string file = myTextFieldStrings->getText().text(); // check if filename format is valid if (SUMOXMLDefinitions::isValidFilename(file) == false) { myInvalidValue = "input contains invalid characters for a filename"; - } else if (myXMLAttr == SUMO_ATTR_IMGFILE) { + } else if (myAttrProperties.getAttr() == SUMO_ATTR_IMGFILE) { if (!file.empty()) { // only load value if file exist and can be loaded if (GUITexturesHelper::getTextureID(file) == -1) { @@ -378,18 +733,26 @@ } } } - } else if (myXMLAttr == SUMO_ATTR_NAME) { + } else if (myAttrProperties.getAttr() == SUMO_ATTR_NAME) { std::string name = myTextFieldStrings->getText().text(); // check if name format is valid if (SUMOXMLDefinitions::isValidAttribute(name) == false) { myInvalidValue = "input contains invalid characters"; } - } else if (myXMLAttr == SUMO_ATTR_VTYPES) { + } else if (myAttrProperties.getAttr() == SUMO_ATTR_VTYPES) { std::string name = myTextFieldStrings->getText().text(); // if list of VTypes isn't empty, check that all characters are valid if (!name.empty() && !SUMOXMLDefinitions::isValidListOfTypeID(name)) { myInvalidValue = "list of IDs contains invalid characters"; } + } else if (myAttrProperties.getAttr() == SUMO_ATTR_INDEX) { + // special case for stop indx + std::string index = myTextFieldStrings->getText().text(); + if ((index != "fit") && (index != "end") && !GNEAttributeCarrier::canParse(index)) { + myInvalidValue = "index isn't either 'fit' or 'end' or a valid positive int"; + } else if (GNEAttributeCarrier::parse(index) < 0) { + myInvalidValue = "index cannot be negative"; + } } // change color of text field depending of myCurrentValueValid if (myInvalidValue.size() == 0) { @@ -412,17 +775,20 @@ long -GNEFrame::ACAttributeRow::onCmdSetBooleanAttribute(FXObject*, FXSelector, void*) { +GNEFrame::AttributesCreator::RowCreator::onCmdSetBooleanAttribute(FXObject*, FXSelector, void*) { if (myBoolCheckButton->getCheck()) { myBoolCheckButton->setText("true"); } else { myBoolCheckButton->setText("false"); } + // update disjoint attribute + myAttributesCreatorParent->updateDisjointAttributes(nullptr); return 0; } -long GNEFrame::ACAttributeRow::onCmdSetColorAttribute(FXObject*, FXSelector, void*) { +long +GNEFrame::AttributesCreator::RowCreator::onCmdSetColorAttribute(FXObject*, FXSelector, void*) { // create FXColorDialog FXColorDialog colordialog(this, tr("Color Dialog")); colordialog.setTarget(this); @@ -440,118 +806,744 @@ return 0; } +long +GNEFrame::AttributesCreator::RowCreator::onCmdSelectRadioButton(FXObject*, FXSelector, void*) { + // write debug (for Netedit tests) + WRITE_DEBUG("Selected radio button for attribute '" + myAttrProperties.getAttrStr() + "'"); + // update disjoint attributes in AC Attributes parent + myAttributesCreatorParent->updateDisjointAttributes(this); + return 0; +} + // --------------------------------------------------------------------------- -// GNEFrame::NeteditAttributes- methods +// GNEFrame::AttributesEditor::RowEditor - methods // --------------------------------------------------------------------------- -GNEFrame::ACAttributes::ACAttributes(GNEFrame* frameParent) : - FXGroupBox(frameParent->myContentFrame, "Internal attributes", GUIDesignGroupBoxFrame), - myFrameParent(frameParent) { +GNEFrame::AttributesEditor::RowEditor::RowEditor(GNEFrame::AttributesEditor* attributeEditorParent) : + FXHorizontalFrame(attributeEditorParent, GUIDesignAuxiliarHorizontalFrame), + myAttributesEditorParent(attributeEditorParent), + myMultiple(false) { + // Create and hide label + myLabel = new FXLabel(this, "attributeLabel", nullptr, GUIDesignLabelAttribute); + myLabel->hide(); + // Create and hide radio button + myRadioButton = new FXRadioButton(this, "name", this, MID_GNE_SET_ATTRIBUTE_RADIOBUTTON, GUIDesignRadioButtonAttribute); + myRadioButton->hide(); + // Create and hide ButtonCombinableChoices + myButtonCombinableChoices = new FXButton(this, "AttributeButton", nullptr, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonAttribute); + myButtonCombinableChoices->hide(); + // create and hidde color editor + myColorEditor = new FXButton(this, "ColorButton", nullptr, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonAttribute); + myColorEditor->hide(); + // Create and hide textField for int attributes + myTextFieldInt = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFieldInt); + myTextFieldInt->hide(); + // Create and hide textField for real/time attributes + myTextFieldReal = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFieldReal); + myTextFieldReal->hide(); + // Create and hide textField for string attributes + myTextFieldStrings = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField); + myTextFieldStrings->hide(); + // Create and hide ComboBox + myChoicesCombo = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBoxAttribute); + myChoicesCombo->hide(); + // Create and hide checkButton + myBoolCheckButton = new FXCheckButton(this, "", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); + myBoolCheckButton->hide(); +} - // Create single parameters - for (int i = 0; i < GNEAttributeCarrier::getHigherNumberOfAttributes(); i++) { - myACAttributeRows.push_back(new ACAttributeRow(this)); - } - // Create help button - new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular); +void +GNEFrame::AttributesEditor::RowEditor::showRow(const GNEAttributeCarrier::AttributeProperties& ACAttr, const std::string& value, bool disjointAttributeEnabled) { + // start enabling all elements + myTextFieldInt->enable(); + myTextFieldReal->enable(); + myTextFieldStrings->enable(); + myChoicesCombo->enable(); + myBoolCheckButton->enable(); + myButtonCombinableChoices->enable(); + myColorEditor->enable(); + myRadioButton->enable(); + // Set current Attribute Property + myACAttr = ACAttr; + // set multiple + myMultiple = GNEAttributeCarrier::parse>(value).size() > 1; + if (myACAttr.isColor()) { + myColorEditor->setTextColor(FXRGB(0, 0, 0)); + myColorEditor->setText(myACAttr.getAttrStr().c_str()); + myColorEditor->show(); + } else if (myACAttr.getTagPropertyParent().isDisjointAttributes(myACAttr.getAttr())) { + myRadioButton->setTextColor(FXRGB(0, 0, 0)); + myRadioButton->setText(myACAttr.getAttrStr().c_str()); + myRadioButton->setCheck(disjointAttributeEnabled); + myRadioButton->show(); + } else { + // Show attribute Label + myLabel->setText(myACAttr.getAttrStr().c_str()); + myLabel->show(); + } + // Set field depending of the type of value + if (myACAttr.isBool()) { + // first we need to check if all boolean values are equal + bool allBooleanValuesEqual = true; + // declare boolean vector + std::vector booleanVector; + // check if value can be parsed to a boolean vector + if (GNEAttributeCarrier::canParse >(value)) { + booleanVector = GNEAttributeCarrier::parse >(value); + } + // iterate over pased booleans comparing all element with the first + for (const auto& i : booleanVector) { + if (i != booleanVector.front()) { + allBooleanValuesEqual = false; + } + } + // use checkbox or textfield depending if all booleans are equal + if (allBooleanValuesEqual) { + // set check button + if ((booleanVector.size() > 0) && booleanVector.front()) { + myBoolCheckButton->setCheck(true); + myBoolCheckButton->setText("true"); + } else { + myBoolCheckButton->setCheck(false); + myBoolCheckButton->setText("false"); + } + // show check button + myBoolCheckButton->show(); + // enable or disable depending if attribute is editable and is enabled (used by disjoint attributes) + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myBoolCheckButton->disable(); + } + } else { + // show list of bools (0 1) + myTextFieldStrings->setText(value.c_str()); + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + myTextFieldStrings->show(); + // enable or disable depending if attribute is editable and is enabled (used by disjoint attributes) + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldStrings->disable(); + } + } + } else if (myACAttr.isDiscrete()) { + // Check if are combinable choices + if ((myACAttr.getDiscreteValues().size() > 0) && myACAttr.isCombinable()) { + // hide label + myLabel->hide(); + // Show button combinable choices + myButtonCombinableChoices->setText(myACAttr.getAttrStr().c_str()); + myButtonCombinableChoices->show(); + // Show string with the values + myTextFieldStrings->setText(value.c_str()); + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + myTextFieldStrings->show(); + } else if (!myMultiple) { + // fill comboBox + myChoicesCombo->clearItems(); + for (const auto& it : myACAttr.getDiscreteValues()) { + myChoicesCombo->appendItem(it.c_str()); + } + // show combo box with values + myChoicesCombo->setNumVisible((int)myACAttr.getDiscreteValues().size()); + myChoicesCombo->setCurrentItem(myChoicesCombo->findItem(value.c_str())); + myChoicesCombo->setTextColor(FXRGB(0, 0, 0)); + myChoicesCombo->show(); + // enable or disable depending if attribute is editable and is enabled (used by disjoint attributes) + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myChoicesCombo->disable(); + } + } else { + // represent combinable choices in multiple selections always with a textfield instead with a comboBox + myTextFieldStrings->setText(value.c_str()); + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + myTextFieldStrings->show(); + // enable or disable depending if attribute is editable and is enabled (used by disjoint attributes) + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldStrings->disable(); + } + } + } else if (myACAttr.isFloat() || myACAttr.isTime()) { + // show TextField for real/time values + myTextFieldReal->setText(value.c_str()); + myTextFieldReal->setTextColor(FXRGB(0, 0, 0)); + myTextFieldReal->show(); + // enable or disable depending if attribute is editable and is enabled (used by disjoint attributes) + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldReal->disable(); + } + } else if (myACAttr.isInt()) { + // Show textField for int attributes + myTextFieldInt->setText(value.c_str()); + myTextFieldInt->setTextColor(FXRGB(0, 0, 0)); + myTextFieldInt->show(); + // enable or disable depending if attribute is editable and is enabled (used by disjoint attributes) + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldInt->disable(); + } + // we need an extra check for connection attribute "TLIndex", because it cannot be edited if junction's connection doesn' have a TLS + if ((myACAttr.getTagPropertyParent().getTag() == SUMO_TAG_CONNECTION) && (myACAttr.getAttr() == SUMO_ATTR_TLLINKINDEX) && (value == "No TLS")) { + myTextFieldInt->disable(); + } + } else { + // In any other case (String, list, etc.), show value as String + myTextFieldStrings->setText(value.c_str()); + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + myTextFieldStrings->show(); + // enable or disable depending if attribute is editable and is enabled (used by disjoint attributes) + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldStrings->disable(); + } + } + // if Tag correspond to an network element but we're in demand mode (or vice versa), disable all elements + if (((myAttributesEditorParent->myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && myACAttr.getTagPropertyParent().isDemandElement()) || + ((myAttributesEditorParent->myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && !myACAttr.getTagPropertyParent().isDemandElement())) { + myColorEditor->disable(); + myRadioButton->disable(); + myTextFieldInt->disable(); + myTextFieldReal->disable(); + myTextFieldStrings->disable(); + myChoicesCombo->disable(); + myBoolCheckButton->disable(); + myButtonCombinableChoices->disable(); + } + // special case for Default vehicle types (ID cannot be edited) + if ((ACAttr.getTagPropertyParent().getTag() == SUMO_TAG_VTYPE) && (ACAttr.getAttr() == SUMO_ATTR_ID) && + ((value == DEFAULT_VTYPE_ID) || (value == DEFAULT_PEDTYPE_ID) || (value == DEFAULT_BIKETYPE_ID))) { + myTextFieldStrings->disable(); + } + // Show Row + show(); } -GNEFrame::ACAttributes::~ACAttributes() { +void +GNEFrame::AttributesEditor::RowEditor::hideRow() { + // Hide all elements + myLabel->hide(); + myColorEditor->hide(); + myRadioButton->hide(); + myTextFieldInt->hide(); + myTextFieldReal->hide(); + myTextFieldStrings->hide(); + myChoicesCombo->hide(); + myBoolCheckButton->hide(); + myButtonCombinableChoices->hide(); + // hide Row + hide(); + // recalc after hide all elements + recalc(); } void -GNEFrame::ACAttributes::showACAttributesModul(const GNEAttributeCarrier::TagProperties &tagProperties) { - // get current tag Properties - myTagProperties = tagProperties; - // Hide all fields - for (int i = 0; i < (int)myACAttributeRows.size(); i++) { - myACAttributeRows.at(i)->hideParameter(); - } - // iterate over tag attributes and show it - for (auto i : myTagProperties) { - // make sure that only non-unique attributes are shown - if (!i.second.isUnique()) { - myACAttributeRows.at(i.second.getPositionListed())->showParameter(i.first, i.second, i.second.getDefaultValue()); +GNEFrame::AttributesEditor::RowEditor::refreshRow(const std::string& value, bool forceRefresh, bool disjointAttributeEnabled) { + // start enabling all elements + myTextFieldInt->enable(); + myTextFieldReal->enable(); + myTextFieldStrings->enable(); + myChoicesCombo->enable(); + myBoolCheckButton->enable(); + myButtonCombinableChoices->enable(); + myColorEditor->enable(); + myRadioButton->enable(); + // set radio buton + if (myRadioButton->shown()) { + myRadioButton->setCheck(disjointAttributeEnabled); + } + if (myTextFieldInt->shown()) { + // set last valid value and restore color if onlyValid is disabled + if (myTextFieldInt->getTextColor() == FXRGB(0, 0, 0) || forceRefresh) { + myTextFieldInt->setText(value.c_str()); + myTextFieldInt->setTextColor(FXRGB(0, 0, 0)); + } + // disable depending of disjointAttributeEnabled + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldInt->disable(); + } + } else if (myTextFieldReal->shown()) { + // set last valid value and restore color if onlyValid is disabled + if (myTextFieldReal->getTextColor() == FXRGB(0, 0, 0) || forceRefresh) { + myTextFieldReal->setText(value.c_str()); + myTextFieldReal->setTextColor(FXRGB(0, 0, 0)); + } + // disable depending of disjointAttributeEnabled + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldReal->disable(); + } + } else if (myTextFieldStrings->shown()) { + // set last valid value and restore color if onlyValid is disabled + if (myTextFieldStrings->getTextColor() == FXRGB(0, 0, 0) || forceRefresh) { + myTextFieldStrings->setText(value.c_str()); + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + } + // disable depending of disjointAttributeEnabled + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myTextFieldStrings->disable(); + } + } else if (myChoicesCombo->shown()) { + // fill comboBox again + myChoicesCombo->clearItems(); + for (const auto& it : myACAttr.getDiscreteValues()) { + myChoicesCombo->appendItem(it.c_str()); + } + // show combo box with values + myChoicesCombo->setNumVisible((int)myACAttr.getDiscreteValues().size()); + myChoicesCombo->setCurrentItem(myChoicesCombo->findItem(value.c_str())); + myChoicesCombo->setTextColor(FXRGB(0, 0, 0)); + myChoicesCombo->show(); + // disable depending of disjointAttributeEnabled + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myChoicesCombo->disable(); + } + } else if (myBoolCheckButton->shown()) { + if (GNEAttributeCarrier::canParse(value)) { + myBoolCheckButton->setCheck(GNEAttributeCarrier::parse(value)); + } else { + myBoolCheckButton->setCheck(false); + } + // disable depending of disjointAttributeEnabled + if (myACAttr.isNonEditable() || !disjointAttributeEnabled) { + myBoolCheckButton->disable(); + } + } + // if Tag correspond to an network element but we're in demand mode (or vice versa), disable all elements + if (myACAttr.getAttr() != SUMO_ATTR_NOTHING) { + if (((myAttributesEditorParent->myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && myACAttr.getTagPropertyParent().isDemandElement()) || + ((myAttributesEditorParent->myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && !myACAttr.getTagPropertyParent().isDemandElement())) { + myColorEditor->disable(); + myRadioButton->disable(); + myTextFieldInt->disable(); + myTextFieldReal->disable(); + myTextFieldStrings->disable(); + myChoicesCombo->disable(); + myBoolCheckButton->disable(); + myButtonCombinableChoices->disable(); + } + // special case for Default vehicle types (ID cannot be edited) + if ((myACAttr.getTagPropertyParent().getTag() == SUMO_TAG_VTYPE) && (myACAttr.getAttr() == SUMO_ATTR_ID) && + ((value == DEFAULT_VTYPE_ID) || (value == DEFAULT_PEDTYPE_ID) || (value == DEFAULT_BIKETYPE_ID))) { + myTextFieldStrings->disable(); } } - // recalc frame and show again - recalc(); - show(); } -void -GNEFrame::ACAttributes::hideACAttributesModul() { - hide(); +bool +GNEFrame::AttributesEditor::RowEditor::isRowValid() const { + return ((myTextFieldInt->getTextColor() == FXRGB(0, 0, 0)) && (myTextFieldReal->getTextColor() == FXRGB(0, 0, 0)) && + (myTextFieldStrings->getTextColor() == FXRGB(0, 0, 0)) && (myChoicesCombo->getTextColor() == FXRGB(0, 0, 0))); } -std::map -GNEFrame::ACAttributes::getAttributesAndValues() const { - std::map values; - // get standard parameters - for (int i = 0; i < (int)myACAttributeRows.size(); i++) { - if (myACAttributeRows.at(i)->getAttr() != SUMO_ATTR_NOTHING) { - values[myACAttributeRows.at(i)->getAttr()] = myACAttributeRows.at(i)->getValue(); +long +GNEFrame::AttributesEditor::RowEditor::onCmdOpenAttributeDialog(FXObject* obj, FXSelector, void*) { + if (obj == myColorEditor) { + // create FXColorDialog + FXColorDialog colordialog(this, tr("Color Dialog")); + colordialog.setTarget(this); + // If previous attribute wasn't correct, set black as default color + if (GNEAttributeCarrier::canParse(myTextFieldStrings->getText().text())) { + colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myTextFieldStrings->getText().text()))); + } else if (!myACAttr.getDefaultValue().empty()) { + colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myACAttr.getDefaultValue()))); + } else { + colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::BLACK)); } + // execute dialog to get a new color + if (colordialog.execute()) { + std::string newValue = toString(MFXUtils::getRGBColor(colordialog.getRGBA())); + myTextFieldStrings->setText(newValue.c_str()); + if (myAttributesEditorParent->myEditedACs.front()->isValid(myACAttr.getAttr(), newValue)) { + // if its valid for the first AC than its valid for all (of the same type) + if (myAttributesEditorParent->myEditedACs.size() > 1) { + myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()->p_begin("Change multiple attributes"); + } + // Set new value of attribute in all selected ACs + for (const auto& it_ac : myAttributesEditorParent->myEditedACs) { + it_ac->setAttribute(myACAttr.getAttr(), newValue, myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()); + } + // If previously value was incorrect, change font color to black + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + myTextFieldStrings->killFocus(); + } + } + return 0; + } else if (obj == myButtonCombinableChoices) { + // if its valid for the first AC than its valid for all (of the same type) + if (myAttributesEditorParent->myEditedACs.size() > 1) { + myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()->p_begin("Change multiple attributes"); + } + // open GNEDialog_AllowDisallow + GNEDialog_AllowDisallow(myAttributesEditorParent->myFrameParent->getViewNet(), myAttributesEditorParent->myEditedACs.front()).execute(); + std::string allowed = myAttributesEditorParent->myEditedACs.front()->getAttribute(SUMO_ATTR_ALLOW); + // Set new value of attribute in all selected ACs + for (const auto& it_ac : myAttributesEditorParent->myEditedACs) { + it_ac->setAttribute(SUMO_ATTR_ALLOW, allowed, myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()); + } + // finish change multiple attributes + if (myAttributesEditorParent->myEditedACs.size() > 1) { + myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()->p_end(); + } + // update frame parent after attribute sucesfully set + myAttributesEditorParent->myFrameParent->updateFrameAfterChangeAttribute(); + return 1; + } else { + throw ProcessError("Invalid call to onCmdOpenAttributeDialog"); } - return values; } -void -GNEFrame::ACAttributes::showWarningMessage(std::string extra) const { - std::string errorMessage; - // iterate over standar parameters - for (auto i : myTagProperties) { - if (errorMessage.empty()) { - // Return string with the error if at least one of the parameter isn't valid - std::string attributeValue = myACAttributeRows.at(i.second.getPositionListed())->isAttributeValid(); - if (attributeValue.size() != 0) { - errorMessage = attributeValue; +long +GNEFrame::AttributesEditor::RowEditor::onCmdSetAttribute(FXObject*, FXSelector, void*) { + // Declare changed value + std::string newVal; + // First, obtain the string value of the new attribute depending of their type + if (myACAttr.isBool()) { + // first check if we're editing boolean as a list of string or as a checkbox + if (myBoolCheckButton->shown()) { + // Set true o false depending of the checkBox + if (myBoolCheckButton->getCheck()) { + myBoolCheckButton->setText("true"); + newVal = "true"; + } else { + myBoolCheckButton->setText("false"); + newVal = "false"; } + } else { + // obtain boolean value of myTextFieldStrings (because we're inspecting multiple attribute carriers with different values) + newVal = myTextFieldStrings->getText().text(); + } + } else if (myACAttr.isDiscrete()) { + // Check if are combinable choices (for example, Vehicle Types) + if ((myACAttr.getDiscreteValues().size() > 0) && + myACAttr.isCombinable()) { + // Get value obtained using AttributesEditor + newVal = myTextFieldStrings->getText().text(); + } else if (!myMultiple) { + // Get value of ComboBox + newVal = myChoicesCombo->getText().text(); + } else { + // due this is a multiple selection, obtain value of myTextFieldStrings instead of comboBox + newVal = myTextFieldStrings->getText().text(); + } + } else if (myACAttr.isFloat() || myACAttr.isTime()) { + // Check if default value of attribute must be set + if (myTextFieldReal->getText().empty() && myACAttr.hasDefaultValue()) { + newVal = myACAttr.getDefaultValue(); + myTextFieldReal->setText(newVal.c_str()); + } else { + // obtain value of myTextFieldReal + newVal = myTextFieldReal->getText().text(); + } + } else if (myACAttr.isInt()) { + // Check if default value of attribute must be set + if (myTextFieldInt->getText().empty() && myACAttr.hasDefaultValue()) { + newVal = myACAttr.getDefaultValue(); + myTextFieldInt->setText(newVal.c_str()); + } else { + // obtain value of myTextFieldInt + newVal = myTextFieldInt->getText().text(); + } + } else if (myACAttr.isString()) { + // Check if default value of attribute must be set + if (myTextFieldStrings->getText().empty() && myACAttr.hasDefaultValue()) { + newVal = myACAttr.getDefaultValue(); + myTextFieldStrings->setText(newVal.c_str()); + } else { + // obtain value of myTextFieldStrings + newVal = myTextFieldStrings->getText().text(); } } - // show warning box if input parameters aren't invalid - if (extra.size() == 0) { - errorMessage = "Invalid input parameter of " + myTagProperties.getTagStr() + ": " + errorMessage; + + // we need a extra check for Position and Shape Values, due #2658 + if ((myACAttr.getAttr() == SUMO_ATTR_POSITION) || (myACAttr.getAttr() == SUMO_ATTR_SHAPE)) { + newVal = stripWhitespaceAfterComma(newVal); + } + + // Check if attribute must be changed + if (myAttributesEditorParent->myEditedACs.front()->isValid(myACAttr.getAttr(), newVal)) { + // if its valid for the first AC than its valid for all (of the same type) + if (myAttributesEditorParent->myEditedACs.size() > 1) { + myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()->p_begin("Change multiple attributes"); + } else if (myACAttr.getAttr() == SUMO_ATTR_ID) { + // IDs attribute has to be encapsulated + myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()->p_begin("change " + myACAttr.getTagPropertyParent().getTagStr() + " attribute"); + } + // Set new value of attribute in all selected ACs + for (const auto& it_ac : myAttributesEditorParent->myEditedACs) { + it_ac->setAttribute(myACAttr.getAttr(), newVal, myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()); + } + // finish change multiple attributes or ID Attributes + if (myAttributesEditorParent->myEditedACs.size() > 1) { + myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()->p_end(); + } else if (myACAttr.getAttr() == SUMO_ATTR_ID) { + myAttributesEditorParent->myFrameParent->getViewNet()->getUndoList()->p_end(); + } + // If previously value was incorrect, change font color to black + if (myACAttr.isCombinable()) { + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + myTextFieldStrings->killFocus(); + // in this case, we need to refresh the other values (For example, allow/Disallow objects) + myAttributesEditorParent->refreshAttributeEditor(false, false); + } else if (myACAttr.isDiscrete()) { + myChoicesCombo->setTextColor(FXRGB(0, 0, 0)); + myChoicesCombo->killFocus(); + } else if (myACAttr.isFloat() || myACAttr.isTime()) { + myTextFieldReal->setTextColor(FXRGB(0, 0, 0)); + myTextFieldReal->killFocus(); + } else if (myACAttr.isInt() && myTextFieldStrings != nullptr) { + myTextFieldInt->setTextColor(FXRGB(0, 0, 0)); + myTextFieldInt->killFocus(); + } else if (myTextFieldStrings != nullptr) { + myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); + myTextFieldStrings->killFocus(); + } + // update frame parent after attribute sucesfully set + myAttributesEditorParent->myFrameParent->updateFrameAfterChangeAttribute(); } else { - errorMessage = "Invalid input parameter of " + myTagProperties.getTagStr() + ": " + extra; + // If value of TextField isn't valid, change color to Red depending of type + if (myACAttr.isCombinable()) { + myTextFieldStrings->setTextColor(FXRGB(255, 0, 0)); + myTextFieldStrings->killFocus(); + } else if (myACAttr.isDiscrete()) { + myChoicesCombo->setTextColor(FXRGB(255, 0, 0)); + myChoicesCombo->killFocus(); + } else if (myACAttr.isFloat() || myACAttr.isTime()) { + myTextFieldReal->setTextColor(FXRGB(255, 0, 0)); + } else if (myACAttr.isInt() && myTextFieldStrings != nullptr) { + myTextFieldInt->setTextColor(FXRGB(255, 0, 0)); + } else if (myTextFieldStrings != nullptr) { + myTextFieldStrings->setTextColor(FXRGB(255, 0, 0)); + } + // Write Warning in console if we're in testing mode + WRITE_DEBUG("Value '" + newVal + "' for attribute " + myACAttr.getAttrStr() + " of " + myACAttr.getTagPropertyParent().getTagStr() + " isn't valid"); } + return 1; +} - // set message in status bar - myFrameParent->getViewNet()->setStatusBarText(errorMessage); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(errorMessage); + +long +GNEFrame::AttributesEditor::RowEditor::onCmdSetDisjointAttribute(FXObject*, FXSelector, void*) { + // write debug (for Netedit tests) + WRITE_DEBUG("Selected radio button for attribute '" + myACAttr.getAttrStr() + "'"); + // change disjoint attribute with undo/redo + myAttributesEditorParent->myEditedACs.front()->setDisjointAttribute(myACAttr.getAttr(), + myAttributesEditorParent->myFrameParent->myViewNet->getUndoList()); + // refresh Attributes edito parent + myAttributesEditorParent->refreshAttributeEditor(false, false); + return 0; } -bool -GNEFrame::ACAttributes::areValuesValid() const { - // iterate over standar parameters - for (auto i : myTagProperties) { - // Return false if error message of attriuve isn't empty - if (myACAttributeRows.at(i.second.getPositionListed())->isAttributeValid().size() != 0) { - return false; +std::string +GNEFrame::AttributesEditor::RowEditor::stripWhitespaceAfterComma(const std::string& stringValue) { + std::string result(stringValue); + while (result.find(", ") != std::string::npos) { + result = StringUtils::replace(result, ", ", ","); + } + return result; +} + +// --------------------------------------------------------------------------- +// GNEFrame::AttributesEditor - methods +// --------------------------------------------------------------------------- + +GNEFrame::AttributesEditor::AttributesEditor(GNEFrame* FrameParent) : + FXGroupBox(FrameParent->myContentFrame, "Internal attributes", GUIDesignGroupBoxFrame), + myFrameParent(FrameParent), + myIncludeExtended(true) { + // Create sufficient Row for all types of AttributeCarriers + for (int i = 0; i < (int)GNEAttributeCarrier::getHigherNumberOfAttributes(); i++) { + myVectorOfRows.push_back(new RowEditor(this)); + } + // Create help button + myHelpButton = new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular); +} + + +void +GNEFrame::AttributesEditor::showAttributeEditorModul(const std::vector& ACs, bool includeExtended) { + myEditedACs = ACs; + myIncludeExtended = includeExtended; + // first hide all rows + for (const auto& i : myVectorOfRows) { + i->hideRow(); + } + if (myEditedACs.size() > 0) { + // check if current AC is a Junction without TLSs (needed to hidde TLS options) + bool disableTLSinJunctions = (dynamic_cast(myEditedACs.front()) && (dynamic_cast(myEditedACs.front())->getNBNode()->getControllingTLS().empty())); + // Iterate over attributes + for (const auto& i : myEditedACs.front()->getTagProperty()) { + // disable editing for unique attributes in case of multi-selection + if ((myEditedACs.size() > 1) && i.second.isUnique()) { + continue; + } + // disable editing of extended attributes if includeExtended isn't enabled + if (i.second.isExtended() && !includeExtended) { + continue; + } + // Declare a set of occuring values and insert attribute's values of item (note: We use a set to avoid repeated values) + std::set occuringValues; + for (const auto& it_ac : myEditedACs) { + occuringValues.insert(it_ac->getAttribute(i.first)); + } + // get current value + std::ostringstream oss; + for (auto it_val = occuringValues.begin(); it_val != occuringValues.end(); it_val++) { + if (it_val != occuringValues.begin()) { + oss << " "; + } + oss << *it_val; + } + std::string value = oss.str(); + if ((myEditedACs.front()->getTagProperty().getTag() == SUMO_TAG_CONNECTION) && + (i.first == SUMO_ATTR_TLLINKINDEX) + && value == toString(NBConnection::InvalidTlIndex)) { + // possibly the connections are newly created (allow assigning + // tlIndex if the junction(s) have a traffic light + for (const auto& it_ac : myEditedACs) { + if (!it_ac->isValid(SUMO_ATTR_TLLINKINDEX, "0")) { + value = "No TLS"; + break; + } + } + } + // Show attribute + if ((disableTLSinJunctions && (myEditedACs.front()->getTagProperty().getTag() == SUMO_TAG_JUNCTION) && + ((i.first == SUMO_ATTR_TLTYPE) || (i.first == SUMO_ATTR_TLID))) == false) { + // first show AttributesEditor + show(); + // show attribute + myVectorOfRows[i.second.getPositionListed()]->showRow(i.second, value, myEditedACs.front()->isDisjointAttributeSet(i.first)); + } } } - return true; } -int -GNEFrame::ACAttributes::getNumberOfAddedAttributes() const { - return (1); +void +GNEFrame::AttributesEditor::hideAttributesEditorModul() { + // hide al attributes + for (const auto& i : myVectorOfRows) { + i->hideRow(); + } + // clear myEditedACs + myEditedACs.clear(); + // hide also AttributesEditor + hide(); +} + + +void +GNEFrame::AttributesEditor::refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition) { + if (myEditedACs.size() > 0) { + // check if current AC is a Junction without TLSs (needed to hidde TLS options) + bool disableTLSinJunctions = (dynamic_cast(myEditedACs.front()) && (dynamic_cast(myEditedACs.front())->getNBNode()->getControllingTLS().empty())); + // Iterate over attributes + for (const auto& i : myEditedACs.front()->getTagProperty()) { + // disable editing for unique attributes in case of multi-selection + if ((myEditedACs.size() > 1) && i.second.isUnique()) { + continue; + } + // Declare a set of occuring values and insert attribute's values of item + std::set occuringValues; + for (const auto& it_ac : myEditedACs) { + occuringValues.insert(it_ac->getAttribute(i.first)); + } + // get current value + std::ostringstream oss; + for (auto it_val = occuringValues.begin(); it_val != occuringValues.end(); it_val++) { + if (it_val != occuringValues.begin()) { + oss << " "; + } + oss << *it_val; + } + // Show attribute + if ((disableTLSinJunctions && (myEditedACs.front()->getTagProperty().getTag() == SUMO_TAG_JUNCTION) && + ((i.first == SUMO_ATTR_TLTYPE) || (i.first == SUMO_ATTR_TLID))) == false) { + // check if is a disjoint attribute + bool disjointAttributeSet = myEditedACs.front()->isDisjointAttributeSet(i.first); + // Check if refresh of Position or Shape has to be forced + if ((i.first == SUMO_ATTR_SHAPE) && forceRefreshShape) { + myVectorOfRows[i.second.getPositionListed()]->refreshRow(oss.str(), true, disjointAttributeSet); + } else if ((i.first == SUMO_ATTR_POSITION) && forceRefreshPosition) { + // Refresh attributes maintain invalid values + myVectorOfRows[i.second.getPositionListed()]->refreshRow(oss.str(), true, disjointAttributeSet); + } else { + // Refresh attributes maintain invalid values + myVectorOfRows[i.second.getPositionListed()]->refreshRow(oss.str(), false, disjointAttributeSet); + } + } + } + } +} + + +const std::vector& +GNEFrame::AttributesEditor::getEditedACs() const { + return myEditedACs; +} + + +void +GNEFrame::AttributesEditor::removeEditedAC(GNEAttributeCarrier* AC) { + // Only remove if there is inspected ACs + if (myEditedACs.size() > 0) { + // Try to find AC in myACs + auto i = std::find(myEditedACs.begin(), myEditedACs.end(), AC); + // if was found + if (i != myEditedACs.end()) { + // erase AC from inspected ACs + myEditedACs.erase(i); + // Write Warning in console if we're in testing mode + WRITE_DEBUG("Removed inspected element from Inspected ACs. " + toString(myEditedACs.size()) + " ACs remains."); + // Inspect multi selection again (To refresh Modul) + showAttributeEditorModul(myEditedACs, myIncludeExtended); + } + } } long -GNEFrame::ACAttributes::onCmdHelp(FXObject*, FXSelector, void*) { - // open Help attributes dialog - myFrameParent->openHelpAttributesDialog(myTagProperties); +GNEFrame::AttributesEditor::onCmdAttributesEditorHelp(FXObject*, FXSelector, void*) { + // open Help attributes dialog if there is inspected ACs + if (myEditedACs.size() > 0) { + // open Help attributes dialog + myFrameParent->openHelpAttributesDialog(myEditedACs.front()->getTagProperty()); + } + return 1; +} + +// --------------------------------------------------------------------------- +// GNEFrame::AttributesEditorExtended- methods +// --------------------------------------------------------------------------- + +GNEFrame::AttributesEditorExtended::AttributesEditorExtended(GNEFrame* frameParent) : + FXGroupBox(frameParent->myContentFrame, "Extended attributes", GUIDesignGroupBoxFrame), + myFrameParent(frameParent) { + // Create open dialog button + new FXButton(this, "Open attributes editor", nullptr, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButton); +} + + +GNEFrame::AttributesEditorExtended::~AttributesEditorExtended() {} + + +void +GNEFrame::AttributesEditorExtended::showAttributesEditorExtendedModul() { + show(); +} + + +void +GNEFrame::AttributesEditorExtended::hideAttributesEditorExtendedModul() { + hide(); +} + + +long +GNEFrame::AttributesEditorExtended::onCmdOpenDialog(FXObject*, FXSelector, void*) { + // open AttributesCreator extended dialog + myFrameParent->openAttributesEditorExtendedDialog(); return 1; } @@ -640,10 +1632,12 @@ long GNEFrame::ACHierarchy::onCmdDeleteItem(FXObject*, FXSelector, void*) { // check if Inspector frame was opened before removing - const std::vector& currentInspectedACs = myFrameParent->getViewNet()->getViewParent()->getInspectorFrame()->getInspectedACs(); + const std::vector& currentInspectedACs = myFrameParent->getViewNet()->getViewParent()->getInspectorFrame()->getAttributesEditor()->getEditedACs(); // Remove Attribute Carrier + /* myFrameParent->getViewNet()->getViewParent()->getDeleteFrame()->removeAttributeCarrier(myRightClickedAC); myFrameParent->getViewNet()->getViewParent()->getDeleteFrame()->hide(); + */ // check if inspector frame has to be shown again if (currentInspectedACs.size() == 1) { if (currentInspectedACs.front() != myRightClickedAC) { @@ -680,197 +1674,249 @@ FXTreeItem* GNEFrame::ACHierarchy::showAttributeCarrierParents() { - // Switch gl type of ac - switch (myAC->getTagProperty().getTag()) { - case SUMO_TAG_EDGE: { - // obtain Edge - GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(myAC->getID(), false); - if (edge) { - // insert Junctions of edge in tree (Pararell because a edge has always two Junctions) - FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - junctionDestinyItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); - myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); - // return junction destiny Item - return junctionDestinyItem; - } else { - return nullptr; + if (myAC->getTagProperty().isNetElement()) { + // check demand element type + switch (myAC->getTagProperty().getTag()) { + case SUMO_TAG_EDGE: { + // obtain Edge + GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(myAC->getID(), false); + if (edge) { + // insert Junctions of edge in tree (Pararell because a edge has always two Junctions) + FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); + FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); + junctionDestinyItem->setExpanded(true); + // Save items in myTreeItemToACMap + myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); + myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); + // return junction destiny Item + return junctionDestinyItem; + } else { + return nullptr; + } } - } - case SUMO_TAG_LANE: { - // obtain lane - GNELane* lane = myFrameParent->getViewNet()->getNet()->retrieveLane(myAC->getID(), false); - if (lane) { - // obtain edge parent - GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(lane->getParentEdge().getID()); - //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions) - FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - junctionDestinyItem->setExpanded(true); - // Create edge item - FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon()); - edgeItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); - myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); - myTreeItemToACMap[edgeItem] = edge; - // return edge item - return edgeItem; - } else { - return nullptr; + case SUMO_TAG_LANE: { + // obtain lane + GNELane* lane = myFrameParent->getViewNet()->getNet()->retrieveLane(myAC->getID(), false); + if (lane) { + // obtain edge parent + GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(lane->getParentEdge().getID()); + //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions) + FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); + FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); + junctionDestinyItem->setExpanded(true); + // Create edge item + FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon()); + edgeItem->setExpanded(true); + // Save items in myTreeItemToACMap + myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); + myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); + myTreeItemToACMap[edgeItem] = edge; + // return edge item + return edgeItem; + } else { + return nullptr; + } } - } - case SUMO_TAG_POILANE: { - // Obtain POILane - GNEPOI* POILane = myFrameParent->getViewNet()->getNet()->retrievePOI(myAC->getID(), false); - if (POILane) { - // obtain lane parent - GNELane* lane = myFrameParent->getViewNet()->getNet()->retrieveLane(POILane->getLane()->getID()); - // obtain edge parent - GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(lane->getParentEdge().getID()); - //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions) - FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - junctionDestinyItem->setExpanded(true); - // Create edge item - FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon()); - edgeItem->setExpanded(true); - // Create lane item - FXTreeItem* laneItem = myTreelist->insertItem(nullptr, edgeItem, lane->getHierarchyName().c_str(), lane->getIcon(), lane->getIcon()); - laneItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); - myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); - myTreeItemToACMap[edgeItem] = edge; - myTreeItemToACMap[laneItem] = lane; - // return Lane item - return laneItem; - } else { - return nullptr; + case SUMO_TAG_CROSSING: { + // obtain Crossing + GNECrossing* crossing = myFrameParent->getViewNet()->getNet()->retrieveCrossing(myAC->getID(), false); + if (crossing) { + // obtain junction + GNEJunction* junction = crossing->getParentJunction(); + // create junction item + FXTreeItem* junctionItem = myTreelist->insertItem(nullptr, nullptr, junction->getHierarchyName().c_str(), junction->getIcon(), junction->getIcon()); + junctionItem->setExpanded(true); + // Save items in myTreeItemToACMap + myTreeItemToACMap[junctionItem] = junction; + // return junction Item + return junctionItem; + } else { + return nullptr; + } } - } - case SUMO_TAG_CROSSING: { - // obtain Crossing - GNECrossing* crossing = myFrameParent->getViewNet()->getNet()->retrieveCrossing(myAC->getID(), false); - if (crossing) { - // obtain junction - GNEJunction* junction = crossing->getParentJunction(); - // create junction item - FXTreeItem* junctionItem = myTreelist->insertItem(nullptr, nullptr, junction->getHierarchyName().c_str(), junction->getIcon(), junction->getIcon()); - junctionItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[junctionItem] = junction; - // return junction Item - return junctionItem; - } else { - return nullptr; + case SUMO_TAG_CONNECTION: { + // obtain Connection + GNEConnection* connection = myFrameParent->getViewNet()->getNet()->retrieveConnection(myAC->getID(), false); + if (connection) { + // create edge from item + FXTreeItem* edgeFromItem = myTreelist->insertItem(nullptr, nullptr, connection->getEdgeFrom()->getHierarchyName().c_str(), connection->getEdgeFrom()->getIcon(), connection->getEdgeFrom()->getIcon()); + edgeFromItem->setExpanded(true); + // create edge to item + FXTreeItem* edgeToItem = myTreelist->insertItem(nullptr, nullptr, connection->getEdgeTo()->getHierarchyName().c_str(), connection->getEdgeTo()->getIcon(), connection->getEdgeTo()->getIcon()); + edgeToItem->setExpanded(true); + // create connection item + FXTreeItem* connectionItem = myTreelist->insertItem(nullptr, edgeToItem, connection->getHierarchyName().c_str(), connection->getIcon(), connection->getIcon()); + connectionItem->setExpanded(true); + // Save items in myTreeItemToACMap + myTreeItemToACMap[edgeFromItem] = connection->getEdgeFrom(); + myTreeItemToACMap[edgeToItem] = connection->getEdgeTo(); + myTreeItemToACMap[connectionItem] = connection; + // return connection item + return connectionItem; + } else { + return nullptr; + } } + default: + break; } - case SUMO_TAG_CONNECTION: { - // obtain Connection - GNEConnection* connection = myFrameParent->getViewNet()->getNet()->retrieveConnection(myAC->getID(), false); - if (connection) { - // create edge from item - FXTreeItem* edgeFromItem = myTreelist->insertItem(nullptr, nullptr, connection->getEdgeFrom()->getHierarchyName().c_str(), connection->getEdgeFrom()->getIcon(), connection->getEdgeFrom()->getIcon()); - edgeFromItem->setExpanded(true); - // create edge to item - FXTreeItem* edgeToItem = myTreelist->insertItem(nullptr, nullptr, connection->getEdgeTo()->getHierarchyName().c_str(), connection->getEdgeTo()->getIcon(), connection->getEdgeTo()->getIcon()); - edgeToItem->setExpanded(true); - // create connection item - FXTreeItem* connectionItem = myTreelist->insertItem(nullptr, edgeToItem, connection->getHierarchyName().c_str(), connection->getIcon(), connection->getIcon()); - connectionItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[edgeFromItem] = connection->getEdgeFrom(); - myTreeItemToACMap[edgeToItem] = connection->getEdgeTo(); - myTreeItemToACMap[connectionItem] = connection; - // return connection item - return connectionItem; - } else { - return nullptr; + } else if (myAC->getTagProperty().getTag() == SUMO_TAG_POILANE) { + // Obtain POILane + GNEPOI* POILane = myFrameParent->getViewNet()->getNet()->retrievePOI(myAC->getID(), false); + if (POILane) { + // obtain lane parent + GNELane* lane = myFrameParent->getViewNet()->getNet()->retrieveLane(POILane->getLaneParents().at(0)->getID()); + // obtain edge parent + GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(lane->getParentEdge().getID()); + //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions) + FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); + FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); + junctionDestinyItem->setExpanded(true); + // Create edge item + FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon()); + edgeItem->setExpanded(true); + // Create lane item + FXTreeItem* laneItem = myTreelist->insertItem(nullptr, edgeItem, lane->getHierarchyName().c_str(), lane->getIcon(), lane->getIcon()); + laneItem->setExpanded(true); + // Save items in myTreeItemToACMap + myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); + myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); + myTreeItemToACMap[edgeItem] = edge; + myTreeItemToACMap[laneItem] = lane; + // return Lane item + return laneItem; + } else { + return nullptr; + } + } else if (myAC->getTagProperty().isAdditional() || myAC->getTagProperty().isTAZ()) { + // Obtain Additional + GNEAdditional* additional = myFrameParent->getViewNet()->getNet()->retrieveAdditional(myAC->getTagProperty().getTag(), myAC->getID(), false); + if (additional) { + // declare auxiliar FXTreeItem, due a demand element can have multiple "roots" + FXTreeItem* root = nullptr; + // check if there is demand elements parents + if (additional->getAdditionalParents().size() > 0) { + // check if we have more than one edge + if (additional->getAdditionalParents().size() > 1) { + // insert first item + addListItem(additional->getAdditionalParents().front()); + // insert "spacer" + if (additional->getAdditionalParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)additional->getAdditionalParents().size() - 2) + " additionals...").c_str(), 0, false); + } + } + // return last inserted item + root = addListItem(additional->getAdditionalParents().back()); } + // check if there is demand element parents + if (additional->getDemandElementParents().size() > 0) { + // check if we have more than one demand element + if (additional->getDemandElementParents().size() > 1) { + // insert first item + addListItem(additional->getDemandElementParents().front()); + // insert "spacer" + if (additional->getDemandElementParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)additional->getDemandElementParents().size() - 2) + " demand elements...").c_str(), 0, false); + } + } + // return last inserted item + root = addListItem(additional->getDemandElementParents().back()); + } + // check if there is edge parents + if (additional->getEdgeParents().size() > 0) { + // check if we have more than one edge + if (additional->getEdgeParents().size() > 1) { + // insert first item + addListItem(additional->getEdgeParents().front()); + // insert "spacer" + if (additional->getEdgeParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)additional->getEdgeParents().size() - 2) + " edges...").c_str(), 0, false); + } + } + // return last inserted item + root = addListItem(additional->getEdgeParents().back()); + } + // check if there is lane parents + if (additional->getLaneParents().size() > 0) { + // check if we have more than one lane parent + if (additional->getLaneParents().size() > 1) { + // insert first item + addListItem(additional->getLaneParents().front()); + // insert "spacer" + if (additional->getLaneParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)additional->getLaneParents().size() - 2) + " lanes...").c_str(), 0, false); + } + } + // return last inserted item + root = addListItem(additional->getLaneParents().back()); + } + // return last inserted list item + return root; } - default: { - // obtain tag property (only for improve code legibility) - const auto& tagProperty = myAC->getTagProperty(); - // check if is an additional or a TAZ, and in other case return nullptr - if (tagProperty.isAdditional() || tagProperty.isTAZ()) { - // Obtain Additional - GNEAdditional* additional = myFrameParent->getViewNet()->getNet()->retrieveAdditional(myAC->getTagProperty().getTag(), myAC->getID(), false); - if (additional) { - // first check if additional has another additional as parent (to add it into root) - if (tagProperty.hasParent() && tagProperty.getParentTag() != SUMO_TAG_LANE) { - GNEAdditional* additionalParent = myFrameParent->getViewNet()->getNet()->retrieveAdditional(tagProperty.getParentTag(), additional->getAttribute(GNE_ATTR_PARENT)); - // create additional parent item - FXTreeItem* additionalParentItem = myTreelist->insertItem(nullptr, nullptr, additionalParent->getHierarchyName().c_str(), additionalParent->getIcon(), additionalParent->getIcon()); - additionalParentItem->setExpanded(true); - // Save it in myTreeItemToACMap - myTreeItemToACMap[additionalParentItem] = additionalParent; - } - if (tagProperty.hasAttribute(SUMO_ATTR_EDGE)) { - // obtain edge parent - GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(additional->getAttribute(SUMO_ATTR_EDGE)); - //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions) - FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - junctionDestinyItem->setExpanded(true); - // Create edge item - FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon()); - edgeItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); - myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); - myTreeItemToACMap[edgeItem] = edge; - // return edge item - return edgeItem; - } else if (tagProperty.hasAttribute(SUMO_ATTR_LANE)) { - // obtain lane parent - GNELane* lane = myFrameParent->getViewNet()->getNet()->retrieveLane(additional->getAttribute(SUMO_ATTR_LANE)); - // obtain edge parent - GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(lane->getParentEdge().getID()); - //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions) - FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - junctionDestinyItem->setExpanded(true); - // Create edge item - FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon()); - edgeItem->setExpanded(true); - // Create lane item - FXTreeItem* laneItem = myTreelist->insertItem(nullptr, edgeItem, lane->getHierarchyName().c_str(), lane->getIcon(), lane->getIcon()); - laneItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); - myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); - myTreeItemToACMap[edgeItem] = edge; - myTreeItemToACMap[laneItem] = lane; - // return lane item - return laneItem; - } else if (tagProperty.hasAttribute(SUMO_ATTR_LANES)) { - // obtain lane parent - std::vector lanes = GNEAttributeCarrier::parse >(myFrameParent->getViewNet()->getNet(), additional->getAttribute(SUMO_ATTR_LANES)); - // obtain edge parent - GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(lanes.front()->getParentEdge().getID()); - //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions) - FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon()); - junctionDestinyItem->setExpanded(true); - // Create edge item - FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon()); - edgeItem->setExpanded(true); - // Create lane item - FXTreeItem* laneItem = myTreelist->insertItem(nullptr, edgeItem, lanes.front()->getHierarchyName().c_str(), lanes.front()->getIcon(), lanes.front()->getIcon()); - laneItem->setExpanded(true); - // Save items in myTreeItemToACMap - myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource(); - myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny(); - myTreeItemToACMap[edgeItem] = edge; - myTreeItemToACMap[laneItem] = lanes.front(); - // return lane item - return laneItem; + } else if (myAC->getTagProperty().isDemandElement()) { + // Obtain DemandElement + GNEDemandElement* demandElement = myFrameParent->getViewNet()->getNet()->retrieveDemandElement(myAC->getTagProperty().getTag(), myAC->getID(), false); + if (demandElement) { + // declare auxiliar FXTreeItem, due a demand element can have multiple "roots" + FXTreeItem* root = nullptr; + // check if there is demand elements parents + if (demandElement->getAdditionalParents().size() > 0) { + // check if we have more than one edge + if (demandElement->getAdditionalParents().size() > 1) { + // insert first item + addListItem(demandElement->getAdditionalParents().front()); + // insert "spacer" + if (demandElement->getAdditionalParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)demandElement->getAdditionalParents().size() - 2) + " additionals...").c_str(), 0, false); + } + } + // return last inserted item + root = addListItem(demandElement->getAdditionalParents().back()); + } + // check if there is demand element parents + if (demandElement->getDemandElementParents().size() > 0) { + // check if we have more than one demand element + if (demandElement->getDemandElementParents().size() > 1) { + // insert first item + addListItem(demandElement->getDemandElementParents().front()); + // insert "spacer" + if (demandElement->getDemandElementParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)demandElement->getDemandElementParents().size() - 2) + " demand elements...").c_str(), 0, false); + } + } + // return last inserted item + root = addListItem(demandElement->getDemandElementParents().back()); + } + // check if there is edge parents + if (demandElement->getEdgeParents().size() > 0) { + // check if we have more than one edge + if (demandElement->getEdgeParents().size() > 1) { + // insert first item + addListItem(demandElement->getEdgeParents().front()); + // insert "spacer" + if (demandElement->getEdgeParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)demandElement->getEdgeParents().size() - 2) + " edges...").c_str(), 0, false); } } + // return last inserted item + root = addListItem(demandElement->getEdgeParents().back()); } + // check if there is lane parents + if (demandElement->getLaneParents().size() > 0) { + // check if we have more than one lane parent + if (demandElement->getLaneParents().size() > 1) { + // insert first item + addListItem(demandElement->getLaneParents().front()); + // insert "spacer" + if (demandElement->getLaneParents().size() > 2) { + addListItem(nullptr, ("..." + toString((int)demandElement->getLaneParents().size() - 2) + " lanes...").c_str(), 0, false); + } + } + // return last inserted item + root = addListItem(demandElement->getLaneParents().back()); + } + // return last inserted list item + return root; } } // there isn't parents @@ -880,113 +1926,183 @@ void GNEFrame::ACHierarchy::showAttributeCarrierChilds(GNEAttributeCarrier* AC, FXTreeItem* itemParent) { - // Switch gl type of ac - switch (AC->getTagProperty().getTag()) { - case SUMO_TAG_JUNCTION: { - // retrieve junction - GNEJunction* junction = myFrameParent->getViewNet()->getNet()->retrieveJunction(AC->getID(), false); - if (junction) { - // insert junction item - FXTreeItem* junctionItem = addACIntoList(AC, itemParent); - // insert edges - for (auto i : junction->getGNEEdges()) { - showAttributeCarrierChilds(i, junctionItem); - } - // insert crossings - for (auto i : junction->getGNECrossings()) { - showAttributeCarrierChilds(i, junctionItem); - } - } - break; - } - case SUMO_TAG_EDGE: { - // retrieve edge - GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(AC->getID(), false); - if (edge) { - // insert edge item - FXTreeItem* edgeItem = addACIntoList(AC, itemParent); - // insert lanes - for (int i = 0; i < (int)edge->getLanes().size(); i++) { - showAttributeCarrierChilds(edge->getLanes().at(i), edgeItem); - } - // insert additionals of edge - for (auto i : edge->getAdditionalChilds()) { - showAttributeCarrierChilds(i, edgeItem); + if (AC->getTagProperty().isNetElement()) { + // Switch gl type of ac + switch (AC->getTagProperty().getTag()) { + case SUMO_TAG_JUNCTION: { + // retrieve junction + GNEJunction* junction = myFrameParent->getViewNet()->getNet()->retrieveJunction(AC->getID(), false); + if (junction) { + // insert junction item + FXTreeItem* junctionItem = addListItem(AC, itemParent); + // insert edges + for (auto i : junction->getGNEEdges()) { + showAttributeCarrierChilds(i, junctionItem); + } + // insert crossings + for (auto i : junction->getGNECrossings()) { + showAttributeCarrierChilds(i, junctionItem); + } } + break; } - break; - } - case SUMO_TAG_LANE: { - // retrieve lane - GNELane* lane = myFrameParent->getViewNet()->getNet()->retrieveLane(AC->getID(), false); - if (lane) { - // insert lane item - FXTreeItem* laneItem = addACIntoList(AC, itemParent); - // insert additionals of lanes - for (auto i : lane->getAdditionalChilds()) { - showAttributeCarrierChilds(i, laneItem); - } - // insert incoming connections of lanes (by default isn't expanded) - if (lane->getGNEIncomingConnections().size() > 0) { - std::vector incomingLaneConnections = lane->getGNEIncomingConnections(); - FXTreeItem* incomingConnections = myTreelist->insertItem(nullptr, laneItem, "Incomings", incomingLaneConnections.front()->getIcon(), lane->getGNEIncomingConnections().front()->getIcon()); - myTreeItemsConnections.insert(incomingConnections); - incomingConnections->setExpanded(false); - // insert incoming connections - for (auto i : incomingLaneConnections) { - showAttributeCarrierChilds(i, incomingConnections); - } - } - // insert outcoming connections of lanes (by default isn't expanded) - if (lane->getGNEOutcomingConnections().size() > 0) { - std::vector outcomingLaneConnections = lane->getGNEOutcomingConnections(); - FXTreeItem* outgoingConnections = myTreelist->insertItem(nullptr, laneItem, "Outcomings", outcomingLaneConnections.front()->getIcon(), lane->getGNEOutcomingConnections().front()->getIcon()); - myTreeItemsConnections.insert(outgoingConnections); - outgoingConnections->setExpanded(false); - // insert outcoming connections - for (auto i : outcomingLaneConnections) { - showAttributeCarrierChilds(i, outgoingConnections); + case SUMO_TAG_EDGE: { + // retrieve edge + GNEEdge* edge = myFrameParent->getViewNet()->getNet()->retrieveEdge(AC->getID(), false); + if (edge) { + // insert edge item + FXTreeItem* edgeItem = addListItem(AC, itemParent); + // insert lanes + for (const auto& i : edge->getLanes()) { + showAttributeCarrierChilds(i, edgeItem); + } + // insert shape childs + for (const auto& i : edge->getShapeChilds()) { + showAttributeCarrierChilds(i, edgeItem); + } + // insert additional childs + for (const auto& i : edge->getAdditionalChilds()) { + showAttributeCarrierChilds(i, edgeItem); + } + // insert demand elements childs + for (const auto& i : edge->getDemandElementChilds()) { + showAttributeCarrierChilds(i, edgeItem); } } + break; } - break; - } - case SUMO_TAG_POI: - case SUMO_TAG_POLY: - case SUMO_TAG_CROSSING: - case SUMO_TAG_CONNECTION: { - // insert connection item - addACIntoList(AC, itemParent); - break; - } - default: { - // check if is an additional or TAZ - if (AC->getTagProperty().isAdditional() || AC->getTagProperty().isTAZ()) { - // retrieve additional - GNEAdditional* additional = myFrameParent->getViewNet()->getNet()->retrieveAdditional(AC->getTagProperty().getTag(), AC->getID(), false); - if (additional) { - // insert additional item - FXTreeItem* additionalItem = addACIntoList(AC, itemParent); - // insert additionals childs - for (auto i : additional->getAdditionalChilds()) { - showAttributeCarrierChilds(i, additionalItem); + case SUMO_TAG_LANE: { + // retrieve lane + GNELane* lane = myFrameParent->getViewNet()->getNet()->retrieveLane(AC->getID(), false); + if (lane) { + // insert lane item + FXTreeItem* laneItem = addListItem(AC, itemParent); + // insert shape childs + for (const auto& i : lane->getShapeChilds()) { + showAttributeCarrierChilds(i, laneItem); + } + // insert additional childs + for (const auto& i : lane->getAdditionalChilds()) { + showAttributeCarrierChilds(i, laneItem); + } + // insert demand elements childs + for (const auto& i : lane->getDemandElementChilds()) { + showAttributeCarrierChilds(i, laneItem); + } + // insert incoming connections of lanes (by default isn't expanded) + if (lane->getGNEIncomingConnections().size() > 0) { + std::vector incomingLaneConnections = lane->getGNEIncomingConnections(); + // insert intermediate list item + FXTreeItem* incomingConnections = addListItem(laneItem, "Incomings", incomingLaneConnections.front()->getIcon(), false); + // insert incoming connections + for (auto i : incomingLaneConnections) { + showAttributeCarrierChilds(i, incomingConnections); + } + } + // insert outcoming connections of lanes (by default isn't expanded) + if (lane->getGNEOutcomingConnections().size() > 0) { + std::vector outcomingLaneConnections = lane->getGNEOutcomingConnections(); + // insert intermediate list item + FXTreeItem* outgoingConnections = addListItem(laneItem, "Outgoing", outcomingLaneConnections.front()->getIcon(), false); + // insert outcoming connections + for (auto i : outcomingLaneConnections) { + showAttributeCarrierChilds(i, outgoingConnections); + } } } + break; + } + case SUMO_TAG_CROSSING: + case SUMO_TAG_CONNECTION: { + // insert connection item + addListItem(AC, itemParent); + break; + } + default: + break; + } + } else if (AC->getTagProperty().isShape()) { + // insert shape item + addListItem(AC, itemParent); + } else if (AC->getTagProperty().isAdditional() || AC->getTagProperty().isTAZ()) { + // retrieve additional + GNEAdditional* additional = myFrameParent->getViewNet()->getNet()->retrieveAdditional(AC->getTagProperty().getTag(), AC->getID(), false); + if (additional) { + // insert additional item + FXTreeItem* additionalItem = addListItem(AC, itemParent); + // insert edge childs + for (const auto& i : additional->getEdgeChilds()) { + showAttributeCarrierChilds(i, additionalItem); + } + // insert lane childs + for (const auto& i : additional->getLaneChilds()) { + showAttributeCarrierChilds(i, additionalItem); + } + // insert shape childs + for (const auto& i : additional->getShapeChilds()) { + showAttributeCarrierChilds(i, additionalItem); + } + // insert additionals childs + for (const auto& i : additional->getAdditionalChilds()) { + showAttributeCarrierChilds(i, additionalItem); + } + // insert demand element childs + for (const auto& i : additional->getDemandElementChilds()) { + showAttributeCarrierChilds(i, additionalItem); + } + } + } else if (AC->getTagProperty().isDemandElement()) { + // retrieve demandElement + GNEDemandElement* demandElement = myFrameParent->getViewNet()->getNet()->retrieveDemandElement(AC->getTagProperty().getTag(), AC->getID(), false); + if (demandElement) { + // insert demandElement item + FXTreeItem* demandElementItem = addListItem(AC, itemParent); + // insert edge childs + for (const auto& i : demandElement->getEdgeChilds()) { + showAttributeCarrierChilds(i, demandElementItem); + } + // insert lane childs + for (const auto& i : demandElement->getLaneChilds()) { + showAttributeCarrierChilds(i, demandElementItem); + } + // insert shape childs + for (const auto& i : demandElement->getShapeChilds()) { + showAttributeCarrierChilds(i, demandElementItem); + } + // insert additionals childs + for (const auto& i : demandElement->getAdditionalChilds()) { + showAttributeCarrierChilds(i, demandElementItem); + } + // insert demand element childs + for (const auto& i : demandElement->getDemandElementChilds()) { + showAttributeCarrierChilds(i, demandElementItem); } - break; } } } FXTreeItem* -GNEFrame::ACHierarchy::addACIntoList(GNEAttributeCarrier* AC, FXTreeItem* itemParent) { - FXTreeItem* item = myTreelist->insertItem(nullptr, itemParent, AC->getHierarchyName().c_str(), AC->getIcon(), AC->getIcon()); +GNEFrame::ACHierarchy::addListItem(GNEAttributeCarrier* AC, FXTreeItem* itemParent, std::string prefix, std::string sufix) { + // insert item in Tree list + FXTreeItem* item = myTreelist->insertItem(nullptr, itemParent, (prefix + AC->getHierarchyName() + sufix).c_str(), AC->getIcon(), AC->getIcon()); + // insert item in map myTreeItemToACMap[item] = AC; + // by default item is expanded item->setExpanded(true); return item; } + +FXTreeItem* +GNEFrame::ACHierarchy::addListItem(FXTreeItem* itemParent, const std::string& text, FXIcon* icon, bool expanded) { + // insert item in Tree list + FXTreeItem* item = myTreelist->insertItem(nullptr, itemParent, text.c_str(), icon, icon); + // set exapnded + item->setExpanded(expanded); + return item; +} + // --------------------------------------------------------------------------- // GNEFrame::GenericParametersEditor - methods // --------------------------------------------------------------------------- @@ -1065,9 +2181,18 @@ GNEFrame::GenericParametersEditor::refreshGenericParametersEditor() { // update text field depending of AC if (myAC) { - myTextFieldGenericParameter->setText(getGenericParametersStr().c_str()); + myTextFieldGenericParameter->setText(myAC->getAttribute(GNE_ATTR_GENERIC).c_str()); myTextFieldGenericParameter->setTextColor(FXRGB(0, 0, 0)); - } else if (myACs.size()) { + // disable myTextFieldGenericParameter if Tag correspond to an network element but we're in demand mode (or vice versa), disable all elements + if (((myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && myAC->getTagProperty().isDemandElement()) || + ((myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && !myAC->getTagProperty().isDemandElement())) { + myTextFieldGenericParameter->disable(); + myEditGenericParameterButton->disable(); + } else { + myTextFieldGenericParameter->enable(); + myEditGenericParameterButton->enable(); + } + } else if (myACs.size() > 0) { // check if generic parameters of all inspected ACs are different std::string genericParameter = myACs.front()->getAttribute(GNE_ATTR_GENERIC); @@ -1078,6 +2203,15 @@ } myTextFieldGenericParameter->setText(genericParameter.c_str()); myTextFieldGenericParameter->setTextColor(FXRGB(0, 0, 0)); + // disable myTextFieldGenericParameter if we're in demand mode and inspected AC isn't a demand element (or viceversa) + if (((myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && myACs.front()->getTagProperty().isDemandElement()) || + ((myFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && !myACs.front()->getTagProperty().isDemandElement())) { + myTextFieldGenericParameter->disable(); + myEditGenericParameterButton->disable(); + } else { + myTextFieldGenericParameter->enable(); + myEditGenericParameterButton->enable(); + } } } @@ -1110,6 +2244,8 @@ i->setAttribute(GNE_ATTR_GENERIC, getGenericParametersStr(), myFrameParent->getViewNet()->getUndoList()); } myFrameParent->getViewNet()->getUndoList()->p_end(); + // update frame parent after attribute sucesfully set + myFrameParent->updateFrameAfterChangeAttribute(); } // Refresh parameter editor refreshGenericParametersEditor(); @@ -1181,6 +2317,8 @@ i->setAttribute(GNE_ATTR_GENERIC, getGenericParametersStr(), myFrameParent->getViewNet()->getUndoList()); } myFrameParent->getViewNet()->getUndoList()->p_end(); + // update frame parent after attribute sucesfully set + myFrameParent->updateFrameAfterChangeAttribute(); } return 1; } @@ -1366,7 +2504,7 @@ myBlockShapeLabel = new FXLabel(blockShapeFrame, "block shape", 0, GUIDesignLabelAttribute); myBlockShapeCheckButton = new FXCheckButton(blockShapeFrame, "false", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); // Create Frame for block close polygon and checkBox (By default disabled) - FXHorizontalFrame *closePolygonFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); + FXHorizontalFrame* closePolygonFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); myClosePolygonLabel = new FXLabel(closePolygonFrame, "Close shape", 0, GUIDesignLabelAttribute); myCloseShapeCheckButton = new FXCheckButton(closePolygonFrame, "false", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); myBlockShapeCheckButton->setCheck(false); @@ -1385,7 +2523,7 @@ // we assume that frame will not be show bool showFrame = false; // check if lenght text field has to be showed - if(tagProperty.canMaskStartEndPos()) { + if (tagProperty.canMaskStartEndPos()) { myLengthLabel->show(); myLengthTextField->show(); myReferencePointMatchBox->show(); @@ -1423,7 +2561,7 @@ myCloseShapeCheckButton->hide(); } // if at least one element is show, show modul - if(showFrame) { + if (showFrame) { show(); } else { hide(); @@ -1437,12 +2575,12 @@ } -bool -GNEFrame::NeteditAttributes::getNeteditAttributesAndValues(std::map &valuesMap, GNELane *lane) const { +bool +GNEFrame::NeteditAttributes::getNeteditAttributesAndValues(std::map& valuesMap, GNELane* lane) const { // check if we need to obtain a start and end position over an edge - if(myReferencePointMatchBox->shown()) { + if (myReferencePointMatchBox->shown()) { // we need a valid lane to calculate position over lane - if(lane == nullptr) { + if (lane == nullptr) { return false; } else if (myCurrentLengthValid) { // Obtain position of the mouse over lane (limited over grid) @@ -1467,26 +2605,26 @@ } // Save block value if element can be blocked if (myBlockMovementCheckButton->shown()) { - if(myBlockMovementCheckButton->getCheck() == 1) { - valuesMap[GNE_ATTR_BLOCK_MOVEMENT] = "true"; + if (myBlockMovementCheckButton->getCheck() == 1) { + valuesMap[GNE_ATTR_BLOCK_MOVEMENT] = "1"; } else { - valuesMap[GNE_ATTR_BLOCK_MOVEMENT] = "false"; + valuesMap[GNE_ATTR_BLOCK_MOVEMENT] = "0"; } } // Save block shape value if shape's element can be blocked if (myBlockShapeCheckButton->shown()) { - if(myBlockShapeCheckButton->getCheck() == 1) { - valuesMap[GNE_ATTR_BLOCK_SHAPE] = "true"; + if (myBlockShapeCheckButton->getCheck() == 1) { + valuesMap[GNE_ATTR_BLOCK_SHAPE] = "1"; } else { - valuesMap[GNE_ATTR_BLOCK_SHAPE] = "false"; + valuesMap[GNE_ATTR_BLOCK_SHAPE] = "0"; } } // Save close shape value if shape's element can be closed if (myCloseShapeCheckButton->shown()) { - if(myCloseShapeCheckButton->getCheck() == 1) { - valuesMap[GNE_ATTR_CLOSE_SHAPE] = "true"; + if (myCloseShapeCheckButton->getCheck() == 1) { + valuesMap[GNE_ATTR_CLOSE_SHAPE] = "1"; } else { - valuesMap[GNE_ATTR_CLOSE_SHAPE] = "false"; + valuesMap[GNE_ATTR_CLOSE_SHAPE] = "0"; } } // all ok, then return true to continue creating element @@ -1602,7 +2740,7 @@ << "\n" << "- Close shape: If enabled, the created polygon element will be closed. i.e. the last created geometry point\n" << " will be connected with the first geometry point automatically. This option can be modified inspecting element."; - + ****************/ } @@ -1623,7 +2761,7 @@ double -GNEFrame::NeteditAttributes::setEndPosition(double positionOfTheMouseOverLane, double lengthOfAdditional) const{ +GNEFrame::NeteditAttributes::setEndPosition(double positionOfTheMouseOverLane, double lengthOfAdditional) const { switch (myActualAdditionalReferencePoint) { case GNE_ADDITIONALREFERENCEPOINT_LEFT: return positionOfTheMouseOverLane + lengthOfAdditional; @@ -1646,8 +2784,18 @@ myEdgeCandidateColor(RGBColor(0, 64, 0, 255)), myEdgeCandidateSelectedColor(RGBColor::GREEN) { - // Create font - myFrameHeaderFont = new FXFont(getApp(), "Arial", 14, FXFont::Bold), + // fill myPredefinedTagsMML (to avoid repeating this fill during every element creation) + int i = 0; + while (SUMOXMLDefinitions::attrs[i].key != SUMO_ATTR_NOTHING) { + myPredefinedTagsMML[SUMOXMLDefinitions::attrs[i].key] = toString(SUMOXMLDefinitions::attrs[i].str); + myPredefinedTagsMML[SUMOXMLDefinitions::attrs[i].key] = SUMOXMLDefinitions::attrs[i].str; + i++; + } + + // Create font only one time + if (myFrameHeaderFont == nullptr) { + myFrameHeaderFont = new FXFont(getApp(), "Arial", 14, FXFont::Bold); + } // Create frame for header myHeaderFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); @@ -1681,7 +2829,11 @@ GNEFrame::~GNEFrame() { - delete myFrameHeaderFont; + // delete frame header only one time + if (myFrameHeaderFont) { + delete myFrameHeaderFont; + myFrameHeaderFont = nullptr; + } } @@ -1734,27 +2886,47 @@ } -bool +void +GNEFrame::updateFrameAfterUndoRedo() { + // this function has to be reimplemente in all child frames that needs to draw a polygon (for example, GNEFrame or GNETAZFrame) +} + +// --------------------------------------------------------------------------- +// GNEFrame - protected methods +// --------------------------------------------------------------------------- + +bool GNEFrame::buildShape() { // this function has to be reimplemente in all child frames that needs to draw a polygon (for example, GNEFrame or GNETAZFrame) return false; } -void +void GNEFrame::enableModuls(const GNEAttributeCarrier::TagProperties&) { // this function has to be reimplemente in all child frames that uses a ItemSelector modul } -void +void GNEFrame::disableModuls() { // this function has to be reimplemente in all child frames that uses a ItemSelector modul } void -GNEFrame::openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const { +GNEFrame::updateFrameAfterChangeAttribute() { + // this function has to be reimplemente in all child frames that uses a ItemSelector modul +} + +void +GNEFrame::openAttributesEditorExtendedDialog() { + // this function has to be reimplemente in all child frames that uses a AttributesCreator editor with extended attributes +} + + +void +GNEFrame::openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties& tagProperties) const { FXDialogBox* attributesHelpDialog = new FXDialogBox(myScrollWindowsContents, ("Parameters of " + tagProperties.getTagStr()).c_str(), GUIDesignDialogBoxResizable, 0, 0, 0, 0, 10, 10, 10, 38, 4, 4); // Create FXTable FXTable* myTable = new FXTable(attributesHelpDialog, attributesHelpDialog, MID_TABLE, GUIDesignTableNotEditable); @@ -1826,9 +2998,15 @@ } -const RGBColor& +const RGBColor& GNEFrame::getEdgeCandidateSelectedColor() const { return myEdgeCandidateSelectedColor; } + +const std::map& +GNEFrame::getPredefinedTagsMML() const { + return myPredefinedTagsMML; +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEFrame.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ #include #include #include -#include +#include // =========================================================================== // class definitions @@ -49,13 +49,19 @@ public: /// @brief constructor - ItemSelector(GNEFrame* frameParent, GNEAttributeCarrier::TAGProperty type, bool onlyDrawables = true); + ItemSelector(GNEFrame* frameParent, GNEAttributeCarrier::TagType type, bool onlyDrawables = true); /// @brief destructor ~ItemSelector(); + /// @brief show item selector + void showItemSelector(bool enableModuls); + + /// @brief hide item selector + void hideItemSelector(); + /// @brief get current type tag - const GNEAttributeCarrier::TagProperties &getCurrentTagProperties() const; + const GNEAttributeCarrier::TagProperties& getCurrentTagProperties() const; /// @brief set current type manually void setCurrentTypeTag(SumoXMLTag typeTag); @@ -87,148 +93,333 @@ std::vector myListOfTags; /// @brief dummy tag properties used if user select an invalid tag - GNEAttributeCarrier::TagProperties myInvalidTagProperty; + GNEAttributeCarrier::TagProperties myInvalidTagProperty; }; - /// @brief class declaration - class ACAttributes; - // =========================================================================== - // class ACAttributeRow + // class AttributesCreator // =========================================================================== - class ACAttributeRow : public FXHorizontalFrame { + class AttributesCreator : protected FXGroupBox { /// @brief FOX-declaration - FXDECLARE(GNEFrame::ACAttributeRow) - + FXDECLARE(GNEFrame::AttributesCreator) + + // declare friend class + friend class Row; + public: /// @brief constructor - ACAttributeRow(ACAttributes* ACAttributesParent); + AttributesCreator(GNEFrame* frameParent); /// @brief destructor - ~ACAttributeRow(); + ~AttributesCreator(); - /// @brief show name and value of attribute of type string - void showParameter(SumoXMLAttr const attr, const GNEAttributeCarrier::AttributeProperties &attrProperties, const std::string &value); + /// @brief show AttributesCreator modul + void showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties& myTagProperties); - /// @brief hide all parameters - void hideParameter(); - - /// @brief return Attr - SumoXMLAttr getAttr() const; + /// @brief hide group box + void hideAttributesCreatorModul(); - /// @brief return value - std::string getValue() const; + /// @brief get attributes and their values + std::map getAttributesAndValues(bool includeAll) const; - /// @brief returns a empty string if current value is valid, a string with information about invalid value in other case - const std::string& isAttributeValid() const; + /// @brief check if parameters of attributes are valid + bool areValuesValid() const; - /// @brief get ACAttributes parent - ACAttributes* getACAttributesParent() const; + /// @brief show warning message with information about non-valid attributes + void showWarningMessage(std::string extra = "") const; /// @name FOX-callbacks /// @{ - /// @brief called when user set the value of an attribute of type int/float/string - long onCmdSetAttribute(FXObject*, FXSelector, void*); + /// @brief Called when help button is pressed + long onCmdHelp(FXObject*, FXSelector, void*); + /// @} - /// @brief called when user change the value of myBoolCheckButton - long onCmdSetBooleanAttribute(FXObject*, FXSelector, void*); + // =========================================================================== + // class RowCreator + // =========================================================================== - /// @brief called when user press the "Color" button - long onCmdSetColorAttribute(FXObject*, FXSelector, void*); - /// @} + class RowCreator : public FXHorizontalFrame { + /// @brief FOX-declaration + FXDECLARE(GNEFrame::AttributesCreator::RowCreator) + + public: + /// @brief constructor + RowCreator(AttributesCreator* AttributesCreatorParent); + + /// @brief show name and value of attribute of type string + void showParameter(const GNEAttributeCarrier::AttributeProperties& attrProperties); + + /// @brief hide all parameters + void hideParameter(); + + /// @brief return Attr + const GNEAttributeCarrier::AttributeProperties& getAttrProperties() const; + + /// @brief return value + std::string getValue() const; + + /// @brief return status of radio button + bool getRadioButtonCheck() const; + + /// @brief enable or disable radio button for disjoint attributes + void setRadioButtonCheck(bool value); + + /// @brief enable row + void enableRow(); + + /// @brief disable row + void disableRow(); + + /// @brief check if row is enabled + bool isRowEnabled() const; + + /// @brief returns a empty string if current value is valid, a string with information about invalid value in other case + const std::string& isAttributeValid() const; + + /// @brief get AttributesCreator parent + AttributesCreator* getAttributesCreatorParent() const; + + /// @name FOX-callbacks + /// @{ + /// @brief called when user set the value of an attribute of type int/float/string + long onCmdSetAttribute(FXObject*, FXSelector, void*); + + /// @brief called when user change the value of myBoolCheckButton + long onCmdSetBooleanAttribute(FXObject*, FXSelector, void*); + + /// @brief called when user press the "Color" button + long onCmdSetColorAttribute(FXObject*, FXSelector, void*); + + /// @brief called when user press a radio button + long onCmdSelectRadioButton(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + RowCreator() {} + + private: + /// @brief pointer to AttributesCreator + AttributesCreator* myAttributesCreatorParent; + + /// @brief attribute properties + GNEAttributeCarrier::AttributeProperties myAttrProperties; + + /// @brief lael with the name of the parameter + FXLabel* myLabel; + + /// @brief textField to modify the default value of int/float/string parameters + FXTextField* myTextFieldInt; + + /// @brief textField to modify the default value of real/times parameters + FXTextField* myTextFieldReal; + + /// @brief textField to modify the default value of string parameters + FXTextField* myTextFieldStrings; + + /// @brief check button to enable/disable the value of boolean parameters + FXCheckButton* myBoolCheckButton; + + /// @brief Button for open color editor + FXButton* myColorEditor; + + /// @brief Radio button for disjoint attributes + FXRadioButton* myRadioButton; + + /// @brief string which indicates the reason due current value is invalid + std::string myInvalidValue; + }; + + /// @brief update disjoint attributes + void updateDisjointAttributes(RowCreator* row); protected: /// @brief FOX needs this - ACAttributeRow() {} + AttributesCreator() {}; private: - /// @brief pointer to ACAttributes - ACAttributes* myACAttributesParent; + /// @brief pointer to Polygon Frame Parent + GNEFrame* myFrameParent; + + /// @brief current edited Tag Properties + GNEAttributeCarrier::TagProperties myTagProperties; + + /// @brief vector with the ACAttribute Rows + std::vector myRows; + }; + + // =========================================================================== + // class AttributesEditor + // =========================================================================== + + class AttributesEditor : private FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNEFrame::AttributesEditor) + + public: + + // =========================================================================== + // class RowEditor + // =========================================================================== + + class RowEditor : private FXHorizontalFrame { + /// @brief FOX-declaration + FXDECLARE(GNEFrame::AttributesEditor::RowEditor) - /// @brief attribute properties - GNEAttributeCarrier::AttributeProperties myAttrProperties; + public: + /// @brief constructor + RowEditor(GNEFrame::AttributesEditor* attributeEditorParent); - /// @brief current XML attribute - SumoXMLAttr myXMLAttr; + /// @brief show row attribute + void showRow(const GNEAttributeCarrier::AttributeProperties& ACAttr, const std::string& value, bool disjointAttributeEnabled); - /// @brief lael with the name of the parameter - FXLabel* myLabel; + /// @brief show row attribute + void hideRow(); - /// @brief textField to modify the default value of int/float/string parameters - FXTextField* myTextFieldInt; + /// @brief refresh current row + void refreshRow(const std::string& value, bool forceRefresh, bool disjointAttributeEnabled); - /// @brief textField to modify the default value of real/times parameters - FXTextField* myTextFieldReal; + /// @brief check if current attribute of TextField/ComboBox is valid + bool isRowValid() const; - /// @brief textField to modify the default value of string parameters - FXTextField* myTextFieldStrings; + /// @name FOX-callbacks + /// @{ - /// @brief check button to enable/disable the value of boolean parameters - FXCheckButton* myBoolCheckButton; + /// @brief try to set new attribute value + long onCmdSetAttribute(FXObject*, FXSelector, void*); - /// @brief Button for open color editor - FXButton* myColorEditor; + /// @brief set new disjoint attribute + long onCmdSetDisjointAttribute(FXObject*, FXSelector, void*); - /// @brief string which indicates the reason due current value is invalid - std::string myInvalidValue; + /// @brief open model dialog for more comfortable attribute editing + long onCmdOpenAttributeDialog(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + RowEditor() {} + + /// @brief removed invalid spaces of Positions and shapes + std::string stripWhitespaceAfterComma(const std::string& stringValue); + + private: + /// @brief pointer to AttributesEditor parent + GNEFrame::AttributesEditor* myAttributesEditorParent; + + /// @brief current AC Attribute + GNEAttributeCarrier::AttributeProperties myACAttr; + + /// @brief flag to check if input element contains multiple values + bool myMultiple; + + /// @brief pointer to attribute label + FXLabel* myLabel; + + /// @brief Radio button for disjoint attributes + FXRadioButton* myRadioButton; + + /// @brief pointer to buttonCombinableChoices + FXButton* myButtonCombinableChoices; + + /// @brief Button for open color editor + FXButton* myColorEditor; + + /// @brief textField to modify the value of int attributes + FXTextField* myTextFieldInt; + + /// @brief textField to modify the value of real/Time attributes + FXTextField* myTextFieldReal; + + /// @brief textField to modify the value of string attributes + FXTextField* myTextFieldStrings; + + /// @brief pointer to combo box choices + FXComboBox* myChoicesCombo; + + /// @brief pointer to menu check + FXCheckButton* myBoolCheckButton; + }; + + /// @brief constructor + AttributesEditor(GNEFrame* inspectorFrameParent); + + /// @brief show attributes of multiple ACs + void showAttributeEditorModul(const std::vector& ACs, bool includeExtended); + + /// @brief hide attribute editor + void hideAttributesEditorModul(); + + /// @brief refresh attribute editor (only the valid values will be refresh) + void refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition); + + /// @brief get current edited ACs + const std::vector& getEditedACs() const; + + /// @brief remove edited ACs + void removeEditedAC(GNEAttributeCarrier* AC); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when user press the help button + long onCmdAttributesEditorHelp(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + AttributesEditor() {} + + private: + /// @brief pointer to GNEFrame parent + GNEFrame* myFrameParent; + + /// @brief list of Attribute inputs rows + std::vector myVectorOfRows; + + /// @brief button for help + FXButton* myHelpButton; + + /// @brief the multi-selection currently being inspected + std::vector myEditedACs; + + /// @brief flag used to mark if current edited ACs are bein edited including extended attribute + bool myIncludeExtended; }; // =========================================================================== - // class ACAttributes + // class AttributesEditorExtended // =========================================================================== - class ACAttributes : protected FXGroupBox { + class AttributesEditorExtended : protected FXGroupBox { /// @brief FOX-declaration - FXDECLARE(GNEFrame::ACAttributes) - - // declare friend class - friend class ACAttributeRow; + FXDECLARE(GNEFrame::AttributesEditorExtended) public: /// @brief constructor - ACAttributes(GNEFrame* frameParent); + AttributesEditorExtended(GNEFrame* frameParent); /// @brief destructor - ~ACAttributes(); + ~AttributesEditorExtended(); - /// @brief show ACAttributes modul - void showACAttributesModul(const GNEAttributeCarrier::TagProperties &myTagProperties); + /// @brief show AttributesEditorExtended modul + void showAttributesEditorExtendedModul(); /// @brief hide group box - void hideACAttributesModul(); - - /// @brief get attributes and their values - std::map getAttributesAndValues() const; - - /// @brief check if parameters of attributes are valid - bool areValuesValid() const; - - /// @brief show warning message with information about non-valid attributes - void showWarningMessage(std::string extra = "") const; - - /// @brief get number of added attributes - int getNumberOfAddedAttributes() const; + void hideAttributesEditorExtendedModul(); /// @name FOX-callbacks /// @{ - /// @brief Called when help button is pressed - long onCmdHelp(FXObject*, FXSelector, void*); + /// @brief Called when open dialog button is clicked + long onCmdOpenDialog(FXObject*, FXSelector, void*); /// @} protected: /// @brief FOX needs this - ACAttributes() {}; + AttributesEditorExtended() {}; private: /// @brief pointer to Polygon Frame Parent GNEFrame* myFrameParent; - - /// @brief current edited Tag Properties - GNEAttributeCarrier::TagProperties myTagProperties; - - /// @brief vector with the ACAttribute Rows - std::vector myACAttributeRows; }; // =========================================================================== @@ -284,8 +475,10 @@ void showAttributeCarrierChilds(GNEAttributeCarrier* AC, FXTreeItem* itemParent); /// @brief add item into list - FXTreeItem* addACIntoList(GNEAttributeCarrier* AC, FXTreeItem* itemParent); + FXTreeItem* addListItem(GNEAttributeCarrier* AC, FXTreeItem* itemParent = nullptr, std::string prefix = "", std::string sufix = ""); + /// @brief add item into list + FXTreeItem* addListItem(FXTreeItem* itemParent, const std::string& text, FXIcon* icon, bool expanded); private: /// @brief Frame Parent GNEFrame* myFrameParent; @@ -478,7 +671,7 @@ void hideNeteditAttributesModul(); /// @brief fill valuesMap with netedit attributes - bool getNeteditAttributesAndValues(std::map &valuesMap, GNELane *lane) const; + bool getNeteditAttributesAndValues(std::map& valuesMap, GNELane* lane) const; /// @name FOX-callbacks /// @{ @@ -537,7 +730,7 @@ /// @brief checkbox to enable/disable closing polygon FXCheckButton* myCloseShapeCheckButton; - + /// @brief Button for help about the reference point FXButton* helpReferencePoint; @@ -583,6 +776,9 @@ /// @brief get font of the header's frame FXFont* getFrameHeaderFont() const; + /// @brief function called after undo/redo in the current frame (can be reimplemented in frame childs) + virtual void updateFrameAfterUndoRedo(); + protected: /// @brief FOX needs this GNEFrame() {} @@ -593,14 +789,20 @@ */ virtual bool buildShape(); - /// @brief enable moduls depending of item selected in ItemSelector (can be reimplemented in frame childs) - virtual void enableModuls(const GNEAttributeCarrier::TagProperties &tagProperties); + /// @brief enable moduls depending of item selected in ItemSelector (can be reimplemented in frame childs) + virtual void enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties); /// @brief disable moduls if element selected in itemSelector isn't valid (can be reimplemented in frame childs) virtual void disableModuls(); + /// @brief function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEditor/... + virtual void updateFrameAfterChangeAttribute(); + + /// @brief open AttributesCreator extended dialog (can be reimplemented in frame childs) + virtual void openAttributesEditorExtendedDialog(); + /// @brief Open help attributes dialog - void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const; + void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties& tagProperties) const; /// @brief get edge candidate color const RGBColor& getEdgeCandidateColor() const; @@ -608,6 +810,9 @@ /// @brief get selected color const RGBColor& getEdgeCandidateSelectedColor() const; + /// @brief get predefinedTagsMML + const std::map& getPredefinedTagsMML() const; + /// @brief View Net for changes GNEViewNet* myViewNet; @@ -627,18 +832,21 @@ /// @brief scroll windows that holds the content frame FXScrollWindow* myScrollWindowsContents; - /// @brief Font for the Header - FXFont* myFrameHeaderFont; + /// @brief static Font for the Header (it's common for all headers, then create only one time) + static FXFont* myFrameHeaderFont; /// @brief the label for the frame's header FXLabel* myFrameHeaderLabel; - + /// @brief edge candidate color (used by some modulds to mark edges) RGBColor myEdgeCandidateColor; /// @brief selected edge candidate color (used by some modulds to selected mark edges) RGBColor myEdgeCandidateSelectedColor; + /// @brief Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached) + std::map myPredefinedTagsMML; + /// @brief Invalidated copy constructor. GNEFrame(const GNEFrame&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEInspectorFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEInspectorFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEInspectorFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEInspectorFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,12 +27,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -45,50 +45,40 @@ // FOX callback mapping // =========================================================================== -FXDEFMAP(GNEInspectorFrame::OverlappedInspection) OverlappedInspectionMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_NEXT, GNEInspectorFrame::OverlappedInspection::onCmdNextElement), - FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_PREVIOUS, GNEInspectorFrame::OverlappedInspection::onCmdPreviousElement), - FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEInspectorFrame::OverlappedInspection::onCmdOverlappingHelp), -}; - FXDEFMAP(GNEInspectorFrame) GNEInspectorFrameMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_GOBACK, GNEInspectorFrame::onCmdGoBack), -}; - -FXDEFMAP(GNEInspectorFrame::AttributesEditor::AttributeInput) AttributeInputMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdSetAttribute), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE_DIALOG, GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdOpenAttributeDialog) + FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_GOBACK, GNEInspectorFrame::onCmdGoBack) }; -FXDEFMAP(GNEInspectorFrame::AttributesEditor) AttributesEditorMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEInspectorFrame::AttributesEditor::onCmdAttributeHelp), +FXDEFMAP(GNEInspectorFrame::OverlappedInspection) OverlappedInspectionMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_NEXT, GNEInspectorFrame::OverlappedInspection::onCmdNextElement), + FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_PREVIOUS, GNEInspectorFrame::OverlappedInspection::onCmdPreviousElement), + FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_SHOWLIST, GNEInspectorFrame::OverlappedInspection::onCmdShowList), + FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_ITEMSELECTED, GNEInspectorFrame::OverlappedInspection::onCmdListItemSelected), + FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEInspectorFrame::OverlappedInspection::onCmdOverlappingHelp) }; FXDEFMAP(GNEInspectorFrame::NeteditAttributesEditor) NeteditAttributesEditorMap[] = { FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEInspectorFrame::NeteditAttributesEditor::onCmdSetNeteditAttribute), - FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEInspectorFrame::NeteditAttributesEditor::onCmdNeteditAttributeHelp), + FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEInspectorFrame::NeteditAttributesEditor::onCmdNeteditAttributeHelp) }; FXDEFMAP(GNEInspectorFrame::GEOAttributesEditor) GEOAttributesEditorMap[] = { FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_ATTRIBUTE, GNEInspectorFrame::GEOAttributesEditor::onCmdSetGEOAttribute), - FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEInspectorFrame::GEOAttributesEditor::onCmdGEOAttributeHelp), + FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEInspectorFrame::GEOAttributesEditor::onCmdGEOAttributeHelp) }; FXDEFMAP(GNEInspectorFrame::TemplateEditor) TemplateEditorMap[] = { FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_COPYTEMPLATE, GNEInspectorFrame::TemplateEditor::onCmdCopyTemplate), FXMAPFUNC(SEL_COMMAND, MID_GNE_INSPECTORFRAME_SETTEMPLATE, GNEInspectorFrame::TemplateEditor::onCmdSetTemplate), - FXMAPFUNC(SEL_UPDATE, MID_GNE_INSPECTORFRAME_COPYTEMPLATE, GNEInspectorFrame::TemplateEditor::onUpdCopyTemplate), + FXMAPFUNC(SEL_UPDATE, MID_GNE_INSPECTORFRAME_COPYTEMPLATE, GNEInspectorFrame::TemplateEditor::onUpdCopyTemplate) }; - // Object implementation -FXIMPLEMENT(GNEInspectorFrame, FXVerticalFrame, GNEInspectorFrameMap, ARRAYNUMBER(GNEInspectorFrameMap)) -FXIMPLEMENT(GNEInspectorFrame::OverlappedInspection, FXGroupBox, OverlappedInspectionMap, ARRAYNUMBER(OverlappedInspectionMap)) -FXIMPLEMENT(GNEInspectorFrame::AttributesEditor::AttributeInput, FXHorizontalFrame, AttributeInputMap, ARRAYNUMBER(AttributeInputMap)) -FXIMPLEMENT(GNEInspectorFrame::AttributesEditor, FXGroupBox, AttributesEditorMap, ARRAYNUMBER(AttributesEditorMap)) -FXIMPLEMENT(GNEInspectorFrame::NeteditAttributesEditor, FXGroupBox, NeteditAttributesEditorMap, ARRAYNUMBER(NeteditAttributesEditorMap)) -FXIMPLEMENT(GNEInspectorFrame::GEOAttributesEditor, FXGroupBox, GEOAttributesEditorMap, ARRAYNUMBER(GEOAttributesEditorMap)) -FXIMPLEMENT(GNEInspectorFrame::TemplateEditor, FXGroupBox, TemplateEditorMap, ARRAYNUMBER(TemplateEditorMap)) +FXIMPLEMENT(GNEInspectorFrame, FXVerticalFrame, GNEInspectorFrameMap, ARRAYNUMBER(GNEInspectorFrameMap)) +FXIMPLEMENT(GNEInspectorFrame::OverlappedInspection, FXGroupBox, OverlappedInspectionMap, ARRAYNUMBER(OverlappedInspectionMap)) +FXIMPLEMENT(GNEInspectorFrame::NeteditAttributesEditor, FXGroupBox, NeteditAttributesEditorMap, ARRAYNUMBER(NeteditAttributesEditorMap)) +FXIMPLEMENT(GNEInspectorFrame::GEOAttributesEditor, FXGroupBox, GEOAttributesEditorMap, ARRAYNUMBER(GEOAttributesEditorMap)) +FXIMPLEMENT(GNEInspectorFrame::TemplateEditor, FXGroupBox, TemplateEditorMap, ARRAYNUMBER(TemplateEditorMap)) // =========================================================================== @@ -105,7 +95,7 @@ myHeaderLeftFrame->hide(); myBackButton->hide(); - // Create Overlapped Inspection modul + // Create Overlapped Inspection modul myOverlappedInspection = new OverlappedInspection(this); // Create Attributes Editor modul @@ -141,17 +131,17 @@ void GNEInspectorFrame::hide() { - myInspectedACs.clear(); myViewNet->setDottedAC(nullptr); GNEFrame::hide(); } -bool -GNEInspectorFrame::processClick(const Position& clickedPosition, GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) { +bool +GNEInspectorFrame::processNetworkSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { + // first check if we have clicked over an Attribute Carrier if (objectsUnderCursor.getAttributeCarrierFront()) { // change the selected attribute carrier if mySelectEdges is enabled and clicked element is a getLaneFront() and shift key isn't pressed - if (!myViewNet->getKeyPressed().shiftKeyPressed() && myViewNet->selectEdges() && (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_LANE)) { + if (!myViewNet->getKeyPressed().shiftKeyPressed() && myViewNet->getViewOptions().selectEdges() && (objectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_LANE)) { objectsUnderCursor.swapLane2Edge(); } // if Control key is Pressed, select instead inspect element @@ -168,11 +158,47 @@ } else { // first check if we clicked over a OverlappedInspection point if (myViewNet->getKeyPressed().shiftKeyPressed()) { - if(!myOverlappedInspection->previousElement(clickedPosition)) { + if (!myOverlappedInspection->previousElement(clickedPosition)) { + // inspect attribute carrier, (or multiselection if AC is selected) + inspectClickedElement(objectsUnderCursor, clickedPosition); + } + } else if (!myOverlappedInspection->nextElement(clickedPosition)) { + // inspect attribute carrier, (or multiselection if AC is selected) + inspectClickedElement(objectsUnderCursor, clickedPosition); + } + // focus upper element of inspector frame + focusUpperElement(); + } + return true; + } else { + return false; + } +} + + +bool +GNEInspectorFrame::processDemandSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { + // first check if we have clicked over a demand element + if (objectsUnderCursor.getDemandElementFront()) { + // if Control key is Pressed, select instead inspect element + if (myViewNet->getKeyPressed().controlKeyPressed()) { + // Check if this GLobject type is locked + if (!myViewNet->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->IsObjectTypeLocked(objectsUnderCursor.getGlTypeFront())) { + // toogle netElement selection + if (objectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { + objectsUnderCursor.getAttributeCarrierFront()->unselectAttributeCarrier(); + } else { + objectsUnderCursor.getAttributeCarrierFront()->selectAttributeCarrier(); + } + } + } else { + // first check if we clicked over a OverlappedInspection point + if (myViewNet->getKeyPressed().shiftKeyPressed()) { + if (!myOverlappedInspection->previousElement(clickedPosition)) { // inspect attribute carrier, (or multiselection if AC is selected) inspectClickedElement(objectsUnderCursor, clickedPosition); } - } else if(!myOverlappedInspection->nextElement(clickedPosition)) { + } else if (!myOverlappedInspection->nextElement(clickedPosition)) { // inspect attribute carrier, (or multiselection if AC is selected) inspectClickedElement(objectsUnderCursor, clickedPosition); } @@ -193,8 +219,11 @@ if (AC != nullptr) { myViewNet->setDottedAC(AC); if (AC->isAttributeCarrierSelected()) { - std::vector selectedACs = myViewNet->getNet()->getSelectedAttributeCarriers(); - for (const auto &i : selectedACs) { + // obtain selected ACs depending of current supermode + std::vector selectedACs = myViewNet->getNet()->getSelectedAttributeCarriers(false); + // iterate over selected ACs + for (const auto& i : selectedACs) { + // filter ACs to inspect using Tag as criterium if (i->getTagProperty().getTag() == AC->getTagProperty().getTag()) { itemsToInspect.push_back(i); } @@ -212,8 +241,6 @@ // hide back button myHeaderLeftFrame->hide(); myBackButton->hide(); - // Assing ACs to myACs - myInspectedACs = ACs; // Hide all elements myAttributesEditor->hideAttributesEditorModul(); myNeteditAttributesEditor->hideNeteditAttributesEditor(); @@ -223,28 +250,28 @@ myACHierarchy->hideACHierarchy(); myOverlappedInspection->hideOverlappedInspection(); // If vector of attribute Carriers contain data - if (myInspectedACs.size() > 0) { + if (ACs.size() > 0) { // Set header std::string headerString; - if (dynamic_cast(myInspectedACs.front())) { + if (ACs.front()->getTagProperty().isNetElement()) { headerString = "Net: "; - } else if (dynamic_cast(myInspectedACs.front())) { + } else if (ACs.front()->getTagProperty().isAdditional()) { headerString = "Additional: "; - } else if (dynamic_cast(myInspectedACs.front())) { + } else if (ACs.front()->getTagProperty().isShape()) { headerString = "Shape: "; } - if (myInspectedACs.size() > 1) { - headerString += toString(myInspectedACs.size()) + " "; + if (ACs.size() > 1) { + headerString += toString(ACs.size()) + " "; } - headerString += myInspectedACs.front()->getTagStr(); - if (myInspectedACs.size() > 1) { + headerString += ACs.front()->getTagStr(); + if (ACs.size() > 1) { headerString += "s"; } // Set headerString into header label getFrameHeaderLabel()->setText(headerString.c_str()); // Show attributes editor - myAttributesEditor->showAttributeEditorModul(); + myAttributesEditor->showAttributeEditorModul(ACs, true); // show netedit attributes editor if we're inspecting elements with Netedit Attributes myNeteditAttributesEditor->showNeteditAttributesEditor(); @@ -253,18 +280,18 @@ myGEOAttributesEditor->showGEOAttributesEditor(); // show generic attributes editor - if (myInspectedACs.size() == 1) { - myGenericParametersEditor->showGenericParametersEditor(myInspectedACs.front()); + if (ACs.size() == 1) { + myGenericParametersEditor->showGenericParametersEditor(ACs.front()); } else { - myGenericParametersEditor->showGenericParametersEditor(myInspectedACs); + myGenericParametersEditor->showGenericParametersEditor(ACs); } - // If attributes correspond to an Edge, show template editor + // If attributes correspond to an Edge and we aren't in demand mode, show template editor myTemplateEditor->showTemplateEditor(); // if we inspect a single Attribute carrier vector, show their childs - if (myInspectedACs.size() == 1) { - myACHierarchy->showACHierarchy(myInspectedACs.front()); + if (ACs.size() == 1) { + myACHierarchy->showACHierarchy(ACs.front()); } } else { getFrameHeaderLabel()->setText("Inspect"); @@ -301,41 +328,21 @@ } } -void -GNEInspectorFrame::removeInspectedAC(GNEAttributeCarrier* ac) { - // Only remove if there is inspected ACs - if (myInspectedACs.size() > 0) { - // Try to find AC in myACs - auto i = std::find(myInspectedACs.begin(), myInspectedACs.end(), ac); - // if was found - if (i != myInspectedACs.end()) { - // erase AC from inspected ACs - myInspectedACs.erase(i); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Removed inspected element from Inspected ACs. " + toString(myInspectedACs.size()) + " ACs remains."); - // Inspect multi selection again - inspectMultisection(myInspectedACs); - } - } -} - void GNEInspectorFrame::clearInspectedAC() { // Only remove if there is inspected ACs - if (myInspectedACs.size() > 0) { - // clear ACs - myInspectedACs.clear(); + if (myAttributesEditor->getEditedACs().size() > 0) { myViewNet->setDottedAC(nullptr); - // Inspect multi selection again (to hide all Editors) - inspectMultisection(myInspectedACs); + // Inspect empty selection (to hide all Editors) + inspectMultisection({}); } } -GNEFrame::ACHierarchy* -GNEInspectorFrame::getACHierarchy() const { - return myACHierarchy; +GNEFrame::AttributesEditor* +GNEInspectorFrame::getAttributesEditor() const { + return myAttributesEditor; } @@ -345,7 +352,7 @@ } -GNEInspectorFrame::OverlappedInspection* +GNEInspectorFrame::OverlappedInspection* GNEInspectorFrame::getOverlappedInspection() const { return myOverlappedInspection; } @@ -367,9 +374,37 @@ } -const std::vector& -GNEInspectorFrame::getInspectedACs() const { - return myInspectedACs; +void +GNEInspectorFrame::updateFrameAfterUndoRedo() { + // refresh Attribute Editor + myAttributesEditor->refreshAttributeEditor(false, false); + // refresh GenericParameters + myGenericParametersEditor->refreshGenericParametersEditor(); + // refresh AC Hierarchy + myACHierarchy->refreshACHierarchy(); +} + + +void +GNEInspectorFrame::inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, const Position& clickedPosition) { + if (objectsUnderCursor.getAttributeCarrierFront()) { + // inspect front element + inspectSingleElement(objectsUnderCursor.getAttributeCarrierFront()); + // if element has overlapped elements, show Overlapped Inspection modul + if (objectsUnderCursor.getClickedAttributeCarriers().size() > 1) { + myOverlappedInspection->showOverlappedInspection(objectsUnderCursor, clickedPosition); + } else { + myOverlappedInspection->hideOverlappedInspection(); + } + } +} + + +void +GNEInspectorFrame::updateFrameAfterChangeAttribute() { + myAttributesEditor->refreshAttributeEditor(false, false); + myNeteditAttributesEditor->refreshNeteditAttributesEditor(true); + myGEOAttributesEditor->refreshGEOAttributesEditor(true); } // --------------------------------------------------------------------------- @@ -380,12 +415,19 @@ FXGroupBox(inspectorFrameParent->myContentFrame, "Overlapped elements", GUIDesignGroupBoxFrame), myInspectorFrameParent(inspectorFrameParent), myItemIndex(0) { - FXHorizontalFrame *frameButtons = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); + FXHorizontalFrame* frameButtons = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); // Create previous Item Button myPreviousElement = new FXButton(frameButtons, "", GUIIconSubSys::getIcon(ICON_NETEDITARROWLEFT), this, MID_GNE_INSPECTORFRAME_PREVIOUS, GUIDesignButtonIconRectangular); - myCurrentIndexLabel = new FXLabel(frameButtons, "", nullptr, GUIDesignLabelCenterThick); + // create current index button + myCurrentIndexButton = new FXButton(frameButtons, "", nullptr, this, MID_GNE_INSPECTORFRAME_SHOWLIST, GUIDesignButton); // Create next Item Button myNextElement = new FXButton(frameButtons, "", GUIIconSubSys::getIcon(ICON_NETEDITARROWRIGHT), this, MID_GNE_INSPECTORFRAME_NEXT, GUIDesignButtonIconRectangular); + // Create list of overlapped elements (by default hidden) + myOverlappedElementList = new FXList(this, this, MID_GNE_INSPECTORFRAME_ITEMSELECTED, GUIDesignListSingleElement); + // disable vertical scrolling + myOverlappedElementList->setScrollStyle(VSCROLLING_OFF); + // by default list of overlapped elements is hidden) + myOverlappedElementList->hide(); // Create help button myHelpButton = new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular); } @@ -395,11 +437,22 @@ void -GNEInspectorFrame::OverlappedInspection::showOverlappedInspection(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition) { +GNEInspectorFrame::OverlappedInspection::showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, const Position& clickedPosition) { myOverlappedACs = objectsUnderCursor.getClickedAttributeCarriers(); mySavedClickedPosition = clickedPosition; + // by default we inspect first element myItemIndex = 0; - myCurrentIndexLabel->setText(("1 / " + toString(myOverlappedACs.size())).c_str()); + // update text of current index button + myCurrentIndexButton->setText(("1 / " + toString(myOverlappedACs.size())).c_str()); + // clear and fill list again + myOverlappedElementList->clearItems(); + for (int i = 0; i < (int)objectsUnderCursor.getClickedAttributeCarriers().size(); i++) { + myOverlappedElementList->insertItem(i, objectsUnderCursor.getClickedAttributeCarriers().at(i)->getID().c_str(), objectsUnderCursor.getClickedAttributeCarriers().at(i)->getIcon()); + } + // set first element as selected element + myOverlappedElementList->getItem(0)->setSelected(TRUE); + // by default list hidden + myOverlappedElementList->hide(); // show template editor show(); } @@ -419,18 +472,19 @@ bool -GNEInspectorFrame::OverlappedInspection::checkSavedPosition(const Position &clickedPosition) const { +GNEInspectorFrame::OverlappedInspection::checkSavedPosition(const Position& clickedPosition) const { return (mySavedClickedPosition.distanceSquaredTo2D(clickedPosition) < 0.25); } -bool -GNEInspectorFrame::OverlappedInspection::nextElement(const Position &clickedPosition) { + +bool +GNEInspectorFrame::OverlappedInspection::nextElement(const Position& clickedPosition) { // first check if OverlappedInspection is shown - if(shown()) { + if (shown()) { // check if given position is near saved position if (checkSavedPosition(clickedPosition)) { // inspect next element - onCmdNextElement(0,0,0); + onCmdNextElement(0, 0, 0); return true; } else { return false; @@ -441,14 +495,14 @@ } -bool -GNEInspectorFrame::OverlappedInspection::previousElement(const Position &clickedPosition) { +bool +GNEInspectorFrame::OverlappedInspection::previousElement(const Position& clickedPosition) { // first check if OverlappedInspection is shown - if(shown()) { + if (shown()) { // check if given position is near saved position if (checkSavedPosition(clickedPosition)) { // inspect previousElement - onCmdPreviousElement(0,0,0); + onCmdPreviousElement(0, 0, 0); return true; } else { return false; @@ -461,62 +515,74 @@ long GNEInspectorFrame::OverlappedInspection::onCmdPreviousElement(FXObject*, FXSelector, void*) { + // unselect current list element + myOverlappedElementList->getItem((int)myItemIndex)->setSelected(FALSE); // set index (it works as a ring) - if(myItemIndex > 0) { + if (myItemIndex > 0) { myItemIndex--; } else { myItemIndex = (myOverlappedACs.size() - 1); } - // change current inspected item - GNEAttributeCarrier *AC = myOverlappedACs.at(myItemIndex); - // if is an lane and selectEdges checkBox is enabled, inspect their edge - if (AC->getTagProperty().getTag() == SUMO_TAG_LANE && myInspectorFrameParent->getViewNet()->selectEdges()) { - myInspectorFrameParent->inspectSingleElement(&dynamic_cast(AC)->getParentEdge()); - } else { - myInspectorFrameParent->inspectSingleElement(AC); - } - // show OverlappedInspection again (because it's hidden in inspectSingleElement) - show(); - // update current label - myCurrentIndexLabel->setText((toString(myItemIndex+1) + " / " + toString(myOverlappedACs.size())).c_str()); - // update view (due dotted contour) - myInspectorFrameParent->getViewNet()->update(); + // selected current list element + myOverlappedElementList->getItem((int)myItemIndex)->setSelected(TRUE); + // inspect overlapped attribute carrier + inspectOverlappedAttributeCarrier(); return 1; } long GNEInspectorFrame::OverlappedInspection::onCmdNextElement(FXObject*, FXSelector, void*) { + // unselect current list element + myOverlappedElementList->getItem((int)myItemIndex)->setSelected(FALSE); // set index (it works as a ring) myItemIndex = (myItemIndex + 1) % myOverlappedACs.size(); - // change current inspected item - GNEAttributeCarrier *AC = myOverlappedACs.at(myItemIndex); - // if is an lane and selectEdges checkBox is enabled, inspect their edge - if (AC->getTagProperty().getTag() == SUMO_TAG_LANE && myInspectorFrameParent->getViewNet()->selectEdges()) { - myInspectorFrameParent->inspectSingleElement(&dynamic_cast(AC)->getParentEdge()); + // selected current list element + myOverlappedElementList->getItem((int)myItemIndex)->setSelected(TRUE); + // inspect overlapped attribute carrier + inspectOverlappedAttributeCarrier(); + return 1; +} + + +long +GNEInspectorFrame::OverlappedInspection::onCmdShowList(FXObject*, FXSelector, void*) { + // show or hidde element list + if (myOverlappedElementList->shown()) { + myOverlappedElementList->hide(); } else { - myInspectorFrameParent->inspectSingleElement(AC); + myOverlappedElementList->show(); } - // show OverlappedInspection again (because it's hidden in inspectSingleElement) - show(); - // update current label - myCurrentIndexLabel->setText((toString(myItemIndex+1) + " / " + toString(myOverlappedACs.size())).c_str()); - // update view (due dotted contour) - myInspectorFrameParent->getViewNet()->update(); + myOverlappedElementList->recalc(); + // recalc and update frame + recalc(); return 1; } +long +GNEInspectorFrame::OverlappedInspection::onCmdListItemSelected(FXObject*, FXSelector, void*) { + for (int i = 0; i < myOverlappedElementList->getNumItems(); i++) { + if (myOverlappedElementList->getItem(i)->isSelected()) { + myItemIndex = i; + // inspect overlapped attribute carrier + inspectOverlappedAttributeCarrier(); + return 1; + } + } + return 0; +} + long GNEInspectorFrame::OverlappedInspection::onCmdOverlappingHelp(FXObject*, FXSelector, void*) { FXDialogBox* helpDialog = new FXDialogBox(this, "GEO attributes Help", GUIDesignDialogBox); std::ostringstream help; help - << " - Click in the same position\n" - << " for inspect next element\n" - << " - Shift + Click in the same\n" - << " position for inspect\n" - << " previous element"; + << " - Click in the same position\n" + << " for inspect next element\n" + << " - Shift + Click in the same\n" + << " position for inspect\n" + << " previous element"; new FXLabel(helpDialog, help.str().c_str(), nullptr, GUIDesignLabelFrameInformation); // "OK" new FXButton(helpDialog, "OK\t\tclose", GUIIconSubSys::getIcon(ICON_ACCEPT), helpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); @@ -526,644 +592,22 @@ } -void -GNEInspectorFrame::inspectClickedElement(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition) { - if(objectsUnderCursor.getAttributeCarrierFront()) { - // inspect front element - inspectSingleElement(objectsUnderCursor.getAttributeCarrierFront()); - // if element has overlapped elements, show Overlapped Inspection modul - if(objectsUnderCursor.getClickedAttributeCarriers().size() > 1) { - myOverlappedInspection->showOverlappedInspection(objectsUnderCursor, clickedPosition); - } else { - myOverlappedInspection->hideOverlappedInspection(); - } - } -} - - -// --------------------------------------------------------------------------- -// GNEInspectorFrame::AttributesEditor::AttributeInput - methods -// --------------------------------------------------------------------------- - -GNEInspectorFrame::AttributesEditor::AttributeInput::AttributeInput(GNEInspectorFrame::AttributesEditor* attributeEditorParent) : - FXHorizontalFrame(attributeEditorParent, GUIDesignAuxiliarHorizontalFrame), - myAttributesEditorParent(attributeEditorParent), - myTag(SUMO_TAG_NOTHING), - myAttr(SUMO_ATTR_NOTHING), - myMultiple(false) { - // Create and hide label - myLabel = new FXLabel(this, "attributeLabel", nullptr, GUIDesignLabelAttribute); - myLabel->hide(); - // Create and hide ButtonCombinableChoices - myButtonCombinableChoices = new FXButton(this, "AttributeButton", nullptr, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonAttribute); - myButtonCombinableChoices->hide(); - // create and hidde color editor - myColorEditor = new FXButton(this, "ColorButton", nullptr, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonAttribute); - myColorEditor->hide(); - // Create and hide textField for int attributes - myTextFieldInt = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFieldInt); - myTextFieldInt->hide(); - // Create and hide textField for real/time attributes - myTextFieldReal = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFieldReal); - myTextFieldReal->hide(); - // Create and hide textField for string attributes - myTextFieldStrings = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField); - myTextFieldStrings->hide(); - // Create and hide ComboBox - myChoicesCombo = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBoxAttribute); - myChoicesCombo->hide(); - // Create and hide checkButton - myBoolCheckButton = new FXCheckButton(this, "", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); - myBoolCheckButton->hide(); -} - - void -GNEInspectorFrame::AttributesEditor::AttributeInput::showAttribute(SumoXMLTag ACTag, SumoXMLAttr ACAttr, const std::string& value) { - // Set actual Tag, Attribute and multiple - myTag = ACTag; - myAttr = ACAttr; - // set multiple - myMultiple = GNEAttributeCarrier::parse>(value).size() > 1; - // obtain attribute property (only for improve code legibility) - const auto& attrValue = GNEAttributeCarrier::getTagProperties(myTag).getAttributeProperties(myAttr); - // enable all input values - enableAttributeInputElements(); - if (attrValue.isColor()) { - myColorEditor->setTextColor(FXRGB(0, 0, 0)); - myColorEditor->setText(toString(ACAttr).c_str()); - myColorEditor->show(); - } else { - // Show attribute Label - myLabel->setText(toString(myAttr).c_str()); - myLabel->show(); - } - // Set field depending of the type of value - if (attrValue.isBool()) { - // first we need to check if all boolean values are equal - bool allBooleanValuesEqual = true; - // obtain boolean vector - auto booleanVector = GNEAttributeCarrier::parse >(value); - // iterate over pased booleans comparing all element with the first - for (const auto &i : booleanVector) { - if (i != booleanVector.front()) { - allBooleanValuesEqual = false; - } - } - // use checkbox or textfield depending if all booleans are equal - if(allBooleanValuesEqual) { - // set check button - if (booleanVector.front()) { - myBoolCheckButton->setCheck(true); - myBoolCheckButton->setText("true"); - } else { - myBoolCheckButton->setCheck(false); - myBoolCheckButton->setText("false"); - } - // show check button - myBoolCheckButton->show(); - // enable or disable depending if attribute is editable - if (attrValue.isNonEditable()) { - myBoolCheckButton->disable(); - } else { - myBoolCheckButton->enable(); - } - } else { - // show list of bools (0 1) - myTextFieldStrings->setText(value.c_str()); - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->show(); - // enable or disable depending if attribute is editable - if (attrValue.isNonEditable()) { - myTextFieldStrings->disable(); - } else { - myTextFieldStrings->enable(); - } - } - } else if (attrValue.isDiscrete()) { - // Check if are combinable choices - if ((attrValue.getDiscreteValues().size() > 0) && attrValue.isCombinable()) { - // hide label - myLabel->hide(); - // Show button combinable choices - myButtonCombinableChoices->setText(toString(myAttr).c_str()); - myButtonCombinableChoices->show(); - // Show string with the values - myTextFieldStrings->setText(value.c_str()); - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->show(); - } else if (!myMultiple) { - // fill comboBox - myChoicesCombo->clearItems(); - for (const auto &it : attrValue.getDiscreteValues()) { - myChoicesCombo->appendItem(it.c_str()); - } - // show combo box with values - myChoicesCombo->setNumVisible((int)attrValue.getDiscreteValues().size()); - myChoicesCombo->setCurrentItem(myChoicesCombo->findItem(value.c_str())); - myChoicesCombo->setTextColor(FXRGB(0, 0, 0)); - myChoicesCombo->show(); - // enable or disable depending if attribute is editable - if (attrValue.isNonEditable()) { - myChoicesCombo->disable(); - } else { - myChoicesCombo->enable(); - } - } else { - // represent combinable choices in multiple selections always with a textfield instead with a comboBox - myTextFieldStrings->setText(value.c_str()); - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->show(); - // enable or disable depending if attribute is editable - if (attrValue.isNonEditable()) { - myTextFieldStrings->disable(); - } else { - myTextFieldStrings->enable(); - } - } - } else if (attrValue.isFloat() || attrValue.isTime()) { - // show TextField for real/time values - myTextFieldReal->setText(value.c_str()); - myTextFieldReal->setTextColor(FXRGB(0, 0, 0)); - myTextFieldReal->show(); - // enable or disable depending if attribute is editable - if (attrValue.isNonEditable()) { - myTextFieldReal->disable(); - } else { - myTextFieldReal->enable(); - } - } else if (attrValue.isInt()) { - // Show textField for int attributes - myTextFieldInt->setText(value.c_str()); - myTextFieldInt->setTextColor(FXRGB(0, 0, 0)); - myTextFieldInt->show(); - // enable or disable depending if attribute is editable - if (attrValue.isNonEditable()) { - myTextFieldInt->disable(); - } else { - myTextFieldInt->enable(); - } - // we need an extra check for connection attribute "TLIndex", because it cannot be edited if junction's connection doesn' have a TLS - if((ACTag == SUMO_TAG_CONNECTION) && (ACAttr == SUMO_ATTR_TLLINKINDEX) && (value == "No TLS")) { - myTextFieldInt->disable(); - } +GNEInspectorFrame::OverlappedInspection::inspectOverlappedAttributeCarrier() { + // change current inspected item + GNEAttributeCarrier* AC = myOverlappedACs.at(myItemIndex); + // if is an lane and selectEdges checkBox is enabled, inspect their edge + if (AC->getTagProperty().getTag() == SUMO_TAG_LANE && myInspectorFrameParent->getViewNet()->getViewOptions().selectEdges()) { + myInspectorFrameParent->inspectSingleElement(&dynamic_cast(AC)->getParentEdge()); } else { - // In any other case (String, list, etc.), show value as String - myTextFieldStrings->setText(value.c_str()); - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->show(); - // enable or disable depending if attribute is editable - if (attrValue.isNonEditable()) { - myTextFieldStrings->disable(); - } else { - myTextFieldStrings->enable(); - } + myInspectorFrameParent->inspectSingleElement(AC); } - // Show AttributeInput + // show OverlappedInspection again (because it's hidden in inspectSingleElement) show(); - // recalc after show elements - recalc(); -} - - -void -GNEInspectorFrame::AttributesEditor::AttributeInput::hideAttribute() { - // Hide all elements - myLabel->hide(); - myTextFieldInt->hide(); - myTextFieldReal->hide(); - myTextFieldStrings->hide(); - myChoicesCombo->hide(); - myBoolCheckButton->hide(); - myButtonCombinableChoices->hide(); - myColorEditor->hide(); - // hide AttributeInput - hide(); - // recalc after hide all elements - recalc(); -} - - -void -GNEInspectorFrame::AttributesEditor::AttributeInput::refreshAttributeInput(const std::string& value, bool forceRefresh) { - if (myTextFieldInt->shown()) { - // set last valid value and restore color if onlyValid is disabled - if (myTextFieldInt->getTextColor() == FXRGB(0, 0, 0) || forceRefresh) { - myTextFieldInt->setText(value.c_str()); - myTextFieldInt->setTextColor(FXRGB(0, 0, 0)); - } - } else if (myTextFieldReal->shown()) { - // set last valid value and restore color if onlyValid is disabled - if (myTextFieldReal->getTextColor() == FXRGB(0, 0, 0) || forceRefresh) { - myTextFieldReal->setText(value.c_str()); - myTextFieldReal->setTextColor(FXRGB(0, 0, 0)); - } - } else if (myTextFieldStrings->shown()) { - // set last valid value and restore color if onlyValid is disabled - if (myTextFieldStrings->getTextColor() == FXRGB(0, 0, 0) || forceRefresh) { - myTextFieldStrings->setText(value.c_str()); - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - } - } else if (myChoicesCombo->shown()) { - // set last valid value and restore color if onlyValid is disabled - if (myChoicesCombo->getTextColor() == FXRGB(0, 0, 0) || forceRefresh) { - myChoicesCombo->setText(value.c_str()); - myChoicesCombo->setTextColor(FXRGB(0, 0, 0)); - } - } else if (myBoolCheckButton->shown()) { - myBoolCheckButton->setCheck(GNEAttributeCarrier::parse(value)); - } -} - - -bool -GNEInspectorFrame::AttributesEditor::AttributeInput::isCurrentAttributeValid() const { - return ((myTextFieldInt->getTextColor() == FXRGB(0, 0, 0)) && (myTextFieldReal->getTextColor() == FXRGB(0, 0, 0)) && - (myTextFieldStrings->getTextColor() == FXRGB(0, 0, 0)) && (myChoicesCombo->getTextColor() == FXRGB(0, 0, 0))); -} - - -long -GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdOpenAttributeDialog(FXObject* obj, FXSelector, void*) { - if (obj == myColorEditor) { - // create FXColorDialog - FXColorDialog colordialog(this, tr("Color Dialog")); - colordialog.setTarget(this); - // If previous attribute wasn't correct, set black as default color - if (GNEAttributeCarrier::canParse(myTextFieldStrings->getText().text())) { - colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myTextFieldStrings->getText().text()))); - } else { - colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().front()->getTagProperty().getDefaultValue(myAttr)))); - } - // execute dialog to get a new color - if (colordialog.execute()) { - std::string newValue = toString(MFXUtils::getRGBColor(colordialog.getRGBA())); - myTextFieldStrings->setText(newValue.c_str()); - if (myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().front()->isValid(myAttr, newValue)) { - // if its valid for the first AC than its valid for all (of the same type) - if (myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().size() > 1) { - myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()->p_begin("Change multiple attributes"); - } - // Set new value of attribute in all selected ACs - for (const auto &it_ac : myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs()) { - it_ac->setAttribute(myAttr, newValue, myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()); - } - // If previously value was incorrect, change font color to black - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->killFocus(); - } - } - return 0; - } else if (obj == myButtonCombinableChoices) { - // if its valid for the first AC than its valid for all (of the same type) - if (myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().size() > 1) { - myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()->p_begin("Change multiple attributes"); - } - // open GNEDialog_AllowDisallow - GNEDialog_AllowDisallow(myAttributesEditorParent->getInspectorFrameParent()->getViewNet(), myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().front()).execute(); - std::string allowed = myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().front()->getAttribute(SUMO_ATTR_ALLOW); - // Set new value of attribute in all selected ACs - for (const auto &it_ac : myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs()) { - it_ac->setAttribute(SUMO_ATTR_ALLOW, allowed, myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()); - } - // finish change multiple attributes - if (myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().size() > 1) { - myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()->p_end(); - } - return 1; - } else { - throw ProcessError("Invalid call to onCmdOpenAttributeDialog"); - } -} - - -long -GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdSetAttribute(FXObject*, FXSelector, void*) { - // Declare changed value - std::string newVal; - bool refreshGEOAndNeteditEditors = false; - // get Tag and attribute Values (only for improve efficiency) - const auto& tagValues = GNEAttributeCarrier::getTagProperties(myTag); - const auto& attrValues = tagValues.getAttributeProperties(myAttr); - // First, obtain the string value of the new attribute depending of their type - if (attrValues.isBool()) { - // first check if we're editing boolean as a list of string or as a checkbox - if(myBoolCheckButton->shown()) { - // Set true o false depending of the checkBox - if (myBoolCheckButton->getCheck()) { - myBoolCheckButton->setText("true"); - newVal = "true"; - } else { - myBoolCheckButton->setText("false"); - newVal = "false"; - } - } else { - // obtain boolean value of myTextFieldStrings (because we're inspecting multiple attribute carriers with different values) - newVal = myTextFieldStrings->getText().text(); - } - } else if (attrValues.isDiscrete()) { - // Check if are combinable choices (for example, Vehicle Types) - if ((attrValues.getDiscreteValues().size() > 0) && - attrValues.isCombinable()) { - // Get value obtained using AttributesEditor - newVal = myTextFieldStrings->getText().text(); - } else if (!myMultiple) { - // Get value of ComboBox - newVal = myChoicesCombo->getText().text(); - } else { - // due this is a multiple selection, obtain value of myTextFieldStrings instead of comboBox - newVal = myTextFieldStrings->getText().text(); - } - } else if (attrValues.isFloat() || attrValues.isTime()) { - // Check if default value of attribute must be set - if (myTextFieldReal->getText().empty() && attrValues.hasDefaultValue()) { - newVal = tagValues.getDefaultValue(myAttr); - myTextFieldReal->setText(newVal.c_str()); - } else { - // obtain value of myTextFieldReal - newVal = myTextFieldReal->getText().text(); - } - } else if (attrValues.isInt()) { - // Check if default value of attribute must be set - if (myTextFieldInt->getText().empty() && attrValues.hasDefaultValue()) { - newVal = tagValues.getDefaultValue(myAttr); - myTextFieldInt->setText(newVal.c_str()); - } else { - // obtain value of myTextFieldInt - newVal = myTextFieldInt->getText().text(); - } - } else if (attrValues.isString()) { - // Check if default value of attribute must be set - if (myTextFieldStrings->getText().empty() && attrValues.hasDefaultValue()) { - newVal = tagValues.getDefaultValue(myAttr); - myTextFieldStrings->setText(newVal.c_str()); - } else { - // obtain value of myTextFieldStrings - newVal = myTextFieldStrings->getText().text(); - } - } - - // we need a extra check for Position and Shape Values, due #2658 - if ((myAttr == SUMO_ATTR_POSITION) || (myAttr == SUMO_ATTR_SHAPE)) { - newVal = stripWhitespaceAfterComma(newVal); - // due we're changing a Position and Shape attribute, GEO and Netedit Editors must be refresh - refreshGEOAndNeteditEditors = true; - } - - // Check if attribute must be changed - if (myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().front()->isValid(myAttr, newVal)) { - // if its valid for the first AC than its valid for all (of the same type) - if (myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().size() > 1) { - myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()->p_begin("Change multiple attributes"); - } else if (myAttr == SUMO_ATTR_ID) { - // IDs attribute has to be encapsulated - myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()->p_begin("change " + toString(myTag) + " attribute"); - } - // Set new value of attribute in all selected ACs - for (const auto &it_ac : myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs()) { - it_ac->setAttribute(myAttr, newVal, myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()); - } - // finish change multiple attributes or ID Attributes - if (myAttributesEditorParent->getInspectorFrameParent()->getInspectedACs().size() > 1) { - myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()->p_end(); - } else if (myAttr == SUMO_ATTR_ID) { - myAttributesEditorParent->getInspectorFrameParent()->getViewNet()->getUndoList()->p_end(); - } - // If previously value was incorrect, change font color to black - if (attrValues.isCombinable()) { - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->killFocus(); - // in this case, we need to refresh the other values (For example, allow/Disallow objects) - myAttributesEditorParent->refreshAttributeEditor(false, false); - } else if (attrValues.isDiscrete()) { - myChoicesCombo->setTextColor(FXRGB(0, 0, 0)); - myChoicesCombo->killFocus(); - } else if (attrValues.isFloat() || attrValues.isTime()) { - myTextFieldReal->setTextColor(FXRGB(0, 0, 0)); - myTextFieldReal->killFocus(); - } else if (attrValues.isInt() && myTextFieldStrings != nullptr) { - myTextFieldInt->setTextColor(FXRGB(0, 0, 0)); - myTextFieldInt->killFocus(); - } else if (myTextFieldStrings != nullptr) { - myTextFieldStrings->setTextColor(FXRGB(0, 0, 0)); - myTextFieldStrings->killFocus(); - } - // Check if GEO and Netedit editors must be refresh - if (refreshGEOAndNeteditEditors) { - myAttributesEditorParent->getInspectorFrameParent()->myNeteditAttributesEditor->refreshNeteditAttributesEditor(true); - myAttributesEditorParent->getInspectorFrameParent()->myGEOAttributesEditor->refreshGEOAttributesEditor(true); - } - } else { - // If value of TextField isn't valid, change color to Red depending of type - if (attrValues.isCombinable()) { - myTextFieldStrings->setTextColor(FXRGB(255, 0, 0)); - myTextFieldStrings->killFocus(); - } else if (attrValues.isDiscrete()) { - myChoicesCombo->setTextColor(FXRGB(255, 0, 0)); - myChoicesCombo->killFocus(); - } else if (attrValues.isFloat() || attrValues.isTime()) { - myTextFieldReal->setTextColor(FXRGB(255, 0, 0)); - } else if (attrValues.isInt() && myTextFieldStrings != nullptr) { - myTextFieldInt->setTextColor(FXRGB(255, 0, 0)); - } else if (myTextFieldStrings != nullptr) { - myTextFieldStrings->setTextColor(FXRGB(255, 0, 0)); - } - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Value '" + newVal + "' for attribute " + toString(myAttr) + " of " + toString(myTag) + " isn't valid"); - } - return 1; -} - - -std::string -GNEInspectorFrame::AttributesEditor::AttributeInput::stripWhitespaceAfterComma(const std::string& stringValue) { - std::string result(stringValue); - while (result.find(", ") != std::string::npos) { - result = StringUtils::replace(result, ", ", ","); - } - return result; -} - - -void -GNEInspectorFrame::AttributesEditor::AttributeInput::enableAttributeInputElements() { - myTextFieldInt->enable(); - myTextFieldReal->enable(); - myTextFieldStrings->enable(); - myChoicesCombo->enable(); - myBoolCheckButton->enable(); -} - - -void -GNEInspectorFrame::AttributesEditor::AttributeInput::disableAttributeInputElements() { - myTextFieldInt->disable(); - myTextFieldReal->disable(); - myTextFieldStrings->disable(); - myChoicesCombo->disable(); - myBoolCheckButton->disable(); -} - -// --------------------------------------------------------------------------- -// GNEInspectorFrame::AttributesEditor - methods -// --------------------------------------------------------------------------- - -GNEInspectorFrame::AttributesEditor::AttributesEditor(GNEInspectorFrame* inspectorFrameParent) : - FXGroupBox(inspectorFrameParent->myContentFrame, "Internal attributes", GUIDesignGroupBoxFrame), - myInspectorFrameParent(inspectorFrameParent) { - // Create sufficient AttributeInput for all types of AttributeCarriers - for (int i = 0; i < (int)GNEAttributeCarrier::getHigherNumberOfAttributes(); i++) { - myVectorOfAttributeInputs.push_back(new AttributeInput(this)); - } - // Create help button - myHelpButton = new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular); -} - - -void -GNEInspectorFrame::AttributesEditor::showAttributeEditorModul() { - if (myInspectorFrameParent->getInspectedACs().size() > 0) { - // Gets tag (only for simplify code) - SumoXMLTag ACFrontTag = myInspectorFrameParent->getInspectedACs().front()->getTagProperty().getTag(); - // check if current AC is a Junction without TLSs (needed to hidde TLS options) - bool disableTLSinJunctions = (dynamic_cast(myInspectorFrameParent->getInspectedACs().front()) && (dynamic_cast(myInspectorFrameParent->getInspectedACs().front())->getNBNode()->getControllingTLS().empty())); - // Iterate over attributes - for (const auto &i : GNEAttributeCarrier::getTagProperties(ACFrontTag)) { - // disable editing for unique attributes in case of multi-selection - if ((myInspectorFrameParent->getInspectedACs().size() > 1) && i.second.isUnique()) { - continue; - } - // Declare a set of occuring values and insert attribute's values of item (note: We use a set to avoid repeated values) - std::set occuringValues; - for (const auto &it_ac : myInspectorFrameParent->getInspectedACs()) { - occuringValues.insert(it_ac->getAttribute(i.first)); - } - // get current value - std::ostringstream oss; - for (auto it_val = occuringValues.begin(); it_val != occuringValues.end(); it_val++) { - if (it_val != occuringValues.begin()) { - oss << " "; - } - oss << *it_val; - } - std::string value = oss.str(); - if ((ACFrontTag == SUMO_TAG_CONNECTION) && (i.first == SUMO_ATTR_TLLINKINDEX) - && value == toString(NBConnection::InvalidTlIndex)) { - // possibly the connections are newly created (allow assigning - // tlIndex if the junction(s) have a traffic light - for (const auto &it_ac : myInspectorFrameParent->getInspectedACs()) { - if (!it_ac->isValid(SUMO_ATTR_TLLINKINDEX, "0")) { - value = "No TLS"; - break; - } - } - } - // Show attribute - if ((disableTLSinJunctions && (ACFrontTag == SUMO_TAG_JUNCTION) && ((i.first == SUMO_ATTR_TLTYPE) || (i.first == SUMO_ATTR_TLID))) == false) { - // first show AttributesEditor - show(); - // show attribute - myVectorOfAttributeInputs[i.second.getPositionListed()]->showAttribute(ACFrontTag, i.first, value); - } - } - } -} - - -void -GNEInspectorFrame::AttributesEditor::hideAttributesEditorModul() { - // hide al attributes - for (const auto &i : myVectorOfAttributeInputs) { - i->hideAttribute(); - } - // hide also AttributesEditor - hide(); -} - - -void -GNEInspectorFrame::AttributesEditor::refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition) { - if (myInspectorFrameParent->getInspectedACs().size() > 0) { - // Declare pointer for allow/Disallow vehicles - std::pair myAllowAttribute(nullptr, ""); - std::pair myDisallowAttribute(nullptr, ""); - // Gets tag (only for simplify code) - SumoXMLTag ACFrontTag = myInspectorFrameParent->getInspectedACs().front()->getTagProperty().getTag(); - // check if current AC is a Junction without TLSs (needed to hidde TLS options) - bool disableTLSinJunctions = (dynamic_cast(myInspectorFrameParent->getInspectedACs().front()) && (dynamic_cast(myInspectorFrameParent->getInspectedACs().front())->getNBNode()->getControllingTLS().empty())); - // Iterate over attributes - for (const auto &i : myInspectorFrameParent->getInspectedACs().front()->getTagProperty()) { - // disable editing for unique attributes in case of multi-selection - if ((myInspectorFrameParent->getInspectedACs().size() > 1) && i.second.isUnique()) { - continue; - } - // Declare a set of occuring values and insert attribute's values of item - std::set occuringValues; - for (const auto &it_ac : myInspectorFrameParent->getInspectedACs()) { - occuringValues.insert(it_ac->getAttribute(i.first)); - } - // get current value - std::ostringstream oss; - for (auto it_val = occuringValues.begin(); it_val != occuringValues.end(); it_val++) { - if (it_val != occuringValues.begin()) { - oss << " "; - } - oss << *it_val; - } - // Show attribute - if ((disableTLSinJunctions && (ACFrontTag == SUMO_TAG_JUNCTION) && ((i.first == SUMO_ATTR_TLTYPE) || (i.first == SUMO_ATTR_TLID))) == false) { - // refresh attribute, with a special case for allow/disallow vehicles - if (i.first == SUMO_ATTR_ALLOW) { - myAllowAttribute.first = myVectorOfAttributeInputs[i.second.getPositionListed()]; - myAllowAttribute.second = oss.str(); - } else if (i.first == SUMO_ATTR_DISALLOW) { - myDisallowAttribute.first = myVectorOfAttributeInputs[i.second.getPositionListed()]; - myDisallowAttribute.second = oss.str(); - } else { - // Check if refresh of Position or Shape has to be forced - if ((i.first == SUMO_ATTR_SHAPE) && forceRefreshShape) { - myVectorOfAttributeInputs[i.second.getPositionListed()]->refreshAttributeInput(oss.str(), true); - } else if ((i.first == SUMO_ATTR_POSITION) && forceRefreshPosition) { - // Refresh attributes maintain invalid values - myVectorOfAttributeInputs[i.second.getPositionListed()]->refreshAttributeInput(oss.str(), true); - } else { - // Refresh attributes maintain invalid values - myVectorOfAttributeInputs[i.second.getPositionListed()]->refreshAttributeInput(oss.str(), false); - } - } - } - } - // Check special case for Allow/Disallow attributes - if (myAllowAttribute.first && myDisallowAttribute.first) { - // if allow attribute is valid but disallow attribute is invalid - if (myAllowAttribute.first->isCurrentAttributeValid() && !myDisallowAttribute.first->isCurrentAttributeValid()) { - // force refresh of disallow attribute - myDisallowAttribute.first->refreshAttributeInput(myDisallowAttribute.second, true); - } - // if disallow attribute is valid but allow attribute is invalid - if (myDisallowAttribute.first->isCurrentAttributeValid() && !myAllowAttribute.first->isCurrentAttributeValid()) { - // force refresh of disallow attribute - myAllowAttribute.first->refreshAttributeInput(myAllowAttribute.second, true); - } - } - } -} - - -GNEInspectorFrame* -GNEInspectorFrame::AttributesEditor::getInspectorFrameParent() const { - return myInspectorFrameParent; -} - - -long -GNEInspectorFrame::AttributesEditor::onCmdAttributeHelp(FXObject*, FXSelector, void*) { - // open Help attributes dialog if there is inspected ACs - if (myInspectorFrameParent->getInspectedACs().size() > 0) { - // open Help attributes dialog - myInspectorFrameParent->openHelpAttributesDialog(myInspectorFrameParent->getInspectedACs().front()->getTagProperty()); - } - return 1; + // update current index button + myCurrentIndexButton->setText((toString(myItemIndex + 1) + " / " + toString(myOverlappedACs.size())).c_str()); + // update view (due dotted contour) + myInspectorFrameParent->getViewNet()->update(); } // --------------------------------------------------------------------------- @@ -1204,16 +648,21 @@ void GNEInspectorFrame::NeteditAttributesEditor::showNeteditAttributesEditor() { - if (myInspectorFrameParent->getInspectedACs().size() > 0) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() > 0) { + // enable all editable elements + myTextFieldAdditionalParent->enable(); + myCheckBoxBlockMovement->enable(); + myCheckBoxBlockShape->enable(); + myCheckBoxCloseShape->enable(); // obtain tag property (only for improve code legibility) - const auto& tagValue = myInspectorFrameParent->getInspectedACs().front()->getTagProperty(); + const auto& tagValue = myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty(); // Check if item can be moved if (tagValue.canBlockMovement()) { // show NeteditAttributesEditor show(); // Iterate over AC to obtain values bool value = true; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { value &= GNEAttributeCarrier::parse(i->getAttribute(GNE_ATTR_BLOCK_MOVEMENT)); } // show block movement frame @@ -1233,7 +682,7 @@ show(); // Iterate over AC to obtain values bool value = true; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { value &= GNEAttributeCarrier::parse(i->getAttribute(GNE_ATTR_BLOCK_SHAPE)); } // show block shape frame @@ -1253,7 +702,7 @@ show(); // Iterate over AC to obtain values bool value = true; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { value &= GNEAttributeCarrier::parse(i->getAttribute(GNE_ATTR_CLOSE_SHAPE)); } // show close shape frame @@ -1273,15 +722,23 @@ show(); // obtain additional Parent std::set parents; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { parents.insert(i->getAttribute(GNE_ATTR_PARENT)); } // show additional parent frame myHorizontalFrameAdditionalParent->show(); // set Label and TextField with the Tag and ID of parent - myLabelAdditionalParent->setText((toString(myInspectorFrameParent->getInspectedACs().front()->getTagProperty().getParentTag()) + " parent").c_str()); + myLabelAdditionalParent->setText((toString(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty().getParentTag()) + " parent").c_str()); myTextFieldAdditionalParent->setText(toString(parents).c_str()); } + // disable all editable elements if we're in demand mode and inspected AC isn't a demand element + if (((myInspectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty().isDemandElement()) || + ((myInspectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && !myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty().isDemandElement())) { + myTextFieldAdditionalParent->disable(); + myCheckBoxBlockMovement->disable(); + myCheckBoxBlockShape->disable(); + myCheckBoxCloseShape->disable(); + } } } @@ -1300,12 +757,12 @@ void GNEInspectorFrame::NeteditAttributesEditor::refreshNeteditAttributesEditor(bool forceRefresh) { - if (myInspectorFrameParent->getInspectedACs().size() > 0) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() > 0) { // refresh block movement if (myHorizontalFrameBlockMovement->shown()) { // Iterate over AC to obtain values bool value = true; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { value &= GNEAttributeCarrier::parse(i->getAttribute(GNE_ATTR_BLOCK_MOVEMENT)); } // set check box value and update label @@ -1321,7 +778,7 @@ if (myHorizontalFrameBlockShape->shown()) { // Iterate over AC to obtain values bool value = true; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { value &= GNEAttributeCarrier::parse(i->getAttribute(GNE_ATTR_BLOCK_SHAPE)); } // set check box value and update label @@ -1337,7 +794,7 @@ if (myHorizontalFrameCloseShape->shown()) { // Iterate over AC to obtain values bool value = true; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { value &= GNEAttributeCarrier::parse(i->getAttribute(GNE_ATTR_CLOSE_SHAPE)); } // set check box value and update label @@ -1352,8 +809,8 @@ // Check if item has another item as parent (Currently only for single Additionals) if (myHorizontalFrameAdditionalParent->shown() && ((myTextFieldAdditionalParent->getTextColor() == FXRGB(0, 0, 0)) || forceRefresh)) { // set Label and TextField with the Tag and ID of parent - myLabelAdditionalParent->setText((toString(myInspectorFrameParent->getInspectedACs().front()->getTagProperty().getParentTag()) + " parent").c_str()); - myTextFieldAdditionalParent->setText(myInspectorFrameParent->getInspectedACs().front()->getAttribute(GNE_ATTR_PARENT).c_str()); + myLabelAdditionalParent->setText((toString(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty().getParentTag()) + " parent").c_str()); + myTextFieldAdditionalParent->setText(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getAttribute(GNE_ATTR_PARENT).c_str()); } } } @@ -1362,14 +819,14 @@ long GNEInspectorFrame::NeteditAttributesEditor::onCmdSetNeteditAttribute(FXObject* obj, FXSelector, void*) { // make sure that ACs has elements - if (myInspectorFrameParent->getInspectedACs().size() > 0) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() > 0) { // check if we're changing multiple attributes - if (myInspectorFrameParent->getInspectedACs().size() > 1) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() > 1) { myInspectorFrameParent->getViewNet()->getUndoList()->p_begin("Change multiple attributes"); } if (obj == myCheckBoxBlockMovement) { // set new values in all inspected Attribute Carriers - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { if (myCheckBoxBlockMovement->getCheck() == 1) { i->setAttribute(GNE_ATTR_BLOCK_MOVEMENT, "true", myInspectorFrameParent->getViewNet()->getUndoList()); myCheckBoxBlockMovement->setText("true"); @@ -1380,7 +837,7 @@ } } else if (obj == myCheckBoxBlockShape) { // set new values in all inspected Attribute Carriers - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { if (myCheckBoxBlockShape->getCheck() == 1) { i->setAttribute(GNE_ATTR_BLOCK_SHAPE, "true", myInspectorFrameParent->getViewNet()->getUndoList()); myCheckBoxBlockShape->setText("true"); @@ -1391,7 +848,7 @@ } } else if (obj == myCheckBoxCloseShape) { // set new values in all inspected Attribute Carriers - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { if (myCheckBoxCloseShape->getCheck() == 1) { i->setAttribute(GNE_ATTR_CLOSE_SHAPE, "true", myInspectorFrameParent->getViewNet()->getUndoList()); myCheckBoxCloseShape->setText("true"); @@ -1401,9 +858,9 @@ } } } else if (obj == myTextFieldAdditionalParent) { - if (myInspectorFrameParent->getInspectedACs().front()->isValid(GNE_ATTR_PARENT, myTextFieldAdditionalParent->getText().text())) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->isValid(GNE_ATTR_PARENT, myTextFieldAdditionalParent->getText().text())) { // change parent of all inspected elements - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { i->setAttribute(GNE_ATTR_PARENT, myTextFieldAdditionalParent->getText().text(), myInspectorFrameParent->getViewNet()->getUndoList()); } myTextFieldAdditionalParent->setTextColor(FXRGB(0, 0, 0)); @@ -1413,7 +870,7 @@ } } // finish change multiple attributes - if (myInspectorFrameParent->getInspectedACs().size() > 1) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() > 1) { myInspectorFrameParent->getViewNet()->getUndoList()->p_end(); } // force refresh values of AttributesEditor and GEOAttributesEditor @@ -1458,16 +915,19 @@ void GNEInspectorFrame::GEOAttributesEditor::showGEOAttributesEditor() { // make sure that ACs has elements - if (myInspectorFrameParent->getInspectedACs().size() > 0) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() > 0) { + // enable all editable elements + myGEOAttributeTextField->enable(); + myUseGEOCheckButton->enable(); // obtain tag property (only for improve code legibility) - const auto& tagProperty = myInspectorFrameParent->getInspectedACs().front()->getTagProperty(); + const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty(); // check if item can use a geo position if (tagProperty.hasGEOPosition() || tagProperty.hasGEOShape()) { // show GEOAttributesEditor show(); // Iterate over AC to obtain values bool value = true; - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { value &= GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_GEO)); } // show use geo frame @@ -1486,32 +946,38 @@ myUseGEOCheckButton->disable(); } // now specify if a single position or an entire shape must be shown (note: cannot be shown both at the same time, and GEO Shape/Position only works for single selections) - if (tagProperty.hasGEOPosition() && myInspectorFrameParent->getInspectedACs().size() == 1) { + if (tagProperty.hasGEOPosition() && myInspectorFrameParent->myAttributesEditor->getEditedACs().size() == 1) { myGEOAttributeFrame->show(); myGEOAttributeLabel->setText(toString(SUMO_ATTR_GEOPOSITION).c_str()); myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0)); // only allow edit if geo conversion is defined if (GeoConvHelper::getFinal().getProjString() != "!") { myGEOAttributeTextField->enable(); - myGEOAttributeTextField->setText(myInspectorFrameParent->getInspectedACs().front()->getAttribute(SUMO_ATTR_GEOPOSITION).c_str()); + myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getAttribute(SUMO_ATTR_GEOPOSITION).c_str()); } else { myGEOAttributeTextField->disable(); myGEOAttributeTextField->setText("No geo-conversion defined"); } - } else if (tagProperty.hasGEOShape() && myInspectorFrameParent->getInspectedACs().size() == 1) { + } else if (tagProperty.hasGEOShape() && myInspectorFrameParent->myAttributesEditor->getEditedACs().size() == 1) { myGEOAttributeFrame->show(); myGEOAttributeLabel->setText(toString(SUMO_ATTR_GEOSHAPE).c_str()); myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0)); // only allow edit if geo conversion is defined if (GeoConvHelper::getFinal().getProjString() != "!") { myGEOAttributeTextField->enable(); - myGEOAttributeTextField->setText(myInspectorFrameParent->getInspectedACs().front()->getAttribute(SUMO_ATTR_GEOSHAPE).c_str()); + myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getAttribute(SUMO_ATTR_GEOSHAPE).c_str()); } else { myGEOAttributeTextField->disable(); myGEOAttributeTextField->setText("No geo-conversion defined"); } } } + // disable all editable elements if we're in demand mode and inspected AC isn't a demand element + if (((myInspectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty().isDemandElement()) || + ((myInspectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && !myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty().isDemandElement())) { + myGEOAttributeTextField->disable(); + myUseGEOCheckButton->disable(); + } } } @@ -1529,13 +995,13 @@ void GNEInspectorFrame::GEOAttributesEditor::refreshGEOAttributesEditor(bool forceRefresh) { // obtain tag property (only for improve code legibility) - const auto& tagProperty = myInspectorFrameParent->getInspectedACs().front()->getTagProperty(); + const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty(); // Check that myGEOAttributeFrame is shown if ((GeoConvHelper::getFinal().getProjString() != "!") && myGEOAttributeFrame->shown() && ((myGEOAttributeTextField->getTextColor() == FXRGB(0, 0, 0)) || forceRefresh)) { if (tagProperty.hasGEOPosition()) { - myGEOAttributeTextField->setText(myInspectorFrameParent->getInspectedACs().front()->getAttribute(SUMO_ATTR_GEOPOSITION).c_str()); + myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getAttribute(SUMO_ATTR_GEOPOSITION).c_str()); } else if (tagProperty.hasGEOShape()) { - myGEOAttributeTextField->setText(myInspectorFrameParent->getInspectedACs().front()->getAttribute(SUMO_ATTR_GEOSHAPE).c_str()); + myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getAttribute(SUMO_ATTR_GEOSHAPE).c_str()); } myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0)); } @@ -1545,22 +1011,22 @@ long GNEInspectorFrame::GEOAttributesEditor::onCmdSetGEOAttribute(FXObject* obj, FXSelector, void*) { // make sure that ACs has elements - if ((GeoConvHelper::getFinal().getProjString() != "!") && (myInspectorFrameParent->getInspectedACs().size() > 0)) { + if ((GeoConvHelper::getFinal().getProjString() != "!") && (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() > 0)) { if (obj == myGEOAttributeTextField) { // obtain tag property (only for improve code legibility) - const auto& tagProperty = myInspectorFrameParent->getInspectedACs().front()->getTagProperty(); + const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty(); // Change GEO Attribute depending of type (Position or shape) if (tagProperty.hasGEOPosition()) { - if (myInspectorFrameParent->getInspectedACs().front()->isValid(SUMO_ATTR_GEOPOSITION, myGEOAttributeTextField->getText().text())) { - myInspectorFrameParent->getInspectedACs().front()->setAttribute(SUMO_ATTR_GEOPOSITION, myGEOAttributeTextField->getText().text(), myInspectorFrameParent->getViewNet()->getUndoList()); + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->isValid(SUMO_ATTR_GEOPOSITION, myGEOAttributeTextField->getText().text())) { + myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->setAttribute(SUMO_ATTR_GEOPOSITION, myGEOAttributeTextField->getText().text(), myInspectorFrameParent->getViewNet()->getUndoList()); myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0)); } else { myGEOAttributeTextField->setTextColor(FXRGB(255, 0, 0)); myGEOAttributeTextField->killFocus(); } } else if (tagProperty.hasGEOShape()) { - if (myInspectorFrameParent->getInspectedACs().front()->isValid(SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text())) { - myInspectorFrameParent->getInspectedACs().front()->setAttribute(SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text(), myInspectorFrameParent->getViewNet()->getUndoList()); + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->isValid(SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text())) { + myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->setAttribute(SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text(), myInspectorFrameParent->getViewNet()->getUndoList()); myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0)); } else { myGEOAttributeTextField->setTextColor(FXRGB(255, 0, 0)); @@ -1571,7 +1037,7 @@ } } else if (obj == myUseGEOCheckButton) { // update GEO Attribute of entire selection - for (const auto &i : myInspectorFrameParent->getInspectedACs()) { + for (const auto& i : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { if (myUseGEOCheckButton->getCheck() == 1) { i->setAttribute(SUMO_ATTR_GEO, "true", myInspectorFrameParent->getViewNet()->getUndoList()); myUseGEOCheckButton->setText("true"); @@ -1594,12 +1060,12 @@ FXDialogBox* helpDialog = new FXDialogBox(this, "GEO attributes Help", GUIDesignDialogBox); std::ostringstream help; help - << " SUMO uses the World Geodetic System 84 (WGS84/UTM).\n" - << " For a GEO-referenced network, geo coordinates are represented as pairs of Longitude and Latitude\n" - << " in decimal degrees without extra symbols. (N,W..)\n" - << " - Longitude: East-west position of a point on the Earth's surface.\n" - << " - Latitude: North-south position of a point on the Earth's surface.\n" - << " - CheckBox 'geo' enables or disables saving position in GEO coordinates\n"; + << " SUMO uses the World Geodetic System 84 (WGS84/UTM).\n" + << " For a GEO-referenced network, geo coordinates are represented as pairs of Longitude and Latitude\n" + << " in decimal degrees without extra symbols. (N,W..)\n" + << " - Longitude: East-west position of a point on the Earth's surface.\n" + << " - Latitude: North-south position of a point on the Earth's surface.\n" + << " - CheckBox 'geo' enables or disables saving position in GEO coordinates\n"; new FXLabel(helpDialog, help.str().c_str(), nullptr, GUIDesignLabelFrameInformation); // "OK" new FXButton(helpDialog, "OK\t\tclose", GUIIconSubSys::getIcon(ICON_ACCEPT), helpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); @@ -1640,15 +1106,16 @@ void GNEInspectorFrame::TemplateEditor::showTemplateEditor() { - if (myInspectorFrameParent->getInspectedACs().front()->getTagProperty().getTag() == SUMO_TAG_EDGE) { - // show template editor + // show template editor only if we're editing an edge in Network mode + if ((myInspectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && + (myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getTagProperty().getTag() == SUMO_TAG_EDGE)) { show(); // show "Copy Template" (caption supplied via onUpdate) myCopyTemplateButton->show(); // show "Set As Template" - if (myInspectorFrameParent->getInspectedACs().size() == 1) { + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() == 1) { mySetTemplateButton->show(); - mySetTemplateButton->setText(("Set edge '" + myInspectorFrameParent->getInspectedACs().front()->getID() + "' as Template").c_str()); + mySetTemplateButton->setText(("Set edge '" + myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getID() + "' as Template").c_str()); } } } @@ -1685,11 +1152,11 @@ long GNEInspectorFrame::TemplateEditor::onCmdCopyTemplate(FXObject*, FXSelector, void*) { - for (const auto &it : myInspectorFrameParent->getInspectedACs()) { + for (const auto& it : myInspectorFrameParent->myAttributesEditor->getEditedACs()) { GNEEdge* edge = dynamic_cast(it); assert(edge); edge->copyTemplate(myEdgeTemplate, myInspectorFrameParent->getViewNet()->getUndoList()); - myInspectorFrameParent->inspectMultisection(myInspectorFrameParent->getInspectedACs()); + myInspectorFrameParent->inspectMultisection(myInspectorFrameParent->myAttributesEditor->getEditedACs()); } return 1; } @@ -1697,8 +1164,8 @@ long GNEInspectorFrame::TemplateEditor::onCmdSetTemplate(FXObject*, FXSelector, void*) { - assert(myInspectorFrameParent->getInspectedACs().size() == 1); - GNEEdge* edge = dynamic_cast(myInspectorFrameParent->getInspectedACs().front()); + assert(myInspectorFrameParent->myAttributesEditor->getEditedACs().size() == 1); + GNEEdge* edge = dynamic_cast(myInspectorFrameParent->myAttributesEditor->getEditedACs().front()); assert(edge); setEdgeTemplate(edge); return 1; @@ -1710,10 +1177,10 @@ // declare caption for button FXString caption; if (myEdgeTemplate) { - if (myInspectorFrameParent->getInspectedACs().size() == 1) { - caption = ("Copy '" + myEdgeTemplate->getMicrosimID() + "' into edge '" + myInspectorFrameParent->getInspectedACs().front()->getID() + "'").c_str(); + if (myInspectorFrameParent->myAttributesEditor->getEditedACs().size() == 1) { + caption = ("Copy '" + myEdgeTemplate->getMicrosimID() + "' into edge '" + myInspectorFrameParent->myAttributesEditor->getEditedACs().front()->getID() + "'").c_str(); } else { - caption = ("Copy '" + myEdgeTemplate->getMicrosimID() + "' into " + toString(myInspectorFrameParent->getInspectedACs().size()) + " selected edges").c_str(); + caption = ("Copy '" + myEdgeTemplate->getMicrosimID() + "' into " + toString(myInspectorFrameParent->myAttributesEditor->getEditedACs().size()) + " selected edges").c_str(); } sender->handle(this, FXSEL(SEL_COMMAND, ID_ENABLE), nullptr); } else { diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEInspectorFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEInspectorFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEInspectorFrame.h 2018-11-15 23:00:46.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEInspectorFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,7 +52,7 @@ ~OverlappedInspection(); /// @brief show template editor - void showOverlappedInspection(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition); + void showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, const Position& clickedPosition); /// @brief hide template editor void hideOverlappedInspection(); @@ -61,23 +61,29 @@ bool overlappedInspectionShown() const; /// @brief check if given position is near to saved position - bool checkSavedPosition(const Position &clickedPosition) const; + bool checkSavedPosition(const Position& clickedPosition) const; /// @brief try to go to next element if clicked position is near to saved position - bool nextElement(const Position &clickedPosition); + bool nextElement(const Position& clickedPosition); /// @brief try to go to previous element if clicked position is near to saved position - bool previousElement(const Position &clickedPosition); + bool previousElement(const Position& clickedPosition); /// @name FOX-callbacks /// @{ - + /// @brief Inspect next Element (from top to bot) long onCmdNextElement(FXObject*, FXSelector, void*); /// @brief Inspect previous element (from top to bot) long onCmdPreviousElement(FXObject*, FXSelector, void*); + /// @brief show list of overlapped elements + long onCmdShowList(FXObject*, FXSelector, void*); + + /// @brief called when a list item is selected + long onCmdListItemSelected(FXObject*, FXSelector, void*); + /// @brief Called when user press the help button long onCmdOverlappingHelp(FXObject*, FXSelector, void*); /// @} @@ -93,12 +99,15 @@ /// @brief Previous element button FXButton* myPreviousElement; - /// @brief label for current index - FXLabel* myCurrentIndexLabel; + /// @brief Button for current index + FXButton* myCurrentIndexButton; /// @brief Next element button FXButton* myNextElement; + /// @brief list of overlapped elements + FXList* myOverlappedElementList; + /// @brief button for help FXButton* myHelpButton; @@ -110,138 +119,9 @@ /// @brief saved clicked position Position mySavedClickedPosition; - }; - - // =========================================================================== - // class AttributesEditor - // =========================================================================== - - class AttributesEditor : private FXGroupBox { - /// @brief FOX-declaration - FXDECLARE(GNEInspectorFrame::AttributesEditor) - - public: - - // =========================================================================== - // class AttributeInput - // =========================================================================== - - class AttributeInput : private FXHorizontalFrame { - /// @brief FOX-declaration - FXDECLARE(GNEInspectorFrame::AttributesEditor::AttributeInput) - - public: - /// @brief constructor - AttributeInput(GNEInspectorFrame::AttributesEditor* attributeEditorParent); - - /// @brief show attribute of ac - void showAttribute(SumoXMLTag ACTag, SumoXMLAttr ACAttribute, const std::string& value); - - /// @brief show attribute - void hideAttribute(); - - /// @brief refresh current attribute input - void refreshAttributeInput(const std::string& value, bool forceRefresh); - - /// @brief check if current attribute of TextField/ComboBox is valid - bool isCurrentAttributeValid() const; - - /// @name FOX-callbacks - /// @{ - - /// @brief try to set new attribute value - long onCmdSetAttribute(FXObject*, FXSelector, void*); - - /// @brief open model dialog for more comfortable attribute editing - long onCmdOpenAttributeDialog(FXObject*, FXSelector, void*); - /// @} - - protected: - /// @brief FOX needs this - AttributeInput() {} - - /// @brief removed invalid spaces of Positions and shapes - std::string stripWhitespaceAfterComma(const std::string& stringValue); - - private: - /// @brief enable attribute input elements - void enableAttributeInputElements(); - - /// @brief disable attribute input elements - void disableAttributeInputElements(); - - /// @brief pointer to AttributesEditor parent - GNEInspectorFrame::AttributesEditor* myAttributesEditorParent; - - /// @brief current tag - SumoXMLTag myTag; - - /// @brief current Attr - SumoXMLAttr myAttr; - - /// @brief flag to check if input element contains multiple values - bool myMultiple; - - /// @brief pointer to attribute label - FXLabel* myLabel; - - /// @brief textField to modify the value of int attributes - FXTextField* myTextFieldInt; - - /// @brief textField to modify the value of real/Time attributes - FXTextField* myTextFieldReal; - - /// @brief textField to modify the value of string attributes - FXTextField* myTextFieldStrings; - /// @brief pointer to combo box choices - FXComboBox* myChoicesCombo; - - /// @brief pointer to menu check - FXCheckButton* myBoolCheckButton; - - /// @brief pointer to buttonCombinableChoices - FXButton* myButtonCombinableChoices; - - /// @brief Button for open color editor - FXButton* myColorEditor; - }; - - /// @brief constructor - AttributesEditor(GNEInspectorFrame* inspectorFrameParent); - - /// @brief show attributes of ac - void showAttributeEditorModul(); - - /// @brief hide attribute editor - void hideAttributesEditorModul(); - - /// @brief refresh attribute editor (only the valid values will be refresh) - void refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition); - - /// @brief get InspectorFrame Parent - GNEInspectorFrame* getInspectorFrameParent() const; - - /// @name FOX-callbacks - /// @{ - - /// @brief Called when user press the help button - long onCmdAttributeHelp(FXObject*, FXSelector, void*); - /// @} - - protected: - /// @brief FOX needs this - AttributesEditor() {} - - private: - /// @brief pointer to GNEInspectorFrame parent - GNEInspectorFrame* myInspectorFrameParent; - - /// @brief list of Attribute inputs - std::vector myVectorOfAttributeInputs; - - /// @brief button for help - FXButton* myHelpButton; + /// @brief inspect attributeCarrier correspond to current index + void inspectOverlappedAttributeCarrier(); }; // =========================================================================== @@ -270,7 +150,6 @@ /// @name FOX-callbacks /// @{ - /// @brief Called when user change the current GEO Attribute long onCmdSetNeteditAttribute(FXObject*, FXSelector, void*); @@ -463,12 +342,19 @@ /// @brief hide inspector frame void hide(); - /**@brief process click over Viewnet + /**@brief process click over Viewnet in Supermode Network * @param[in] clickedPosition clicked position over ViewNet * @param[in] objectsUnderCursor objects under cursors * @return true if something was sucefully done */ - bool processClick(const Position& clickedPosition, GNEViewNet::ObjectsUnderCursor &objectsUnderCursor); + bool processNetworkSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); + + /**@brief process click over Viewnet in Supermode Demand + * @param[in] clickedPosition clicked position over ViewNet + * @param[in] objectsUnderCursor objects under cursors + * @return true if something was sucefully done + */ + bool processDemandSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); /// @brief Inspect a single element void inspectSingleElement(GNEAttributeCarrier* AC); @@ -482,14 +368,11 @@ /// @brief inspect called from DeleteFrame void inspectFromDeleteFrame(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousElement, bool previousElementWasMarked); - /// @brief remove AC from current inspected ACs - void removeInspectedAC(GNEAttributeCarrier* ac); - /// @brief Clear all current inspected ACs void clearInspectedAC(); - /// @brief get ACHierarchy - GNEFrame::ACHierarchy* getACHierarchy() const; + /// @brief get AttributesEditor + GNEFrame::AttributesEditor* getAttributesEditor() const; /// @brief get template editor TemplateEditor* getTemplateEditor() const; @@ -504,15 +387,18 @@ long onCmdGoBack(FXObject*, FXSelector, void*); /// @} - /// @brief get current list of inspected ACs - const std::vector& getInspectedACs() const; + /// @brief function called after undo/redo in the current frame (can be reimplemented in frame childs) + void updateFrameAfterUndoRedo(); protected: /// @brief FOX needs this GNEInspectorFrame() {} /// @brief Inspect a singe element (the front of AC AttributeCarriers of ObjectUnderCursor - void inspectClickedElement(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition); + void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, const Position& clickedPosition); + + /// @brief function called after set a valid attribute in AttributeEditor + void updateFrameAfterChangeAttribute(); private: /// @brief Overlapped Inspection @@ -547,9 +433,6 @@ /// @brief flag to ckec if myPreviousElementDelete was marked in Delete Frame bool myPreviousElementDeleteWasMarked; - - /// @brief the multi-selection currently being inspected - std::vector myInspectedACs; }; diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEPolygonFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEPolygonFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEPolygonFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEPolygonFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,7 @@ // GNEPolygonFrame::GEOPOICreator - methods // --------------------------------------------------------------------------- -GNEPolygonFrame::GEOPOICreator::GEOPOICreator(GNEPolygonFrame* polygonFrameParent) : +GNEPolygonFrame::GEOPOICreator::GEOPOICreator(GNEPolygonFrame* polygonFrameParent) : FXGroupBox(polygonFrameParent->myContentFrame, "GEO POI Creator", GUIDesignGroupBoxFrame), myPolygonFrameParent(polygonFrameParent) { // create RadioButtons for formats @@ -65,7 +66,7 @@ myLatLonRadioButton->setCheck(TRUE); // create text field for coordinates myCoordinatesTextField = new FXTextField(this, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField); - // create checkBox + // create checkBox myCenterViewAfterCreationCheckButton = new FXCheckButton(this, "Center View after creation", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonAttribute); // create button for create GEO POIs myCreateGEOPOIButton = new FXButton(this, "Create GEO POI (clipboard)", nullptr, this, MID_GNE_CREATE, GUIDesignButton); @@ -77,7 +78,7 @@ GNEPolygonFrame::GEOPOICreator::~GEOPOICreator() {} -void +void GNEPolygonFrame::GEOPOICreator::showGEOPOICreatorModul() { // check if there is an GEO Proj string is defined if (GeoConvHelper::getFinal().getProjString() != "!") { @@ -94,18 +95,18 @@ } -void +void GNEPolygonFrame::GEOPOICreator::hideGEOPOICreatorModul() { hide(); } -long +long GNEPolygonFrame::GEOPOICreator::onCmdSetCoordinates(FXObject*, FXSelector, void*) { // check if input contains spaces std::string input = myCoordinatesTextField->getText().text(); std::string inputWithoutSpaces; - for (const auto &i : input) { + for (const auto& i : input) { if (i != ' ') { inputWithoutSpaces.push_back(i); } @@ -140,10 +141,10 @@ } -long +long GNEPolygonFrame::GEOPOICreator::onCmdSetFormat(FXObject* obj, FXSelector, void*) { //disable other radio button depending of selected option - if(obj == myLonLatRadioButton) { + if (obj == myLonLatRadioButton) { myLonLatRadioButton->setCheck(TRUE); myLatLonRadioButton->setCheck(FALSE); } else if (obj == myLatLonRadioButton) { @@ -151,12 +152,12 @@ myLatLonRadioButton->setCheck(TRUE); } // in both cases call onCmdSetCoordinates(0,0,0) to set new cartesian equivalence - onCmdSetCoordinates(0,0,0); + onCmdSetCoordinates(0, 0, 0); return 1; } -long +long GNEPolygonFrame::GEOPOICreator::onCmdCreateGEOPOI(FXObject*, FXSelector, void*) { // first check if current GEO Position is valid if (myPolygonFrameParent->myShapeAttributes->areValuesValid()) { @@ -172,9 +173,9 @@ myCoordinatesTextField->setText(""); myCreateGEOPOIButton->setText("Create GEO POI (clipboard)"); } - if (GNEAttributeCarrier::canParse(geoPosStr)) { + if (GNEAttributeCarrier::canParse(geoPosStr)) { // obtain shape attributes and values - auto valuesOfElement = myPolygonFrameParent->myShapeAttributes->getAttributesAndValues(); + auto valuesOfElement = myPolygonFrameParent->myShapeAttributes->getAttributesAndValues(true); // obtain netedit attributes and values myPolygonFrameParent->myNeteditAttributes->getNeteditAttributesAndValues(valuesOfElement, nullptr); // generate new ID @@ -191,7 +192,7 @@ // return ADDSHAPE_SUCCESS if POI was sucesfully created if (myPolygonFrameParent->addPOI(valuesOfElement)) { // check if view has to be centered over created GEO POI - if(myCenterViewAfterCreationCheckButton->getCheck() == TRUE) { + if (myCenterViewAfterCreationCheckButton->getCheck() == TRUE) { // create a boundary over given GEO Position and center view over it Boundary centerPosition; centerPosition.add(geoPos); @@ -215,10 +216,10 @@ GNEFrame(horizontalFrameParent, viewNet, "Shapes") { // create item Selector modul for shapes - myItemSelector = new ItemSelector(this, GNEAttributeCarrier::TAGProperty::TAGPROPERTY_SHAPE); + myItemSelector = new ItemSelector(this, GNEAttributeCarrier::TagType::TAGTYPE_SHAPE); // Create shape parameters - myShapeAttributes = new ACAttributes(this); + myShapeAttributes = new AttributesCreator(this); // Create Netedit parameter myNeteditAttributes = new NeteditAttributes(this); @@ -238,7 +239,7 @@ } -void +void GNEPolygonFrame::show() { // refresh item selector myItemSelector->refreshTagProperties(); @@ -248,7 +249,7 @@ GNEPolygonFrame::AddShapeResult -GNEPolygonFrame::processClick(const Position& clickedPosition, const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) { +GNEPolygonFrame::processClick(const Position& clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { // Declare map to keep values std::map valuesOfElement; // check if current selected shape is valid @@ -259,7 +260,7 @@ return ADDSHAPE_INVALID; } // obtain shape attributes and values - valuesOfElement = myShapeAttributes->getAttributesAndValues(); + valuesOfElement = myShapeAttributes->getAttributesAndValues(true); // obtain netedit attributes and values myNeteditAttributes->getNeteditAttributesAndValues(valuesOfElement, objectsUnderCursor.getLaneFront()); // generate new ID @@ -286,7 +287,7 @@ return ADDSHAPE_INVALID; } // obtain shape attributes and values - valuesOfElement = myShapeAttributes->getAttributesAndValues(); + valuesOfElement = myShapeAttributes->getAttributesAndValues(true); // obtain netedit attributes and values myNeteditAttributes->getNeteditAttributesAndValues(valuesOfElement, objectsUnderCursor.getLaneFront()); // generate new ID @@ -349,12 +350,12 @@ if (myShapeAttributes->areValuesValid() == false) { myShapeAttributes->showWarningMessage(); return false; - } else if(myDrawingShape->getTemporalShape().size() == 0) { + } else if (myDrawingShape->getTemporalShape().size() == 0) { WRITE_WARNING("Polygon shape cannot be empty"); return false; } else { // Declare map to keep values - std::map valuesOfElement = myShapeAttributes->getAttributesAndValues(); + std::map valuesOfElement = myShapeAttributes->getAttributesAndValues(true); // obtain netedit attributes and values myNeteditAttributes->getNeteditAttributesAndValues(valuesOfElement, nullptr); @@ -364,7 +365,7 @@ // obtain shape and check if has to be closed PositionVector temporalShape = myDrawingShape->getTemporalShape(); - if(valuesOfElement[GNE_ATTR_CLOSE_SHAPE] == "true") { + if (valuesOfElement[GNE_ATTR_CLOSE_SHAPE] == "true") { temporalShape.closePolygon(); } valuesOfElement[SUMO_ATTR_SHAPE] = toString(temporalShape); @@ -378,10 +379,10 @@ } -void -GNEPolygonFrame::enableModuls(const GNEAttributeCarrier::TagProperties &tagProperties) { +void +GNEPolygonFrame::enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties) { // if there are parmeters, show and Recalc groupBox - myShapeAttributes->showACAttributesModul(tagProperties); + myShapeAttributes->showAttributesCreatorModul(tagProperties); // show netedit attributes myNeteditAttributes->showNeteditAttributesModul(tagProperties); // Check if drawing mode has to be shown @@ -399,10 +400,10 @@ } -void +void GNEPolygonFrame::disableModuls() { // hide all widgets - myShapeAttributes->hideACAttributesModul(); + myShapeAttributes->hideAttributesCreatorModul(); myNeteditAttributes->hideNeteditAttributesModul(); myDrawingShape->hideDrawingShape(); myGEOPOICreator->hideGEOPOICreatorModul(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEPolygonFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEPolygonFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEPolygonFrame.h 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEPolygonFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -93,13 +93,13 @@ FXTextField* myCoordinatesTextField; /// @brief button for enable or disable certer view after creation of GEO POI - FXCheckButton *myCenterViewAfterCreationCheckButton; + FXCheckButton* myCenterViewAfterCreationCheckButton; /// @brief button for create GEO Coordinates FXButton* myCreateGEOPOIButton; /// @brief FXLabel for the equivalent position of GEO Position in Cartesian Position - FXLabel *myLabelCartesianPosition; + FXLabel* myLabelCartesianPosition; }; /**@brief Constructor @@ -119,7 +119,7 @@ * @param[in] ObjectsUnderCursor objects under cursor after click over view * @return AddShapeStatus with the result of operation */ - AddShapeResult processClick(const Position& clickedPosition, const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor); + AddShapeResult processClick(const Position& clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); /// @brief get list of selecte id's in string format static std::string getIdsSelected(const FXList* list); @@ -134,8 +134,8 @@ */ bool buildShape(); - /// @brief enable moduls depending of item selected in ItemSelector - void enableModuls(const GNEAttributeCarrier::TagProperties &tagProperties); + /// @brief enable moduls depending of item selected in ItemSelector + void enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties); /// @brief disable moduls if element selected in itemSelector isn't valid void disableModuls(); @@ -154,7 +154,7 @@ ItemSelector* myItemSelector; /// @brief shape internal attributes - ACAttributes* myShapeAttributes; + AttributesCreator* myShapeAttributes; /// @brief Netedit parameter NeteditAttributes* myNeteditAttributes; diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,6 +29,7 @@ #include #include #include +#include #include "GNEProhibitionFrame.h" @@ -107,7 +108,7 @@ void -GNEProhibitionFrame::handleProhibitionClick(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) { +GNEProhibitionFrame::handleProhibitionClick(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { // build prohibition buildProhibition(objectsUnderCursor.getConnectionFront(), myViewNet->getKeyPressed().shiftKeyPressed(), myViewNet->getKeyPressed().controlKeyPressed(), true); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.h 2018-09-27 22:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEProhibitionFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -56,7 +56,7 @@ /**@brief handle prohibitions and set the relative colouring * @param objectsUnderCursor collection of objects under cursor after click over view */ - void handleProhibitionClick(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor); + void handleProhibitionClick(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); /// @brief show prohibition frame void show(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNERouteFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNERouteFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNERouteFrame.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNERouteFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,648 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERouteFrame.cpp +/// @author Pablo Alvarez Lopez +/// @date Dec 2018 +/// @version $Id$ +/// +// The Widget for remove network-elements +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNERouteFrame.h" + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNERouteFrame::RouteModeSelector) RouteModeSelectorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_TYPE, GNERouteFrame::RouteModeSelector::onCmdSelectRouteMode), +}; + +FXDEFMAP(GNERouteFrame::ConsecutiveEdges) ConsecutiveEdgesMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ENTER, GNERouteFrame::ConsecutiveEdges::onCmdCreateRoute), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ESC, GNERouteFrame::ConsecutiveEdges::onCmdAbortCreateRoute) +}; + +FXDEFMAP(GNERouteFrame::NonConsecutiveEdges) NonConsecutiveEdgesMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ENTER, GNERouteFrame::NonConsecutiveEdges::onCmdCreateRoute), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ESC, GNERouteFrame::NonConsecutiveEdges::onCmdAbortCreateRoute) +}; + +// Object implementation +FXIMPLEMENT(GNERouteFrame::RouteModeSelector, FXGroupBox, RouteModeSelectorMap, ARRAYNUMBER(RouteModeSelectorMap)) +FXIMPLEMENT(GNERouteFrame::ConsecutiveEdges, FXGroupBox, ConsecutiveEdgesMap, ARRAYNUMBER(ConsecutiveEdgesMap)) +FXIMPLEMENT(GNERouteFrame::NonConsecutiveEdges, FXGroupBox, NonConsecutiveEdgesMap, ARRAYNUMBER(NonConsecutiveEdgesMap)) + + +// =========================================================================== +// method definitions +// =========================================================================== + +// --------------------------------------------------------------------------- +// GNERouteFrame::RouteModeSelector - methods +// --------------------------------------------------------------------------- + +GNERouteFrame::RouteModeSelector::RouteModeSelector(GNERouteFrame* routeFrameParent) : + FXGroupBox(routeFrameParent->myContentFrame, "Route mode", GUIDesignGroupBoxFrame), + myRouteFrameParent(routeFrameParent), + myCurrentRouteMode(ROUTEMODE_CONSECUTIVE_EDGES) { + // first fill myRouteModesStrings + myRouteModesStrings.push_back(std::make_pair(ROUTEMODE_CONSECUTIVE_EDGES, "consecutive edges")); + myRouteModesStrings.push_back(std::make_pair(ROUTEMODE_NONCONSECUTIVE_EDGES, "non consecutive edges")); + // Create FXComboBox + myTypeMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_TYPE, GUIDesignComboBox); + // fill myTypeMatchBox with route modes + for (const auto& i : myRouteModesStrings) { + myTypeMatchBox->appendItem(i.second.c_str()); + } + // Set visible items + myTypeMatchBox->setNumVisible((int)myTypeMatchBox->getNumItems()); + // RouteModeSelector is always shown + show(); +} + + +GNERouteFrame::RouteModeSelector::~RouteModeSelector() {} + + +const GNERouteFrame::RouteMode& +GNERouteFrame::RouteModeSelector::getCurrenRouteMode() const { + return myCurrentRouteMode; +} + + +void +GNERouteFrame::RouteModeSelector::setCurrentRouteMode(RouteMode routemode) { + // make sure that route isn't invalid + if (routemode != ROUTEMODE_INVALID) { + // restore color + myTypeMatchBox->setTextColor(FXRGB(0, 0, 0)); + // set current route mode + myCurrentRouteMode = routemode; + // set item in myTypeMatchBox + for (int i = 0; i < (int)myRouteModesStrings.size(); i++) { + if (myRouteModesStrings.at(i).first == myCurrentRouteMode) { + myTypeMatchBox->setCurrentItem(i); + } + } + // show moduls + if (routemode == ROUTEMODE_CONSECUTIVE_EDGES) { + myRouteFrameParent->myConsecutiveEdges->showConsecutiveEdgesModul(); + myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul(); + } else if (routemode == ROUTEMODE_NONCONSECUTIVE_EDGES) { + myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul(); + myRouteFrameParent->myNonConsecutiveEdges->showNonConsecutiveEdgesModul(); + } + + } else { + // hide all moduls if route mode isnt' valid + myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul(); + myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul(); + } +} + + +long +GNERouteFrame::RouteModeSelector::onCmdSelectRouteMode(FXObject*, FXSelector, void*) { + // Check if value of myTypeMatchBox correspond of an allowed additional tags + for (const auto& i : myRouteModesStrings) { + if (i.second == myTypeMatchBox->getText().text()) { + // set color of myTypeMatchBox to black (valid) + myTypeMatchBox->setTextColor(FXRGB(0, 0, 0)); + // Set new current type + myCurrentRouteMode = i.first; + // enable moduls + if (myCurrentRouteMode == ROUTEMODE_CONSECUTIVE_EDGES) { + myRouteFrameParent->myConsecutiveEdges->showConsecutiveEdgesModul(); + myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul(); + } else if (myCurrentRouteMode == ROUTEMODE_NONCONSECUTIVE_EDGES) { + myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul(); + myRouteFrameParent->myNonConsecutiveEdges->showNonConsecutiveEdgesModul(); + } + // Write Warning in console if we're in testing mode + WRITE_DEBUG(("Selected item '" + myTypeMatchBox->getText() + "' in RouteModeSelector").text()); + return 1; + } + } + // if additional name isn't correct, set SUMO_TAG_NOTHING as current type + myCurrentRouteMode = ROUTEMODE_INVALID; + // hide all moduls if route mode isnt' valid + myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul(); + myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul(); + // set color of myTypeMatchBox to red (invalid) + myTypeMatchBox->setTextColor(FXRGB(255, 0, 0)); + // Write Warning in console if we're in testing mode + WRITE_DEBUG("Selected invalid item in RouteModeSelector"); + return 1; +} + + +// --------------------------------------------------------------------------- +// GNERouteFrame::ConsecutiveEdges - methods +// --------------------------------------------------------------------------- + +GNERouteFrame::ConsecutiveEdges::ConsecutiveEdges(GNERouteFrame* routeFrameParent) : + FXGroupBox(routeFrameParent->myContentFrame, "Consecutive edges", GUIDesignGroupBoxFrame), + myRouteFrameParent(routeFrameParent) { + // create label for route info + myInfoRouteLabel = new FXLabel(this, "No edges selected", 0, GUIDesignLabelFrameInformation); + // Create button for create routes + myCreateRouteButton = new FXButton(this, "Create route", 0, this, MID_GNE_HOTKEY_ENTER, GUIDesignButton); + myCreateRouteButton->disable(); + // Create button for create routes + myAbortCreationButton = new FXButton(this, "Abort creation", 0, this, MID_GNE_HOTKEY_ESC, GUIDesignButton); + myAbortCreationButton->disable(); + // ConsecutiveEdges is by default shown + show(); +} + + +GNERouteFrame::ConsecutiveEdges::~ConsecutiveEdges() {} + + +void +GNERouteFrame::ConsecutiveEdges::showConsecutiveEdgesModul() { + // recalc before show (to avoid graphic problems) + recalc(); + show(); +} + + +void +GNERouteFrame::ConsecutiveEdges::hideConsecutiveEdgesModul() { + // first abort route creation + abortRouteCreation(); + // now hide modul + hide(); +} + + +bool +GNERouteFrame::ConsecutiveEdges::addEdgeIntoRoute(GNEEdge* edge) { + // check if currently we're creating a new route + if (myRouteEdges.empty()) { + // block undo/redo + myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("route creation"); + // add edge into list + myRouteEdges.push_back(edge); + // set selected color in all edges + for (const auto& j : edge->getLanes()) { + j->setSpecialColor(&myRouteFrameParent->getEdgeCandidateColor()); + } + // enable buttons + myCreateRouteButton->enable(); + myAbortCreationButton->enable(); + // Change colors of candidate edges + for (const auto& i : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + if (i != edge) { + // set color in every lane + for (const auto& j : i->getLanes()) { + j->setSpecialColor(&myRouteFrameParent->getEdgeCandidateSelectedColor()); + } + } + } + // update route label + updateInfoRouteLabel(); + // edge added, then return true + return true; + } else { + // check if clicked edge is in the candidate edges + for (const auto& i : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + if (i == edge) { + // restore colors of outgoing edges + for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(nullptr); + } + } + // add new edge in the list of route edges + myRouteEdges.push_back(edge); + // set selected color in all edges + for (const auto& j : myRouteEdges) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateColor()); + } + } + // set new candidate colors + for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + if (j != edge) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateSelectedColor()); + } + } + } + // update route label + updateInfoRouteLabel(); + // edge added, then return true + return true; + } + } + // edge isn't a candidate edge, then return false + return false; + } +} + + +void +GNERouteFrame::ConsecutiveEdges::createRoute() { + // create edge only if there is route edges + if (myRouteEdges.size() > 0) { + // cenerate Route ID + std::string routeID = myRouteFrameParent->getViewNet()->getNet()->generateDemandElementID(SUMO_TAG_ROUTE); + // create route + GNERoute* route = new GNERoute(myRouteFrameParent->getViewNet(), routeID, myRouteEdges, RGBColor::BLUE); + // add it into GNENet using GNEChange_DemandElement (to allow undo-redo) + myRouteFrameParent->getViewNet()->getUndoList()->p_begin("add " + route->getTagStr()); + myRouteFrameParent->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(route, true), true); + myRouteFrameParent->getViewNet()->getUndoList()->p_end(); + // abort route creation (because route it was already seleted and vector/colors has to be cleaned) + abortRouteCreation(); + } +} + + +void +GNERouteFrame::ConsecutiveEdges::abortRouteCreation() { + // first check that there is route edges selected + if (myRouteEdges.size() > 0) { + // unblock undo/redo + myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo(); + // disable special color in candidate edges + for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(nullptr); + } + } + // disable special color in current route edges + for (const auto& j : myRouteEdges) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(nullptr); + } + } + // clear route edges + myRouteEdges.clear(); + // disable buttons + myCreateRouteButton->disable(); + myAbortCreationButton->disable(); + // update route label + updateInfoRouteLabel(); + // update view + myRouteFrameParent->getViewNet()->update(); + } +} + +long +GNERouteFrame::ConsecutiveEdges::onCmdCreateRoute(FXObject*, FXSelector, void*) { + // create route + createRoute(); + return 1; +} + + +long +GNERouteFrame::ConsecutiveEdges::onCmdAbortCreateRoute(FXObject*, FXSelector, void*) { + // abort route creation + abortRouteCreation(); + return 1; +} + + +void +GNERouteFrame::ConsecutiveEdges::updateInfoRouteLabel() { + if (myRouteEdges.size() > 0) { + // declare variables for route info + double lenght = 0; + double speed = 0; + for (const auto& i : myRouteEdges) { + lenght += i->getNBEdge()->getLength(); + speed += i->getNBEdge()->getSpeed(); + } + // declare ostringstream for label and fill it + std::ostringstream information; + information + << "- Number of Edges: " << toString(myRouteEdges.size()) << "\n" + << "- Lenght: " << toString(lenght) << "\n" + << "- Average speed: " << toString(speed / myRouteEdges.size()); + // set new label + myInfoRouteLabel->setText(information.str().c_str()); + } else { + myInfoRouteLabel->setText("No edges selected"); + } +} + +// --------------------------------------------------------------------------- +// GNERouteFrame::NonConsecutiveEdges - methods +// --------------------------------------------------------------------------- + +GNERouteFrame::NonConsecutiveEdges::NonConsecutiveEdges(GNERouteFrame* routeFrameParent) : + FXGroupBox(routeFrameParent->myContentFrame, "Non consecutive edges", GUIDesignGroupBoxFrame), + myRouteFrameParent(routeFrameParent) { + // create label for route info + myInfoRouteLabel = new FXLabel(this, "No edges selected", 0, GUIDesignLabelFrameInformation); + // Create button for create routes + myCreateRouteButton = new FXButton(this, "Create route", 0, this, MID_GNE_HOTKEY_ENTER, GUIDesignButton); + myCreateRouteButton->disable(); + // Create button for create routes + myAbortCreationButton = new FXButton(this, "Abort creation", 0, this, MID_GNE_HOTKEY_ESC, GUIDesignButton); + myAbortCreationButton->disable(); + // NonConsecutiveEdges is by default shown + show(); +} + + +GNERouteFrame::NonConsecutiveEdges::~NonConsecutiveEdges() {} + + +void +GNERouteFrame::NonConsecutiveEdges::showNonConsecutiveEdgesModul() { + // recalc before show (to avoid graphic problems) + recalc(); + show(); +} + + +void +GNERouteFrame::NonConsecutiveEdges::hideNonConsecutiveEdgesModul() { + // first abort route creation + abortRouteCreation(); + // now hide modul + hide(); +} + + +bool +GNERouteFrame::NonConsecutiveEdges::addEdgeIntoRoute(GNEEdge* edge) { + // check if currently we're creating a new route + if (myRouteEdges.empty()) { + // block undo/redo + myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("route creation"); + // add edge into list + myRouteEdges.push_back(edge); + // set selected color in all edges + for (const auto& j : edge->getLanes()) { + j->setSpecialColor(&myRouteFrameParent->getEdgeCandidateColor()); + } + // enable buttons + myCreateRouteButton->enable(); + myAbortCreationButton->enable(); + // Change colors of candidate edges + for (const auto& i : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + if (i != edge) { + // set color in every lane + for (const auto& j : i->getLanes()) { + j->setSpecialColor(&myRouteFrameParent->getEdgeCandidateSelectedColor()); + } + } + } + // update route label + updateInfoRouteLabel(); + // edge added, then return true + return true; + } else { + // check if clicked edge is in the candidate edges + for (const auto& i : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + if (i == edge) { + // restore colors of outgoing edges + for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(nullptr); + } + } + // add new edge in the list of route edges + myRouteEdges.push_back(edge); + // set selected color in all edges + for (const auto& j : myRouteEdges) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateColor()); + } + } + // set new candidate colors + for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + if (j != edge) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateSelectedColor()); + } + } + } + // update route label + updateInfoRouteLabel(); + // edge added, then return true + return true; + } + } + // edge isn't a candidate edge, then return false + return false; + } +} + + +void +GNERouteFrame::NonConsecutiveEdges::createRoute() { + // create edge only if there is route edges + if (myRouteEdges.size() > 0) { + // cenerate Route ID + std::string routeID = myRouteFrameParent->getViewNet()->getNet()->generateDemandElementID(SUMO_TAG_ROUTE); + // create route + GNERoute* route = new GNERoute(myRouteFrameParent->getViewNet(), routeID, myRouteEdges, RGBColor::BLUE); + // add it into GNENet using GNEChange_DemandElement (to allow undo-redo) + myRouteFrameParent->getViewNet()->getUndoList()->p_begin("add " + route->getTagStr()); + myRouteFrameParent->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(route, true), true); + myRouteFrameParent->getViewNet()->getUndoList()->p_end(); + // abort route creation (because route it was already seleted and vector/colors has to be cleaned) + abortRouteCreation(); + } +} + + +void +GNERouteFrame::NonConsecutiveEdges::abortRouteCreation() { + // first check that there is route edges selected + if (myRouteEdges.size() > 0) { + // unblock undo/redo + myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo(); + // disable special color in candidate edges + for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(nullptr); + } + } + // disable special color in current route edges + for (const auto& j : myRouteEdges) { + for (const auto& k : j->getLanes()) { + k->setSpecialColor(nullptr); + } + } + // clear route edges + myRouteEdges.clear(); + // disable buttons + myCreateRouteButton->disable(); + myAbortCreationButton->disable(); + // update route label + updateInfoRouteLabel(); + // update view + myRouteFrameParent->getViewNet()->update(); + } +} + +long +GNERouteFrame::NonConsecutiveEdges::onCmdCreateRoute(FXObject*, FXSelector, void*) { + // create route + createRoute(); + return 1; +} + + +long +GNERouteFrame::NonConsecutiveEdges::onCmdAbortCreateRoute(FXObject*, FXSelector, void*) { + // abort route creation + abortRouteCreation(); + return 1; +} + + +void +GNERouteFrame::NonConsecutiveEdges::updateInfoRouteLabel() { + if (myRouteEdges.size() > 0) { + // declare variables for route info + double lenght = 0; + double speed = 0; + for (const auto& i : myRouteEdges) { + lenght += i->getNBEdge()->getLength(); + speed += i->getNBEdge()->getSpeed(); + } + // declare ostringstream for label and fill it + std::ostringstream information; + information + << "- Number of Edges: " << toString(myRouteEdges.size()) << "\n" + << "- Lenght: " << toString(lenght) << "\n" + << "- Average speed: " << toString(speed / myRouteEdges.size()); + // set new label + myInfoRouteLabel->setText(information.str().c_str()); + } else { + myInfoRouteLabel->setText("No edges selected"); + } +} + +// --------------------------------------------------------------------------- +// GNERouteFrame - methods +// --------------------------------------------------------------------------- + +GNERouteFrame::GNERouteFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) : + GNEFrame(horizontalFrameParent, viewNet, "Routes") { + + // create route mode Selector modul + myRouteModeSelector = new RouteModeSelector(this); + + // create consecutive edges modul + myConsecutiveEdges = new ConsecutiveEdges(this); + + // create non consecutive edges modul + myNonConsecutiveEdges = new NonConsecutiveEdges(this); + + // set ROUTEMODE_CONSECUTIVE_EDGES as default mode + myRouteModeSelector->setCurrentRouteMode(ROUTEMODE_CONSECUTIVE_EDGES); +} + + +GNERouteFrame::~GNERouteFrame() {} + + +void +GNERouteFrame::show() { + + GNEFrame::show(); +} + + +void +GNERouteFrame::hide() { + + GNEFrame::hide(); +} + + +void +GNERouteFrame::handleEdgeClick(GNEEdge* clickedEdge) { + // make sure that Edge exist + if (clickedEdge) { + switch (myRouteModeSelector->getCurrenRouteMode()) { + case ROUTEMODE_CONSECUTIVE_EDGES: + // check if edge can be inserted in consecutive edges modul modul + if (myConsecutiveEdges->addEdgeIntoRoute(clickedEdge)) { + WRITE_DEBUG("Edge added in ConsecutiveEdges mode"); + } else { + WRITE_DEBUG("Edge wasn't added in ConsecutiveEdges mode"); + } + break; + case ROUTEMODE_NONCONSECUTIVE_EDGES: + // check if edge can be inserted in non consecutive edges modul modul + if (myNonConsecutiveEdges->addEdgeIntoRoute(clickedEdge)) { + WRITE_DEBUG("Edge added in NonConsecutiveEdges mode"); + } else { + WRITE_DEBUG("Edge wasn't added in NonConsecutiveEdges mode"); + } + break; + default: + break; + } + } +} + + +void +GNERouteFrame::hotKeyEnter() { + switch (myRouteModeSelector->getCurrenRouteMode()) { + case ROUTEMODE_CONSECUTIVE_EDGES: + myConsecutiveEdges->createRoute(); + break; + case ROUTEMODE_NONCONSECUTIVE_EDGES: + myNonConsecutiveEdges->createRoute(); + break; + default: + break; + } +} + + +void +GNERouteFrame::hotKeyEsc() { + switch (myRouteModeSelector->getCurrenRouteMode()) { + case ROUTEMODE_CONSECUTIVE_EDGES: + myConsecutiveEdges->abortRouteCreation(); + break; + case ROUTEMODE_NONCONSECUTIVE_EDGES: + myNonConsecutiveEdges->abortRouteCreation(); + break; + default: + break; + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNERouteFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNERouteFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNERouteFrame.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNERouteFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,253 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNERouteFrame.h +/// @author Pablo Alvarez Lopez +/// @date Dec 2016 +/// @version $Id$ +/// +// The Widget for create route elements +/****************************************************************************/ +#ifndef GNERouteFrame_h +#define GNERouteFrame_h + +// =========================================================================== +// included modules +// =========================================================================== +#include "GNEFrame.h" + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNERouteFrame + * The Widget for create route elements + */ +class GNERouteFrame : public GNEFrame { + +public: + + /// @brief route creation modes + enum RouteMode { + ROUTEMODE_INVALID, // invalid RouteMode + ROUTEMODE_CONSECUTIVE_EDGES, // Create route clicking over consecutive edges + ROUTEMODE_NONCONSECUTIVE_EDGES // Create route clicking over non consecutive edges + }; + + // =========================================================================== + // class RouteModeSelector + // =========================================================================== + + class RouteModeSelector : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNERouteFrame::RouteModeSelector) + + public: + /// @brief constructor + RouteModeSelector(GNERouteFrame* routeFrameParent); + + /// @brief destructor + ~RouteModeSelector(); + + /// @brief get current route mode + const RouteMode& getCurrenRouteMode() const; + + /// @brief set current route mode type manually + void setCurrentRouteMode(RouteMode routemode); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user select another route mode in ComboBox + long onCmdSelectRouteMode(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + RouteModeSelector() {} + + private: + /// @brief pointer to Frame Parent + GNERouteFrame* myRouteFrameParent; + + /// @brief comboBox with the list of route modes + FXComboBox* myTypeMatchBox; + + /// @brief current selected route mode + RouteMode myCurrentRouteMode; + + /// @brief list of Route modes that will be shown in Match Box + std::vector > myRouteModesStrings; + }; + + // =========================================================================== + // class ConsecutiveEdges + // =========================================================================== + + class ConsecutiveEdges : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNERouteFrame::ConsecutiveEdges) + + public: + /// @brief constructor + ConsecutiveEdges(GNERouteFrame* routeFrameParent); + + /// @brief destructor + ~ConsecutiveEdges(); + + /// @brief show ConsecutiveEdges modul + void showConsecutiveEdgesModul(); + + /// @brief hide ConsecutiveEdges modul + void hideConsecutiveEdgesModul(); + + /// @brief add edge to current route (note: edge must be included in set of candidate edges + bool addEdgeIntoRoute(GNEEdge* edge); + + /// @brief create route with the current edges + void createRoute(); + + /// @brief abort creation of current route + void abortRouteCreation(); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user press create route button + long onCmdCreateRoute(FXObject*, FXSelector, void*); + + /// @brief Called when the user press create route button + long onCmdAbortCreateRoute(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + ConsecutiveEdges() {} + + /// @brief update InfoRouteLabel + void updateInfoRouteLabel(); + + private: + /// @brief pointer to Frame Parent + GNERouteFrame* myRouteFrameParent; + + /// @brief label with route info + FXLabel* myInfoRouteLabel; + + /// @brief FXButton for create routes + FXButton* myCreateRouteButton; + + /// @bief FXButton for abort creating route + FXButton* myAbortCreationButton; + + /// @brief vector with current route edges + std::vector myRouteEdges; + }; + + // =========================================================================== + // class NonConsecutiveEdges + // =========================================================================== + + class NonConsecutiveEdges : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNERouteFrame::NonConsecutiveEdges) + + public: + /// @brief constructor + NonConsecutiveEdges(GNERouteFrame* routeFrameParent); + + /// @brief destructor + ~NonConsecutiveEdges(); + + /// @brief show ConsecutiveEdges modul + void showNonConsecutiveEdgesModul(); + + /// @brief hide ConsecutiveEdges modul + void hideNonConsecutiveEdgesModul(); + + /// @brief add edge to current route (note: edge must be included in set of candidate edges + bool addEdgeIntoRoute(GNEEdge* edge); + + /// @brief create route with the current edges + void createRoute(); + + /// @brief abort creation of current route + void abortRouteCreation(); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user press create route button + long onCmdCreateRoute(FXObject*, FXSelector, void*); + + /// @brief Called when the user press create route button + long onCmdAbortCreateRoute(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + NonConsecutiveEdges() {} + + /// @brief update InfoRouteLabel + void updateInfoRouteLabel(); + + private: + /// @brief pointer to Frame Parent + GNERouteFrame* myRouteFrameParent; + + /// @brief label with route info + FXLabel* myInfoRouteLabel; + + /// @brief FXButton for create routes + FXButton* myCreateRouteButton; + + /// @bief FXButton for abort creating route + FXButton* myAbortCreationButton; + + /// @brief vector with current route edges + std::vector myRouteEdges; + }; + + /**@brief Constructor + * @brief parent FXHorizontalFrame in which this GNEFrame is placed + * @brief viewNet viewNet that uses this GNEFrame + */ + GNERouteFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet); + + /// @brief Destructor + ~GNERouteFrame(); + + /// @brief show delete frame + void show(); + + /// @brief hide delete frame + void hide(); + + /// @brief handle edge click + void handleEdgeClick(GNEEdge* clickedEdge); + + /// @brief function called when user press ENTER key + void hotKeyEnter(); + + /// @brief function called when user press ESC key + void hotKeyEsc(); + +private: + /// @brief route mode selector + RouteModeSelector* myRouteModeSelector; + + /// @brief Create routes using consecutive edges modul + ConsecutiveEdges* myConsecutiveEdges; + + /// @brief Create routes using non consecutive edges modul + NonConsecutiveEdges* myNonConsecutiveEdges; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNESelectorFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNESelectorFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNESelectorFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNESelectorFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -104,6 +105,7 @@ FXGroupBox* selectionHintGroupBox = new FXGroupBox(myContentFrame, "Information", GUIDesignGroupBoxFrame); // Create Selection Hint new FXLabel(selectionHintGroupBox, " - Hold for \n rectangle selection.\n - Press to\n delete selected items.", nullptr, GUIDesignLabelFrameInformation); + } @@ -112,6 +114,10 @@ void GNESelectorFrame::show() { + // show Type Entries depending of current supermode + myLockGLObjectTypes->showTypeEntries(); + // refresh element set + myElementSet->refreshElementSet(); // Show frame GNEFrame::show(); } @@ -124,17 +130,12 @@ } -GNESelectorFrame::LockGLObjectTypes* -GNESelectorFrame::getLockGLObjectTypes() const { - return myLockGLObjectTypes; -} - - void GNESelectorFrame::clearCurrentSelection() const { // for clear selection, simply change all GNE_ATTR_SELECTED attribute of current selected elements myViewNet->getUndoList()->p_begin("clear selection"); - std::vector selectedAC = myViewNet->getNet()->getSelectedAttributeCarriers(); + // obtain selected ACs depending of current supermode + std::vector selectedAC = myViewNet->getNet()->getSelectedAttributeCarriers(false); // change attribute GNE_ATTR_SELECTED of all selected items to false for (auto i : selectedAC) { i->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList()); @@ -154,7 +155,10 @@ std::set > ACToUnselect; // in restrict AND replace mode all current selected attribute carriers will be unselected if ((setOperation == ModificationMode::SET_REPLACE) || (setOperation == ModificationMode::SET_RESTRICT)) { - for (auto i : myViewNet->getNet()->getSelectedAttributeCarriers()) { + // obtain selected ACs depending of current supermode + std::vector selectedAC = myViewNet->getNet()->getSelectedAttributeCarriers(false); + // add id into ACs to unselect + for (auto i : selectedAC) { ACToUnselect.insert(std::pair(i->getID(), i)); } } @@ -232,6 +236,12 @@ } +GNESelectorFrame::LockGLObjectTypes* +GNESelectorFrame::getLockGLObjectTypes() const { + return myLockGLObjectTypes; +} + + std::vector GNESelectorFrame::getMatches(SumoXMLTag ACTag, SumoXMLAttr ACAttr, char compOp, double val, const std::string& expr) { std::vector result; @@ -296,49 +306,69 @@ // --------------------------------------------------------------------------- GNESelectorFrame::LockGLObjectTypes::LockGLObjectTypes(GNESelectorFrame* selectorFrameParent) : - FXGroupBox(selectorFrameParent->myContentFrame, "Selected items", GUIDesignGroupBoxFrame), + FXGroupBox(selectorFrameParent->myContentFrame, "Locked selected items", GUIDesignGroupBoxFrame), mySelectorFrameParent(selectorFrameParent) { // create a matrix for TypeEntries FXMatrix* matrixLockGLObjectTypes = new FXMatrix(this, 3, GUIDesignMatrixLockGLTypes); - // create typeEntries for the different elements - myTypeEntries[GLO_JUNCTION] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Junctions"); - myTypeEntries[GLO_EDGE] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Edges"); - myTypeEntries[GLO_LANE] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Lanes"); - myTypeEntries[GLO_CONNECTION] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Connections"); - myTypeEntries[GLO_ADDITIONAL] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Additionals"); - myTypeEntries[GLO_CROSSING] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Crossings"); - myTypeEntries[GLO_POLYGON] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Polygons"); - myTypeEntries[GLO_POI] = new ObjectTypeEntry(matrixLockGLObjectTypes, "POIs"); + // create typeEntries for the different Network elements + myTypeEntries[GLO_JUNCTION] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Junctions")); + myTypeEntries[GLO_EDGE] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Edges")); + myTypeEntries[GLO_LANE] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Lanes")); + myTypeEntries[GLO_CONNECTION] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Connections")); + myTypeEntries[GLO_ADDITIONAL] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Additionals")); + myTypeEntries[GLO_CROSSING] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Crossings")); + myTypeEntries[GLO_POLYGON] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Polygons")); + myTypeEntries[GLO_POI] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "POIs")); + // create typeEntries for the different Demand elements + myTypeEntries[GLO_ROUTE] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Routes")); + myTypeEntries[GLO_VEHICLE] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Vehicles")); + myTypeEntries[GLO_FLOW] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Flows")); + myTypeEntries[GLO_TRIP] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Trips")); } GNESelectorFrame::LockGLObjectTypes::~LockGLObjectTypes() { // remove all type entries - for (auto i : myTypeEntries) { - delete i.second; + for (const auto& i : myTypeEntries) { + delete i.second.second; } } -void +void GNESelectorFrame::LockGLObjectTypes::addedLockedObject(const GUIGlObjectType type) { - myTypeEntries.at(type)->counterUp(); + myTypeEntries.at(type).second->counterUp(); } -void +void GNESelectorFrame::LockGLObjectTypes::removeLockedObject(const GUIGlObjectType type) { - myTypeEntries.at(type)->counterDown(); + myTypeEntries.at(type).second->counterDown(); } bool GNESelectorFrame::LockGLObjectTypes::IsObjectTypeLocked(const GUIGlObjectType type) const { if ((type >= 100) && (type < 199)) { - return myTypeEntries.at(GLO_ADDITIONAL)->isGLTypeLocked(); + return myTypeEntries.at(GLO_ADDITIONAL).second->isGLTypeLocked(); } else { - return myTypeEntries.at(type)->isGLTypeLocked(); + return myTypeEntries.at(type).second->isGLTypeLocked(); + } +} + + +void +GNESelectorFrame::LockGLObjectTypes::showTypeEntries() { + for (const auto& i : myTypeEntries) { + // showr or hidde type entries depending of current supermode + if (i.second.first == mySelectorFrameParent->getViewNet()->getEditModes().currentSupermode) { + i.second.second->showObjectTypeEntry(); + } else { + i.second.second->hideObjectTypeEntry(); + } } + // recalc frame parent + recalc(); } @@ -347,26 +377,42 @@ myCounter(0) { // create elements myLabelCounter = new FXLabel(matrixParent, "0", nullptr, GUIDesignLabelLeft); - myLabelTypeName = new FXLabel(matrixParent, label.c_str(), nullptr, GUIDesignLabelLeft); - myCheckBoxLocked = new FXMenuCheck(matrixParent, "Unlocked", this, MID_GNE_SET_ATTRIBUTE, LAYOUT_FILL_X | LAYOUT_RIGHT); + myLabelTypeName = new FXLabel(matrixParent, (label + " ").c_str(), nullptr, GUIDesignLabelLeft); + myCheckBoxLocked = new FXCheckButton(matrixParent, "unlocked", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButtonLeft); } -void +void +GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::showObjectTypeEntry() { + myLabelCounter->show(); + myLabelTypeName->show(); + myCheckBoxLocked->show(); +} + + +void +GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::hideObjectTypeEntry() { + myLabelCounter->hide(); + myLabelTypeName->hide(); + myCheckBoxLocked->hide(); +} + + +void GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::counterUp() { myCounter++; myLabelCounter->setText(toString(myCounter).c_str()); } -void +void GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::counterDown() { myCounter--; myLabelCounter->setText(toString(myCounter).c_str()); } -bool +bool GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::isGLTypeLocked() const { return (myCheckBoxLocked->getCheck() == TRUE); } @@ -374,10 +420,10 @@ long GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::onCmdSetCheckBox(FXObject*, FXSelector, void*) { - if(myCheckBoxLocked->getCheck() == TRUE) { - myCheckBoxLocked->setText("Locked"); + if (myCheckBoxLocked->getCheck() == TRUE) { + myCheckBoxLocked->setText("locked"); } else { - myCheckBoxLocked->setText("Unlocked"); + myCheckBoxLocked->setText("unlocked"); } return 1; } @@ -457,10 +503,6 @@ myCurrentElementSet(ELEMENTSET_NETELEMENT) { // Create MatchTagBox for tags and fill it mySetComboBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_CHOOSEN_ELEMENTS, GUIDesignComboBox); - mySetComboBox->appendItem("Net Element"); - mySetComboBox->appendItem("Additional"); - mySetComboBox->appendItem("Shape"); - mySetComboBox->setNumVisible(mySetComboBox->getNumItems()); } @@ -473,28 +515,61 @@ } +void +GNESelectorFrame::ElementSet::refreshElementSet() { + // first clear item + mySetComboBox->clearItems(); + // now fill elements depending of supermode + if (mySelectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) { + mySetComboBox->appendItem("Net Element"); + mySetComboBox->appendItem("Additional"); + mySetComboBox->appendItem("Shape"); + } else { + mySetComboBox->appendItem("Demand Element"); + } + mySetComboBox->setNumVisible(mySetComboBox->getNumItems()); + // update rest of elements + onCmdSelectElementSet(0, 0, 0); +} + + long GNESelectorFrame::ElementSet::onCmdSelectElementSet(FXObject*, FXSelector, void*) { - if (mySetComboBox->getText() == "Net Element") { - myCurrentElementSet = ELEMENTSET_NETELEMENT; - mySetComboBox->setTextColor(FXRGB(0, 0, 0)); - // enable match attribute - mySelectorFrameParent->myMatchAttribute->enableMatchAttribute(); - } else if (mySetComboBox->getText() == "Additional") { - myCurrentElementSet = ELEMENTSET_ADDITIONAL; - mySetComboBox->setTextColor(FXRGB(0, 0, 0)); - // enable match attribute - mySelectorFrameParent->myMatchAttribute->enableMatchAttribute(); - } else if (mySetComboBox->getText() == "Shape") { - myCurrentElementSet = ELEMENTSET_SHAPE; - mySetComboBox->setTextColor(FXRGB(0, 0, 0)); - // enable match attribute - mySelectorFrameParent->myMatchAttribute->enableMatchAttribute(); - } else { - myCurrentElementSet = ELEMENTSET_INVALID; - mySetComboBox->setTextColor(FXRGB(255, 0, 0)); - // disable match attribute - mySelectorFrameParent->myMatchAttribute->disableMatchAttribute(); + // check depending of current supermode + if (mySelectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) { + if (mySetComboBox->getText() == "Net Element") { + myCurrentElementSet = ELEMENTSET_NETELEMENT; + mySetComboBox->setTextColor(FXRGB(0, 0, 0)); + // enable match attribute + mySelectorFrameParent->myMatchAttribute->enableMatchAttribute(); + } else if (mySetComboBox->getText() == "Additional") { + myCurrentElementSet = ELEMENTSET_ADDITIONAL; + mySetComboBox->setTextColor(FXRGB(0, 0, 0)); + // enable match attribute + mySelectorFrameParent->myMatchAttribute->enableMatchAttribute(); + } else if (mySetComboBox->getText() == "Shape") { + myCurrentElementSet = ELEMENTSET_SHAPE; + mySetComboBox->setTextColor(FXRGB(0, 0, 0)); + // enable match attribute + mySelectorFrameParent->myMatchAttribute->enableMatchAttribute(); + } else { + myCurrentElementSet = ELEMENTSET_INVALID; + mySetComboBox->setTextColor(FXRGB(255, 0, 0)); + // disable match attribute + mySelectorFrameParent->myMatchAttribute->disableMatchAttribute(); + } + } else { + if (mySetComboBox->getText() == "Demand Element") { + myCurrentElementSet = ELEMENTSET_DEMANDELEMENT; + mySetComboBox->setTextColor(FXRGB(0, 0, 0)); + // enable match attribute + mySelectorFrameParent->myMatchAttribute->enableMatchAttribute(); + } else { + myCurrentElementSet = ELEMENTSET_INVALID; + mySetComboBox->setTextColor(FXRGB(255, 0, 0)); + // disable match attribute + mySelectorFrameParent->myMatchAttribute->disableMatchAttribute(); + } } return 1; } @@ -540,11 +615,13 @@ // Set items depending of current item set std::vector listOfTags; if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_NETELEMENT) { - listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_NETELEMENT, true); + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_NETELEMENT, true); } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_ADDITIONAL) { - listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL, true); + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL | GNEAttributeCarrier::TagType::TAGTYPE_TAZ, true); } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_SHAPE) { - listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_SHAPE, true); + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_SHAPE, true); + } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_DEMANDELEMENT) { + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_DEMANDELEMENT | GNEAttributeCarrier::TagType::TAGTYPE_STOP, true); } else { throw ProcessError("Invalid element set"); } @@ -580,11 +657,13 @@ // find current element tag std::vector listOfTags; if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_NETELEMENT) { - listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_NETELEMENT, true); + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_NETELEMENT, true); } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_ADDITIONAL) { - listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL, true); + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL | GNEAttributeCarrier::TagType::TAGTYPE_TAZ, true); } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_SHAPE) { - listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_SHAPE, true); + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_SHAPE, true); + } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_DEMANDELEMENT) { + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_DEMANDELEMENT | GNEAttributeCarrier::TagType::TAGTYPE_STOP, true); } else { throw ProcessError("Unkown set"); } @@ -646,26 +725,45 @@ // obtain tag property (only for improve code legibility) const auto& tagValue = GNEAttributeCarrier::getTagProperties(myCurrentTag); // add an extra AttributeValues to allow select ACs using as criterium "generic parameters" - tagPropertiesCopy.addAttribute(GNE_ATTR_GENERIC, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING, "", ""); + GNEAttributeCarrier::AttributeProperties extraAttrProperty; + extraAttrProperty = GNEAttributeCarrier::AttributeProperties(GNE_ATTR_GENERIC, + GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING, + "Generic Parameters"); + tagPropertiesCopy.addAttribute(extraAttrProperty); // add extra attribute if item can block movement if (tagValue.canBlockMovement()) { // add an extra AttributeValues to allow select ACs using as criterium "block movement" - tagPropertiesCopy.addAttribute(GNE_ATTR_BLOCK_MOVEMENT, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL, "", "false"); + extraAttrProperty = GNEAttributeCarrier::AttributeProperties(GNE_ATTR_BLOCK_MOVEMENT, + GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL | GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_DEFAULTVALUE, + "Block movement", + "false"); + tagPropertiesCopy.addAttribute(extraAttrProperty); } // add extra attribute if item can block shape if (tagValue.canBlockShape()) { // add an extra AttributeValues to allow select ACs using as criterium "block shape" - tagPropertiesCopy.addAttribute(GNE_ATTR_BLOCK_SHAPE, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL, "", "false"); + extraAttrProperty = GNEAttributeCarrier::AttributeProperties(GNE_ATTR_BLOCK_SHAPE, + GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL | GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_DEFAULTVALUE, + "Block shape", + "false"); + tagPropertiesCopy.addAttribute(extraAttrProperty); } // add extra attribute if item can close shape if (tagValue.canCloseShape()) { // add an extra AttributeValues to allow select ACs using as criterium "close shape" - tagPropertiesCopy.addAttribute(GNE_ATTR_CLOSE_SHAPE, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL, "", "true"); + extraAttrProperty = GNEAttributeCarrier::AttributeProperties(GNE_ATTR_CLOSE_SHAPE, + GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL | GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_DEFAULTVALUE, + "Close shape", + "true"); + tagPropertiesCopy.addAttribute(extraAttrProperty); } // add extra attribute if item can have parent if (tagValue.hasParent()) { // add an extra AttributeValues to allow select ACs using as criterium "parent" - tagPropertiesCopy.addAttribute(GNE_ATTR_PARENT, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING, "", ""); + extraAttrProperty = GNEAttributeCarrier::AttributeProperties(GNE_ATTR_PARENT, + GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING, + "Parent element"); + tagPropertiesCopy.addAttribute(extraAttrProperty); } // set current selected attribute myCurrentAttribute = SUMO_ATTR_NOTHING; @@ -803,7 +901,7 @@ //mySelectionScaling->setNumberFormat(1); //mySelectionScaling->setIncrements(0.1, .5, 1); mySelectionScaling->setIncrement(0.5); - mySelectionScaling->setRange(1, 100); + mySelectionScaling->setRange(1, 100000); mySelectionScaling->setValue(1); mySelectionScaling->setHelpText("Enlarge selected objects"); } @@ -874,9 +972,12 @@ // obtain GNEAttributeCarrier GNEAttributeCarrier* AC = mySelectorFrameParent->getViewNet()->getNet()->retrieveAttributeCarrier(object->getGlID(), false); // check if AC exist and if is selectable - if (AC != nullptr) { - loadedACs.push_back(AC); - } + if (AC && AC->getTagProperty().isSelectable()) + // now check if we're in the correct supermode to load this element + if (((mySelectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && !AC->getTagProperty().isDemandElement()) || + ((mySelectorFrameParent->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && AC->getTagProperty().isDemandElement())) { + loadedACs.push_back(AC); + } } } } @@ -901,7 +1002,7 @@ } try { OutputDevice& dev = OutputDevice::getDevice(file.text()); - for (auto i : mySelectorFrameParent->myViewNet->getNet()->getSelectedAttributeCarriers()) { + for (auto i : mySelectorFrameParent->myViewNet->getNet()->getSelectedAttributeCarriers(false)) { GUIGlObject* object = dynamic_cast(i); if (object) { dev << GUIGlObject::TypeNames.getString(object->getType()) << ":" << i->getID() << "\n"; @@ -931,7 +1032,7 @@ long GNESelectorFrame::SelectionOperation::onCmdInvert(FXObject*, FXSelector, void*) { // first make a copy of current selected elements - std::vector copyOfSelectedAC = mySelectorFrameParent->getViewNet()->getNet()->getSelectedAttributeCarriers(); + std::vector copyOfSelectedAC = mySelectorFrameParent->getViewNet()->getNet()->getSelectedAttributeCarriers(false); // for invert selection, first clean current selection and next select elements of set "unselectedElements" mySelectorFrameParent->getViewNet()->getUndoList()->p_begin("invert selection"); // select junctions, edges, lanes connections and crossings @@ -941,7 +1042,7 @@ // due we iterate over all junctions, only it's neccesary iterate over incoming edges for (auto j : i->getGNEIncomingEdges()) { // only select edges if "select edges" flag is enabled. In other case, select only lanes - if (mySelectorFrameParent->getViewNet()->selectEdges()) { + if (mySelectorFrameParent->getViewNet()->getViewOptions().selectEdges()) { j->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList()); } else { for (auto k : j->getLanes()) { diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNESelectorFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNESelectorFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNESelectorFrame.h 2018-10-29 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNESelectorFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -50,15 +50,21 @@ /// @brief constructor ObjectTypeEntry(FXMatrix* matrixParent, const std::string& label); + /// @brief show ObjectTypeEntry + void showObjectTypeEntry(); + + /// @brief hide ObjectTypeEntry + void hideObjectTypeEntry(); + /// @brief up count void counterUp(); /// @brief down count void counterDown(); - + /// @brief check if current GLType is blocked bool isGLTypeLocked() const; - + /// @name FOX-callbacks /// @{ /// @brief called when user change the CheckBox @@ -78,7 +84,7 @@ FXLabel* myLabelTypeName; /// @brief check box to check if GLObject type is blocked - FXMenuCheck* myCheckBoxLocked; + FXCheckButton* myCheckBoxLocked; /// @brief counter int myCounter; @@ -99,12 +105,15 @@ /// @brief check if an object is locked bool IsObjectTypeLocked(const GUIGlObjectType type) const; + /// @brief show type Entries (depending if we're in Network or demand supermode) + void showTypeEntries(); + private: /// @brief pointer to Selector Frame Parent GNESelectorFrame* mySelectorFrameParent; /// @brief check boxes for type-based selection locking and selected object counts - std::map myTypeEntries; + std::map > myTypeEntries; }; // =========================================================================== @@ -176,10 +185,11 @@ public: /// @brief type of Set enum ElementSetType { - ELEMENTSET_NETELEMENT = 1, - ELEMENTSET_ADDITIONAL = 2, - ELEMENTSET_SHAPE = 3, - ELEMENTSET_INVALID = 4, + ELEMENTSET_NETELEMENT = 1, + ELEMENTSET_ADDITIONAL = 2, + ELEMENTSET_SHAPE = 3, + ELEMENTSET_DEMANDELEMENT = 4, + ELEMENTSET_INVALID = 5, }; /// @brief constructor @@ -191,6 +201,11 @@ /// @brief get current selected element set ElementSetType getElementSet() const; + /// @brief refresh element set + void refreshElementSet(); + + /// @brief update current element set (called after + /// @name FOX-callbacks /// @{ @@ -385,9 +400,6 @@ /// @brief hide Frame void hide(); - /// @brief get selected items - LockGLObjectTypes* getLockGLObjectTypes() const; - /// @brief clear current selection with possibility of undo/redo void clearCurrentSelection() const; @@ -396,6 +408,9 @@ */ void handleIDs(const std::vector& ACs, ModificationMode::SetOperation setop = ModificationMode::SET_DEFAULT); + /// @brief get selected items Modul + LockGLObjectTypes* getLockGLObjectTypes() const; + /// @brief get modification mode modul ModificationMode* getModificationModeModul() const; diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEStopFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEStopFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEStopFrame.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEStopFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,511 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEStopFrame.cpp +/// @author Pablo Alvarez Lopez +/// @date March 2019 +/// @version $Id$ +/// +// The Widget for add Stops elements +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEStopFrame.h" + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNEStopFrame::StopParentSelector) StopParentSelectorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_TYPE, GNEStopFrame::StopParentSelector::onCmdSelectStopParent), +}; + +// Object implementation +FXIMPLEMENT(GNEStopFrame::StopParentSelector, FXGroupBox, StopParentSelectorMap, ARRAYNUMBER(StopParentSelectorMap)) + +// =========================================================================== +// method definitions +// =========================================================================== + +// --------------------------------------------------------------------------- +// GNEStopFrame::StopParentSelector - methods +// --------------------------------------------------------------------------- + +GNEStopFrame::StopParentSelector::StopParentSelector(GNEStopFrame* StopFrameParent) : + FXGroupBox(StopFrameParent->myContentFrame, "Stop parent", GUIDesignGroupBoxFrame), + myStopFrameParent(StopFrameParent), + myCurrentStopParent(nullptr) { + // Create FXComboBox + myStopParentMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_TYPE, GUIDesignComboBox); + // create information label + new FXLabel(this, "- Shift + Click to select\nanother stop parent", 0, GUIDesignLabelFrameInformation); + // StopParentSelector is always shown + show(); +} + + +GNEStopFrame::StopParentSelector::~StopParentSelector() {} + + +GNEDemandElement* +GNEStopFrame::StopParentSelector::getCurrentStopParent() const { + return myCurrentStopParent; +} + + +void +GNEStopFrame::StopParentSelector::setStopParent(GNEDemandElement* stopParent) { + // update stopParentMatchBox + myStopParentMatchBox->setText(stopParent->getID().c_str()); + onCmdSelectStopParent(nullptr, 0, nullptr); +} + + +void +GNEStopFrame::StopParentSelector::showStopParentSelector() { + // refresh stop parent selector + refreshStopParentSelector(); + // show VType selector + show(); +} + + +void +GNEStopFrame::StopParentSelector::hideStopParentSelector() { + hide(); +} + + +void +GNEStopFrame::StopParentSelector::refreshStopParentSelector() { + // clear comboBox and show + myStopParentMatchBox->clearItems(); + myStopParentMatchBox->show(); + myStopParentCandidates.clear(); + // reserve stop parent cantidadtes + myStopParentCandidates.reserve( + myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).size() + + myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VEHICLE).size() + + myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_FLOW).size() + + myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_TRIP).size()); + // fill myStopParentMatchBox with list of routes + for (const auto& i : myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE)) { + myStopParentMatchBox->appendItem(i.first.c_str()); + myStopParentCandidates.push_back(i.second); + } + // fill myStopParentMatchBox with list of vehicles + for (const auto& i : myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VEHICLE)) { + myStopParentMatchBox->appendItem(i.first.c_str()); + myStopParentCandidates.push_back(i.second); + } + // fill myStopParentMatchBox with list of flows + for (const auto& i : myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_FLOW)) { + myStopParentMatchBox->appendItem(i.first.c_str()); + myStopParentCandidates.push_back(i.second); + } + // fill myStopParentMatchBox with list of trips + for (const auto& i : myStopFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_TRIP)) { + myStopParentMatchBox->appendItem(i.first.c_str()); + myStopParentCandidates.push_back(i.second); + } + // Set visible items + if ((int)myStopParentMatchBox->getNumItems() < 20) { + myStopParentMatchBox->setNumVisible((int)myStopParentMatchBox->getNumItems()); + } else { + myStopParentMatchBox->setNumVisible(20); + } + // if myCurrentStopParent is nullptr but there ist myStopParentCandidates, set the first candidate as myCurrentStopParent + if ((myCurrentStopParent == nullptr) && (myStopParentCandidates.size() > 0)) { + myCurrentStopParent = myStopParentCandidates.front(); + } + // check if myCurrentStopParent exists + bool found = false; + for (int i = 0; i < (int)myStopParentCandidates.size(); i++) { + if (myStopParentCandidates.at(i) == myCurrentStopParent) { + myStopParentMatchBox->setCurrentItem(i); + found = true; + } + } + // show moduls depending of found + if (found) { + myStopFrameParent->myStopTypeSelector->showItemSelector(true); + } else { + // disable combo box and moduls if there isn't candidate stop parents in net + if (myStopParentCandidates.size() > 0) { + myStopParentMatchBox->setCurrentItem(0, TRUE); + } else { + myStopParentMatchBox->hide(); + myStopFrameParent->myStopTypeSelector->hideItemSelector(); + } + } +} + + +long +GNEStopFrame::StopParentSelector::onCmdSelectStopParent(FXObject*, FXSelector, void*) { + // Check if value of myStopParentMatchBox correspond to a existent stop parent candidate + for (int i = 0; i < (int)myStopParentCandidates.size(); i++) { + if (myStopParentCandidates.at(i)->getID() == myStopParentMatchBox->getText().text()) { + // set color of myStopParentMatchBox to black (valid) + myStopParentMatchBox->setTextColor(FXRGB(0, 0, 0)); + // Set new current VType + myCurrentStopParent = myStopParentCandidates.at(i); + // show Stop selector, attributes and help creation moduls + myStopFrameParent->myStopTypeSelector->showItemSelector(true); + // Write Warning in console if we're in testing mode + WRITE_DEBUG(("Selected item '" + myStopParentMatchBox->getText() + "' in StopParentSelector").text()); + return 1; + } + } + // if VType selecte is invalid, select + myCurrentStopParent = nullptr; + // hide all moduls if selected item isn't valid + myStopFrameParent->myStopTypeSelector->hideItemSelector(); + // set color of myStopParentMatchBox to red (invalid) + myStopParentMatchBox->setTextColor(FXRGB(255, 0, 0)); + // Write Warning in console if we're in testing mode + WRITE_DEBUG("Selected invalid item in StopParentSelector"); + return 1; +} + +// --------------------------------------------------------------------------- +// GNEStopFrame::HelpCreation - methods +// --------------------------------------------------------------------------- + +GNEStopFrame::HelpCreation::HelpCreation(GNEStopFrame* StopFrameParent) : + FXGroupBox(StopFrameParent->myContentFrame, "Help", GUIDesignGroupBoxFrame), + myStopFrameParent(StopFrameParent) { + myInformationLabel = new FXLabel(this, "", 0, GUIDesignLabelFrameInformation); +} + + +GNEStopFrame::HelpCreation::~HelpCreation() {} + + +void +GNEStopFrame::HelpCreation::showHelpCreation() { + // first update help cration + updateHelpCreation(); + // show modul + show(); +} + + +void +GNEStopFrame::HelpCreation::hideHelpCreation() { + hide(); +} + + +void +GNEStopFrame::HelpCreation::updateHelpCreation() { + // create information label + std::ostringstream information; + // set text depending of selected Stop type + switch (myStopFrameParent->myStopTypeSelector->getCurrentTagProperties().getTag()) { + case SUMO_TAG_STOP_BUSSTOP: + information + << "- Click over a bus stop\n" + << " to create a stop."; + break; + case SUMO_TAG_STOP_CONTAINERSTOP: + information + << "- Click over a container stop\n" + << " to create a stop."; + break; + case SUMO_TAG_STOP_CHARGINGSTATION: + information + << "- Click over a charging \n" + << " station to create a stop."; + break; + case SUMO_TAG_STOP_PARKINGAREA: + information + << "- Click over a parking area\n" + << " to create a stop."; + break; + case SUMO_TAG_STOP_LANE: + information + << "- Click over a lane to\n" + << " create a stop."; + break; + default: + break; + } + // set information label + myInformationLabel->setText(information.str().c_str()); +} + +// --------------------------------------------------------------------------- +// GNEStopFrame - methods +// --------------------------------------------------------------------------- + +GNEStopFrame::GNEStopFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) : + GNEFrame(horizontalFrameParent, viewNet, "Stops") { + + // Create Stop parent selector + myStopParentSelector = new StopParentSelector(this); + + // Create item Selector modul for Stops + myStopTypeSelector = new ItemSelector(this, GNEAttributeCarrier::TagType::TAGTYPE_STOP); + + // Create Stop parameters + myStopAttributes = new AttributesCreator(this); + + // Create Netedit parameter + myNeteditAttributes = new NeteditAttributes(this); + + // Create Help Creation Modul + myHelpCreation = new HelpCreation(this); + + // refresh myStopParentMatchBox + myStopParentSelector->refreshStopParentSelector(); +} + + +GNEStopFrame::~GNEStopFrame() {} + + +void +GNEStopFrame::show() { + // refresh vType selector + myStopParentSelector->refreshStopParentSelector(); + // refresh item selector + myStopTypeSelector->refreshTagProperties(); + // show frame + GNEFrame::show(); +} + + +bool +GNEStopFrame::addStop(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool shiftPressed) { + // check if we're selecting a new stop parent + if (shiftPressed) { + if (objectsUnderCursor.getDemandElementFront() && + (objectsUnderCursor.getDemandElementFront()->getTagProperty().isVehicle() || objectsUnderCursor.getDemandElementFront()->getTagProperty().getTag() == SUMO_TAG_ROUTE)) { + myStopParentSelector->setStopParent(objectsUnderCursor.getDemandElementFront()); + WRITE_WARNING("Selected " + objectsUnderCursor.getDemandElementFront()->getTagStr() + " '" + objectsUnderCursor.getDemandElementFront()->getID() + "' as stop parent."); + return true; + } else { + WRITE_WARNING("Selected Stop parent isn't valid."); + return false; + } + + } else { + // now check if stop parent selector is valid + if (myStopParentSelector->getCurrentStopParent() == nullptr) { + WRITE_WARNING("Current selected Stop parent isn't valid."); + return false; + } + + // obtain tag (only for improve code legibility) + SumoXMLTag stopTag = myStopTypeSelector->getCurrentTagProperties().getTag(); + + // declare a Stop + SUMOVehicleParameter::Stop stopParameter; + + // first check that current selected Stop is valid + if (stopTag == SUMO_TAG_NOTHING) { + WRITE_WARNING("Current selected Stop type isn't valid."); + return false; + } else if (stopTag == SUMO_TAG_STOP_LANE) { + if (objectsUnderCursor.getLaneFront()) { + stopParameter.lane = objectsUnderCursor.getLaneFront()->getID(); + } else { + WRITE_WARNING("Click over a lane to create a stop placed in a lane"); + return false; + } + } else if (objectsUnderCursor.getAdditionalFront()) { + if (objectsUnderCursor.getAdditionalFront()->getTagProperty().getTag() == SUMO_TAG_BUS_STOP) { + if (stopTag != SUMO_TAG_STOP_BUSSTOP) { + WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a busstop"); + return false; + } else { + stopParameter.busstop = objectsUnderCursor.getAdditionalFront()->getID(); + stopParameter.startPos = 0; + stopParameter.endPos = 0; + } + } else if (objectsUnderCursor.getAdditionalFront()->getTagProperty().getTag() == SUMO_TAG_CONTAINER_STOP) { + if (stopTag != SUMO_TAG_STOP_CONTAINERSTOP) { + WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a containerStop"); + return false; + } else { + stopParameter.containerstop = objectsUnderCursor.getAdditionalFront()->getID(); + stopParameter.startPos = 0; + stopParameter.endPos = 0; + } + } else if (objectsUnderCursor.getAdditionalFront()->getTagProperty().getTag() == SUMO_TAG_CHARGING_STATION) { + if (stopTag != SUMO_TAG_STOP_CHARGINGSTATION) { + WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a chargingStation"); + return false; + } else { + stopParameter.chargingStation = objectsUnderCursor.getAdditionalFront()->getID(); + stopParameter.startPos = 0; + stopParameter.endPos = 0; + } + } else if (objectsUnderCursor.getAdditionalFront()->getTagProperty().getTag() == SUMO_TAG_PARKING_AREA) { + if (stopTag != SUMO_TAG_STOP_PARKINGAREA) { + WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a parkingArea"); + return false; + } else { + stopParameter.parkingarea = objectsUnderCursor.getAdditionalFront()->getID(); + stopParameter.startPos = 0; + stopParameter.endPos = 0; + } + } + } else { + if (stopTag == SUMO_TAG_STOP_BUSSTOP) { + WRITE_WARNING("Click over a busStop to create a stop placed in a busstop"); + return false; + } else if (stopTag != SUMO_TAG_STOP_CONTAINERSTOP) { + WRITE_WARNING("Click over a containerStop to create a stop placed in a containerStop"); + return false; + } else if (stopTag != SUMO_TAG_CHARGING_STATION) { + WRITE_WARNING("Click over a chargingStation to create a stop placed in a chargingStation"); + return false; + } else if (stopTag != SUMO_TAG_STOP_PARKINGAREA) { + WRITE_WARNING("Click over a parkingArea to create a stop placed in a parkingArea"); + return false; + } + } + + // check if stop attributes are valid + if (!myStopAttributes->areValuesValid()) { + myStopAttributes->showWarningMessage(); + return false; + } + + // declare map to keep attributes from Frames from Frame + std::map valuesMap = myStopAttributes->getAttributesAndValues(false); + + // generate ID + valuesMap[SUMO_ATTR_ID] = myViewNet->getNet()->generateDemandElementID(stopTag); + + // add netedit values + if (!stopParameter.lane.empty()) { + myNeteditAttributes->getNeteditAttributesAndValues(valuesMap, objectsUnderCursor.getLaneFront()); + // check if start position can be parsed + if (GNEAttributeCarrier::canParse(valuesMap[SUMO_ATTR_STARTPOS])) { + stopParameter.startPos = GNEAttributeCarrier::parse(valuesMap[SUMO_ATTR_STARTPOS]); + stopParameter.parametersSet |= STOP_START_SET; + } + // check if end position can be parsed + if (GNEAttributeCarrier::canParse(valuesMap[SUMO_ATTR_ENDPOS])) { + stopParameter.endPos = GNEAttributeCarrier::parse(valuesMap[SUMO_ATTR_ENDPOS]); + stopParameter.parametersSet |= STOP_END_SET; + } + } + + // obtain friendly position + bool friendlyPosition = false; + if (valuesMap.count(SUMO_ATTR_FRIENDLY_POS) > 0) { + friendlyPosition = GNEAttributeCarrier::parse(valuesMap.at(SUMO_ATTR_FRIENDLY_POS)); + } + + // fill rest of parameters depending if it was edited + if (valuesMap.count(SUMO_ATTR_DURATION) > 0) { + stopParameter.duration = string2time(valuesMap.at(SUMO_ATTR_DURATION)); + } else { + stopParameter.duration = string2time(GNEAttributeCarrier::getTagProperties(stopTag).getAttributeProperties(SUMO_ATTR_DURATION).getDefaultValue()); + } + if (valuesMap.count(SUMO_ATTR_UNTIL) > 0) { + stopParameter.until = string2time(valuesMap[SUMO_ATTR_UNTIL]); + } else { + stopParameter.until = string2time(GNEAttributeCarrier::getTagProperties(stopTag).getAttributeProperties(SUMO_ATTR_UNTIL).getDefaultValue()); + } + if (valuesMap.count(SUMO_ATTR_TRIGGERED) > 0) { + stopParameter.triggered = GNEAttributeCarrier::parse(valuesMap.at(SUMO_ATTR_TRIGGERED)); + stopParameter.parametersSet |= STOP_TRIGGER_SET; + } + if (valuesMap.count(SUMO_ATTR_CONTAINER_TRIGGERED) > 0) { + stopParameter.containerTriggered = GNEAttributeCarrier::parse(valuesMap.at(SUMO_ATTR_CONTAINER_TRIGGERED)); + stopParameter.parametersSet |= STOP_CONTAINER_TRIGGER_SET; + } + if (valuesMap.count(SUMO_ATTR_PARKING) > 0) { + stopParameter.parking = GNEAttributeCarrier::parse(valuesMap.at(SUMO_ATTR_PARKING)); + stopParameter.parametersSet |= STOP_PARKING_SET; + } + if (valuesMap.count(SUMO_ATTR_EXPECTED) > 0) { + stopParameter.awaitedPersons = GNEAttributeCarrier::parse >(valuesMap.at(SUMO_ATTR_EXPECTED)); + stopParameter.parametersSet |= STOP_EXPECTED_SET; + } + if (valuesMap.count(SUMO_ATTR_EXPECTED_CONTAINERS) > 0) { + stopParameter.awaitedContainers = GNEAttributeCarrier::parse >(valuesMap.at(SUMO_ATTR_EXPECTED_CONTAINERS)); + stopParameter.parametersSet |= STOP_EXPECTED_CONTAINERS_SET; + } + if (valuesMap.count(SUMO_ATTR_TRIP_ID) > 0) { + stopParameter.tripId = valuesMap.at(SUMO_ATTR_TRIP_ID); + stopParameter.parametersSet |= STOP_TRIP_ID_SET; + } + if (valuesMap.count(SUMO_ATTR_INDEX) > 0) { + if (valuesMap[SUMO_ATTR_INDEX] == "fit") { + stopParameter.index = STOP_INDEX_FIT; + } else if (valuesMap[SUMO_ATTR_INDEX] == "end") { + stopParameter.index = STOP_INDEX_END; + } else { + stopParameter.index = GNEAttributeCarrier::parse(valuesMap[SUMO_ATTR_INDEX]); + } + } else { + stopParameter.index = STOP_INDEX_END; + } + + // create it in RouteFrame + GNERouteHandler::buildStop(myViewNet, true, stopParameter, myStopParentSelector->getCurrentStopParent(), friendlyPosition); + + // stop sucesfully created, then return true + return true; + } +} + + +// =========================================================================== +// protected +// =========================================================================== + +void +GNEStopFrame::enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties) { + // show Stop type selector modul + myStopAttributes->showAttributesCreatorModul(tagProperties); + myNeteditAttributes->showNeteditAttributesModul(tagProperties); + myHelpCreation->showHelpCreation(); +} + + +void +GNEStopFrame::disableModuls() { + // hide all moduls if stop parent isn't valid + myStopAttributes->hideAttributesCreatorModul(); + myNeteditAttributes->hideNeteditAttributesModul(); + myHelpCreation->hideHelpCreation(); +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEStopFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEStopFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEStopFrame.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEStopFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,167 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEStopFrame.h +/// @author Pablo Alvarez Lopez +/// @date March 2019 +/// @version $Id$ +/// +// The Widget for add Stops elements +/****************************************************************************/ +#ifndef GNEStopFrame_h +#define GNEStopFrame_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include "GNEFrame.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEStopFrame + */ +class GNEStopFrame : public GNEFrame { + +public: + + // =========================================================================== + // class StopParentSelector + // =========================================================================== + + class StopParentSelector : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNEStopFrame::StopParentSelector) + + public: + /// @brief constructor + StopParentSelector(GNEStopFrame* StopFrameParent); + + /// @brief destructor + ~StopParentSelector(); + + /// @brief get current route + GNEDemandElement* getCurrentStopParent() const; + + /// @brief select StopParent manually + void setStopParent(GNEDemandElement* stopParent); + + /// @brief show VType selector + void showStopParentSelector(); + + /// @brief hide VType selector + void hideStopParentSelector(); + + /// @brief refresh VType selector + void refreshStopParentSelector(); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user select another element in ComboBox + long onCmdSelectStopParent(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + StopParentSelector() {} + + private: + /// @brief pointer to Stop Frame Parent + GNEStopFrame* myStopFrameParent; + + /// @brief comboBox with the list of routes + FXComboBox* myStopParentMatchBox; + + /// @brief current stop parent + GNEDemandElement* myCurrentStopParent; + + /// @brief list of posible candidates + std::vector myStopParentCandidates; + }; + + // =========================================================================== + // class HelpCreation + // =========================================================================== + + class HelpCreation : protected FXGroupBox { + + public: + /// @brief constructor + HelpCreation(GNEStopFrame* StopFrameParent); + + /// @brief destructor + ~HelpCreation(); + + /// @brief show HelpCreation + void showHelpCreation(); + + /// @brief hide HelpCreation + void hideHelpCreation(); + + /// @brief update HelpCreation + void updateHelpCreation(); + + private: + /// @brief pointer to Stop Frame Parent + GNEStopFrame* myStopFrameParent; + + /// @brief Label with creation information + FXLabel* myInformationLabel; + }; + + /**@brief Constructor + * @brief parent FXHorizontalFrame in which this GNEFrame is placed + * @brief viewNet viewNet that uses this GNEFrame + */ + GNEStopFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet); + + /// @brief Destructor + ~GNEStopFrame(); + + /// @brief show Frame + void show(); + + /**@brief add Stop element + * @param objectsUnderCursor collection of objects under cursor after click over view + * @param shiftPressed flag to check if during clicking shift key was pressed + * @return true if Stop was sucesfully added + */ + bool addStop(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool shiftPressed); + +protected: + /// @brief enable moduls depending of item selected in ItemSelector + void enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties); + + /// @brief disable moduls if element selected in itemSelector isn't valid + void disableModuls(); + +private: + /// @brief Stop parent selectors + StopParentSelector* myStopParentSelector; + + /// @brief item selector (used to select diffent kind of Stops) + ItemSelector* myStopTypeSelector; + + /// @brief internal Stop attributes + AttributesCreator* myStopAttributes; + + /// @brief Netedit parameter + NeteditAttributes* myNeteditAttributes; + + /// @brief Help creation + HelpCreation* myHelpCreation; +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNETAZFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNETAZFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNETAZFrame.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNETAZFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,13 +24,14 @@ #include #include #include +#include #include +#include #include #include #include #include -#include -#include +#include #include #include @@ -81,7 +82,7 @@ // GNETAZFrame::TAZCurrent - methods // --------------------------------------------------------------------------- -GNETAZFrame::TAZCurrent::TAZEdge::TAZEdge(TAZCurrent* TAZCurrentParent, GNEEdge* _edge, GNEAdditional *_TAZSource, GNEAdditional *_TAZSink) : +GNETAZFrame::TAZCurrent::TAZEdge::TAZEdge(TAZCurrent* TAZCurrentParent, GNEEdge* _edge, GNETAZSourceSink* _TAZSource, GNETAZSourceSink* _TAZSink) : edge(_edge), TAZSource(_TAZSource), TAZSink(_TAZSink), @@ -96,19 +97,18 @@ GNETAZFrame::TAZCurrent::TAZEdge::~TAZEdge() {} -void +void GNETAZFrame::TAZCurrent::TAZEdge::updateColors() { sourceColor = GNEAttributeCarrier::parse(TAZSource->getAttribute(GNE_ATTR_TAZCOLOR)); sinkColor = GNEAttributeCarrier::parse(TAZSink->getAttribute(GNE_ATTR_TAZCOLOR)); // Obtain Source+Sink needs more steps. First obtain Source+Sink Weight - double sourcePlusSinkWeight = GNEAttributeCarrier::parse(TAZSource->getAttribute(SUMO_ATTR_WEIGHT)) + - GNEAttributeCarrier::parse(TAZSink->getAttribute(SUMO_ATTR_WEIGHT)); + double sourcePlusSinkWeight = TAZSource->getDepartWeight() + TAZSink->getDepartWeight(); // avoid division between zero if ((myTAZCurrentParent->myMaxSourcePlusSinkWeight - myTAZCurrentParent->myMinSourcePlusSinkWeight) == 0) { sourcePlusSinkColor = 0; } else { // calculate percentage relative to the max and min Source+Sink weight - double percentage = (sourcePlusSinkWeight - myTAZCurrentParent->myMinSourcePlusSinkWeight) / + double percentage = (sourcePlusSinkWeight - myTAZCurrentParent->myMinSourcePlusSinkWeight) / (myTAZCurrentParent->myMaxSourcePlusSinkWeight - myTAZCurrentParent->myMinSourcePlusSinkWeight); // convert percentage to a value between [0-9] (because we have only 10 colors) if (percentage >= 1) { @@ -116,18 +116,17 @@ } else if (percentage < 0) { sourcePlusSinkColor = 0; } else { - sourcePlusSinkColor = (int)(percentage*10); + sourcePlusSinkColor = (int)(percentage * 10); } } // Obtain Source+Sink needs more steps. First obtain Source-Sink Weight - double sourceMinusSinkWeight = GNEAttributeCarrier::parse(TAZSource->getAttribute(SUMO_ATTR_WEIGHT)) - - GNEAttributeCarrier::parse(TAZSink->getAttribute(SUMO_ATTR_WEIGHT)); + double sourceMinusSinkWeight = TAZSource->getDepartWeight() - TAZSink->getDepartWeight(); // avoid division between zero if ((myTAZCurrentParent->myMaxSourceMinusSinkWeight - myTAZCurrentParent->myMinSourceMinusSinkWeight) == 0) { sourceMinusSinkColor = 0; } else { // calculate percentage relative to the max and min Source-Sink weight - double percentage = (sourceMinusSinkWeight - myTAZCurrentParent->myMinSourceMinusSinkWeight) / + double percentage = (sourceMinusSinkWeight - myTAZCurrentParent->myMinSourceMinusSinkWeight) / (myTAZCurrentParent->myMaxSourceMinusSinkWeight - myTAZCurrentParent->myMinSourceMinusSinkWeight); // convert percentage to a value between [0-9] (because we have only 10 colors) if (percentage >= 1) { @@ -135,13 +134,13 @@ } else if (percentage < 0) { sourceMinusSinkColor = 0; } else { - sourceMinusSinkColor = (int)(percentage*10); + sourceMinusSinkColor = (int)(percentage * 10); } } } -GNETAZFrame::TAZCurrent::TAZCurrent(GNETAZFrame* TAZFrameParent) : +GNETAZFrame::TAZCurrent::TAZCurrent(GNETAZFrame* TAZFrameParent) : FXGroupBox(TAZFrameParent->myContentFrame, "TAZ", GUIDesignGroupBoxFrame), myTAZFrameParent(TAZFrameParent), myEditedTAZ(nullptr), @@ -157,7 +156,7 @@ GNETAZFrame::TAZCurrent::~TAZCurrent() {} -void +void GNETAZFrame::TAZCurrent::setTAZ(GNETAZ* editedTAZ) { // set new current TAZ myEditedTAZ = editedTAZ; @@ -214,16 +213,16 @@ } -GNETAZ* +GNETAZ* GNETAZFrame::TAZCurrent::getTAZ() const { return myEditedTAZ; } -bool +bool GNETAZFrame::TAZCurrent::isTAZEdge(GNEEdge* edge) const { // simply iterate over edges and check edge parameter - for (const auto &i : myTAZEdges) { + for (const auto& i : myTAZEdges) { if (i.edge == edge) { return true; } @@ -245,13 +244,13 @@ } -const std::vector & +const std::vector& GNETAZFrame::TAZCurrent::getTAZEdges() const { return myTAZEdges; } -void +void GNETAZFrame::TAZCurrent::refreshTAZEdges() { // clear all curren TAZEdges myTAZEdges.clear(); @@ -263,11 +262,11 @@ // only refresh if we're editing an TAZ if (myEditedTAZ) { // iterate over additional childs and create TAZEdges - for (const auto &i : myEditedTAZ->getAdditionalChilds()) { - addTAZChild(i); + for (const auto& i : myEditedTAZ->getAdditionalChilds()) { + addTAZChild(dynamic_cast(i)); } // update colors after add all edges - for (auto &i : myTAZEdges) { + for (auto& i : myTAZEdges) { i.updateColors(); } // update edge colors @@ -276,30 +275,30 @@ } -void -GNETAZFrame::TAZCurrent::addTAZChild(GNEAdditional *additional) { +void +GNETAZFrame::TAZCurrent::addTAZChild(GNETAZSourceSink* sourceSink) { // first make sure that additional is an TAZ Source or Sink - if ((additional->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) || (additional->getTagProperty().getTag() == SUMO_TAG_TAZSINK)) { - GNEEdge *edge = myTAZFrameParent->myViewNet->getNet()->retrieveEdge(additional->getAttribute(SUMO_ATTR_EDGE)); + if (sourceSink && ((sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) || (sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSINK))) { + GNEEdge* edge = myTAZFrameParent->myViewNet->getNet()->retrieveEdge(sourceSink->getAttribute(SUMO_ATTR_EDGE)); // first check if TAZEdge has to be created bool createTAZEdge = true; - for (auto &i : myTAZEdges) { + for (auto& i : myTAZEdges) { if (i.edge == edge) { createTAZEdge = false; // update TAZ Source or Sink - if (additional->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) { - i.TAZSource = additional; + if (sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) { + i.TAZSource = sourceSink; } else { - i.TAZSink = additional; + i.TAZSink = sourceSink; } } } // check if additional has to be created if (createTAZEdge) { - if (additional->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) { - myTAZEdges.push_back(TAZEdge(this, edge, additional, nullptr)); + if (sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) { + myTAZEdges.push_back(TAZEdge(this, edge, sourceSink, nullptr)); } else { - myTAZEdges.push_back(TAZEdge(this, edge, nullptr, additional)); + myTAZEdges.push_back(TAZEdge(this, edge, nullptr, sourceSink)); } } // recalculate weights @@ -307,30 +306,28 @@ myMinSourcePlusSinkWeight = -1; myMaxSourceMinusSinkWeight = 0; myMinSourceMinusSinkWeight = -1; - for (auto &i : myTAZEdges) { + for (const auto& i : myTAZEdges) { // make sure that both TAZ Source and Sink exist if (i.TAZSource && i.TAZSink) { - // obtain source plus sink - double sourcePlusSink = GNEAttributeCarrier::parse(i.TAZSource->getAttribute(SUMO_ATTR_WEIGHT)) + - GNEAttributeCarrier::parse(i.TAZSink->getAttribute(SUMO_ATTR_WEIGHT)); + // obtain source plus sink + double sourcePlusSink = i.TAZSource->getDepartWeight() + i.TAZSink->getDepartWeight(); // check myMaxSourcePlusSinkWeight if (sourcePlusSink > myMaxSourcePlusSinkWeight) { - myMaxSourcePlusSinkWeight = sourcePlusSink; + myMaxSourcePlusSinkWeight = sourcePlusSink; } // check myMinSourcePlusSinkWeight if ((myMinSourcePlusSinkWeight == -1) || (sourcePlusSink < myMinSourcePlusSinkWeight)) { myMinSourcePlusSinkWeight = sourcePlusSink; } - // obtain source minus sink - double sourceMinusSink = GNEAttributeCarrier::parse(i.TAZSource->getAttribute(SUMO_ATTR_WEIGHT)) - - GNEAttributeCarrier::parse(i.TAZSink->getAttribute(SUMO_ATTR_WEIGHT)); + // obtain source minus sink + double sourceMinusSink = i.TAZSource->getDepartWeight() - i.TAZSink->getDepartWeight(); // use valor absolute if (sourceMinusSink < 0) { sourceMinusSink *= -1; } // check myMaxSourcePlusSinkWeight if (sourceMinusSink > myMaxSourceMinusSinkWeight) { - myMaxSourceMinusSinkWeight = sourceMinusSink; + myMaxSourceMinusSinkWeight = sourceMinusSink; } // check myMinSourcePlusSinkWeight if ((myMinSourceMinusSinkWeight == -1) || (sourceMinusSink < myMinSourceMinusSinkWeight)) { @@ -347,7 +344,7 @@ // GNETAZFrame::TAZCommonStatistics - methods // --------------------------------------------------------------------------- -GNETAZFrame::TAZCommonStatistics::TAZCommonStatistics(GNETAZFrame* TAZFrameParent) : +GNETAZFrame::TAZCommonStatistics::TAZCommonStatistics(GNETAZFrame* TAZFrameParent) : FXGroupBox(TAZFrameParent->myContentFrame, "TAZ Statistics", GUIDesignGroupBoxFrame), myTAZFrameParent(TAZFrameParent) { // create label for statistics @@ -358,7 +355,7 @@ GNETAZFrame::TAZCommonStatistics::~TAZCommonStatistics() {} -void +void GNETAZFrame::TAZCommonStatistics::showTAZCommonStatisticsModul() { // always update statistics after show updateStatistics(); @@ -366,26 +363,26 @@ } -void +void GNETAZFrame::TAZCommonStatistics::hideTAZCommonStatisticsModul() { hide(); } -void +void GNETAZFrame::TAZCommonStatistics::updateStatistics() { if (myTAZFrameParent->myTAZCurrent->getTAZ()) { // declare ostringstream for statistics std::ostringstream information; information - << "- Number of Edges: " << toString(myTAZFrameParent->myTAZCurrent->getTAZ()->getAdditionalChilds().size()/2) << "\n" - << "- Min source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MIN_SOURCE) << "\n" - << "- Max source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MAX_SOURCE) << "\n" - << "- Average source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_AVERAGE_SOURCE) << "\n" - << "\n" - << "- Min sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MIN_SINK) << "\n" - << "- Max sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MAX_SINK) << "\n" - << "- Average sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_AVERAGE_SINK); + << "- Number of Edges: " << toString(myTAZFrameParent->myTAZCurrent->getTAZ()->getAdditionalChilds().size() / 2) << "\n" + << "- Min source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MIN_SOURCE) << "\n" + << "- Max source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MAX_SOURCE) << "\n" + << "- Average source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_AVERAGE_SOURCE) << "\n" + << "\n" + << "- Min sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MIN_SINK) << "\n" + << "- Max sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MAX_SINK) << "\n" + << "- Average sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_AVERAGE_SINK); // set new label myStatisticsLabel->setText(information.str().c_str()); } else { @@ -397,7 +394,7 @@ // GNETAZFrame::TAZSaveChanges - methods // --------------------------------------------------------------------------- -GNETAZFrame::TAZSaveChanges::TAZSaveChanges(GNETAZFrame* TAZFrameParent) : +GNETAZFrame::TAZSaveChanges::TAZSaveChanges(GNETAZFrame* TAZFrameParent) : FXGroupBox(TAZFrameParent->myContentFrame, "Modifications", GUIDesignGroupBoxFrame), myTAZFrameParent(TAZFrameParent) { // Create groupbox for save changes @@ -412,16 +409,16 @@ GNETAZFrame::TAZSaveChanges::~TAZSaveChanges() {} -void +void GNETAZFrame::TAZSaveChanges::showTAZSaveChangesModul() { show(); } -void +void GNETAZFrame::TAZSaveChanges::hideTAZSaveChangesModul() { // cancel changes before hidding modul - onCmdCancelChanges(0,0,0); + onCmdCancelChanges(0, 0, 0); hide(); } @@ -430,7 +427,7 @@ GNETAZFrame::TAZSaveChanges::enableButtonsAndBeginUndoList() { // check that save changes is disabled if (!mySaveChangesButton->isEnabled()) { - // enable mySaveChangesButton and myCancelChangesButton + // enable mySaveChangesButton and myCancelChangesButton mySaveChangesButton->enable(); myCancelChangesButton->enable(); // start undo list set @@ -439,7 +436,7 @@ } -bool +bool GNETAZFrame::TAZSaveChanges::isChangesPending() const { // simply check if save Changes Button is enabled return mySaveChangesButton->isEnabled(); @@ -481,7 +478,7 @@ // GNETAZFrame::TAZChildDefaultParameters - methods // --------------------------------------------------------------------------- -GNETAZFrame::TAZChildDefaultParameters::TAZChildDefaultParameters(GNETAZFrame* TAZFrameParent) : +GNETAZFrame::TAZChildDefaultParameters::TAZChildDefaultParameters(GNETAZFrame* TAZFrameParent) : FXGroupBox(TAZFrameParent->myContentFrame, "TAZ Sources/Sinks", GUIDesignGroupBoxFrame), myTAZFrameParent(TAZFrameParent), myDefaultTAZSourceWeight(1), @@ -507,9 +504,9 @@ // Create information label std::ostringstream information; information - << "- Toogle Membership:\n" - << " Create new Sources/Sinks\n" - << " with given weights."; + << "- Toogle Membership:\n" + << " Create new Sources/Sinks\n" + << " with given weights."; myInformationLabel = new FXLabel(this, information.str().c_str(), 0, GUIDesignLabelFrameInformation); } @@ -517,7 +514,7 @@ GNETAZFrame::TAZChildDefaultParameters::~TAZChildDefaultParameters() {} -void +void GNETAZFrame::TAZChildDefaultParameters::showTAZChildDefaultParametersModul() { // check if TAZ selection Statistics Modul has to be shown if (myToggleMembership->getCheck() == FALSE) { @@ -532,7 +529,7 @@ } -void +void GNETAZFrame::TAZChildDefaultParameters::hideTAZChildDefaultParametersModul() { // hide TAZ Selection Statistics Modul myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModul(); @@ -541,14 +538,14 @@ } -void +void GNETAZFrame::TAZChildDefaultParameters::updateSelectEdgesButton() { if (myToggleMembership->getCheck() == TRUE) { // check if use selected edges has to be enabled if (myTAZFrameParent->myTAZCurrent->getSelectedEdges().size() > 0) { myUseSelectedEdges->setText("Use selected edges"); myUseSelectedEdges->enable(); - } else if(myTAZFrameParent->myTAZCurrent->getTAZEdges().size() > 0){ + } else if (myTAZFrameParent->myTAZCurrent->getTAZEdges().size() > 0) { myUseSelectedEdges->setText("Remove all edges"); myUseSelectedEdges->enable(); } else { @@ -562,17 +559,17 @@ if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected().size() == 0) { // check if all edges of TAZChilds are selected bool allSelected = true; - for (const auto & i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { + for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { if (!i.edge->isAttributeCarrierSelected()) { allSelected = false; } } - if(allSelected) { + if (allSelected) { myUseSelectedEdges->setText("Remove all edges from selection"); } else { myUseSelectedEdges->setText("Add all edges to selection"); } - } else if(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected().size() == 1) { + } else if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected().size() == 1) { if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected().front().edge->isAttributeCarrierSelected()) { myUseSelectedEdges->setText("Remove edge from selection"); } else { @@ -581,7 +578,7 @@ } else { // check if all edges of TAZChilds selected are selected bool allSelected = true; - for (const auto & i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { + for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { if (!i.edge->isAttributeCarrierSelected()) { allSelected = false; } @@ -599,19 +596,19 @@ } -double +double GNETAZFrame::TAZChildDefaultParameters::getDefaultTAZSourceWeight() const { return myDefaultTAZSourceWeight; } -double +double GNETAZFrame::TAZChildDefaultParameters::getDefaultTAZSinkWeight() const { return myDefaultTAZSinkWeight; } -bool +bool GNETAZFrame::TAZChildDefaultParameters::getToggleMembership() const { return (myToggleMembership->getCheck() == TRUE); } @@ -632,16 +629,16 @@ // update information label std::ostringstream information; information - << "- Toogle Membership:\n" - << " Create new Sources/Sinks\n" - << " with given weights."; + << "- Toogle Membership:\n" + << " Create new Sources/Sinks\n" + << " with given weights."; myInformationLabel->setText(information.str().c_str()); - // hide TAZSelectionStatistics + // hide TAZSelectionStatistics myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModul(); // check if use selected edges has to be enabled if (myTAZFrameParent->myTAZCurrent->getSelectedEdges().size() > 0) { myUseSelectedEdges->setText("Use selected edges"); - } else if(myTAZFrameParent->myTAZCurrent->getTAZEdges().size() > 0){ + } else if (myTAZFrameParent->myTAZCurrent->getTAZEdges().size() > 0) { myUseSelectedEdges->setText("Remove all edges"); } else { myUseSelectedEdges->setText("Use selected edges"); @@ -655,12 +652,12 @@ // update information label std::ostringstream information; information - << "- Keep Membership:\n" - << " Select Sources/Sinks.\n" - << "- Press ESC to clear\n" - << " current selection."; + << "- Keep Membership:\n" + << " Select Sources/Sinks.\n" + << "- Press ESC to clear\n" + << " current selection."; myInformationLabel->setText(information.str().c_str()); - // show TAZSelectionStatistics + // show TAZSelectionStatistics myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModul(); } // update button @@ -706,31 +703,31 @@ } -long +long GNETAZFrame::TAZChildDefaultParameters::onCmdUseSelectedEdges(FXObject*, FXSelector, void*) { // select edge or create new TAZ Source/Child, depending of myToggleMembership - if(myToggleMembership->getCheck() == TRUE) { + if (myToggleMembership->getCheck() == TRUE) { // first drop all edges myTAZFrameParent->dropTAZMembers(); // iterate over selected edges and add it as TAZMember - for (const auto &i : myTAZFrameParent->myTAZCurrent->getSelectedEdges()) { + for (const auto& i : myTAZFrameParent->myTAZCurrent->getSelectedEdges()) { myTAZFrameParent->addOrRemoveTAZMember(i); } // update selected button updateSelectEdgesButton(); } else { - if(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected().size() == 0) { + if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected().size() == 0) { // first check if all TAZEdges are selected bool allSelected = true; - for (const auto & i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { + for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { if (!i.edge->isAttributeCarrierSelected()) { allSelected = false; } } // select or unselect all depending of allSelected - if(allSelected) { + if (allSelected) { // remove form selection all TAZEdges - for (const auto & i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { + for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { // enable save button myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList(); // change attribute selected @@ -738,7 +735,7 @@ } } else { // add to selection all TAZEdges - for (const auto & i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { + for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { // enable save button myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList(); // change attribute selected @@ -748,15 +745,15 @@ } else { // first check if all TAZEdges are selected bool allSelected = true; - for (const auto & i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { + for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { if (!i.edge->isAttributeCarrierSelected()) { allSelected = false; } } // select or unselect all depending of allSelected - if(allSelected) { + if (allSelected) { // only remove from selection selected TAZEdges - for (const auto &i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { + for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { if (i.edge->isAttributeCarrierSelected()) { // enable save button myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList(); @@ -766,7 +763,7 @@ } } else { // only add to selection selected TAZEdges - for (const auto &i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { + for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { if (!i.edge->isAttributeCarrierSelected()) { // enable save button myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList(); @@ -788,7 +785,7 @@ // GNETAZFrame::TAZSelectionStatistics - methods // --------------------------------------------------------------------------- -GNETAZFrame::TAZSelectionStatistics::TAZSelectionStatistics(GNETAZFrame* TAZFrameParent) : +GNETAZFrame::TAZSelectionStatistics::TAZSelectionStatistics(GNETAZFrame* TAZFrameParent) : FXGroupBox(TAZFrameParent->myContentFrame, "Selection Statistics", GUIDesignGroupBoxFrame), myTAZFrameParent(TAZFrameParent) { // create default TAZ Source weight @@ -809,7 +806,7 @@ GNETAZFrame::TAZSelectionStatistics::~TAZSelectionStatistics() {} -void +void GNETAZFrame::TAZSelectionStatistics::showTAZSelectionStatisticsModul() { // update Statistics before show updateStatistics(); @@ -817,7 +814,7 @@ } -void +void GNETAZFrame::TAZSelectionStatistics::hideTAZSelectionStatisticsModul() { // clear childs before hide clearSelectedEdges(); @@ -825,10 +822,10 @@ } -bool -GNETAZFrame::TAZSelectionStatistics::selectEdge(const TAZCurrent::TAZEdge &TAZEdge) { +bool +GNETAZFrame::TAZSelectionStatistics::selectEdge(const TAZCurrent::TAZEdge& TAZEdge) { // find TAZEdge using edge as criterium wasn't previously selected - for (const auto &i : myEdgeAndTAZChildsSelected) { + for (const auto& i : myEdgeAndTAZChildsSelected) { if (i.edge == TAZEdge.edge) { throw ProcessError("TAZEdge already selected"); } @@ -845,7 +842,7 @@ } -bool +bool GNETAZFrame::TAZSelectionStatistics::unselectEdge(GNEEdge* edge) { if (edge) { // find TAZEdge using edge as criterium @@ -869,10 +866,10 @@ } -bool +bool GNETAZFrame::TAZSelectionStatistics::isEdgeSelected(GNEEdge* edge) { // find TAZEdge using edge as criterium - for (const auto &i : myEdgeAndTAZChildsSelected) { + for (const auto& i : myEdgeAndTAZChildsSelected) { if (i.edge == edge) { return true; } @@ -882,7 +879,7 @@ } -void +void GNETAZFrame::TAZSelectionStatistics::clearSelectedEdges() { // clear all selected edges (and the TAZ Childs) myEdgeAndTAZChildsSelected.clear(); @@ -914,7 +911,7 @@ // enable save button myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList(); // update weight of all TAZSources - for (const auto &i : myEdgeAndTAZChildsSelected) { + for (const auto& i : myEdgeAndTAZChildsSelected) { i.TAZSource->setAttribute(SUMO_ATTR_WEIGHT, myTextFieldTAZSourceWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList()); } // refresh TAZ Edges @@ -938,7 +935,7 @@ // enable save button myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList(); // update weight of all TAZSources - for (const auto &i : myEdgeAndTAZChildsSelected) { + for (const auto& i : myEdgeAndTAZChildsSelected) { i.TAZSink->setAttribute(SUMO_ATTR_WEIGHT, myTextFieldTAZSinkWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList()); } // refresh TAZ Edges @@ -956,13 +953,13 @@ } -long +long GNETAZFrame::TAZSelectionStatistics::onCmdSelectEdges(FXObject*, FXSelector, void*) { - if(myEdgeAndTAZChildsSelected.size() == 0) { + if (myEdgeAndTAZChildsSelected.size() == 0) { // add to selection all TAZEdges - for (const auto & i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { + for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) { // avoid empty undolists - if(!i.edge->isAttributeCarrierSelected()) { + if (!i.edge->isAttributeCarrierSelected()) { // enable save button myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList(); // change attribute selected @@ -971,7 +968,7 @@ } } else { // only add to selection selected TAZEdges - for (const auto &i : myEdgeAndTAZChildsSelected) { + for (const auto& i : myEdgeAndTAZChildsSelected) { // avoid empty undolists if (!i.edge->isAttributeCarrierSelected()) { // enable save button @@ -987,7 +984,7 @@ } -void +void GNETAZFrame::TAZSelectionStatistics::updateStatistics() { if (myEdgeAndTAZChildsSelected.size() > 0) { // show TAZSources/Sinks frames @@ -1005,9 +1002,9 @@ double minWeightSink = -1; double averageWeightSink = 0; // iterate over additional childs - for (const auto &i : myEdgeAndTAZChildsSelected) { + for (const auto& i : myEdgeAndTAZChildsSelected) { //start with sources - weight = GNEAttributeCarrier::parse(i.TAZSource->getAttribute(SUMO_ATTR_WEIGHT)); + weight = i.TAZSource->getDepartWeight(); // insert source weight in weightSinkTextField weightSourceSet.insert(toString(weight)); // check max Weight @@ -1021,7 +1018,7 @@ // update Average averageWeightSource += weight; // continue with sinks - weight = GNEAttributeCarrier::parse(i.TAZSink->getAttribute(SUMO_ATTR_WEIGHT)); + weight = i.TAZSink->getDepartWeight(); // save sink weight in weightSinkTextField weightSinkSet.insert(toString(weight)); // check max Weight @@ -1049,14 +1046,14 @@ } // fill rest of information information - << edgeInformation << "\n" - << "- Min source: " << toString(minWeightSource) << "\n" - << "- Max source: " << toString(maxWeightSource) << "\n" - << "- Average source: " << toString(averageWeightSource) << "\n" - << "\n" - << "- Min sink: " << toString(minWeightSink) << "\n" - << "- Max sink: " << toString(maxWeightSink) << "\n" - << "- Average sink: " << toString(averageWeightSink); + << edgeInformation << "\n" + << "- Min source: " << toString(minWeightSource) << "\n" + << "- Max source: " << toString(maxWeightSource) << "\n" + << "- Average source: " << toString(averageWeightSource) << "\n" + << "\n" + << "- Min sink: " << toString(minWeightSink) << "\n" + << "- Max sink: " << toString(maxWeightSink) << "\n" + << "- Average sink: " << toString(averageWeightSink); // set new label myStatisticsLabel->setText(information.str().c_str()); // set TextFields (Text and color) @@ -1116,13 +1113,13 @@ } -bool +bool GNETAZFrame::TAZParameters::isAddEdgesWithinEnabled() const { return (myAddEdgesWithinCheckButton->getCheck() == TRUE); } -std::map +std::map GNETAZFrame::TAZParameters::getAttributesAndValues() const { std::map parametersAndValues; // get color (currently the only editable attribute) @@ -1131,7 +1128,7 @@ } -long +long GNETAZFrame::TAZParameters::onCmdSetColorAttribute(FXObject*, FXSelector, void*) { // create FXColorDialog FXColorDialog colordialog(this, tr("Color Dialog")); @@ -1183,25 +1180,25 @@ // GNETAZFrame::TAZEdgesGraphic - methods // --------------------------------------------------------------------------- -GNETAZFrame::TAZEdgesGraphic::TAZEdgesGraphic(GNETAZFrame* TAZFrameParent) : +GNETAZFrame::TAZEdgesGraphic::TAZEdgesGraphic(GNETAZFrame* TAZFrameParent) : FXGroupBox(TAZFrameParent->myContentFrame, "Edges", GUIDesignGroupBoxFrame), myTAZFrameParent(TAZFrameParent), myEdgeDefaultColor(RGBColor::GREY), myEdgeSelectedColor(RGBColor::MAGENTA) { // create label for non taz edge color information - FXLabel *NonTAZEdgeLabel = new FXLabel(this,"Non TAZ Edge", nullptr, GUIDesignLabelCenter); + FXLabel* NonTAZEdgeLabel = new FXLabel(this, "Non TAZ Edge", nullptr, GUIDesignLabelCenter); NonTAZEdgeLabel->setBackColor(MFXUtils::getFXColor(myEdgeDefaultColor)); NonTAZEdgeLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE)); // create label for selected TAZEdge color information - FXLabel *selectedTAZEdgeLabel = new FXLabel(this,"Selected TAZ Edge", nullptr, GUIDesignLabelCenter); + FXLabel* selectedTAZEdgeLabel = new FXLabel(this, "Selected TAZ Edge", nullptr, GUIDesignLabelCenter); selectedTAZEdgeLabel->setBackColor(MFXUtils::getFXColor(myEdgeSelectedColor)); // create label for color information - new FXLabel(this,"Scala: Min -> Max", nullptr, GUIDesignLabelCenterThick); + new FXLabel(this, "Scala: Min -> Max", nullptr, GUIDesignLabelCenterThick); // fill scale colors - myScaleColors.push_back(RGBColor(232, 35, 0 )); - myScaleColors.push_back(RGBColor(255, 165, 0 )); - myScaleColors.push_back(RGBColor(255, 255, 0 )); - myScaleColors.push_back(RGBColor(28, 215, 0 )); + myScaleColors.push_back(RGBColor(232, 35, 0)); + myScaleColors.push_back(RGBColor(255, 165, 0)); + myScaleColors.push_back(RGBColor(255, 255, 0)); + myScaleColors.push_back(RGBColor(28, 215, 0)); myScaleColors.push_back(RGBColor(0, 181, 100)); myScaleColors.push_back(RGBColor(0, 255, 191)); myScaleColors.push_back(RGBColor(178, 255, 255)); @@ -1209,9 +1206,9 @@ myScaleColors.push_back(RGBColor(56, 41, 131)); myScaleColors.push_back(RGBColor(127, 0, 255)); // create frame for color scale - FXHorizontalFrame *horizontalFrameColors = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); - for (const auto &i : myScaleColors) { - FXLabel *colorLabel = new FXLabel(horizontalFrameColors,"", nullptr, GUIDesignLabelLeft); + FXHorizontalFrame* horizontalFrameColors = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame); + for (const auto& i : myScaleColors) { + FXLabel* colorLabel = new FXLabel(horizontalFrameColors, "", nullptr, GUIDesignLabelLeft); colorLabel->setBackColor(MFXUtils::getFXColor(i)); } // create Radio button for show edges by source weight @@ -1230,7 +1227,7 @@ GNETAZFrame::TAZEdgesGraphic::~TAZEdgesGraphic() {} -void +void GNETAZFrame::TAZEdgesGraphic::showTAZEdgesGraphicModul() { // update edge colors updateEdgeColors(); @@ -1238,11 +1235,11 @@ } -void +void GNETAZFrame::TAZEdgesGraphic::hideTAZEdgesGraphicModul() { // iterate over all edges and restore color - for (const auto &i : myTAZFrameParent->myTAZCurrent->getNetEdges()) { - for (const auto j : i->getLanes() ) { + for (const auto& i : myTAZFrameParent->myTAZCurrent->getNetEdges()) { + for (const auto j : i->getLanes()) { j->setSpecialColor(nullptr); } } @@ -1250,35 +1247,35 @@ } -void +void GNETAZFrame::TAZEdgesGraphic::updateEdgeColors() { // start painting all edges in gray - for (const auto &i : myTAZFrameParent->myTAZCurrent->getNetEdges()) { + for (const auto& i : myTAZFrameParent->myTAZCurrent->getNetEdges()) { // set candidate color (in this case, gray) - for (const auto j : i->getLanes() ) { + for (const auto j : i->getLanes()) { j->setSpecialColor(&myEdgeDefaultColor); } } // now paint Source/sinks colors - for (const auto &i : myTAZFrameParent->myTAZCurrent->getTAZEdges()) { - // set candidate color (in this case, - for (const auto j : i.edge->getLanes() ) { + for (const auto& i : myTAZFrameParent->myTAZCurrent->getTAZEdges()) { + // set candidate color (in this case, + for (const auto j : i.edge->getLanes()) { // check what will be painted (source, sink or both) if (myColorBySourceWeight->getCheck() == TRUE) { - j->setSpecialColor(&myScaleColors.at(i.sourceColor)); + j->setSpecialColor(&myScaleColors.at(i.sourceColor), i.TAZSource->getDepartWeight()); } else if (myColorBySinkWeight->getCheck() == TRUE) { - j->setSpecialColor(&myScaleColors.at(i.sinkColor)); + j->setSpecialColor(&myScaleColors.at(i.sinkColor), i.TAZSink->getDepartWeight()); } else if (myColorBySourcePlusSinkWeight->getCheck() == TRUE) { - j->setSpecialColor(&myScaleColors.at(i.sourcePlusSinkColor)); + j->setSpecialColor(&myScaleColors.at(i.sourcePlusSinkColor), i.TAZSource->getDepartWeight() + i.TAZSink->getDepartWeight()); } else { - j->setSpecialColor(&myScaleColors.at(i.sourceMinusSinkColor)); + j->setSpecialColor(&myScaleColors.at(i.sourceMinusSinkColor), i.TAZSource->getDepartWeight() - i.TAZSink->getDepartWeight()); } } } // as last step paint candidate colors - for (const auto &i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { + for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildsSelected()) { // set candidate selected color - for (const auto &j : i.edge->getLanes() ) { + for (const auto& j : i.edge->getLanes()) { j->setSpecialColor(&myEdgeSelectedColor); } } @@ -1362,8 +1359,8 @@ } -bool -GNETAZFrame::processClick(const Position& clickedPosition, const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor) { +bool +GNETAZFrame::processClick(const Position& clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { // Declare map to keep values std::map valuesOfElement; if (myDrawingShape->isDrawing()) { @@ -1395,7 +1392,7 @@ myTAZSelectionStatistics->clearSelectedEdges(); } else { // iterate over TAZEdges saved in TAZCurrent (it contains the Edge and Source/sinks) - for (const auto &i : myTAZCurrent->getTAZEdges()) { + for (const auto& i : myTAZCurrent->getTAZEdges()) { if (i.edge == objectsUnderCursor.getEdgeFront()) { // clear current selection (to avoid having two or more edges selected at the same time using mouse clicks) myTAZSelectionStatistics->clearSelectedEdges(); @@ -1416,7 +1413,7 @@ } -void +void GNETAZFrame::processEdgeSelection(const std::vector& edges) { // first check that a TAZ is selected if (myTAZCurrent->getTAZ()) { @@ -1436,7 +1433,7 @@ // first check that selected edge isn't already selected if (!myTAZSelectionStatistics->isEdgeSelected(i)) { // iterate over TAZEdges saved in TAZCurrent (it contains the Edge and Source/sinks) - for (const auto &j : myTAZCurrent->getTAZEdges()) { + for (const auto& j : myTAZCurrent->getTAZEdges()) { if (j.edge == i) { myTAZSelectionStatistics->selectEdge(j); } @@ -1454,19 +1451,19 @@ } -GNETAZFrame::TAZCurrent* +GNETAZFrame::TAZCurrent* GNETAZFrame::getTAZCurrentModul() const { return myTAZCurrent; } -GNETAZFrame::TAZSelectionStatistics* +GNETAZFrame::TAZSelectionStatistics* GNETAZFrame::getTAZSelectionStatisticsModul() const { return myTAZSelectionStatistics; } -GNETAZFrame::TAZSaveChanges* +GNETAZFrame::TAZSaveChanges* GNETAZFrame::getTAZSaveChangesModul() const { return myTAZSaveChanges; } @@ -1509,18 +1506,20 @@ // TAZ is created without edges valuesOfElement[SUMO_ATTR_EDGES] = ""; } + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesOfElement, getPredefinedTagsMML(), toString(SUMO_TAG_TAZ)); // return true if TAZ was successfully created - return GNEAdditionalHandler::buildAdditional(myViewNet, true, SUMO_TAG_TAZ, valuesOfElement) != nullptr; + return GNEAdditionalHandler::buildAdditional(myViewNet, true, SUMO_TAG_TAZ, SUMOSAXAttrs, nullptr); } } -bool -GNETAZFrame::addOrRemoveTAZMember(GNEEdge *edge) { +bool +GNETAZFrame::addOrRemoveTAZMember(GNEEdge* edge) { // first check if edge exist; if (edge) { // first check if already exist (in this case, remove it) - for (const auto &i : myTAZCurrent->getTAZEdges()) { + for (const auto& i : myTAZCurrent->getTAZEdges()) { if (i.edge == edge) { // enable save changes button myTAZSaveChanges->enableButtonsAndBeginUndoList(); @@ -1537,10 +1536,10 @@ // if wasn't found, then add it myTAZSaveChanges->enableButtonsAndBeginUndoList(); // create TAZ Sink using GNEChange_Additional and value of TAZChild default parameters - GNETAZSource* TAZSource = new GNETAZSource(myTAZCurrent->getTAZ(), edge, myTAZChildDefaultParameters->getDefaultTAZSourceWeight()); + GNETAZSourceSink* TAZSource = new GNETAZSourceSink(SUMO_TAG_TAZSOURCE, myTAZCurrent->getTAZ(), edge, myTAZChildDefaultParameters->getDefaultTAZSourceWeight()); myViewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true); // create TAZ Sink using GNEChange_Additional and value of TAZChild default parameters - GNETAZSink* TAZSink = new GNETAZSink(myTAZCurrent->getTAZ(), edge, myTAZChildDefaultParameters->getDefaultTAZSinkWeight()); + GNETAZSourceSink* TAZSink = new GNETAZSourceSink(SUMO_TAG_TAZSINK, myTAZCurrent->getTAZ(), edge, myTAZChildDefaultParameters->getDefaultTAZSinkWeight()); myViewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true); // always refresh TAZ Edges after adding TAZSources/Sinks myTAZCurrent->refreshTAZEdges(); @@ -1553,17 +1552,17 @@ } -void +void GNETAZFrame::dropTAZMembers() { // iterate over all TAZEdges - for (const auto &i : myTAZCurrent->getTAZEdges()) { + for (const auto& i : myTAZCurrent->getTAZEdges()) { // enable save changes button myTAZSaveChanges->enableButtonsAndBeginUndoList(); // remove Source and Sinks using GNEChange_Additional myViewNet->getUndoList()->add(new GNEChange_Additional(i.TAZSource, false), true); myViewNet->getUndoList()->add(new GNEChange_Additional(i.TAZSink, false), true); } - // always refresh TAZ Edges after removing TAZSources/Sinks + // always refresh TAZ Edges after removing TAZSources/Sinks myTAZCurrent->refreshTAZEdges(); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNETAZFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNETAZFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNETAZFrame.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNETAZFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,6 +23,11 @@ // =========================================================================== #include "GNEFrame.h" +// =========================================================================== +// class definitions +// =========================================================================== + +class GNETAZSourceSink; // =========================================================================== // class definitions @@ -44,8 +49,8 @@ /// @brief struct for edges and the source/sink colors struct TAZEdge { /// @brief constructor - TAZEdge(TAZCurrent* TAZCurrentParent, GNEEdge* _edge, GNEAdditional *_TAZSource, GNEAdditional *_TAZSink); - + TAZEdge(TAZCurrent* TAZCurrentParent, GNEEdge* _edge, GNETAZSourceSink* _TAZSource, GNETAZSourceSink* _TAZSink); + /// @brief destructor (needed because RGBColors has to be deleted) ~TAZEdge(); @@ -56,10 +61,10 @@ GNEEdge* edge; /// @brief source TAZ - GNEAdditional *TAZSource; + GNETAZSourceSink* TAZSource; /// @brif sink TAZ - GNEAdditional *TAZSink; + GNETAZSourceSink* TAZSink; /// @brief color by source [0-9] int sourceColor; @@ -94,20 +99,20 @@ bool isTAZEdge(GNEEdge* edge) const; /// @brief get current net edges - const std::vector &getNetEdges() const; + const std::vector& getNetEdges() const; /// @brief get current selected edges - const std::vector &getSelectedEdges() const; + const std::vector& getSelectedEdges() const; /// @brief get TAZEdges - const std::vector &getTAZEdges() const; + const std::vector& getTAZEdges() const; /// @brief refresh TAZEdges void refreshTAZEdges(); protected: /// @brief add TAZChild - void addTAZChild(GNEAdditional *additional); + void addTAZChild(GNETAZSourceSink* additional); private: /// @brief pointer to TAZ Frame @@ -169,7 +174,7 @@ GNETAZFrame* myTAZFrameParent; /// @brief Statistics labels - FXLabel *myStatisticsLabel; + FXLabel* myStatisticsLabel; }; // =========================================================================== @@ -253,7 +258,7 @@ /// @brief default TAZSink weight double getDefaultTAZSinkWeight() const; - /// @brief check if toggle membership is enabled + /// @brief check if toggle membership is enabled bool getToggleMembership() const; /// @name FOX-callbacks @@ -289,10 +294,10 @@ FXTextField* myTextFieldDefaultValueTAZSinks; /// @brief button for use selected edges - FXButton *myUseSelectedEdges; + FXButton* myUseSelectedEdges; /// @brief information label - FXLabel *myInformationLabel; + FXLabel* myInformationLabel; /// @brief default TAZSource weight double myDefaultTAZSourceWeight; @@ -323,7 +328,7 @@ void hideTAZSelectionStatisticsModul(); /// @brief add an edge and their TAZ Childs in the list of selected items - bool selectEdge(const TAZCurrent::TAZEdge &edge); + bool selectEdge(const TAZCurrent::TAZEdge& edge); /// @brief un select an edge (and their TAZ Childs) bool unselectEdge(GNEEdge* edge); @@ -335,7 +340,7 @@ void clearSelectedEdges(); /// @brief get map with edge and TAZChilds - const std::vector &getEdgeAndTAZChildsSelected() const; + const std::vector& getEdgeAndTAZChildsSelected() const; /// @name FOX-callbacks /// @{ @@ -370,7 +375,7 @@ FXTextField* myTextFieldTAZSinkWeight; /// @brief Statistics labels - FXLabel *myStatisticsLabel; + FXLabel* myStatisticsLabel; /// @brief vector with the current selected edges and their associated childs std::vector myEdgeAndTAZChildsSelected; @@ -498,7 +503,7 @@ /// @brief RGBColor color for selected egdes RGBColor myEdgeSelectedColor; }; - + /**@brief Constructor * @brief parent FXHorizontalFrame in which this GNEFrame is placed * @brief viewNet viewNet that uses this GNEFrame @@ -516,7 +521,7 @@ * @param[in] objectsUnderCursor objects under cursors * @return true if something (select TAZ or add edge) was sucefully done */ - bool processClick(const Position& clickedPosition, const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor); + bool processClick(const Position& clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); /// @brief process selection of edges in view net void processEdgeSelection(const std::vector& edges); @@ -539,9 +544,9 @@ * @note called when user stop drawing shape */ bool buildShape(); - + /// @brief add or remove a TAZSource and a TAZSink, or remove it if edge is in the list of TAZ Childs - bool addOrRemoveTAZMember(GNEEdge *edge); + bool addOrRemoveTAZMember(GNEEdge* edge); /// @brief drop all TAZSources and TAZ Sinks of current TAZ void dropTAZMembers(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -131,9 +132,14 @@ onCmdCancel(nullptr, 0, nullptr); myViewNet->getUndoList()->p_begin("modifying traffic light definition"); myTLSJunction->setCurrentJunction(junction); - myTLSJunction->getCurrentJunction()->selectTLS(true); myTLSAttributes->initTLSAttributes(myTLSJunction->getCurrentJunction()); myTLSJunction->updateJunctionDescription(); + myTLSJunction->getCurrentJunction()->selectTLS(true); + if (myTLSAttributes->getNumberOfTLSDefinitions() > 0) { + for (NBNode* node : myTLSAttributes->getCurrentTLSDefinition()->getNodes()) { + myViewNet->getNet()->retrieveJunction(node->getID())->selectTLS(true); + } + } } else { myViewNet->setStatusBarText("Unsaved modifications. Abort or Save"); } @@ -430,6 +436,11 @@ return 1; } +bool +GNETLSEditorFrame::fixedDuration() const { + assert(myEditedDef != nullptr); + return myEditedDef->getType() == TLTYPE_STATIC; +} long GNETLSEditorFrame::onCmdPhaseCreate(FXObject*, FXSelector, void*) { @@ -438,9 +449,8 @@ int newIndex = myTLSPhases->getPhaseTable()->getSelStartRow() + 1; int oldIndex = MAX2(0, myTLSPhases->getPhaseTable()->getSelStartRow()); // copy current row - const bool fixed = myEditedDef->getType() == TLTYPE_STATIC; SUMOTime duration = getSUMOTime(myTLSPhases->getPhaseTable()->getItemText(oldIndex, 0)); - std::string state = myTLSPhases->getPhaseTable()->getItemText(oldIndex, fixed ? 1 : 3).text(); + std::string state = myTLSPhases->getPhaseTable()->getItemText(oldIndex, fixedDuration() ? 1 : 3).text(); std::set crossingIndices; for (NBNode* n : myEditedDef->getNodes()) { @@ -494,7 +504,7 @@ } } - myEditedDef->getLogic()->addStep(duration, state, newIndex); + myEditedDef->getLogic()->addStep(duration, state, std::vector(), "", newIndex); myTLSPhases->getPhaseTable()->setCurrentItem(newIndex, 0); myTLSPhases->initPhaseTable(newIndex); myTLSPhases->getPhaseTable()->setFocus(); @@ -540,8 +550,14 @@ * click inside the cell and hit enter to actually update the value */ FXTablePos* tp = (FXTablePos*)ptr; FXString value = myTLSPhases->getPhaseTable()->getItemText(tp->row, tp->col); - const bool fixed = myEditedDef->getType() == TLTYPE_STATIC; - if (tp->col == 0) { + const int colDuration = 0; + const int colMinDur = fixedDuration() ? -1 : 1; + const int colMaxDur = fixedDuration() ? -1 : 2; + const int colState = fixedDuration() ? 1 : 3; + const int colNext = fixedDuration() ? 2 : 4; + const int colName = fixedDuration() ? 3 : 5; + + if (tp->col == colDuration) { // duration edited if (GNEAttributeCarrier::canParse(value.text())) { SUMOTime duration = getSUMOTime(value); @@ -553,8 +569,8 @@ } } // input error, reset value - myTLSPhases->getPhaseTable()->setItemText(tp->row, 0, toString(STEPS2TIME(getPhases()[tp->row].duration)).c_str()); - } else if (!fixed && tp->col == 1) { + myTLSPhases->getPhaseTable()->setItemText(tp->row, colDuration, toString(STEPS2TIME(getPhases()[tp->row].duration)).c_str()); + } else if (tp->col == colMinDur) { // minDur edited if (GNEAttributeCarrier::canParse(value.text())) { SUMOTime minDur = getSUMOTime(value); @@ -569,9 +585,9 @@ return 1; } // input error, reset value - myTLSPhases->getPhaseTable()->setItemText(tp->row, 1, varDurString(getPhases()[tp->row].minDur).c_str()); - } else if (!fixed && tp->col == 2) { - // minDur edited + myTLSPhases->getPhaseTable()->setItemText(tp->row, colMinDur, varDurString(getPhases()[tp->row].minDur).c_str()); + } else if (tp->col == colMaxDur) { + // maxDur edited if (GNEAttributeCarrier::canParse(value.text())) { SUMOTime maxDur = getSUMOTime(value); if (maxDur > 0) { @@ -585,19 +601,44 @@ return 1; } // input error, reset value - myTLSPhases->getPhaseTable()->setItemText(tp->row, 2, varDurString(getPhases()[tp->row].maxDur).c_str()); - } else { + myTLSPhases->getPhaseTable()->setItemText(tp->row, colMaxDur, varDurString(getPhases()[tp->row].maxDur).c_str()); + } else if (tp->col == colState) { // state edited try { // insert phase with new step and delete the old phase - myEditedDef->getLogic()->addStep(getPhases()[tp->row].duration, value.text(), tp->row); + const NBTrafficLightLogic::PhaseDefinition& phase = getPhases()[tp->row]; + myEditedDef->getLogic()->addStep(phase.duration, value.text(), phase.next, phase.name, tp->row); myEditedDef->getLogic()->deletePhase(tp->row + 1); myTLSModifications->setHaveModifications(true); onCmdPhaseSwitch(nullptr, 0, nullptr); } catch (ProcessError&) { // input error, reset value - myTLSPhases->getPhaseTable()->setItemText(tp->row, 1, getPhases()[tp->row].state.c_str()); + myTLSPhases->getPhaseTable()->setItemText(tp->row, colState, getPhases()[tp->row].state.c_str()); } + } else if (tp->col == colNext) { + // next edited + bool ok = true; + if (GNEAttributeCarrier::canParse >(value.text())) { + std::vector next = GNEAttributeCarrier::parse >(value.text()); + for (int n : next) { + if (n < 0 || n >= myTLSPhases->getPhaseTable()->getNumRows()) { + ok = false; + break; + } + } + if (ok) { + myEditedDef->getLogic()->setPhaseNext(tp->row, next); + myTLSModifications->setHaveModifications(true); + return 1; + } + } + // input error, reset value + myTLSPhases->getPhaseTable()->setItemText(tp->row, colNext, ""); + } else if (tp->col == colName) { + // name edited + myEditedDef->getLogic()->setPhaseName(tp->row, value.text()); + myTLSModifications->setHaveModifications(true); + return 1; } return 1; } @@ -607,6 +648,11 @@ GNETLSEditorFrame::cleanup() { if (myTLSJunction->getCurrentJunction()) { myTLSJunction->getCurrentJunction()->selectTLS(false); + if (myTLSAttributes->getNumberOfTLSDefinitions() > 0) { + for (NBNode* node : myTLSAttributes->getCurrentTLSDefinition()->getNodes()) { + myViewNet->getNet()->retrieveJunction(node->getID())->selectTLS(false); + } + } } // clean data structures myTLSJunction->setCurrentJunction(nullptr); @@ -644,6 +690,14 @@ int tlIndex = it.getTLIndex(); PositionVector shape = it.getFrom()->getToNode()->computeInternalLaneShape(it.getFrom(), NBEdge::Connection(it.getFromLane(), it.getTo(), it.getToLane()), NUM_POINTS); + if (shape.length() < 2) { + // enlarge shape to ensure visibility + shape.clear(); + PositionVector laneShapeFrom = it.getFrom()->getLaneShape(it.getFromLane()); + PositionVector laneShapeTo = it.getTo()->getLaneShape(it.getToLane()); + shape.push_back(laneShapeFrom.positionAtOffset(MAX2(0.0, laneShapeFrom.length() - 1))); + shape.push_back(laneShapeTo.positionAtOffset(MIN2(1.0, laneShapeFrom.length()))); + } GNEInternalLane* ilane = new GNEInternalLane(this, innerID + '_' + toString(tlIndex), shape, tlIndex); rtree.addAdditionalGLObject(ilane); myInternalLanes[tlIndex].push_back(ilane); @@ -1001,21 +1055,31 @@ myPhaseTable->setVisibleColumns(2); myPhaseTable->hide(); if (myTLSEditorParent->myTLSAttributes->getNumberOfTLSDefinitions() > 0) { - const bool fixed = myTLSEditorParent->myEditedDef->getType() == TLTYPE_STATIC; + const bool fixed = myTLSEditorParent->fixedDuration(); + const int cols = fixed ? 4 : 6; + const int colDuration = 0; + const int colMinDur = fixed ? -1 : 1; + const int colMaxDur = fixed ? -1 : 2; + const int colState = fixed ? 1 : 3; + const int colNext = fixed ? 2 : 4; + const int colName = fixed ? 3 : 5; + const std::vector& phases = myTLSEditorParent->getPhases(); - myPhaseTable->setTableSize((int)phases.size(), fixed ? 2 : 4); + myPhaseTable->setTableSize((int)phases.size(), cols); myPhaseTable->setVisibleRows((int)phases.size()); - myPhaseTable->setVisibleColumns(fixed ? 2 : 4); + myPhaseTable->setVisibleColumns(cols); for (int row = 0; row < (int)phases.size(); row++) { - myPhaseTable->setItemText(row, 0, toString(STEPS2TIME(phases[row].duration)).c_str()); + myPhaseTable->setItemText(row, colDuration, toString(STEPS2TIME(phases[row].duration)).c_str()); if (!fixed) { - myPhaseTable->setItemText(row, 1, varDurString(phases[row].minDur).c_str()); - myPhaseTable->setItemText(row, 2, varDurString(phases[row].maxDur).c_str()); + myPhaseTable->setItemText(row, colMinDur, varDurString(phases[row].minDur).c_str()); + myPhaseTable->setItemText(row, colMaxDur, varDurString(phases[row].maxDur).c_str()); } - myPhaseTable->setItemText(row, fixed ? 1 : 3, phases[row].state.c_str()); + myPhaseTable->setItemText(row, colState, phases[row].state.c_str()); + myPhaseTable->setItemText(row, colNext, phases[row].next.size() > 0 ? toString(phases[row].next).c_str() : " "); + myPhaseTable->setItemText(row, colName, phases[row].name.c_str()); myPhaseTable->getItem(row, 1)->setJustify(FXTableItem::LEFT); } - myPhaseTable->fitColumnsToContents(0, fixed ? 2 : 4); + myPhaseTable->fitColumnsToContents(0, cols); myPhaseTable->setHeight((int)phases.size() * 21); // experimental myPhaseTable->setCurrentItem(index, 0); myPhaseTable->selectRow(index, true); diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNETLSEditorFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -404,6 +404,9 @@ /// @brief whether the given edge is controlled by the currently edited tlDef bool controlsEdge(GNEEdge& edge) const; + /// @brief whether the current traffic light uses fixed phase durations + bool fixedDuration() const; + protected: /// @brief FOX needs this GNETLSEditorFrame() {} diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleFrame.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,558 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleFrame.cpp +/// @author Pablo Alvarez Lopez +/// @date Jan 2018 +/// @version $Id$ +/// +// The Widget for add Vehicles/Flows/Trips/etc. elements +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEVehicleFrame.h" + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNEVehicleFrame::VTypeSelector) VTypeSelectorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_TYPE, GNEVehicleFrame::VTypeSelector::onCmdSelectVType), +}; + +FXDEFMAP(GNEVehicleFrame::TripRouteCreator) TripRouteCreatorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_VEHICLEFRAME_ABORT, GNEVehicleFrame::TripRouteCreator::onCmdAbortRouteCreation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_VEHICLEFRAME_FINISHCREATION, GNEVehicleFrame::TripRouteCreator::onCmdFinishRouteCreation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_VEHICLEFRAME_REMOVELASTEDGE, GNEVehicleFrame::TripRouteCreator::onCmdRemoveLastRouteEdge) +}; + +// Object implementation +FXIMPLEMENT(GNEVehicleFrame::VTypeSelector, FXGroupBox, VTypeSelectorMap, ARRAYNUMBER(VTypeSelectorMap)) +FXIMPLEMENT(GNEVehicleFrame::TripRouteCreator, FXGroupBox, TripRouteCreatorMap, ARRAYNUMBER(TripRouteCreatorMap)) + +// =========================================================================== +// method definitions +// =========================================================================== + +// --------------------------------------------------------------------------- +// GNEVehicleFrame::VTypeSelector - methods +// --------------------------------------------------------------------------- + +GNEVehicleFrame::VTypeSelector::VTypeSelector(GNEVehicleFrame* vehicleFrameParent) : + FXGroupBox(vehicleFrameParent->myContentFrame, "Vehicle Type", GUIDesignGroupBoxFrame), + myVehicleFrameParent(vehicleFrameParent), + myCurrentVehicleType(nullptr) { + // Create FXComboBox + myTypeMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_TYPE, GUIDesignComboBox); + // refresh TypeMatchBox + refreshVTypeSelector(); + // VTypeSelector is always shown + show(); +} + + +GNEVehicleFrame::VTypeSelector::~VTypeSelector() {} + + +const GNEDemandElement* +GNEVehicleFrame::VTypeSelector::getCurrentVehicleType() const { + return myCurrentVehicleType; +} + + +void +GNEVehicleFrame::VTypeSelector::showVTypeSelector(const GNEAttributeCarrier::TagProperties& tagProperties) { + // if current selected item isn't valid, set DEFAULT_VEHTYPE + if (myCurrentVehicleType) { + // show vehicle attributes modul + myVehicleFrameParent->myVehicleAttributes->showAttributesCreatorModul(tagProperties); + // show help creation + myVehicleFrameParent->myHelpCreation->showHelpCreation(); + } else { + // set DEFAULT_VTYPE as current VType + myTypeMatchBox->setText(DEFAULT_VTYPE_ID.c_str()); + // call manually onCmdSelectVType to update comboBox + onCmdSelectVType(nullptr, 0, nullptr); + } + // show VType selector + show(); +} + + +void +GNEVehicleFrame::VTypeSelector::hideVTypeSelector() { + hide(); +} + + +void +GNEVehicleFrame::VTypeSelector::refreshVTypeSelector() { + // clear comboBox + myTypeMatchBox->clearItems(); + // get list of VTypes + const auto& vTypes = myVehicleFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE); + // fill myTypeMatchBox with list of tags + for (const auto& i : vTypes) { + myTypeMatchBox->appendItem(i.first.c_str()); + } + // Set visible items + myTypeMatchBox->setNumVisible((int)myTypeMatchBox->getNumItems()); +} + + +long +GNEVehicleFrame::VTypeSelector::onCmdSelectVType(FXObject*, FXSelector, void*) { + // get list of VTypes + const auto& vTypes = myVehicleFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE); + // Check if value of myTypeMatchBox correspond to a VType + for (const auto& i : vTypes) { + if (i.first == myTypeMatchBox->getText().text()) { + // set color of myTypeMatchBox to black (valid) + myTypeMatchBox->setTextColor(FXRGB(0, 0, 0)); + // Set new current VType + myCurrentVehicleType = i.second; + // show vehicle attributes modul + myVehicleFrameParent->myVehicleAttributes->showAttributesCreatorModul(myVehicleFrameParent->myItemSelector->getCurrentTagProperties()); + // show help creation + myVehicleFrameParent->myHelpCreation->showHelpCreation(); + // Write Warning in console if we're in testing mode + WRITE_DEBUG(("Selected item '" + myTypeMatchBox->getText() + "' in VTypeSelector").text()); + return 1; + } + } + // if VType selecte is invalid, select + myCurrentVehicleType = nullptr; + // hide all moduls if selected item isn't valid + myVehicleFrameParent->myVehicleAttributes->hideAttributesCreatorModul(); + // hide help creation + myVehicleFrameParent->myHelpCreation->hideHelpCreation(); + // set color of myTypeMatchBox to red (invalid) + myTypeMatchBox->setTextColor(FXRGB(255, 0, 0)); + // Write Warning in console if we're in testing mode + WRITE_DEBUG("Selected invalid item in VTypeSelector"); + return 1; +} + +// --------------------------------------------------------------------------- +// GNEVehicleFrame::HelpCreation - methods +// --------------------------------------------------------------------------- + +GNEVehicleFrame::HelpCreation::HelpCreation(GNEVehicleFrame* vehicleFrameParent) : + FXGroupBox(vehicleFrameParent->myContentFrame, "Help", GUIDesignGroupBoxFrame), + myVehicleFrameParent(vehicleFrameParent) { + myInformationLabel = new FXLabel(this, "", 0, GUIDesignLabelFrameInformation); +} + + +GNEVehicleFrame::HelpCreation::~HelpCreation() {} + + +void +GNEVehicleFrame::HelpCreation::showHelpCreation() { + // first update help cration + updateHelpCreation(); + // show modul + show(); +} + + +void +GNEVehicleFrame::HelpCreation::hideHelpCreation() { + hide(); +} + +void +GNEVehicleFrame::HelpCreation::updateHelpCreation() { + // create information label + std::ostringstream information; + // set text depending of selected vehicle type + switch (myVehicleFrameParent->myItemSelector->getCurrentTagProperties().getTag()) { + case SUMO_TAG_VEHICLE: + information + << "- Click over a route to\n" + << " create a vehicle."; + break; + case SUMO_TAG_FLOW: + information + << "- Click over a route to\n" + << " create a flow."; + break; + case SUMO_TAG_TRIP: + information + << "- Select two edges to\n" + << " create a Trip."; + break; + default: + break; + } + // set information label + myInformationLabel->setText(information.str().c_str()); +} + +// --------------------------------------------------------------------------- +// GNEVehicleFrame::TripRouteCreator - methods +// --------------------------------------------------------------------------- + +GNEVehicleFrame::TripRouteCreator::TripRouteCreator(GNEVehicleFrame* vehicleFrameParent) : + FXGroupBox(vehicleFrameParent->myContentFrame, "Route creator", GUIDesignGroupBoxFrame), + myVehicleFrameParent(vehicleFrameParent) { + + // create button for create GEO POIs + myFinishCreationButton = new FXButton(this, "Finish route creation", nullptr, this, MID_GNE_VEHICLEFRAME_FINISHCREATION, GUIDesignButton); + myFinishCreationButton->disable(); + + // create button for create GEO POIs + myAbortCreationButton = new FXButton(this, "Abort route creation", nullptr, this, MID_GNE_VEHICLEFRAME_ABORT, GUIDesignButton); + myAbortCreationButton->disable(); + + // create button for create GEO POIs + myRemoveLastInsertedEdge = new FXButton(this, "Remove last inserted edge", nullptr, this, MID_GNE_VEHICLEFRAME_REMOVELASTEDGE, GUIDesignButton); + myRemoveLastInsertedEdge->disable(); +} + + +GNEVehicleFrame::TripRouteCreator::~TripRouteCreator() { +} + + +void +GNEVehicleFrame::TripRouteCreator::showTripRouteCreator() { + // disable buttons + myFinishCreationButton->disable(); + myAbortCreationButton->disable(); + myRemoveLastInsertedEdge->disable(); + show(); +} + + +void +GNEVehicleFrame::TripRouteCreator::hideTripRouteCreator() { + hide(); +} + + +std::vector +GNEVehicleFrame::TripRouteCreator::getSelectedEdges() const { + return mySelectedEdges; +} + + +void +GNEVehicleFrame::TripRouteCreator::addEdge(GNEEdge* edge) { + if (mySelectedEdges.empty() || ((mySelectedEdges.size() > 0) && (mySelectedEdges.back() != edge))) { + mySelectedEdges.push_back(edge); + // enable abort route button + myAbortCreationButton->enable(); + // disable undo/redo + myVehicleFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("trip creation"); + // set special color + for (auto i : edge->getLanes()) { + i->setSpecialColor(&myVehicleFrameParent->getEdgeCandidateSelectedColor()); + } + // calculate route if there is more than two edges + if (mySelectedEdges.size() > 1) { + // enable remove last edge button + myRemoveLastInsertedEdge->enable(); + // enable finish button + myFinishCreationButton->enable(); + // calculate temporal route + myTemporalRoute = GNEDemandElement::getRouteCalculatorInstance()->calculateDijkstraRoute( + GNEAttributeCarrier::parse(myVehicleFrameParent->myVTypeSelector->getCurrentVehicleType()->getAttribute(SUMO_ATTR_VCLASS)), mySelectedEdges); + } + } +} + + +void +GNEVehicleFrame::TripRouteCreator::clearEdges() { + // restore colors + for (const auto& i : mySelectedEdges) { + for (const auto& j : i->getLanes()) { + j->setSpecialColor(nullptr); + } + } + // clear edges + mySelectedEdges.clear(); + myTemporalRoute.clear(); + // enable undo/redo + myVehicleFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo(); +} + + +void +GNEVehicleFrame::TripRouteCreator::drawTemporalRoute() const { + // only draw if there is at least two edges + if (myTemporalRoute.size() > 1) { + // Add a draw matrix + glPushMatrix(); + // Start with the drawing of the area traslating matrix to origin + glTranslated(0, 0, GLO_MAX); + // set orange color + GLHelper::setColor(RGBColor::ORANGE); + // set line width + glLineWidth(5); + // draw first line + GLHelper::drawLine(myTemporalRoute.at(0)->getLanes().front().shape.front(), + myTemporalRoute.at(0)->getLanes().front().shape.back()); + // draw rest of lines + for (int i = 1; i < (int)myTemporalRoute.size(); i++) { + GLHelper::drawLine(myTemporalRoute.at(i - 1)->getLanes().front().shape.back(), + myTemporalRoute.at(i)->getLanes().front().shape.front()); + GLHelper::drawLine(myTemporalRoute.at(i)->getLanes().front().shape.front(), + myTemporalRoute.at(i)->getLanes().front().shape.back()); + } + // Pop last matrix + glPopMatrix(); + } +} + + +bool +GNEVehicleFrame::TripRouteCreator::isValid(SUMOVehicleClass /* vehicleClass */) const { + return mySelectedEdges.size() > 0; +} + + +long +GNEVehicleFrame::TripRouteCreator::onCmdAbortRouteCreation(FXObject*, FXSelector, void*) { + clearEdges(); + // disable buttons + myFinishCreationButton->disable(); + myAbortCreationButton->disable(); + myRemoveLastInsertedEdge->disable(); + return 1; +} + + +long +GNEVehicleFrame::TripRouteCreator::onCmdFinishRouteCreation(FXObject*, FXSelector, void*) { + // only create route if there is more than two edges + if (mySelectedEdges.size() > 1) { + // obtain tag (only for improve code legibility) + SumoXMLTag vehicleTag = myVehicleFrameParent->myItemSelector->getCurrentTagProperties().getTag(); + + // Declare map to keep attributes from Frames from Frame + std::map valuesMap = myVehicleFrameParent->myVehicleAttributes->getAttributesAndValues(false); + + // add ID + valuesMap[SUMO_ATTR_ID] = myVehicleFrameParent->myViewNet->getNet()->generateDemandElementID(vehicleTag); + + // add VType + valuesMap[SUMO_ATTR_TYPE] = myVehicleFrameParent->myVTypeSelector->getCurrentVehicleType()->getID(); + + // Add parameter departure + if (valuesMap.count(SUMO_ATTR_DEPART) == 0) { + valuesMap[SUMO_ATTR_DEPART] = "0"; + } + + + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, myVehicleFrameParent->getPredefinedTagsMML(), toString(vehicleTag)); + + // obtain trip parameters in tripParameters + SUMOVehicleParameter* tripParameters = SUMOVehicleParserHelper::parseVehicleAttributes(SUMOSAXAttrs); + + // create it in RouteFrame + GNERouteHandler::buildTrip(myVehicleFrameParent->myViewNet, true, tripParameters, mySelectedEdges); + + // delete tripParameters + delete tripParameters; + + // clear edges + clearEdges(); + + // disable buttons + myFinishCreationButton->disable(); + myAbortCreationButton->disable(); + myRemoveLastInsertedEdge->disable(); + } + return 1; +} + + +long +GNEVehicleFrame::TripRouteCreator::onCmdRemoveLastRouteEdge(FXObject*, FXSelector, void*) { + if (mySelectedEdges.size() > 1) { + // remove last edge + mySelectedEdges.pop_back(); + // calculate temporal route + myTemporalRoute = GNEDemandElement::getRouteCalculatorInstance()->calculateDijkstraRoute( + GNEAttributeCarrier::parse(myVehicleFrameParent->myVTypeSelector->getCurrentVehicleType()->getAttribute(SUMO_ATTR_VCLASS)), mySelectedEdges); + } + return 1; +} + +// --------------------------------------------------------------------------- +// GNEVehicleFrame - methods +// --------------------------------------------------------------------------- + +GNEVehicleFrame::GNEVehicleFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) : + GNEFrame(horizontalFrameParent, viewNet, "Vehicles") { + + // Create item Selector modul for vehicles + myItemSelector = new ItemSelector(this, GNEAttributeCarrier::TagType::TAGTYPE_VEHICLE); + + // Create vehicle type selector + myVTypeSelector = new VTypeSelector(this); + + // Create vehicle parameters + myVehicleAttributes = new AttributesCreator(this); + + // create TripRouteCreator Modul + myTripRouteCreator = new TripRouteCreator(this); + + // Create Help Creation Modul + myHelpCreation = new HelpCreation(this); + + // set Vehicle as default vehicle + myItemSelector->setCurrentTypeTag(SUMO_TAG_VEHICLE); +} + + +GNEVehicleFrame::~GNEVehicleFrame() {} + + +void +GNEVehicleFrame::show() { + // refresh item selector + myItemSelector->refreshTagProperties(); + // refresh vType selector + myVTypeSelector->refreshVTypeSelector(); + // show frame + GNEFrame::show(); +} + + +bool +GNEVehicleFrame::addVehicle(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) { + // obtain tag (only for improve code legibility) + SumoXMLTag vehicleTag = myItemSelector->getCurrentTagProperties().getTag(); + + // first check that current selected vehicle is valid + if (vehicleTag == SUMO_TAG_NOTHING) { + myViewNet->setStatusBarText("Current selected vehicle isn't valid."); + return false; + } + + // now check if VType is valid + if (myVTypeSelector->getCurrentVehicleType() == nullptr) { + myViewNet->setStatusBarText("Current selected vehicle type isn't valid."); + return false; + } + + // Declare map to keep attributes from Frames from Frame + std::map valuesMap = myVehicleAttributes->getAttributesAndValues(false); + + // add ID + valuesMap[SUMO_ATTR_ID] = myViewNet->getNet()->generateDemandElementID(vehicleTag); + + // add VType + valuesMap[SUMO_ATTR_TYPE] = myVTypeSelector->getCurrentVehicleType()->getID(); + + // set route or edges depending of vehicle type + if ((vehicleTag == SUMO_TAG_VEHICLE || vehicleTag == SUMO_TAG_FLOW)) { + if (objectsUnderCursor.getDemandElementFront() && + (objectsUnderCursor.getDemandElementFront()->getTagProperty().getTag() == SUMO_TAG_ROUTE)) { + // obtain route + valuesMap[SUMO_ATTR_ROUTE] = objectsUnderCursor.getDemandElementFront()->getID(); + if (vehicleTag == SUMO_TAG_VEHICLE) { + // Add parameter departure + if (valuesMap.count(SUMO_ATTR_DEPART) == 0) { + valuesMap[SUMO_ATTR_DEPART] = "0"; + } + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(vehicleTag)); + // obtain vehicle parameters in vehicleParameters + SUMOVehicleParameter* vehicleParameters = SUMOVehicleParserHelper::parseVehicleAttributes(SUMOSAXAttrs); + // create it in RouteFrame + GNERouteHandler::buildVehicle(myViewNet, true, vehicleParameters); + // delete vehicleParameters + delete vehicleParameters; + } else { + // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes + SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(vehicleTag)); + // obtain flow parameters in flowParameters + SUMOVehicleParameter* flowParameters = SUMOVehicleParserHelper::parseFlowAttributes(SUMOSAXAttrs, 0, SUMOTime_MAX); + // create it in RouteFrame + GNERouteHandler::buildFlow(myViewNet, true, flowParameters); + // delete vehicleParameters + delete flowParameters; + } + // all ok, then return true; + return true; + } else { + myViewNet->setStatusBarText(toString(vehicleTag) + " has to be placed within a route."); + return false; + } + } else if ((vehicleTag == SUMO_TAG_TRIP) && objectsUnderCursor.getEdgeFront()) { + // add clicked edge in TripRouteCreator + myTripRouteCreator->addEdge(objectsUnderCursor.getEdgeFront()); + } + // nothing crated + return false; +} + + +GNEVehicleFrame::TripRouteCreator* +GNEVehicleFrame::getTripRouteCreator() const { + return myTripRouteCreator; +} + +// =========================================================================== +// protected +// =========================================================================== + +void +GNEVehicleFrame::enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties) { + // show vehicle type selector modul + myVTypeSelector->showVTypeSelector(tagProperties); + // show AutoRute creator if we're editing a trip + if (myItemSelector->getCurrentTagProperties().getTag() == SUMO_TAG_TRIP) { + myTripRouteCreator->showTripRouteCreator(); + } else { + myTripRouteCreator->hideTripRouteCreator(); + } +} + + +void +GNEVehicleFrame::disableModuls() { + // hide all moduls if vehicle isn't valid + myVTypeSelector->hideVTypeSelector(); + myVehicleAttributes->hideAttributesCreatorModul(); + myHelpCreation->hideHelpCreation(); +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleFrame.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,235 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleFrame.h +/// @author Pablo Alvarez Lopez +/// @date Jan 2018 +/// @version $Id$ +/// +// The Widget for add Vehicles/Flows/Trips/etc. elements +/****************************************************************************/ +#ifndef GNEVehicleFrame_h +#define GNEVehicleFrame_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include "GNEFrame.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEVehicleFrame + */ +class GNEVehicleFrame : public GNEFrame { + +public: + + // =========================================================================== + // class VTypeSelector + // =========================================================================== + + class VTypeSelector : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNEVehicleFrame::VTypeSelector) + + public: + /// @brief constructor + VTypeSelector(GNEVehicleFrame* vehicleFrameParent); + + /// @brief destructor + ~VTypeSelector(); + + /// @brief get current type tag + const GNEDemandElement* getCurrentVehicleType() const; + + /// @brief show VType selector + void showVTypeSelector(const GNEAttributeCarrier::TagProperties& tagProperties); + + /// @brief hide VType selector + void hideVTypeSelector(); + + /// @brief refresh VType selector + void refreshVTypeSelector(); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user select another element in ComboBox + long onCmdSelectVType(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + VTypeSelector() {} + + private: + /// @brief pointer to Vehicle Frame Parent + GNEVehicleFrame* myVehicleFrameParent; + + /// @brief comboBox with the list of elements type + FXComboBox* myTypeMatchBox; + + /// @brief current vehicle type + GNEDemandElement* myCurrentVehicleType; + }; + + // =========================================================================== + // class HelpCreation + // =========================================================================== + + class HelpCreation : protected FXGroupBox { + + public: + /// @brief constructor + HelpCreation(GNEVehicleFrame* vehicleFrameParent); + + /// @brief destructor + ~HelpCreation(); + + /// @brief show HelpCreation + void showHelpCreation(); + + /// @brief hide HelpCreation + void hideHelpCreation(); + + /// @brief update HelpCreation + void updateHelpCreation(); + + private: + /// @brief pointer to Vehicle Frame Parent + GNEVehicleFrame* myVehicleFrameParent; + + /// @brief Label with creation information + FXLabel* myInformationLabel; + }; + + // =========================================================================== + // class TripRouteCreator + // =========================================================================== + + class TripRouteCreator : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNEVehicleFrame::TripRouteCreator) + + public: + /// @brief default constructor + TripRouteCreator(GNEVehicleFrame* vehicleFrameParent); + + /// @brief destructor + ~TripRouteCreator(); + + /// @brief show TripRouteCreator + void showTripRouteCreator(); + + /// @brief show TripRouteCreator + void hideTripRouteCreator(); + + /// @brief check if from and to edges create a valid route + bool isValid(SUMOVehicleClass vehicleClass) const; + + /// @brief get current selected edgesm + std::vector getSelectedEdges() const; + + /// @brief set edge from (and change color) + void addEdge(GNEEdge* edge); + + /// @brief clear edges (and restore colors) + void clearEdges(); + + /// @brief draw temporal route + void drawTemporalRoute() const; + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user click over button "Abort route creation" + long onCmdAbortRouteCreation(FXObject*, FXSelector, void*); + + /// @brief Called when the user click over button "Finish route creation" + long onCmdFinishRouteCreation(FXObject*, FXSelector, void*); + + /// @brief Called when the user click over button "Remove las inserted edge" + long onCmdRemoveLastRouteEdge(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + TripRouteCreator() {} + + private: + /// @brief pointer to Vehicle Frame Parent + GNEVehicleFrame* myVehicleFrameParent; + + /// @brief current selected edges + std::vector mySelectedEdges; + + /// @brief vector with temporal route edges + std::vector myTemporalRoute; + + /// @brief button for finish route creation + FXButton* myFinishCreationButton; + + /// @brief button for abort route creation + FXButton* myAbortCreationButton; + + /// @brief button for removing last inserted edge + FXButton* myRemoveLastInsertedEdge; + }; + + /**@brief Constructor + * @brief parent FXHorizontalFrame in which this GNEFrame is placed + * @brief viewNet viewNet that uses this GNEFrame + */ + GNEVehicleFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet); + + /// @brief Destructor + ~GNEVehicleFrame(); + + /// @brief show Frame + void show(); + + /**@brief add vehicle element + * @param objectsUnderCursor collection of objects under cursor after click over view + * @return true if vehicle was sucesfully added + */ + bool addVehicle(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor); + + /// @brief get TripRouteCreator modul + TripRouteCreator* getTripRouteCreator() const; + +protected: + /// @brief enable moduls depending of item selected in ItemSelector + void enableModuls(const GNEAttributeCarrier::TagProperties& tagProperties); + + /// @brief disable moduls if element selected in itemSelector isn't valid + void disableModuls(); + +private: + /// @brief item selector (used to select diffent kind of vehicles) + ItemSelector* myItemSelector; + + /// @brief Vehicle Type selectors + VTypeSelector* myVTypeSelector; + + /// @brief internal vehicle attributes + AttributesCreator* myVehicleAttributes; + + /// @brief TripRouteCreator + TripRouteCreator* myTripRouteCreator; + + /// @brief Help creation + HelpCreation* myHelpCreation; +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.cpp sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.cpp --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,388 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleTypeFrame.cpp +/// @author Pablo Alvarez Lopez +/// @date Feb 2018 +/// @version $Id$ +/// +// The Widget for edit Vehicle Type elements +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEVehicleTypeFrame.h" + + +// =========================================================================== +// FOX callback mapping +// =========================================================================== + +FXDEFMAP(GNEVehicleTypeFrame::VehicleTypeSelector) vehicleTypeSelectorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_SET_TYPE, GNEVehicleTypeFrame::VehicleTypeSelector::onCmdSelectItem) +}; + +FXDEFMAP(GNEVehicleTypeFrame::VehicleTypeEditor) vehicleTypeEditorMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_GNE_VEHICLETYPEFRAME_CREATE, GNEVehicleTypeFrame::VehicleTypeEditor::onCmdCreateVehicleType), + FXMAPFUNC(SEL_COMMAND, MID_GNE_VEHICLETYPEFRAME_DELETE, GNEVehicleTypeFrame::VehicleTypeEditor::onCmdDeleteVehicleType), + FXMAPFUNC(SEL_COMMAND, MID_GNE_VEHICLETYPEFRAME_RESET, GNEVehicleTypeFrame::VehicleTypeEditor::onCmdResetVehicleType), + FXMAPFUNC(SEL_COMMAND, MID_GNE_VEHICLETYPEFRAME_COPY, GNEVehicleTypeFrame::VehicleTypeEditor::onCmdCopyVehicleType) +}; + +// Object implementation +FXIMPLEMENT(GNEVehicleTypeFrame::VehicleTypeSelector, FXGroupBox, vehicleTypeSelectorMap, ARRAYNUMBER(vehicleTypeSelectorMap)) +FXIMPLEMENT(GNEVehicleTypeFrame::VehicleTypeEditor, FXGroupBox, vehicleTypeEditorMap, ARRAYNUMBER(vehicleTypeEditorMap)) + +// =========================================================================== +// method definitions +// =========================================================================== + +// --------------------------------------------------------------------------- +// GNEVehicleTypeFrame::VehicleTypeSelector - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeFrame::VehicleTypeSelector::VehicleTypeSelector(GNEVehicleTypeFrame* vehicleTypeFrameParent) : + FXGroupBox(vehicleTypeFrameParent->myContentFrame, "Current Vehicle Type", GUIDesignGroupBoxFrame), + myVehicleTypeFrameParent(vehicleTypeFrameParent) { + // Create FXComboBox + myTypeMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_TYPE, GUIDesignComboBox); + // fill myTypeMatchBox with list of VTypes IDs + for (const auto& i : myVehicleTypeFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE)) { + myTypeMatchBox->appendItem(i.first.c_str()); + } + // Set visible items + myTypeMatchBox->setNumVisible((int)myTypeMatchBox->getNumItems()); + // VehicleTypeSelector is always shown + show(); +} + + +GNEVehicleTypeFrame::VehicleTypeSelector::~VehicleTypeSelector() {} + + +GNEDemandElement* +GNEVehicleTypeFrame::VehicleTypeSelector::getCurrentVehicleType() const { + // obtain current VType ID (To improve code legibly) + std::string vTypeID = myTypeMatchBox->getItem(myTypeMatchBox->getCurrentItem()).text(); + // check if ID of myTypeMatchBox is a valid ID + if (myVehicleTypeFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE).count(vTypeID) == 1) { + return myVehicleTypeFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE).at(vTypeID); + } else { + return nullptr; + } +} + + +void +GNEVehicleTypeFrame::VehicleTypeSelector::setCurrentVehicleType(GNEDemandElement* vType) { + bool valid = false; + // make sure that tag is in myTypeMatchBox + for (int i = 0; i < (int)myTypeMatchBox->getNumItems(); i++) { + if (myTypeMatchBox->getItem(i).text() == vType->getID()) { + myTypeMatchBox->setCurrentItem(i); + valid = true; + } + } + // Check that give vType type is valid + if (valid) { + // show moduls if selected item is valid + myVehicleTypeFrameParent->enableModuls(vType); + } else { + // hide all moduls if selected item isn't valid + myVehicleTypeFrameParent->disableModuls(); + } +} + + +void +GNEVehicleTypeFrame::VehicleTypeSelector::refreshVehicleTypeSelector() { + // first clear items + myTypeMatchBox->clearItems(); + // fill myTypeMatchBox with list of VTypes IDs + for (const auto& i : myVehicleTypeFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE)) { + myTypeMatchBox->appendItem(i.first.c_str()); + } + // Set visible items + myTypeMatchBox->setNumVisible((int)myTypeMatchBox->getNumItems()); + // refresh vehicle type editor + myVehicleTypeFrameParent->myVehicleTypeEditor->refreshVehicleTypeEditorModul(); +} + + +long +GNEVehicleTypeFrame::VehicleTypeSelector::onCmdSelectItem(FXObject*, FXSelector, void*) { + // Check if value of myTypeMatchBox correspond of an allowed additional tags + for (const auto& i : myVehicleTypeFrameParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_VTYPE)) { + if (i.first == myTypeMatchBox->getText().text()) { + // set color of myTypeMatchBox to black (valid) + myTypeMatchBox->setTextColor(FXRGB(0, 0, 0)); + // show moduls if selected item is valid + myVehicleTypeFrameParent->enableModuls(i.second); + // refresh vehicle type editor + myVehicleTypeFrameParent->myVehicleTypeEditor->refreshVehicleTypeEditorModul(); + // Write Warning in console if we're in testing mode + WRITE_DEBUG(("Selected item '" + myTypeMatchBox->getText() + "' in VehicleTypeSelector").text()); + return 1; + } + } + // hide all moduls if selected item isn't valid + myVehicleTypeFrameParent->disableModuls(); + // set color of myTypeMatchBox to red (invalid) + myTypeMatchBox->setTextColor(FXRGB(255, 0, 0)); + // Write Warning in console if we're in testing mode + WRITE_DEBUG("Selected invalid item in VehicleTypeSelector"); + return 1; +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeFrame::VehicleTypeEditor - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeFrame::VehicleTypeEditor::VehicleTypeEditor(GNEVehicleTypeFrame* vehicleTypeFrameParent) : + FXGroupBox(vehicleTypeFrameParent->myContentFrame, "Vehicle Type Editor", GUIDesignGroupBoxFrame), + myVehicleTypeFrameParent(vehicleTypeFrameParent) { + // Create new vehicle type + myCreateVehicleTypeButton = new FXButton(this, "Create Vehicle Type", nullptr, this, MID_GNE_VEHICLETYPEFRAME_CREATE, GUIDesignButton); + // Create delete vehicle type + myDeleteVehicleTypeButton = new FXButton(this, "Delete Vehicle Type", nullptr, this, MID_GNE_VEHICLETYPEFRAME_DELETE, GUIDesignButton); + // Create reset vehicle type + myResetDefaultVehicleTypeButton = new FXButton(this, "Reset default Vehicle Type", nullptr, this, MID_GNE_VEHICLETYPEFRAME_RESET, GUIDesignButton); + // Create copy vehicle type + myCopyVehicleTypeButton = new FXButton(this, "Copy Vehicle Type", nullptr, this, MID_GNE_VEHICLETYPEFRAME_COPY, GUIDesignButton); +} + + +GNEVehicleTypeFrame::VehicleTypeEditor::~VehicleTypeEditor() {} + + +void +GNEVehicleTypeFrame::VehicleTypeEditor::showVehicleTypeEditorModul() { + refreshVehicleTypeEditorModul(); + show(); +} + + +void +GNEVehicleTypeFrame::VehicleTypeEditor::hideVehicleTypeEditorModul() { + hide(); +} + + +void +GNEVehicleTypeFrame::VehicleTypeEditor::refreshVehicleTypeEditorModul() { + // disable delete button if DEFAULT_VTYPE_ID is selected + if ((myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getID() == DEFAULT_VTYPE_ID) || + (myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getID() == DEFAULT_PEDTYPE_ID) || + (myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getID() == DEFAULT_BIKETYPE_ID)) { + // hide delete vehicle type buttond and show reset default vehicle type button + myDeleteVehicleTypeButton->hide(); + myResetDefaultVehicleTypeButton->show(); + // check if reset default vehicle type button has to be enabled or disabled + if (GNEAttributeCarrier::parse(myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getAttribute(GNE_ATTR_DEFAULT_VTYPE_MODIFIED))) { + myResetDefaultVehicleTypeButton->enable(); + } else { + myResetDefaultVehicleTypeButton->disable(); + } + } else { + // show delete vehicle type buttond and hide reset default vehicle type button + myDeleteVehicleTypeButton->show(); + myResetDefaultVehicleTypeButton->hide(); + } + // update modul + recalc(); +} + + +long +GNEVehicleTypeFrame::VehicleTypeEditor::onCmdCreateVehicleType(FXObject*, FXSelector, void*) { + // obtain a new valid Vehicle Type ID + std::string vehicleTypeID = myVehicleTypeFrameParent->myViewNet->getNet()->generateDemandElementID(SUMO_TAG_VTYPE); + // create new vehicle type + GNEDemandElement* vehicleType = new GNEVehicleType(myVehicleTypeFrameParent->myViewNet, vehicleTypeID); + // add it using undoList (to allow undo-redo) + myVehicleTypeFrameParent->myViewNet->getUndoList()->add(new GNEChange_DemandElement(vehicleType, true), true); + // refresh Vehicle Type Selector (to show the new VType) + myVehicleTypeFrameParent->myVehicleTypeSelector->refreshVehicleTypeSelector(); + // set created vehicle type in selector + myVehicleTypeFrameParent->myVehicleTypeSelector->setCurrentVehicleType(vehicleType); + // refresh VehicleType Editor Modul + myVehicleTypeFrameParent->myVehicleTypeEditor->refreshVehicleTypeEditorModul(); + return 1; +} + + +long +GNEVehicleTypeFrame::VehicleTypeEditor::onCmdDeleteVehicleType(FXObject*, FXSelector, void*) { + // show question dialog if vtype has already assigned vehicles + if (myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getDemandElementChilds().size() > 0) { + std::string plural = myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getDemandElementChilds().size() == 1 ? ("") : ("s"); + // show warning in gui testing debug mode + WRITE_DEBUG("Opening FXMessageBox 'remove vType'"); + // Ask confirmation to user + FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, + ("Remove " + toString(SUMO_TAG_VTYPE) + "s").c_str(), "%s", + ("Delete " + toString(SUMO_TAG_VTYPE) + " '" + myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getID() + + "' will remove " + toString(myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->getDemandElementChilds().size()) + + " vehicle" + plural + ". Continue?").c_str()); + if (answer != 1) { // 1:yes, 2:no, 4:esc + // write warning if netedit is running in testing mode + if (answer == 2) { + WRITE_DEBUG("Closed FXMessageBox 'remove vType' with 'No'"); + } else if (answer == 4) { + WRITE_DEBUG("Closed FXMessageBox 'remove vType' with 'ESC'"); + } + } else { + // remove vehicle type (and all of their childs) + myVehicleTypeFrameParent->myViewNet->getNet()->deleteDemandElement(myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType(), + myVehicleTypeFrameParent->myViewNet->getUndoList()); + } + } else { + // remove vehicle type (and all of their childs) + myVehicleTypeFrameParent->myViewNet->getNet()->deleteDemandElement(myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType(), + myVehicleTypeFrameParent->myViewNet->getUndoList()); + } + return 1; +} + + +long +GNEVehicleTypeFrame::VehicleTypeEditor::onCmdResetVehicleType(FXObject*, FXSelector, void*) { + // begin reset default vehicle type values + myVehicleTypeFrameParent->getViewNet()->getUndoList()->p_begin("reset default vehicle type values"); + // reset all values of default vehicle type + for (const auto& i : GNEAttributeCarrier::getTagProperties(SUMO_TAG_VTYPE)) { + // change all attributes with "" to reset it (except ID and vClass) + if ((i.first != SUMO_ATTR_ID) && (i.first != SUMO_ATTR_VCLASS)) { + myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->setAttribute(i.first, "", myVehicleTypeFrameParent->myViewNet->getUndoList()); + } + } + // change special attribute GNE_ATTR_DEFAULT_VTYPE_MODIFIED + myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()->setAttribute(GNE_ATTR_DEFAULT_VTYPE_MODIFIED, "false", myVehicleTypeFrameParent->myViewNet->getUndoList()); + // finish reset default vehicle type values + myVehicleTypeFrameParent->getViewNet()->getUndoList()->p_end(); + // call "showAttributeEditorModul" to refresh attribute list + myVehicleTypeFrameParent->myVehicleTypeAttributesEditor->showAttributeEditorModul({myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()}, false); + return 1; +} + + +long +GNEVehicleTypeFrame::VehicleTypeEditor::onCmdCopyVehicleType(FXObject*, FXSelector, void*) { + // obtain a new valid Vehicle Type ID + std::string vehicleTypeID = myVehicleTypeFrameParent->myViewNet->getNet()->generateDemandElementID(SUMO_TAG_VTYPE); + // obtain vehicle type in which new Vehicle Type will be based + GNEVehicleType* vType = dynamic_cast(myVehicleTypeFrameParent->myVehicleTypeSelector->getCurrentVehicleType()); + // check that vType exist + if (vType) { + // create a new Vehicle Type based on the current selected vehicle type + GNEDemandElement* vehicleTypeCopy = new GNEVehicleType(myVehicleTypeFrameParent->myViewNet, vehicleTypeID, vType); + // add it using undoList (to allow undo-redo) + myVehicleTypeFrameParent->myViewNet->getUndoList()->add(new GNEChange_DemandElement(vehicleTypeCopy, true), true); + // refresh Vehicle Type Selector (to show the new VType) + myVehicleTypeFrameParent->myVehicleTypeSelector->refreshVehicleTypeSelector(); + // set created vehicle type in selector + myVehicleTypeFrameParent->myVehicleTypeSelector->setCurrentVehicleType(vehicleTypeCopy); + // refresh VehicleType Editor Modul + myVehicleTypeFrameParent->myVehicleTypeEditor->refreshVehicleTypeEditorModul(); + } + return 1; +} + +// --------------------------------------------------------------------------- +// GNEVehicleTypeFrame - methods +// --------------------------------------------------------------------------- + +GNEVehicleTypeFrame::GNEVehicleTypeFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) : + GNEFrame(horizontalFrameParent, viewNet, "Vehicle Types") { + + // create modul for edit vehicle types (Create, copy, etc.) + myVehicleTypeEditor = new VehicleTypeEditor(this); + + // create vehicle type selector + myVehicleTypeSelector = new VehicleTypeSelector(this); + + // Create vehicle type attributes editor + myVehicleTypeAttributesEditor = new AttributesEditor(this); + + // create modul for open extended attributes dialog + myAttributesEditorExtended = new AttributesEditorExtended(this); + + // set "VTYPE_DEFAULT" as default vehicle Type + myVehicleTypeSelector->setCurrentVehicleType(myViewNet->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, DEFAULT_VTYPE_ID)); +} + + +GNEVehicleTypeFrame::~GNEVehicleTypeFrame() {} + + +void +GNEVehicleTypeFrame::show() { + // refresh vehicle type and Attribute Editor + myVehicleTypeSelector->refreshVehicleTypeSelector(); + // show vehicle type attributes editor (except extended attributes) + myVehicleTypeAttributesEditor->showAttributeEditorModul({myVehicleTypeSelector->getCurrentVehicleType()}, false); + // show frame + GNEFrame::show(); +} + + +GNEVehicleTypeFrame::VehicleTypeSelector* +GNEVehicleTypeFrame::getVehicleTypeSelector() const { + return myVehicleTypeSelector; +} + + +void +GNEVehicleTypeFrame::enableModuls(GNEDemandElement* vType) { + // show vehicle type attributes editor (except extended attributes) + myVehicleTypeAttributesEditor->showAttributeEditorModul({vType}, false); +} + + +void +GNEVehicleTypeFrame::disableModuls() { + // hide attributes editor + myVehicleTypeAttributesEditor->hideAttributesEditorModul(); +} + + +void +GNEVehicleTypeFrame::updateFrameAfterChangeAttribute() { + myVehicleTypeSelector->refreshVehicleTypeSelector(); +} + + +void +GNEVehicleTypeFrame::openAttributesEditorExtendedDialog() { + // open vehicle type dialog + if (myVehicleTypeSelector->getCurrentVehicleType()) { + GNEVehicleTypeDialog(myVehicleTypeSelector->getCurrentVehicleType(), true); + // call "showAttributeEditorModul" to refresh attribute list + myVehicleTypeAttributesEditor->showAttributeEditorModul({myVehicleTypeSelector->getCurrentVehicleType()}, false); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.h sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.h --- sumo-1.1.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/GNEVehicleTypeFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,189 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEVehicleTypeFrame.h +/// @author Pablo Alvarez Lopez +/// @date Feb 2018 +/// @version $Id$ +/// +// The Widget for edit Vehicle Type elements +/****************************************************************************/ +#ifndef GNEVehicleTypeFrame_h +#define GNEVehicleTypeFrame_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include "GNEFrame.h" + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEVehicle; + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GNEVehicleTypeFrame + */ +class GNEVehicleTypeFrame : public GNEFrame { + +public: + + // =========================================================================== + // class VehicleTypeSelector + // =========================================================================== + + class VehicleTypeSelector : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNEVehicleTypeFrame::VehicleTypeSelector) + + public: + /// @brief constructor + VehicleTypeSelector(GNEVehicleTypeFrame* vehicleTypeFrameParent); + + /// @brief destructor + ~VehicleTypeSelector(); + + /// @brief get current Vehicle Type + GNEDemandElement* getCurrentVehicleType() const; + + /// @brief set current Vehicle Type + void setCurrentVehicleType(GNEDemandElement* vType); + + /// @brief refresh vehicle type + void refreshVehicleTypeSelector(); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when the user select another element in ComboBox + long onCmdSelectItem(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + VehicleTypeSelector() {} + + private: + /// @brief pointer to Frame Parent + GNEVehicleTypeFrame* myVehicleTypeFrameParent; + + /// @brief comboBox with the list of elements type + FXComboBox* myTypeMatchBox; + }; + + // =========================================================================== + // class VehicleTypeEditor + // =========================================================================== + + class VehicleTypeEditor : protected FXGroupBox { + /// @brief FOX-declaration + FXDECLARE(GNEVehicleTypeFrame::VehicleTypeEditor) + + public: + /// @brief constructor + VehicleTypeEditor(GNEVehicleTypeFrame* vehicleTypeFrameParent); + + /// @brief destructor + ~VehicleTypeEditor(); + + /// @brief show VehicleTypeEditor modul + void showVehicleTypeEditorModul(); + + /// @brief hide VehicleTypeEditor box + void hideVehicleTypeEditorModul(); + + /// @brief update VehicleTypeEditor modul + void refreshVehicleTypeEditorModul(); + + /// @name FOX-callbacks + /// @{ + /// @brief Called when "Vreate Vehicle Type" button is clicked + long onCmdCreateVehicleType(FXObject*, FXSelector, void*); + + /// @brief Called when "Delete Vehicle Type" button is clicked + long onCmdDeleteVehicleType(FXObject*, FXSelector, void*); + + /// @brief Called when "Delete Vehicle Type" button is clicked + long onCmdResetVehicleType(FXObject*, FXSelector, void*); + + /// @brief Called when "Copy Vehicle Type" button is clicked + long onCmdCopyVehicleType(FXObject*, FXSelector, void*); + /// @} + + protected: + /// @brief FOX needs this + VehicleTypeEditor() {}; + + private: + /// @brief pointer to vehicle type Frame Parent + GNEVehicleTypeFrame* myVehicleTypeFrameParent; + + /// @brief "create vehicle type" button + FXButton* myCreateVehicleTypeButton; + + /// @brief "delete vehicle type" button + FXButton* myDeleteVehicleTypeButton; + + /// @brief "delete default vehicle type" button + FXButton* myResetDefaultVehicleTypeButton; + + /// @brief "copy vehicle type" + FXButton* myCopyVehicleTypeButton; + }; + + /**@brief Constructor + * @brief parent FXHorizontalFrame in which this GNEFrame is placed + * @brief viewNet viewNet that uses this GNEFrame + */ + GNEVehicleTypeFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet); + + /// @brief Destructor + ~GNEVehicleTypeFrame(); + + /// @brief show Frame + void show(); + + /// @brief get vehicle type selector + VehicleTypeSelector* getVehicleTypeSelector() const; + +protected: + /// @brief enable moduls depending of item selected in VehicleTypeSelector + void enableModuls(GNEDemandElement* vType); + + /// @brief disable moduls if element selected in itemSelector isn't valid + void disableModuls(); + + /// @brief function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEditor/... + void updateFrameAfterChangeAttribute(); + + /// @brief open AttributesCreator extended dialog (used for editing advance attributes of Vehicle Types) + void openAttributesEditorExtendedDialog(); + +private: + /// @brief vehicle type selector + VehicleTypeSelector* myVehicleTypeSelector; + + /// @brief editorinternal vehicle type attributes + AttributesEditor* myVehicleTypeAttributesEditor; + + /// @brief modul for open extended attributes dialog + AttributesEditorExtended* myAttributesEditorExtended; + + /// @brief Vehicle Type editor (Create, copy, etc.) + VehicleTypeEditor* myVehicleTypeEditor; +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/Makefile.am sumo-1.2.0+dfsg1/src/netedit/frames/Makefile.am --- sumo-1.1.0+dfsg1/src/netedit/frames/Makefile.am 2018-10-28 23:00:27.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -10,4 +10,9 @@ GNETAZFrame.cpp GNETAZFrame.h \ GNEDeleteFrame.cpp GNEDeleteFrame.h \ GNEPolygonFrame.cpp GNEPolygonFrame.h \ +GNECreateEdgeFrame.cpp GNECreateEdgeFrame.h \ +GNERouteFrame.cpp GNERouteFrame.h \ +GNEStopFrame.cpp GNEStopFrame.h \ +GNEVehicleFrame.cpp GNEVehicleFrame.h \ +GNEVehicleTypeFrame.cpp GNEVehicleTypeFrame.h \ GNEProhibitionFrame.cpp GNEProhibitionFrame.h diff -Nru sumo-1.1.0+dfsg1/src/netedit/frames/Makefile.in sumo-1.2.0+dfsg1/src/netedit/frames/Makefile.in --- sumo-1.1.0+dfsg1/src/netedit/frames/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/frames/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,655 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netedit/frames -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libneteditframes_a_AR = $(AR) $(ARFLAGS) -libneteditframes_a_LIBADD = -am_libneteditframes_a_OBJECTS = GNEFrame.$(OBJEXT) \ - GNEInspectorFrame.$(OBJEXT) GNESelectorFrame.$(OBJEXT) \ - GNEConnectorFrame.$(OBJEXT) GNETLSEditorFrame.$(OBJEXT) \ - GNEAdditionalFrame.$(OBJEXT) GNECrossingFrame.$(OBJEXT) \ - GNETAZFrame.$(OBJEXT) GNEDeleteFrame.$(OBJEXT) \ - GNEPolygonFrame.$(OBJEXT) GNEProhibitionFrame.$(OBJEXT) -libneteditframes_a_OBJECTS = $(am_libneteditframes_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 = $(libneteditframes_a_SOURCES) -DIST_SOURCES = $(libneteditframes_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libneteditframes.a -libneteditframes_a_SOURCES = GNEFrame.cpp GNEFrame.h \ -GNEInspectorFrame.cpp GNEInspectorFrame.h \ -GNESelectorFrame.cpp GNESelectorFrame.h \ -GNEConnectorFrame.cpp GNEConnectorFrame.h \ -GNETLSEditorFrame.cpp GNETLSEditorFrame.h \ -GNEAdditionalFrame.cpp GNEAdditionalFrame.h \ -GNECrossingFrame.cpp GNECrossingFrame.h \ -GNETAZFrame.cpp GNETAZFrame.h \ -GNEDeleteFrame.cpp GNEDeleteFrame.h \ -GNEPolygonFrame.cpp GNEPolygonFrame.h \ -GNEProhibitionFrame.cpp GNEProhibitionFrame.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) --foreign src/netedit/frames/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netedit/frames/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) - -libneteditframes.a: $(libneteditframes_a_OBJECTS) $(libneteditframes_a_DEPENDENCIES) $(EXTRA_libneteditframes_a_DEPENDENCIES) - $(AM_V_at)-rm -f libneteditframes.a - $(AM_V_AR)$(libneteditframes_a_AR) libneteditframes.a $(libneteditframes_a_OBJECTS) $(libneteditframes_a_LIBADD) - $(AM_V_at)$(RANLIB) libneteditframes.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEAdditionalFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEConnectorFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECrossingFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEDeleteFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEInspectorFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEPolygonFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEProhibitionFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNESelectorFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNETAZFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNETLSEditorFrame.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netedit/GNEApplicationWindow.cpp sumo-1.2.0+dfsg1/src/netedit/GNEApplicationWindow.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEApplicationWindow.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEApplicationWindow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -33,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -53,6 +55,7 @@ #include "GNEEvent_NetworkLoaded.h" #include "GNELoadThread.h" #include "GNENet.h" +#include "GNEViewNet.h" #include "GNEUndoList.h" #include "GNEViewParent.h" @@ -65,151 +68,243 @@ // =========================================================================== FXDEFMAP(GNEApplicationWindow) GNEApplicationWindowMap[] = { // quit calls - FXMAPFUNC(SEL_COMMAND, MID_QUIT, GNEApplicationWindow::onCmdQuit), - FXMAPFUNC(SEL_SIGNAL, MID_QUIT, GNEApplicationWindow::onCmdQuit), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE, GNEApplicationWindow::onCmdQuit), + FXMAPFUNC(SEL_SIGNAL, MID_HOTKEY_CTRL_Q_CLOSE, GNEApplicationWindow::onCmdQuit), FXMAPFUNC(SEL_CLOSE, MID_WINDOW, GNEApplicationWindow::onCmdQuit), // toolbar file - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_NEWNETWORK, GNEApplicationWindow::onCmdNewNetwork), - FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_NEWNETWORK, GNEApplicationWindow::onUpdOpen), - FXMAPFUNC(SEL_COMMAND, MID_OPEN_NETWORK, GNEApplicationWindow::onCmdOpenNetwork), - FXMAPFUNC(SEL_UPDATE, MID_OPEN_NETWORK, GNEApplicationWindow::onUpdOpen), - FXMAPFUNC(SEL_COMMAND, MID_OPEN_CONFIG, GNEApplicationWindow::onCmdOpenConfiguration), - FXMAPFUNC(SEL_UPDATE, MID_OPEN_CONFIG, GNEApplicationWindow::onUpdOpen), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_OPENFOREIGN, GNEApplicationWindow::onCmdOpenForeign), - FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_OPENFOREIGN, GNEApplicationWindow::onUpdOpen), - FXMAPFUNC(SEL_COMMAND, MID_OPEN_SHAPES, GNEApplicationWindow::onCmdOpenShapes), - FXMAPFUNC(SEL_UPDATE, MID_OPEN_SHAPES, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_OPEN_ADDITIONALS, GNEApplicationWindow::onCmdOpenAdditionals), - FXMAPFUNC(SEL_UPDATE, MID_OPEN_ADDITIONALS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_OPEN_TLSPROGRAMS, GNEApplicationWindow::onCmdOpenTLSPrograms), - FXMAPFUNC(SEL_UPDATE, MID_OPEN_TLSPROGRAMS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_RECENTFILE, GNEApplicationWindow::onCmdOpenRecent), - FXMAPFUNC(SEL_UPDATE, MID_RECENTFILE, GNEApplicationWindow::onUpdOpen), - FXMAPFUNC(SEL_COMMAND, MID_RELOAD, GNEApplicationWindow::onCmdReload), - FXMAPFUNC(SEL_UPDATE, MID_RELOAD, GNEApplicationWindow::onUpdReload), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVENETWORK, GNEApplicationWindow::onCmdSaveNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVENETWORK, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVENETWORK_AS, GNEApplicationWindow::onCmdSaveAsNetwork), - FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVENETWORK_AS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEPLAINXML, GNEApplicationWindow::onCmdSaveAsPlainXML), - FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVEPLAINXML, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEJOINED, GNEApplicationWindow::onCmdSaveJoined), - FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVEJOINED, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVESHAPES, GNEApplicationWindow::onCmdSaveShapes), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVESHAPES_AS, GNEApplicationWindow::onCmdSaveShapesAs), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEADDITIONALS, GNEApplicationWindow::onCmdSaveAdditionals), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEADDITIONALS_AS, GNEApplicationWindow::onCmdSaveAdditionalsAs), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS, GNEApplicationWindow::onCmdSaveTLSPrograms), - FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS, GNEApplicationWindow::onCmdSaveTLSProgramsAs), - FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_CLOSE, GNEApplicationWindow::onCmdClose), - FXMAPFUNC(SEL_UPDATE, MID_CLOSE, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_N_NEWNETWORK, GNEApplicationWindow::onCmdNewNetwork), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_N_NEWNETWORK, GNEApplicationWindow::onUpdOpen), + FXMAPFUNC(SEL_COMMAND, MID_OPEN_NETWORK, GNEApplicationWindow::onCmdOpenNetwork), + FXMAPFUNC(SEL_UPDATE, MID_OPEN_NETWORK, GNEApplicationWindow::onUpdOpen), + FXMAPFUNC(SEL_COMMAND, MID_OPEN_CONFIG, GNEApplicationWindow::onCmdOpenConfiguration), + FXMAPFUNC(SEL_UPDATE, MID_OPEN_CONFIG, GNEApplicationWindow::onUpdOpen), + FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_OPENFOREIGN, GNEApplicationWindow::onCmdOpenForeign), + FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_OPENFOREIGN, GNEApplicationWindow::onUpdOpen), + FXMAPFUNC(SEL_COMMAND, MID_OPEN_TLSPROGRAMS, GNEApplicationWindow::onCmdOpenTLSPrograms), + FXMAPFUNC(SEL_UPDATE, MID_OPEN_TLSPROGRAMS, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_RECENTFILE, GNEApplicationWindow::onCmdOpenRecent), + FXMAPFUNC(SEL_UPDATE, MID_RECENTFILE, GNEApplicationWindow::onUpdOpen), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_R_RELOAD, GNEApplicationWindow::onCmdReload), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_R_RELOAD, GNEApplicationWindow::onUpdReload), + // network // + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK, GNEApplicationWindow::onCmdSaveNetwork), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_S_SAVENETWORKAS, GNEApplicationWindow::onCmdSaveAsNetwork), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_S_SAVENETWORKAS, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_L_SAVEASPLAINXML, GNEApplicationWindow::onCmdSaveAsPlainXML), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_L_SAVEASPLAINXML, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_J_SAVEJOINEDJUNCTIONS, GNEApplicationWindow::onCmdSaveJoined), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_J_SAVEJOINEDJUNCTIONS, GNEApplicationWindow::onUpdNeedsNetwork), + // additionals // + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS, GNEApplicationWindow::onCmdOpenAdditionals), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS, GNEApplicationWindow::onCmdSaveAdditionals), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS, GNEApplicationWindow::onUpdSaveAdditionals), + FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEADDITIONALS_AS, GNEApplicationWindow::onCmdSaveAdditionalsAs), + FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVEADDITIONALS_AS, GNEApplicationWindow::onUpdNeedsNetwork), + // demand elements // + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND, GNEApplicationWindow::onCmdOpenDemandElements), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMAND, GNEApplicationWindow::onCmdSaveDemandElements), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMAND, GNEApplicationWindow::onUpdSaveDemandElements), + FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEDEMAND_AS, GNEApplicationWindow::onCmdSaveDemandElementsAs), + FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVEDEMAND_AS, GNEApplicationWindow::onUpdNeedsNetwork), + // other // + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_CTRL_SHIFT_K, GNEApplicationWindow::onCmdSaveTLSPrograms), + FXMAPFUNC(SEL_UPDATE, MID_GNE_HOTKEY_CTRL_SHIFT_K, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS, GNEApplicationWindow::onCmdSaveTLSProgramsAs), + FXMAPFUNC(SEL_UPDATE, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION, GNEApplicationWindow::onCmdClose), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_W_CLOSESIMULATION, GNEApplicationWindow::onUpdNeedsNetwork), + + // Toolbar supermode + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F3_SUPERMODE_NETWORK, GNEApplicationWindow::onCmdSetSuperMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F4_SUPERMODE_DEMAND, GNEApplicationWindow::onCmdSetSuperMode), // Toolbar edit - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_CREATE_EDGE, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_CREATE_EDGE, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_MOVE, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_MOVE, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_DELETE, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_DELETE, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_INSPECT, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_INSPECT, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_SELECT, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_SELECT, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_CONNECT, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_CONNECT, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_TLS, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_TLS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_ADDITIONAL, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_ADDITIONAL, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_CROSSING, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_CROSSING, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_TAZ, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_TAZ, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_POLYGON, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_POLYGON, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_PROHIBITION, GNEApplicationWindow::onCmdSetMode), - FXMAPFUNC(SEL_UPDATE, MID_GNE_SETMODE_PROHIBITION, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWSCHEME, GNEApplicationWindow::onCmdEditViewScheme), - FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWSCHEME, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWPORT, GNEApplicationWindow::onCmdEditViewport), - FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWPORT, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_SUMOGUI, GNEApplicationWindow::onCmdOpenSUMOGUI), - FXMAPFUNC(SEL_UPDATE, MID_SUMOGUI, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_E_EDGEMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_M_MOVEMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_D_DELETEMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_I_INSPECTMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_S_SELECTMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_C_CONNECTMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_T_TLSMODE_VTYPEMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_Z_TAZMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_P_POLYGONMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_V_VEHICLEMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_W_PROHIBITIONMODE, GNEApplicationWindow::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWSCHEME, GNEApplicationWindow::onCmdEditViewScheme), + FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWSCHEME, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWPORT, GNEApplicationWindow::onCmdEditViewport), + FXMAPFUNC(SEL_UPDATE, MID_EDITVIEWPORT, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_Z_UNDO, GNEApplicationWindow::onCmdUndo), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_Z_UNDO, GNEApplicationWindow::onUpdUndo), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_Y_REDO, GNEApplicationWindow::onCmdRedo), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_Y_REDO, GNEApplicationWindow::onUpdRedo), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID, GNEApplicationWindow::onCmdToogleGrid), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_C_SHOWCONNECTIONS, GNEApplicationWindow::onCmdToogleShowConnections), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_C_SHOWCONNECTIONS, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_H_TOOGLEELEVATION, GNEApplicationWindow::onCmdToogleElevation), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_H_TOOGLEELEVATION, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_I_SELECTEDGES, GNEApplicationWindow::onCmdToogleSelectEdges), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_I_SELECTEDGES, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_J_TOOGLECHAIN, GNEApplicationWindow::onCmdToogleChain), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_J_TOOGLECHAIN, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_K_TOOGLETWOWAY, GNEApplicationWindow::onCmdToogleTwoWay), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_SHIFT_K_TOOGLETWOWAY, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_CTRL_T_OPENSUMONETEDIT, GNEApplicationWindow::onCmdOpenSUMOGUI), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_CTRL_T_OPENSUMONETEDIT, GNEApplicationWindow::onUpdNeedsNetwork), // Toolbar processing - FXMAPFUNC(SEL_COMMAND, MID_GNE_PROCESSING_COMPUTEJUNCTIONS, GNEApplicationWindow::onCmdComputeJunctions), - FXMAPFUNC(SEL_UPDATE, MID_GNE_PROCESSING_COMPUTEJUNCTIONS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_PROCESSING_COMPUTEJUNCTIONS_VOLATILE, GNEApplicationWindow::onCmdComputeJunctionsVolatile), - FXMAPFUNC(SEL_UPDATE, MID_GNE_PROCESSING_COMPUTEJUNCTIONS_VOLATILE, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_PROCESSING_CLEANJUNCTIONS, GNEApplicationWindow::onCmdCleanJunctions), - FXMAPFUNC(SEL_UPDATE, MID_GNE_PROCESSING_CLEANJUNCTIONS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_PROCESSING_JOINJUNCTIONS, GNEApplicationWindow::onCmdJoinJunctions), - FXMAPFUNC(SEL_UPDATE, MID_GNE_PROCESSING_JOINJUNCTIONS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_PROCESSING_CLEANINVALIDCROSSINGS, GNEApplicationWindow::onCmdCleanInvalidCrossings), - FXMAPFUNC(SEL_UPDATE, MID_GNE_PROCESSING_CLEANINVALIDCROSSINGS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_GNE_PROCESSING_OPTIONS, GNEApplicationWindow::onCmdOptions), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F5_RECOMPUTE, GNEApplicationWindow::onCmdComputeJunctions), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_F5_RECOMPUTE, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_SHIFT_F5_RECOMPUTEVOLATILE, GNEApplicationWindow::onCmdComputeJunctionsVolatile), + FXMAPFUNC(SEL_UPDATE, MID_HOTKEY_SHIFT_F5_RECOMPUTEVOLATILE, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_F6, GNEApplicationWindow::onCmdCleanJunctions), + FXMAPFUNC(SEL_UPDATE, MID_GNE_HOTKEY_F6, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_F7, GNEApplicationWindow::onCmdJoinJunctions), + FXMAPFUNC(SEL_UPDATE, MID_GNE_HOTKEY_F7, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_F8, GNEApplicationWindow::onCmdCleanInvalidCrossings), + FXMAPFUNC(SEL_UPDATE, MID_GNE_HOTKEY_F8, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_F10, GNEApplicationWindow::onCmdOptions), // Toolbar locate - FXMAPFUNC(SEL_COMMAND, MID_LOCATEJUNCTION, GNEApplicationWindow::onCmdLocate), - FXMAPFUNC(SEL_UPDATE, MID_LOCATEJUNCTION, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_LOCATEEDGE, GNEApplicationWindow::onCmdLocate), - FXMAPFUNC(SEL_UPDATE, MID_LOCATEEDGE, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_LOCATETLS, GNEApplicationWindow::onCmdLocate), - FXMAPFUNC(SEL_UPDATE, MID_LOCATETLS, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_LOCATEADD, GNEApplicationWindow::onCmdLocate), - FXMAPFUNC(SEL_UPDATE, MID_LOCATEADD, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOI, GNEApplicationWindow::onCmdLocate), - FXMAPFUNC(SEL_UPDATE, MID_LOCATEPOI, GNEApplicationWindow::onUpdNeedsNetwork), - FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOLY, GNEApplicationWindow::onCmdLocate), - FXMAPFUNC(SEL_UPDATE, MID_LOCATEPOLY, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEJUNCTION, GNEApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEJUNCTION, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEEDGE, GNEApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEEDGE, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_LOCATETLS, GNEApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_UPDATE, MID_LOCATETLS, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEADD, GNEApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEADD, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOI, GNEApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEPOI, GNEApplicationWindow::onUpdNeedsNetwork), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOLY, GNEApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEPOLY, GNEApplicationWindow::onUpdNeedsNetwork), // toolbar windows - FXMAPFUNC(SEL_COMMAND, MID_CLEARMESSAGEWINDOW, GNEApplicationWindow::onCmdClearMsgWindow), + FXMAPFUNC(SEL_COMMAND, MID_CLEARMESSAGEWINDOW, GNEApplicationWindow::onCmdClearMsgWindow), // toolbar help - FXMAPFUNC(SEL_COMMAND, MID_ABOUT, GNEApplicationWindow::onCmdAbout), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F1_ONLINEDOCUMENTATION, GNEApplicationWindow::onCmdHelp), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F2_ABOUT, GNEApplicationWindow::onCmdAbout), // key events - FXMAPFUNC(SEL_KEYPRESS, 0, GNEApplicationWindow::onKeyPress), - FXMAPFUNC(SEL_KEYRELEASE, 0, GNEApplicationWindow::onKeyRelease), - FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ESC, GNEApplicationWindow::onCmdAbort), - FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_DEL, GNEApplicationWindow::onCmdDel), - FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ENTER, GNEApplicationWindow::onCmdEnter), + FXMAPFUNC(SEL_KEYPRESS, 0, GNEApplicationWindow::onKeyPress), + FXMAPFUNC(SEL_KEYRELEASE, 0, GNEApplicationWindow::onKeyRelease), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ESC, GNEApplicationWindow::onCmdAbort), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_DEL, GNEApplicationWindow::onCmdDel), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_ENTER, GNEApplicationWindow::onCmdEnter), // threads events - FXMAPFUNC(FXEX::SEL_THREAD_EVENT, ID_LOADTHREAD_EVENT, GNEApplicationWindow::onLoadThreadEvent), - FXMAPFUNC(FXEX::SEL_THREAD, ID_LOADTHREAD_EVENT, GNEApplicationWindow::onLoadThreadEvent), + FXMAPFUNC(FXEX::SEL_THREAD_EVENT, ID_LOADTHREAD_EVENT, GNEApplicationWindow::onLoadThreadEvent), + FXMAPFUNC(FXEX::SEL_THREAD, ID_LOADTHREAD_EVENT, GNEApplicationWindow::onLoadThreadEvent), // Other - FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_FOCUSFRAME, GNEApplicationWindow::onCmdFocusFrame), - FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_TOOGLE_GRID, GNEApplicationWindow::onCmdToogleGrid), - FXMAPFUNC(SEL_COMMAND, MID_HELP, GNEApplicationWindow::onCmdHelp), - FXMAPFUNC(SEL_COMMAND, MID_EDITVIEWPORT, GNEApplicationWindow::onCmdEditViewport), - FXMAPFUNC(SEL_CLIPBOARD_REQUEST, 0, GNEApplicationWindow::onClipboardRequest), + FXMAPFUNC(SEL_CLIPBOARD_REQUEST, 0, GNEApplicationWindow::onClipboardRequest), + FXMAPFUNC(SEL_COMMAND, MID_GNE_HOTKEY_F12, GNEApplicationWindow::onCmdFocusFrame), }; // Object implementation FXIMPLEMENT(GNEApplicationWindow, FXMainWindow, GNEApplicationWindowMap, ARRAYNUMBER(GNEApplicationWindowMap)) + // =========================================================================== -// member method definitions +// GNEApplicationWindow::ToolbarsGrip method definitions // =========================================================================== -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4355) -#endif + +GNEApplicationWindow::ToolbarsGrip::ToolbarsGrip(GNEApplicationWindow* GNEApp) : + myGNEApp(GNEApp) { +} + + +void +GNEApplicationWindow::ToolbarsGrip::buildMenuToolbarsGrip() { + // build menu bar (for File, edit, processing...) using specify design + myToolBarShellMenu = new FXToolBarShell(myGNEApp, GUIDesignToolBar); + menu = new FXMenuBar(myGNEApp->myTopDock, myToolBarShellMenu, GUIDesignToolbarMenuBarNetedit); + // declare toolbar grip for menu bar + new FXToolBarGrip(menu, menu, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); +} + + +void +GNEApplicationWindow::ToolbarsGrip::buildViewParentToolbarsGrips() { + // build menu bar for supermodes (next to menu bar) + myToolBarShellSuperModes = new FXToolBarShell(myGNEApp, GUIDesignToolBar); + superModes = new FXMenuBar(myGNEApp->myTopDock, myToolBarShellSuperModes, GUIDesignToolBarRaisedSame); + // declare toolbar grip for menu bar Supermodes + new FXToolBarGrip(superModes, superModes, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); + // build menu bar for navigation (bot to menu bar) + myToolBarShellNavigation = new FXToolBarShell(myGNEApp, GUIDesignToolBar); + navigation = new FXMenuBar(myGNEApp->myTopDock, myToolBarShellNavigation, GUIDesignToolBarRaisedNext); + // declare toolbar grip for menu bar Navigation + new FXToolBarGrip(navigation, navigation, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); + // build menu bar for modes + myToolBarShellModes = new FXToolBarShell(myGNEApp, GUIDesignToolBar); + modes = new FXMenuBar(myGNEApp->myTopDock, myToolBarShellModes, GUIDesignToolBarRaisedSame); + // declare toolbar grip for menu bar modes + new FXToolBarGrip(modes, modes, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); + // build menu bar for mode Options + myToolBarShellModeOptions = new FXToolBarShell(myGNEApp, GUIDesignToolBar); + modeOptions = new FXMenuBar(myGNEApp->myTopDock, myToolBarShellModeOptions, GUIDesignToolBarRaisedSame); + // declare toolbar grip for menu bar modes + new FXToolBarGrip(modeOptions, modeOptions, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); + // create menu bars + superModes->create(); + navigation->create(); + modes->create(); + modeOptions->create(); + // create shell supermodes + myToolBarShellSuperModes->create(); + myToolBarShellNavigation->create(); + myToolBarShellModes->create(); + myToolBarShellModeOptions->create(); + // recalc top dop after creating elements + myGNEApp->myTopDock->recalc(); +} + + +void +GNEApplicationWindow::ToolbarsGrip::destroyParentToolbarsGrips() { + // delete Menu bars + delete superModes; + delete navigation; + delete modes; + delete modeOptions; + // also delete toolbar shells to avoid floating windows + delete myToolBarShellSuperModes; + delete myToolBarShellNavigation; + delete myToolBarShellModes; + delete myToolBarShellModeOptions; + // recalc top dop after deleting elements + myGNEApp->myTopDock->recalc(); +} + +// =========================================================================== +// GNEApplicationWindow method definitions +// =========================================================================== + GNEApplicationWindow::GNEApplicationWindow(FXApp* a, const std::string& configPattern) : GUIMainWindow(a), myLoadThread(nullptr), myAmLoading(false), - myRecentNets(a, "nets"), - myConfigPattern(configPattern), hadDependentBuild(false), myNet(nullptr), myUndoList(new GNEUndoList(this)), + myConfigPattern(configPattern), + myToolbarsGrip(this), + myMenuBarFile(this), + myFileMenuCommands(this), + myEditMenuCommands(this), + mySupermodeCommands(this), + myNetworkMenuCommands(this), + myDemandMenuCommands(this), + myViewNet(nullptr), myTitlePrefix("NETEDIT " VERSION_STRING) { // init icons GUIIconSubSys::initIcons(a); @@ -218,9 +313,6 @@ // init cursors GUICursorSubSys::initCursors(a); } -#ifdef _MSC_VER -#pragma warning(pop) -#endif void @@ -233,12 +325,10 @@ hadDependentBuild = true; setTarget(this); setSelector(MID_WINDOW); - // build menu bar - myMenuBarDrag = new FXToolBarShell(this, GUIDesignToolBarShell3); - myMenuBar = new FXMenuBar(myTopDock, myMenuBarDrag, GUIDesignBar); - new FXToolBarGrip(myMenuBar, myMenuBar, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); + // build toolbar menu + myToolbarsGrip.buildMenuToolbarsGrip(); // build the thread - io - myLoadThreadEvent.setTarget(this), myLoadThreadEvent.setSelector(ID_LOADTHREAD_EVENT); + myLoadThreadEvent.setTarget(this), myLoadThreadEvent.setSelector(ID_LOADTHREAD_EVENT); // build the status bar myStatusbar = new FXStatusBar(this, GUIDesignStatusBar); { @@ -253,11 +343,6 @@ myMainSplitter = new FXSplitter(this, GUIDesignSplitter | SPLITTER_VERTICAL | SPLITTER_REVERSED); myMDIClient = new FXMDIClient(myMainSplitter, GUIDesignSplitterMDI); myMDIMenu = new FXMDIMenu(this, myMDIClient); - // Due netedit only have a view, this buttons must be disabled (see #2807) - //new FXMDIWindowButton(myMenuBar, myMDIMenu, myMDIClient, FXMDIClient::ID_MDI_MENUWINDOW, GUIDesignMDIButtonLeft); - //new FXMDIDeleteButton(myMenuBar, myMDIClient, FXMDIClient::ID_MDI_MENUCLOSE, GUIDesignMDIButtonRight); - //new FXMDIRestoreButton(myMenuBar, myMDIClient, FXMDIClient::ID_MDI_MENURESTORE, GUIDesignMDIButtonRight); - //new FXMDIMinimizeButton(myMenuBar, myMDIClient, FXMDIClient::ID_MDI_MENUMINIMIZE, GUIDesignMDIButtonRight); // build the message window myMessageWindow = new GUIMessageWindow(myMainSplitter); myMainSplitter->setSplit(1, 65); @@ -271,68 +356,8 @@ setTitle(myTitlePrefix); // set Netedit ICON setIcon(GUIIconSubSys::getIcon(ICON_NETEDIT)); - // initialize single hotkeys using decimal code (to avoid problems in Linux) - getAccelTable()->addAccel(101, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_CREATE_EDGE)); // e - getAccelTable()->addAccel(69, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_CREATE_EDGE)); // E - getAccelTable()->addAccel(109, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_MOVE)); // m - getAccelTable()->addAccel(77, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_MOVE)); // M - getAccelTable()->addAccel(100, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_DELETE)); // d - getAccelTable()->addAccel(68, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_DELETE)); // D - getAccelTable()->addAccel(105, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_INSPECT)); // i - getAccelTable()->addAccel(73, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_INSPECT)); // I - getAccelTable()->addAccel(115, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_SELECT)); // s - getAccelTable()->addAccel(83, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_SELECT)); // S - getAccelTable()->addAccel(99, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_CONNECT)); // c - getAccelTable()->addAccel(67, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_CONNECT)); // C - getAccelTable()->addAccel(119, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_PROHIBITION)); // w - getAccelTable()->addAccel(87, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_PROHIBITION)); // W - getAccelTable()->addAccel(116, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_TLS)); // t - getAccelTable()->addAccel(94, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_TLS)); // T - getAccelTable()->addAccel(97, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_ADDITIONAL)); // a - getAccelTable()->addAccel(65, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_ADDITIONAL)); // A - getAccelTable()->addAccel(114, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_CROSSING)); // r - getAccelTable()->addAccel(82, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_CROSSING)); // R - getAccelTable()->addAccel(122, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_TAZ)); // z - getAccelTable()->addAccel(90, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_TAZ)); // Z - getAccelTable()->addAccel(112, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_POLYGON)); // p - getAccelTable()->addAccel(80, this, FXSEL(SEL_COMMAND, MID_GNE_SETMODE_POLYGON)); // P - getAccelTable()->addAccel(118, this, FXSEL(SEL_COMMAND, MID_EDITVIEWPORT)); // v - getAccelTable()->addAccel(86, this, FXSEL(SEL_COMMAND, MID_EDITVIEWPORT)); // V - // initialize Ctrl hotkeys with Caps Lock enabled using decimal code (to avoid problems in Linux) - getAccelTable()->addAccel(262222, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_NEWNETWORK)); // Ctrl + N - getAccelTable()->addAccel(262223, this, FXSEL(SEL_COMMAND, MID_OPEN_NETWORK)); // Ctrl + O - getAccelTable()->addAccel(327691, this, FXSEL(SEL_COMMAND, MID_OPEN_CONFIG)); // Ctrl + Shift + O - getAccelTable()->addAccel(262226, this, FXSEL(SEL_COMMAND, MID_RELOAD)); // Ctrl + R - getAccelTable()->addAccel(262227, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVENETWORK)); // Ctrl + S - getAccelTable()->addAccel(327695, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVENETWORK_AS)); // Ctrl + Shift + S - getAccelTable()->addAccel(262220, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEPLAINXML)); // Ctrl + L - getAccelTable()->addAccel(262218, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEJOINED)); // Ctrl + J - getAccelTable()->addAccel(262224, this, FXSEL(SEL_COMMAND, MID_OPEN_SHAPES)); // Ctrl + P - getAccelTable()->addAccel(327692, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVESHAPES)); // Ctrl + Shift + P - getAccelTable()->addAccel(262212, this, FXSEL(SEL_COMMAND, MID_OPEN_ADDITIONALS)); // Ctrl + D - getAccelTable()->addAccel(327780, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVEADDITIONALS)); // Ctrl + Shift + D - getAccelTable()->addAccel(262219, this, FXSEL(SEL_COMMAND, MID_OPEN_TLSPROGRAMS)); // Ctrl + K - getAccelTable()->addAccel(327787, this, FXSEL(SEL_COMMAND, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS)); // Ctrl + Shift + K - getAccelTable()->addAccel(262230, this, FXSEL(SEL_COMMAND, MID_CLOSE)); // Ctrl + W - getAccelTable()->addAccel(262225, this, FXSEL(SEL_COMMAND, MID_QUIT)); // Ctrl + Q - getAccelTable()->addAccel(262234, this, FXSEL(SEL_COMMAND, FXUndoList::ID_UNDO)); // Ctrl + Z - getAccelTable()->addAccel(262233, this, FXSEL(SEL_COMMAND, FXUndoList::ID_REDO)); // Ctrl + Y - getAccelTable()->addAccel(262230, this, FXSEL(SEL_COMMAND, MID_EDITVIEWSCHEME)); // Ctrl + V - getAccelTable()->addAccel(262217, this, FXSEL(SEL_COMMAND, MID_EDITVIEWPORT)); // Ctrl + I - getAccelTable()->addAccel(262215, this, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_TOOGLE_GRID)); // Ctrl + G - getAccelTable()->addAccel(262228, this, FXSEL(SEL_COMMAND, MID_SUMOGUI)); // Ctrl + S - // initialize Shift hotkeys with Caps Lock enabled using decimal code (to avoid problems in Linux) - getAccelTable()->addAccel(65642, this, FXSEL(SEL_COMMAND, MID_LOCATEJUNCTION)); // Shift + J - getAccelTable()->addAccel(65637, this, FXSEL(SEL_COMMAND, MID_LOCATEEDGE)); // Shift + E - getAccelTable()->addAccel(65652, this, FXSEL(SEL_COMMAND, MID_LOCATETLS)); // Shift + T - getAccelTable()->addAccel(65633, this, FXSEL(SEL_COMMAND, MID_LOCATEADD)); // Shift + A - getAccelTable()->addAccel(65647, this, FXSEL(SEL_COMMAND, MID_LOCATEPOI)); // Shift + O - getAccelTable()->addAccel(65644, this, FXSEL(SEL_COMMAND, MID_LOCATEPOLY)); // Shift + L - // initialize rest of hotkeys - getAccelTable()->addAccel(parseAccel("Esc"), this, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_ESC)); - getAccelTable()->addAccel(parseAccel("Del"), this, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_DEL)); - getAccelTable()->addAccel(parseAccel("Enter"), this, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_ENTER)); - getAccelTable()->addAccel(parseAccel("F12"), this, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_FOCUSFRAME)); + // build NETEDIT Accelerators (hotkeys) + GUIShortcutsSubSys::buildNETEDITAccelerators(this); } @@ -341,12 +366,11 @@ setWindowSizeAndPos(); gCurrentFolder = getApp()->reg().readStringEntry("SETTINGS", "basedir", ""); FXMainWindow::create(); - myMenuBarDrag->create(); myFileMenu->create(); myEditMenu->create(); - myFileMenuShapes->create(); myFileMenuAdditionals->create(); myFileMenuTLS->create(); + myFileMenuDemandElements->create(); //mySettingsMenu->create(); myWindowsMenu->create(); myHelpMenu->create(); @@ -375,9 +399,9 @@ delete myGLVisual; // must delete menus to avoid segfault on removing accelerators // (http://www.fox-toolkit.net/faq#TOC-What-happens-when-the-application-s) - delete myFileMenuShapes, - delete myFileMenuAdditionals, + delete myFileMenuAdditionals, delete myFileMenuTLS, + delete myFileMenuDemandElements, delete myFileMenu; delete myEditMenu; delete myLocatorMenu; @@ -398,294 +422,6 @@ } -void -GNEApplicationWindow::detach() { - FXMainWindow::detach(); - myMenuBarDrag->detach(); -} - - -void -GNEApplicationWindow::fillMenuBar() { - // build file menu - myFileMenu = new FXMenuPane(this); - new FXMenuTitle(myMenuBar, "&File", nullptr, myFileMenu); - new FXMenuCommand(myFileMenu, - "&New Network...\tCtrl+N\tCreate a new network.", - GUIIconSubSys::getIcon(ICON_OPEN_NET), this, MID_GNE_TOOLBARFILE_NEWNETWORK); - new FXMenuCommand(myFileMenu, - "&Open Network...\tCtrl+O\tOpen a SUMO network.", - GUIIconSubSys::getIcon(ICON_OPEN_NET), this, MID_OPEN_NETWORK); - new FXMenuCommand(myFileMenu, - "Open Netconvert Configura&tion...\tCtrl+Shift+O\tOpen a configuration file with NETCONVERT options.", - GUIIconSubSys::getIcon(ICON_OPEN_CONFIG), this, MID_OPEN_CONFIG); - new FXMenuCommand(myFileMenu, - "Import &Foreign Network...\t\tImport a foreign network such as OSM.", - GUIIconSubSys::getIcon(ICON_OPEN_NET), this, MID_GNE_TOOLBARFILE_OPENFOREIGN); - new FXMenuCommand(myFileMenu, - "&Reload\tCtrl+R\tReloads the network.", - GUIIconSubSys::getIcon(ICON_RELOAD), this, MID_RELOAD); - new FXMenuCommand(myFileMenu, - "&Save Network...\tCtrl+S\tSave the network.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVENETWORK); - new FXMenuCommand(myFileMenu, - "Save Net&work As...\tCtrl+Shift+S\tSave the network in another file.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVENETWORK_AS); - new FXMenuCommand(myFileMenu, - "Save plain XM&L...\tCtrl+L\tSave plain xml representation the network.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVEPLAINXML); - new FXMenuCommand(myFileMenu, - "Save &joined junctions...\tCtrl+J\tSave log of joined junctions (allows reproduction of joins).", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVEJOINED); - // create Shapes menu options - myFileMenuShapes = new FXMenuPane(this); - new FXMenuCommand(myFileMenuShapes, - "Load S&hapes...\tCtrl+P\tLoad shapes into the network view.", - GUIIconSubSys::getIcon(ICON_OPEN_SHAPES), this, MID_OPEN_SHAPES); - mySaveShapesMenuCommand = new FXMenuCommand(myFileMenuShapes, - "Save Shapes\tCtrl+Shift+P\tSave shapes elements.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVESHAPES); - mySaveShapesMenuCommand->disable(); - mySaveShapesMenuCommandAs = new FXMenuCommand(myFileMenuShapes, - "Save Shapes As...\t\tSave shapes elements in another files.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVESHAPES_AS); - mySaveShapesMenuCommandAs->disable(); - new FXMenuCascade(myFileMenu, "Shapes", GUIIconSubSys::getIcon(ICON_MODEPOLYGON), myFileMenuShapes); - // create Additionals menu options - myFileMenuAdditionals = new FXMenuPane(this); - new FXMenuCommand(myFileMenuAdditionals, - "Load A&dditionals...\tCtrl+D\tLoad additional elements.", - GUIIconSubSys::getIcon(ICON_OPEN_ADDITIONALS), this, MID_OPEN_ADDITIONALS); - mySaveAdditionalsMenuCommand = new FXMenuCommand(myFileMenuAdditionals, - "Save Additionals\tCtrl+Shift+D\tSave additional elements.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVEADDITIONALS); - mySaveAdditionalsMenuCommand->disable(); - mySaveAdditionalsMenuCommandAs = new FXMenuCommand(myFileMenuAdditionals, - "Save Additionals As...\t\tSave additional elements in another file.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVEADDITIONALS_AS); - mySaveAdditionalsMenuCommandAs->disable(); - new FXMenuCascade(myFileMenu, "Additionals", GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), myFileMenuAdditionals); - // create TLS menu options - myFileMenuTLS = new FXMenuPane(this); - new FXMenuCommand(myFileMenuTLS, - "load TLS Programs...\tCtrl+K\tload TLS Programs in all Traffic Lights of the net.", - GUIIconSubSys::getIcon(ICON_OPEN_TLSPROGRAMS), this, MID_OPEN_TLSPROGRAMS); - mySaveTLSProgramsMenuCommand = new FXMenuCommand(myFileMenuTLS, - "Save TLS Programs \tCtrl+Shift+K\tSave TLS Programs of all Traffic Lights of the current net.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS); - mySaveTLSProgramsMenuCommand->disable(); - new FXMenuCommand(myFileMenuTLS, - "Save TLS Programs As...\t\tSave TLS Programs of all Traffic Lights of the current net in another file.", - GUIIconSubSys::getIcon(ICON_SAVE), this, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS); - new FXMenuCascade(myFileMenu, "Traffic Lights", GUIIconSubSys::getIcon(ICON_MODETLS), myFileMenuTLS); - // close network - new FXMenuSeparator(myFileMenu); - new FXMenuCommand(myFileMenu, - "Close\tCtrl+W\tClose the net&work.", - GUIIconSubSys::getIcon(ICON_CLOSE), this, MID_CLOSE); - // Recent files - FXMenuSeparator* sep1 = new FXMenuSeparator(myFileMenu); - sep1->setTarget(&myRecentConfigs); - sep1->setSelector(FXRecentFiles::ID_ANYFILES); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_1); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_2); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_3); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_4); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_5); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_6); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_7); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_8); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_9); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_10); - new FXMenuCommand(myFileMenu, "Clear Recent Configurat&ions", nullptr, &myRecentConfigs, FXRecentFiles::ID_CLEAR); - myRecentConfigs.setTarget(this); - myRecentConfigs.setSelector(MID_RECENTFILE); - FXMenuSeparator* sep2 = new FXMenuSeparator(myFileMenu); - sep2->setTarget(&myRecentNets); - sep2->setSelector(FXRecentFiles::ID_ANYFILES); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_1); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_2); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_3); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_4); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_5); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_6); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_7); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_8); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_9); - new FXMenuCommand(myFileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_10); - new FXMenuCommand(myFileMenu, "Cl&ear Recent Networks", nullptr, &myRecentNets, FXRecentFiles::ID_CLEAR); - myRecentNets.setTarget(this); - myRecentNets.setSelector(MID_RECENTFILE); - new FXMenuSeparator(myFileMenu); - new FXMenuCommand(myFileMenu, - "&Quit\tCtrl+Q\tQuit the Application.", - nullptr, this, MID_QUIT, 0); - - // build edit menu - myEditMenu = new FXMenuPane(this); - new FXMenuTitle(myMenuBar, "&Edit", nullptr, myEditMenu); - - // build undo/redo command - new FXMenuCommand(myEditMenu, - "&Undo\tCtrl+Z\tUndo the last change.", - GUIIconSubSys::getIcon(ICON_UNDO), myUndoList, FXUndoList::ID_UNDO); - new FXMenuCommand(myEditMenu, - "&Redo\tCtrl+Y\tRedo the last change.", - GUIIconSubSys::getIcon(ICON_REDO), myUndoList, FXUndoList::ID_REDO); - - new FXMenuSeparator(myEditMenu); - - // build modes command - new FXMenuCommand(myEditMenu, - "&Edge mode\tE\tCreate junction and edges.", - GUIIconSubSys::getIcon(ICON_MODECREATEEDGE), this, MID_GNE_SETMODE_CREATE_EDGE); - new FXMenuCommand(myEditMenu, - "&Move mode\tM\tMove elements.", - GUIIconSubSys::getIcon(ICON_MODEMOVE), this, MID_GNE_SETMODE_MOVE); - new FXMenuCommand(myEditMenu, - "&Delete mode\tD\tDelete elements.", - GUIIconSubSys::getIcon(ICON_MODEDELETE), this, MID_GNE_SETMODE_DELETE); - new FXMenuCommand(myEditMenu, - "&Inspect mode\tI\tInspect elements and change their attributes.", - GUIIconSubSys::getIcon(ICON_MODEINSPECT), this, MID_GNE_SETMODE_INSPECT); - new FXMenuCommand(myEditMenu, - "&Select mode\tS\tSelect elements.", - GUIIconSubSys::getIcon(ICON_MODESELECT), this, MID_GNE_SETMODE_SELECT); - new FXMenuCommand(myEditMenu, - "&Connection mode\tC\tEdit connections between lanes.", - GUIIconSubSys::getIcon(ICON_MODECONNECTION), this, MID_GNE_SETMODE_CONNECT); - new FXMenuCommand(myEditMenu, - "Pro&hibition mode\tW\tEdit connection prohibitions.", - GUIIconSubSys::getIcon(ICON_MODEPROHIBITION), this, MID_GNE_SETMODE_PROHIBITION); - new FXMenuCommand(myEditMenu, - "&Traffic light mode\tT\tEdit traffic lights over junctions.", - GUIIconSubSys::getIcon(ICON_MODETLS), this, MID_GNE_SETMODE_TLS); - new FXMenuCommand(myEditMenu, - "&Additional mode\tA\tCreate additional elements.", - GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), this, MID_GNE_SETMODE_ADDITIONAL); - new FXMenuCommand(myEditMenu, - "C&rossing mode\tR\tCreate crossings between edges.", - GUIIconSubSys::getIcon(ICON_MODECROSSING), this, MID_GNE_SETMODE_CROSSING); - new FXMenuCommand(myEditMenu, - "TA&Z mode\tZ\tCreate Traffic Assignment Zones.", - GUIIconSubSys::getIcon(ICON_MODETAZ), this, MID_GNE_SETMODE_TAZ); - new FXMenuCommand(myEditMenu, - "&POI-Poly mode\tP\tCreate Points-Of-Interest and polygons.", - GUIIconSubSys::getIcon(ICON_MODEPOLYGON), this, MID_GNE_SETMODE_POLYGON); - - new FXMenuSeparator(myEditMenu); - new FXMenuCommand(myEditMenu, - "Edit Visualisation ...\tCtrl+V\tOpens a dialog for editing visualization settings.", - nullptr, this, MID_EDITVIEWSCHEME); - new FXMenuCommand(myEditMenu, - "Edit Viewport...\tCtrl+I\tOpens a dialog for editing viewing are, zoom and rotation.", - nullptr, this, MID_EDITVIEWPORT); - new FXMenuCommand(myEditMenu, - "Toggle Grid...\tCtrl+G\tToggles background grid (and snap-to-grid functionality).", - nullptr, this, MID_GNE_HOTKEY_TOOGLE_GRID); - new FXMenuSeparator(myEditMenu); - new FXMenuCommand(myEditMenu, - "Open in SUMO GUI...\tCtrl+T\tOpens the SUMO GUI application with the current network.", - GUIIconSubSys::getIcon(ICON_SUMO_MINI), this, MID_SUMOGUI); - - // processing menu (trigger netbuild computations) - myProcessingMenu = new FXMenuPane(this); - new FXMenuTitle(myMenuBar, "&Processing", nullptr, myProcessingMenu); - new FXMenuCommand(myProcessingMenu, - "Compute Junctions\tF5\tComputes junction shape and logic.", - GUIIconSubSys::getIcon(ICON_COMPUTEJUNCTIONS), this, MID_GNE_PROCESSING_COMPUTEJUNCTIONS); - new FXMenuCommand(myProcessingMenu, - "Compute Junctions with volatile options\tShift+F5\tComputes junction shape and logic using volatile junctions.", - GUIIconSubSys::getIcon(ICON_COMPUTEJUNCTIONS), this, MID_GNE_PROCESSING_COMPUTEJUNCTIONS_VOLATILE); - new FXMenuCommand(myProcessingMenu, - "Clean Junctions\tF6\tRemoves solitary junctions.", - GUIIconSubSys::getIcon(ICON_CLEANJUNCTIONS), this, MID_GNE_PROCESSING_CLEANJUNCTIONS); - new FXMenuCommand(myProcessingMenu, - "Join Selected Junctions\tF7\tJoins selected junctions into a single junction.", - GUIIconSubSys::getIcon(ICON_JOINJUNCTIONS), this, MID_GNE_PROCESSING_JOINJUNCTIONS); - new FXMenuCommand(myProcessingMenu, - "Clean invalid crossings\tF8\tClear invalid crossings.", - GUIIconSubSys::getIcon(ICON_JOINJUNCTIONS), this, MID_GNE_PROCESSING_CLEANINVALIDCROSSINGS); - new FXMenuCommand(myProcessingMenu, - "Options\tF10\t\tConfigure Processing Options.", - GUIIconSubSys::getIcon(ICON_OPTIONS), this, MID_GNE_PROCESSING_OPTIONS); - // build settings menu - /* - mySettingsMenu = new FXMenuPane(this); - new FXMenuTitle(myMenuBar,"&Settings",0,mySettingsMenu); - new FXMenuCheck(mySettingsMenu, - "Gaming Mode\t\tToggle gaming mode on/off.", - this,MID_GAMING); - */ - // build Locate menu - myLocatorMenu = new FXMenuPane(this); - new FXMenuTitle(myMenuBar, "&Locate", nullptr, myLocatorMenu); - new FXMenuCommand(myLocatorMenu, - "Locate &Junctions\tShift+J\tOpen a Dialog for Locating a Junction.", - GUIIconSubSys::getIcon(ICON_LOCATEJUNCTION), this, MID_LOCATEJUNCTION); - new FXMenuCommand(myLocatorMenu, - "Locate &Edges\tShift+E\tOpen a Dialog for Locating an Edge.", - GUIIconSubSys::getIcon(ICON_LOCATEEDGE), this, MID_LOCATEEDGE); - new FXMenuCommand(myLocatorMenu, - "Locate &TLS\tShift+T\tOpen a Dialog for Locating a Traffic Light.", - GUIIconSubSys::getIcon(ICON_LOCATETLS), this, MID_LOCATETLS); - new FXMenuCommand(myLocatorMenu, - "Locate &Additional\tShift+A\tOpen a Dialog for Locating an Additional Structure.", - GUIIconSubSys::getIcon(ICON_LOCATEADD), this, MID_LOCATEADD); - new FXMenuCommand(myLocatorMenu, - "Locate P&oI\tShift+O\tOpen a Dialog for Locating a Point of Intereset.", - GUIIconSubSys::getIcon(ICON_LOCATEPOI), this, MID_LOCATEPOI); - new FXMenuCommand(myLocatorMenu, - "Locate Po&lygon\tShift+L\tOpen a Dialog for Locating a Polygon.", - GUIIconSubSys::getIcon(ICON_LOCATEPOLY), this, MID_LOCATEPOLY); - // build windows menu - myWindowsMenu = new FXMenuPane(this); - new FXMenuTitle(myMenuBar, "&Windows", nullptr, myWindowsMenu); - new FXMenuCheck(myWindowsMenu, - "&Show Status Line\t\tToggle this Status Bar on/off.", - myStatusbar, FXWindow::ID_TOGGLESHOWN); - new FXMenuCheck(myWindowsMenu, - "Show &Message Window\t\tToggle the Message Window on/off.", - myMessageWindow, FXWindow::ID_TOGGLESHOWN); - /* - new FXMenuSeparator(myWindowsMenu); - new FXMenuCommand(myWindowsMenu,"Tile &Horizontally", - GUIIconSubSys::getIcon(ICON_WINDOWS_TILE_HORI), - myMDIClient,FXMDIClient::ID_MDI_TILEHORIZONTAL); - new FXMenuCommand(myWindowsMenu,"Tile &Vertically", - GUIIconSubSys::getIcon(ICON_WINDOWS_TILE_VERT), - myMDIClient,FXMDIClient::ID_MDI_TILEVERTICAL); - new FXMenuCommand(myWindowsMenu,"C&ascade", - GUIIconSubSys::getIcon(ICON_WINDOWS_CASCADE), - myMDIClient,FXMDIClient::ID_MDI_CASCADE); - new FXMenuCommand(myWindowsMenu,"&Close",0, - myMDIClient,FXMDIClient::ID_MDI_CLOSE); - sep1=new FXMenuSeparator(myWindowsMenu); - sep1->setTarget(myMDIClient); - sep1->setSelector(FXMDIClient::ID_MDI_ANY); - new FXMenuCommand(myWindowsMenu,"",0,myMDIClient,FXMDIClient::ID_MDI_1); - new FXMenuCommand(myWindowsMenu,"",0,myMDIClient,FXMDIClient::ID_MDI_2); - new FXMenuCommand(myWindowsMenu,"",0,myMDIClient,FXMDIClient::ID_MDI_3); - new FXMenuCommand(myWindowsMenu,"",0,myMDIClient,FXMDIClient::ID_MDI_4); - new FXMenuCommand(myWindowsMenu,"&Others...",0,myMDIClient,FXMDIClient::ID_MDI_OVER_5); - new FXMenuSeparator(myWindowsMenu); - */ - new FXMenuCommand(myWindowsMenu, - "&Clear Message Window\t\tClear the message window.", - nullptr, this, MID_CLEARMESSAGEWINDOW); - - // build help menu - myHelpMenu = new FXMenuPane(this); - new FXMenuTitle(myMenuBar, "&Help", nullptr, myHelpMenu); - new FXMenuCommand(myHelpMenu, - "&Online Documentation\tF1\tOpen Online documentation.", - nullptr, this, MID_HELP); - new FXMenuCommand(myHelpMenu, - "&About\tF2\tAbout netedit.", - nullptr, this, MID_ABOUT); -} - - long GNEApplicationWindow::onCmdQuit(FXObject*, FXSelector, void*) { if (continueWithUnsavedChanges()) { @@ -740,7 +476,8 @@ gCurrentFolder = opendialog.getDirectory(); std::string file = opendialog.getFilename().text(); loadConfigOrNet(file, false); - myRecentConfigs.appendFile(file.c_str()); + // add it into recent configs + myMenuBarFile.myRecentConfigs.appendFile(file.c_str()); } return 1; } @@ -760,11 +497,11 @@ gCurrentFolder = opendialog.getDirectory(); std::string file = opendialog.getFilename().text(); loadConfigOrNet(file, true); - myRecentNets.appendFile(file.c_str()); - // when a net is loaded, save additional, shapes an TLSPrograms are disabled + // add it into recent nets + myMenuBarFile.myRecentNets.appendFile(file.c_str()); + // when a net is loaded, save additionals and TLSPrograms are disabled disableSaveAdditionalsMenu(); - disableSaveShapesMenu(); - mySaveTLSProgramsMenuCommand->disable(); + myFileMenuCommands.saveTLSPrograms->disable(); } return 1; } @@ -793,7 +530,7 @@ GNELoadThread::fillOptions(oc); if (osmPattern.contains(opendialog.getPattern())) { // recommended osm options - // http://sumo.dlr.de/wiki/Networks/Import/OpenStreetMap#Recommended_NETCONVERT_Options + // https://sumo.dlr.de/wiki/Networks/Import/OpenStreetMap#Recommended_NETCONVERT_Options oc.set("osm-files", file); oc.set("geometry.remove", "true"); oc.set("ramps.guess", "true"); @@ -817,39 +554,6 @@ long -GNEApplicationWindow::onCmdOpenShapes(FXObject*, FXSelector, void*) { - // get the shape file name - FXFileDialog opendialog(this, "Open Shapes file"); - opendialog.setIcon(GUIIconSubSys::getIcon(ICON_MODEPOLYGON)); - opendialog.setSelectMode(SELECTFILE_EXISTING); - opendialog.setPatternList("Shape files (*.xml)\nAll files (*)"); - if (gCurrentFolder.length() != 0) { - opendialog.setDirectory(gCurrentFolder); - } - if (opendialog.execute()) { - gCurrentFolder = opendialog.getDirectory(); - std::string file = opendialog.getFilename().text(); - GNEShapeHandler handler(file, myNet); - // disable validation for shapes - XMLSubSys::setValidation("never", "auto"); - // begin undo operation - myUndoList->p_begin("Loading shapes from '" + file + "'"); - // run parser for shapes - if (!XMLSubSys::runParser(handler, file, false)) { - WRITE_MESSAGE("Loading of shapes failed."); - } - // end undoList operation and update view - myUndoList->p_end(); - update(); - // enable validation for shapes - XMLSubSys::setValidation("auto", "auto"); - update(); - } - return 1; -} - - -long GNEApplicationWindow::onCmdOpenAdditionals(FXObject*, FXSelector, void*) { // get the Additional file name FXFileDialog opendialog(this, "Open Additionals file"); @@ -912,13 +616,46 @@ long +GNEApplicationWindow::onCmdOpenDemandElements(FXObject*, FXSelector, void*) { + // get the demand element file name + FXFileDialog opendialog(this, "Open demand element file"); + opendialog.setIcon(GUIIconSubSys::getIcon(ICON_SUPERMODEDEMAND)); + opendialog.setSelectMode(SELECTFILE_EXISTING); + opendialog.setPatternList("Demand element files (*.xml)\nAll files (*)"); + if (gCurrentFolder.length() != 0) { + opendialog.setDirectory(gCurrentFolder); + } + if (opendialog.execute()) { + gCurrentFolder = opendialog.getDirectory(); + std::string file = opendialog.getFilename().text(); + // disable validation for additionals + XMLSubSys::setValidation("never", "auto"); + // Create additional handler + GNERouteHandler demandHandler(file, myNet->getViewNet()); + // begin undoList operation + myUndoList->p_begin("Loading demand elements from '" + file + "'"); + // Run parser for additionals + if (!XMLSubSys::runParser(demandHandler, file, false)) { + WRITE_MESSAGE("Loading of " + file + " failed."); + } + // end undoList operation and update view + myUndoList->p_end(); + update(); + // restore validation for demand + XMLSubSys::setValidation("auto", "auto"); + } + return 1; +} + + +long GNEApplicationWindow::onCmdOpenRecent(FXObject* sender, FXSelector, void* fileData) { if (myAmLoading) { myStatusbar->getStatusLine()->setText("Already loading!"); return 1; } std::string file((const char*)fileData); - loadConfigOrNet(file, sender == &myRecentNets); + loadConfigOrNet(file, sender == &myMenuBarFile.myRecentNets); return 1; } @@ -935,10 +672,13 @@ GNEApplicationWindow::onCmdClose(FXObject*, FXSelector, void*) { if (continueWithUnsavedChanges()) { closeAllWindows(); - // disable save additionals, shapes and TLS menu + // disable save additionals and TLS menu disableSaveAdditionalsMenu(); - disableSaveShapesMenu(); - mySaveTLSProgramsMenuCommand->disable(); + myFileMenuCommands.saveTLSPrograms->disable(); + // hide all Supermode, Network and demand commands + mySupermodeCommands.hideSupermodeCommands(); + myNetworkMenuCommands.hideNetworkMenuCommands(); + myDemandMenuCommands.hideDemandMenuCommands(); } return 1; } @@ -1039,71 +779,93 @@ // report success setStatusBarText("'" + ec->myFile + "' loaded."); setWindowSizeAndPos(); - // initialise views - myViewNumber = 0; - GUISUMOAbstractView* view = openNewView(); - if (view && ec->mySettingsFile != "") { + // build viewparent toolbar grips before creating view parent + myToolbarsGrip.buildViewParentToolbarsGrips(); + // initialise NETEDIT View + GNEViewParent* viewParent = new GNEViewParent(myMDIClient, myMDIMenu, "NETEDIT VIEW", this, nullptr, myNet, myUndoList, nullptr, MDI_TRACKING, 10, 10, 300, 200); + // create it maximized + viewParent->maximize(); + // mark it as Active child + myMDIClient->setActiveChild(viewParent); + // cast pointer myViewNet + myViewNet = dynamic_cast(viewParent->getView()); + // set settings in view + if (viewParent->getView() && ec->mySettingsFile != "") { GUISettingsHandler settings(ec->mySettingsFile, true, true); - std::string settingsName = settings.addSettings(view); - view->addDecals(settings.getDecals()); - settings.applyViewport(view); - settings.setSnapshots(view); + std::string settingsName = settings.addSettings(viewParent->getView()); + viewParent->getView()->addDecals(settings.getDecals()); + settings.applyViewport(viewParent->getView()); + settings.setSnapshots(viewParent->getView()); } // set network name on the caption setTitle(MFXUtils::getTitleText(myTitlePrefix, ec->myFile.c_str())); - getView()->setEditModeFromHotkey(MID_GNE_SETMODE_INSPECT); - if (ec->myViewportFromRegistry) { + // set supermode network + if (myViewNet) { + myViewNet->onCmdSetSupermode(0, MID_HOTKEY_F3_SUPERMODE_NETWORK, 0); + } + if (myViewNet && ec->myViewportFromRegistry) { Position off; off.set(getApp()->reg().readRealEntry("viewport", "x"), getApp()->reg().readRealEntry("viewport", "y"), getApp()->reg().readRealEntry("viewport", "z")); Position p(off.x(), off.y(), 0); - getView()->setViewportFromToRot(off, p, 0); + myViewNet->setViewportFromToRot(off, p, 0); } } getApp()->endWaitCursor(); myMessageWindow->registerMsgHandlers(); - // check if additionals has to be loaded at start - if (oc.isSet("sumo-additionals-file") && !oc.getString("sumo-additionals-file").empty() && myNet) { - myAdditionalsFile = oc.getString("sumo-additionals-file"); - WRITE_MESSAGE("Loading additionals from '" + myAdditionalsFile + "'"); - GNEAdditionalHandler additionalHandler(myAdditionalsFile, myNet->getViewNet()); - // disable validation for additionals - XMLSubSys::setValidation("never", "auto"); - // Run parser - myUndoList->p_begin("Loading additionals from '" + myAdditionalsFile + "'"); - if (!XMLSubSys::runParser(additionalHandler, myAdditionalsFile, false)) { - WRITE_ERROR("Loading of " + myAdditionalsFile + " failed."); + // check if additionals/shapes has to be loaded at start + if (oc.isSet("additional-files") && !oc.getString("additional-files").empty() && myNet) { + // obtain vector of additional files + std::vector additionalFiles = oc.getStringVector("additional-files"); + // begin undolist + myUndoList->p_begin("Loading additionals and shapes from '" + toString(additionalFiles) + "'"); + // iterate over every additional file + for (const auto& additionalFile : additionalFiles) { + WRITE_MESSAGE("Loading additionals and shapes from '" + additionalFile + "'"); + GNEAdditionalHandler additionalHandler(additionalFile, myNet->getViewNet()); + // disable validation for additionals + XMLSubSys::setValidation("never", "auto"); + // Run parser + if (!XMLSubSys::runParser(additionalHandler, additionalFile, false)) { + WRITE_ERROR("Loading of " + additionalFile + " failed."); + } + // disable validation for additionals + XMLSubSys::setValidation("auto", "auto"); } - // disable validation for additionals - XMLSubSys::setValidation("auto", "auto"); + myUndoList->p_end(); } - // check if shapes has to be loaded at start - if (oc.isSet("sumo-shapes-file") && !oc.getString("sumo-shapes-file").empty() && myNet) { - myShapesFile = oc.getString("sumo-shapes-file"); - WRITE_MESSAGE("Loading shapes"); - GNEShapeHandler shapeHandler(myShapesFile, myNet); - // disable validation for shapes - XMLSubSys::setValidation("never", "auto"); - // Run parser - myUndoList->p_begin("Loading shapes from '" + myShapesFile + "'"); - if (!XMLSubSys::runParser(shapeHandler, myShapesFile, false)) { - WRITE_ERROR("Loading of shapes failed."); + // check if demand elements has to be loaded at start + if (oc.isSet("route-files") && !oc.getString("route-files").empty() && myNet) { + // obtain vector of route files + std::vector demandElementsFiles = oc.getStringVector("route-files"); + // begin undolist + myUndoList->p_begin("Loading demand elements from '" + toString(demandElementsFiles) + "'"); + // iterate over every route file + for (const auto& demandElementsFile : demandElementsFiles) { + WRITE_MESSAGE("Loading demand elements from '" + demandElementsFile + "'"); + GNERouteHandler routeHandler(demandElementsFile, myNet->getViewNet()); + // disable validation for demand elements + XMLSubSys::setValidation("never", "auto"); + if (!XMLSubSys::runParser(routeHandler, demandElementsFile, false)) { + WRITE_ERROR("Loading of " + demandElementsFile + " failed."); + } + // disable validation for demand elements + XMLSubSys::setValidation("auto", "auto"); } - // enable validation for shapes - XMLSubSys::setValidation("auto", "auto"); + myUndoList->p_end(); } // check if additionals output must be changed if (oc.isSet("additionals-output")) { - myAdditionalsFile = oc.getString("additionals-output"); + // overwrite "additional-files" with value "additionals-output" + oc.resetWritable(); + oc.set("additional-files", oc.getString("additionals-output")); } - // check if shapes output must be changed - if (oc.isSet("shapes-output")) { - myShapesFile = oc.getString("shapes-output"); - } - // check if TLSPrograms output must be changed - if (oc.isSet("TLSPrograms-output")) { - myTLSProgramsFile = oc.getString("TLSPrograms-output"); + // check if demand elements output must be changed + if (oc.isSet("demandelements-output")) { + // overwrite "route-files" with value "demandelements-output" + oc.resetWritable(); + oc.set("route-files", oc.getString("demandelements-output")); } // after loading net shouldn't be saved if (myNet) { @@ -1120,6 +882,474 @@ myMessageWindow->appendMsg(ec->getOwnType(), ec->getMsg()); } +// =========================================================================== +// GNEApplicationWindow::MenuBarFile method definitions +// =========================================================================== + +GNEApplicationWindow::MenuBarFile::MenuBarFile(GNEApplicationWindow* GNEApp) : + myRecentNets(GNEApp->getApp(), "nets"), + myGNEApp(GNEApp) +{ } + + +void +GNEApplicationWindow::MenuBarFile::buildRecentFiles(FXMenuPane* fileMenu) { + FXMenuSeparator* sep1 = new FXMenuSeparator(fileMenu); + sep1->setTarget(&myRecentConfigs); + sep1->setSelector(FXRecentFiles::ID_ANYFILES); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_1); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_2); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_3); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_4); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_5); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_6); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_7); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_8); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_9); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_10); + new FXMenuCommand(fileMenu, "Clear Recent Configurat&ions", nullptr, &myRecentConfigs, FXRecentFiles::ID_CLEAR); + myRecentConfigs.setTarget(myGNEApp); + myRecentConfigs.setSelector(MID_RECENTFILE); + FXMenuSeparator* sep2 = new FXMenuSeparator(fileMenu); + sep2->setTarget(&myRecentNets); + sep2->setSelector(FXRecentFiles::ID_ANYFILES); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_1); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_2); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_3); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_4); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_5); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_6); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_7); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_8); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_9); + new FXMenuCommand(fileMenu, "", nullptr, &myRecentNets, FXRecentFiles::ID_FILE_10); + new FXMenuCommand(fileMenu, "Cl&ear Recent Networks", nullptr, &myRecentNets, FXRecentFiles::ID_CLEAR); + myRecentNets.setTarget(myGNEApp); + myRecentNets.setSelector(MID_RECENTFILE); +} + +// --------------------------------------------------------------------------- +// GNEViewNet::FileMenuCommands - methods +// --------------------------------------------------------------------------- + +GNEApplicationWindow::FileMenuCommands::FileMenuCommands(GNEApplicationWindow* GNEApp) : + myGNEApp(GNEApp) { +} + + +void +GNEApplicationWindow::FileMenuCommands::buildFileMenuCommands(FXMenuPane* fileMenu) { + new FXMenuCommand(fileMenu, + "&New Network...\tCtrl+N\tCreate a new network.", + GUIIconSubSys::getIcon(ICON_OPEN_NET), myGNEApp, MID_HOTKEY_CTRL_N_NEWNETWORK); + new FXMenuCommand(fileMenu, + "&Open Network...\tCtrl+O\tOpen a SUMO network.", + GUIIconSubSys::getIcon(ICON_OPEN_NET), myGNEApp, MID_OPEN_NETWORK); + new FXMenuCommand(fileMenu, + "Open Netconvert Configura&tion...\tCtrl+Shift+O\tOpen a configuration file with NETCONVERT options.", + GUIIconSubSys::getIcon(ICON_OPEN_CONFIG), myGNEApp, MID_OPEN_CONFIG); + new FXMenuCommand(fileMenu, + "Import &Foreign Network...\t\tImport a foreign network such as OSM.", + GUIIconSubSys::getIcon(ICON_OPEN_NET), myGNEApp, MID_GNE_TOOLBARFILE_OPENFOREIGN); + new FXMenuCommand(fileMenu, + "&Reload\tCtrl+R\tReloads the network.", + GUIIconSubSys::getIcon(ICON_RELOAD), myGNEApp, MID_HOTKEY_CTRL_R_RELOAD); + new FXMenuCommand(fileMenu, + "&Save Network...\tCtrl+S\tSave the network.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK); + new FXMenuCommand(fileMenu, + "Save Net&work As...\tCtrl+Shift+S\tSave the network in another file.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_HOTKEY_CTRL_SHIFT_S_SAVENETWORKAS); + new FXMenuCommand(fileMenu, + "Save plain XM&L...\tCtrl+L\tSave plain xml representation the network.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_HOTKEY_CTRL_L_SAVEASPLAINXML); + new FXMenuCommand(fileMenu, + "Save &joined junctions...\tCtrl+J\tSave log of joined junctions (allows reproduction of joins).", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_HOTKEY_CTRL_J_SAVEJOINEDJUNCTIONS); + // create Additionals menu options + myGNEApp->myFileMenuAdditionals = new FXMenuPane(myGNEApp); + new FXMenuCommand(myGNEApp->myFileMenuAdditionals, + "Load A&dditionals...\tCtrl+A\tLoad additionals and shapes.", + GUIIconSubSys::getIcon(ICON_OPEN_ADDITIONALS), myGNEApp, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS); + saveAdditionals = new FXMenuCommand(myGNEApp->myFileMenuAdditionals, + "Save Additionals\tCtrl+Shift+A\tSave additionals and shapes.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS); + saveAdditionals->disable(); + saveAdditionalsAs = new FXMenuCommand(myGNEApp->myFileMenuAdditionals, + "Save Additionals As...\t\tSave additional elements in another file.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_GNE_TOOLBARFILE_SAVEADDITIONALS_AS); + saveAdditionalsAs->disable(); + new FXMenuCascade(fileMenu, "Additionals and shapes", GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), myGNEApp->myFileMenuAdditionals); + // create TLS menu options + myGNEApp->myFileMenuTLS = new FXMenuPane(myGNEApp); + new FXMenuCommand(myGNEApp->myFileMenuTLS, + "load TLS Programs...\tCtrl+K\tload TLS Programs in all Traffic Lights of the net.", + GUIIconSubSys::getIcon(ICON_OPEN_TLSPROGRAMS), myGNEApp, MID_OPEN_TLSPROGRAMS); + saveTLSPrograms = new FXMenuCommand(myGNEApp->myFileMenuTLS, + "Save TLS Programs \tCtrl+Shift+K\tSave TLS Programs of all Traffic Lights of the current net.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_GNE_HOTKEY_CTRL_SHIFT_K); + saveTLSPrograms->disable(); + new FXMenuCommand(myGNEApp->myFileMenuTLS, + "Save TLS Programs As...\t\tSave TLS Programs of all Traffic Lights of the current net in another file.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS); + new FXMenuCascade(fileMenu, "Traffic Lights", GUIIconSubSys::getIcon(ICON_MODETLS), myGNEApp->myFileMenuTLS); + // create DemandElements menu options + myGNEApp->myFileMenuDemandElements = new FXMenuPane(myGNEApp); + new FXMenuCommand(myGNEApp->myFileMenuDemandElements, + "Load demand elements...\tCtrl+D\tLoad demand elements.", + GUIIconSubSys::getIcon(ICON_OPEN_ADDITIONALS), myGNEApp, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND); + saveDemandElements = new FXMenuCommand(myGNEApp->myFileMenuDemandElements, + "Save demand elements\tCtrl+Shift+D\tSave demand elements.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMAND); + saveDemandElements->disable(); + saveDemandElementsAs = new FXMenuCommand(myGNEApp->myFileMenuDemandElements, + "Save demand elements as...\t\tSave demand elements in another file.", + GUIIconSubSys::getIcon(ICON_SAVE), myGNEApp, MID_GNE_TOOLBARFILE_SAVEDEMAND_AS); + saveDemandElementsAs->disable(); + new FXMenuCascade(fileMenu, "Demand elements", GUIIconSubSys::getIcon(ICON_SUPERMODEDEMAND), myGNEApp->myFileMenuDemandElements); + // close network + new FXMenuSeparator(fileMenu); + new FXMenuCommand(fileMenu, + "Close\tCtrl+W\tClose the net&work.", + GUIIconSubSys::getIcon(ICON_CLOSE), myGNEApp, MID_HOTKEY_CTRL_W_CLOSESIMULATION); + // build recent files + myGNEApp->myMenuBarFile.buildRecentFiles(fileMenu); + new FXMenuSeparator(fileMenu); + new FXMenuCommand(fileMenu, "&Quit\tCtrl+Q\tQuit the Application.", nullptr, myGNEApp, MID_HOTKEY_CTRL_Q_CLOSE, 0); + +} + +// --------------------------------------------------------------------------- +// GNEViewNet::EditMenuCommands - methods +// --------------------------------------------------------------------------- + +GNEApplicationWindow::EditMenuCommands::EditMenuCommands(GNEApplicationWindow* GNEApp) : + myGNEApp(GNEApp) { +} + + +void +GNEApplicationWindow::EditMenuCommands::buildEditMenuCommands(FXMenuPane* fileMenu) { + // build undo/redo command + undoLastChange = new FXMenuCommand(fileMenu, + "&Undo\tCtrl+Z\tUndo the last change.", + GUIIconSubSys::getIcon(ICON_UNDO), myGNEApp, MID_HOTKEY_CTRL_Z_UNDO); + redoLastChange = new FXMenuCommand(fileMenu, + "&Redo\tCtrl+Y\tRedo the last change.", + GUIIconSubSys::getIcon(ICON_REDO), myGNEApp, MID_HOTKEY_CTRL_Y_REDO); + // build separator + new FXMenuSeparator(fileMenu); + // build Supermode commands and hide it + myGNEApp->mySupermodeCommands.buildSupermodeCommands(fileMenu); + myGNEApp->mySupermodeCommands.hideSupermodeCommands(); + // build Network modes commands and hide it + myGNEApp->myNetworkMenuCommands.buildNetworkMenuCommands(fileMenu); + myGNEApp->myNetworkMenuCommands.hideNetworkMenuCommands(); + // build Demand Modes commands + myGNEApp->myDemandMenuCommands.buildDemandMenuCommands(fileMenu); + myGNEApp->myDemandMenuCommands.hideDemandMenuCommands(); + editViewScheme = new FXMenuCommand(fileMenu, + "Edit Visualisation\tCtrl+V\tOpens a dialog for editing visualization settings.", + nullptr, myGNEApp, MID_EDITVIEWSCHEME); + editViewPort = new FXMenuCommand(fileMenu, + "Edit Viewport\tCtrl+I\tOpens a dialog for editing viewing are, zoom and rotation.", + nullptr, myGNEApp, MID_EDITVIEWPORT); + toogleGrid = new FXMenuCommand(fileMenu, + "Toggle Grid\tCtrl+G\tToggles background grid (and snap-to-grid functionality).", + nullptr, myGNEApp, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID); + new FXMenuSeparator(fileMenu); + openInSUMOGUI = new FXMenuCommand(fileMenu, + "Open in SUMO GUI\tCtrl+T\tOpens the SUMO GUI application with the current network.", + GUIIconSubSys::getIcon(ICON_SUMO_MINI), myGNEApp, MID_HOTKEY_CTRL_T_OPENSUMONETEDIT); +} + +// --------------------------------------------------------------------------- +// GNEViewNet::NetworkCheckableButtons - methods +// --------------------------------------------------------------------------- + +GNEApplicationWindow::SupermodeCommands::SupermodeCommands(GNEApplicationWindow* GNEApp) : + networkMode(nullptr), + demandMode(nullptr), + myGNEApp(GNEApp) { +} + + +void +GNEApplicationWindow::SupermodeCommands::showSupermodeCommands() { + networkMode->show(); + demandMode->show(); + // also show separator + myHorizontalSeparator->show(); +} + + +void +GNEApplicationWindow::SupermodeCommands::hideSupermodeCommands() { + networkMode->hide(); + demandMode->hide(); + // also hide separator + myHorizontalSeparator->hide(); +} + + +void +GNEApplicationWindow::SupermodeCommands::buildSupermodeCommands(FXMenuPane* editMenu) { + // build supermode menu commands + networkMode = new FXMenuCommand(editMenu, "&Network mode\tF3\tSelect network mode.", + GUIIconSubSys::getIcon(ICON_SUPERMODENETWORK), myGNEApp, MID_HOTKEY_F3_SUPERMODE_NETWORK); + demandMode = new FXMenuCommand(editMenu, "&Demand mode\tF4\tSelect demand mode.", + GUIIconSubSys::getIcon(ICON_SUPERMODEDEMAND), myGNEApp, MID_HOTKEY_F4_SUPERMODE_DEMAND); + // build separator + myHorizontalSeparator = new FXMenuSeparator(editMenu); +} + +// --------------------------------------------------------------------------- +// GNEViewNet::NetworkCheckableButtons - methods +// --------------------------------------------------------------------------- + +GNEApplicationWindow::NetworkMenuCommands::NetworkMenuCommands(GNEApplicationWindow* GNEApp) : + createEdgeMode(nullptr), + moveMode(nullptr), + deleteMode(nullptr), + inspectMode(nullptr), + selectMode(nullptr), + connectMode(nullptr), + prohibitionMode(nullptr), + TLSMode(nullptr), + additionalMode(nullptr), + crossingMode(nullptr), + TAZMode(nullptr), + shapeMode(nullptr), + myGNEApp(GNEApp) { +} + + +void +GNEApplicationWindow::NetworkMenuCommands::showNetworkMenuCommands() { + createEdgeMode->show(); + moveMode->show(); + deleteMode->show(); + inspectMode->show(); + selectMode->show(); + connectMode->show(); + prohibitionMode->show(); + TLSMode->show(); + additionalMode->show(); + crossingMode->show(); + TAZMode->show(); + shapeMode->show(); + // also show separator + myHorizontalSeparator->show(); +} + + +void +GNEApplicationWindow::NetworkMenuCommands::hideNetworkMenuCommands() { + createEdgeMode->hide(); + moveMode->hide(); + deleteMode->hide(); + inspectMode->hide(); + selectMode->hide(); + connectMode->hide(); + prohibitionMode->hide(); + TLSMode->hide(); + additionalMode->hide(); + crossingMode->hide(); + TAZMode->hide(); + shapeMode->hide(); + // also hide separator + myHorizontalSeparator->hide(); +} + + +void +GNEApplicationWindow::NetworkMenuCommands::buildNetworkMenuCommands(FXMenuPane* editMenu) { + // build every FXMenuCommand giving it a shortcut + createEdgeMode = new FXMenuCommand(editMenu, + "&Edge mode\tE\tCreate junction and edges.", + GUIIconSubSys::getIcon(ICON_MODECREATEEDGE), myGNEApp, MID_HOTKEY_E_EDGEMODE); + moveMode = new FXMenuCommand(editMenu, + "&Move mode\tM\tMove elements.", + GUIIconSubSys::getIcon(ICON_MODEMOVE), myGNEApp, MID_HOTKEY_M_MOVEMODE); + deleteMode = new FXMenuCommand(editMenu, + "&Delete mode\tD\tDelete elements.", + GUIIconSubSys::getIcon(ICON_MODEDELETE), myGNEApp, MID_HOTKEY_D_DELETEMODE); + inspectMode = new FXMenuCommand(editMenu, + "&Inspect mode\tI\tInspect elements and change their attributes.", + GUIIconSubSys::getIcon(ICON_MODEINSPECT), myGNEApp, MID_HOTKEY_I_INSPECTMODE); + selectMode = new FXMenuCommand(editMenu, + "&Select mode\tS\tSelect elements.", + GUIIconSubSys::getIcon(ICON_MODESELECT), myGNEApp, MID_HOTKEY_S_SELECTMODE); + connectMode = new FXMenuCommand(editMenu, + "&Connection mode\tC\tEdit connections between lanes.", + GUIIconSubSys::getIcon(ICON_MODECONNECTION), myGNEApp, MID_HOTKEY_C_CONNECTMODE); + prohibitionMode = new FXMenuCommand(editMenu, + "Pro&hibition mode\tW\tEdit connection prohibitions.", + GUIIconSubSys::getIcon(ICON_MODEPROHIBITION), myGNEApp, MID_HOTKEY_W_PROHIBITIONMODE); + TLSMode = new FXMenuCommand(editMenu, + "&Traffic light mode\tT\tEdit traffic lights over junctions.", + GUIIconSubSys::getIcon(ICON_MODETLS), myGNEApp, MID_HOTKEY_T_TLSMODE_VTYPEMODE); + additionalMode = new FXMenuCommand(editMenu, + "&Additional mode\tA\tCreate additional elements.", + GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), myGNEApp, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE); + crossingMode = new FXMenuCommand(editMenu, + "C&rossing mode\tR\tCreate crossings between edges.", + GUIIconSubSys::getIcon(ICON_MODECROSSING), myGNEApp, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE); + TAZMode = new FXMenuCommand(editMenu, + "TA&Z mode\tZ\tCreate Traffic Assignment Zones.", + GUIIconSubSys::getIcon(ICON_MODETAZ), myGNEApp, MID_HOTKEY_Z_TAZMODE); + shapeMode = new FXMenuCommand(editMenu, + "&POI-Poly mode\tP\tCreate Points-Of-Interest and polygons.", + GUIIconSubSys::getIcon(ICON_MODEPOLYGON), myGNEApp, MID_HOTKEY_P_POLYGONMODE); + // build separator + myHorizontalSeparator = new FXMenuSeparator(editMenu); +} + +// --------------------------------------------------------------------------- +// GNEViewNet::DemandCheckableButtons - methods +// --------------------------------------------------------------------------- + +GNEApplicationWindow::DemandMenuCommands::DemandMenuCommands(GNEApplicationWindow* GNEApp) : + routeMode(nullptr), + vehicleMode(nullptr), + vehicleTypeMode(nullptr), + stopMode(nullptr), + myGNEApp(GNEApp) { +} + + +void +GNEApplicationWindow::DemandMenuCommands::showDemandMenuCommands() { + routeMode->show(); + vehicleMode->show(); + vehicleTypeMode->show(); + stopMode->show(); + // also show separator + myHorizontalSeparator->show(); +} + + +void +GNEApplicationWindow::DemandMenuCommands::hideDemandMenuCommands() { + routeMode->hide(); + vehicleMode->hide(); + vehicleTypeMode->hide(); + stopMode->hide(); + // also hide separator + myHorizontalSeparator->hide(); +} + + +void +GNEApplicationWindow::DemandMenuCommands::buildDemandMenuCommands(FXMenuPane* editMenu) { + // build every FXMenuCommand giving it a shortcut + routeMode = new FXMenuCommand(editMenu, + "Route mode\tR\tCreate Routes.", + GUIIconSubSys::getIcon(ICON_MODEROUTE), myGNEApp, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE); + vehicleMode = new FXMenuCommand(editMenu, + "Vehicle mode\tV\tCreate vehicles.", + GUIIconSubSys::getIcon(ICON_MODEVEHICLE), myGNEApp, MID_HOTKEY_V_VEHICLEMODE); + vehicleTypeMode = new FXMenuCommand(editMenu, + "Vehicle type mode\tT\tCreate vehicle types.", + GUIIconSubSys::getIcon(ICON_MODEVEHICLETYPE), myGNEApp, MID_HOTKEY_T_TLSMODE_VTYPEMODE); + stopMode = new FXMenuCommand(editMenu, + "Stop mode\tT\tCreate stops.", + GUIIconSubSys::getIcon(ICON_MODESTOP), myGNEApp, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE); + // build separator + myHorizontalSeparator = new FXMenuSeparator(editMenu); +} + +// --------------------------------------------------------------------------- +// private methods +// --------------------------------------------------------------------------- + +void +GNEApplicationWindow::fillMenuBar() { + // declare a FXMenuTitle needed to set height in all menu titles + FXMenuTitle* menuTitle; + // build file menu + myFileMenu = new FXMenuPane(this, LAYOUT_FIX_HEIGHT); + menuTitle = new FXMenuTitle(myToolbarsGrip.menu, "&File", nullptr, myFileMenu, LAYOUT_FIX_HEIGHT); + menuTitle->setHeight(23); + myFileMenuCommands.buildFileMenuCommands(myFileMenu); + // build edit menu + myEditMenu = new FXMenuPane(this); + menuTitle = new FXMenuTitle(myToolbarsGrip.menu, "&Edit", nullptr, myEditMenu, LAYOUT_FIX_HEIGHT); + menuTitle->setHeight(23); + myEditMenuCommands.buildEditMenuCommands(myEditMenu); + // processing menu (trigger netbuild computations) + myProcessingMenu = new FXMenuPane(this); + menuTitle = new FXMenuTitle(myToolbarsGrip.menu, "&Processing", nullptr, myProcessingMenu, LAYOUT_FIX_HEIGHT); + menuTitle->setHeight(23); + // build processing menu commands + new FXMenuCommand(myProcessingMenu, + "Compute Junctions\tF5\tComputes junction shape and logic.", + GUIIconSubSys::getIcon(ICON_COMPUTEJUNCTIONS), this, MID_HOTKEY_F5_RECOMPUTE); + new FXMenuCommand(myProcessingMenu, + "Compute Junctions with volatile options\tShift+F5\tComputes junction shape and logic using volatile junctions.", + GUIIconSubSys::getIcon(ICON_COMPUTEJUNCTIONS), this, MID_HOTKEY_SHIFT_F5_RECOMPUTEVOLATILE); + new FXMenuCommand(myProcessingMenu, + "Clean Junctions\tF6\tRemoves solitary junctions.", + GUIIconSubSys::getIcon(ICON_CLEANJUNCTIONS), this, MID_GNE_HOTKEY_F6); + new FXMenuCommand(myProcessingMenu, + "Join Selected Junctions\tF7\tJoins selected junctions into a single junction.", + GUIIconSubSys::getIcon(ICON_JOINJUNCTIONS), this, MID_GNE_HOTKEY_F7); + new FXMenuCommand(myProcessingMenu, + "Clean invalid crossings\tF8\tClear invalid crossings.", + GUIIconSubSys::getIcon(ICON_JOINJUNCTIONS), this, MID_GNE_HOTKEY_F8); + new FXMenuCommand(myProcessingMenu, + "Options\tF10\t\tConfigure Processing Options.", + GUIIconSubSys::getIcon(ICON_OPTIONS), this, MID_GNE_HOTKEY_F10); + // build locate menu + myLocatorMenu = new FXMenuPane(this); + menuTitle = new FXMenuTitle(myToolbarsGrip.menu, "&Locate", nullptr, myLocatorMenu, LAYOUT_FIX_HEIGHT); + menuTitle->setHeight(23); + // build locate menu commands + new FXMenuCommand(myLocatorMenu, + "Locate &Junctions\tShift+J\tOpen a Dialog for Locating a Junction.", + GUIIconSubSys::getIcon(ICON_LOCATEJUNCTION), this, MID_LOCATEJUNCTION); + new FXMenuCommand(myLocatorMenu, + "Locate &Edges\tShift+E\tOpen a Dialog for Locating an Edge.", + GUIIconSubSys::getIcon(ICON_LOCATEEDGE), this, MID_LOCATEEDGE); + new FXMenuCommand(myLocatorMenu, + "Locate &TLS\tShift+T\tOpen a Dialog for Locating a Traffic Light.", + GUIIconSubSys::getIcon(ICON_LOCATETLS), this, MID_LOCATETLS); + new FXMenuCommand(myLocatorMenu, + "Locate &Additional\tShift+A\tOpen a Dialog for Locating an Additional Structure.", + GUIIconSubSys::getIcon(ICON_LOCATEADD), this, MID_LOCATEADD); + new FXMenuCommand(myLocatorMenu, + "Locate P&oI\tShift+O\tOpen a Dialog for Locating a Point of Intereset.", + GUIIconSubSys::getIcon(ICON_LOCATEPOI), this, MID_LOCATEPOI); + new FXMenuCommand(myLocatorMenu, + "Locate Po&lygon\tShift+L\tOpen a Dialog for Locating a Polygon.", + GUIIconSubSys::getIcon(ICON_LOCATEPOLY), this, MID_LOCATEPOLY); + // build windows menu + myWindowsMenu = new FXMenuPane(this); + menuTitle = new FXMenuTitle(myToolbarsGrip.menu, "&Windows", nullptr, myWindowsMenu, LAYOUT_FIX_HEIGHT); + menuTitle->setHeight(23); + // build windows menu commands + new FXMenuCheck(myWindowsMenu, + "&Show Status Line\t\tToggle this Status Bar on/off.", + myStatusbar, FXWindow::ID_TOGGLESHOWN); + new FXMenuCheck(myWindowsMenu, + "Show &Message Window\t\tToggle the Message Window on/off.", + myMessageWindow, FXWindow::ID_TOGGLESHOWN); + new FXMenuCommand(myWindowsMenu, + "&Clear Message Window\t\tClear the message window.", + nullptr, this, MID_CLEARMESSAGEWINDOW); + // build help menu + myHelpMenu = new FXMenuPane(this); + menuTitle = new FXMenuTitle(myToolbarsGrip.menu, "&Help", nullptr, myHelpMenu, LAYOUT_FIX_HEIGHT); + menuTitle->setHeight(23); + // build help menu commands + new FXMenuCommand(myHelpMenu, + "&Online Documentation\tF1\tOpen Online documentation.", + nullptr, this, MID_HOTKEY_F1_ONLINEDOCUMENTATION); + new FXMenuCommand(myHelpMenu, + "&About\tF2\tAbout netedit.", + nullptr, this, MID_HOTKEY_F2_ABOUT); +} + void GNEApplicationWindow::loadConfigOrNet(const std::string file, bool isNet, bool isReload, bool useStartupOptions, bool newNet) { @@ -1134,40 +1364,23 @@ myLoadThread->start(); setStatusBarText("Reloading."); } else { - gSchemeStorage.saveViewport(0, 0, -1); // recenter view + gSchemeStorage.saveViewport(0, 0, -1, 0); // recenter view myLoadThread->loadConfigOrNet(file, isNet, useStartupOptions, newNet); setStatusBarText("Loading '" + file + "'."); } + // show supermode commands menu + mySupermodeCommands.showSupermodeCommands(); + // show Network command menus (because Network is the default supermode) + myNetworkMenuCommands.showNetworkMenuCommands(); + // update window update(); } - -GUISUMOAbstractView* -GNEApplicationWindow::openNewView() { - std::string caption = "View #" + toString(myViewNumber++); - FXuint opts = MDI_TRACKING; - // create view parent - GNEViewParent* viewParent = new GNEViewParent(myMDIClient, myMDIMenu, FXString(caption.c_str()), this, getBuildGLCanvas(), myNet, myUndoList, nullptr, opts, 10, 10, 300, 200); - if (myMDIClient->numChildren() == 1) { - viewParent->maximize(); - } else { - myMDIClient->vertical(true); - } - myMDIClient->setActiveChild(viewParent); - //v->grabKeyboard(); - return viewParent->getView(); -} - - FXGLCanvas* GNEApplicationWindow::getBuildGLCanvas() const { - if (myMDIClient->numChildren() == 0) { - return nullptr; - } - GNEViewParent* share_tmp1 = - static_cast(myMDIClient->childAtIndex(0)); - return share_tmp1->getBuildGLCanvas(); + // NETEDIT uses only a single View, then return nullptr + return nullptr; } @@ -1189,15 +1402,20 @@ } +GNEApplicationWindow::ToolbarsGrip& +GNEApplicationWindow::getToolbarsGrip() { + return myToolbarsGrip; +} + + void GNEApplicationWindow::closeAllWindows() { myTrackerLock.lock(); // remove trackers and other external windows - for (GUIGlChildWindow* const window : myGLWindows) { - window->destroy(); - delete window; + while (!myGLWindows.empty()) { + delete myGLWindows.front(); } - myGLWindows.clear(); + myViewNet = nullptr; for (FXMainWindow* const window : myTrackerWindows) { window->destroy(); delete window; @@ -1226,7 +1444,6 @@ GLHelper::resetFont(); // disable saving commmand disableSaveAdditionalsMenu(); - disableSaveShapesMenu(); } @@ -1251,61 +1468,54 @@ void -GNEApplicationWindow::setAdditionalsFile(const std::string& additionalsFile) { - myAdditionalsFile = additionalsFile; -} - - -void -GNEApplicationWindow::setShapesFile(const std::string& shapesFile) { - myShapesFile = shapesFile; -} - - -void -GNEApplicationWindow::setTLSProgramsFile(const std::string& TLSProgramsFile) { - myTLSProgramsFile = TLSProgramsFile; +GNEApplicationWindow::enableSaveAdditionalsMenu() { + myFileMenuCommands.saveAdditionals->enable(); + myFileMenuCommands.saveAdditionalsAs->enable(); } void -GNEApplicationWindow::enableSaveAdditionalsMenu() { - mySaveAdditionalsMenuCommand->enable(); - mySaveAdditionalsMenuCommandAs->enable(); +GNEApplicationWindow::disableSaveAdditionalsMenu() { + myFileMenuCommands.saveAdditionals->disable(); + myFileMenuCommands.saveAdditionalsAs->disable(); } void -GNEApplicationWindow::disableSaveAdditionalsMenu() { - mySaveAdditionalsMenuCommand->disable(); - mySaveAdditionalsMenuCommandAs->disable(); +GNEApplicationWindow::enableSaveTLSProgramsMenu() { + myFileMenuCommands.saveTLSPrograms->enable(); } void -GNEApplicationWindow::enableSaveShapesMenu() { - mySaveShapesMenuCommand->enable(); - mySaveShapesMenuCommandAs->enable(); +GNEApplicationWindow::enableSaveDemandElementsMenu() { + myFileMenuCommands.saveDemandElements->disable(); + myFileMenuCommands.saveDemandElementsAs->disable(); } void -GNEApplicationWindow::disableSaveShapesMenu() { - mySaveShapesMenuCommand->disable(); - mySaveShapesMenuCommandAs->disable(); +GNEApplicationWindow::disableSaveDemandElementsMenu() { + myFileMenuCommands.saveDemandElements->disable(); + myFileMenuCommands.saveDemandElementsAs->disable(); } -void -GNEApplicationWindow::enableSaveTLSProgramsMenu() { - mySaveTLSProgramsMenuCommand->enable(); +long +GNEApplicationWindow::onCmdSetSuperMode(FXObject* sender, FXSelector sel, void* ptr) { + // check that currently there is a View + if (myViewNet) { + myViewNet->onCmdSetSupermode(sender, sel, ptr); + } + return 1; } long -GNEApplicationWindow::onCmdSetMode(FXObject*, FXSelector sel, void*) { - if (getView()) { - getView()->setEditModeFromHotkey(FXSELID(sel)); +GNEApplicationWindow::onCmdSetMode(FXObject* sender, FXSelector sel, void* ptr) { + // check that currently there is a View + if (myViewNet) { + myViewNet->onCmdSetMode(sender, sel, ptr); } return 1; } @@ -1313,57 +1523,54 @@ long GNEApplicationWindow::onCmdOpenSUMOGUI(FXObject*, FXSelector, void*) { - if (myGLWindows.empty()) { - return 1; - } - FXRegistry reg("SUMO GUI", "Eclipse"); - reg.read(); - const GUISUMOAbstractView* const v = getView(); - reg.writeRealEntry("viewport", "x", v->getChanger().getXPos()); - reg.writeRealEntry("viewport", "y", v->getChanger().getYPos()); - reg.writeRealEntry("viewport", "z", v->getChanger().getZPos()); - reg.write(); - std::string sumogui = "sumo-gui"; - const char* sumoPath = getenv("SUMO_HOME"); - if (sumoPath != nullptr) { - std::string newPath = std::string(sumoPath) + "/bin/sumo-gui"; - if (FileHelpers::isReadable(newPath) || FileHelpers::isReadable(newPath + ".exe")) { - sumogui = "\"" + newPath + "\""; + // check that currently there is a View + if (myViewNet) { + FXRegistry reg("SUMO GUI", "Eclipse"); + reg.read(); + reg.writeRealEntry("viewport", "x", myViewNet->getChanger().getXPos()); + reg.writeRealEntry("viewport", "y", myViewNet->getChanger().getYPos()); + reg.writeRealEntry("viewport", "z", myViewNet->getChanger().getZPos()); + reg.write(); + std::string sumogui = "sumo-gui"; + const char* sumoPath = getenv("SUMO_HOME"); + if (sumoPath != nullptr) { + std::string newPath = std::string(sumoPath) + "/bin/sumo-gui"; + if (FileHelpers::isReadable(newPath) || FileHelpers::isReadable(newPath + ".exe")) { + sumogui = "\"" + newPath + "\""; + } } - } - std::string cmd = sumogui + " --registry-viewport" + " -n " + OptionsCont::getOptions().getString("output-file"); - // start in background + std::string cmd = sumogui + " --registry-viewport" + " -n " + OptionsCont::getOptions().getString("output-file"); + // start in background #ifndef WIN32 - cmd = cmd + " &"; + cmd = cmd + " &"; #else - // see "help start" for the parameters - cmd = "start /B \"\" " + cmd; + // see "help start" for the parameters + cmd = "start /B \"\" " + cmd; #endif - WRITE_MESSAGE("Running " + cmd + "."); - // yay! fun with dangerous commands... Never use this over the internet - SysUtils::runHiddenCommand(cmd); + WRITE_MESSAGE("Running " + cmd + "."); + // yay! fun with dangerous commands... Never use this over the internet + SysUtils::runHiddenCommand(cmd); + } return 1; } long GNEApplicationWindow::onCmdAbort(FXObject*, FXSelector, void*) { - // obtain pointer to view net (only for improve code legibility) - GNEViewNet *viewNet = getView(); // check that view exists - if (viewNet) { + if (myViewNet) { // show extra information for tests WRITE_DEBUG("Key ESC (abort) pressed"); // first check if we're selecting a subset of edges in TAZ Frame - if(viewNet->getViewParent()->getTAZFrame()->getTAZSelectionStatisticsModul()->getEdgeAndTAZChildsSelected().size() > 0) { + if (myViewNet->getViewParent()->getTAZFrame()->getTAZSelectionStatisticsModul()->getEdgeAndTAZChildsSelected().size() > 0) { // show extra information for tests WRITE_DEBUG("Cleaning current selected edges"); // clear current selection - viewNet->getViewParent()->getTAZFrame()->getTAZSelectionStatisticsModul()->clearSelectedEdges(); + myViewNet->getViewParent()->getTAZFrame()->getTAZSelectionStatisticsModul()->clearSelectedEdges(); } else { // abort current operation - viewNet->abortOperation(); - viewNet->update(); + myViewNet->abortOperation(); + myViewNet->update(); } } return 1; @@ -1372,10 +1579,11 @@ long GNEApplicationWindow::onCmdDel(FXObject*, FXSelector, void*) { - if (getView()) { + // check that view exists + if (myViewNet) { // show extra information for tests WRITE_DEBUG("Key DEL (delete) pressed"); - getView()->hotkeyDel(); + myViewNet->hotkeyDel(); } return 1; } @@ -1383,10 +1591,11 @@ long GNEApplicationWindow::onCmdEnter(FXObject*, FXSelector, void*) { - if (getView()) { + // check that view exists + if (myViewNet) { // show extra information for tests WRITE_DEBUG("Key ENTER pressed"); - getView()->hotkeyEnter(); + myViewNet->hotkeyEnter(); } return 1; } @@ -1394,8 +1603,9 @@ long GNEApplicationWindow::onCmdFocusFrame(FXObject*, FXSelector, void*) { - if (getView()) { - getView()->hotkeyFocusFrame(); + // check that view exists + if (myViewNet) { + myViewNet->hotkeyFocusFrame(); } return 1; } @@ -1403,8 +1613,9 @@ long GNEApplicationWindow::onCmdEditViewport(FXObject*, FXSelector, void*) { - if (getView()) { - getView()->showViewportEditor(); + // check that view exists + if (myViewNet) { + myViewNet->showViewportEditor(); } return 1; } @@ -1412,8 +1623,9 @@ long GNEApplicationWindow::onCmdEditViewScheme(FXObject*, FXSelector, void*) { - if (getView()) { - getView()->showViewschemeEditor(); + // check that view exists + if (myViewNet) { + myViewNet->showViewschemeEditor(); } return 1; } @@ -1421,20 +1633,126 @@ long GNEApplicationWindow::onCmdToogleGrid(FXObject*, FXSelector, void*) { - // only toogle grid if there is a GNEViewNet - if (getView() != nullptr) { + // check that view exists + if (myViewNet) { // Toogle getMenuCheckShowGrid of GNEViewNet - if (getView()->getMenuCheckShowGrid()->getCheck() == 1) { - getView()->getMenuCheckShowGrid()->setCheck(0); + if (myViewNet->getViewOptions().menuCheckShowGrid->getCheck() == TRUE) { + myViewNet->getViewOptions().menuCheckShowGrid->setCheck(FALSE); // show extra information for tests WRITE_DEBUG("Disabled grid throught Ctrl+g hotkey"); } else { - getView()->getMenuCheckShowGrid()->setCheck(1); + myViewNet->getViewOptions().menuCheckShowGrid->setCheck(TRUE); // show extra information for tests WRITE_WARNING("Enabled grid throught Ctrl+g hotkey"); } // Call manually show grid function - getView()->onCmdShowGrid(nullptr, 0, nullptr); + myViewNet->onCmdShowGrid(nullptr, 0, nullptr); + } + return 1; +} + + +long +GNEApplicationWindow::onCmdToogleShowConnections(FXObject*, FXSelector, void*) { + // check that view exists + if (myViewNet) { + // Toogle menuCheckShowConnections of GNEViewNet + if (myViewNet->getViewOptions().menuCheckShowConnections->getCheck() == TRUE) { + myViewNet->getViewOptions().menuCheckShowConnections->setCheck(FALSE); + // show extra information for tests + WRITE_DEBUG("Disabled show connections throught Ctrl+shift+c hotkey"); + } else { + myViewNet->getViewOptions().menuCheckShowConnections->setCheck(TRUE); + // show extra information for tests + WRITE_WARNING("Disabled show connections throught Ctrl+shift+c hotkey"); + } + // Call manually toogle show connection function + myViewNet->onCmdToogleShowConnection(nullptr, 0, nullptr); + + } + return 1; +} + + +long +GNEApplicationWindow::onCmdToogleElevation(FXObject*, FXSelector, void*) { + // check that view exists + if (myViewNet) { + // Toogle selectEdges of GNEViewNet + if (myViewNet->getMoveOptions().moveElevation->getCheck() == TRUE) { + myViewNet->getMoveOptions().moveElevation->setCheck(FALSE); + // show extra information for tests + WRITE_DEBUG("Disabled move elevation throught Ctrl+shift+h hotkey"); + } else { + myViewNet->getMoveOptions().moveElevation->setCheck(TRUE); + // show extra information for tests + WRITE_WARNING("Disabled move elevation throught Ctrl+shift+h hotkey"); + } + // update view + myViewNet->update(); + } + return 1; +} + + +long +GNEApplicationWindow::onCmdToogleSelectEdges(FXObject*, FXSelector, void*) { + // check that view exists + if (myViewNet) { + // Toogle selectEdges of GNEViewNet + if (myViewNet->getViewOptions().menuCheckSelectEdges->getCheck() == TRUE) { + myViewNet->getViewOptions().menuCheckSelectEdges->setCheck(FALSE); + // show extra information for tests + WRITE_DEBUG("Disabled select edges throught Ctrl+shift+i hotkey"); + } else { + myViewNet->getViewOptions().menuCheckSelectEdges->setCheck(TRUE); + // show extra information for tests + WRITE_WARNING("Disabled select edges throught Ctrl+shift+i hotkey"); + } + // update view + myViewNet->update(); + } + return 1; +} + + +long +GNEApplicationWindow::onCmdToogleChain(FXObject*, FXSelector, void*) { + // check that view exists + if (myViewNet) { + // Toogle selectEdges of GNEViewNet + if (myViewNet->getCreateEdgeOptions().chainEdges->getCheck() == TRUE) { + myViewNet->getCreateEdgeOptions().chainEdges->setCheck(FALSE); + // show extra information for tests + WRITE_DEBUG("Disabled chain mode throught Ctrl+shift+j hotkey"); + } else { + myViewNet->getCreateEdgeOptions().chainEdges->setCheck(TRUE); + // show extra information for tests + WRITE_WARNING("Disabled chain mode throught Ctrl+shift+j hotkey"); + } + // update view + myViewNet->update(); + } + return 1; +} + + +long +GNEApplicationWindow::onCmdToogleTwoWay(FXObject*, FXSelector, void*) { + // check that view exists + if (myViewNet) { + // Toogle selectEdges of GNEViewNet + if (myViewNet->getCreateEdgeOptions().autoOppositeEdge->getCheck() == TRUE) { + myViewNet->getCreateEdgeOptions().autoOppositeEdge->setCheck(FALSE); + // show extra information for tests + WRITE_DEBUG("Disabled two way throught Ctrl+shift+k hotkey"); + } else { + myViewNet->getCreateEdgeOptions().autoOppositeEdge->setCheck(TRUE); + // show extra information for tests + WRITE_WARNING("Disabled two way throught Ctrl+shift+k hotkey"); + } + // update view + myViewNet->update(); } return 1; } @@ -1442,7 +1760,7 @@ long GNEApplicationWindow::onCmdHelp(FXObject*, FXSelector, void*) { - FXLinkLabel::fxexecute("http://sumo.dlr.de/wiki/NETEDIT"); + FXLinkLabel::fxexecute("https://sumo.dlr.de/wiki/NETEDIT"); return 1; } @@ -1459,11 +1777,13 @@ long GNEApplicationWindow::onCmdComputeJunctionsVolatile(FXObject*, FXSelector, void*) { + // obtain option container + OptionsCont& oc = OptionsCont::getOptions(); // declare variable to save FXMessageBox outputs. FXuint answer = 0; - // declare string to save paths in wich additionals and shapes will be saved - std::string additionalSavePath = myAdditionalsFile; - std::string shapeSavePath = myShapesFile; + // declare string to save paths in wich additionals, shapes and demand will be saved + std::string additionalsSavePath = oc.getString("additional-files"); + std::string demandElementsSavePath = oc.getString("route-files"); // write warning if netedit is running in testing mode WRITE_DEBUG("Keys Shift + F5 (Compute with volatile options) pressed"); WRITE_DEBUG("Opening FXMessageBox 'Volatile Recomputing'"); @@ -1485,7 +1805,7 @@ // Check if there are additionals in our net if (myNet->getNumberOfAdditionals() > 0) { // ask user if want to save additionals if weren't saved previously - if (myAdditionalsFile == "") { + if (oc.getString("additional-files") == "") { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'Save additionals before recomputing'"); // open question dialog box @@ -1502,23 +1822,26 @@ // write warning if netedit is running in testing mode WRITE_DEBUG("Closed FXMessageBox 'Save additionals before recomputing' with 'Yes'"); // Open a dialog to set filename output - myAdditionalsFile = MFXUtils::getFilename2Write(this, - "Select name of the additional file", ".xml", - GUIIconSubSys::getIcon(ICON_MODETLS), - gCurrentFolder).text(); - // set obtanied filename output into additionalSavePath (can be "") - additionalSavePath = myAdditionalsFile; + FXString file = MFXUtils::getFilename2Write(this, + "Select name of the demand element file", ".xml", + GUIIconSubSys::getIcon(ICON_MODETLS), + gCurrentFolder).text(); + // update additional files + oc.resetWritable(); + oc.set("additional-files", file.text()); + // set obtanied filename output into additionalsSavePath (can be "") + additionalsSavePath = oc.getString("additional-files"); } } // Check if additional must be saved in a temporal directory, if user didn't define a directory for additionals - if (myAdditionalsFile == "") { + if (oc.getString("additional-files") == "") { // Obtain temporal directory provided by FXSystem::getCurrentDirectory() - additionalSavePath = FXSystem::getTempDirectory().text() + std::string("/tmpAdditionalsNetedit.xml"); + additionalsSavePath = FXSystem::getTempDirectory().text() + std::string("/tmpAdditionalsNetedit.xml"); } // Start saving additionals getApp()->beginWaitCursor(); try { - myNet->saveAdditionals(additionalSavePath); + myNet->saveAdditionals(additionalsSavePath); } catch (IOError& e) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'Error saving additionals before recomputing'"); @@ -1532,62 +1855,65 @@ getApp()->endWaitCursor(); } else { // clear additional path - additionalSavePath = ""; + additionalsSavePath = ""; } - // Check if there are shapes in our net - if (myNet->getNumberOfShapes() > 0) { - // ask user if want to save shapes if weren't saved previously - if (myShapesFile == "") { + // Check if there are demand elements in our net + if (myNet->getNumberOfDemandElements() > 0) { + // ask user if want to save demand elements if weren't saved previously + if (oc.getString("route-files") == "") { // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Save shapes before recomputing'"); + WRITE_DEBUG("Opening FXMessageBox 'Save demand elements before recomputing'"); // open question dialog box - answer = FXMessageBox::question(myNet->getViewNet()->getApp(), MBOX_YES_NO, "Save shapes before recomputing with volatile options", - "Would you like to save shapes before recomputing?"); + answer = FXMessageBox::question(myNet->getViewNet()->getApp(), MBOX_YES_NO, "Save demand elements before recomputing with volatile options", + "Would you like to save demand elements before recomputing?"); if (answer != 1) { //1:yes, 2:no, 4:esc // write warning if netedit is running in testing mode if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Save shapes before recomputing' with 'No'"); + WRITE_DEBUG("Closed FXMessageBox 'Save demand elements before recomputing' with 'No'"); } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Save shapes before recomputing' with 'ESC'"); + WRITE_DEBUG("Closed FXMessageBox 'Save demand elements before recomputing' with 'ESC'"); } } else { // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Save shapes before recomputing' with 'Yes'"); + WRITE_DEBUG("Closed FXMessageBox 'Save demand elements before recomputing' with 'Yes'"); // Open a dialog to set filename output - myShapesFile = MFXUtils::getFilename2Write(this, - "Select name of the shape file", ".xml", - GUIIconSubSys::getIcon(ICON_MODEPOLYGON), - gCurrentFolder).text(); - // set obtanied filename output into shapeSavePath (can be "") - shapeSavePath = myShapesFile; + FXString file = MFXUtils::getFilename2Write(this, + "Select name of the demand element file", ".xml", + GUIIconSubSys::getIcon(ICON_MODETLS), + gCurrentFolder).text(); + // update route files + oc.resetWritable(); + oc.set("route-files", file.text()); + // set obtanied filename output into demand elementSavePath (can be "") + demandElementsSavePath = oc.getString("route-files"); } } - // Check if shape must be saved in a temporal directory, if user didn't define a directory for shapes - if (myShapesFile == "") { + // Check if demand element must be saved in a temporal directory, if user didn't define a directory for demand elements + if (oc.getString("route-files") == "") { // Obtain temporal directory provided by FXSystem::getCurrentDirectory() - shapeSavePath = FXSystem::getTempDirectory().text() + std::string("/tmpShapesNetedit.xml"); + demandElementsSavePath = FXSystem::getTempDirectory().text() + std::string("/tmpDemandElementsNetedit.xml"); } - // Start saving shapes + // Start saving demand elements getApp()->beginWaitCursor(); try { - myNet->saveShapes(shapeSavePath); + myNet->saveDemandElements(demandElementsSavePath); } catch (IOError& e) { // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Error saving shapes before recomputing'"); + WRITE_DEBUG("Opening FXMessageBox 'Error saving demand elements before recomputing'"); // open error message box - FXMessageBox::error(this, MBOX_OK, "Saving shapes in temporal folder failed!", "%s", e.what()); + FXMessageBox::error(this, MBOX_OK, "Saving demand elements in temporal folder failed!", "%s", e.what()); // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Error saving shapes before recomputing' with 'OK'"); + WRITE_DEBUG("Closed FXMessageBox 'Error saving demand elements before recomputing' with 'OK'"); } - // end saving shapes + // end saving demand elements myMessageWindow->addSeparator(); getApp()->endWaitCursor(); } else { - // clear save path - shapeSavePath = ""; + // clear demand element path + demandElementsSavePath = ""; } // compute with volatile options - myNet->computeEverything(this, true, true, additionalSavePath, shapeSavePath); + myNet->computeEverything(this, true, true, additionalsSavePath, demandElementsSavePath); updateControls(); return 1; } @@ -1637,6 +1963,34 @@ long +GNEApplicationWindow::onCmdUndo(FXObject*, FXSelector, void*) { + // Undo needs a viewnet and a enabled undoLastChange menu command + if (myViewNet && myEditMenuCommands.undoLastChange->isEnabled()) { + myViewNet->getUndoList()->undo(); + // update current show frame after undo + if (myViewNet->getViewParent()->getCurrentShownFrame()) { + myViewNet->getViewParent()->getCurrentShownFrame()->updateFrameAfterUndoRedo(); + } + } + return 1; +} + + +long +GNEApplicationWindow::onCmdRedo(FXObject*, FXSelector, void*) { + // redo needs a viewnet and a enabled redoLastChange menu command + if (myViewNet && myEditMenuCommands.redoLastChange->isEnabled()) { + myViewNet->getUndoList()->redo(); + // update current show frame after redo + if (myViewNet->getViewParent()->getCurrentShownFrame()) { + myViewNet->getViewParent()->getCurrentShownFrame()->updateFrameAfterUndoRedo(); + } + } + return 1; +} + + +long GNEApplicationWindow::onCmdSaveAsNetwork(FXObject*, FXSelector, void*) { FXString file = MFXUtils::getFilename2Write(this, "Save Network as", ".net.xml", @@ -1666,7 +2020,6 @@ OptionsCont& oc = OptionsCont::getOptions(); bool wasSet = oc.isSet("plain-output-prefix"); std::string oldPrefix = oc.getString("plain-output-prefix"); - oc.resetWritable(); std::string prefix = file.text(); // if the name of an edg.xml file was given, remove the suffix if (StringUtils::endsWith(prefix, ".edg.xml")) { @@ -1675,6 +2028,7 @@ if (StringUtils::endsWith(prefix, ".")) { prefix = prefix.substr(0, prefix.size() - 1); } + oc.resetWritable(); oc.set("plain-output-prefix", prefix); getApp()->beginWaitCursor(); try { @@ -1714,8 +2068,8 @@ OptionsCont& oc = OptionsCont::getOptions(); bool wasSet = oc.isSet("junctions.join-output"); std::string oldFile = oc.getString("junctions.join-output"); - oc.resetWritable(); std::string filename = file.text(); + oc.resetWritable(); oc.set("junctions.join-output", filename); getApp()->beginWaitCursor(); try { @@ -1742,76 +2096,45 @@ long -GNEApplicationWindow::onCmdSaveShapes(FXObject*, FXSelector, void*) { - // check if save shapes menu is enabled - if (mySaveShapesMenuCommand->isEnabled()) { - // Check if shapes file was already set at start of netedit or with a previous save - if (myShapesFile == "") { - FXString file = MFXUtils::getFilename2Write(this, - "Select name of the shape file", ".xml", - GUIIconSubSys::getIcon(ICON_MODEPOLYGON), - gCurrentFolder); - if (file == "") { - // None shapes file was selected, then stop function - return 0; - } else { - myShapesFile = file.text(); - } - } - getApp()->beginWaitCursor(); - try { - myNet->saveShapes(myShapesFile); - myMessageWindow->appendMsg(EVENT_MESSAGE_OCCURRED, "Shapes saved in " + myShapesFile + ".\n"); - mySaveShapesMenuCommand->disable(); - } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Error saving shapes'"); - // open error dialog box - FXMessageBox::error(this, MBOX_OK, "Saving POIs failed!", "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Error saving shapes' with 'OK'"); - } - myMessageWindow->addSeparator(); - getApp()->endWaitCursor(); - return 1; - } else { - return 0; - } +GNEApplicationWindow::onUpdNeedsNetwork(FXObject* sender, FXSelector, void*) { + sender->handle(this, myNet == nullptr ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), nullptr); + return 1; } -long GNEApplicationWindow::onCmdSaveShapesAs(FXObject*, FXSelector, void*) { - // Open window to select shape file - FXString file = MFXUtils::getFilename2Write(this, - "Select name of the shape file", ".xml", - GUIIconSubSys::getIcon(ICON_MODEPOLYGON), - gCurrentFolder); - if (file != "") { - // Set new shape file - myShapesFile = file.text(); - // save shapes - return onCmdSaveShapes(nullptr, 0, nullptr); - } else { - return 1; - } +long +GNEApplicationWindow::onUpdReload(FXObject* sender, FXSelector, void*) { + sender->handle(this, ((myNet == nullptr) || !OptionsCont::getOptions().isSet("sumo-net-file")) ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), nullptr); + return 1; } - long -GNEApplicationWindow::onUpdNeedsNetwork(FXObject* sender, FXSelector, void*) { - sender->handle(this, myNet == nullptr ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), nullptr); +GNEApplicationWindow::onUpdSaveAdditionals(FXObject* sender, FXSelector, void*) { + sender->handle(this, ((myNet == nullptr) || myNet->isAdditionalsSaved()) ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), nullptr); return 1; } long -GNEApplicationWindow::onUpdReload(FXObject* sender, FXSelector, void*) { - sender->handle(this, myNet == nullptr || !OptionsCont::getOptions().isSet("sumo-net-file") ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), nullptr); +GNEApplicationWindow::onUpdSaveDemandElements(FXObject* sender, FXSelector, void*) { + sender->handle(this, ((myNet == nullptr) || myNet->isDemandElementsSaved()) ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), nullptr); return 1; } long +GNEApplicationWindow::onUpdUndo(FXObject* obj, FXSelector sel, void* ptr) { + return myUndoList->p_onUpdUndo(obj, sel, ptr); +} + + +long +GNEApplicationWindow::onUpdRedo(FXObject* obj, FXSelector sel, void* ptr) { + return myUndoList->p_onUpdRedo(obj, sel, ptr); +} + + +long GNEApplicationWindow::onCmdSaveNetwork(FXObject*, FXSelector, void*) { OptionsCont& oc = OptionsCont::getOptions(); // function onCmdSaveAsNetwork must be executed if this is the first save @@ -1833,7 +2156,7 @@ } myMessageWindow->appendMsg(EVENT_MESSAGE_OCCURRED, "Network saved in " + oc.getString("output-file") + ".\n"); // After saveing a net sucesfully, add it into Recent Nets list. - myRecentNets.appendFile(oc.getString("output-file").c_str()); + myMenuBarFile.myRecentNets.appendFile(oc.getString("output-file").c_str()); myMessageWindow->addSeparator(); getApp()->endWaitCursor(); return 1; @@ -1843,10 +2166,12 @@ long GNEApplicationWindow::onCmdSaveAdditionals(FXObject*, FXSelector, void*) { + // obtain option container + OptionsCont& oc = OptionsCont::getOptions(); // check if save additional menu is enabled - if (mySaveAdditionalsMenuCommand->isEnabled()) { + if (myFileMenuCommands.saveAdditionals->isEnabled()) { // Check if additionals file was already set at start of netedit or with a previous save - if (myAdditionalsFile == "") { + if (oc.getString("additional-files").empty()) { FXString file = MFXUtils::getFilename2Write(this, "Select name of the additional file", ".xml", GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), @@ -1855,15 +2180,17 @@ // None additionals file was selected, then stop function return 0; } else { - myAdditionalsFile = file.text(); + // change value of "additional-files" + oc.resetWritable(); + oc.set("additional-files", file.text()); } } // Start saving additionals getApp()->beginWaitCursor(); try { - myNet->saveAdditionals(myAdditionalsFile); - myMessageWindow->appendMsg(EVENT_MESSAGE_OCCURRED, "Additionals saved in " + myAdditionalsFile + ".\n"); - mySaveAdditionalsMenuCommand->disable(); + myNet->saveAdditionals(oc.getString("additional-files")); + myMessageWindow->appendMsg(EVENT_MESSAGE_OCCURRED, "Additionals saved in " + oc.getString("additional-files") + ".\n"); + myFileMenuCommands.saveAdditionals->disable(); } catch (IOError& e) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'error saving additionals'"); @@ -1883,14 +2210,14 @@ long GNEApplicationWindow::onCmdSaveAdditionalsAs(FXObject*, FXSelector, void*) { - // Open window to select additionasl file + // Open window to select additional file FXString file = MFXUtils::getFilename2Write(this, "Select name of the additional file", ".xml", GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), gCurrentFolder); if (file != "") { - // Set new additional file - myAdditionalsFile = file.text(); + // change value of "additional-files" + OptionsCont::getOptions().set("additional-files", file.text()); // save additionals return onCmdSaveAdditionals(nullptr, 0, nullptr); } else { @@ -1901,27 +2228,31 @@ long GNEApplicationWindow::onCmdSaveTLSPrograms(FXObject*, FXSelector, void*) { + // obtain option container + OptionsCont& oc = OptionsCont::getOptions(); // check if save additional menu is enabled - if (mySaveTLSProgramsMenuCommand->isEnabled()) { + if (myFileMenuCommands.saveTLSPrograms->isEnabled()) { // Check if TLS Programs file was already set at start of netedit or with a previous save - if (myTLSProgramsFile == "") { + if (oc.getString("TLSPrograms-output").empty()) { FXString file = MFXUtils::getFilename2Write(this, - "Select name of the additional file", ".xml", + "Select name of the TLS file", ".xml", GUIIconSubSys::getIcon(ICON_MODETLS), gCurrentFolder); if (file == "") { // None TLS Programs file was selected, then stop function return 0; } else { - myTLSProgramsFile = file.text(); + // change value of "TLSPrograms-output" + oc.resetWritable(); + oc.set("TLSPrograms-output", file.text()); } } // Start saving TLS Programs getApp()->beginWaitCursor(); try { - myNet->saveTLSPrograms(myTLSProgramsFile); - myMessageWindow->appendMsg(EVENT_MESSAGE_OCCURRED, "TLS Programs saved in " + myTLSProgramsFile + ".\n"); - mySaveTLSProgramsMenuCommand->disable(); + myNet->saveTLSPrograms(oc.getString("TLSPrograms-output")); + myMessageWindow->appendMsg(EVENT_MESSAGE_OCCURRED, "TLS Programs saved in " + oc.getString("TLSPrograms-output") + ".\n"); + myFileMenuCommands.saveTLSPrograms->disable(); } catch (IOError& e) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'error saving TLS Programs'"); @@ -1947,8 +2278,8 @@ GUIIconSubSys::getIcon(ICON_MODETLS), gCurrentFolder); if (file != "") { - // Set new TLS Program file - myTLSProgramsFile = file.text(); + // change value of "TLSPrograms-files" + OptionsCont::getOptions().set("TLSPrograms-output", file.text()); // save TLS Programs return onCmdSaveTLSPrograms(nullptr, 0, nullptr); } else { @@ -1958,6 +2289,68 @@ long +GNEApplicationWindow::onCmdSaveDemandElements(FXObject*, FXSelector, void*) { + // obtain option container + OptionsCont& oc = OptionsCont::getOptions(); + // check if save demand element menu is enabled + if (myFileMenuCommands.saveDemandElements->isEnabled()) { + // Check if demand elements file was already set at start of netedit or with a previous save + if (oc.getString("route-files").empty()) { + FXString file = MFXUtils::getFilename2Write(this, + "Select name of the demand element file", ".xml", + GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), + gCurrentFolder); + if (file == "") { + // None demand elements file was selected, then stop function + return 0; + } else { + // change value of "route-files" + oc.resetWritable(); + oc.set("route-files", file.text()); + } + } + // Start saving demand elements + getApp()->beginWaitCursor(); + try { + myNet->saveDemandElements(oc.getString("route-files")); + myMessageWindow->appendMsg(EVENT_MESSAGE_OCCURRED, "Demand elements saved in " + oc.getString("route-files") + ".\n"); + myFileMenuCommands.saveDemandElements->disable(); + } catch (IOError& e) { + // write warning if netedit is running in testing mode + WRITE_DEBUG("Opening FXMessageBox 'error saving demand elements'"); + // open error message box + FXMessageBox::error(this, MBOX_OK, "Saving demand elements failed!", "%s", e.what()); + // write warning if netedit is running in testing mode + WRITE_DEBUG("Closed FXMessageBox 'error saving demand elements' with 'OK'"); + } + myMessageWindow->addSeparator(); + getApp()->endWaitCursor(); + return 1; + } else { + return 0; + } +} + + +long +GNEApplicationWindow::onCmdSaveDemandElementsAs(FXObject*, FXSelector, void*) { + // Open window to select additionasl file + FXString file = MFXUtils::getFilename2Write(this, + "Select name of the demand element file", ".xml", + GUIIconSubSys::getIcon(ICON_SUPERMODEDEMAND), + gCurrentFolder); + if (file != "") { + // change value of "route-files" + OptionsCont::getOptions().set("route-files", file.text()); + // save demand elements + return onCmdSaveDemandElements(nullptr, 0, nullptr); + } else { + return 1; + } +} + + +long GNEApplicationWindow::onUpdSaveNetwork(FXObject* sender, FXSelector, void*) { OptionsCont& oc = OptionsCont::getOptions(); bool enable = myNet != nullptr && oc.isSet("output-file"); @@ -1970,20 +2363,10 @@ } -GNEViewNet* -GNEApplicationWindow::getView() { - if (!myGLWindows.empty()) { - return dynamic_cast(myGLWindows[0]->getView()); - } else { - return nullptr; - } -} - - bool GNEApplicationWindow::continueWithUnsavedChanges() { FXuint answer = 0; - if (myNet && !myNet->isNetSaved()) { + if (myViewNet && myNet && !myNet->isNetSaved()) { // write warning if netedit is running in testing mode WRITE_DEBUG("Opening FXMessageBox 'Confirm closing network'"); // open question box @@ -1991,12 +2374,12 @@ "Confirm closing Network", "%s", "You have unsaved changes in the network. Do you wish to quit and discard all changes?"); // restore focus to view net - getView()->setFocus(); + myViewNet->setFocus(); // if user close dialog box, check additionasl and shapes if (answer == MBOX_CLICKED_QUIT) { // write warning if netedit is running in testing mode WRITE_DEBUG("Closed FXMessageBox 'Confirm closing network' with 'Quit'"); - if (continueWithUnsavedAdditionalChanges() && continueWithUnsavedShapeChanges()) { + if (continueWithUnsavedAdditionalChanges()) { // clear undo list and return true to continue with closing/reload myUndoList->p_clear(); return true; @@ -2010,7 +2393,7 @@ // saving failed return false; } - if (continueWithUnsavedAdditionalChanges() && continueWithUnsavedShapeChanges()) { + if (continueWithUnsavedAdditionalChanges()) { // clear undo list and return true to continue with closing/reload myUndoList->p_clear(); return true; @@ -2028,7 +2411,7 @@ return false; } } else { - if (continueWithUnsavedAdditionalChanges() && continueWithUnsavedShapeChanges()) { + if (continueWithUnsavedAdditionalChanges()) { // clear undo list and return true to continue with closing/reload myUndoList->p_clear(); //only ask once return true; @@ -2043,14 +2426,14 @@ bool GNEApplicationWindow::continueWithUnsavedAdditionalChanges() { // Check if there are non saved additionals - if (mySaveAdditionalsMenuCommand->isEnabled()) { + if (myViewNet && myFileMenuCommands.saveAdditionals->isEnabled()) { WRITE_DEBUG("Opening FXMessageBox 'Save additionals before exit'"); // open question box FXuint answer = FXMessageBox::question(getApp(), MBOX_QUIT_SAVE_CANCEL, "Save additionals before exit", "%s", "You have unsaved additionals. Do you wish to quit and discard all changes?"); // restore focus to view net - getView()->setFocus(); + myViewNet->setFocus(); // if answer was affirmative, but there was an error during saving additional, return false to stop closing/reloading if (answer == MBOX_CLICKED_QUIT) { WRITE_DEBUG("Closed FXMessageBox 'Save additionals before exit' with 'Quit'"); @@ -2083,57 +2466,64 @@ } -bool -GNEApplicationWindow::continueWithUnsavedShapeChanges() { - // Check if there are non saved additionals - if (mySaveShapesMenuCommand->isEnabled()) { - WRITE_DEBUG("Opening FXMessageBox 'Save shapes before exit'"); - // open question box - FXuint answer = FXMessageBox::question(getApp(), MBOX_QUIT_SAVE_CANCEL, - "Save shapes before exit", "%s", - "You have unsaved shapes. Do you wish to quit and discard all changes?"); - // restore focus to view net - getView()->setFocus(); - // if answer was affirmative, but there was an error during saving additional, return false to stop closing/reloading - if (answer == MBOX_CLICKED_QUIT) { - WRITE_DEBUG("Closed FXMessageBox 'Save shapes before exit' with 'Quit'"); - return true; - } else if (answer == MBOX_CLICKED_SAVE) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Save shapes before exit' with 'Yes'"); - if (onCmdSaveShapes(nullptr, 0, nullptr) == 1) { - // shapes sucesfully saved - return true; - } else { - // error saving shapes, abort saving - return false; - } - } else { - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Save shapes before exit' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Save shapes before exit' with 'ESC'"); - } - // abort saving - return false; - } - } else { - // nothing to save, then return true - return true; +void +GNEApplicationWindow::updateControls() { + // check that view exists + if (myViewNet) { + myViewNet->updateControls(); } } void -GNEApplicationWindow::updateControls() { - GNEViewNet* view = getView(); - if (view != nullptr) { - view->updateControls(); +GNEApplicationWindow::updateSuperModeMenuCommands(int supermode) { + // cast supermode + Supermode currentSupermode = static_cast(supermode); + if (currentSupermode == Supermode::GNE_SUPERMODE_NETWORK) { + myNetworkMenuCommands.showNetworkMenuCommands(); + myDemandMenuCommands.hideDemandMenuCommands(); + } else if (currentSupermode == Supermode::GNE_SUPERMODE_DEMAND) { + myNetworkMenuCommands.hideNetworkMenuCommands(); + myDemandMenuCommands.showDemandMenuCommands(); + } else { + myNetworkMenuCommands.hideNetworkMenuCommands(); + myDemandMenuCommands.hideDemandMenuCommands(); } } +void +GNEApplicationWindow::disableUndoRedo(const std::string& reason) { + myUndoRedoListEnabled = reason; +} + + +void +GNEApplicationWindow::enableUndoRedo() { + myUndoRedoListEnabled.clear(); +} + + +const std::string& +GNEApplicationWindow::isUndoRedoEnabled() const { + return myUndoRedoListEnabled; +} + +// --------------------------------------------------------------------------- +// GNEApplicationWindow - protected methods +// --------------------------------------------------------------------------- + +GNEApplicationWindow::GNEApplicationWindow() : + myToolbarsGrip(this), + myMenuBarFile(this), + myFileMenuCommands(this), + myEditMenuCommands(this), + mySupermodeCommands(this), + myNetworkMenuCommands(this), + myDemandMenuCommands(this) { +} + + long GNEApplicationWindow::onKeyPress(FXObject* o, FXSelector sel, void* eventData) { const long handled = FXMainWindow::onKeyPress(o, sel, eventData); @@ -2159,35 +2549,4 @@ return 0; } -// --------------------------------------------------------------------------- -// GNEApplicationWindow::GNEShapeHandler - methods -// --------------------------------------------------------------------------- - -GNEApplicationWindow::GNEShapeHandler::GNEShapeHandler(const std::string& file, GNENet* net) : - ShapeHandler(file, *net), - myNet(net) {} - - -GNEApplicationWindow::GNEShapeHandler::~GNEShapeHandler() {} - - -Position -GNEApplicationWindow::GNEShapeHandler::getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat) { - std::string edgeID; - int laneIndex; - NBHelpers::interpretLaneID(laneID, edgeID, laneIndex); - NBEdge* edge = myNet->retrieveEdge(edgeID)->getNBEdge(); - if (edge == nullptr || laneIndex < 0 || edge->getNumLanes() <= laneIndex) { - WRITE_ERROR("Lane '" + laneID + "' to place poi '" + poiID + "' on is not known."); - return Position::INVALID; - } - if (lanePos < 0) { - lanePos = edge->getLength() + lanePos; - } - if (lanePos < 0 || lanePos > edge->getLength()) { - WRITE_WARNING("lane position " + toString(lanePos) + " for poi '" + poiID + "' is not valid."); - } - return edge->getLanes()[laneIndex].shape.positionAtOffset(lanePos, -lanePosLat); -} - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEApplicationWindow.h sumo-1.2.0+dfsg1/src/netedit/GNEApplicationWindow.h --- sumo-1.1.0+dfsg1/src/netedit/GNEApplicationWindow.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEApplicationWindow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,8 +24,8 @@ #include #include +#include #include -#include #include #include #include @@ -61,35 +61,55 @@ FXDECLARE(GNEApplicationWindow) public: - /** - * @class GNEShapeHandler - * @brief The XML-Handler for shapes loading network loading - * - * This subclasses ShapeHandler with netbuild specific function - */ - class GNEShapeHandler : public ShapeHandler { - public: - /**@brief Constructor - * @param[in] file file with the shapes - * @param[in] net network in which add shapes - */ - GNEShapeHandler(const std::string& file, GNENet* net); - - /// @brief Destructor - ~GNEShapeHandler(); - - /**@brief get lane position - * @param[in] poi poi ID - * @param[in] laneID lane ID - * @param[in] SlanePos position in the lane - */ - Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat); + /// @brief struct for griped toolbars + struct ToolbarsGrip { + + /// @brief constructor + ToolbarsGrip(GNEApplicationWindow* GNEApp); + + /// @brief build menu toolbar grips + void buildMenuToolbarsGrip(); + + /// @brief build toolbars grips + void buildViewParentToolbarsGrips(); + + /// @brief build toolbars grips + void destroyParentToolbarsGrips(); + + /// @brief The application menu bar (for file, edit, processing...) + FXMenuBar* menu; + + /// @brief The application menu bar for supermodes (network and demand) + FXMenuBar* superModes; + + /// @brief The application menu bar for navigation (zoom, coloring...) + FXMenuBar* navigation; + + /// @brief The application menu bar (for select, inspect...) + FXMenuBar* modes; + + /// @brief The application menu bar for mode options (show connections, select edges...) + FXMenuBar* modeOptions; private: - /// @brief pointer of the net - GNENet* myNet; - }; + /// @brief pointer to current GNEApplicationWindow + GNEApplicationWindow* myGNEApp; + + /// @brief menu bar drag (for file, edit, processing...) + FXToolBarShell* myToolBarShellMenu; + /// @brief menu bar drag for modes (network and demand) + FXToolBarShell* myToolBarShellSuperModes; + + /// @brief menu bar drag for navigation (Zoom, coloring...) + FXToolBarShell* myToolBarShellNavigation; + + /// @brief menu bar drag for modes (select, inspect, delete...) + FXToolBarShell* myToolBarShellModes; + + /// @brief menu bar drag for mode options(show connections, select edges...) + FXToolBarShell* myToolBarShellModeOptions; + }; /**@brief Constructor * @param[in] a The FOX application @@ -98,13 +118,10 @@ GNEApplicationWindow(FXApp* a, const std::string& configPattern); /// @brief Destructor - virtual ~GNEApplicationWindow(); + ~GNEApplicationWindow(); /// @brief Creates the main window (required by FOX) - virtual void create(); - - /// @brief detaches the tool/menu bar - virtual void detach(); + void create(); /// @brief load net on startup void loadOptionOnStartup(); @@ -115,34 +132,25 @@ /// @brief set text of the statusBar void setStatusBarText(const std::string& statusBarText); - /// @brief set additionals file - void setAdditionalsFile(const std::string& additionalsFile); - - /// @brief set shapes file - void setShapesFile(const std::string& shapesFile); - - /// @brief set TLS Programs file - void setTLSProgramsFile(const std::string& TLSProgramsFile); - /// @brief enable save additionals void enableSaveAdditionalsMenu(); /// @brief disable save additionals void disableSaveAdditionalsMenu(); - /// @brief enable save shapes - void enableSaveShapesMenu(); - - /// @brief disable save shapes - void disableSaveShapesMenu(); - /// @brief enable save TLS Programs void enableSaveTLSProgramsMenu(); + /// @brief enable save demand elements + void enableSaveDemandElementsMenu(); + + /// @brief disable save demand elements + void disableSaveDemandElementsMenu(); + /// @name Inter-thread event handling /// @{ /// @brief called when an event occurred - virtual void eventOccurred(); + void eventOccurred(); /// @brief handle event of type Network loaded void handleEvent_NetworkLoaded(GUIEvent* e); @@ -165,15 +173,15 @@ /// @brief called when the command/FXCall open foreign is executed long onCmdOpenForeign(FXObject*, FXSelector, void*); - /// @brief called when the command/FXCall open shapes is executed - long onCmdOpenShapes(FXObject*, FXSelector, void*); - /// @brief called when the command/FXCall open additionals is executed long onCmdOpenAdditionals(FXObject*, FXSelector, void*); /// @brief called when the command/FXCall open additionals is executed long onCmdOpenTLSPrograms(FXObject*, FXSelector, void*); + /// @brief called when the command/FXCall open demand is executed + long onCmdOpenDemandElements(FXObject*, FXSelector, void*); + /// @brief called when the command/FXCall reload is executed long onCmdReload(FXObject*, FXSelector, void*); @@ -207,30 +215,42 @@ /// @brief called when the command/FXCall save TLSPrograms as is executed long onCmdSaveTLSProgramsAs(FXObject*, FXSelector, void*); + /// @brief called when the command/FXCall save demand elements is executed + long onCmdSaveDemandElements(FXObject*, FXSelector, void*); + + /// @brief called when the command/FXCall save demand elements as is executed + long onCmdSaveDemandElementsAs(FXObject*, FXSelector, void*); + /// @brief called when the update/FXCall save network is executed long onUpdSaveNetwork(FXObject*, FXSelector, void*); /// @brief called when the command/FXCall save network as is executed long onCmdSaveAsNetwork(FXObject*, FXSelector, void*); - /// @brief called when the upadte/FXCall needs network is executed + /// @brief called when the update/FXCall needs network is executed long onUpdNeedsNetwork(FXObject*, FXSelector, void*); /// @brief called when the update/FXCall reload is executed long onUpdReload(FXObject*, FXSelector, void*); + /// @brief called when the update/FXCall save additionals is executed + long onUpdSaveAdditionals(FXObject*, FXSelector, void*); + + /// @brief called when the update/FXCall save demand elements is executed + long onUpdSaveDemandElements(FXObject*, FXSelector, void*); + + /// @brief called when the update/FXCall undo is executed + long onUpdUndo(FXObject* obj, FXSelector sel, void* ptr); + + /// @brief called when the update/FXCall redo is executed + long onUpdRedo(FXObject* obj, FXSelector sel, void* ptr); + /// @brief called when the command/FXCall save as plain xml is executed long onCmdSaveAsPlainXML(FXObject*, FXSelector, void*); /// @brief called when the command/FXCall save joined is executed long onCmdSaveJoined(FXObject*, FXSelector, void*); - /// @brief called when the command/FXCall save shapes is executed - long onCmdSaveShapes(FXObject*, FXSelector, void*); - - /// @brief called when the command/FXCall save shapes as is executed - long onCmdSaveShapesAs(FXObject*, FXSelector, void*); - /// @brief called when a key is pressed long onKeyPress(FXObject* o, FXSelector sel, void* data); @@ -245,18 +265,9 @@ /// @brief called when the command/FXCall edit chosen is executed long onCmdEditChosen(FXObject*, FXSelector, void*); - /// @brief Opens the application settings menu - long onCmdAppSettings(FXObject*, FXSelector, void*); - - /// @brief called when the command/FXCall toogle gaming mode is executed - long onCmdGaming(FXObject*, FXSelector, void*); - /// @brief called when the command/FXCall show about dialog is executed long onCmdAbout(FXObject*, FXSelector, void*); - /// @brief called when the command/FXCall new view is executed - long onCmdNewView(FXObject*, FXSelector, void*); - /// @brief called when the command/FXCall on update open executed long onUpdOpen(FXObject*, FXSelector, void*); @@ -269,6 +280,9 @@ /// @brief called when the command/FXCall clipboard request is executed long onClipboardRequest(FXObject* sender, FXSelector sel, void* ptr); + /// @brief called if the user hits an edit-supermode hotkey + long onCmdSetSuperMode(FXObject* sender, FXSelector sel, void* ptr); + /// @brief called if the user hits an edit-mode hotkey long onCmdSetMode(FXObject* sender, FXSelector sel, void* ptr); @@ -290,6 +304,21 @@ /// @brief called if the user press key combination Ctrl + G to toogle grid long onCmdToogleGrid(FXObject*, FXSelector, void*); + /// @brief called if the user press key combination Ctrl + Shift + C to toogle show connections + long onCmdToogleShowConnections(FXObject*, FXSelector, void*); + + /// @brief called if the user press key combination Ctrl + Shift + H to toogle elevation + long onCmdToogleElevation(FXObject*, FXSelector, void*); + + /// @brief called if the user press key combination Ctrl + Shift + I to toogle select edges + long onCmdToogleSelectEdges(FXObject*, FXSelector, void*); + + /// @brief called if the user press key combination Ctrl + Shift + J to toogle chain mode + long onCmdToogleChain(FXObject*, FXSelector, void*); + + /// @brief called if the user press key combination Ctrl + Shift + K to toogle two way + long onCmdToogleTwoWay(FXObject*, FXSelector, void*); + /// @brief called if the user selects help->Documentation long onCmdHelp(FXObject* sender, FXSelector sel, void* ptr); @@ -310,15 +339,25 @@ /// @brief called if the user selects Processing->Configure Options long onCmdOptions(FXObject*, FXSelector, void*); + + /// @brief called when user press Ctrl+Z + long onCmdUndo(FXObject*, FXSelector, void*); + + // @brief called when user press Ctrl+Y + long onCmdRedo(FXObject*, FXSelector, void*); /// @} - /// @brief get build OpenGL Canvas + /// @name inherited from GUIMainWindow + /// @{ + /// @brief get build OpenGL Canvas (due NETEDIT only uses a single View, it always return nullptr) FXGLCanvas* getBuildGLCanvas() const; /// @brief get current simulation time (pure virtual but we don't need it) SUMOTime getCurrentSimTime() const; + /// @brief get current tracker interval (pure virtual but we don't need it) double getTrackerInterval() const; + /// @} /// @brief get default cursor FXCursor* getDefaultCursor(); @@ -326,33 +365,39 @@ /// @brief get pointer to undoList GNEUndoList* getUndoList(); + /// @brief get ToolbarsGrip + ToolbarsGrip& getToolbarsGrip(); + /// @brief update control contents after undo/redo or recompute void updateControls(); -protected: - /// @brief FOX needs this for static members - GNEApplicationWindow() {} + /// @brief update FXMenuCommands + void updateSuperModeMenuCommands(int supermode); - /// @brief Builds the menu bar - virtual void fillMenuBar(); + /// @brief disable undo-redo giving a string with the reason + void disableUndoRedo(const std::string& reason); - /// @brief the name of the simulation - std::string myName; + /// @brief disable undo-redo + void enableUndoRedo(); + + /// @brief check if undo-redo is enabled + const std::string& isUndoRedoEnabled() const; + +protected: + /// @brief FOX needs this for static members + GNEApplicationWindow(); /// @brief the thread that loads the network GNELoadThread* myLoadThread; - /// @brief The current view number - int myViewNumber; - /// @brief information whether the gui is currently loading and the load-options shall be greyed out bool myAmLoading; /// @brief the submenus FXMenuPane* myFileMenu, - *myFileMenuShapes, *myFileMenuAdditionals, *myFileMenuTLS, + *myFileMenuDemandElements, *myEditMenu, *myProcessingMenu, *myLocatorMenu, @@ -365,35 +410,12 @@ /// @brief The splitter that divides the main window into view and the log window FXSplitter* myMainSplitter; - /// @brief for some menu detaching fun - FXToolBarShell* myToolBarDrag1, *myToolBarDrag2, *myToolBarDrag3, - *myToolBarDrag4, *myToolBarDrag5, - *myMenuBarDrag; - /// @brief List of got requests - MFXEventQue myEvents; - - /// @brief The menu used for the MDI-windows - FXMDIMenu* myMDIMenu; - - /// @brief The application menu bar - FXMenuBar* myMenuBar; - - /// @brief The application tool bar - FXToolBar* myToolBar1, *myToolBar2, *myToolBar3, *myToolBar4, *myToolBar5; + FXSynchQue myEvents; /// @brief io-event with the load-thread FXEX::FXThreadEvent myLoadThreadEvent; - /// @brief List of recent config files - FXRecentFiles myRecentConfigs; - - /// @brief List of recent nets - FXRecentFiles myRecentNets; - - /// @brief Input file pattern - std::string myConfigPattern; - /// @brief check if had dependent build bool hadDependentBuild; @@ -403,33 +425,249 @@ /// @brief the one and only undo list GNEUndoList* myUndoList; - /// @brief the prefix for the window title - const FXString myTitlePrefix; + /// @brief Input file pattern + std::string myConfigPattern; - /// @brief filename for load/save additionals - std::string myAdditionalsFile; + /// @brief string to check if undo/redo list is enabled (a String is used to keep the disabling reason) + std::string myUndoRedoListEnabled; - /// @brief filename for load/save shapes - std::string myShapesFile; +private: + /// @brief struct for menu bar file + struct MenuBarFile { - /// @brief filename for load/save TLS Programs - std::string myTLSProgramsFile; + /// @brief constructor + MenuBarFile(GNEApplicationWindow* GNEApp); -private: - /// @brief FXMenuCommand for enable or disable save additionals - FXMenuCommand* mySaveAdditionalsMenuCommand; + /// @brief build recent files + void buildRecentFiles(FXMenuPane* fileMenu); + + /// @brief List of recent config files + FXRecentFiles myRecentConfigs; + + /// @brief List of recent nets + FXRecentFiles myRecentNets; + + private: + /// @brief pointer to current GNEApplicationWindow + GNEApplicationWindow* myGNEApp; + }; + + /// @brief struct for File menu commands + struct FileMenuCommands { + + /// @brief constructor + FileMenuCommands(GNEApplicationWindow* GNEApp); + + /// @brief build menu commands + void buildFileMenuCommands(FXMenuPane* editMenu); - /// @brief FXMenuCommand for enable or disable save additionals As - FXMenuCommand* mySaveAdditionalsMenuCommandAs; + /// @brief FXMenuCommand for enable or disable save additionals + FXMenuCommand* saveAdditionals; - /// @brief FXMenuCommand for enable or disable save shapes - FXMenuCommand* mySaveShapesMenuCommand; + /// @brief FXMenuCommand for enable or disable save additionals As + FXMenuCommand* saveAdditionalsAs; - /// @brief FXMenuCommand for enable or disable save shapes - FXMenuCommand* mySaveShapesMenuCommandAs; + /// @brief FXMenuCommand for enable or disable save additionals + FXMenuCommand* saveTLSPrograms; - /// @brief FXMenuCommand for enable or disable save additionals - FXMenuCommand* mySaveTLSProgramsMenuCommand; + /// @brief FXMenuCommand for enable or disable save demand elements + FXMenuCommand* saveDemandElements; + + /// @brief FXMenuCommand for enable or disable save demand elements as + FXMenuCommand* saveDemandElementsAs; + + private: + /// @brief pointer to current GNEApplicationWindows + GNEApplicationWindow* myGNEApp; + }; + + /// @brief struct for File menu commands + struct EditMenuCommands { + + /// @brief constructor + EditMenuCommands(GNEApplicationWindow* GNEApp); + + /// @brief build edit menu commands + void buildEditMenuCommands(FXMenuPane* editMenu); + + /// @brief FXMenuCommand for undo last change + FXMenuCommand* undoLastChange; + + /// @brief FXMenuCommand for redo last change + FXMenuCommand* redoLastChange; + + /// @brief FXMenuCommand for edit view scheme + FXMenuCommand* editViewScheme; + + /// @brief FXMenuCommand for edit view port + FXMenuCommand* editViewPort; + + /// @brief FXMenuCommand for toogle grid + FXMenuCommand* toogleGrid; + + /// @brief FXMenuCommand for open in SUMO GUI + FXMenuCommand* openInSUMOGUI; + + private: + /// @brief pointer to current GNEApplicationWindows + GNEApplicationWindow* myGNEApp; + }; + + /// @brief struct for supermode commands + struct SupermodeCommands { + + /// @brief constructor + SupermodeCommands(GNEApplicationWindow* GNEApp); + + /// @brief build menu commands + void buildSupermodeCommands(FXMenuPane* editMenu); + + /// @brief show all menu commands + void showSupermodeCommands(); + + /// @brief hide all menu commands + void hideSupermodeCommands(); + + /// @brief FXMenuCommand for network supermode + FXMenuCommand* networkMode; + + /// @brief FXMenuCommand for demand supermode + FXMenuCommand* demandMode; + + private: + /// @brief pointer to current GNEApplicationWindows + GNEApplicationWindow* myGNEApp; + + /// @brief separator between sets of FXMenuCommand + FXMenuSeparator* myHorizontalSeparator; + }; + + /// @brief struct for network menu commands + struct NetworkMenuCommands { + + /// @brief constructor + NetworkMenuCommands(GNEApplicationWindow* GNEApp); + + /// @brief build menu commands + void buildNetworkMenuCommands(FXMenuPane* editMenu); + + /// @brief show all menu commands + void showNetworkMenuCommands(); + + /// @brief hide all menu commands + void hideNetworkMenuCommands(); + + /// @brief menu command for create edge + FXMenuCommand* createEdgeMode; + + /// @brief menu command for move mode + FXMenuCommand* moveMode; + + /// @brief menu command for delete mode + FXMenuCommand* deleteMode; + + /// @brief menu command for inspect mode + FXMenuCommand* inspectMode; + + /// @brief menu command for select mode + FXMenuCommand* selectMode; + + /// @brief menu command for connect mode + FXMenuCommand* connectMode; + + /// @brief menu command for prohibition mode + FXMenuCommand* prohibitionMode; + + /// @brief menu command for TLS Mode + FXMenuCommand* TLSMode; + + /// @brief menu command for additional mode + FXMenuCommand* additionalMode; + + /// @brief menu command for crossing mode + FXMenuCommand* crossingMode; + + /// @brief menu command for TAZ mode + FXMenuCommand* TAZMode; + + /// @brief menu command for shape mode + FXMenuCommand* shapeMode; + + private: + /// @brief pointer to current GNEApplicationWindows + GNEApplicationWindow* myGNEApp; + + /// @brief separator between sets of FXMenuCommand + FXMenuSeparator* myHorizontalSeparator; + }; + + /// @brief struct for Demand menu commands + struct DemandMenuCommands { + + /// @brief constructor + DemandMenuCommands(GNEApplicationWindow* GNEApp); + + /// @brief build menu commands + void buildDemandMenuCommands(FXMenuPane* editMenu); + + /// @brief show all menu commands + void showDemandMenuCommands(); + + /// @brief hide all menu commands + void hideDemandMenuCommands(); + + /// @brief menu command for route mode + FXMenuCommand* routeMode; + + /// @brief menu command for vehicle mode + FXMenuCommand* vehicleMode; + + /// @brief menu command for vehicle type mode + FXMenuCommand* vehicleTypeMode; + + /// @brief menu command for stop mode + FXMenuCommand* stopMode; + + private: + /// @brief pointer to current GNEApplicationWindows + GNEApplicationWindow* myGNEApp; + + /// @brief separator between sets of FXMenuCommand + FXMenuSeparator* myHorizontalSeparator; + }; + + /// @brief Toolbars Grip + ToolbarsGrip myToolbarsGrip; + + /// @brief MenuBarFile + MenuBarFile myMenuBarFile; + + /// @brief File Menu Commands + FileMenuCommands myFileMenuCommands; + + /// @brief Edit Menu Commands + EditMenuCommands myEditMenuCommands; + + /// @brief Supermode Commands + SupermodeCommands mySupermodeCommands; + + /// @brief Network Menu Commands + NetworkMenuCommands myNetworkMenuCommands; + + /// @brief Demand Menu Commands + DemandMenuCommands myDemandMenuCommands; + + /// @brief pointer to current view net + GNEViewNet* myViewNet; + + /// @brief the prefix for the window title + const FXString myTitlePrefix; + + /// @brief The menu used for the MDI-windows + FXMDIMenu* myMDIMenu; + + /// @brief Builds the menu bar + void fillMenuBar(); /// @brief starts to load a netimport configuration or a network */ void loadConfigOrNet(const std::string file, bool isNet, bool isReload = false, bool useStartupOptions = false, bool newNet = false); @@ -437,20 +675,11 @@ /// @brief this method closes all windows and deletes the current simulation */ void closeAllWindows(); - /// @brief opens a new simulation display - GUISUMOAbstractView* openNewView(); - - /// @brief convenience method - GNEViewNet* getView(); - /// @brief warns about unsaved changes and gives the user the option to abort bool continueWithUnsavedChanges(); /// @brief warns about unsaved changes in additionals and gives the user the option to abort bool continueWithUnsavedAdditionalChanges(); - - /// @brief warns about unsaved changes in shapes and gives the user the option to abort - bool continueWithUnsavedShapeChanges(); }; diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEAttributeCarrier.cpp sumo-1.2.0+dfsg1/src/netedit/GNEAttributeCarrier.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEAttributeCarrier.cpp 2018-12-17 23:00:33.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEAttributeCarrier.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -42,6 +42,7 @@ const std::string GNEAttributeCarrier::FEATURE_GUESSED = "guessed"; const std::string GNEAttributeCarrier::FEATURE_MODIFIED = "modified"; const std::string GNEAttributeCarrier::FEATURE_APPROVED = "approved"; +const double GNEAttributeCarrier::INVALID_POSITION(-1000000); // =========================================================================== @@ -53,6 +54,9 @@ // --------------------------------------------------------------------------- GNEAttributeCarrier::AttributeProperties::AttributeProperties() : + myAttribute(SUMO_ATTR_NOTHING), + myTagPropertyParent(nullptr), + myAttrStr(toString(SUMO_ATTR_NOTHING)), myAttributeProperty(ATTRPROPERTY_STRING), myPositionListed(0), myDefinition(""), @@ -62,27 +66,33 @@ myMaximumRange(0) {} -GNEAttributeCarrier::AttributeProperties::AttributeProperties(int attributeProperty, int positionListed, const std::string& definition, const std::string& defaultValue, const std::vector& discreteValues, SumoXMLAttr synonym, double minimum, double maximum) : +GNEAttributeCarrier::AttributeProperties::AttributeProperties(const SumoXMLAttr attribute, const int attributeProperty, const std::string& definition, std::string defaultValue) : + myAttribute(attribute), + myTagPropertyParent(nullptr), + myAttrStr(toString(attribute)), myAttributeProperty(attributeProperty), - myPositionListed(positionListed), + myPositionListed(0), myDefinition(definition), myDefaultValue(defaultValue), - myDiscreteValues(discreteValues), - myAttrSynonym(synonym), - myMinimumRange(minimum), - myMaximumRange(maximum) { + myAttrSynonym(SUMO_ATTR_NOTHING), + myMinimumRange(0), + myMaximumRange(0) { + // empty definition aren't valid + if (definition.empty()) { + throw FormatException("Every AttributeProperty needs a definition"); + } + // if default value isn't empty, but attribute doesn't support default values, throw exception. + if (!defaultValue.empty() && !(attributeProperty & ATTRPROPERTY_DEFAULTVALUE)) { + throw FormatException("AttributeProperty doesn't support default values"); + } } GNEAttributeCarrier::AttributeProperties::~AttributeProperties() {} -void +void GNEAttributeCarrier::AttributeProperties::checkAttributeIntegrity() { - // Check that color attributes always owns an default value - if (isColor() && myDefaultValue.empty()) { - throw FormatException("Color attributes must own always a default color"); - } // check that secuential attributes correspond to a list if (isSecuential() && !isList()) { throw FormatException("Secuential property only is compatible with list properties"); @@ -102,6 +112,67 @@ } +void +GNEAttributeCarrier::AttributeProperties::setDiscreteValues(const std::vector& discreteValues) { + if (isDiscrete()) { + myDiscreteValues = discreteValues; + } else { + throw FormatException("AttributeProperty doesn't support discrete values values"); + } +} + + +void +GNEAttributeCarrier::AttributeProperties::setSynonym(const SumoXMLAttr synonym) { + if (hasAttrSynonym()) { + myAttrSynonym = synonym; + } else { + throw FormatException("AttributeProperty doesn't support synonyms"); + } +} + + +void +GNEAttributeCarrier::AttributeProperties::setRange(const double minimum, const double maximum) { + if (hasAttrRange()) { + myMinimumRange = minimum; + myMaximumRange = maximum; + } else { + throw FormatException("AttributeProperty doesn't support ranges"); + } +} + + +void +GNEAttributeCarrier::AttributeProperties::setPositionListed(const int positionListed) { + myPositionListed = positionListed; +} + + +void +GNEAttributeCarrier::AttributeProperties::setTagPropertyParent(TagProperties* tagPropertyParent) { + myTagPropertyParent = tagPropertyParent; +} + + +SumoXMLAttr +GNEAttributeCarrier::AttributeProperties::getAttr() const { + return myAttribute; +} + + +const std::string& +GNEAttributeCarrier::AttributeProperties::getAttrStr() const { + return myAttrStr; +} + + +const GNEAttributeCarrier::TagProperties& +GNEAttributeCarrier::AttributeProperties::getTagPropertyParent() const { + return *myTagPropertyParent; +} + + int GNEAttributeCarrier::AttributeProperties::getPositionListed() const { return myPositionListed; @@ -204,27 +275,27 @@ if (hasAttrSynonym()) { return myAttrSynonym; } else { - throw ProcessError("Attr doesn't have synonym"); + throw ProcessError("Attr doesn't support synonym"); } } -double +double GNEAttributeCarrier::AttributeProperties::getMinimumRange() const { if (hasAttrRange()) { return myMinimumRange; } else { - throw ProcessError("Attr doesn't have range"); + throw ProcessError("Attr doesn't support range"); } } -double +double GNEAttributeCarrier::AttributeProperties::getMaximumRange() const { if (hasAttrRange()) { return myMaximumRange; } else { - throw ProcessError("Attr doesn't have range"); + throw ProcessError("Attr doesn't support range"); } } @@ -336,7 +407,7 @@ } -bool +bool GNEAttributeCarrier::AttributeProperties::isSecuential() const { return (myAttributeProperty & ATTRPROPERTY_SECUENCIAL) != 0; } @@ -371,62 +442,67 @@ return (myAttributeProperty & ATTRPROPERTY_NONEDITABLE) != 0; } + +bool +GNEAttributeCarrier::AttributeProperties::isExtended() const { + return (myAttributeProperty & ATTRPROPERTY_EXTENDED) != 0; +} + + +bool +GNEAttributeCarrier::AttributeProperties::requiereUpdateGeometry() const { + return (myAttributeProperty & ATTRPROPERTY_UPDATEGEOMETRY) != 0; +} + // --------------------------------------------------------------------------- // GNEAttributeCarrier::TagProperties - methods // --------------------------------------------------------------------------- GNEAttributeCarrier::TagProperties::TagProperties() : myTag(SUMO_TAG_NOTHING), + myTagType(0), myTagProperty(0), myIcon(ICON_EMPTY), - myPositionListed(0), myParentTag(SUMO_TAG_NOTHING), myTagSynonym(SUMO_TAG_NOTHING) { } -GNEAttributeCarrier::TagProperties::TagProperties(SumoXMLTag tag, int tagProperty, int &positionListed, GUIIcon icon, SumoXMLTag parentTag, SumoXMLTag tagSynonym) : +GNEAttributeCarrier::TagProperties::TagProperties(SumoXMLTag tag, int tagType, int tagProperty, GUIIcon icon, SumoXMLTag parentTag, SumoXMLTag tagSynonym) : myTag(tag), myTagStr(toString(tag)), + myTagType(tagType), myTagProperty(tagProperty), myIcon(icon), - myPositionListed(positionListed), myParentTag(parentTag), myTagSynonym(tagSynonym) { - // Always update list position after setting a new tag value - positionListed++; - } GNEAttributeCarrier::TagProperties::~TagProperties() {} -SumoXMLTag +SumoXMLTag GNEAttributeCarrier::TagProperties::getTag() const { return myTag; } -const std::string & +const std::string& GNEAttributeCarrier::TagProperties::getTagStr() const { return myTagStr; } -void +void GNEAttributeCarrier::TagProperties::checkTagIntegrity() const { // check that element must ist at least netElement, Additional, or shape - if (!isNetElement() && !isAdditional() && !isShape() && !isTAZ()) { - throw ProcessError("element must be at leas netElement, Additional, or shape"); + if (!isNetElement() && !isAdditional() && !isShape() && !isTAZ() && !isDemandElement()) { + throw ProcessError("element must be at leas netElement, additional, TAZ, shape or demandElement"); } // check that element only is netElement, Additional, or shape at the same time - if ((isNetElement() + isAdditional() + isShape() + isTAZ()) > 1) { - throw ProcessError("element only can be netElement, Additional, or shape at the same time"); - } - // If element is drawable, chek that at least one placeover is defined - if (isDrawable() && !(canBePlacedOverView() || canBePlacedOverEdge() || canBePlacedOverLane() || canBePlacedOverJunction() || canBePlacedOverEdges() || canBePlacedOverLanes())) { - throw ProcessError("If attribute is drawable a PLACEDOVER attribute must be defined"); + if ((isNetElement() + isAdditional() + isShape() + isTAZ() + isDemandElement()) > 1) { + throw ProcessError("element can be only a netElement, additional, shape or demandElement at the same time"); } // if element can mask the start and end position, check that bot attributes exist if (canMaskStartEndPos() && (!hasAttribute(SUMO_ATTR_STARTPOS) || !hasAttribute(SUMO_ATTR_ENDPOS))) { @@ -439,9 +515,9 @@ // check integrity of all attributes for (auto i : myAttributeProperties) { i.second.checkAttributeIntegrity(); - // check that if attribute is combinable, own a combination of Allow/disallow attibute + // check that if attribute is combinable, own a combination of Allow/disallow attibute if (i.second.isCombinable()) { - if((i.first != SUMO_ATTR_ALLOW) && (i.first != SUMO_ATTR_DISALLOW)) { + if ((i.first != SUMO_ATTR_ALLOW) && (i.first != SUMO_ATTR_DISALLOW)) { throw ProcessError("Attributes aren't combinables"); } else if ((i.first == SUMO_ATTR_ALLOW) && !hasAttribute(SUMO_ATTR_DISALLOW)) { throw ProcessError("allow need a disallow attribute in the same tag"); @@ -450,6 +526,18 @@ } } } + // check that all position listed are consecutives + for (int i = 0; i < (int)myAttributeProperties.size(); i++) { + bool found = false; + for (auto j : myAttributeProperties) { + if (j.second.getPositionListed() == i) { + found = true; + } + } + if (!found) { + throw FormatException("There is no position listed consecutive"); + } + } } @@ -465,44 +553,18 @@ } -int -GNEAttributeCarrier::TagProperties::getPositionListed() const { - return myPositionListed; -} - - -void -GNEAttributeCarrier::TagProperties::addAttribute(SumoXMLAttr attr, int attributeProperty, const std::string& definition, const std::string& defaultValue, std::vector discreteValues, SumoXMLAttr synonym) { - if (isAttributeDeprecated(attr)) { - throw ProcessError("Attribute '" + toString(attr) + "' is deprecated and cannot be inserted"); - } else if (myAttributeProperties.count(attr) != 0) { - throw ProcessError("Attribute '" + toString(attr) + "' already inserted"); - } else { - myAttributeProperties[attr] = AttributeProperties(attributeProperty, (int)myAttributeProperties.size(), definition, defaultValue, discreteValues, synonym); - } -} - - void -GNEAttributeCarrier::TagProperties::addAttribute(SumoXMLAttr attr, int attributeProperty, const std::string& definition, const std::string& defaultValue, SumoXMLAttr synonym) { - if (isAttributeDeprecated(attr)) { - throw ProcessError("Attribute '" + toString(attr) + "' is deprecated and cannot be inserted"); - } else if (myAttributeProperties.count(attr) != 0) { - throw ProcessError("Attribute '" + toString(attr) + "' already inserted"); - } else { - myAttributeProperties[attr] = AttributeProperties(attributeProperty, (int)myAttributeProperties.size(), definition, defaultValue, std::vector(), synonym); - } -} - - -void -GNEAttributeCarrier::TagProperties::addAttribute(SumoXMLAttr attr, const int attributeProperty, const std::string& definition, const std::string& defaultValue, double minimum, double maximum) { - if (isAttributeDeprecated(attr)) { - throw ProcessError("Attribute '" + toString(attr) + "' is deprecated and cannot be inserted"); - } else if (myAttributeProperties.count(attr) != 0) { - throw ProcessError("Attribute '" + toString(attr) + "' already inserted"); +GNEAttributeCarrier::TagProperties::addAttribute(const AttributeProperties& attributeProperty) { + if (isAttributeDeprecated(attributeProperty.getAttr())) { + throw ProcessError("Attribute '" + attributeProperty.getAttrStr() + "' is deprecated and cannot be inserted"); + } else if (myAttributeProperties.count(attributeProperty.getAttr()) != 0) { + throw ProcessError("Attribute '" + attributeProperty.getAttrStr() + "' already inserted"); } else { - myAttributeProperties[attr] = AttributeProperties(attributeProperty, (int)myAttributeProperties.size(), definition, defaultValue, std::vector(), SUMO_ATTR_NOTHING, minimum, maximum); + // insert AttributeProperties in map + myAttributeProperties[attributeProperty.getAttr()] = attributeProperty; + // update position listed + myAttributeProperties[attributeProperty.getAttr()].setPositionListed((int)myAttributeProperties.size() - 1); + myAttributeProperties[attributeProperty.getAttr()].setTagPropertyParent(this); } } @@ -581,6 +643,26 @@ } +void +GNEAttributeCarrier::TagProperties::setDisjointAttributes(const std::vector& attrs) { + if (hasDisjointAttributes()) { + myDisjointAttrs = attrs; + } else { + throw ProcessError("Tag doesn't support disjoint attributes"); + } +} + + +bool +GNEAttributeCarrier::TagProperties::isDisjointAttributes(SumoXMLAttr attr) const { + if (myDisjointAttrs.empty()) { + return false; + } else { + return (std::find(myDisjointAttrs.begin(), myDisjointAttrs.end(), attr) != myDisjointAttrs.end()); + } +} + + bool GNEAttributeCarrier::TagProperties::hasAttribute(SumoXMLAttr attr) const { return (myAttributeProperties.count(attr) == 1); @@ -589,49 +671,66 @@ bool GNEAttributeCarrier::TagProperties::isNetElement() const { - return (myTagProperty & TAGPROPERTY_NETELEMENT) != 0; + return (myTagType & TAGTYPE_NETELEMENT) != 0; } bool GNEAttributeCarrier::TagProperties::isAdditional() const { - return (myTagProperty & TAGPROPERTY_ADDITIONAL) != 0; + return (myTagType & TAGTYPE_ADDITIONAL) != 0; +} + +bool +GNEAttributeCarrier::TagProperties::isShape() const { + return (myTagType & TAGTYPE_SHAPE) != 0; } bool -GNEAttributeCarrier::TagProperties::isDrawable() const { - return (myTagProperty & TAGPROPERTY_DRAWABLE) != 0; +GNEAttributeCarrier::TagProperties::isTAZ() const { + return (myTagType & TAGTYPE_TAZ) != 0; } bool -GNEAttributeCarrier::TagProperties::isSelectable() const { - return (myTagProperty & TAGPROPERTY_SELECTABLE) != 0; +GNEAttributeCarrier::TagProperties::isDemandElement() const { + return (myTagType & TAGTYPE_DEMANDELEMENT) != 0; } bool -GNEAttributeCarrier::TagProperties::isShape() const { - return (myTagProperty & TAGPROPERTY_SHAPE) != 0; +GNEAttributeCarrier::TagProperties::isStoppingPlace() const { + return (myTagType & TAGTYPE_STOPPINGPLACE) != 0; } bool -GNEAttributeCarrier::TagProperties::isTAZ() const { - return (myTagProperty & TAGPROPERTY_TAZ) != 0; +GNEAttributeCarrier::TagProperties::isDetector() const { + return (myTagType & TAGTYPE_DETECTOR) != 0; } bool -GNEAttributeCarrier::TagProperties::isStoppingPlace() const { - return (myTagProperty & TAGPROPERTY_STOPPINGPLACE) != 0; +GNEAttributeCarrier::TagProperties::isVehicle() const { + return (myTagType & TAGTYPE_VEHICLE) != 0; } bool -GNEAttributeCarrier::TagProperties::isDetector() const { - return (myTagProperty & TAGPROPERTY_DETECTOR) != 0; +GNEAttributeCarrier::TagProperties::isStop() const { + return (myTagType & TAGTYPE_STOP) != 0; +} + + +bool +GNEAttributeCarrier::TagProperties::isDrawable() const { + return (myTagProperty & TAGPROPERTY_DRAWABLE) != 0; +} + + +bool +GNEAttributeCarrier::TagProperties::isSelectable() const { + return (myTagProperty & TAGPROPERTY_SELECTABLE) != 0; } @@ -689,7 +788,7 @@ } -bool +bool GNEAttributeCarrier::TagProperties::hasGenericParameters() const { // note: By default all Tags supports generic parameters, except Tags with "TAGPROPERTY_NOGENERICPARAMETERS" return (myTagProperty & TAGPROPERTY_NOGENERICPARAMETERS) == 0; @@ -697,6 +796,13 @@ bool +GNEAttributeCarrier::TagProperties::hasDisjointAttributes() const { + // note: By default all Tags supports generic parameters, except Tags with "TAGPROPERTY_NOGENERICPARAMETERS" + return (myTagProperty & TAGPROPERTY_DISJOINTATTRIBUTES) != 0; +} + + +bool GNEAttributeCarrier::TagProperties::canBeReparent() const { return (myTagProperty & TAGPROPERTY_REPARENT) != 0; } @@ -714,52 +820,16 @@ } -bool -GNEAttributeCarrier::TagProperties::canBePlacedOverView() const { - return (myTagProperty & TAGPROPERTY_PLACEDOVER_VIEW) != 0; -} - - -bool -GNEAttributeCarrier::TagProperties::canBePlacedOverEdge() const { - return (myTagProperty & TAGPROPERTY_PLACEDOVER_EDGE) != 0; -} - - -bool -GNEAttributeCarrier::TagProperties::canBePlacedOverLane() const { - return (myTagProperty & TAGPROPERTY_PLACEDOVER_LANE) != 0; -} - - -bool -GNEAttributeCarrier::TagProperties::canBePlacedOverJunction() const { - return (myTagProperty & TAGPROPERTY_PLACEDOVER_JUNCTION) != 0; -} - - -bool -GNEAttributeCarrier::TagProperties::canBePlacedOverEdges() const { - return (myTagProperty & TAGPROPERTY_PLACEDOVER_EDGES) != 0; -} - - -bool -GNEAttributeCarrier::TagProperties::canBePlacedOverLanes() const { - return (myTagProperty & TAGPROPERTY_PLACEDOVER_LANES) != 0; -} - - -bool +bool GNEAttributeCarrier::TagProperties::canMaskStartEndPos() const { return (myTagProperty & TAGPROPERTY_MASKSTARTENDPOS) != 0; -} +} -bool +bool GNEAttributeCarrier::TagProperties::canMaskXYZPositions() const { return (myTagProperty & TAGPROPERTY_MASKXYZPOSITION) != 0; -} +} bool @@ -771,17 +841,38 @@ // GNEAttributeCarrier - methods // --------------------------------------------------------------------------- -GNEAttributeCarrier::GNEAttributeCarrier(SumoXMLTag tag) : +GNEAttributeCarrier::GNEAttributeCarrier(const SumoXMLTag tag) : myTagProperty(getTagProperties(tag)), mySelected(false) { } +GNEAttributeCarrier::~GNEAttributeCarrier() {} + + +bool +GNEAttributeCarrier::isDisjointAttributeSet(const SumoXMLAttr /*attr*/) const { + // by default all attributes are set + return true; +} + + +void +GNEAttributeCarrier::setDisjointAttribute(const SumoXMLAttr /*attr*/, GNEUndoList* /*undoList*/) { + // by default empty +} + + template<> int GNEAttributeCarrier::parse(const std::string& string) { return StringUtils::toInt(string); } +template<> long long +GNEAttributeCarrier::parse(const std::string& string) { + return StringUtils::toLong(string); +} + template<> double GNEAttributeCarrier::parse(const std::string& string) { @@ -865,7 +956,18 @@ template<> std::vector GNEAttributeCarrier::parse(const std::string& string) { - return StringTokenizer(string, " ").getVector(); + return StringTokenizer(string).getVector(); +} + + +template<> std::set +GNEAttributeCarrier::parse(const std::string& string) { + std::vector vectorString = StringTokenizer(string).getVector(); + std::set solution; + for (const auto& i : vectorString) { + solution.insert(i); + } + return solution; } @@ -873,7 +975,7 @@ GNEAttributeCarrier::parse(const std::string& string) { std::vector parsedValues = parse >(string); std::vector parsedIntValues; - for (auto i : parsedValues) { + for (const auto& i : parsedValues) { parsedIntValues.push_back(parse(i)); } return parsedIntValues; @@ -884,7 +986,7 @@ GNEAttributeCarrier::parse(const std::string& string) { std::vector parsedValues = parse >(string); std::vector parsedDoubleValues; - for (auto i : parsedValues) { + for (const auto& i : parsedValues) { parsedDoubleValues.push_back(parse(i)); } return parsedDoubleValues; @@ -895,7 +997,7 @@ GNEAttributeCarrier::parse(const std::string& string) { std::vector parsedValues = parse >(string); std::vector parsedBoolValues; - for (auto i : parsedValues) { + for (const auto& i : parsedValues) { parsedBoolValues.push_back(parse(i)); } return parsedBoolValues; @@ -908,12 +1010,12 @@ std::vector edgeIds = GNEAttributeCarrier::parse > (value); std::vector parsedEdges; // Iterate over edges IDs, retrieve Edges and add it into parsedEdges - for (auto i : edgeIds) { + for (const auto& i : edgeIds) { GNEEdge* retrievedEdge = net->retrieveEdge(i, false); if (retrievedEdge) { parsedEdges.push_back(net->retrieveEdge(i)); } else { - throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_EDGES) + ". " + toString(SUMO_TAG_EDGE) + " '" + i + "' doesn't exist."); + throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_EDGES) + ". " + toString(SUMO_TAG_EDGE) + " '" + i + "' doesn't exist"); } } return parsedEdges; @@ -926,12 +1028,12 @@ std::vector laneIds = GNEAttributeCarrier::parse > (value); std::vector parsedLanes; // Iterate over lanes IDs, retrieve Lanes and add it into parsedLanes - for (auto i : laneIds) { + for (const auto& i : laneIds) { GNELane* retrievedLane = net->retrieveLane(i, false); if (retrievedLane) { parsedLanes.push_back(net->retrieveLane(i)); } else { - throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_LANES) + ". " + toString(SUMO_TAG_LANE) + " '" + i + "' doesn't exist."); + throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_LANES) + ". " + toString(SUMO_TAG_LANE) + " '" + i + "' doesn't exist"); } } return parsedLanes; @@ -942,7 +1044,7 @@ GNEAttributeCarrier::parseIDs(const std::vector& ACs) { // obtain ID's of edges and return their join std::vector edgeIDs; - for (auto i : ACs) { + for (const auto& i : ACs) { edgeIDs.push_back(i->getID()); } return joinToString(edgeIDs, " "); @@ -953,17 +1055,17 @@ GNEAttributeCarrier::parseIDs(const std::vector& ACs) { // obtain ID's of lanes and return their join std::vector laneIDs; - for (auto i : ACs) { + for (const auto& i : ACs) { laneIDs.push_back(i->getID()); } return joinToString(laneIDs, " "); } -bool +bool GNEAttributeCarrier::lanesConsecutives(const std::vector& lanes) { // we need at least two lanes - if(lanes.size() > 1) { + if (lanes.size() > 1) { // now check that lanes are consecutives (not neccesary connected) int currentLane = 0; while (currentLane < ((int)lanes.size() - 1)) { @@ -973,12 +1075,12 @@ // iterate over lanes of outgoing edges of destiny juntion of edge's lane for (int j = 0; (j < (int)lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().size()) && (nextLane == -1); j++) { // check if lane correspond to the next lane of "lanes" - if(lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().at(j) == lanes.at(currentLane + 1)) { + if (lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().at(j) == lanes.at(currentLane + 1)) { nextLane = currentLane; } } } - if(nextLane == -1) { + if (nextLane == -1) { return false; } else { currentLane++; @@ -996,20 +1098,14 @@ return getAttribute(key); } -/* -SumoXMLTag -GNEAttributeCarrier::getTag() const { - return myTagProperty.getTag(); -} -*/ -const std::string & +const std::string& GNEAttributeCarrier::getTagStr() const { return myTagProperty.getTagStr(); } -const GNEAttributeCarrier::TagProperties & +const GNEAttributeCarrier::TagProperties& GNEAttributeCarrier::getTagProperty() const { return myTagProperty; } @@ -1036,7 +1132,7 @@ const GNEAttributeCarrier::TagProperties& GNEAttributeCarrier::getTagProperties(SumoXMLTag tag) { - if(tag == SUMO_TAG_NOTHING) { + if (tag == SUMO_TAG_NOTHING) { return dummyTagProperty; } // define on first access @@ -1060,7 +1156,7 @@ fillAttributeCarriers(); } // fill all tags - for (const auto &i : myTagProperties) { + for (const auto& i : myTagProperties) { if (!onlyDrawables || i.second.isDrawable()) { allTags.push_back(i.first); } @@ -1071,48 +1167,68 @@ std::vector GNEAttributeCarrier::allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables) { - std::vector netElementTags; + std::vector allowedTags; // define on first access if (myTagProperties.size() == 0) { fillAttributeCarriers(); } - switch (tagPropertyCategory) { - case TAGPROPERTY_NETELEMENT: - // fill netElements tags - for (const auto &i : myTagProperties) { - if (i.second.isNetElement() && (!onlyDrawables || i.second.isDrawable())) { - netElementTags.push_back(i.first); - } + if (tagPropertyCategory & TAGTYPE_NETELEMENT) { + // fill netElements tags + for (const auto& i : myTagProperties) { + if (i.second.isNetElement() && (!onlyDrawables || i.second.isDrawable())) { + allowedTags.push_back(i.first); } - break; - case TAGPROPERTY_ADDITIONAL: - // fill additional tags - for (const auto &i : myTagProperties) { - if (i.second.isAdditional() && (!onlyDrawables || i.second.isDrawable())) { - netElementTags.push_back(i.first); - } + } + } + if (tagPropertyCategory & TAGTYPE_ADDITIONAL) { + // fill additional tags + for (const auto& i : myTagProperties) { + if (i.second.isAdditional() && (!onlyDrawables || i.second.isDrawable())) { + allowedTags.push_back(i.first); } - break; - case TAGPROPERTY_SHAPE: - // fill shape tags - for (const auto &i : myTagProperties) { - if (i.second.isShape() && (!onlyDrawables || i.second.isDrawable())) { - netElementTags.push_back(i.first); - } + } + } + if (tagPropertyCategory & TAGTYPE_SHAPE) { + // fill shape tags + for (const auto& i : myTagProperties) { + if (i.second.isShape() && (!onlyDrawables || i.second.isDrawable())) { + allowedTags.push_back(i.first); } - break; - case TAGPROPERTY_TAZ: - // fill taz tags - for (const auto &i : myTagProperties) { - if (i.second.isTAZ() && (!onlyDrawables || i.second.isDrawable())) { - netElementTags.push_back(i.first); - } + } + } + if (tagPropertyCategory & TAGTYPE_TAZ) { + // fill taz tags + for (const auto& i : myTagProperties) { + if (i.second.isTAZ() && (!onlyDrawables || i.second.isDrawable())) { + allowedTags.push_back(i.first); + } + } + } + if (tagPropertyCategory & TAGTYPE_DEMANDELEMENT) { + // fill demand tags + for (const auto& i : myTagProperties) { + if (i.second.isDemandElement() && (!onlyDrawables || i.second.isDrawable())) { + allowedTags.push_back(i.first); } - break; - default: - throw ProcessError("Category isn't defined"); + } } - return netElementTags; + if (tagPropertyCategory & TAGTYPE_VEHICLE) { + // fill demand tags + for (const auto& i : myTagProperties) { + if (i.second.isVehicle() && (!onlyDrawables || i.second.isDrawable())) { + allowedTags.push_back(i.first); + } + } + } + if (tagPropertyCategory & TAGTYPE_STOP) { + // fill demand tags + for (const auto& i : myTagProperties) { + if (i.second.isStop() && (!onlyDrawables || i.second.isDrawable())) { + allowedTags.push_back(i.first); + } + } + } + return allowedTags; } @@ -1124,7 +1240,7 @@ fillAttributeCarriers(); } // get max num attributes - for (const auto &i : myTagProperties) { + for (const auto& i : myTagProperties) { maxNumAttribute = MAX2(maxNumAttribute, i.second.getNumberOfAttributes()); } return maxNumAttribute; @@ -1174,1475 +1290,3127 @@ } } +// =========================================================================== +// private +// =========================================================================== + +void +GNEAttributeCarrier::setDisjointAttribute(const int /*newParameterSet*/) { + // by default empty +} void GNEAttributeCarrier::fillAttributeCarriers() { - const OptionsCont& oc = OptionsCont::getOptions(); + // fill all groups of ACs + fillNetElements(); + fillAdditionals(); + fillShapes(); + fillDemandElements(); + // check integrity of all Tags (function checkTagIntegrity() throw an exception if there is an inconsistency) + for (const auto& i : myTagProperties) { + i.second.checkTagIntegrity(); + } +} + + +void +GNEAttributeCarrier::fillNetElements() { + // declare empty AttributeProperties + AttributeProperties attrProperty; // obtain Node Types except NODETYPE_DEAD_END_DEPRECATED + const OptionsCont& oc = OptionsCont::getOptions(); std::vector nodeTypes = SUMOXMLDefinitions::NodeTypes.getStrings(); nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_DEAD_END_DEPRECATED))); nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_DEAD_END))); nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_NOJUNCTION))); nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_INTERNAL))); - // obtain a vector string with the emissions - std::vector emissions = { "zero", "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", "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" - }; - // declare integers for list position. It will be updated after every TagProperties(...) call - int netElement = 0; - int additional = 0; - int shape = 0; - int taz = 0; - // fill all ACs + // fill netElement ACs SumoXMLTag currentTag = SUMO_TAG_EDGE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_NETELEMENT | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE, netElement, ICON_EDGE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_NETELEMENT, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_EDGE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the edge", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FROM, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The name of a node within the nodes-file the edge shall start at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TO, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The name of a node within the nodes-file the edge shall end at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "The maximum speed allowed on the edge in m/s", - toString(oc.getFloat("default.speed"))); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PRIORITY, - ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, - "The priority of the edge", - toString(oc.getInt("default.priority"))); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NUMLANES, - ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "The number of lanes of the edge", - toString(oc.getInt("default.lanenumber"))); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE, - "The name of a type within the SUMO edge type file", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, - "Explicitly allows the given vehicle classes (not given will be not allowed)", - "all", - SumoVehicleClassStrings.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, - "Explicitly disallows the given vehicle classes (not given will be allowed)", - "", - SumoVehicleClassStrings.getStrings()); - //myTagProperties[currentTag].addAttribute(SUMO_ATTR_PREFER, ); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, - "If the shape is given it should start and end with the positions of the from-node and to-node", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE, - "The length of the edge in meter", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPREADTYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, - "Lane width for all lanes of this edge in meters (used for visualization)", - "right", - SUMOXMLDefinitions::LaneSpreadFunctions.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE, - "street name (need not be unique, used for visualization)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "Lane width for all lanes of this edge in meters (used for visualization)", - "-1"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDOFFSET, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "Move the stop line back from the intersection by the given amount", - "0"); - myTagProperties[currentTag].addAttribute(GNE_ATTR_SHAPE_START, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUE, // virtual attribute used to define an endPoint - "Custom position in which shape start (by default position of junction from)", - ""); - myTagProperties[currentTag].addAttribute(GNE_ATTR_SHAPE_END, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUE, // virtual attribute from to define an endPoint - "Custom position in which shape end (by default position of junction from)", - ""); - myTagProperties[currentTag].addAttribute(GNE_ATTR_BIDIR, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_NONEDITABLE, // virtual attribute to check of this edge is part of a bidirectional railway (cannot be edited) - "Show if edge is bidireccional", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of the edge"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FROM, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of a node within the nodes-file the edge shall start at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TO, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of a node within the nodes-file the edge shall end at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPEED, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "The maximum speed allowed on the edge in m/s"); + toString(oc.getFloat("default.speed")); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PRIORITY, + ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, + "The priority of the edge"); + toString(oc.getInt("default.priority")); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NUMLANES, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "The number of lanes of the edge"); + toString(oc.getInt("default.lanenumber")); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE, + "The name of a type within the SUMO edge type file"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, + "Explicitly allows the given vehicle classes (not given will be not allowed)", + "all"); + attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, + "Explicitly disallows the given vehicle classes (not given will be allowed)"); + attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "If the shape is given it should start and end with the positions of the from-node and to-node"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LENGTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_UPDATEGEOMETRY, + "The length of the edge in meter"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPREADTYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, + "Lane width for all lanes of this edge in meters (used for visualization)", + "right"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::LaneSpreadFunctions.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE, + "street name (need not be unique, used for visualization)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Lane width for all lanes of this edge in meters (used for visualization)", + "-1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ENDOFFSET, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Move the stop line back from the intersection by the given amount", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(GNE_ATTR_SHAPE_START, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute used to define an endPoint + "Custom position in which shape start (by default position of junction from)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(GNE_ATTR_SHAPE_END, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from to define an endPoint + "Custom position in which shape end (by default position of junction from)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(GNE_ATTR_BIDIR, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_NONEDITABLE, // virtual attribute to check of this edge is part of a bidirectional railway (cannot be edited) + "Show if edge is bidireccional", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_JUNCTION; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_NETELEMENT | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE, netElement, ICON_JUNCTION); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_NETELEMENT, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_JUNCTION); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the node", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y - "The x-y-z position of the node on the plane in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, - "An optional type for the node", - "", - nodeTypes); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, - "A custom shape for that node", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_RADIUS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE, - "Optional turning radius (for all corners) for that node in meters", - "1.5"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_KEEP_CLEAR, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, - "Whether the junction-blocking-heuristic should be activated at this node", - "1"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_RIGHT_OF_WAY, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, - "How to compute right of way rules at this node", - SUMOXMLDefinitions::RightOfWayValues.getString(RIGHT_OF_WAY_DEFAULT), - SUMOXMLDefinitions::RightOfWayValues.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLTYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, - "An optional type for the traffic light algorithm", - "", - SUMOXMLDefinitions::TrafficLightTypes.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLID, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE, - "An optional id for the traffic light program", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of the node"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y + "The x-y-z position of the node on the plane in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, + "An optional type for the node"); + attrProperty.setDiscreteValues(nodeTypes); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "A custom shape for that node"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_RADIUS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Optional turning radius (for all corners) for that node in meters", + "1.5"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_KEEP_CLEAR, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, + "Whether the junction-blocking-heuristic should be activated at this node", + "1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_RIGHT_OF_WAY, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, + "How to compute right of way rules at this node", + SUMOXMLDefinitions::RightOfWayValues.getString(RIGHT_OF_WAY_DEFAULT)); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::RightOfWayValues.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRINGE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, + "Whether this junction is at the fringe of the network", + SUMOXMLDefinitions::FringeTypeValues.getString(FRINGE_TYPE_DEFAULT)); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::FringeTypeValues.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TLTYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE, + "An optional type for the traffic light algorithm"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::TrafficLightTypes.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TLID, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE, + "An optional id for the traffic light program"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_LANE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_NETELEMENT | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE, netElement, ICON_LANE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_NETELEMENT, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_LANE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, - "ID of lane (Automatic, non editable)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_INDEX, - ATTRPROPERTY_INT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, - "The enumeration index of the lane (0 is the rightmost lane, -1 is the leftmost one)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "Speed in meters per second", - "13.89"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, - "Explicitly allows the given vehicle classes (not given will be not allowed)", - "all", - SumoVehicleClassStrings.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, - "Explicitly disallows the given vehicle classes (not given will be allowed)", - "", - SumoVehicleClassStrings.getStrings()); - //myTagProperties[currentTag].addAttribute(SUMO_ATTR_PREFER, ); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "Width in meters (used for visualization)", - "-1"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDOFFSET, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "Move the stop line back from the intersection by the given amount", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ACCELERATION, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, - "Enable or disable lane as acceleration lane", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CUSTOMSHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UNIQUE, - "If the shape is given it overrides the computation based on edge shape", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, + "ID of lane (Automatic, non editable)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_INDEX, + ATTRPROPERTY_INT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_UPDATEGEOMETRY, + "The enumeration index of the lane (0 is the rightmost lane, -1 is the leftmost one)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPEED, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "Speed in meters per second", + "13.89"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, + "Explicitly allows the given vehicle classes (not given will be not allowed)", + "all"); + attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE, + "Explicitly disallows the given vehicle classes (not given will be allowed)"); + attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Width in meters (used for visualization)", + "-1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ENDOFFSET, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Move the stop line back from the intersection by the given amount", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ACCELERATION, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, + "Enable or disable lane as acceleration lane", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CUSTOMSHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "If the shape is given it overrides the computation based on edge shape"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_CROSSING; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_NETELEMENT | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_JUNCTION | TAGPROPERTY_SELECTABLE, netElement, ICON_CROSSING, SUMO_TAG_JUNCTION); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_NETELEMENT, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_CROSSING, SUMO_TAG_JUNCTION); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, - "The ID of Crossing", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE, - "The (road) edges which are crossed", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PRIORITY, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, - "Whether the pedestrians have priority over the vehicles (automatically set to true at tls-controlled intersections)", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "The width of the crossings", - toString(OptionsCont::getOptions().getFloat("default.crossing-width"))); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLLINKINDEX, - ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, - "sets the tls-index for this crossing", - "-1"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLLINKINDEX2, - ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, - "sets the opposite-direction tls-index for this crossing", - "-1"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CUSTOMSHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, - "Overrids default shape of pedestrian crossing", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, + "The ID of Crossing"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EDGES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The (road) edges which are crossed"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PRIORITY, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, + "Whether the pedestrians have priority over the vehicles (automatically set to true at tls-controlled intersections)", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The width of the crossings", + toString(OptionsCont::getOptions().getFloat("default.crossing-width"))); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TLLINKINDEX, + ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, + "sets the tls-index for this crossing", + "-1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TLLINKINDEX2, + ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, + "sets the opposite-direction tls-index for this crossing", + "-1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CUSTOMSHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Overrids default shape of pedestrian crossing"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_CONNECTION; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_NETELEMENT | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE, netElement, ICON_CONNECTION, SUMO_TAG_EDGE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_NETELEMENT, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_CONNECTION, SUMO_TAG_EDGE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FROM, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, - "The name of the edge the vehicles leave", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TO, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, - "The name of the edge the vehicles may reach when leaving 'from'", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FROM_LANE, - ATTRPROPERTY_INT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, - "the lane index of the incoming lane (numbers starting with 0)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TO_LANE, - ATTRPROPERTY_INT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE, - "the lane index of the outgoing lane (numbers starting with 0)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PASS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, - "if set, vehicles which pass this (lane-2-lane) connection) will not wait", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_KEEP_CLEAR, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, - "if set to false, vehicles which pass this (lane-2-lane) connection) will not worry about blocking the intersection", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CONTPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "If set to a more than 0 value, an internal junction will be built at this position (in m) from the start of the internal lane for this connection", - toString(NBEdge::UNSPECIFIED_CONTPOS)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_UNCONTROLLED, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, - "If set to true, This connection will not be TLS-controlled despite its node being controlled", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VISIBILITY_DISTANCE, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "", - toString(NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLLINKINDEX, - ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, - "sets the distance to the connection at which all relevant foes are visible", - "-1"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "sets custom speed limit for the connection", - toString(NBEdge::UNSPECIFIED_SPEED)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CUSTOMSHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, - "sets custom shape for the connection", - ""); - } - currentTag = SUMO_TAG_BUS_STOP; - { - // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_STOPPINGPLACE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, additional, ICON_BUSSTOP, SUMO_TAG_LANE); - // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of bus stop", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The name of the lane the bus stop shall be located at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The begin position on the lane (the lower position on the lane) in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_FROM, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the edge the vehicles leave"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TO, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the edge the vehicles may reach when leaving 'from'"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FROM_LANE, + ATTRPROPERTY_INT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_UPDATEGEOMETRY, + "the lane index of the incoming lane (numbers starting with 0)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TO_LANE, + ATTRPROPERTY_INT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_UPDATEGEOMETRY, + "the lane index of the outgoing lane (numbers starting with 0)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PASS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, + "if set, vehicles which pass this (lane-2-lane) connection) will not wait", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_KEEP_CLEAR, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, + "if set to false, vehicles which pass this (lane-2-lane) connection) will not worry about blocking the intersection", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "If set to a more than 0 value, an internal junction will be built at this position (in m) from the start of the internal lane for this connection", + toString(NBEdge::UNSPECIFIED_CONTPOS)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_UNCONTROLLED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, + "If set to true, This connection will not be TLS-controlled despite its node being controlled", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VISIBILITY_DISTANCE, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "Vision distance between vehicles", + toString(NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TLLINKINDEX, + ATTRPROPERTY_INT | ATTRPROPERTY_DEFAULTVALUE, + "sets the distance to the connection at which all relevant foes are visible", + "-1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPEED, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "sets custom speed limit for the connection", + toString(NBEdge::UNSPECIFIED_SPEED)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CUSTOMSHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "sets custom shape for the connection"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DIR, + ATTRPROPERTY_STRING | ATTRPROPERTY_NONEDITABLE, + "turning direction for this connection (computed)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_STATE, + ATTRPROPERTY_STRING | ATTRPROPERTY_NONEDITABLE, + "link state for this connection (computed)"); + myTagProperties[currentTag].addAttribute(attrProperty); + } +} + + +void +GNEAttributeCarrier::fillAdditionals() { + // declare empty AttributeProperties + AttributeProperties attrProperty; + // fill additional elements + SumoXMLTag currentTag = SUMO_TAG_BUS_STOP; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_STOPPINGPLACE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, ICON_CONTAINERSTOP, SUMO_TAG_LANE); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of bus stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the lane the bus stop shall be located at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The begin position on the lane (the lower position on the lane) in meters"); + + myTagProperties[currentTag].addAttribute(attrProperty); + attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LINES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PERSON_CAPACITY, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes", + "-1"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_ACCESS; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_PARENT | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_ACCESS, SUMO_TAG_BUS_STOP); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_PARENT | TAGPROPERTY_BLOCKMOVEMENT, ICON_ACCESS, SUMO_TAG_BUS_STOP); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The name of the lane the stop access shall be located at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The position on the lane (the lower position on the lane) in meters", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The walking length of the access in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the lane the stop access shall be located at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the lane (the lower position on the lane) in meters", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LENGTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The walking length of the access in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_CONTAINER_STOP; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_STOPPINGPLACE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, additional, ICON_CONTAINERSTOP, SUMO_TAG_LANE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_STOPPINGPLACE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, ICON_CONTAINERSTOP, SUMO_TAG_LANE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of container stop", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The name of the lane the container stop shall be located at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The begin position on the lane (the lower position on the lane) in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "meant to be the names of the bus lines that stop at this container stop. This is only used for visualization purposes", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of container stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the lane the container stop shall be located at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The begin position on the lane (the lower position on the lane) in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LINES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "meant to be the names of the bus lines that stop at this container stop. This is only used for visualization purposes"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_CHARGING_STATION; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_STOPPINGPLACE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, additional, ICON_CHARGINGSTATION, SUMO_TAG_LANE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_STOPPINGPLACE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, ICON_CHARGINGSTATION, SUMO_TAG_LANE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of charging station", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "Lane of the charging station location", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Begin position in the specified lane", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "End position in the specified lane", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CHARGINGPOWER, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Charging power in W", - "22000.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EFFICIENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_RANGE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Charging efficiency [0,1]", - "0.95", - 0, 1); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CHARGEINTRANSIT, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Enable or disable charge in transit, i.e. vehicle must or must not to stop for charging", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CHARGEDELAY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Time delay after the vehicles has reached / stopped on the charging station, before the energy transfer (charging) begins", - "0.00"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of charging station"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Lane of the charging station location"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "Begin position in the specified lane"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "End position in the specified lane"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CHARGINGPOWER, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Charging power in W", + "22000.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EFFICIENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_RANGE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Charging efficiency [0,1]", + "0.95"); + attrProperty.setRange(0, 1); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CHARGEINTRANSIT, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Enable or disable charge in transit, i.e. vehicle must or must not to stop for charging", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CHARGEDELAY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Time delay after the vehicles has reached / stopped on the charging station, before the energy transfer (charging) begins", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_PARKING_AREA; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_STOPPINGPLACE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, additional, ICON_PARKINGAREA, SUMO_TAG_LANE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_STOPPINGPLACE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKSTARTENDPOS, ICON_PARKINGAREA, SUMO_TAG_LANE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of ParkingArea", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The name of the lane the Parking Area shall be located at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The begin position on the lane (the lower position on the lane) in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROADSIDE_CAPACITY, - ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - " The number of parking spaces for road-side parking ", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ONROAD, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, vehicles will park on the road lane and thereby reducing capacity", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The width of the road-side parking spaces", - "3.20"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_DEFAULTVALUE, - "The length of the road-side parking spaces. By default (endPos - startPos) / roadsideCapacity", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise", - "0.00"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of ParkingArea"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the lane the Parking Area shall be located at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The begin position on the lane (the lower position on the lane) in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ROADSIDE_CAPACITY, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + " The number of parking spaces for road-side parking", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ONROAD, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, vehicles will park on the road lane and thereby reducing capacity", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The width of the road-side parking spaces", + "3.20"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LENGTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The length of the road-side parking spaces. By default (endPos - startPos) / roadsideCapacity"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ANGLE, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_PARKING_SPACE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_MASKXYZPOSITION | TAGPROPERTY_SELECTABLE | TAGPROPERTY_PARENT | TAGPROPERTY_REPARENT | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_PARKINGSPACE, SUMO_TAG_PARKING_AREA); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_MASKXYZPOSITION | TAGPROPERTY_SELECTABLE | TAGPROPERTY_PARENT | TAGPROPERTY_REPARENT | TAGPROPERTY_BLOCKMOVEMENT, ICON_PARKINGSPACE, SUMO_TAG_PARKING_AREA); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y - "The x-y-z position of the parking vehicle on the plane", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The width of the road-side parking spaces", - "3.20"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The length of the road-side parking spaces", - "5.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise", - "0.00"); + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y + "The x-y-z position of the parking vehicle on the plane"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The width of the road-side parking spaces", + "3.20"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LENGTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The length of the road-side parking spaces", + "5.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ANGLE, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_E1DETECTOR; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DETECTOR | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_E1, SUMO_TAG_LANE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_DETECTOR, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT, ICON_E1, SUMO_TAG_LANE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of E1", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the lane the detector shall be laid on. The lane must be a part of the network used", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "The aggregation period the values the detector collects shall be summed up", - "900.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, - "The path to the output file", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Space separated list of vehicle type ids to consider", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of E1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the lane the detector shall be laid on. The lane must be a part of the network used"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FREQUENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "The aggregation period the values the detector collects shall be summed up", + "900.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, + "The path to the output file"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VTYPES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Space separated list of vehicle type ids to consider"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_E2DETECTOR; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DETECTOR | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_E2, SUMO_TAG_LANE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_DETECTOR, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT, ICON_E2, SUMO_TAG_LANE); // set "file" as deprecated attribute myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_CONT); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of E2", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the lane the detector shall be laid on. The lane must be a part of the network used", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The position on the lane the detector shall be laid on in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "The length of the detector in meters", - "10.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "The aggregation period the values the detector collects shall be summed up", - "900.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, - "The path to the output file", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Space separated list of vehicle type ids to consider", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_SPEED_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s", - "1.39"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_JAM_DIST_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m", - "10.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of E2"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the lane the detector shall be laid on. The lane must be a part of the network used"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the lane the detector shall be laid on in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LENGTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The length of the detector in meters", + "10.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FREQUENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "The aggregation period the values the detector collects shall be summed up", + "900.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, + "The path to the output file"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VTYPES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Space separated list of vehicle type ids to consider"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HALTING_TIME_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HALTING_SPEED_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s", + "1.39"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JAM_DIST_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m", + "10.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_E2DETECTOR_MULTILANE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANES | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DETECTOR | TAGPROPERTY_PARENT | TAGPROPERTY_SYNONYM | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_E2, SUMO_TAG_LANE, SUMO_TAG_E2DETECTOR); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_DETECTOR, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_PARENT | TAGPROPERTY_SYNONYM | TAGPROPERTY_BLOCKMOVEMENT, ICON_E2, SUMO_TAG_LANE, SUMO_TAG_E2DETECTOR); // set "file" as deprecated attribute myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_CONT); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of Multilane E2", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_SECUENCIAL | ATTRPROPERTY_UNIQUE, - "The list of secuencial lane ids in which the detector shall be laid on", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The position on the lane the detector shall be laid on in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The end position on the lane the detector shall be laid on in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "The aggregation period the values the detector collects shall be summed up", - "900.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, - "The path to the output file", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Space separated list of vehicle type ids to consider", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_SPEED_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s", - "1.39"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_JAM_DIST_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m", - "10.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of Multilane E2"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_SECUENCIAL | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The list of secuencial lane ids in which the detector shall be laid on"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the lane the detector shall be laid on in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The end position on the lane the detector shall be laid on in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FREQUENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "The aggregation period the values the detector collects shall be summed up", + "900.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, + "The path to the output file"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VTYPES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Space separated list of vehicle type ids to consider"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HALTING_TIME_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HALTING_SPEED_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s", + "1.39"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JAM_DIST_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m", + "10.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_E3DETECTOR; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DETECTOR | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MINIMUMCHILDS | TAGPROPERTY_AUTOMATICSORTING, additional, ICON_E3); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_DETECTOR, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MINIMUMCHILDS | TAGPROPERTY_AUTOMATICSORTING, ICON_E3); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of E3", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "X-Y position of detector in editor (Only used in NETEDIT)", - "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "The aggregation period the values the detector collects shall be summed up", - "900.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, - "The path to the output file", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Space separated list of vehicle type ids to consider", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting) in s", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_SPEED_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s", - "1.39"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of E3"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "X-Y position of detector in editor (Only used in NETEDIT)", + "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FREQUENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "The aggregation period the values the detector collects shall be summed up", + "900.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, + "The path to the output file"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VTYPES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Space separated list of vehicle type ids to consider"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HALTING_TIME_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting) in s", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HALTING_SPEED_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s", + "1.39"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_DET_ENTRY; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DETECTOR | TAGPROPERTY_PARENT | TAGPROPERTY_REPARENT | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_E3ENTRY, SUMO_TAG_E3DETECTOR); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_DETECTOR, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_PARENT | TAGPROPERTY_REPARENT | TAGPROPERTY_BLOCKMOVEMENT, ICON_E3ENTRY, SUMO_TAG_E3DETECTOR); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the lane the detector shall be laid on. The lane must be a part of the network used", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The position on the lane the detector shall be laid on in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of the lane the detector shall be laid on. The lane must be a part of the network used"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the lane the detector shall be laid on in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_DET_EXIT; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DETECTOR | TAGPROPERTY_PARENT | TAGPROPERTY_REPARENT | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_E3EXIT, SUMO_TAG_E3DETECTOR); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_DETECTOR, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_PARENT | TAGPROPERTY_REPARENT | TAGPROPERTY_BLOCKMOVEMENT, ICON_E3EXIT, SUMO_TAG_E3DETECTOR); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the lane the detector shall be laid on. The lane must be a part of the network used", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The position on the lane the detector shall be laid on in meters", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the lane the detector shall be laid on. The lane must be a part of the network used"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the lane the detector shall be laid on in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_INSTANT_INDUCTION_LOOP; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DETECTOR | TAGPROPERTY_BLOCKMOVEMENT, additional, ICON_E1INSTANT); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL | TAGTYPE_DETECTOR, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT, ICON_E1INSTANT); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of Instant Induction Loop (E1Instant)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the lane the detector shall be laid on. The lane must be a part of the network used", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, - "The path to the output file", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Space separated list of vehicle type ids to consider", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of Instant Induction Loop (E1Instant)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the lane the detector shall be laid on. The lane must be a part of the network used"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, + "The path to the output file"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VTYPES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Space separated list of vehicle type ids to consider"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + } currentTag = SUMO_TAG_VSS; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_DIALOG, additional, ICON_VARIABLESPEEDSIGN); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_DIALOG, ICON_VARIABLESPEEDSIGN); // set "file" as deprecated attribute myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_FILE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, - "The id of Variable Speed Signal", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, - "X-Y position of detector in editor (Only used in NETEDIT)", - "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE, - "list of lanes of Variable Speed Sign", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, + "The id of Variable Speed Signal"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "X-Y position of detector in editor (Only used in NETEDIT)", + "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "list of lanes of Variable Speed Sign"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_STEP; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_VSSSTEP, SUMO_TAG_VSS); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT, ICON_VSSSTEP, SUMO_TAG_VSS); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TIME, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME, - "Time", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, - "Speed", - "13.89"); + attrProperty = AttributeProperties(SUMO_ATTR_TIME, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME, + "Time"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPEED, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "Speed", + "13.89"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_CALIBRATOR; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_EDGE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DIALOG, additional, ICON_CALIBRATOR); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DIALOG, ICON_CALIBRATOR); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of Calibrator", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of edge in the simulation network", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "The position of the calibrator on the specified lane", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The aggregation interval in which to calibrate the flows. default is step-length", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTEPROBE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The id of the routeProbe element from which to determine the route distribution for generated vehicles", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_OUTPUT, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The output file for writing calibrator information or NULL", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of Calibrator"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EDGE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of edge in the simulation network"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position of the calibrator on the specified lane", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FREQUENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The aggregation interval in which to calibrate the flows. default is step-length", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ROUTEPROBE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The id of the routeProbe element from which to determine the route distribution for generated vehicles"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_OUTPUT, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The output file for writing calibrator information or NULL"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_LANECALIBRATOR; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_SYNONYM | TAGPROPERTY_DIALOG, additional, ICON_CALIBRATOR, SUMO_TAG_NOTHING, SUMO_TAG_CALIBRATOR); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_SYNONYM | TAGPROPERTY_DIALOG, ICON_CALIBRATOR, SUMO_TAG_NOTHING, SUMO_TAG_CALIBRATOR); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of Calibrator", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of lane in the simulation network", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "The position of the calibrator on the specified lane", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The aggregation interval in which to calibrate the flows. default is step-length", - "100.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTEPROBE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The id of the routeProbe element from which to determine the route distribution for generated vehicles", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_OUTPUT, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The output file for writing calibrator information or NULL", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of Calibrator"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of lane in the simulation network"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position of the calibrator on the specified lane", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FREQUENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The aggregation interval in which to calibrate the flows. default is step-length", + "100.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ROUTEPROBE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The id of the routeProbe element from which to determine the route distribution for generated vehicles"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_OUTPUT, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The output file for writing calibrator information or NULL"); + myTagProperties[currentTag].addAttribute(attrProperty); } - currentTag = SUMO_TAG_FLOW; + currentTag = SUMO_TAG_CALIBRATORFLOW; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_FLOW, SUMO_TAG_CALIBRATOR); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT | TAGPROPERTY_DISJOINTATTRIBUTES, ICON_FLOW, SUMO_TAG_CALIBRATOR); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, - "The id of the vehicle type to use for this vehicle", - DEFAULT_VTYPE_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the route the vehicle shall drive along", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VEHSPERHOUR, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Number of vehicles per hour, equally spaced", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Speed of vehicles", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR, - ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "This vehicle's color", - "yellow"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "First vehicle departure time", - "0.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_END, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "End of departure interval", - "3600.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTLANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The lane on which the vehicle shall be inserted", - "first"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTPOS, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The position at which the vehicle shall enter the net", - "base"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTSPEED, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The speed with which the vehicle shall enter the network", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALLANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The lane at which the vehicle shall leave the network", - "current"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALPOS, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The position at which the vehicle shall leave the network", - "max"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALSPEED, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The speed with which the vehicle shall leave the network", - "current"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "A string specifying the id of a public transport line which can be used when specifying person rides", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PERSON_NUMBER, - ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The number of occupied seats when the vehicle is inserted", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CONTAINER_NUMBER, - ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The number of occupied container places when the vehicle is inserted", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_REROUTE, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Whether the vehicle should be equipped with a rerouting device", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTPOS_LAT, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The lateral position on the departure lane at which the vehicle shall enter the net", - "center", - SUMOXMLDefinitions::LateralAlignments.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALPOS_LAT, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The lateral position on the arrival lane at which the vehicle shall arrive", - "center", - SUMOXMLDefinitions::LateralAlignments.getStrings()); - } - currentTag = SUMO_TAG_ROUTE; - { - // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL, additional, ICON_ROUTE); - // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of Route", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE, - "The edges the vehicle shall drive along, given as their ids, separated using spaces", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR, - ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "This route's color", - "yellow"); + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the vehicle type to use for this vehicle", + DEFAULT_VTYPE_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ROUTE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the route the vehicle shall drive along"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VEHSPERHOUR, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Number of vehicles per hour, equally spaced"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Speed of vehicles"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "This vehicle's color", + "yellow"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_BEGIN, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "First vehicle departure time", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_END, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "End of departure interval", + "3600.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The lane on which the vehicle shall be inserted", + "first"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The position at which the vehicle shall enter the net", + "base"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall enter the network", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane at which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The position at which the vehicle shall leave the network", + "max"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LINE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A string specifying the id of a public transport line which can be used when specifying person rides"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PERSON_NUMBER, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The number of occupied seats when the vehicle is inserted", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_NUMBER, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The number of occupied container places when the vehicle is inserted", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_REROUTE, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether the vehicle should be equipped with a rerouting device", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS_LAT, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lateral position on the departure lane at which the vehicle shall enter the net", + "center"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS_LAT, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lateral position on the arrival lane at which the vehicle shall arrive", + "center"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_REROUTER; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_DIALOG | TAGPROPERTY_WRITECHILDSSEPARATE, additional, ICON_REROUTER); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_DIALOG | TAGPROPERTY_WRITECHILDSSEPARATE, ICON_REROUTER); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of Rerouter", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGES, - ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE, - "An edge id or a list of edge ids where vehicles shall be rerouted", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "X,Y position in editor (Only used in NETEDIT)", - "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The path to the definition file (alternatively, the intervals may defined as children of the rerouter)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_PROBABILITY | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The probability for vehicle rerouting (0-1)", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The waiting time threshold (in s) that must be reached to activate rerouting (default -1 which disables the threshold)", - "0.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The list of vehicle types that shall be affected by this rerouter (empty to affect all types)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_OFF, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Whether the router should be inactive initially (and switched on in the gui)", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of Rerouter"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EDGES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "An edge id or a list of edge ids where vehicles shall be rerouted"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "X,Y position in editor (Only used in NETEDIT)", + "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The path to the definition file (alternatively, the intervals may defined as children of the rerouter)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PROB, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_PROBABILITY | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The probability for vehicle rerouting (0-1)", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HALTING_TIME_THRESHOLD, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The waiting time threshold (in s) that must be reached to activate rerouting (default -1 which disables the threshold)", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VTYPES, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The list of vehicle types that shall be affected by this rerouter (empty to affect all types)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_OFF, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether the router should be inactive initially (and switched on in the gui)", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_INTERVAL; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_REROUTERINTERVAL, SUMO_TAG_REROUTER); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT, ICON_REROUTERINTERVAL, SUMO_TAG_REROUTER); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "Begin", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_END, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "End", - "3600.00"); + attrProperty = AttributeProperties(SUMO_ATTR_BEGIN, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "Begin", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_END, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "End", + "3600.00"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_CLOSING_REROUTE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_CLOSINGREROUTE, SUMO_TAG_INTERVAL); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT, ICON_CLOSINGREROUTE, SUMO_TAG_INTERVAL); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM, - "Edge ID", - "", - SUMO_ATTR_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, - "allowed vehicles", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, - "disallowed vehicles", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_EDGE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM | ATTRPROPERTY_UPDATEGEOMETRY, + "Edge ID"); + attrProperty.setSynonym(SUMO_ATTR_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, + "allowed vehicles"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, + "disallowed vehicles"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_CLOSING_LANE_REROUTE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_CLOSINGLANEREROUTE, SUMO_TAG_INTERVAL); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT, ICON_CLOSINGLANEREROUTE, SUMO_TAG_INTERVAL); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM, - "Lane ID", - "", - SUMO_ATTR_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, - "allowed vehicles", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, - "disallowed vehicles", - ""); + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM | ATTRPROPERTY_UPDATEGEOMETRY, + "Lane ID"); + attrProperty.setSynonym(SUMO_ATTR_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, + "allowed vehicles"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_COMBINABLE | ATTRPROPERTY_OPTIONAL, + "disallowed vehicles"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_DEST_PROB_REROUTE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_DESTPROBREROUTE, SUMO_TAG_INTERVAL); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT, ICON_DESTPROBREROUTE, SUMO_TAG_INTERVAL); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM, - "Edge ID", - "", - SUMO_ATTR_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "SUMO Probability", - "1.00"); + attrProperty = AttributeProperties(SUMO_ATTR_EDGE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM | ATTRPROPERTY_UPDATEGEOMETRY, + "Edge ID"); + attrProperty.setSynonym(SUMO_ATTR_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PROB, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "SUMO Probability", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_PARKING_ZONE_REROUTE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_PARKINGZONEREROUTE, SUMO_TAG_INTERVAL); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT, ICON_PARKINGZONEREROUTE, SUMO_TAG_INTERVAL); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PARKING, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM, - "ParkingArea ID", - "", - SUMO_ATTR_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "SUMO Probability", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VISIBLE, - ATTRPROPERTY_BOOL | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_DEFAULTVALUE, - "Enable or disable visibility for parking area reroutes", - "1"); + attrProperty = AttributeProperties(SUMO_ATTR_PARKING, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM, + "ParkingArea ID"); + attrProperty.setSynonym(SUMO_ATTR_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PROB, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "SUMO Probability", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VISIBLE, + ATTRPROPERTY_BOOL | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_DEFAULTVALUE, + "Enable or disable visibility for parking area reroutes", + "1"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_ROUTE_PROB_REROUTE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_ROUTEPROBREROUTE, SUMO_TAG_INTERVAL); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_PARENT, ICON_ROUTEPROBREROUTE, SUMO_TAG_INTERVAL); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM, - "Route", - "", - SUMO_ATTR_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "SUMO Probability", - "1.00"); + attrProperty = AttributeProperties(SUMO_ATTR_ROUTE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_SYNONYM | ATTRPROPERTY_UPDATEGEOMETRY, + "Route"); + attrProperty.setSynonym(SUMO_ATTR_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PROB, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "SUMO Probability", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_ROUTEPROBE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_EDGE | TAGPROPERTY_SELECTABLE, additional, ICON_ROUTEPROBE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_ROUTEPROBE); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of RouteProbe", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of an edge in the simulation network", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "The frequency in which to report the distribution", - "3600"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, - "The file for generated output", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The time at which to start generating output", - "0"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of RouteProbe"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EDGE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of an edge in the simulation network"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FREQUENCY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "The frequency in which to report the distribution", + "3600"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE, + "The file for generated output"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_BEGIN, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The time at which to start generating output", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_VAPORIZER; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_EDGE | TAGPROPERTY_SELECTABLE, additional, ICON_VAPORIZER); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_ADDITIONAL, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_VAPORIZER); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "Edge in which vaporizer is placed", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "Start Time", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_END, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, - "End Time", - "3600.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Name of " + toString(currentTag), - ""); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "Edge in which vaporizer is placed"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_BEGIN, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "Start Time", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_END, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "End Time", + "3600.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NAME, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Name of " + toString(currentTag)); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_TAZ; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_TAZ | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_BLOCKSHAPE | TAGPROPERTY_AUTOMATICSORTING, taz, ICON_TAZ); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_TAZ, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_BLOCKSHAPE | TAGPROPERTY_AUTOMATICSORTING, ICON_TAZ); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the TAZ", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE, - "The shape of the TAZ", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR, - ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The RGBA color with which the TAZ shall be displayed", - "red"); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of the TAZ"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The shape of the TAZ"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The RGBA color with which the TAZ shall be displayed", + "red"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_TAZSOURCE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_TAZ | TAGPROPERTY_PARENT, taz, ICON_TAZEDGE, SUMO_TAG_TAZ); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_TAZ, TAGPROPERTY_PARENT, ICON_TAZEDGE, SUMO_TAG_TAZ); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_SYNONYM, - "The id of edge in the simulation network", - "", - SUMO_ATTR_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WEIGHT, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "Depart weight associated to this Edge", - "1"); + attrProperty = AttributeProperties(SUMO_ATTR_EDGE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_SYNONYM | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of edge in the simulation network"); + attrProperty.setSynonym(SUMO_ATTR_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WEIGHT, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "Depart weight associated to this Edge", + "1"); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_TAZSINK; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_TAZ | TAGPROPERTY_PARENT, taz, ICON_TAZEDGE, SUMO_TAG_TAZ); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_TAZ, TAGPROPERTY_PARENT, ICON_TAZEDGE, SUMO_TAG_TAZ); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_SYNONYM, - "The id of edge in the simulation network", - "", - SUMO_ATTR_ID); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WEIGHT, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "Arrival weight associated to this Edget", - "1"); + attrProperty = AttributeProperties(SUMO_ATTR_EDGE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_NONEDITABLE | ATTRPROPERTY_SYNONYM | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of edge in the simulation network"); + attrProperty.setSynonym(SUMO_ATTR_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WEIGHT, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "Arrival weight associated to this Edget", + "1"); + myTagProperties[currentTag].addAttribute(attrProperty); } - currentTag = SUMO_TAG_VTYPE; +} + + +void +GNEAttributeCarrier::fillShapes() { + // declare empty AttributeProperties + AttributeProperties attrProperty; + // fill shape ACs + SumoXMLTag currentTag = SUMO_TAG_POLY; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_VTYPE); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_SHAPE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_BLOCKSHAPE | TAGPROPERTY_CLOSESHAPE | TAGPROPERTY_GEOSHAPE, ICON_LOCATEPOLY /* temporal */); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of VehicleType", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ACCEL, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The acceleration ability of vehicles of this type [m/s^2]", - "2.60"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_DECEL, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The deceleration ability of vehicles of this type [m/s^2]", - "4.50"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SIGMA, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_RANGE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Car-following model parameter", - "0.50", - 0, 1); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TAU, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Car-following model parameter", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The vehicle's netto-length (length) [m]", - "5.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_MINGAP, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Empty space after leader [m]", - "2.50"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_MAXSPEED, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The vehicle's maximum velocity [m/s]", - "70.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEEDFACTOR, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The vehicles expected multiplicator for lane speed limits", - "1.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEEDDEV, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The deviation of the speedFactor", - "0.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR, - ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "This vehicle type's color", - "1,1,0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_VCLASS, - ATTRPROPERTY_VCLASS | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "An abstract vehicle class", - "passenger", - SumoVehicleClassStrings.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_EMISSIONCLASS, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "An abstract emission class", - "PC_G_EU4", - emissions); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_GUISHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "How this vehicle is rendered", - "", - SumoVehicleShapeStrings.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The vehicle's width [m] (only used for drawing)", - "2.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Image file for rendering vehicles of this type (should be grayscale to allow functional coloring)", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMPATIENCE, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Willingess of drivers to impede vehicles with higher priority", - "0.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE_CHANGE_MODEL, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The model used for changing lanes", - "LC2013", - SUMOXMLDefinitions::LaneChangeModels.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The model used for car following", - "Krauss", - SUMOXMLDefinitions::CarFollowModels.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_PERSON_CAPACITY, - ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The number of persons (excluding an autonomous driver) the vehicle can transport", - "4"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_CONTAINER_CAPACITY, - ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The number of containers the vehicle can transport", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_BOARDING_DURATION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The time required by a person to board the vehicle", - "0.50"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LOADING_DURATION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The time required to load a container onto the vehicle", - "90.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LATALIGNMENT, - ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The preferred lateral alignment when using the sublane-model", - "center", - SUMOXMLDefinitions::LateralAlignments.getStrings()); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_MINGAP_LAT, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The minimum lateral gap at a speed difference of 50km/h when using the sublane-model", - "0.12"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_MAXSPEED_LAT, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The maximum lateral speed when using the sublane-model", - "1.00"); - } - currentTag = SUMO_TAG_POLY; - { - // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_SHAPE | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_BLOCKSHAPE | TAGPROPERTY_CLOSESHAPE | TAGPROPERTY_GEOSHAPE, shape, ICON_LOCATEPOLY /* temporal */); - // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the polygon", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE, - "The shape of the polygon", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR, - ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The RGBA color with which the polygon shall be displayed", - "red"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILL, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE, - "An information whether the polygon shall be filled", - "0"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINEWIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, - "The default line width for drawing an unfilled polygon", - "1"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LAYER, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE, - "The layer in which the polygon lies", - toString(Shape::DEFAULT_LAYER)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "A typename for the polygon", - toString(Shape::DEFAULT_TYPE)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "A bitmap to use for rendering this polygon", - toString(Shape::DEFAULT_IMG_FILE)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_RELATIVEPATH, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Enable or disable use image file as a relative path", - toString(Shape::DEFAULT_RELATIVEPATH)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Angle of rendered image in degree", - toString(Shape::DEFAULT_ANGLE)); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of the polygon"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE, + "The shape of the polygon"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The RGBA color with which the polygon shall be displayed", + "red"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FILL, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "An information whether the polygon shall be filled", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LINEWIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The default line width for drawing an unfilled polygon", + "1"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LAYER, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The layer in which the polygon lies", + toString(Shape::DEFAULT_LAYER)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A typename for the polygon", + toString(Shape::DEFAULT_TYPE)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A bitmap to use for rendering this polygon", + toString(Shape::DEFAULT_IMG_FILE)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_RELATIVEPATH, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Enable or disable use image file as a relative path", + toString(Shape::DEFAULT_RELATIVEPATH)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ANGLE, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Angle of rendered image in degree", + toString(Shape::DEFAULT_ANGLE)); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_POI; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_SHAPE | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_VIEW | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_GEOPOSITION, shape, ICON_LOCATEPOI /* temporal */); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_SHAPE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT | TAGPROPERTY_MASKXYZPOSITION | TAGPROPERTY_GEOPOSITION, ICON_LOCATEPOI /* temporal */); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the POI", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y - "The position in view", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR, - ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The color with which the poi shall be displayed", - "red"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "A typename for the poi", - toString(Shape::DEFAULT_TYPE)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LAYER, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, - "The layer of the poi for drawing and selecting", - toString(Shape::DEFAULT_LAYER_POI)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Width of rendered image in meters", - toString(Shape::DEFAULT_IMG_WIDTH)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HEIGHT, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Height of rendered image in meters", - toString(Shape::DEFAULT_IMG_HEIGHT)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "A bitmap to use for rendering this poi", - toString(Shape::DEFAULT_IMG_FILE)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_RELATIVEPATH, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Enable or disable use image file as a relative path", - toString(Shape::DEFAULT_RELATIVEPATH)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Angle of rendered image in degree", - toString(Shape::DEFAULT_ANGLE)); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of the POI"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y + "The position in view"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The color with which the poi shall be displayed", + "red"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A typename for the poi", + toString(Shape::DEFAULT_TYPE)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LAYER, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The layer of the poi for drawing and selecting", + toString(Shape::DEFAULT_LAYER_POI)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Width of rendered image in meters", + toString(Shape::DEFAULT_IMG_WIDTH)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HEIGHT, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Height of rendered image in meters", + toString(Shape::DEFAULT_IMG_HEIGHT)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A bitmap to use for rendering this poi", + toString(Shape::DEFAULT_IMG_FILE)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_RELATIVEPATH, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Enable or disable use image file as a relative path", + toString(Shape::DEFAULT_RELATIVEPATH)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ANGLE, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Angle of rendered image in degree", + toString(Shape::DEFAULT_ANGLE)); + myTagProperties[currentTag].addAttribute(attrProperty); } currentTag = SUMO_TAG_POILANE; { // set values of tag - myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_SHAPE | TAGPROPERTY_DRAWABLE | TAGPROPERTY_PLACEDOVER_LANE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT, shape, ICON_LOCATEPOI /* temporal */); + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_SHAPE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_BLOCKMOVEMENT, ICON_LOCATEPOI /* temporal */); // set values of attributes - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The id of the POI", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE, - ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, - "The name of the lane the poi is located at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE, - "The position on the named lane or in the net in meters at which the poi is located at", - ""); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION_LAT, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The lateral offset on the named lane at which the poi is located at", - "0.00"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR, - ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "The color with which the poi shall be displayed", - "red"); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE, - ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "A typename for the poi", - toString(Shape::DEFAULT_TYPE)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_LAYER, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, - "The layer of the poi for drawing and selecting", - toString(Shape::DEFAULT_LAYER_POI)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Width of rendered image in meters", - toString(Shape::DEFAULT_IMG_WIDTH)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_HEIGHT, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Height of rendered image in meters", - toString(Shape::DEFAULT_IMG_HEIGHT)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE, - ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "A bitmap to use for rendering this poi", - toString(Shape::DEFAULT_IMG_FILE)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_RELATIVEPATH, - ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Enable or disable use image file as a relative path", - toString(Shape::DEFAULT_RELATIVEPATH)); - myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE, - ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, - "Angle of rendered image in degree", - toString(Shape::DEFAULT_ANGLE)); + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of the POI"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The name of the lane the poi is located at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The position on the named lane or in the net in meters at which the poi is located at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_POSITION_LAT, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The lateral offset on the named lane at which the poi is located at", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The color with which the poi shall be displayed", + "red"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A typename for the poi", + toString(Shape::DEFAULT_TYPE)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LAYER, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The layer of the poi for drawing and selecting", + toString(Shape::DEFAULT_LAYER_POI)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Width of rendered image in meters", + toString(Shape::DEFAULT_IMG_WIDTH)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_HEIGHT, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Height of rendered image in meters", + toString(Shape::DEFAULT_IMG_HEIGHT)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A bitmap to use for rendering this poi", + toString(Shape::DEFAULT_IMG_FILE)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_RELATIVEPATH, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Enable or disable use image file as a relative path", + toString(Shape::DEFAULT_RELATIVEPATH)); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ANGLE, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_ANGLE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Angle of rendered image in degree", + toString(Shape::DEFAULT_ANGLE)); + myTagProperties[currentTag].addAttribute(attrProperty); } - // check integrity of all Tags (function checkTagIntegrity() throw an exception if there is an inconsistency) - for (const auto &i : myTagProperties) { - i.second.checkTagIntegrity(); +} + + +void +GNEAttributeCarrier::fillDemandElements() { + // declare empty AttributeProperties + AttributeProperties attrProperty; + // obtain a vector string with the emissions + std::vector emissions = { "zero", "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", "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" + }; + // fill demand elements + SumoXMLTag currentTag = SUMO_TAG_ROUTE; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_ROUTE); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of Route"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EDGES, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The edges the vehicle shall drive along, given as their ids, separated using spaces"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "This route's color", + "yellow"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + currentTag = SUMO_TAG_VTYPE; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT, 0, ICON_VTYPE); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The id of VehicleType"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VCLASS, + ATTRPROPERTY_VCLASS | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "An abstract vehicle class", + "passenger"); + attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "This vehicle type's color", + ""); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LENGTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The vehicle's netto-length (length) [m]", + "5.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_MINGAP, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Empty space after leader [m]", + "2.50"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_MAXSPEED, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The vehicle's maximum velocity [m/s]", + "55.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPEEDFACTOR, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The vehicles expected multiplicator for lane speed limits", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SPEEDDEV, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The deviation of the speedFactor", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EMISSIONCLASS, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "An abstract emission class", + "PC_G_EU4"); + attrProperty.setDiscreteValues(emissions); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_GUISHAPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "How this vehicle is rendered"); + attrProperty.setDiscreteValues(SumoVehicleShapeStrings.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_WIDTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The vehicle's width [m] (only used for drawing)", + "1.8"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE, + ATTRPROPERTY_STRING | ATTRPROPERTY_FILENAME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Image file for rendering vehicles of this type (should be grayscale to allow functional coloring)"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LANE_CHANGE_MODEL, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The model used for changing lanes", + "default"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::LaneChangeModels.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CAR_FOLLOW_MODEL, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The model used for car following", + "Krauss"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::CarFollowModels.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PERSON_CAPACITY, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The number of persons (excluding an autonomous driver) the vehicle can transport", + "4"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_CAPACITY, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The number of containers the vehicle can transport", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_BOARDING_DURATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The time required by a person to board the vehicle", + "0.50"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LOADING_DURATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The time required to load a container onto the vehicle", + "90.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LATALIGNMENT, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The preferred lateral alignment when using the sublane-model", + "center"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings()); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_MINGAP_LAT, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The minimum lateral gap at a speed difference of 50km/h when using the sublane-model", + "0.12"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_MAXSPEED_LAT, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The maximum lateral speed when using the sublane-model", + "1.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ACTIONSTEPLENGTH, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The interval length for which vehicle performs its decision logic (acceleration and lane-changing)", + toString(OptionsCont::getOptions().getFloat("default.action-step-length"))); + myTagProperties[currentTag].addAttribute(attrProperty); + + // fill Car Following Model Values (implemented in a separated function to improve code legibility) + fillCarFollowingModelAttributes(); + // fill Junction Model Parameters (implemented in a separated function to improve code legibility) + fillJunctionModelAttributes(); + } + currentTag = SUMO_TAG_VEHICLE; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_VEHICLE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_VEHICLE); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The name of the vehicle"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, + "The id of the vehicle type to use for this vehicle", + DEFAULT_VTYPE_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ROUTE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the route the vehicle shall drive along"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE, + "This vehicle's color", + "yellow"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPART, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "The time step at which the vehicle shall enter the network", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane on which the vehicle shall be inserted", + "first"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The position at which the vehicle shall enter the net", + "base"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The speed with which the vehicle shall enter the network", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The lane at which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The position at which the vehicle shall leave the network", + "max"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The speed with which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LINE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A string specifying the id of a public transport line which can be used when specifying person rides"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PERSON_NUMBER, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The number of occupied seats when the vehicle is inserted", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_NUMBER, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The number of occupied container places when the vehicle is inserted", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_REROUTE, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether the vehicle should be equipped with a rerouting device", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VIA, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of intermediate edges that shall be passed on rerouting"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS_LAT, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The lateral position on the departure lane at which the vehicle shall enter the net", + "center"); + /*attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings());*/ + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS_LAT, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The lateral position on the arrival lane at which the vehicle shall arrive", + "center"); + /*attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings());*/ + myTagProperties[currentTag].addAttribute(attrProperty); + } + currentTag = SUMO_TAG_FLOW; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_VEHICLE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_DISJOINTATTRIBUTES, ICON_FLOW); + myTagProperties[currentTag].setDisjointAttributes({SUMO_ATTR_NUMBER, SUMO_ATTR_END, SUMO_ATTR_VEHSPERHOUR, SUMO_ATTR_PERIOD, SUMO_ATTR_PROB}); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE, + "The name of the vehicle"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the vehicle type to use for this vehicle", + DEFAULT_VTYPE_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ROUTE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The id of the route the vehicle shall drive along"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_COLOR | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "This vehicle's color", + "yellow"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane on which the vehicle shall be inserted", + "first"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The position at which the vehicle shall enter the net", + "base"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall enter the network", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane at which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The position at which the vehicle shall leave the network", + "max"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_LINE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "A string specifying the id of a public transport line which can be used when specifying person rides"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PERSON_NUMBER, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The number of occupied seats when the vehicle is inserted", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_NUMBER, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The number of occupied container places when the vehicle is inserted", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_REROUTE, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether the vehicle should be equipped with a rerouting device", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS_LAT, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The lateral position on the departure lane at which the vehicle shall enter the net", + "center"); + /*attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings());*/ + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS_LAT, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */, + "The lateral position on the arrival lane at which the vehicle shall arrive", + "center"); + /*attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings());*/ + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_BEGIN, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "First vehicle departure time", + "0.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_END, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_TIME | ATTRPROPERTY_DEFAULTVALUE, + "End of departure interval", + "3600.00"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_NUMBER, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "probability for emitting a vehicle each second (not together with vehsPerHour or period)", + "1800"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VEHSPERHOUR, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Number of vehicles per hour, equally spaced (not together with period or probability)", + "1800"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PERIOD, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Insert equally spaced vehicles at that period (not together with vehsPerHour or probability)", + "2"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PROB, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "probability for emitting a vehicle each second (not together with vehsPerHour or period)", + "0.5"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + currentTag = SUMO_TAG_TRIP; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_VEHICLE, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_TRIP); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, + "The name of vehicles that will be generated using this trip definition"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, + "The id of the vehicle type to use for this vehicle", + DEFAULT_VTYPE_ID); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPART, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "The departure time of the (first) vehicle which is generated using this trip definition", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FROM, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the edge the route starts at; the edge must be a part of the used network"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TO, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the edge the route ends at; the edge must be a part of the used network"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_VIA, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST, + "List of intermediate edge ids which shall be part of the route; the edges must be a part of the used network"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_COLOR | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_DEFAULTVALUE, + "This generated vehicle's color", + "yellow"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane on which the vehicle shall be inserted", + "first"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The position at which the vehicle shall enter the net", + "base"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall enter the network", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane at which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The position at which the vehicle shall leave the network", + "max"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + /* currently disabled. See #5259 + currentTag = SUMO_TAG_TRIP_TAZ; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_VEHICLE, TAGPROPERTY_DRAWABLE, ICON_TRIP); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE, + "The name of vehicles that will be generated using this trip definition"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPART, + ATTRPROPERTY_INT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE, + "The departure time of the (first) vehicle which is generated using this trip definition", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FROM_TAZ, + ATTRPROPERTY_STRING, + "The name of the district the route starts at. TAZ edges are selected so that travel time is minimized"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TO_TAZ, + ATTRPROPERTY_STRING, + "The name of the district the route ends at. TAZ edges are selected so that travel time is minimized"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLOR, + ATTRPROPERTY_COLOR | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_DEFAULTVALUE, + "This generated vehicle's color", + "yellow"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane on which the vehicle shall be inserted", + "first"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The position at which the vehicle shall enter the net", + "base"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DEPARTSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall enter the network", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALLANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The lane at which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALPOS, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The position at which the vehicle shall leave the network", + "max"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ARRIVALSPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The speed with which the vehicle shall leave the network", + "current"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + */ + currentTag = SUMO_TAG_STOP_LANE; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_STOP, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE | TAGPROPERTY_MASKSTARTENDPOS, ICON_STOPELEMENT); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_LANE, + ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "The name of the lane the stop shall be located at"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The begin position on the lane (the lower position on the lane) in meters"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_UPDATEGEOMETRY, + "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_FRIENDLY_POS, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DURATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "Minimum duration for stopping", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_UNTIL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "The time step at which the route continues", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_INDEX, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Where to insert the stop in the vehicle's list of stops", + "end"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a person may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of persons that must board the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a container may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED_CONTAINERS, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of containers that must be loaded onto the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PARKING, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "whether the vehicle stops on the road or beside ", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ACTTYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Activity displayed for stopped person in GUI and output files ", + "waiting"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIP_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Value used for trips that uses this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + currentTag = SUMO_TAG_STOP_BUSSTOP; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_STOP, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_STOPELEMENT); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_BUS_STOP, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "BusStop associated with this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DURATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "Minimum duration for stopping", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_UNTIL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "The time step at which the route continues", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_INDEX, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Where to insert the stop in the vehicle's list of stops", + "end"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a person may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of persons that must board the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a container may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED_CONTAINERS, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of containers that must be loaded onto the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PARKING, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "whether the vehicle stops on the road or beside ", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ACTTYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Activity displayed for stopped person in GUI and output files ", + "waiting"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIP_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Value used for trips that uses this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + currentTag = SUMO_TAG_STOP_CONTAINERSTOP; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_STOP, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_STOPELEMENT); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_STOP, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "ContainerStop associated with this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DURATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "Minimum duration for stopping", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_UNTIL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "The time step at which the route continues", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_INDEX, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Where to insert the stop in the vehicle's list of stops", + "end"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a person may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of persons that must board the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a container may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED_CONTAINERS, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of containers that must be loaded onto the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PARKING, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "whether the vehicle stops on the road or beside ", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ACTTYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Activity displayed for stopped person in GUI and output files ", + "waiting"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIP_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Value used for trips that uses this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + currentTag = SUMO_TAG_STOP_CHARGINGSTATION; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_STOP, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_STOPELEMENT); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_CHARGING_STATION, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "ChargingStation associated with this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DURATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "Minimum duration for stopping", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_UNTIL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "The time step at which the route continues", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_INDEX, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Where to insert the stop in the vehicle's list of stops", + "end"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a person may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of persons that must board the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a container may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED_CONTAINERS, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of containers that must be loaded onto the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PARKING, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "whether the vehicle stops on the road or beside ", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ACTTYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Activity displayed for stopped person in GUI and output files ", + "waiting"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIP_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Value used for trips that uses this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + } + currentTag = SUMO_TAG_STOP_PARKINGAREA; + { + // set values of tag + myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_STOP, TAGPROPERTY_DRAWABLE | TAGPROPERTY_SELECTABLE, ICON_STOPELEMENT); + // set values of attributes + attrProperty = AttributeProperties(SUMO_ATTR_PARKING_AREA, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, + "ParkingArea associated with this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DURATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "Minimum duration for stopping", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_UNTIL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE, + "The time step at which the route continues", + "0"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_INDEX, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Where to insert the stop in the vehicle's list of stops", + "end"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a person may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of persons that must board the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CONTAINER_TRIGGERED, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Whether a container may end the stop", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED_CONTAINERS, + ATTRPROPERTY_STRING | ATTRPROPERTY_LIST | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "List of containers that must be loaded onto the vehicle before it may continue"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_PARKING, + ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "whether the vehicle stops on the road or beside ", + "false"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_ACTTYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Activity displayed for stopped person in GUI and output files ", + "waiting"); + myTagProperties[currentTag].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRIP_ID, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Value used for trips that uses this stop"); + myTagProperties[currentTag].addAttribute(attrProperty); } } -/****************************************************************************/ +void +GNEAttributeCarrier::fillCarFollowingModelAttributes() { + // declare empty AttributeProperties + AttributeProperties attrProperty; + attrProperty = AttributeProperties(SUMO_ATTR_ACCEL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The acceleration ability of vehicles of this type [m/s^2]", + "2.60"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_DECEL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "The deceleration ability of vehicles of this type [m/s^2]", + "4.50"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_APPARENTDECEL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The apparent deceleration of the vehicle as used by the standard model [m/s^2]", + "4.50"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_EMERGENCYDECEL, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The maximal physically possible deceleration for the vehicle [m/s^2]", + "4.50"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_SIGMA, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_RANGE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Car-following model parameter", + "0.50"); + attrProperty.setRange(0, 1); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TAU, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL, + "Car-following model parameter", + "1.00"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TMP1, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "SKRAUSSX parameter 1", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TMP2, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "SKRAUSSX parameter 2", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TMP3, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "SKRAUSSX parameter 3", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TMP4, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "SKRAUSSX parameter 4", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TMP5, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "SKRAUSSX parameter 5", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_PWAGNER2009_TAULAST, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Peter Wagner 2009 parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_PWAGNER2009_APPROB, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Peter Wagner 2009 parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "IDMM parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_IDMM_ADAPT_TIME, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "IDMM parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_WIEDEMANN_SECURITY, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Wiedemann parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Wiedemann parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_COLLISION_MINGAP_FACTOR, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "MinGap factor parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_K, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "K parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + + attrProperty = AttributeProperties(SUMO_ATTR_CF_KERNER_PHI, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Kerner Phi parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_IDM_DELTA, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "IDM Delta parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_CF_IDM_STEPPING, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "IDM Stepping parameter", + ""); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_TRAIN_TYPE, + ATTRPROPERTY_STRING | ATTRPROPERTY_DISCRETE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Train Types", + "NGT400"); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::TrainTypes.getStrings()); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); +} + + +void +GNEAttributeCarrier::fillJunctionModelAttributes() { + // declare empty AttributeProperties + AttributeProperties attrProperty; + attrProperty = AttributeProperties(SUMO_ATTR_JM_CROSSING_GAP, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Minimum distance to pedestrians that are walking towards the conflict point with the ego vehicle.", + "10"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "The accumulated waiting time after which a vehicle will drive onto an intersection even though this might cause jamming.", + "-1"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "This value causes vehicles to violate a red light if the duration of the red phase is lower than the given threshold.", + "-1"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JM_DRIVE_RED_SPEED, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "This value causes vehicles affected by jmDriveAfterRedTime to slow down when violating a red light.", + "maxSpeed"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JM_IGNORE_FOE_PROB, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "This value causes vehicles to ignore foe vehicles that have right-of-way with the given probability.", + "0"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JM_IGNORE_FOE_SPEED, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "This value is used in conjunction with jmIgnoreFoeProb. Only vehicles with a speed below or equal to the given value may be ignored.", + "0"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JM_SIGMA_MINOR, + ATTRPROPERTY_STRING | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "This value configures driving imperfection (dawdling) while passing a minor link.", + "sigma"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_JM_TIMEGAP_MINOR, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "This value defines the minimum time gap when passing ahead of a prioritized vehicle. ", + "1"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); + + attrProperty = AttributeProperties(SUMO_ATTR_IMPATIENCE, + ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_OPTIONAL | ATTRPROPERTY_EXTENDED, + "Willingess of drivers to impede vehicles with higher priority", + "0.00"); + myTagProperties[SUMO_TAG_VTYPE].addAttribute(attrProperty); +} + + +bool +GNEAttributeCarrier::checkParsedAttribute(const TagProperties& tagProperties, + const AttributeProperties& attrProperties, const SumoXMLAttr attribute, + std::string& defaultValue, std::string& parsedAttribute, std::string& warningMessage) { + // declare a string for details about error formats + std::string errorFormat; + // set extra check for ID Values + if (attribute == SUMO_ATTR_ID) { + if (parsedAttribute.empty()) { + errorFormat = "ID cannot be empty; "; + } else if (tagProperties.isDetector()) { + // special case for detectors (because in this case empty spaces are allowed) + if (SUMOXMLDefinitions::isValidDetectorID(parsedAttribute) == false) { + errorFormat = "Detector ID contains invalid characters; "; + } + } else if (tagProperties.isDemandElement()) { + // special case for detectors (because in this case empty spaces are allowed) + if (SUMOXMLDefinitions::isValidVehicleID(parsedAttribute) == false) { + errorFormat = "Demand Element ID contains invalid characters; "; + } + } else if (SUMOXMLDefinitions::isValidNetID(parsedAttribute) == false) { + errorFormat = "ID contains invalid characters; "; + } + } + // Set extra checks for int values + if (attrProperties.isInt()) { + if (canParse(parsedAttribute)) { + // obtain int value + int parsedIntAttribute = parse(parsedAttribute); + // check if attribute can be negative or zero + if (attrProperties.isPositive() && (parsedIntAttribute < 0)) { + errorFormat = "Cannot be negative; "; + } else if (attrProperties.cannotBeZero() && (parsedIntAttribute == 0)) { + errorFormat = "Cannot be zero; "; + } + } else if (canParse(parsedAttribute)) { + errorFormat = "Float cannot be reinterpreted as int; "; + } else { + errorFormat = "Cannot be parsed to int; "; + } + } + // Set extra checks for float(double) values + if (attrProperties.isFloat()) { + if (canParse(parsedAttribute)) { + // obtain double value + double parsedDoubleAttribute = parse(parsedAttribute); + //check if can be negative and Zero + if (attrProperties.isPositive() && (parsedDoubleAttribute < 0)) { + errorFormat = "Cannot be negative; "; + } else if (attrProperties.cannotBeZero() && (parsedDoubleAttribute == 0)) { + errorFormat = "Cannot be zero; "; + } + } else { + errorFormat = "Cannot be parsed to float; "; + } + } + // Set extra checks for bool values + if (attrProperties.isBool()) { + if (!canParse(parsedAttribute)) { + errorFormat = "Cannot be parsed to boolean; "; + } + } + // Set extra checks for position values + if (attrProperties.isposition()) { + // check if we're parsing a single position or an entire shape + if (attrProperties.isList()) { + // check if parsed attribute can be parsed to Position Vector + if (!canParse(parsedAttribute)) { + errorFormat = "List of Positions aren't neither x,y nor x,y,z; "; + } + } else if (!canParse(parsedAttribute)) { + errorFormat = "Position is neither x,y nor x,y,z; "; + } + } + // set extra check for time(double) values + if (attrProperties.isTime()) { + if (canParse(parsedAttribute)) { + // parse to SUMO Real and check if is negative + if (parse(parsedAttribute) < 0) { + errorFormat = "Time cannot be negative; "; + } + } else { + errorFormat = "Cannot be parsed to time; "; + } + } + // set extra check for probability values + if (attrProperties.isProbability()) { + if (canParse(parsedAttribute)) { + // parse to double and check if is between [0,1] + double probability = parse(parsedAttribute); + if (probability < 0) { + errorFormat = "Probability cannot be smaller than 0; "; + } else if (probability > 1) { + errorFormat = "Probability cannot be greather than 1; "; + } + } else { + errorFormat = "Cannot be parsed to probability; "; + } + } + // set extra check for range values + if (attrProperties.hasAttrRange()) { + if (canParse(parsedAttribute)) { + // parse to double and check if is in range + double range = parse(parsedAttribute); + if (range < attrProperties.getMinimumRange()) { + errorFormat = "Float cannot be smaller than " + toString(attrProperties.getMinimumRange()) + "; "; + } else if (range > attrProperties.getMaximumRange()) { + errorFormat = "Float cannot be greather than " + toString(attrProperties.getMaximumRange()) + "; "; + } + } else { + errorFormat = "Cannot be parsed to float; "; + } + } + // set extra check for discrete values + if (attrProperties.isDiscrete()) { + // search value in the list of discretes values of attribute properties + auto finder = std::find(attrProperties.getDiscreteValues().begin(), attrProperties.getDiscreteValues().end(), parsedAttribute); + // check if attribute is valid + if (finder == attrProperties.getDiscreteValues().end()) { + errorFormat = "value is not within the set of allowed values for attribute '" + toString(attribute) + "'"; + } + } + // set extra check for color values + if (attrProperties.isColor() && !canParse(parsedAttribute)) { + errorFormat = "Invalid RGB format or named color; "; + } + // set extra check for filename values + if (attrProperties.isFilename()) { + if (SUMOXMLDefinitions::isValidFilename(parsedAttribute) == false) { + errorFormat = "Filename contains invalid characters; "; + } else if (parsedAttribute.empty() && !attrProperties.isOptional()) { + errorFormat = "Filename cannot be empty; "; + } + } + // set extra check for name values + if ((attribute == SUMO_ATTR_NAME) && !SUMOXMLDefinitions::isValidAttribute(parsedAttribute)) { + errorFormat = "name contains invalid characters; "; + } + // set extra check for SVCPermissions values + if (attrProperties.isVClass()) { + if (!canParseVehicleClasses(parsedAttribute)) { + errorFormat = "List of VClasses isn't valid; "; + parsedAttribute = defaultValue; + } + } + // set extra check for RouteProbes + if ((attribute == SUMO_ATTR_ROUTEPROBE) && !SUMOXMLDefinitions::isValidNetID(parsedAttribute)) { + errorFormat = "RouteProbe ID contains invalid characters; "; + } + // set extra check for list of edges + if ((attribute == SUMO_ATTR_EDGES) && parsedAttribute.empty()) { + errorFormat = "List of edges cannot be empty; "; + } + // set extra check for list of lanes + if ((attribute == SUMO_ATTR_LANES) && parsedAttribute.empty()) { + errorFormat = "List of lanes cannot be empty; "; + } + // set extra check for list of VTypes + if ((attribute == SUMO_ATTR_VTYPES) && !parsedAttribute.empty() && !SUMOXMLDefinitions::isValidListOfTypeID(parsedAttribute)) { + errorFormat = "List of vTypes contains invalid characters; "; + } + // set extra check for list of RouteProbe + if ((attribute == SUMO_ATTR_ROUTEPROBE) && !parsedAttribute.empty() && !SUMOXMLDefinitions::isValidNetID(parsedAttribute)) { + errorFormat = "RouteProbe ID contains invalid characters; "; + } + // If attribute has an invalid format + if (errorFormat.size() > 0) { + // if attribute is optional and has a default value, obtain it as string. In other case, abort. + if (attrProperties.isOptional() && attrProperties.hasDefaultValue()) { + WRITE_DEBUG("Format of optional " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " + + warningMessage + " is invalid; " + errorFormat + "Default value will be used."); + // set default value defined in AttrProperties + parsedAttribute = attrProperties.getDefaultValue(); + } else { + WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " + + warningMessage + " is invalid; " + errorFormat + tagProperties.getTagStr() + " cannot be created"); + // set default value (To avoid errors in parse(parsedAttribute)) + parsedAttribute = defaultValue; + // return false to abort creation of element + return false; + } + } + // return true to continue creation of element + return true; +} + + +bool +GNEAttributeCarrier::parseMaskedPositionAttribute(const SUMOSAXAttributes& attrs, const std::string& objectID, const TagProperties& tagProperties, + const AttributeProperties& attrProperties, std::string& parsedAttribute, std::string& warningMessage) { + // if element can mask their XYPosition, then must be extracted X Y coordiantes separeted + std::string x, y, z; + bool parsedOk = true; + // give a default value to parsedAttribute to avoid problem parsing invalid positions + parsedAttribute = "0,0"; + if (attrs.hasAttribute(SUMO_ATTR_X)) { + x = attrs.get(SUMO_ATTR_X, objectID.c_str(), parsedOk, false); + // check that X attribute is valid + if (!canParse(x)) { + WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_X) + "' of " + + warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created"); + // abort parsing (and creation) of element + return false; + } + } else { + WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_X) + "' of " + + warningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created"); + // abort parsing (and creation) of element + return false; + } + if (attrs.hasAttribute(SUMO_ATTR_Y)) { + y = attrs.get(SUMO_ATTR_Y, objectID.c_str(), parsedOk, false); + // check that X attribute is valid + if (!canParse(y)) { + WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Y) + "' of " + + warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created"); + // abort parsing (and creation) of element + return false; + } + } else { + WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Y) + "' of " + + warningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created"); + // abort parsing (and creation) of element + return false; + } + // Z attribute is optional + if (attrs.hasAttribute(SUMO_ATTR_Z)) { + z = attrs.get(SUMO_ATTR_Z, objectID.c_str(), parsedOk, false); + // check that Z attribute is valid + if (!canParse(z)) { + WRITE_WARNING("Format of optional " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Z) + "' of " + + warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created"); + // leave Z attribute empty + z.clear(); + } + } + // create Position attribute using parsed coordinates X, Y and, optionally, Z + if (z.empty()) { + parsedAttribute = x + "," + y; + } else { + parsedAttribute = x + "," + y + "," + z; + } + // continue creation of element + return true; +} +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEAttributeCarrier.h sumo-1.2.0+dfsg1/src/netedit/GNEAttributeCarrier.h --- sumo-1.1.0+dfsg1/src/netedit/GNEAttributeCarrier.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEAttributeCarrier.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,45 +52,53 @@ * inherits from GNEReferenceCounter for convenience */ class GNEAttributeCarrier : public GNEReferenceCounter { + /// @brief declare friend class friend class GNEChange_Attribute; public: + + // @brief declare class TagProperties + class TagProperties; + /// @brief struct with the tag Properties enum AttrProperty { - ATTRPROPERTY_INT = 1 << 0, // Attribute is an integer (Including Zero) - ATTRPROPERTY_FLOAT = 1 << 1, // Attribute is a float - ATTRPROPERTY_BOOL = 1 << 2, // Attribute is boolean (0/1, true/false) - ATTRPROPERTY_STRING = 1 << 3, // Attribute is a string - ATTRPROPERTY_POSITION = 1 << 4, // Attribute is a position defined by doubles (x,y or x,y,z) - ATTRPROPERTY_COLOR = 1 << 5, // Attribute is a color defined by a specifically word (Red, green) or by a special format (XXX,YYY,ZZZ) - ATTRPROPERTY_VCLASS = 1 << 6, // Attribute is a VClass (passenger, bus, motorcicle...) - ATTRPROPERTY_POSITIVE = 1 << 7, // Attribute is positive (Including Zero) - ATTRPROPERTY_NOTZERO = 1 << 8, // Attribute cannot be 0 (only for numerical attributes) - ATTRPROPERTY_UNIQUE = 1 << 9, // Attribute is unique (cannot be edited in a selection of similar elements (ID, Position...) - ATTRPROPERTY_FILENAME = 1 << 10, // Attribute is a filename (string that cannot contains certain characters) - ATTRPROPERTY_NONEDITABLE = 1 << 11, // Attribute is non editable (index of a lane) - ATTRPROPERTY_DISCRETE = 1 << 12, // Attribute is discrete (only certain values are allowed) - ATTRPROPERTY_PROBABILITY = 1 << 13, // Attribute is probability (only allowed values between 0 and 1, including both) - ATTRPROPERTY_TIME = 1 << 14, // Attribute is a Time (float positive) - ATTRPROPERTY_ANGLE = 1 << 15, // Attribute is an angle (only takes values between 0 and 360, including both, another value will be automatically reduced - ATTRPROPERTY_LIST = 1 << 16, // Attribute is a list of other elements separated by spaces - ATTRPROPERTY_SECUENCIAL = 1 << 17, // Attribute is a special sequence of elements (for example: secuencial lanes in Multi Lane E2 detectors) - ATTRPROPERTY_OPTIONAL = 1 << 18, // Attribute is optional - ATTRPROPERTY_DEFAULTVALUE = 1 << 19, // Attribute owns a default value - ATTRPROPERTY_COMBINABLE = 1 << 20, // Attribute is combinable with other Attribute - ATTRPROPERTY_SYNONYM = 1 << 21, // Attribute will be written with a different name in der XML - ATTRPROPERTY_RANGE = 1 << 22, // Attribute only accept a range of elements + ATTRPROPERTY_INT = 1 << 0, // Attribute is an integer (Including Zero) + ATTRPROPERTY_FLOAT = 1 << 1, // Attribute is a float + ATTRPROPERTY_BOOL = 1 << 2, // Attribute is boolean (0/1, true/false) + ATTRPROPERTY_STRING = 1 << 3, // Attribute is a string + ATTRPROPERTY_POSITION = 1 << 4, // Attribute is a position defined by doubles (x,y or x,y,z) + ATTRPROPERTY_COLOR = 1 << 5, // Attribute is a color defined by a specifically word (Red, green) or by a special format (XXX,YYY,ZZZ) + ATTRPROPERTY_VCLASS = 1 << 6, // Attribute is a VClass (passenger, bus, motorcicle...) + ATTRPROPERTY_POSITIVE = 1 << 7, // Attribute is positive (Including Zero) + ATTRPROPERTY_NOTZERO = 1 << 8, // Attribute cannot be 0 (only for numerical attributes) + ATTRPROPERTY_UNIQUE = 1 << 9, // Attribute is unique (cannot be edited in a selection of similar elements (ID, Position...) + ATTRPROPERTY_FILENAME = 1 << 10, // Attribute is a filename (string that cannot contains certain characters) + ATTRPROPERTY_NONEDITABLE = 1 << 11, // Attribute is non editable (index of a lane) + ATTRPROPERTY_DISCRETE = 1 << 12, // Attribute is discrete (only certain values are allowed) + ATTRPROPERTY_PROBABILITY = 1 << 13, // Attribute is probability (only allowed values between 0 and 1, including both) + ATTRPROPERTY_TIME = 1 << 14, // Attribute is a Time (float positive) + ATTRPROPERTY_ANGLE = 1 << 15, // Attribute is an angle (only takes values between 0 and 360, including both, another value will be automatically reduced + ATTRPROPERTY_LIST = 1 << 16, // Attribute is a list of other elements separated by spaces + ATTRPROPERTY_SECUENCIAL = 1 << 17, // Attribute is a special sequence of elements (for example: secuencial lanes in Multi Lane E2 detectors) + ATTRPROPERTY_OPTIONAL = 1 << 18, // Attribute is optional + ATTRPROPERTY_DEFAULTVALUE = 1 << 19, // Attribute owns a default value + ATTRPROPERTY_COMBINABLE = 1 << 20, // Attribute is combinable with other Attribute + ATTRPROPERTY_SYNONYM = 1 << 21, // Attribute will be written with a different name in der XML + ATTRPROPERTY_RANGE = 1 << 22, // Attribute only accept a range of elements + ATTRPROPERTY_EXTENDED = 1 << 23, // Attribute is extended (used in certain demand elements) + ATTRPROPERTY_UPDATEGEOMETRY = 1 << 24, // Attribute requiere update geometry at the end of function setAttribute(...) }; /// @brief struct with the attribute Properties class AttributeProperties { + public: /// @brief default constructor AttributeProperties(); /// @brief parameter constructor - AttributeProperties(int attributeProperty, int positionListed, const std::string& definition, const std::string& defaultValue, const std::vector& discreteValues, SumoXMLAttr synonym, double minimum = 0, double maximum = 0); + AttributeProperties(const SumoXMLAttr attribute, const int attributeProperty, const std::string& definition, std::string defaultValue = ""); /// @brief destructor ~AttributeProperties(); @@ -98,6 +106,30 @@ /// @brief check Attribute integrity (For example, throw an exception if tag has a Float default value, but given default value cannot be parse to float) void checkAttributeIntegrity(); + /// @brief set discrete values + void setDiscreteValues(const std::vector& discreteValues); + + /// @brief set synonim + void setSynonym(const SumoXMLAttr synonym); + + /// @brief set range + void setRange(const double minimum, const double maximum); + + /// @brief set position listed + void setPositionListed(const int positionListed); + + /// @brief set tag property parent + void setTagPropertyParent(TagProperties* tagPropertyParent); + + /// @brief get XML Attribute + SumoXMLAttr getAttr() const; + + /// @brief get XML Attribute + const std::string& getAttrStr() const; + + /// @brief get reference to tagProperty parent + const TagProperties& getTagPropertyParent() const; + /// @brief get position in list (used in frames for listing attributes with certain sort) int getPositionListed() const; @@ -143,7 +175,7 @@ /// @brief return true if atribute is a string bool isString() const; - /// @brief return true if atribute is a position + /// @brief return true if atribute is a position bool isposition() const; /// @brief return true if atribute is a probability @@ -194,7 +226,22 @@ /// @brief return true if atribute isn't editable bool isNonEditable() const; + /// @brief return true if atribute is extended + bool isExtended() const; + + /// @brief return true if atribute requieres a update geometry in setAttribute(...) + bool requiereUpdateGeometry() const; + private: + /// @brief XML Attribute + SumoXMLAttr myAttribute; + + /// @brief pointer to tagProperty parent + TagProperties* myTagPropertyParent; + + /// @brief string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls) + std::string myAttrStr; + /// @brief Property of attribute int myAttributeProperty; @@ -220,37 +267,39 @@ double myMaximumRange; }; + + enum TagType { + TAGTYPE_NETELEMENT = 1 << 0, // Edges, Junctions, Lanes... + TAGTYPE_ADDITIONAL = 1 << 1, // Bus Stops, Charging Stations, Detectors... + TAGTYPE_SHAPE = 1 << 2, // POIs, Polygons + TAGTYPE_DEMANDELEMENT = 1 << 3, // Routes, Vehicles, Trips... + TAGTYPE_TAZ = 1 << 4, // Traffic Assignment Zones + TAGTYPE_STOPPINGPLACE = 1 << 5, // StoppingPlaces (BusStops, ChargingStations...) + TAGTYPE_DETECTOR = 1 << 6, // Detectors (E1, E2...) + TAGTYPE_VEHICLE = 1 << 7, // Vehicles (Flows, trips...) + TAGTYPE_ROUTEELEMENT = 1 << 8, // VTypes, Vehicles, Flows... + TAGTYPE_STOP = 1 << 8, // Stops + }; + enum TAGProperty { - TAGPROPERTY_NETELEMENT = 1 << 0, // Edges, Junctions, Lanes... - TAGPROPERTY_ADDITIONAL = 1 << 1, // Bus Stops, Charging Stations, Detectors... - TAGPROPERTY_SHAPE = 1 << 2, // POIs, Polygons - TAGPROPERTY_TAZ = 1 << 3, // Traffic Assignment Zones - TAGPROPERTY_STOPPINGPLACE = 1 << 4, // StoppingPlaces (BusStops, ChargingStations...) - TAGPROPERTY_DETECTOR = 1 << 5, // Detectors (E1, E2...) - TAGPROPERTY_ROUTEELEMENT = 1 << 6, // VTypes, Vehicles, Flows... - TAGPROPERTY_DRAWABLE = 1 << 7, // Element can be drawed in view - TAGPROPERTY_BLOCKMOVEMENT = 1 << 8, // Element can block their movement - TAGPROPERTY_BLOCKSHAPE = 1 << 9, // Element can block their shape - TAGPROPERTY_CLOSESHAPE = 1 << 10, // Element can close their shape - TAGPROPERTY_GEOPOSITION = 1 << 11, // Element's position can be defined using a GEO position - TAGPROPERTY_GEOSHAPE = 1 << 12, // Element's shape acn be defined using a GEO Shape - TAGPROPERTY_DIALOG = 1 << 13, // Element can be edited using a dialog (GNECalibratorDialog, GNERerouterDialog...) - TAGPROPERTY_PARENT = 1 << 14, // Element will be writed in XML as child of another element (E3Entry -> E3Detector...) - TAGPROPERTY_MINIMUMCHILDS = 1 << 15, // Element will be only writed in XML if has a minimum number of childs - TAGPROPERTY_REPARENT = 1 << 16, // Element can be reparent - TAGPROPERTY_SYNONYM = 1 << 17, // Element will be written with a different name in der XML - TAGPROPERTY_AUTOMATICSORTING = 1 << 18, // Element sort automatic their Childs (used by Additionals) - TAGPROPERTY_SELECTABLE = 1 << 19, // Element is selectable - TAGPROPERTY_MASKSTARTENDPOS = 1 << 20, // Element mask attributes StartPos and EndPos as "lenght" (Only used in the appropiate GNEFrame) - TAGPROPERTY_MASKXYZPOSITION = 1 << 21, // Element mask attributes X, Y and Z as "Position" - TAGPROPERTY_WRITECHILDSSEPARATE = 1 << 22, // Element writes their childs in a separated filename - TAGPROPERTY_PLACEDOVER_VIEW = 1 << 23, // Element will be placed in view - TAGPROPERTY_PLACEDOVER_EDGE = 1 << 24, // Element will be placed over an edge - TAGPROPERTY_PLACEDOVER_LANE = 1 << 25, // Element will be placed over a lane - TAGPROPERTY_PLACEDOVER_JUNCTION = 1 << 26, // Element will be placed over a junction - TAGPROPERTY_PLACEDOVER_EDGES = 1 << 27, // Element will be placed over a list of edges - TAGPROPERTY_PLACEDOVER_LANES = 1 << 28, // Element will be placed over a list of lanes - TAGPROPERTY_NOGENERICPARAMETERS = 1 << 29, // Element doesn't accept Generic Parameters (by default all tags supports generic parameters) + TAGPROPERTY_DRAWABLE = 1 << 0, // Element can be drawed in view + TAGPROPERTY_BLOCKMOVEMENT = 1 << 1, // Element can block their movement + TAGPROPERTY_BLOCKSHAPE = 1 << 2, // Element can block their shape + TAGPROPERTY_CLOSESHAPE = 1 << 3, // Element can close their shape + TAGPROPERTY_GEOPOSITION = 1 << 4, // Element's position can be defined using a GEO position + TAGPROPERTY_GEOSHAPE = 1 << 5, // Element's shape acn be defined using a GEO Shape + TAGPROPERTY_DIALOG = 1 << 6, // Element can be edited using a dialog (GNECalibratorDialog, GNERerouterDialog...) + TAGPROPERTY_PARENT = 1 << 7, // Element will be writed in XML as child of another element (E3Entry -> E3Detector...) + TAGPROPERTY_MINIMUMCHILDS = 1 << 8, // Element will be only writed in XML if has a minimum number of childs + TAGPROPERTY_REPARENT = 1 << 9, // Element can be reparent + TAGPROPERTY_SYNONYM = 1 << 10, // Element will be written with a different name in der XML + TAGPROPERTY_AUTOMATICSORTING = 1 << 11, // Element sort automatic their Childs (used by Additionals) + TAGPROPERTY_SELECTABLE = 1 << 12, // Element is selectable + TAGPROPERTY_MASKSTARTENDPOS = 1 << 13, // Element mask attributes StartPos and EndPos as "lenght" (Only used in the appropiate GNEFrame) + TAGPROPERTY_MASKXYZPOSITION = 1 << 14, // Element mask attributes X, Y and Z as "Position" + TAGPROPERTY_WRITECHILDSSEPARATE = 1 << 15, // Element writes their childs in a separated filename + TAGPROPERTY_NOGENERICPARAMETERS = 1 << 16, // Element doesn't accept Generic Parameters (by default all tags supports generic parameters) + TAGPROPERTY_DISJOINTATTRIBUTES = 1 << 17, // Element owns attributes that cannot be defined together }; /// @brief struct with the attribute Properties @@ -260,28 +309,22 @@ TagProperties(); /// @brief parameter constructor - TagProperties(SumoXMLTag tag, int tagProperty, int &positionListed, GUIIcon icon, SumoXMLTag parentTag = SUMO_TAG_NOTHING, SumoXMLTag tagSynonym = SUMO_TAG_NOTHING); + TagProperties(SumoXMLTag tag, int tagType, int tagProperty, GUIIcon icon, SumoXMLTag parentTag = SUMO_TAG_NOTHING, SumoXMLTag tagSynonym = SUMO_TAG_NOTHING); /// @brief destructor ~TagProperties(); - + /// @brief get Tag vinculated with this attribute Property SumoXMLTag getTag() const; - + /// @brief get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toString(...) - const std::string &getTagStr() const; + const std::string& getTagStr() const; /// @brief check Tag integrity (this include all their attributes) void checkTagIntegrity() const; /// @brief add attribute (duplicated attributed aren't allowed) - void addAttribute(SumoXMLAttr attr, const int attributeProperty, const std::string& definition, const std::string& defaultValue, std::vector discreteValues = std::vector(), SumoXMLAttr synonym = SUMO_ATTR_NOTHING); - - /// @brief add attribute with synonym (duplicated attributed aren't allowed) - void addAttribute(SumoXMLAttr attr, const int attributeProperty, const std::string& definition, const std::string& defaultValue, SumoXMLAttr synonym); - - /// @brief add attribute with a range - void addAttribute(SumoXMLAttr attr, const int attributeProperty, const std::string& definition, const std::string& defaultValue, double minimum, double maximum); + void addAttribute(const AttributeProperties& attributeProperty); /// @brief add deprecated Attribute void addDeprecatedAttribute(SumoXMLAttr attr); @@ -304,15 +347,18 @@ /// @brief get GUI icon associated to this Tag GUIIcon getGUIIcon() const; - /// @brief get position in list (used in frames for listing tags with certain sort) - int getPositionListed() const; - /// @brief if Tag owns a parent, return parent tag SumoXMLTag getParentTag() const; /// @brief get tag synonym SumoXMLTag getTagSynonym() const; + /// @brief set disjoint attributes + void setDisjointAttributes(const std::vector& attrs); + + /// @brief check if given attribute is a disjoint attribute + bool isDisjointAttributes(SumoXMLAttr attr) const; + /// @brief check if current TagProperties owns the attribute attr bool hasAttribute(SumoXMLAttr attr) const; @@ -328,12 +374,21 @@ /// @brief return true if tag correspond to a TAZ bool isTAZ() const; + /// @brief return true if tag correspond to a demand element + bool isDemandElement() const; + /// @brief return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML) bool isStoppingPlace() const; /// @brief return true if tag correspond to a shape (Only used to group all detectors in the XML) bool isDetector() const; + /// @brief return true if tag correspond to a vehicle element + bool isVehicle() const; + + /// @brief return true if tag correspond to a stop element + bool isStop() const; + /// @brief return true if tag correspond to a drawable element bool isDrawable() const; @@ -370,6 +425,9 @@ /// @brief return true if Tag correspond to an element that supports generic parameters bool hasGenericParameters() const; + /// @brief return true if Tag correspond to an element that has disjoint attributes + bool hasDisjointAttributes() const; + /// @brief return true if tag correspond to an element that can be reparent bool canBeReparent() const; @@ -379,24 +437,6 @@ /// @brief return true if tag correspond to an element that can sort their childs automatic bool canWriteChildsSeparate() const; - /// @brief return true if tag correspond to an element that can be placed over the view - bool canBePlacedOverView() const; - - /// @brief return true if tag correspond to an element that can be placed over an edge - bool canBePlacedOverEdge() const; - - /// @brief return true if tag correspond to an element that can be placed over a lane - bool canBePlacedOverLane() const; - - /// @brief return true if tag correspond to an element that can be placed over a junction - bool canBePlacedOverJunction() const; - - /// @brief return true if tag correspond to an element that can be placed over a list of edges - bool canBePlacedOverEdges() const; - - /// @brief return true if tag correspond - bool canBePlacedOverLanes() const; - /// @brief return true if tag correspond to an element that can mask the attributes "start" and "end" position as attribute "lenght" bool canMaskStartEndPos() const; @@ -413,7 +453,10 @@ /// @brief Sumo XML Tag vinculated wit this tag Property in String format std::string myTagStr; - /// @brief Property of attribute + /// @brief Attribute Type + int myTagType; + + /// @brief Attribute properties int myTagProperty; /// @brief map with the attribute values vinculated with this Tag @@ -422,9 +465,6 @@ /// @brief icon associated to this Tag GUIIcon myIcon; - /// @brief listed position - int myPositionListed; - /// @brief parent tag SumoXMLTag myParentTag; @@ -433,16 +473,22 @@ /// @brief List with the deprecated Attributes std::vector myDeprecatedAttributes; + + /// @brief List of disjoint attributes + std::vector myDisjointAttrs; + + /// @brief list of valid combinations of disjoint attributes + std::vector > myDisjointAttrsCombinations; }; /**@brief Constructor * @param[in] tag SUMO Tag assigned to this type of object * @param[in] icon GUIIcon associated to the type of object */ - GNEAttributeCarrier(SumoXMLTag tag); + GNEAttributeCarrier(const SumoXMLTag tag); /// @brief Destructor - virtual ~GNEAttributeCarrier() {}; + virtual ~GNEAttributeCarrier(); /// @name This functions has to be implemented in all GNEAttributeCarriers /// @{ @@ -455,6 +501,9 @@ /// @brief check if attribute carrier is selected virtual bool isAttributeCarrierSelected() const = 0; + /// @brief check if attribute carrier must be drawn using selecting color. + virtual bool drawUsingSelectColor() const = 0; + /* @brief method for getting the Attribute of an XML key * @param[in] key The attribute key * @return string with the value associated to key @@ -465,17 +514,27 @@ * @param[in] key The attribute key * @param[in] value The new value * @param[in] undoList The undoList on which to register changes - * @param[in] net optionally the GNENet to inform about gui updates */ virtual void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) = 0; - /* @brief method for setting the attribute and letting the object perform additional changes - * @param[in] key The attribute key - * @param[in] value The new value - * @param[in] undoList The undoList on which to register changes - */ + /* @brief method for check if new value for certain attribute is valid + * @param[in] key The attribute key + * @param[in] value The new value + */ virtual bool isValid(SumoXMLAttr key, const std::string& value) = 0; + /* @brief method for check if certain attribute is set (used by ACs with disjoint attributes) + * @param[in] key The attribute key + * @return true if it's set, false in other case + */ + virtual bool isDisjointAttributeSet(const SumoXMLAttr attr) const; + + /* @brief method for set certain attribute is set (used by ACs with disjoint attributes) + * @param[in] attr The attribute key + * @param[in] undoList The undoList on which to register changes + */ + virtual void setDisjointAttribute(const SumoXMLAttr attr, GNEUndoList* undoList); + /// @brief get PopPup ID (Used in AC Hierarchy) virtual std::string getPopUpID() const = 0; @@ -498,14 +557,17 @@ static const std::string FEATURE_APPROVED; /// @} + /// @brief invalid double position + static const double INVALID_POSITION; + /// @brief method for getting the attribute in the context of object selection virtual std::string getAttributeForSelection(SumoXMLAttr key) const; /// @brief get tag assigned to this object in string format - const std::string &getTagStr() const; + const std::string& getTagStr() const; /// @brief get Tag Property assigned to this object - const TagProperties &getTagProperty() const; + const TagProperties& getTagProperty() const; /// @brief get FXIcon associated to this AC FXIcon* getIcon() const; @@ -519,7 +581,7 @@ /// @brief get tags of all editable element types static std::vector allowedTags(bool onlyDrawables); - /// @brief get tags of all editable element types using TagProperty Type (TAGPROPERTY_NETELEMENT, TAGPROPERTY_ADDITIONAL, etc.) + /// @brief get tags of all editable element types using TagProperty Type (TAGTYPE_NETELEMENT, TAGTYPE_ADDITIONAL, etc.) static std::vector allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables); /// @brief return the number of attributes of the tag with the most highter number of attributes @@ -590,8 +652,8 @@ template static T parseAttributeFromXML(const SUMOSAXAttributes& attrs, const std::string& objectID, const SumoXMLTag tag, const SumoXMLAttr attribute, bool& abort) { bool parsedOk = true; - // @brief declare string values - std::string defaultValue, parsedAttribute, additionalOfWarningMessage; + // declare string values + std::string defaultValue, parsedAttribute, warningMessage; // obtain tag properties const auto& tagProperties = getTagProperties(tag); // first check if attribute is deprecated @@ -603,14 +665,54 @@ // return a dummy value return parse(""); } - // obtain attribute properties (Only for improving efficiency) - const auto& attrProperties = tagProperties.getAttributeProperties(attribute); - // check if we're obtaining attribute of an object with an already parsed ID + // now check if we're obtaining attribute of an object with an already parsed ID if (objectID != "") { - additionalOfWarningMessage = tagProperties.getTagStr() + " with ID '" + objectID + "'"; + warningMessage = tagProperties.getTagStr() + " with ID '" + objectID + "'"; } else { - additionalOfWarningMessage = tagProperties.getTagStr(); + warningMessage = tagProperties.getTagStr(); } + // check if we're parsing block movement + if (attribute == GNE_ATTR_BLOCK_MOVEMENT) { + // first check if we can parse + if (tagProperties.canBlockMovement()) { + // First check if attribute can be parsed to bool + parsedAttribute = attrs.get(attribute, objectID.c_str(), parsedOk, false); + // check that sucesfully parsed attribute can be converted to type double + if (!canParse(parsedAttribute)) { + abort = true; + // return default value + return parse("0"); + } else { + // return readed value + return parse(parsedAttribute); + } + } else { + throw ProcessError("Trying to parsing block movement attribute in an AC that cannot be moved"); + } + } + // now check if we're parsing a GEO Attribute + if (tagProperties.hasGEOPosition() && ((attribute == SUMO_ATTR_LON) || (attribute == SUMO_ATTR_LAT))) { + // first check if GEO Attribute is defined + if (attrs.hasAttribute(attribute)) { + // First check if attribute can be parsed to string + parsedAttribute = attrs.get(attribute, objectID.c_str(), parsedOk, false); + // check that sucesfully parsed attribute can be converted to type double + if (!canParse(parsedAttribute)) { + WRITE_WARNING("Format of GEO attribute '" + toString(attribute) + "' of " + + warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created"); + // return default value + return parse("0"); + } else { + // return readed value + return parse(parsedAttribute); + } + } + parsedOk = false; + // return default value + return parse("0"); + } + // obtain attribute properties (Only for improving efficiency) + const auto& attrProperties = tagProperties.getAttributeProperties(attribute); // set a special default value for numerical and boolean attributes (To avoid errors parsing) if (attrProperties.isNumerical() || attrProperties.isBool()) { defaultValue = "0"; @@ -623,274 +725,22 @@ if (attrs.hasAttribute(attribute)) { // First check if attribute can be parsed to string parsedAttribute = attrs.get(attribute, objectID.c_str(), parsedOk, false); - // check that sucesfully parsed attribute can be converted to type T - if (parsedOk && !canParse(parsedAttribute)) { - parsedOk = false; - } - // declare a string for details about error formats - std::string errorFormat; - // set extra check for ID Values - if (attribute == SUMO_ATTR_ID) { - if (parsedAttribute.empty()) { - errorFormat = "ID cannot be empty; "; - parsedOk = false; - } else if (tagProperties.isDetector()) { - // special case for detectors (because in this case empty spaces are allowed) - if (SUMOXMLDefinitions::isValidDetectorID(parsedAttribute) == false) { - errorFormat = "Detector ID contains invalid characters; "; - parsedOk = false; - } - } else if (SUMOXMLDefinitions::isValidNetID(parsedAttribute) == false) { - errorFormat = "ID contains invalid characters; "; - parsedOk = false; - } - } - // Set extra checks for int values - if (attrProperties.isInt()) { - if (canParse(parsedAttribute)) { - // obtain int value - int parsedIntAttribute = parse(parsedAttribute); - // check if attribute can be negative or zero - if (attrProperties.isPositive() && (parsedIntAttribute < 0)) { - errorFormat = "Cannot be negative; "; - parsedOk = false; - } else if (attrProperties.cannotBeZero() && (parsedIntAttribute == 0)) { - errorFormat = "Cannot be zero; "; - parsedOk = false; - } - } else if (canParse(parsedAttribute)) { - errorFormat = "Float cannot be reinterpreted as int; "; - parsedOk = false; - } else { - errorFormat = "Cannot be parsed to int; "; - parsedOk = false; - } - } - // Set extra checks for float(double) values - if (attrProperties.isFloat()) { - if (canParse(parsedAttribute)) { - // obtain double value - double parsedDoubleAttribute = parse(parsedAttribute); - //check if can be negative and Zero - if (attrProperties.isPositive() && (parsedDoubleAttribute < 0)) { - errorFormat = "Cannot be negative; "; - parsedOk = false; - } else if (attrProperties.cannotBeZero() && (parsedDoubleAttribute == 0)) { - errorFormat = "Cannot be zero; "; - parsedOk = false; - } - } else { - errorFormat = "Cannot be parsed to float; "; - parsedOk = false; - } - } - // Set extra checks for position values - if (attrProperties.isposition()) { - // check if we're parsing a single position or an entire shape - if (attrProperties.isList()) { - // check if parsed attribute can be parsed to Position Vector - if(!canParse(parsedAttribute)) { - errorFormat = "List of Positions aren't neither x,y nor x,y,z; "; - parsedOk = false; - } - } else if (!canParse(parsedAttribute)) { - errorFormat = "Position is neither x,y nor x,y,z; "; - parsedOk = false; - } - } - // set extra check for time(double) values - if (attrProperties.isTime()) { - if (canParse(parsedAttribute)) { - // parse to SUMO Real and check if is negative - if (parse(parsedAttribute) < 0) { - errorFormat = "Time cannot be negative; "; - parsedOk = false; - } - } else { - errorFormat = "Cannot be parsed to time; "; - parsedOk = false; - } - } - // set extra check for probability values - if (attrProperties.isProbability()) { - if (canParse(parsedAttribute)) { - // parse to double and check if is between [0,1] - double probability = parse(parsedAttribute); - if (probability < 0) { - errorFormat = "Probability cannot be smaller than 0; "; - parsedOk = false; - } else if (probability > 1) { - errorFormat = "Probability cannot be greather than 1; "; - parsedOk = false; - } - } else { - errorFormat = "Cannot be parsed to probability; "; - parsedOk = false; - } - } - // set extra check for range values - if (attrProperties.hasAttrRange()) { - if (canParse(parsedAttribute)) { - // parse to double and check if is in range - double range = parse(parsedAttribute); - if (range < attrProperties.getMinimumRange()) { - errorFormat = "Float cannot be smaller than " + toString(attrProperties.getMinimumRange())+ "; "; - parsedOk = false; - } else if (range > attrProperties.getMaximumRange()) { - errorFormat = "Float cannot be greather than " + toString(attrProperties.getMaximumRange())+ "; "; - parsedOk = false; - } - } else { - errorFormat = "Cannot be parsed to float; "; - parsedOk = false; - } - } - // set extra check for discrete values - if (attrProperties.isDiscrete()) { - // search value in the list of discretes values of attribute properties - auto finder = std::find(attrProperties.getDiscreteValues().begin(), attrProperties.getDiscreteValues().end(), parsedAttribute); - // check if attribute is valid - if (finder == attrProperties.getDiscreteValues().end()) { - errorFormat = "value is not within the set of allowed values for attribute '" + toString(attribute) + "'"; - parsedOk = false; - } - } - // set extra check for color values - if (attrProperties.isColor() && !canParse(parsedAttribute)) { - errorFormat = "Invalid RGB format or named color; "; - parsedOk = false; - } - // set extra check for filename values - if (attrProperties.isFilename()) { - if (SUMOXMLDefinitions::isValidFilename(parsedAttribute) == false) { - errorFormat = "Filename contains invalid characters; "; - parsedOk = false; - } else if (parsedAttribute.empty()) { - errorFormat = "Filename cannot be empty; "; - parsedOk = false; - } - } - // set extra check for name values - if ((attribute == SUMO_ATTR_NAME) && !SUMOXMLDefinitions::isValidAttribute(parsedAttribute)) { - errorFormat = "name contains invalid characters; "; - parsedOk = false; - } - // set extra check for SVCPermissions values - if (attrProperties.isVClass()) { - if (!canParseVehicleClasses(parsedAttribute)) { - errorFormat = "List of VClasses isn't valid; "; - parsedAttribute = defaultValue; - parsedOk = false; - } - } - // set extra check for Vehicle Classes - if ((!parsedOk) && (attribute == SUMO_ATTR_VCLASS)) { - errorFormat = "Is not a part of defined set of Vehicle Classes; "; - } - // set extra check for Vehicle Classes - if ((!parsedOk) && (attribute == SUMO_ATTR_GUISHAPE)) { - errorFormat = "Is not a part of defined set of Gui Vehicle Shapes; "; - } - // set extra check for RouteProbes - if ((attribute == SUMO_ATTR_ROUTEPROBE) && !SUMOXMLDefinitions::isValidNetID(parsedAttribute)) { - errorFormat = "RouteProbe ID contains invalid characters; "; - parsedOk = false; - } - // set extra check for list of edges - if ((attribute == SUMO_ATTR_EDGES) && parsedAttribute.empty()) { - errorFormat = "List of edges cannot be empty; "; - parsedOk = false; - } - // set extra check for list of lanes - if ((attribute == SUMO_ATTR_LANES) && parsedAttribute.empty()) { - errorFormat = "List of lanes cannot be empty; "; - parsedOk = false; - } - // set extra check for list of VTypes - if ((attribute == SUMO_ATTR_VTYPES) && !parsedAttribute.empty() && !SUMOXMLDefinitions::isValidListOfTypeID(parsedAttribute)) { - errorFormat = "List of vTypes contains invalid characters; "; - parsedOk = false; - } - // set extra check for list of RouteProbe - if ((attribute == SUMO_ATTR_ROUTEPROBE) && !parsedAttribute.empty() && !SUMOXMLDefinitions::isValidNetID(parsedAttribute)) { - errorFormat = "RouteProbe ID contains invalid characters; "; - parsedOk = false; - } - // If attribute has an invalid format - if (!parsedOk) { - // if attribute is optional and has a default value, obtain it as string. In other case, abort. - if (attrProperties.isOptional() && attrProperties.hasDefaultValue()) { - parsedAttribute = attrProperties.getDefaultValue(); - } else { - WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " + - additionalOfWarningMessage + " is invalid; " + errorFormat + tagProperties.getTagStr() + " cannot be created"); - // abort parsing (and creation) of element - abort = true; - // set default value (To avoid errors in parse(parsedAttribute)) - parsedAttribute = defaultValue; - } - } - } else if (tagProperties.canMaskXYZPositions() && (attribute == SUMO_ATTR_POSITION)) { - // if element can mask their XYPosition, then must be extracted X Y coordiantes separeted - std::string x, y, z; - // give a default value to parsedAttribute to avoid problem parsing invalid positions - parsedAttribute="0,0"; - if(attrs.hasAttribute(SUMO_ATTR_X)) { - x = attrs.get(SUMO_ATTR_X, objectID.c_str(), parsedOk, false); - // check that X attribute is valid - if(!canParse(x)) { - WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_X) + "' of " + - additionalOfWarningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created"); - // abort parsing (and creation) of element - abort = true; - } - } else { - WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_X) + "' of " + - additionalOfWarningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created"); - // abort parsing (and creation) of element + // check parsed attribute + if (!checkParsedAttribute(tagProperties, attrProperties, attribute, defaultValue, parsedAttribute, warningMessage)) { abort = true; } - if(attrs.hasAttribute(SUMO_ATTR_Y)) { - y = attrs.get(SUMO_ATTR_Y, objectID.c_str(), parsedOk, false); - // check that X attribute is valid - if(!canParse(y)) { - WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Y) + "' of " + - additionalOfWarningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created"); - // abort parsing (and creation) of element - abort = true; - } - } else { - WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Y) + "' of " + - additionalOfWarningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created"); - // abort parsing (and creation) of element + } else if (tagProperties.canMaskXYZPositions() && (attribute == SUMO_ATTR_POSITION)) { + // obtain masked position attribute + if (!parseMaskedPositionAttribute(attrs, objectID, tagProperties, attrProperties, parsedAttribute, warningMessage)) { abort = true; } - // Z attribute is optional - if(attrs.hasAttribute(SUMO_ATTR_Z)) { - z = attrs.get(SUMO_ATTR_Z, objectID.c_str(), parsedOk, false); - // check that Z attribute is valid - if(!canParse(z)) { - WRITE_WARNING("Format of optional " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Z) + "' of " + - additionalOfWarningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created"); - // leave Z attribute empty - z.clear(); - } - } - // create Position attribute using parsed coordinates X, Y and, optionally, Z - if(!abort) { - if(z.empty()) { - parsedAttribute = x + "," + y; - } else { - parsedAttribute = x + "," + y + "," + z; - } - } } else { // if attribute is optional and has a default value, obtain it. In other case, abort. if (attrProperties.isOptional() && attrProperties.hasDefaultValue()) { parsedAttribute = attrProperties.getDefaultValue(); } else { WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " + - additionalOfWarningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created"); + warningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created"); // abort parsing (and creation) of element abort = true; // set default value (To avoid errors in parse(parsedAttribute)) @@ -905,14 +755,8 @@ static int getCircleResolution(const GUIVisualizationSettings& settings); protected: - /// @brief method for setting the attribute and nothing else (used in GNEChange_Attribute) - virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0; - - /// @brief method for check if mouse is over objects - virtual void mouseOverObject(const GUIVisualizationSettings& s) const = 0; - /// @brief the xml tag to which this attribute carrier corresponds - const TagProperties &myTagProperty; + const TagProperties& myTagProperty; /// @brief boolean to check if this AC is selected (instead of GUIGlObjectStorage) bool mySelected; @@ -921,9 +765,41 @@ static TagProperties dummyTagProperty; private: + /// @brief method for setting the attribute and nothing else (used in GNEChange_Attribute) + virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0; + + /// @brief method for setting the disjoint attribute and nothing else (used in GNEChange_Attribute) + virtual void setDisjointAttribute(const int newParameterSet); + /// @brief fill Attribute Carriers static void fillAttributeCarriers(); + /// @brief fill Net Elements + static void fillNetElements(); + + /// @brief fill Additionals + static void fillAdditionals(); + + /// @brief fill Shapes + static void fillShapes(); + + /// @brief fill DemandElements + static void fillDemandElements(); + + /// @brief fill Car Following Model of Vehicle Types + static void fillCarFollowingModelAttributes(); + + /// @brief fill Junction Model Attronites of Vehicle Types + static void fillJunctionModelAttributes(); + + /// @brief parse and check attribute (note: This function is only to improve legilibility) + static bool checkParsedAttribute(const TagProperties& tagProperties, const AttributeProperties& attrProperties, const SumoXMLAttr attribute, + std::string& defaultValue, std::string& parsedAttribute, std::string& warningMessage); + + /// @brief parse and check masked (note: This function is only to improve legilibility) + static bool parseMaskedPositionAttribute(const SUMOSAXAttributes& attrs, const std::string& objectID, const TagProperties& tagProperties, + const AttributeProperties& attrProperties, std::string& parsedAttribute, std::string& warningMessage); + /// @brief map with the tags properties static std::map myTagProperties; diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEEvent_NetworkLoaded.h sumo-1.2.0+dfsg1/src/netedit/GNEEvent_NetworkLoaded.h --- sumo-1.1.0+dfsg1/src/netedit/GNEEvent_NetworkLoaded.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEEvent_NetworkLoaded.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.cpp sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,563 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEHierarchicalElementChilds.cpp +/// @author Pablo Alvarez Lopez +/// @date Dec 2015 +/// @version $Id$ +/// +// A abstract class for representation of additional elements +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEHierarchicalElementChilds.h" + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEHierarchicalElementChilds::GNEHierarchicalElementChilds(GNEAttributeCarrier* AC, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds) : + myChildConnections(this), + myEdgeChilds(edgeChilds), + myLaneChilds(laneChilds), + myShapeChilds(shapeChilds), + myAdditionalChilds(additionalChilds), + myDemandElementChilds(demandElementChilds), + myAC(AC) { +} + + +GNEHierarchicalElementChilds::~GNEHierarchicalElementChilds() {} + + +void +GNEHierarchicalElementChilds::addAdditionalChild(GNEAdditional* additional) { + // Check if additional is valid + if (additional == nullptr) { + throw InvalidArgument("Trying to add an empty additional child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + // add it in additional childs container + myAdditionalChilds.push_back(additional); + // only execute post operations if update geometry is enabled + if (additional->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + // Check if childs has to be sorted automatically + if (myAC->getTagProperty().canAutomaticSortChilds()) { + sortAdditionalChilds(); + } + // update additional parent after add additional (note: by default non-implemented) + updateAdditionalParent(); + updateGeometry(true); + } + } +} + + +void +GNEHierarchicalElementChilds::removeAdditionalChild(GNEAdditional* additional) { + // First check that additional was already inserted + auto it = std::find(myAdditionalChilds.begin(), myAdditionalChilds.end(), additional); + if (it == myAdditionalChilds.end()) { + throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myAdditionalChilds.erase(it); + // only execute post operations if update geometry is enabled + if (additional->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + // Check if childs has to be sorted automatically + if (myAC->getTagProperty().canAutomaticSortChilds()) { + sortAdditionalChilds(); + } + // update additional parent after add additional (note: by default non-implemented) + updateAdditionalParent(); + updateGeometry(true); + } + } +} + + +const std::vector& +GNEHierarchicalElementChilds::getAdditionalChilds() const { + return myAdditionalChilds; +} + + +void +GNEHierarchicalElementChilds::sortAdditionalChilds() { + if (myAC->getTagProperty().getTag() == SUMO_TAG_E3DETECTOR) { + // we need to sort Entry/Exits due additional.xds model + std::vector sortedEntryExits; + // obtain all entrys + for (auto i : myAdditionalChilds) { + if (i->getTagProperty().getTag() == SUMO_TAG_DET_ENTRY) { + sortedEntryExits.push_back(i); + } + } + // obtain all exits + for (auto i : myAdditionalChilds) { + if (i->getTagProperty().getTag() == SUMO_TAG_DET_EXIT) { + sortedEntryExits.push_back(i); + } + } + // change myAdditionalChilds for sortedEntryExits + if (sortedEntryExits.size() == myAdditionalChilds.size()) { + myAdditionalChilds = sortedEntryExits; + } else { + throw ProcessError("Some additional childs were lost during sorting"); + } + } else if (myAC->getTagProperty().getTag() == SUMO_TAG_TAZ) { + // we need to sort Entry/Exits due additional.xds model + std::vector sortedTAZSourceSink; + // obtain all TAZSources + for (auto i : myAdditionalChilds) { + if (i->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) { + sortedTAZSourceSink.push_back(i); + } + } + // obtain all TAZSinks + for (auto i : myAdditionalChilds) { + if (i->getTagProperty().getTag() == SUMO_TAG_TAZSINK) { + sortedTAZSourceSink.push_back(i); + } + } + // change myAdditionalChilds for sortedEntryExits + if (sortedTAZSourceSink.size() == myAdditionalChilds.size()) { + myAdditionalChilds = sortedTAZSourceSink; + } else { + throw ProcessError("Some additional childs were lost during sorting"); + } + } else { + // declare a vector to keep sorted childs + std::vector, GNEAdditional*> > sortedChilds; + // iterate over additional childs + for (auto i : myAdditionalChilds) { + sortedChilds.push_back(std::make_pair(std::make_pair(0., 0.), i)); + // set begin/start attribute + if (i->getTagProperty().hasAttribute(SUMO_ATTR_TIME) && GNEAttributeCarrier::canParse(i->getAttribute(SUMO_ATTR_TIME))) { + sortedChilds.back().first.first = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_TIME)); + } else if (i->getTagProperty().hasAttribute(SUMO_ATTR_BEGIN) && GNEAttributeCarrier::canParse(i->getAttribute(SUMO_ATTR_BEGIN))) { + sortedChilds.back().first.first = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_BEGIN)); + } + // set end attribute + if (i->getTagProperty().hasAttribute(SUMO_ATTR_END) && GNEAttributeCarrier::canParse(i->getAttribute(SUMO_ATTR_END))) { + sortedChilds.back().first.second = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_END)); + } else { + sortedChilds.back().first.second = sortedChilds.back().first.first; + } + } + // sort childs + std::sort(sortedChilds.begin(), sortedChilds.end()); + // make sure that number of sorted childs is the same as the additional childs + if (sortedChilds.size() == myAdditionalChilds.size()) { + myAdditionalChilds.clear(); + for (auto i : sortedChilds) { + myAdditionalChilds.push_back(i.second); + } + } else { + throw ProcessError("Some additional childs were lost during sorting"); + } + } +} + + +bool +GNEHierarchicalElementChilds::checkAdditionalChildsOverlapping() const { + // declare a vector to keep sorted childs + std::vector, GNEAdditional*> > sortedChilds; + // iterate over additional childs + for (auto i : myAdditionalChilds) { + sortedChilds.push_back(std::make_pair(std::make_pair(0., 0.), i)); + // set begin/start attribute + if (i->getTagProperty().hasAttribute(SUMO_ATTR_TIME) && GNEAttributeCarrier::canParse(i->getAttribute(SUMO_ATTR_TIME))) { + sortedChilds.back().first.first = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_TIME)); + } else if (i->getTagProperty().hasAttribute(SUMO_ATTR_BEGIN) && GNEAttributeCarrier::canParse(i->getAttribute(SUMO_ATTR_BEGIN))) { + sortedChilds.back().first.first = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_BEGIN)); + } + // set end attribute + if (i->getTagProperty().hasAttribute(SUMO_ATTR_END) && GNEAttributeCarrier::canParse(i->getAttribute(SUMO_ATTR_END))) { + sortedChilds.back().first.second = GNEAttributeCarrier::parse(i->getAttribute(SUMO_ATTR_END)); + } else { + sortedChilds.back().first.second = sortedChilds.back().first.first; + } + } + // sort childs + std::sort(sortedChilds.begin(), sortedChilds.end()); + // make sure that number of sorted childs is the same as the additional childs + if (sortedChilds.size() == myAdditionalChilds.size()) { + if (sortedChilds.size() <= 1) { + return true; + } else { + // check overlapping + for (int i = 0; i < (int)sortedChilds.size() - 1; i++) { + if (sortedChilds.at(i).first.second > sortedChilds.at(i + 1).first.first) { + return false; + } + } + } + return true; + } else { + throw ProcessError("Some additional childs were lost during sorting"); + } +} + + +void +GNEHierarchicalElementChilds::addDemandElementChild(GNEDemandElement* demandElement) { + // Check if demand element is valid + if (demandElement == nullptr) { + throw InvalidArgument("Trying to add an empty demand element child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + // add it in demandElement child container + myDemandElementChilds.push_back(demandElement); + // Check if childs has to be sorted automatically + if (myAC->getTagProperty().canAutomaticSortChilds()) { + sortDemandElementChilds(); + } + // update demandElement parent after add demandElement (note: by default non-implemented) + updateDemandElementParent(); + // update geometry (for set geometry of lines between Parents and Childs) + if (demandElement->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + updateGeometry(true); + } + } +} + + +void +GNEHierarchicalElementChilds::removeDemandElementChild(GNEDemandElement* demandElement) { + // First check that demandElement was already inserted + auto it = std::find(myDemandElementChilds.begin(), myDemandElementChilds.end(), demandElement); + if (it == myDemandElementChilds.end()) { + throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' doesn't exist in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myDemandElementChilds.erase(it); + // Check if childs has to be sorted automatically + if (myAC->getTagProperty().canAutomaticSortChilds()) { + sortDemandElementChilds(); + } + // update demandElement parent after add demandElement (note: by default non-implemented) + updateDemandElementParent(); + // update geometry (for remove geometry of lines between Parents and Childs) + if (demandElement->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + updateGeometry(true); + } + } +} + + +const std::vector& +GNEHierarchicalElementChilds::getDemandElementChilds() const { + return myDemandElementChilds; +} + + +void +GNEHierarchicalElementChilds::sortDemandElementChilds() { + // by default empty +} + + +bool +GNEHierarchicalElementChilds::checkDemandElementChildsOverlapping() const { + return true; +} + + +void +GNEHierarchicalElementChilds::addEdgeChild(GNEEdge* edge) { + // Check that edge is valid and doesn't exist previously + if (edge == nullptr) { + throw InvalidArgument("Trying to add an empty edge child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myEdgeChilds.push_back(edge); + // only execute post operations if update geometry is enabled + if (edge->getNet()->isUpdateGeometryEnabled()) { + updateGeometry(true); + } + } +} + + +void +GNEHierarchicalElementChilds::removeEdgeChild(GNEEdge* edge) { + // Check that edge is valid and exist previously + if (edge == nullptr) { + throw InvalidArgument("Trying to remove an empty edge child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myEdgeChilds.begin(), myEdgeChilds.end(), edge) == myEdgeChilds.end()) { + throw InvalidArgument("Trying to remove a non previously inserted edge child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myEdgeChilds.erase(std::find(myEdgeChilds.begin(), myEdgeChilds.end(), edge)); + // update connections geometry + myChildConnections.update(); + } +} + + +const std::vector& +GNEHierarchicalElementChilds::getEdgeChilds() const { + return myEdgeChilds; +} + + +void +GNEHierarchicalElementChilds::addLaneChild(GNELane* lane) { + // Check if lane is valid + if (lane == nullptr) { + throw InvalidArgument("Trying to add an empty lane child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myLaneChilds.push_back(lane); + // update connections geometry + myChildConnections.update(); + } +} + + +void +GNEHierarchicalElementChilds::removeLaneChild(GNELane* lane) { + // Check if lane is valid + if (lane == nullptr) { + throw InvalidArgument("Trying to remove an empty lane child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myLaneChilds.erase(std::find(myLaneChilds.begin(), myLaneChilds.end(), lane)); + // update connections geometry + myChildConnections.update(); + } +} + + +const std::vector& +GNEHierarchicalElementChilds::getLaneChilds() const { + return myLaneChilds; +} + + +void +GNEHierarchicalElementChilds::addShapeChild(GNEShape* shape) { + // Check that shape is valid and doesn't exist previously + if (shape == nullptr) { + throw InvalidArgument("Trying to add an empty shape child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myShapeChilds.begin(), myShapeChilds.end(), shape) != myShapeChilds.end()) { + throw InvalidArgument("Trying to add a duplicate shape child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myShapeChilds.push_back(shape); + // update connections geometry + myChildConnections.update(); + } +} + + +void +GNEHierarchicalElementChilds::removeShapeChild(GNEShape* shape) { + // Check that shape is valid and exist previously + if (shape == nullptr) { + throw InvalidArgument("Trying to remove an empty shape child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myShapeChilds.begin(), myShapeChilds.end(), shape) == myShapeChilds.end()) { + throw InvalidArgument("Trying to remove a non previously inserted shape child in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myShapeChilds.erase(std::find(myShapeChilds.begin(), myShapeChilds.end(), shape)); + // update connections geometry + myChildConnections.update(); + } +} + + +const std::vector& +GNEHierarchicalElementChilds::getShapeChilds() const { + return myShapeChilds; +} + + +void +GNEHierarchicalElementChilds::updateAdditionalParent() { + // by default nothing to do +} + + +void +GNEHierarchicalElementChilds::updateDemandElementParent() { + // by default nothing to do +} + + +void +GNEHierarchicalElementChilds::changeEdgeChilds(GNEAdditional* elementChild, const std::string& newEdgeIDs) { + // remove demandElement of edge childs + for (const auto& i : myEdgeChilds) { + i->removeAdditionalParent(elementChild); + } + // obtain new child edges (note: it can be empty) + myEdgeChilds = GNEAttributeCarrier::parse >(elementChild->getViewNet()->getNet(), newEdgeIDs); + // add demandElement into edge parents + for (const auto& i : myEdgeChilds) { + i->addAdditionalParent(elementChild); + } + // update connections geometry + myChildConnections.update(); +} + + +void +GNEHierarchicalElementChilds::changeLaneChilds(GNEAdditional* elementChild, const std::string& newLaneIDs) { + // remove demandElement of lane childs + for (const auto& i : myLaneChilds) { + i->removeAdditionalParent(elementChild); + } + // obtain new child lanes (note: it can be empty) + myLaneChilds = GNEAttributeCarrier::parse >(elementChild->getViewNet()->getNet(), newLaneIDs); + // add demandElement into lane parents + for (const auto& i : myLaneChilds) { + i->addAdditionalParent(elementChild); + } + // update connections geometry + myChildConnections.update(); +} + +// --------------------------------------------------------------------------- +// GNEHierarchicalElementChilds::ChildConnections - methods +// --------------------------------------------------------------------------- + +GNEHierarchicalElementChilds::ChildConnections::ChildConnections(GNEHierarchicalElementChilds* hierarchicalElement) : + myHierarchicalElement(hierarchicalElement) {} + + +void +GNEHierarchicalElementChilds::ChildConnections::update() { + // first clear connection positions + connectionPositions.clear(); + symbolsPositionAndRotation.clear(); + + // calculate position and rotation of every simbol for every edge + for (const auto& i : myHierarchicalElement->myEdgeChilds) { + for (auto j : i->getLanes()) { + std::pair posRot; + // set position and lenght depending of shape's lengt + if (j->getShape().length() - 6 > 0) { + posRot.first = j->getShape().positionAtOffset(j->getShape().length() - 6); + posRot.second = j->getShape().rotationDegreeAtOffset(j->getShape().length() - 6); + } else { + posRot.first = j->getShape().positionAtOffset(j->getShape().length()); + posRot.second = j->getShape().rotationDegreeAtOffset(j->getShape().length()); + } + symbolsPositionAndRotation.push_back(posRot); + } + } + + // calculate position and rotation of every symbol for every lane + for (const auto& i : myHierarchicalElement->myLaneChilds) { + std::pair posRot; + // set position and lenght depending of shape's lengt + if (i->getShape().length() - 6 > 0) { + posRot.first = i->getShape().positionAtOffset(i->getShape().length() - 6); + posRot.second = i->getShape().rotationDegreeAtOffset(i->getShape().length() - 6); + } else { + posRot.first = i->getShape().positionAtOffset(i->getShape().length()); + posRot.second = i->getShape().rotationDegreeAtOffset(i->getShape().length()); + } + symbolsPositionAndRotation.push_back(posRot); + } + + // calculate position for every additional child + for (const auto& i : myHierarchicalElement->myAdditionalChilds) { + // check that position is different of position + if (i->getPositionInView() != myHierarchicalElement->getPositionInView()) { + std::vector posConnection; + double A = std::abs(i->getPositionInView().x() - myHierarchicalElement->getPositionInView().x()); + double B = std::abs(i->getPositionInView().y() - myHierarchicalElement->getPositionInView().y()); + // Set positions of connection's vertex. Connection is build from Entry to E3 + posConnection.push_back(i->getPositionInView()); + if (myHierarchicalElement->getPositionInView().x() > i->getPositionInView().x()) { + if (myHierarchicalElement->getPositionInView().y() > i->getPositionInView().y()) { + posConnection.push_back(Position(i->getPositionInView().x() + A, i->getPositionInView().y())); + } else { + posConnection.push_back(Position(i->getPositionInView().x(), i->getPositionInView().y() - B)); + } + } else { + if (myHierarchicalElement->getPositionInView().y() > i->getPositionInView().y()) { + posConnection.push_back(Position(i->getPositionInView().x(), i->getPositionInView().y() + B)); + } else { + posConnection.push_back(Position(i->getPositionInView().x() - A, i->getPositionInView().y())); + } + } + posConnection.push_back(myHierarchicalElement->getPositionInView()); + connectionPositions.push_back(posConnection); + } + } + + // calculate geometry for connections between parent and childs + for (const auto& i : symbolsPositionAndRotation) { + std::vector posConnection; + double A = std::abs(i.first.x() - myHierarchicalElement->getPositionInView().x()); + double B = std::abs(i.first.y() - myHierarchicalElement->getPositionInView().y()); + // Set positions of connection's vertex. Connection is build from Entry to E3 + posConnection.push_back(i.first); + if (myHierarchicalElement->getPositionInView().x() > i.first.x()) { + if (myHierarchicalElement->getPositionInView().y() > i.first.y()) { + posConnection.push_back(Position(i.first.x() + A, i.first.y())); + } else { + posConnection.push_back(Position(i.first.x(), i.first.y() - B)); + } + } else { + if (myHierarchicalElement->getPositionInView().y() > i.first.y()) { + posConnection.push_back(Position(i.first.x(), i.first.y() + B)); + } else { + posConnection.push_back(Position(i.first.x() - A, i.first.y())); + } + } + posConnection.push_back(myHierarchicalElement->getPositionInView()); + connectionPositions.push_back(posConnection); + } +} + + +void +GNEHierarchicalElementChilds::ChildConnections::draw(GUIGlObjectType parentType) const { + // Iterate over myConnectionPositions + for (const auto& i : connectionPositions) { + // Add a draw matrix + glPushMatrix(); + // traslate in the Z axis + glTranslated(0, 0, parentType - 0.01); + // Set color of the base + GLHelper::setColor(RGBColor(255, 235, 0)); + for (auto j = i.begin(); (j + 1) != i.end(); j++) { + // Draw Lines + GLHelper::drawLine((*j), (*(j + 1))); + } + // Pop draw matrix + glPopMatrix(); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.h sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.h --- sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementChilds.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,220 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEHierarchicalElementChilds.h +/// @author Pablo Alvarez Lopez +/// @date March 2019 +/// @version $Id$ +/// +// A abstract class for representation of Hierarchical Elements +/****************************************************************************/ +#ifndef GNEHierarchicalElementChilds_h +#define GNEHierarchicalElementChilds_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include + +#include "GNEAttributeCarrier.h" + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEAdditional; +class GNEDemandElement; +class GNEShape; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNEHierarchicalElementChilds + * @brief An special type of Attribute carrier that owns hierarchical elements + */ +class GNEHierarchicalElementChilds { + +public: + /**@brief Parameter Constructor + * @param[in] edgeChilds vector of edge childs + * @param[in] laneChilds vector of lane childs + * @param[in] shapeChilds vector of shape childs + * @param[in] additionalChilds vector of additional childs + * @param[in] demandElementChilds vector of demand element childs + */ + GNEHierarchicalElementChilds(GNEAttributeCarrier* AC, + const std::vector& edgeChilds, + const std::vector& laneChilds, + const std::vector& shapeChilds, + const std::vector& additionalChilds, + const std::vector& demandElementChilds); + + /// @brief Destructor + ~GNEHierarchicalElementChilds(); + + /// @brief gererate a new ID for an element child + virtual std::string generateChildID(SumoXMLTag childTag) = 0; + + /// @name Functions related with geometry of element + /// @{ + /// @brief update pre-computed geometry information + virtual void updateGeometry(bool updateGrid) = 0; + + /// @brief Returns position of hierarchical element in view + virtual Position getPositionInView() const = 0; + /// @} + + /// @name members and functions related to edge childs + /// @{ + /// @brief add edge child + void addEdgeChild(GNEEdge* edge); + + /// @brief remove edge child + void removeEdgeChild(GNEEdge* edge); + + /// @brief get edge chidls + const std::vector& getEdgeChilds() const; + + /// @} + + /// @name members and functions related to lane childs + /// @{ + /// @brief add lane child + void addLaneChild(GNELane* lane); + + /// @brief remove lane child + void removeLaneChild(GNELane* lane); + + /// @brief get lanes of VSS + const std::vector& getLaneChilds() const; + + /// @} + + /// @name members and functions related to shape childs + /// @{ + /// @brief add shape child + void addShapeChild(GNEShape* shape); + + /// @brief remove shape child + void removeShapeChild(GNEShape* shape); + + /// @brief get shapes of VSS + const std::vector& getShapeChilds() const; + + /// @} + + /// @name members and functions related to additional childs + /// @{ + /// @brief add additional child to this additional + void addAdditionalChild(GNEAdditional* additional); + + /// @brief remove additional child from this additional + void removeAdditionalChild(GNEAdditional* additional); + + /// @brief return vector of additionals that have as Parent this edge (For example, Calibrators) + const std::vector& getAdditionalChilds() const; + + /// @brief sort childs (used by Rerouters, VSS, TAZs...) + void sortAdditionalChilds(); + + /// @brief check if childs are overlapped (Used by Rerouters) + bool checkAdditionalChildsOverlapping() const; + + /// @} + + /// @name members and functions related to demand element childs + /// @{ + /// @brief add demand element child to this demand element + void addDemandElementChild(GNEDemandElement* demandElement); + + /// @brief remove demand element child from this demand element + void removeDemandElementChild(GNEDemandElement* demandElement); + + /// @brief return vector of demand elements that have as Parent this edge (For example, Calibrators) + const std::vector& getDemandElementChilds() const; + + /// @brief sort childs (used by Rerouters, VSS, TAZs...) + void sortDemandElementChilds(); + + /// @brief check if childs are overlapped (Used by Rerouters) + bool checkDemandElementChildsOverlapping() const; + + /// @} + + /// @brief update parent after add or remove a child (can be reimplemented, for example used for statistics) + virtual void updateAdditionalParent(); + + /// @brief update parent after add or remove a child (can be reimplemented, for example used for statistics) + virtual void updateDemandElementParent(); + +protected: + + /// @brief struct for pack all variables and functions relative to connections between hierarchical element and their childs + struct ChildConnections { + /// @brief constructor + ChildConnections(GNEHierarchicalElementChilds* hierarchicalElement); + + /// @brief update Connection's geometry + void update(); + + /// @brief draw connections between Parent and childrens + void draw(GUIGlObjectType parentType) const; + + /// @brief position and rotation of every symbol over lane + std::vector > symbolsPositionAndRotation; + + /// @brief Matrix with the Vertex's positions of connections between parents an their childs + std::vector connectionPositions; + + private: + /// @brief pointer to hierarchical element parent + GNEHierarchicalElementChilds* myHierarchicalElement; + }; + + /// @brief change edge childs of an additional + void changeEdgeChilds(GNEAdditional* elementChild, const std::string& newEdgeIDs); + + /// @brief change edge childs of an additional + void changeLaneChilds(GNEAdditional* elementChild, const std::string& newEdgeIDs); + + /// @brief variable ChildConnections + ChildConnections myChildConnections; + +private: + /// @brief vector with the edge childs of this element + std::vector myEdgeChilds; + + /// @brief vector with the lane childs of this element + std::vector myLaneChilds; + + /// @brief vector with the lane childs of this element + std::vector myShapeChilds; + + /// @brief vector with the additional childs + std::vector myAdditionalChilds; + + /// @brief vector with the demand elements childs + std::vector myDemandElementChilds; + + /// @brief pointer to AC (needed to avoid diamond problem) + GNEAttributeCarrier* myAC; + + /// @brief Invalidated copy constructor. + GNEHierarchicalElementChilds(const GNEHierarchicalElementChilds&) = delete; + + /// @brief Invalidated assignment operator. + GNEHierarchicalElementChilds& operator=(const GNEHierarchicalElementChilds&) = delete; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementParents.cpp sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementParents.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementParents.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementParents.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,579 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEHierarchicalElementParents.cpp +/// @author Pablo Alvarez Lopez +/// @date Dec 2015 +/// @version $Id$ +/// +// A abstract class for representation of additional elements +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "GNEHierarchicalElementParents.h" + +// =========================================================================== +// member method definitions +// =========================================================================== + +GNEHierarchicalElementParents::GNEHierarchicalElementParents(GNEAttributeCarrier* AC, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents) : + myParentConnections(this), + myEdgeParents(edgeParents), + myLaneParents(laneParents), + myShapeParents(shapeParents), + myAdditionalParents(additionalParents), + myDemandElementParents(demandElementParents), + myAC(AC) { +} + + +GNEHierarchicalElementParents::~GNEHierarchicalElementParents() {} + + +void +GNEHierarchicalElementParents::addAdditionalParent(GNEAdditional* additional) { + // First check that additional wasn't already inserted + if (std::find(myAdditionalParents.begin(), myAdditionalParents.end(), additional) != myAdditionalParents.end()) { + throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' was already inserted in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myAdditionalParents.push_back(additional); + // only execute post operations if update geometry is enabled + if (additional->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + updateGeometry(true); + } + } +} + + +void +GNEHierarchicalElementParents::removeAdditionalParent(GNEAdditional* additional) { + // First check that additional was already inserted + auto it = std::find(myAdditionalParents.begin(), myAdditionalParents.end(), additional); + if (it == myAdditionalParents.end()) { + throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myAdditionalParents.erase(it); + // only execute post operations if update geometry is enabled + if (additional->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + updateGeometry(true); + } + } +} + + +const std::vector& +GNEHierarchicalElementParents::getAdditionalParents() const { + return myAdditionalParents; +} + + +void +GNEHierarchicalElementParents::addDemandElementParent(GNEDemandElement* demandElement) { + // First check that demandElement wasn't already inserted + if (std::find(myDemandElementParents.begin(), myDemandElementParents.end(), demandElement) != myDemandElementParents.end()) { + throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' was already inserted in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myDemandElementParents.push_back(demandElement); + // update geometry (for set geometry of lines between Parents and Parents) + if (demandElement->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + updateGeometry(true); + } + } +} + + +void +GNEHierarchicalElementParents::removeDemandElementParent(GNEDemandElement* demandElement) { + // First check that demandElement was already inserted + auto it = std::find(myDemandElementParents.begin(), myDemandElementParents.end(), demandElement); + if (it == myDemandElementParents.end()) { + throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' doesn't exist in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myDemandElementParents.erase(it); + // update geometry (for remove geometry of lines between Parents and Parents) + if (demandElement->getViewNet()->getNet()->isUpdateGeometryEnabled()) { + updateGeometry(true); + } + } +} + + +const std::vector& +GNEHierarchicalElementParents::getDemandElementParents() const { + return myDemandElementParents; +} + + +void +GNEHierarchicalElementParents::addEdgeParent(GNEEdge* edge) { + // Check that edge is valid and doesn't exist previously + if (edge == nullptr) { + throw InvalidArgument("Trying to add an empty " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myEdgeParents.begin(), myEdgeParents.end(), edge) != myEdgeParents.end()) { + throw InvalidArgument("Trying to add a duplicate " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myEdgeParents.push_back(edge); + } +} + + +void +GNEHierarchicalElementParents::removeEdgeParent(GNEEdge* edge) { + // Check that edge is valid and exist previously + if (edge == nullptr) { + throw InvalidArgument("Trying to remove an empty " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myEdgeParents.begin(), myEdgeParents.end(), edge) == myEdgeParents.end()) { + throw InvalidArgument("Trying to remove a non previously inserted " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myEdgeParents.erase(std::find(myEdgeParents.begin(), myEdgeParents.end(), edge)); + } +} + + +const std::vector& +GNEHierarchicalElementParents::getEdgeParents() const { + return myEdgeParents; +} + + +void +GNEHierarchicalElementParents::addLaneParent(GNELane* lane) { + // Check that lane is valid and doesn't exist previously + if (lane == nullptr) { + throw InvalidArgument("Trying to add an empty " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myLaneParents.begin(), myLaneParents.end(), lane) != myLaneParents.end()) { + throw InvalidArgument("Trying to add a duplicate " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myLaneParents.push_back(lane); + } +} + + +void +GNEHierarchicalElementParents::removeLaneParent(GNELane* lane) { + // Check that lane is valid and exist previously + if (lane == nullptr) { + throw InvalidArgument("Trying to remove an empty " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myLaneParents.begin(), myLaneParents.end(), lane) == myLaneParents.end()) { + throw InvalidArgument("Trying to remove a non previously inserted " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myLaneParents.erase(std::find(myLaneParents.begin(), myLaneParents.end(), lane)); + } +} + + +const std::vector& +GNEHierarchicalElementParents::getLaneParents() const { + return myLaneParents; +} + + +void +GNEHierarchicalElementParents::addShapeParent(GNEShape* shape) { + // Check that shape is valid and doesn't exist previously + if (shape == nullptr) { + throw InvalidArgument("Trying to add an empty " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myShapeParents.begin(), myShapeParents.end(), shape) != myShapeParents.end()) { + throw InvalidArgument("Trying to add a duplicate " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myShapeParents.push_back(shape); + } +} + + +void +GNEHierarchicalElementParents::removeShapeParent(GNEShape* shape) { + // Check that shape is valid and exist previously + if (shape == nullptr) { + throw InvalidArgument("Trying to remove an empty " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else if (std::find(myShapeParents.begin(), myShapeParents.end(), shape) == myShapeParents.end()) { + throw InvalidArgument("Trying to remove a non previously inserted " + toString(SUMO_TAG_EDGE) + " parent in " + myAC->getTagStr() + " with ID='" + myAC->getID() + "'"); + } else { + myShapeParents.erase(std::find(myShapeParents.begin(), myShapeParents.end(), shape)); + } +} + + +const std::vector& +GNEHierarchicalElementParents::getShapeParents() const { + return myShapeParents; +} + +// --------------------------------------------------------------------------- +// GNEHierarchicalElementParents::ParentConnections - methods +// --------------------------------------------------------------------------- + +GNEHierarchicalElementParents::ParentConnections::ParentConnections(GNEHierarchicalElementParents* hierarchicalElement) : + myHierarchicalElement(hierarchicalElement) {} + + +void +GNEHierarchicalElementParents::ParentConnections::update() { + // first clear connection positions + connectionPositions.clear(); + symbolsPositionAndRotation.clear(); + + // calculate position and rotation of every simbol for every edge + for (auto i : myHierarchicalElement->myEdgeParents) { + for (auto j : i->getLanes()) { + std::pair posRot; + // set position and lenght depending of shape's lengt + if (j->getShape().length() - 6 > 0) { + posRot.first = j->getShape().positionAtOffset(j->getShape().length() - 6); + posRot.second = j->getShape().rotationDegreeAtOffset(j->getShape().length() - 6); + } else { + posRot.first = j->getShape().positionAtOffset(j->getShape().length()); + posRot.second = j->getShape().rotationDegreeAtOffset(j->getShape().length()); + } + symbolsPositionAndRotation.push_back(posRot); + } + } + + // calculate position and rotation of every symbol for every lane + for (auto i : myHierarchicalElement->myLaneParents) { + std::pair posRot; + // set position and lenght depending of shape's lengt + if (i->getShape().length() - 6 > 0) { + posRot.first = i->getShape().positionAtOffset(i->getShape().length() - 6); + posRot.second = i->getShape().rotationDegreeAtOffset(i->getShape().length() - 6); + } else { + posRot.first = i->getShape().positionAtOffset(i->getShape().length()); + posRot.second = i->getShape().rotationDegreeAtOffset(i->getShape().length()); + } + symbolsPositionAndRotation.push_back(posRot); + } + + // calculate position for every additional parent + for (auto i : myHierarchicalElement->myAdditionalParents) { + // check that position is different of position + if (i->getPositionInView() != myHierarchicalElement->getPositionInView()) { + std::vector posConnection; + double A = std::abs(i->getPositionInView().x() - myHierarchicalElement->getPositionInView().x()); + double B = std::abs(i->getPositionInView().y() - myHierarchicalElement->getPositionInView().y()); + // Set positions of connection's vertex. Connection is build from Entry to E3 + posConnection.push_back(i->getPositionInView()); + if (myHierarchicalElement->getPositionInView().x() > i->getPositionInView().x()) { + if (myHierarchicalElement->getPositionInView().y() > i->getPositionInView().y()) { + posConnection.push_back(Position(i->getPositionInView().x() + A, i->getPositionInView().y())); + } else { + posConnection.push_back(Position(i->getPositionInView().x(), i->getPositionInView().y() - B)); + } + } else { + if (myHierarchicalElement->getPositionInView().y() > i->getPositionInView().y()) { + posConnection.push_back(Position(i->getPositionInView().x(), i->getPositionInView().y() + B)); + } else { + posConnection.push_back(Position(i->getPositionInView().x() - A, i->getPositionInView().y())); + } + } + posConnection.push_back(myHierarchicalElement->getPositionInView()); + connectionPositions.push_back(posConnection); + } + } + + // calculate geometry for connections between parent and parents + for (auto i : symbolsPositionAndRotation) { + std::vector posConnection; + double A = std::abs(i.first.x() - myHierarchicalElement->getPositionInView().x()); + double B = std::abs(i.first.y() - myHierarchicalElement->getPositionInView().y()); + // Set positions of connection's vertex. Connection is build from Entry to E3 + posConnection.push_back(i.first); + if (myHierarchicalElement->getPositionInView().x() > i.first.x()) { + if (myHierarchicalElement->getPositionInView().y() > i.first.y()) { + posConnection.push_back(Position(i.first.x() + A, i.first.y())); + } else { + posConnection.push_back(Position(i.first.x(), i.first.y() - B)); + } + } else { + if (myHierarchicalElement->getPositionInView().y() > i.first.y()) { + posConnection.push_back(Position(i.first.x(), i.first.y() + B)); + } else { + posConnection.push_back(Position(i.first.x() - A, i.first.y())); + } + } + posConnection.push_back(myHierarchicalElement->getPositionInView()); + connectionPositions.push_back(posConnection); + } + +} + + +void +GNEHierarchicalElementParents::ParentConnections::draw(GUIGlObjectType parentType) const { + // Iterate over myConnectionPositions + for (auto i : connectionPositions) { + // Add a draw matrix + glPushMatrix(); + // traslate in the Z axis + glTranslated(0, 0, parentType - 0.01); + // Set color of the base + GLHelper::setColor(RGBColor(255, 235, 0)); + for (auto j = i.begin(); (j + 1) != i.end(); j++) { + // Draw Lines + GLHelper::drawLine((*j), (*(j + 1))); + } + // Pop draw matrix + glPopMatrix(); + } +} + +// --------------------------------------------------------------------------- +// GNEHierarchicalElementParents - protected methods +// --------------------------------------------------------------------------- + + +void +GNEHierarchicalElementParents::changeEdgeParents(GNEShape* elementChild, const std::string& newEdgeIDs) { + // remove additional of edge parents + for (const auto& i : myEdgeParents) { + i->removeShapeChild(elementChild); + } + // obtain new parent edges + myEdgeParents = GNEAttributeCarrier::parse >(elementChild->getNet(), newEdgeIDs); + // check that lane parets aren't empty + if (myEdgeParents.empty()) { + throw InvalidArgument("New list of edge parents cannot be empty"); + } else { + // add additional into edge parents + for (const auto& i : myEdgeParents) { + i->addShapeChild(elementChild); + } + } +} + + +void +GNEHierarchicalElementParents::changeEdgeParents(GNEAdditional* elementChild, const std::string& newEdgeIDs) { + // remove additional of edge parents + for (const auto& i : myEdgeParents) { + i->removeAdditionalChild(elementChild); + } + // obtain new parent edges + myEdgeParents = GNEAttributeCarrier::parse >(elementChild->getViewNet()->getNet(), newEdgeIDs); + // check that lane parets aren't empty + if (myEdgeParents.empty()) { + throw InvalidArgument("New list of edge parents cannot be empty"); + } else { + // add additional into edge parents + for (const auto& i : myEdgeParents) { + i->addAdditionalChild(elementChild); + } + } +} + + +void +GNEHierarchicalElementParents::changeEdgeParents(GNEDemandElement* elementChild, const std::string& newEdgeIDs) { + // remove demandElement of edge parents + for (const auto& i : myEdgeParents) { + i->removeDemandElementChild(elementChild); + } + // obtain new parent edges + myEdgeParents = GNEAttributeCarrier::parse >(elementChild->getViewNet()->getNet(), newEdgeIDs); + // check that lane parets aren't empty + if (myEdgeParents.empty()) { + throw InvalidArgument("New list of edge parents cannot be empty"); + } else { + // add demandElement into edge parents + for (const auto& i : myEdgeParents) { + i->addDemandElementChild(elementChild); + } + } +} + + +void +GNEHierarchicalElementParents::changeLaneParents(GNEAdditional* elementChild, const std::string& newLaneIDs) { + // remove additional of edge parents + for (const auto& i : myLaneParents) { + i->removeAdditionalChild(elementChild); + } + // obtain new parent edges + myLaneParents = GNEAttributeCarrier::parse >(elementChild->getViewNet()->getNet(), newLaneIDs); + // check that lane parets aren't empty + if (myLaneParents.empty()) { + throw InvalidArgument("New list of lane parents cannot be empty"); + } else { + // add additional into edge parents + for (const auto& i : myLaneParents) { + i->addAdditionalChild(elementChild); + } + } +} + + +void +GNEHierarchicalElementParents::changeLaneParents(GNEDemandElement* elementChild, const std::string& newLaneIDs) { + // remove demandElement of edge parents + for (const auto& i : myLaneParents) { + i->removeDemandElementChild(elementChild); + } + // obtain new parent edges + myLaneParents = GNEAttributeCarrier::parse >(elementChild->getViewNet()->getNet(), newLaneIDs); + // check that lane parets aren't empty + if (myLaneParents.empty()) { + throw InvalidArgument("New list of lane parents cannot be empty"); + } else { + // add demandElement into edge parents + for (const auto& i : myLaneParents) { + i->addDemandElementChild(elementChild); + } + } +} + + +void +GNEHierarchicalElementParents::changeLaneParents(GNEShape* elementChild, const std::string& newLaneIDs) { + // remove demandElement of edge parents + for (const auto& i : myLaneParents) { + i->removeShapeChild(elementChild); + } + // obtain new parent edges + myLaneParents = GNEAttributeCarrier::parse >(elementChild->getNet(), newLaneIDs); + // check that lane parets aren't empty + if (myLaneParents.empty()) { + throw InvalidArgument("New list of lane parents cannot be empty"); + } else { + // add demandElement into edge parents + for (const auto& i : myLaneParents) { + i->addShapeChild(elementChild); + } + } +} + + +void +GNEHierarchicalElementParents::changeAdditionalParent(GNEShape* shapeTobeChanged, const std::string& newAdditionalParentID, int additionalParentIndex) { + if ((int)myAdditionalParents.size() < additionalParentIndex) { + throw InvalidArgument(myAC->getTagStr() + " with ID '" + myAC->getID() + "' doesn't have " + toString(additionalParentIndex) + " additional parents"); + } else { + // remove additional of the childs of parent additional + myAdditionalParents.at(additionalParentIndex)->removeShapeChild(shapeTobeChanged); + // set new additional parent + myAdditionalParents.at(additionalParentIndex) = shapeTobeChanged->getNet()->retrieveAdditional(myAdditionalParents.at(additionalParentIndex)->getTagProperty().getTag(), newAdditionalParentID); + // add additional int the childs of parent additional + myAdditionalParents.at(additionalParentIndex)->addShapeChild(shapeTobeChanged); + // update geometry after inserting + updateGeometry(true); + } +} + + +void +GNEHierarchicalElementParents::changeAdditionalParent(GNEAdditional* additionalTobeChanged, const std::string& newAdditionalParentID, int additionalParentIndex) { + if ((int)myAdditionalParents.size() < additionalParentIndex) { + throw InvalidArgument(myAC->getTagStr() + " with ID '" + myAC->getID() + "' doesn't have " + toString(additionalParentIndex) + " additional parents"); + } else { + // remove additional of the childs of parent additional + myAdditionalParents.at(additionalParentIndex)->removeAdditionalChild(additionalTobeChanged); + // set new additional parent + myAdditionalParents.at(additionalParentIndex) = additionalTobeChanged->getViewNet()->getNet()->retrieveAdditional(myAdditionalParents.at(additionalParentIndex)->getTagProperty().getTag(), newAdditionalParentID); + // add additional int the childs of parent additional + myAdditionalParents.at(additionalParentIndex)->addAdditionalChild(additionalTobeChanged); + // update geometry after inserting + updateGeometry(true); + } +} + + +void +GNEHierarchicalElementParents::changeAdditionalParent(GNEDemandElement* demandElementTobeChanged, const std::string& newAdditionalParentID, int additionalParentIndex) { + if ((int)myAdditionalParents.size() < additionalParentIndex) { + throw InvalidArgument(myAC->getTagStr() + " with ID '" + myAC->getID() + "' doesn't have " + toString(additionalParentIndex) + " additional parents"); + } else { + // remove demand element of the childs of parent additional + myAdditionalParents.at(additionalParentIndex)->removeDemandElementChild(demandElementTobeChanged); + // set new demand element parent + myAdditionalParents.at(additionalParentIndex) = demandElementTobeChanged->getViewNet()->getNet()->retrieveAdditional(myAdditionalParents.at(additionalParentIndex)->getTagProperty().getTag(), newAdditionalParentID); + // add demand element int the childs of parent additional + myAdditionalParents.at(additionalParentIndex)->removeDemandElementChild(demandElementTobeChanged); + // update geometry after inserting + updateGeometry(true); + } +} + + +void +GNEHierarchicalElementParents::changeDemandElementParent(GNEShape* shapeTobeChanged, const std::string& newDemandElementParentID, int demandElementParentIndex) { + if ((int)myDemandElementParents.size() < demandElementParentIndex) { + throw InvalidArgument(myAC->getTagStr() + " with ID '" + myAC->getID() + "' doesn't have " + toString(demandElementParentIndex) + " demand element parents"); + } else { + // remove demand element of the childs of parent additional + myDemandElementParents.at(demandElementParentIndex)->removeShapeChild(shapeTobeChanged); + // set new demand element parent + myDemandElementParents.at(demandElementParentIndex) = shapeTobeChanged->getNet()->retrieveDemandElement(myDemandElementParents.at(demandElementParentIndex)->getTagProperty().getTag(), newDemandElementParentID); + // add demand element int the childs of parent additional + myDemandElementParents.at(demandElementParentIndex)->addShapeChild(shapeTobeChanged); + // update geometry after inserting + updateGeometry(true); + } +} + + +void +GNEHierarchicalElementParents::changeDemandElementParent(GNEAdditional* additionalTobeChanged, const std::string& newDemandElementParentID, int demandElementParentIndex) { + if ((int)myDemandElementParents.size() < demandElementParentIndex) { + throw InvalidArgument(myAC->getTagStr() + " with ID '" + myAC->getID() + "' doesn't have " + toString(demandElementParentIndex) + " demand element parents"); + } else { + // remove demand element of the childs of parent additional + myDemandElementParents.at(demandElementParentIndex)->removeAdditionalChild(additionalTobeChanged); + // set new demand element parent + myDemandElementParents.at(demandElementParentIndex) = additionalTobeChanged->getViewNet()->getNet()->retrieveDemandElement(myDemandElementParents.at(demandElementParentIndex)->getTagProperty().getTag(), newDemandElementParentID); + // add demand element int the childs of parent additional + myDemandElementParents.at(demandElementParentIndex)->addAdditionalChild(additionalTobeChanged); + // update geometry after inserting + updateGeometry(true); + } +} + + +void +GNEHierarchicalElementParents::changeDemandElementParent(GNEDemandElement* demandElementTobeChanged, const std::string& newDemandElementParentID, int demandElementParentIndex) { + if ((int)myDemandElementParents.size() < demandElementParentIndex) { + throw InvalidArgument(myAC->getTagStr() + " with ID '" + myAC->getID() + "' doesn't have " + toString(demandElementParentIndex) + " demand element parents"); + } else { + // remove additional of the childs of parent additional + myDemandElementParents.at(demandElementParentIndex)->removeDemandElementChild(demandElementTobeChanged); + // set new additional parent + myDemandElementParents.at(demandElementParentIndex) = demandElementTobeChanged->getViewNet()->getNet()->retrieveDemandElement(myDemandElementParents.at(demandElementParentIndex)->getTagProperty().getTag(), newDemandElementParentID); + // add additional int the childs of parent additional + myDemandElementParents.at(demandElementParentIndex)->addDemandElementChild(demandElementTobeChanged); + // update geometry after inserting + updateGeometry(true); + } +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementParents.h sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementParents.h --- sumo-1.1.0+dfsg1/src/netedit/GNEHierarchicalElementParents.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEHierarchicalElementParents.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,252 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEHierarchicalElementParents.h +/// @author Pablo Alvarez Lopez +/// @date March 2019 +/// @version $Id$ +/// +// A abstract class for representation of Hierarchical Elements +/****************************************************************************/ +#ifndef GNEHierarchicalElementParents_h +#define GNEHierarchicalElementParents_h + +// =========================================================================== +// included modules +// =========================================================================== + +#include + +#include + +#include "GNEAttributeCarrier.h" + +// =========================================================================== +// class declarations +// =========================================================================== + +class GNEAdditional; +class GNEDemandElement; +class GNEShape; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class GNEHierarchicalElementParents + * @brief An special type of Attribute carrier that owns hierarchical elements + */ +class GNEHierarchicalElementParents { + +public: + /**@brief Constructor used by elements that have another additionals as parent + * @param[in] tag Type of xml tag that define the element (SUMO_TAG_BUS_STOP, SUMO_TAG_JUNCTION, etc...) + * @param[in] edgeParents vector of edge parents + * @param[in] laneParents vector of lane parents + * @param[in] shapeParents vector of shape parents + * @param[in] additionalParents vector of additional parents + * @param[in] demandElementParents vector of demand element parents + */ + GNEHierarchicalElementParents(GNEAttributeCarrier* AC, + const std::vector& edgeParents, + const std::vector& laneParents, + const std::vector& shapeParents, + const std::vector& additionalParents, + const std::vector& demandElementParents); + + /// @brief Destructor + ~GNEHierarchicalElementParents(); + + /// @name Functions related with geometry of element + /// @{ + /// @brief update pre-computed geometry information + virtual void updateGeometry(bool updateGrid) = 0; + + /// @brief Returns position of hierarchical element in view + virtual Position getPositionInView() const = 0; + /// @} + + /// @name members and functions related to edge parents + /// @{ + /// @brief add edge parent + void addEdgeParent(GNEEdge* edge); + + /// @brief remove edge parent + void removeEdgeParent(GNEEdge* edge); + + /// @brief get edge chidls + const std::vector& getEdgeParents() const; + + /// @} + + /// @name members and functions related to lane parents + /// @{ + /// @brief add lane parent + void addLaneParent(GNELane* lane); + + /// @brief remove lane parent + void removeLaneParent(GNELane* lane); + + /// @brief get lanes of VSS + const std::vector& getLaneParents() const; + + /// @} + + /// @name members and functions related to shape parents + /// @{ + /// @brief add shape parent + void addShapeParent(GNEShape* shape); + + /// @brief remove shape parent + void removeShapeParent(GNEShape* shape); + + /// @brief get shapes of VSS + const std::vector& getShapeParents() const; + + /// @} + + /// @name members and functions related to additional parents + /// @{ + /// @brief add additional parent to this additional + void addAdditionalParent(GNEAdditional* additional); + + /// @brief remove additional parent from this additional + void removeAdditionalParent(GNEAdditional* additional); + + /// @brief return vector of additionals that have as Parent this edge (For example, Calibrators) + const std::vector& getAdditionalParents() const; + + /// @} + + /// @name members and functions related to demand element parents + /// @{ + /// @brief add demand element parent to this demand element + void addDemandElementParent(GNEDemandElement* demandElement); + + /// @brief remove demand element parent from this demand element + void removeDemandElementParent(GNEDemandElement* demandElement); + + /// @brief return vector of demand elements that have as Parent this edge (For example, Calibrators) + const std::vector& getDemandElementParents() const; + + /// @} + +protected: + /// @brief struct for pack all variables and functions relative to connections between hierarchical element and their childs + struct ParentConnections { + /// @brief constructor + ParentConnections(GNEHierarchicalElementParents* hierarchicalElement); + + /// @brief update Connection's geometry + void update(); + + /// @brief draw connections between Parent and childrens + void draw(GUIGlObjectType parentType) const; + + /// @brief position and rotation of every symbol over lane + std::vector > symbolsPositionAndRotation; + + /// @brief Matrix with the Vertex's positions of connections between parents an their childs + std::vector connectionPositions; + + private: + /// @brief pointer to hierarchical element parent + GNEHierarchicalElementParents* myHierarchicalElement; + }; + + /// @name members and functions relative to changing parents + /// @{ + + /// @brief change edge parents of a shape + void changeEdgeParents(GNEShape* elementChild, const std::string& newEdgeIDs); + + /// @brief change edge parents of an additional + void changeEdgeParents(GNEAdditional* elementChild, const std::string& newEdgeIDs); + + /// @brief change edge parents of a demandElement + void changeEdgeParents(GNEDemandElement* elementChild, const std::string& newEdgeIDs); + + /// @brief change edge parents of a shape + void changeLaneParents(GNEShape* elementChild, const std::string& newLaneIDs); + + /// @brief change edge parents of an additional + void changeLaneParents(GNEAdditional* elementChild, const std::string& newLaneIDs); + + /// @brief change edge parents of a demandElement + void changeLaneParents(GNEDemandElement* elementChild, const std::string& newLaneIDs); + + /**@brief change additional parent of a shape + * @throw exception if this shape doesn't have previously a defined Additional parent + * @throw exception if shape with ID newAdditionalParentID doesn't exist + */ + void changeAdditionalParent(GNEShape* shapeTobeChanged, const std::string& newAdditionalParentID, int additionalParentIndex); + + /**@brief change additional parent of an additional + * @throw exception if this additional doesn't have previously a defined Additional parent + * @throw exception if additional with ID newAdditionalParentID doesn't exist + */ + void changeAdditionalParent(GNEAdditional* additionalTobeChanged, const std::string& newAdditionalParentID, int additionalParentIndex); + + /**@brief change additional parent of a demand element + * @throw exception if this additional doesn't have previously a defined Additional parent + * @throw exception if additional with ID newAdditionalParentID doesn't exist + */ + void changeAdditionalParent(GNEDemandElement* demandElementTobeChanged, const std::string& newAdditionalParentID, int additionalParentIndex); + + /**@brief change first demand element parent of a shape + * @throw exception if this demand element doesn't have previously a defined DemandElement parent + * @throw exception if demand element with ID newDemandElementParentID doesn't exist + */ + void changeDemandElementParent(GNEShape* shapeTobeChanged, const std::string& newDemandElementParentID, int demandElementParentIndex); + + /**@brief change first demand element parent of an additional + * @throw exception if this demand element doesn't have previously a defined DemandElement parent + * @throw exception if demand element with ID newDemandElementParentID doesn't exist + */ + void changeDemandElementParent(GNEAdditional* additionalTobeChanged, const std::string& newDemandElementParentID, int demandElementParentIndex); + + /**@brief change first demand element parent of demandElement + * @throw exception if this demand element doesn't have previously a defined DemandElement parent + * @throw exception if demand element with ID newDemandElementParentID doesn't exist + */ + void changeDemandElementParent(GNEDemandElement* demandElementTobeChanged, const std::string& newDemandElementParentID, int demandElementParentIndex); + + /// @} + + /// @brief variable ParentConnections + ParentConnections myParentConnections; + +private: + /// @brief list of edge parents of this element + std::vector myEdgeParents; + + /// @brief list of lane parents of this element + std::vector myLaneParents; + + /// @brief list of shape parents of this element + std::vector myShapeParents; + + /// @brief list of additional parents of this element + std::vector myAdditionalParents; + + /// @brief list of demand elements parents of this element + std::vector myDemandElementParents; + + /// @brief pointer to AC (needed to avoid diamond problem) + GNEAttributeCarrier* myAC; + + /// @brief Invalidated copy constructor. + GNEHierarchicalElementParents(const GNEHierarchicalElementParents&) = delete; + + /// @brief Invalidated assignment operator. + GNEHierarchicalElementParents& operator=(const GNEHierarchicalElementParents&) = delete; +}; + +#endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNELoadThread.cpp sumo-1.2.0+dfsg1/src/netedit/GNELoadThread.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNELoadThread.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNELoadThread.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ // =========================================================================== // member method definitions // =========================================================================== -GNELoadThread::GNELoadThread(FXApp* app, MFXInterThreadEventClient* mw, MFXEventQue& eq, FXEX::FXThreadEvent& ev) : +GNELoadThread::GNELoadThread(FXApp* app, MFXInterThreadEventClient* mw, FXSynchQue& eq, FXEX::FXThreadEvent& ev) : FXSingleEventThread(app, mw), myParent(mw), myEventQue(eq), myEventThrow(ev) { myDebugRetriever = new MsgRetrievingFunction(this, &GNELoadThread::retrieveMessage, MsgHandler::MT_DEBUG); @@ -189,7 +189,7 @@ MsgHandler::getMessageInstance()->removeRetriever(myMessageRetriever); // inform parent about the process GUIEvent* e = new GNEEvent_NetworkLoaded(net, myFile, guiSettingsFile, viewportFromRegistry); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); } @@ -217,21 +217,24 @@ oc.addOptionSubTopic("Formats"); oc.addOptionSubTopic("Netedit"); oc.addOptionSubTopic("Visualisation"); + oc.addOptionSubTopic("Time"); oc.doRegister("new", new Option_Bool(false)); // !!! oc.addDescription("new", "Input", "Start with a new network"); - oc.doRegister("sumo-additionals-file", 'a', new Option_String()); - oc.addDescription("sumo-additionals-file", "Netedit", "file in which additionals are loaded"); + oc.doRegister("additional-files", 'a', new Option_FileName()); + oc.addSynonyme("additional-files", "additional"); + oc.addDescription("additional-files", "Netedit", "Load additional and shapes descriptions from FILE(s)"); oc.doRegister("additionals-output", new Option_String()); oc.addDescription("additionals-output", "Netedit", "file in which additionals must be saved"); - oc.doRegister("sumo-shapes-file", new Option_String()); - oc.addDescription("sumo-shapes-file", "Netedit", "file in which shapes are loaded"); + oc.doRegister("route-files", 'r', new Option_FileName()); + oc.addSynonyme("route-files", "routes"); + oc.addDescription("route-files", "Netedit", "Load demand elements descriptions from FILE(s)"); - oc.doRegister("shapes-output", new Option_String()); - oc.addDescription("shapes-output", "Netedit", "file in which shapes must be saved"); + oc.doRegister("demandelements-output", new Option_String()); + oc.addDescription("demandelements-output", "Netedit", "file in which demand elements must be saved"); oc.doRegister("TLSPrograms-output", new Option_String()); oc.addDescription("TLSPrograms-output", "Netedit", "file in which TLS Programs must be saved"); @@ -263,9 +266,19 @@ oc.doRegister("gui-testing-debug-gl", new Option_Bool(false)); oc.addDescription("gui-testing-debug-gl", "Visualisation", "Enable output messages during GUI-Testing specific of gl functions"); + // register the simulation settings (needed for GNERouteHandler) + oc.doRegister("begin", new Option_String("0", "TIME")); + oc.addDescription("begin", "Time", "Defines the begin time in seconds; The simulation starts at this time"); + + oc.doRegister("end", new Option_String("-1", "TIME")); + oc.addDescription("end", "Time", "Defines the end time in seconds; The simulation ends at this time"); + + oc.doRegister("default.action-step-length", new Option_Float(0.0)); + oc.addDescription("default.action-step-length", "Processing", "Length of the default interval length between action points for the car-following and lane-change models (in seconds). If not specified, the simulation step-length is used per default. Vehicle- or VType-specific settings override the default. Must be a multiple of the simulation step-length."); + SystemFrame::addReportOptions(oc); // this subtopic is filled here, too - NIFrame::fillOptions(); + NIFrame::fillOptions(true); NBFrame::fillOptions(false); NWFrame::fillOptions(false); RandHelper::insertRandOptions(); @@ -329,9 +342,9 @@ void GNELoadThread::retrieveMessage(const MsgHandler::MsgType type, const std::string& msg) { GUIEvent* e = new GUIEvent_Message(type, msg); - myEventQue.add(e); + myEventQue.push_back(e); myEventThrow.signal(); } -/****************************************************************************/ +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNELoadThread.h sumo-1.2.0+dfsg1/src/netedit/GNELoadThread.h --- sumo-1.1.0+dfsg1/src/netedit/GNELoadThread.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNELoadThread.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,7 +26,7 @@ #include #include -#include +#include #include @@ -46,7 +46,7 @@ class GNELoadThread : public FXSingleEventThread { public: /// @brief constructor - GNELoadThread(FXApp* app, MFXInterThreadEventClient* mw, MFXEventQue& eq, + GNELoadThread(FXApp* app, MFXInterThreadEventClient* mw, FXSynchQue& eq, FXEX::FXThreadEvent& ev); /// @brief destructor @@ -93,7 +93,7 @@ OutputDevice* myErrorRetriever, *myMessageRetriever, *myWarningRetriever, *myDebugRetriever, *myGLDebugRetriever; /// @brief event Queue - MFXEventQue& myEventQue; + FXSynchQue& myEventQue; /// @brief event throw FXEX::FXThreadEvent& myEventThrow; diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNENet.cpp sumo-1.2.0+dfsg1/src/netedit/GNENet.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNENet.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNENet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,17 +30,23 @@ #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 @@ -60,6 +66,7 @@ #include "GNEApplicationWindow.h" #include "GNENet.h" +#include "GNEViewNet.h" #include "GNEUndoList.h" #include "GNEViewParent.h" @@ -90,8 +97,9 @@ myNeedRecompute(true), myNetSaved(true), myAdditionalsSaved(true), - myShapesSaved(true), myTLSProgramsSaved(true), + myDemandElementsSaved(true), + myUpdateGeometryEnabled(true), myAllowUndoShapes(true) { // set net in gIDStorage GUIGlObjectStorage::gIDStorage.setNetObject(this); @@ -105,19 +113,24 @@ } // fill additionals with tags (note: this include the TAZS) - auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL, false); + auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL, false); for (auto i : listOfTags) { myAttributeCarriers.additionals.insert(std::make_pair(i, std::map())); } - listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_TAZ, false); + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_TAZ, false); for (auto i : listOfTags) { myAttributeCarriers.additionals.insert(std::make_pair(i, std::map())); } - // default vehicle type is always available - GNECalibratorVehicleType* defaultVehicleType = new GNECalibratorVehicleType(myViewNet, DEFAULT_VTYPE_ID); - myAttributeCarriers.additionals.at(defaultVehicleType->getTagProperty().getTag()).insert(std::make_pair(defaultVehicleType->getID(), defaultVehicleType)); - defaultVehicleType->incRef("GNENet::DEFAULT_VEHTYPE"); + // fill demand elements with tags + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_DEMANDELEMENT, false); + for (auto i : listOfTags) { + myAttributeCarriers.demandElements.insert(std::make_pair(i, std::map())); + } + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_STOP, false); + for (auto i : listOfTags) { + myAttributeCarriers.demandElements.insert(std::make_pair(i, std::map())); + } } @@ -154,6 +167,18 @@ delete j.second; } } + // Drop demand elements (Only used for demand elements that were inserted without using GNEChange_DemandElement, for example the default VType") + for (auto it : myAttributeCarriers.demandElements) { + for (auto j : it.second) { + // decrease reference manually (because it was increased manually in GNERouteHandler) + j.second->decRef(); + // show extra information for tests + WRITE_DEBUG("Deleting unreferenced " + j.second->getTagStr() + " '" + j.second->getID() + "' in GNENet destructor"); + delete j.second; + } + } + // delete RouteCalculator instance of GNEDemandElement + GNEDemandElement::deleteRouteCalculatorInstance(); // show extra information for tests WRITE_DEBUG("Deleting net builder in GNENet destructor"); delete myNetBuilder; @@ -205,7 +230,7 @@ myViewNet->getUndoList()->p_end(); } else { // insert shape without allowing undo/redo - insertShape(poly); + insertShape(poly, true); poly->incRef("addPolygon"); } return true; @@ -232,7 +257,7 @@ myViewNet->getUndoList()->p_end(); } else { // insert shape without allowing undo/redo - insertShape(poi); + insertShape(poi, true); poi->incRef("addPOI"); } return true; @@ -250,7 +275,7 @@ myViewNet->getUndoList()->p_end(); } else { // insert shape without allowing undo/redo - insertShape(poi); + insertShape(poi, true); poi->incRef("addPOI"); } return true; @@ -406,25 +431,34 @@ void GNENet::deleteEdge(GNEEdge* edge, GNEUndoList* undoList, bool recomputeConnections) { undoList->p_begin("delete " + toString(SUMO_TAG_EDGE)); - // remove edge of additional parents (For example, Rerouters) - edge->removeEdgeOfAdditionalParents(undoList); + // delete all shapes childs of edge + while (edge->getShapeChilds().size() > 0) { + deleteShape(edge->getShapeChilds().front(), undoList); + } + // delete all shapes childs of lane + for (auto i : edge->getLanes()) { + while (i->getShapeChilds().size() > 0) { + deleteShape(i->getShapeChilds().front(), undoList); + } + } // delete all additionals childs of edge while (edge->getAdditionalChilds().size() > 0) { - myViewNet->getViewParent()->getAdditionalFrame()->removeAdditional(edge->getAdditionalChilds().front()); + deleteAdditional(edge->getAdditionalChilds().front(), undoList); } // delete all additionals childs of lane for (auto i : edge->getLanes()) { - // remove lane of additional parents (For example, VSS) - i->removeLaneOfAdditionalParents(undoList, false); while (i->getAdditionalChilds().size() > 0) { - myViewNet->getViewParent()->getAdditionalFrame()->removeAdditional(i->getAdditionalChilds().front()); + deleteAdditional(i->getAdditionalChilds().front(), undoList); } } - // delete shapes childs of lane + // delete all demand element childs of edge + while (edge->getDemandElementChilds().size() > 0) { + deleteDemandElement(edge->getDemandElementChilds().front(), undoList); + } + // delete all demand element childs of lane for (auto i : edge->getLanes()) { - std::vector copyOfLaneShapes = i->getShapeChilds(); - for (auto j : copyOfLaneShapes) { - undoList->add(new GNEChange_Shape(j, false), true); + while (i->getDemandElementChilds().size() > 0) { + deleteDemandElement(i->getDemandElementChilds().front(), undoList); } } // remove edge from crossings related with this edge @@ -458,23 +492,34 @@ void GNENet::replaceIncomingEdge(GNEEdge* which, GNEEdge* by, GNEUndoList* undoList) { undoList->p_begin("replace " + toString(SUMO_TAG_EDGE)); - undoList->p_add(new GNEChange_Attribute(by, SUMO_ATTR_TO, which->getAttribute(SUMO_ATTR_TO))); + undoList->p_add(new GNEChange_Attribute(by, this, SUMO_ATTR_TO, which->getAttribute(SUMO_ATTR_TO))); // replace in additionals childs of edge while (which->getAdditionalChilds().size() > 0) { - undoList->p_add(new GNEChange_Attribute(which->getAdditionalChilds().front(), SUMO_ATTR_EDGE, by->getID())); + undoList->p_add(new GNEChange_Attribute(which->getAdditionalChilds().front(), this, SUMO_ATTR_EDGE, by->getID())); } // replace in additionals childs of lane for (auto i : which->getLanes()) { std::vector copyOfLaneAdditionals = i->getAdditionalChilds(); for (auto j : copyOfLaneAdditionals) { - undoList->p_add(new GNEChange_Attribute(j, SUMO_ATTR_LANE, by->getNBEdge()->getLaneID(i->getIndex()))); + undoList->p_add(new GNEChange_Attribute(j, this, SUMO_ATTR_LANE, by->getNBEdge()->getLaneID(i->getIndex()))); + } + } + // replace in demand elements childs of edge + while (which->getDemandElementChilds().size() > 0) { + undoList->p_add(new GNEChange_Attribute(which->getDemandElementChilds().front(), this, SUMO_ATTR_EDGE, by->getID())); + } + // replace in demand elements childs of lane + for (auto i : which->getLanes()) { + std::vector copyOfLaneDemandElements = i->getDemandElementChilds(); + for (auto j : copyOfLaneDemandElements) { + undoList->p_add(new GNEChange_Attribute(j, this, SUMO_ATTR_LANE, by->getNBEdge()->getLaneID(i->getIndex()))); } } // replace in shapes childs of lane for (auto i : which->getLanes()) { std::vector copyOfLaneShapes = i->getShapeChilds(); for (auto j : copyOfLaneShapes) { - undoList->p_add(new GNEChange_Attribute(j, SUMO_ATTR_LANE, by->getNBEdge()->getLaneID(i->getIndex()))); + undoList->p_add(new GNEChange_Attribute(j, this, SUMO_ATTR_LANE, by->getNBEdge()->getLaneID(i->getIndex()))); } } // replace in rerouters @@ -508,11 +553,13 @@ deleteEdge(edge, undoList, recomputeConnections); } else { undoList->p_begin("delete " + toString(SUMO_TAG_LANE)); - // remove lane of additional parents (For example, VSS) - lane->removeLaneOfAdditionalParents(undoList, false); // delete additionals childs of lane while (lane->getAdditionalChilds().size() > 0) { - myViewNet->getViewParent()->getAdditionalFrame()->removeAdditional(lane->getAdditionalChilds().front()); + deleteAdditional(lane->getAdditionalChilds().front(), undoList); + } + // delete demand element childs of lane + while (lane->getDemandElementChilds().size() > 0) { + deleteDemandElement(lane->getDemandElementChilds().front(), undoList); } // delete POIShapes of Lane while (lane->getShapeChilds().size() > 0) { @@ -578,10 +625,40 @@ void +GNENet::deleteAdditional(GNEAdditional* additional, GNEUndoList* undoList) { + undoList->p_begin("delete " + additional->getTagStr()); + // first remove all additional childs of this additional calling this function recursively + while (additional->getAdditionalChilds().size() > 0) { + deleteAdditional(additional->getAdditionalChilds().front(), undoList); + } + // remove additional + undoList->add(new GNEChange_Additional(additional, false), true); + undoList->p_end(); +} + + +void +GNENet::deleteDemandElement(GNEDemandElement* demandElement, GNEUndoList* undoList) { + undoList->p_begin("delete " + demandElement->getTagStr()); + // first remove all demand element childs of this demandElement calling this function recursively + while (demandElement->getDemandElementChilds().size() > 0) { + deleteDemandElement(demandElement->getDemandElementChilds().front(), undoList); + } + // remove demandElement + undoList->add(new GNEChange_DemandElement(demandElement, false), true); + undoList->p_end(); +} + + +void GNENet::duplicateLane(GNELane* lane, GNEUndoList* undoList, bool recomputeConnections) { undoList->p_begin("duplicate " + toString(SUMO_TAG_LANE)); GNEEdge* edge = &lane->getParentEdge(); const NBEdge::Lane& laneAttrs = edge->getNBEdge()->getLaneStruct(lane->getIndex()); + if (recomputeConnections) { + edge->getGNEJunctionSource()->setLogicValid(false, undoList); + edge->getGNEJunctionSource()->setLogicValid(false, undoList); + } GNELane* newLane = new GNELane(*edge, lane->getIndex()); undoList->add(new GNEChange_Lane(edge, newLane, laneAttrs, true, recomputeConnections), true); requireRecompute(); @@ -621,19 +698,36 @@ bool GNENet::addRestrictedLane(SUMOVehicleClass vclass, GNEEdge& edge, int index, GNEUndoList* undoList) { - // First check that edge don't have a sidewalk + // First check that edge don't have a restricted lane of the given vclass for (auto i : edge.getLanes()) { if (i->isRestricted(vclass)) { return false; } } - // check that index is correct - if (index >= (int)edge.getLanes().size()) { + // check that index is correct (index == size adds to the left of the leftmost lane) + const int numLanes = (int)edge.getLanes().size(); + if (index > numLanes) { return false; } + if (index < 0) { + // guess index from vclass + if (vclass == SVC_PEDESTRIAN) { + index = 0; + } else if (vclass == SVC_BICYCLE) { + // add bikelanes to the left of an existing sidewalk + index = edge.getLanes()[0]->isRestricted(SVC_PEDESTRIAN) ? 1 : 0; + } else if (vclass == SVC_IGNORING || vclass == SVC_BUS) { + // add greenVerge to the left of an existing sidewalk or bikeLane + // add busLane to the left of an existing sidewalk, bikeLane or greenVerge + index = 0; + while (index < numLanes && (edge.getNBEdge()->getPermissions(index) & ~(SVC_PEDESTRIAN | SVC_BICYCLE)) == 0) { + index++; + } + } + } // duplicate selected lane - duplicateLane(edge.getLanes().at(index), undoList, true); - // transform the created (last) lane to a sidewalk + duplicateLane(edge.getLanes().at(MIN2(index, numLanes - 1)), undoList, true); + // transform the created lane return restrictLane(vclass, edge.getLanes().at(index), undoList); } @@ -702,7 +796,7 @@ } } // modify the edge so that it ends at the new junction (and all incoming connections are preserved - undoList->p_add(new GNEChange_Attribute(edge, SUMO_ATTR_TO, newJunction->getID())); + undoList->p_add(new GNEChange_Attribute(edge, this, SUMO_ATTR_TO, newJunction->getID())); // fix first part of geometry newGeoms.first.pop_back(); newGeoms.first.erase(newGeoms.first.begin()); @@ -730,7 +824,7 @@ GNENet::splitEdgesBidi(GNEEdge* edge, GNEEdge* oppositeEdge, const Position& pos, GNEUndoList* undoList) { GNEJunction* newJunction = nullptr; undoList->p_begin("split " + toString(SUMO_TAG_EDGE) + "s"); - // split edge and save created junction + // split edge and save created junction newJunction = splitEdge(edge, pos, undoList, newJunction); // split second edge splitEdge(oppositeEdge, pos, undoList, newJunction); @@ -800,7 +894,7 @@ if (e->getGNEJunctionSource() == target) { deleteEdge(e, undoList, false); } else { - undoList->p_add(new GNEChange_Attribute(e, SUMO_ATTR_TO, target->getID())); + undoList->p_add(new GNEChange_Attribute(e, this, SUMO_ATTR_TO, target->getID())); } } // deleting edges changes in the underlying EdgeVector so we have to make a copy @@ -812,7 +906,7 @@ if (e->getGNEJunctionDestiny() == target) { deleteEdge(e, undoList, false); } else { - undoList->p_add(new GNEChange_Attribute(e, SUMO_ATTR_FROM, target->getID())); + undoList->p_add(new GNEChange_Attribute(e, this, SUMO_ATTR_FROM, target->getID())); } } // deleted moved junction @@ -838,8 +932,8 @@ if (myNetSaved == true) { WRITE_DEBUG("net has to be saved"); std::string additionalsSaved = (myAdditionalsSaved ? "saved" : "unsaved"); - std::string shapeSaved = (myShapesSaved ? "saved" : "unsaved"); - WRITE_DEBUG("Current saving Status: net unsaved, additionals " + additionalsSaved + ", shapes " + shapeSaved); + std::string demandElementsSaved = (myDemandElementsSaved ? "saved" : "unsaved"); + WRITE_DEBUG("Current saving Status: net unsaved, additionals " + additionalsSaved + ", demand elements " + demandElementsSaved); } myNetSaved = !value; } @@ -880,6 +974,24 @@ void GNENet::setViewNet(GNEViewNet* viewNet) { myViewNet = viewNet; + + // Create default vehicle Type (it has to be created here due myViewNet was previously nullptr) + GNEVehicleType* defaultVehicleType = new GNEVehicleType(myViewNet, DEFAULT_VTYPE_ID, SVC_PASSENGER); + myAttributeCarriers.demandElements.at(defaultVehicleType->getTagProperty().getTag()).insert(std::make_pair(defaultVehicleType->getID(), defaultVehicleType)); + defaultVehicleType->incRef("GNENet::DEFAULT_VEHTYPE"); + + // Create default pedestrian Type (it has to be created here due myViewNet was previously nullptr) + GNEVehicleType* defaultPedestrianType = new GNEVehicleType(myViewNet, DEFAULT_PEDTYPE_ID, SVC_PEDESTRIAN); + myAttributeCarriers.demandElements.at(defaultPedestrianType->getTagProperty().getTag()).insert(std::make_pair(defaultPedestrianType->getID(), defaultPedestrianType)); + defaultPedestrianType->incRef("GNENet::DEFAULT_PEDTYPE_ID"); + + // Create default Bike Type (it has to be created here due myViewNet was previously nullptr) + GNEVehicleType* defaultBikeType = new GNEVehicleType(myViewNet, DEFAULT_BIKETYPE_ID, SVC_BICYCLE); + myAttributeCarriers.demandElements.at(defaultBikeType->getTagProperty().getTag()).insert(std::make_pair(defaultBikeType->getID(), defaultBikeType)); + defaultBikeType->incRef("GNENet::DEFAULT_BIKETYPE_ID"); + + // create instance of RouteCalculator + GNEDemandElement::createRouteCalculatorInstance(this); } @@ -1074,7 +1186,7 @@ throw UnknownElement(toString(SUMO_TAG_LANE) + " " + id); } } else { - // check if the recomputing with volatile option has changed the number of lanes (needed for additionals) + // check if the recomputing with volatile option has changed the number of lanes (needed for additionals and demand elements) if (checkVolatileChange && (myEdgesAndNumberOfLanes.count(edge_id) == 1) && myEdgesAndNumberOfLanes[edge_id] != (int)edge->getLanes().size()) { return edge->getLanes().at(lane->getIndex() + 1); } @@ -1152,7 +1264,6 @@ void GNENet::addGLObjectIntoGrid(GUIGlObject* o) { myGrid.addAdditionalGLObject(o); - update(); } @@ -1216,11 +1327,21 @@ for (auto i : myPOIs) { result.push_back(dynamic_cast(i.second)); } - } else if (GNEAttributeCarrier::getTagProperties(type).isAdditional()) { + for (auto i : myAttributeCarriers.demandElements) { + for (auto j : i.second) { + result.push_back(j.second); + } + } + } else if (GNEAttributeCarrier::getTagProperties(type).isAdditional() || GNEAttributeCarrier::getTagProperties(type).isTAZ()) { // only returns additionals of a certain type. for (auto i : myAttributeCarriers.additionals.at(type)) { result.push_back(i.second); } + } else if (GNEAttributeCarrier::getTagProperties(type).isDemandElement() || GNEAttributeCarrier::getTagProperties(type).isStop()) { + // only returns demand elements of a certain type. + for (auto i : myAttributeCarriers.demandElements.at(type)) { + result.push_back(i.second); + } } else { // return only a part of elements, depending of type switch (type) { @@ -1276,7 +1397,7 @@ void -GNENet::computeEverything(GNEApplicationWindow* window, bool force, bool volatileOptions, std::string additionalPath, std::string shapePath) { +GNENet::computeEverything(GNEApplicationWindow* window, bool force, bool volatileOptions, std::string additionalPath, std::string demandPath) { if (!myNeedRecompute) { if (force) { if (volatileOptions) { @@ -1308,16 +1429,14 @@ // load additionals if was recomputed with volatile options if (additionalPath != "") { // fill additionals with tags - auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL, false); + auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL, false); + for (auto i : listOfTags) { + myAttributeCarriers.additionals.insert(std::make_pair(i, std::map())); + } + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_TAZ, false); for (auto i : listOfTags) { myAttributeCarriers.additionals.insert(std::make_pair(i, std::map())); } - - // default vehicle type is always available - GNECalibratorVehicleType* defaultVehicleType = new GNECalibratorVehicleType(myViewNet, DEFAULT_VTYPE_ID); - myAttributeCarriers.additionals.at(defaultVehicleType->getTagProperty().getTag()).insert(std::make_pair(defaultVehicleType->getID(), defaultVehicleType)); - defaultVehicleType->incRef("GNENet::DEFAULT_VEHTYPE"); - // Create additional handler GNEAdditionalHandler additionalHandler(additionalPath, myViewNet, false); // Run parser @@ -1330,20 +1449,41 @@ // clear myEdgesAndNumberOfLanes after reload additionals myEdgesAndNumberOfLanes.clear(); } - // load shapes if was recomputed with volatile options - if (shapePath != "") { - // new shapes has to be inserted without possibility of undo/redo - myAllowUndoShapes = false; - GNEApplicationWindow::GNEShapeHandler handler(shapePath, this); - if (!XMLSubSys::runParser(handler, shapePath, false)) { - WRITE_MESSAGE("Loading of " + shapePath + " failed."); + // load demand elements if was recomputed with volatile options + if (demandPath != "") { + // fill demandElements with tags + auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_DEMANDELEMENT, false); + for (auto i : listOfTags) { + myAttributeCarriers.demandElements.insert(std::make_pair(i, std::map())); + } + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_STOP, false); + for (auto i : listOfTags) { + myAttributeCarriers.demandElements.insert(std::make_pair(i, std::map())); } - // restore flag - myAllowUndoShapes = true; + // Create demandElement handler + GNERouteHandler demandElementHandler(demandPath, myViewNet, false); + // Run parser + if (!XMLSubSys::runParser(demandElementHandler, demandPath, false)) { + WRITE_MESSAGE("Loading of " + demandPath + " failed."); + } else { + // update view + update(); + } + // clear myEdgesAndNumberOfLanes after reload demandElements + myEdgesAndNumberOfLanes.clear(); } window->getApp()->endWaitCursor(); window->setStatusBarText("Finished computing junctions."); - update(); +} + + +void +GNENet::updateGeometryDemandElements() { + for (const auto& i : myAttributeCarriers.demandElements) { + for (const auto& j : i.second) { + j.second->updateGeometry(true); + } + } } @@ -1460,9 +1600,7 @@ GNEJunction* joined = createJunction(pos, undoList); joined->setAttribute(SUMO_ATTR_TYPE, toString(nodeType), undoList); // i.e. rail crossing if (setTL) { - joined->setAttribute(SUMO_ATTR_TYPE, toString(NODETYPE_TRAFFIC_LIGHT), undoList); - // XXX ticket831 - //joined->->setAttribute(SUMO_ATTR_TYPE, toString(type), undoList); + joined->setAttribute(SUMO_ATTR_TLTYPE, toString(type), undoList); } // #3128 this is not undone when calling 'undo' @@ -1485,7 +1623,7 @@ } // remap edges for (auto it : allIncoming) { - undoList->p_add(new GNEChange_Attribute(myAttributeCarriers.edges[it->getID()], SUMO_ATTR_TO, joined->getID())); + undoList->p_add(new GNEChange_Attribute(myAttributeCarriers.edges[it->getID()], this, SUMO_ATTR_TO, joined->getID())); } EdgeSet edgesWithin; @@ -1497,7 +1635,7 @@ edgesWithin.insert(it); deleteEdge(e, undoList, false); } else { - undoList->p_add(new GNEChange_Attribute(myAttributeCarriers.edges[it->getID()], SUMO_ATTR_FROM, joined->getID())); + undoList->p_add(new GNEChange_Attribute(myAttributeCarriers.edges[it->getID()], this, SUMO_ATTR_FROM, joined->getID())); } } @@ -1639,6 +1777,7 @@ newShape.append(continuation->getNBEdge()->getInnerGeometry()); begin->setAttribute(GNE_ATTR_SHAPE_END, continuation->getAttribute(GNE_ATTR_SHAPE_END), undoList); + begin->setAttribute(SUMO_ATTR_ENDOFFSET, continuation->getAttribute(SUMO_ATTR_ENDOFFSET), undoList); begin->setAttribute(SUMO_ATTR_SHAPE, toString(newShape), undoList); } //delete replaced junction @@ -1649,30 +1788,82 @@ void -GNENet::splitJunction(GNEJunction* junction, GNEUndoList* undoList) { - std::vector endpoints = junction->getNBNode()->getEndPoints(); +GNENet::splitJunction(GNEJunction* junction, bool reconnect, GNEUndoList* undoList) { + std::vector > endpoints = junction->getNBNode()->getEndPoints(); if (endpoints.size() < 2) { return; } // start operation undoList->p_begin("Split junction"); - //std::cout << "split junction at endpoints: " << toString(endpoints) << "\n"; + // record connections + std::map> straightConnections; + for (GNEEdge* e : junction->getGNEIncomingEdges()) { + for (const auto& c : e->getNBEdge()->getConnections()) { + if (c.fromLane >= 0 && junction->getNBNode()->getDirection(e->getNBEdge(), c.toEdge) == LINKDIR_STRAIGHT) { + straightConnections[e].push_back(c); + } + }; + } + //std::cout << "split junction at endpoints:\n"; + junction->setLogicValid(false, undoList); - for (Position pos : endpoints) { + for (const auto& pair : endpoints) { + const Position& pos = pair.first; + const std::string& origID = pair.second; GNEJunction* newJunction = createJunction(pos, undoList); - for (GNEEdge* e : junction->getGNEIncomingEdges()) { - if (e->getNBEdge()->getGeometry().back().almostSame(pos)) { - //std::cout << " " << e->getID() << " pos=" << pos << "\n"; - undoList->p_add(new GNEChange_Attribute(e, SUMO_ATTR_TO, newJunction->getID())); + std::string newID = origID != "" ? origID : newJunction->getID(); + // make a copy because the original vectors are modified during iteration + const std::vector incoming = junction->getGNEIncomingEdges(); + const std::vector outgoing = junction->getGNEOutgoingEdges(); + //std::cout << " checkEndpoint " << pair.first << " " << pair.second << " newID=" << newID << "\n"; + for (GNEEdge* e : incoming) { + //std::cout << " incoming " << e->getID() << " pos=" << pos << " origTo=" << e->getNBEdge()->getParameter("origTo") << " newID=" << newID << "\n"; + if (e->getNBEdge()->getGeometry().back().almostSame(pos) || e->getNBEdge()->getParameter("origTo") == newID) { + //std::cout << " match\n"; + undoList->p_add(new GNEChange_Attribute(e, this, SUMO_ATTR_TO, newJunction->getID())); + } + } + for (GNEEdge* e : outgoing) { + //std::cout << " outgoing " << e->getID() << " pos=" << pos << " origFrom=" << e->getNBEdge()->getParameter("origFrom") << " newID=" << newID << "\n"; + if (e->getNBEdge()->getGeometry().front().almostSame(pos) || e->getNBEdge()->getParameter("origFrom") == newID) { + //std::cout << " match\n"; + undoList->p_add(new GNEChange_Attribute(e, this, SUMO_ATTR_FROM, newJunction->getID())); + } + } + if (newID != newJunction->getID()) { + if (newJunction->isValid(SUMO_ATTR_ID, newID)) { + undoList->p_add(new GNEChange_Attribute(newJunction, this, SUMO_ATTR_ID, newID)); + } else { + WRITE_WARNING("Could not rename split node to '" + newID + "'"); } } - for (GNEEdge* e : junction->getGNEOutgoingEdges()) { - if (e->getNBEdge()->getGeometry().front().almostSame(pos)) { - //std::cout << " " << e->getID() << " pos=" << pos << "\n"; - undoList->p_add(new GNEChange_Attribute(e, SUMO_ATTR_FROM, newJunction->getID())); + } + // recreate edges from straightConnections + if (reconnect) { + for (const auto& item : straightConnections) { + GNEEdge* in = item.first; + std::map newEdges; + for (auto& c : item.second) { + GNEEdge* out = retrieveEdge(c.toEdge->getID()); + GNEEdge* newEdge = nullptr; + if (in->getGNEJunctionDestiny() == out->getGNEJunctionSource()) { + continue; + } + if (newEdges.count(c.toEdge) == 0) { + newEdge = createEdge(in->getGNEJunctionDestiny(), out->getGNEJunctionSource(), in, undoList); + newEdges[c.toEdge] = newEdge; + newEdge->setAttribute(SUMO_ATTR_NUMLANES, "1", undoList); + } else { + newEdge = newEdges[c.toEdge]; + duplicateLane(newEdge->getLanes().back(), undoList, true); + } + // copy permissions + newEdge->getLanes().back()->setAttribute(SUMO_ATTR_ALLOW, + in->getLanes()[c.fromLane]-> getAttribute(SUMO_ATTR_ALLOW), undoList); } } } + deleteJunction(junction, undoList); // finish operation undoList->p_end(); @@ -1733,13 +1924,23 @@ std::vector -GNENet::getSelectedAttributeCarriers() { +GNENet::getSelectedAttributeCarriers(bool ignoreCurrentSupermode) { + // declare vector to save result std::vector result; result.reserve(gSelected.getSelected().size()); + // iterate over all elements of global selection for (auto i : gSelected.getSelected()) { + // obtain AC GNEAttributeCarrier* AC = retrieveAttributeCarrier(i, false); + // check if attribute carrier exist and is selected if (AC && AC->isAttributeCarrierSelected()) { - result.push_back(AC); + // now check if selected supermode is correct + if (ignoreCurrentSupermode || + ((myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && !AC->getTagProperty().isDemandElement()) || + ((myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && AC->getTagProperty().isDemandElement())) { + // add it into result vector + result.push_back(AC); + } } } return result; @@ -1751,7 +1952,8 @@ return myNetBuilder->getTLLogicCont(); } -NBEdgeCont& + +NBEdgeCont& GNENet::getEdgeCont() { return myNetBuilder->getEdgeCont(); } @@ -1845,8 +2047,8 @@ if (myAdditionalsSaved == true) { WRITE_DEBUG("Additionals has to be saved"); std::string netSaved = (myNetSaved ? "saved" : "unsaved"); - std::string shapeSaved = (myShapesSaved ? "saved" : "unsaved"); - WRITE_DEBUG("Current saving Status: net " + netSaved + ", additionals unsaved, shapes " + shapeSaved); + std::string demandElementsSaved = (myDemandElementsSaved ? "saved" : "unsaved"); + WRITE_DEBUG("Current saving Status: net " + netSaved + ", additionals unsaved, demand elements " + demandElementsSaved); } myAdditionalsSaved = !value; if (myViewNet != nullptr) { @@ -1868,19 +2070,19 @@ for (auto i : myAttributeCarriers.additionals) { for (auto j : i.second) { // check if has to be fixed - if (j.second->getTagProperty().canBePlacedOverLane() && !j.second->isAdditionalValid()) { + if (j.second->getTagProperty().hasAttribute(SUMO_ATTR_LANE) && !j.second->isAdditionalValid()) { invalidSingleLaneAdditionals.push_back(j.second); - } else if (j.second->getTagProperty().canBePlacedOverLanes() && !j.second->isAdditionalValid()) { + } else if (j.second->getTagProperty().hasAttribute(SUMO_ATTR_LANES) && !j.second->isAdditionalValid()) { invalidMultiLaneAdditionals.push_back(j.second); } } } - // if there are invalid StoppingPlaces or detectors, open GNEDialog_FixAdditionalPositions + // if there are invalid StoppingPlaces or detectors, open GNEDialog_FixAdditionalElements if (invalidSingleLaneAdditionals.size() > 0 || invalidMultiLaneAdditionals.size() > 0) { // 0 -> Canceled Saving, with or whithout selecting invalid stopping places and E2 // 1 -> Invalid stoppingPlaces and E2 fixed, friendlyPos enabled, or saved with invalid positions - GNEDialog_FixAdditionalPositions fixAdditionalPositionsDialog(myViewNet, invalidSingleLaneAdditionals, invalidMultiLaneAdditionals); - if (fixAdditionalPositionsDialog.execute() == 0) { + GNEDialog_FixAdditionalElements fixAdditionalElementsDialog(myViewNet, invalidSingleLaneAdditionals, invalidMultiLaneAdditionals); + if (fixAdditionalElementsDialog.execute() == 0) { // Here a console message ; } else { @@ -1898,6 +2100,12 @@ } +bool +GNENet::isAdditionalsSaved() const { + return myAdditionalsSaved; +} + + std::string GNENet::generateAdditionalID(SumoXMLTag type) const { int counter = 0; @@ -1908,28 +2116,163 @@ } +GNEDemandElement* +GNENet::retrieveDemandElement(SumoXMLTag type, const std::string& id, bool hardFail) const { + if ((myAttributeCarriers.demandElements.count(type) > 0) && (myAttributeCarriers.demandElements.at(type).count(id) != 0)) { + return myAttributeCarriers.demandElements.at(type).at(id); + } else if (hardFail) { + throw ProcessError("Attempted to retrieve non-existant demand element"); + } else { + return nullptr; + } +} + + +std::vector +GNENet::retrieveDemandElements(bool onlySelected) const { + std::vector result; + // returns demand elements depending of selection + for (auto i : myAttributeCarriers.demandElements) { + for (auto j : i.second) { + if (!onlySelected || j.second->isAttributeCarrierSelected()) { + result.push_back(j.second); + } + } + } + return result; +} + + +const std::map& +GNENet::getDemandElementByType(SumoXMLTag type) const { + return myAttributeCarriers.demandElements.at(type); +} + + +int +GNENet::getNumberOfDemandElements(SumoXMLTag type) const { + int counter = 0; + for (auto i : myAttributeCarriers.demandElements) { + if ((type == SUMO_TAG_NOTHING) || (type == i.first)) { + counter += (int)i.second.size(); + } + } + return counter; +} + + void -GNENet::saveAdditionalsConfirmed(const std::string& filename) { - OutputDevice& device = OutputDevice::getDevice(filename); - device.writeXMLHeader("additional", "additional_file.xsd"); - // first write all vehicle types (Except DEFAULT_VTYPE_ID) - for (auto i : myAttributeCarriers.additionals) { - if (i.first == SUMO_TAG_VTYPE) { - for (auto j : i.second) { - if (j.second->getID() != DEFAULT_VTYPE_ID) { - j.second->writeAdditional(device); - } +GNENet::updateDemandElementID(const std::string& oldID, GNEDemandElement* demandElement) { + if (myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).count(oldID) == 0) { + throw ProcessError(demandElement->getTagStr() + " with old ID='" + oldID + "' doesn't exist"); + } else { + // remove an insert demand element again into container + myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).erase(oldID); + myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).insert(std::make_pair(demandElement->getID(), demandElement)); + // remove an insert demand element again into vehicleDepartures container + if (demandElement->getTagProperty().isVehicle()) { + if (myAttributeCarriers.vehicleDepartures.count(demandElement->getBegin() + "_" + oldID) == 0) { + throw ProcessError(demandElement->getTagStr() + " with old ID='" + oldID + "' doesn't exist"); + } else { + myAttributeCarriers.vehicleDepartures.erase(demandElement->getBegin() + "_" + oldID); + myAttributeCarriers.vehicleDepartures.insert(std::make_pair(demandElement->getBegin() + "_" + demandElement->getID(), demandElement)); } } + // demand elements has to be saved + requiereSaveDemandElements(true); } - // now write all routes - for (auto i : myAttributeCarriers.additionals) { - if (i.first == SUMO_TAG_ROUTE) { - for (auto j : i.second) { - j.second->writeAdditional(device); +} + + +void +GNENet::updateDemandElementBegin(const std::string& oldBegin, GNEDemandElement* demandElement) { + if (myAttributeCarriers.vehicleDepartures.count(oldBegin + "_" + demandElement->getID()) == 0) { + throw ProcessError(demandElement->getTagStr() + " with old begin='" + oldBegin + "' doesn't exist"); + } else { + // remove an insert demand element again into vehicleDepartures container + if (demandElement->getTagProperty().isVehicle()) { + myAttributeCarriers.vehicleDepartures.erase(oldBegin + "_" + demandElement->getID()); + myAttributeCarriers.vehicleDepartures.insert(std::make_pair(demandElement->getBegin() + "_" + demandElement->getID(), demandElement)); + } + } +} + + +void +GNENet::requiereSaveDemandElements(bool value) { + if (myDemandElementsSaved == true) { + WRITE_DEBUG("DemandElements has to be saved"); + std::string netSaved = (myNetSaved ? "saved" : "unsaved"); + std::string additionalsSaved = (myAdditionalsSaved ? "saved" : "unsaved"); + WRITE_DEBUG("Current saving Status: net " + netSaved + ", additionals " + additionalsSaved + ", demand elements unsaved"); + } + myDemandElementsSaved = !value; + if (myViewNet != nullptr) { + if (myDemandElementsSaved) { + myViewNet->getViewParent()->getGNEAppWindows()->disableSaveDemandElementsMenu(); + } else { + myViewNet->getViewParent()->getGNEAppWindows()->enableSaveDemandElementsMenu(); + } + } +} + + +void +GNENet::saveDemandElements(const std::string& filename) { + // obtain invalid demandElements depending of number of their lane parents + std::vector invalidSingleLaneDemandElements; + // iterate over demandElements and obtain invalids + for (auto i : myAttributeCarriers.demandElements) { + for (auto j : i.second) { + // check if has to be fixed + if (!j.second->isDemandElementValid()) { + invalidSingleLaneDemandElements.push_back(j.second); } } } + // if there are invalid StoppingPlaces or detectors, open GNEDialog_FixDemandElementPositions + if (invalidSingleLaneDemandElements.size() > 0) { + // 0 -> Canceled Saving, with or whithout selecting invalid stopping places and E2 + // 1 -> Invalid stoppingPlaces and E2 fixed, friendlyPos enabled, or saved with invalid positions + GNEDialog_FixDemandElements fixDemandElementsDialog(myViewNet, invalidSingleLaneDemandElements); + if (fixDemandElementsDialog.execute() == 0) { + // Here a console message + ; + } else { + saveDemandElementsConfirmed(filename); + } + // set focus again in viewNet + myViewNet->setFocus(); + } else { + saveDemandElementsConfirmed(filename); + } + // change value of flag + myDemandElementsSaved = true; + // show debug information + WRITE_DEBUG("DemandElements saved"); +} + + +bool +GNENet::isDemandElementsSaved() const { + return myDemandElementsSaved; +} + + +std::string +GNENet::generateDemandElementID(SumoXMLTag type) const { + int counter = 0; + while (myAttributeCarriers.demandElements.at(type).count(toString(type) + "_" + toString(counter)) != 0) { + counter++; + } + return (toString(type) + "_" + toString(counter)); +} + + +void +GNENet::saveAdditionalsConfirmed(const std::string& filename) { + OutputDevice& device = OutputDevice::getDevice(filename); + device.writeXMLHeader("additional", "additional_file.xsd"); // now write all route probes (see Ticket #4058) for (auto i : myAttributeCarriers.additionals) { if (i.first == SUMO_TAG_ROUTEPROBE) { @@ -1943,7 +2286,7 @@ if (GNEAttributeCarrier::getTagProperties(i.first).isStoppingPlace()) { for (auto j : i.second) { // only save stoppingPlaces that doesn't have Additional parents, because they are automatically writed by writeAdditional(...) parent's function - if (j.second->getFirstAdditionalParent() == nullptr) { + if (j.second->getAdditionalParents().empty()) { j.second->writeAdditional(device); } } @@ -1954,24 +2297,59 @@ if (GNEAttributeCarrier::getTagProperties(i.first).isDetector()) { for (auto j : i.second) { // only save Detectors that doesn't have Additional parents, because they are automatically writed by writeAdditional(...) parent's function - if (j.second->getFirstAdditionalParent() == nullptr) { + if (j.second->getAdditionalParents().empty()) { j.second->writeAdditional(device); } } } } - // finally write rest of additionals + // now write rest of additionals for (auto i : myAttributeCarriers.additionals) { const auto& tagValue = GNEAttributeCarrier::getTagProperties(i.first); if (!tagValue.isStoppingPlace() && !tagValue.isDetector() && (i.first != SUMO_TAG_ROUTEPROBE) && (i.first != SUMO_TAG_VTYPE) && (i.first != SUMO_TAG_ROUTE)) { for (auto j : i.second) { // only save additionals that doesn't have Additional parents, because they are automatically writed by writeAdditional(...) parent's function - if (j.second->getFirstAdditionalParent() == nullptr) { + if (j.second->getAdditionalParents().empty()) { j.second->writeAdditional(device); } } } } + // now write shapes and POIs + for (const auto& i : myPolygons) { + dynamic_cast(i.second)->writeShape(device); + } + for (const auto& i : myPOIs) { + dynamic_cast(i.second)->writeShape(device); + } + device.close(); +} + + +void +GNENet::saveDemandElementsConfirmed(const std::string& filename) { + OutputDevice& device = OutputDevice::getDevice(filename); + device.writeXMLHeader("routes", "routes_file.xsd"); + // first write all routes (and their associated stops) + for (auto i : myAttributeCarriers.demandElements) { + if (i.first == SUMO_TAG_ROUTE) { + for (auto j : i.second) { + j.second->writeDemandElement(device); + } + } + } + // now write all vehicle types + for (auto i : myAttributeCarriers.demandElements) { + if (i.first == SUMO_TAG_VTYPE) { + for (auto j : i.second) { + j.second->writeDemandElement(device); + } + } + } + // finally write all vehicles sorted by depart time (and their associated stops) + for (auto i : myAttributeCarriers.vehicleDepartures) { + i.second->writeDemandElement(device); + } device.close(); } @@ -1980,7 +2358,7 @@ GNENet::addPolygonForEditShapes(GNENetElement* netElement, const PositionVector& shape, bool fill, RGBColor col) { if (shape.size() > 0) { // create poly for edit shapes - GNEPoly* shapePoly = new GNEPoly(this, "edit_shape", "edit_shape", shape, false, fill, 0.3, col, GLO_POLYGON, 0, "", false, false , false); + GNEPoly* shapePoly = new GNEPoly(this, "edit_shape", "edit_shape", shape, false, fill, 0.3, col, GLO_POLYGON, 0, "", false, false, false); shapePoly->setShapeEditedElement(netElement); myGrid.addAdditionalGLObject(shapePoly); myViewNet->update(); @@ -1995,7 +2373,7 @@ GNENet::removePolygonForEditShapes(GNEPoly* polygon) { if (polygon) { // remove it from Inspector Frame - myViewNet->getViewParent()->getInspectorFrame()->removeInspectedAC(polygon); + myViewNet->getViewParent()->getInspectorFrame()->getAttributesEditor()->removeEditedAC(polygon); // Remove from grid myGrid.removeAdditionalGLObject(polygon); myViewNet->update(); @@ -2048,44 +2426,6 @@ } -void -GNENet::requiereSaveShapes(bool value) { - if (myShapesSaved == true) { - WRITE_DEBUG("Shapes has to be saved"); - std::string netSaved = (myNetSaved ? "saved" : "unsaved"); - std::string additionalsSaved = (myAdditionalsSaved ? "saved" : "unsaved"); - WRITE_DEBUG("Current saving Status: net " + netSaved + ", additionals " + additionalsSaved + ", shapes unsaved"); - } - myShapesSaved = !value; - if (myShapesSaved) { - myViewNet->getViewParent()->getGNEAppWindows()->disableSaveShapesMenu(); - } else { - myViewNet->getViewParent()->getGNEAppWindows()->enableSaveShapesMenu(); - } -} - - -void -GNENet::saveShapes(const std::string& filename) { - // save Shapes - OutputDevice& device = OutputDevice::getDevice(filename); - device.writeXMLHeader("additional", "additional_file.xsd"); - // write only visible polygons - for (const auto& i : myPolygons) { - dynamic_cast(i.second)->writeShape(device); - } - // write only visible POIs - for (const auto& i : myPOIs) { - dynamic_cast(i.second)->writeShape(device); - } - device.close(); - // change flag to true - myShapesSaved = true; - // show debug information - WRITE_DEBUG("Shapes saved"); -} - - int GNENet::getNumberOfShapes() const { return (int)(myPolygons.size() + myPOIs.size()); @@ -2122,18 +2462,33 @@ return -1; } +void +GNENet::enableUpdateGeometry() { + myUpdateGeometryEnabled = true; +} + + +void +GNENet::disableUpdateGeometry() { + myUpdateGeometryEnabled = false; +} + + +bool +GNENet::isUpdateGeometryEnabled() const { + return myUpdateGeometryEnabled; +} -bool -GNENet::additionalExist(GNEAdditional* additional) { +// --------------------------------------------------------------------------- +// GNENet - protected methods +// --------------------------------------------------------------------------- + +bool +GNENet::additionalExist(GNEAdditional* additional) const { // first check that additional pointer is valid - if(additional) { - // iterate over additionals to ifnd it - for (const auto & i : myAttributeCarriers.additionals.at(additional->getTagProperty().getTag())) { - if (i.second == additional) { - return true; - } - } - return false; + if (additional) { + return myAttributeCarriers.additionals.at(additional->getTagProperty().getTag()).find(additional->getID()) != + myAttributeCarriers.additionals.at(additional->getTagProperty().getTag()).end(); } else { throw ProcessError("Invalid additional pointer"); } @@ -2153,8 +2508,10 @@ if (additional->isAttributeCarrierSelected()) { additional->selectAttributeCarrier(false); } - // update geometry after insertion of additionals - additional->updateGeometry(true); + // update geometry after insertion of additionals if myUpdateGeometryEnabled is enabled + if (myUpdateGeometryEnabled) { + additional->updateGeometry(true); + } // additionals has to be saved requiereSaveAdditionals(true); } else { @@ -2164,41 +2521,120 @@ bool -GNENet::deleteAdditional(GNEAdditional* additional) { +GNENet::deleteAdditional(GNEAdditional* additional, bool updateViewAfterDeleting) { // first check that additional pointer is valid - if(additional) { - // iterate over additionals to find it - for (auto i = myAttributeCarriers.additionals.at(additional->getTagProperty().getTag()).begin(); - i != myAttributeCarriers.additionals.at(additional->getTagProperty().getTag()).end(); i++) { - if (i->second == additional) { - // remove it from Inspector Frame - myViewNet->getViewParent()->getInspectorFrame()->removeInspectedAC(additional); - // Remove from container - myAttributeCarriers.additionals.at(additional->getTagProperty().getTag()).erase(i); - // only remove drawable elements of grid - if (additional->getTagProperty().isDrawable()) { - myGrid.removeAdditionalGLObject(additional); - } - // check if additional is selected - if (additional->isAttributeCarrierSelected()) { - additional->unselectAttributeCarrier(false); - } - // update view - update(); - // additionals has to be saved - requiereSaveAdditionals(true); - // additional removed, then return true - return true; - } + if (additionalExist(additional)) { + // obtain demand element and erase it from container + auto it = myAttributeCarriers.additionals.at(additional->getTagProperty().getTag()).find(additional->getID()); + myAttributeCarriers.additionals.at(additional->getTagProperty().getTag()).erase(it); + // remove it from Inspector Frame + myViewNet->getViewParent()->getInspectorFrame()->getAttributesEditor()->removeEditedAC(additional); + // only remove drawable elements of grid + if (additional->getTagProperty().isDrawable()) { + myGrid.removeAdditionalGLObject(additional); + } + // check if additional is selected + if (additional->isAttributeCarrierSelected()) { + additional->unselectAttributeCarrier(false); } - // if additional wasn't found, throw exception - throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist"); + // check if view has to be updated + if (updateViewAfterDeleting) { + myViewNet->update(); + } + // additionals has to be saved + requiereSaveAdditionals(true); + // additional removed, then return true + return true; } else { throw ProcessError("Invalid additional pointer"); } } +bool +GNENet::demandElementExist(GNEDemandElement* demandElement) const { + // first check that demandElement pointer is valid + if (demandElement) { + return myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).find(demandElement->getID()) != + myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).end(); + } else { + throw ProcessError("Invalid demandElement pointer"); + } +} + + +void +GNENet::insertDemandElement(GNEDemandElement* demandElement) { + // Check if demandElement element exists before insertion + if (!demandElementExist(demandElement)) { + // insert in demandElements container + myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).insert(std::make_pair(demandElement->getID(), demandElement)); + // also insert in vehicleDepartures container + if (demandElement->getTagProperty().isVehicle()) { + if (myAttributeCarriers.vehicleDepartures.count(demandElement->getBegin() + "_" + demandElement->getID()) != 0) { + throw ProcessError(demandElement->getTagStr() + " with departure ='" + demandElement->getBegin() + "_" + demandElement->getID() + "' already inserted"); + } else { + myAttributeCarriers.vehicleDepartures.insert(std::make_pair(demandElement->getBegin() + "_" + demandElement->getID(), demandElement)); + } + } + // only add drawable elements in grid + if (demandElement->getTagProperty().isDrawable()) { + myGrid.addAdditionalGLObject(demandElement); + } + // check if demandElement is selected + if (demandElement->isAttributeCarrierSelected()) { + demandElement->selectAttributeCarrier(false); + } + // update geometry after insertion of demandElements if myUpdateGeometryEnabled is enabled + if (myUpdateGeometryEnabled) { + demandElement->updateGeometry(true); + } + // demandElements has to be saved + requiereSaveDemandElements(true); + } else { + throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' already exist"); + } +} + + +bool +GNENet::deleteDemandElement(GNEDemandElement* demandElement, bool updateViewAfterDeleting) { + // first check that demandElement pointer is valid + if (demandElementExist(demandElement)) { + // obtain demand element and erase it from container + auto it = myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).find(demandElement->getID()); + myAttributeCarriers.demandElements.at(demandElement->getTagProperty().getTag()).erase(it); + // remove it from Inspector Frame + myViewNet->getViewParent()->getInspectorFrame()->getAttributesEditor()->removeEditedAC(demandElement); + // also remove fromvehicleDepartures container + if (demandElement->getTagProperty().isVehicle()) { + if (myAttributeCarriers.vehicleDepartures.count(demandElement->getBegin() + "_" + demandElement->getID()) == 0) { + throw ProcessError(demandElement->getTagStr() + " with departure ='" + demandElement->getBegin() + "_" + demandElement->getID() + "' doesn't exist"); + } else { + myAttributeCarriers.vehicleDepartures.erase(demandElement->getBegin() + "_" + demandElement->getID()); + } + } + // only remove drawable elements of grid + if (demandElement->getTagProperty().isDrawable()) { + myGrid.removeAdditionalGLObject(demandElement); + } + // check if demandElement is selected + if (demandElement->isAttributeCarrierSelected()) { + demandElement->unselectAttributeCarrier(false); + } + // check if view has to be updated + if (updateViewAfterDeleting) { + myViewNet->update(); + } + // demandElements has to be saved + requiereSaveDemandElements(true); + // demandElement removed, then return true + return true; + } else { + throw ProcessError("Invalid demandElement pointer"); + } +} + // =========================================================================== // private // =========================================================================== @@ -2298,9 +2734,9 @@ void -GNENet::deleteSingleJunction(GNEJunction* junction) { +GNENet::deleteSingleJunction(GNEJunction* junction, bool updateViewAfterDeleting) { // remove it from Inspector Frame - myViewNet->getViewParent()->getInspectorFrame()->removeInspectedAC(junction); + myViewNet->getViewParent()->getInspectorFrame()->getAttributesEditor()->removeEditedAC(junction); // Remove from grid and container myGrid.removeAdditionalGLObject(junction); // check if junction is selected @@ -2311,14 +2747,17 @@ myNetBuilder->getNodeCont().extract(junction->getNBNode()); junction->decRef("GNENet::deleteSingleJunction"); junction->setResponsible(true); - update(); + // check if view has to be updated + if (updateViewAfterDeleting) { + myViewNet->update(); + } } void -GNENet::deleteSingleEdge(GNEEdge* edge) { +GNENet::deleteSingleEdge(GNEEdge* edge, bool updateViewAfterDeleting) { // remove it from Inspector Frame - myViewNet->getViewParent()->getInspectorFrame()->removeInspectedAC(edge); + myViewNet->getViewParent()->getInspectorFrame()->getAttributesEditor()->removeEditedAC(edge); // remove edge from visual grid and container myGrid.removeAdditionalGLObject(edge); // check if junction is selected @@ -2333,13 +2772,15 @@ // Remove refrences from GNEJunctions edge->getGNEJunctionSource()->removeOutgoingGNEEdge(edge); edge->getGNEJunctionDestiny()->removeIncomingGNEEdge(edge); - // invalidate junction logic - update(); + // check if view has to be updated + if (updateViewAfterDeleting) { + myViewNet->update(); + } } void -GNENet::insertShape(GNEShape* shape) { +GNENet::insertShape(GNEShape* shape, bool updateViewAfterDeleting) { // add shape depending of their type and if is selected if (shape->getTagProperty().getTag() == SUMO_TAG_POLY) { GUIPolygon* poly = dynamic_cast(shape); @@ -2355,21 +2796,21 @@ if (shape->isAttributeCarrierSelected()) { shape->selectAttributeCarrier(false); } - // POILanes has to be added from lane - if (shape->getTagProperty().getTag() == SUMO_TAG_POILANE) { - retrieveLane(shape->getAttribute(SUMO_ATTR_LANE))->addShapeChild(shape); + // insert shape requieres always save additionals + requiereSaveAdditionals(true); + // after inserting, update geometry (needed for POILanes + shape->updateGeometry(true); + // check if view has to be updated + if (updateViewAfterDeleting) { + myViewNet->update(); } - // insert shape requieres always save shapes - requiereSaveShapes(true); - // update view - myViewNet->update(); } void -GNENet::removeShape(GNEShape* shape) { +GNENet::removeShape(GNEShape* shape, bool updateViewAfterDeleting) { // remove it from Inspector Frame - myViewNet->getViewParent()->getInspectorFrame()->removeInspectedAC(shape); + myViewNet->getViewParent()->getInspectorFrame()->getAttributesEditor()->removeEditedAC(shape); if (shape->getTagProperty().getTag() == SUMO_TAG_POLY) { GUIPolygon* poly = dynamic_cast(shape); myGrid.removeAdditionalGLObject(poly); @@ -2383,14 +2824,12 @@ if (shape->isAttributeCarrierSelected()) { shape->unselectAttributeCarrier(false); } - // POILanes has to be removed from lane - if (shape->getTagProperty().getTag() == SUMO_TAG_POILANE) { - retrieveLane(shape->getAttribute(SUMO_ATTR_LANE))->removeShapeChild(shape); + // remove shape requires always save additionals + requiereSaveAdditionals(true); + // check if view has to be updated + if (updateViewAfterDeleting) { + myViewNet->update(); } - // remove shape requires always save shapes - requiereSaveShapes(true); - // update view - myViewNet->update(); } @@ -2416,11 +2855,11 @@ void GNENet::initGNEConnections() { - for (const auto &i : myAttributeCarriers.edges) { + for (const auto& i : myAttributeCarriers.edges) { // remake connections i.second->remakeGNEConnections(); // update geometry of connections - for (const auto &j : i.second->getGNEConnections()) { + for (const auto& j : i.second->getGNEConnections()) { j->updateGeometry(true); } } @@ -2498,7 +2937,7 @@ myAttributeCarriers.junctions.erase(it.second->getMicrosimID()); } - // clear rest of additionals and shapes that weren't removed during cleaning of undo list + // clear rest of additional that weren't removed during cleaning of undo list for (const auto& it : myAttributeCarriers.additionals) { for (const auto& j : it.second) { // only remove drawable additionals @@ -2508,6 +2947,15 @@ } } myAttributeCarriers.additionals.clear(); + // fill additionals with tags (note: this include the TAZS) + auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL, false); + for (auto i : listOfTags) { + myAttributeCarriers.additionals.insert(std::make_pair(i, std::map())); + } + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_TAZ, false); + for (auto i : listOfTags) { + myAttributeCarriers.additionals.insert(std::make_pair(i, std::map())); + } // clear rest of polygons that weren't removed during cleaning of undo list for (const auto& it : myPolygons) { @@ -2521,6 +2969,26 @@ } myPOIs.clear(); + // clear rest of demand elements that weren't removed during cleaning of undo list + for (const auto& it : myAttributeCarriers.demandElements) { + for (const auto& j : it.second) { + // only remove drawable additionals + if (j.second->getTagProperty().isDrawable()) { + myGrid.removeAdditionalGLObject(j.second); + } + } + } + myAttributeCarriers.additionals.clear(); + // fill demand elements with tags + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_DEMANDELEMENT, false); + for (auto i : listOfTags) { + myAttributeCarriers.demandElements.insert(std::make_pair(i, std::map())); + } + listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_STOP, false); + for (auto i : listOfTags) { + myAttributeCarriers.demandElements.insert(std::make_pair(i, std::map())); + } + // init again junction an edges (Additionals and shapes will be loaded after the end of this function) initJunctionsAndEdges(); diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNENet.h sumo-1.2.0+dfsg1/src/netedit/GNENet.h --- sumo-1.1.0+dfsg1/src/netedit/GNENet.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNENet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -53,6 +53,7 @@ class NBNetBuilder; class GNEAdditional; +class GNEDemandElement; class GNEApplicationWindow; class GNEAttributeCarrier; class GNEConnection; @@ -78,6 +79,7 @@ /// @brief declare friend class friend class GNEAdditionalHandler; + friend class GNERouteHandler; friend class GNEChange_Junction; friend class GNEChange_Edge; friend class GNEChange_Lane; @@ -85,6 +87,7 @@ friend class GNEChange_Shape; friend class GNEChange_CalibratorItem; friend class GNEChange_Additional; + friend class GNEChange_DemandElement; public: /**@brief Constructor @@ -151,7 +154,7 @@ * @return whether the polygon could be added */ bool addPolygon(const std::string& id, const std::string& type, const RGBColor& color, double layer, - double angle, const std::string& imgFile, bool relativePath, const PositionVector& shape, + double angle, const std::string& imgFile, bool relativePath, const PositionVector& shape, bool geo, bool fill, double lineWidth, bool ignorePruning = false); /**@brief Builds a POI using the given values and adds it to the container @@ -255,6 +258,18 @@ */ void deleteShape(GNEShape* shape, GNEUndoList* undoList); + /**@brief remove additional + * @param[in] additional The Shape to be removed + * @param[in] undoList The undolist in which to mark changes + */ + void deleteAdditional(GNEAdditional* additional, GNEUndoList* undoList); + + /**@brief remove demand element + * @param[in] demandElement The Shape to be removed + * @param[in] undoList The undolist in which to mark changes + */ + void deleteDemandElement(GNEDemandElement* demandElement, GNEUndoList* undoList); + /**@brief duplicates lane * @param[in] lane The lane to be duplicated * @param[in] undoList The undolist in which to mark changes @@ -462,8 +477,8 @@ /// @brief get view net GNEViewNet* getViewNet() const; - /// @brief get all selected attribute carriers - std::vector getSelectedAttributeCarriers(); + /// @brief get all selected attribute carriers (or only relative to current supermode + std::vector getSelectedAttributeCarriers(bool ignoreCurrentSupermode); /// @brief returns the tllcont of the underlying netbuilder NBTrafficLightLogicCont& getTLLogicCont(); @@ -482,9 +497,12 @@ * param[in] force Whether to force recomputation even if not needed * param[in] volatileOptions enable or disable volatile options * param[in] additionalPath path in wich additionals were saved before recomputing with volatile options - * param[in] shapePath path in wich shapes were saved before recomputing with volatile options + * param[in] demandPath path in wich demand elements were saved before recomputing with volatile options */ - void computeEverything(GNEApplicationWindow* window, bool force = false, bool volatileOptions = false, std::string additionalPath = "", std::string shapePath = ""); + void computeEverything(GNEApplicationWindow* window, bool force = false, bool volatileOptions = false, std::string additionalPath = "", std::string demandPath = ""); + + // @brief compute geometry of all demand elements + void updateGeometryDemandElements(); /**@brief join selected junctions * @note difference to mergeJunctions: @@ -504,7 +522,7 @@ void replaceJunctionByGeometry(GNEJunction* junction, GNEUndoList* undoList); /// @brief replace the selected junction by a list of junctions for each unique edge endpoint - void splitJunction(GNEJunction* junction, GNEUndoList* undoList); + void splitJunction(GNEJunction* junction, bool reconnect, GNEUndoList* undoList); /// @brief clear junction's connections void clearJunctionConnections(GNEJunction* junction, GNEUndoList* undoList); @@ -575,11 +593,67 @@ */ void saveAdditionals(const std::string& filename); + /// @brief check if additionals are saved + bool isAdditionalsSaved() const; + /// @brief generate additional id std::string generateAdditionalID(SumoXMLTag type) const; /// @} + /// @name Functions related to DemandElement Items + /// @{ + + /**@brief Returns the named demand element + * @param[in] type tag with the type of demand element + * @param[in] id The id of the demand element to return. + * @param[in] failHard Whether attempts to retrieve a nonexisting demand element should result in an exception + */ + GNEDemandElement* retrieveDemandElement(SumoXMLTag type, const std::string& id, bool hardFail = true) const; + + /**@brief return all demand elements + * @param[in] onlySelected Whether to return only selected demand elements + */ + std::vector retrieveDemandElements(bool onlySelected = false) const; + + /**@brief get map with IDs and pointers to demand elements + * @param[in] type type of demand element to get. SUMO_TAG_NOTHING will get all demand elements + * @return map with IDs and pointers to demand elements. + */ + const std::map& getDemandElementByType(SumoXMLTag type) const; + + /**@brief Returns the number of demand elements of the net + * @param[in] type type of demand element to count. SUMO_TAG_NOTHING will count all demand elements + * @return Number of demand elements of the net + */ + int getNumberOfDemandElements(SumoXMLTag type = SUMO_TAG_NOTHING) const; + + /**@brief update demand element ID in container + * @note this function is automatically called when user changes the ID of an demand element + */ + void updateDemandElementID(const std::string& oldID, GNEDemandElement* demandElement); + + /**@brief update demand element begin in container + * @note this function is automatically called when user changes the begin/departure of an demand element + */ + void updateDemandElementBegin(const std::string& oldBegin, GNEDemandElement* demandElement); + + /// @brief inform that demand elements has to be saved + void requiereSaveDemandElements(bool value); + + /**@brief save demand element elements of the network + * @param[in] filename name of the file in wich save demand elements + */ + void saveDemandElements(const std::string& filename); + + /// @brief check if demand elements are saved + bool isDemandElementsSaved() const; + + /// @brief generate demand element id + std::string generateDemandElementID(SumoXMLTag type) const; + + /// @} + /// @name Functions related to Shapes /// @{ @@ -602,14 +676,6 @@ /// @brief change Shape ID void changeShapeID(GNEShape* s, const std::string& OldID); - /// @brief inform that shapes has to be saved - void requiereSaveShapes(bool value); - - /**@brief save shapes elements of the network - * @param[in] filename name of the file in wich save shapes - */ - void saveShapes(const std::string& filename); - /// @brief get number of shapes int getNumberOfShapes() const; /// @} @@ -628,6 +694,19 @@ int getNumberOfTLSPrograms() const; /// @} + /// @name Functions related to Enable or disable update geometry of elements after insertio + /// @{ + /// @brief enable update geometry of elements after inserting or removing an element in net + void enableUpdateGeometry(); + + /// @brief disable update geometry of elements after inserting or removing an element in net + void disableUpdateGeometry(); + + /// @brief check if update geometry after inserting or removing has to be updated + bool isUpdateGeometryEnabled() const; + + /// @} + protected: /// @brief struct used for saving all attribute carriers of net, in different formats struct AttributeCarriers { @@ -639,6 +718,12 @@ /// @brief map with the name and pointer to additional elements of net std::map > additionals; + + /// @brief map with the name and pointer to demand elements of net + std::map > demandElements; + + /// @brief special map used for saving Demand Elements of type "Vehicle" (Vehicles, flows, etc.) sorted by depart time + std::map vehicleDepartures; }; /// @brief the rtree which contains all GUIGlObjects (so named for historical reasons) @@ -672,16 +757,19 @@ bool myAdditionalsSaved; /// @brief Flag to check if shapes has to be saved - bool myShapesSaved; - - /// @brief Flag to check if shapes has to be saved bool myTLSProgramsSaved; + /// @brief Flag to check if demand elements has to be saved + bool myDemandElementsSaved; + + /// @brief Flag to enable or disable update geometry of elements after inserting or removing element in net + bool myUpdateGeometryEnabled; + /// @name Insertion and erasing of GNEAdditionals items /// @{ /// @brief return true if additional exist (use pointer instead ID) - bool additionalExist(GNEAdditional* additional); + bool additionalExist(GNEAdditional* additional) const; /**@brief Insert a additional element int GNENet container. * @throw processError if route was already inserted @@ -691,7 +779,25 @@ /**@brief delete additional element of GNENet container * @throw processError if additional wasn't previously inserted */ - bool deleteAdditional(GNEAdditional* additional); + bool deleteAdditional(GNEAdditional* additional, bool updateViewAfterDeleting); + + /// @} + + /// @name Insertion and erasing of GNEDemandElements items + /// @{ + + /// @brief return true if demand element exist (use pointer instead ID) + bool demandElementExist(GNEDemandElement* demandElement) const; + + /**@brief Insert a demand element element int GNENet container. + * @throw processError if route was already inserted + */ + void insertDemandElement(GNEDemandElement* demandElement); + + /**@brief delete demand element element of GNENet container + * @throw processError if demand element wasn't previously inserted + */ + bool deleteDemandElement(GNEDemandElement* demandElement, bool updateViewAfterDeleting); /// @} @@ -712,16 +818,16 @@ GNEEdge* registerEdge(GNEEdge* edge); /// @brief deletes a single junction - void deleteSingleJunction(GNEJunction* junction); + void deleteSingleJunction(GNEJunction* junction, bool updateViewAfterDeleting); /// @brief deletes a single edge - void deleteSingleEdge(GNEEdge* edge); + void deleteSingleEdge(GNEEdge* edge, bool updateViewAfterDeleting); /// @brief insert shape - void insertShape(GNEShape* shape); + void insertShape(GNEShape* shape, bool updateViewAfterDeleting); /// @brief remove created shape (but NOT delete) - void removeShape(GNEShape* shape); + void removeShape(GNEShape* shape, bool updateViewAfterDeleting); /// @brief notify myViewNet void update(); @@ -738,6 +844,9 @@ /// @brief save additionals after confirming invalid objects void saveAdditionalsConfirmed(const std::string& filename); + /// @brief save demand elements after confirming invalid objects + void saveDemandElementsConfirmed(const std::string& filename); + static void replaceInListAttribute(GNEAttributeCarrier* ac, SumoXMLAttr key, const std::string& which, const std::string& by, GNEUndoList* undoList); /// @brief the z boundary (stored in the x-coordinate), values of 0 are ignored diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEReferenceCounter.h sumo-1.2.0+dfsg1/src/netedit/GNEReferenceCounter.h --- sumo-1.1.0+dfsg1/src/netedit/GNEReferenceCounter.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEReferenceCounter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEUndoList.cpp sumo-1.2.0+dfsg1/src/netedit/GNEUndoList.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEUndoList.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEUndoList.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -65,7 +65,7 @@ GNEUndoList::GNEUndoList(GNEApplicationWindow* parent) : FXUndoList(), - myParent(parent) { + myGNEApplicationWindowParent(parent) { } @@ -112,20 +112,19 @@ void GNEUndoList::undo() { - //std::cout << undoName().text() << "\n"; WRITE_DEBUG("Keys Ctrl + Z (Undo) pressed"); FXUndoList::undo(); - myParent->updateControls(); + // update specific controls + myGNEApplicationWindowParent->updateControls(); } void GNEUndoList::redo() { - //std::cout << redoName().text() << "\n"; - //std::cout << undoName().text() << "\n"; WRITE_DEBUG("Keys Ctrl + Y (Redo) pressed"); FXUndoList::redo(); - myParent->updateControls(); + // update specific controls + myGNEApplicationWindowParent->updateControls(); } @@ -151,10 +150,15 @@ long GNEUndoList::p_onUpdUndo(FXObject* sender, FXSelector, void*) { - bool enable = canUndo() && !hasCommandGroup(); + // first check if Undo Menu command has to be disabled + bool enable = canUndo() && !hasCommandGroup() && myGNEApplicationWindowParent->isUndoRedoEnabled().empty(); sender->handle(this, enable ? FXSEL(SEL_COMMAND, FXWindow::ID_ENABLE) : FXSEL(SEL_COMMAND, FXWindow::ID_DISABLE), nullptr); + // change caption of FXMenuCommand FXString caption = undoName(); - if (hasCommandGroup()) { + // set caption of FXmenuCommand edit/undo + if (myGNEApplicationWindowParent->isUndoRedoEnabled().size() > 0) { + caption = ("Cannot Undo in the middle of " + myGNEApplicationWindowParent->isUndoRedoEnabled()).c_str(); + } else if (hasCommandGroup()) { caption = ("Cannot Undo in the middle of " + myCommandGroups.top()->getDescription()).c_str(); } else if (!canUndo()) { caption = "Undo"; @@ -169,10 +173,16 @@ long GNEUndoList::p_onUpdRedo(FXObject* sender, FXSelector, void*) { - bool enable = canRedo() && !hasCommandGroup(); + // first check if Redo Menu command has to be disabled + bool enable = canRedo() && !hasCommandGroup() && myGNEApplicationWindowParent->isUndoRedoEnabled().empty(); + // enable or disable depending of "enable" flag sender->handle(this, enable ? FXSEL(SEL_COMMAND, FXWindow::ID_ENABLE) : FXSEL(SEL_COMMAND, FXWindow::ID_DISABLE), nullptr); + // change caption of FXMenuCommand FXString caption = redoName(); - if (hasCommandGroup()) { + // set caption of FXmenuCommand edit/undo + if (myGNEApplicationWindowParent->isUndoRedoEnabled().size() > 0) { + caption = ("Cannot Redo in the middle of " + myGNEApplicationWindowParent->isUndoRedoEnabled()).c_str(); + } else if (hasCommandGroup()) { caption = ("Cannot Redo in the middle of " + myCommandGroups.top()->getDescription()).c_str(); } else if (!canRedo()) { caption = "Redo"; diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEUndoList.h sumo-1.2.0+dfsg1/src/netedit/GNEUndoList.h --- sumo-1.1.0+dfsg1/src/netedit/GNEUndoList.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEUndoList.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -122,11 +122,11 @@ const std::string myDescription; }; - // the stack of currently active command groups + // @brief the stack of currently active command groups std::stack myCommandGroups; - // the parent application for this undolist - GNEApplicationWindow* const myParent; + // @brief the parent GNEApplicationWindow for this undolist + GNEApplicationWindow* const myGNEApplicationWindowParent; }; diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEViewNet.cpp sumo-1.2.0+dfsg1/src/netedit/GNEViewNet.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEViewNet.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEViewNet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -20,25 +20,33 @@ // =========================================================================== // included modules // =========================================================================== + #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 @@ -56,6 +64,7 @@ #include "GNEUndoList.h" #include "GNEViewNet.h" #include "GNEViewParent.h" +#include "GNEApplicationWindow.h" // =========================================================================== @@ -63,22 +72,27 @@ // =========================================================================== FXDEFMAP(GNEViewNet) GNEViewNetMap[] = { + // Super Modes + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F3_SUPERMODE_NETWORK, GNEViewNet::onCmdSetSupermode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_F4_SUPERMODE_DEMAND, GNEViewNet::onCmdSetSupermode), // Modes - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_CREATE_EDGE, GNEViewNet::onCmdSetModeCreateEdge), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_MOVE, GNEViewNet::onCmdSetModeMove), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_DELETE, GNEViewNet::onCmdSetModeDelete), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_INSPECT, GNEViewNet::onCmdSetModeInspect), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_SELECT, GNEViewNet::onCmdSetModeSelect), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_CONNECT, GNEViewNet::onCmdSetModeConnect), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_TLS, GNEViewNet::onCmdSetModeTLS), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_ADDITIONAL, GNEViewNet::onCmdSetModeAdditional), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_CROSSING, GNEViewNet::onCmdSetModeCrossing), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_TAZ, GNEViewNet::onCmdSetModeTAZ), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_POLYGON, GNEViewNet::onCmdSetModePolygon), - FXMAPFUNC(SEL_COMMAND, MID_GNE_SETMODE_PROHIBITION, GNEViewNet::onCmdSetModeProhibition), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_E_EDGEMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_M_MOVEMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_D_DELETEMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_I_INSPECTMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_S_SELECTMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_C_CONNECTMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_T_TLSMODE_VTYPEMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_Z_TAZMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_P_POLYGONMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_V_VEHICLEMODE, GNEViewNet::onCmdSetMode), + FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_W_PROHIBITIONMODE, GNEViewNet::onCmdSetMode), // Viewnet - FXMAPFUNC(SEL_COMMAND, MID_GNE_VIEWNET_SHOW_CONNECTIONS, GNEViewNet::onCmdToogleShowConnection), + FXMAPFUNC(SEL_COMMAND, MID_GNE_VIEWNET_SHOW_DEMAND_ELEMENTS, GNEViewNet::onCmdShowDemandElements), FXMAPFUNC(SEL_COMMAND, MID_GNE_VIEWNET_SELECT_EDGES, GNEViewNet::onCmdToogleSelectEdges), + FXMAPFUNC(SEL_COMMAND, MID_GNE_VIEWNET_SHOW_CONNECTIONS, GNEViewNet::onCmdToogleShowConnection), FXMAPFUNC(SEL_COMMAND, MID_GNE_VIEWNET_SHOW_BUBBLES, GNEViewNet::onCmdToogleShowBubbles), FXMAPFUNC(SEL_COMMAND, MID_GNE_VIEWNET_MOVE_ELEVATION, GNEViewNet::onCmdToogleMoveElevation), FXMAPFUNC(SEL_COMMAND, MID_GNE_VIEWNET_SHOW_GRID, GNEViewNet::onCmdShowGrid), @@ -90,6 +104,7 @@ FXMAPFUNC(SEL_COMMAND, MID_GNE_JUNCTION_RESET_SHAPE, GNEViewNet::onCmdResetJunctionShape), FXMAPFUNC(SEL_COMMAND, MID_GNE_JUNCTION_REPLACE, GNEViewNet::onCmdReplaceJunction), FXMAPFUNC(SEL_COMMAND, MID_GNE_JUNCTION_SPLIT, GNEViewNet::onCmdSplitJunction), + FXMAPFUNC(SEL_COMMAND, MID_GNE_JUNCTION_SPLIT_RECONNECT, GNEViewNet::onCmdSplitJunctionReconnect), FXMAPFUNC(SEL_COMMAND, MID_GNE_JUNCTION_CLEAR_CONNECTIONS, GNEViewNet::onCmdClearConnections), FXMAPFUNC(SEL_COMMAND, MID_GNE_JUNCTION_RESET_CONNECTIONS, GNEViewNet::onCmdResetConnections), // Connections @@ -110,18 +125,18 @@ // Lanes FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_DUPLICATE, GNEViewNet::onCmdDuplicateLane), FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_RESET_CUSTOMSHAPE, GNEViewNet::onCmdResetLaneCustomShape), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_SIDEWALK, GNEViewNet::onCmdRestrictLaneSidewalk), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_BIKE, GNEViewNet::onCmdRestrictLaneBikelane), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_BUS, GNEViewNet::onCmdRestrictLaneBuslane), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_GREENVERGE, GNEViewNet::onCmdRestrictLaneGreenVerge), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_SIDEWALK, GNEViewNet::onCmdAddRestrictedLaneSidewalk), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_BIKE, GNEViewNet::onCmdAddRestrictedLaneBikelane), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_BUS, GNEViewNet::onCmdAddRestrictedLaneBuslane), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_GREENVERGE, GNEViewNet::onCmdAddRestrictedLaneGreenVerge), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_SIDEWALK, GNEViewNet::onCmdRemoveRestrictedLaneSidewalk), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_BIKE, GNEViewNet::onCmdRemoveRestrictedLaneBikelane), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_BUS, GNEViewNet::onCmdRemoveRestrictedLaneBuslane), - FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_GREENVERGE, GNEViewNet::onCmdRemoveRestrictedLaneGreenVerge), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_SIDEWALK, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_BIKE, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_BUS, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_TRANSFORM_GREENVERGE, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_SIDEWALK, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_BIKE, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_BUS, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_GREENVERGE, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_SIDEWALK, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_BIKE, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_BUS, GNEViewNet::onCmdLaneOperation), + FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_REMOVE_GREENVERGE, GNEViewNet::onCmdLaneOperation), // Additionals FXMAPFUNC(SEL_COMMAND, MID_OPEN_ADDITIONAL_DIALOG, GNEViewNet::onCmdOpenAdditionalDialog), // Polygons @@ -141,384 +156,38 @@ // member method definitions // =========================================================================== -// --------------------------------------------------------------------------- -// GNEViewNet::ObjectsUnderCursor - methods -// --------------------------------------------------------------------------- - -GNEViewNet::ObjectsUnderCursor::ObjectsUnderCursor() {} - - -void -GNEViewNet::ObjectsUnderCursor::updateObjectUnderCursor(const std::vector &GUIGlObjects, GNEPoly* editedPolyShape) { - // first clear all containers - myAttributeCarriers.clear(); - myNetElements.clear(); - myAdditionals.clear(); - myShapes.clear(); - myJunctions.clear(); - myEdges.clear(); - myLanes.clear(); - myCrossings.clear(); - myConnections.clear(); - myTAZs.clear(); - myPOIs.clear(); - myPolys.clear(); - // set GUIGlObject - sortGUIGlObjectsByAltitude(GUIGlObjects); - // iterate over GUIGlObjects - for (const auto &i : myGUIGlObjects) { - // only continue if isn't GLO_NETELEMENT (0) - if (i->getType() != GLO_NETELEMENT) { - // cast attribute carrier from glObject - myAttributeCarriers.push_back(dynamic_cast(i)); - // only continue if attributeCarrier isn't nullptr; - if (myAttributeCarriers.back()) { - // If we're editing a shape, ignore rest of elements (including other polygons) - if (editedPolyShape != nullptr) { - if (myAttributeCarriers.back() == editedPolyShape) { - // cast Poly from attribute carrier - myPolys.push_back(dynamic_cast(myAttributeCarriers.back())); - } - } else { - // obtain tag property (only for improve code legibility) - const auto& tagValue = myAttributeCarriers.back()->getTagProperty(); - // check if attributeCarrier can be casted into netElement, additional or shape - if (tagValue.isNetElement()) { - // cast netElement from attribute carrier - myNetElements.push_back(dynamic_cast(myAttributeCarriers.back())); - } else if (tagValue.isAdditional()) { - // cast additional element from attribute carrier - myAdditionals.push_back(dynamic_cast(myAttributeCarriers.back())); - } else if (tagValue.isShape()) { - // cast shape element from attribute carrier - myShapes.push_back(dynamic_cast(myAttributeCarriers.back())); - } else if (tagValue.isTAZ()) { - // cast TAZ element from attribute carrier - myTAZs.push_back(dynamic_cast(myAttributeCarriers.back())); - } - // now set specify AC type - switch (i->getType()) { - case GLO_JUNCTION: - myJunctions.push_back(dynamic_cast(myAttributeCarriers.back())); - break; - case GLO_EDGE: { - // fisrt obtain Edge - GNEEdge *edge = dynamic_cast(myAttributeCarriers.back()); - // check if edge parent is already inserted in myEdges (for example, due clicking over Geometry Points) - if (std::find(myEdges.begin(), myEdges.end(), edge) == myEdges.end()) { - myEdges.push_back(edge); - } - break; - } - case GLO_LANE: { - myLanes.push_back(dynamic_cast(myAttributeCarriers.back())); - // check if edge's lane parent is already inserted in myEdges (for example, due clicking over Geometry Points) - if (std::find(myEdges.begin(), myEdges.end(), &myLanes.back()->getParentEdge()) == myEdges.end()) { - myEdges.push_back(&myLanes.back()->getParentEdge()); - } - break; - } - case GLO_CROSSING: - myCrossings.push_back(dynamic_cast(myAttributeCarriers.back())); - break; - case GLO_CONNECTION: - myConnections.push_back(dynamic_cast(myAttributeCarriers.back())); - break; - case GLO_POI: - myPOIs.push_back(dynamic_cast(myAttributeCarriers.back())); - break; - case GLO_POLYGON: - myPolys.push_back(dynamic_cast(myAttributeCarriers.back())); - break; - default: - break; - } - } - } else { - myAttributeCarriers.pop_back(); - } - } - } - // write information in debug mode - WRITE_DEBUG("ObjectsUnderCursor: GUIGlObjects: " + toString(GUIGlObjects.size()) + - ", AttributeCarriers: " + toString(myAttributeCarriers.size()) + - ", NetElements: " + toString(myNetElements.size()) + - ", Additionals: " + toString(myAdditionals.size()) + - ", Shapes: " + toString(myShapes.size()) + - ", Junctions: " + toString(myJunctions.size()) + - ", Edges: " + toString(myEdges.size()) + - ", Lanes: " + toString(myLanes.size()) + - ", Crossings: " + toString(myCrossings.size()) + - ", Connections: " + toString(myConnections.size()) + - ", TAZs: " + toString(myTAZs.size()) + - ", POIs: " + toString(myPOIs.size()) + - ", Polys: " + toString(myPolys.size())); -} - - -void -GNEViewNet::ObjectsUnderCursor::swapLane2Edge() { - // clear some containers - myGUIGlObjects.clear(); - myAttributeCarriers.clear(); - myNetElements.clear(); - // fill containers using edges - for (const auto &i : myEdges) { - myGUIGlObjects.push_back(i); - myAttributeCarriers.push_back(i); - myNetElements.push_back(i); - } - // write information for debug - WRITE_DEBUG("ObjectsUnderCursor: swapped Lanes to edges") -} - - -void -GNEViewNet::ObjectsUnderCursor::setCreatedJunction(GNEJunction* junction) { - if (myJunctions.size() > 0) { - myJunctions.front() = junction; - } else { - myJunctions.push_back(junction); - } -} - - -GUIGlID -GNEViewNet::ObjectsUnderCursor::getGlIDFront() const { - if (myGUIGlObjects.size() > 0) { - return myGUIGlObjects.front()->getGlID(); - } else { - return 0; - } -} - - -GUIGlObjectType -GNEViewNet::ObjectsUnderCursor::getGlTypeFront() const { - if (myGUIGlObjects.size() > 0) { - return myGUIGlObjects.front()->getType(); - } else { - return GLO_NETWORK; - } -} - - -GNEAttributeCarrier* -GNEViewNet::ObjectsUnderCursor::getAttributeCarrierFront() const { - if (myAttributeCarriers.size() > 0) { - return myAttributeCarriers.front(); - } else { - return nullptr; - } -} - - -GNENetElement* -GNEViewNet::ObjectsUnderCursor::getNetElementFront() const { - if (myNetElements.size() > 0) { - return myNetElements.front(); - } else { - return nullptr; - } -} - - -GNEAdditional* -GNEViewNet::ObjectsUnderCursor::getAdditionalFront() const { - if (myAdditionals.size() > 0) { - return myAdditionals.front(); - } else { - return nullptr; - } -} - - -GNEShape* -GNEViewNet::ObjectsUnderCursor::getShapeFront() const { - if (myShapes.size() > 0) { - return myShapes.front(); - } else { - return nullptr; - } -} - - -GNEJunction* -GNEViewNet::ObjectsUnderCursor::getJunctionFront() const { - if (myJunctions.size() > 0) { - return myJunctions.front(); - } else { - return nullptr; - } -} - - -GNEEdge* -GNEViewNet::ObjectsUnderCursor::getEdgeFront() const { - if (myEdges.size() > 0) { - return myEdges.front(); - } else { - return nullptr; - } -} - - -GNELane* -GNEViewNet::ObjectsUnderCursor::getLaneFront() const { - if (myLanes.size() > 0) { - return myLanes.front(); - } else { - return nullptr; - } -} - - -GNECrossing* -GNEViewNet::ObjectsUnderCursor::getCrossingFront() const { - if (myCrossings.size() > 0) { - return myCrossings.front(); - } else { - return nullptr; - } -} - - -GNEConnection* -GNEViewNet::ObjectsUnderCursor::getConnectionFront() const { - if (myConnections.size() > 0) { - return myConnections.front(); - } else { - return nullptr; - } -} - - -GNETAZ* -GNEViewNet::ObjectsUnderCursor::getTAZFront() const { - if (myTAZs.size() > 0) { - return myTAZs.front(); - } else { - return nullptr; - } -} - - -GNEPOI* -GNEViewNet::ObjectsUnderCursor::getPOIFront() const { - if (myPOIs.size() > 0) { - return myPOIs.front(); - } else { - return nullptr; - } -} - - -GNEPoly* -GNEViewNet::ObjectsUnderCursor::getPolyFront() const { - if (myPolys.size() > 0) { - return myPolys.front(); - } else { - return nullptr; - } -} - - -const std::vector & -GNEViewNet::ObjectsUnderCursor::getClickedAttributeCarriers() const { - return myAttributeCarriers; -} - - -void -GNEViewNet::ObjectsUnderCursor::sortGUIGlObjectsByAltitude(const std::vector &GUIGlObjects) { - // first clear myGUIGlObjects - myGUIGlObjects.clear(); - // declare a map to save sorted GUIGlObjects - std::map > mySortedGUIGlObjects; - for (const auto &i : GUIGlObjects) { - mySortedGUIGlObjects[i->getType()].push_back(i); - } - // move sorted GUIGlObjects into myGUIGlObjects using a reverse iterator - for (std::map >::reverse_iterator i = mySortedGUIGlObjects.rbegin(); i != mySortedGUIGlObjects.rend(); i++) { - for (const auto &j : i->second) { - myGUIGlObjects.push_back(j); - } - } -} - -// --------------------------------------------------------------------------- -// GNEViewNet::keyPressed - methods -// --------------------------------------------------------------------------- - -GNEViewNet::KeyPressed::KeyPressed() : - myEventInfo(nullptr) { -} - - -void -GNEViewNet::KeyPressed::update(void *eventData) { - myEventInfo = (FXEvent*) eventData; -} - - -bool -GNEViewNet::KeyPressed::shiftKeyPressed() const { - if (myEventInfo) { - return (myEventInfo->state & SHIFTMASK) != 0; - } else { - return false; - } -} - - -bool -GNEViewNet::KeyPressed::controlKeyPressed() const { - if (myEventInfo) { - return (myEventInfo->state & CONTROLMASK) != 0; - } else { - return false; - } -} - -// --------------------------------------------------------------------------- -// GNEViewNet - methods -// --------------------------------------------------------------------------- - GNEViewNet::GNEViewNet(FXComposite* tmpParent, FXComposite* actualParent, GUIMainWindow& app, GNEViewParent* viewParent, GNENet* net, GNEUndoList* undoList, - FXGLVisual* glVis, FXGLCanvas* share, FXToolBar* toolBar) : + FXGLVisual* glVis, FXGLCanvas* share) : GUISUMOAbstractView(tmpParent, app, viewParent, net->getVisualisationSpeedUp(), glVis, share), + myEditModes(this), + myTestingMode(this), + myCommonCheckableButtons(this), + myNetworkCheckableButtons(this), + myDemandCheckableButtons(this), + mySelectingArea(this), + myViewOptions(this), + myCreateEdgeOptions(this), + myMoveOptions(this), + myMoveSingleElementValues(this), + myMoveMultipleElementValues(this), + myVehicleOptions(this), + myVehicleTypeOptions(this), myViewParent(viewParent), myNet(net), - myEditMode(GNE_MODE_MOVE), myCurrentFrame(nullptr), - myCreateEdgeOptions(this), - myMoveSingleElementValues(this), - myMoveMultipleElementValues(this), - mySelectingArea(this), - myTestingMode(this), - myViewOptions(this), - myToolbar(toolBar), - myEditModeCreateEdge(nullptr), - myEditModeMove(nullptr), - myEditModeDelete(nullptr), - myEditModeInspect(nullptr), - myEditModeSelect(nullptr), - myEditModeConnection(nullptr), - myEditModeTrafficLight(nullptr), - myEditModeAdditional(nullptr), - myEditModeCrossing(nullptr), - myEditModePolygon(nullptr), - myEditModeProhibition(nullptr), myUndoList(undoList), myEditShapePoly(nullptr) { // view must be the final member of actualParent reparent(actualParent); - + // Build edit modes buildEditModeControls(); + // Mark undo list myUndoList->mark(); + // set this viewNet in Net myNet->setViewNet(this); + // set drag delay ((GUIDanielPerspectiveChanger*)myChanger)->setDragDelay(100000000); // 100 milliseconds // Reset textures @@ -529,7 +198,7 @@ } -GNEViewNet::~GNEViewNet() { } +GNEViewNet::~GNEViewNet() {} void @@ -541,12 +210,12 @@ // build coloring tools { for (auto it_names : gSchemeStorage.getNames()) { - cw.getColoringSchemesCombo().appendItem(it_names.c_str()); + cw.getColoringSchemesCombo()->appendItem(it_names.c_str()); if (it_names == myVisualizationSettings->name) { - cw.getColoringSchemesCombo().setCurrentItem(cw.getColoringSchemesCombo().getNumItems() - 1); + cw.getColoringSchemesCombo()->setCurrentItem(cw.getColoringSchemesCombo()->getNumItems() - 1); } } - cw.getColoringSchemesCombo().setNumVisible(MAX2(5, (int)gSchemeStorage.getNames().size() + 1)); + cw.getColoringSchemesCombo()->setNumVisible(MAX2(5, (int)gSchemeStorage.getNames().size() + 1)); } // for junctions new FXButton(cw.getLocatorPopup(), @@ -581,8 +250,15 @@ } +void +GNEViewNet::update() const { + // this call is only used for breakpoints (to check when view is updated) + GUISUMOAbstractView::update(); +} + + std::set > -GNEViewNet::getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges) { +GNEViewNet::getAttributeCarriersInBoundary(const Boundary& boundary, bool forceSelectEdges) { // use a SET of pairs to obtain IDs and Pointers to attribute carriers. We need this because certain ACs can be returned many times (example: Edges) // Note: a map cannot be used because there is different ACs with the same ID (example: Additionals) std::set > result; @@ -652,10 +328,10 @@ int id = getObjectUnderCursor(); GUIGlObject* o = nullptr; // we need to check if we're inspecting a overlapping element - if(myViewParent->getInspectorFrame()->getOverlappedInspection()->overlappedInspectionShown() && - myViewParent->getInspectorFrame()->getOverlappedInspection()->checkSavedPosition(getPositionInformation()) && - myViewParent->getInspectorFrame()->getInspectedACs().size() > 0) { - o = dynamic_cast(myViewParent->getInspectorFrame()->getInspectedACs().front()); + if (myViewParent->getInspectorFrame()->getOverlappedInspection()->overlappedInspectionShown() && + myViewParent->getInspectorFrame()->getOverlappedInspection()->checkSavedPosition(getPositionInformation()) && + myViewParent->getInspectorFrame()->getAttributesEditor()->getEditedACs().size() > 0) { + o = dynamic_cast(myViewParent->getInspectorFrame()->getAttributesEditor()->getEditedACs().front()); } else if (id != 0) { o = GUIGlObjectStorage::gIDStorage.getObjectBlocking(id); } else { @@ -681,6 +357,36 @@ } +const GNEViewNetHelper::EditModes& +GNEViewNet::getEditModes() const { + return myEditModes; +} + + +const GNEViewNetHelper::MoveOptions& +GNEViewNet::getMoveOptions() const { + return myMoveOptions; +} + + +const GNEViewNetHelper::ViewOptions& +GNEViewNet::getViewOptions() const { + return myViewOptions; +} + + +const GNEViewNetHelper::CreateEdgeOptions& +GNEViewNet::getCreateEdgeOptions() const { + return myCreateEdgeOptions; +} + + +const GNEViewNetHelper::KeyPressed& +GNEViewNet::getKeyPressed() const { + return myKeyPressed; +} + + void GNEViewNet::buildColorRainbow(const GUIVisualizationSettings& s, GUIColorScheme& scheme, int active, GUIGlObjectType objectType) { assert(!scheme.isFixed()); @@ -730,36 +436,6 @@ bool -GNEViewNet::selectEdges() const { - return myViewOptions.selectEdges(); -} - - -bool -GNEViewNet::editingElevation() const { - if (myCreateEdgeOptions.menuCheckMoveElevation->shown()) { - return (myCreateEdgeOptions.menuCheckMoveElevation->getCheck() == TRUE); - } else { - return false; - } -} - - -bool -GNEViewNet::showConnections() { - if (myEditMode == GNE_MODE_CONNECT) { - return myViewOptions.menuCheckHideConnections->getCheck() == 0; - } else if (myEditMode == GNE_MODE_PROHIBITION) { - return true; - } else if (myViewOptions.menuCheckShowConnections->shown() == false) { - return false; - } else { - return (myVisualizationSettings->showLane2Lane); - } -} - - -bool GNEViewNet::autoSelectNodes() { return (myViewOptions.menuCheckExtendSelection->getCheck() != 0); } @@ -779,7 +455,7 @@ bool GNEViewNet::showJunctionAsBubbles() const { - return (myEditMode == GNE_MODE_MOVE) && (myCreateEdgeOptions.menuCheckShowBubbleOverJunction->getCheck()); + return (myEditModes.networkEditMode == GNE_NMODE_MOVE) && (myMoveOptions.showJunctionBubble->getCheck()); } @@ -787,10 +463,10 @@ GNEViewNet::startEditCustomShape(GNENetElement* element, const PositionVector& shape, bool fill) { if ((myEditShapePoly == nullptr) && (element != nullptr) && (shape.size() > 1)) { // save current edit mode before starting - myPreviousEditMode = myEditMode; - setEditModeFromHotkey(MID_GNE_SETMODE_MOVE); - // add special GNEPoly fo edit shapes - // color is taken from junction color settings + myPreviousNetworkEditMode = myEditModes.networkEditMode; + // set move mode + myEditModes.setNetworkEditMode(GNE_NMODE_MOVE); + // add special GNEPoly fo edit shapes (color is taken from junction color settings) RGBColor col = getVisualisationSettings()->junctionColorer.getSchemes()[0].getColor(3); myEditShapePoly = myNet->addPolygonForEditShapes(element, shape, fill, col); // update view net to show the new myEditShapePoly @@ -806,21 +482,28 @@ myNet->removePolygonForEditShapes(myEditShapePoly); myEditShapePoly = nullptr; // restore previous edit mode - if (myEditMode != myPreviousEditMode) { - setEditMode(myPreviousEditMode); + if (myEditModes.networkEditMode != myPreviousNetworkEditMode) { + myEditModes.setNetworkEditMode(myPreviousNetworkEditMode); } } } -GNEViewNet::GNEViewNet() : +GNEViewNet::GNEViewNet() : + myEditModes(this), + myTestingMode(this), + myCommonCheckableButtons(this), + myNetworkCheckableButtons(this), + myDemandCheckableButtons(this), + mySelectingArea(this), + myViewOptions(this), myCreateEdgeOptions(this), + myMoveOptions(this), myMoveSingleElementValues(this), myMoveMultipleElementValues(this), - mySelectingArea(this), - myTestingMode(this), - myViewOptions(this) { -} + myVehicleOptions(this), + myVehicleTypeOptions(this) +{ } int @@ -861,6 +544,8 @@ drawLaneCandidates(); // draw testing elements myTestingMode.drawTestingElements(myApp); + // draw AutoRouteCreator + myViewParent->getVehicleFrame()->getTripRouteCreator()->drawTemporalRoute(); } // draw elements glLineWidth(1); @@ -870,7 +555,7 @@ myVisualizationSettings->scale = lw; glEnable(GL_POLYGON_OFFSET_FILL); glEnable(GL_POLYGON_OFFSET_LINE); - myVisualizationSettings->editMode = myEditMode; + myVisualizationSettings->editMode = myEditModes.networkEditMode; int hits2 = myGrid->Search(minB, maxB, *myVisualizationSettings); glTranslated(0, 0, GLO_ADDITIONAL); @@ -893,282 +578,18 @@ if (makeCurrent()) { // fill objects under cursor myObjectsUnderCursor.updateObjectUnderCursor(getGUIGlObjectsUnderCursor(), myEditShapePoly); - // decide what to do based on mode - switch (myEditMode) { - case GNE_MODE_CREATE_EDGE: { - - /** this function will be implemented in the future class GNECreateEdgeFrame **/ - // make sure that Control key isn't pressed - if (!myKeyPressed.controlKeyPressed()) { - if (!myUndoList->hasCommandGroup()) { - myUndoList->p_begin("create new " + toString(SUMO_TAG_EDGE)); - } - if (!myObjectsUnderCursor.getJunctionFront()) { - myObjectsUnderCursor.setCreatedJunction(myNet->createJunction(snapToActiveGrid(getPositionInformation()), myUndoList)); - } - if (myCreateEdgeOptions.createEdgeSource == nullptr) { - myCreateEdgeOptions.createEdgeSource = myObjectsUnderCursor.getJunctionFront(); - myCreateEdgeOptions.createEdgeSource->markAsCreateEdgeSource(); - update(); - } else { - if (myCreateEdgeOptions.createEdgeSource != myObjectsUnderCursor.getJunctionFront()) { - // may fail to prevent double edges - GNEEdge* newEdge = myNet->createEdge( - myCreateEdgeOptions.createEdgeSource, myObjectsUnderCursor.getJunctionFront(), myViewParent->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate(), myUndoList); - if (newEdge) { - // create another edge, if create opposite edge is enabled - if (myCreateEdgeOptions.autoCreateOppositeEdge->getCheck()) { - myNet->createEdge(myObjectsUnderCursor.getJunctionFront(), myCreateEdgeOptions.createEdgeSource, myViewParent->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate(), myUndoList, "-" + newEdge->getNBEdge()->getID()); - } - myCreateEdgeOptions.createEdgeSource->unMarkAsCreateEdgeSource(); - - if (myUndoList->hasCommandGroup()) { - myUndoList->p_end(); - } else { - std::cout << "edge created without an open CommandGroup )-:\n"; - } - if (myCreateEdgeOptions.chainCreateEdge->getCheck()) { - myCreateEdgeOptions.createEdgeSource = myObjectsUnderCursor.getJunctionFront(); - myCreateEdgeOptions.createEdgeSource->markAsCreateEdgeSource(); - myUndoList->p_begin("create new " + toString(SUMO_TAG_EDGE)); - } else { - myCreateEdgeOptions.createEdgeSource = nullptr; - } - } else { - setStatusBarText("An " + toString(SUMO_TAG_EDGE) + " with the same geometry already exists!"); - } - } else { - setStatusBarText("Start- and endpoint for an " + toString(SUMO_TAG_EDGE) + " must be distinct!"); - } - update(); - } - } - /**/ - // process click - processClick(eventData); - break; - } - case GNE_MODE_MOVE: { - // first obtain moving reference (common for all) - myMoveSingleElementValues.relativeClickedPosition = getPositionInformation(); - // check what type of AC will be moved - if (myObjectsUnderCursor.getPolyFront()) { - // calculate poly movement values (can be entire shape, single geometry points, altitude, etc.) - myMoveSingleElementValues.calculatePolyValues(); - } else if (myObjectsUnderCursor.getPOIFront()) { - // set POI moved object - myMovedItems.poiToMove = myObjectsUnderCursor.getPOIFront(); - // Save original Position of POI in view - myMoveSingleElementValues.originalPositionInView = myMovedItems.poiToMove->getPositionInView(); - } else if (myObjectsUnderCursor.getAdditionalFront()) { - // set additionals moved object - myMovedItems.additionalToMove = myObjectsUnderCursor.getAdditionalFront(); - // save current position of additional - myMoveSingleElementValues.originalPositionInView = myMovedItems.additionalToMove->getPositionInView(); - // start additional geometry moving - myMovedItems.additionalToMove->startGeometryMoving(); - } else if(myObjectsUnderCursor.getTAZFront()) { - // calculate TAZ movement values (can be entire shape or single geometry points) - myMoveSingleElementValues.calculateTAZValues(); - } else if (myObjectsUnderCursor.getJunctionFront()) { - // check if we're moving a single junction or a set of selected junctions - if (myObjectsUnderCursor.getJunctionFront()->isAttributeCarrierSelected()) { - // move selection of junctions - myMoveMultipleElementValues.beginMoveSelection(myObjectsUnderCursor.getJunctionFront()); - } else { - // set junction moved object - myMovedItems.junctionToMove = myObjectsUnderCursor.getJunctionFront(); - // Save original Position of Element in view - myMoveSingleElementValues.originalPositionInView = myMovedItems.junctionToMove->getPositionInView(); - // start junction geometry moving - myMovedItems.junctionToMove->startGeometryMoving(); - } - } else if (myObjectsUnderCursor.getEdgeFront() || myObjectsUnderCursor.getLaneFront()) { - // calculate Edge movement values (can be entire shape, single geometry points, altitude, etc.) - myMoveSingleElementValues.calculateEdgeValues(); - } else { - // process click (to move camera using drag an drop) - processClick(eventData); - } - update(); - break; - } - case GNE_MODE_DELETE: { - if (myObjectsUnderCursor.getAttributeCarrierFront()) { - // change the selected attribute carrier if myViewOptions.mySelectEdges is enabled and clicked element is a getLaneFront() - if (myViewOptions.selectEdges() && (myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_LANE) && !myKeyPressed.shiftKeyPressed()) { - myObjectsUnderCursor.swapLane2Edge(); - } - // check if we are deleting a selection or an single attribute carrier - if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { - // before delete al selected attribute carriers, check if we clicked over a geometry point - if (myViewParent->getDeleteFrame()->getDeleteOptions()->deleteOnlyGeometryPoints() && - (((myObjectsUnderCursor.getEdgeFront()) && (myObjectsUnderCursor.getEdgeFront()->getVertexIndex(getPositionInformation(), false, false) != -1)) - || ((myObjectsUnderCursor.getPolyFront()) && (myObjectsUnderCursor.getPolyFront()->getVertexIndex(getPositionInformation(), false, false) != -1)))) { - myViewParent->getDeleteFrame()->removeAttributeCarrier(myObjectsUnderCursor.getAttributeCarrierFront()); - } else { - myViewParent->getDeleteFrame()->removeSelectedAttributeCarriers(); - } - } else { - myViewParent->getDeleteFrame()->removeAttributeCarrier(myObjectsUnderCursor.getAttributeCarrierFront()); - } - } else { - // process click - processClick(eventData); - } - break; - } - case GNE_MODE_INSPECT: { - // process left click in Inspector Frame - myViewParent->getInspectorFrame()->processClick(getPositionInformation(), myObjectsUnderCursor); - // process click - processClick(eventData); - // update view - update(); - break; - } - case GNE_MODE_SELECT: - // check if a rect for selecting is being created - if (myKeyPressed.shiftKeyPressed()) { - // begin rectangle selection - mySelectingArea.beginRectangleSelection(); - } else { - // first check that under cursor there is an attribute carrier and is selectable - if (myObjectsUnderCursor.getAttributeCarrierFront()) { - // change the selected attribute carrier if myViewOptions.mySelectEdges is enabled and clicked element is a getLaneFront() - if (myViewOptions.selectEdges() && (myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_LANE)) { - myObjectsUnderCursor.swapLane2Edge(); - } - // Check if this GLobject type is locked - if (!myViewParent->getSelectorFrame()->getLockGLObjectTypes()->IsObjectTypeLocked(myObjectsUnderCursor.getGlTypeFront())) { - // toogle netElement selection - if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { - myObjectsUnderCursor.getAttributeCarrierFront()->unselectAttributeCarrier(); - } else { - myObjectsUnderCursor.getAttributeCarrierFront()->selectAttributeCarrier(); - } - } - } - // process click - processClick(eventData); - } - update(); - break; - case GNE_MODE_CONNECT: { - if (myObjectsUnderCursor.getLaneFront()) { - // Handle laneclick (shift key may pass connections, Control key allow conflicts) - myViewParent->getConnectorFrame()->handleLaneClick(myObjectsUnderCursor); - update(); - } - // process click - processClick(eventData); - break; - } - case GNE_MODE_TLS: { - if (myObjectsUnderCursor.getJunctionFront()) { - myViewParent->getTLSEditorFrame()->editJunction(myObjectsUnderCursor.getJunctionFront()); - update(); - } - // process click - processClick(eventData); - break; - } - case GNE_MODE_ADDITIONAL: { - // avoid create additionals if control key is pressed - if(!myKeyPressed.controlKeyPressed()) { - if(myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isShown()) { - // check if we need to start select lanes - if(myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isSelectingLanes()) { - // select getLaneFront() to create an additional with consecutive lanes - myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->addSelectedLane(myObjectsUnderCursor.getLaneFront(), snapToActiveGrid(getPositionInformation())); - } else if (myObjectsUnderCursor.getLaneFront()) { - myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->startConsecutiveLaneSelector(myObjectsUnderCursor.getLaneFront(), snapToActiveGrid(getPositionInformation())); - } - } else { - // call function addAdditional from additional frame - myViewParent->getAdditionalFrame()->addAdditional(myObjectsUnderCursor); - } - update(); - } - // process click - processClick(eventData); - break; - } - case GNE_MODE_CROSSING: { - // swap lanes to edges in crossingsMode - if (myObjectsUnderCursor.getLaneFront()) { - myObjectsUnderCursor.swapLane2Edge(); - } - // call function addCrossing from crossing frame - myViewParent->getCrossingFrame()->addCrossing(myObjectsUnderCursor); - // process click - processClick(eventData); - break; - } - case GNE_MODE_TAZ: { - // avoid create TAZs if control key is pressed - if(!myKeyPressed.controlKeyPressed()) { - // swap laness to edges in TAZ Mode - if (myObjectsUnderCursor.getLaneFront()) { - myObjectsUnderCursor.swapLane2Edge(); - } - // check if we want to create a rect for selecting edges - if (myKeyPressed.shiftKeyPressed() && (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() != nullptr)) { - // begin rectangle selection - mySelectingArea.beginRectangleSelection(); - } else { - // check if process click was scuesfully - if(myViewParent->getTAZFrame()->processClick(snapToActiveGrid(getPositionInformation()), myObjectsUnderCursor)) { - // view net must be always update - update(); - } - // process click - processClick(eventData); - } - } else { - // process click - processClick(eventData); - } - break; - } - case GNE_MODE_POLYGON: { - // avoid create shapes if control key is pressed - if(!myKeyPressed.controlKeyPressed()) { - if (!myObjectsUnderCursor.getPOIFront()) { - GNEPolygonFrame::AddShapeResult result = myViewParent->getPolygonFrame()->processClick(snapToActiveGrid(getPositionInformation()), myObjectsUnderCursor); - // view net must be always update - update(); - // process click depending of the result of "process click" - if ((result != GNEPolygonFrame::ADDSHAPE_UPDATEDTEMPORALSHAPE)) { - // process click - processClick(eventData); - } - } - } else { - // process click - processClick(eventData); - } - break; - } - case GNE_MODE_PROHIBITION: { - if (myObjectsUnderCursor.getConnectionFront()) { - // shift key may pass connections, Control key allow conflicts. - myViewParent->getProhibitionFrame()->handleProhibitionClick(myObjectsUnderCursor); - update(); - } - // process click - processClick(eventData); - break; - } - default: { - // process click - processClick(eventData); - } + // process left button press function depending of supermode + if (myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK) { + processLeftButtonPressNetwork(eventData); + } else if (myEditModes.currentSupermode == GNE_SUPERMODE_DEMAND) { + processLeftButtonPressDemand(eventData); } makeNonCurrent(); } // update cursor updateCursor(); + // update view + update(); return 1; } @@ -1181,86 +602,25 @@ myKeyPressed.update(eventData); // update cursor updateCursor(); - // check moved items - if (myMoveMultipleElementValues.isMovingSelection()) { - myMoveMultipleElementValues.finishMoveSelection(); - } else if (myMovedItems.polyToMove) { - myMovedItems.polyToMove->commitShapeChange(myMoveSingleElementValues.originalShapeBeforeMoving, myUndoList); - myMovedItems.polyToMove = nullptr; - } else if (myMovedItems.poiToMove) { - myMovedItems.poiToMove->commitGeometryMoving(myMoveSingleElementValues.originalPositionInView, myUndoList); - myMovedItems.poiToMove = nullptr; - } else if (myMovedItems.junctionToMove) { - // check if in the moved position there is another Junction and it will be merged - if (!mergeJunctions(myMovedItems.junctionToMove, myMoveSingleElementValues.originalPositionInView)) { - myMovedItems.junctionToMove->endGeometryMoving(); - // position is already up to date but we must register with myUndoList - myMovedItems.junctionToMove->commitGeometryMoving(myMoveSingleElementValues.originalPositionInView, myUndoList); - } - myMovedItems.junctionToMove = nullptr; - } else if (myMovedItems.edgeToMove) { - // end geometry moving - myMovedItems.edgeToMove->endGeometryMoving(); - // commit change depending of what was moved - if (myMoveSingleElementValues.movingStartPos) { - myMovedItems.edgeToMove->commitShapeStartChange(myMoveSingleElementValues.originalPositionInView, myUndoList); - myMoveSingleElementValues.movingStartPos = false; - } else if (myMoveSingleElementValues.movingEndPos) { - myMovedItems.edgeToMove->commitShapeEndChange(myMoveSingleElementValues.originalPositionInView, myUndoList); - myMoveSingleElementValues.movingEndPos = false; - } else { - myMovedItems.edgeToMove->commitShapeChange(myMoveSingleElementValues.originalShapeBeforeMoving, myUndoList); - } - myMovedItems.edgeToMove = nullptr; - } else if (myMovedItems.additionalToMove) { - myMovedItems.additionalToMove->endGeometryMoving(); - myMovedItems.additionalToMove->commitGeometryMoving(myUndoList); - myMovedItems.additionalToMove = nullptr; - } else if (myMovedItems.tazToMove) { - myMovedItems.tazToMove->commitShapeChange(myMoveSingleElementValues.originalShapeBeforeMoving, myUndoList); - myMovedItems.tazToMove = nullptr; - } else if (mySelectingArea.selectingUsingRectangle) { - // check if we're creating a rectangle selection or we want only to select a lane - if(mySelectingArea.startDrawing) { - // check if we're selecting all type of elements o we only want a set of edges for TAZ - if(myEditMode == GNE_MODE_SELECT) { - mySelectingArea.processRectangleSelection(); - } else if(myEditMode == GNE_MODE_TAZ) { - // process edge selection - myViewParent->getTAZFrame()->processEdgeSelection(mySelectingArea.processEdgeRectangleSelection()); - } - } else if(myKeyPressed.shiftKeyPressed()) { - // obtain objects under cursor - if (makeCurrent()) { - // update objects under cursor again - myObjectsUnderCursor.updateObjectUnderCursor(getGUIGlObjectsUnderCursor(), myEditShapePoly); - makeNonCurrent(); - } - // check if there is a lane in objects under cursor - if(myObjectsUnderCursor.getLaneFront()) { - // if we clicked over an lane with shift key pressed, select or unselect it - if(myObjectsUnderCursor.getLaneFront()->isAttributeCarrierSelected()) { - myObjectsUnderCursor.getLaneFront()->unselectAttributeCarrier(); - } else { - myObjectsUnderCursor.getLaneFront()->selectAttributeCarrier(); - } - } - } - // finish selection - mySelectingArea.finishRectangleSelection(); + // process left button release function depending of supermode + if (myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK) { + processLeftButtonReleaseNetwork(); + } else if (myEditModes.currentSupermode == GNE_SUPERMODE_DEMAND) { + processLeftButtonReleaseDemand(); } + // update view update(); return 1; } -long +long GNEViewNet::onRightBtnPress(FXObject* obj, FXSelector sel, void* eventData) { // update keyPressed myKeyPressed.update(eventData); // update cursor updateCursor(); - if ((myEditMode == GNE_MODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { + if ((myEditModes.networkEditMode == GNE_NMODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { // disable right button press during drawing polygon return 1; } else { @@ -1269,14 +629,14 @@ } -long +long GNEViewNet::onRightBtnRelease(FXObject* obj, FXSelector sel, void* eventData) { // update keyPressed myKeyPressed.update(eventData); // update cursor updateCursor(); // disable right button release during drawing polygon - if ((myEditMode == GNE_MODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { + if ((myEditModes.networkEditMode == GNE_NMODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { return 1; } else { return GUISUMOAbstractView::onRightBtnRelease(obj, sel, eventData); @@ -1292,60 +652,13 @@ myKeyPressed.update(eventData); // update cursor updateCursor(); - // change "delete last created point" depending if during movement shift key is pressed - if ((myEditMode == GNE_MODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { - myViewParent->getPolygonFrame()->getDrawingShapeModul()->setDeleteLastCreatedPoint(myKeyPressed.shiftKeyPressed()); - } - // calculate offset between current position and original position - Position offsetMovement = myMoveSingleElementValues.calculateOffsetMovement(); - // check what type of additional is moved - if (myMoveMultipleElementValues.isMovingSelection()) { - // move entire selection - myMoveMultipleElementValues.moveSelection(); - } else if (myMovedItems.polyToMove) { - // move shape's geometry without commiting changes depending if polygon is blocked - if (myMovedItems.polyToMove->isPolygonBlocked()) { - // move entire shape - myMovedItems.polyToMove->moveEntireShape(myMoveSingleElementValues.originalShapeBeforeMoving, offsetMovement); - } else { - // move only a certain Geometry Point - myMoveSingleElementValues.movingIndexShape = myMovedItems.polyToMove->moveVertexShape(myMoveSingleElementValues.movingIndexShape, - myMoveSingleElementValues.originalPositionInView, - offsetMovement); - } - } else if (myMovedItems.poiToMove) { - // Move POI's geometry without commiting changes - myMovedItems.poiToMove->moveGeometry(myMoveSingleElementValues.originalPositionInView, offsetMovement); - } else if (myMovedItems.junctionToMove) { - // Move Junction's geometry without commiting changes - myMovedItems.junctionToMove->moveGeometry(myMoveSingleElementValues.originalPositionInView, offsetMovement); - } else if (myMovedItems.edgeToMove) { - // check if we're moving the start or end position, or a geometry point - if (myMoveSingleElementValues.movingStartPos) { - myMovedItems.edgeToMove->moveShapeStart(myMoveSingleElementValues.originalPositionInView, offsetMovement); - } else if (myMoveSingleElementValues.movingEndPos) { - myMovedItems.edgeToMove->moveShapeEnd(myMoveSingleElementValues.originalPositionInView, offsetMovement); - } else { - // move edge's geometry without commiting changes - myMoveSingleElementValues.movingIndexShape = myMovedItems.edgeToMove->moveVertexShape(myMoveSingleElementValues.movingIndexShape, myMoveSingleElementValues.originalPositionInView, offsetMovement); - } - } else if (myMovedItems.additionalToMove && (myMovedItems.additionalToMove->isAdditionalBlocked() == false)) { - // Move Additional geometry without commiting changes - myMovedItems.additionalToMove->moveGeometry(offsetMovement); - } else if (myMovedItems.tazToMove) { - /// move TAZ's geometry without commiting changes depending if polygon is blocked - if (myMovedItems.tazToMove->isShapeBlocked()) { - // move entire shape - myMovedItems.tazToMove->moveEntireShape(myMoveSingleElementValues.originalShapeBeforeMoving, offsetMovement); - } else { - // move only a certain Geometry Point - myMoveSingleElementValues.movingIndexShape = myMovedItems.tazToMove->moveVertexShape(myMoveSingleElementValues.movingIndexShape, myMoveSingleElementValues.originalPositionInView, offsetMovement); - } - } else if (mySelectingArea.selectingUsingRectangle) { - // update selection corner of selecting area - mySelectingArea.moveRectangleSelection(); + // process mouse move function depending of supermode + if (myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK) { + processMoveMouseNetwork(); + } else if (myEditModes.currentSupermode == GNE_SUPERMODE_DEMAND) { + processMoveMouseDemand(); } - // update view + // update view after movement update(); return 1; } @@ -1358,12 +671,13 @@ // update cursor updateCursor(); // change "delete last created point" depending of shift key - if ((myEditMode == GNE_MODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { + if ((myEditModes.networkEditMode == GNE_NMODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { myViewParent->getPolygonFrame()->getDrawingShapeModul()->setDeleteLastCreatedPoint(myKeyPressed.shiftKeyPressed()); - } else if ((myEditMode == GNE_MODE_TAZ) && myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { + update(); + } else if ((myEditModes.networkEditMode == GNE_NMODE_TAZ) && myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { myViewParent->getTAZFrame()->getDrawingShapeModul()->setDeleteLastCreatedPoint(myKeyPressed.shiftKeyPressed()); + update(); } - update(); return GUISUMOAbstractView::onKeyPress(o, sel, eventData); } @@ -1375,123 +689,161 @@ // update cursor updateCursor(); // change "delete last created point" depending of shift key - if ((myEditMode == GNE_MODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { + if ((myEditModes.networkEditMode == GNE_NMODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { myViewParent->getPolygonFrame()->getDrawingShapeModul()->setDeleteLastCreatedPoint(myKeyPressed.shiftKeyPressed()); + update(); } // check if selecting using rectangle has to be disabled if (mySelectingArea.selectingUsingRectangle && !myKeyPressed.shiftKeyPressed()) { mySelectingArea.selectingUsingRectangle = false; + update(); } - update(); return GUISUMOAbstractView::onKeyRelease(o, sel, eventData); } void GNEViewNet::abortOperation(bool clearSelection) { - // steal focus from any text fields + // steal focus from any text fields and place it over view net setFocus(); - if (myCreateEdgeOptions.createEdgeSource != nullptr) { - // remove current created edge source - myCreateEdgeOptions.createEdgeSource->unMarkAsCreateEdgeSource(); - myCreateEdgeOptions.createEdgeSource = nullptr; - } else if (myEditMode == GNE_MODE_SELECT) { - mySelectingArea.selectingUsingRectangle = false; - // check if current selection has to be cleaned - if (clearSelection) { - myViewParent->getSelectorFrame()->clearCurrentSelection(); - } - } else if (myEditMode == GNE_MODE_CONNECT) { - // abort changes in Connector Frame - myViewParent->getConnectorFrame()->getConnectionModifications()->onCmdCancelModifications(0, 0, 0); - } else if (myEditMode == GNE_MODE_TLS) { - myViewParent->getTLSEditorFrame()->onCmdCancel(nullptr, 0, nullptr); - } else if (myEditMode == GNE_MODE_MOVE) { - stopEditCustomShape(); - } else if (myEditMode == GNE_MODE_POLYGON) { - // abort current drawing - myViewParent->getPolygonFrame()->getDrawingShapeModul()->abortDrawing(); - } else if (myEditMode == GNE_MODE_TAZ) { - if(myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { + // check what supermode is enabled + if (myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK) { + // abort operation depending of current mode + if (myEditModes.networkEditMode == GNE_NMODE_CREATE_EDGE) { + // abort edge creation in create edge frame + myViewParent->getCreateEdgeFrame()->abortEdgeCreation(); + } else if (myEditModes.networkEditMode == GNE_NMODE_SELECT) { + mySelectingArea.selectingUsingRectangle = false; + // check if current selection has to be cleaned + if (clearSelection) { + myViewParent->getSelectorFrame()->clearCurrentSelection(); + } + } else if (myEditModes.networkEditMode == GNE_NMODE_CONNECT) { + // abort changes in Connector Frame + myViewParent->getConnectorFrame()->getConnectionModifications()->onCmdCancelModifications(0, 0, 0); + } else if (myEditModes.networkEditMode == GNE_NMODE_TLS) { + myViewParent->getTLSEditorFrame()->onCmdCancel(nullptr, 0, nullptr); + } else if (myEditModes.networkEditMode == GNE_NMODE_MOVE) { + stopEditCustomShape(); + } else if (myEditModes.networkEditMode == GNE_NMODE_POLYGON) { // abort current drawing myViewParent->getPolygonFrame()->getDrawingShapeModul()->abortDrawing(); - } else if (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() != nullptr) { - // finish current editing TAZ - myViewParent->getTAZFrame()->getTAZCurrentModul()->setTAZ(nullptr); - } - } else if (myEditMode == GNE_MODE_PROHIBITION) { - myViewParent->getProhibitionFrame()->onCmdCancel(nullptr, 0, nullptr); - } else if (myEditMode == GNE_MODE_ADDITIONAL) { - // abort select lanes - myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->abortConsecutiveLaneSelector(); + } else if (myEditModes.networkEditMode == GNE_NMODE_TAZ) { + if (myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { + // abort current drawing + myViewParent->getPolygonFrame()->getDrawingShapeModul()->abortDrawing(); + } else if (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() != nullptr) { + // finish current editing TAZ + myViewParent->getTAZFrame()->getTAZCurrentModul()->setTAZ(nullptr); + } + } else if (myEditModes.networkEditMode == GNE_NMODE_PROHIBITION) { + myViewParent->getProhibitionFrame()->onCmdCancel(nullptr, 0, nullptr); + } else if (myEditModes.networkEditMode == GNE_NMODE_ADDITIONAL) { + // abort select lanes + myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->abortConsecutiveLaneSelector(); + } + } else if (myEditModes.currentSupermode == GNE_SUPERMODE_DEMAND) { + // abort operation depending of current mode + if (myEditModes.demandEditMode == GNE_DMODE_SELECT) { + mySelectingArea.selectingUsingRectangle = false; + // check if current selection has to be cleaned + if (clearSelection) { + myViewParent->getSelectorFrame()->clearCurrentSelection(); + } + } else if (myEditModes.demandEditMode == GNE_DMODE_ROUTES) { + myViewParent->getRouteFrame()->hotKeyEsc(); + } else if (myEditModes.demandEditMode == GNE_DMODE_VEHICLES) { + myViewParent->getVehicleFrame()->getTripRouteCreator()->onCmdAbortRouteCreation(0, 0, 0); + } } + // abort undo list myUndoList->p_abort(); } void GNEViewNet::hotkeyDel() { - if (myEditMode == GNE_MODE_CONNECT || myEditMode == GNE_MODE_TLS) { + if (myEditModes.networkEditMode == GNE_NMODE_CONNECT || myEditModes.networkEditMode == GNE_NMODE_TLS) { setStatusBarText("Cannot delete in this mode"); } else { - myUndoList->p_begin("delete selection"); - deleteSelectedConnections(); - deleteSelectedCrossings(); - deleteSelectedAdditionals(); - deleteSelectedLanes(); - deleteSelectedEdges(); - deleteSelectedJunctions(); - deleteSelectedShapes(); - myUndoList->p_end(); + // delete elements depending of current supermode + if (myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK) { + myUndoList->p_begin("delete network selection"); + deleteSelectedConnections(); + deleteSelectedCrossings(); + deleteSelectedAdditionals(); + deleteSelectedLanes(); + deleteSelectedEdges(); + deleteSelectedJunctions(); + deleteSelectedShapes(); + myUndoList->p_end(); + } else { + myUndoList->p_begin("delete demand selection"); + deleteSelectedDemandElements(); + myUndoList->p_end(); + } + // update view + update(); } } void GNEViewNet::hotkeyEnter() { - if (myEditMode == GNE_MODE_CONNECT) { - // Accept changes in Connector Frame - myViewParent->getConnectorFrame()->getConnectionModifications()->onCmdSaveModifications(0, 0, 0); - } else if (myEditMode == GNE_MODE_TLS) { - myViewParent->getTLSEditorFrame()->onCmdOK(nullptr, 0, nullptr); - } else if ((myEditMode == GNE_MODE_MOVE) && (myEditShapePoly != nullptr)) { - // save edited junction's shape - if (myEditShapePoly != nullptr) { - myUndoList->p_begin("custom " + myEditShapePoly->getShapeEditedElement()->getTagStr() + " shape"); - SumoXMLAttr attr = SUMO_ATTR_SHAPE; - if (myEditShapePoly->getShapeEditedElement()->getTagProperty().hasAttribute(SUMO_ATTR_CUSTOMSHAPE)) { - attr = SUMO_ATTR_CUSTOMSHAPE; + // check what supermode is enabled + if (myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK) { + // abort operation depending of current mode + if (myEditModes.networkEditMode == GNE_NMODE_CONNECT) { + // Accept changes in Connector Frame + myViewParent->getConnectorFrame()->getConnectionModifications()->onCmdSaveModifications(0, 0, 0); + } else if (myEditModes.networkEditMode == GNE_NMODE_TLS) { + myViewParent->getTLSEditorFrame()->onCmdOK(nullptr, 0, nullptr); + } else if ((myEditModes.networkEditMode == GNE_NMODE_MOVE) && (myEditShapePoly != nullptr)) { + // save edited junction's shape + if (myEditShapePoly != nullptr) { + myUndoList->p_begin("custom " + myEditShapePoly->getShapeEditedElement()->getTagStr() + " shape"); + SumoXMLAttr attr = SUMO_ATTR_SHAPE; + if (myEditShapePoly->getShapeEditedElement()->getTagProperty().hasAttribute(SUMO_ATTR_CUSTOMSHAPE)) { + attr = SUMO_ATTR_CUSTOMSHAPE; + } + myEditShapePoly->getShapeEditedElement()->setAttribute(attr, toString(myEditShapePoly->getShape()), myUndoList); + myUndoList->p_end(); + stopEditCustomShape(); + update(); } - myEditShapePoly->getShapeEditedElement()->setAttribute(attr, toString(myEditShapePoly->getShape()), myUndoList); - myUndoList->p_end(); - stopEditCustomShape(); - update(); - } - } else if (myEditMode == GNE_MODE_POLYGON) { - if (myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { - // stop current drawing - myViewParent->getPolygonFrame()->getDrawingShapeModul()->stopDrawing(); - } else { - // start drawing - myViewParent->getPolygonFrame()->getDrawingShapeModul()->startDrawing(); - } - } else if (myEditMode == GNE_MODE_CROSSING) { - myViewParent->getCrossingFrame()->createCrossingHotkey(); - } else if (myEditMode == GNE_MODE_TAZ) { - if (myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { - // stop current drawing - myViewParent->getTAZFrame()->getDrawingShapeModul()->stopDrawing(); - } else if (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() == nullptr) { - // start drawing - myViewParent->getTAZFrame()->getDrawingShapeModul()->startDrawing(); - } else if (myViewParent->getTAZFrame()->getTAZSaveChangesModul()->isChangesPending()) { - // save pending changes - myViewParent->getTAZFrame()->getTAZSaveChangesModul()->onCmdSaveChanges(0, 0, 0); - } - } else if (myEditMode == GNE_MODE_ADDITIONAL) { - if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isSelectingLanes()) { - // stop select lanes to create additional - myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->stopConsecutiveLaneSelector(); + } else if (myEditModes.networkEditMode == GNE_NMODE_POLYGON) { + if (myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { + // stop current drawing + myViewParent->getPolygonFrame()->getDrawingShapeModul()->stopDrawing(); + } else { + // start drawing + myViewParent->getPolygonFrame()->getDrawingShapeModul()->startDrawing(); + } + } else if (myEditModes.networkEditMode == GNE_NMODE_CROSSING) { + myViewParent->getCrossingFrame()->createCrossingHotkey(); + } else if (myEditModes.networkEditMode == GNE_NMODE_TAZ) { + if (myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { + // stop current drawing + myViewParent->getTAZFrame()->getDrawingShapeModul()->stopDrawing(); + } else if (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() == nullptr) { + // start drawing + myViewParent->getTAZFrame()->getDrawingShapeModul()->startDrawing(); + } else if (myViewParent->getTAZFrame()->getTAZSaveChangesModul()->isChangesPending()) { + // save pending changes + myViewParent->getTAZFrame()->getTAZSaveChangesModul()->onCmdSaveChanges(0, 0, 0); + } + } else if (myEditModes.networkEditMode == GNE_NMODE_ADDITIONAL) { + if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isSelectingLanes()) { + // stop select lanes to create additional + myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->stopConsecutiveLaneSelector(); + } + } + } else if (myEditModes.currentSupermode == GNE_SUPERMODE_DEMAND) { + // abort operation depending of current mode + if (myEditModes.demandEditMode == GNE_DMODE_ROUTES) { + myViewParent->getRouteFrame()->hotKeyEnter(); + } else if (myEditModes.demandEditMode == GNE_DMODE_VEHICLES) { + myViewParent->getVehicleFrame()->getTripRouteCreator()->onCmdFinishRouteCreation(0, 0, 0); } } } @@ -1508,52 +860,6 @@ } -void -GNEViewNet::setEditModeFromHotkey(FXushort selid) { - switch (selid) { - case MID_GNE_SETMODE_CREATE_EDGE: - setEditMode(GNE_MODE_CREATE_EDGE); - break; - case MID_GNE_SETMODE_MOVE: - setEditMode(GNE_MODE_MOVE); - break; - case MID_GNE_SETMODE_DELETE: - setEditMode(GNE_MODE_DELETE); - break; - case MID_GNE_SETMODE_INSPECT: - setEditMode(GNE_MODE_INSPECT); - break; - case MID_GNE_SETMODE_SELECT: - setEditMode(GNE_MODE_SELECT); - break; - case MID_GNE_SETMODE_CONNECT: - setEditMode(GNE_MODE_CONNECT); - break; - case MID_GNE_SETMODE_TLS: - setEditMode(GNE_MODE_TLS); - break; - case MID_GNE_SETMODE_ADDITIONAL: - setEditMode(GNE_MODE_ADDITIONAL); - break; - case MID_GNE_SETMODE_CROSSING: - setEditMode(GNE_MODE_CROSSING); - break; - case MID_GNE_SETMODE_TAZ: - setEditMode(GNE_MODE_TAZ); - break; - case MID_GNE_SETMODE_POLYGON: - setEditMode(GNE_MODE_POLYGON); - break; - case MID_GNE_SETMODE_PROHIBITION: - setEditMode(GNE_MODE_PROHIBITION); - break; - default: - throw ProcessError("invalid edit mode called by hotkey"); - break; - } -} - - GNEViewParent* GNEViewNet::getViewParent() const { return myViewParent; @@ -1572,24 +878,6 @@ } -EditMode -GNEViewNet::getCurrentEditMode() const { - return myEditMode; -} - - -const GNEViewNet::KeyPressed & -GNEViewNet::getKeyPressed() const { - return myKeyPressed; -} - - -FXMenuCheck* -GNEViewNet::getMenuCheckShowGrid() const { - return myViewOptions.menuCheckShowGrid; -} - - const GNEAttributeCarrier* GNEViewNet::getDottedAC() const { return myDottedAC; @@ -1604,7 +892,7 @@ bool GNEViewNet::showLockIcon() const { - return (myEditMode == GNE_MODE_MOVE || myEditMode == GNE_MODE_INSPECT || myEditMode == GNE_MODE_ADDITIONAL); + return (myEditModes.networkEditMode == GNE_NMODE_MOVE || myEditModes.networkEditMode == GNE_NMODE_INSPECT || myEditModes.networkEditMode == GNE_NMODE_ADDITIONAL); } @@ -1752,88 +1040,100 @@ return nullptr; } - -long -GNEViewNet::onCmdSetModeCreateEdge(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_CREATE_EDGE); - return 1; -} - - -long -GNEViewNet::onCmdSetModeMove(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_MOVE); - return 1; -} - - -long -GNEViewNet::onCmdSetModeDelete(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_DELETE); - return 1; -} - - -long -GNEViewNet::onCmdSetModeInspect(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_INSPECT); - return 1; -} - - -long -GNEViewNet::onCmdSetModeSelect(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_SELECT); - return 1; -} - - -long -GNEViewNet::onCmdSetModeConnect(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_CONNECT); - return 1; -} - - -long -GNEViewNet::onCmdSetModeTLS(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_TLS); - return 1; -} - - -long -GNEViewNet::onCmdSetModeAdditional(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_ADDITIONAL); - return 1; -} - - -long -GNEViewNet::onCmdSetModeCrossing(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_CROSSING); - return 1; -} - - long -GNEViewNet::onCmdSetModeTAZ(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_TAZ); +GNEViewNet::onCmdSetSupermode(FXObject*, FXSelector sel, void*) { + // check what network mode will be set + switch (FXSELID(sel)) { + case MID_HOTKEY_F3_SUPERMODE_NETWORK: + myEditModes.setSupermode(GNE_SUPERMODE_NETWORK); + break; + case MID_HOTKEY_F4_SUPERMODE_DEMAND: + myEditModes.setSupermode(GNE_SUPERMODE_DEMAND); + break; + default: + break; + } return 1; } - long -GNEViewNet::onCmdSetModePolygon(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_POLYGON); +GNEViewNet::onCmdSetMode(FXObject*, FXSelector sel, void*) { + if (myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK) { + // check what network mode will be set + switch (FXSELID(sel)) { + case MID_HOTKEY_I_INSPECTMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_INSPECT); + break; + case MID_HOTKEY_D_DELETEMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_DELETE); + break; + case MID_HOTKEY_S_SELECTMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_SELECT); + break; + case MID_HOTKEY_M_MOVEMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_MOVE); + break; + case MID_HOTKEY_E_EDGEMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_CREATE_EDGE); + break; + case MID_HOTKEY_C_CONNECTMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_CONNECT); + break; + case MID_HOTKEY_T_TLSMODE_VTYPEMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_TLS); + break; + case MID_HOTKEY_A_ADDITIONALMODE_STOPMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_ADDITIONAL); + break; + case MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_CROSSING); + break; + case MID_HOTKEY_Z_TAZMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_TAZ); + break; + case MID_HOTKEY_P_POLYGONMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_POLYGON); + break; + case MID_HOTKEY_W_PROHIBITIONMODE: + myEditModes.setNetworkEditMode(GNE_NMODE_PROHIBITION); + break; + default: + break; + } + } else { + // check what demand mode will be set + switch (FXSELID(sel)) { + case MID_HOTKEY_I_INSPECTMODE: + myEditModes.setDemandEditMode(GNE_DMODE_INSPECT); + break; + case MID_HOTKEY_D_DELETEMODE: + myEditModes.setDemandEditMode(GNE_DMODE_DELETE); + break; + case MID_HOTKEY_S_SELECTMODE: + myEditModes.setDemandEditMode(GNE_DMODE_SELECT); + break; + case MID_HOTKEY_M_MOVEMODE: + myEditModes.setDemandEditMode(GNE_DMODE_MOVE); + break; + case MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE: + myEditModes.setDemandEditMode(GNE_DMODE_ROUTES); + break; + case MID_HOTKEY_V_VEHICLEMODE: + myEditModes.setDemandEditMode(GNE_DMODE_VEHICLES); + break; + case MID_HOTKEY_T_TLSMODE_VTYPEMODE: + myEditModes.setDemandEditMode(GNE_DMODE_VEHICLETYPES); + break; + case MID_HOTKEY_A_ADDITIONALMODE_STOPMODE: + myEditModes.setDemandEditMode(GNE_DMODE_STOP); + break; + default: + break; + } + } return 1; } -long -GNEViewNet::onCmdSetModeProhibition(FXObject*, FXSelector, void*) { - setEditMode(GNE_MODE_PROHIBITION); - return 1; -} long GNEViewNet::onCmdSplitEdge(FXObject*, FXSelector, void*) { @@ -2206,74 +1506,37 @@ long -GNEViewNet::onCmdRestrictLaneSidewalk(FXObject*, FXSelector, void*) { - return restrictLane(SVC_PEDESTRIAN); -} - - -long -GNEViewNet::onCmdRestrictLaneBikelane(FXObject*, FXSelector, void*) { - return restrictLane(SVC_BICYCLE); -} - - -long -GNEViewNet::onCmdRestrictLaneBuslane(FXObject*, FXSelector, void*) { - return restrictLane(SVC_BUS); -} - - -long -GNEViewNet::onCmdRestrictLaneGreenVerge(FXObject*, FXSelector, void*) { - return restrictLane(SVC_IGNORING); -} - - -long -GNEViewNet::onCmdAddRestrictedLaneSidewalk(FXObject*, FXSelector, void*) { - return addRestrictedLane(SVC_PEDESTRIAN); -} - - -long -GNEViewNet::onCmdAddRestrictedLaneBikelane(FXObject*, FXSelector, void*) { - return addRestrictedLane(SVC_BICYCLE); -} - - -long -GNEViewNet::onCmdAddRestrictedLaneBuslane(FXObject*, FXSelector, void*) { - return addRestrictedLane(SVC_BUS); -} - - -long -GNEViewNet::onCmdAddRestrictedLaneGreenVerge(FXObject*, FXSelector, void*) { - return addRestrictedLane(SVC_IGNORING); -} - - -long -GNEViewNet::onCmdRemoveRestrictedLaneSidewalk(FXObject*, FXSelector, void*) { - return removeRestrictedLane(SVC_PEDESTRIAN); -} - - -long -GNEViewNet::onCmdRemoveRestrictedLaneBikelane(FXObject*, FXSelector, void*) { - return removeRestrictedLane(SVC_BICYCLE); -} - - -long -GNEViewNet::onCmdRemoveRestrictedLaneBuslane(FXObject*, FXSelector, void*) { - return removeRestrictedLane(SVC_BUS); -} - - -long -GNEViewNet::onCmdRemoveRestrictedLaneGreenVerge(FXObject*, FXSelector, void*) { - return removeRestrictedLane(SVC_IGNORING); +GNEViewNet::onCmdLaneOperation(FXObject*, FXSelector sel, void*) { + // check lane operation + switch (FXSELID(sel)) { + case MID_GNE_LANE_TRANSFORM_SIDEWALK: + return restrictLane(SVC_PEDESTRIAN); + case MID_GNE_LANE_TRANSFORM_BIKE: + return restrictLane(SVC_BICYCLE); + case MID_GNE_LANE_TRANSFORM_BUS: + return restrictLane(SVC_BUS); + case MID_GNE_LANE_TRANSFORM_GREENVERGE: + return restrictLane(SVC_IGNORING); + case MID_GNE_LANE_ADD_SIDEWALK: + return addRestrictedLane(SVC_PEDESTRIAN); + case MID_GNE_LANE_ADD_BIKE: + return addRestrictedLane(SVC_BICYCLE); + case MID_GNE_LANE_ADD_BUS: + return addRestrictedLane(SVC_BUS); + case MID_GNE_LANE_ADD_GREENVERGE: + return addRestrictedLane(SVC_IGNORING); + case MID_GNE_LANE_REMOVE_SIDEWALK: + return removeRestrictedLane(SVC_PEDESTRIAN); + case MID_GNE_LANE_REMOVE_BIKE: + return removeRestrictedLane(SVC_BICYCLE); + case MID_GNE_LANE_REMOVE_BUS: + return removeRestrictedLane(SVC_BUS); + case MID_GNE_LANE_REMOVE_GREENVERGE: + return removeRestrictedLane(SVC_IGNORING); + default: + return 0; + break; + } } @@ -2423,8 +1686,8 @@ myUndoList->p_begin("Add restrictions for " + toString(vclass)); // iterate over set of edges for (auto it : setOfEdges) { - // add restricted lane - myNet->addRestrictedLane(vclass, *it, 0, myUndoList); + // add restricted lane (guess target) + myNet->addRestrictedLane(vclass, *it, -1, myUndoList); } // end undo operation myUndoList->p_end(); @@ -2432,10 +1695,14 @@ // If only have a single lane, start undo/redo operation myUndoList->p_begin("Add vclass for " + toString(vclass)); // Add restricted lane - if (lane->getIndex() > 0) { - myNet->addRestrictedLane(vclass, lane->getParentEdge(), lane->getIndex(), myUndoList); - } else { + if (vclass == SVC_PEDESTRIAN) { + // always add pedestrian lanes on the right myNet->addRestrictedLane(vclass, lane->getParentEdge(), 0, myUndoList); + } else if (lane->getParentEdge().getLanes().size() == 1) { + // guess insertion position if there is only 1 lane + myNet->addRestrictedLane(vclass, lane->getParentEdge(), -1, myUndoList); + } else { + myNet->addRestrictedLane(vclass, lane->getParentEdge(), lane->getIndex(), myUndoList); } // end undo/redo operation myUndoList->p_end(); @@ -2537,10 +1804,10 @@ } -void +void GNEViewNet::updateCursor() { // update cursor if control key is pressed - if(myKeyPressed.controlKeyPressed() && ((myEditMode == GNE_MODE_ADDITIONAL) || (myEditMode == GNE_MODE_POLYGON) || (myEditMode == GNE_MODE_TAZ))) { + if (myKeyPressed.controlKeyPressed() && ((myEditModes.networkEditMode == GNE_NMODE_ADDITIONAL) || (myEditModes.networkEditMode == GNE_NMODE_POLYGON) || (myEditModes.networkEditMode == GNE_NMODE_TAZ))) { setDefaultCursor(GUICursorSubSys::getCursor(SUMOCURSOR_MOVE)); setDragCursor(GUICursorSubSys::getCursor(SUMOCURSOR_MOVE)); } else { @@ -2619,7 +1886,21 @@ GNEViewNet::onCmdSplitJunction(FXObject*, FXSelector, void*) { GNEJunction* junction = getJunctionAtPopupPosition(); if (junction != nullptr) { - myNet->splitJunction(junction, myUndoList); + myNet->splitJunction(junction, false, myUndoList); + update(); + } + // destroy pop-up and set focus in view net + destroyPopup(); + setFocus(); + return 1; +} + + +long +GNEViewNet::onCmdSplitJunctionReconnect(FXObject*, FXSelector, void*) { + GNEJunction* junction = getJunctionAtPopupPosition(); + if (junction != nullptr) { + myNet->splitJunction(junction, true, myUndoList); update(); } // destroy pop-up and set focus in view net @@ -2710,11 +1991,11 @@ long GNEViewNet::onCmdToogleShowConnection(FXObject*, FXSelector, void*) { // if show was enabled, init GNEConnections - if (myViewOptions.showConnections()) { + if (myViewOptions.menuCheckShowConnections->getCheck() == TRUE) { getNet()->initGNEConnections(); } // change flag "showLane2Lane" in myVisualizationSettings - myVisualizationSettings->showLane2Lane = myViewOptions.showConnections(); + myVisualizationSettings->showLane2Lane = (myViewOptions.menuCheckShowConnections->getCheck() == TRUE); // Hide/show connections requiere recompute getNet()->requireRecompute(); // Update viewnNet to show/hide conections @@ -2724,6 +2005,14 @@ long +GNEViewNet::onCmdShowDemandElements(FXObject*, FXSelector, void*) { + // update view to show demand elements + update(); + return 1; +} + + +long GNEViewNet::onCmdToogleSelectEdges(FXObject*, FXSelector, void*) { // nothing to do return 1; @@ -2748,13 +2037,17 @@ long GNEViewNet::onCmdAddSelected(FXObject*, FXSelector, void*) { + // make GL current (To allow take objects in popup position) if (makeCurrent()) { int id = getObjectAtPosition(getPopupPosition()); GNEAttributeCarrier* ACToselect = dynamic_cast (GUIGlObjectStorage::gIDStorage.getObjectBlocking(id)); GUIGlObjectStorage::gIDStorage.unblockObject(id); + // make sure that AC is selected before selecting if (ACToselect && !ACToselect->isAttributeCarrierSelected()) { ACToselect->selectAttributeCarrier(); } + // make non current + makeNonCurrent(); } return 1; } @@ -2762,13 +2055,17 @@ long GNEViewNet::onCmdRemoveSelected(FXObject*, FXSelector, void*) { + // make GL current (To allow take objects in popup position) if (makeCurrent()) { int id = getObjectAtPosition(getPopupPosition()); GNEAttributeCarrier* ACToselect = dynamic_cast (GUIGlObjectStorage::gIDStorage.getObjectBlocking(id)); GUIGlObjectStorage::gIDStorage.unblockObject(id); + // make sure that AC is selected before unselecting if (ACToselect && ACToselect->isAttributeCarrierSelected()) { ACToselect->unselectAttributeCarrier(); } + // make non current + makeNonCurrent(); } return 1; } @@ -2792,207 +2089,284 @@ // =========================================================================== void -GNEViewNet::setEditMode(EditMode mode) { - if (mode == myEditMode) { - setStatusBarText("Mode already selected"); - if (myCurrentFrame != nullptr) { - myCurrentFrame->focusUpperElement(); - } - } else if (myEditMode == GNE_MODE_TLS && !myViewParent->getTLSEditorFrame()->isTLSSaved()) { - setStatusBarText("save modifications in TLS before change mode"); - myCurrentFrame->focusUpperElement(); - } else { - setStatusBarText(""); - abortOperation(false); - // stop editing of custom shapes - stopEditCustomShape(); - // set edit mode - myEditMode = mode; - switch (mode) { - case GNE_MODE_CONNECT: - case GNE_MODE_PROHIBITION: - case GNE_MODE_TLS: - // modes which depend on computed data - myNet->computeEverything((GNEApplicationWindow*)myApp); - break; - default: - break; - } - updateModeSpecificControls(); - } -} - - -void GNEViewNet::buildEditModeControls() { - // initialize buttons for modes - myEditModeCreateEdge = new MFXCheckableButton(false, myToolbar, "\tset create edge mode\tMode for creating junction and edges.", - GUIIconSubSys::getIcon(ICON_MODECREATEEDGE), this, MID_GNE_SETMODE_CREATE_EDGE, GUIDesignButtonToolbarCheckable); - myEditModeMove = new MFXCheckableButton(false, myToolbar, "\tset move mode\tMode for move elements.", - GUIIconSubSys::getIcon(ICON_MODEMOVE), this, MID_GNE_SETMODE_MOVE, GUIDesignButtonToolbarCheckable); - myEditModeDelete = new MFXCheckableButton(false, myToolbar, "\tset delete mode\tMode for delete elements.", - GUIIconSubSys::getIcon(ICON_MODEDELETE), this, MID_GNE_SETMODE_DELETE, GUIDesignButtonToolbarCheckable); - myEditModeInspect = new MFXCheckableButton(false, myToolbar, "\tset inspect mode\tMode for inspect elements and change their attributes.", - GUIIconSubSys::getIcon(ICON_MODEINSPECT), this, MID_GNE_SETMODE_INSPECT, GUIDesignButtonToolbarCheckable); - myEditModeSelect = new MFXCheckableButton(false, myToolbar, "\tset select mode\tMode for select elements.", - GUIIconSubSys::getIcon(ICON_MODESELECT), this, MID_GNE_SETMODE_SELECT, GUIDesignButtonToolbarCheckable); - myEditModeConnection = new MFXCheckableButton(false, myToolbar, "\tset connection mode\tMode for edit connections between lanes.", - GUIIconSubSys::getIcon(ICON_MODECONNECTION), this, MID_GNE_SETMODE_CONNECT, GUIDesignButtonToolbarCheckable); - myEditModeProhibition = new MFXCheckableButton(false, myToolbar, "\tset prohibition mode\tMode for editing connection prohibitions.", - GUIIconSubSys::getIcon(ICON_MODEPROHIBITION), this, MID_GNE_SETMODE_PROHIBITION, GUIDesignButtonToolbarCheckable); - myEditModeTrafficLight = new MFXCheckableButton(false, myToolbar, "\tset traffic light mode\tMode for edit traffic lights over junctions.", - GUIIconSubSys::getIcon(ICON_MODETLS), this, MID_GNE_SETMODE_TLS, GUIDesignButtonToolbarCheckable); - myEditModeAdditional = new MFXCheckableButton(false, myToolbar, "\tset additional mode\tMode for adding additional elements.", - GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), this, MID_GNE_SETMODE_ADDITIONAL, GUIDesignButtonToolbarCheckable); - myEditModeCrossing = new MFXCheckableButton(false, myToolbar, "\tset crossing mode\tMode for creating crossings between edges.", - GUIIconSubSys::getIcon(ICON_MODECROSSING), this, MID_GNE_SETMODE_CROSSING, GUIDesignButtonToolbarCheckable); - myEditModeTAZ = new MFXCheckableButton(false, myToolbar, "\tset TAZ mode\tMode for creating Traffic Assignment Zones.", - GUIIconSubSys::getIcon(ICON_MODETAZ), this, MID_GNE_SETMODE_TAZ, GUIDesignButtonToolbarCheckable); - myEditModePolygon = new MFXCheckableButton(false, myToolbar, "\tset polygon mode\tMode for creating polygons and POIs.", - GUIIconSubSys::getIcon(ICON_MODEPOLYGON), this, MID_GNE_SETMODE_POLYGON, GUIDesignButtonToolbarCheckable); + // first build supermode buttons + myEditModes.buildSuperModeButtons(); - // @ToDo add here new FXToolBarGrip(myNavigationToolBar, nullptr, 0, GUIDesignToolbarGrip); + // build menu checks for Common checkable buttons + myCommonCheckableButtons.buildCommonCheckableButtons(); + // build menu checks for Network checkable buttons + myNetworkCheckableButtons.buildNetworkCheckableButtons(); - // initialize mode specific controls - - // build menu checks of create edges options - myCreateEdgeOptions.buildCreateEdgeOptionMenuChecks(); + // build menu checks for Demand checkable buttons + myDemandCheckableButtons.buildDemandCheckableButtons(); // build menu checks of view options myViewOptions.buildViewOptionsMenuChecks(); + + // build menu checks of create edge options + myCreateEdgeOptions.buildCreateEdgeOptionMenuChecks(); + + // build menu checks of move options + myMoveOptions.buildMoveOptionMenuChecks(); } void -GNEViewNet::updateModeSpecificControls() { +GNEViewNet::updateNetworkModeSpecificControls() { // hide grid myViewOptions.menuCheckShowGrid->setCheck(myVisualizationSettings->showGrid); // hide all checkbox of create edge myCreateEdgeOptions.hideCreateEdgeOptionMenuChecks(); + // hide all checkbox of move + myMoveOptions.hideMoveOptionMenuChecks(); // hide all checkbox of view options myViewOptions.hideViewOptionsMenuChecks(); - // unckeck all edit modes - myEditModeCreateEdge->setChecked(false); - myEditModeMove->setChecked(false); - myEditModeDelete->setChecked(false); - myEditModeInspect->setChecked(false); - myEditModeSelect->setChecked(false); - myEditModeConnection->setChecked(false); - myEditModeTrafficLight->setChecked(false); - myEditModeAdditional->setChecked(false); - myEditModeCrossing->setChecked(false); - myEditModeTAZ->setChecked(false); - myEditModePolygon->setChecked(false); - myEditModeProhibition->setChecked(false); + // disable all common edit modes + myCommonCheckableButtons.disableCommonCheckableButtons(); + // disable all network edit modes + myNetworkCheckableButtons.disableNetworkCheckableButtons(); + // hide all frames myViewParent->hideAllFrames(); + // In network mode, always show option "show demand elements" + myViewOptions.menuCheckShowDemandElements->show(); // enable selected controls - switch (myEditMode) { - case GNE_MODE_CREATE_EDGE: - myCreateEdgeOptions.chainCreateEdge->show(); - myCreateEdgeOptions.autoCreateOppositeEdge->show(); - myEditModeCreateEdge->setChecked(true); - myViewOptions.menuCheckShowGrid->show(); - break; - case GNE_MODE_MOVE: - myCreateEdgeOptions.menuCheckWarnAboutMerge->show(); - myCreateEdgeOptions.menuCheckShowBubbleOverJunction->show(); - myCreateEdgeOptions.menuCheckMoveElevation->show(); - myEditModeMove->setChecked(true); - myViewOptions.menuCheckShowGrid->show(); + switch (myEditModes.networkEditMode) { + // common modes + case GNE_NMODE_INSPECT: + myViewParent->getInspectorFrame()->show(); + myViewParent->getInspectorFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getInspectorFrame(); + myCommonCheckableButtons.inspectButton->setChecked(true); + // show view options + myViewOptions.menuCheckSelectEdges->show(); + myViewOptions.menuCheckShowConnections->show(); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_DELETE: + case GNE_NMODE_DELETE: myViewParent->getDeleteFrame()->show(); myViewParent->getDeleteFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getDeleteFrame(); + myCommonCheckableButtons.deleteButton->setChecked(true); myViewOptions.menuCheckShowConnections->show(); + // show view options myViewOptions.menuCheckSelectEdges->show(); - myEditModeDelete->setChecked(true); - break; - case GNE_MODE_INSPECT: - myViewParent->getInspectorFrame()->show(); - myViewParent->getInspectorFrame()->focusUpperElement(); - myCurrentFrame = myViewParent->getInspectorFrame(); - myViewOptions.menuCheckSelectEdges->show(); - myViewOptions.menuCheckShowConnections->show(); - myEditModeInspect->setChecked(true); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_SELECT: + case GNE_NMODE_SELECT: myViewParent->getSelectorFrame()->show(); myViewParent->getSelectorFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getSelectorFrame(); + myCommonCheckableButtons.selectButton->setChecked(true); + // show view options myViewOptions.menuCheckSelectEdges->show(); myViewOptions.menuCheckShowConnections->show(); myViewOptions.menuCheckExtendSelection->show(); - myEditModeSelect->setChecked(true); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); + break; + // specific modes + case GNE_NMODE_CREATE_EDGE: + myCreateEdgeOptions.chainEdges->show(); + myCreateEdgeOptions.autoOppositeEdge->show(); + myNetworkCheckableButtons.createEdgeButton->setChecked(true); + // show view options + myViewOptions.menuCheckShowGrid->show(); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); + break; + case GNE_NMODE_MOVE: + myMoveOptions.warnAboutMerge->show(); + myMoveOptions.showJunctionBubble->show(); + myMoveOptions.moveElevation->show(); + myCommonCheckableButtons.moveButton->setChecked(true); + // show view options + myViewOptions.menuCheckShowGrid->show(); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_CONNECT: + case GNE_NMODE_CONNECT: myViewParent->getConnectorFrame()->show(); myViewParent->getConnectorFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getConnectorFrame(); + myNetworkCheckableButtons.connectionButton->setChecked(true); + // show view options myViewOptions.menuCheckHideConnections->show(); - myEditModeConnection->setChecked(true); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_TLS: + case GNE_NMODE_TLS: myViewParent->getTLSEditorFrame()->show(); myViewParent->getTLSEditorFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getTLSEditorFrame(); + myNetworkCheckableButtons.trafficLightButton->setChecked(true); + // show view options myViewOptions.menuCheckChangeAllPhases->show(); - myEditModeTrafficLight->setChecked(true); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_ADDITIONAL: + case GNE_NMODE_ADDITIONAL: myViewParent->getAdditionalFrame()->show(); myViewParent->getAdditionalFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getAdditionalFrame(); - myEditModeAdditional->setChecked(true); + myNetworkCheckableButtons.additionalButton->setChecked(true); + // show view options myViewOptions.menuCheckShowGrid->show(); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_CROSSING: + case GNE_NMODE_CROSSING: myViewParent->getCrossingFrame()->show(); myViewParent->getCrossingFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getCrossingFrame(); - myEditModeCrossing->setChecked(true); + myNetworkCheckableButtons.crossingButton->setChecked(true); + // show view options myViewOptions.menuCheckShowGrid->setCheck(false); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_TAZ: + case GNE_NMODE_TAZ: myViewParent->getTAZFrame()->show(); myViewParent->getTAZFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getTAZFrame(); - myEditModeTAZ->setChecked(true); + myNetworkCheckableButtons.TAZButton->setChecked(true); + // show view options myViewOptions.menuCheckShowGrid->setCheck(false); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_POLYGON: + case GNE_NMODE_POLYGON: myViewParent->getPolygonFrame()->show(); myViewParent->getPolygonFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getPolygonFrame(); - myEditModePolygon->setChecked(true); + myNetworkCheckableButtons.shapeButton->setChecked(true); + // show view options myViewOptions.menuCheckShowGrid->show(); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); break; - case GNE_MODE_PROHIBITION: + case GNE_NMODE_PROHIBITION: myViewParent->getProhibitionFrame()->show(); myViewParent->getProhibitionFrame()->focusUpperElement(); myCurrentFrame = myViewParent->getProhibitionFrame(); - myEditModeProhibition->setChecked(true); + myNetworkCheckableButtons.prohibitionButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); + break; + default: + break; + } + // update common Network buttons + myCommonCheckableButtons.updateCommonCheckableButtons(); + // Update Network buttons + myNetworkCheckableButtons.updateNetworkCheckableButtons(); + // recalc toolbar + myViewParent->getGNEAppWindows()->getToolbarsGrip().modes->recalc(); + // force repaint because different modes draw different things + onPaint(nullptr, 0, nullptr); + // finally update view + update(); +} + + +void +GNEViewNet::updateDemandModeSpecificControls() { + // hide grid + myViewOptions.menuCheckShowGrid->setCheck(myVisualizationSettings->showGrid); + // hide all checkbox of create edge + myCreateEdgeOptions.hideCreateEdgeOptionMenuChecks(); + // hide all checkbox of move + myMoveOptions.hideMoveOptionMenuChecks(); + // hide all checkbox of view options + myViewOptions.hideViewOptionsMenuChecks(); + // disable all common edit modes + myCommonCheckableButtons.disableCommonCheckableButtons(); + // disable all Demand edit modes + myDemandCheckableButtons.disableDemandCheckableButtons(); + // hide all frames + myViewParent->hideAllFrames(); + // enable selected controls + switch (myEditModes.demandEditMode) { + // common modes + case GNE_DMODE_INSPECT: + myViewParent->getInspectorFrame()->show(); + myViewParent->getInspectorFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getInspectorFrame(); + myCommonCheckableButtons.inspectButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); + break; + case GNE_DMODE_DELETE: + myViewParent->getDeleteFrame()->show(); + myViewParent->getDeleteFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getDeleteFrame(); + myCommonCheckableButtons.deleteButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); + break; + case GNE_DMODE_SELECT: + myViewParent->getSelectorFrame()->show(); + myViewParent->getSelectorFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getSelectorFrame(); + myCommonCheckableButtons.selectButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); + break; + case GNE_DMODE_MOVE: + myCommonCheckableButtons.moveButton->setChecked(true); + // show view options + myViewOptions.menuCheckShowGrid->show(); + // show toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); + break; + // specific modes + case GNE_DMODE_ROUTES: + myViewParent->getRouteFrame()->show(); + myViewParent->getRouteFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getRouteFrame(); + myDemandCheckableButtons.routeButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); + break; + case GNE_DMODE_VEHICLES: + myViewParent->getVehicleFrame()->show(); + myViewParent->getVehicleFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getVehicleFrame(); + myDemandCheckableButtons.vehicleButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); + break; + case GNE_DMODE_VEHICLETYPES: + myViewParent->getVehicleTypeFrame()->show(); + myViewParent->getVehicleTypeFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getVehicleTypeFrame(); + myDemandCheckableButtons.vehicleTypeButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); + break; + case GNE_DMODE_STOP: + myViewParent->getStopFrame()->show(); + myViewParent->getStopFrame()->focusUpperElement(); + myCurrentFrame = myViewParent->getStopFrame(); + myDemandCheckableButtons.stopButton->setChecked(true); + // hide toolbar grip of view options + myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->hide(); break; default: break; } - // Update buttons - myEditModeCreateEdge->update(); - myEditModeMove->update(); - myEditModeDelete->update(); - myEditModeInspect->update(); - myEditModeSelect->update(); - myEditModeConnection->update(); - myEditModeTrafficLight->update(); - myEditModeAdditional->update(); - myEditModeCrossing->update(); - myEditModeTAZ->update(); - myEditModePolygon->update(); - myEditModeProhibition->update(); + // update common Network buttons + myCommonCheckableButtons.updateCommonCheckableButtons(); + // Update Demand buttons + myDemandCheckableButtons.updateDemandCheckableButtons(); + // recalc toolbar + myViewParent->getGNEAppWindows()->getToolbarsGrip().modes->recalc(); // force repaint because different modes draw different things - myToolbar->recalc(); onPaint(nullptr, 0, nullptr); + // finally update view update(); } @@ -3050,7 +2424,7 @@ for (auto i : additionals) { // due there are additionals that are removed when their parent is removed, we need to check if yet exists before removing if (myNet->retrieveAdditional(i->getTagProperty().getTag(), i->getID(), false) != nullptr) { - getViewParent()->getAdditionalFrame()->removeAdditional(i); + myNet->deleteAdditional(i, myUndoList); } } myUndoList->p_end(); @@ -3058,6 +2432,22 @@ } +void +GNEViewNet::deleteSelectedDemandElements() { + std::vector demandElements = myNet->retrieveDemandElements(true); + if (demandElements.size() > 0) { + std::string plural = demandElements.size() == 1 ? ("") : ("s"); + myUndoList->p_begin("delete selected demand elements" + plural); + for (auto i : demandElements) { + // due there are demand elements that are removed when their parent is removed, we need to check if yet exists before removing + if (myNet->retrieveDemandElement(i->getTagProperty().getTag(), i->getID(), false) != nullptr) { + myNet->deleteDemandElement(i, myUndoList); + } + } + myUndoList->p_end(); + } +} + void GNEViewNet::deleteSelectedCrossings() { @@ -3152,7 +2542,7 @@ } if (mergeTarget) { // optionally ask for confirmation - if (myCreateEdgeOptions.menuCheckWarnAboutMerge->getCheck()) { + if (myMoveOptions.warnAboutMerge->getCheck()) { WRITE_DEBUG("Opening FXMessageBox 'merge junctions'"); // open question box FXuint answer = FXMessageBox::question(this, MBOX_YES_NO, @@ -3190,835 +2580,537 @@ void GNEViewNet::updateControls() { - switch (myEditMode) { - case GNE_MODE_INSPECT: + switch (myEditModes.networkEditMode) { + case GNE_NMODE_INSPECT: myViewParent->getInspectorFrame()->update(); break; default: break; } + // update view + update(); } // --------------------------------------------------------------------------- -// GNEViewNet::MovedItems - methods -// --------------------------------------------------------------------------- - -GNEViewNet::MovedItems::MovedItems() : - junctionToMove(nullptr), - edgeToMove(nullptr), - polyToMove(nullptr), - poiToMove(nullptr), - additionalToMove(nullptr), - tazToMove(nullptr) { -} - -// --------------------------------------------------------------------------- -// GNEViewNet::MoveSingleElementValues - methods +// Private methods // --------------------------------------------------------------------------- -GNEViewNet::MoveSingleElementValues::MoveSingleElementValues(GNEViewNet* viewNet) : - movingIndexShape(-1), - movingStartPos(false), - movingEndPos(false), - myViewNet(viewNet) { -} - - -Position -GNEViewNet::MoveSingleElementValues::calculateOffsetMovement() const { - // calculate offsetMovement depending of current mouse position and relative clicked position - // @note #3521: Add checkBox to allow moving elements... has to be implemented and used here - Position offsetMovement = myViewNet->getPositionInformation() - myViewNet->myMoveSingleElementValues.relativeClickedPosition; - // calculate Z depending of menuCheckMoveElevation - if (myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->shown() && myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->getCheck() == TRUE) { - // reset offset X and Y and use Y for Z - offsetMovement = Position(0, 0, offsetMovement.y()); - } else { - // leave z empty (because in this case offset only actuates over X-Y) - offsetMovement.setz(0); - } - return offsetMovement; -} - - -void -GNEViewNet::MoveSingleElementValues::calculatePolyValues() { - // set Poly to move - myViewNet->myMovedItems.polyToMove = myViewNet->myObjectsUnderCursor.getPolyFront(); - // now we have two cases: if we're editing the X-Y coordenade or the altitude (z) - if (myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->shown() && myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->getCheck() == TRUE) { - // check if in the clicked position a geometry point exist - int existentIndex = myViewNet->myMovedItems.polyToMove->getVertexIndex(myViewNet->getPositionInformation(), false, false); - if (existentIndex != -1) { - // save original shape (needed for commit change) - myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myViewNet->myMovedItems.polyToMove->getShape(); - // obtain existent index - myViewNet->myMoveSingleElementValues.movingIndexShape = existentIndex; - myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->myMovedItems.polyToMove->getShape()[existentIndex]; - } else { - // stop poly moving - myViewNet->myMovedItems.polyToMove = nullptr; +void +GNEViewNet::drawLaneCandidates() const { + if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isSelectingLanes()) { + // draw first point + if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().size() > 0) { + // Push draw matrix + glPushMatrix(); + // obtain first clicked point + const Position& firstLanePoint = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().front().first->getShape().positionAtOffset( + myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().front().second); + // must draw on top of other connections + glTranslated(firstLanePoint.x(), firstLanePoint.y(), GLO_JUNCTION + 0.3); + GLHelper::setColor(RGBColor::RED); + // draw first point + GLHelper::drawFilledCircle((double) 1.3, 8); + GLHelper::drawText("S", Position(), .1, 1.3, RGBColor::CYAN); + // pop draw matrix + glPopMatrix(); } - } else { - // save original shape (needed for commit change) - myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myViewNet->myMovedItems.polyToMove->getShape(); - // save clicked position as moving original position - myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->getPositionInformation(); - // obtain index of vertex to move if shape isn't blocked - if ((myViewNet->myMovedItems.polyToMove->isPolygonBlocked() == false) && (myViewNet->myMovedItems.polyToMove->isMovementBlocked() == false)) { - // check if we want to remove a Geometry Point - if (myViewNet->myKeyPressed.shiftKeyPressed()) { - // check if we're clicked over a Geometry Point - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.polyToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); - if (myViewNet->myMoveSingleElementValues.movingIndexShape != -1) { - myViewNet->myMovedItems.polyToMove->deleteGeometryPoint(myViewNet->myMoveSingleElementValues.originalPositionInView); - // after removing Geomtery Point, reset PolyToMove - myViewNet->myMovedItems.polyToMove = nullptr; - } - } else { - // obtain index of vertex to move and moving reference - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.polyToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); - if (myViewNet->myMoveSingleElementValues.movingIndexShape == -1) { - // create new geometry point - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.polyToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, true, true); + // draw connections between lanes + if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().size() > 1) { + // iterate over all current selected lanes + for (int i = 0; i < (int)myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().size() - 1; i++) { + // declare position vector for shape + PositionVector shape; + // declare vectors for shape rotation and lenghts + std::vector shapeRotations, shapeLengths; + // obtain GNELanes + GNELane* from = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().at(i).first; + GNELane* to = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().at(i + 1).first; + // Push draw matrix + glPushMatrix(); + // must draw on top of other connections + glTranslated(0, 0, GLO_JUNCTION + 0.2); + // obtain connection shape + shape = from->getParentEdge().getNBEdge()->getConnection(from->getIndex(), to->getParentEdge().getNBEdge(), to->getIndex()).shape; + // set special color + GLHelper::setColor(myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLaneColor()); + // Obtain lengths and shape rotations + int segments = (int) shape.size() - 1; + if (segments >= 0) { + shapeRotations.reserve(segments); + shapeLengths.reserve(segments); + for (int j = 0; j < segments; j++) { + const Position& f = shape[j]; + const Position& s = shape[j + 1]; + shapeLengths.push_back(f.distanceTo2D(s)); + shapeRotations.push_back((double) atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); + } } + // draw a list of lines + GLHelper::drawBoxLines(shape, shapeRotations, shapeLengths, 0.2); + // pop draw matrix + glPopMatrix(); } - } else { - myViewNet->myMoveSingleElementValues.movingIndexShape = -1; + // draw last point + glPushMatrix(); + // obtain last clicked point + const Position& lastLanePoint = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().back().first->getShape().positionAtOffset( + myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().back().second); + // must draw on top of other connections + glTranslated(lastLanePoint.x(), lastLanePoint.y(), GLO_JUNCTION + 0.3); + GLHelper::setColor(RGBColor::RED); + // draw last point + GLHelper::drawFilledCircle((double) 1.3, 8); + GLHelper::drawText("E", Position(), .1, 1.3, RGBColor::CYAN); + // pop draw matrix + glPopMatrix(); } + } } -void -GNEViewNet::MoveSingleElementValues::calculateEdgeValues() { - // allways swap getLaneFront()s to getEdgesFront()s in movement mode - if (myViewNet->myObjectsUnderCursor.getLaneFront()) { - myViewNet->myObjectsUnderCursor.swapLane2Edge(); +void +GNEViewNet::drawTemporalDrawShape() const { + PositionVector temporalShape; + bool deleteLastCreatedPoint = false; + // obtain temporal shape and delete last created point flag + if (myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { + temporalShape = myViewParent->getPolygonFrame()->getDrawingShapeModul()->getTemporalShape(); + deleteLastCreatedPoint = myViewParent->getPolygonFrame()->getDrawingShapeModul()->getDeleteLastCreatedPoint(); + } else if (myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { + temporalShape = myViewParent->getTAZFrame()->getDrawingShapeModul()->getTemporalShape(); + deleteLastCreatedPoint = myViewParent->getTAZFrame()->getDrawingShapeModul()->getDeleteLastCreatedPoint(); } - if (myViewNet->myObjectsUnderCursor.getEdgeFront()->isAttributeCarrierSelected()) { - // begin move selection of multiple elements - myViewNet->myMoveMultipleElementValues.beginMoveSelection(myViewNet->myObjectsUnderCursor.getEdgeFront()); - } else if (myViewNet->myKeyPressed.shiftKeyPressed()) { - // edit end point - myViewNet->myObjectsUnderCursor.getEdgeFront()->editEndpoint(myViewNet->getPositionInformation(), myViewNet->myUndoList); - } else { - // assign clicked edge to edgeToMove - myViewNet->myMovedItems.edgeToMove = myViewNet->myObjectsUnderCursor.getEdgeFront(); - // check if we clicked over a start or end position - if (myViewNet->myMovedItems.edgeToMove->clickedOverShapeStart(myViewNet->getPositionInformation())) { - // save start pos - myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->myMovedItems.edgeToMove->getNBEdge()->getGeometry().front(); - myViewNet->myMoveSingleElementValues.movingStartPos = true; - // start geometry moving - myViewNet->myMovedItems.edgeToMove->startGeometryMoving(); - } else if (myViewNet->myMovedItems.edgeToMove->clickedOverShapeEnd(myViewNet->getPositionInformation())) { - // save end pos - myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->myMovedItems.edgeToMove->getNBEdge()->getGeometry().back(); - myViewNet->myMoveSingleElementValues.movingEndPos = true; - // start geometry moving - myViewNet->myMovedItems.edgeToMove->startGeometryMoving(); + // check if we're in drawing mode + if (temporalShape.size() > 0) { + // draw blue line with the current drawed shape + glPushMatrix(); + glLineWidth(2); + glTranslated(0, 0, GLO_MAX); + GLHelper::setColor(RGBColor::BLUE); + GLHelper::drawLine(temporalShape); + glPopMatrix(); + // draw red line from the last point of shape to the current mouse position + glPushMatrix(); + glLineWidth(2); + glTranslated(0, 0, GLO_MAX); + // draw last line depending if shift key (delete last created point) is pressed + if (deleteLastCreatedPoint) { + GLHelper::setColor(RGBColor::RED); } else { - // now we have two cases: if we're editing the X-Y coordenade or the altitude (z) - if (myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->shown() && myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->getCheck() == TRUE) { - // check if in the clicked position a geometry point exist - int existentIndex = myViewNet->myMovedItems.edgeToMove->getVertexIndex(myViewNet->getPositionInformation(), false, false); - if (existentIndex != -1) { - myViewNet->myMoveSingleElementValues.movingIndexShape = existentIndex; - myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->myMovedItems.edgeToMove->getNBEdge()->getInnerGeometry()[existentIndex]; - // start geometry moving - myViewNet->myMovedItems.edgeToMove->startGeometryMoving(); - } else { - // stop edge moving - myViewNet->myMovedItems.edgeToMove = nullptr; - } - } else { - // save original shape (needed for commit change) - myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myViewNet->myMovedItems.edgeToMove->getNBEdge()->getInnerGeometry(); - // obtain index of vertex to move and moving reference - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.edgeToMove->getVertexIndex(myViewNet->getPositionInformation(), false, false); - // if index doesn't exist, create it snapping new edge to grid - if (myViewNet->myMoveSingleElementValues.movingIndexShape == -1) { - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.edgeToMove->getVertexIndex(myViewNet->getPositionInformation(), true, true); - } - // make sure that myViewNet->myMoveSingleElementValues.movingIndexShape isn't -1 - if(myViewNet->myMoveSingleElementValues.movingIndexShape != -1) { - myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->myMovedItems.edgeToMove->getNBEdge()->getInnerGeometry()[myViewNet->myMoveSingleElementValues.movingIndexShape]; - // start geometry moving - myViewNet->myMovedItems.edgeToMove->startGeometryMoving(); - } - } + GLHelper::setColor(RGBColor::GREEN); } + GLHelper::drawLine(temporalShape.back(), snapToActiveGrid(getPositionInformation())); + glPopMatrix(); } } -void -GNEViewNet::MoveSingleElementValues::calculateTAZValues() { - // set TAZ to move - myViewNet->myMovedItems.tazToMove = myViewNet->myObjectsUnderCursor.getTAZFront(); - // save original shape (needed for commit change) - myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myViewNet->myMovedItems.tazToMove->getShape(); - // save clicked position as moving original position - myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->getPositionInformation(); - // obtain index of vertex to move if shape isn't blocked - if ((myViewNet->myMovedItems.tazToMove->isShapeBlocked() == false) && (myViewNet->myMovedItems.tazToMove->isAdditionalBlocked() == false)) { - // check if we want to remove a Geometry Point - if (myViewNet->myKeyPressed.shiftKeyPressed()) { - // check if we're clicked over a Geometry Point - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.tazToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); - if (myViewNet->myMoveSingleElementValues.movingIndexShape != -1) { - myViewNet->myMovedItems.tazToMove->deleteGeometryPoint(myViewNet->myMoveSingleElementValues.originalPositionInView); - // after removing Geomtery Point, reset PolyToMove - myViewNet->myMovedItems.tazToMove = nullptr; - } - } else { - // obtain index of vertex to move and moving reference - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.tazToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); - if (myViewNet->myMoveSingleElementValues.movingIndexShape == -1) { - // create new geometry point - myViewNet->myMoveSingleElementValues.movingIndexShape = myViewNet->myMovedItems.tazToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, true, true); - } +void +GNEViewNet::processLeftButtonPressNetwork(void* eventData) { + // decide what to do based on mode + switch (myEditModes.networkEditMode) { + case GNE_NMODE_INSPECT: { + // process left click in Inspector Frame + myViewParent->getInspectorFrame()->processNetworkSupermodeClick(getPositionInformation(), myObjectsUnderCursor); + // process click + processClick(eventData); + break; } - } else { - // abort moving index shape - myViewNet->myMoveSingleElementValues.movingIndexShape = -1; - } -} - -// --------------------------------------------------------------------------- -// GNEViewNet::MoveMultipleElementValues - methods -// --------------------------------------------------------------------------- - -GNEViewNet::MoveMultipleElementValues::MoveMultipleElementValues(GNEViewNet* viewNet) : - myViewNet(viewNet), - myMovingSelection(false) { -} - - -void -GNEViewNet::MoveMultipleElementValues::beginMoveSelection(GNEAttributeCarrier* originAC) { - // enable moving selection - myMovingSelection = true; - // save clicked position (to calculate offset) - myClickedPosition = myViewNet->getPositionInformation(); - // obtain Junctions and edges selected - std::vector selectedJunctions = myViewNet->getNet()->retrieveJunctions(true); - std::vector selectedEdges = myViewNet->getNet()->retrieveEdges(true); - // Junctions are always moved, then save position of current selected junctions (Needed when mouse is released) - for (auto i : selectedJunctions) { - // save junction position - myMovedJunctionOriginPositions[i] = i->getPositionInView(); - // start geometry moving - i->startGeometryMoving(); - } - // make special movement depending of clicked AC - if (originAC->getTagProperty().getTag() == SUMO_TAG_JUNCTION) { - // if clicked element is a junction, move shapes of all selected edges - for (auto i : selectedEdges) { - // save entire edge geometry - myMovedEdgesOriginShape[i] = i->getNBEdge()->getInnerGeometry(); - // start geometry moving - i->startGeometryMoving(); - } - } else if (originAC->getTagProperty().getTag() == SUMO_TAG_EDGE) { - // obtain clicked edge - GNEEdge* clickedEdge = dynamic_cast(originAC); - // if clicked edge has origin and destiny junction selected, move shapes of all selected edges - if (myMovedJunctionOriginPositions.count(clickedEdge->getGNEJunctionSource()) > 0 && - myMovedJunctionOriginPositions.count(clickedEdge->getGNEJunctionDestiny()) > 0) { - for (auto i : selectedEdges) { - // save entire edge geometry - myMovedEdgesOriginShape[i] = i->getNBEdge()->getInnerGeometry(); - // start geometry moving - i->startGeometryMoving(); - } - } else { - // declare three groups for dividing edges - std::vector noJunctionsSelected; - std::vector originJunctionSelected; - std::vector destinyJunctionSelected; - // divide selected edges into four groups, depending of the selection of their junctions - for (auto i : selectedEdges) { - bool originSelected = myMovedJunctionOriginPositions.count(i->getGNEJunctionSource()) > 0; - bool destinySelected = myMovedJunctionOriginPositions.count(i->getGNEJunctionDestiny()) > 0; - // bot junctions selected - if (!originSelected && !destinySelected) { - noJunctionsSelected.push_back(i); - } else if (originSelected && !destinySelected) { - originJunctionSelected.push_back(i); - } else if (!originSelected && destinySelected) { - destinyJunctionSelected.push_back(i); - } else if (!originSelected && !destinySelected) { - // save edge geometry - myMovedEdgesOriginShape[i] = i->getNBEdge()->getInnerGeometry(); - // start geometry moving - i->startGeometryMoving(); - } - } - // save original shape of all noJunctionsSelected edges (needed for commit change) - for (auto i : noJunctionsSelected) { - myMovedEgdesGeometryPoints[i] = new MoveSingleElementValues(myViewNet); - // save edge geometry - myMovedEgdesGeometryPoints[i]->originalShapeBeforeMoving = i->getNBEdge()->getInnerGeometry(); - // start geometry moving - i->startGeometryMoving(); - } - // obtain index shape of clicked edge - int index = clickedEdge->getVertexIndex(myViewNet->getPositionInformation(), true, true); - // check that index is valid - if (index < 0) { - throw ProcessError("invalid shape index"); - } - // save index and original position - myMovedEgdesGeometryPoints[clickedEdge] = new MoveSingleElementValues(myViewNet); - myMovedEgdesGeometryPoints[clickedEdge]->movingIndexShape = index; - myMovedEgdesGeometryPoints[clickedEdge]->originalPositionInView = myViewNet->getPositionInformation(); - // start moving of clicked edge AFTER getting vertex Index - clickedEdge->startGeometryMoving(); - // do the same for the rest of noJunctionsSelected edges - for (auto i : noJunctionsSelected) { - if (i != clickedEdge) { - myMovedEgdesGeometryPoints[i] = new MoveSingleElementValues(myViewNet); - // save index and original position - myMovedEgdesGeometryPoints[i]->movingIndexShape = i->getVertexIndex(myViewNet->getPositionInformation(), true, true); - // set originalPosition depending if edge is opposite to clicked edge - if (i->getOppositeEdge() == clickedEdge) { - myMovedEgdesGeometryPoints[i]->originalPositionInView = myViewNet->getPositionInformation(); + case GNE_NMODE_DELETE: { + // check that we have clicked over an non-demand element + if (myObjectsUnderCursor.getAttributeCarrierFront() && !myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().isDemandElement()) { + // change the selected attribute carrier if myViewOptions.mySelectEdges is enabled and clicked element is a getLaneFront() + if (myViewOptions.selectEdges() && (myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_LANE) && !myKeyPressed.shiftKeyPressed()) { + myObjectsUnderCursor.swapLane2Edge(); + } + // check if we are deleting a selection or an single attribute carrier + if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { + // before delete al selected attribute carriers, check if we clicked over a geometry point + if (myViewParent->getDeleteFrame()->getDeleteOptions()->deleteOnlyGeometryPoints() && + (((myObjectsUnderCursor.getEdgeFront()) && (myObjectsUnderCursor.getEdgeFront()->getVertexIndex(getPositionInformation(), false, false) != -1)) + || ((myObjectsUnderCursor.getPolyFront()) && (myObjectsUnderCursor.getPolyFront()->getVertexIndex(getPositionInformation(), false, false) != -1)))) { + myViewParent->getDeleteFrame()->removeAttributeCarrier(myObjectsUnderCursor); } else { - myMovedEgdesGeometryPoints[i]->originalPositionInView = i->getNBEdge()->getInnerGeometry()[myMovedEgdesGeometryPoints[i]->movingIndexShape]; + myViewParent->getDeleteFrame()->removeSelectedAttributeCarriers(); } - // start moving of clicked edge AFTER getting vertex Index - i->startGeometryMoving(); + } else { + myViewParent->getDeleteFrame()->removeAttributeCarrier(myObjectsUnderCursor); } + } else { + // process click + processClick(eventData); } + break; } - } -} - - -void -GNEViewNet::MoveMultipleElementValues::moveSelection() { - // calculate offset between current position and original position - Position offsetMovement = myViewNet->getPositionInformation() - myClickedPosition; - // calculate Z depending of Grid - if (myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->shown() && myViewNet->myCreateEdgeOptions.menuCheckMoveElevation->getCheck() == TRUE) { - // reset offset X and Y and use Y for Z - offsetMovement = Position(0, 0, offsetMovement.y()); - } else { - // leave z empty (because in this case offset only actuates over X-Y) - offsetMovement.setz(0); - } - // move selected junctions - for (auto i : myMovedJunctionOriginPositions) { - i.first->moveGeometry(i.second, offsetMovement); - } - // move entire edge shapes - for (auto i : myMovedEdgesOriginShape) { - i.first->moveEntireShape(i.second, offsetMovement); - } - // move partial shapes - for (auto i : myMovedEgdesGeometryPoints) { - i.first->moveVertexShape(i.second->movingIndexShape, i.second->originalPositionInView, offsetMovement); - } -} - - -void -GNEViewNet::MoveMultipleElementValues::finishMoveSelection() { - // begin undo list - myViewNet->getUndoList()->p_begin("position of selected elements"); - // commit positions of moved junctions - for (auto i : myMovedJunctionOriginPositions) { - i.first->endGeometryMoving(); - i.first->commitGeometryMoving(i.second, myViewNet->getUndoList()); - } - // commit shapes of entired moved edges - for (auto i : myMovedEdgesOriginShape) { - i.first->endGeometryMoving(); - i.first->commitShapeChange(i.second, myViewNet->getUndoList()); - } - //commit shapes of partial moved shapes - for (auto i : myMovedEgdesGeometryPoints) { - i.first->endGeometryMoving(); - i.first->commitShapeChange(i.second->originalShapeBeforeMoving, myViewNet->getUndoList()); - } - // end undo list - myViewNet->getUndoList()->p_end(); - // stop moving selection - myMovingSelection = false; - // clear containers - myMovedJunctionOriginPositions.clear(); - myMovedEdgesOriginShape.clear(); - // delete all movedEgdesGeometryPoints before clear container - for (const auto &i : myMovedEgdesGeometryPoints) { - delete i.second; - } - myMovedEgdesGeometryPoints.clear(); -} - - -bool -GNEViewNet::MoveMultipleElementValues::isMovingSelection() const { - return myMovingSelection; -} - -// --------------------------------------------------------------------------- -// GNEViewNet::SelectingArea - methods -// --------------------------------------------------------------------------- - -GNEViewNet::SelectingArea::SelectingArea(GNEViewNet* viewNet) : - selectingUsingRectangle(false), - startDrawing(false), - myViewNet(viewNet) { -} - - -void -GNEViewNet::SelectingArea::beginRectangleSelection() { - selectingUsingRectangle = true; - selectionCorner1 = myViewNet->getPositionInformation(); - selectionCorner2 = selectionCorner1; -} - - -void -GNEViewNet::SelectingArea::moveRectangleSelection() { - // start drawing - startDrawing = true; - // only update selection corner 2 - selectionCorner2 = myViewNet->getPositionInformation(); - // update status bar - myViewNet->setStatusBarText("Selection width:" + toString(fabs(selectionCorner1.x() - selectionCorner2.x())) - + " height:" + toString(fabs(selectionCorner1.y() - selectionCorner2.y())) - + " diagonal:" + toString(selectionCorner1.distanceTo2D(selectionCorner2))); -} - - -void -GNEViewNet::SelectingArea::finishRectangleSelection() { - // finish rectangle selection - selectingUsingRectangle = false; - startDrawing = false; -} - - -void -GNEViewNet::SelectingArea::processRectangleSelection() { - // shift held down on mouse-down and mouse-up and check that rectangle exist - if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) && - (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) && - myViewNet->myKeyPressed.shiftKeyPressed()) { - // create boundary between two corners - Boundary rectangleBoundary; - rectangleBoundary.add(selectionCorner1); - rectangleBoundary.add(selectionCorner2); - // process selection within boundary - processBoundarySelection(rectangleBoundary); - } -} - - -std::vector -GNEViewNet::SelectingArea::processEdgeRectangleSelection() { - // declare vector for selection - std::vector result; - // shift held down on mouse-down and mouse-up and check that rectangle exist - if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) && - (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) && - myViewNet->myKeyPressed.shiftKeyPressed()) { - // create boundary between two corners - Boundary rectangleBoundary; - rectangleBoundary.add(selectionCorner1); - rectangleBoundary.add(selectionCorner2); - if (myViewNet->makeCurrent()) { - // obtain all ACs in Rectangle BOundary - std::set > ACsInBoundary = myViewNet->getAttributeCarriersInBoundary(rectangleBoundary); - // Filter ACs in Boundary and get only edges - for (auto i : ACsInBoundary) { - if(i.second->getTagProperty().getTag() == SUMO_TAG_EDGE) { - result.push_back(dynamic_cast(i.second)); + case GNE_NMODE_SELECT: + // check if a rect for selecting is being created + if (myKeyPressed.shiftKeyPressed()) { + // begin rectangle selection + mySelectingArea.beginRectangleSelection(); + } else { + // first check that under cursor there is an attribute carrier, isn't a demand element and is selectable + if (myObjectsUnderCursor.getAttributeCarrierFront() && !myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().isDemandElement()) { + // change the selected attribute carrier if myViewOptions.mySelectEdges is enabled and clicked element is a getLaneFront() + if (myViewOptions.selectEdges() && (myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().getTag() == SUMO_TAG_LANE)) { + myObjectsUnderCursor.swapLane2Edge(); + } + // Check if this GLobject type is locked + if (!myViewParent->getSelectorFrame()->getLockGLObjectTypes()->IsObjectTypeLocked(myObjectsUnderCursor.getGlTypeFront())) { + // toogle netElement selection + if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { + myObjectsUnderCursor.getAttributeCarrierFront()->unselectAttributeCarrier(); + } else { + myObjectsUnderCursor.getAttributeCarrierFront()->selectAttributeCarrier(); + } + } + } + // process click + processClick(eventData); + } + break; + case GNE_NMODE_CREATE_EDGE: { + // make sure that Control key isn't pressed + if (!myKeyPressed.controlKeyPressed()) { + // process left click in create edge frame Frame + myViewParent->getCreateEdgeFrame()->processClick(getPositionInformation(), myObjectsUnderCursor, + myCreateEdgeOptions.autoOppositeEdge->getCheck() == TRUE, + myCreateEdgeOptions.chainEdges->getCheck() == TRUE); + } + // process click + processClick(eventData); + break; + } + case GNE_NMODE_MOVE: { + // allways swap lane to edges in movement mode + if (myObjectsUnderCursor.getLaneFront()) { + myObjectsUnderCursor.swapLane2Edge(); + } + // check that AC under cursor isn't a demand element + if (myObjectsUnderCursor.getAttributeCarrierFront() && !myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().isDemandElement()) { + // check if we're moving a set of selected items + if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { + // move selected ACs + myMoveMultipleElementValues.beginMoveSelection(myObjectsUnderCursor.getAttributeCarrierFront()); + // update view + update(); + } else if (!myMoveSingleElementValues.beginMoveSingleElementNetworkMode()) { + // process click if there isn't movable elements (to move camera using drag an drop) + processClick(eventData); } + } else { + // process click if there isn't movable elements (to move camera using drag an drop) + processClick(eventData); } - myViewNet->makeNonCurrent(); + break; } - } - return result; -} - - -void -GNEViewNet::SelectingArea::processShapeSelection(const PositionVector &shape) { - processBoundarySelection(shape.getBoxBoundary()); -} - - -void -GNEViewNet::SelectingArea::drawRectangleSelection(const RGBColor& color) const { - if (selectingUsingRectangle) { - glPushMatrix(); - glTranslated(0, 0, GLO_MAX - 1); - GLHelper::setColor(color); - glLineWidth(2); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - glBegin(GL_QUADS); - glVertex2d(selectionCorner1.x(), selectionCorner1.y()); - glVertex2d(selectionCorner1.x(), selectionCorner2.y()); - glVertex2d(selectionCorner2.x(), selectionCorner2.y()); - glVertex2d(selectionCorner2.x(), selectionCorner1.y()); - glEnd(); - glPopMatrix(); - } -} - - -void -GNEViewNet::SelectingArea::processBoundarySelection(const Boundary &boundary) { - if (myViewNet->makeCurrent()) { - std::set > ACsInBoundary = myViewNet->getAttributeCarriersInBoundary(boundary); - // declare two sets of attribute carriers, one for select and another for unselect - std::vector ACToSelect; - std::vector ACToUnselect; - // reserve memory (we assume that in the worst case we're going to insert all elements of ACsInBoundary - ACToSelect.reserve(ACsInBoundary.size()); - ACToUnselect.reserve(ACsInBoundary.size()); - // in restrict AND replace mode all current selected attribute carriers will be unselected - if ((myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode() == GNESelectorFrame::ModificationMode::SET_RESTRICT) || - (myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode() == GNESelectorFrame::ModificationMode::SET_REPLACE)) { - for (auto i : myViewNet->myNet->getSelectedAttributeCarriers()) { - ACToUnselect.push_back(i); - } - } - // iterate over AtributeCarriers obtained of boundary an place it in ACToSelect or ACToUnselect - for (auto i : ACsInBoundary) { - switch (myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode()) { - case GNESelectorFrame::ModificationMode::SET_SUB: - ACToUnselect.push_back(i.second); - break; - case GNESelectorFrame::ModificationMode::SET_RESTRICT: - if (std::find(ACToUnselect.begin(), ACToUnselect.end(), i.second) != ACToUnselect.end()) { - ACToSelect.push_back(i.second); - } - break; - default: - ACToSelect.push_back(i.second); - break; + case GNE_NMODE_CONNECT: { + if (myObjectsUnderCursor.getLaneFront()) { + // Handle laneclick (shift key may pass connections, Control key allow conflicts) + myViewParent->getConnectorFrame()->handleLaneClick(myObjectsUnderCursor); + update(); } + // process click + processClick(eventData); + break; } - // select junctions and their connections and crossings if Auto select junctions is enabled (note: only for "add mode") - if (myViewNet->autoSelectNodes() && GNESelectorFrame::ModificationMode::SET_ADD) { - std::vector edgesToSelect; - // iterate over ACToSelect and extract edges - for (auto i : ACToSelect) { - if (i->getTagProperty().getTag() == SUMO_TAG_EDGE) { - edgesToSelect.push_back(dynamic_cast(i)); - } + case GNE_NMODE_TLS: { + if (myObjectsUnderCursor.getJunctionFront()) { + myViewParent->getTLSEditorFrame()->editJunction(myObjectsUnderCursor.getJunctionFront()); + update(); } - // iterate over extracted edges - for (auto i : edgesToSelect) { - // select junction source and all their connections and crossings - ACToSelect.push_back(i->getGNEJunctionSource()); - for (auto j : i->getGNEJunctionSource()->getGNEConnections()) { - ACToSelect.push_back(j); - } - for (auto j : i->getGNEJunctionSource()->getGNECrossings()) { - ACToSelect.push_back(j); + // process click + processClick(eventData); + break; + } + case GNE_NMODE_ADDITIONAL: { + // avoid create additionals if control key is pressed + if (!myKeyPressed.controlKeyPressed()) { + if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isShown()) { + // check if we need to start select lanes + if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isSelectingLanes()) { + // select getLaneFront() to create an additional with consecutive lanes + myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->addSelectedLane(myObjectsUnderCursor.getLaneFront(), snapToActiveGrid(getPositionInformation())); + } else if (myObjectsUnderCursor.getLaneFront()) { + myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->startConsecutiveLaneSelector(myObjectsUnderCursor.getLaneFront(), snapToActiveGrid(getPositionInformation())); + } + } else if (myViewParent->getAdditionalFrame()->addAdditional(myObjectsUnderCursor)) { + // update view to show the new additional + update(); } - // select junction destiny and all their connections crossings - ACToSelect.push_back(i->getGNEJunctionDestiny()); - for (auto j : i->getGNEJunctionDestiny()->getGNEConnections()) { - ACToSelect.push_back(j); + } + // process click + processClick(eventData); + break; + } + case GNE_NMODE_CROSSING: { + // swap lanes to edges in crossingsMode + if (myObjectsUnderCursor.getLaneFront()) { + myObjectsUnderCursor.swapLane2Edge(); + } + // call function addCrossing from crossing frame + myViewParent->getCrossingFrame()->addCrossing(myObjectsUnderCursor); + // process click + processClick(eventData); + break; + } + case GNE_NMODE_TAZ: { + // avoid create TAZs if control key is pressed + if (!myKeyPressed.controlKeyPressed()) { + // swap laness to edges in TAZ Mode + if (myObjectsUnderCursor.getLaneFront()) { + myObjectsUnderCursor.swapLane2Edge(); } - for (auto j : i->getGNEJunctionDestiny()->getGNECrossings()) { - ACToSelect.push_back(j); + // check if we want to create a rect for selecting edges + if (myKeyPressed.shiftKeyPressed() && (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() != nullptr)) { + // begin rectangle selection + mySelectingArea.beginRectangleSelection(); + } else { + // check if process click was scuesfully + if (myViewParent->getTAZFrame()->processClick(snapToActiveGrid(getPositionInformation()), myObjectsUnderCursor)) { + // view net must be always update + update(); + } + // process click + processClick(eventData); } + } else { + // process click + processClick(eventData); } + break; } - // only continue if there is ACs to select or unselect - if ((ACToSelect.size() + ACToUnselect.size()) > 0) { - // first unselect AC of ACToUnselect and then selects AC of ACToSelect - myViewNet->myUndoList->p_begin("selection using rectangle"); - for (auto i : ACToUnselect) { - i->setAttribute(GNE_ATTR_SELECTED, "0", myViewNet->myUndoList); - } - for (auto i : ACToSelect) { - if (i->getTagProperty().isSelectable()) { - i->setAttribute(GNE_ATTR_SELECTED, "1", myViewNet->myUndoList); + case GNE_NMODE_POLYGON: { + // avoid create shapes if control key is pressed + if (!myKeyPressed.controlKeyPressed()) { + if (!myObjectsUnderCursor.getPOIFront()) { + GNEPolygonFrame::AddShapeResult result = myViewParent->getPolygonFrame()->processClick(snapToActiveGrid(getPositionInformation()), myObjectsUnderCursor); + // view net must be always update + update(); + // process click depending of the result of "process click" + if ((result != GNEPolygonFrame::ADDSHAPE_UPDATEDTEMPORALSHAPE)) { + // process click + processClick(eventData); + } } + } else { + // process click + processClick(eventData); } - myViewNet->myUndoList->p_end(); + break; } - myViewNet->makeNonCurrent(); - } -} - -// --------------------------------------------------------------------------- -// GNEViewNet::TestingMode - methods -// --------------------------------------------------------------------------- - -GNEViewNet::TestingMode::TestingMode(GNEViewNet* viewNet) : - myViewNet(viewNet), - myTestingEnabled(OptionsCont::getOptions().getBool("gui-testing")), - myTestingWidth(0), - myTestingHeight(0) { -} - - -void -GNEViewNet::TestingMode::initTestingMode() { - // first check if testing mode is enabled and window size is correct - if (myTestingEnabled && OptionsCont::getOptions().isSet("window-size")) { - std::vector windowSize = OptionsCont::getOptions().getStringVector("window-size"); - // make sure that given windows size has exactly two valid int values - if ((windowSize.size() == 2) && GNEAttributeCarrier::canParse(windowSize[0]) && GNEAttributeCarrier::canParse(windowSize[1])) { - myTestingWidth = GNEAttributeCarrier::parse(windowSize[0]); - myTestingHeight = GNEAttributeCarrier::parse(windowSize[1]); - } else { - WRITE_ERROR("Invalid windows size-format: " + toString(windowSize) + "for option 'window-size'"); + case GNE_NMODE_PROHIBITION: { + if (myObjectsUnderCursor.getConnectionFront()) { + // shift key may pass connections, Control key allow conflicts. + myViewParent->getProhibitionFrame()->handleProhibitionClick(myObjectsUnderCursor); + update(); + } + // process click + processClick(eventData); + break; + } + default: { + // process click + processClick(eventData); } } } void -GNEViewNet::TestingMode::drawTestingElements(GUIMainWindow* mainWindow) { - // first check if testing mode is neabled - if (myTestingEnabled) { - // check if main windows has to be resized - if (myTestingWidth > 0 && ((myViewNet->getWidth() != myTestingWidth) || (myViewNet->getHeight() != myTestingHeight))) { - // only resize once to avoid flickering - //std::cout << " before resize: view=" << getWidth() << ", " << getHeight() << " app=" << mainWindow->getWidth() << ", " << mainWindow->getHeight() << "\n"; - mainWindow->resize(myTestingWidth + myTestingWidth - myViewNet->getWidth(), myTestingHeight + myTestingHeight - myViewNet->getHeight()); - //std::cout << " directly after resize: view=" << getWidth() << ", " << getHeight() << " app=" << mainWindow->getWidth() << ", " << mainWindow->getHeight() << "\n"; - myTestingWidth = 0; +GNEViewNet::processLeftButtonReleaseNetwork() { + // check moved items + if (myMoveMultipleElementValues.isMovingSelection()) { + myMoveMultipleElementValues.finishMoveSelection(); + } else if (mySelectingArea.selectingUsingRectangle) { + // check if we're creating a rectangle selection or we want only to select a lane + if (mySelectingArea.startDrawing) { + // check if we're selecting all type of elements o we only want a set of edges for TAZ + if (myEditModes.networkEditMode == GNE_NMODE_SELECT) { + mySelectingArea.processRectangleSelection(); + } else if (myEditModes.networkEditMode == GNE_NMODE_TAZ) { + // process edge selection + myViewParent->getTAZFrame()->processEdgeSelection(mySelectingArea.processEdgeRectangleSelection()); + } + } else if (myKeyPressed.shiftKeyPressed()) { + // obtain objects under cursor + if (makeCurrent()) { + // update objects under cursor again + myObjectsUnderCursor.updateObjectUnderCursor(getGUIGlObjectsUnderCursor(), myEditShapePoly); + makeNonCurrent(); + } + // check if there is a lane in objects under cursor + if (myObjectsUnderCursor.getLaneFront()) { + // if we clicked over an lane with shift key pressed, select or unselect it + if (myObjectsUnderCursor.getLaneFront()->isAttributeCarrierSelected()) { + myObjectsUnderCursor.getLaneFront()->unselectAttributeCarrier(); + } else { + myObjectsUnderCursor.getLaneFront()->selectAttributeCarrier(); + } + } } - //std::cout << " fixed: view=" << getWidth() << ", " << getHeight() << " app=" << mainWindow->getWidth() << ", " << mainWindow->getHeight() << "\n"; - // draw pink square in the upper left corner on top of everything - glPushMatrix(); - const double size = myViewNet->p2m(32); - Position center = myViewNet->screenPos2NetPos(8, 8); - GLHelper::setColor(RGBColor::MAGENTA); - glTranslated(center.x(), center.y(), GLO_MAX - 1); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glBegin(GL_QUADS); - glVertex2d(0, 0); - glVertex2d(0, -size); - glVertex2d(size, -size); - glVertex2d(size, 0); - glEnd(); - glPopMatrix(); - glPushMatrix(); - // show box with the current position relative to pink square - Position posRelative = myViewNet->screenPos2NetPos(myViewNet->getWidth() - 40, myViewNet->getHeight() - 20); - // adjust cursor position (24,25) to show exactly the same position as in function netedit.leftClick(match, X, Y) - GLHelper::drawTextBox(toString(myViewNet->myWindowCursorPositionX - 24) + " " + toString(myViewNet->myWindowCursorPositionY - 25), posRelative, GLO_MAX - 1, myViewNet->p2m(20), RGBColor::BLACK, RGBColor::WHITE); - glPopMatrix(); + // finish selection + mySelectingArea.finishRectangleSelection(); + } else { + // finish moving of single elements + myMoveSingleElementValues.finishMoveSingleElement(); } } -// --------------------------------------------------------------------------- -// GNEViewNet::CreateEdgeOptions - methods -// --------------------------------------------------------------------------- - -GNEViewNet::CreateEdgeOptions::CreateEdgeOptions(GNEViewNet* viewNet) : - createEdgeSource(nullptr), - myViewNet(viewNet) { -} - void -GNEViewNet::CreateEdgeOptions::buildCreateEdgeOptionMenuChecks() { - chainCreateEdge = new FXMenuCheck(myViewNet->myToolbar, ("Chain\t\tCreate consecutive " + toString(SUMO_TAG_EDGE) + "s with a single click (hit ESC to cancel chain).").c_str(), myViewNet, 0); - chainCreateEdge->setCheck(false); - - autoCreateOppositeEdge = new FXMenuCheck(myViewNet->myToolbar, ("Two-way\t\tAutomatically create an " + toString(SUMO_TAG_EDGE) + " in the opposite direction").c_str(), myViewNet, 0); - autoCreateOppositeEdge->setCheck(false); - - menuCheckWarnAboutMerge = new FXMenuCheck(myViewNet->myToolbar, ("Ask for merge\t\tAsk for confirmation before merging " + toString(SUMO_TAG_JUNCTION) + ".").c_str(), myViewNet, 0); - menuCheckWarnAboutMerge->setCheck(true); - - menuCheckShowBubbleOverJunction = new FXMenuCheck(myViewNet->myToolbar, ("Bubbles\t\tShow bubbles over " + toString(SUMO_TAG_JUNCTION) + "'s shapes.").c_str(), myViewNet, MID_GNE_VIEWNET_SHOW_BUBBLES); - menuCheckShowBubbleOverJunction->setCheck(false); - - menuCheckMoveElevation = new FXMenuCheck(myViewNet->myToolbar, "Elevation\t\tApply mouse movement to elevation instead of x,y position", myViewNet, MID_GNE_VIEWNET_MOVE_ELEVATION); - menuCheckMoveElevation->setCheck(false); -} - - -void -GNEViewNet::CreateEdgeOptions::hideCreateEdgeOptionMenuChecks() { - chainCreateEdge->hide(); - autoCreateOppositeEdge->hide(); - menuCheckWarnAboutMerge->hide(); - menuCheckShowBubbleOverJunction->hide(); - menuCheckMoveElevation->hide(); -} - -// --------------------------------------------------------------------------- -// GNEViewNet::ViewOptions - methods -// --------------------------------------------------------------------------- - -GNEViewNet::ViewOptions::ViewOptions(GNEViewNet* viewNet) : - myViewNet(viewNet) { -} - - -void -GNEViewNet::ViewOptions::buildViewOptionsMenuChecks() { - menuCheckSelectEdges = new FXMenuCheck(myViewNet->myToolbar, ("Select edges\t\tToggle whether clicking should select " + toString(SUMO_TAG_EDGE) + "s or " + toString(SUMO_TAG_LANE) + "s").c_str(), myViewNet, MID_GNE_VIEWNET_SELECT_EDGES); - menuCheckSelectEdges->setCheck(true); - - menuCheckShowConnections = new FXMenuCheck(myViewNet->myToolbar, ("Show " + toString(SUMO_TAG_CONNECTION) + "s\t\tToggle show " + toString(SUMO_TAG_CONNECTION) + "s over " + toString(SUMO_TAG_JUNCTION) + "s").c_str(), myViewNet, MID_GNE_VIEWNET_SHOW_CONNECTIONS); - menuCheckShowConnections->setCheck(myViewNet->myVisualizationSettings->showLane2Lane); - - menuCheckHideConnections = new FXMenuCheck(myViewNet->myToolbar, "Hide connections\t\tHide connections", myViewNet, 0); - menuCheckHideConnections->setCheck(false); - - menuCheckExtendSelection = new FXMenuCheck(myViewNet->myToolbar, ("Auto-select " + toString(SUMO_TAG_JUNCTION) + "s\t\tToggle whether selecting multiple " + toString(SUMO_TAG_EDGE) + "s should automatically select their " + toString(SUMO_TAG_JUNCTION) + "s").c_str(), myViewNet, 0); - menuCheckExtendSelection->setCheck(false); - - menuCheckChangeAllPhases = new FXMenuCheck(myViewNet->myToolbar, ("Apply change to all phases\t\tToggle whether clicking should apply state changes to all phases of the current " + toString(SUMO_TAG_TRAFFIC_LIGHT) + " plan").c_str(), myViewNet, 0); - menuCheckChangeAllPhases->setCheck(false); - - menuCheckShowGrid = new FXMenuCheck(myViewNet->myToolbar, "Grid\t\tshow grid and restrict movement to the grid (size defined in visualization options)", myViewNet, MID_GNE_VIEWNET_SHOW_GRID); - menuCheckShowGrid->setCheck(false); -} - -void -GNEViewNet::ViewOptions::hideViewOptionsMenuChecks() { - menuCheckSelectEdges->hide(); - menuCheckShowConnections->hide(); - menuCheckHideConnections->hide(); - menuCheckExtendSelection->hide(); - menuCheckChangeAllPhases->hide(); - menuCheckShowGrid->hide(); -} - -bool -GNEViewNet::ViewOptions::selectEdges() const { - if(menuCheckSelectEdges->shown()) { - return (menuCheckSelectEdges->getCheck() == TRUE); +GNEViewNet::processMoveMouseNetwork() { + // change "delete last created point" depending if during movement shift key is pressed + if ((myEditModes.networkEditMode == GNE_NMODE_POLYGON) && myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { + myViewParent->getPolygonFrame()->getDrawingShapeModul()->setDeleteLastCreatedPoint(myKeyPressed.shiftKeyPressed()); + } + // check what type of additional is moved + if (myMoveMultipleElementValues.isMovingSelection()) { + // move entire selection + myMoveMultipleElementValues.moveSelection(); + } else if (mySelectingArea.selectingUsingRectangle) { + // update selection corner of selecting area + mySelectingArea.moveRectangleSelection(); } else { - // by default, if menuCheckSelectEdges isn't shown, always select edges - return true; + // move single elements + myMoveSingleElementValues.moveSingleElement(); } } -bool -GNEViewNet::ViewOptions::showConnections() const { - return (menuCheckShowConnections->getCheck() == TRUE); -} - -// --------------------------------------------------------------------------- -// Private methods -// --------------------------------------------------------------------------- - -void -GNEViewNet::drawLaneCandidates() const { - if (myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->isSelectingLanes()) { - // draw first point - if(myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().size() > 0) { - // Push draw matrix - glPushMatrix(); - // obtain first clicked point - const Position &firstLanePoint = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().front().first->getShape().positionAtOffset( - myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().front().second); - // must draw on top of other connections - glTranslated(firstLanePoint.x(), firstLanePoint.y(), GLO_JUNCTION + 0.3); - GLHelper::setColor(RGBColor::RED); - // draw first point - GLHelper::drawFilledCircle((double) 1.3, 8); - GLHelper::drawText("S", Position(), .1, 1.3, RGBColor::CYAN); - // pop draw matrix - glPopMatrix(); +void +GNEViewNet::processLeftButtonPressDemand(void* eventData) { + // decide what to do based on mode + switch (myEditModes.demandEditMode) { + case GNE_DMODE_INSPECT: { + // process left click in Inspector Frame + myViewParent->getInspectorFrame()->processDemandSupermodeClick(getPositionInformation(), myObjectsUnderCursor); + // process click + processClick(eventData); + break; } - // draw connections between lanes - if(myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().size() > 1) { - // iterate over all current selected lanes - for (int i = 0; i < (int)myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().size() - 1; i++) { - // declare position vector for shape - PositionVector shape; - // declare vectors for shape rotation and lenghts - std::vector shapeRotations, shapeLengths; - // obtain GNELanes - GNELane* from = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().at(i).first; - GNELane* to = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().at(i+1).first; - // Push draw matrix - glPushMatrix(); - // must draw on top of other connections - glTranslated(0, 0, GLO_JUNCTION + 0.2); - // obtain connection shape - shape = from->getParentEdge().getNBEdge()->getConnection(from->getIndex(), to->getParentEdge().getNBEdge(), to->getIndex()).shape; - // set special color - GLHelper::setColor(myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLaneColor()); - // Obtain lengths and shape rotations - int segments = (int) shape.size() - 1; - if (segments >= 0) { - shapeRotations.reserve(segments); - shapeLengths.reserve(segments); - for (int j = 0; j < segments; j++) { - const Position& f = shape[j]; - const Position& s = shape[j + 1]; - shapeLengths.push_back(f.distanceTo2D(s)); - shapeRotations.push_back((double) atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); + case GNE_DMODE_DELETE: { + // check that we have clicked over an demand element + if (myObjectsUnderCursor.getAttributeCarrierFront() && myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().isDemandElement()) { + // check if we are deleting a selection or an single attribute carrier + if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { + myViewParent->getDeleteFrame()->removeSelectedAttributeCarriers(); + } else { + myViewParent->getDeleteFrame()->removeAttributeCarrier(myObjectsUnderCursor); + } + } else { + // process click + processClick(eventData); + } + break; + } + case GNE_DMODE_SELECT: + // check if a rect for selecting is being created + if (myKeyPressed.shiftKeyPressed()) { + // begin rectangle selection + mySelectingArea.beginRectangleSelection(); + } else { + // check if a rect for selecting is being created + if (myKeyPressed.shiftKeyPressed()) { + // begin rectangle selection + mySelectingArea.beginRectangleSelection(); + } else { + // first check that under cursor there is an attribute carrier, is demand element and is selectable + if (myObjectsUnderCursor.getAttributeCarrierFront() && myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().isDemandElement()) { + // Check if this GLobject type is locked + if (!myViewParent->getSelectorFrame()->getLockGLObjectTypes()->IsObjectTypeLocked(myObjectsUnderCursor.getGlTypeFront())) { + // toogle netElement selection + if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { + myObjectsUnderCursor.getAttributeCarrierFront()->unselectAttributeCarrier(); + } else { + myObjectsUnderCursor.getAttributeCarrierFront()->selectAttributeCarrier(); + } + } } + // process click + processClick(eventData); } - // draw a list of lines - GLHelper::drawBoxLines(shape, shapeRotations, shapeLengths, 0.2); - // pop draw matrix - glPopMatrix(); } - // draw last point - glPushMatrix(); - // obtain last clicked point - const Position &lastLanePoint = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().back().first->getShape().positionAtOffset( - myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().back().second); - // must draw on top of other connections - glTranslated(lastLanePoint.x(), lastLanePoint.y(), GLO_JUNCTION + 0.3); - GLHelper::setColor(RGBColor::RED); - // draw last point - GLHelper::drawFilledCircle((double) 1.3, 8); - GLHelper::drawText("E", Position(), .1, 1.3, RGBColor::CYAN); - // pop draw matrix - glPopMatrix(); + break; + case GNE_DMODE_MOVE: { + // check that AC under cursor is a demand element + if (myObjectsUnderCursor.getAttributeCarrierFront() && + myObjectsUnderCursor.getAttributeCarrierFront()->getTagProperty().isDemandElement()) { + // check if we're moving a set of selected items + if (myObjectsUnderCursor.getAttributeCarrierFront()->isAttributeCarrierSelected()) { + // move selected ACs + myMoveMultipleElementValues.beginMoveSelection(myObjectsUnderCursor.getAttributeCarrierFront()); + // update view + update(); + } else if (!myMoveSingleElementValues.beginMoveSingleElementDemandMode()) { + // process click if there isn't movable elements (to move camera using drag an drop) + processClick(eventData); + } + } else { + // process click if there isn't movable elements (to move camera using drag an drop) + processClick(eventData); + } + break; + } + case GNE_DMODE_ROUTES: { + // check if we clicked over a lane + if (myObjectsUnderCursor.getLaneFront()) { + // Handle edge click + myViewParent->getRouteFrame()->handleEdgeClick(&myObjectsUnderCursor.getLaneFront()->getParentEdge()); + } + // process click + processClick(eventData); + break; + } + case GNE_DMODE_VEHICLES: { + // Handle click + myViewParent->getVehicleFrame()->addVehicle(myObjectsUnderCursor); + // process click + processClick(eventData); + break; + } + case GNE_DMODE_STOP: { + // Handle click + myViewParent->getStopFrame()->addStop(myObjectsUnderCursor, myKeyPressed.shiftKeyPressed()); + // process click + processClick(eventData); + break; + } + default: { + // process click + processClick(eventData); } - } } -void -GNEViewNet::drawTemporalDrawShape() const { - PositionVector temporalShape; - bool deleteLastCreatedPoint = false; - // obtain temporal shape and delete last created point flag - if(myViewParent->getPolygonFrame()->getDrawingShapeModul()->isDrawing()) { - temporalShape = myViewParent->getPolygonFrame()->getDrawingShapeModul()->getTemporalShape(); - deleteLastCreatedPoint = myViewParent->getPolygonFrame()->getDrawingShapeModul()->getDeleteLastCreatedPoint(); - } else if(myViewParent->getTAZFrame()->getDrawingShapeModul()->isDrawing()) { - temporalShape = myViewParent->getTAZFrame()->getDrawingShapeModul()->getTemporalShape(); - deleteLastCreatedPoint = myViewParent->getTAZFrame()->getDrawingShapeModul()->getDeleteLastCreatedPoint(); - } - // check if we're in drawing mode - if(temporalShape.size() > 0) { - // draw blue line with the current drawed shape - glPushMatrix(); - glLineWidth(2); - GLHelper::setColor(RGBColor::BLUE); - GLHelper::drawLine(temporalShape); - glPopMatrix(); - // draw red line from the last point of shape to the current mouse position - glPushMatrix(); - glLineWidth(2); - // draw last line depending if shift key (delete last created point) is pressed - if (deleteLastCreatedPoint) { - GLHelper::setColor(RGBColor::RED); - } else { - GLHelper::setColor(RGBColor::GREEN); +void +GNEViewNet::processLeftButtonReleaseDemand() { + // check moved items + if (myMoveMultipleElementValues.isMovingSelection()) { + myMoveMultipleElementValues.finishMoveSelection(); + } else if (mySelectingArea.selectingUsingRectangle) { + // check if we're creating a rectangle selection or we want only to select a lane + if (mySelectingArea.startDrawing) { + mySelectingArea.processRectangleSelection(); } - GLHelper::drawLine(temporalShape.back(), snapToActiveGrid(getPositionInformation())); - glPopMatrix(); + // finish selection + mySelectingArea.finishRectangleSelection(); + } else { + // finish moving of single elements + myMoveSingleElementValues.finishMoveSingleElement(); + } +} + + +void +GNEViewNet::processMoveMouseDemand() { + if (mySelectingArea.selectingUsingRectangle) { + // update selection corner of selecting area + mySelectingArea.moveRectangleSelection(); + } else { + // move single elements + myMoveSingleElementValues.moveSingleElement(); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEViewNet.h sumo-1.2.0+dfsg1/src/netedit/GNEViewNet.h --- sumo-1.1.0+dfsg1/src/netedit/GNEViewNet.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEViewNet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,7 +21,7 @@ // =========================================================================== // included modules // =========================================================================== -#include +#include "GNEViewNetHelper.h" #include #include @@ -32,63 +32,6 @@ #include #include #include -#include - - -// =========================================================================== -// enum -// =========================================================================== - -enum EditMode { - ///@brief placeholder mode - GNE_MODE_DUMMY, - ///@brief mode for creating new edges - GNE_MODE_CREATE_EDGE, - ///@brief mode for moving things - GNE_MODE_MOVE, - ///@brief mode for deleting things - GNE_MODE_DELETE, - ///@brief mode for inspecting object attributes - GNE_MODE_INSPECT, - ///@brief mode for selecting objects - GNE_MODE_SELECT, - ///@brief mode for connecting lanes - GNE_MODE_CONNECT, - ///@brief mode for editing tls - GNE_MODE_TLS, - ///@brief Mode for editing additionals - GNE_MODE_ADDITIONAL, - ///@brief Mode for editing crossing - GNE_MODE_CROSSING, - ///@brief Mode for editing TAZ - GNE_MODE_TAZ, - ///@brief Mode for editing Polygons - GNE_MODE_POLYGON, - ///@brief Mode for editing connection prohibits - GNE_MODE_PROHIBITION -}; - -// =========================================================================== -// class declarations -// =========================================================================== - -class GNENet; -class GNENetElement; -class GNEJunction; -class GNEEdge; -class GNELane; -class GNEConnection; -class GNEViewParent; -class GNEUndoList; -class GNEAdditional; -class GNEShape; -class GNEPoly; -class GNEPOI; -class GNEFrame; -class GNECrossing; -class GNEAttributeCarrier; -class GNETAZ; -class GNEInternalLane; // =========================================================================== // class definitions @@ -101,137 +44,10 @@ /// @brief FOX-declaration FXDECLARE(GNEViewNet) -public: - /// @brief class used to group all variables related with objects under cursor after a click over view - class ObjectsUnderCursor { - public: - /// @brief constructor - ObjectsUnderCursor(); - - /// @brief update objects under cursor (Called only in onLeftBtnPress(...) function) - void updateObjectUnderCursor(const std::vector &GUIGlObjects, GNEPoly* editedPolyShape); - - /// @brief swap lane to edge - void swapLane2Edge(); - - /// @brief set created junction - void setCreatedJunction(GNEJunction* junction); - - /// @brief get front GUI GL ID (or a pointer to nullptr if there isn't) - GUIGlID getGlIDFront() const; - - /// @brief get front GUI GL object type (or a pointer to nullptr if there isn't) - GUIGlObjectType getGlTypeFront() const; - - /// @brief get front attribute carrier (or a pointer to nullptr if there isn't) - GNEAttributeCarrier* getAttributeCarrierFront() const; - - /// @brief get front net element (or a pointer to nullptr if there isn't) - GNENetElement* getNetElementFront() const; - - /// @brief get front additional element (or a pointer to nullptr if there isn't) - GNEAdditional* getAdditionalFront() const; - - /// @brief get front shape element (or a pointer to nullptr if there isn't) - GNEShape* getShapeFront() const; - - /// @brief get front junction (or a pointer to nullptr if there isn't) - GNEJunction* getJunctionFront() const; - - /// @brief get front edge (or a pointer to nullptr if there isn't) - GNEEdge* getEdgeFront() const; - - /// @brief get front lane (or a pointer to nullptr if there isn't) - GNELane* getLaneFront() const; - - /// @brief get front crossing (or a pointer to nullptr if there isn't) - GNECrossing* getCrossingFront() const; - - /// @brief get front connection (or a pointer to nullptr if there isn't) - GNEConnection* getConnectionFront() const; - - /// @brief get front TAZ (or a pointer to nullptr if there isn't) - GNETAZ* getTAZFront() const; - - /// @brief get front POI (or a pointer to nullptr if there isn't) - GNEPOI* getPOIFront() const; - - /// @brief get front Poly (or a pointer to nullptr if there isn't) - GNEPoly* getPolyFront() const; - - /// @brief get vector with clicked ACs - const std::vector &getClickedAttributeCarriers() const; - - private: - /// @brief vector with the clicked GUIGlObjects - std::vector myGUIGlObjects; - - /// @brief vector with the clicked attribute carriers - std::vector myAttributeCarriers; - - /// @brief vector with the clicked net elements - std::vector myNetElements; - - /// @brief vector with the clicked additional elements - std::vector myAdditionals; - - /// @brief vector with the clicked shape elements (Poly and POIs) - std::vector myShapes; - - /// @brief vector with the clicked junctions - std::vector myJunctions; - - /// @brief vector with the clicked edges - std::vector myEdges; - - /// @brief vector with the clicked lanes - std::vector myLanes; - - /// @brief vector with the clicked crossings - std::vector myCrossings; - - /// @brief vector with the clicked connections - std::vector myConnections; - - /// @brief vector with the clicked TAZ elements (needed because uses a shape instead a position) - std::vector myTAZs; - - /// @brief vector with the clicked POIs - std::vector myPOIs; - - /// @brief vector with the clicked Polys - std::vector myPolys; - - /// @brief invert GUIGlObjects - void sortGUIGlObjectsByAltitude(const std::vector &GUIGlObjects); - - /// @brief Invalidated copy constructor. - ObjectsUnderCursor(const ObjectsUnderCursor&) = delete; - - /// @brief Invalidated assignment operator. - ObjectsUnderCursor& operator=(const ObjectsUnderCursor&) = delete; - }; - - /// @brief class used to group all variables related with key pressed after certain events - struct KeyPressed { - - /// @brief constructor - KeyPressed(); - - /// @brief update status of KeyPressed - void update(void *eventData); - - /// @brief check if SHIFT key was pressed during click - bool shiftKeyPressed() const; - - /// @brief check if CONTROL key was pressed during click - bool controlKeyPressed() const; - - private: - /// @brief information of event - FXEvent* myEventInfo; - }; + /// @brief declare GNEViewNetHelper as friend struct + friend struct GNEViewNetHelper; +public: /* @brief constructor * @param[in] tmpParent temporal FXFrame parent so that we can add items to view area in the desired order * @param[in] actualParent FXFrame parent of GNEViewNet @@ -241,20 +57,22 @@ * @param[in] undoList pointer to UndoList modul * @param[in] glVis a reference to GLVisuals * @param[in] share a reference to FXCanvas - * @param[in] toolbar A reference to the parents toolbar */ GNEViewNet(FXComposite* tmpParent, FXComposite* actualParent, GUIMainWindow& app, GNEViewParent* viewParent, GNENet* net, GNEUndoList* undoList, - FXGLVisual* glVis, FXGLCanvas* share, FXToolBar* toolBar); + FXGLVisual* glVis, FXGLCanvas* share); /// @brief destructor ~GNEViewNet(); /// @brief builds the view toolbars - virtual void buildViewToolBars(GUIGlChildWindow&); + void buildViewToolBars(GUIGlChildWindow&); + + /// @brief Mark the entire GNEViewNet to be repainted later + void update() const; /// @brief get AttributeCarriers in Boundary - std::set > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges = false); + std::set > getAttributeCarriersInBoundary(const Boundary& boundary, bool forceSelectEdges = false); /** @brief Builds an entry which allows to (de)select the object * @param ret The popup menu to add the entry to @@ -271,6 +89,21 @@ //@brief open object dialog void openObjectDialog(); + /// @brief get edit modes + const GNEViewNetHelper::EditModes& getEditModes() const; + + /// @brief get move options + const GNEViewNetHelper::MoveOptions& getMoveOptions() const; + + /// @brief get view options + const GNEViewNetHelper::ViewOptions& getViewOptions() const; + + // @brief get Create Edge Options + const GNEViewNetHelper::CreateEdgeOptions& getCreateEdgeOptions() const; + + /// @brief get Key Pressed modul + const GNEViewNetHelper::KeyPressed& getKeyPressed() const; + /// @name overloaded handlers /// @{ /// @brief called when user press mouse's left button @@ -295,43 +128,13 @@ long onKeyRelease(FXObject* o, FXSelector sel, void* data); /// @} - /// @name set mode call backs + /// @name set modes call backs /// @{ - /// @brief called when user press the button for create edge mode - long onCmdSetModeCreateEdge(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for move mode - long onCmdSetModeMove(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for delete mode - long onCmdSetModeDelete(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for inspect mode - long onCmdSetModeInspect(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for select mode - long onCmdSetModeSelect(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for connect mode - long onCmdSetModeConnect(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for traffic lights mode - long onCmdSetModeTLS(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for additional mode - long onCmdSetModeAdditional(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for crossing mode - long onCmdSetModeCrossing(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for TAZ mode - long onCmdSetModeTAZ(FXObject*, FXSelector, void*); + /// @brief called when user press a supermode button + long onCmdSetSupermode(FXObject*, FXSelector sel, void*); - /// @brief called when user press the button for polygon mode - long onCmdSetModePolygon(FXObject*, FXSelector, void*); - - /// @brief called when user press the button for polygon mode - long onCmdSetModeProhibition(FXObject*, FXSelector, void*); + /// @brief called when user press a mode button (Network or demand) + long onCmdSetMode(FXObject*, FXSelector sel, void*); /// @} @@ -389,41 +192,8 @@ /// @brief reset custom shapes of selected lanes long onCmdResetLaneCustomShape(FXObject*, FXSelector, void*); - /// @brief restrict lane to pedestrians - long onCmdRestrictLaneSidewalk(FXObject*, FXSelector, void*); - - /// @brief restrict lane to bikes - long onCmdRestrictLaneBikelane(FXObject*, FXSelector, void*); - - /// @brief restrict lane to buslanes - long onCmdRestrictLaneBuslane(FXObject*, FXSelector, void*); - - /// @brief restrict lane to all vehicles - long onCmdRestrictLaneGreenVerge(FXObject*, FXSelector, void*); - - /// @brief Add restricted lane for pedestrians - long onCmdAddRestrictedLaneSidewalk(FXObject*, FXSelector, void*); - - /// @brief Add restricted lane for bikes - long onCmdAddRestrictedLaneBikelane(FXObject*, FXSelector, void*); - - /// @brief Add restricted lane for buses - long onCmdAddRestrictedLaneBuslane(FXObject*, FXSelector, void*); - - /// @brief Add restricted lane for all vehicles - long onCmdAddRestrictedLaneGreenVerge(FXObject*, FXSelector, void*); - - /// @brief remove restricted lane for pedestrians - long onCmdRemoveRestrictedLaneSidewalk(FXObject*, FXSelector, void*); - - /// @brief remove restricted lane for bikes - long onCmdRemoveRestrictedLaneBikelane(FXObject*, FXSelector, void*); - - /// @brief remove restricted lane for bus - long onCmdRemoveRestrictedLaneBuslane(FXObject*, FXSelector, void*); - - /// @brief remove restricted lane for all vehicles - long onCmdRemoveRestrictedLaneGreenVerge(FXObject*, FXSelector, void*); + /// @brief add/remove/restrict lane + long onCmdLaneOperation(FXObject*, FXSelector sel, void*); /// @brief open additional dialog long onCmdOpenAdditionalDialog(FXObject*, FXSelector, void*); @@ -440,6 +210,9 @@ /// @brief split junction into multiple junctions long onCmdSplitJunction(FXObject*, FXSelector, void*); + /// @brief split junction into multiple junctions and reconnect them + long onCmdSplitJunctionReconnect(FXObject*, FXSelector, void*); + /// @brief clear junction connections long onCmdClearConnections(FXObject*, FXSelector, void*); @@ -455,7 +228,10 @@ /// @brief toogle show connections long onCmdToogleShowConnection(FXObject*, FXSelector, void*); - /// @brief toogle selet edges + /// @brief toogle show demand elements + long onCmdShowDemandElements(FXObject*, FXSelector, void*); + + /// @brief toogle select edges long onCmdToogleSelectEdges(FXObject*, FXSelector, void*); /// @brief toogle show bubbles @@ -473,11 +249,6 @@ /// @brief toogle show grid long onCmdShowGrid(FXObject*, FXSelector, void*); - /**@brief sets edit mode (from hotkey) - * @param[in] selid An id MID_GNE_SETMODE_ as defined in GUIAppEnum - **/ - void setEditModeFromHotkey(FXushort selid); - /// @brief abort current edition operation void abortOperation(bool clearSelection = true); @@ -499,15 +270,6 @@ /// @brief get the undoList object GNEUndoList* getUndoList() const; - /// @brief get the current edit mode - EditMode getCurrentEditMode() const; - - /// @brief get Key Pressed modul - const KeyPressed &getKeyPressed() const; - - /// @brief get grid button - FXMenuCheck* getMenuCheckShowGrid() const; - /// @brief get AttributeCarrier under cursor const GNEAttributeCarrier* getDottedAC() const; @@ -520,15 +282,6 @@ /// @brief set staturBar text void setStatusBarText(const std::string& text); - /// @brief whether inspection, selection and inversion should apply to edges or to lanes - bool selectEdges() const; - - /// @brief return true if elevation is being edited - bool editingElevation() const; - - /// @brief show connections over junctions - bool showConnections(); - /// @brief whether to autoselect nodes or to lanes bool autoSelectNodes(); @@ -561,348 +314,86 @@ void doInit(); private: - /// @brief struct used to group all pointers to moved elements - struct MovedItems { - - /// @brief constructor - MovedItems(); - - /// @brief the Junction to be moved. - GNEJunction* junctionToMove; - - /// @brief the edge of which geometry is being moved - GNEEdge* edgeToMove; - - /// @brief the poly of which geometry is being moved - GNEPoly* polyToMove; - - /// @brief the poi which position is being moved - GNEPOI* poiToMove; - - /// @brief the additional element which position is being moved - GNEAdditional* additionalToMove; - - /// @brief the TAZ element which their Shape is being moved (it's the only additional with a shape instead a position) - GNETAZ* tazToMove; - }; - - /// @brief struct used to group all variables related with movement of single elements - struct MoveSingleElementValues { - - /// @brief constructor - MoveSingleElementValues(GNEViewNet* viewNet); - - /// @brief calculate offset movement - Position calculateOffsetMovement() const; - - /// calculate Poly movement values (Position, Index, etc.) - void calculatePolyValues(); - - /// calculate Edge movement values (Position, Index, etc.) - void calculateEdgeValues(); - - /// calculate TAZ movement values (Position, Index, etc.) - void calculateTAZValues(); - - /// @brief original shape of element before start moving (used by polygons, edges, etc., needed for commmit position changes) - PositionVector originalShapeBeforeMoving; - - /// @brief index moved - int movingIndexShape; - - /// @brief original position of geometry position (needed for commmit position changes) - Position originalPositionInView; - - /// @brief relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user doesn't click exactly over the center of element) - Position relativeClickedPosition; - - /// @brief bool to indicate that startPos are being moved - bool movingStartPos; - bool movingEndPos; - - private: - /// @brief pointer to viewNet - GNEViewNet* myViewNet; - }; - - /// @brief struct used to group all variables related with movement of groups of elements - struct MoveMultipleElementValues { - - /// @brief constructor - MoveMultipleElementValues(GNEViewNet* viewNet); - - /// @brief begin move selection - void beginMoveSelection(GNEAttributeCarrier* originAC); - - /// @brief move selection - void moveSelection(); - - /// @brief finish moving selection - void finishMoveSelection(); - - /// @brief check if currently there is element being moved - bool isMovingSelection() const; - - private: - /// @brief pointer to viewNet - GNEViewNet* myViewNet; - - /// @brief original clicked position when moveSelection is called (used for calculate offset during moveSelection()) - Position myClickedPosition; - - /// @brief flag to check if a selection is being moved - bool myMovingSelection; - - /// @brief container used for move junctions - std::map myMovedJunctionOriginPositions; - - /// @brief container used for move entire edges - std::map myMovedEdgesOriginShape; - - /// @brief container used for move GeometryPoints of edges - std::map myMovedEgdesGeometryPoints; - }; - - /// @brief struct used to group all variables related with selecting using a square or polygon - /// @note in the future the variables used for selecting throught a polygon will be placed here - struct SelectingArea { - - /// @brief default constructor - SelectingArea(GNEViewNet* viewNet); - - /// @brief begin rectangle selection - void beginRectangleSelection(); - - /// @brief move rectangle selection - void moveRectangleSelection(); - - /// @brief finish rectangle selection - void finishRectangleSelection(); - - /// @brief process rectangle Selection - void processRectangleSelection(); - - /// @brief process rectangle Selection (only limited to Edges) - std::vector processEdgeRectangleSelection(); - - /// @brief process shape selection - void processShapeSelection(const PositionVector &shape); - - /// @brief draw rectangle selection - void drawRectangleSelection(const RGBColor& color) const; - - /// @brief whether we have started rectangle-selection - bool selectingUsingRectangle; - - /// @brief whether we have started rectangle-selection - bool startDrawing; - - private: - /// @brief Process boundary Selection - void processBoundarySelection(const Boundary &boundary); - - /// @brief firstcorner of the rectangle-selection - Position selectionCorner1; - - /// @brief second corner of the rectangle-selection - Position selectionCorner2; - - /// @brief pointer to viewNet - GNEViewNet* myViewNet; - }; - - /// @brief struct used to group all variables related with testing - struct TestingMode { - - /// @brief default constructor - TestingMode(GNEViewNet* viewNet); - - /// @brief init testing mode - void initTestingMode(); - - /// @brief draw testing element - void drawTestingElements(GUIMainWindow* mainWindow); - - private: - /// @brief pointer to viewNet - GNEViewNet* myViewNet; - - /// @brief flag to enable or disable testing mode - bool myTestingEnabled; - - /// @brief Width of viewNet in testing mode - int myTestingWidth; - - /// @brief Height of viewNet in testing mode - int myTestingHeight; - }; - - /// @brief struct used to group all variables related to create edges - struct CreateEdgeOptions { - - /// @brief default constructor - CreateEdgeOptions(GNEViewNet* viewNet); - - /// @brief build menu checks - void buildCreateEdgeOptionMenuChecks(); - - /// @brief hide all MenuChecks - void hideCreateEdgeOptionMenuChecks(); - - /// @brief source junction for new edge 0 if no edge source is selected an existing (or newly created) junction otherwise - GNEJunction* createEdgeSource; - - /// @brief whether the endpoint for a created edge should be set as the new source - FXMenuCheck* chainCreateEdge; - - /// @brief create auto create opposite edge - FXMenuCheck* autoCreateOppositeEdge; - - /// @brief whether we should warn about merging junctions - FXMenuCheck* menuCheckWarnAboutMerge; - - /// @brief show connection as buuble in "Move" mode. - FXMenuCheck* menuCheckShowBubbleOverJunction; - - /// @brief apply movement to elevation - FXMenuCheck* menuCheckMoveElevation; - - private: - /// @brief pointer to viewNet - GNEViewNet* myViewNet; - }; - - /// @brief struct used to group all variables related to view options - struct ViewOptions { - - /// @brief default constructor - ViewOptions(GNEViewNet* viewNet); - - /// @brief build menu checks - void buildViewOptionsMenuChecks(); - - /// @brief hide all options menu checks - void hideViewOptionsMenuChecks(); - - /// @brief check if select edges checkbox is enabled - bool selectEdges() const; - - /// @brief check if select show connections checkbox is enabled - bool showConnections() const; - - /// @brief menu check to select only edges - FXMenuCheck* menuCheckSelectEdges; - - /// @brief menu check to show connections - FXMenuCheck* menuCheckShowConnections; + /// @name structs related with modes and testing mode + /// @{ - /// @brief menu check to hide connections in connect mode - FXMenuCheck* menuCheckHideConnections; + /// @brief variable used to save variables related with edit moves modes + GNEViewNetHelper::EditModes myEditModes; - /// @brief menu check to extend to edge nodes - FXMenuCheck* menuCheckExtendSelection; + /// @brief variable used to save variables related with testing mode + GNEViewNetHelper::TestingMode myTestingMode; + /// @} - /// @brief menu check to set change all phases - FXMenuCheck* menuCheckChangeAllPhases; + /// @name structs related with input (keyboard and mouse) + /// @{ - /// @brief show grid button - FXMenuCheck* menuCheckShowGrid; + /// @brief variable used to save key status after certain events + GNEViewNetHelper::KeyPressed myKeyPressed; - private: - /// @brief pointer to viewNet - GNEViewNet* myViewNet; - }; + /// @brief variable use to save all pointers to objects under cursor after a click + GNEViewNetHelper::ObjectsUnderCursor myObjectsUnderCursor; + /// @} - /// @brief view parent - GNEViewParent* myViewParent; + /// @name structs related with checkable buttons + /// @{ - /// @brief Pointer to current net. (We are not responsible for deletion) - GNENet* myNet; + /// @brief variable used to save checkable buttons for common supermodes + GNEViewNetHelper::CommonCheckableButtons myCommonCheckableButtons; - /// @brief the current edit mode - EditMode myEditMode; + /// @brief variable used to save checkable buttons for Supermode Network + GNEViewNetHelper::NetworkCheckableButtons myNetworkCheckableButtons; - /// @brief the current frame - GNEFrame* myCurrentFrame; + /// @brief variable used to save checkable buttons for Supermode Demand + GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons; + /// @} - /// @name structs + /// @name structs related with Common options /// @{ + /// @brief variable used to save variables related with selecting areas + GNEViewNetHelper::SelectingArea mySelectingArea; - /// @brief variable used to save key status after certain events - KeyPressed myKeyPressed; - - /// @brief variable use to save all pointers to objects under cursor after a click - ObjectsUnderCursor myObjectsUnderCursor; + /// @brief variable used to save variables related with view options + GNEViewNetHelper::ViewOptions myViewOptions; + /// @} + /// @name structs related with Network options + /// @{ /// @brief variable used to save all elements related to creation of Edges - CreateEdgeOptions myCreateEdgeOptions; + GNEViewNetHelper::CreateEdgeOptions myCreateEdgeOptions; - /// @brief variable use to save pointers to moved elements - MovedItems myMovedItems; + /// @brief variable used to save all elements related to moving elements + GNEViewNetHelper::MoveOptions myMoveOptions; /// @brief variable used to save variables related with movement of single elements - MoveSingleElementValues myMoveSingleElementValues; + GNEViewNetHelper::MoveSingleElementValues myMoveSingleElementValues; /// @brief variable used to save variables related with movement of multiple elements - MoveMultipleElementValues myMoveMultipleElementValues; - - /// @brief variable used to save variables related with selecting areas - SelectingArea mySelectingArea; - - /// @brief variable used to save variables related with testing mode - TestingMode myTestingMode; - - /// @brief variable used to save variables related with view options - ViewOptions myViewOptions; + GNEViewNetHelper::MoveMultipleElementValues myMoveMultipleElementValues; // @} - /// @brief a reference to the toolbar in myParent - FXToolBar* myToolbar; - - /// @name buttons for selecting the edit mode + /// @name structs related with Demand options /// @{ - /// @brief chekable button for edit mode create edge - MFXCheckableButton* myEditModeCreateEdge; - - /// @brief chekable button for edit mode move - MFXCheckableButton* myEditModeMove; - /// @brief chekable button for edit mode delete - MFXCheckableButton* myEditModeDelete; + /// @brief variable used to save variables related with vehicle options + GNEViewNetHelper::VehicleOptions myVehicleOptions; - /// @brief chekable button for edit mode inspect - MFXCheckableButton* myEditModeInspect; - - /// @brief chekable button for edit mode select - MFXCheckableButton* myEditModeSelect; - - /// @brief chekable button for edit mode connection - MFXCheckableButton* myEditModeConnection; - - /// @brief chekable button for edit mode traffic light - MFXCheckableButton* myEditModeTrafficLight; - - /// @brief chekable button for edit mode additional - MFXCheckableButton* myEditModeAdditional; - - /// @brief chekable button for edit mode crossing - MFXCheckableButton* myEditModeCrossing; - - /// @brief chekable button for edit mode TAZ - MFXCheckableButton* myEditModeTAZ; + /// @brief variable used to save variables related with vehicle type options + GNEViewNetHelper::VehicleTypeOptions myVehicleTypeOptions; + // @} - /// @brief chekable button for edit mode polygon - MFXCheckableButton* myEditModePolygon; + /// @brief view parent + GNEViewParent* myViewParent; - /// @brief checkable button for edit mode polygon - MFXCheckableButton* myEditModeProhibition; + /// @brief Pointer to current net. (We are not responsible for deletion) + GNENet* myNet; - /// @} + /// @brief the current frame + GNEFrame* myCurrentFrame; /// @brief a reference to the undolist maintained in the application GNEUndoList* myUndoList; - /**@brief current AttributeCarrier that is drawn using with a dotted contour + /**@brief current AttributeCarrier that is drawn using with a dotted contour * note: it's constant because is edited from constant functions (example: drawGL(...) const) */ const GNEAttributeCarrier* myDottedAC; @@ -913,17 +404,17 @@ GNEPoly* myEditShapePoly; /// @brief the previous edit mode before edit junction's shapes - EditMode myPreviousEditMode; + NetworkEditMode myPreviousNetworkEditMode; /// @} - /// @brief set edit mode - void setEditMode(EditMode mode); - - /// @brief adds controls for setting the edit mode + /// @brief create edit mode buttons and elements void buildEditModeControls(); - /// @brief updates mode specific controls - void updateModeSpecificControls(); + /// @brief updates Network mode specific controls + void updateNetworkModeSpecificControls(); + + /// @brief updates Demand mode specific controls + void updateDemandModeSpecificControls(); /// @brief delete all currently selected junctions void deleteSelectedJunctions(); @@ -937,6 +428,9 @@ /// @brief delete all currently selected additionals void deleteSelectedAdditionals(); + /// @brief delete all currently selected demand elements + void deleteSelectedDemandElements(); + /// @brief delete all currently selected crossings void deleteSelectedCrossings(); @@ -997,7 +491,28 @@ /// @brief draw temporal polygon shape in Polygon Mode void drawTemporalDrawShape() const; /// @} - + + /// @brief mouse process functions + /// @{ + + /// @brief process left button press function in Supermode Network + void processLeftButtonPressNetwork(void* eventData); + + /// @brief process left button release function in Supermode Network + void processLeftButtonReleaseNetwork(); + + /// @brief process move mouse function in Supermode Network + void processMoveMouseNetwork(); + + /// @brief process left button press function in Supermode Demand + void processLeftButtonPressDemand(void* eventData); + + /// @brief process left button release function in Supermode Demand + void processLeftButtonReleaseDemand(); + + /// @brief process move mouse function in Supermode Demand + void processMoveMouseDemand(); + /// @brief Invalidated copy constructor. GNEViewNet(const GNEViewNet&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEViewNetHelper.cpp sumo-1.2.0+dfsg1/src/netedit/GNEViewNetHelper.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEViewNetHelper.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEViewNetHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,1842 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEViewNetHelper.cpp +/// @author Jakob Erdmann +/// @author Pablo Alvarez Lopez +/// @date Feb 2019 +/// @version $Id$ +/// +// A file used to reduce the size of GNEViewNet.h grouping structs and classes +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#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 "GNEViewNetHelper.h" +#include "GNEViewNet.h" +#include "GNENet.h" +#include "GNEUndoList.h" +#include "GNEViewParent.h" +#include "GNEApplicationWindow.h" + +// =========================================================================== +// member method definitions +// =========================================================================== + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::ObjectsUnderCursor - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor() {} + + +void +GNEViewNetHelper::ObjectsUnderCursor::updateObjectUnderCursor(const std::vector& GUIGlObjects, GNEPoly* editedPolyShape) { + // first clear all containers + myAttributeCarriers.clear(); + myNetElements.clear(); + myAdditionals.clear(); + myShapes.clear(); + myDemandElements.clear(); + myJunctions.clear(); + myEdges.clear(); + myLanes.clear(); + myCrossings.clear(); + myConnections.clear(); + myTAZs.clear(); + myPOIs.clear(); + myPolys.clear(); + // set GUIGlObject + sortGUIGlObjectsByAltitude(GUIGlObjects); + // iterate over GUIGlObjects + for (const auto& i : myGUIGlObjects) { + // only continue if isn't GLO_NETELEMENT (0) + if (i->getType() != GLO_NETELEMENT) { + // cast attribute carrier from glObject + myAttributeCarriers.push_back(dynamic_cast(i)); + // only continue if attributeCarrier isn't nullptr; + if (myAttributeCarriers.back()) { + // If we're editing a shape, ignore rest of elements (including other polygons) + if (editedPolyShape != nullptr) { + if (myAttributeCarriers.back() == editedPolyShape) { + // cast Poly from attribute carrier + myPolys.push_back(dynamic_cast(myAttributeCarriers.back())); + } + } else { + // obtain tag property (only for improve code legibility) + const auto& tagValue = myAttributeCarriers.back()->getTagProperty(); + // check if attributeCarrier can be casted into netElement, additional or shape + if (tagValue.isNetElement()) { + // cast netElement from attribute carrier + myNetElements.push_back(dynamic_cast(myAttributeCarriers.back())); + } else if (tagValue.isDemandElement()) { + // cast demand element from attribute carrier + myDemandElements.push_back(dynamic_cast(myAttributeCarriers.back())); + } else if (tagValue.isAdditional()) { + // cast additional element from attribute carrier + myAdditionals.push_back(dynamic_cast(myAttributeCarriers.back())); + } else if (tagValue.isShape()) { + // cast shape element from attribute carrier + myShapes.push_back(dynamic_cast(myAttributeCarriers.back())); + } else if (tagValue.isTAZ()) { + // cast TAZ element from attribute carrier + myTAZs.push_back(dynamic_cast(myAttributeCarriers.back())); + } + // now set specify AC type + switch (i->getType()) { + case GLO_JUNCTION: + myJunctions.push_back(dynamic_cast(myAttributeCarriers.back())); + break; + case GLO_EDGE: { + // fisrt obtain Edge + GNEEdge* edge = dynamic_cast(myAttributeCarriers.back()); + // check if edge parent is already inserted in myEdges (for example, due clicking over Geometry Points) + if (std::find(myEdges.begin(), myEdges.end(), edge) == myEdges.end()) { + myEdges.push_back(edge); + } + break; + } + case GLO_LANE: { + myLanes.push_back(dynamic_cast(myAttributeCarriers.back())); + // check if edge's lane parent is already inserted in myEdges (for example, due clicking over Geometry Points) + if (std::find(myEdges.begin(), myEdges.end(), &myLanes.back()->getParentEdge()) == myEdges.end()) { + myEdges.push_back(&myLanes.back()->getParentEdge()); + } + break; + } + case GLO_CROSSING: + myCrossings.push_back(dynamic_cast(myAttributeCarriers.back())); + break; + case GLO_CONNECTION: + myConnections.push_back(dynamic_cast(myAttributeCarriers.back())); + break; + case GLO_POI: + myPOIs.push_back(dynamic_cast(myAttributeCarriers.back())); + break; + case GLO_POLYGON: + myPolys.push_back(dynamic_cast(myAttributeCarriers.back())); + break; + default: + break; + } + } + } else { + myAttributeCarriers.pop_back(); + } + } + } + // write information in debug mode + WRITE_DEBUG("ObjectsUnderCursor: GUIGlObjects: " + toString(GUIGlObjects.size()) + + ", AttributeCarriers: " + toString(myAttributeCarriers.size()) + + ", NetElements: " + toString(myNetElements.size()) + + ", Additionals: " + toString(myAdditionals.size()) + + ", DemandElements: " + toString(myDemandElements.size()) + + ", Shapes: " + toString(myShapes.size()) + + ", Junctions: " + toString(myJunctions.size()) + + ", Edges: " + toString(myEdges.size()) + + ", Lanes: " + toString(myLanes.size()) + + ", Crossings: " + toString(myCrossings.size()) + + ", Connections: " + toString(myConnections.size()) + + ", TAZs: " + toString(myTAZs.size()) + + ", POIs: " + toString(myPOIs.size()) + + ", Polys: " + toString(myPolys.size())); +} + + +void +GNEViewNetHelper::ObjectsUnderCursor::swapLane2Edge() { + // clear some containers + myGUIGlObjects.clear(); + myAttributeCarriers.clear(); + myNetElements.clear(); + // fill containers using edges + for (const auto& i : myEdges) { + myGUIGlObjects.push_back(i); + myAttributeCarriers.push_back(i); + myNetElements.push_back(i); + } + // write information for debug + WRITE_DEBUG("ObjectsUnderCursor: swapped Lanes to edges") +} + + +void +GNEViewNetHelper::ObjectsUnderCursor::setCreatedJunction(GNEJunction* junction) { + if (myJunctions.size() > 0) { + myJunctions.front() = junction; + } else { + myJunctions.push_back(junction); + } +} + + +GUIGlID +GNEViewNetHelper::ObjectsUnderCursor::getGlIDFront() const { + if (myGUIGlObjects.size() > 0) { + return myGUIGlObjects.front()->getGlID(); + } else { + return 0; + } +} + + +GUIGlObjectType +GNEViewNetHelper::ObjectsUnderCursor::getGlTypeFront() const { + if (myGUIGlObjects.size() > 0) { + return myGUIGlObjects.front()->getType(); + } else { + return GLO_NETWORK; + } +} + + +GNEAttributeCarrier* +GNEViewNetHelper::ObjectsUnderCursor::getAttributeCarrierFront() const { + if (myAttributeCarriers.size() > 0) { + return myAttributeCarriers.front(); + } else { + return nullptr; + } +} + + +GNENetElement* +GNEViewNetHelper::ObjectsUnderCursor::getNetElementFront() const { + if (myNetElements.size() > 0) { + return myNetElements.front(); + } else { + return nullptr; + } +} + + +GNEAdditional* +GNEViewNetHelper::ObjectsUnderCursor::getAdditionalFront() const { + if (myAdditionals.size() > 0) { + return myAdditionals.front(); + } else { + return nullptr; + } +} + + +GNEShape* +GNEViewNetHelper::ObjectsUnderCursor::getShapeFront() const { + if (myShapes.size() > 0) { + return myShapes.front(); + } else { + return nullptr; + } +} + + +GNEDemandElement* +GNEViewNetHelper::ObjectsUnderCursor::getDemandElementFront() const { + if (myDemandElements.size() > 0) { + return myDemandElements.front(); + } else { + return nullptr; + } +} + + +GNEJunction* +GNEViewNetHelper::ObjectsUnderCursor::getJunctionFront() const { + if (myJunctions.size() > 0) { + return myJunctions.front(); + } else { + return nullptr; + } +} + + +GNEEdge* +GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront() const { + if (myEdges.size() > 0) { + return myEdges.front(); + } else { + return nullptr; + } +} + + +GNELane* +GNEViewNetHelper::ObjectsUnderCursor::getLaneFront() const { + if (myLanes.size() > 0) { + return myLanes.front(); + } else { + return nullptr; + } +} + + +GNECrossing* +GNEViewNetHelper::ObjectsUnderCursor::getCrossingFront() const { + if (myCrossings.size() > 0) { + return myCrossings.front(); + } else { + return nullptr; + } +} + + +GNEConnection* +GNEViewNetHelper::ObjectsUnderCursor::getConnectionFront() const { + if (myConnections.size() > 0) { + return myConnections.front(); + } else { + return nullptr; + } +} + + +GNETAZ* +GNEViewNetHelper::ObjectsUnderCursor::getTAZFront() const { + if (myTAZs.size() > 0) { + return myTAZs.front(); + } else { + return nullptr; + } +} + + +GNEPOI* +GNEViewNetHelper::ObjectsUnderCursor::getPOIFront() const { + if (myPOIs.size() > 0) { + return myPOIs.front(); + } else { + return nullptr; + } +} + + +GNEPoly* +GNEViewNetHelper::ObjectsUnderCursor::getPolyFront() const { + if (myPolys.size() > 0) { + return myPolys.front(); + } else { + return nullptr; + } +} + + +const std::vector& +GNEViewNetHelper::ObjectsUnderCursor::getClickedAttributeCarriers() const { + return myAttributeCarriers; +} + + +void +GNEViewNetHelper::ObjectsUnderCursor::sortGUIGlObjectsByAltitude(const std::vector& GUIGlObjects) { + // first clear myGUIGlObjects + myGUIGlObjects.clear(); + // declare a map to save sorted GUIGlObjects + std::map > mySortedGUIGlObjects; + for (const auto& i : GUIGlObjects) { + mySortedGUIGlObjects[i->getType()].push_back(i); + } + // move sorted GUIGlObjects into myGUIGlObjects using a reverse iterator + for (std::map >::reverse_iterator i = mySortedGUIGlObjects.rbegin(); i != mySortedGUIGlObjects.rend(); i++) { + for (const auto& j : i->second) { + myGUIGlObjects.push_back(j); + } + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::keyPressed - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::KeyPressed::KeyPressed() : + myEventInfo(nullptr) { +} + + +void +GNEViewNetHelper::KeyPressed::update(void* eventData) { + myEventInfo = (FXEvent*) eventData; +} + + +bool +GNEViewNetHelper::KeyPressed::shiftKeyPressed() const { + if (myEventInfo) { + return (myEventInfo->state & SHIFTMASK) != 0; + } else { + return false; + } +} + + +bool +GNEViewNetHelper::KeyPressed::controlKeyPressed() const { + if (myEventInfo) { + return (myEventInfo->state & CONTROLMASK) != 0; + } else { + return false; + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::MoveSingleElementValues - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::MoveSingleElementValues::MoveSingleElementValues(GNEViewNet* viewNet) : + movingIndexShape(-1), + myViewNet(viewNet), + myMovingStartPos(false), + myMovingEndPos(false), + myJunctionToMove(nullptr), + myEdgeToMove(nullptr), + myPolyToMove(nullptr), + myPOIToMove(nullptr), + myAdditionalToMove(nullptr), + myDemandElementToMove(nullptr), + myTAZToMove(nullptr) { +} + + +bool +GNEViewNetHelper::MoveSingleElementValues::beginMoveSingleElementNetworkMode() { + // first obtain moving reference (common for all) + myRelativeClickedPosition = myViewNet->getPositionInformation(); + // check what type of AC will be moved + if (myViewNet->myObjectsUnderCursor.getPolyFront()) { + // calculate poly movement values (can be entire shape, single geometry points, altitude, etc.) + return calculatePolyValues(); + } else if (myViewNet->myObjectsUnderCursor.getPOIFront()) { + // set POI moved object + myPOIToMove = myViewNet->myObjectsUnderCursor.getPOIFront(); + // Save original Position of POI in view + originalPositionInView = myPOIToMove->getPositionInView(); + // there is moved items, then return true + return true; + } else if (myViewNet->myObjectsUnderCursor.getAdditionalFront()) { + // set additionals moved object + myAdditionalToMove = myViewNet->myObjectsUnderCursor.getAdditionalFront(); + // save current position of additional + originalPositionInView = myAdditionalToMove->getPositionInView(); + // start additional geometry moving + myAdditionalToMove->startGeometryMoving(); + // there is moved items, then return true + return true; + } else if (myViewNet->myObjectsUnderCursor.getTAZFront()) { + // calculate TAZ movement values (can be entire shape or single geometry points) + return calculateTAZValues(); + } else if (myViewNet->myObjectsUnderCursor.getJunctionFront()) { + // set junction moved object + myJunctionToMove = myViewNet->myObjectsUnderCursor.getJunctionFront(); + // Save original Position of Element in view + originalPositionInView = myJunctionToMove->getPositionInView(); + // start junction geometry moving + myJunctionToMove->startGeometryMoving(); + // there is moved items, then return true + return true; + } else if (myViewNet->myObjectsUnderCursor.getEdgeFront() || myViewNet->myObjectsUnderCursor.getLaneFront()) { + // calculate Edge movement values (can be entire shape, single geometry points, altitude, etc.) + return calculateEdgeValues(); + } else { + // there isn't moved items, then return false + return false; + } +} + + +bool +GNEViewNetHelper::MoveSingleElementValues::beginMoveSingleElementDemandMode() { + // first obtain moving reference (common for all) + myRelativeClickedPosition = myViewNet->getPositionInformation(); + // check what type of AC will be moved + if (myViewNet->myObjectsUnderCursor.getDemandElementFront()) { + // set additionals moved object + myDemandElementToMove = myViewNet->myObjectsUnderCursor.getDemandElementFront(); + // save current position of demand element + originalPositionInView = myDemandElementToMove->getPositionInView(); + // start demand element geometry moving + myDemandElementToMove->startGeometryMoving(); + // there is moved items, then return true + return true; + } else { + // there isn't moved items, then return false + return false; + } +} + + +void +GNEViewNetHelper::MoveSingleElementValues::moveSingleElement() { + // calculate offsetMovement depending of current mouse position and relative clicked position + // @note #3521: Add checkBox to allow moving elements... has to be implemented and used here + Position offsetMovement = myViewNet->getPositionInformation() - myViewNet->myMoveSingleElementValues.myRelativeClickedPosition; + // calculate Z depending of moveElevation + if (myViewNet->myMoveOptions.moveElevation->shown() && myViewNet->myMoveOptions.moveElevation->getCheck() == TRUE) { + // reset offset X and Y and use Y for Z + offsetMovement = Position(0, 0, offsetMovement.y()); + } else { + // leave z empty (because in this case offset only actuates over X-Y) + offsetMovement.setz(0); + } + // check what element will be moved + if (myPolyToMove) { + // move shape's geometry without commiting changes depending if polygon is blocked + if (myPolyToMove->isPolygonBlocked()) { + // move entire shape + myPolyToMove->moveEntireShape(originalShapeBeforeMoving, offsetMovement); + } else { + // move only a certain Geometry Point + movingIndexShape = myPolyToMove->moveVertexShape(movingIndexShape, originalPositionInView, offsetMovement); + } + } else if (myPOIToMove) { + // Move POI's geometry without commiting changes + myPOIToMove->moveGeometry(originalPositionInView, offsetMovement); + } else if (myJunctionToMove) { + // Move Junction's geometry without commiting changes + myJunctionToMove->moveGeometry(originalPositionInView, offsetMovement); + } else if (myEdgeToMove) { + // check if we're moving the start or end position, or a geometry point + if (myMovingStartPos) { + myEdgeToMove->moveShapeStart(originalPositionInView, offsetMovement); + } else if (myMovingEndPos) { + myEdgeToMove->moveShapeEnd(originalPositionInView, offsetMovement); + } else { + // move edge's geometry without commiting changes + movingIndexShape = myEdgeToMove->moveVertexShape(movingIndexShape, originalPositionInView, offsetMovement); + } + } else if (myAdditionalToMove && (myAdditionalToMove->isAdditionalBlocked() == false)) { + // Move Additional geometry without commiting changes + myAdditionalToMove->moveGeometry(offsetMovement); + } else if (myDemandElementToMove/* && (myDemandElementToMove->isDemandElementBlocked() == false)*/) { + // Move DemandElement geometry without commiting changes + myDemandElementToMove->moveGeometry(offsetMovement); + } else if (myTAZToMove) { + /// move TAZ's geometry without commiting changes depending if polygon is blocked + if (myTAZToMove->isShapeBlocked()) { + // move entire shape + myTAZToMove->moveEntireShape(originalShapeBeforeMoving, offsetMovement); + } else { + // move only a certain Geometry Point + movingIndexShape = myTAZToMove->moveVertexShape(movingIndexShape, originalPositionInView, offsetMovement); + } + } +} + + +void +GNEViewNetHelper::MoveSingleElementValues::finishMoveSingleElement() { + if (myPolyToMove) { + myPolyToMove->commitShapeChange(originalShapeBeforeMoving, myViewNet->getUndoList()); + myPolyToMove = nullptr; + } else if (myPOIToMove) { + myPOIToMove->commitGeometryMoving(originalPositionInView, myViewNet->getUndoList()); + myPOIToMove = nullptr; + } else if (myJunctionToMove) { + // check if in the moved position there is another Junction and it will be merged + if (!myViewNet->mergeJunctions(myJunctionToMove, originalPositionInView)) { + myJunctionToMove->endGeometryMoving(); + // position is already up to date but we must register with myViewNet->getUndoList() + myJunctionToMove->commitGeometryMoving(originalPositionInView, myViewNet->getUndoList()); + } + myJunctionToMove = nullptr; + } else if (myEdgeToMove) { + // end geometry moving + myEdgeToMove->endGeometryMoving(); + // commit change depending of what was moved + if (myMovingStartPos) { + myEdgeToMove->commitShapeStartChange(originalPositionInView, myViewNet->getUndoList()); + myMovingStartPos = false; + } else if (myMovingEndPos) { + myEdgeToMove->commitShapeEndChange(originalPositionInView, myViewNet->getUndoList()); + myMovingEndPos = false; + } else { + myEdgeToMove->commitShapeChange(originalShapeBeforeMoving, myViewNet->getUndoList()); + } + myEdgeToMove = nullptr; + } else if (myAdditionalToMove) { + myAdditionalToMove->endGeometryMoving(); + myAdditionalToMove->commitGeometryMoving(myViewNet->getUndoList()); + myAdditionalToMove = nullptr; + } else if (myDemandElementToMove) { + myDemandElementToMove->endGeometryMoving(); + myDemandElementToMove->commitGeometryMoving(myViewNet->getUndoList()); + myDemandElementToMove = nullptr; + } else if (myTAZToMove) { + myTAZToMove->commitShapeChange(originalShapeBeforeMoving, myViewNet->getUndoList()); + myTAZToMove = nullptr; + } +} + + +bool +GNEViewNetHelper::MoveSingleElementValues::calculatePolyValues() { + // set Poly to move + myPolyToMove = myViewNet->myObjectsUnderCursor.getPolyFront(); + // now we have two cases: if we're editing the X-Y coordenade or the altitude (z) + if (myViewNet->myMoveOptions.moveElevation->shown() && myViewNet->myMoveOptions.moveElevation->getCheck() == TRUE) { + // check if in the clicked position a geometry point exist + int existentIndex = myPolyToMove->getVertexIndex(myViewNet->getPositionInformation(), false, false); + if (existentIndex != -1) { + // save original shape (needed for commit change) + myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myPolyToMove->getShape(); + // obtain existent index + myViewNet->myMoveSingleElementValues.movingIndexShape = existentIndex; + myViewNet->myMoveSingleElementValues.originalPositionInView = myPolyToMove->getShape()[existentIndex]; + // poly values sucesfully calculated, then return true + return true; + } else { + // stop poly moving + myPolyToMove = nullptr; + // poly values wasn't calculated, then return false + return false; + } + } else { + // save original shape (needed for commit change) + myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myPolyToMove->getShape(); + // save clicked position as moving original position + myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->getPositionInformation(); + // obtain index of vertex to move if shape isn't blocked + if ((myPolyToMove->isPolygonBlocked() == false) && (myPolyToMove->isMovementBlocked() == false)) { + // check if we want to remove a Geometry Point + if (myViewNet->myKeyPressed.shiftKeyPressed()) { + // check if we're clicked over a Geometry Point + myViewNet->myMoveSingleElementValues.movingIndexShape = myPolyToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); + if (myViewNet->myMoveSingleElementValues.movingIndexShape != -1) { + myPolyToMove->deleteGeometryPoint(myViewNet->myMoveSingleElementValues.originalPositionInView); + // after removing Geomtery Point, reset PolyToMove + myPolyToMove = nullptr; + // poly values wasn't calculated, then return false + return false; + } + // poly values sucesfully calculated, then return true + return true; + } else { + // obtain index of vertex to move and moving reference + myViewNet->myMoveSingleElementValues.movingIndexShape = myPolyToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); + if (myViewNet->myMoveSingleElementValues.movingIndexShape == -1) { + // create new geometry point + myViewNet->myMoveSingleElementValues.movingIndexShape = myPolyToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, true, true); + } + // poly values sucesfully calculated, then return true + return true; + } + } else { + myViewNet->myMoveSingleElementValues.movingIndexShape = -1; + // poly values wasn't calculated, then return false + return false; + } + } +} + + +bool +GNEViewNetHelper::MoveSingleElementValues::calculateEdgeValues() { + if (myViewNet->myKeyPressed.shiftKeyPressed()) { + // edit end point + myViewNet->myObjectsUnderCursor.getEdgeFront()->editEndpoint(myViewNet->getPositionInformation(), myViewNet->myUndoList); + // edge values wasn't calculated, then return false + return false; + } else { + // assign clicked edge to edgeToMove + myEdgeToMove = myViewNet->myObjectsUnderCursor.getEdgeFront(); + // check if we clicked over a start or end position + if (myEdgeToMove->clickedOverShapeStart(myViewNet->getPositionInformation())) { + // save start pos + myViewNet->myMoveSingleElementValues.originalPositionInView = myEdgeToMove->getNBEdge()->getGeometry().front(); + myViewNet->myMoveSingleElementValues.myMovingStartPos = true; + // start geometry moving + myEdgeToMove->startGeometryMoving(); + // edge values sucesfully calculated, then return true + return true; + } else if (myEdgeToMove->clickedOverShapeEnd(myViewNet->getPositionInformation())) { + // save end pos + myViewNet->myMoveSingleElementValues.originalPositionInView = myEdgeToMove->getNBEdge()->getGeometry().back(); + myViewNet->myMoveSingleElementValues.myMovingEndPos = true; + // start geometry moving + myEdgeToMove->startGeometryMoving(); + // edge values sucesfully calculated, then return true + return true; + } else { + // now we have two cases: if we're editing the X-Y coordenade or the altitude (z) + if (myViewNet->myMoveOptions.moveElevation->shown() && myViewNet->myMoveOptions.moveElevation->getCheck() == TRUE) { + // check if in the clicked position a geometry point exist + int existentIndex = myEdgeToMove->getVertexIndex(myViewNet->getPositionInformation(), false, false); + if (existentIndex != -1) { + myViewNet->myMoveSingleElementValues.movingIndexShape = existentIndex; + myViewNet->myMoveSingleElementValues.originalPositionInView = myEdgeToMove->getNBEdge()->getInnerGeometry()[existentIndex]; + // start geometry moving + myEdgeToMove->startGeometryMoving(); + // edge values sucesfully calculated, then return true + return true; + } else { + // stop edge moving + myEdgeToMove = nullptr; + // edge values wasn't calculated, then return false + return false; + } + } else { + // save original shape (needed for commit change) + myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myEdgeToMove->getNBEdge()->getInnerGeometry(); + // obtain index of vertex to move and moving reference + myViewNet->myMoveSingleElementValues.movingIndexShape = myEdgeToMove->getVertexIndex(myViewNet->getPositionInformation(), false, false); + // if index doesn't exist, create it snapping new edge to grid + if (myViewNet->myMoveSingleElementValues.movingIndexShape == -1) { + myViewNet->myMoveSingleElementValues.movingIndexShape = myEdgeToMove->getVertexIndex(myViewNet->getPositionInformation(), true, true); + } + // make sure that myViewNet->myMoveSingleElementValues.movingIndexShape isn't -1 + if (myViewNet->myMoveSingleElementValues.movingIndexShape != -1) { + myViewNet->myMoveSingleElementValues.originalPositionInView = myEdgeToMove->getNBEdge()->getInnerGeometry()[myViewNet->myMoveSingleElementValues.movingIndexShape]; + // start geometry moving + myEdgeToMove->startGeometryMoving(); + // edge values sucesfully calculated, then return true + return true; + } else { + // edge values wasn't calculated, then return false + return false; + } + } + } + } +} + + +bool +GNEViewNetHelper::MoveSingleElementValues::calculateTAZValues() { + // set TAZ to move + myTAZToMove = myViewNet->myObjectsUnderCursor.getTAZFront(); + // save original shape (needed for commit change) + myViewNet->myMoveSingleElementValues.originalShapeBeforeMoving = myTAZToMove->getShape(); + // save clicked position as moving original position + myViewNet->myMoveSingleElementValues.originalPositionInView = myViewNet->getPositionInformation(); + // obtain index of vertex to move if shape isn't blocked + if ((myTAZToMove->isShapeBlocked() == false) && (myTAZToMove->isAdditionalBlocked() == false)) { + // check if we want to remove a Geometry Point + if (myViewNet->myKeyPressed.shiftKeyPressed()) { + // check if we're clicked over a Geometry Point + myViewNet->myMoveSingleElementValues.movingIndexShape = myTAZToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); + if (myViewNet->myMoveSingleElementValues.movingIndexShape != -1) { + myTAZToMove->deleteGeometryPoint(myViewNet->myMoveSingleElementValues.originalPositionInView); + // after removing Geomtery Point, reset TAZToMove + myTAZToMove = nullptr; + // TAZ values wasn't calculated, then return false + return false; + } + // TAZ values sucesfully calculated, then return true + return true; + } else { + // obtain index of vertex to move and moving reference + myViewNet->myMoveSingleElementValues.movingIndexShape = myTAZToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, false, false); + if (myViewNet->myMoveSingleElementValues.movingIndexShape == -1) { + // create new geometry point + myViewNet->myMoveSingleElementValues.movingIndexShape = myTAZToMove->getVertexIndex(myViewNet->myMoveSingleElementValues.originalPositionInView, true, true); + } + // TAZ values sucesfully calculated, then return true + return true; + } + } else { + // abort moving index shape + myViewNet->myMoveSingleElementValues.movingIndexShape = -1; + // TAZ values wasn't calculated, then return false + return false; + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::MoveMultipleElementValues - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::MoveMultipleElementValues::MoveMultipleElementValues(GNEViewNet* viewNet) : + myViewNet(viewNet), + myMovingSelection(false) { +} + + +void +GNEViewNetHelper::MoveMultipleElementValues::beginMoveSelection(GNEAttributeCarrier* originAC) { + // enable moving selection + myMovingSelection = true; + // save clicked position (to calculate offset) + myClickedPosition = myViewNet->getPositionInformation(); + // obtain Junctions and edges selected + std::vector selectedJunctions = myViewNet->getNet()->retrieveJunctions(true); + std::vector selectedEdges = myViewNet->getNet()->retrieveEdges(true); + // Junctions are always moved, then save position of current selected junctions (Needed when mouse is released) + for (auto i : selectedJunctions) { + // save junction position + myMovedJunctionOriginPositions[i] = i->getPositionInView(); + // start geometry moving + i->startGeometryMoving(); + } + // make special movement depending of clicked AC + if (originAC->getTagProperty().getTag() == SUMO_TAG_JUNCTION) { + // if clicked element is a junction, move shapes of all selected edges + for (auto i : selectedEdges) { + // save entire edge geometry + myMovedEdgesOriginShape[i] = i->getNBEdge()->getInnerGeometry(); + // start geometry moving + i->startGeometryMoving(); + } + } else if (originAC->getTagProperty().getTag() == SUMO_TAG_EDGE) { + // obtain clicked edge + GNEEdge* clickedEdge = dynamic_cast(originAC); + // if clicked edge has origin and destiny junction selected, move shapes of all selected edges + if (myMovedJunctionOriginPositions.count(clickedEdge->getGNEJunctionSource()) > 0 && + myMovedJunctionOriginPositions.count(clickedEdge->getGNEJunctionDestiny()) > 0) { + for (auto i : selectedEdges) { + // save entire edge geometry + myMovedEdgesOriginShape[i] = i->getNBEdge()->getInnerGeometry(); + // start geometry moving + i->startGeometryMoving(); + } + } else { + // declare three groups for dividing edges + std::vector noJunctionsSelected; + std::vector originJunctionSelected; + std::vector destinyJunctionSelected; + // divide selected edges into four groups, depending of the selection of their junctions + for (auto i : selectedEdges) { + bool originSelected = myMovedJunctionOriginPositions.count(i->getGNEJunctionSource()) > 0; + bool destinySelected = myMovedJunctionOriginPositions.count(i->getGNEJunctionDestiny()) > 0; + // bot junctions selected + if (!originSelected && !destinySelected) { + noJunctionsSelected.push_back(i); + } else if (originSelected && !destinySelected) { + originJunctionSelected.push_back(i); + } else if (!originSelected && destinySelected) { + destinyJunctionSelected.push_back(i); + } else if (!originSelected && !destinySelected) { + // save edge geometry + myMovedEdgesOriginShape[i] = i->getNBEdge()->getInnerGeometry(); + // start geometry moving + i->startGeometryMoving(); + } + } + // save original shape of all noJunctionsSelected edges (needed for commit change) + for (auto i : noJunctionsSelected) { + myMovedEgdesGeometryPoints[i] = new MoveSingleElementValues(myViewNet); + // save edge geometry + myMovedEgdesGeometryPoints[i]->originalShapeBeforeMoving = i->getNBEdge()->getInnerGeometry(); + // start geometry moving + i->startGeometryMoving(); + } + // obtain index shape of clicked edge + int index = clickedEdge->getVertexIndex(myViewNet->getPositionInformation(), true, true); + // check that index is valid + if (index < 0) { + throw ProcessError("invalid shape index"); + } + // save index and original position + myMovedEgdesGeometryPoints[clickedEdge] = new MoveSingleElementValues(myViewNet); + myMovedEgdesGeometryPoints[clickedEdge]->movingIndexShape = index; + myMovedEgdesGeometryPoints[clickedEdge]->originalPositionInView = myViewNet->getPositionInformation(); + // start moving of clicked edge AFTER getting vertex Index + clickedEdge->startGeometryMoving(); + // do the same for the rest of noJunctionsSelected edges + for (auto i : noJunctionsSelected) { + if (i != clickedEdge) { + myMovedEgdesGeometryPoints[i] = new MoveSingleElementValues(myViewNet); + // save index and original position + myMovedEgdesGeometryPoints[i]->movingIndexShape = i->getVertexIndex(myViewNet->getPositionInformation(), true, true); + // set originalPosition depending if edge is opposite to clicked edge + if (i->getOppositeEdge() == clickedEdge) { + myMovedEgdesGeometryPoints[i]->originalPositionInView = myViewNet->getPositionInformation(); + } else { + myMovedEgdesGeometryPoints[i]->originalPositionInView = i->getNBEdge()->getInnerGeometry()[myMovedEgdesGeometryPoints[i]->movingIndexShape]; + } + // start moving of clicked edge AFTER getting vertex Index + i->startGeometryMoving(); + } + } + } + } +} + + +void +GNEViewNetHelper::MoveMultipleElementValues::moveSelection() { + // calculate offset between current position and original position + Position offsetMovement = myViewNet->getPositionInformation() - myClickedPosition; + // calculate Z depending of Grid + if (myViewNet->myMoveOptions.moveElevation->shown() && myViewNet->myMoveOptions.moveElevation->getCheck() == TRUE) { + // reset offset X and Y and use Y for Z + offsetMovement = Position(0, 0, offsetMovement.y()); + } else { + // leave z empty (because in this case offset only actuates over X-Y) + offsetMovement.setz(0); + } + // move selected junctions + for (auto i : myMovedJunctionOriginPositions) { + i.first->moveGeometry(i.second, offsetMovement); + } + // move entire edge shapes + for (auto i : myMovedEdgesOriginShape) { + i.first->moveEntireShape(i.second, offsetMovement); + } + // move partial shapes + for (auto i : myMovedEgdesGeometryPoints) { + i.first->moveVertexShape(i.second->movingIndexShape, i.second->originalPositionInView, offsetMovement); + } +} + + +void +GNEViewNetHelper::MoveMultipleElementValues::finishMoveSelection() { + // begin undo list + myViewNet->getUndoList()->p_begin("position of selected elements"); + // commit positions of moved junctions + for (auto i : myMovedJunctionOriginPositions) { + i.first->endGeometryMoving(); + i.first->commitGeometryMoving(i.second, myViewNet->getUndoList()); + } + // commit shapes of entired moved edges + for (auto i : myMovedEdgesOriginShape) { + i.first->endGeometryMoving(); + i.first->commitShapeChange(i.second, myViewNet->getUndoList()); + } + //commit shapes of partial moved shapes + for (auto i : myMovedEgdesGeometryPoints) { + i.first->endGeometryMoving(); + i.first->commitShapeChange(i.second->originalShapeBeforeMoving, myViewNet->getUndoList()); + } + // end undo list + myViewNet->getUndoList()->p_end(); + // stop moving selection + myMovingSelection = false; + // clear containers + myMovedJunctionOriginPositions.clear(); + myMovedEdgesOriginShape.clear(); + // delete all movedEgdesGeometryPoints before clear container + for (const auto& i : myMovedEgdesGeometryPoints) { + delete i.second; + } + myMovedEgdesGeometryPoints.clear(); +} + + +bool +GNEViewNetHelper::MoveMultipleElementValues::isMovingSelection() const { + return myMovingSelection; +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::VehicleOptions - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::VehicleOptions::VehicleOptions(GNEViewNet* viewNet) : + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::VehicleOptions::buildVehicleOptionsMenuChecks() { + // currently unused +} + + +void +GNEViewNetHelper::VehicleOptions::hideVehicleOptionsMenuChecks() { + // currently unused +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::VehicleTypeOptions - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::VehicleTypeOptions::VehicleTypeOptions(GNEViewNet* viewNet) : + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::VehicleTypeOptions::buildVehicleTypeOptionsMenuChecks() { + // currently unused +} + + +void +GNEViewNetHelper::VehicleTypeOptions::hideVehicleTypeOptionsMenuChecks() { + // currently unused +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::SelectingArea - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::SelectingArea::SelectingArea(GNEViewNet* viewNet) : + selectingUsingRectangle(false), + startDrawing(false), + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::SelectingArea::beginRectangleSelection() { + selectingUsingRectangle = true; + selectionCorner1 = myViewNet->getPositionInformation(); + selectionCorner2 = selectionCorner1; +} + + +void +GNEViewNetHelper::SelectingArea::moveRectangleSelection() { + // start drawing + startDrawing = true; + // only update selection corner 2 + selectionCorner2 = myViewNet->getPositionInformation(); + // update status bar + myViewNet->setStatusBarText("Selection width:" + toString(fabs(selectionCorner1.x() - selectionCorner2.x())) + + " height:" + toString(fabs(selectionCorner1.y() - selectionCorner2.y())) + + " diagonal:" + toString(selectionCorner1.distanceTo2D(selectionCorner2))); +} + + +void +GNEViewNetHelper::SelectingArea::finishRectangleSelection() { + // finish rectangle selection + selectingUsingRectangle = false; + startDrawing = false; +} + + +void +GNEViewNetHelper::SelectingArea::processRectangleSelection() { + // shift held down on mouse-down and mouse-up and check that rectangle exist + if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) && + (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) && + myViewNet->myKeyPressed.shiftKeyPressed()) { + // create boundary between two corners + Boundary rectangleBoundary; + rectangleBoundary.add(selectionCorner1); + rectangleBoundary.add(selectionCorner2); + // process selection within boundary + processBoundarySelection(rectangleBoundary); + } +} + + +std::vector +GNEViewNetHelper::SelectingArea::processEdgeRectangleSelection() { + // declare vector for selection + std::vector result; + // shift held down on mouse-down and mouse-up and check that rectangle exist + if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) && + (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) && + myViewNet->myKeyPressed.shiftKeyPressed()) { + // create boundary between two corners + Boundary rectangleBoundary; + rectangleBoundary.add(selectionCorner1); + rectangleBoundary.add(selectionCorner2); + if (myViewNet->makeCurrent()) { + // obtain all ACs in Rectangle BOundary + std::set > ACsInBoundary = myViewNet->getAttributeCarriersInBoundary(rectangleBoundary); + // Filter ACs in Boundary and get only edges + for (auto i : ACsInBoundary) { + if (i.second->getTagProperty().getTag() == SUMO_TAG_EDGE) { + result.push_back(dynamic_cast(i.second)); + } + } + myViewNet->makeNonCurrent(); + } + } + return result; +} + + +void +GNEViewNetHelper::SelectingArea::processShapeSelection(const PositionVector& shape) { + processBoundarySelection(shape.getBoxBoundary()); +} + + +void +GNEViewNetHelper::SelectingArea::drawRectangleSelection(const RGBColor& color) const { + if (selectingUsingRectangle) { + glPushMatrix(); + glTranslated(0, 0, GLO_MAX - 1); + GLHelper::setColor(color); + glLineWidth(2); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + glBegin(GL_QUADS); + glVertex2d(selectionCorner1.x(), selectionCorner1.y()); + glVertex2d(selectionCorner1.x(), selectionCorner2.y()); + glVertex2d(selectionCorner2.x(), selectionCorner2.y()); + glVertex2d(selectionCorner2.x(), selectionCorner1.y()); + glEnd(); + glPopMatrix(); + } +} + + +void +GNEViewNetHelper::SelectingArea::processBoundarySelection(const Boundary& boundary) { + if (myViewNet->makeCurrent()) { + std::set > ACsInBoundary = myViewNet->getAttributeCarriersInBoundary(boundary); + // filter ACsInBoundary depending of current supermode + std::set > ACsInBoundaryFiltered; + for (const auto& i : ACsInBoundary) { + if ((myViewNet->myEditModes.currentSupermode == GNE_SUPERMODE_NETWORK && !i.second->getTagProperty().isDemandElement()) || + (myViewNet->myEditModes.currentSupermode == GNE_SUPERMODE_DEMAND && i.second->getTagProperty().isDemandElement())) { + ACsInBoundaryFiltered.insert(i); + } + } + // declare two sets of attribute carriers, one for select and another for unselect + std::vector ACToSelect; + std::vector ACToUnselect; + // reserve memory (we assume that in the worst case we're going to insert all elements of ACsInBoundaryFiltered + ACToSelect.reserve(ACsInBoundaryFiltered.size()); + ACToUnselect.reserve(ACsInBoundaryFiltered.size()); + // in restrict AND replace mode all current selected attribute carriers will be unselected + if ((myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode() == GNESelectorFrame::ModificationMode::SET_RESTRICT) || + (myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode() == GNESelectorFrame::ModificationMode::SET_REPLACE)) { + // obtain selected ACs depending of current supermode + std::vector selectedAC = myViewNet->getNet()->getSelectedAttributeCarriers(false); + // add id into ACs to unselect + for (auto i : selectedAC) { + ACToUnselect.push_back(i); + } + } + // iterate over AtributeCarriers obtained of boundary an place it in ACToSelect or ACToUnselect + for (auto i : ACsInBoundaryFiltered) { + switch (myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode()) { + case GNESelectorFrame::ModificationMode::SET_SUB: + ACToUnselect.push_back(i.second); + break; + case GNESelectorFrame::ModificationMode::SET_RESTRICT: + if (std::find(ACToUnselect.begin(), ACToUnselect.end(), i.second) != ACToUnselect.end()) { + ACToSelect.push_back(i.second); + } + break; + default: + ACToSelect.push_back(i.second); + break; + } + } + // select junctions and their connections and crossings if Auto select junctions is enabled (note: only for "add mode") + if (myViewNet->autoSelectNodes() && GNESelectorFrame::ModificationMode::SET_ADD) { + std::vector edgesToSelect; + // iterate over ACToSelect and extract edges + for (auto i : ACToSelect) { + if (i->getTagProperty().getTag() == SUMO_TAG_EDGE) { + edgesToSelect.push_back(dynamic_cast(i)); + } + } + // iterate over extracted edges + for (auto i : edgesToSelect) { + // select junction source and all their connections and crossings + ACToSelect.push_back(i->getGNEJunctionSource()); + for (auto j : i->getGNEJunctionSource()->getGNEConnections()) { + ACToSelect.push_back(j); + } + for (auto j : i->getGNEJunctionSource()->getGNECrossings()) { + ACToSelect.push_back(j); + } + // select junction destiny and all their connections crossings + ACToSelect.push_back(i->getGNEJunctionDestiny()); + for (auto j : i->getGNEJunctionDestiny()->getGNEConnections()) { + ACToSelect.push_back(j); + } + for (auto j : i->getGNEJunctionDestiny()->getGNECrossings()) { + ACToSelect.push_back(j); + } + } + } + // only continue if there is ACs to select or unselect + if ((ACToSelect.size() + ACToUnselect.size()) > 0) { + // first unselect AC of ACToUnselect and then selects AC of ACToSelect + myViewNet->myUndoList->p_begin("selection using rectangle"); + for (auto i : ACToUnselect) { + i->setAttribute(GNE_ATTR_SELECTED, "0", myViewNet->myUndoList); + } + for (auto i : ACToSelect) { + if (i->getTagProperty().isSelectable()) { + i->setAttribute(GNE_ATTR_SELECTED, "1", myViewNet->myUndoList); + } + } + myViewNet->myUndoList->p_end(); + } + myViewNet->makeNonCurrent(); + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::TestingMode - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::TestingMode::TestingMode(GNEViewNet* viewNet) : + myViewNet(viewNet), + myTestingEnabled(OptionsCont::getOptions().getBool("gui-testing")), + myTestingWidth(0), + myTestingHeight(0) { +} + + +void +GNEViewNetHelper::TestingMode::initTestingMode() { + // first check if testing mode is enabled and window size is correct + if (myTestingEnabled && OptionsCont::getOptions().isSet("window-size")) { + std::vector windowSize = OptionsCont::getOptions().getStringVector("window-size"); + // make sure that given windows size has exactly two valid int values + if ((windowSize.size() == 2) && GNEAttributeCarrier::canParse(windowSize[0]) && GNEAttributeCarrier::canParse(windowSize[1])) { + myTestingWidth = GNEAttributeCarrier::parse(windowSize[0]); + myTestingHeight = GNEAttributeCarrier::parse(windowSize[1]); + } else { + WRITE_ERROR("Invalid windows size-format: " + toString(windowSize) + "for option 'window-size'"); + } + } +} + + +void +GNEViewNetHelper::TestingMode::drawTestingElements(GUIMainWindow* mainWindow) { + // first check if testing mode is neabled + if (myTestingEnabled) { + // check if main windows has to be resized + if (myTestingWidth > 0 && ((myViewNet->getWidth() != myTestingWidth) || (myViewNet->getHeight() != myTestingHeight))) { + // only resize once to avoid flickering + //std::cout << " before resize: view=" << getWidth() << ", " << getHeight() << " app=" << mainWindow->getWidth() << ", " << mainWindow->getHeight() << "\n"; + mainWindow->resize(myTestingWidth + myTestingWidth - myViewNet->getWidth(), myTestingHeight + myTestingHeight - myViewNet->getHeight()); + //std::cout << " directly after resize: view=" << getWidth() << ", " << getHeight() << " app=" << mainWindow->getWidth() << ", " << mainWindow->getHeight() << "\n"; + myTestingWidth = 0; + } + //std::cout << " fixed: view=" << getWidth() << ", " << getHeight() << " app=" << mainWindow->getWidth() << ", " << mainWindow->getHeight() << "\n"; + // draw pink square in the upper left corner on top of everything + glPushMatrix(); + const double size = myViewNet->p2m(32); + Position center = myViewNet->screenPos2NetPos(8, 8); + GLHelper::setColor(RGBColor::MAGENTA); + glTranslated(center.x(), center.y(), GLO_MAX - 1); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glBegin(GL_QUADS); + glVertex2d(0, 0); + glVertex2d(0, -size); + glVertex2d(size, -size); + glVertex2d(size, 0); + glEnd(); + glPopMatrix(); + glPushMatrix(); + // show box with the current position relative to pink square + Position posRelative = myViewNet->screenPos2NetPos(myViewNet->getWidth() - 40, myViewNet->getHeight() - 20); + // adjust cursor position (24,25) to show exactly the same position as in function netedit.leftClick(match, X, Y) + GLHelper::drawTextBox(toString(myViewNet->getWindowCursorPosition().x() - 24) + " " + toString(myViewNet->getWindowCursorPosition().y() - 25), posRelative, GLO_MAX - 1, myViewNet->p2m(20), RGBColor::BLACK, RGBColor::WHITE); + glPopMatrix(); + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::CreateEdgeOptions - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::CreateEdgeOptions::CreateEdgeOptions(GNEViewNet* viewNet) : + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::CreateEdgeOptions::buildCreateEdgeOptionMenuChecks() { + chainEdges = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Chain\t\tCreate consecutive " + toString(SUMO_TAG_EDGE) + "s with a single click (hit ESC to cancel chain).").c_str(), myViewNet, 0, LAYOUT_FIX_HEIGHT); + chainEdges->setHeight(23); + chainEdges->setCheck(false); + chainEdges->create(); + + autoOppositeEdge = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Two-way\t\tAutomatically create an " + toString(SUMO_TAG_EDGE) + " in the opposite direction").c_str(), myViewNet, 0, LAYOUT_FIX_HEIGHT); + autoOppositeEdge->setHeight(23); + autoOppositeEdge->setCheck(false); + autoOppositeEdge->create(); + + // recalc after creating menu bar mode options + myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->recalc(); +} + + +void +GNEViewNetHelper::CreateEdgeOptions::hideCreateEdgeOptionMenuChecks() { + chainEdges->hide(); + autoOppositeEdge->hide(); +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::MoveOptions - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::MoveOptions::MoveOptions(GNEViewNet* viewNet) : + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::MoveOptions::buildMoveOptionMenuChecks() { + warnAboutMerge = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Ask for merge\t\tAsk for confirmation before merging " + toString(SUMO_TAG_JUNCTION) + ".").c_str(), myViewNet, 0, LAYOUT_FIX_HEIGHT); + warnAboutMerge->setHeight(23); + warnAboutMerge->setCheck(true); + warnAboutMerge->create(); + + showJunctionBubble = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Bubbles\t\tShow bubbles over " + toString(SUMO_TAG_JUNCTION) + "'s shapes.").c_str(), myViewNet, MID_GNE_VIEWNET_SHOW_BUBBLES, LAYOUT_FIX_HEIGHT); + showJunctionBubble->setHeight(23); + showJunctionBubble->setCheck(false); + showJunctionBubble->create(); + + moveElevation = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, "Elevation\t\tApply mouse movement to elevation instead of x,y position", myViewNet, MID_GNE_VIEWNET_MOVE_ELEVATION, LAYOUT_FIX_HEIGHT); + moveElevation->setHeight(23); + moveElevation->setCheck(false); + moveElevation->create(); + + // recalc after creating menu bar mode options + myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->recalc(); +} + + +void +GNEViewNetHelper::MoveOptions::hideMoveOptionMenuChecks() { + warnAboutMerge->hide(); + showJunctionBubble->hide(); + moveElevation->hide(); +} + + +bool +GNEViewNetHelper::MoveOptions::editingElevation() const { + if (moveElevation->shown()) { + return (moveElevation->getCheck() == TRUE); + } else { + return false; + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::EditModes - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::EditModes::EditModes(GNEViewNet* viewNet) : + currentSupermode(GNE_SUPERMODE_NONE), + networkEditMode(GNE_NMODE_INSPECT), + demandEditMode(GNE_DMODE_INSPECT), + networkButton(nullptr), + demandButton(nullptr), + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::EditModes::buildSuperModeButtons() { + // create buttons + networkButton = new MFXCheckableButton(false, myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().superModes, "Network\t\tSet mode for edit network elements.", + GUIIconSubSys::getIcon(ICON_SUPERMODENETWORK), myViewNet, MID_HOTKEY_F3_SUPERMODE_NETWORK, GUIDesignButtonToolbarSupermode); + networkButton->create(); + + demandButton = new MFXCheckableButton(false, myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().superModes, "Demand\t\tSet mode for edit traffic demand.", + GUIIconSubSys::getIcon(ICON_SUPERMODEDEMAND), myViewNet, MID_HOTKEY_F4_SUPERMODE_DEMAND, GUIDesignButtonToolbarSupermode); + demandButton->create(); + + // recalc menu bar because there is new elements + myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes->recalc(); + // show menu bar modes + myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes->show(); +} + + +void +GNEViewNetHelper::EditModes::setSupermode(Supermode supermode) { + if (supermode == currentSupermode) { + myViewNet->setStatusBarText("Mode already selected"); + if (myViewNet->myCurrentFrame != nullptr) { + myViewNet->myCurrentFrame->focusUpperElement(); + } + } else { + myViewNet->setStatusBarText(""); + // abort current operation + myViewNet->abortOperation(false); + // set super mode + currentSupermode = supermode; + // set supermodes + if (supermode == GNE_SUPERMODE_NETWORK) { + // change buttons + networkButton->setChecked(true); + demandButton->setChecked(false); + // show network buttons + myViewNet->myNetworkCheckableButtons.showNetworkCheckableButtons(); + // hide demand buttons + myViewNet->myDemandCheckableButtons.hideDemandCheckableButtons(); + // force update network mode + setNetworkEditMode(networkEditMode, true); + } else if (supermode == GNE_SUPERMODE_DEMAND) { + // change buttons + networkButton->setChecked(false); + demandButton->setChecked(true); + // hide network buttons + myViewNet->myNetworkCheckableButtons.hideNetworkCheckableButtons(); + // show demand buttons + myViewNet->myDemandCheckableButtons.showDemandCheckableButtons(); + // force update demand mode + setDemandEditMode(demandEditMode, true); + } + // update buttons + networkButton->update(); + demandButton->update(); + // update Supermode CommandButtons in GNEAppWindows + myViewNet->myViewParent->getGNEAppWindows()->updateSuperModeMenuCommands(currentSupermode); + } +} + + +void +GNEViewNetHelper::EditModes::setNetworkEditMode(NetworkEditMode mode, bool force) { + if ((mode == networkEditMode) && !force) { + myViewNet->setStatusBarText("Network mode already selected"); + if (myViewNet->myCurrentFrame != nullptr) { + myViewNet->myCurrentFrame->focusUpperElement(); + } + } else if (networkEditMode == GNE_NMODE_TLS && !myViewNet->myViewParent->getTLSEditorFrame()->isTLSSaved()) { + myViewNet->setStatusBarText("save modifications in TLS before change mode"); + myViewNet->myCurrentFrame->focusUpperElement(); + } else { + myViewNet->setStatusBarText(""); + myViewNet->abortOperation(false); + // stop editing of custom shapes + myViewNet->stopEditCustomShape(); + // set new Network mode + networkEditMode = mode; + // for common modes (Inspect/Delete/Select/move) change also the other supermode + if (networkEditMode == GNE_NMODE_INSPECT) { + demandEditMode = GNE_DMODE_INSPECT; + } else if (networkEditMode == GNE_NMODE_DELETE) { + demandEditMode = GNE_DMODE_DELETE; + } else if (networkEditMode == GNE_NMODE_SELECT) { + demandEditMode = GNE_DMODE_SELECT; + } else if (networkEditMode == GNE_NMODE_MOVE) { + demandEditMode = GNE_DMODE_MOVE; + } + // certain modes requiere a recomputing + switch (mode) { + case GNE_NMODE_CONNECT: + case GNE_NMODE_PROHIBITION: + case GNE_NMODE_TLS: + // modes which depend on computed data + myViewNet->myNet->computeEverything(myViewNet->myViewParent->getGNEAppWindows()); + break; + default: + break; + } + // update network mode specific controls + myViewNet->updateNetworkModeSpecificControls(); + } +} + + +void +GNEViewNetHelper::EditModes::setDemandEditMode(DemandEditMode mode, bool force) { + if ((mode == demandEditMode) && !force) { + myViewNet->setStatusBarText("Demand mode already selected"); + if (myViewNet->myCurrentFrame != nullptr) { + myViewNet->myCurrentFrame->focusUpperElement(); + } + } else { + myViewNet->setStatusBarText(""); + myViewNet->abortOperation(false); + // stop editing of custom shapes + myViewNet->stopEditCustomShape(); + // set new Demand mode + demandEditMode = mode; + // for common modes (Inspect/Delete/Select/Move) change also the other supermode + if (demandEditMode == GNE_DMODE_INSPECT) { + networkEditMode = GNE_NMODE_INSPECT; + } else if (demandEditMode == GNE_DMODE_DELETE) { + networkEditMode = GNE_NMODE_DELETE; + } else if (demandEditMode == GNE_DMODE_SELECT) { + networkEditMode = GNE_NMODE_SELECT; + } else if (demandEditMode == GNE_DMODE_MOVE) { + networkEditMode = GNE_NMODE_MOVE; + } + // demand modes requiere ALWAYS a recomputing + myViewNet->myNet->computeEverything(myViewNet->myViewParent->getGNEAppWindows()); + // update DijkstraRouter of RouteCalculatorInstance + GNEDemandElement::getRouteCalculatorInstance()->updateDijkstraRouter(); + // update geometry of all demand elements (because certain geometry changes affect to demand elements + myViewNet->getNet()->updateGeometryDemandElements(); + // update network mode specific controls + myViewNet->updateDemandModeSpecificControls(); + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::ViewOptions - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::ViewOptions::ViewOptions(GNEViewNet* viewNet) : + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::ViewOptions::buildViewOptionsMenuChecks() { + menuCheckShowDemandElements = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, "Show demand elements\t\tToggle show demand elements", myViewNet, MID_GNE_VIEWNET_SHOW_DEMAND_ELEMENTS, LAYOUT_FIX_HEIGHT); + menuCheckShowDemandElements->setHeight(23); + menuCheckShowDemandElements->setCheck(false); + menuCheckShowDemandElements->create(); + + menuCheckSelectEdges = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Select edges\t\tToggle whether clicking should select " + toString(SUMO_TAG_EDGE) + "s or " + toString(SUMO_TAG_LANE) + "s").c_str(), myViewNet, MID_GNE_VIEWNET_SELECT_EDGES, LAYOUT_FIX_HEIGHT); + menuCheckSelectEdges->setHeight(23); + menuCheckSelectEdges->setCheck(true); + menuCheckSelectEdges->create(); + + menuCheckShowConnections = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Show " + toString(SUMO_TAG_CONNECTION) + "s\t\tToggle show " + toString(SUMO_TAG_CONNECTION) + "s over " + toString(SUMO_TAG_JUNCTION) + "s").c_str(), myViewNet, MID_GNE_VIEWNET_SHOW_CONNECTIONS, LAYOUT_FIX_HEIGHT); + menuCheckShowConnections->setHeight(23); + menuCheckShowConnections->setCheck(myViewNet->getVisualisationSettings()->showLane2Lane); + menuCheckShowConnections->create(); + + menuCheckHideConnections = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("hide " + toString(SUMO_TAG_CONNECTION) + "s\t\tHide connections").c_str(), myViewNet, 0, LAYOUT_FIX_HEIGHT); + menuCheckHideConnections->setHeight(23); + menuCheckHideConnections->setCheck(false); + menuCheckHideConnections->create(); + + menuCheckExtendSelection = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Auto-select " + toString(SUMO_TAG_JUNCTION) + "s\t\tToggle whether selecting multiple " + toString(SUMO_TAG_EDGE) + "s should automatically select their " + toString(SUMO_TAG_JUNCTION) + "s").c_str(), myViewNet, 0, LAYOUT_FIX_HEIGHT); + menuCheckExtendSelection->setHeight(23); + menuCheckExtendSelection->setCheck(false); + menuCheckExtendSelection->create(); + + menuCheckChangeAllPhases = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, ("Apply change to all phases\t\tToggle whether clicking should apply state changes to all phases of the current " + toString(SUMO_TAG_TRAFFIC_LIGHT) + " plan").c_str(), myViewNet, 0, LAYOUT_FIX_HEIGHT); + menuCheckChangeAllPhases->setHeight(23); + menuCheckChangeAllPhases->setCheck(false); + menuCheckChangeAllPhases->create(); + + menuCheckShowGrid = new FXMenuCheck(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions, "Grid\t\tshow grid and restrict movement to the grid (size defined in visualization options)", myViewNet, MID_GNE_VIEWNET_SHOW_GRID, LAYOUT_FIX_HEIGHT); + menuCheckShowGrid->setHeight(23); + menuCheckShowGrid->setCheck(false); + menuCheckShowGrid->create(); + + // always recalc after creating new elements + myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->recalc(); +} + + +void +GNEViewNetHelper::ViewOptions::hideViewOptionsMenuChecks() { + menuCheckShowDemandElements->hide(); + menuCheckSelectEdges->hide(); + menuCheckShowConnections->hide(); + menuCheckHideConnections->hide(); + menuCheckExtendSelection->hide(); + menuCheckChangeAllPhases->hide(); + menuCheckShowGrid->hide(); + // Also hide toolbar grip + myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modeOptions->show(); +} + + +bool +GNEViewNetHelper::ViewOptions::showDemandElements() const { + if (menuCheckShowDemandElements->shown()) { + return (menuCheckShowDemandElements->getCheck() == TRUE); + } else { + // by default, if menuCheckShowDemandElements isn't shown, always show demand elements + return true; + } +} + + +bool +GNEViewNetHelper::ViewOptions::selectEdges() const { + if (menuCheckSelectEdges->shown()) { + return (menuCheckSelectEdges->getCheck() == TRUE); + } else { + // by default, if menuCheckSelectEdges isn't shown, always select edges + return true; + } +} + + +bool +GNEViewNetHelper::ViewOptions::showConnections() const { + if (myViewNet->myEditModes.networkEditMode == GNE_NMODE_CONNECT) { + // check if menu hceck hide connections ins shown + return (myViewNet->myViewOptions.menuCheckHideConnections->getCheck() == FALSE); + } else if (myViewNet->myEditModes.networkEditMode == GNE_NMODE_PROHIBITION) { + return true; + } else if (myViewNet->myViewOptions.menuCheckShowConnections->shown() == false) { + return false; + } else { + return (myViewNet->getVisualisationSettings()->showLane2Lane); + } +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::CommonCheckableButtons - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::CommonCheckableButtons::CommonCheckableButtons(GNEViewNet* viewNet) : + inspectButton(nullptr), + deleteButton(nullptr), + selectButton(nullptr), + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::CommonCheckableButtons::buildCommonCheckableButtons() { + // inspect button + inspectButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset inspect mode\tMode for inspect elements and change their attributes.", + GUIIconSubSys::getIcon(ICON_MODEINSPECT), myViewNet, MID_HOTKEY_I_INSPECTMODE, GUIDesignButtonToolbarCheckable); + inspectButton->create(); + // delete button + deleteButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset delete mode\tMode for delete elements.", + GUIIconSubSys::getIcon(ICON_MODEDELETE), myViewNet, MID_HOTKEY_D_DELETEMODE, GUIDesignButtonToolbarCheckable); + deleteButton->create(); + // select button + selectButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset select mode\tMode for select elements.", + GUIIconSubSys::getIcon(ICON_MODESELECT), myViewNet, MID_HOTKEY_S_SELECTMODE, GUIDesignButtonToolbarCheckable); + selectButton->create(); + // move button + moveButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset move mode\tMode for move elements.", + GUIIconSubSys::getIcon(ICON_MODEMOVE), myViewNet, MID_HOTKEY_M_MOVEMODE, GUIDesignButtonToolbarCheckable); + moveButton->create(); + // always recalc menu bar after creating new elements + myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes->recalc(); +} + + +void +GNEViewNetHelper::CommonCheckableButtons::showCommonCheckableButtons() { + inspectButton->show(); + deleteButton->show(); + selectButton->show(); + moveButton->show(); +} + + +void +GNEViewNetHelper::CommonCheckableButtons::hideCommonCheckableButtons() { + inspectButton->hide(); + deleteButton->hide(); + selectButton->hide(); + moveButton->hide(); +} + + +void +GNEViewNetHelper::CommonCheckableButtons::disableCommonCheckableButtons() { + inspectButton->setChecked(false); + deleteButton->setChecked(false); + selectButton->setChecked(false); + moveButton->setChecked(false); +} + + +void +GNEViewNetHelper::CommonCheckableButtons::updateCommonCheckableButtons() { + inspectButton->update(); + deleteButton->update(); + selectButton->update(); + moveButton->update(); +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::NetworkCheckableButtons - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::NetworkCheckableButtons::NetworkCheckableButtons(GNEViewNet* viewNet) : + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::NetworkCheckableButtons::buildNetworkCheckableButtons() { + // create edge + createEdgeButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset create edge mode\tMode for creating junction and edges.", + GUIIconSubSys::getIcon(ICON_MODECREATEEDGE), myViewNet, MID_HOTKEY_E_EDGEMODE, GUIDesignButtonToolbarCheckable); + createEdgeButton->create(); + // connection mode + connectionButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset connection mode\tMode for edit connections between lanes.", + GUIIconSubSys::getIcon(ICON_MODECONNECTION), myViewNet, MID_HOTKEY_C_CONNECTMODE, GUIDesignButtonToolbarCheckable); + connectionButton->create(); + // prohibition mode + prohibitionButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset prohibition mode\tMode for editing connection prohibitions.", + GUIIconSubSys::getIcon(ICON_MODEPROHIBITION), myViewNet, MID_HOTKEY_W_PROHIBITIONMODE, GUIDesignButtonToolbarCheckable); + prohibitionButton->create(); + // traffic light mode + trafficLightButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset traffic light mode\tMode for edit traffic lights over junctions.", + GUIIconSubSys::getIcon(ICON_MODETLS), myViewNet, MID_HOTKEY_T_TLSMODE_VTYPEMODE, GUIDesignButtonToolbarCheckable); + trafficLightButton->create(); + // additional mode + additionalButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset additional mode\tMode for adding additional elements.", + GUIIconSubSys::getIcon(ICON_MODEADDITIONAL), myViewNet, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE, GUIDesignButtonToolbarCheckable); + additionalButton->create(); + // crossing mode + crossingButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset crossing mode\tMode for creating crossings between edges.", + GUIIconSubSys::getIcon(ICON_MODECROSSING), myViewNet, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE, GUIDesignButtonToolbarCheckable); + crossingButton->create(); + // TAZ Mode + TAZButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset TAZ mode\tMode for creating Traffic Assignment Zones.", + GUIIconSubSys::getIcon(ICON_MODETAZ), myViewNet, MID_HOTKEY_Z_TAZMODE, GUIDesignButtonToolbarCheckable); + TAZButton->create(); + // shape mode + shapeButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tset polygon mode\tMode for creating polygons and POIs.", + GUIIconSubSys::getIcon(ICON_MODEPOLYGON), myViewNet, MID_HOTKEY_P_POLYGONMODE, GUIDesignButtonToolbarCheckable); + shapeButton->create(); + // always recalc after creating new elements + myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes->recalc(); +} + + +void +GNEViewNetHelper::NetworkCheckableButtons::showNetworkCheckableButtons() { + createEdgeButton->show(); + connectionButton->show(); + trafficLightButton->show(); + additionalButton->show(); + crossingButton->show(); + TAZButton->show(); + shapeButton->show(); + prohibitionButton->show(); +} + + +void +GNEViewNetHelper::NetworkCheckableButtons::hideNetworkCheckableButtons() { + createEdgeButton->hide(); + connectionButton->hide(); + trafficLightButton->hide(); + additionalButton->hide(); + crossingButton->hide(); + TAZButton->hide(); + shapeButton->hide(); + prohibitionButton->hide(); +} + + +void +GNEViewNetHelper::NetworkCheckableButtons::disableNetworkCheckableButtons() { + createEdgeButton->setChecked(false); + connectionButton->setChecked(false); + trafficLightButton->setChecked(false); + additionalButton->setChecked(false); + crossingButton->setChecked(false); + TAZButton->setChecked(false); + shapeButton->setChecked(false); + prohibitionButton->setChecked(false); +} + + +void +GNEViewNetHelper::NetworkCheckableButtons::updateNetworkCheckableButtons() { + createEdgeButton->update(); + connectionButton->update(); + trafficLightButton->update(); + additionalButton->update(); + crossingButton->update(); + TAZButton->update(); + shapeButton->update(); + prohibitionButton->update(); +} + +// --------------------------------------------------------------------------- +// GNEViewNetHelper::DemandCheckableButtons - methods +// --------------------------------------------------------------------------- + +GNEViewNetHelper::DemandCheckableButtons::DemandCheckableButtons(GNEViewNet* viewNet) : + routeButton(nullptr), + myViewNet(viewNet) { +} + + +void +GNEViewNetHelper::DemandCheckableButtons::buildDemandCheckableButtons() { + // route mode + routeButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tcreate route mode\tMode for creating routes.", + GUIIconSubSys::getIcon(ICON_MODEROUTE), myViewNet, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE, GUIDesignButtonToolbarCheckable); + routeButton->create(); + // vehicle mode + vehicleButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tcreate vehicle mode\tMode for creating vehicles.", + GUIIconSubSys::getIcon(ICON_MODEVEHICLE), myViewNet, MID_HOTKEY_V_VEHICLEMODE, GUIDesignButtonToolbarCheckable); + vehicleButton->create(); + // vehicle type mode + vehicleTypeButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tcreate vehicle type mode\tMode for creating vehicle types.", + GUIIconSubSys::getIcon(ICON_MODEVEHICLETYPE), myViewNet, MID_HOTKEY_T_TLSMODE_VTYPEMODE, GUIDesignButtonToolbarCheckable); + vehicleTypeButton->create(); + // stop mode + stopButton = new MFXCheckableButton(false, myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes, "\tcreate stop mode\tMode for creating stops.", + GUIIconSubSys::getIcon(ICON_MODESTOP), myViewNet, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE, GUIDesignButtonToolbarCheckable); + stopButton->create(); + // always recalc after creating new elements + myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes->recalc(); +} + + +void +GNEViewNetHelper::DemandCheckableButtons::showDemandCheckableButtons() { + routeButton->show(); + vehicleButton->show(); + vehicleTypeButton->show(); + stopButton->show(); +} + + +void +GNEViewNetHelper::DemandCheckableButtons::hideDemandCheckableButtons() { + routeButton->hide(); + vehicleButton->hide(); + vehicleTypeButton->hide(); + stopButton->hide(); +} + + +void +GNEViewNetHelper::DemandCheckableButtons::disableDemandCheckableButtons() { + routeButton->setChecked(false); + vehicleButton->setChecked(false); + vehicleTypeButton->setChecked(false); + stopButton->setChecked(false); +} + + +void +GNEViewNetHelper::DemandCheckableButtons::updateDemandCheckableButtons() { + routeButton->update(); + vehicleButton->update(); + vehicleTypeButton->update(); + stopButton->update(); +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEViewNetHelper.h sumo-1.2.0+dfsg1/src/netedit/GNEViewNetHelper.h --- sumo-1.1.0+dfsg1/src/netedit/GNEViewNetHelper.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEViewNetHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,785 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GNEViewNetHelper.h +/// @author Pablo Alvarez Lopez +/// @date Feb 2019 +/// @version $Id$ +/// +// A file used to reduce the size of GNEViewNet.h grouping structs and classes +/****************************************************************************/ +#ifndef GNEViewNetHelper_h +#define GNEViewNetHelper_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// enum +// =========================================================================== + +/// @brie enum for supermodes +enum Supermode { + /// @brief empty super mode + GNE_SUPERMODE_NONE, + /// @brief Network mode (Edges, junctions, etc..) + GNE_SUPERMODE_NETWORK, + ///@brief Demanding mode (Routes, Vehicles etc..) + GNE_SUPERMODE_DEMAND +}; + +/// @brie enum for network edit modes +enum NetworkEditMode { + /// @brief empty Network mode + GNE_NMODE_NONE, + ///@brief mode for inspecting network elements + GNE_NMODE_INSPECT, + ///@brief mode for deleting network elements + GNE_NMODE_DELETE, + ///@brief mode for selecting network elements + GNE_NMODE_SELECT, + ///@brief mode for moving network elements + GNE_NMODE_MOVE, + ///@brief mode for creating new edges + GNE_NMODE_CREATE_EDGE, + ///@brief mode for connecting lanes + GNE_NMODE_CONNECT, + ///@brief mode for editing tls + GNE_NMODE_TLS, + ///@brief Mode for editing additionals + GNE_NMODE_ADDITIONAL, + ///@brief Mode for editing crossing + GNE_NMODE_CROSSING, + ///@brief Mode for editing TAZ + GNE_NMODE_TAZ, + ///@brief Mode for editing Polygons + GNE_NMODE_POLYGON, + ///@brief Mode for editing connection prohibitions + GNE_NMODE_PROHIBITION +}; + +/// @brie enum for demand edit modes +enum DemandEditMode { + /// @brief empty Demand mode + GNE_DMODE_NONE, + ///@brief mode for inspecting demand elements + GNE_DMODE_INSPECT, + ///@brief mode for deleting demand elements + GNE_DMODE_DELETE, + ///@brief mode for selecting demand elements + GNE_DMODE_SELECT, + ///@brief mode for moving demand elements + GNE_DMODE_MOVE, + ///@brief Mode for editing routes + GNE_DMODE_ROUTES, + ///@brief Mode for editing vehicles + GNE_DMODE_VEHICLES, + ///@brief Mode for editing vehicle types + GNE_DMODE_VEHICLETYPES, + ///@brief Mode for editing stops + GNE_DMODE_STOP +}; + +// =========================================================================== +// class declarations +// =========================================================================== + +// main elements +class GNEViewParent; +class GNEViewNet; +class GNEUndoList; +class GNEFrame; +class GNEAttributeCarrier; +// net elements +class GNENet; +class GNENetElement; +class GNEJunction; +class GNEEdge; +class GNELane; +class GNEConnection; +class GNECrossing; +class GNEInternalLane; +// additional elements +class GNEAdditional; +class GNEShape; +class GNEPoly; +class GNEPOI; +class GNETAZ; +// demand elements +class GNEDemandElement; +class GNEVehicleType; +class GNEFlow; +class GNEVehicle; +class GNEtrip; + +// =========================================================================== +// classes and structs definitions +// =========================================================================== + +struct GNEViewNetHelper { + + /// @brief class used to group all variables related with objects under cursor after a click over view + class ObjectsUnderCursor { + public: + /// @brief constructor + ObjectsUnderCursor(); + + /// @brief update objects under cursor (Called only in onLeftBtnPress(...) function) + void updateObjectUnderCursor(const std::vector& GUIGlObjects, GNEPoly* editedPolyShape); + + /// @brief swap lane to edge + void swapLane2Edge(); + + /// @brief set created junction + void setCreatedJunction(GNEJunction* junction); + + /// @brief get front GUI GL ID (or a pointer to nullptr if there isn't) + GUIGlID getGlIDFront() const; + + /// @brief get front GUI GL object type (or a pointer to nullptr if there isn't) + GUIGlObjectType getGlTypeFront() const; + + /// @brief get front attribute carrier (or a pointer to nullptr if there isn't) + GNEAttributeCarrier* getAttributeCarrierFront() const; + + /// @brief get front net element (or a pointer to nullptr if there isn't) + GNENetElement* getNetElementFront() const; + + /// @brief get front additional element (or a pointer to nullptr if there isn't) + GNEAdditional* getAdditionalFront() const; + + /// @brief get front shape element (or a pointer to nullptr if there isn't) + GNEShape* getShapeFront() const; + + /// @brief get front net element element (or a pointer to nullptr if there isn't) + GNEDemandElement* getDemandElementFront() const; + + /// @brief get front junction (or a pointer to nullptr if there isn't) + GNEJunction* getJunctionFront() const; + + /// @brief get front edge (or a pointer to nullptr if there isn't) + GNEEdge* getEdgeFront() const; + + /// @brief get front lane (or a pointer to nullptr if there isn't) + GNELane* getLaneFront() const; + + /// @brief get front crossing (or a pointer to nullptr if there isn't) + GNECrossing* getCrossingFront() const; + + /// @brief get front connection (or a pointer to nullptr if there isn't) + GNEConnection* getConnectionFront() const; + + /// @brief get front TAZ (or a pointer to nullptr if there isn't) + GNETAZ* getTAZFront() const; + + /// @brief get front POI (or a pointer to nullptr if there isn't) + GNEPOI* getPOIFront() const; + + /// @brief get front Poly (or a pointer to nullptr if there isn't) + GNEPoly* getPolyFront() const; + + /// @brief get vector with clicked ACs + const std::vector& getClickedAttributeCarriers() const; + + private: + /// @brief vector with the clicked GUIGlObjects + std::vector myGUIGlObjects; + + /// @brief vector with the clicked attribute carriers + std::vector myAttributeCarriers; + + /// @brief vector with the clicked net elements + std::vector myNetElements; + + /// @brief vector with the clicked additional elements + std::vector myAdditionals; + + /// @brief vector with the clicked shape elements (Poly and POIs) + std::vector myShapes; + + /// @brief vector with the clicked demand elements + std::vector myDemandElements; + + /// @brief vector with the clicked junctions + std::vector myJunctions; + + /// @brief vector with the clicked edges + std::vector myEdges; + + /// @brief vector with the clicked lanes + std::vector myLanes; + + /// @brief vector with the clicked crossings + std::vector myCrossings; + + /// @brief vector with the clicked connections + std::vector myConnections; + + /// @brief vector with the clicked TAZ elements (needed because uses a shape instead a position) + std::vector myTAZs; + + /// @brief vector with the clicked POIs + std::vector myPOIs; + + /// @brief vector with the clicked Polys + std::vector myPolys; + + /// @brief invert GUIGlObjects + void sortGUIGlObjectsByAltitude(const std::vector& GUIGlObjects); + + /// @brief Invalidated copy constructor. + ObjectsUnderCursor(const ObjectsUnderCursor&) = delete; + + /// @brief Invalidated assignment operator. + ObjectsUnderCursor& operator=(const ObjectsUnderCursor&) = delete; + }; + + /// @brief class used to group all variables related with key pressed after certain events + struct KeyPressed { + + /// @brief constructor + KeyPressed(); + + /// @brief update status of KeyPressed + void update(void* eventData); + + /// @brief check if SHIFT key was pressed during click + bool shiftKeyPressed() const; + + /// @brief check if CONTROL key was pressed during click + bool controlKeyPressed() const; + + private: + /// @brief information of event + FXEvent* myEventInfo; + + /// @brief Invalidated copy constructor. + KeyPressed(const KeyPressed&) = delete; + + /// @brief Invalidated assignment operator. + KeyPressed& operator=(const KeyPressed&) = delete; + }; + + /// @brief struct used to group all variables related with Supermodes + struct EditModes { + + /// @brief default constructor + EditModes(GNEViewNet* viewNet); + + /// @brief build checkable buttons + void buildSuperModeButtons(); + + /// @brief set Network edit mode + void setSupermode(Supermode supermode); + + /// @brief set Network edit mode + void setNetworkEditMode(NetworkEditMode networkMode, bool force = false); + + /// @brief set Demand edit mode + void setDemandEditMode(DemandEditMode demandMode, bool force = false); + + /// @brief the current supermode + Supermode currentSupermode; + + /// @brief the current Network edit mode + NetworkEditMode networkEditMode; + + /// @brief the current Demand edit mode + DemandEditMode demandEditMode; + + /// @brief chekable button for supermode Network + MFXCheckableButton* networkButton; + + /// @brief chekable button for supermode Demand + MFXCheckableButton* demandButton; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + + /// @brief Invalidated copy constructor. + EditModes(const EditModes&) = delete; + + /// @brief Invalidated assignment operator. + EditModes& operator=(const EditModes&) = delete; + }; + + /// @brief struct used to group all variables related to view options + struct ViewOptions { + + /// @brief default constructor + ViewOptions(GNEViewNet* viewNet); + + /// @brief build menu checks + void buildViewOptionsMenuChecks(); + + /// @brief hide all options menu checks + void hideViewOptionsMenuChecks(); + + /// @brief check if show demand elements checkbox is enabled + bool showDemandElements() const; + + /// @brief check if select edges checkbox is enabled + bool selectEdges() const; + + /// @brief check if select show connections checkbox is enabled + bool showConnections() const; + + /// @brief menu check to show Demand Elements + FXMenuCheck* menuCheckShowDemandElements; + + /// @brief menu check to select only edges + FXMenuCheck* menuCheckSelectEdges; + + /// @brief menu check to show connections + FXMenuCheck* menuCheckShowConnections; + + /// @brief menu check to hide connections in connect mode + FXMenuCheck* menuCheckHideConnections; + + /// @brief menu check to extend to edge nodes + FXMenuCheck* menuCheckExtendSelection; + + /// @brief menu check to set change all phases + FXMenuCheck* menuCheckChangeAllPhases; + + /// @brief show grid button + FXMenuCheck* menuCheckShowGrid; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + + /// @brief Invalidated copy constructor. + ViewOptions(const ViewOptions&) = delete; + + /// @brief Invalidated assignment operator. + ViewOptions& operator=(const ViewOptions&) = delete; + }; + + /// @brief struct used to group all variables related to create edges + struct MoveOptions { + + /// @brief default constructor + MoveOptions(GNEViewNet* viewNet); + + /// @brief build menu checks + void buildMoveOptionMenuChecks(); + + /// @brief hide all MenuChecks + void hideMoveOptionMenuChecks(); + + /// @brief check if we're editing elevation + bool editingElevation() const; + + /// @brief whether we should warn about merging junctions + FXMenuCheck* warnAboutMerge; + + /// @brief show connection as buuble in "Move" mode. + FXMenuCheck* showJunctionBubble; + + /// @brief apply movement to elevation + FXMenuCheck* moveElevation; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + + /// @brief Invalidated copy constructor. + MoveOptions(const MoveOptions&) = delete; + + /// @brief Invalidated assignment operator. + MoveOptions& operator=(const MoveOptions&) = delete; + }; + + /// @brief struct used to group all variables related with movement of single elements + struct MoveSingleElementValues { + + /// @brief constructor + MoveSingleElementValues(GNEViewNet* viewNet); + + /// @brief begin move single element in Network mode + bool beginMoveSingleElementNetworkMode(); + + /// @brief begin move single element in Demand mode + bool beginMoveSingleElementDemandMode(); + + /// @brief move single element in Network AND Demand mode + void moveSingleElement(); + + /// @brief finish moving single elements in Network AND Demand mode + void finishMoveSingleElement(); + + /// @brief original shape of element before start moving (used by polygons, edges, etc., needed for commmit position changes) + PositionVector originalShapeBeforeMoving; + + /// @brief index moved + int movingIndexShape; + + /// @brief original position of geometry position (needed for commmit position changes) + Position originalPositionInView; + + private: + /// calculate Poly movement values (Position, Index, etc.) + bool calculatePolyValues(); + + /// calculate Edge movement values (Position, Index, etc.) + bool calculateEdgeValues(); + + /// calculate TAZ movement values (Position, Index, etc.) + bool calculateTAZValues(); + + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + + /// @brief relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user doesn't click exactly over the center of element) + Position myRelativeClickedPosition; + + /// @brief bool to indicate that startPos of an edge is being moved + bool myMovingStartPos; + + /// @brief bool to indicate that end pos of an edge is being moved + bool myMovingEndPos; + + /// @brief the Junction to be moved. + GNEJunction* myJunctionToMove; + + /// @brief the edge of which geometry is being moved + GNEEdge* myEdgeToMove; + + /// @brief the poly of which geometry is being moved + GNEPoly* myPolyToMove; + + /// @brief the poi which position is being moved + GNEPOI* myPOIToMove; + + /// @brief the additional element which position is being moved + GNEAdditional* myAdditionalToMove; + + /// @brief the demand element which position is being moved + GNEDemandElement* myDemandElementToMove; + + /// @brief the TAZ element which their Shape is being moved (it's the only additional with a shape instead a position) + GNETAZ* myTAZToMove; + }; + + /// @brief struct used to group all variables related with movement of groups of elements + struct MoveMultipleElementValues { + + /// @brief constructor + MoveMultipleElementValues(GNEViewNet* viewNet); + + /// @brief begin move selection + void beginMoveSelection(GNEAttributeCarrier* originAC); + + /// @brief move selection + void moveSelection(); + + /// @brief finish moving selection + void finishMoveSelection(); + + /// @brief check if currently there is element being moved + bool isMovingSelection() const; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + + /// @brief original clicked position when moveSelection is called (used for calculate offset during moveSelection()) + Position myClickedPosition; + + /// @brief flag to check if a selection is being moved + bool myMovingSelection; + + /// @brief container used for move junctions + std::map myMovedJunctionOriginPositions; + + /// @brief container used for move entire edges + std::map myMovedEdgesOriginShape; + + /// @brief container used for move GeometryPoints of edges + std::map myMovedEgdesGeometryPoints; + }; + + /// @brief struct used to group all variables related with movement of groups of elements + struct VehicleOptions { + + /// @brief constructor + VehicleOptions(GNEViewNet* viewNet); + + /// @brief build menu checks + void buildVehicleOptionsMenuChecks(); + + /// @brief hide all options menu checks + void hideVehicleOptionsMenuChecks(); + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + }; + + /// @brief struct used to group all variables related with movement of groups of elements + struct VehicleTypeOptions { + + /// @brief constructor + VehicleTypeOptions(GNEViewNet* viewNet); + + /// @brief build menu checks + void buildVehicleTypeOptionsMenuChecks(); + + /// @brief hide all options menu checks + void hideVehicleTypeOptionsMenuChecks(); + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + }; + + /// @brief struct used to group all variables related with selecting using a square or polygon + /// @note in the future the variables used for selecting throught a polygon will be placed here + struct SelectingArea { + + /// @brief default constructor + SelectingArea(GNEViewNet* viewNet); + + /// @brief begin rectangle selection + void beginRectangleSelection(); + + /// @brief move rectangle selection + void moveRectangleSelection(); + + /// @brief finish rectangle selection + void finishRectangleSelection(); + + /// @brief process rectangle Selection + void processRectangleSelection(); + + /// @brief process rectangle Selection (only limited to Edges) + std::vector processEdgeRectangleSelection(); + + /// @brief process shape selection + void processShapeSelection(const PositionVector& shape); + + /// @brief draw rectangle selection + void drawRectangleSelection(const RGBColor& color) const; + + /// @brief whether we have started rectangle-selection + bool selectingUsingRectangle; + + /// @brief whether we have started rectangle-selection + bool startDrawing; + + private: + /// @brief Process boundary Selection + void processBoundarySelection(const Boundary& boundary); + + /// @brief firstcorner of the rectangle-selection + Position selectionCorner1; + + /// @brief second corner of the rectangle-selection + Position selectionCorner2; + + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + }; + + /// @brief struct used to group all variables related with testing + struct TestingMode { + + /// @brief default constructor + TestingMode(GNEViewNet* viewNet); + + /// @brief init testing mode + void initTestingMode(); + + /// @brief draw testing element + void drawTestingElements(GUIMainWindow* mainWindow); + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + + /// @brief flag to enable or disable testing mode + bool myTestingEnabled; + + /// @brief Width of viewNet in testing mode + int myTestingWidth; + + /// @brief Height of viewNet in testing mode + int myTestingHeight; + }; + + /// @brief struct used to group all variables related to create edges + struct CreateEdgeOptions { + + /// @brief default constructor + CreateEdgeOptions(GNEViewNet* viewNet); + + /// @brief build menu checks + void buildCreateEdgeOptionMenuChecks(); + + /// @brief hide all MenuChecks + void hideCreateEdgeOptionMenuChecks(); + + /// @brief whether the endpoint for a created edge should be set as the new source + FXMenuCheck* chainEdges; + + /// @brief create auto create opposite edge + FXMenuCheck* autoOppositeEdge; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + }; + + /// @brief struct used to group all variables related with common chekable Buttons + struct CommonCheckableButtons { + + /// @brief default constructor + CommonCheckableButtons(GNEViewNet* viewNet); + + /// @brief build checkable buttons + void buildCommonCheckableButtons(); + + /// @brief show all Common Checkable Buttons + void showCommonCheckableButtons(); + + /// @brief hide all Common Checkable Buttons + void hideCommonCheckableButtons(); + + /// @brief hide all options menu checks + void disableCommonCheckableButtons(); + + /// @brief update Common checkable buttons + void updateCommonCheckableButtons(); + + /// @brief chekable button for edit mode inspect + MFXCheckableButton* inspectButton; + + /// @brief chekable button for edit mode delete + MFXCheckableButton* deleteButton; + + /// @brief chekable button for edit mode select + MFXCheckableButton* selectButton; + + /// @brief chekable button for edit mode move + MFXCheckableButton* moveButton; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + }; + + /// @brief struct used to group all variables related with Network chekable Buttons + struct NetworkCheckableButtons { + + /// @brief default constructor + NetworkCheckableButtons(GNEViewNet* viewNet); + + /// @brief build checkable buttons + void buildNetworkCheckableButtons(); + + /// @brief show all Network Checkable Buttons + void showNetworkCheckableButtons(); + + /// @brief hide all Network Checkable Buttons + void hideNetworkCheckableButtons(); + + /// @brief hide all options menu checks + void disableNetworkCheckableButtons(); + + /// @brief update network checkable buttons + void updateNetworkCheckableButtons(); + + /// @brief chekable button for edit mode create edge + MFXCheckableButton* createEdgeButton; + + /// @brief chekable button for edit mode connection + MFXCheckableButton* connectionButton; + + /// @brief chekable button for edit mode traffic light + MFXCheckableButton* trafficLightButton; + + /// @brief chekable button for edit mode additional + MFXCheckableButton* additionalButton; + + /// @brief chekable button for edit mode crossing + MFXCheckableButton* crossingButton; + + /// @brief chekable button for edit mode TAZ + MFXCheckableButton* TAZButton; + + /// @brief chekable button for edit mode shape + MFXCheckableButton* shapeButton; + + /// @brief checkable button for edit mode polygon + MFXCheckableButton* prohibitionButton; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + }; + + /// @brief struct used to group all variables related with Demand checkable Buttons + struct DemandCheckableButtons { + + /// @brief default constructor + DemandCheckableButtons(GNEViewNet* viewNet); + + /// @brief build checkable buttons + void buildDemandCheckableButtons(); + + /// @brief show all Demand Checkable Buttons + void showDemandCheckableButtons(); + + /// @brief hide all Demand Checkable Buttons + void hideDemandCheckableButtons(); + + /// @brief hide all options menu checks + void disableDemandCheckableButtons(); + + /// @brief update Demand checkable buttons + void updateDemandCheckableButtons(); + + /// @brief chekable button for edit mode create routes + MFXCheckableButton* routeButton; + + /// @brief chekable button for edit mode create vehicles + MFXCheckableButton* vehicleButton; + + /// @brief chekable button for edit mode create vehicle type + MFXCheckableButton* vehicleTypeButton; + + /// @brief chekable button for edit mode create stops + MFXCheckableButton* stopButton; + + private: + /// @brief pointer to viewNet + GNEViewNet* myViewNet; + }; +}; + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEViewParent.cpp sumo-1.2.0+dfsg1/src/netedit/GNEViewParent.cpp --- sumo-1.1.0+dfsg1/src/netedit/GNEViewParent.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEViewParent.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,14 +26,19 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include +#include +#include +#include #include #include #include @@ -42,6 +47,7 @@ #include #include "GNEApplicationWindow.h" +#include "GNEViewNet.h" #include "GNENet.h" #include "GNEUndoList.h" #include "GNEViewParent.h" @@ -73,17 +79,17 @@ GNEViewParent::GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu, const FXString& name, GNEApplicationWindow* parentWindow, FXGLCanvas* share, GNENet* net, GNEUndoList* undoList, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) : - GUIGlChildWindow(p, parentWindow, mdimenu, name, ic, opts, x, y, w, h), + GUIGlChildWindow(p, parentWindow, mdimenu, name, parentWindow->getToolbarsGrip().navigation, ic, opts, x, y, w, h), myGNEAppWindows(parentWindow) { // Add child to parent myParent->addGLChild(this); - // add undo/redo buttons - new FXButton(myNavigationToolBar, "\tUndo\tUndo the last Change.", GUIIconSubSys::getIcon(ICON_UNDO), parentWindow->getUndoList(), FXUndoList::ID_UNDO, GUIDesignButtonToolbar); - new FXButton(myNavigationToolBar, "\tRedo\tRedo the last Change.", GUIIconSubSys::getIcon(ICON_REDO), parentWindow->getUndoList(), FXUndoList::ID_REDO, GUIDesignButtonToolbar); - // Create Vertical separator - new FXVerticalSeparator(myNavigationToolBar, GUIDesignVerticalSeparator); + new FXVerticalSeparator(myGripNavigationToolbar, GUIDesignVerticalSeparator); + + // add undo/redo buttons + new FXButton(myGripNavigationToolbar, "\tUndo\tUndo the last Change.", GUIIconSubSys::getIcon(ICON_UNDO), parentWindow, MID_HOTKEY_CTRL_Z_UNDO, GUIDesignButtonToolbar); + new FXButton(myGripNavigationToolbar, "\tRedo\tRedo the last Change.", GUIIconSubSys::getIcon(ICON_REDO), parentWindow, MID_HOTKEY_CTRL_Y_REDO, GUIDesignButtonToolbar); // Create Frame Splitter myFramesSplitter = new FXSplitter(myContentFrame, this, MID_GNE_VIEWPARENT_FRAMEAREAWIDTH, GUIDesignSplitter | SPLITTER_HORIZONTAL); @@ -101,12 +107,15 @@ FXComposite* tmp = new FXComposite(this); // Create view net - GNEViewNet* viewNet = new GNEViewNet(tmp, myViewArea, *myParent, this, net, undoList, myParent->getGLVisual(), share, myNavigationToolBar); + GNEViewNet* viewNet = new GNEViewNet(tmp, myViewArea, *myParent, this, net, undoList, myParent->getGLVisual(), share); + + // show toolbar grips + myGNEAppWindows->getToolbarsGrip().buildMenuToolbarsGrip(); // Set pointer myView with the created view net myView = viewNet; - // Create frames + // Create Network frames myFrames.inspectorFrame = new GNEInspectorFrame(myFramesArea, viewNet); myFrames.selectorFrame = new GNESelectorFrame(myFramesArea, viewNet); myFrames.connectorFrame = new GNEConnectorFrame(myFramesArea, viewNet); @@ -117,6 +126,13 @@ myFrames.TAZFrame = new GNETAZFrame(myFramesArea, viewNet); myFrames.deleteFrame = new GNEDeleteFrame(myFramesArea, viewNet); myFrames.polygonFrame = new GNEPolygonFrame(myFramesArea, viewNet); + myFrames.createEdgeFrame = new GNECreateEdgeFrame(myFramesArea, viewNet); + + // Create Demand frames + myFrames.routeFrame = new GNERouteFrame(myFramesArea, viewNet); + myFrames.vehicleFrame = new GNEVehicleFrame(myFramesArea, viewNet); + myFrames.vehicleTypeFrame = new GNEVehicleTypeFrame(myFramesArea, viewNet); + myFrames.stopFrame = new GNEStopFrame(myFramesArea, viewNet); // Update frame areas after creation onCmdUpdateFrameAreaWidth(nullptr, 0, nullptr); @@ -133,6 +149,8 @@ GNEViewParent::~GNEViewParent() { + // delete toolbar grips + myGNEAppWindows->getToolbarsGrip().destroyParentToolbarsGrips(); // Remove child before remove myParent->removeGLChild(this); } @@ -143,6 +161,13 @@ myFrames.hideFrames(); } + +GNEFrame* +GNEViewParent::getCurrentShownFrame() const { + return myFrames.getCurrentShownFrame(); +} + + GNEInspectorFrame* GNEViewParent::getInspectorFrame() const { return myFrames.inspectorFrame; @@ -179,7 +204,7 @@ } -GNETAZFrame* +GNETAZFrame* GNEViewParent::getTAZFrame() const { return myFrames.TAZFrame; } @@ -203,6 +228,36 @@ } +GNECreateEdgeFrame* +GNEViewParent::getCreateEdgeFrame() const { + return myFrames.createEdgeFrame; +} + + +GNERouteFrame* +GNEViewParent::getRouteFrame() const { + return myFrames.routeFrame; +} + + +GNEVehicleFrame* +GNEViewParent::getVehicleFrame() const { + return myFrames.vehicleFrame; +} + + +GNEVehicleTypeFrame* +GNEViewParent::getVehicleTypeFrame() const { + return myFrames.vehicleTypeFrame; +} + + +GNEStopFrame* +GNEViewParent::getStopFrame() const { + return myFrames.stopFrame; +} + + void GNEViewParent::showFramesArea() { // show and recalc framesArea if at least there is a frame shown @@ -295,7 +350,7 @@ long GNEViewParent::onCmdClose(FXObject*, FXSelector /* sel */, void*) { - myParent->handle(this, FXSEL(SEL_COMMAND, MID_CLOSE), nullptr); + myParent->handle(this, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION), nullptr); return 1; } @@ -426,18 +481,11 @@ return 0; } - -bool -GNEViewParent::isSelected(GUIGlObject* o) const { - GNEAttributeCarrier* ac = dynamic_cast(o); - return ac && ac->isAttributeCarrierSelected(); -} - // --------------------------------------------------------------------------- // GNEViewParent::Frames - methods // --------------------------------------------------------------------------- -GNEViewParent::Frames::Frames() : +GNEViewParent::Frames::Frames() : inspectorFrame(nullptr), selectorFrame(nullptr), connectorFrame(nullptr), @@ -447,7 +495,12 @@ TAZFrame(nullptr), deleteFrame(nullptr), polygonFrame(nullptr), - prohibitionFrame(nullptr) { + prohibitionFrame(nullptr), + createEdgeFrame(nullptr), + routeFrame(nullptr), + vehicleFrame(nullptr), + vehicleTypeFrame(nullptr), + stopFrame(nullptr) { } @@ -463,10 +516,17 @@ deleteFrame->hide(); polygonFrame->hide(); prohibitionFrame->hide(); + /** currently createEdgeFrame unused + createEdgeFrame->hide(); + **/ + routeFrame->hide(); + vehicleFrame->hide(); + vehicleTypeFrame->hide(); + stopFrame->hide(); } -void +void GNEViewParent::Frames::setWidth(int frameWidth) { // set width in all frames inspectorFrame->setFrameWidth(frameWidth); @@ -479,10 +539,17 @@ deleteFrame->setFrameWidth(frameWidth); polygonFrame->setFrameWidth(frameWidth); prohibitionFrame->setFrameWidth(frameWidth); + /** currently createEdgeFrame unused + createEdgeFrame->setFrameWidth(frameWidth); + **/ + routeFrame->setFrameWidth(frameWidth); + vehicleFrame->setFrameWidth(frameWidth); + vehicleTypeFrame->setFrameWidth(frameWidth); + stopFrame->setFrameWidth(frameWidth); } -bool +bool GNEViewParent::Frames::isFrameShown() const { // check all frames if (inspectorFrame->shown()) { @@ -505,16 +572,69 @@ return true; } else if (prohibitionFrame->shown()) { return true; + /** currently createEdgeFrame unused + } else if (createEdgeFrame->shown()) { + return true; + **/ + } else if (routeFrame->shown()) { + return true; + } else if (vehicleFrame->shown()) { + return true; + } else if (vehicleTypeFrame->shown()) { + return true; + } else if (stopFrame->shown()) { + return true; } else { return false; } } + +GNEFrame* +GNEViewParent::Frames::getCurrentShownFrame() const { + // check all frames + if (inspectorFrame->shown()) { + return inspectorFrame; + } else if (selectorFrame->shown()) { + return selectorFrame; + } else if (connectorFrame->shown()) { + return connectorFrame; + } else if (TLSEditorFrame->shown()) { + return TLSEditorFrame; + } else if (additionalFrame->shown()) { + return additionalFrame; + } else if (crossingFrame->shown()) { + return crossingFrame; + } else if (TAZFrame->shown()) { + return TAZFrame; + } else if (deleteFrame->shown()) { + return deleteFrame; + } else if (polygonFrame->shown()) { + return polygonFrame; + } else if (prohibitionFrame->shown()) { + return prohibitionFrame; + /** currently createEdgeFrame unused + } else if (createEdgeFrame->shown()) { + return true; + **/ + } else if (routeFrame->shown()) { + return routeFrame; + } else if (vehicleFrame->shown()) { + return vehicleFrame; + } else if (vehicleTypeFrame->shown()) { + return vehicleTypeFrame; + } else if (stopFrame->shown()) { + return stopFrame; + } else { + return nullptr; + } +} + // --------------------------------------------------------------------------- // GNEViewParent::ACChoosers - methods // --------------------------------------------------------------------------- -GNEViewParent::ACChoosers::ACChoosers() : +GNEViewParent::ACChoosers::ACChoosers() : ACChooserJunction(nullptr), ACChooserEdges(nullptr), ACChooserTLS(nullptr), diff -Nru sumo-1.1.0+dfsg1/src/netedit/GNEViewParent.h sumo-1.2.0+dfsg1/src/netedit/GNEViewParent.h --- sumo-1.1.0+dfsg1/src/netedit/GNEViewParent.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/GNEViewParent.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,20 +32,26 @@ // =========================================================================== // class declarations // =========================================================================== -class GNEDialogACChooser; -class GNENet; -class GNEUndoList; +class GNEAdditionalFrame; class GNEApplicationWindow; -class GNEInspectorFrame; -class GNESelectorFrame; class GNEConnectorFrame; -class GNETLSEditorFrame; -class GNEAdditionalFrame; +class GNECreateEdgeFrame; class GNECrossingFrame; -class GNETAZFrame; class GNEDeleteFrame; +class GNEDialogACChooser; +class GNEInspectorFrame; +class GNENet; +class GNEFrame; class GNEPolygonFrame; class GNEProhibitionFrame; +class GNERouteFrame; +class GNESelectorFrame; +class GNETAZFrame; +class GNETLSEditorFrame; +class GNEUndoList; +class GNEVehicleFrame; +class GNEVehicleTypeFrame; +class GNEStopFrame; // =========================================================================== // class declarations @@ -92,36 +98,54 @@ /// @brief hide all frames void hideAllFrames(); - /// @brief get frame for GNE_MODE_INSPECT + /// @brief get current frame (note: it can be null) + GNEFrame* getCurrentShownFrame() const; + + /// @brief get frame for GNE_NMODE_INSPECT GNEInspectorFrame* getInspectorFrame() const; - /// @brief get frame for GNE_MODE_SELECT + /// @brief get frame for GNE_NMODE_SELECT GNESelectorFrame* getSelectorFrame() const; - /// @brief get frame for GNE_MODE_CONNECT + /// @brief get frame for GNE_NMODE_CONNECT GNEConnectorFrame* getConnectorFrame() const; - /// @brief get frame for GNE_MODE_TLS + /// @brief get frame for GNE_NMODE_TLS GNETLSEditorFrame* getTLSEditorFrame() const; - /// @brief get frame for GNE_MODE_ADDITIONAL + /// @brief get frame for GNE_NMODE_ADDITIONAL GNEAdditionalFrame* getAdditionalFrame() const; - /// @brief get frame for GNE_MODE_CROSSING + /// @brief get frame for GNE_NMODE_CROSSING GNECrossingFrame* getCrossingFrame() const; - /// @brief get frame for GNE_MODE_TAZ + /// @brief get frame for GNE_NMODE_TAZ GNETAZFrame* getTAZFrame() const; - /// @brief get frame for GNE_MODE_DELETE + /// @brief get frame for GNE_NMODE_DELETE GNEDeleteFrame* getDeleteFrame() const; - /// @brief get frame for GNE_MODE_POLYGON + /// @brief get frame for GNE_NMODE_POLYGON GNEPolygonFrame* getPolygonFrame() const; - /// @brief get frame for GNE_MODE_PROHIBITION + /// @brief get frame for GNE_NMODE_PROHIBITION GNEProhibitionFrame* getProhibitionFrame() const; + /// @brief get frame for GNE_NMODE_CREATEEDGE + GNECreateEdgeFrame* getCreateEdgeFrame() const; + + /// @brief get frame for GNE_DMODE_ROUTE + GNERouteFrame* getRouteFrame() const; + + /// @brief get frame for GNE_DMODE_VEHICLE + GNEVehicleFrame* getVehicleFrame() const; + + /// @brief get frame for GNE_DMODE_VEHICLETYPE + GNEVehicleTypeFrame* getVehicleTypeFrame() const; + + /// @brief get frame for GNE_DMODE_VEHICLETYPE + GNEStopFrame* getStopFrame() const; + /// @brief show frames area if at least a GNEFrame is showed /// @note this function is called in GNEFrame::Show(); void showFramesArea(); @@ -160,9 +184,6 @@ long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*); /// @} - /// @brief true if the object is selected (may include extra logic besides calling gSelected) - bool isSelected(GUIGlObject* o) const; - protected: /// @brief FOX needs this GNEViewParent() {} @@ -182,35 +203,53 @@ /// @brief return true if at least there is a frame shown bool isFrameShown() const; - /// @brief frame for GNE_MODE_INSPECT + /// @brief get current frame show + GNEFrame* getCurrentShownFrame() const; + + /// @brief frame for GNE_NMODE_INSPECT GNEInspectorFrame* inspectorFrame; - /// @brief frame for GNE_MODE_SELECT + /// @brief frame for GNE_NMODE_SELECT GNESelectorFrame* selectorFrame; - /// @brief frame for GNE_MODE_CONNECT + /// @brief frame for GNE_NMODE_CONNECT GNEConnectorFrame* connectorFrame; - /// @brief frame for GNE_MODE_TLS + /// @brief frame for GNE_NMODE_TLS GNETLSEditorFrame* TLSEditorFrame; - /// @brief frame for GNE_MODE_ADDITIONAL + /// @brief frame for GNE_NMODE_ADDITIONAL GNEAdditionalFrame* additionalFrame; - /// @brief frame for GNE_MODE_CROSSING + /// @brief frame for GNE_NMODE_CROSSING GNECrossingFrame* crossingFrame; - /// @brief frame for GNE_MODE_TAZ + /// @brief frame for GNE_NMODE_TAZ GNETAZFrame* TAZFrame; - /// @brief frame for GNE_MODE_DELETE + /// @brief frame for GNE_NMODE_DELETE GNEDeleteFrame* deleteFrame; - /// @brief frame for GNE_MODE_POLYGON + /// @brief frame for GNE_NMODE_POLYGON GNEPolygonFrame* polygonFrame; - /// @brief frame for GNE_MODE_PROHIBITION + /// @brief frame for GNE_NMODE_PROHIBITION GNEProhibitionFrame* prohibitionFrame; + + /// @brief frame for GNE_NMODE_CREATEDGE + GNECreateEdgeFrame* createEdgeFrame; + + /// @brief frame for GNE_DMODE_ROUTE + GNERouteFrame* routeFrame; + + /// @brief frame for GNE_DMODE_VEHICLE + GNEVehicleFrame* vehicleFrame; + + /// @brief frame for GNE_DMODE_VEHICLETYPE + GNEVehicleTypeFrame* vehicleTypeFrame; + + /// @brief frame for GNE_DMODE_STOP + GNEStopFrame* stopFrame; }; /// @brief struct for ACChoosers dialog diff -Nru sumo-1.1.0+dfsg1/src/netedit/Makefile.am sumo-1.2.0+dfsg1/src/netedit/Makefile.am --- sumo-1.1.0+dfsg1/src/netedit/Makefile.am 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -14,13 +14,16 @@ GNELoadThread.cpp GNELoadThread.h \ GNENet.cpp GNENet.h \ GNEViewNet.cpp GNEViewNet.h \ +GNEViewNetHelper.cpp GNEViewNetHelper.h \ GNEViewParent.cpp GNEViewParent.h \ GNEUndoList.cpp GNEUndoList.h \ GNEAttributeCarrier.cpp GNEAttributeCarrier.h \ +GNEHierarchicalElementParents.cpp GNEHierarchicalElementParents.h \ +GNEHierarchicalElementChilds.cpp GNEHierarchicalElementChilds.h \ GNEReferenceCounter.h \ GNEEvent_NetworkLoaded.h -SUBDIRS = additionals changes dialogs frames netelements +SUBDIRS = additionals changes dialogs frames netelements demandelements netedit_LDADD = ../netimport/libnetimport.a \ ../netimport/vissim/libvissimimport.a \ @@ -30,12 +33,6 @@ ../netbuild/libnetbuild.a \ ../utils/distribution/libdistribution.a \ ../foreign/eulerspiral/libeulerspiral.a \ -../utils/gui/globjects/libguiutilsglobjects.a \ -../utils/gui/div/libguiutilsdiv.a \ -../utils/gui/settings/libguiutilssettings.a \ -../utils/gui/images/libguiutilsimages.a \ -../utils/gui/cursors/libguiutilscursors.a \ -../utils/gui/tracker/libguiutilstracker.a \ ../utils/distribution/libdistribution.a \ ../foreign/eulerspiral/libeulerspiral.a \ ../utils/geom/libgeom.a \ @@ -54,6 +51,17 @@ ../utils/foxtools/libfoxtools.a \ ../netedit/changes/libneteditchanges.a \ ../netedit/netelements/libneteditnetelements.a \ +../netedit/demandelements/libneteditdemandelements.a \ +../utils/gui/globjects/libguiutilsglobjects.a \ +../utils/gui/div/libguiutilsdiv.a \ +../utils/gui/settings/libguiutilssettings.a \ +../utils/gui/images/libguiutilsimages.a \ +../utils/gui/cursors/libguiutilscursors.a \ +../utils/gui/shortcuts/libguiutilsshortcuts.a \ +../utils/gui/tracker/libguiutilstracker.a \ +../utils/vehicle/libvehicle.a \ +../utils/emissions/libemissions.a \ +../foreign/PHEMlight/cpp/libphemlight.a \ $(XERCES_LIBS) $(FFMPEG_LIBS) \ $(FOX_LDFLAGS) $(XERCES_LDFLAGS) $(PROJ_LDFLAGS) $(GDAL_LDFLAGS) $(X_LDFLAGS) endif diff -Nru sumo-1.1.0+dfsg1/src/netedit/Makefile.in sumo-1.2.0+dfsg1/src/netedit/Makefile.in --- sumo-1.1.0+dfsg1/src/netedit/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,890 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = $(am__EXEEXT_1) -subdir = src/netedit -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -@WITH_GUI_TRUE@am__EXEEXT_1 = netedit$(EXEEXT) -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am__netedit_SOURCES_DIST = netedit_main.cpp GNEApplicationWindow.cpp \ - GNEApplicationWindow.h GNELoadThread.cpp GNELoadThread.h \ - GNENet.cpp GNENet.h GNEViewNet.cpp GNEViewNet.h \ - GNEViewParent.cpp GNEViewParent.h GNEUndoList.cpp \ - GNEUndoList.h GNEAttributeCarrier.cpp GNEAttributeCarrier.h \ - GNEReferenceCounter.h GNEEvent_NetworkLoaded.h -@WITH_GUI_TRUE@am_netedit_OBJECTS = netedit_main.$(OBJEXT) \ -@WITH_GUI_TRUE@ GNEApplicationWindow.$(OBJEXT) \ -@WITH_GUI_TRUE@ GNELoadThread.$(OBJEXT) GNENet.$(OBJEXT) \ -@WITH_GUI_TRUE@ GNEViewNet.$(OBJEXT) GNEViewParent.$(OBJEXT) \ -@WITH_GUI_TRUE@ GNEUndoList.$(OBJEXT) \ -@WITH_GUI_TRUE@ GNEAttributeCarrier.$(OBJEXT) -netedit_OBJECTS = $(am_netedit_OBJECTS) -am__DEPENDENCIES_1 = -@WITH_GUI_TRUE@netedit_DEPENDENCIES = ../netimport/libnetimport.a \ -@WITH_GUI_TRUE@ ../netimport/vissim/libvissimimport.a \ -@WITH_GUI_TRUE@ ../netimport/vissim/typeloader/libvissimtypeload.a \ -@WITH_GUI_TRUE@ ../netimport/vissim/tempstructs/libvissimtmpstr.a \ -@WITH_GUI_TRUE@ ../netwrite/libnetwrite.a \ -@WITH_GUI_TRUE@ ../netbuild/libnetbuild.a \ -@WITH_GUI_TRUE@ ../utils/distribution/libdistribution.a \ -@WITH_GUI_TRUE@ ../foreign/eulerspiral/libeulerspiral.a \ -@WITH_GUI_TRUE@ ../utils/gui/globjects/libguiutilsglobjects.a \ -@WITH_GUI_TRUE@ ../utils/gui/div/libguiutilsdiv.a \ -@WITH_GUI_TRUE@ ../utils/gui/settings/libguiutilssettings.a \ -@WITH_GUI_TRUE@ ../utils/gui/images/libguiutilsimages.a \ -@WITH_GUI_TRUE@ ../utils/gui/cursors/libguiutilscursors.a \ -@WITH_GUI_TRUE@ ../utils/gui/tracker/libguiutilstracker.a \ -@WITH_GUI_TRUE@ ../utils/distribution/libdistribution.a \ -@WITH_GUI_TRUE@ ../foreign/eulerspiral/libeulerspiral.a \ -@WITH_GUI_TRUE@ ../utils/geom/libgeom.a \ -@WITH_GUI_TRUE@ ../utils/shapes/libshapes.a \ -@WITH_GUI_TRUE@ ../utils/options/liboptions.a \ -@WITH_GUI_TRUE@ ../utils/common/libcommon.a \ -@WITH_GUI_TRUE@ ../utils/emissions/libemissions.a \ -@WITH_GUI_TRUE@ ../utils/xml/libxml.a \ -@WITH_GUI_TRUE@ ../utils/importio/libimportio.a \ -@WITH_GUI_TRUE@ ../utils/iodevices/libiodevices.a \ -@WITH_GUI_TRUE@ ../foreign/tcpip/libtcpip.a \ -@WITH_GUI_TRUE@ ../netedit/additionals/libneteditadditionals.a \ -@WITH_GUI_TRUE@ ../netedit/frames/libneteditframes.a \ -@WITH_GUI_TRUE@ ../netedit/dialogs/libneteditdialogs.a \ -@WITH_GUI_TRUE@ ../utils/gui/windows/libguiutilsWindows.a \ -@WITH_GUI_TRUE@ ../utils/foxtools/libfoxtools.a \ -@WITH_GUI_TRUE@ ../netedit/changes/libneteditchanges.a \ -@WITH_GUI_TRUE@ ../netedit/netelements/libneteditnetelements.a \ -@WITH_GUI_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ -@WITH_GUI_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ -@WITH_GUI_TRUE@ $(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) $(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 = $(netedit_SOURCES) -DIST_SOURCES = $(am__netedit_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_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 = additionals changes dialogs frames netelements -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -EXTRA_DIST = netedit64.ico netedit.rc -@WITH_GUI_TRUE@GUI_APPS = netedit -@WITH_GUI_TRUE@netedit_SOURCES = netedit_main.cpp \ -@WITH_GUI_TRUE@GNEApplicationWindow.cpp GNEApplicationWindow.h \ -@WITH_GUI_TRUE@GNELoadThread.cpp GNELoadThread.h \ -@WITH_GUI_TRUE@GNENet.cpp GNENet.h \ -@WITH_GUI_TRUE@GNEViewNet.cpp GNEViewNet.h \ -@WITH_GUI_TRUE@GNEViewParent.cpp GNEViewParent.h \ -@WITH_GUI_TRUE@GNEUndoList.cpp GNEUndoList.h \ -@WITH_GUI_TRUE@GNEAttributeCarrier.cpp GNEAttributeCarrier.h \ -@WITH_GUI_TRUE@GNEReferenceCounter.h \ -@WITH_GUI_TRUE@GNEEvent_NetworkLoaded.h - -@WITH_GUI_TRUE@SUBDIRS = additionals changes dialogs frames netelements -@WITH_GUI_TRUE@netedit_LDADD = ../netimport/libnetimport.a \ -@WITH_GUI_TRUE@../netimport/vissim/libvissimimport.a \ -@WITH_GUI_TRUE@../netimport/vissim/typeloader/libvissimtypeload.a \ -@WITH_GUI_TRUE@../netimport/vissim/tempstructs/libvissimtmpstr.a \ -@WITH_GUI_TRUE@../netwrite/libnetwrite.a \ -@WITH_GUI_TRUE@../netbuild/libnetbuild.a \ -@WITH_GUI_TRUE@../utils/distribution/libdistribution.a \ -@WITH_GUI_TRUE@../foreign/eulerspiral/libeulerspiral.a \ -@WITH_GUI_TRUE@../utils/gui/globjects/libguiutilsglobjects.a \ -@WITH_GUI_TRUE@../utils/gui/div/libguiutilsdiv.a \ -@WITH_GUI_TRUE@../utils/gui/settings/libguiutilssettings.a \ -@WITH_GUI_TRUE@../utils/gui/images/libguiutilsimages.a \ -@WITH_GUI_TRUE@../utils/gui/cursors/libguiutilscursors.a \ -@WITH_GUI_TRUE@../utils/gui/tracker/libguiutilstracker.a \ -@WITH_GUI_TRUE@../utils/distribution/libdistribution.a \ -@WITH_GUI_TRUE@../foreign/eulerspiral/libeulerspiral.a \ -@WITH_GUI_TRUE@../utils/geom/libgeom.a \ -@WITH_GUI_TRUE@../utils/shapes/libshapes.a \ -@WITH_GUI_TRUE@../utils/options/liboptions.a \ -@WITH_GUI_TRUE@../utils/common/libcommon.a \ -@WITH_GUI_TRUE@../utils/emissions/libemissions.a \ -@WITH_GUI_TRUE@../utils/xml/libxml.a \ -@WITH_GUI_TRUE@../utils/importio/libimportio.a \ -@WITH_GUI_TRUE@../utils/iodevices/libiodevices.a \ -@WITH_GUI_TRUE@../foreign/tcpip/libtcpip.a \ -@WITH_GUI_TRUE@../netedit/additionals/libneteditadditionals.a \ -@WITH_GUI_TRUE@../netedit/frames/libneteditframes.a \ -@WITH_GUI_TRUE@../netedit/dialogs/libneteditdialogs.a \ -@WITH_GUI_TRUE@../utils/gui/windows/libguiutilsWindows.a \ -@WITH_GUI_TRUE@../utils/foxtools/libfoxtools.a \ -@WITH_GUI_TRUE@../netedit/changes/libneteditchanges.a \ -@WITH_GUI_TRUE@../netedit/netelements/libneteditnetelements.a \ -@WITH_GUI_TRUE@$(XERCES_LIBS) $(FFMPEG_LIBS) \ -@WITH_GUI_TRUE@$(FOX_LDFLAGS) $(XERCES_LDFLAGS) $(PROJ_LDFLAGS) $(GDAL_LDFLAGS) $(X_LDFLAGS) - -all: all-recursive - -.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) --foreign src/netedit/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netedit/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 - -netedit$(EXEEXT): $(netedit_OBJECTS) $(netedit_DEPENDENCIES) $(EXTRA_netedit_DEPENDENCIES) - @rm -f netedit$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(netedit_OBJECTS) $(netedit_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEApplicationWindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEAttributeCarrier.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNELoadThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNENet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEUndoList.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEViewNet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEViewParent.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netedit_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 - -# 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(PROGRAMS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netedit/netedit_main.cpp sumo-1.2.0+dfsg1/src/netedit/netedit_main.cpp --- sumo-1.1.0+dfsg1/src/netedit/netedit_main.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netedit_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -43,8 +44,7 @@ int main(int argc, char** argv) { // make the output aware of threading - MFXMutex lock; - MsgHandler::assignLock(&lock); + MsgHandler::setFactory(&MsgHandlerSynchronized::create); // get the options OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions @@ -79,7 +79,7 @@ gSchemeStorage.init(&application, true); window->dependentBuild(); // Create app - application.addSignal(SIGINT, window, MID_QUIT); + application.addSignal(SIGINT, window, MID_HOTKEY_CTRL_Q_CLOSE); application.create(); // Load configuration given on command line if (argc > 1) { @@ -88,6 +88,8 @@ // load options window->loadOptionOnStartup(); } + // focus window at startup + window->setFocus(); // Run ret = application.run(); #ifndef _DEBUG diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEConnection.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNEConnection.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEConnection.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEConnection.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -65,6 +65,13 @@ } +std::string +GNEConnection::generateChildID(SumoXMLTag /*childTag*/) { + // currently unused + return ""; +} + + void GNEConnection::updateGeometry(bool updateGrid) { // Get shape of from and to lanes @@ -152,6 +159,13 @@ } +Position +GNEConnection::getPositionInView() const { + // currently unused + return Position(0, 0); +} + + Boundary GNEConnection::getBoundary() const { if (myShape.size() == 0) { @@ -269,8 +283,8 @@ // create menu commands FXMenuCommand* mcCustomShape = new FXMenuCommand(ret, "Set custom connection shape", nullptr, &parent, MID_GNE_CONNECTION_EDIT_SHAPE); // check if menu commands has to be disabled - EditMode editMode = myNet->getViewNet()->getCurrentEditMode(); - const bool wrongMode = (editMode == GNE_MODE_CONNECT || editMode == GNE_MODE_TLS || editMode == GNE_MODE_CREATE_EDGE); + NetworkEditMode editMode = myNet->getViewNet()->getEditModes().networkEditMode; + const bool wrongMode = (editMode == GNE_NMODE_CONNECT || editMode == GNE_NMODE_TLS || editMode == GNE_NMODE_CREATE_EDGE); if (wrongMode) { mcCustomShape->disable(); } @@ -289,7 +303,7 @@ void GNEConnection::drawGL(const GUIVisualizationSettings& s) const { // Check if connection must be drawed - if (!myShapeDeprecated && myNet->getViewNet()->showConnections()) { + if (!myShapeDeprecated && (myNet->getViewNet()->getViewOptions().showConnections() || (myNet->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND))) { // Push draw matrix 1 glPushMatrix(); // Push name @@ -297,7 +311,7 @@ // Traslate matrix glTranslated(0, 0, GLO_JUNCTION + 0.1); // must draw on top of junction // Set color - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { // override with special colors (unless the color scheme is based on selection) GLHelper::setColor(s.selectedConnectionColor); } else if (mySpecialColor != nullptr) { @@ -307,22 +321,28 @@ GLHelper::setColor(GNEInternalLane::colorForLinksState(getLinkState())); } // draw connection checking whether it is not too small if isn't being drawn for selecting - if ((s.scale < 1.) && !s.drawForSelecting) { - // If it's small, dra a simple line + const double selectionScale = isAttributeCarrierSelected() ? s.selectionScale : 1; + if ((s.scale * selectionScale < 5.) && !s.drawForSelecting) { + // If it's small, draw a simple line GLHelper::drawLine(myShape); } else { // draw a list of lines - GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, 0.2); + const bool spreadSuperposed = s.scale >= 1 && s.spreadSuperposed && myFromLane->drawAsRailway(s) && getEdgeFrom()->getNBEdge()->isBidiRail(); + PositionVector shape = myShape; + if (spreadSuperposed) { + shape.move2side(0.5); + } + GLHelper::drawBoxLines(shape, myShapeRotations, myShapeLengths, 0.2 * selectionScale); glTranslated(0, 0, 0.1); GLHelper::setColor(GLHelper::getColor().changedBrightness(51)); // check if internal junction marker has to be drawn if (myInternalJunctionMarker.size() > 0) { GLHelper::drawLine(myInternalJunctionMarker); } - } - // check if dotted contour has to be drawn - if (!s.drawForSelecting && (myNet->getViewNet()->getDottedAC() == this)) { - GLHelper::drawShapeDottedContour(getType(), myShape, 0.25); + // check if dotted contour has to be drawn (not useful at high zoom) + if (!s.drawForSelecting && (myNet->getViewNet()->getDottedAC() == this)) { + GLHelper::drawShapeDottedContour(getType(), shape, 0.25); + } } // Pop name glPopName(); @@ -368,6 +388,12 @@ return toString(nbCon.tlLinkIndex); case SUMO_ATTR_SPEED: return toString(nbCon.speed); + case SUMO_ATTR_DIR: + return toString(getEdgeFrom()->getNBEdge()->getToNode()->getDirection( + getEdgeFrom()->getNBEdge(), nbCon.toEdge, OptionsCont::getOptions().getBool("lefthand"))); + case SUMO_ATTR_STATE: + return toString(getEdgeFrom()->getNBEdge()->getToNode()->getLinkState( + getEdgeFrom()->getNBEdge(), nbCon.toEdge, nbCon.fromLane, nbCon.toLane, nbCon.mayDefinitelyPass, nbCon.tlID)); case SUMO_ATTR_CUSTOMSHAPE: return toString(nbCon.customShape); case GNE_ATTR_SELECTED: @@ -397,7 +423,7 @@ case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: // no special handling - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); break; case SUMO_ATTR_TLLINKINDEX: if (value != getAttribute(key)) { @@ -425,6 +451,10 @@ undoList->p_end(); } break; + case SUMO_ATTR_DIR: + throw InvalidArgument("Attribute of '" + toString(key) + "' cannot be modified"); + case SUMO_ATTR_STATE: + throw InvalidArgument("Attribute of '" + toString(key) + "' cannot be modified"); default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } @@ -466,6 +496,10 @@ // empty custom shapes are allowed return canParse(value); } + case SUMO_ATTR_STATE: + return false; + case SUMO_ATTR_DIR: + return false; case GNE_ATTR_SELECTED: return canParse(value); case GNE_ATTR_GENERIC: @@ -552,17 +586,12 @@ case SUMO_ATTR_SPEED: nbCon.speed = parse(value); break; + case SUMO_ATTR_STATE: + throw InvalidArgument("Attribute of '" + toString(key) + "' cannot be modified"); + case SUMO_ATTR_DIR: + throw InvalidArgument("Attribute of '" + toString(key) + "' cannot be modified"); case SUMO_ATTR_CUSTOMSHAPE: { - const bool init = (myShape.size() == 0); - if (!init) { - // first remove object from net grid - myNet->removeGLObjectFromGrid(this); - } nbCon.customShape = parse(value); - if (!init) { - // add object into net again - myNet->addGLObjectIntoGrid(this); - } break; } case GNE_ATTR_SELECTED: @@ -579,15 +608,11 @@ throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { - updateGeometry(true); + if ((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + const bool init = (myShape.size() == 0); + markConnectionGeometryDeprecated(); + updateGeometry(!init); } } - -void -GNEConnection::mouseOverObject(const GUIVisualizationSettings&) const { -} - - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEConnection.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNEConnection.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEConnection.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEConnection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,10 +47,18 @@ /// @brief Destructor ~GNEConnection(); + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + + /// @name Functions related with geometry of element + /// @{ /// @brief update pre-computed geometry information - /// @note: must be called when geometry changes (i.e. lane moved) and implemented in ALL childrens void updateGeometry(bool updateGrid); + /// @brief Returns position of hierarchical element in view + Position getPositionInView() const; + /// @} + /// Returns the street's geometry Boundary getBoundary() const; @@ -87,6 +95,9 @@ /// @brief check that connection's Geometry has to be updated void markConnectionGeometryDeprecated(); + /// @brief check if connection is protected (i.e. There is a Demand Element that can use + void isConnectionProtected(); + /// @brief update internal ID of Connection void updateID(); @@ -194,9 +205,6 @@ /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /// @brief Invalidated copy constructor. GNEConnection(const GNEConnection&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNECrossing.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNECrossing.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNECrossing.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNECrossing.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -49,6 +49,13 @@ GNECrossing::~GNECrossing() {} +std::string +GNECrossing::generateChildID(SumoXMLTag /*childTag*/) { + // currently unused + return ""; +} + + void GNECrossing::updateGeometry(bool /*updateGrid*/) { // rebuild crossing and walking areas form node parent @@ -75,6 +82,13 @@ } +Position +GNECrossing::getPositionInView() const { + // currently unused + return Position(0, 0); +} + + GNEJunction* GNECrossing::getParentJunction() const { return myParentJunction; @@ -101,7 +115,7 @@ (myShapeLengths.size() > 0) && (s.scale > 3.0)) { auto crossing = myParentJunction->getNBNode()->getCrossing(myCrossingEdges); - if (s.editMode != GNE_MODE_TLS) { + if (s.editMode != GNE_NMODE_TLS) { // push first draw matrix glPushMatrix(); // push name @@ -109,7 +123,7 @@ // must draw on top of junction glTranslated(0, 0, GLO_JUNCTION + 0.1); // set color depending of selection and priority - if (isAttributeCarrierSelected()) { + if (drawUsingSelectColor()) { glColor3d(0.118, 0.565, 1.000); } else if (!crossing->valid) { glColor3d(1.0, 0.1, 0.1); @@ -207,8 +221,8 @@ // create menu commands FXMenuCommand* mcCustomShape = new FXMenuCommand(ret, "Set custom crossing shape", nullptr, &parent, MID_GNE_CROSSING_EDIT_SHAPE); // check if menu commands has to be disabled - EditMode editMode = myNet->getViewNet()->getCurrentEditMode(); - const bool wrongMode = (editMode == GNE_MODE_CONNECT || editMode == GNE_MODE_TLS || editMode == GNE_MODE_CREATE_EDGE); + NetworkEditMode editMode = myNet->getViewNet()->getEditModes().networkEditMode; + const bool wrongMode = (editMode == GNE_NMODE_CONNECT || editMode == GNE_NMODE_TLS || editMode == GNE_NMODE_CREATE_EDGE); if (wrongMode) { mcCustomShape->disable(); } @@ -281,7 +295,7 @@ case SUMO_ATTR_CUSTOMSHAPE: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->add(new GNEChange_Attribute(this, key, value), true); + undoList->add(new GNEChange_Attribute(this, myNet, key, value), true); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -483,15 +497,9 @@ throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } // Crossing are a special case and we need ot update geometry of junction instead of crossing - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + if ((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { myParentJunction->updateGeometry(true); } } - -void -GNECrossing::mouseOverObject(const GUIVisualizationSettings&) const { -} - - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNECrossing.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNECrossing.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNECrossing.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNECrossing.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -54,9 +54,18 @@ /// @brief Destructor ~GNECrossing(); + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + + /// @name Functions related with geometry of element + /// @{ /// @brief update pre-computed geometry information void updateGeometry(bool updateGrid); + /// @brief Returns position of hierarchical element in view + Position getPositionInView() const; + /// @} + /// @brief get parent Junction GNEJunction* getParentJunction() const; @@ -157,9 +166,6 @@ /// @brief method for setting the attribute and nothing else (used in GNEChange_Attribute) void setAttribute(SumoXMLAttr key, const std::string& value); - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /// @brief draw TLS Link Number void drawTLSLinkNo(const GUIVisualizationSettings& s) const; diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEEdge.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNEEdge.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEEdge.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include #include #include @@ -51,7 +51,11 @@ // =========================================================================== const double GNEEdge::SNAP_RADIUS = SUMO_const_halfLaneWidth; -GNEEdge GNEEdge::DummyEdge; +GNEEdge& GNEEdge::getDummyEdge() { + // @note: using local static idiom to avoid static initialization order problem + static GNEEdge* dummy = new GNEEdge(); // 'static local variable', this line is called only once + return *dummy; // this line gets called with the same 'dummy' every time the function is called +} // =========================================================================== // members methods @@ -59,7 +63,7 @@ GNEEdge::GNEEdge(NBEdge& nbe, GNENet* net, bool wasSplit, bool loaded): GNENetElement(net, nbe.getID(), GLO_EDGE, SUMO_TAG_EDGE), - myNBEdge(nbe) , + myNBEdge(nbe), myGNEJunctionSource(myNet->retrieveJunction(myNBEdge.getFromNode()->getID())), myGNEJunctionDestiny(myNet->retrieveJunction(myNBEdge.getToNode()->getID())), myLanes(0), @@ -81,8 +85,7 @@ GNEEdge::GNEEdge() : GNENetElement(nullptr, "DUMMY", GLO_EDGE, SUMO_TAG_NOTHING), - myNBEdge(NBEdge::DummyEdge) -{ + myNBEdge(NBEdge::DummyEdge) { } GNEEdge::~GNEEdge() { @@ -110,6 +113,13 @@ } +std::string +GNEEdge::generateChildID(SumoXMLTag /*childTag*/) { + // currently unused + return ""; +} + + void GNEEdge::updateGeometry(bool updateGrid) { // first check if object has to be removed from grid (SUMOTree) @@ -128,11 +138,19 @@ } } // Update geometry of additionals childs vinculated to this edge - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { i->updateGeometry(updateGrid); } // Update geometry of additional parents that have this edge as parent - for (auto i : myFirstAdditionalParents) { + for (auto i : getAdditionalParents()) { + i->updateGeometry(updateGrid); + } + // Update geometry of demand elements childs vinculated to this edge + for (auto i : getDemandElementChilds()) { + i->updateGeometry(updateGrid); + } + // Update geometry of demand elements parents that have this edge as parent + for (auto i : getDemandElementParents()) { i->updateGeometry(updateGrid); } // last step is to check if object has to be added into grid (SUMOTree) again @@ -142,6 +160,13 @@ } +Position +GNEEdge::getPositionInView() const { + // currently unused + return Position(0, 0); +} + + bool GNEEdge::clickedOverShapeStart(const Position& pos) { if (myNBEdge.getGeometry().front() != myGNEJunctionSource->getPositionInView()) { @@ -202,7 +227,7 @@ setShapeStartPos(oldPos, true); // set attribute using undolist undoList->p_begin("shape start of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, GNE_ATTR_SHAPE_START, toString(modifiedShapeStartPos), true, toString(oldPos))); + undoList->p_add(new GNEChange_Attribute(this, myNet, GNE_ATTR_SHAPE_START, toString(modifiedShapeStartPos), true, toString(oldPos))); undoList->p_end(); } @@ -215,7 +240,7 @@ setShapeEndPos(oldPos, true); // set attribute using undolist undoList->p_begin("shape end of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, GNE_ATTR_SHAPE_END, toString(modifiedShapeEndPos), true, toString(oldPos))); + undoList->p_add(new GNEChange_Attribute(this, myNet, GNE_ATTR_SHAPE_END, toString(modifiedShapeEndPos), true, toString(oldPos))); undoList->p_end(); } @@ -229,11 +254,19 @@ i->startGeometryMoving(); } // Save current centering boundary of additionals childs vinculated to this edge - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { i->startGeometryMoving(); } // Save current centering boundary of additional parents that have this edge as parent - for (auto i : myFirstAdditionalParents) { + for (auto i : getAdditionalParents()) { + i->startGeometryMoving(); + } + // Save current centering boundary of demand elements childs vinculated to this edge + for (auto i : getDemandElementChilds()) { + i->startGeometryMoving(); + } + // Save current centering boundary of demand elements parents that have this edge as parent + for (auto i : getDemandElementParents()) { i->startGeometryMoving(); } } @@ -254,11 +287,19 @@ i->endGeometryMoving(); } // Restore centering boundary of additionals childs vinculated to this edge - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { i->endGeometryMoving(); } // Restore centering boundary of additional parents that have this edge as parent - for (auto i : myFirstAdditionalParents) { + for (auto i : getAdditionalParents()) { + i->endGeometryMoving(); + } + // Restore centering boundary of demand elements childs vinculated to this edge + for (auto i : getDemandElementChilds()) { + i->endGeometryMoving(); + } + // Restore centering boundary of demand elements parents that have this edge as parent + for (auto i : getDemandElementParents()) { i->endGeometryMoving(); } // add object into grid again (using the new centering boundary) @@ -374,7 +415,7 @@ setGeometry(oldShape, true, true); // commit new shape undoList->p_begin("moving " + toString(SUMO_ATTR_SHAPE) + " of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_SHAPE, toString(innerShapeToCommit))); + undoList->p_add(new GNEChange_Attribute(this, myNet, SUMO_ATTR_SHAPE, toString(innerShapeToCommit))); undoList->p_end(); } @@ -438,6 +479,10 @@ } } +const std::string +GNEEdge::getOptionalName() const { + return myNBEdge.getStreetName(); +} GUIGLObjectPopupMenu* GNEEdge::getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) { @@ -488,15 +533,14 @@ } // draw geometry points if isnt's too small if (s.scale > 8.0) { - GLHelper::setColor(s.junctionColorer.getSchemes()[0].getColor(2)); - if (isAttributeCarrierSelected() && s.laneColorer.getActive() != 1) { + RGBColor color = s.junctionColorer.getSchemes()[0].getColor(2); + if (drawUsingSelectColor() && s.laneColorer.getActive() != 1) { // override with special colors (unless the color scheme is based on selection) - GLHelper::setColor(s.selectedEdgeColor.changedBrightness(-20)); + color = s.selectedEdgeColor.changedBrightness(-20); } + GLHelper::setColor(color); // recognize full transparency and simply don't draw - GLfloat color[4]; - glGetFloatv(GL_CURRENT_COLOR, color); - if (color[3] > 0) { + if (color.alpha() > 0) { // push name glPushName(getGlID()); // draw geometry points expect initial and final @@ -509,18 +553,18 @@ GLHelper::drawFilledCircle(circleWidth, circleResolution); glPopMatrix(); // draw elevation or special symbols (Start, End and Block) - if (!s.drawForSelecting && myNet->getViewNet()->editingElevation()) { + if (!s.drawForSelecting && myNet->getViewNet()->getMoveOptions().editingElevation()) { glPushMatrix(); // Translate to geometry point glTranslated(pos.x(), pos.y(), GLO_JUNCTION); // draw Z value GLHelper::drawText(toString(pos.z()), Position(), GLO_MAX - 5, s.edgeValue.scaledSize(s.scale) / 2, s.edgeValue.color); glPopMatrix(); - } + } } } // draw line geometry, start and end points if shapeStart or shape end is edited, and depending of drawForSelecting - if (myNet->getViewNet()->getCurrentEditMode() == GNE_MODE_MOVE) { + if (myNet->getViewNet()->getEditModes().networkEditMode == GNE_NMODE_MOVE) { if ((myNBEdge.getGeometry().front() != myGNEJunctionSource->getPositionInView()) && (!s.drawForSelecting || (myNet->getViewNet()->getPositionInformation().distanceSquaredTo2D(myNBEdge.getGeometry().front()) <= (circleWidthSquared + 2)))) { glPushMatrix(); @@ -575,6 +619,7 @@ // (optionally) draw the name and/or the street name if isn't being drawn for selecting const bool drawStreetName = s.streetName.show && (myNBEdge.getStreetName() != ""); + const bool spreadSuperposed = s.spreadSuperposed && myLanes.back()->drawAsRailway(s) && myNBEdge.isBidiRail(); if (!s.drawForSelecting && (s.edgeName.show || drawStreetName || s.edgeValue.show)) { glPushName(getGlID()); GNELane* lane1 = myLanes[0]; @@ -582,6 +627,13 @@ Position p = lane1->getShape().positionAtOffset(lane1->getShape().length() / (double) 2.); p.add(lane2->getShape().positionAtOffset(lane2->getShape().length() / (double) 2.)); p.mul(.5); + if (spreadSuperposed) { + // move name to the right of the edge and towards its beginning + const double dist = 0.6 * s.edgeName.scaledSize(s.scale); + const double shiftA = lane1->getShape().rotationAtOffset(lane1->getShape().length() / (double) 2.) - DEG2RAD(135); + Position shift(dist * cos(shiftA), dist * sin(shiftA)); + p.add(shift); + } double angle = lane1->getShape().rotationDegreeAtOffset(lane1->getShape().length() / (double) 2.); angle += 90; if (angle > 90 && angle < 270) { @@ -602,7 +654,7 @@ if (!s.drawForSelecting && (myNet->getViewNet()->getDottedAC() == this)) { // draw dotted contor around the first and last lane const double myHalfLaneWidthFront = myNBEdge.getLaneWidth(myLanes.front()->getIndex()) / 2; - const double myHalfLaneWidthBack = myNBEdge.getLaneWidth(myLanes.back()->getIndex()) / 2; + const double myHalfLaneWidthBack = spreadSuperposed ? 0 : myNBEdge.getLaneWidth(myLanes.back()->getIndex()) / 2; GLHelper::drawShapeDottedContour(GLO_JUNCTION, myLanes.front()->getShape(), myHalfLaneWidthFront, myLanes.back()->getShape(), -1 * myHalfLaneWidthBack); } glPopMatrix(); @@ -650,7 +702,7 @@ newPos = myNet->getViewNet()->snapToActiveGrid(newPos); undoList->p_begin("set endpoint"); int index = geom.indexOfClosest(pos); - // check if snap to existing geometry + // check if snap to existing geometry if (geom[index].distanceTo(pos) < SNAP_RADIUS) { pos = geom[index]; } @@ -770,7 +822,7 @@ int GNEEdge::getRouteProbeRelativePosition(GNERouteProbe* routeProbe) const { std::vector routeProbes; - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { if (i->getTagProperty().getTag() == routeProbe->getTagProperty().getTag()) { routeProbes.push_back(i); } @@ -803,54 +855,19 @@ void -GNEEdge::removeEdgeOfAdditionalParents(GNEUndoList* undoList) { - // iterate over all additional parents of edge - while (myFirstAdditionalParents.size() > 0) { - // Obtain attribute Edge or Edges of additional - std::vector edgeIDs; - if(myFirstAdditionalParents.front()->getTagProperty().hasAttribute(SUMO_ATTR_EDGES)) { - edgeIDs = parse >(myFirstAdditionalParents.front()->getAttribute(SUMO_ATTR_EDGES)); - } else { - edgeIDs.push_back(myFirstAdditionalParents.front()->getAttribute(SUMO_ATTR_EDGE)); - } - // check that at least there is an Edge - if (edgeIDs.empty()) { - throw ProcessError("Additional edge childs is empty"); - } else if (edgeIDs.size() == 1) { - // remove entire Additional if SUMO_ATTR_EDGES cannot be empty - if (edgeIDs.front() == getID()) { - undoList->add(new GNEChange_Additional(myFirstAdditionalParents.front(), false), true); - } else { - throw ProcessError("Edge ID wasnt' found in Additional"); - } - } else { - auto it = std::find(edgeIDs.begin(), edgeIDs.end(), getID()); - if (it != edgeIDs.end()) { - // set new attribute in Additional - edgeIDs.erase(it); - myFirstAdditionalParents.front()->setAttribute(SUMO_ATTR_EDGES, toString(edgeIDs), undoList); - } else { - throw ProcessError("Edge ID wasnt' found in Additional"); - } - } - } -} - - -void GNEEdge::copyTemplate(GNEEdge* tpl, GNEUndoList* undoList) { undoList->p_begin("copy template"); setAttribute(SUMO_ATTR_NUMLANES, tpl->getAttribute(SUMO_ATTR_NUMLANES), undoList); setAttribute(SUMO_ATTR_TYPE, tpl->getAttribute(SUMO_ATTR_TYPE), undoList); - setAttribute(SUMO_ATTR_SPEED, tpl->getAttribute(SUMO_ATTR_SPEED), undoList); setAttribute(SUMO_ATTR_PRIORITY, tpl->getAttribute(SUMO_ATTR_PRIORITY), undoList); setAttribute(SUMO_ATTR_SPREADTYPE, tpl->getAttribute(SUMO_ATTR_SPREADTYPE), undoList); - setAttribute(SUMO_ATTR_WIDTH, tpl->getAttribute(SUMO_ATTR_WIDTH), undoList); - setAttribute(SUMO_ATTR_ENDOFFSET, tpl->getAttribute(SUMO_ATTR_ENDOFFSET), undoList); + // copy raw values for lane-specific attributes + setAttribute(SUMO_ATTR_SPEED, toString(myNBEdge.getSpeed()), undoList); + setAttribute(SUMO_ATTR_WIDTH, toString(myNBEdge.getLaneWidth()), undoList); + setAttribute(SUMO_ATTR_ENDOFFSET, toString(myNBEdge.getEndOffset()), undoList); // copy lane attributes as well for (int i = 0; i < (int)myLanes.size(); i++) { myLanes[i]->setAttribute(SUMO_ATTR_ALLOW, tpl->myLanes[i]->getAttribute(SUMO_ATTR_ALLOW), undoList); - myLanes[i]->setAttribute(SUMO_ATTR_DISALLOW, tpl->myLanes[i]->getAttribute(SUMO_ATTR_DISALLOW), undoList); myLanes[i]->setAttribute(SUMO_ATTR_SPEED, tpl->myLanes[i]->getAttribute(SUMO_ATTR_SPEED), undoList); myLanes[i]->setAttribute(SUMO_ATTR_WIDTH, tpl->myLanes[i]->getAttribute(SUMO_ATTR_WIDTH), undoList); myLanes[i]->setAttribute(SUMO_ATTR_ENDOFFSET, tpl->myLanes[i]->getAttribute(SUMO_ATTR_ENDOFFSET), undoList); @@ -982,7 +999,7 @@ it->setAttribute(key, value, undoList); } // ensure that the edge value is also changed. Actually this sets the lane attributes again but it does not matter - undoList->p_add(new GNEChange_Attribute(this, key, value, true, origValue)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value, true, origValue)); undoList->p_end(); break; } @@ -993,7 +1010,7 @@ // continue changing from junction GNEJunction* oldGNEJunctionSource = myGNEJunctionSource; myGNEJunctionSource->setLogicValid(false, undoList); - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); myGNEJunctionSource->setLogicValid(false, undoList); myNet->retrieveJunction(value)->setLogicValid(false, undoList); setAttribute(GNE_ATTR_SHAPE_START, toString(myGNEJunctionSource->getNBNode()->getPosition()), undoList); @@ -1012,7 +1029,7 @@ // continue changing destiny junction GNEJunction* oldGNEJunctionDestiny = myGNEJunctionDestiny; myGNEJunctionDestiny->setLogicValid(false, undoList); - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); myGNEJunctionDestiny->setLogicValid(false, undoList); myNet->retrieveJunction(value)->setLogicValid(false, undoList); setAttribute(GNE_ATTR_SHAPE_END, toString(myGNEJunctionDestiny->getNBNode()->getPosition()), undoList); @@ -1034,13 +1051,13 @@ case GNE_ATTR_SHAPE_END: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); break; case SUMO_ATTR_NAME: // user cares about street names. Make sure they appear in the output OptionsCont::getOptions().resetWritable(); OptionsCont::getOptions().set("output.street-names", "true"); - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); break; case SUMO_ATTR_NUMLANES: if (value != getAttribute(key)) { @@ -1057,7 +1074,7 @@ // actually the geometry is already updated (incrementally // during mouse movement). We set the restore point to the end // of the last change-set - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); break; case GNE_ATTR_BIDIR: throw InvalidArgument("Attribute of '" + toString(key) + "' cannot be modified"); @@ -1123,11 +1140,11 @@ case SUMO_ATTR_WIDTH: return canParse(value) && ((parse(value) > 0) || (parse(value) == NBEdge::UNSPECIFIED_WIDTH)); case SUMO_ATTR_ENDOFFSET: - return canParse(value) && (parse(value) >= 0); + return canParse(value) && parse(value) >= 0 && parse(value) < myNBEdge.getLoadedLength(); case GNE_ATTR_SHAPE_START: { if (value.empty()) { return true; - } else if(canParse(value)) { + } else if (canParse(value)) { Position shapeStart = parse(value); return (shapeStart != myNBEdge.getGeometry()[-1]); } else { @@ -1137,7 +1154,7 @@ case GNE_ATTR_SHAPE_END: { if (value.empty()) { return true; - } else if(canParse(value)) { + } else if (canParse(value)) { Position shapeEnd = parse(value); return (shapeEnd != myNBEdge.getGeometry()[0]); } else { @@ -1324,19 +1341,14 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } void -GNEEdge::mouseOverObject(const GUIVisualizationSettings&) const { -} - - -void GNEEdge::setNumLanes(int numLanes, GNEUndoList* undoList) { undoList->p_begin("change number of " + toString(SUMO_TAG_LANE) + "s"); myGNEJunctionSource->setLogicValid(false, undoList); @@ -1680,7 +1692,7 @@ } else { const int numPoints = MAX2(oc.getInt("junctions.internal-link-detail"), int(old.length2D() / oc.getFloat("opendrive.curve-resolution"))); - return bezier(init, numPoints); + return init.bezier(numPoints); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEEdge.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNEEdge.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEEdge.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -70,11 +70,18 @@ /// @brief Destructor. ~GNEEdge(); - /**@brief update pre-computed geometry information - * @note if current editing mode is Move, connection's geometry will not be updated - */ + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + + /// @name Functions related with geometry of element + /// @{ + /// @brief update pre-computed geometry information void updateGeometry(bool updateGrid); + /// @brief Returns position of hierarchical element in view + Position getPositionInView() const; + /// @} + /// @name functions for edit start and end positions of shapes /// @{ /// @brief return true if user clicked over ShapeStart @@ -167,6 +174,9 @@ */ Boundary getCenteringBoundary() const; + /// @brief Returns the street name + const std::string getOptionalName() const; + /**@brief Draws the object * @param[in] s The settings for the current view (may influence drawing) * @see GUIGlObject::drawGL @@ -274,7 +284,7 @@ static const double SNAP_RADIUS; /// @brief Dummy edge to use when a reference must be supplied in the no-arguments constructor (FOX technicality) - static GNEEdge DummyEdge; + static GNEEdge& getDummyEdge(); /// @brief clear current connections void clearGNEConnections(); @@ -285,9 +295,6 @@ /// @brief get GNECrossings vinculated with this Edge std::vector getGNECrossings(); - /// @brief remove Edge of Additional Parent - void removeEdgeOfAdditionalParents(GNEUndoList* undoList); - /// @brief make geometry smooth void smooth(GNEUndoList* undoList); @@ -332,9 +339,6 @@ /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /**@brief changes the number of lanes. * When reducing the number of lanes, higher-numbered lanes are removed first. * When increasing the number of lanes, the last known attributes for a lane @@ -372,6 +376,7 @@ /// @brief constructor for dummy edge GNEEdge(); + }; diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEInternalLane.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNEInternalLane.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEInternalLane.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEInternalLane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEInternalLane.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNEInternalLane.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEInternalLane.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEInternalLane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEJunction.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNEJunction.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEJunction.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEJunction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -38,6 +38,7 @@ #include #include #include +#include #include "GNEEdge.h" #include "GNEConnection.h" @@ -87,6 +88,16 @@ } +std::string +GNEJunction::generateChildID(SumoXMLTag childTag) { + int counter = 0; + while (myNet->retrieveJunction(getID() + toString(childTag) + toString(counter), false) != nullptr) { + counter++; + } + return (getID() + toString(childTag) + toString(counter)); +} + + void GNEJunction::updateGeometry(bool updateGrid) { // first check if object has to be removed from grid (SUMOTree) @@ -111,13 +122,21 @@ } +Position +GNEJunction::getPositionInView() const { + return myNBNode.getPosition(); +} + + void GNEJunction::rebuildGNECrossings(bool rebuildNBNodeCrossings) { // rebuild GNECrossings only if create crossings and walkingAreas in net is enabled if (myNet->getNetBuilder()->haveNetworkCrossings()) { if (rebuildNBNodeCrossings) { // build new NBNode::Crossings and walking areas + mirrorXLeftHand(); myNBNode.buildCrossingsAndWalkingAreas(); + mirrorXLeftHand(); } // create a vector to keep retrieved and created crossings std::vector retrievedCrossings; @@ -155,6 +174,17 @@ } } +void +GNEJunction::mirrorXLeftHand() { + if (OptionsCont::getOptions().getBool("lefthand")) { + myNBNode.mirrorX(); + for (NBEdge* e : myNBNode.getEdges()) { + e->mirrorX(); + + } + } +} + GUIGLObjectPopupMenu* GNEJunction::getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) { @@ -171,31 +201,40 @@ // new FXMenuCommand(ret, "Join adjacent edges", 0, &parent, MID_GNE_JOIN_EDGES); //} const int numEndpoints = (int)myNBNode.getEndPoints().size(); + // check if we're handling a selection + bool handlingSelection = isAttributeCarrierSelected() && (myNet->retrieveJunctions(true).size() > 1); + // check if menu commands has to be disabled + const bool wrongMode = (myNet->getViewNet()->getEditModes().networkEditMode == GNE_NMODE_CONNECT) || + (myNet->getViewNet()->getEditModes().networkEditMode == GNE_NMODE_TLS) || + (myNet->getViewNet()->getEditModes().networkEditMode == GNE_NMODE_CREATE_EDGE); // create menu commands FXMenuCommand* mcCustomShape = new FXMenuCommand(ret, "Set custom junction shape", nullptr, &parent, MID_GNE_JUNCTION_EDIT_SHAPE); FXMenuCommand* mcResetCustomShape = new FXMenuCommand(ret, "Reset junction shape", nullptr, &parent, MID_GNE_JUNCTION_RESET_SHAPE); FXMenuCommand* mcReplace = new FXMenuCommand(ret, "Replace junction by geometry point", nullptr, &parent, MID_GNE_JUNCTION_REPLACE); FXMenuCommand* mcSplit = new FXMenuCommand(ret, ("Split junction (" + toString(numEndpoints) + " end points)").c_str(), nullptr, &parent, MID_GNE_JUNCTION_SPLIT); + FXMenuCommand* mcSplitReconnect = new FXMenuCommand(ret, "Split junction and reconnect", nullptr, &parent, MID_GNE_JUNCTION_SPLIT_RECONNECT); FXMenuCommand* mcClearConnections = new FXMenuCommand(ret, "Clear connections", nullptr, &parent, MID_GNE_JUNCTION_CLEAR_CONNECTIONS); FXMenuCommand* mcResetConnections = new FXMenuCommand(ret, "Reset connections", nullptr, &parent, MID_GNE_JUNCTION_RESET_CONNECTIONS); - // check if menu commands has to be disabled - EditMode editMode = myNet->getViewNet()->getCurrentEditMode(); - const bool wrongMode = (editMode == GNE_MODE_CONNECT || editMode == GNE_MODE_TLS || editMode == GNE_MODE_CREATE_EDGE); + // check if current mode is correct if (wrongMode) { mcCustomShape->disable(); mcClearConnections->disable(); mcResetConnections->disable(); } + // check if we're handling a selection + if (handlingSelection) { + mcResetCustomShape->setText("Reset junction shapes"); + } // disable mcClearConnections if juction hasn't connections if (getGNEConnections().empty()) { mcClearConnections->disable(); } // disable mcResetCustomShape if junction doesn't have a custom shape - if (!myNBNode.hasCustomShape()) { + if (myNBNode.getShape().size() == 0) { mcResetCustomShape->disable(); } // checkIsRemovable requiers turnarounds to be computed. This is ugly - if (myNBNode.getIncomingEdges().size() == 2 && myNBNode.getOutgoingEdges().size() == 2) { + if ((myNBNode.getIncomingEdges().size() == 2) && (myNBNode.getOutgoingEdges().size() == 2)) { NBTurningDirectionsComputer::computeTurnDirectionsForNode(&myNBNode, false); } std::string reason = "wrong edit mode"; @@ -205,6 +244,7 @@ } if (numEndpoints == 1) { mcSplit->disable(); + mcSplitReconnect->disable(); } return ret; } @@ -225,15 +265,9 @@ void GNEJunction::drawGL(const GUIVisualizationSettings& s) const { - /* - // first call function mouseOverObject (to check if this object is under cursor) - // @note currently disabled. It will be implemented in an different ticket of #2905 - mouseOverObject(s); - */ // declare variables - GLfloat color[4]; double exaggeration = isAttributeCarrierSelected() ? s.selectionScale : 1; - exaggeration *= s.junctionSize.getExaggeration(s, this); + exaggeration *= s.junctionSize.getExaggeration(s, this, 4); // declare values for circles double circleWidth = BUBBLE_RADIUS * exaggeration; double circleWidthSquared = circleWidth * circleWidth; @@ -253,10 +287,9 @@ || myNet->getViewNet()->showJunctionAsBubbles()); if (drawShape) { - setColor(s, false); + RGBColor color = setColor(s, false); // recognize full transparency and simply don't draw - glGetFloatv(GL_CURRENT_COLOR, color); - if (color[3] != 0) { + if (color.alpha() != 0) { glPushMatrix(); glTranslated(0, 0, getType()); PositionVector shape = myNBNode.getShape(); @@ -277,10 +310,9 @@ } } if (drawBubble) { - setColor(s, true); + RGBColor color = setColor(s, true); // recognize full transparency and simply don't draw - glGetFloatv(GL_CURRENT_COLOR, color); - if (color[3] != 0) { + if (color.alpha() != 0) { glPushMatrix(); glTranslated(myNBNode.getPosition().x(), myNBNode.getPosition().y(), getType() + 0.05); if (!s.drawForSelecting || (myNet->getViewNet()->getPositionInformation().distanceSquaredTo2D(myNBNode.getPosition()) <= (circleWidthSquared + 2))) { @@ -296,7 +328,7 @@ } } // draw TLS icon if isn't being drawn for selecting - if ((s.editMode == GNE_MODE_TLS) && (myNBNode.isTLControlled()) && !myAmTLSSelected && !s.drawForSelecting) { + if ((s.editMode == GNE_NMODE_TLS) && (myNBNode.isTLControlled()) && !myAmTLSSelected && !s.drawForSelecting) { glPushMatrix(); Position pos = myNBNode.getPosition(); glTranslated(pos.x(), pos.y(), getType() + 0.1); @@ -311,7 +343,7 @@ drawName(myNBNode.getPosition(), s.scale, s.junctionName); } // draw elevation - if (!s.drawForSelecting && myNet->getViewNet()->editingElevation()) { + if (!s.drawForSelecting && myNet->getViewNet()->getMoveOptions().editingElevation()) { glPushMatrix(); // Translate to center of junction glTranslated(myNBNode.getPosition().x(), myNBNode.getPosition().y(), getType() + 1); @@ -340,12 +372,6 @@ } -Position -GNEJunction::getPositionInView() const { - return myNBNode.getPosition(); -} - - std::vector GNEJunction::getJunctionNeighbours() const { // use set to avoid duplicates junctions @@ -580,7 +606,7 @@ GNEJunction::commitGeometryMoving(const Position& oldPos, GNEUndoList* undoList) { if (isValid(SUMO_ATTR_POSITION, toString(myNBNode.getPosition()))) { undoList->p_begin("position of " + getTagStr()); - undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(myNBNode.getPosition()), true, toString(oldPos))); + undoList->p_add(new GNEChange_Attribute(this, myNet, SUMO_ATTR_POSITION, toString(myNBNode.getPosition()), true, toString(oldPos))); undoList->p_end(); } else { // tried to set an invalid position, revert back to the previous one @@ -649,9 +675,9 @@ for (EdgeVector::iterator it = incoming.begin(); it != incoming.end(); it++) { GNEEdge* srcEdge = myNet->retrieveEdge((*it)->getID()); removeConnectionsFrom(srcEdge, undoList, false); // false, because the whole tls will be invalidated at the end - undoList->add(new GNEChange_Attribute(srcEdge, GNE_ATTR_MODIFICATION_STATUS, status), true); + undoList->add(new GNEChange_Attribute(srcEdge, myNet, GNE_ATTR_MODIFICATION_STATUS, status), true); } - undoList->add(new GNEChange_Attribute(this, GNE_ATTR_MODIFICATION_STATUS, status), true); + undoList->add(new GNEChange_Attribute(this, myNet, GNE_ATTR_MODIFICATION_STATUS, status), true); invalidateTLS(undoList); } else { // logic valed, then rebuild GNECrossings to adapt it to the new logic @@ -790,7 +816,7 @@ for (EdgeVector::iterator it = incoming.begin(); it != incoming.end(); it++) { NBEdge* srcNBE = *it; GNEEdge* srcEdge = myNet->retrieveEdge(srcNBE->getID()); - undoList->add(new GNEChange_Attribute(srcEdge, GNE_ATTR_MODIFICATION_STATUS, FEATURE_MODIFIED), true); + undoList->add(new GNEChange_Attribute(srcEdge, myNet, GNE_ATTR_MODIFICATION_STATUS, FEATURE_MODIFIED), true); } } @@ -816,11 +842,11 @@ // however, the could remain valud so we register a change but keep them at their old value for (GNECrossing* c : myGNECrossings) { const std::string oldValue = c->getAttribute(SUMO_ATTR_TLLINKINDEX); - undoList->add(new GNEChange_Attribute(c, SUMO_ATTR_TLLINKINDEX, toString(NBConnection::InvalidTlIndex)), true); - undoList->add(new GNEChange_Attribute(c, SUMO_ATTR_TLLINKINDEX, oldValue), true); + undoList->add(new GNEChange_Attribute(c, myNet, SUMO_ATTR_TLLINKINDEX, toString(NBConnection::InvalidTlIndex)), true); + undoList->add(new GNEChange_Attribute(c, myNet, SUMO_ATTR_TLLINKINDEX, oldValue), true); const std::string oldValue2 = c->getAttribute(SUMO_ATTR_TLLINKINDEX); - undoList->add(new GNEChange_Attribute(c, SUMO_ATTR_TLLINKINDEX2, toString(NBConnection::InvalidTlIndex)), true); - undoList->add(new GNEChange_Attribute(c, SUMO_ATTR_TLLINKINDEX2, oldValue2), true); + undoList->add(new GNEChange_Attribute(c, myNet, SUMO_ATTR_TLLINKINDEX2, toString(NBConnection::InvalidTlIndex)), true); + undoList->add(new GNEChange_Attribute(c, myNet, SUMO_ATTR_TLLINKINDEX2, oldValue2), true); } } NBLoadedSUMOTLDef* repl = new NBLoadedSUMOTLDef(tlDef, tlDef->getLogic()); @@ -951,6 +977,8 @@ } case SUMO_ATTR_RIGHT_OF_WAY: return SUMOXMLDefinitions::RightOfWayValues.getString(myNBNode.getRightOfWay()); + case SUMO_ATTR_FRINGE: + return SUMOXMLDefinitions::FringeTypeValues.getString(myNBNode.getFringeType()); case GNE_ATTR_SELECTED: return toString(isAttributeCarrierSelected()); case GNE_ATTR_GENERIC: @@ -974,19 +1002,20 @@ case SUMO_ATTR_RADIUS: case SUMO_ATTR_TLTYPE: case SUMO_ATTR_RIGHT_OF_WAY: + case SUMO_ATTR_FRINGE: case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: - undoList->add(new GNEChange_Attribute(this, key, value), true); + undoList->add(new GNEChange_Attribute(this, myNet, key, value), true); break; case SUMO_ATTR_KEEP_CLEAR: // change Keep Clear attribute in all connections undoList->p_begin("change keepClear for whole junction"); for (auto i : myGNEIncomingEdges) { for (auto j : i->getGNEConnections()) { - undoList->add(new GNEChange_Attribute(j, key, value), true); + undoList->add(new GNEChange_Attribute(j, myNet, key, value), true); } } - undoList->add(new GNEChange_Attribute(this, key, value), true); + undoList->add(new GNEChange_Attribute(this, myNet, key, value), true); undoList->p_end(); break; case SUMO_ATTR_TYPE: { @@ -1016,7 +1045,7 @@ } } // must be the final step, otherwise we do not know which traffic lights to remove via GNEChange_TLS - undoList->add(new GNEChange_Attribute(this, key, value), true); + undoList->add(new GNEChange_Attribute(this, myNet, key, value), true); undoList->p_end(); break; } @@ -1110,6 +1139,8 @@ return canParse(value); case SUMO_ATTR_RIGHT_OF_WAY: return SUMOXMLDefinitions::RightOfWayValues.hasString(value); + case SUMO_ATTR_FRINGE: + return SUMOXMLDefinitions::FringeTypeValues.hasString(value); case GNE_ATTR_SELECTED: return canParse(value); case GNE_ATTR_GENERIC: @@ -1188,7 +1219,11 @@ break; } case SUMO_ATTR_TYPE: { - myNBNode.reinit(myNBNode.getPosition(), SUMOXMLDefinitions::NodeTypes.get(value)); + SumoXMLNodeType type = SUMOXMLDefinitions::NodeTypes.get(value); + if (myNBNode.getType() == NODETYPE_PRIORITY && type == NODETYPE_RIGHT_BEFORE_LEFT) { + myNet->getNetBuilder()->getEdgeCont().removeRoundabout(&myNBNode); + } + myNBNode.reinit(myNBNode.getPosition(), type); break; } case SUMO_ATTR_POSITION: { @@ -1234,6 +1269,9 @@ case SUMO_ATTR_RIGHT_OF_WAY: myNBNode.setRightOfWay(SUMOXMLDefinitions::RightOfWayValues.get(value)); break; + case SUMO_ATTR_FRINGE: + myNBNode.setFringeType(SUMOXMLDefinitions::FringeTypeValues.get(value)); + break; case GNE_ATTR_SELECTED: if (parse(value)) { selectAttributeCarrier(); @@ -1247,47 +1285,21 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } -void -GNEJunction::mouseOverObject(const GUIVisualizationSettings& s) const { - // only continue if there isn't already a AC under cursor - if (myNet->getViewNet()->getDottedAC() == nullptr) { - // obtain current x-y coordinates - Position mousePos = myNet->getViewNet()->getPositionInformation(); - // check if junction are drawn as buuble or as polygon - const bool drawShape = myNBNode.getShape().size() > 0 && s.drawJunctionShape; - const bool drawBubble = (((!drawShape || myNBNode.getShape().area() < 4) && s.drawJunctionShape) || myNet->getViewNet()->showJunctionAsBubbles()); - // declare values for circles - double exaggeration = isAttributeCarrierSelected() ? s.selectionScale : 1; - exaggeration *= s.junctionSize.getExaggeration(s, this); - double circleWidth = BUBBLE_RADIUS * exaggeration; - double circleWidthSquared = circleWidth * circleWidth; - if (drawBubble) { - // check if cursor is whithin the circle - if (myNet->getViewNet()->getPositionInformation().distanceSquaredTo2D(myNBNode.getPosition()) <= circleWidthSquared) { - myNet->getViewNet()->setDottedAC(this); - } - } else if (drawShape) { - // check if cursor is within the shape - if (myNBNode.getShape().around(mousePos)) { - myNet->getViewNet()->setDottedAC(this); - } - } - } -} - - double GNEJunction::getColorValue(const GUIVisualizationSettings& s, bool bubble) const { switch (s.junctionColorer.getActive()) { case 0: - if (bubble) { + if (bubble + // ensure visibility of red connections + && !(s.editMode == GNE_NMODE_TLS && myNBNode.isTLControlled()) + ) { return 1; } else { return 0; @@ -1350,16 +1362,18 @@ } -void +RGBColor GNEJunction::setColor(const GUIVisualizationSettings& s, bool bubble) const { - GLHelper::setColor(s.junctionColorer.getScheme().getColor(getColorValue(s, bubble))); + RGBColor color = s.junctionColorer.getScheme().getColor(getColorValue(s, bubble)); // override with special colors (unless the color scheme is based on selection) - if (isAttributeCarrierSelected() && s.junctionColorer.getActive() != 1) { - GLHelper::setColor(s.selectionColor); + if (drawUsingSelectColor() && s.junctionColorer.getActive() != 1) { + color = s.selectionColor; } if (myAmCreateEdgeSource) { - glColor3d(0, 1, 0); + color = RGBColor(0, 255, 0); } + GLHelper::setColor(color); + return color; } void diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEJunction.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNEJunction.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEJunction.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEJunction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -65,6 +65,18 @@ /// @brief Destructor ~GNEJunction(); + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + + /// @name Functions related with geometry of element + /// @{ + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + + /// @brief Returns position of hierarchical element in view + Position getPositionInView() const; + /// @} + /// @name inherited from GUIGlObject /// @{ /**@brief Returns an own popup-menu @@ -96,9 +108,6 @@ /// @brief Return net build node NBNode* getNBNode() const; - /// @brief Return current position - Position getPositionInView() const; - /// @brief return GNEJunction neighbours std::vector getJunctionNeighbours() const; @@ -138,9 +147,6 @@ /// @brief notify the junction of being selected in tls-mode. (used to control drawing) void selectTLS(bool selected); - /// @brief Update the boundary of the junction - void updateGeometry(bool updateGrid); - /// @name functions related with geometry movement /// @{ @@ -292,9 +298,6 @@ /// @brief method for setting the attribute and nothing else (used in GNEChange_Attribute) void setAttribute(SumoXMLAttr key, const std::string& value); - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /**@brief reposition the node at pos and informs the edges * @param[in] pos The new position * @note: those operations are not added to the undoList. @@ -302,7 +305,7 @@ void moveJunctionGeometry(const Position& pos, bool updateGrid); /// @brief sets junction color depending on circumstances - void setColor(const GUIVisualizationSettings& s, bool bubble) const; + RGBColor setColor(const GUIVisualizationSettings& s, bool bubble) const; /// @brief determines color value double getColorValue(const GUIVisualizationSettings& s, bool bubble) const; @@ -319,6 +322,9 @@ /// @brief remove the given connections from all traffic light definitions of this junction void removeTLSConnections(std::vector& connections, GNEUndoList* undoList); + /// @brief temporarily mirror coordinates in lefthand network to compute correct crossing geometries + void mirrorXLeftHand(); + /// @brief Invalidated copy constructor. GNEJunction(const GNEJunction&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNELane.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNELane.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNELane.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNELane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,12 +30,15 @@ #include #include #include +#include #include #include #include +#include #include #include #include +#include #include #include @@ -65,7 +68,7 @@ GNELane::GNELane() : GNENetElement(nullptr, "dummyConstructorGNELane", GLO_LANE, SUMO_TAG_LANE), - myParentEdge(GNEEdge::DummyEdge), + myParentEdge(GNEEdge::getDummyEdge()), myIndex(-1), mySpecialColor(nullptr) { } @@ -74,6 +77,92 @@ GNELane::~GNELane() { } +std::string +GNELane::generateChildID(SumoXMLTag /*childTag*/) { + // currently unused + return ""; +} + + +void +GNELane::updateGeometry(bool updateGrid) { + // Clear containers + myShapeRotations.clear(); + myShapeLengths.clear(); + myLaneRestrictedTexturePositions.clear(); + myLaneRestrictedTextureRotations.clear(); + //double length = myParentEdge.getLength(); // @todo see ticket #448 + // may be different from length + + // Obtain lane and shape rotations + int segments = (int) getShape().size() - 1; + if (segments >= 0) { + myShapeRotations.reserve(segments); + myShapeLengths.reserve(segments); + for (int i = 0; i < segments; ++i) { + const Position& f = getShape()[i]; + const Position& s = getShape()[i + 1]; + myShapeLengths.push_back(f.distanceTo2D(s)); + myShapeRotations.push_back((double) atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); + } + } + // update shapes parents associated with this lane + for (auto i : getShapeParents()) { + i->updateGeometry(updateGrid); + } + // update shape childs associated with this lane + for (auto i : getShapeChilds()) { + i->updateGeometry(updateGrid); + } + // update additionals parents associated with this lane + for (auto i : getAdditionalChilds()) { + i->updateGeometry(updateGrid); + } + // update additionals childs associated with this lane + for (auto i : getAdditionalParents()) { + i->updateGeometry(updateGrid); + } + // update demand elements parents associated with this lane + for (auto i : getDemandElementParents()) { + i->updateGeometry(updateGrid); + } + // update demand elements childs associated with this lane + for (auto i : getDemandElementChilds()) { + i->updateGeometry(updateGrid); + } + // In Move mode, connections aren't updated + if (myNet->getViewNet() && myNet->getViewNet()->getEditModes().networkEditMode != GNE_NMODE_MOVE) { + // Update incoming connections of this lane + auto incomingConnections = getGNEIncomingConnections(); + for (auto i : incomingConnections) { + i->updateGeometry(updateGrid); + } + // Update outgoings connections of this lane + auto outGoingConnections = getGNEOutcomingConnections(); + for (auto i : outGoingConnections) { + i->updateGeometry(updateGrid); + } + } + // If lane has enought length for show textures of restricted lanes + if ((getLaneShapeLength() > 4)) { + // if lane is restricted + if (isRestricted(SVC_PEDESTRIAN) || isRestricted(SVC_BICYCLE) || isRestricted(SVC_BUS)) { + // get values for position and rotation of icons + for (int i = 2; i < getLaneShapeLength() - 1; i += 15) { + myLaneRestrictedTexturePositions.push_back(getShape().positionAtOffset(i)); + myLaneRestrictedTextureRotations.push_back(getShape().rotationDegreeAtOffset(i)); + } + } + } +} + + +Position +GNELane::getPositionInView() const { + // currently unused + return Position(0, 0); +} + void GNELane::drawLinkNo(const GUIVisualizationSettings& s) const { @@ -254,8 +343,8 @@ // Push name glPushName(getGlID()); // Traslate to fromt - glTranslated(0, 0, getType()); - setLaneColor(s); + glTranslated(0, 0, myParentEdge.getNBEdge()->getLength() < 1 ? GLO_JUNCTION + 1 : getType()); + const RGBColor color = setLaneColor(s); // start drawing lane checking whether it is not too small const double selectionScale = isAttributeCarrierSelected() || myParentEdge.isAttributeCarrierSelected() ? s.selectionScale : 1; double exaggeration = selectionScale * s.laneWidthExaggeration; // * s.laneScaler.getScheme().getColor(getScaleValue(s.laneScaler.getActive())); @@ -263,9 +352,7 @@ //exaggeration *= s.laneScaler.getScheme().getColor(getScaleValue(s.laneScaler.getActive())); // recognize full transparency and simply don't draw - GLfloat color[4]; - glGetFloatv(GL_CURRENT_COLOR, color); - if ((color[3] == 0) || (s.scale * exaggeration < s.laneMinSize)) { + if (color.alpha() == 0 || (s.scale * exaggeration < s.laneMinSize)) { // Pop draw matrix 1 glPopMatrix(); } else if (s.scale * exaggeration < 1.) { @@ -283,7 +370,7 @@ // compute lane-marking intersection points) const double halfWidth2 = exaggeration * (myParentEdge.getNBEdge()->getLaneWidth(myIndex) / 2 - SUMO_const_laneMarkWidth / 2); // Draw as a normal lane, and reduce width to make sure that a selected edge can still be seen - const double halfWidth = myParentEdge.isAttributeCarrierSelected() ? halfWidth2 - exaggeration * 0.3 : halfWidth2; + const double halfWidth = drawUsingSelectColor() ? halfWidth2 - exaggeration * 0.3 : halfWidth2; const bool spreadSuperposed = s.spreadSuperposed && drawAsRailway(s) && myParentEdge.getNBEdge()->isBidiRail(); // Check if lane has to be draw as railway and if isn't being drawn for selecting if (drawAsRailway(s) && (!s.drawForSelecting || spreadSuperposed)) { @@ -397,7 +484,7 @@ // draw a Start/endPoints if lane has a custom shape if (!s.drawForSelecting && (myParentEdge.getNBEdge()->getLaneStruct(myIndex).customShape.size() > 1)) { GLHelper::setColor(s.junctionColorer.getSchemes()[0].getColor(2)); - if (isAttributeCarrierSelected() && s.laneColorer.getActive() != 1) { + if (drawUsingSelectColor() && s.laneColorer.getActive() != 1) { // override with special colors (unless the color scheme is based on selection) GLHelper::setColor(s.selectedEdgeColor.changedBrightness(-20)); } @@ -488,19 +575,19 @@ buildPopupHeader(ret, app); buildCenterPopupEntry(ret); // build copy names entry - if (editMode != GNE_MODE_TLS) { + if (editMode != GNE_NMODE_TLS) { new FXMenuCommand(ret, "Copy edge parent name to clipboard", nullptr, ret, MID_COPY_EDGE_NAME); buildNameCopyPopupEntry(ret); } // build selection myNet->getViewNet()->buildSelectionACPopupEntry(ret, this); - if (editMode != GNE_MODE_TLS) { + if (editMode != GNE_NMODE_TLS) { // build show parameters menu buildShowParamsPopupEntry(ret); // build position copy entry buildPositionCopyEntry(ret, false); } - if (editMode != GNE_MODE_CONNECT && editMode != GNE_MODE_TLS && editMode != GNE_MODE_CREATE_EDGE) { + if (editMode != GNE_NMODE_CONNECT && editMode != GNE_NMODE_TLS && editMode != GNE_NMODE_CREATE_EDGE) { // Get icons FXIcon* pedestrianIcon = GUIIconSubSys::getIcon(ICON_LANEPEDESTRIAN); FXIcon* bikeIcon = GUIIconSubSys::getIcon(ICON_LANEBIKE); @@ -625,7 +712,7 @@ if (!edgeHasSidewalk && !edgeHasBikelane && !edgeHasBuslane && !edgeHasGreenVerge) { cascadeRemoveSpecialLane->disable(); } - } else if (editMode == GNE_MODE_TLS) { + } else if (editMode == GNE_NMODE_TLS) { if (myNet->getViewNet()->getViewParent()->getTLSEditorFrame()->controlsEdge(myParentEdge)) { new FXMenuCommand(ret, "Select state for all links from this edge:", nullptr, nullptr, 0); const std::vector names = GNEInternalLane::LinkStateNames.getStrings(); @@ -642,7 +729,7 @@ } // buildShowParamsPopupEntry(ret, false); // build shape positions menu - if (editMode != GNE_MODE_TLS) { + if (editMode != GNE_NMODE_TLS) { new FXMenuSeparator(ret); const double pos = getShape().nearest_offset_to_point2D(parent.getPositionInformation()); const double height = getShape().positionAtOffset2D(getShape().nearest_offset_to_point2D(parent.getPositionInformation())).z(); @@ -693,66 +780,6 @@ } -void -GNELane::updateGeometry(bool updateGrid) { - // Clear containers - myShapeRotations.clear(); - myShapeLengths.clear(); - myLaneRestrictedTexturePositions.clear(); - myLaneRestrictedTextureRotations.clear(); - //double length = myParentEdge.getLength(); // @todo see ticket #448 - // may be different from length - - // Obtain lane and shape rotations - int segments = (int) getShape().size() - 1; - if (segments >= 0) { - myShapeRotations.reserve(segments); - myShapeLengths.reserve(segments); - for (int i = 0; i < segments; ++i) { - const Position& f = getShape()[i]; - const Position& s = getShape()[i + 1]; - myShapeLengths.push_back(f.distanceTo2D(s)); - myShapeRotations.push_back((double) atan2((s.x() - f.x()), (f.y() - s.y())) * (double) 180.0 / (double)M_PI); - } - } - // update additional childs - for (auto i : myAdditionalChilds) { - i->updateGeometry(updateGrid); - } - // update additionals with this lane as chid - for (auto i : myFirstAdditionalParents) { - i->updateGeometry(updateGrid); - } - // update POIs associated to this lane - for (auto i : myShapes) { - i->updateGeometry(updateGrid); - } - // In Move mode, connections aren't updated - if (myNet->getViewNet() && myNet->getViewNet()->getCurrentEditMode() != GNE_MODE_MOVE) { - // Update incoming connections of this lane - auto incomingConnections = getGNEIncomingConnections(); - for (auto i : incomingConnections) { - i->updateGeometry(updateGrid); - } - // Update outgoings connections of this lane - auto outGoingConnections = getGNEOutcomingConnections(); - for (auto i : outGoingConnections) { - i->updateGeometry(updateGrid); - } - } - // If lane has enought length for show textures of restricted lanes - if ((getLaneShapeLength() > 4)) { - // if lane is restricted - if (isRestricted(SVC_PEDESTRIAN) || isRestricted(SVC_BICYCLE) || isRestricted(SVC_BUS)) { - // get values for position and rotation of icons - for (int i = 2; i < getLaneShapeLength() - 1; i += 15) { - myLaneRestrictedTexturePositions.push_back(getShape().positionAtOffset(i)); - myLaneRestrictedTextureRotations.push_back(getShape().rotationDegreeAtOffset(i)); - } - } - } -} - int GNELane::getIndex() const { return myIndex; @@ -788,37 +815,6 @@ } -void -GNELane::addShapeChild(GNEShape* shape) { - // Check if Shape exist before remove - if (std::find(myShapes.begin(), myShapes.end(), shape) == myShapes.end()) { - myShapes.push_back(shape); - // update Geometry of shape after add - shape->updateGeometry(true); - } else { - throw ProcessError(shape->getTagStr() + " with ID='" + shape->getID() + "' was already inserted in lane with ID='" + getID() + "'"); - } -} - - -void -GNELane::removeShapeChild(GNEShape* shape) { - auto it = std::find(myShapes.begin(), myShapes.end(), shape); - // Check if Shape exist before remove - if (it != myShapes.end()) { - myShapes.erase(it); - } else { - throw ProcessError(shape->getTagStr() + " with ID='" + shape->getID() + "' doesn't exist in lane with ID='" + getID() + "'"); - } -} - - -const std::vector& -GNELane::getShapeChilds() const { - return myShapes; -} - - bool GNELane::isRestricted(SUMOVehicleClass vclass) const { return myParentEdge.getNBEdge()->getPermissions(myIndex) == vclass; @@ -882,7 +878,7 @@ case GNE_ATTR_SELECTED: case GNE_ATTR_GENERIC: // no special handling - undoList->p_add(new GNEChange_Attribute(this, key, value)); + undoList->p_add(new GNEChange_Attribute(this, myNet, key, value)); break; default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); @@ -979,8 +975,9 @@ void -GNELane::setSpecialColor(const RGBColor* color) { +GNELane::setSpecialColor(const RGBColor* color, double colorValue) { mySpecialColor = color; + mySpecialColorValue = colorValue; } // =========================================================================== @@ -1033,44 +1030,42 @@ default: throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'"); } - // Update Geometry after setting a new attribute (but avoided for certain attributes) - if((key != SUMO_ATTR_ID) && (key != GNE_ATTR_GENERIC) && (key != GNE_ATTR_SELECTED)) { + // check if updated attribute requieres update geometry + if (myTagProperty.hasAttribute(key) && myTagProperty.getAttributeProperties(key).requiereUpdateGeometry()) { updateGeometry(true); } } -void -GNELane::mouseOverObject(const GUIVisualizationSettings&) const { -} - - -void +RGBColor GNELane::setLaneColor(const GUIVisualizationSettings& s) const { + RGBColor color; if (mySpecialColor != nullptr) { // If special color is enabled, set it - GLHelper::setColor(*mySpecialColor); - } else if (isAttributeCarrierSelected() && s.laneColorer.getActive() != 1) { + color = *mySpecialColor; + } else if (drawUsingSelectColor() && s.laneColorer.getActive() != 1) { // override with special colors (unless the color scheme is based on selection) - GLHelper::setColor(s.selectedLaneColor); - } else if (myParentEdge.isAttributeCarrierSelected() && s.laneColorer.getActive() != 1) { + color = s.selectedLaneColor; + } else if (myParentEdge.drawUsingSelectColor() && s.laneColorer.getActive() != 1) { // override with special colors (unless the color scheme is based on selection) - GLHelper::setColor(s.selectedEdgeColor); + color = s.selectedEdgeColor; } else { // Get normal lane color const GUIColorer& c = s.laneColorer; - if (!setFunctionalColor(c.getActive()) && !setMultiColor(c)) { - GLHelper::setColor(c.getScheme().getColor(getColorValue(s, c.getActive()))); + if (!setFunctionalColor(c.getActive(), color) && !setMultiColor(s, c, color)) { + color = c.getScheme().getColor(getColorValue(s, c.getActive())); } } + GLHelper::setColor(color); + return color; } bool -GNELane::setFunctionalColor(int activeScheme) const { +GNELane::setFunctionalColor(int activeScheme, RGBColor& col) const { switch (activeScheme) { case 6: { double hue = GeomHelper::naviDegree(getShape().beginEndAngle()); // [0-360] - GLHelper::setColor(RGBColor::fromHSV(hue, 1., 1.)); + col = RGBColor::fromHSV(hue, 1., 1.); return true; } default: @@ -1080,7 +1075,7 @@ bool -GNELane::setMultiColor(const GUIColorer& c) const { +GNELane::setMultiColor(const GUIVisualizationSettings& s, const GUIColorer& c, RGBColor& col) const { const int activeScheme = c.getActive(); myShapeColors.clear(); switch (activeScheme) { @@ -1088,12 +1083,14 @@ for (PositionVector::const_iterator ii = getShape().begin(); ii != getShape().end() - 1; ++ii) { myShapeColors.push_back(c.getScheme().getColor(ii->z())); } + col = c.getScheme().getColor(getColorValue(s, 8)); return true; case 11: // color by inclination at segment start for (int ii = 1; ii < (int)getShape().size(); ++ii) { const double inc = (getShape()[ii].z() - getShape()[ii - 1].z()) / MAX2(POSITION_EPS, getShape()[ii].distanceTo2D(getShape()[ii - 1])); myShapeColors.push_back(c.getScheme().getColor(inc)); } + col = c.getScheme().getColor(getColorValue(s, 10)); return true; default: return false; @@ -1104,6 +1101,9 @@ double GNELane::getColorValue(const GUIVisualizationSettings& s, int activeScheme) const { const SVCPermissions myPermissions = myParentEdge.getNBEdge()->getPermissions(myIndex); + if (mySpecialColor != nullptr && mySpecialColorValue != std::numeric_limits::max()) { + return mySpecialColorValue; + } switch (activeScheme) { case 0: switch (myPermissions) { @@ -1174,36 +1174,6 @@ } -void -GNELane::removeLaneOfAdditionalParents(GNEUndoList* undoList, bool allowEmpty) { - // iterate over all additional parents of lane - for (auto i : myFirstAdditionalParents) { - // Obtain attribute LANES of additional - std::vector laneIDs = parse >(i->getAttribute(SUMO_ATTR_LANES)); - // check that at least there is an lane - if (laneIDs.empty()) { - throw ProcessError("Additional lane childs is empty"); - } else if ((laneIDs.size() == 1) && (allowEmpty == false)) { - // remove entire Additional if SUMO_ATTR_LANES cannot be empty - if (laneIDs.front() == getID()) { - undoList->add(new GNEChange_Additional(i, false), true); - } else { - throw ProcessError("lane ID wasnt' found in Additional"); - } - } else { - auto it = std::find(laneIDs.begin(), laneIDs.end(), getID()); - if (it != laneIDs.end()) { - // set new attribute in Additional - laneIDs.erase(it); - i->setAttribute(SUMO_ATTR_LANES, toString(laneIDs), undoList); - } else { - throw ProcessError("lane ID wasnt' found in Additional"); - } - } - } -} - - bool GNELane::drawAsRailway(const GUIVisualizationSettings& s) const { return isRailway(myParentEdge.getNBEdge()->getPermissions(myIndex)) && s.showRails && (!s.drawForSelecting || s.spreadSuperposed); @@ -1327,16 +1297,28 @@ void GNELane::startGeometryMoving() { // Lanes don't need to save the current Centering Boundary, due they are parts of an Edge + // Save current centering boundary of shape childs + for (auto i : getShapeChilds()) { + i->startGeometryMoving(); + } + // Save current centering boundary of shapes with this lane as chid + for (auto i : getShapeParents()) { + i->startGeometryMoving(); + } // Save current centering boundary of additional childs - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { i->startGeometryMoving(); } // Save current centering boundary of additionals with this lane as chid - for (auto i : myFirstAdditionalParents) { + for (auto i : getAdditionalParents()) { i->startGeometryMoving(); } - // Save current centering boundary of POIs associated to this lane - for (auto i : myShapes) { + // Save current centering boundary of demand element childs + for (auto i : getDemandElementChilds()) { + i->startGeometryMoving(); + } + // Save current centering boundary of demand element with this lane as chid + for (auto i : getDemandElementParents()) { i->startGeometryMoving(); } } @@ -1345,16 +1327,28 @@ void GNELane::endGeometryMoving() { // Lanes don't need to save the current Centering Boundary, due they are parts of an Edge + // Restore centering boundary of shapes with this lane as chid + for (auto i : getShapeChilds()) { + i->endGeometryMoving(); + } + // Restore centering boundary of shapes with this lane as chid + for (auto i : getShapeParents()) { + i->endGeometryMoving(); + } // Restore centering boundary of additionals with this lane as chid - for (auto i : myAdditionalChilds) { + for (auto i : getAdditionalChilds()) { i->endGeometryMoving(); } // Restore centering boundary of additionals with this lane as chid - for (auto i : myFirstAdditionalParents) { + for (auto i : getAdditionalParents()) { + i->endGeometryMoving(); + } + // Restore centering boundary of demand elements with this lane as chid + for (auto i : getDemandElementChilds()) { i->endGeometryMoving(); } - // Restore centering boundary of POIs associated to this lane - for (auto i : myShapes) { + // Restore centering boundary of demand elements with this lane as chid + for (auto i : getDemandElementParents()) { i->endGeometryMoving(); } } diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNELane.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNELane.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNELane.h 2018-11-14 23:00:56.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNELane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,7 +34,6 @@ class GNEEdge; class GNENet; class GNEConnection; -class GNEShape; // =========================================================================== // class definitions @@ -60,6 +59,18 @@ /// @brief Destructor ~GNELane(); + /// @brief gererate a new ID for an element child + std::string generateChildID(SumoXMLTag childTag); + + /// @name Functions related with geometry of element + /// @{ + /// @brief update pre-computed geometry information + void updateGeometry(bool updateGrid); + + /// @brief Returns position of hierarchical element in view + Position getPositionInView() const; + /// @} + /// @brief Returns underlying parent edge GNEEdge& getParentEdge(); @@ -128,10 +139,6 @@ /// @brief returns the boundry (including lanes) Boundary getBoundary() const; - /// @brief update pre-computed geometry information - // @note: must be called when geometry changes (i.e. junction moved) - void updateGeometry(bool updateGrid); - /// @brief returns the index of the lane int getIndex() const; @@ -151,15 +158,6 @@ /// @brief returns the length of the lane's shape double getLaneShapeLength() const; - /// @brief add shape child to this lane - void addShapeChild(GNEShape* shape); - - /// @brief remove shape child of this lane - void removeShapeChild(GNEShape* shape); - - /// @brief get shape childs of lane - const std::vector& getShapeChilds() const; - /// @brief check if this lane is restricted bool isRestricted(SUMOVehicleClass vclass) const; @@ -204,13 +202,14 @@ /* @brief method for setting the special color of the lane * @param[in] color Pointer to new special color */ - void setSpecialColor(const RGBColor* Color2); + void setSpecialColor(const RGBColor* Color2, double colorValue = std::numeric_limits::max()); /// @brief return value for lane coloring according to the given scheme double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const; - /// @brief remove lane of Additional Parent - void removeLaneOfAdditionalParents(GNEUndoList* undoList, bool allowEmpty); + /// @brief whether to draw this lane as a railway + bool drawAsRailway(const GUIVisualizationSettings& s) const; + protected: /// @brief FOX needs this @@ -240,12 +239,12 @@ std::vector myLaneRestrictedTextureRotations; /// @} - /// @brief list with the shapes vinculated with this lane - std::vector myShapes; - /// @brief optional special color const RGBColor* mySpecialColor; + /// @brief optional value that corresponds to which the special color corresponds + double mySpecialColorValue; + /// @brief The color of the shape parts (cached) mutable std::vector myShapeColors; @@ -253,9 +252,6 @@ /// @brief set attribute after validation void setAttribute(SumoXMLAttr key, const std::string& value); - /// @brief method for check if mouse is over objects - void mouseOverObject(const GUIVisualizationSettings& s) const; - /// @brief draw lane markings void drawMarkings(const GUIVisualizationSettings& s, double scale) const; @@ -275,13 +271,10 @@ void drawLane2LaneConnections() const; /// @brief sets the color according to the current scheme index and some lane function - bool setFunctionalColor(int activeScheme) const; + bool setFunctionalColor(int activeScheme, RGBColor& col) const; /// @brief sets multiple colors according to the current scheme index and some lane function - bool setMultiColor(const GUIColorer& c) const; - - /// @brief whether to draw this lane as a railway - bool drawAsRailway(const GUIVisualizationSettings& s) const; + bool setMultiColor(const GUIVisualizationSettings& s, const GUIColorer& c, RGBColor& col) const; /// @brief whether to draw this lane as a waterways bool drawAsWaterway(const GUIVisualizationSettings& s) const; @@ -290,7 +283,7 @@ void drawDirectionIndicators(double exaggeration, bool spreadSuperposed) const; /// @brief set color according to edit mode and visualisation settings - void setLaneColor(const GUIVisualizationSettings& s) const; + RGBColor setLaneColor(const GUIVisualizationSettings& s) const; /// @brief Invalidated copy constructor. GNELane(const GNELane&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNENetElement.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNENetElement.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNENetElement.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNENetElement.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,8 +22,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -39,82 +41,24 @@ GNENetElement::GNENetElement(GNENet* net, const std::string& id, GUIGlObjectType type, SumoXMLTag tag) : GUIGlObject(type, id), GNEAttributeCarrier(tag), - myNet(net), - myMovingGeometryBoundary() {} + GNEHierarchicalElementParents(this, {}, {}, {}, {}, {}), + GNEHierarchicalElementChilds(this, {}, {}, {}, {}, {}), + myNet(net), +myMovingGeometryBoundary() {} GNENetElement::~GNENetElement() {} -GNENet* -GNENetElement::getNet() const { - return myNet; -} - - -void -GNENetElement::addAdditionalParent(GNEAdditional* additional) { - // First check that additional wasn't already inserted - if (std::find(myFirstAdditionalParents.begin(), myFirstAdditionalParents.end(), additional) != myFirstAdditionalParents.end()) { - throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' was already inserted in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myFirstAdditionalParents.push_back(additional); - // update geometry is needed for stacked additionals (routeProbes and Vaporicers) - updateGeometry(true); - } -} - - -void -GNENetElement::removeAdditionalParent(GNEAdditional* additional) { - // First check that additional was already inserted - auto it = std::find(myFirstAdditionalParents.begin(), myFirstAdditionalParents.end(), additional); - if (it == myFirstAdditionalParents.end()) { - throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myFirstAdditionalParents.erase(it); - // update geometry is needed for stacked additionals (routeProbes and Vaporizers) - updateGeometry(true); - } -} - - -void -GNENetElement::addAdditionalChild(GNEAdditional* additional) { - // First check that additional wasn't already inserted - if (std::find(myAdditionalChilds.begin(), myAdditionalChilds.end(), additional) != myAdditionalChilds.end()) { - throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' was already inserted in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myAdditionalChilds.push_back(additional); - // update geometry is needed for stacked additionals (routeProbes and Vaporicers) - updateGeometry(true); - } -} - - -void -GNENetElement::removeAdditionalChild(GNEAdditional* additional) { - // First check that additional was already inserted - auto it = std::find(myAdditionalChilds.begin(), myAdditionalChilds.end(), additional); - if (it == myAdditionalChilds.end()) { - throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist in " + getTagStr() + " with ID='" + getID() + "'"); - } else { - myAdditionalChilds.erase(it); - // update geometry is needed for stacked additionals (routeProbes and Vaporizers) - updateGeometry(true); - } -} - - -const std::vector& -GNENetElement::getAdditionalParents() const { - return myFirstAdditionalParents; +std::string +GNENetElement::generateChildID(SumoXMLTag /*childTag*/) { + return ""; } -const std::vector& -GNENetElement::getAdditionalChilds() const { - return myAdditionalChilds; +GNENet* +GNENetElement::getNet() const { + return myNet; } @@ -123,7 +67,7 @@ // Create table GUIParameterTableWindow* ret = new GUIParameterTableWindow(app, *this, myTagProperty.getNumberOfAttributes()); // Iterate over attributes - for (const auto &i : myTagProperty) { + for (const auto& i : myTagProperty) { // Add attribute and set it dynamic if aren't unique if (i.second.isUnique()) { ret->mkItem(toString(i.first).c_str(), false, getAttribute(i.first)); @@ -147,7 +91,7 @@ myNet->getViewNet()->getViewParent()->getSelectorFrame()->getLockGLObjectTypes()->addedLockedObject(getType()); if (changeFlag) { mySelected = true; - + } } } @@ -174,6 +118,16 @@ } +bool +GNENetElement::drawUsingSelectColor() const { + if (mySelected && (myNet->getViewNet()->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK)) { + return true; + } else { + return false; + } +} + + std::string GNENetElement::getPopUpID() const { if (myTagProperty.getTag() == SUMO_TAG_CONNECTION) { @@ -190,8 +144,8 @@ return toString(SUMO_TAG_LANE) + " " + getAttribute(SUMO_ATTR_INDEX); } else if (myTagProperty.getTag() == SUMO_TAG_CONNECTION) { return getAttribute(SUMO_ATTR_FROM_LANE) + " -> " + getAttribute(SUMO_ATTR_TO_LANE); - } else if (myTagProperty.getTag() == SUMO_TAG_CROSSING) { - return toString(SUMO_TAG_CROSSING) + " " + getAttribute(SUMO_ATTR_ID); + } else if ((myTagProperty.getTag() == SUMO_TAG_EDGE) || (myTagProperty.getTag() == SUMO_TAG_CROSSING)) { + return getPopUpID(); } else { return getTagStr(); } diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNENetElement.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNENetElement.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNENetElement.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNENetElement.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,8 @@ // =========================================================================== #include -#include +#include +#include #include // =========================================================================== @@ -31,12 +32,13 @@ // =========================================================================== class GNEAdditional; +class GNEDemandElement; // =========================================================================== // class definitions // =========================================================================== -class GNENetElement : public GUIGlObject, public GNEAttributeCarrier { +class GNENetElement : public GUIGlObject, public GNEAttributeCarrier, public GNEHierarchicalElementParents, public GNEHierarchicalElementChilds { public: /**@brief Constructor. @@ -50,32 +52,21 @@ /// @brief Destructor ~GNENetElement(); - /**@brief update pre-computed geometry information - * @note: must be called when geometry changes (i.e. lane moved) and implemented in ALL childrens - */ + /// @brief gererate a new ID for an element child + virtual std::string generateChildID(SumoXMLTag childTag) = 0; + + /// @name Functions related with geometry of element + /// @{ + /// @brief update pre-computed geometry information virtual void updateGeometry(bool updateGrid) = 0; + /// @brief Returns position of hierarchical element in view + virtual Position getPositionInView() const = 0; + /// @} + /// @brief get Net in which this element is placed GNENet* getNet() const; - /// @brief add additional child to this edge - void addAdditionalParent(GNEAdditional* additional); - - /// @brief remove additional child from this edge - void removeAdditionalParent(GNEAdditional* additional); - - /// @brief add additional child to this edge - void addAdditionalChild(GNEAdditional* additional); - - /// @brief remove additional child from this edge - void removeAdditionalChild(GNEAdditional* additional); - - /// @brief return vector of additionals that have as Parameter this edge (For example, Rerouters) - const std::vector& getAdditionalParents() const; - - /// @brief return vector of additionals that have as Parent this edge (For example, Calibrators) - const std::vector& getAdditionalChilds() const; - /// @name inherited from GUIGlObject /// @{ @@ -119,6 +110,9 @@ /// @brief check if attribute carrier is selected bool isAttributeCarrierSelected() const; + /// @brief check if attribute carrier must be drawn using selecting color. + bool drawUsingSelectColor() const; + /* @brief method for getting the Attribute of an XML key * @param[in] key The attribute key * @return string with the value associated to key @@ -167,19 +161,10 @@ /// @brief boundary used during moving of elements Boundary myMovingGeometryBoundary; - /// @brief list of Additional parents of this NetElement - std::vector myFirstAdditionalParents; - - /// @brief list of Additional Childs of this NetElement - std::vector myAdditionalChilds; - private: /// @brief set attribute after validation virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0; - /// @brief method for check if mouse is over objects - virtual void mouseOverObject(const GUIVisualizationSettings& s) const = 0; - /// @brief Invalidated copy constructor. GNENetElement(const GNENetElement&) = delete; diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEProhibition.cpp sumo-1.2.0+dfsg1/src/netedit/netelements/GNEProhibition.cpp --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEProhibition.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEProhibition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/GNEProhibition.h sumo-1.2.0+dfsg1/src/netedit/netelements/GNEProhibition.h --- sumo-1.1.0+dfsg1/src/netedit/netelements/GNEProhibition.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/GNEProhibition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netedit/netelements/Makefile.in sumo-1.2.0+dfsg1/src/netedit/netelements/Makefile.in --- sumo-1.1.0+dfsg1/src/netedit/netelements/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netedit/netelements/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,648 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netedit/netelements -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libneteditnetelements_a_AR = $(AR) $(ARFLAGS) -libneteditnetelements_a_LIBADD = -am_libneteditnetelements_a_OBJECTS = GNENetElement.$(OBJEXT) \ - GNEEdge.$(OBJEXT) GNELane.$(OBJEXT) GNEInternalLane.$(OBJEXT) \ - GNEConnection.$(OBJEXT) GNECrossing.$(OBJEXT) \ - GNEJunction.$(OBJEXT) GNEProhibition.$(OBJEXT) -libneteditnetelements_a_OBJECTS = \ - $(am_libneteditnetelements_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 = $(libneteditnetelements_a_SOURCES) -DIST_SOURCES = $(libneteditnetelements_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libneteditnetelements.a -libneteditnetelements_a_SOURCES = GNENetElement.cpp GNENetElement.h \ -GNEEdge.cpp GNEEdge.h \ -GNELane.cpp GNELane.h \ -GNEInternalLane.cpp GNEInternalLane.h \ -GNEConnection.cpp GNEConnection.h \ -GNECrossing.cpp GNECrossing.h \ -GNEJunction.cpp GNEJunction.h \ -GNEProhibition.cpp GNEProhibition.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) --foreign src/netedit/netelements/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netedit/netelements/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) - -libneteditnetelements.a: $(libneteditnetelements_a_OBJECTS) $(libneteditnetelements_a_DEPENDENCIES) $(EXTRA_libneteditnetelements_a_DEPENDENCIES) - $(AM_V_at)-rm -f libneteditnetelements.a - $(AM_V_AR)$(libneteditnetelements_a_AR) libneteditnetelements.a $(libneteditnetelements_a_OBJECTS) $(libneteditnetelements_a_LIBADD) - $(AM_V_at)$(RANLIB) libneteditnetelements.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEConnection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNECrossing.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEEdge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEInternalLane.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEJunction.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNELane.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNENetElement.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GNEProhibition.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netgen/Makefile.am sumo-1.2.0+dfsg1/src/netgen/Makefile.am --- sumo-1.1.0+dfsg1/src/netgen/Makefile.am 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -7,6 +7,7 @@ netgenerate_LDADD = \ ../netwrite/libnetwrite.a \ ../netbuild/libnetbuild.a \ +../utils/shapes/libshapes.a \ ../utils/geom/libgeom.a \ ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ diff -Nru sumo-1.1.0+dfsg1/src/netgen/Makefile.in sumo-1.2.0+dfsg1/src/netgen/Makefile.in --- sumo-1.1.0+dfsg1/src/netgen/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,705 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = netgenerate$(EXEEXT) -subdir = src/netgen -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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_netgenerate_OBJECTS = netgen_main.$(OBJEXT) NGEdge.$(OBJEXT) \ - NGFrame.$(OBJEXT) NGNet.$(OBJEXT) NGNode.$(OBJEXT) \ - NGRandomNetBuilder.$(OBJEXT) -netgenerate_OBJECTS = $(am_netgenerate_OBJECTS) -am__DEPENDENCIES_1 = -netgenerate_DEPENDENCIES = ../netwrite/libnetwrite.a \ - ../netbuild/libnetbuild.a ../utils/geom/libgeom.a \ - ../utils/options/liboptions.a ../utils/xml/libxml.a \ - ../utils/common/libcommon.a \ - ../utils/distribution/libdistribution.a \ - ../utils/importio/libimportio.a \ - ../utils/iodevices/libiodevices.a ../foreign/tcpip/libtcpip.a \ - $(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) $(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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -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_LDADD = \ -../netwrite/libnetwrite.a \ -../netbuild/libnetbuild.a \ -../utils/geom/libgeom.a \ -../utils/options/liboptions.a \ -../utils/xml/libxml.a \ -../utils/common/libcommon.a \ -../utils/distribution/libdistribution.a \ -../utils/importio/libimportio.a \ -../utils/iodevices/libiodevices.a \ -../foreign/tcpip/libtcpip.a \ --l$(LIB_XERCES) \ -$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_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) --foreign src/netgen/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netgen/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 - -netgenerate$(EXEEXT): $(netgenerate_OBJECTS) $(netgenerate_DEPENDENCIES) $(EXTRA_netgenerate_DEPENDENCIES) - @rm -f netgenerate$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(netgenerate_OBJECTS) $(netgenerate_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NGEdge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NGFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NGNet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NGNode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NGRandomNetBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netgen_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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netgen/_netgen.dox sumo-1.2.0+dfsg1/src/netgen/_netgen.dox --- sumo-1.1.0+dfsg1/src/netgen/_netgen.dox 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/_netgen.dox 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,14 @@ +/** + @file _netgen.dox + @defgoup netgen Network Generating Module + @brief generates abstract networks and stores them in netbuild classes + + @addtogroup netgen + @{ + netgen holds classes and methods generating abstract networks. The generated networks + are stored in according classes from the @ref netbuild module. + + + + @} +*/ \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/src/netgen/netgen_main.cpp sumo-1.2.0+dfsg1/src/netgen/netgen_main.cpp --- sumo-1.1.0+dfsg1/src/netgen/netgen_main.cpp 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/netgen_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGEdge.cpp sumo-1.2.0+dfsg1/src/netgen/NGEdge.cpp --- sumo-1.1.0+dfsg1/src/netgen/NGEdge.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGEdge.h sumo-1.2.0+dfsg1/src/netgen/NGEdge.h --- sumo-1.1.0+dfsg1/src/netgen/NGEdge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGFrame.cpp sumo-1.2.0+dfsg1/src/netgen/NGFrame.cpp --- sumo-1.1.0+dfsg1/src/netgen/NGFrame.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGFrame.h sumo-1.2.0+dfsg1/src/netgen/NGFrame.h --- sumo-1.1.0+dfsg1/src/netgen/NGFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGNet.cpp sumo-1.2.0+dfsg1/src/netgen/NGNet.cpp --- sumo-1.1.0+dfsg1/src/netgen/NGNet.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGNet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -215,7 +215,7 @@ myEdgeList.push_back(link2); } -Distribution_Parameterized +Distribution_Parameterized NGNet::getDistribution(const std::string& option) { std::string val = OptionsCont::getOptions().getString(option); try { @@ -235,9 +235,9 @@ std::vector nodes; for (NGNodeList::const_iterator i1 = myNodeList.begin(); i1 != myNodeList.end(); i1++) { Position perturb( - perturbx.sample(), - perturby.sample(), - perturbz.sample()); + perturbx.sample(), + perturby.sample(), + perturbz.sample()); NBNode* node = (*i1)->buildNBNode(myNetBuilder, perturb); nodes.push_back(node); myNetBuilder.getNodeCont().insert(node); diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGNet.h sumo-1.2.0+dfsg1/src/netgen/NGNet.h --- sumo-1.1.0+dfsg1/src/netgen/NGNet.h 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGNet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGNode.cpp sumo-1.2.0+dfsg1/src/netgen/NGNode.cpp --- sumo-1.1.0+dfsg1/src/netgen/NGNode.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGNode.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -59,7 +59,7 @@ NGEdgeList::iterator li; while (LinkList.size() != 0) { li = LinkList.begin(); - delete(*li); + delete (*li); } } diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGNode.h sumo-1.2.0+dfsg1/src/netgen/NGNode.h --- sumo-1.1.0+dfsg1/src/netgen/NGNode.h 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGNode.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGRandomNetBuilder.cpp sumo-1.2.0+dfsg1/src/netgen/NGRandomNetBuilder.cpp --- sumo-1.1.0+dfsg1/src/netgen/NGRandomNetBuilder.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGRandomNetBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netgen/NGRandomNetBuilder.h sumo-1.2.0+dfsg1/src/netgen/NGRandomNetBuilder.h --- sumo-1.1.0+dfsg1/src/netgen/NGRandomNetBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netgen/NGRandomNetBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/CMakeLists.txt sumo-1.2.0+dfsg1/src/netimport/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/netimport/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -35,6 +35,8 @@ NIXMLTypesHandler.h NIXMLPTHandler.cpp NIXMLPTHandler.h + NIXMLShapeHandler.cpp + NIXMLShapeHandler.h NIXMLTrafficLightsHandler.cpp NIXMLTrafficLightsHandler.h NINavTeqHelper.cpp diff -Nru sumo-1.1.0+dfsg1/src/netimport/Makefile.am sumo-1.2.0+dfsg1/src/netimport/Makefile.am --- sumo-1.1.0+dfsg1/src/netimport/Makefile.am 2018-07-29 22:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -17,6 +17,7 @@ NIXMLNodesHandler.cpp NIXMLNodesHandler.h \ NIXMLTypesHandler.cpp NIXMLTypesHandler.h \ NIXMLPTHandler.cpp NIXMLPTHandler.h \ +NIXMLShapeHandler.cpp NIXMLShapeHandler.h \ NIXMLTrafficLightsHandler.cpp NIXMLTrafficLightsHandler.h \ NINavTeqHelper.cpp NINavTeqHelper.h diff -Nru sumo-1.1.0+dfsg1/src/netimport/Makefile.in sumo-1.2.0+dfsg1/src/netimport/Makefile.in --- sumo-1.1.0+dfsg1/src/netimport/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,802 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netimport -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - NIImporter_ArcView.$(OBJEXT) NIImporter_DlrNavteq.$(OBJEXT) \ - NIImporter_ITSUMO.$(OBJEXT) NIImporter_MATSim.$(OBJEXT) \ - NIImporter_OpenDrive.$(OBJEXT) \ - NIImporter_OpenStreetMap.$(OBJEXT) \ - NIImporter_RobocupRescue.$(OBJEXT) NIImporter_SUMO.$(OBJEXT) \ - NIImporter_VISUM.$(OBJEXT) NIVisumTL.$(OBJEXT) \ - NIXMLConnectionsHandler.$(OBJEXT) NIXMLEdgesHandler.$(OBJEXT) \ - NIXMLNodesHandler.$(OBJEXT) NIXMLTypesHandler.$(OBJEXT) \ - NIXMLPTHandler.$(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) -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 = $(libnetimport_a_SOURCES) -DIST_SOURCES = $(libnetimport_a_SOURCES) -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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libnetimport.a -libnetimport_a_SOURCES = NIFrame.cpp NIFrame.h \ -NILoader.cpp NILoader.h \ -NIImporter_ArcView.cpp NIImporter_ArcView.h \ -NIImporter_DlrNavteq.cpp NIImporter_DlrNavteq.h \ -NIImporter_ITSUMO.cpp NIImporter_ITSUMO.h \ -NIImporter_MATSim.cpp NIImporter_MATSim.h \ -NIImporter_OpenDrive.cpp NIImporter_OpenDrive.h \ -NIImporter_OpenStreetMap.cpp NIImporter_OpenStreetMap.h \ -NIImporter_RobocupRescue.cpp NIImporter_RobocupRescue.h \ -NIImporter_SUMO.cpp NIImporter_SUMO.h \ -NIImporter_VISUM.cpp NIImporter_VISUM.h \ -NIVisumTL.cpp NIVisumTL.h \ -NIXMLConnectionsHandler.cpp NIXMLConnectionsHandler.h \ -NIXMLEdgesHandler.cpp NIXMLEdgesHandler.h \ -NIXMLNodesHandler.cpp NIXMLNodesHandler.h \ -NIXMLTypesHandler.cpp NIXMLTypesHandler.h \ -NIXMLPTHandler.cpp NIXMLPTHandler.h \ -NIXMLTrafficLightsHandler.cpp NIXMLTrafficLightsHandler.h \ -NINavTeqHelper.cpp NINavTeqHelper.h - -SUBDIRS = vissim -BUILT_SOURCES = typemap.h -EXTRA_DIST = typemap.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.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) --foreign src/netimport/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netimport/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIFrame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_ArcView.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_DlrNavteq.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_ITSUMO.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_MATSim.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_OpenDrive.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_OpenStreetMap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_RobocupRescue.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_SUMO.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_VISUM.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NILoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NINavTeqHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVisumTL.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIXMLConnectionsHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIXMLEdgesHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIXMLNodesHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIXMLPTHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIXMLTrafficLightsHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIXMLTypesHandler.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 - -# 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) -installdirs: installdirs-recursive -installdirs-am: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) all check install install-am \ - install-strip - -.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 \ - 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 - -.PRECIOUS: Makefile - -typemap.h: - ../../tools/build/typemap.py - -# 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-1.1.0+dfsg1/src/netimport/_netimport.dox sumo-1.2.0+dfsg1/src/netimport/_netimport.dox --- sumo-1.1.0+dfsg1/src/netimport/_netimport.dox 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/_netimport.dox 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,14 @@ +/** + @file _netimport.dox + @defgoup netimport Network Importing Module + @brief reads different network formats and stores them in netbuild-classes + + @addtogroup netimport + @{ + netimport holds classes and methods for reading road networks from different formats. The read data + is stored in according classes from the @ref netbuild module. + + + + @} +*/ \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIFrame.cpp sumo-1.2.0+dfsg1/src/netimport/NIFrame.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIFrame.cpp 2018-12-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -46,7 +46,7 @@ // method definitions // =========================================================================== void -NIFrame::fillOptions() { +NIFrame::fillOptions(bool forNetedit) { OptionsCont& oc = OptionsCont::getOptions(); // register input formats oc.doRegister("sumo-net-file", 's', new Option_FileName()); @@ -81,10 +81,15 @@ oc.addSynonyme("type-files", "types"); oc.addDescription("type-files", "Input", "Read XML-type defs from FILE"); - oc.doRegister("ptstop-files", new Option_FileName()); - oc.addDescription("ptstop-files", "Input", "Reads public transport stops from FILE"); - oc.doRegister("ptline-files", new Option_FileName()); - oc.addDescription("ptline-files", "Input", "Reads public transport lines from FILE"); + if (!forNetedit) { + // would cause confusion because netedit loads stops and shapes using option --additional-files + oc.doRegister("ptstop-files", new Option_FileName()); + oc.addDescription("ptstop-files", "Input", "Reads public transport stops from FILE"); + oc.doRegister("ptline-files", new Option_FileName()); + oc.addDescription("ptline-files", "Input", "Reads public transport lines from FILE"); + oc.doRegister("polygon-files", new Option_FileName()); + oc.addDescription("polygon-files", "Input", "Reads polygons from FILE for embedding in network where applicable"); + } oc.doRegister("shapefile-prefix", new Option_FileName()); oc.addSynonyme("shapefile-prefix", "shapefile"); @@ -298,7 +303,7 @@ oc.addDescription("opendrive.ignore-widths", "Formats", "Whether lane widths shall be ignored."); oc.doRegister("opendrive.curve-resolution", new Option_Float(2.0)); oc.addDescription("opendrive.curve-resolution", "Formats", "The geometry resolution in m when importing curved geometries as line segments."); - oc.doRegister("opendrive.advance-stopline", new Option_Float(12.0)); + oc.doRegister("opendrive.advance-stopline", new Option_Float(0.0)); oc.addDescription("opendrive.advance-stopline", "Formats", "Allow stop lines to be built beyond the start of the junction if the geometries allow so"); oc.doRegister("opendrive.min-width", new Option_Float(1.8)); oc.addDescription("opendrive.min-width", "Formats", "The minimum lane width for determining start or end of variable-width lanes"); @@ -324,7 +329,7 @@ bool ok = oc.checkDependingSuboptions("shapefile", "shapefile."); ok &= oc.checkDependingSuboptions("visum-file", "visum."); ok &= oc.checkDependingSuboptions("vissim-file", "vissim."); -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE int numProjections = oc.getBool("simple-projection") + oc.getBool("proj.utm") + oc.getBool("proj.dhdn") + (oc.getString("proj").length() > 1); if ((oc.isSet("osm-files") || oc.isSet("dlr-navteq-prefix") || oc.isSet("shapefile-prefix")) && numProjections == 0) { if (oc.isDefault("proj")) { @@ -377,10 +382,6 @@ // a better interpretation of imported geometries oc.set("rectangular-lane-cut", "true"); } - if (oc.isDefault("opendrive.advance-stopline") && oc.getBool("opendrive.internal-shapes")) { - // avoid mismatch between edge shapes and and internal edge shapes - oc.set("opendrive.advance-stopline", "0"); - } } return ok; } diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIFrame.h sumo-1.2.0+dfsg1/src/netimport/NIFrame.h --- sumo-1.1.0+dfsg1/src/netimport/NIFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,7 +39,7 @@ * Calls "NBNetBuilder::insertNetBuildOptions" for inserting network * building options. */ - static void fillOptions(); + static void fillOptions(bool forNetedit = false); /** @brief Checks set options from the OptionsCont-singleton for being valid diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_ArcView.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_ArcView.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_ArcView.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_ArcView.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_ArcView.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_ArcView.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_ArcView.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_ArcView.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_DlrNavteq.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_DlrNavteq.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_DlrNavteq.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_DlrNavteq.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -814,7 +814,7 @@ const bool warnOnly = st.size() > 7; myEdgeCont.addPostProcessConnection(from->getID(), fromLane, to->getID(), toLane, false, true, NBEdge::UNSPECIFIED_CONTPOS, NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE, - NBEdge::UNSPECIFIED_SPEED, PositionVector::EMPTY, warnOnly); + NBEdge::UNSPECIFIED_SPEED, PositionVector::EMPTY, false, warnOnly); } // ensure that connections for other lanes are guessed if not specified from->declareConnectionsAsLoaded(NBEdge::INIT); diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_DlrNavteq.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_DlrNavteq.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_DlrNavteq.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_DlrNavteq.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_ITSUMO.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_ITSUMO.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_ITSUMO.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_ITSUMO.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_ITSUMO.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_ITSUMO.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_ITSUMO.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_ITSUMO.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_MATSim.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_MATSim.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_MATSim.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_MATSim.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_MATSim.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_MATSim.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_MATSim.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_MATSim.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenDrive.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenDrive.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenDrive.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenDrive.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include #include #include @@ -57,8 +59,9 @@ //#define DEBUG_SPIRAL //#define DEBUG_INTERNALSHAPES -#define DEBUG_COND(road) ((road)->id == "1000003") -#define DEBUG_COND2(edgeID) (StringUtils::startsWith((edgeID), "2")) +#define DEBUG_COND(road) ((road)->id == "175") +#define DEBUG_COND2(edgeID) (StringUtils::startsWith((edgeID), "disabled")) +#define DEBUG_COND3(roadID) (roadID == "175") // =========================================================================== // definitions @@ -92,6 +95,8 @@ { "speed", NIImporter_OpenDrive::OPENDRIVE_TAG_SPEED }, { "elevation", NIImporter_OpenDrive::OPENDRIVE_TAG_ELEVATION }, { "geoReference", NIImporter_OpenDrive::OPENDRIVE_TAG_GEOREFERENCE }, + { "object", NIImporter_OpenDrive::OPENDRIVE_TAG_OBJECT }, + { "repeat", NIImporter_OpenDrive::OPENDRIVE_TAG_REPEAT }, { "", NIImporter_OpenDrive::OPENDRIVE_TAG_NOTHING } }; @@ -102,11 +107,19 @@ { "revMinor", NIImporter_OpenDrive::OPENDRIVE_ATTR_REVMINOR }, { "id", NIImporter_OpenDrive::OPENDRIVE_ATTR_ID }, { "length", NIImporter_OpenDrive::OPENDRIVE_ATTR_LENGTH }, + { "width", NIImporter_OpenDrive::OPENDRIVE_ATTR_WIDTH }, + { "radius", NIImporter_OpenDrive::OPENDRIVE_ATTR_RADIUS }, + { "distance", NIImporter_OpenDrive::OPENDRIVE_ATTR_DISTANCE }, + { "tStart", NIImporter_OpenDrive::OPENDRIVE_ATTR_TSTART }, + { "tEnd", NIImporter_OpenDrive::OPENDRIVE_ATTR_TEND }, + { "widthStart", NIImporter_OpenDrive::OPENDRIVE_ATTR_WIDTHSTART }, + { "widthEnd", NIImporter_OpenDrive::OPENDRIVE_ATTR_WIDTHEND }, { "junction", NIImporter_OpenDrive::OPENDRIVE_ATTR_JUNCTION }, { "elementType", NIImporter_OpenDrive::OPENDRIVE_ATTR_ELEMENTTYPE }, { "elementId", NIImporter_OpenDrive::OPENDRIVE_ATTR_ELEMENTID }, { "contactPoint", NIImporter_OpenDrive::OPENDRIVE_ATTR_CONTACTPOINT }, { "s", NIImporter_OpenDrive::OPENDRIVE_ATTR_S }, + { "t", NIImporter_OpenDrive::OPENDRIVE_ATTR_T }, { "x", NIImporter_OpenDrive::OPENDRIVE_ATTR_X }, { "y", NIImporter_OpenDrive::OPENDRIVE_ATTR_Y }, { "hdg", NIImporter_OpenDrive::OPENDRIVE_ATTR_HDG }, @@ -505,6 +518,51 @@ sB = sE; sFrom = sTo; } + // optionally write road objects + if (oc.isSet("polygon-output")) { + const bool writeGeo = GeoConvHelper::getLoaded().usingGeoProjection() && ( + oc.isDefault("proj.plain-geo") || oc.getBool("proj.plain-geo")); + OutputDevice& dev = OutputDevice::getDevice(oc.getString("polygon-output")); + dev.writeXMLHeader("additional", "additional_file.xsd"); + //SUMOPolygon poly("road_" + e->id, "road", RGBColor::BLUE, e->geom, true, false); + //poly.writeXML(dev, false); + for (auto& o : e->objects) { + Position ref = e->geom.positionAtOffset2D(o.s, -o.t); + if (o.radius >= 0) { + // cicrular shape + // GeoConvHelper::getFinal is not ready yet + GeoConvHelper::getLoaded().cartesian2geo(ref); + PointOfInterest poly(o.id, o.type, RGBColor::YELLOW, ref, true, "", -1, 0); + poly.setParameter("name", o.name); + poly.writeXML(dev, writeGeo); + } else { + // rectangular shape + PositionVector centerLine; + centerLine.push_back(Position(-o.length / 2, 0)); + centerLine.push_back(Position(o.length / 2, 0)); + double roadHdg = e->geom.rotationAtOffset(o.s); + centerLine.rotate2D(roadHdg + o.hdg); + //PointOfInterest poiRef("ref_" + o.id, "", RGBColor::CYAN, ref, false, "", 0, 0, Shape::DEFAULT_LAYER + 2); + //poiRef.writeXML(dev, false); + centerLine.add(ref); + //SUMOPolygon polyCenter("center_" + o.id, "", RGBColor::MAGENTA, centerLine, true, false, Shape::DEFAULT_LAYER + 1); + //polyCenter.writeXML(dev, false); + centerLine.move2side(o.width / 2); + PositionVector shape = centerLine; + centerLine.move2side(-o.width); + shape.append(centerLine.reverse(), POSITION_EPS); + if (writeGeo) { + // GeoConvHelper::getFinal is not ready yet + for (int i = 0; i < (int) shape.size(); i++) { + GeoConvHelper::getLoaded().cartesian2geo(shape[i]); + } + } + SUMOPolygon poly(o.id, o.type, RGBColor::YELLOW, shape, true, true, 1); + poly.setParameter("name", o.name); + poly.writeXML(dev, writeGeo); + } + } + } if (!lanesBuilt) { WRITE_WARNING("Edge '" + e->id + "' has no lanes."); } @@ -709,31 +767,25 @@ // clean up // ------------------------- for (std::map::iterator i = edges.begin(); i != edges.end(); ++i) { - delete(*i).second; + delete (*i).second; } } void NIImporter_OpenDrive::buildConnectionsToOuter(const Connection& c, const std::map& innerEdges, std::vector& into, std::set& seen) { - //std::cout << "buildConnectionsToOuter " - // << " seen=" << seen.size() - // << " from=" << c.fromEdge - // << " to=" << c.toEdge - // << " fromLane=" << c.fromLane - // << " toLane=" << c.toLane - // << " fromCP=" << c.fromCP - // << " toCP=" << c.toCP - // << " all=" << c.all - // << " origID=" << c.origID - // << " origLane=" << c.origLane - // << " seenlist="; - //for (std::set::const_iterator i = seen.begin(); i != seen.end(); ++i) { - // std::cout << (*i).fromEdge << "," << (*i).toEdge << " "; - //} - //std::cout << "\n"; OpenDriveEdge* dest = innerEdges.find(c.toEdge)->second; +#ifdef DEBUG_CONNECTIONS + if (DEBUG_COND3(c.fromEdge)) { + std::cout << " buildConnectionsToOuter " << c.getDescription() << "\n"; + std::cout << " dest=" << (dest == nullptr ? "NULL" : dest->id) << " seenlist="; + for (std::set::const_iterator i = seen.begin(); i != seen.end(); ++i) { + std::cout << " " << (*i).fromEdge << "," << (*i).toEdge << " "; + } + std::cout << "\n"; + } +#endif if (dest == nullptr) { /// !!! should not, look in all? return; @@ -742,6 +794,11 @@ const std::set& conts = dest->connections; for (std::set::const_iterator i = conts.begin(); i != conts.end(); ++i) { auto innerEdgesIt = innerEdges.find((*i).toEdge); +#ifdef DEBUG_CONNECTIONS + if (DEBUG_COND3(c.fromEdge)) { + std::cout << " toInner=" << (innerEdgesIt != innerEdges.end()) << " destCon " << (*i).getDescription() << "\n"; + } +#endif if (innerEdgesIt != innerEdges.end()) { std::vector t; if (seen.count(*i) == 0) { @@ -762,7 +819,7 @@ WRITE_WARNING("Circular connections in junction including roads '" + c.fromEdge + "' and '" + c.toEdge + "', loop size " + toString(seen.size())); } } else { - if ((*i).fromLane == c.toLane) { + if (laneSectionsConnected(dest, c.toLane, (*i).fromLane)) { Connection cn = (*i); cn.fromEdge = c.fromEdge; cn.fromLane = c.fromLane; @@ -801,12 +858,12 @@ #endif for (const auto& destLane : dest->laneSections.front().lanesByDir[lanesDir]) { #ifdef DEBUG_INTERNALSHAPES - destPred += " lane=" + toString(destLane.id) - + " pred=" + toString(destLane.predecessor) - + " succ=" + toString(destLane.successor) - + " wStart=" + toString(destLane.widthData.front().computeAt(0)) - + " wEnd=" + toString(destLane.widthData.front().computeAt(cn.shape.length2D())) - + " width=" + toString(destLane.width) + "\n"; + destPred += " lane=" + toString(destLane.id) + + " pred=" + toString(destLane.predecessor) + + " succ=" + toString(destLane.successor) + + " wStart=" + toString(destLane.widthData.front().computeAt(0)) + + " wEnd=" + toString(destLane.widthData.front().computeAt(cn.shape.length2D())) + + " width=" + toString(destLane.width) + "\n"; #endif if (abs(destLane.id) <= abs(referenceLane)) { const double multiplier = offsetFactor * (destLane.id == referenceLane ? 0.5 : 1); @@ -830,19 +887,24 @@ } #ifdef DEBUG_INTERNALSHAPES std::cout << "internalShape " - << c.getDescription() - << " dest=" << dest->id - << " refLane=" << referenceLane - << " destPred\n" << destPred - << " offsets=" << offsets - << "\n shape=" << dest->geom - << "\n shape2=" << cn.shape - << "\n"; + << c.getDescription() + << " dest=" << dest->id + << " refLane=" << referenceLane + << " destPred\n" << destPred + << " offsets=" << offsets + << "\n shape=" << dest->geom + << "\n shape2=" << cn.shape + << "\n"; #endif if (c.toCP == OPENDRIVE_CP_END) { cn.shape = cn.shape.reverse(); } } +#ifdef DEBUG_CONNECTIONS + if (DEBUG_COND3(c.fromEdge)) { + std::cout << " added connection\n"; + } +#endif into.push_back(cn); } } @@ -850,6 +912,34 @@ } +bool +NIImporter_OpenDrive::laneSectionsConnected(OpenDriveEdge* edge, int in, int out) { + if (edge->laneSections.size() == 1) { + return in == out; + } else { + // there could be spacing lanes (type 'none') that lead to a shift in lane index + for (auto it = edge->laneSections.begin(); it + 1 < edge->laneSections.end(); it++) { + OpenDriveLaneSection& laneSection = *it; + if (laneSection.lanesByDir.find(OPENDRIVE_TAG_RIGHT) != laneSection.lanesByDir.end()) { + for (OpenDriveLane& lane : laneSection.lanesByDir.find(OPENDRIVE_TAG_RIGHT)->second) { + if (lane.id == in) { + in = lane.successor; + } + } + } + if (laneSection.lanesByDir.find(OPENDRIVE_TAG_LEFT) != laneSection.lanesByDir.end()) { + for (OpenDriveLane& lane : laneSection.lanesByDir.find(OPENDRIVE_TAG_LEFT)->second) { + if (lane.id == in) { + in = lane.successor; + } + } + } + } + return in == out; + } +} + + void NIImporter_OpenDrive::setEdgeLinks2(OpenDriveEdge& e, const std::map& edges) { for (std::vector::iterator i = e.links.begin(); i != e.links.end(); ++i) { @@ -895,12 +985,14 @@ OpenDriveEdge* src = edges.find(c.fromEdge)->second; src->connections.insert(c); #ifdef DEBUG_CONNECTIONS - if (DEBUG_COND(src)) std::cout << "insertConRight from=" << src->id << "_" << c.fromLane << " to=" << c.toEdge << "_" << c.toLane << "\n"; + if (DEBUG_COND(src)) { + std::cout << "insertConRight from=" << src->id << "_" << c.fromLane << " to=" << c.toEdge << "_" << c.toLane << "\n"; + } #endif } + } } - } - if (laneSection.lanesByDir.find(OPENDRIVE_TAG_LEFT) != laneSection.lanesByDir.end()) { + 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 && laneMap.find((*j).id) == laneMap.end()) { @@ -978,6 +1070,18 @@ } } +bool +NIImporter_OpenDrive::hasNonLinearElevation(OpenDriveEdge& e) { + if (e.elevations.size() > 1) { + return true; + } + for (OpenDriveElevation& el : e.elevations) { + if (el.c != 0 || el.d != 0) { + return true; + } + } + return false; +} void NIImporter_OpenDrive::computeShapes(std::map& edges) { @@ -986,6 +1090,7 @@ for (std::map::iterator i = edges.begin(); i != edges.end(); ++i) { OpenDriveEdge& e = *(*i).second; GeometryType prevType = OPENDRIVE_GT_UNKNOWN; + const double lineRes = hasNonLinearElevation(e) ? res : -1; for (std::vector::iterator j = e.geometries.begin(); j != e.geometries.end(); ++j) { OpenDriveGeometry& g = *j; PositionVector geom; @@ -993,7 +1098,7 @@ case OPENDRIVE_GT_UNKNOWN: break; case OPENDRIVE_GT_LINE: - geom = geomFromLine(e, g); + geom = geomFromLine(e, g, lineRes); break; case OPENDRIVE_GT_SPIRAL: geom = geomFromSpiral(e, g, res); @@ -1035,12 +1140,13 @@ // add z-data int k = 0; double pos = 0; + //std::cout << " edge=" << e.id << " geom.size=" << e.geom.size() << " geom.len=" << e.geom.length2D() << " ele.size=" << e.elevations.size() << "\n"; for (std::vector::iterator j = e.elevations.begin(); j != e.elevations.end(); ++j) { const OpenDriveElevation& el = *j; const double sNext = (j + 1) == e.elevations.end() ? std::numeric_limits::max() : (*(j + 1)).s; while (k < (int)e.geom.size() && pos < sNext) { const double z = el.computeAt(pos); - //std::cout << " edge=" << e.id << " k=" << k << " sNext=" << sNext << " pos=" << pos << " z=" << z << " ds=" << ds << " el.s=" << el.s << "el.a=" << el.a << " el.b=" << el.b << " el.c=" << el.c << " el.d=" << el.d << "\n"; + //std::cout << " edge=" << e.id << " k=" << k << " sNext=" << sNext << " pos=" << pos << " z=" << z << " el.s=" << el.s << " el.a=" << el.a << " el.b=" << el.b << " el.c=" << el.c << " el.d=" << el.d << "\n"; e.geom[k].add(0, 0, z); k++; if (k < (int)e.geom.size()) { @@ -1083,6 +1189,7 @@ //std::cout << " edge=" << e.id << " k=" << k << " offset=" << offset << " geom[k]=" << e.geom[k] << " tmp[k]=" << tmp[k] << " gSize=" << e.geom.size() << " tSize=" << tmp.size() << " geom=" << e.geom << " tmp=" << tmp << "\n"; geom2.push_back(tmp[k]); } catch (InvalidArgument&) { + WRITE_WARNING("Could not compute shape for edge " + toString(e.id)); geom2.push_back(e.geom[k]); } } else { @@ -1163,11 +1270,22 @@ PositionVector -NIImporter_OpenDrive::geomFromLine(const OpenDriveEdge& e, const OpenDriveGeometry& g) { +NIImporter_OpenDrive::geomFromLine(const OpenDriveEdge& e, const OpenDriveGeometry& g, double resolution) { UNUSED_PARAMETER(e); PositionVector ret; - ret.push_back(Position(g.x, g.y)); - ret.push_back(calculateStraightEndPoint(g.hdg, g.length, Position(g.x, g.y))); + Position start(g.x, g.y); + Position end = calculateStraightEndPoint(g.hdg, g.length, start); + if (resolution > 0 && g.length > 0) { + const int numPoints = (int)ceil(g.length / resolution) + 1; + double dx = (end.x() - start.x()) / (numPoints - 1); + double dy = (end.y() - start.y()) / (numPoints - 1); + for (int i = 0; i < numPoints; i++) { + ret.push_back(Position(g.x + i * dx, g.y + i * dy)); + } + } else { + ret.push_back(start); + ret.push_back(end); + } return ret; } @@ -1843,6 +1961,52 @@ } } break; + case OPENDRIVE_TAG_OBJECT: { + OpenDriveObject o; + o.id = attrs.get(OPENDRIVE_ATTR_ID, 0, ok); + o.type = attrs.getOpt(OPENDRIVE_ATTR_TYPE, o.id.c_str(), ok, "", false); + o.name = attrs.getOpt(OPENDRIVE_ATTR_NAME, o.id.c_str(), ok, "", false); + o.s = attrs.get(OPENDRIVE_ATTR_S, o.id.c_str(), ok); + o.t = attrs.get(OPENDRIVE_ATTR_T, o.id.c_str(), ok); + o.width = attrs.getOpt(OPENDRIVE_ATTR_WIDTH, o.id.c_str(), ok, -1); + o.length = attrs.getOpt(OPENDRIVE_ATTR_LENGTH, o.id.c_str(), ok, -1); + o.radius = attrs.getOpt(OPENDRIVE_ATTR_RADIUS, o.id.c_str(), ok, -1); + o.hdg = attrs.getOpt(OPENDRIVE_ATTR_HDG, o.id.c_str(), ok, 0); + myCurrentEdge.objects.push_back(o); + } + break; + case OPENDRIVE_TAG_REPEAT: { + if (myCurrentEdge.objects.empty()) { + WRITE_ERROR("Repeat without object at edge '" + toString(myCurrentEdge.id) + "'"); + ok = false; + } else { + OpenDriveObject o = myCurrentEdge.objects.back(); + const std::string baseID = o.id; + double dist = attrs.get(OPENDRIVE_ATTR_DISTANCE, o.id.c_str(), ok); + if (dist == 0) { + // continuous feature. Split into parts (XXX exmport as a single polygon #5235) + dist = OptionsCont::getOptions().getFloat("opendrive.curve-resolution"); + } + + myCurrentEdge.objects.pop_back(); + const double length = attrs.get(OPENDRIVE_ATTR_LENGTH, o.id.c_str(), ok); + o.s = attrs.getOpt(OPENDRIVE_ATTR_S, o.id.c_str(), ok, o.s); + double wStart = attrs.getOpt(OPENDRIVE_ATTR_WIDTHSTART, o.id.c_str(), ok, o.width); + double wEnd = attrs.getOpt(OPENDRIVE_ATTR_WIDTHEND, o.id.c_str(), ok, o.width); + double tStart = attrs.getOpt(OPENDRIVE_ATTR_TSTART, o.id.c_str(), ok, o.t); + double tEnd = attrs.getOpt(OPENDRIVE_ATTR_TEND, o.id.c_str(), ok, o.t); + int index = 0; + for (double x = 0; x <= length + NUMERICAL_EPS; x += dist) { + o.id = baseID + "#" + toString(index++); + const double a = x / length; + o.width = wStart * (1 - a) + wEnd * a; + o.t = tStart * (1 - a) + tEnd * a; + myCurrentEdge.objects.push_back(o); + o.s += dist; + } + } + } + break; default: break; } diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenDrive.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenDrive.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenDrive.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenDrive.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -105,7 +105,9 @@ OPENDRIVE_TAG_WIDTH, OPENDRIVE_TAG_SPEED, OPENDRIVE_TAG_ELEVATION, - OPENDRIVE_TAG_GEOREFERENCE + OPENDRIVE_TAG_GEOREFERENCE, + OPENDRIVE_TAG_OBJECT, + OPENDRIVE_TAG_REPEAT }; @@ -120,11 +122,19 @@ OPENDRIVE_ATTR_REVMINOR, OPENDRIVE_ATTR_ID, OPENDRIVE_ATTR_LENGTH, + OPENDRIVE_ATTR_WIDTH, + OPENDRIVE_ATTR_RADIUS, + OPENDRIVE_ATTR_DISTANCE, + OPENDRIVE_ATTR_TSTART, + OPENDRIVE_ATTR_TEND, + OPENDRIVE_ATTR_WIDTHSTART, + OPENDRIVE_ATTR_WIDTHEND, OPENDRIVE_ATTR_JUNCTION, OPENDRIVE_ATTR_ELEMENTTYPE, OPENDRIVE_ATTR_ELEMENTID, OPENDRIVE_ATTR_CONTACTPOINT, OPENDRIVE_ATTR_S, + OPENDRIVE_ATTR_T, OPENDRIVE_ATTR_X, OPENDRIVE_ATTR_Y, OPENDRIVE_ATTR_HDG, @@ -393,15 +403,34 @@ PositionVector shape; std::string getDescription() const { - return "Connection from=" + fromEdge + "_" + toString(fromLane) - + " to=" + toEdge + "_" + toString(toLane) - + " fromCP=" + (fromCP == OPENDRIVE_CP_START ? "start" : fromCP == OPENDRIVE_CP_END ? "end" : "unknown") - + " toCP=" + (toCP == OPENDRIVE_CP_START ? "start" : toCP == OPENDRIVE_CP_END ? "end" : "unknown") - + " all=" + toString(all); - //+ " origID=" + origID + " origLane=" + toString(origLane); + return "Connection from=" + fromEdge + "_" + toString(fromLane) + + " to=" + toEdge + "_" + toString(toLane) + + " fromCP=" + (fromCP == OPENDRIVE_CP_START ? "start" : fromCP == OPENDRIVE_CP_END ? "end" : "unknown") + + " toCP=" + (toCP == OPENDRIVE_CP_START ? "start" : toCP == OPENDRIVE_CP_END ? "end" : "unknown") + + " all=" + toString(all); + //+ " origID=" + origID + " origLane=" + toString(origLane); } }; + /** + * @struct Object + * @brief A road object (e.g. parkingSpace) + */ + struct OpenDriveObject { + std::string type; + std::string name; + std::string id; + double s; + double t; + double zOffset; + double length; + double width; + double height; + double radius; + double hdg; + double pitch; + double roll; + }; /** * @struct OpenDriveEdge @@ -446,6 +475,7 @@ std::vector laneSections; std::vector signals; std::set connections; + std::vector objects; bool isInner; }; @@ -537,6 +567,7 @@ void addGeometryShape(GeometryType type, const std::vector& vals); static void setEdgeLinks2(OpenDriveEdge& e, const std::map& edges); static void buildConnectionsToOuter(const Connection& c, const std::map& innerEdges, std::vector& into, std::set& seen); + static bool laneSectionsConnected(OpenDriveEdge* edge, int in, int out); friend bool operator<(const Connection& c1, const Connection& c2); static std::string revertID(const std::string& id); const NBTypeCont& myTypeContainer; @@ -574,7 +605,7 @@ static NBNode* getOrBuildNode(const std::string& id, const Position& pos, NBNodeCont& nc); - static PositionVector geomFromLine(const OpenDriveEdge& e, const OpenDriveGeometry& g); + static PositionVector geomFromLine(const OpenDriveEdge& e, const OpenDriveGeometry& g, double resolution); static PositionVector geomFromSpiral(const OpenDriveEdge& e, const OpenDriveGeometry& g, double resolution); static PositionVector geomFromArc(const OpenDriveEdge& e, const OpenDriveGeometry& g, double resolution); static PositionVector geomFromPoly(const OpenDriveEdge& e, const OpenDriveGeometry& g, double resolution); @@ -590,6 +621,8 @@ */ static void computeShapes(std::map& edges); + static bool hasNonLinearElevation(OpenDriveEdge& e); + /** @brief Rechecks lane sections of the given edges * * diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.cpp 2018-12-02 23:00:13.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -470,6 +470,7 @@ bool defaultsToOneWay = tc.getIsOneWay(type); SVCPermissions forwardPermissions = tc.getPermissions(type); SVCPermissions backwardPermissions = tc.getPermissions(type); + const std::string streetName = isRailway(forwardPermissions) && e->ref != "" ? e->ref : e->streetName; double forwardWidth = tc.getWidth(type); double backwardWidth = tc.getWidth(type); const bool addSidewalk = (tc.getSidewalkWidth(type) != NBEdge::UNSPECIFIED_WIDTH); @@ -587,7 +588,7 @@ assert(numLanesForward > 0); NBEdge* nbe = new NBEdge(id, from, to, type, speed, numLanesForward, tc.getPriority(type), forwardWidth, NBEdge::UNSPECIFIED_OFFSET, shape, - StringUtils::escapeXML(e->streetName), origID, lsf, true); + StringUtils::escapeXML(streetName), origID, lsf, true); nbe->setPermissions(forwardPermissions); if ((e->myBuswayType & WAY_FORWARD) != 0) { nbe->setPermissions(SVC_BUS, 0); @@ -611,7 +612,7 @@ assert(numLanesBackward > 0); NBEdge* nbe = new NBEdge(reverseID, to, from, type, speed, numLanesBackward, tc.getPriority(type), backwardWidth, NBEdge::UNSPECIFIED_OFFSET, shape.reverse(), - StringUtils::escapeXML(e->streetName), origID, lsf, true); + StringUtils::escapeXML(streetName), origID, lsf, true); nbe->setPermissions(backwardPermissions); if ((e->myBuswayType & WAY_BACKWARD) != 0) { nbe->setPermissions(SVC_BUS, 0); @@ -814,8 +815,8 @@ myEdgeMap(toFill), myPlatformShapesMap(platformShapes) { mySpeedMap["signals"] = MAXSPEED_UNGIVEN; - mySpeedMap["none"] = 300.; - mySpeedMap["no"] = 300.; + mySpeedMap["none"] = 142.; // Auswirkungen eines allgemeinen Tempolimits auf Autobahnen im Land Brandeburg (2007) + mySpeedMap["no"] = 142.; mySpeedMap["walk"] = 5.; mySpeedMap["DE:rural"] = 100.; mySpeedMap["DE:urban"] = 50.; @@ -907,6 +908,7 @@ && key != "maxspeed" && key != "junction" && key != "name" && key != "tracks" && key != "layer" && key != "route" && key != "sidewalk" + && key != "ref" && !StringUtils::startsWith(key, "parking") && key != "postal_code" && key != "railway:preferred_direction" && key != "public_transport") { return; @@ -1035,6 +1037,8 @@ myCurrentEdge->myIsOneWay = value; } else if (key == "name") { myCurrentEdge->streetName = value; + } else if (key == "ref") { + myCurrentEdge->ref = value; } else if (key == "layer") { if (myAllAttributes) { myCurrentEdge->setParameter(key, value); @@ -1368,7 +1372,7 @@ ptStop->setIsMultipleStopPositions(myStops.size() > 1);; } } else if (myPTRouteType != "" && myIsRoute && OptionsCont::getOptions().isSet("ptline-output") && myStops.size() > 1) { - NBPTLine* ptLine = new NBPTLine(myName, myPTRouteType, myRef, myInterval, myNightService); + NBPTLine* ptLine = new NBPTLine(toString(myCurrentRelation), myName, myPTRouteType, myRef, myInterval, myNightService); ptLine->setMyNumOfStops((int)myStops.size()); for (long long ref : myStops) { if (myOSMNodes.find(ref) == myOSMNodes.end()) { @@ -1414,7 +1418,12 @@ resetValues(); return; } - myNBPTLineCont->insert(ptLine); + if (myNBPTLineCont->getLines().count(ptLine->getLineID()) == 0) { + myNBPTLineCont->insert(ptLine); + } else { + WRITE_WARNING("Ignoring duplicate PT line " + toString(myCurrentRelation) + "."); + delete ptLine; + } } // other relations might use similar subelements so reset in any case resetValues(); diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.h 2018-11-07 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_OpenStreetMap.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -164,6 +164,8 @@ const long long int id; /// @brief The edge's street name std::string streetName; + /// @brief The edge's track name + std::string ref; /// @brief number of lanes, or -1 if unknown int myNoLanes; /// @brief number of lanes in forward direction or 0 if unknown, negative if backwards lanes are meant @@ -426,7 +428,7 @@ /// @brief A map of non-numeric speed descriptions to their numeric values std::map mySpeedMap; - + /// @brief whether additional way attributes shall be added to the edge bool myAllAttributes; diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_RobocupRescue.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_RobocupRescue.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_RobocupRescue.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_RobocupRescue.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_RobocupRescue.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_RobocupRescue.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_RobocupRescue.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_RobocupRescue.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_SUMO.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_SUMO.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_SUMO.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_SUMO.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -69,6 +69,7 @@ myNetBuilder(nb), myNodeCont(nb.getNodeCont()), myTLLCont(nb.getTLLogicCont()), + myTypesHandler(nb.getTypeCont()), myCurrentEdge(nullptr), myCurrentLane(nullptr), myCurrentTL(nullptr), @@ -81,8 +82,7 @@ myWalkingAreas(false), myLimitTurnSpeed(-1), myCheckLaneFoesAll(false), - myCheckLaneFoesRoundabout(true) -{ + myCheckLaneFoesRoundabout(true) { } @@ -95,6 +95,7 @@ delete ed; } delete myLocation; + } @@ -105,7 +106,6 @@ return; } // parse file(s) - NIXMLTypesHandler* typesHandler = new NIXMLTypesHandler(myNetBuilder.getTypeCont()); std::vector files = oc.getStringVector("sumo-net-file"); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { if (!FileHelpers::isReadable(*file)) { @@ -115,7 +115,6 @@ setFileName(*file); PROGRESS_BEGIN_MESSAGE("Parsing sumo-net from '" + *file + "'"); XMLSubSys::runParser(*this, *file, true); - XMLSubSys::runParser(*typesHandler, *file, true); PROGRESS_DONE_MESSAGE(); } // build edges @@ -176,12 +175,12 @@ if (nbe == nullptr) { // inner edge or removed by explicit list, vclass, ... continue; } + const SumoXMLNodeType toType = nbe->getToNode()->getType(); for (int fromLaneIndex = 0; fromLaneIndex < (int) ed->lanes.size(); ++fromLaneIndex) { LaneAttrs* lane = ed->lanes[fromLaneIndex]; // connections const std::vector& connections = lane->connections; - for (std::vector::const_iterator c_it = connections.begin(); c_it != connections.end(); c_it++) { - const Connection& c = *c_it; + for (const Connection& c : connections) { if (myEdges.count(c.toEdgeID) == 0) { WRITE_ERROR("Unknown edge '" + c.toEdgeID + "' given in connection."); continue; @@ -193,9 +192,16 @@ if (nbe->hasConnectionTo(toEdge, c.toLaneIdx)) { WRITE_WARNING("Target lane '" + toEdge->getLaneID(c.toLaneIdx) + "' has multiple connections from '" + nbe->getID() + "'."); } + // patch attribute uncontrolled for legacy networks where it is not set explicitly + bool uncontrolled = c.uncontrolled; + + if ((NBNode::isTrafficLight(toType) || toType == NODETYPE_RAIL_SIGNAL) + && c.tlLinkIndex == NBConnection::InvalidTlIndex) { + uncontrolled = true; + } nbe->addLane2LaneConnection( fromLaneIndex, toEdge, c.toLaneIdx, NBEdge::L2L_VALIDATED, - true, c.mayDefinitelyPass, c.keepClear, c.contPos, c.visibility, c.speed, c.customShape, c.uncontrolled); + true, c.mayDefinitelyPass, c.keepClear, c.contPos, c.visibility, c.speed, c.customShape, uncontrolled); // maybe we have a tls-controlled connection if (c.tlID != "" && myRailSignals.count(c.tlID) == 0) { @@ -460,6 +466,7 @@ } break; default: + myTypesHandler.myStartElement(element, attrs); break; } } @@ -469,21 +476,23 @@ NIImporter_SUMO::myEndElement(int element) { switch (element) { case SUMO_TAG_EDGE: - if (myEdges.find(myCurrentEdge->id) != myEdges.end()) { - WRITE_ERROR("Edge '" + myCurrentEdge->id + "' occurred at least twice in the input."); - } else { - myEdges[myCurrentEdge->id] = myCurrentEdge; + if (myCurrentEdge != nullptr) { + if (myEdges.find(myCurrentEdge->id) != myEdges.end()) { + WRITE_ERROR("Edge '" + myCurrentEdge->id + "' occurred at least twice in the input."); + } else { + myEdges[myCurrentEdge->id] = myCurrentEdge; + } + myCurrentEdge = nullptr; + myLastParameterised.pop_back(); } - myCurrentEdge = nullptr; - myLastParameterised.pop_back(); break; case SUMO_TAG_LANE: - if (myCurrentEdge != nullptr) { + if (myCurrentEdge != nullptr && myCurrentLane != nullptr) { myCurrentEdge->maxSpeed = MAX2(myCurrentEdge->maxSpeed, myCurrentLane->maxSpeed); myCurrentEdge->lanes.push_back(myCurrentLane); + myLastParameterised.pop_back(); } myCurrentLane = nullptr; - myLastParameterised.pop_back(); break; case SUMO_TAG_TLLOGIC: if (!myCurrentTL) { @@ -527,7 +536,7 @@ if (myCurrentEdge->func == EDGEFUNC_CROSSING) { // add the crossing but don't do anything else Crossing c(id); - SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_CROSSING_EDGES, nullptr, ok), c.crossingEdges); + c.crossingEdges = attrs.get >(SUMO_ATTR_CROSSING_EDGES, nullptr, ok); myPedestrianCrossings[SUMOXMLDefinitions::getJunctionIDFromInternalEdge(id)].push_back(c); return; } else if (myCurrentEdge->func == EDGEFUNC_INTERNAL || myCurrentEdge->func == EDGEFUNC_WALKINGAREA) { @@ -568,9 +577,13 @@ return; } if (!myCurrentEdge) { - WRITE_ERROR("Found lane '" + id + "' not within edge element"); + WRITE_ERROR("Found lane '" + id + "' not within edge element."); return; } + const std::string expectedID = myCurrentEdge->id + "_" + toString(myCurrentEdge->lanes.size()); + if (id != expectedID) { + WRITE_WARNING("Renaming lane '" + id + "' to '" + expectedID + "'."); + } myCurrentLane = new LaneAttrs(); myLastParameterised.push_back(myCurrentLane); myCurrentLane->customShape = attrs.getOpt(SUMO_ATTR_CUSTOMSHAPE, nullptr, ok, false); @@ -582,6 +595,7 @@ crossings.back().width = attrs.get(SUMO_ATTR_WIDTH, id.c_str(), ok); if (myCurrentLane->customShape) { crossings.back().customShape = myCurrentLane->shape; + NBNetBuilder::transformCoordinates(crossings.back().customShape, true, myLocation); } } else if (myCurrentEdge->func == EDGEFUNC_WALKINGAREA) { // save custom shape if needed but don't do anything else @@ -680,14 +694,16 @@ return; } myCurrentJunction.node = node; - SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_INTLANES, nullptr, ok, false), myCurrentJunction.intLanes); + myCurrentJunction.intLanes = attrs.get >(SUMO_ATTR_INTLANES, nullptr, ok, false); // 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, nullptr, ok, false)) { - node->setCustomShape(attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok)); + PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); + NBNetBuilder::transformCoordinates(shape); + node->setCustomShape(shape); } if (type == NODETYPE_RAIL_SIGNAL || type == NODETYPE_RAIL_CROSSING) { // both types of nodes come without a tlLogic @@ -696,6 +712,9 @@ if (attrs.hasAttribute(SUMO_ATTR_RIGHT_OF_WAY)) { node->setRightOfWay(attrs.getRightOfWay(ok)); } + if (attrs.hasAttribute(SUMO_ATTR_FRINGE)) { + node->setFringeType(attrs.getFringeType(ok)); + } } @@ -728,9 +747,12 @@ conn.visibility = attrs.getOpt(SUMO_ATTR_VISIBILITY_DISTANCE, nullptr, ok, NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE); conn.speed = attrs.getOpt(SUMO_ATTR_SPEED, nullptr, ok, NBEdge::UNSPECIFIED_SPEED); conn.customShape = attrs.getOpt(SUMO_ATTR_SHAPE, nullptr, ok, PositionVector::EMPTY); + NBNetBuilder::transformCoordinates(conn.customShape, false, myLocation); conn.uncontrolled = attrs.getOpt(SUMO_ATTR_UNCONTROLLED, nullptr, ok, NBEdge::UNSPECIFIED_CONNECTION_UNCONTROLLED, false); if (conn.tlID != "") { conn.tlLinkIndex = attrs.get(SUMO_ATTR_TLLINKINDEX, nullptr, ok); + } else { + conn.tlLinkIndex = NBConnection::InvalidTlIndex; } if ((int)from->lanes.size() <= fromLaneIdx) { WRITE_ERROR("Invalid lane index '" + toString(fromLaneIdx) + "' for connection from '" + fromID + "'."); @@ -878,8 +900,10 @@ // the minimum and maximum durations SUMOTime minDuration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_MINDURATION, id.c_str(), ok, NBTrafficLightDefinition::UNSPECIFIED_DURATION); SUMOTime maxDuration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_MAXDURATION, id.c_str(), ok, NBTrafficLightDefinition::UNSPECIFIED_DURATION); + std::vector nextPhases = attrs.getOptIntVector(SUMO_ATTR_NEXT, nullptr, ok); + const std::string name = attrs.getOpt(SUMO_ATTR_NAME, nullptr, ok, ""); if (ok) { - currentTL->addPhase(duration, state, minDuration, maxDuration); + currentTL->addPhase(duration, state, minDuration, maxDuration, nextPhases, name); } } diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_SUMO.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_SUMO.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_SUMO.h 2018-11-19 23:00:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_SUMO.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,6 +31,7 @@ #include #include #include +#include "NIXMLTypesHandler.h" // =========================================================================== @@ -83,12 +84,9 @@ */ NIImporter_SUMO(NBNetBuilder& nb); - /// @brief Destructor ~NIImporter_SUMO(); - - /// @name inherited from GenericSAXHandler //@{ @@ -329,6 +327,9 @@ /// @brief The node container to fill NBTrafficLightLogicCont& myTLLCont; + /// @brief The handler for parsing edge types and restrictions + NIXMLTypesHandler myTypesHandler; + /// @brief The currently parsed edge's definition (to add loaded lanes to) EdgeAttrs* myCurrentEdge; diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_VISUM.cpp sumo-1.2.0+dfsg1/src/netimport/NIImporter_VISUM.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_VISUM.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_VISUM.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIImporter_VISUM.h sumo-1.2.0+dfsg1/src/netimport/NIImporter_VISUM.h --- sumo-1.1.0+dfsg1/src/netimport/NIImporter_VISUM.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIImporter_VISUM.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NILoader.cpp sumo-1.2.0+dfsg1/src/netimport/NILoader.cpp --- sumo-1.1.0+dfsg1/src/netimport/NILoader.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NILoader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -149,7 +150,7 @@ void NILoader::loadXML(OptionsCont& oc) { // load nodes - loadXMLType(new NIXMLNodesHandler(myNetBuilder.getNodeCont(), + loadXMLType(new NIXMLNodesHandler(myNetBuilder.getNodeCont(), myNetBuilder.getEdgeCont(), myNetBuilder.getTLLogicCont(), oc), oc.getStringVector("node-files"), "nodes"); // load the edges @@ -174,18 +175,30 @@ oc.getStringVector("tllogic-files"), "traffic lights"); // load public transport stops (used for restricting edge removal and as input when repairing railroad topology) - loadXMLType(new NIXMLPTHandler( - myNetBuilder.getEdgeCont(), - myNetBuilder.getPTStopCont(), - myNetBuilder.getPTLineCont()), - oc.getStringVector("ptstop-files"), "public transport stops"); + if (oc.exists("ptstop-files")) { + loadXMLType(new NIXMLPTHandler( + myNetBuilder.getEdgeCont(), + myNetBuilder.getPTStopCont(), + myNetBuilder.getPTLineCont()), + oc.getStringVector("ptstop-files"), "public transport stops"); + } // load public transport lines (used as input when repairing railroad topology) - loadXMLType(new NIXMLPTHandler( - myNetBuilder.getEdgeCont(), - myNetBuilder.getPTStopCont(), - myNetBuilder.getPTLineCont()), - oc.getStringVector("ptline-files"), "public transport lines"); + if (oc.exists("ptline-files")) { + loadXMLType(new NIXMLPTHandler( + myNetBuilder.getEdgeCont(), + myNetBuilder.getPTStopCont(), + myNetBuilder.getPTLineCont()), + oc.getStringVector("ptline-files"), "public transport lines"); + } + + // load shapes for output formats that embed shape data + if (oc.exists("polygon-files")) { + loadXMLType(new NIXMLShapeHandler( + myNetBuilder.getShapeCont(), + myNetBuilder.getEdgeCont()), + oc.getStringVector("polygon-files"), "polygon data"); + } } void diff -Nru sumo-1.1.0+dfsg1/src/netimport/NILoader.h sumo-1.2.0+dfsg1/src/netimport/NILoader.h --- sumo-1.1.0+dfsg1/src/netimport/NILoader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NILoader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NINavTeqHelper.cpp sumo-1.2.0+dfsg1/src/netimport/NINavTeqHelper.cpp --- sumo-1.1.0+dfsg1/src/netimport/NINavTeqHelper.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NINavTeqHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NINavTeqHelper.h sumo-1.2.0+dfsg1/src/netimport/NINavTeqHelper.h --- sumo-1.1.0+dfsg1/src/netimport/NINavTeqHelper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NINavTeqHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIVisumTL.cpp sumo-1.2.0+dfsg1/src/netimport/NIVisumTL.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIVisumTL.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIVisumTL.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIVisumTL.h sumo-1.2.0+dfsg1/src/netimport/NIVisumTL.h --- sumo-1.1.0+dfsg1/src/netimport/NIVisumTL.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIVisumTL.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLConnectionsHandler.cpp sumo-1.2.0+dfsg1/src/netimport/NIXMLConnectionsHandler.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIXMLConnectionsHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLConnectionsHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -127,12 +127,12 @@ myErrorMsgHandler->inform("The connection-destination edge '" + to + "' is not known."); return; } - fromEdge->getToNode()->invalidateTLS(myTLLogicCont, true, false); // 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); } else { fromEdge->addEdge2EdgeConnection(toEdge); + fromEdge->getToNode()->invalidateTLS(myTLLogicCont, true, false); } } if (element == SUMO_TAG_PROHIBITION) { @@ -202,18 +202,6 @@ return; } bool ok = true; - const bool mayDefinitelyPass = attrs.getOpt(SUMO_ATTR_PASS, nullptr, ok, false); - const bool keepClear = attrs.getOpt(SUMO_ATTR_KEEP_CLEAR, nullptr, ok, true); - const double contPos = attrs.getOpt(SUMO_ATTR_CONTPOS, nullptr, ok, NBEdge::UNSPECIFIED_CONTPOS); - const double visibility = attrs.getOpt(SUMO_ATTR_VISIBILITY_DISTANCE, nullptr, ok, NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE); - const double speed = attrs.getOpt(SUMO_ATTR_SPEED, nullptr, ok, NBEdge::UNSPECIFIED_SPEED); - PositionVector customShape = attrs.getOpt(SUMO_ATTR_SHAPE, nullptr, ok, PositionVector::EMPTY); - if (!NBNetBuilder::transformCoordinates(customShape)) { - WRITE_ERROR("Unable to project shape for connection from edge '" + from->getID() + "' to edge '" + to->getID() + "'."); - } - if (!ok) { - return; - } // get the begin and the end lane int fromLane; int toLane; @@ -236,21 +224,44 @@ if (from->hasConnectionTo(to, toLane) && from->getToNode()->getType() != NODETYPE_ZIPPER) { WRITE_WARNING("Target lane '" + to->getLaneID(toLane) + "' is already connected from '" + from->getID() + "'."); } - if (!from->addLane2LaneConnection(fromLane, to, toLane, NBEdge::L2L_USER, true, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape)) { + + NBEdge::Connection defaultCon(fromLane, to, toLane); + if (from->getStep() == NBEdge::LANES2LANES_USER) { + // maybe we are patching an existing connection + std::vector existing = from->getConnectionsFromLane(fromLane, to, toLane); + if (existing.size() > 0) { + assert(existing.size() == 1); + defaultCon = existing.front(); + // remove the original so we can insert the replacement + from->removeFromConnections(defaultCon); + } else { + from->getToNode()->invalidateTLS(myTLLogicCont, true, false); + } + } + const bool mayDefinitelyPass = attrs.getOpt(SUMO_ATTR_PASS, nullptr, ok, defaultCon.mayDefinitelyPass); + const bool keepClear = attrs.getOpt(SUMO_ATTR_KEEP_CLEAR, nullptr, ok, defaultCon.keepClear); + const double contPos = attrs.getOpt(SUMO_ATTR_CONTPOS, nullptr, ok, defaultCon.contPos); + const double visibility = attrs.getOpt(SUMO_ATTR_VISIBILITY_DISTANCE, nullptr, ok, defaultCon.visibility); + const double speed = attrs.getOpt(SUMO_ATTR_SPEED, nullptr, ok, defaultCon.speed); + const bool uncontrolled = attrs.getOpt(SUMO_ATTR_UNCONTROLLED, nullptr, ok, defaultCon.uncontrolled); + PositionVector customShape = attrs.getOpt(SUMO_ATTR_SHAPE, nullptr, ok, defaultCon.customShape); + if (attrs.hasAttribute(SUMO_ATTR_SHAPE) && !NBNetBuilder::transformCoordinates(customShape)) { + WRITE_ERROR("Unable to project shape for connection from edge '" + from->getID() + "' to edge '" + to->getID() + "'."); + } + if (!ok) { + return; + } + if (!from->addLane2LaneConnection(fromLane, to, toLane, NBEdge::L2L_USER, true, mayDefinitelyPass, + keepClear, contPos, visibility, speed, customShape, uncontrolled)) { if (OptionsCont::getOptions().getBool("show-errors.connections-first-try")) { WRITE_WARNING("Could not set loaded connection from '" + from->getLaneID(fromLane) + "' to '" + to->getLaneID(toLane) + "'."); } // set as to be re-applied after network processing - myEdgeCont.addPostProcessConnection(from->getID(), fromLane, to->getID(), toLane, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape); + myEdgeCont.addPostProcessConnection(from->getID(), fromLane, to->getID(), toLane, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape, uncontrolled, false); } } catch (NumberFormatException&) { myErrorMsgHandler->inform("At least one of the defined lanes was not numeric"); } - // - bool keepUncontrolled = attrs.getOpt(SUMO_ATTR_UNCONTROLLED, nullptr, ok, false); - if (keepUncontrolled) { - from->disableConnection4TLS(fromLane, to, toLane); - } } bool @@ -305,21 +316,21 @@ void NIXMLConnectionsHandler::addCrossing(const SUMOSAXAttributes& attrs) { bool ok = true; - NBNode* node = nullptr; EdgeVector edges; const std::string nodeID = attrs.get(SUMO_ATTR_NODE, nullptr, ok); - const double width = attrs.getOpt(SUMO_ATTR_WIDTH, nodeID.c_str(), ok, NBEdge::UNSPECIFIED_WIDTH, true); + double width = attrs.getOpt(SUMO_ATTR_WIDTH, nodeID.c_str(), ok, NBEdge::UNSPECIFIED_WIDTH, true); const bool discard = attrs.getOpt(SUMO_ATTR_DISCARD, nodeID.c_str(), ok, false, true); int tlIndex = attrs.getOpt(SUMO_ATTR_TLLINKINDEX, nullptr, ok, -1); int tlIndex2 = attrs.getOpt(SUMO_ATTR_TLLINKINDEX2, nullptr, ok, -1); - std::vector edgeIDs; + NBNode* node = myNodeCont.retrieve(nodeID); + if (node == nullptr) { + if (!discard && myNodeCont.wasRemoved(nodeID)) { + WRITE_ERROR("Node '" + nodeID + "' in crossing is not known."); + } + return; + } if (!attrs.hasAttribute(SUMO_ATTR_EDGES)) { if (discard) { - node = myNodeCont.retrieve(nodeID); - if (node == nullptr) { - WRITE_ERROR("Node '" + nodeID + "' in crossing is not known."); - return; - } node->discardAllCrossings(true); return; } else { @@ -327,33 +338,28 @@ return; } } - SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_EDGES, nullptr, ok), edgeIDs); - if (!ok) { - return; - } - for (std::vector::const_iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) { - NBEdge* edge = myEdgeCont.retrieve(*it); + for (const std::string& id : attrs.get >(SUMO_ATTR_EDGES, nodeID.c_str(), ok)) { + NBEdge* edge = myEdgeCont.retrieve(id); if (edge == nullptr) { - WRITE_ERROR("Edge '" + (*it) + "' for crossing at node '" + nodeID + "' is not known."); - return; - } - if (node == nullptr) { - 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 + "'."); + if (!(discard && myEdgeCont.wasRemoved(id))) { + WRITE_ERROR("Edge '" + id + "' for crossing at node '" + nodeID + "' is not known."); return; + } else { + edge = myEdgeCont.retrieve(id, true); } } else { if (edge->getToNode() != node && edge->getFromNode() != node) { - WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'."); - return; + if (!discard) { + WRITE_ERROR("Edge '" + id + "' does not touch node '" + nodeID + "'."); + return; + } } } edges.push_back(edge); } + if (!ok) { + return; + } 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 @@ -368,8 +374,31 @@ node->removeCrossing(edges); } else { if (node->checkCrossingDuplicated(edges)) { - WRITE_ERROR("Crossing with edges '" + toString(edges) + "' already exists at node '" + node->getID() + "'."); - return; + // possibly a diff + NBNode::Crossing* existing = node->getCrossing(edges); + if (!( + (attrs.hasAttribute(SUMO_ATTR_WIDTH) && width != existing->width) + || (attrs.hasAttribute(SUMO_ATTR_TLLINKINDEX) && tlIndex != existing->customTLIndex) + || (attrs.hasAttribute(SUMO_ATTR_TLLINKINDEX2) && tlIndex2 != existing->customTLIndex2) + || (attrs.hasAttribute(SUMO_ATTR_PRIORITY) && priority != existing->priority))) { + WRITE_ERROR("Crossing with edges '" + toString(edges) + "' already exists at node '" + node->getID() + "'."); + return; + } else { + // replace existing, keep old attributes + if (!attrs.hasAttribute(SUMO_ATTR_WIDTH)) { + width = existing->width; + } + if (!attrs.hasAttribute(SUMO_ATTR_TLLINKINDEX)) { + tlIndex = existing->customTLIndex; + } + if (!attrs.hasAttribute(SUMO_ATTR_TLLINKINDEX2)) { + tlIndex2 = existing->customTLIndex2; + } + if (!attrs.hasAttribute(SUMO_ATTR_PRIORITY)) { + priority = existing->priority; + } + node->removeCrossing(edges); + } } node->addCrossing(edges, width, priority, tlIndex, tlIndex2, customShape); } @@ -387,14 +416,10 @@ WRITE_ERROR("No edges specified for walkingArea at node '" + nodeID + "'."); return; } - SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_EDGES, nullptr, ok), edgeIDs); - if (!ok) { - return; - } - for (std::vector::const_iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) { - NBEdge* edge = myEdgeCont.retrieve(*it); + for (const std::string& id : attrs.get >(SUMO_ATTR_EDGES, nodeID.c_str(), ok)) { + NBEdge* edge = myEdgeCont.retrieve(id); if (edge == nullptr) { - WRITE_ERROR("Edge '" + (*it) + "' for walkingArea at node '" + nodeID + "' is not known."); + WRITE_ERROR("Edge '" + id + "' for walkingArea at node '" + nodeID + "' is not known."); return; } if (node == nullptr) { @@ -403,17 +428,20 @@ } else if (edge->getFromNode()->getID() == nodeID) { node = edge->getFromNode(); } else { - WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'."); + WRITE_ERROR("Edge '" + id + "' does not touch node '" + nodeID + "'."); return; } } else { if (edge->getToNode() != node && edge->getFromNode() != node) { - WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'."); + WRITE_ERROR("Edge '" + id + "' does not touch node '" + nodeID + "'."); return; } } edges.push_back(edge); } + if (!ok) { + return; + } PositionVector customShape = attrs.getOpt(SUMO_ATTR_SHAPE, nullptr, ok, PositionVector::EMPTY); if (!NBNetBuilder::transformCoordinates(customShape)) { WRITE_ERROR("Unable to project shape for walkingArea at node '" + node->getID() + "'."); diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLConnectionsHandler.h sumo-1.2.0+dfsg1/src/netimport/NIXMLConnectionsHandler.h --- sumo-1.1.0+dfsg1/src/netimport/NIXMLConnectionsHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLConnectionsHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLEdgesHandler.cpp sumo-1.2.0+dfsg1/src/netimport/NIXMLEdgesHandler.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIXMLEdgesHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLEdgesHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -170,19 +170,20 @@ myCurrentPriority = myTypeCont.getPriority(""); myCurrentLaneNo = myTypeCont.getNumLanes(""); myCurrentEndOffset = NBEdge::UNSPECIFIED_OFFSET; + myCurrentType = ""; if (myCurrentEdge != nullptr) { // update existing edge. only update lane-specific settings when explicitly requested myIsUpdate = true; myCurrentSpeed = NBEdge::UNSPECIFIED_SPEED; myPermissions = SVC_UNSPECIFIED; myCurrentWidth = NBEdge::UNSPECIFIED_WIDTH; + myCurrentType = myCurrentEdge->getTypeID(); } 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; @@ -415,11 +416,9 @@ if (e.pos < 0) { e.pos += myCurrentEdge->getGeometry().length(); } - std::vector lanes; - SUMOSAXAttributes::parseStringVector(attrs.getOpt(SUMO_ATTR_LANES, nullptr, ok, ""), lanes); - for (std::vector::iterator i = lanes.begin(); i != lanes.end(); ++i) { + for (const std::string& id : attrs.getOptStringVector(SUMO_ATTR_LANES, myCurrentID.c_str(), ok)) { try { - int lane = StringUtils::toInt((*i)); + int lane = StringUtils::toInt(id); e.lanes.push_back(lane); } catch (NumberFormatException&) { WRITE_ERROR("Error on parsing a split (edge '" + myCurrentID + "')."); @@ -434,7 +433,7 @@ } e.speed = attrs.getOpt(SUMO_ATTR_SPEED, nullptr, ok, myCurrentEdge->getSpeed()); if (attrs.hasAttribute(SUMO_ATTR_SPEED) && myOptions.getBool("speed-in-kmh")) { - e.speed /= (double) 3.6; + e.speed /= 3.6; } e.idBefore = attrs.getOpt(SUMO_ATTR_ID_BEFORE, nullptr, ok, std::string("")); e.idAfter = attrs.getOpt(SUMO_ATTR_ID_AFTER, nullptr, ok, std::string("")); @@ -451,7 +450,7 @@ e.node = new NBNode(nodeID, myCurrentEdge->getGeometry().positionAtOffset(e.pos)); } NIXMLNodesHandler::processNodeType(attrs, e.node, e.node->getID(), e.node->getPosition(), false, - myNodeCont, myTLLogicCont); + myNodeCont, myEdgeCont, myTLLogicCont); mySplits.push_back(e); } } @@ -489,11 +488,6 @@ if (myToNode == nullptr) { WRITE_ERROR("Edge's '" + myCurrentID + "' to-node '" + endNodeID + "' is not known."); } - if (myFromNode != nullptr && myToNode != nullptr) { - if (myIsUpdate && (myFromNode->getID() != oldBegID || myToNode->getID() != oldEndID)) { - myShape = PositionVector(); - } - } return myFromNode != nullptr && myToNode != nullptr; } @@ -557,7 +551,10 @@ void NIXMLEdgesHandler::myEndElement(int element) { - if (element == SUMO_TAG_EDGE && myCurrentEdge != nullptr) { + if (myCurrentEdge == nullptr) { + return; + } + if (element == SUMO_TAG_EDGE) { myLastParameterised.pop_back(); // add bike lane, wait until lanes are loaded to avoid building if it already exists if (myBikeLaneWidth != NBEdge::UNSPECIFIED_WIDTH) { diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLEdgesHandler.h sumo-1.2.0+dfsg1/src/netimport/NIXMLEdgesHandler.h --- sumo-1.1.0+dfsg1/src/netimport/NIXMLEdgesHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLEdgesHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLNodesHandler.cpp sumo-1.2.0+dfsg1/src/netimport/NIXMLNodesHandler.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIXMLNodesHandler.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLNodesHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -49,12 +49,13 @@ // =========================================================================== // method definitions // =========================================================================== -NIXMLNodesHandler::NIXMLNodesHandler(NBNodeCont& nc, +NIXMLNodesHandler::NIXMLNodesHandler(NBNodeCont& nc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc, OptionsCont& options) : SUMOSAXHandler("xml-nodes - file"), myOptions(options), myNodeCont(nc), + myEdgeCont(ec), myTLLogicCont(tlc), myLocation(nullptr), myLastParameterised(nullptr) { @@ -156,7 +157,7 @@ if (myOptions.getBool("flip-y-axis")) { myPosition.mul(1.0, -1.0); } - node = processNodeType(attrs, node, myID, myPosition, updateEdgeGeometries, myNodeCont, myTLLogicCont); + node = processNodeType(attrs, node, myID, myPosition, updateEdgeGeometries, myNodeCont, myEdgeCont, myTLLogicCont); myLastParameterised = node; } @@ -164,7 +165,7 @@ NBNode* NIXMLNodesHandler::processNodeType(const SUMOSAXAttributes& attrs, NBNode* node, const std::string& nodeID, const Position& position, bool updateEdgeGeometries, - NBNodeCont& nc, NBTrafficLightLogicCont& tlc) { + NBNodeCont& nc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc) { bool ok = true; // get the type SumoXMLNodeType type = NODETYPE_UNKNOWN; @@ -190,6 +191,9 @@ } else { // patch information oldTLS = node->getControllingTLS(); + if (node->getType() == NODETYPE_PRIORITY && type == NODETYPE_RIGHT_BEFORE_LEFT) { + ec.removeRoundabout(node); + } node->reinit(position, type, updateEdgeGeometries); } // process traffic light definition @@ -207,6 +211,9 @@ PositionVector shape; if (attrs.hasAttribute(SUMO_ATTR_SHAPE)) { shape = attrs.getOpt(SUMO_ATTR_SHAPE, nodeID.c_str(), ok, PositionVector()); + if (!NBNetBuilder::transformCoordinates(shape)) { + WRITE_ERROR("Unable to project node shape at node '" + node->getID() + "'."); + } if (shape.size() > 2) { shape.closePolygon(); } @@ -225,6 +232,11 @@ if (attrs.hasAttribute(SUMO_ATTR_RIGHT_OF_WAY)) { node->setRightOfWay(attrs.getRightOfWay(ok)); } + + // set optional fringe type + if (attrs.hasAttribute(SUMO_ATTR_FRINGE)) { + node->setFringeType(attrs.getFringeType(ok)); + } return node; } @@ -252,9 +264,25 @@ NIXMLNodesHandler::addJoinCluster(const SUMOSAXAttributes& attrs) { bool ok = true; const std::string clusterString = attrs.get(SUMO_ATTR_NODES, nullptr, ok); - const std::vector ids = StringTokenizer(clusterString).getVector(); + std::vector ids = StringTokenizer(clusterString).getVector(); + std::sort(ids.begin(), ids.end()); + + myID = attrs.getOpt(SUMO_ATTR_ID, nullptr, ok, "cluster_" + joinToString(ids, "_")); + + Position myPosition = Position::INVALID; + if (attrs.hasAttribute(SUMO_ATTR_X)) { + myPosition.setx(attrs.get(SUMO_ATTR_X, myID.c_str(), ok)); + } + if (attrs.hasAttribute(SUMO_ATTR_Y)) { + myPosition.sety(attrs.get(SUMO_ATTR_Y, myID.c_str(), ok)); + } + if (attrs.hasAttribute(SUMO_ATTR_Z)) { + myPosition.setz(attrs.get(SUMO_ATTR_Z, myID.c_str(), ok)); + } + + NBNode* node = processNodeType(attrs, nullptr, myID, myPosition, false, myNodeCont, myEdgeCont, myTLLogicCont); if (ok) { - myNodeCont.addCluster2Join(std::set(ids.begin(), ids.end())); + myNodeCont.addCluster2Join(std::set(ids.begin(), ids.end()), node); } } @@ -325,8 +353,7 @@ tlDefs.insert(tlDef); } // process inner edges which shall be controlled - std::vector controlledInner; - SUMOSAXAttributes::parseStringVector(attrs.getOpt(SUMO_ATTR_CONTROLLED_INNER, nullptr, ok, ""), controlledInner); + const std::vector& controlledInner = attrs.getOptStringVector(SUMO_ATTR_CONTROLLED_INNER, nullptr, ok); if (controlledInner.size() != 0) { for (std::set::iterator it = tlDefs.begin(); it != tlDefs.end(); it++) { (*it)->addControlledInnerEdges(controlledInner); diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLNodesHandler.h sumo-1.2.0+dfsg1/src/netimport/NIXMLNodesHandler.h --- sumo-1.1.0+dfsg1/src/netimport/NIXMLNodesHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLNodesHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -61,7 +61,7 @@ * @todo Options are only given to determine whether "flip-y" is set; maybe this should be done by giving a bool * @todo Why are options not const? */ - NIXMLNodesHandler(NBNodeCont& nc, NBTrafficLightLogicCont& tlc, + NIXMLNodesHandler(NBNodeCont& nc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc, OptionsCont& options); @@ -72,7 +72,8 @@ */ static NBNode* processNodeType(const SUMOSAXAttributes& attrs, NBNode* node, const std::string& nodeID, const Position& position, bool updateEdgeGeometries, - NBNodeCont& nc, NBTrafficLightLogicCont& tlc); + NBNodeCont& nc, NBEdgeCont& ec, + NBTrafficLightLogicCont& tlc); protected: /// @name inherited from GenericSAXHandler @@ -147,6 +148,9 @@ /// @brief The node container to add built nodes to NBNodeCont& myNodeCont; + /// @brief The node container to add built nodes to + NBEdgeCont& myEdgeCont; + /// @brief The traffic lights container to add built tls to NBTrafficLightLogicCont& myTLLogicCont; diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLPTHandler.cpp sumo-1.2.0+dfsg1/src/netimport/NIXMLPTHandler.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIXMLPTHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLPTHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -169,7 +169,7 @@ // device.closeTag(); //} if (ok) { - myCurrentLine = new NBPTLine(name, type, line, intervalS / 60, nightService); + myCurrentLine = new NBPTLine(id, name, type, line, intervalS / 60, nightService); myLineCont.insert(myCurrentLine); } } diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLPTHandler.h sumo-1.2.0+dfsg1/src/netimport/NIXMLPTHandler.h --- sumo-1.1.0+dfsg1/src/netimport/NIXMLPTHandler.h 2018-09-03 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLPTHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLShapeHandler.cpp sumo-1.2.0+dfsg1/src/netimport/NIXMLShapeHandler.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIXMLShapeHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLShapeHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,61 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file NIXMLShapeHandler.cpp +/// @author Jakob Erdmann +/// @date Sat, 28 Jul 2018 +/// @version $Id$ +/// +// Importer for static public transport information +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include + +#include "NIXMLShapeHandler.h" + +// =========================================================================== +// method definitions +// =========================================================================== + +NIXMLShapeHandler::NIXMLShapeHandler(ShapeContainer& sc, const NBEdgeCont& ec) : + ShapeHandler("polgyon - file", sc, GeoConvHelper::getNumLoaded() == 0 ? nullptr : & GeoConvHelper::getLoaded()), + myEdgeCont(ec) +{} + +Position +NIXMLShapeHandler::getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat) { + std::string edgeID; + int laneIndex; + NBHelpers::interpretLaneID(laneID, edgeID, laneIndex); + NBEdge* edge = myEdgeCont.retrieve(edgeID); + if (edge == 0 || laneIndex < 0 || edge->getNumLanes() <= laneIndex) { + WRITE_ERROR("Lane '" + laneID + "' to place poi '" + poiID + "' on is not known."); + return Position::INVALID; + } + if (lanePos < 0) { + lanePos = edge->getLength() + lanePos; + } + if (lanePos < 0 || lanePos > edge->getLength()) { + WRITE_WARNING("lane position " + toString(lanePos) + " for poi '" + poiID + "' is not valid."); + } + return edge->getLanes()[laneIndex].shape.positionAtOffset(lanePos, -lanePosLat); +} + + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLShapeHandler.h sumo-1.2.0+dfsg1/src/netimport/NIXMLShapeHandler.h --- sumo-1.1.0+dfsg1/src/netimport/NIXMLShapeHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLShapeHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,57 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file NIXMLShapeHandler.h +/// @author Jakob Erdmann +/// @date Sat, 28 Jul 2018 +/// @version $Id$ +/// +// Importer for static public transport information +/****************************************************************************/ +#ifndef NIXMLShapeHandler_h +#define NIXMLShapeHandler_h + +#include + +#include +#include +// =========================================================================== +// class declarations +// =========================================================================== +class NBEdgeCont; +class Position; + +// =========================================================================== +// class definitions +// =========================================================================== + +/** + * @class NBShapeHandler + * @brief The XML-Handler for shapes loading network loading + * + * This subclasses ShapeHandler with MSLane specific function + */ +class NIXMLShapeHandler : public ShapeHandler { +public: + NIXMLShapeHandler(ShapeContainer& sc, const NBEdgeCont& ec); + + /// @brief Destructor + virtual ~NIXMLShapeHandler() {} + + Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat); + + virtual bool addLanePosParams() { + return true; + } + + const NBEdgeCont& myEdgeCont; +}; +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.cpp sumo-1.2.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -196,8 +196,12 @@ } } else { // case 1 - loadedDef->setOffset(offset); - loadedDef->setType(type); + if (attrs.hasAttribute(SUMO_ATTR_OFFSET)) { + loadedDef->setOffset(offset); + } + if (attrs.hasAttribute(SUMO_ATTR_TYPE)) { + loadedDef->setType(type); + } } if (ok) { myResetPhases = true; @@ -237,7 +241,7 @@ std::string tlID = attrs.getOpt(SUMO_ATTR_TLID, nullptr, ok, ""); if (tlID == "") { // we are updating an existing tl-controlled connection - tlID = c.tlID; + tlID = (*(from->getToNode()->getControllingTLS().begin()))->getID(); assert(tlID != ""); } int tlIndex = attrs.getOpt(SUMO_ATTR_TLLINKINDEX, nullptr, ok, -1); @@ -281,8 +285,8 @@ if (!ok) { return; } - int fromLane = retrieveLaneIndex(attrs, SUMO_ATTR_FROM_LANE, from, ok); - int toLane = retrieveLaneIndex(attrs, SUMO_ATTR_TO_LANE, to, ok); + int fromLane = retrieveLaneIndex(attrs, SUMO_ATTR_FROM_LANE, from, ok, true); + int toLane = retrieveLaneIndex(attrs, SUMO_ATTR_TO_LANE, to, ok, true); if (!ok) { return; } @@ -319,10 +323,12 @@ int NIXMLTrafficLightsHandler::retrieveLaneIndex( - const SUMOSAXAttributes& attrs, SumoXMLAttr attr, NBEdge* edge, bool& ok) { + const SUMOSAXAttributes& attrs, SumoXMLAttr attr, NBEdge* edge, bool& ok, bool isDelete) { int laneIndex = attrs.get(attr, nullptr, ok); if (edge->getNumLanes() <= laneIndex) { - WRITE_ERROR("Invalid lane index '" + toString(laneIndex) + "' for edge '" + edge->getID() + "'."); + if (!isDelete) { + WRITE_ERROR("Invalid lane index '" + toString(laneIndex) + "' for edge '" + edge->getID() + "'."); + } ok = false; } return laneIndex; diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.h sumo-1.2.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.h --- sumo-1.1.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.h 2018-09-25 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLTrafficLightsHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,7 +52,7 @@ /** @brief Constructor * @param[in] ec The traffic light container into which to load logics */ - NIXMLTrafficLightsHandler(NBTrafficLightLogicCont& tlCont, NBEdgeCont& ec, bool ignoreUnknown=false); + NIXMLTrafficLightsHandler(NBTrafficLightLogicCont& tlCont, NBEdgeCont& ec, bool ignoreUnknown = false); /// @brief Destructor @@ -113,7 +113,7 @@ NBEdge* retrieveEdge(const SUMOSAXAttributes& attrs, SumoXMLAttr attr, bool& ok); /// parses a lane index and verifies its correctness - int retrieveLaneIndex(const SUMOSAXAttributes& attrs, SumoXMLAttr attr, NBEdge* edge, bool& ok); + int retrieveLaneIndex(const SUMOSAXAttributes& attrs, SumoXMLAttr attr, NBEdge* edge, bool& ok, bool isDelete = false); /// @brief whether definitions for unknown traffic lights shall be silently ignored bool myIgnoreUnknown; diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLTypesHandler.cpp sumo-1.2.0+dfsg1/src/netimport/NIXMLTypesHandler.cpp --- sumo-1.1.0+dfsg1/src/netimport/NIXMLTypesHandler.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLTypesHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/NIXMLTypesHandler.h sumo-1.2.0+dfsg1/src/netimport/NIXMLTypesHandler.h --- sumo-1.1.0+dfsg1/src/netimport/NIXMLTypesHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/NIXMLTypesHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,12 +52,9 @@ */ NIXMLTypesHandler(NBTypeCont& tc); - /// @brief Destructor ~NIXMLTypesHandler(); - -protected: /// @name inherited from GenericSAXHandler //@{ diff -Nru sumo-1.1.0+dfsg1/src/netimport/README_Contributing.md sumo-1.2.0+dfsg1/src/netimport/README_Contributing.md --- sumo-1.1.0+dfsg1/src/netimport/README_Contributing.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/README_Contributing.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,41 @@ +Please feel free to add and / or modify files here but keep in mind that +EPL requires that "derivative works" be licensed under the terms of the EPL +whereas "separate modules of software" may be licensed arbitrarily. +Modifications to the files and directories listed here are considered derivative work: + +- NIFrame.cpp +- NIFrame.h +- NIImporter_ArcView.cpp +- NIImporter_ArcView.h +- NIImporter_DlrNavteq.cpp +- NIImporter_DlrNavteq.h +- NIImporter_ITSUMO.cpp +- NIImporter_ITSUMO.h +- NIImporter_MATSim.cpp +- NIImporter_MATSim.h +- NIImporter_OpenDrive.cpp +- NIImporter_OpenDrive.h +- NIImporter_OpenStreetMap.cpp +- NIImporter_OpenStreetMap.h +- NIImporter_RobocupRescue.cpp +- NIImporter_RobocupRescue.h +- NIImporter_SUMO.cpp +- NIImporter_SUMO.h +- NIImporter_VISUM.cpp +- NIImporter_VISUM.h +- NILoader.cpp +- NILoader.h +- NINavTeqHelper.cpp +- NINavTeqHelper.h +- NIVisumTL.cpp +- NIVisumTL.h +- NIXMLConnectionsHandler.cpp +- NIXMLConnectionsHandler.h +- NIXMLEdgesHandler.cpp +- NIXMLEdgesHandler.h +- NIXMLNodesHandler.cpp +- NIXMLNodesHandler.h +- NIXMLTrafficLightsHandler.cpp +- NIXMLTrafficLightsHandler.h +- NIXMLTypesHandler.cpp +- NIXMLTypesHandler.h diff -Nru sumo-1.1.0+dfsg1/src/netimport/typemap.h sumo-1.2.0+dfsg1/src/netimport/typemap.h --- sumo-1.1.0+dfsg1/src/netimport/typemap.h 2018-12-17 23:02:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/typemap.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -const std::string opendriveTypemap = -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -"\n" -; -const std::string osmTypemap = -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -"\n" -; diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/Makefile.in sumo-1.2.0+dfsg1/src/netimport/vissim/Makefile.in --- sumo-1.1.0+dfsg1/src/netimport/vissim/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,748 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netimport/vissim -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(libvissimimport_a_SOURCES) -DIST_SOURCES = $(libvissimimport_a_SOURCES) -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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libvissimimport.a -libvissimimport_a_SOURCES = NIImporter_Vissim.cpp NIImporter_Vissim.h \ -NIVissimElements.h - -SUBDIRS = tempstructs typeloader -all: all-recursive - -.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) --foreign src/netimport/vissim/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netimport/vissim/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_Vissim.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 - -# 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LIBRARIES) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 \ - 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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -322,10 +322,14 @@ if (isConnector == false) { // Add Edge + std::vector laneWidths; + for (std::string& w : myElemData["width"]) { + laneWidths.push_back(StringUtils::toDouble(w)); + } NIVissimEdge* edge = new NIVissimEdge(id, myElemData["name"].front(), myElemData["type"].front(), - (int)myElemData["width"].size(), // numLanes, + laneWidths, StringUtils::toDouble(myElemData["zuschlag1"].front()), StringUtils::toDouble(myElemData["zuschlag2"].front()), length, geom, clv); @@ -890,7 +894,7 @@ NIVissimConnection::clearDict(); NIVissimConflictArea::clearDict(); for (ToParserMap::iterator i = myParsers.begin(); i != myParsers.end(); i++) { - delete(*i).second; + delete (*i).second; } } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.h sumo-1.2.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/NIImporter_Vissim.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/NIVissimElements.h sumo-1.2.0+dfsg1/src/netimport/vissim/NIVissimElements.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/NIVissimElements.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/NIVissimElements.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/Makefile.in sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/Makefile.in --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,689 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netimport/vissim/tempstructs -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - NIVissimBoundedClusterObject.$(OBJEXT) \ - NIVissimClosedLaneDef.$(OBJEXT) NIVissimClosures.$(OBJEXT) \ - NIVissimConflictArea.$(OBJEXT) NIVissimConnection.$(OBJEXT) \ - NIVissimConnectionCluster.$(OBJEXT) \ - NIVissimDistrictConnection.$(OBJEXT) \ - NIVissimDisturbance.$(OBJEXT) NIVissimEdge.$(OBJEXT) \ - NIVissimEdgePosMap.$(OBJEXT) \ - NIVissimExtendedEdgePoint.$(OBJEXT) \ - NIVissimNodeCluster.$(OBJEXT) NIVissimNodeDef.$(OBJEXT) \ - NIVissimNodeDef_Edges.$(OBJEXT) NIVissimNodeDef_Poly.$(OBJEXT) \ - NIVissimNodeParticipatingEdge.$(OBJEXT) \ - NIVissimSource.$(OBJEXT) NIVissimTL.$(OBJEXT) \ - NIVissimTrafficDescription.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libvissimtmpstr.a -libvissimtmpstr_a_SOURCES = NIVissimAbstractEdge.cpp NIVissimAbstractEdge.h \ -NIVissimBoundedClusterObject.cpp NIVissimBoundedClusterObject.h \ -NIVissimClosedLaneDef.cpp NIVissimClosedLaneDef.h \ -NIVissimClosedLanesVector.h NIVissimClosures.cpp NIVissimClosures.h \ -NIVissimConflictArea.cpp NIVissimConflictArea.h \ -NIVissimConnection.cpp NIVissimConnection.h \ -NIVissimConnectionCluster.cpp NIVissimConnectionCluster.h \ -NIVissimDistrictConnection.cpp NIVissimDistrictConnection.h \ -NIVissimDisturbance.cpp NIVissimDisturbance.h \ -NIVissimEdge.cpp NIVissimEdge.h NIVissimEdgePosMap.cpp NIVissimEdgePosMap.h \ -NIVissimExtendedEdgePoint.cpp NIVissimExtendedEdgePoint.h \ -NIVissimExtendedEdgePointVector.h \ -NIVissimNodeCluster.cpp NIVissimNodeCluster.h \ -NIVissimNodeDef.cpp NIVissimNodeDef.h \ -NIVissimNodeDef_Edges.cpp NIVissimNodeDef_Edges.h \ -NIVissimNodeDef_Poly.cpp NIVissimNodeDef_Poly.h \ -NIVissimNodeParticipatingEdge.cpp NIVissimNodeParticipatingEdge.h \ -NIVissimNodeParticipatingEdgeVector.h NIVissimSource.cpp NIVissimSource.h \ -NIVissimTL.cpp NIVissimTL.h \ -NIVissimTrafficDescription.cpp NIVissimTrafficDescription.h \ -NIVissimVehTypeClass.cpp NIVissimVehTypeClass.h \ -NIVissimVehicleClass.cpp NIVissimVehicleClass.h \ -NIVissimVehicleClassVector.h NIVissimVehicleType.cpp NIVissimVehicleType.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) --foreign src/netimport/vissim/tempstructs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netimport/vissim/tempstructs/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimAbstractEdge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimBoundedClusterObject.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimClosedLaneDef.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimClosures.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimConflictArea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimConnection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimConnectionCluster.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimDistrictConnection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimDisturbance.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimEdge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimEdgePosMap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimExtendedEdgePoint.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimNodeCluster.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimNodeDef.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimNodeDef_Edges.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimNodeDef_Poly.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimNodeParticipatingEdge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSource.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimTL.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimTrafficDescription.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimVehTypeClass.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimVehicleClass.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimVehicleType.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -152,7 +152,7 @@ void NIVissimAbstractEdge::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -78,7 +78,7 @@ void NIVissimClosures::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimClosures.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -108,7 +108,7 @@ void NIVissimConflictArea::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.h 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConflictArea.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -150,7 +150,7 @@ myIncomingEdges.push_back(c->getFromEdgeID()); assert(find(edges.begin(), edges.end(), c->getFromEdgeID()) != edges.end() || - find(edges.begin(), edges.end(), c->getToEdgeID()) != edges.end()); + std::find(edges.begin(), edges.end(), c->getToEdgeID()) != edges.end()); } VectorHelper::removeDouble(myIncomingEdges); VectorHelper::removeDouble(myOutgoingEdges); @@ -547,7 +547,7 @@ for (NodeSubCluster::ConnectionCont::const_iterator i = c.myConnections.begin(); i != c.myConnections.end(); i++) { NIVissimConnection* conn = *i; int connid = conn->getID(); - std::vector::iterator j = find(myConnections.begin(), myConnections.end(), connid); + std::vector::iterator j = std::find(myConnections.begin(), myConnections.end(), connid); if (j != myConnections.end()) { myConnections.erase(j); } @@ -672,7 +672,7 @@ // !!! assert(myBoundary.xmin() <= myBoundary.xmax()); NIVissimEdge* edge = NIVissimEdge::dictionary(edgeid); - std::vector::const_iterator i = find(myEdges.begin(), myEdges.end(), edgeid); + std::vector::const_iterator i = std::find(myEdges.begin(), myEdges.end(), edgeid); if (i == myEdges.end()) { // edge does not exist!? throw 1; @@ -688,7 +688,7 @@ void NIVissimConnectionCluster::clearDict() { for (ContType::iterator i = myClusters.begin(); i != myClusters.end(); i++) { - delete(*i); + delete (*i); } myClusters.clear(); myFirstFreeID = 100000; diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -68,7 +68,7 @@ NIVissimConnection::~NIVissimConnection() { for (NIVissimClosedLanesVector::iterator i = myClosedLanes.begin(); i != myClosedLanes.end(); i++) { - delete(*i); + delete (*i); } myClosedLanes.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimConnection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -349,7 +349,7 @@ void NIVissimDistrictConnection::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -324,7 +324,7 @@ void NIVissimDisturbance::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -106,27 +106,30 @@ NIVissimEdge::NIVissimEdge(int id, const std::string& name, - const std::string& type, int noLanes, + const std::string& type, + std::vector laneWidths, double zuschlag1, double zuschlag2, double /*length*/, const PositionVector& geom, - const NIVissimClosedLanesVector& clv) - : NIVissimAbstractEdge(id, geom), - myName(name), myType(type), myNoLanes(noLanes), - myZuschlag1(zuschlag1), myZuschlag2(zuschlag2), - myClosedLanes(clv), myAmWithinJunction(false) { //, mySpeed(-1) - assert(noLanes >= 0); + const NIVissimClosedLanesVector& clv) : + NIVissimAbstractEdge(id, geom), + myName(name), myType(type), myNoLanes((int)laneWidths.size()), + myLaneWidths(laneWidths), + myZuschlag1(zuschlag1), myZuschlag2(zuschlag2), + myClosedLanes(clv), + myLaneSpeeds(myNoLanes, -1), + myAmWithinJunction(false) + //, mySpeed(-1) +{ + assert(myNoLanes >= 0); if (myMaxID < myID) { myMaxID = myID; } - for (int i = 0; i < noLanes; i++) { - myLaneSpeeds.push_back(-1); - } } NIVissimEdge::~NIVissimEdge() { for (NIVissimClosedLanesVector::iterator i = myClosedLanes.begin(); i != myClosedLanes.end(); i++) { - delete(*i); + delete (*i); } myClosedLanes.clear(); } @@ -138,8 +141,8 @@ double zuschlag1, double zuschlag2, double length, const PositionVector& geom, const NIVissimClosedLanesVector& clv) { - NIVissimEdge* o = new NIVissimEdge(id, name, type, noLanes, zuschlag1, - zuschlag2, length, geom, clv); + NIVissimEdge* o = new NIVissimEdge(id, name, type, std::vector(noLanes, NBEdge::UNSPECIFIED_WIDTH), + zuschlag1, zuschlag2, length, geom, clv); if (!dictionary(id, o)) { delete o; return false; @@ -495,6 +498,7 @@ NBEdge::UNSPECIFIED_WIDTH, NBEdge::UNSPECIFIED_OFFSET, myGeom, myName, "", LANESPREAD_CENTER, true); for (int i = 0; i < myNoLanes; i++) { + buildEdge->setLaneWidth(i, myLaneWidths[i]); if ((int) myLaneSpeeds.size() <= i || myLaneSpeeds[i] == -1) { buildEdge->setSpeed(i, OptionsCont::getOptions().getFloat("vissim.default-speed") / (double) 3.6); } else { @@ -540,7 +544,7 @@ // check set speeds if(myPatchedSpeeds.size()!=0) { std::vector::iterator i = - find(myPatchedSpeeds.begin(), myPatchedSpeeds.end(), -1); + std::find(myPatchedSpeeds.begin(), myPatchedSpeeds.end(), -1); if(myPatchedSpeeds.size()!=myNoLanes||i!=myPatchedSpeeds.end()) { cot << "Warning! Not all lanes are patched! (edge:" << myID << ")." << endl; } @@ -789,11 +793,11 @@ NIVissimEdge::mergedInto(NIVissimConnectionCluster* old, NIVissimConnectionCluster* act) { ConnectionClusters::iterator i = - find(myConnectionClusters.begin(), myConnectionClusters.end(), old); + std::find(myConnectionClusters.begin(), myConnectionClusters.end(), old); if (i != myConnectionClusters.end()) { myConnectionClusters.erase(i); } - i = find(myConnectionClusters.begin(), myConnectionClusters.end(), act); + i = std::find(myConnectionClusters.begin(), myConnectionClusters.end(), act); if (i == myConnectionClusters.end()) { myConnectionClusters.push_back(act); } @@ -804,7 +808,7 @@ void NIVissimEdge::removeFromConnectionCluster(NIVissimConnectionCluster* c) { ConnectionClusters::iterator i = - find(myConnectionClusters.begin(), myConnectionClusters.end(), c); + std::find(myConnectionClusters.begin(), myConnectionClusters.end(), c); assert(i != myConnectionClusters.end()); myConnectionClusters.erase(i); } @@ -813,7 +817,7 @@ void NIVissimEdge::addToConnectionCluster(NIVissimConnectionCluster* c) { ConnectionClusters::iterator i = - find(myConnectionClusters.begin(), myConnectionClusters.end(), c); + std::find(myConnectionClusters.begin(), myConnectionClusters.end(), c); if (i == myConnectionClusters.end()) { myConnectionClusters.push_back(c); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -55,7 +55,9 @@ public: /// Constructor NIVissimEdge(int id, const std::string& name, - const std::string& type, int noLanes, double zuschlag1, + const std::string& type, + std::vector laneWidths, + double zuschlag1, double zuschlag2, double length, const PositionVector& geom, const NIVissimClosedLanesVector& clv); @@ -256,6 +258,7 @@ /// The number of lanes the edge has int myNoLanes; + std::vector myLaneWidths; /// Additional load values for this edge double myZuschlag1, myZuschlag2; diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -285,7 +285,7 @@ void NIVissimNodeCluster::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -125,7 +125,7 @@ void NIVissimNodeDef::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,7 +47,7 @@ NIVissimNodeDef_Edges::~NIVissimNodeDef_Edges() { for (NIVissimNodeParticipatingEdgeVector::iterator i = myEdges.begin(); i != myEdges.end(); i++) { - delete(*i); + delete (*i); } myEdges.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -72,7 +72,7 @@ void NIVissimSource::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimSource.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -112,7 +112,7 @@ NIVissimTL::NIVissimTLSignal::clearDict() { for (SignalDictType::iterator i = myDict.begin(); i != myDict.end(); i++) { for (SSignalDictType::iterator j = (*i).second.begin(); j != (*i).second.end(); j++) { - delete(*j).second; + delete (*j).second; } } myDict.clear(); @@ -253,7 +253,7 @@ NIVissimTL::NIVissimTLSignalGroup::clearDict() { for (GroupDictType::iterator i = myDict.begin(); i != myDict.end(); i++) { for (SGroupDictType::iterator j = (*i).second.begin(); j != (*i).second.end(); j++) { - delete(*j).second; + delete (*j).second; } } myDict.clear(); @@ -353,7 +353,7 @@ void NIVissimTL::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTL.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -88,7 +88,7 @@ void NIVissimTrafficDescription::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,7 +71,7 @@ void NIVissimVehicleType::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -78,7 +78,7 @@ void NIVissimVehTypeClass::clearDict() { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { - delete(*i).second; + delete (*i).second; } myDict.clear(); } diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/Makefile.in sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/Makefile.in --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,848 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netimport/vissim/typeloader -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = \ - NIVissimSingleTypeParser_Auswertungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Detektordefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_DynUml.$(OBJEXT) \ - NIVissimSingleTypeParser_Einheitendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Emission.$(OBJEXT) \ - NIVissimSingleTypeParser_Fahrtverlaufdateien.$(OBJEXT) \ - NIVissimSingleTypeParser_Fahrverhaltendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Fahrzeugklassendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Fahrzeugtypdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Fensterdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Gefahrwarnungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Gelbverhaltendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Haltestellendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Kantensperrung.$(OBJEXT) \ - NIVissimSingleTypeParser_Kennungszeile.$(OBJEXT) \ - NIVissimSingleTypeParser_Knotendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_LSAKopplungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Laengenverteilungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Langsamfahrbereichdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Lichtsignalanlagendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Liniendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Linksverkehr.$(OBJEXT) \ - NIVissimSingleTypeParser_Messungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Netzobjektdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Parkplatzdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Querschnittsmessungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Rautedefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Reisezeitmessungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Richtungspfeildefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Routenentscheidungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Signalgeberdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Signalgruppendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_SimRate.$(OBJEXT) \ - NIVissimSingleTypeParser_Simdauer.$(OBJEXT) \ - NIVissimSingleTypeParser_Startuhrzeit.$(OBJEXT) \ - NIVissimSingleTypeParser_Startzufallszahl.$(OBJEXT) \ - NIVissimSingleTypeParser_Stauparameterdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Stauzaehlerdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Stopschilddefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Streckendefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Streckentypdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_TEAPACDefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_VWunschentscheidungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Verbindungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Zeitenverteilungsdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Zeitschrittfaktor.$(OBJEXT) \ - NIVissimSingleTypeParser_Zuflussdefinition.$(OBJEXT) \ - NIVissimSingleTypeParser_Zusammensetzungsdefinition.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libvissimtypeload.a -libvissimtypeload_a_SOURCES = NIVissimSingleTypeParser_Auswertungsdefinition.cpp \ -NIVissimSingleTypeParser_Auswertungsdefinition.h \ -NIVissimSingleTypeParser_Detektordefinition.cpp \ -NIVissimSingleTypeParser_Detektordefinition.h \ -NIVissimSingleTypeParser_DynUml.cpp \ -NIVissimSingleTypeParser_DynUml.h \ -NIVissimSingleTypeParser_Einheitendefinition.cpp \ -NIVissimSingleTypeParser_Einheitendefinition.h \ -NIVissimSingleTypeParser_Emission.cpp \ -NIVissimSingleTypeParser_Emission.h \ -NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp \ -NIVissimSingleTypeParser_Fahrtverlaufdateien.h \ -NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp \ -NIVissimSingleTypeParser_Fahrverhaltendefinition.h \ -NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp \ -NIVissimSingleTypeParser_Fahrzeugklassendefinition.h \ -NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp \ -NIVissimSingleTypeParser_Fahrzeugtypdefinition.h \ -NIVissimSingleTypeParser_Fensterdefinition.cpp \ -NIVissimSingleTypeParser_Fensterdefinition.h \ -NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp \ -NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h \ -NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp \ -NIVissimSingleTypeParser_Gelbverhaltendefinition.h \ -NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp \ -NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h \ -NIVissimSingleTypeParser_Haltestellendefinition.cpp \ -NIVissimSingleTypeParser_Haltestellendefinition.h \ -NIVissimSingleTypeParser_Kantensperrung.cpp \ -NIVissimSingleTypeParser_Kantensperrung.h \ -NIVissimSingleTypeParser_Kennungszeile.cpp \ -NIVissimSingleTypeParser_Kennungszeile.h \ -NIVissimSingleTypeParser_Knotendefinition.cpp \ -NIVissimSingleTypeParser_Knotendefinition.h \ -NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp \ -NIVissimSingleTypeParser_LSAKopplungsdefinition.h \ -NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp \ -NIVissimSingleTypeParser_Laengenverteilungsdefinition.h \ -NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp \ -NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h \ -NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp \ -NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h \ -NIVissimSingleTypeParser_Liniendefinition.cpp \ -NIVissimSingleTypeParser_Liniendefinition.h \ -NIVissimSingleTypeParser_Linksverkehr.cpp \ -NIVissimSingleTypeParser_Linksverkehr.h \ -NIVissimSingleTypeParser_Messungsdefinition.cpp \ -NIVissimSingleTypeParser_Messungsdefinition.h \ -NIVissimSingleTypeParser_Netzobjektdefinition.cpp \ -NIVissimSingleTypeParser_Netzobjektdefinition.h \ -NIVissimSingleTypeParser_Parkplatzdefinition.cpp \ -NIVissimSingleTypeParser_Parkplatzdefinition.h \ -NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp \ -NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h \ -NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp \ -NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h \ -NIVissimSingleTypeParser_Rautedefinition.cpp \ -NIVissimSingleTypeParser_Rautedefinition.h \ -NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp \ -NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h \ -NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp \ -NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h \ -NIVissimSingleTypeParser_Richtungspfeildefinition.cpp \ -NIVissimSingleTypeParser_Richtungspfeildefinition.h \ -NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp \ -NIVissimSingleTypeParser_Routenentscheidungsdefinition.h \ -NIVissimSingleTypeParser_Signalgeberdefinition.cpp \ -NIVissimSingleTypeParser_Signalgeberdefinition.h \ -NIVissimSingleTypeParser_Signalgruppendefinition.cpp \ -NIVissimSingleTypeParser_Signalgruppendefinition.h \ -NIVissimSingleTypeParser_SimRate.cpp \ -NIVissimSingleTypeParser_SimRate.h \ -NIVissimSingleTypeParser_Simdauer.cpp \ -NIVissimSingleTypeParser_Simdauer.h \ -NIVissimSingleTypeParser_Startuhrzeit.cpp \ -NIVissimSingleTypeParser_Startuhrzeit.h \ -NIVissimSingleTypeParser_Startzufallszahl.cpp \ -NIVissimSingleTypeParser_Startzufallszahl.h \ -NIVissimSingleTypeParser_Stauparameterdefinition.cpp \ -NIVissimSingleTypeParser_Stauparameterdefinition.h \ -NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp \ -NIVissimSingleTypeParser_Stauzaehlerdefinition.h \ -NIVissimSingleTypeParser_Stopschilddefinition.cpp \ -NIVissimSingleTypeParser_Stopschilddefinition.h \ -NIVissimSingleTypeParser_Streckendefinition.cpp \ -NIVissimSingleTypeParser_Streckendefinition.h \ -NIVissimSingleTypeParser_Streckentypdefinition.cpp \ -NIVissimSingleTypeParser_Streckentypdefinition.h \ -NIVissimSingleTypeParser_TEAPACDefinition.cpp \ -NIVissimSingleTypeParser_TEAPACDefinition.h \ -NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp \ -NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h \ -NIVissimSingleTypeParser_Verbindungsdefinition.cpp \ -NIVissimSingleTypeParser_Verbindungsdefinition.h \ -NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp \ -NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h \ -NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp \ -NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h \ -NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp \ -NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h \ -NIVissimSingleTypeParser_Zeitschrittfaktor.cpp \ -NIVissimSingleTypeParser_Zeitschrittfaktor.h \ -NIVissimSingleTypeParser_Zuflussdefinition.cpp \ -NIVissimSingleTypeParser_Zuflussdefinition.h \ -NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp \ -NIVissimSingleTypeParser_Zusammensetzungsdefinition.h \ -NIVissimSingleTypeParser__XKurvedefinition.cpp \ -NIVissimSingleTypeParser__XKurvedefinition.h \ -NIVissimSingleTypeParser__XVerteilungsdefinition.cpp \ -NIVissimSingleTypeParser__XVerteilungsdefinition.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) --foreign src/netimport/vissim/typeloader/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netimport/vissim/typeloader/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Auswertungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Detektordefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_DynUml.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Einheitendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Emission.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Fahrtverlaufdateien.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Fahrverhaltendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Fahrzeugklassendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Fahrzeugtypdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Fensterdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Gelbverhaltendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Haltestellendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Kantensperrung.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Kennungszeile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Knotendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_LSAKopplungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Laengenverteilungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Liniendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Linksverkehr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Messungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Netzobjektdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Parkplatzdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Rautedefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Richtungspfeildefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Routenentscheidungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Signalgeberdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Signalgruppendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_SimRate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Simdauer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Startuhrzeit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Startzufallszahl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Stauparameterdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Stauzaehlerdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Stopschilddefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Streckendefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Streckentypdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_TEAPACDefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Verbindungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Zeitschrittfaktor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Zuflussdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser_Zusammensetzungsdefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser__XKurvedefinition.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser__XVerteilungsdefinition.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -122,7 +122,7 @@ tag = readEndSecure(from); } } - NIVissimEdge* e = new NIVissimEdge(id, name, type, noLanes, + NIVissimEdge* e = new NIVissimEdge(id, name, type, std::vector(noLanes, NBEdge::UNSPECIFIED_WIDTH), zuschlag1, zuschlag2, length, geom, clv); if (!NIVissimEdge::dictionary(id, e)) { return false; diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h --- sumo-1.1.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netload/Makefile.in sumo-1.2.0+dfsg1/src/netload/Makefile.in --- sumo-1.1.0+dfsg1/src/netload/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,646 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netload -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - NLDiscreteEventBuilder.$(OBJEXT) \ - NLEdgeControlBuilder.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libnetload.a -libnetload_a_SOURCES = NLDetectorBuilder.h NLDetectorBuilder.cpp \ -NLDiscreteEventBuilder.h NLDiscreteEventBuilder.cpp \ -NLEdgeControlBuilder.h NLEdgeControlBuilder.cpp \ -NLJunctionControlBuilder.h NLJunctionControlBuilder.cpp \ -NLBuilder.h NLBuilder.cpp \ -NLHandler.h NLHandler.cpp \ -NLTriggerBuilder.h NLTriggerBuilder.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) --foreign src/netload/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netload/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLDetectorBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLDiscreteEventBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLEdgeControlBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLJunctionControlBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLTriggerBuilder.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netload/NLBuilder.cpp sumo-1.2.0+dfsg1/src/netload/NLBuilder.cpp --- sumo-1.1.0+dfsg1/src/netload/NLBuilder.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,8 +39,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -231,9 +231,7 @@ throw ProcessError(); } MsgHandler::initOutputOptions(); - RandHelper::initRandGlobal(); - RandHelper::initRandGlobal(MSRouteHandler::getParsingRNG()); - RandHelper::initRandGlobal(MSDevice::getEquipmentRNG()); + initRandomness(); MSFrame::setMSGlobals(oc); MSVehicleControl* vc = nullptr; if (MSGlobals::gUseMesoSim) { @@ -264,6 +262,13 @@ throw ProcessError(); } +void +NLBuilder::initRandomness() { + RandHelper::initRandGlobal(); + RandHelper::initRandGlobal(MSRouteHandler::getParsingRNG()); + RandHelper::initRandGlobal(MSDevice::getEquipmentRNG()); + MSLane::initRNGs(OptionsCont::getOptions()); +} void NLBuilder::buildNet() { @@ -274,11 +279,12 @@ std::vector stateDumpTimes; std::vector stateDumpFiles; try { + MSFrame::buildStreams(); // ensure streams are ready for output during building edges = myEdgeBuilder.build(myXMLHandler.networkVersion()); junctions = myJunctionBuilder.build(); + junctions->postloadInitContainer(); routeLoaders = buildRouteLoaderControl(myOptions); tlc = myJunctionBuilder.buildTLLogics(); - MSFrame::buildStreams(); const std::vector times = myOptions.getIntVector("save-state.times"); for (std::vector::const_iterator i = times.begin(); i != times.end(); ++i) { stateDumpTimes.push_back(TIME2STEPS(*i)); diff -Nru sumo-1.1.0+dfsg1/src/netload/NLBuilder.h sumo-1.2.0+dfsg1/src/netload/NLBuilder.h --- sumo-1.1.0+dfsg1/src/netload/NLBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -98,6 +98,9 @@ */ static MSNet* init(); + /// @brief initializes all RNGs + static void initRandomness(); + protected: /** @brief Loads a described subpart form the given list of files diff -Nru sumo-1.1.0+dfsg1/src/netload/NLDetectorBuilder.cpp sumo-1.2.0+dfsg1/src/netload/NLDetectorBuilder.cpp --- sumo-1.1.0+dfsg1/src/netload/NLDetectorBuilder.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLDetectorBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -453,7 +453,7 @@ NLDetectorBuilder::createEdgeLaneMeanData(const std::string& id, SUMOTime frequency, SUMOTime begin, SUMOTime end, const std::string& type, const bool useLanes, const bool withEmpty, const bool printDefaults, - const bool withInternal, const bool trackVehicles, + const bool withInternal, const bool trackVehicles, const int detectPersons, const double maxTravelTime, const double minSamples, const double haltSpeed, const std::string& vTypes, const std::string& device) { @@ -469,7 +469,7 @@ MSMeanData* det = nullptr; if (type == "" || type == "performance" || type == "traffic") { det = new MSMeanData_Net(id, begin, end, useLanes, withEmpty, - printDefaults, withInternal, trackVehicles, maxTravelTime, minSamples, haltSpeed, vTypes); + printDefaults, withInternal, trackVehicles, detectPersons, maxTravelTime, minSamples, haltSpeed, vTypes); } else if (type == "emissions" || type == "hbefa") { if (type == "hbefa") { WRITE_WARNING("The netstate type 'hbefa' is deprecated. Please use the type 'emissions' instead."); @@ -481,7 +481,7 @@ printDefaults, withInternal, trackVehicles, maxTravelTime, minSamples, vTypes); } else if (type == "amitran") { det = new MSMeanData_Amitran(id, begin, end, useLanes, withEmpty, - printDefaults, withInternal, trackVehicles, maxTravelTime, minSamples, haltSpeed, vTypes); + printDefaults, withInternal, trackVehicles, detectPersons, maxTravelTime, minSamples, haltSpeed, vTypes); } else { throw InvalidArgument("Invalid type '" + type + "' for meandata dump '" + id + "'."); } diff -Nru sumo-1.1.0+dfsg1/src/netload/NLDetectorBuilder.h sumo-1.2.0+dfsg1/src/netload/NLDetectorBuilder.h --- sumo-1.1.0+dfsg1/src/netload/NLDetectorBuilder.h 2018-06-01 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLDetectorBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -329,6 +329,7 @@ * @param[in] withEmpty Information whether empty lanes/edges shall be written * @param[in] withInternal Information whether internal lanes/edges shall be written * @param[in] trackVehicles Information whether information shall be collected per vehicle + * @param[in] detectPersons Whether pedestrians shall be detected instead of vehicles * @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 @@ -338,7 +339,7 @@ void createEdgeLaneMeanData(const std::string& id, SUMOTime frequency, SUMOTime begin, SUMOTime end, const std::string& type, const bool useLanes, const bool withEmpty, const bool printDefaults, - const bool withInternal, const bool trackVehicles, + const bool withInternal, const bool trackVehicles, const int detectPersons, const double maxTravelTime, const double minSamples, const double haltSpeed, const std::string& vTypes, const std::string& device); diff -Nru sumo-1.1.0+dfsg1/src/netload/NLDiscreteEventBuilder.cpp sumo-1.2.0+dfsg1/src/netload/NLDiscreteEventBuilder.cpp --- sumo-1.1.0+dfsg1/src/netload/NLDiscreteEventBuilder.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLDiscreteEventBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netload/NLDiscreteEventBuilder.h sumo-1.2.0+dfsg1/src/netload/NLDiscreteEventBuilder.h --- sumo-1.1.0+dfsg1/src/netload/NLDiscreteEventBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLDiscreteEventBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netload/NLEdgeControlBuilder.cpp sumo-1.2.0+dfsg1/src/netload/NLEdgeControlBuilder.cpp --- sumo-1.1.0+dfsg1/src/netload/NLEdgeControlBuilder.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLEdgeControlBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netload/NLEdgeControlBuilder.h sumo-1.2.0+dfsg1/src/netload/NLEdgeControlBuilder.h --- sumo-1.1.0+dfsg1/src/netload/NLEdgeControlBuilder.h 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLEdgeControlBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netload/NLHandler.cpp sumo-1.2.0+dfsg1/src/netload/NLHandler.cpp --- sumo-1.1.0+dfsg1/src/netload/NLHandler.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -65,7 +65,7 @@ myDetectorBuilder(detBuilder), myTriggerBuilder(triggerBuilder), myEdgeControlBuilder(edgeBuilder), myJunctionControlBuilder(junctionBuilder), myAmParsingTLLogicOrJunction(false), myCurrentIsBroken(false), - myHaveWarnedAboutDeprecatedLanes(false), + myHaveWarnedAboutInvalidTLType(false), myHaveSeenInternalEdge(false), myHaveSeenNeighs(false), myHaveSeenAdditionalSpeedRestrictions(false), @@ -157,12 +157,14 @@ case SUMO_TAG_TRAIN_STOP: case SUMO_TAG_CONTAINER_STOP: myTriggerBuilder.parseAndBuildStoppingPlace(myNet, attrs, (SumoXMLTag)element); + myLastParameterised.push_back(myTriggerBuilder.getCurrentStop()); break; case SUMO_TAG_PARKING_SPACE: myTriggerBuilder.parseAndAddLotEntry(attrs); break; case SUMO_TAG_PARKING_AREA: myTriggerBuilder.parseAndBeginParkingArea(myNet, attrs); + myLastParameterised.push_back(myTriggerBuilder.getCurrentStop()); break; case SUMO_TAG_ACCESS: myTriggerBuilder.addAccess(myNet, attrs); @@ -285,11 +287,13 @@ break; case SUMO_TAG_PARKING_AREA: myTriggerBuilder.endParkingArea(); + myLastParameterised.pop_back(); break; case SUMO_TAG_BUS_STOP: case SUMO_TAG_TRAIN_STOP: case SUMO_TAG_CONTAINER_STOP: myTriggerBuilder.endStoppingPlace(); + myLastParameterised.pop_back(); break; case SUMO_TAG_NET: // build junction graph @@ -680,6 +684,13 @@ } else { WRITE_ERROR("Traffic light '" + id + "' has unknown type '" + typeS + "'."); } + if (MSGlobals::gUseMesoSim && type == TLTYPE_ACTUATED) { + if (!myHaveWarnedAboutInvalidTLType) { + WRITE_WARNING("Traffic light type '" + toString(type) + "' cannot be used in mesoscopic simulation. Using '" + toString(TLTYPE_STATIC) + "' as fallback"); + myHaveWarnedAboutInvalidTLType = true; + } + type = TLTYPE_STATIC; + } } // const SUMOTime offset = attrs.getOptSUMOTimeReporting(SUMO_ATTR_OFFSET, id.c_str(), ok, 0); @@ -715,7 +726,8 @@ SUMO_ATTR_MAXDURATION, myJunctionControlBuilder.getActiveKey().c_str(), ok, duration); - int nextPhase = attrs.getOpt(SUMO_ATTR_NEXT, nullptr, ok, -1); + std::vector nextPhases = attrs.getOptIntVector(SUMO_ATTR_NEXT, nullptr, ok); + const std::string name = attrs.getOpt(SUMO_ATTR_NAME, nullptr, ok, ""); //SOTL attributes //If the type attribute is not present, the parsed phase is of type "undefined" (MSPhaseDefinition constructor), @@ -767,19 +779,19 @@ pos = targetLanesString.find_first_of(delimiter, firstPos); } //Adding the SOTL parsed phase to have a new MSPhaseDefinition that is SOTL compliant for target phases - myJunctionControlBuilder.addPhase(duration, state, nextPhase, minDuration, maxDuration, transient_notdecisional_bit, commit_bit, targetLanesVector); + myJunctionControlBuilder.addPhase(duration, state, nextPhases, minDuration, maxDuration, name, transient_notdecisional_bit, commit_bit, &targetLanesVector); } catch (EmptyData&) { MsgHandler::getErrorInstance()->inform("Missing targetLane definition for the target phase."); return; } } else { //Adding the SOTL parsed phase to have a new MSPhaseDefinition that is SOTL compliant for non target phases - myJunctionControlBuilder.addPhase(duration, state, nextPhase, minDuration, maxDuration, transient_notdecisional_bit, commit_bit); + myJunctionControlBuilder.addPhase(duration, state, nextPhases, minDuration, maxDuration, name, transient_notdecisional_bit, commit_bit); } } else { //Adding the standard parsed phase to have a new MSPhaseDefinition - myJunctionControlBuilder.addPhase(duration, state, nextPhase, minDuration, maxDuration); + myJunctionControlBuilder.addPhase(duration, state, nextPhases, minDuration, maxDuration, name); } } @@ -1128,6 +1140,7 @@ const std::string excludeEmpty = attrs.getOpt(SUMO_ATTR_EXCLUDE_EMPTY, id.c_str(), ok, "false"); const bool withInternal = attrs.getOpt(SUMO_ATTR_WITH_INTERNAL, id.c_str(), ok, false); const bool trackVehicles = attrs.getOpt(SUMO_ATTR_TRACK_VEHICLES, id.c_str(), ok, false); + const std::string detectPersonsString = attrs.getOpt(SUMO_ATTR_DETECT_PERSONS, id.c_str(), ok, ""); const std::string file = attrs.get(SUMO_ATTR_FILE, id.c_str(), ok); const std::string type = attrs.getOpt(SUMO_ATTR_TYPE, id.c_str(), ok, "performance"); std::string vtypes = attrs.getOpt(SUMO_ATTR_VTYPES, id.c_str(), ok, ""); @@ -1137,12 +1150,21 @@ if (!ok) { return; } + int detectPersons = 0; + for (std::string mode : StringTokenizer(detectPersonsString).getVector()) { + if (SUMOXMLDefinitions::PersonModeValues.hasString(mode)) { + detectPersons |= SUMOXMLDefinitions::PersonModeValues.get(mode); + } else { + WRITE_ERROR("Invalid person mode '" + mode + "' in edgeData definition '" + id + "'"); + return; + } + } try { myDetectorBuilder.createEdgeLaneMeanData(id, frequency, begin, end, type, objecttype == SUMO_TAG_MEANDATA_LANE, // equivalent to TplConvert::_2bool used in SUMOSAXAttributes::getBool excludeEmpty[0] != 't' && excludeEmpty[0] != 'T' && excludeEmpty[0] != '1' && excludeEmpty[0] != 'x', - excludeEmpty == "defaults", withInternal, trackVehicles, + excludeEmpty == "defaults", withInternal, trackVehicles, detectPersons, maxTravelTime, minSamples, haltingSpeedThreshold, vtypes, FileHelpers::checkForRelativity(file, getFileName())); } catch (InvalidArgument& e) { diff -Nru sumo-1.1.0+dfsg1/src/netload/NLHandler.h sumo-1.2.0+dfsg1/src/netload/NLHandler.h --- sumo-1.1.0+dfsg1/src/netload/NLHandler.h 2018-11-07 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -329,7 +329,7 @@ bool myCurrentIsBroken; - bool myHaveWarnedAboutDeprecatedLanes; + bool myHaveWarnedAboutInvalidTLType; Parameterised myLastEdgeParameters; std::vector myLastParameterised; diff -Nru sumo-1.1.0+dfsg1/src/netload/NLJunctionControlBuilder.cpp sumo-1.2.0+dfsg1/src/netload/NLJunctionControlBuilder.cpp --- sumo-1.1.0+dfsg1/src/netload/NLJunctionControlBuilder.cpp 2018-11-06 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLJunctionControlBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -402,27 +402,19 @@ void -NLJunctionControlBuilder::addPhase(SUMOTime duration, const std::string& state, int nextPhase, SUMOTime minDuration, SUMOTime maxDuration, bool transient_notdecisional, bool commit) { +NLJunctionControlBuilder::addPhase(SUMOTime duration, const std::string& state, const std::vector& nextPhases, SUMOTime minDuration, SUMOTime maxDuration, const std::string& name, bool transient_notdecisional, bool commit, MSPhaseDefinition::LaneIdVector* targetLanes) { // build and add the phase definition to the list - myActivePhases.push_back(new MSPhaseDefinition(duration, state, minDuration, maxDuration, nextPhase, transient_notdecisional, commit)); - // add phase duration to the absolute duration - myAbsDuration += duration; -} - -void -NLJunctionControlBuilder::addPhase(SUMOTime duration, const std::string& state, int nextPhase, SUMOTime minDuration, SUMOTime maxDuration, bool transient_notdecisional, bool commit, MSPhaseDefinition::LaneIdVector& targetLanes) { - // build and add the phase definition to the list - myActivePhases.push_back(new MSPhaseDefinition(duration, state, minDuration, maxDuration, nextPhase, transient_notdecisional, commit, targetLanes)); + myActivePhases.push_back(new MSPhaseDefinition(duration, state, minDuration, maxDuration, nextPhases, name, transient_notdecisional, commit, targetLanes)); // add phase duration to the absolute duration myAbsDuration += duration; } void -NLJunctionControlBuilder::addPhase(SUMOTime duration, const std::string& state, int nextPhase, - SUMOTime minDuration, SUMOTime maxDuration) { +NLJunctionControlBuilder::addPhase(SUMOTime duration, const std::string& state, const std::vector& nextPhases, + SUMOTime minDuration, SUMOTime maxDuration, const std::string& name) { // build and add the phase definition to the list - myActivePhases.push_back(new MSPhaseDefinition(duration, state, minDuration, maxDuration, nextPhase)); + myActivePhases.push_back(new MSPhaseDefinition(duration, state, minDuration, maxDuration, nextPhases, name)); // add phase duration to the absolute duration myAbsDuration += duration; } @@ -494,9 +486,8 @@ void NLJunctionControlBuilder::postLoadInitialization() { - for (std::vector::const_iterator it = myLogics2PostLoadInit.begin(); - it != myLogics2PostLoadInit.end(); ++it) { - (*it)->init(myDetectorBuilder); + for (MSTrafficLightLogic* const logic : myLogics2PostLoadInit) { + logic->init(myDetectorBuilder); } myNetIsLoaded = true; } diff -Nru sumo-1.1.0+dfsg1/src/netload/NLJunctionControlBuilder.h sumo-1.2.0+dfsg1/src/netload/NLJunctionControlBuilder.h --- sumo-1.1.0+dfsg1/src/netload/NLJunctionControlBuilder.h 2018-09-19 22:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLJunctionControlBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -173,20 +173,8 @@ * @todo min/max is used only by one junction type. Recheck * @todo min/max: maybe only one type of a phase definition should be built */ - void addPhase(SUMOTime duration, const std::string& state, int nextPhase, - SUMOTime min, SUMOTime max); - - /** @brief Adds a phase to the currently built traffic lights logic - * - * @param[in] duration The duration of the phase - * @param[in] state The state of the tls - * @param[in] minDuration The minimum duration of the phase - * @param[in] maxDuration The maximum duration of the phase - * @param[in] transient_notdecisional Specifies if this is a transient phase (true) or a decisional one (false) - * @param[in] commit Specifies if this is a commit phase - */ - void addPhase(SUMOTime duration, const std::string& state, int nextPhase, SUMOTime minDuration, SUMOTime maxDuration, bool transient_notdecisional, bool commit); - + void addPhase(SUMOTime duration, const std::string& state, const std::vector& nextPhases, + SUMOTime min, SUMOTime max, const std::string& name); /** @brief Adds a phase to the currently built traffic lights logic * @@ -198,7 +186,7 @@ * @param[in] commit Specifies if this is a commit phase * @param[in] targetLanes A reference to the vector containing targeted sensor lanes for this phase, given by lane id */ - void addPhase(SUMOTime duration, const std::string& state, int nextPhase, SUMOTime minDuration, SUMOTime maxDuration, bool transient_notdecisional, bool commit, MSPhaseDefinition::LaneIdVector& targetLanes); + void addPhase(SUMOTime duration, const std::string& state, const std::vector& nextPhases, SUMOTime minDuration, SUMOTime maxDuration, const std::string& name, bool transient_notdecisional, bool commit, MSPhaseDefinition::LaneIdVector* targetLanes = nullptr); /** @brief Returns a previously build tls logic diff -Nru sumo-1.1.0+dfsg1/src/netload/NLTriggerBuilder.cpp sumo-1.2.0+dfsg1/src/netload/NLTriggerBuilder.cpp --- sumo-1.1.0+dfsg1/src/netload/NLTriggerBuilder.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLTriggerBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -119,19 +119,17 @@ // get the file name to read further definitions from std::string file = getFileName(attrs, base, true); std::string objectid = attrs.get(SUMO_ATTR_LANES, id.c_str(), ok); - if (!ok) { - throw InvalidArgument("The lanes to use within MSLaneSpeedTrigger '" + id + "' are not known."); - } std::vector lanes; - std::vector laneIDs; - SUMOSAXAttributes::parseStringVector(objectid, laneIDs); - for (std::vector::iterator i = laneIDs.begin(); i != laneIDs.end(); ++i) { - MSLane* lane = MSLane::dictionary(*i); + for (const std::string& laneID : attrs.get >(SUMO_ATTR_LANES, id.c_str(), ok)) { + MSLane* lane = MSLane::dictionary(laneID); if (lane == nullptr) { - throw InvalidArgument("The lane to use within MSLaneSpeedTrigger '" + id + "' is not known."); + throw InvalidArgument("The lane '" + laneID + "' to use within MSLaneSpeedTrigger '" + id + "' is not known."); } lanes.push_back(lane); } + if (!ok) { + throw InvalidArgument("The lanes to use within MSLaneSpeedTrigger '" + id + "' are not known."); + } if (lanes.size() == 0) { throw InvalidArgument("No lane defined for MSLaneSpeedTrigger '" + id + "'."); } @@ -185,7 +183,6 @@ //get the name, leave blank if not given const std::string ptStopName = attrs.getOpt(SUMO_ATTR_NAME, id.c_str(), ok, ""); - // get the lane MSLane* lane = getLane(attrs, toString(element), id); // get the positions double frompos = attrs.getOpt(SUMO_ATTR_STARTPOS, id.c_str(), ok, 0); @@ -194,11 +191,11 @@ if (!ok || !myHandler->checkStopPos(frompos, topos, lane->getLength(), POSITION_EPS, friendlyPos)) { throw InvalidArgument("Invalid position for " + toString(element) + " '" + id + "'."); } - // get the lines - std::vector lines; - SUMOSAXAttributes::parseStringVector(attrs.getOpt(SUMO_ATTR_LINES, id.c_str(), ok, "", false), lines); + const std::vector& lines = attrs.getOptStringVector(SUMO_ATTR_LINES, id.c_str(), ok, false); + const int defaultCapacity = MAX2(MSStoppingPlace::getPersonsAbreast(topos - frompos) * 3, 6); + const int personCapacity = attrs.getOpt(SUMO_ATTR_PERSON_CAPACITY, id.c_str(), ok, defaultCapacity); // build the bus stop - buildStoppingPlace(net, id, lines, lane, frompos, topos, element, ptStopName); + buildStoppingPlace(net, id, lines, lane, frompos, topos, element, ptStopName, personCapacity); } @@ -247,9 +244,7 @@ if (!ok || !myHandler->checkStopPos(frompos, topos, lane->getLength(), POSITION_EPS, friendlyPos)) { throw InvalidArgument("Invalid position for parking area '" + id + "'."); } - // get the lines - std::vector lines; - SUMOSAXAttributes::parseStringVector(attrs.getOpt(SUMO_ATTR_LINES, id.c_str(), ok, "", false), lines); + const std::vector& lines = attrs.getOptStringVector(SUMO_ATTR_LINES, id.c_str(), ok, false); // build the parking area beginParkingArea(net, id, lines, lane, frompos, topos, capacity, width, length, angle, name, onRoad); } @@ -352,20 +347,17 @@ } // get the file name to read further definitions from std::string file = getFileName(attrs, base, true); - std::string objectid = attrs.get(SUMO_ATTR_EDGES, id.c_str(), ok); - if (!ok) { - throw InvalidArgument("The edge to use within MSTriggeredRerouter '" + id + "' is not known."); - } MSEdgeVector edges; - std::vector edgeIDs; - SUMOSAXAttributes::parseStringVector(objectid, edgeIDs); - for (std::vector::iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) { - MSEdge* edge = MSEdge::dictionary(*i); + for (const std::string& edgeID : attrs.get >(SUMO_ATTR_EDGES, id.c_str(), ok)) { + MSEdge* edge = MSEdge::dictionary(edgeID); if (edge == nullptr) { - throw InvalidArgument("The edge '" + (*i) + "' to use within MSTriggeredRerouter '" + id + "' is not known."); + throw InvalidArgument("The edge '" + edgeID + "' to use within MSTriggeredRerouter '" + id + "' is not known."); } edges.push_back(edge); } + if (!ok) { + throw InvalidArgument("The edge to use within MSTriggeredRerouter '" + id + "' is not known."); + } if (edges.size() == 0) { throw InvalidArgument("No edges found for MSTriggeredRerouter '" + id + "'."); } @@ -432,8 +424,8 @@ void NLTriggerBuilder::buildStoppingPlace(MSNet& net, std::string id, std::vector lines, MSLane* lane, - double frompos, double topos, const SumoXMLTag element, std::string ptStopName) { - myCurrentStop = new MSStoppingPlace(id, lines, *lane, frompos, topos, ptStopName); + double frompos, double topos, const SumoXMLTag element, std::string ptStopName, int personCapacity) { + myCurrentStop = new MSStoppingPlace(id, lines, *lane, frompos, topos, ptStopName, personCapacity); if (!net.addStoppingPlace(element, myCurrentStop)) { delete myCurrentStop; myCurrentStop = nullptr; diff -Nru sumo-1.1.0+dfsg1/src/netload/NLTriggerBuilder.h sumo-1.2.0+dfsg1/src/netload/NLTriggerBuilder.h --- sumo-1.1.0+dfsg1/src/netload/NLTriggerBuilder.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netload/NLTriggerBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -231,6 +231,12 @@ const std::string& base); //@} + + MSStoppingPlace* getCurrentStop() { + return myCurrentStop; + } + + protected: /// @name building methods /// @@ -272,7 +278,7 @@ * @exception InvalidArgument If the stop can not be added to the net (is duplicate) */ virtual void buildStoppingPlace(MSNet& net, std::string id, std::vector lines, MSLane* lane, - double frompos, double topos, const SumoXMLTag element, std::string string); + double frompos, double topos, const SumoXMLTag element, std::string string, int personCapacity); /** @brief Builds a charging station * diff -Nru sumo-1.1.0+dfsg1/src/netwrite/Makefile.in sumo-1.2.0+dfsg1/src/netwrite/Makefile.in --- sumo-1.1.0+dfsg1/src/netwrite/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,645 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/netwrite -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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_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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = 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 \ -NWWriter_SUMO.cpp NWWriter_SUMO.h \ -NWWriter_XML.cpp NWWriter_XML.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) --foreign src/netwrite/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/netwrite/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) - -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) - -distclean-compile: - -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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWWriter_SUMO.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWWriter_XML.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/netwrite/NWFrame.cpp sumo-1.2.0+dfsg1/src/netwrite/NWFrame.cpp --- sumo-1.1.0+dfsg1/src/netwrite/NWFrame.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -69,12 +69,12 @@ oc.doRegister("prefix", new Option_String("")); oc.addDescription("prefix", "Output", "Defines a prefix for edge and junction names"); -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE if (!forNetgen) { oc.doRegister("proj.plain-geo", new Option_Bool(false)); oc.addDescription("proj.plain-geo", "Projection", "Write geo coordinates in plain-xml"); } -#endif // HAVE_PROJ +#endif // PROJ_API_FILE oc.doRegister("amitran-output", new Option_FileName()); oc.addDescription("amitran-output", "Output", "The generated net will be written to FILE using Amitran format"); @@ -113,6 +113,9 @@ oc.doRegister("railway.topology.output", new Option_FileName()); oc.addDescription("railway.topology.output", "Output", "Analyse topology of the railway network"); + + oc.doRegister("polygon-output", new Option_FileName()); + oc.addDescription("polygon-output", "Output", "Write shapes that are embedded in the network input and that are not supported by polyconvert (OpenDRIVE)"); } // register opendrive options diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWFrame.h sumo-1.2.0+dfsg1/src/netwrite/NWFrame.h --- sumo-1.1.0+dfsg1/src/netwrite/NWFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_Amitran.cpp sumo-1.2.0+dfsg1/src/netwrite/NWWriter_Amitran.cpp --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_Amitran.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_Amitran.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_Amitran.h sumo-1.2.0+dfsg1/src/netwrite/NWWriter_Amitran.h --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_Amitran.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_Amitran.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.cpp sumo-1.2.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.cpp --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -131,7 +131,8 @@ std::set reservedNodeIDs; const bool numericalIDs = oc.getBool("numerical-ids"); if (oc.isSet("reserved-ids")) { - NBHelpers::loadPrefixedIDsFomFile(oc.getString("reserved-ids"), "node:", reservedNodeIDs); + NBHelpers::loadPrefixedIDsFomFile(oc.getString("reserved-ids"), "node:", reservedNodeIDs); // backward compatibility + NBHelpers::loadPrefixedIDsFomFile(oc.getString("reserved-ids"), "junction:", reservedNodeIDs); // selection format } if (numericalIDs) { avoid = nc.getAllNames(); @@ -206,9 +207,11 @@ 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; + if (name != "") { + if (nameIDs.count(name) == 0) { + nameIDs[name] = toString(nameIDs.size()); + } + nameID = nameIDs[name]; } } device << e->getID() << "\t" @@ -224,8 +227,8 @@ << getNavteqLaneCode(e->getNumLanes()) << "\t" << getSpeedCategoryUpperBound(kph) << "\t" << kph << "\t" - << nameID << "\t" // NAME_ID1_REGIONAL XXX - << UNDEFINED << "\t" // NAME_ID2_LOCAL XXX + << UNDEFINED << "\t" // NAME_ID1_REGIONAL XXX + << nameID << "\t" // NAME_ID2_LOCAL << UNDEFINED << "\t" // housenumbers_right << UNDEFINED << "\t" // housenumbers_left << getSinglePostalCode(e->getParameter("postal_code", UNDEFINED), e->getID()) << "\t" // ZIP_CODE diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.h sumo-1.2.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.h --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_DlrNavteq.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_MATSim.cpp sumo-1.2.0+dfsg1/src/netwrite/NWWriter_MATSim.cpp --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_MATSim.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_MATSim.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_MATSim.h sumo-1.2.0+dfsg1/src/netwrite/NWWriter_MATSim.h --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_MATSim.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_MATSim.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_OpenDrive.cpp sumo-1.2.0+dfsg1/src/netwrite/NWWriter_OpenDrive.cpp --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_OpenDrive.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_OpenDrive.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,10 +32,10 @@ #include #include #include -#include #include #include #include +#include #include #define INVALID_ID -1 @@ -114,7 +114,8 @@ writeNormalEdge(device, e, getID(e->getID(), edgeMap, edgeID), fromNodeID, toNodeID, - origNames, straightThresh); + origNames, straightThresh, + nb.getShapeCont()); } device.lf(); @@ -221,7 +222,8 @@ NWWriter_OpenDrive::writeNormalEdge(OutputDevice& device, const NBEdge* e, int edgeID, int fromNodeID, int toNodeID, const bool origNames, - const double straightThresh) { + const double straightThresh, + const ShapeContainer& shc) { // buffer output because some fields are computed out of order OutputDevice_String elevationOSS(false, 3); elevationOSS.setPrecision(8); @@ -311,7 +313,7 @@ device << " \n"; device << " \n"; device << " \n"; - device << " \n"; + writeRoadObjects(device, e, shc); device << " \n"; if (origNames) { device << " getID() << "\"/>\n"; @@ -371,13 +373,13 @@ endShape = getRightLaneBorder(outEdge, cLeft.toLane); init = NBNode::bezierControlPoints(begShape, endShape, turnaround, 25, 25, ok, nullptr, straightThresh); if (init.size() != 0) { - length = bezier(init, 12).length2D(); + length = init.bezier(12).length2D(); laneOffset = outEdge->getLaneWidth(cLeft.toLane); //std::cout << " internalLane=" << cLeft.getInternalLaneID() << " length=" << length << "\n"; } } } else { - length = bezier(init, 12).length2D(); + length = init.bezier(12).length2D(); } junctionDevice << " \n"; @@ -810,7 +812,7 @@ #endif } else { // write bezier - const double curveLength = bezier(init, 12).length2D(); + const double curveLength = init.bezier(12).length2D(); offset = writeGeomPP3(device, elevationDevice, init, curveLength, offset); #ifdef DEBUG_SMOOTH_GEOM if (DEBUGCOND) { @@ -868,5 +870,64 @@ } } +void +NWWriter_OpenDrive::writeRoadObjects(OutputDevice& device, const NBEdge* e, const ShapeContainer& shc) { + if (e->knowsParameter("roadObjects")) { + device.openTag("objects"); + device.setPrecision(8); // geometry hdg requires higher precision + PositionVector road = getLeftLaneBorder(e); + for (std::string id : StringTokenizer(e->getParameter("roadObjects", "")).getVector()) { + SUMOPolygon* p = shc.getPolygons().get(id); + if (p == nullptr) { + WRITE_WARNING("Road object polygon '" + id + "' not found for edge '" + e->getID() + "'"); + } else if (p->getShape().size() != 4) { + WRITE_WARNING("Cannot convert road object polygon '" + id + "' with " + toString(p->getShape().size()) + " points for edge '" + e->getID() + "'"); + } else { + const PositionVector& shape = p->getShape(); + device.openTag("object"); + Position center = shape.getPolygonCenter(); + PositionVector sideline = shape.getSubpartByIndex(0, 2); + PositionVector ortholine = shape.getSubpartByIndex(1, 2); + const double absAngle = sideline.angleAt2D(0); + const double length = sideline.length2D(); + const double width = ortholine.length2D(); + const double edgeOffset = road.nearest_offset_to_point2D(center); + if (edgeOffset == GeomHelper::INVALID_OFFSET) { + WRITE_WARNING("Cannot map road object polygon '" + id + "' with center " + toString(center) + " onto edge '" + e->getID() + "'"); + continue; + } + Position edgePos = road.positionAtOffset2D(edgeOffset); + const double edgeAngle = road.rotationAtOffset(edgeOffset); + const double relAngle = absAngle - edgeAngle; + double sideOffset = center.distanceTo2D(edgePos); + // determine sign of sideOffset + PositionVector tmp = road.getSubpart2D(MAX2(0.0, edgeOffset - 1), MIN2(road.length2D(), edgeOffset + 1)); + tmp.move2side(sideOffset); + if (tmp.distance2D(center) < sideOffset) { + sideOffset *= -1; + } + //std::cout << " id=" << id + // << " shape=" << shape + // << " center=" << center + // << " edgeOffset=" << edgeOffset + // << "\n"; + device.writeAttr("id", id); + device.writeAttr("type", p->getShapeType()); + device.writeAttr("name", p->getParameter("name", "")); + device.writeAttr("s", edgeOffset); + device.writeAttr("t", sideOffset); + device.writeAttr("width", width); + device.writeAttr("length", length); + device.writeAttr("hdg", relAngle); + device.closeTag(); + } + } + device.setPrecision(gPrecision); + device.closeTag(); + } else { + device << " \n"; + } +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_OpenDrive.h sumo-1.2.0+dfsg1/src/netwrite/NWWriter_OpenDrive.h --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_OpenDrive.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_OpenDrive.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,6 +37,7 @@ class PositionVector; class OutputDevice; class OutputDevice_String; +class ShapeContainer; // =========================================================================== @@ -61,7 +62,8 @@ static void writeNormalEdge(OutputDevice& device, const NBEdge* e, int edgeID, int fromNodeID, int toNodeID, const bool origNames, - const double straightThresh); + const double straightThresh, + const ShapeContainer& shc); /// @brief write internal edge to device, return next connectionID static int writeInternalEdge(OutputDevice& device, OutputDevice& junctionDevice, @@ -105,6 +107,9 @@ /// @brief check if the lane geometries are compatible with OpenDRIVE assumptions (colinear stop line) static void checkLaneGeometries(const NBEdge* e); + + /// @brief write road objects referenced as edge parameters + static void writeRoadObjects(OutputDevice& device, const NBEdge* e, const ShapeContainer& shc); }; diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_SUMO.cpp sumo-1.2.0+dfsg1/src/netwrite/NWWriter_SUMO.cpp --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_SUMO.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_SUMO.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -320,6 +320,16 @@ into.openTag(SUMO_TAG_EDGE); into.writeAttr(SUMO_ATTR_ID, edgeID); into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_INTERNAL); + if ((*i)->isBidiRail() && (*k).toEdge->isBidiRail() && + (*i) != (*k).toEdge->getTurnDestination(true)) { + try { + NBEdge::Connection bidiCon = (*k).toEdge->getTurnDestination(true)->getConnection( + 0, (*i)->getTurnDestination(true), 0); + into.writeAttr(SUMO_ATTR_BIDI, bidiCon.id); + } catch (ProcessError&) { + std::cout << " could not find bidi-connection\n"; + } + } // open a new edge } // to avoid changing to an internal lane which has a successor @@ -328,7 +338,8 @@ const double width = n.isConstantWidthTransition() && (*i)->getNumLanes() > (*k).toEdge->getNumLanes() ? (*i)->getLaneWidth((*k).fromLane) : successor.width; writeLane(into, (*k).getInternalLaneID(), (*k).vmax, successor.permissions, successor.preferred, - NBEdge::UNSPECIFIED_OFFSET, std::map(), width, (*k).shape, &(*k), + NBEdge::UNSPECIFIED_OFFSET, NBEdge::UNSPECIFIED_OFFSET, + std::map(), width, (*k).shape, &(*k), (*k).length, (*k).internalLaneIndex, oppositeLaneID[(*k).getInternalLaneID()]); haveVia = haveVia || (*k).haveVia; } @@ -349,7 +360,8 @@ into.writeAttr(SUMO_ATTR_ID, (*k).viaID); into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_INTERNAL); writeLane(into, (*k).viaID + "_0", (*k).vmax, successor.permissions, successor.preferred, - NBEdge::UNSPECIFIED_OFFSET, std::map(), successor.width, (*k).viaShape, &(*k), + NBEdge::UNSPECIFIED_OFFSET, NBEdge::UNSPECIFIED_OFFSET, + std::map(), successor.width, (*k).viaShape, &(*k), MAX2((*k).viaShape.length(), POSITION_EPS), // microsim needs positive length 0, ""); into.closeTag(); @@ -364,7 +376,9 @@ into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_CROSSING); into.writeAttr(SUMO_ATTR_CROSSING_EDGES, c->edges); writeLane(into, c->id + "_0", 1, SVC_PEDESTRIAN, 0, - NBEdge::UNSPECIFIED_OFFSET, std::map(), c->width, c->shape, nullptr, MAX2(c->shape.length(), POSITION_EPS), 0, "", false, c->customShape.size() != 0); + NBEdge::UNSPECIFIED_OFFSET, NBEdge::UNSPECIFIED_OFFSET, + std::map(), c->width, c->shape, nullptr, + MAX2(c->shape.length(), POSITION_EPS), 0, "", false, c->customShape.size() != 0); into.closeTag(); } // write pedestrian walking areas @@ -375,7 +389,8 @@ into.writeAttr(SUMO_ATTR_ID, wa.id); into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_WALKINGAREA); writeLane(into, wa.id + "_0", 1, SVC_PEDESTRIAN, 0, - NBEdge::UNSPECIFIED_OFFSET, std::map(), wa.width, wa.shape, nullptr, wa.length, 0, "", false, wa.hasCustomShape); + NBEdge::UNSPECIFIED_OFFSET, NBEdge::UNSPECIFIED_OFFSET, + std::map(), wa.width, wa.shape, nullptr, wa.length, 0, "", false, wa.hasCustomShape); into.closeTag(); } return ret; @@ -419,6 +434,7 @@ const std::vector& lanes = e.getLanes(); const double length = e.getFinalLength(); + double startOffset = e.isBidiRail() ? e.getTurnDestination(true)->getEndOffset() : 0; for (int i = 0; i < (int) lanes.size(); i++) { const NBEdge::Lane& l = lanes[i]; std::map stopOffsets; @@ -426,7 +442,9 @@ stopOffsets = l.stopOffsets; } writeLane(into, e.getLaneID(i), l.speed, - l.permissions, l.preferred, l.endOffset, stopOffsets, l.width, l.shape, &l, + l.permissions, l.preferred, + startOffset, l.endOffset, + stopOffsets, l.width, l.shape, &l, length, i, l.oppositeID, l.accelRamp, l.customShape.size() > 0); } // close the edge @@ -438,7 +456,8 @@ void NWWriter_SUMO::writeLane(OutputDevice& into, const std::string& lID, double speed, SVCPermissions permissions, SVCPermissions preferred, - double endOffset, std::map stopOffsets, double width, PositionVector shape, + double startOffset, double endOffset, + std::map stopOffsets, double width, PositionVector shape, const Parameterised* params, double length, int index, const std::string& oppositeID, bool accelRamp, bool customShape) { // output the lane's attributes @@ -456,9 +475,6 @@ } else if (speed < 0) { throw ProcessError("Negative allowed speed (" + toString(speed) + ") on lane '" + lID + "', use --speed.minimum to prevent this."); } - if (endOffset > 0) { - length = length - endOffset; - } into.writeAttr(SUMO_ATTR_SPEED, speed); into.writeAttr(SUMO_ATTR_LENGTH, length); if (endOffset != NBEdge::UNSPECIFIED_OFFSET) { @@ -473,8 +489,18 @@ if (customShape) { into.writeAttr(SUMO_ATTR_CUSTOMSHAPE, true); } - into.writeAttr(SUMO_ATTR_SHAPE, endOffset > 0 ? - shape.getSubpart(0, shape.length() - endOffset) : shape); + if (endOffset > 0 || startOffset > 0) { + if (startOffset + endOffset < shape.length()) { + shape = shape.getSubpart(startOffset, shape.length() - endOffset); + } else { + WRITE_ERROR("Invalid endOffset " + toString(endOffset) + " at lane '" + lID + + "' with length " + toString(shape.length()) + " (startOffset " + toString(startOffset) + ")"); + if (!OptionsCont::getOptions().getBool("ignore-errors")) { + throw ProcessError(); + } + } + } + into.writeAttr(SUMO_ATTR_SHAPE, shape); if (stopOffsets.size() != 0) { writeStopOffsets(into, stopOffsets); @@ -563,6 +589,9 @@ if (n.getRightOfWay() != RIGHT_OF_WAY_DEFAULT) { into.writeAttr(SUMO_ATTR_RIGHT_OF_WAY, toString(n.getRightOfWay())); } + if (n.getFringeType() != FRINGE_TYPE_DEFAULT) { + into.writeAttr(SUMO_ATTR_FRINGE, toString(n.getFringeType())); + } if (n.getType() != NODETYPE_DEAD_END) { // write right-of-way logics n.writeLogic(into); @@ -875,6 +904,12 @@ into.writeAttr(SUMO_ATTR_MAXDURATION, writeSUMOTime(j->maxDur)); } } + if (j->name != "") { + into.writeAttr(SUMO_ATTR_NAME, j->name); + } + if (j->next.size() > 0) { + into.writeAttr(SUMO_ATTR_NEXT, j->next); + } into.closeTag(); } // write params diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_SUMO.h sumo-1.2.0+dfsg1/src/netwrite/NWWriter_SUMO.h --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_SUMO.h 2018-10-01 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_SUMO.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -134,7 +134,8 @@ */ static void writeLane(OutputDevice& into, const std::string& lID, double speed, SVCPermissions permissions, SVCPermissions preferred, - double endOffset, std::map stopOffsets, double width, PositionVector shape, + double startOffset, double endOffset, + std::map stopOffsets, double width, PositionVector shape, const Parameterised* params, double length, int index, const std::string& oppositeID, bool accelRamp = false, bool customShape = false); diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_XML.cpp sumo-1.2.0+dfsg1/src/netwrite/NWWriter_XML.cpp --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_XML.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_XML.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -150,6 +150,9 @@ if (n->getRightOfWay() != RIGHT_OF_WAY_DEFAULT) { device.writeAttr(SUMO_ATTR_RIGHT_OF_WAY, toString(n->getRightOfWay())); } + if (n->getFringeType() != FRINGE_TYPE_DEFAULT) { + device.writeAttr(SUMO_ATTR_FRINGE, toString(n->getFringeType())); + } n->writeParams(device); device.closeTag(); } @@ -421,8 +424,8 @@ void NWWriter_XML::writePTLines(const OptionsCont& oc, NBPTLineCont& lc, NBEdgeCont& ec) { OutputDevice& device = OutputDevice::getDevice(oc.getString("ptline-output")); device.writeXMLHeader("additional", "additional_file.xsd"); - for (std::vector::const_iterator i = lc.begin(); i != lc.end(); ++i) { - (*i)->write(device, ec); + for (const auto& item : lc.getLines()) { + item.second->write(device, ec); } device.close(); } diff -Nru sumo-1.1.0+dfsg1/src/netwrite/NWWriter_XML.h sumo-1.2.0+dfsg1/src/netwrite/NWWriter_XML.h --- sumo-1.1.0+dfsg1/src/netwrite/NWWriter_XML.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/NWWriter_XML.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/netwrite/README_Contributing.md sumo-1.2.0+dfsg1/src/netwrite/README_Contributing.md --- sumo-1.1.0+dfsg1/src/netwrite/README_Contributing.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/netwrite/README_Contributing.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,19 @@ +Please feel free to add and / or modify files here but keep in mind that +EPL requires that "derivative works" be licensed under the terms of the EPL +whereas "separate modules of software" may be licensed arbitrarily. +Modifications to the files and directories listed here are considered derivative work: + +- NWFrame.cpp +- NWFrame.h +- NWWriter_Amitran.cpp +- NWWriter_Amitran.h +- NWWriter_DlrNavteq.cpp +- NWWriter_DlrNavteq.h +- NWWriter_MATSim.cpp +- NWWriter_MATSim.h +- NWWriter_OpenDrive.cpp +- NWWriter_OpenDrive.h +- NWWriter_SUMO.cpp +- NWWriter_SUMO.h +- NWWriter_XML.cpp +- NWWriter_XML.h diff -Nru sumo-1.1.0+dfsg1/src/od/Makefile.in sumo-1.2.0+dfsg1/src/od/Makefile.in --- sumo-1.1.0+dfsg1/src/od/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,640 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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) --foreign src/od/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/od/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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/od/ODAmitranHandler.cpp sumo-1.2.0+dfsg1/src/od/ODAmitranHandler.cpp --- sumo-1.1.0+dfsg1/src/od/ODAmitranHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODAmitranHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODAmitranHandler.h sumo-1.2.0+dfsg1/src/od/ODAmitranHandler.h --- sumo-1.1.0+dfsg1/src/od/ODAmitranHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODAmitranHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODCell.h sumo-1.2.0+dfsg1/src/od/ODCell.h --- sumo-1.1.0+dfsg1/src/od/ODCell.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODCell.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -72,6 +72,12 @@ /// @brief mapping of departure times to departing vehicles, if already fixed std::map > departures; + + /// @brief the origin "district" is an edge id + bool originIsEdge = false; + + /// @brief the destination "district" is an edge id + bool destinationIsEdge = false; }; diff -Nru sumo-1.1.0+dfsg1/src/od/ODDistrictCont.cpp sumo-1.2.0+dfsg1/src/od/ODDistrictCont.cpp --- sumo-1.1.0+dfsg1/src/od/ODDistrictCont.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODDistrictCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODDistrictCont.h sumo-1.2.0+dfsg1/src/od/ODDistrictCont.h --- sumo-1.1.0+dfsg1/src/od/ODDistrictCont.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODDistrictCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODDistrict.cpp sumo-1.2.0+dfsg1/src/od/ODDistrict.cpp --- sumo-1.1.0+dfsg1/src/od/ODDistrict.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODDistrict.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODDistrict.h sumo-1.2.0+dfsg1/src/od/ODDistrict.h --- sumo-1.1.0+dfsg1/src/od/ODDistrict.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODDistrict.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODDistrictHandler.cpp sumo-1.2.0+dfsg1/src/od/ODDistrictHandler.cpp --- sumo-1.1.0+dfsg1/src/od/ODDistrictHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODDistrictHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODDistrictHandler.h sumo-1.2.0+dfsg1/src/od/ODDistrictHandler.h --- sumo-1.1.0+dfsg1/src/od/ODDistrictHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODDistrictHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/od/ODMatrix.cpp sumo-1.2.0+dfsg1/src/od/ODMatrix.cpp --- sumo-1.1.0+dfsg1/src/od/ODMatrix.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODMatrix.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -63,29 +63,30 @@ bool ODMatrix::add(double vehicleNumber, SUMOTime begin, SUMOTime end, const std::string& origin, const std::string& destination, - const std::string& vehicleType) { + const std::string& vehicleType, const bool originIsEdge, const bool destinationIsEdge) { myNumLoaded += vehicleNumber; - if (myDistricts.get(origin) == 0 && myDistricts.get(destination) == 0) { + if (!originIsEdge && !destinationIsEdge && myDistricts.get(origin) == nullptr && myDistricts.get(destination) == nullptr) { WRITE_WARNING("Missing origin '" + origin + "' and destination '" + destination + "' (" + toString(vehicleNumber) + " vehicles)."); + myNumDiscarded += vehicleNumber; myMissingDistricts.insert(origin); myMissingDistricts.insert(destination); return false; - } else if (myDistricts.get(origin) == 0 && vehicleNumber > 0) { + } else if (!originIsEdge && myDistricts.get(origin) == 0 && vehicleNumber > 0) { WRITE_ERROR("Missing origin '" + origin + "' (" + toString(vehicleNumber) + " vehicles)."); myNumDiscarded += vehicleNumber; myMissingDistricts.insert(origin); return false; - } else if (myDistricts.get(destination) == 0 && vehicleNumber > 0) { + } else if (!destinationIsEdge && myDistricts.get(destination) == 0 && vehicleNumber > 0) { WRITE_ERROR("Missing destination '" + destination + "' (" + toString(vehicleNumber) + " vehicles)."); myNumDiscarded += vehicleNumber; myMissingDistricts.insert(destination); return false; } - if (myDistricts.get(origin)->sourceNumber() == 0) { + if (!originIsEdge && myDistricts.get(origin)->sourceNumber() == 0) { WRITE_ERROR("District '" + origin + "' has no source."); myNumDiscarded += vehicleNumber; return false; - } else if (myDistricts.get(destination)->sinkNumber() == 0) { + } else if (!destinationIsEdge && myDistricts.get(destination)->sinkNumber() == 0) { WRITE_ERROR("District '" + destination + "' has no sink."); myNumDiscarded += vehicleNumber; return false; @@ -97,6 +98,8 @@ cell->destination = destination; cell->vehicleType = vehicleType; cell->vehicleNumber = vehicleNumber; + cell->originIsEdge = originIsEdge; + cell->destinationIsEdge = destinationIsEdge; myContainer.push_back(cell); return true; } @@ -104,15 +107,15 @@ bool ODMatrix::add(const std::string& id, const SUMOTime depart, - const std::pair& od, - const std::string& vehicleType) { - if (myMissingDistricts.count(od.first) > 0 || myMissingDistricts.count(od.second) > 0) { + const std::string& fromTaz, const std::string& toTaz, + const std::string& vehicleType, const bool originIsEdge, const bool destinationIsEdge) { + if (myMissingDistricts.count(fromTaz) > 0 || myMissingDistricts.count(toTaz) > 0) { myNumLoaded += 1.; myNumDiscarded += 1.; return false; } // we start looking from the end because there is a high probability that the input is sorted by time - std::vector& odList = myShortCut[od]; + std::vector& odList = myShortCut[std::make_pair(fromTaz, toTaz)]; ODCell* cell = nullptr; for (std::vector::const_reverse_iterator c = odList.rbegin(); c != odList.rend(); ++c) { if ((*c)->begin <= depart && (*c)->end > depart && (*c)->vehicleType == vehicleType) { @@ -123,7 +126,7 @@ if (cell == nullptr) { const SUMOTime interval = string2time(OptionsCont::getOptions().getString("aggregation-interval")); const int intervalIdx = (int)(depart / interval); - if (add(1., intervalIdx * interval, (intervalIdx + 1) * interval, od.first, od.second, vehicleType)) { + if (add(1., intervalIdx * interval, (intervalIdx + 1) * interval, fromTaz, toTaz, vehicleType, originIsEdge, destinationIsEdge)) { cell = myContainer.back(); odList.push_back(cell); } else { @@ -376,6 +379,7 @@ } } + double ODMatrix::readFactor(LineReader& lr, double scale) { std::string line = getNextNonCommentLine(lr); diff -Nru sumo-1.1.0+dfsg1/src/od/ODMatrix.h sumo-1.2.0+dfsg1/src/od/ODMatrix.h --- sumo-1.1.0+dfsg1/src/od/ODMatrix.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od/ODMatrix.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -103,7 +103,8 @@ */ bool add(double vehicleNumber, SUMOTime begin, SUMOTime end, const std::string& origin, const std::string& destination, - const std::string& vehicleType); + const std::string& vehicleType, + const bool originIsEdge = false, const bool destinationIsEdge = false); /** @brief Adds a single vehicle with departure time * @@ -117,8 +118,9 @@ * @return whether the vehicle could be added */ bool add(const std::string& id, const SUMOTime depart, - const std::pair& od, - const std::string& vehicleType); + const std::string& fromTaz, const std::string& toTaz, + const std::string& vehicleType, + const bool originIsEdge = false, const bool destinationIsEdge = false); /** @brief Helper function for flow and trip output writing the depart * and arrival attributes @@ -434,4 +436,3 @@ #endif /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/od2trips_main.cpp sumo-1.2.0+dfsg1/src/od2trips_main.cpp --- sumo-1.1.0+dfsg1/src/od2trips_main.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/od2trips_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -222,6 +222,7 @@ WRITE_ERROR(error); ok = false; } + ok &= SystemFrame::checkOptions(); return ok; } diff -Nru sumo-1.1.0+dfsg1/src/osgview/CMakeLists.txt sumo-1.2.0+dfsg1/src/osgview/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/osgview/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -1,8 +1,4 @@ - -########### next target ############### - SET(osgview_STAT_SRCS - GUIOSGBoundingBoxCalculator.h GUIOSGBuilder.cpp GUIOSGBuilder.h GUIOSGView.cpp @@ -11,17 +7,3 @@ add_library(osgview STATIC ${osgview_STAT_SRCS}) set_property(TARGET osgview PROPERTY PROJECT_LABEL "z_osgview") - - -########### install files ############### - - - - -#original Makefile.am contents follow: - -#noinst_LIBRARIES = libosgview.a -# -#libosgview_a_SOURCES = GUIOSGBoundingBoxCalculator.h \ -#GUIOSGBuilder.cpp GUIOSGBuilder.h \ -#GUIOSGView.cpp GUIOSGView.h diff -Nru sumo-1.1.0+dfsg1/src/osgview/GUIOSGBoundingBoxCalculator.h sumo-1.2.0+dfsg1/src/osgview/GUIOSGBoundingBoxCalculator.h --- sumo-1.1.0+dfsg1/src/osgview/GUIOSGBoundingBoxCalculator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/GUIOSGBoundingBoxCalculator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GUIOSGBoundingBoxCalculator.h -/// @author Gordon Thomlinson -/// @author Michael Behrisch -/// @date 19.01.2012 -/// @version $Id$ -/// -// Calculates the bounding box of an osg node -// original source: http://www.vis-sim.com/osg/code/osgcode_bbox1.htm -/****************************************************************************/ -#ifndef GUIOSGBoundingBoxCalculator_h -#define GUIOSGBoundingBoxCalculator_h - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#ifdef HAVE_OSG - -#include -#include -#include -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GUIOSGBoundingBoxCalculator - * usage example: - * GUIOSGBoundingBoxCalculator bboxCalc; - * node->accept(bboxCalc); - * osg::BoundingBox boxExtents = bboxCalc.getBoundingBox(); - * @brief Builds an OSG view - */ -class GUIOSGBoundingBoxCalculator : public osg::NodeVisitor { -public: - GUIOSGBoundingBoxCalculator() : NodeVisitor(NodeVisitor::TRAVERSE_ALL_CHILDREN) { - myTransformMatrix.makeIdentity(); - } - - virtual ~GUIOSGBoundingBoxCalculator() {} - - void apply(osg::Geode& geode) { - osg::BoundingBox bbox; - for (int i = 0; i < (int)geode.getNumDrawables(); ++i) { -#if OSG_MIN_VERSION_REQUIRED(3,4,0) - bbox.expandBy(geode.getDrawable(i)->getBoundingBox()); -#else - bbox.expandBy(geode.getDrawable(i)->getBound()); -#endif - } - osg::BoundingBox bboxTrans; - for (int i = 0; i < 8; ++i) { - osg::Vec3 xvec = bbox.corner(i) * myTransformMatrix; - bboxTrans.expandBy(xvec); - } - myBoundingBox.expandBy(bboxTrans); - traverse(geode); - } - - void apply(osg::MatrixTransform& node) { - myTransformMatrix *= node.getMatrix(); - traverse(node); - } - - void apply(osg::Billboard& node) { - traverse(node); - } - - osg::BoundingBox& getBoundingBox() { - return myBoundingBox; - } - - -protected: - osg::BoundingBox myBoundingBox; // the overall resultant bounding box - osg::Matrix myTransformMatrix; // the current transform matrix - - -}; - -#endif - -#endif diff -Nru sumo-1.1.0+dfsg1/src/osgview/GUIOSGBuilder.cpp sumo-1.2.0+dfsg1/src/osgview/GUIOSGBuilder.cpp --- sumo-1.1.0+dfsg1/src/osgview/GUIOSGBuilder.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/GUIOSGBuilder.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -46,6 +46,7 @@ #include #include #include +#include #ifdef _MSC_VER #pragma warning(pop) #endif @@ -65,11 +66,12 @@ #include #include #include -#include "GUIOSGBoundingBoxCalculator.h" #include "GUIOSGView.h" #include "GUIOSGBuilder.h" +//#define DEBUG_TESSEL + // =========================================================================== // static member variables // =========================================================================== @@ -213,6 +215,14 @@ if (shape.size() > 2) { tessellator.retessellatePolygons(*geom); +#ifdef DEBUG_TESSEL + std::cout << "l=" << l->getID() << " origPoints=" << shape.size() << " geomSize=" << geom->getVertexArray()->getNumElements() << " points="; + for (int i = 0; i < (int)geom->getVertexArray()->getNumElements(); i++) { + const osg::Vec3& p = (*((osg::Vec3Array*)geom->getVertexArray()))[i]; + std::cout << p.x() << "," << p.y() << "," << p.z() << " "; + } + std::cout << "\n"; +#endif } static_cast(l)->setGeometry(geom); } @@ -265,7 +275,7 @@ void GUIOSGBuilder::buildDecal(const GUISUMOAbstractView::Decal& d, osg::Group& addTo) { osg::Node* pLoadedModel = osgDB::readNodeFile(d.filename); - if (pLoadedModel == 0) { + if (pLoadedModel == nullptr) { WRITE_ERROR("Could not load '" + d.filename + "'."); return; } @@ -274,7 +284,7 @@ pLoadedModel->getOrCreateStateSet()->setAttribute(sm); osg::PositionAttitudeTransform* base = new osg::PositionAttitudeTransform(); base->addChild(pLoadedModel); - GUIOSGBoundingBoxCalculator bboxCalc; + osg::ComputeBoundsVisitor bboxCalc; pLoadedModel->accept(bboxCalc); const osg::BoundingBox& bbox = bboxCalc.getBoundingBox(); WRITE_MESSAGE("Loaded decal '" + d.filename + "' with bounding box " + toString(Position(bbox.xMin(), bbox.yMin(), bbox.zMin())) + " " + toString(Position(bbox.xMax(), bbox.yMax(), bbox.zMax())) + "."); @@ -296,10 +306,10 @@ osg::PositionAttitudeTransform* GUIOSGBuilder::getTrafficLight(const GUISUMOAbstractView::Decal& d, osg::Node* tl, const osg::Vec4& color, const double size) { osg::PositionAttitudeTransform* ret = new osg::PositionAttitudeTransform(); - if (tl != 0) { + if (tl != nullptr) { osg::PositionAttitudeTransform* base = new osg::PositionAttitudeTransform(); base->addChild(tl); - GUIOSGBoundingBoxCalculator bboxCalc; + osg::ComputeBoundsVisitor bboxCalc; tl->accept(bboxCalc); const osg::BoundingBox& bbox = bboxCalc.getBoundingBox(); double xScale = d.width > 0 ? d.width / (bbox.xMax() - bbox.xMin()) : 1.; @@ -354,8 +364,8 @@ } } osg::Node* carNode = myCars[osgFile]; - if (carNode != 0) { - GUIOSGBoundingBoxCalculator bboxCalc; + if (carNode != nullptr) { + osg::ComputeBoundsVisitor bboxCalc; carNode->accept(bboxCalc); const osg::BoundingBox& bbox = bboxCalc.getBoundingBox(); osg::PositionAttitudeTransform* base = new osg::PositionAttitudeTransform(); diff -Nru sumo-1.1.0+dfsg1/src/osgview/GUIOSGBuilder.h sumo-1.2.0+dfsg1/src/osgview/GUIOSGBuilder.h --- sumo-1.1.0+dfsg1/src/osgview/GUIOSGBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/GUIOSGBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/osgview/GUIOSGView.cpp sumo-1.2.0+dfsg1/src/osgview/GUIOSGView.cpp --- sumo-1.1.0+dfsg1/src/osgview/GUIOSGView.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/GUIOSGView.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -205,12 +205,12 @@ { const std::vector& names = gSchemeStorage.getNames(); for (std::vector::const_iterator i = names.begin(); i != names.end(); ++i) { - v.getColoringSchemesCombo().appendItem((*i).c_str()); + v.getColoringSchemesCombo()->appendItem(i->c_str()); if ((*i) == myVisualizationSettings->name) { - v.getColoringSchemesCombo().setCurrentItem(v.getColoringSchemesCombo().getNumItems() - 1); + v.getColoringSchemesCombo()->setCurrentItem(v.getColoringSchemesCombo()->getNumItems() - 1); } } - v.getColoringSchemesCombo().setNumVisible(5); + v.getColoringSchemesCombo()->setNumVisible(5); } // for junctions new FXButton(v.getLocatorPopup(), @@ -342,7 +342,7 @@ } for (; it != MSNet::getInstance()->getVehicleControl().loadedVehEnd(); it++) { GUIVehicle* veh = static_cast(it->second); - if (!veh->isOnRoad()) { + if (!(veh->isOnRoad() || veh->isParking() || veh->wasRemoteControlled())) { continue; } auto itVeh = myVehicles.find(veh); @@ -376,9 +376,11 @@ myVehicles[veh].lights->setValue(2, veh->signalSet(MSVehicle::VEH_SIGNAL_BRAKELIGHT)); } // remove inactive - for (auto& item : myVehicles) { - if (!item.second.active) { - removeVeh(item.first); + for (auto it = myVehicles.begin(); it != myVehicles.end();) { + if (!it->second.active) { + removeVeh((it++)->first); + } else { + ++it; } } @@ -407,7 +409,7 @@ for (std::map::const_iterator it = MSNet::getInstance()->getPersonControl().loadedBegin(); it != MSNet::getInstance()->getPersonControl().loadedEnd(); ++it) { MSTransportable* person = (*it).second; // XXX if not departed: continue - if (person->hasArrived()) { + if (person->hasArrived() || !person->hasDeparted()) { //std::cout << SIMTIME << " person " << person->getID() << " is loaded but arrived\n"; continue; } @@ -425,11 +427,15 @@ n->setAttitude(osg::Quat(dir, osg::Vec3d(0, 0, 1))); } // remove inactive - for (auto& item : myPersons) { - if (!item.second.active) { - removeTransportable(item.first); + for (auto it = myPersons.begin(); it != myPersons.end();) { + if (!it->second.active) { + removeTransportable((it++)->first); + } else { + ++it; } } + + if (myAdapter->makeCurrent()) { myViewer->frame(); makeNonCurrent(); diff -Nru sumo-1.1.0+dfsg1/src/osgview/GUIOSGView.h sumo-1.2.0+dfsg1/src/osgview/GUIOSGView.h --- sumo-1.1.0+dfsg1/src/osgview/GUIOSGView.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/GUIOSGView.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/osgview/Makefile.am sumo-1.2.0+dfsg1/src/osgview/Makefile.am --- sumo-1.1.0+dfsg1/src/osgview/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,4 @@ noinst_LIBRARIES = libosgview.a -libosgview_a_SOURCES = GUIOSGBoundingBoxCalculator.h \ -GUIOSGBuilder.cpp GUIOSGBuilder.h \ +libosgview_a_SOURCES = GUIOSGBuilder.cpp GUIOSGBuilder.h \ GUIOSGView.cpp GUIOSGView.h diff -Nru sumo-1.1.0+dfsg1/src/osgview/Makefile.in sumo-1.2.0+dfsg1/src/osgview/Makefile.in --- sumo-1.1.0+dfsg1/src/osgview/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/osgview/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,633 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/osgview -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libosgview_a_AR = $(AR) $(ARFLAGS) -libosgview_a_LIBADD = -am_libosgview_a_OBJECTS = GUIOSGBuilder.$(OBJEXT) GUIOSGView.$(OBJEXT) -libosgview_a_OBJECTS = $(am_libosgview_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 = $(libosgview_a_SOURCES) -DIST_SOURCES = $(libosgview_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libosgview.a -libosgview_a_SOURCES = GUIOSGBoundingBoxCalculator.h \ -GUIOSGBuilder.cpp GUIOSGBuilder.h \ -GUIOSGView.cpp GUIOSGView.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) --foreign src/osgview/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/osgview/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) - -libosgview.a: $(libosgview_a_OBJECTS) $(libosgview_a_DEPENDENCIES) $(EXTRA_libosgview_a_DEPENDENCIES) - $(AM_V_at)-rm -f libosgview.a - $(AM_V_AR)$(libosgview_a_AR) libosgview.a $(libosgview_a_OBJECTS) $(libosgview_a_LIBADD) - $(AM_V_at)$(RANLIB) libosgview.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIOSGBuilder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIOSGView.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/polyconvert/Makefile.in sumo-1.2.0+dfsg1/src/polyconvert/Makefile.in --- sumo-1.1.0+dfsg1/src/polyconvert/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,726 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = polyconvert$(EXEEXT) -subdir = src/polyconvert -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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_polyconvert_OBJECTS = polyconvert_main.$(OBJEXT) \ - PCLoaderArcView.$(OBJEXT) PCLoaderDlrNavteq.$(OBJEXT) \ - PCLoaderVisum.$(OBJEXT) PCLoaderOSM.$(OBJEXT) \ - PCLoaderXML.$(OBJEXT) PCNetProjectionLoader.$(OBJEXT) \ - PCPolyContainer.$(OBJEXT) PCTypeDefHandler.$(OBJEXT) \ - PCTypeMap.$(OBJEXT) -polyconvert_OBJECTS = $(am_polyconvert_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 \ - $(am__DEPENDENCIES_1) -polyconvert_DEPENDENCIES = ../utils/options/liboptions.a \ - ../utils/geom/libgeom.a ../utils/shapes/libshapes.a \ - $(am__DEPENDENCIES_2) $(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) $(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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -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 \ -$(XERCES_LIBS) - -polyconvert_SOURCES = polyconvert_main.cpp PCLoaderArcView.cpp PCLoaderArcView.h \ -PCLoaderDlrNavteq.cpp PCLoaderDlrNavteq.h \ -PCLoaderVisum.cpp PCLoaderVisum.h \ -PCLoaderOSM.cpp PCLoaderOSM.h \ -PCLoaderXML.cpp PCLoaderXML.h \ -PCNetProjectionLoader.cpp PCNetProjectionLoader.h \ -PCPolyContainer.cpp PCPolyContainer.h \ -PCTypeDefHandler.cpp PCTypeDefHandler.h \ -PCTypeMap.cpp PCTypeMap.h - -polyconvert_LDADD = ../utils/options/liboptions.a \ -../utils/geom/libgeom.a \ -../utils/shapes/libshapes.a \ -$(COMMON_LIBS) \ -$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) - -BUILT_SOURCES = pc_typemap.h -EXTRA_DIST = pc_typemap.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) 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) --foreign src/polyconvert/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/polyconvert/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 - -polyconvert$(EXEEXT): $(polyconvert_OBJECTS) $(polyconvert_DEPENDENCIES) $(EXTRA_polyconvert_DEPENDENCIES) - @rm -f polyconvert$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(polyconvert_OBJECTS) $(polyconvert_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCLoaderArcView.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCLoaderDlrNavteq.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCLoaderOSM.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCLoaderVisum.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCLoaderXML.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCNetProjectionLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCPolyContainer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCTypeDefHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PCTypeMap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyconvert_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: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) 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." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -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: all check install 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 - -.PRECIOUS: Makefile - -pc_typemap.h: - ../../tools/build/typemap.py poly - -# 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-1.1.0+dfsg1/src/polyconvert/PCLoaderArcView.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderArcView.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderArcView.cpp 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderArcView.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderArcView.h sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderArcView.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderArcView.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderArcView.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.h sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderDlrNavteq.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderOSM.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderOSM.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderOSM.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderOSM.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -107,7 +107,7 @@ PROGRESS_BEGIN_MESSAGE("Parsing nodes from osm-file '" + *file + "'"); if (!XMLSubSys::runParser(nodesHandler, *file)) { for (std::map::const_iterator i = nodes.begin(); i != nodes.end(); ++i) { - delete(*i).second; + delete (*i).second; } throw ProcessError(); } @@ -325,15 +325,15 @@ } // delete nodes for (std::map::const_iterator i = nodes.begin(); i != nodes.end(); ++i) { - delete(*i).second; + delete (*i).second; } // delete edges for (EdgeMap::iterator i = edges.begin(); i != edges.end(); ++i) { - delete(*i).second; + delete (*i).second; } // delete relations for (Relations::iterator i = relations.begin(); i != relations.end(); ++i) { - delete(*i); + delete (*i); } } diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderOSM.h sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderOSM.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderOSM.h 2018-06-28 22:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderOSM.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderVisum.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderVisum.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderVisum.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderVisum.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderVisum.h sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderVisum.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderVisum.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderVisum.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderXML.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderXML.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderXML.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderXML.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderXML.h sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderXML.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCLoaderXML.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCLoaderXML.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCNetProjectionLoader.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCNetProjectionLoader.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCNetProjectionLoader.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCNetProjectionLoader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCNetProjectionLoader.h sumo-1.2.0+dfsg1/src/polyconvert/PCNetProjectionLoader.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCNetProjectionLoader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCNetProjectionLoader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCPolyContainer.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCPolyContainer.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCPolyContainer.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCPolyContainer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCPolyContainer.h sumo-1.2.0+dfsg1/src/polyconvert/PCPolyContainer.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCPolyContainer.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCPolyContainer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCTypeDefHandler.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCTypeDefHandler.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCTypeDefHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCTypeDefHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCTypeDefHandler.h sumo-1.2.0+dfsg1/src/polyconvert/PCTypeDefHandler.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCTypeDefHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCTypeDefHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCTypeMap.cpp sumo-1.2.0+dfsg1/src/polyconvert/PCTypeMap.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/PCTypeMap.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCTypeMap.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/pc_typemap.h sumo-1.2.0+dfsg1/src/polyconvert/pc_typemap.h --- sumo-1.1.0+dfsg1/src/polyconvert/pc_typemap.h 2018-07-10 22:02:44.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/pc_typemap.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -const std::string navteqTypemap = -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"" -; -const std::string osmTypemap = -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" \n" -" \n" -"\n" -"\n" -"\n" -; -const std::string visumTypemap = -"\n" -" \n" -" \n" -"\n" -" \n" -" \n" -"\n" -"" -; diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/PCTypeMap.h sumo-1.2.0+dfsg1/src/polyconvert/PCTypeMap.h --- sumo-1.1.0+dfsg1/src/polyconvert/PCTypeMap.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/PCTypeMap.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/polyconvert/polyconvert_main.cpp sumo-1.2.0+dfsg1/src/polyconvert/polyconvert_main.cpp --- sumo-1.1.0+dfsg1/src/polyconvert/polyconvert_main.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/polyconvert/polyconvert_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -239,7 +239,7 @@ } if (!oc.isSet("net")) { // from the given options -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE unsigned numProjections = oc.getBool("simple-projection") + oc.getBool("proj.utm") + oc.getBool("proj.dhdn") + (oc.getString("proj").length() > 1); if ((oc.isSet("osm-files") || oc.isSet("dlr-navteq-poly-files") || oc.isSet("dlr-navteq-poi-files")) && numProjections == 0) { oc.set("proj.utm", "true"); diff -Nru sumo-1.1.0+dfsg1/src/README_Contributing.md sumo-1.2.0+dfsg1/src/README_Contributing.md --- sumo-1.1.0+dfsg1/src/README_Contributing.md 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/README_Contributing.md 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,43 @@ +Please feel free to add and / or modify files here but keep in mind that +EPL requires that "derivative works" be licensed under the terms of the EPL +whereas "separate modules of software" may be licensed arbitrarily. +Modifications to the files and directories listed here are considered derivative work: + +- activitygen +- dfrouter +- duarouter +- foreign +- gui +- guinetload +- guisim +- jtrrouter +- marouter +- mesogui +- mesosim +- microsim +- netbuild +- netedit +- netgen +- netimport +- netload +- netwrite +- od +- osgview +- polyconvert +- router +- tools +- traci-server +- traci_testclient +- utils +- guisim_main.cpp +- netconvert_main.cpp +- od2trips_main.cpp +- sumo_main.cpp + +Exceptions with separate lists are: +- car following models that inherit from MSCFModel (excluding [modifications of the existing models](microsim/cfmodels/README_Contributing.md)) +- lane changing models that inherit from MSAbstractLaneChangeModel (excluding [modifications of the existing models](microsim/lcmodels/README_Contributing.md)) +- simulation output modules (excluding [changes to the existing classes](microsim/output/README_Contributing.md)) +- vehicle device modules (excluding [changes to the existing classes](microsim/devices/README_Contributing.md)) +- network import modules (excluding [changes to the existing classes](netimport/README_Contributing.md)) +- network export modules (excluding [changes to the existing classes](netwrite/README_Contributing.md)) diff -Nru sumo-1.1.0+dfsg1/src/router/Makefile.in sumo-1.2.0+dfsg1/src/router/Makefile.in --- sumo-1.1.0+dfsg1/src/router/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,654 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/router -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = ROEdge.$(OBJEXT) ROFrame.$(OBJEXT) \ - ROHelper.$(OBJEXT) ROLoader.$(OBJEXT) RONet.$(OBJEXT) \ - RONetHandler.$(OBJEXT) RONode.$(OBJEXT) ROPerson.$(OBJEXT) \ - RORoute.$(OBJEXT) RORouteDef.$(OBJEXT) \ - RORouteHandler.$(OBJEXT) ROVehicle.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = librouter.a -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 \ -ROPerson.cpp ROPerson.h RORoutable.h \ -RORoute.cpp RORoute.h RORouteDef.cpp RORouteDef.h \ -RORouteHandler.cpp RORouteHandler.h \ -ROVehicle.cpp ROVehicle.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) --foreign src/router/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/router/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RONet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RONetHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RONode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROPerson.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RORoute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RORouteDef.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RORouteHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROVehicle.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/router/ROAbstractEdgeBuilder.h sumo-1.2.0+dfsg1/src/router/ROAbstractEdgeBuilder.h --- sumo-1.1.0+dfsg1/src/router/ROAbstractEdgeBuilder.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROAbstractEdgeBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/router/ROEdge.cpp sumo-1.2.0+dfsg1/src/router/ROEdge.cpp --- sumo-1.1.0+dfsg1/src/router/ROEdge.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROEdge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -64,7 +64,8 @@ myAmSource(false), myUsingTTTimeLine(false), myUsingETimeLine(false), - myCombinedPermissions(0) { + myCombinedPermissions(0), + myTimePenalty(0) { while ((int)myEdges.size() <= index) { myEdges.push_back(0); } @@ -73,6 +74,7 @@ // TAZ edge, no lanes myCombinedPermissions = SVCAll; } else { + // TODO we should not calculate the boundary here, the position for the nodes is not valid yet myBoundary.add(from->getPosition()); myBoundary.add(to->getPosition()); } @@ -81,7 +83,7 @@ ROEdge::~ROEdge() { for (std::vector::iterator i = myLanes.begin(); i != myLanes.end(); ++i) { - delete(*i); + delete (*i); } } @@ -101,15 +103,21 @@ void ROEdge::addSuccessor(ROEdge* s, ROEdge* via, std::string) { + if (isInternal()) { + // for internal edges after an internal junction, + // this is called twice and only the second call counts + myFollowingEdges.clear(); + myFollowingViaEdges.clear(); + } if (find(myFollowingEdges.begin(), myFollowingEdges.end(), s) == myFollowingEdges.end()) { myFollowingEdges.push_back(s); myFollowingViaEdges.push_back(std::make_pair(s, via)); - if (isTazConnector()) { + if (isTazConnector()) {//s->getFromJunction() != nullptr) { myBoundary.add(s->getFromJunction()->getPosition()); } if (!isInternal()) { s->myApproachingEdges.push_back(this); - if (s->isTazConnector()) { + if (s->isTazConnector()) {//getToJunction() != nullptr) { s->myBoundary.add(getToJunction()->getPosition()); } if (via != nullptr) { @@ -140,7 +148,7 @@ ROEdge::getEffort(const ROVehicle* const veh, double time) const { double ret = 0; if (!getStoredEffort(time, ret)) { - return myLength / MIN2(veh->getType()->maxSpeed, mySpeed); + return myLength / MIN2(veh->getType()->maxSpeed, mySpeed) + myTimePenalty; } return ret; } @@ -148,6 +156,7 @@ double ROEdge::getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate) const { + assert(this != other); if (doBoundaryEstimate) { return myBoundary.distanceTo2D(other->myBoundary); } @@ -160,7 +169,8 @@ if (other->isTazConnector()) { return other->myBoundary.distanceTo2D(getToJunction()->getPosition()); } - return getToJunction()->getPosition().distanceTo2D(other->getFromJunction()->getPosition()); + return getLanes()[0]->getShape()[-1].distanceTo2D(other->getLanes()[0]->getShape()[0]); + //return getToJunction()->getPosition().distanceTo2D(other->getFromJunction()->getPosition()); } @@ -191,7 +201,7 @@ } } const double speed = veh != nullptr ? MIN2(veh->getType()->maxSpeed, veh->getType()->speedFactor.getParameter()[0] * mySpeed) : mySpeed; - return myLength / speed; + return myLength / speed + myTimePenalty; } @@ -300,11 +310,17 @@ myEfforts.fillGaps(value, boundariesOverride); } if (myUsingTTTimeLine) { - myTravelTimes.fillGaps(myLength / mySpeed, boundariesOverride); + myTravelTimes.fillGaps(myLength / mySpeed + myTimePenalty, boundariesOverride); } } +double +ROEdge::getLengthGeometryFactor() const { + return myLanes.empty() ? 1. : myLanes[0]->getShape().length() / myLanes[0]->getLength(); +} + + bool ROEdge::allFollowersProhibit(const ROVehicle* const vehicle) const { for (ROEdgeVector::const_iterator i = myFollowingEdges.begin(); i != myFollowingEdges.end(); ++i) { diff -Nru sumo-1.1.0+dfsg1/src/router/ROEdge.h sumo-1.2.0+dfsg1/src/router/ROEdge.h --- sumo-1.1.0+dfsg1/src/router/ROEdge.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #ifdef HAVE_FOX @@ -139,6 +140,9 @@ myRestrictions = restrictions; } + inline void setTimePenalty(double value) { + myTimePenalty = value; + } /// @brief return whether this edge is an internal edge inline bool isInternal() const { @@ -217,13 +221,7 @@ /// @brief return a lower bound on shape.length() / myLength that is // sufficient for the astar air-distance heuristic - double getLengthGeometryFactor() const { - if (myFromJunction != 0 && myToJunction != 0) { - return MAX2(1.0, myFromJunction->getPosition().distanceTo(myToJunction->getPosition()) / myLength); - } else { - return 1.0; - } - } + double getLengthGeometryFactor() const; /** @brief Returns the lane's maximum speed, given a vehicle's speed limit adaptation * @param[in] The vehicle to return the adapted speed limit for @@ -399,6 +397,10 @@ return edge->getTravelTime(veh, time); } + static inline double getTravelTimeStaticRandomized(const ROEdge* const edge, const ROVehicle* const veh, double time) { + return edge->getTravelTime(veh, time) * RandHelper::rand(1., gWeightsRandomFactor); + } + /** @brief Returns a lower bound for the travel time on this edge without using any stored timeLine * @@ -434,7 +436,7 @@ /// @brief optimistic distance heuristic for use in routing - double getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate=false) const; + double getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate = false) const; /** @brief Returns all ROEdges */ @@ -544,6 +546,9 @@ /// @brief The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start and end node for normal edges Boundary myBoundary; + /// @brief flat penalty when computing traveltime + double myTimePenalty; + static ROEdgeVector myEdges; diff -Nru sumo-1.1.0+dfsg1/src/router/ROFrame.cpp sumo-1.2.0+dfsg1/src/router/ROFrame.cpp --- sumo-1.1.0+dfsg1/src/router/ROFrame.cpp 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -119,6 +119,9 @@ oc.addSynonyme("weights.interpolate", "interpolate", true); oc.addDescription("weights.interpolate", "Processing", "Interpolate edge weights at interval boundaries"); + oc.doRegister("weights.minor-penalty", new Option_Float(1.5)); + oc.addDescription("weights.minor-penalty", "Processing", "Apply the given time penalty when computing routing costs for minor-link internal lanes"); + oc.doRegister("with-taz", new Option_Bool(false)); oc.addDescription("with-taz", "Processing", "Use origin and destination zones (districts) for in- and output"); diff -Nru sumo-1.1.0+dfsg1/src/router/ROFrame.h sumo-1.2.0+dfsg1/src/router/ROFrame.h --- sumo-1.1.0+dfsg1/src/router/ROFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/router/ROHelper.cpp sumo-1.2.0+dfsg1/src/router/ROHelper.cpp --- sumo-1.1.0+dfsg1/src/router/ROHelper.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/router/ROHelper.h sumo-1.2.0+dfsg1/src/router/ROHelper.h --- sumo-1.1.0+dfsg1/src/router/ROHelper.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/router/ROLane.h sumo-1.2.0+dfsg1/src/router/ROLane.h --- sumo-1.1.0+dfsg1/src/router/ROLane.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROLane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -56,8 +57,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, ROEdge* edge, double length, double maxSpeed, SVCPermissions permissions) : - Named(id), myEdge(edge), myLength(length), myMaxSpeed(maxSpeed), myPermissions(permissions) { + ROLane(const std::string& id, ROEdge* edge, double length, double maxSpeed, SVCPermissions permissions, const PositionVector& shape) : + Named(id), myEdge(edge), myLength(length), myMaxSpeed(maxSpeed), myPermissions(permissions), myShape(shape) { } @@ -113,6 +114,10 @@ return (myPermissions & vclass) == vclass; } + const PositionVector& getShape() const { + return myShape; + } + private: /// @brief The parent edge of this lane ROEdge* myEdge; @@ -128,6 +133,9 @@ std::vector > myOutgoingLanes; + /// @brief shape for this lane + const PositionVector myShape; + private: /// @brief Invalidated copy constructor diff -Nru sumo-1.1.0+dfsg1/src/router/ROLoader.cpp sumo-1.2.0+dfsg1/src/router/ROLoader.cpp --- sumo-1.1.0+dfsg1/src/router/ROLoader.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROLoader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -40,11 +40,12 @@ #include #include #include -#include -#include +#include +#include #include "RONet.h" #include "RONetHandler.h" #include "ROLoader.h" +#include "ROLane.h" #include "ROEdge.h" #include "RORouteHandler.h" @@ -119,7 +120,8 @@ throw ProcessError("The network file '" + file + "' is not accessible."); } PROGRESS_BEGIN_MESSAGE("Loading net"); - RONetHandler handler(toFill, eb, !myOptions.exists("no-internal-links") || myOptions.getBool("no-internal-links")); + RONetHandler handler(toFill, eb, !myOptions.exists("no-internal-links") || myOptions.getBool("no-internal-links"), + myOptions.exists("weights.minor-penalty") ? myOptions.getFloat("weights.minor-penalty") : 0); handler.setFileName(file); if (!XMLSubSys::runParser(handler, file, true)) { PROGRESS_FAILED_MESSAGE(); diff -Nru sumo-1.1.0+dfsg1/src/router/ROLoader.h sumo-1.2.0+dfsg1/src/router/ROLoader.h --- sumo-1.1.0+dfsg1/src/router/ROLoader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROLoader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,8 +28,8 @@ #include #include +#include #include -#include #include "RORoutable.h" diff -Nru sumo-1.1.0+dfsg1/src/router/RONet.cpp sumo-1.2.0+dfsg1/src/router/RONet.cpp --- sumo-1.1.0+dfsg1/src/router/RONet.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RONet.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,9 +24,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include @@ -34,6 +34,7 @@ #include #include #include "ROEdge.h" +#include "ROLane.h" #include "RONode.h" #include "ROPerson.h" #include "RORoute.h" @@ -217,7 +218,8 @@ myRoutesOutput->writeHeader(SUMO_TAG_ROUTES); myRoutesOutput->writeAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance").writeAttr("xsi:noNamespaceSchemaLocation", "http://sumo.dlr.de/xsd/routes_file.xsd"); } - if (options.exists("alternatives-output") && options.isSet("alternatives-output")) { + if (options.exists("alternatives-output") && options.isSet("alternatives-output") + && !(options.exists("write-trips") && options.getBool("write-trips"))) { myRouteAlternativesOutput = &OutputDevice::getDevice(options.getString("alternatives-output")); myRouteAlternativesOutput->writeHeader(SUMO_TAG_ROUTES); myRouteAlternativesOutput->writeAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance").writeAttr("xsi:noNamespaceSchemaLocation", "http://sumo.dlr.de/xsd/routes_file.xsd"); diff -Nru sumo-1.1.0+dfsg1/src/router/RONet.h sumo-1.2.0+dfsg1/src/router/RONet.h --- sumo-1.1.0+dfsg1/src/router/RONet.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RONet.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include #include #include "ROLane.h" @@ -47,10 +45,8 @@ // class declarations // =========================================================================== class ROEdge; -class ROLane; class RONode; class ROPerson; -class RORoutable; class ROVehicle; class OptionsCont; class OutputDevice; diff -Nru sumo-1.1.0+dfsg1/src/router/RONetHandler.cpp sumo-1.2.0+dfsg1/src/router/RONetHandler.cpp --- sumo-1.1.0+dfsg1/src/router/RONetHandler.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RONetHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,7 +31,9 @@ #include #include #include -#include +#include +#include +#include #include #include #include "ROEdge.h" @@ -45,10 +47,12 @@ // =========================================================================== // method definitions // =========================================================================== -RONetHandler::RONetHandler(RONet& net, ROAbstractEdgeBuilder& eb, const bool ignoreInternal) - : SUMOSAXHandler("sumo-network"), - myNet(net), myEdgeBuilder(eb), myIgnoreInternal(ignoreInternal), - myCurrentName(), myCurrentEdge(nullptr), myCurrentStoppingPlace(nullptr) {} +RONetHandler::RONetHandler(RONet& net, ROAbstractEdgeBuilder& eb, const bool ignoreInternal, const double minorPenalty) : + SUMOSAXHandler("sumo-network"), + myNet(net), myEdgeBuilder(eb), myIgnoreInternal(ignoreInternal), + myCurrentName(), myCurrentEdge(nullptr), myCurrentStoppingPlace(nullptr), + myMinorPenalty(minorPenalty) +{} RONetHandler::~RONetHandler() {} @@ -58,6 +62,9 @@ RONetHandler::myStartElement(int element, const SUMOSAXAttributes& attrs) { switch (element) { + case SUMO_TAG_LOCATION: + setLocation(attrs); + break; case SUMO_TAG_EDGE: // in the first step, we do need the name to allocate the edge // in the second, we need it to know to which edge we have to add @@ -202,9 +209,14 @@ double length = attrs.get(SUMO_ATTR_LENGTH, id.c_str(), ok); std::string allow = attrs.getOpt(SUMO_ATTR_ALLOW, id.c_str(), ok, ""); std::string disallow = attrs.getOpt(SUMO_ATTR_DISALLOW, id.c_str(), ok, ""); + const PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); if (!ok) { return; } + if (shape.size() < 2) { + WRITE_ERROR("Ignoring lane '" + id + "' with broken shape."); + return; + } // get the length // get the vehicle classes SVCPermissions permissions = parseVehicleClasses(allow, disallow); @@ -213,7 +225,7 @@ } // add when both values are valid if (maxSpeed > 0 && length > 0 && id.length() > 0) { - myCurrentEdge->addLane(new ROLane(id, myCurrentEdge, length, maxSpeed, permissions)); + myCurrentEdge->addLane(new ROLane(id, myCurrentEdge, length, maxSpeed, permissions, shape)); } else { WRITE_WARNING("Ignoring lane '" + id + "' with speed " + toString(maxSpeed) + " and length " + toString(length)); } @@ -279,6 +291,10 @@ from->getLanes()[fromLane]->addOutgoingLane(to->getLanes()[toLane], via); from->addSuccessor(to, via, dir); via->addSuccessor(to, nullptr, dir); + LinkState state = SUMOXMLDefinitions::LinkStates.get(attrs.get(SUMO_ATTR_STATE, nullptr, ok)); + if (state == LINKSTATE_MINOR || state == LINKSTATE_EQUAL || state == LINKSTATE_STOP || state == LINKSTATE_ALLWAY_STOP) { + via->setTimePenalty(myMinorPenalty); + } } } @@ -358,5 +374,17 @@ myNet.addDistrictEdge(myCurrentName, id, isSource); } +void +RONetHandler::setLocation(const SUMOSAXAttributes& attrs) { + bool ok = true; + PositionVector s = attrs.get(SUMO_ATTR_NET_OFFSET, nullptr, ok); + Boundary convBoundary = attrs.get(SUMO_ATTR_CONV_BOUNDARY, nullptr, ok); + Boundary origBoundary = attrs.get(SUMO_ATTR_ORIG_BOUNDARY, nullptr, ok); + std::string proj = attrs.get(SUMO_ATTR_ORIG_PROJ, nullptr, ok); + if (ok) { + Position networkOffset = s[0]; + GeoConvHelper::init(proj, networkOffset, origBoundary, convBoundary); + } +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/router/RONetHandler.h sumo-1.2.0+dfsg1/src/router/RONetHandler.h --- sumo-1.1.0+dfsg1/src/router/RONetHandler.h 2018-07-06 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RONetHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -57,7 +57,7 @@ * @param[in] net The network instance to fill * @param[in] eb The abstract edge builder to use */ - RONetHandler(RONet& net, ROAbstractEdgeBuilder& eb, const bool ignoreInternal); + RONetHandler(RONet& net, ROAbstractEdgeBuilder& eb, const bool ignoreInternal, const double minorPenalty); /// @brief Destructor @@ -175,6 +175,8 @@ //@} + /// Parses network location description + void setLocation(const SUMOSAXAttributes& attrs); protected: /// @brief The net to store the information into @@ -201,6 +203,8 @@ /// @brief temporary data for checking node initialisation after network parsing is finished std::set myUnseenNodeIDs; + /// @brief time penalty for passing a minor link + const double myMinorPenalty; private: /// @brief Invalidated copy constructor diff -Nru sumo-1.1.0+dfsg1/src/router/RONode.cpp sumo-1.2.0+dfsg1/src/router/RONode.cpp --- sumo-1.1.0+dfsg1/src/router/RONode.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RONode.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/router/RONode.h sumo-1.2.0+dfsg1/src/router/RONode.h --- sumo-1.1.0+dfsg1/src/router/RONode.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RONode.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/router/ROPerson.cpp sumo-1.2.0+dfsg1/src/router/ROPerson.cpp --- sumo-1.1.0+dfsg1/src/router/ROPerson.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROPerson.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,6 +24,8 @@ // =========================================================================== #include +#include +#include #include #include #include @@ -31,14 +33,13 @@ #include #include #include -#include -#include #include "RORouteDef.h" -#include "ROPerson.h" #include "RORoute.h" #include "ROVehicle.h" #include "ROHelper.h" #include "RONet.h" +#include "ROLane.h" +#include "ROPerson.h" // =========================================================================== @@ -163,7 +164,7 @@ if (dep != 0.) { os.writeAttr(SUMO_ATTR_DEPARTPOS, dep); } - if (arr != 0.) { + if (arr != 0. && destStop == "") { os.writeAttr(SUMO_ATTR_ARRIVALPOS, arr); } if (destStop != "") { @@ -176,6 +177,14 @@ os.closeTag(comment); } +ROPerson::PlanItem* +ROPerson::PersonTrip::clone() const { + PersonTrip* result = new PersonTrip(from, to, modes, dep, arr, stopDest, walkFactor); + for (auto* item : myTripItems) { + result->myTripItems.push_back(item->clone()); + } + return result; +} void ROPerson::PersonTrip::saveVehicles(OutputDevice& os, OutputDevice* const typeos, bool asAlternatives, OptionsCont& options) const { @@ -185,11 +194,21 @@ } +SUMOTime +ROPerson::PersonTrip::getDuration() const { + SUMOTime result = 0; + for (TripItem* tItem : myTripItems) { + result += tItem->getDuration(); + } + return result; +} + bool -ROPerson::computeIntermodal(const RORouterProvider& provider, PersonTrip* const trip, const ROVehicle* const veh, MsgHandler* const errorHandler) { +ROPerson::computeIntermodal(SUMOTime time, const RORouterProvider& provider, + PersonTrip* const trip, const ROVehicle* const veh, MsgHandler* const errorHandler) { std::vector result; provider.getIntermodalRouter().compute(trip->getOrigin(), trip->getDestination(), trip->getDepartPos(), trip->getArrivalPos(), trip->getStopDest(), - getType()->maxSpeed * trip->getWalkFactor(), veh, trip->getModes(), getParameter().depart, result); + getType()->maxSpeed * trip->getWalkFactor(), veh, trip->getModes(), time, result); bool carUsed = false; for (std::vector::const_iterator it = result.begin(); it != result.end(); ++it) { if (!it->edges.empty()) { @@ -220,15 +239,16 @@ ROPerson::computeRoute(const RORouterProvider& provider, const bool /* removeLoops */, MsgHandler* errorHandler) { myRoutingSuccess = true; + SUMOTime time = getParameter().depart; for (std::vector::iterator it = myPlan.begin(); it != myPlan.end(); ++it) { if ((*it)->needsRouting()) { PersonTrip* trip = static_cast(*it); std::vector& vehicles = trip->getVehicles(); if (vehicles.empty()) { - computeIntermodal(provider, trip, nullptr, errorHandler); + computeIntermodal(time, provider, trip, nullptr, errorHandler); } else { for (std::vector::iterator v = vehicles.begin(); v != vehicles.end();) { - if (!computeIntermodal(provider, trip, *v, errorHandler)) { + if (!computeIntermodal(time, provider, trip, *v, errorHandler)) { v = vehicles.erase(v); } else { ++v; @@ -236,6 +256,7 @@ } } } + time += (*it)->getDuration(); } } diff -Nru sumo-1.1.0+dfsg1/src/router/ROPerson.h sumo-1.2.0+dfsg1/src/router/ROPerson.h --- sumo-1.1.0+dfsg1/src/router/ROPerson.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROPerson.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -82,6 +82,8 @@ /// @brief Destructor virtual ~PlanItem() {} + virtual PlanItem* clone() const = 0; + virtual void addTripItem(TripItem* /* tripIt */) { throw ProcessError(); } @@ -96,6 +98,8 @@ virtual bool needsRouting() const { return false; } + + virtual SUMOTime getDuration() const = 0; }; /** @@ -106,6 +110,11 @@ public: Stop(const SUMOVehicleParameter::Stop& stop, const ROEdge* const stopEdge) : stopDesc(stop), edge(stopEdge) {} + + PlanItem* clone() const { + return new Stop(stopDesc, edge); + } + const ROEdge* getOrigin() const { return edge; } @@ -113,7 +122,7 @@ return edge; } double getDestinationPos() const { - return stopDesc.endPos; + return (stopDesc.startPos + stopDesc.endPos) / 2; } void saveAsXML(OutputDevice& os, const bool /* extended */) const { stopDesc.write(os); @@ -121,6 +130,9 @@ bool isStop() const { return true; } + SUMOTime getDuration() const { + return stopDesc.duration; + } private: SUMOVehicleParameter::Stop stopDesc; @@ -144,10 +156,15 @@ /// @brief Destructor virtual ~TripItem() {} + virtual TripItem* clone() const = 0; + virtual const ROEdge* getOrigin() const = 0; virtual const ROEdge* getDestination() const = 0; virtual double getDestinationPos() const = 0; virtual void saveAsXML(OutputDevice& os, const bool extended) const = 0; + SUMOTime getDuration() const { + return TIME2STEPS(cost); + } protected: double cost; }; @@ -170,6 +187,10 @@ arr(arrivalPos) { } + TripItem* clone() const { + return new Ride(from, to, lines, cost, arr, destStop, intended, depart); + } + const ROEdge* getOrigin() const { return from; } @@ -210,6 +231,11 @@ Walk(const ConstROEdgeVector& edges, const double _cost, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string& _destStop) : TripItem(_cost), edges(edges), dur(duration), v(speed), dep(departPos), arr(arrivalPos), destStop(_destStop) {} + + TripItem* clone() const { + return new Walk(edges, cost, dep, arr, destStop); + } + const ROEdge* getOrigin() const { return edges.front(); } @@ -249,11 +275,13 @@ delete *it; } for (std::vector::const_iterator it = myVehicles.begin(); it != myVehicles.end(); ++it) { - delete(*it)->getRouteDefinition(); + delete (*it)->getRouteDefinition(); delete *it; } } + PlanItem* clone() const; + virtual void addTripItem(TripItem* tripIt) { myTripItems.push_back(tripIt); } @@ -301,6 +329,9 @@ return walkFactor; } + /// @brief return duration sum of all trip items + SUMOTime getDuration() const; + private: const ROEdge* from; const ROEdge* to; @@ -351,7 +382,8 @@ } private: - bool computeIntermodal(const RORouterProvider& provider, PersonTrip* const trip, const ROVehicle* const veh, MsgHandler* const errorHandler); + bool computeIntermodal(SUMOTime time, const RORouterProvider& provider, + PersonTrip* const trip, const ROVehicle* const veh, MsgHandler* const errorHandler); private: /** diff -Nru sumo-1.1.0+dfsg1/src/router/RORoutable.h sumo-1.2.0+dfsg1/src/router/RORoutable.h --- sumo-1.1.0+dfsg1/src/router/RORoutable.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RORoutable.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/router/RORoute.cpp sumo-1.2.0+dfsg1/src/router/RORoute.cpp --- sumo-1.1.0+dfsg1/src/router/RORoute.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RORoute.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/router/RORouteDef.cpp sumo-1.2.0+dfsg1/src/router/RORouteDef.cpp --- sumo-1.1.0+dfsg1/src/router/RORouteDef.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RORouteDef.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,8 +36,8 @@ #include #include "ROEdge.h" #include "RORoute.h" -#include -#include +#include +#include #include "RORouteDef.h" #include "ROVehicle.h" @@ -113,7 +113,9 @@ myAlternatives[0]->getLast()->getID() + "'."); return; } - if (myTryRepair || myUsingJTRR) { + const bool skipTripRouting = (oc.exists("write-trips") && oc.getBool("write-trips") + && RouteCostCalculator::getCalculator().skipRouteCalculation()); + if ((myTryRepair && !skipTripRouting) || myUsingJTRR) { ConstROEdgeVector newEdges; if (repairCurrentRoute(router, begin, veh, myAlternatives[0]->getEdgeVector(), newEdges)) { if (myAlternatives[0]->getEdgeVector() != newEdges) { diff -Nru sumo-1.1.0+dfsg1/src/router/RORouteDef.h sumo-1.2.0+dfsg1/src/router/RORouteDef.h --- sumo-1.1.0+dfsg1/src/router/RORouteDef.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RORouteDef.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "RORoute.h" diff -Nru sumo-1.1.0+dfsg1/src/router/RORoute.h sumo-1.2.0+dfsg1/src/router/RORoute.h --- sumo-1.1.0+dfsg1/src/router/RORoute.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RORoute.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include diff -Nru sumo-1.1.0+dfsg1/src/router/RORouteHandler.cpp sumo-1.2.0+dfsg1/src/router/RORouteHandler.cpp --- sumo-1.1.0+dfsg1/src/router/RORouteHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RORouteHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,11 +31,12 @@ #include #include #include +#include #include #include #include #include -#include +#include #include #include #include @@ -66,7 +67,8 @@ myBegin(string2time(OptionsCont::getOptions().getString("begin"))), myKeepVTypeDist(OptionsCont::getOptions().getBool("keep-vtype-distributions")), myCurrentVTypeDistribution(nullptr), - myCurrentAlternatives(nullptr) { + myCurrentAlternatives(nullptr), + myLaneTree(nullptr) { myActiveRoute.reserve(100); } @@ -85,6 +87,7 @@ useTaz = false; } bool ok = true; + const std::string rid = "for " + element + " '" + myVehicleParameter->id + "'"; if ((useTaz || !attrs.hasAttribute(SUMO_ATTR_FROM)) && myVehicleParameter->wasSet(VEHPARS_FROM_TAZ_SET)) { const ROEdge* fromTaz = myNet.getEdge(myVehicleParameter->fromTaz + "-source"); if (fromTaz == nullptr) { @@ -94,16 +97,24 @@ } else { myActiveRoute.push_back(fromTaz); } + } else if (attrs.hasAttribute(SUMO_ATTR_FROMXY)) { + parseGeoEdges(attrs.get(SUMO_ATTR_FROMXY, myVehicleParameter->id.c_str(), ok, true), false, myActiveRoute, rid); + } else if (attrs.hasAttribute(SUMO_ATTR_FROMLONLAT)) { + parseGeoEdges(attrs.get(SUMO_ATTR_FROMLONLAT, myVehicleParameter->id.c_str(), ok, true), true, myActiveRoute, rid); } else { - parseEdges(attrs.getOpt(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok, "", true), - myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); + parseEdges(attrs.getOpt(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok, "", true), myActiveRoute, rid); } - if (!attrs.hasAttribute(SUMO_ATTR_VIA)) { + if (!attrs.hasAttribute(SUMO_ATTR_VIA) && !attrs.hasAttribute(SUMO_ATTR_VIALONLAT) && !attrs.hasAttribute(SUMO_ATTR_VIAXY)) { myInsertStopEdgesAt = (int)myActiveRoute.size(); } ConstROEdgeVector viaEdges; - parseEdges(attrs.getOpt(SUMO_ATTR_VIA, myVehicleParameter->id.c_str(), ok, "", true), - viaEdges, "for " + element + " '" + myVehicleParameter->id + "'"); + if (attrs.hasAttribute(SUMO_ATTR_VIAXY)) { + parseGeoEdges(attrs.get(SUMO_ATTR_VIAXY, myVehicleParameter->id.c_str(), ok, true), false, viaEdges, rid); + } else if (attrs.hasAttribute(SUMO_ATTR_VIALONLAT)) { + parseGeoEdges(attrs.get(SUMO_ATTR_VIALONLAT, myVehicleParameter->id.c_str(), ok, true), true, viaEdges, rid); + } else { + parseEdges(attrs.getOpt(SUMO_ATTR_VIA, myVehicleParameter->id.c_str(), ok, "", true), viaEdges, rid); + } for (ConstROEdgeVector::const_iterator i = viaEdges.begin(); i != viaEdges.end(); ++i) { myActiveRoute.push_back(*i); myVehicleParameter->via.push_back((*i)->getID()); @@ -118,9 +129,12 @@ } else { myActiveRoute.push_back(toTaz); } + } else if (attrs.hasAttribute(SUMO_ATTR_TOXY)) { + parseGeoEdges(attrs.get(SUMO_ATTR_TOXY, myVehicleParameter->id.c_str(), ok, true), false, myActiveRoute, rid); + } else if (attrs.hasAttribute(SUMO_ATTR_TOLONLAT)) { + parseGeoEdges(attrs.get(SUMO_ATTR_TOLONLAT, myVehicleParameter->id.c_str(), ok, true), true, myActiveRoute, rid); } else { - parseEdges(attrs.getOpt(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok, "", true), - myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); + parseEdges(attrs.getOpt(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok, "", true), myActiveRoute, rid); } myActiveRouteID = "!" + myVehicleParameter->id; if (myVehicleParameter->routeid == "") { @@ -134,7 +148,8 @@ const SUMOSAXAttributes& attrs) { SUMORouteHandler::myStartElement(element, attrs); switch (element) { - case SUMO_TAG_PERSON: { + case SUMO_TAG_PERSON: + case SUMO_TAG_PERSONFLOW: { SUMOVTypeParameter* type = myNet.getVehicleTypeSecure(myVehicleParameter->vtypeid); if (type == nullptr) { myErrorOutput->inform("The vehicle type '" + myVehicleParameter->vtypeid + "' for person '" + myVehicleParameter->id + "' is not known."); @@ -214,11 +229,10 @@ myActiveRouteProbability = DEFAULT_VEH_PROB; parseFromViaTo("flow", attrs); break; - case SUMO_TAG_TRIP: { + case SUMO_TAG_TRIP: myActiveRouteProbability = DEFAULT_VEH_PROB; parseFromViaTo("trip", attrs); - } - break; + break; default: break; } @@ -315,27 +329,7 @@ void -RORouteHandler::myEndElement(int element) { - SUMORouteHandler::myEndElement(element); - switch (element) { - case SUMO_TAG_VTYPE: - if (myNet.addVehicleType(myCurrentVType)) { - if (myCurrentVTypeDistribution != nullptr) { - myCurrentVTypeDistribution->add(myCurrentVType, myCurrentVType->defaultProbability); - } - } - myCurrentVType = nullptr; - break; - case SUMO_TAG_TRIP: - closeRoute(true); - closeVehicle(); - delete myVehicleParameter; - myVehicleParameter = nullptr; - myInsertStopEdgesAt = -1; - break; - default: - break; - } +RORouteHandler::openTrip(const SUMOSAXAttributes& /*attrs*/) { } @@ -505,6 +499,17 @@ void +RORouteHandler::closeVType() { + if (myNet.addVehicleType(myCurrentVType)) { + if (myCurrentVTypeDistribution != nullptr) { + myCurrentVTypeDistribution->add(myCurrentVType, myCurrentVType->defaultProbability); + } + } + myCurrentVType = nullptr; +} + + +void RORouteHandler::closePerson() { if (myActivePerson->getPlan().empty()) { WRITE_WARNING("Discarding person '" + myVehicleParameter->id + "' because it's plan is empty"); @@ -520,6 +525,58 @@ void +RORouteHandler::closePersonFlow() { + if (myActivePerson->getPlan().empty()) { + WRITE_WARNING("Discarding person '" + myVehicleParameter->id + "' because it's plan is empty"); + } else { + // instantiate all persons of this flow + int i = 0; + std::string baseID = myVehicleParameter->id; + if (myVehicleParameter->repetitionProbability > 0) { + if (myVehicleParameter->repetitionEnd == SUMOTime_MAX) { + throw ProcessError("probabilistic personFlow '" + myVehicleParameter->id + "' must specify end time"); + } else { + for (SUMOTime t = myVehicleParameter->depart; t < myVehicleParameter->repetitionEnd; t += TIME2STEPS(1)) { + if (RandHelper::rand() < myVehicleParameter->repetitionProbability) { + addFlowPerson(t, baseID, i++); + } + } + } + } else { + SUMOTime depart = myVehicleParameter->depart; + for (; i < myVehicleParameter->repetitionNumber; i++) { + addFlowPerson(depart, baseID, i); + depart += myVehicleParameter->repetitionOffset; + } + } + } + delete myVehicleParameter; + myVehicleParameter = nullptr; + myActivePerson = nullptr; +} + + +void +RORouteHandler::addFlowPerson(SUMOTime depart, const std::string& baseID, int i) { + SUMOVehicleParameter pars = myActivePerson->getParameter(); + pars.id = baseID + "." + toString(i); + pars.depart = depart; + ROPerson* copyPerson = new ROPerson(pars, myActivePerson->getType()); + for (ROPerson::PlanItem* item : myActivePerson->getPlan()) { + copyPerson->getPlan().push_back(item->clone()); + } + if (i == 0) { + delete myActivePerson; + } + myActivePerson = copyPerson; + if (myNet.addPerson(myActivePerson)) { + if (i == 0) { + registerLastDepart(); + } + } +} + +void RORouteHandler::closeContainer() { myActiveContainerPlan->closeTag(); if (myActiveContainerPlanSize > 0) { @@ -583,6 +640,13 @@ void +RORouteHandler::closeTrip() { + closeRoute(true); + closeVehicle(); +} + + +void RORouteHandler::addStop(const SUMOSAXAttributes& attrs) { if (myActiveContainerPlan != nullptr) { myActiveContainerPlan->openTag(SUMO_TAG_STOP); @@ -672,6 +736,31 @@ void +RORouteHandler::addPerson(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +RORouteHandler::addContainer(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +RORouteHandler::addRide(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +RORouteHandler::addTransport(const SUMOSAXAttributes& /*attrs*/) { +} + + +void +RORouteHandler::addTranship(const SUMOSAXAttributes& /*attrs*/) { +} + + +void RORouteHandler::parseEdges(const std::string& desc, ConstROEdgeVector& into, const std::string& rid) { if (desc[0] == BinaryFormatter::BF_ROUTE) { @@ -692,6 +781,59 @@ } } +void +RORouteHandler::parseGeoEdges(const PositionVector& positions, bool geo, + ConstROEdgeVector& into, const std::string& rid) { + const double range = 100; + NamedRTree* t = getLaneTree(); + if (geo && !GeoConvHelper::getFinal().usingGeoProjection()) { + WRITE_ERROR("Cannot convert geo-positions because the network has no geo-reference"); + return; + } + SUMOVehicleClass vClass = SVC_PASSENGER; + SUMOVTypeParameter* type = myNet.getVehicleTypeSecure(myVehicleParameter->vtypeid); + if (type != nullptr) { + vClass = type->vehicleClass; + } + for (Position pos : positions) { + Position orig = pos; + if (geo) { + GeoConvHelper::getFinal().x2cartesian_const(pos); + } + Boundary b; + b.add(pos); + b.grow(range); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + std::set lanes; + Named::StoringVisitor sv(lanes); + t->Search(cmin, cmax, sv); + // use closest + double minDist = std::numeric_limits::max(); + const ROLane* best = nullptr; + for (const Named* o : lanes) { + const ROLane* cand = static_cast(o); + if (!cand->allowsVehicleClass(vClass)) { + continue; + } + double dist = cand->getShape().distance2D(pos); + if (dist < minDist) { + minDist = dist; + best = cand; + } + } + if (best == nullptr) { + myErrorOutput->inform("No edge found near position " + toString(orig, geo ? gPrecisionGeo : gPrecision) + " within the route " + rid + "."); + } else { + const ROEdge* bestEdge = &best->getEdge(); + while (bestEdge->isInternal()) { + bestEdge = bestEdge->getSuccessors().front(); + } + into.push_back(bestEdge); + } + } +} + void RORouteHandler::addPersonTrip(const SUMOSAXAttributes& attrs) { @@ -708,26 +850,35 @@ + "\n The route can not be build."); ok = false; } + double arrivalPos = 0; + const ROEdge* to = myNet.getEdge(toID); + if (toID != "" && to == nullptr) { + myErrorOutput->inform("The edge '" + toID + "' within a walk or personTrip of '" + myVehicleParameter->id + "' is not known." + + "\n The route can not be build."); + ok = false; + } + if (toID == "" && busStopID == "") { + myErrorOutput->inform("Either a destination edge or busStop must be define within a walk or personTrip of '" + myVehicleParameter->id + "'." + + "\n The route can not be build."); + ok = false; + } + if (toID == "") { const SUMOVehicleParameter::Stop* stop = myNet.getStoppingPlace(busStopID, SUMO_TAG_BUS_STOP); if (stop == nullptr) { myErrorOutput->inform("Unknown bus stop '" + busStopID + "' within a walk or personTrip of '" + myVehicleParameter->id + "'."); ok = false; + } else { + to = myNet.getEdge(stop->lane.substr(0, stop->lane.rfind('_'))); + arrivalPos = (stop->startPos + stop->endPos) / 2; } } - const ROEdge* to = myNet.getEdge(toID); - if (toID != "" && to == nullptr) { - myErrorOutput->inform("The edge '" + toID + "' within a walk or personTrip of '" + myVehicleParameter->id + "' is not known." - + "\n The route can not be build."); - ok = false; - } double departPos = myActivePerson->getParameter().departPos; if (!myActivePerson->getPlan().empty()) { departPos = myActivePerson->getPlan().back()->getDestinationPos(); } - double arrivalPos = 0.; if (attrs.hasAttribute(SUMO_ATTR_DEPARTPOS)) { WRITE_WARNING("The attribute departPos is no longer supported for walks, please use the person attribute, the arrivalPos of the previous step or explicit stops."); } @@ -799,4 +950,21 @@ } +NamedRTree* +RORouteHandler::getLaneTree() { + if (myLaneTree == nullptr) { + myLaneTree = new NamedRTree(); + for (const auto& edgeItem : myNet.getEdgeMap()) { + for (ROLane* lane : edgeItem.second->getLanes()) { + Boundary b = lane->getShape().getBoxBoundary(); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + myLaneTree->Insert(cmin, cmax, lane); + } + } + } + return myLaneTree; +} + + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/router/RORouteHandler.h sumo-1.2.0+dfsg1/src/router/RORouteHandler.h --- sumo-1.1.0+dfsg1/src/router/RORouteHandler.h 2018-06-26 22:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/RORouteHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,8 +29,9 @@ #include #include #include -#include -#include +#include +#include +#include // =========================================================================== @@ -58,14 +59,14 @@ */ class RORouteHandler : public SUMORouteHandler { public: - /// standard constructor + /// @brief standard constructor RORouteHandler(RONet& net, const std::string& file, const bool tryRepair, const bool emptyDestinationsAllowed, const bool ignoreErrors, const bool checkSchema); - /// standard destructor + /// @brief standard destructor virtual ~RORouteHandler(); protected: @@ -81,18 +82,8 @@ */ 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); //@} - /** @brief Called for parsing from and to and the corresponding taz attributes * * @param[in] element description of the currently opened element @@ -102,54 +93,91 @@ void parseFromViaTo(std::string element, const SUMOSAXAttributes& attrs); - - /** opens a type distribution for reading */ + /// @brief opens a type distribution for reading void openVehicleTypeDistribution(const SUMOSAXAttributes& attrs); - /** closes (ends) the building of a distribution */ + /// @brief closes (ends) the building of a distribution void closeVehicleTypeDistribution(); - /** opens a route for reading */ + /// @brief opens a route for reading void openRoute(const SUMOSAXAttributes& attrs); - /** closes (ends) the building of a route. - Afterwards no edges may be added to it; - this method may throw exceptions when - a) the route is empty or - b) another route with the same id already exists */ + /// @brief opens a trip for reading + void openTrip(const SUMOSAXAttributes& attrs); + + /**@brief closes (ends) the building of a route. + * @note Afterwards no edges may be added to it; + * this method may throw exceptions when + * a) the route is empty or + * b) another route with the same id already exists + */ void closeRoute(const bool mayBeDisconnected = false); - /** opens a route distribution for reading */ + /// @brief opens a route distribution for reading void openRouteDistribution(const SUMOSAXAttributes& attrs); - /** closes (ends) the building of a distribution */ + /// @brief closes (ends) the building of a distribution void closeRouteDistribution(); - /// Ends the processing of a vehicle + /// @brief Ends the processing of a vehicle void closeVehicle(); - /// Ends the processing of a person + /// @brief Ends the processing of a vehicle type + void closeVType(); + + /// @brief Ends the processing of a person void closePerson(); - /// Ends the processing of a container + /// @brief Ends the processing of a personFlow + void closePersonFlow(); + + /// @brief Ends the processing of a container void closeContainer(); - /// Ends the processing of a flow + /// @brief Ends the processing of a flow void closeFlow(); - /// Processing of a stop + /// @brief Ends the processing of a trip + void closeTrip(); + + /// @brief Processing of a stop void addStop(const SUMOSAXAttributes& attrs); - /// Parse edges from strings + /// @brief Processing of a person + void addPerson(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a person from a personFlow + void addFlowPerson(SUMOTime depart, const std::string& baseID, int i); + + /// @brief Processing of a container + void addContainer(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a ride + void addRide(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a transport + void addTransport(const SUMOSAXAttributes& attrs); + + /// @brief Processing of a tranship + void addTranship(const SUMOSAXAttributes& attrs); + + /// @brief Parse edges from strings void parseEdges(const std::string& desc, ConstROEdgeVector& into, const std::string& rid); + /// @brief Parse edges from coordinates + void parseGeoEdges(const PositionVector& positions, bool geo, + ConstROEdgeVector& into, const std::string& rid); + /// @brief add a routing request for a walking or intermodal person void addPersonTrip(const SUMOSAXAttributes& attrs); /// @brief add a fully specified walk void addWalk(const SUMOSAXAttributes& attrs); + /// @brief initialize lane-RTree + NamedRTree* getLaneTree(); + protected: /// @brief The current route RONet& myNet; @@ -190,13 +218,15 @@ /// @brief The currently parsed route alternatives RORouteDef* myCurrentAlternatives; + /// @brief RTree for finding lanes + NamedRTree* myLaneTree; + private: /// @brief Invalidated copy constructor - RORouteHandler(const RORouteHandler& s); + RORouteHandler(const RORouteHandler& s) = delete; /// @brief Invalidated assignment operator - RORouteHandler& operator=(const RORouteHandler& s); - + RORouteHandler& operator=(const RORouteHandler& s) = delete; }; diff -Nru sumo-1.1.0+dfsg1/src/router/ROVehicle.cpp sumo-1.2.0+dfsg1/src/router/ROVehicle.cpp --- sumo-1.1.0+dfsg1/src/router/ROVehicle.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROVehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,19 +24,21 @@ // =========================================================================== #include +#include +#include #include #include #include +#include #include #include #include -#include -#include #include "RORouteDef.h" -#include "ROVehicle.h" #include "RORoute.h" #include "ROHelper.h" #include "RONet.h" +#include "ROLane.h" +#include "ROVehicle.h" // =========================================================================== @@ -201,11 +203,89 @@ getType()->saved = asAlternatives; } + const bool writeTrip = options.exists("write-trips") && options.getBool("write-trips"); + const bool writeGeoTrip = writeTrip && options.getBool("write-trips.geo"); // write the vehicle (new style, with included routes) - getParameter().write(os, options); + getParameter().write(os, options, writeTrip ? SUMO_TAG_TRIP : SUMO_TAG_VEHICLE); // save the route - myRoute->writeXMLDefinition(os, this, asAlternatives, options.getBool("exit-times")); + if (writeTrip) { + const ConstROEdgeVector edges = myRoute->getFirstRoute()->getEdgeVector(); + const ROEdge* from = nullptr; + const ROEdge* to = nullptr; + if (edges.size() > 0) { + if (edges.front()->isTazConnector()) { + if (edges.size() > 1) { + from = edges[1]; + } + } else { + from = edges[0]; + } + if (edges.back()->isTazConnector()) { + if (edges.size() > 1) { + to = edges[edges.size() - 2]; + } + } else { + to = edges[edges.size() - 1]; + } + } + if (from != nullptr) { + if (writeGeoTrip) { + Position fromPos = from->getLanes()[0]->getShape().positionAtOffset2D(0); + if (GeoConvHelper::getFinal().usingGeoProjection()) { + os.setPrecision(gPrecisionGeo); + GeoConvHelper::getFinal().cartesian2geo(fromPos); + os.writeAttr(SUMO_ATTR_FROMLONLAT, fromPos); + os.setPrecision(gPrecision); + } else { + os.writeAttr(SUMO_ATTR_FROMXY, fromPos); + } + } else { + os.writeAttr(SUMO_ATTR_FROM, from->getID()); + } + } + if (to != nullptr) { + if (writeGeoTrip) { + Position toPos = to->getLanes()[0]->getShape().positionAtOffset2D(to->getLanes()[0]->getShape().length2D()); + if (GeoConvHelper::getFinal().usingGeoProjection()) { + os.setPrecision(gPrecisionGeo); + GeoConvHelper::getFinal().cartesian2geo(toPos); + os.writeAttr(SUMO_ATTR_TOLONLAT, toPos); + os.setPrecision(gPrecision); + } else { + os.writeAttr(SUMO_ATTR_TOXY, toPos); + } + } else { + os.writeAttr(SUMO_ATTR_TO, to->getID()); + } + } + if (getParameter().via.size() > 0) { + if (writeGeoTrip) { + PositionVector viaPositions; + for (const std::string& viaID : getParameter().via) { + const ROEdge* viaEdge = RONet::getInstance()->getEdge(viaID); + assert(viaEdge != nullptr); + Position viaPos = viaEdge->getLanes()[0]->getShape().positionAtOffset2D(viaEdge->getLanes()[0]->getShape().length2D() / 2); + viaPositions.push_back(viaPos); + } + if (GeoConvHelper::getFinal().usingGeoProjection()) { + for (int i = 0; i < (int)viaPositions.size(); i++) { + GeoConvHelper::getFinal().cartesian2geo(viaPositions[i]); + } + os.setPrecision(gPrecisionGeo); + os.writeAttr(SUMO_ATTR_VIALONLAT, viaPositions); + os.setPrecision(gPrecision); + } else { + os.writeAttr(SUMO_ATTR_VIAXY, viaPositions); + } + + } else { + os.writeAttr(SUMO_ATTR_VIA, getParameter().via); + } + } + } else { + myRoute->writeXMLDefinition(os, this, asAlternatives, options.getBool("exit-times")); + } for (std::vector::const_iterator stop = getParameter().stops.begin(); stop != getParameter().stops.end(); ++stop) { stop->write(os); } diff -Nru sumo-1.1.0+dfsg1/src/router/ROVehicle.h sumo-1.2.0+dfsg1/src/router/ROVehicle.h --- sumo-1.1.0+dfsg1/src/router/ROVehicle.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/router/ROVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/sumo_main.cpp sumo-1.2.0+dfsg1/src/sumo_main.cpp --- sumo-1.1.0+dfsg1/src/sumo_main.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/sumo_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -96,6 +96,7 @@ oc.setApplicationName("sumo", "Eclipse SUMO Version " VERSION_STRING); gSimulation = true; int ret = 0; + MSNet* net = nullptr; try { // initialise subsystems XMLSubSys::init(); @@ -103,7 +104,7 @@ // load the net MSNet::SimulationState state = MSNet::SIMSTATE_LOADING; while (state == MSNet::SIMSTATE_LOADING) { - MSNet* net = NLBuilder::init(); + net = NLBuilder::init(); if (net != nullptr) { state = net->simulate(string2time(oc.getString("begin")), string2time(oc.getString("end"))); delete net; @@ -116,6 +117,8 @@ WRITE_ERROR(e.what()); } MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + // we need to delete the network explicitly to trigger the cleanup in the correct order + delete net; ret = 1; #ifndef _DEBUG } catch (const std::exception& e) { diff -Nru sumo-1.1.0+dfsg1/src/tools/emissionsDrivingCycle_main.cpp sumo-1.2.0+dfsg1/src/tools/emissionsDrivingCycle_main.cpp --- sumo-1.1.0+dfsg1/src/tools/emissionsDrivingCycle_main.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/tools/emissionsDrivingCycle_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/tools/emissionsMap_main.cpp sumo-1.2.0+dfsg1/src/tools/emissionsMap_main.cpp --- sumo-1.1.0+dfsg1/src/tools/emissionsMap_main.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/tools/emissionsMap_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/tools/Makefile.in sumo-1.2.0+dfsg1/src/tools/Makefile.in --- sumo-1.1.0+dfsg1/src/tools/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/tools/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,721 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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/PHEMlight/cpp/libphemlight.a \ - ../foreign/tcpip/libtcpip.a -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/PHEMlight/cpp/libphemlight.a \ - ../foreign/tcpip/libtcpip.a -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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -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/PHEMlight/cpp/libphemlight.a \ -../foreign/tcpip/libtcpip.a \ --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) --foreign src/tools/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/tools/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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/tools/TrajectoriesHandler.cpp sumo-1.2.0+dfsg1/src/tools/TrajectoriesHandler.cpp --- sumo-1.1.0+dfsg1/src/tools/TrajectoriesHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/tools/TrajectoriesHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/tools/TrajectoriesHandler.h sumo-1.2.0+dfsg1/src/tools/TrajectoriesHandler.h --- sumo-1.1.0+dfsg1/src/tools/TrajectoriesHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/tools/TrajectoriesHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/CMakeLists.txt sumo-1.2.0+dfsg1/src/traci-server/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/traci-server/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,4 @@ SET(traciserver_STAT_SRCS - TraCIConstants.h TraCIServer.h TraCIServer.cpp TraCIServerAPI_Edge.h diff -Nru sumo-1.1.0+dfsg1/src/traci-server/Makefile.in sumo-1.2.0+dfsg1/src/traci-server/Makefile.in --- sumo-1.1.0+dfsg1/src/traci-server/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,672 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/traci-server -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - TraCIServerAPI_Edge.$(OBJEXT) \ - TraCIServerAPI_InductionLoop.$(OBJEXT) \ - TraCIServerAPI_Junction.$(OBJEXT) \ - TraCIServerAPI_Lane.$(OBJEXT) \ - TraCIServerAPI_MultiEntryExit.$(OBJEXT) \ - TraCIServerAPI_LaneArea.$(OBJEXT) \ - TraCIServerAPI_Person.$(OBJEXT) TraCIServerAPI_POI.$(OBJEXT) \ - TraCIServerAPI_Polygon.$(OBJEXT) \ - TraCIServerAPI_Route.$(OBJEXT) \ - TraCIServerAPI_Simulation.$(OBJEXT) \ - TraCIServerAPI_TrafficLight.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libtraciserver.a -libtraciserver_a_SOURCES = TraCIConstants.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_MultiEntryExit.h TraCIServerAPI_MultiEntryExit.cpp \ -TraCIServerAPI_LaneArea.h TraCIServerAPI_LaneArea.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 \ -TraCIServerAPI_Simulation.h TraCIServerAPI_Simulation.cpp \ -TraCIServerAPI_TrafficLight.h TraCIServerAPI_TrafficLight.cpp \ -TraCIServerAPI_Vehicle.h TraCIServerAPI_Vehicle.cpp \ -TraCIServerAPI_VehicleType.h TraCIServerAPI_VehicleType.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) --foreign src/traci-server/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/traci-server/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServer.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_LaneArea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_MultiEntryExit.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_TrafficLight.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Vehicle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_VehicleType.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/traci-server/TraCIConstants.h sumo-1.2.0+dfsg1/src/traci-server/TraCIConstants.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIConstants.h 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIConstants.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,974 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file TraCIConstants.h -/// @author Axel Wegener -/// @author Friedemann Wesner -/// @author Bjoern Hendriks -/// @author Daniel Krajzewicz -/// @author Thimor Bohn -/// @author Tino Morenz -/// @author Michael Behrisch -/// @author Christoph Sommer -/// @author Mario Krumnow -/// @author Jakob Erdmann -/// @author Laura Bieker -/// @date 2007/10/24 -/// @version $Id$ -/// -// holds codes used for TraCI -/****************************************************************************/ -#ifndef TRACICONSTANTS_H -#define TRACICONSTANTS_H - -// **************************************** -// VERSION -// **************************************** -#define TRACI_VERSION 19 - -// **************************************** -// COMMANDS -// **************************************** -// command: get version -#define CMD_GETVERSION 0x00 - -// command: load -#define CMD_LOAD 0x01 - -// command: simulation step -#define CMD_SIMSTEP 0x02 - -// command: set connection priority (execution order) -#define CMD_SETORDER 0x03 - -// command: stop node -#define CMD_STOP 0x12 - -// command: reroute to parking area -#define CMD_REROUTE_TO_PARKING 0xc2 - -// command: Resume from parking -#define CMD_RESUME 0x19 - -// command: set lane -#define CMD_CHANGELANE 0x13 - -// command: slow down -#define CMD_SLOWDOWN 0x14 - -// command: set sublane (vehicle) -#define CMD_CHANGESUBLANE 0x15 - -// command: open gap -#define CMD_OPENGAP 0x16 - -// command: change target -#define CMD_CHANGETARGET 0x31 - -// command: close sumo -#define CMD_CLOSE 0x7F - -// command: add subscription filter -#define CMD_ADD_SUBSCRIPTION_FILTER 0x7e - - -// command: subscribe induction loop (e1) context -#define CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT 0x80 -// response: subscribe induction loop (e1) context -#define RESPONSE_SUBSCRIBE_INDUCTIONLOOP_CONTEXT 0x90 -// command: get induction loop (e1) variable -#define CMD_GET_INDUCTIONLOOP_VARIABLE 0xa0 -// response: get induction loop (e1) variable -#define RESPONSE_GET_INDUCTIONLOOP_VARIABLE 0xb0 -// command: subscribe induction loop (e1) variable -#define CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE 0xd0 -// response: subscribe induction loop (e1) variable -#define RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE 0xe0 - -// command: subscribe multi-entry/multi-exit detector (e3) context -#define CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT 0x81 -// response: subscribe multi-entry/multi-exit detector (e3) context -#define RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT 0x91 -// command: get multi-entry/multi-exit detector (e3) variable -#define CMD_GET_MULTIENTRYEXIT_VARIABLE 0xa1 -// response: get multi-entry/multi-exit detector (e3) variable -#define RESPONSE_GET_MULTIENTRYEXIT_VARIABLE 0xb1 -// command: subscribe multi-entry/multi-exit detector (e3) variable -#define CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE 0xd1 -// response: subscribe multi-entry/multi-exit detector (e3) variable -#define RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE 0xe1 - -// command: subscribe traffic lights context -#define CMD_SUBSCRIBE_TL_CONTEXT 0x82 -// response: subscribe traffic lights context -#define RESPONSE_SUBSCRIBE_TL_CONTEXT 0x92 -// command: get traffic lights variable -#define CMD_GET_TL_VARIABLE 0xa2 -// response: get traffic lights variable -#define RESPONSE_GET_TL_VARIABLE 0xb2 -// command: set traffic lights variable -#define CMD_SET_TL_VARIABLE 0xc2 -// command: subscribe traffic lights variable -#define CMD_SUBSCRIBE_TL_VARIABLE 0xd2 -// response: subscribe traffic lights variable -#define RESPONSE_SUBSCRIBE_TL_VARIABLE 0xe2 - -// command: subscribe lane context -#define CMD_SUBSCRIBE_LANE_CONTEXT 0x83 -// response: subscribe lane context -#define RESPONSE_SUBSCRIBE_LANE_CONTEXT 0x93 -// command: get lane variable -#define CMD_GET_LANE_VARIABLE 0xa3 -// response: get lane variable -#define RESPONSE_GET_LANE_VARIABLE 0xb3 -// command: set lane variable -#define CMD_SET_LANE_VARIABLE 0xc3 -// command: subscribe lane variable -#define CMD_SUBSCRIBE_LANE_VARIABLE 0xd3 -// response: subscribe lane variable -#define RESPONSE_SUBSCRIBE_LANE_VARIABLE 0xe3 - -// command: subscribe vehicle context -#define CMD_SUBSCRIBE_VEHICLE_CONTEXT 0x84 -// response: subscribe vehicle context -#define RESPONSE_SUBSCRIBE_VEHICLE_CONTEXT 0x94 -// command: get vehicle variable -#define CMD_GET_VEHICLE_VARIABLE 0xa4 -// response: get vehicle variable -#define RESPONSE_GET_VEHICLE_VARIABLE 0xb4 -// command: set vehicle variable -#define CMD_SET_VEHICLE_VARIABLE 0xc4 -// command: subscribe vehicle variable -#define CMD_SUBSCRIBE_VEHICLE_VARIABLE 0xd4 -// response: subscribe vehicle variable -#define RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE 0xe4 - -// command: subscribe vehicle type context -#define CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT 0x85 -// response: subscribe vehicle type context -#define RESPONSE_SUBSCRIBE_VEHICLETYPE_CONTEXT 0x95 -// command: get vehicle type variable -#define CMD_GET_VEHICLETYPE_VARIABLE 0xa5 -// response: get vehicle type variable -#define RESPONSE_GET_VEHICLETYPE_VARIABLE 0xb5 -// command: set vehicle type variable -#define CMD_SET_VEHICLETYPE_VARIABLE 0xc5 -// command: subscribe vehicle type variable -#define CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE 0xd5 -// response: subscribe vehicle type variable -#define RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE 0xe5 - -// command: subscribe route context -#define CMD_SUBSCRIBE_ROUTE_CONTEXT 0x86 -// response: subscribe route context -#define RESPONSE_SUBSCRIBE_ROUTE_CONTEXT 0x96 -// command: get route variable -#define CMD_GET_ROUTE_VARIABLE 0xa6 -// response: get route variable -#define RESPONSE_GET_ROUTE_VARIABLE 0xb6 -// command: set route variable -#define CMD_SET_ROUTE_VARIABLE 0xc6 -// command: subscribe route variable -#define CMD_SUBSCRIBE_ROUTE_VARIABLE 0xd6 -// response: subscribe route variable -#define RESPONSE_SUBSCRIBE_ROUTE_VARIABLE 0xe6 - -// command: subscribe poi context -#define CMD_SUBSCRIBE_POI_CONTEXT 0x87 -// response: subscribe poi context -#define RESPONSE_SUBSCRIBE_POI_CONTEXT 0x97 -// command: get poi variable -#define CMD_GET_POI_VARIABLE 0xa7 -// response: get poi variable -#define RESPONSE_GET_POI_VARIABLE 0xb7 -// command: set poi variable -#define CMD_SET_POI_VARIABLE 0xc7 -// command: subscribe poi variable -#define CMD_SUBSCRIBE_POI_VARIABLE 0xd7 -// response: subscribe poi variable -#define RESPONSE_SUBSCRIBE_POI_VARIABLE 0xe7 - -// command: subscribe polygon context -#define CMD_SUBSCRIBE_POLYGON_CONTEXT 0x88 -// response: subscribe polygon context -#define RESPONSE_SUBSCRIBE_POLYGON_CONTEXT 0x98 -// command: get polygon variable -#define CMD_GET_POLYGON_VARIABLE 0xa8 -// response: get polygon variable -#define RESPONSE_GET_POLYGON_VARIABLE 0xb8 -// command: set polygon variable -#define CMD_SET_POLYGON_VARIABLE 0xc8 -// command: subscribe polygon variable -#define CMD_SUBSCRIBE_POLYGON_VARIABLE 0xd8 -// response: subscribe polygon variable -#define RESPONSE_SUBSCRIBE_POLYGON_VARIABLE 0xe8 - -// command: subscribe junction context -#define CMD_SUBSCRIBE_JUNCTION_CONTEXT 0x89 -// response: subscribe junction context -#define RESPONSE_SUBSCRIBE_JUNCTION_CONTEXT 0x99 -// command: get junction variable -#define CMD_GET_JUNCTION_VARIABLE 0xa9 -// response: get junction variable -#define RESPONSE_GET_JUNCTION_VARIABLE 0xb9 -// command: set junction variable -#define CMD_SET_JUNCTION_VARIABLE 0xc9 -// command: subscribe junction variable -#define CMD_SUBSCRIBE_JUNCTION_VARIABLE 0xd9 -// response: subscribe junction variable -#define RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE 0xe9 - -// command: subscribe edge context -#define CMD_SUBSCRIBE_EDGE_CONTEXT 0x8a -// response: subscribe edge context -#define RESPONSE_SUBSCRIBE_EDGE_CONTEXT 0x9a -// command: get edge variable -#define CMD_GET_EDGE_VARIABLE 0xaa -// response: get edge variable -#define RESPONSE_GET_EDGE_VARIABLE 0xba -// command: set edge variable -#define CMD_SET_EDGE_VARIABLE 0xca -// command: subscribe edge variable -#define CMD_SUBSCRIBE_EDGE_VARIABLE 0xda -// response: subscribe edge variable -#define RESPONSE_SUBSCRIBE_EDGE_VARIABLE 0xea - -// command: subscribe simulation context -#define CMD_SUBSCRIBE_SIM_CONTEXT 0x8b -// response: subscribe simulation context -#define RESPONSE_SUBSCRIBE_SIM_CONTEXT 0x9b -// command: get simulation variable -#define CMD_GET_SIM_VARIABLE 0xab -// response: get simulation variable -#define RESPONSE_GET_SIM_VARIABLE 0xbb -// command: set simulation variable -#define CMD_SET_SIM_VARIABLE 0xcb -// command: subscribe simulation variable -#define CMD_SUBSCRIBE_SIM_VARIABLE 0xdb -// response: subscribe simulation variable -#define RESPONSE_SUBSCRIBE_SIM_VARIABLE 0xeb - -// command: subscribe GUI context -#define CMD_SUBSCRIBE_GUI_CONTEXT 0x8c -// response: subscribe GUI context -#define RESPONSE_SUBSCRIBE_GUI_CONTEXT 0x9c -// command: get GUI variable -#define CMD_GET_GUI_VARIABLE 0xac -// response: get GUI variable -#define RESPONSE_GET_GUI_VARIABLE 0xbc -// command: set GUI variable -#define CMD_SET_GUI_VARIABLE 0xcc -// command: subscribe GUI variable -#define CMD_SUBSCRIBE_GUI_VARIABLE 0xdc -// response: subscribe GUI variable -#define RESPONSE_SUBSCRIBE_GUI_VARIABLE 0xec - -// command: subscribe areal detector (e2) context -#define CMD_SUBSCRIBE_LANEAREA_CONTEXT 0x8d -// response: subscribe areal detector (e2) context -#define RESPONSE_SUBSCRIBE_LANEAREA_CONTEXT 0x9d -// command: get areal detector (e2) variable -#define CMD_GET_LANEAREA_VARIABLE 0xad -// response: get areal detector (e2) variable -#define RESPONSE_GET_LANEAREA_VARIABLE 0xbd -// command: subscribe areal detector (e2) variable -#define CMD_SUBSCRIBE_LANEAREA_VARIABLE 0xdd -// response: subscribe areal detector (e2) variable -#define RESPONSE_SUBSCRIBE_LANEAREA_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 -// **************************************** -// Position in geo-coordinates -#define POSITION_LON_LAT 0x00 -// 2D cartesian coordinates -#define POSITION_2D 0x01 -// Position in geo-coordinates with altitude -#define POSITION_LON_LAT_ALT 0x02 -// 3D cartesian coordinates -#define POSITION_3D 0x03 -// Position on road map -#define POSITION_ROADMAP 0x04 - - -// **************************************** -// DATA TYPES -// **************************************** -// Polygon (2*n doubles) -#define TYPE_POLYGON 0x06 -// unsigned byte -#define TYPE_UBYTE 0x07 -// signed byte -#define TYPE_BYTE 0x08 -// 32 bit signed integer -#define TYPE_INTEGER 0x09 -// double -#define TYPE_DOUBLE 0x0B -// 8 bit ASCII string -#define TYPE_STRING 0x0C -// list of strings -#define TYPE_STRINGLIST 0x0E -// compound object -#define TYPE_COMPOUND 0x0F -// color (four ubytes) -#define TYPE_COLOR 0x11 - - -// **************************************** -// RESULT TYPES -// **************************************** -// result type: Ok -#define RTYPE_OK 0x00 -// result type: not implemented -#define RTYPE_NOTIMPLEMENTED 0x01 -// result type: error -#define RTYPE_ERR 0xFF - -// **************************************** -// special return or parameter values -// **************************************** -// return value for invalid queries (especially vehicle is not on the road), see Position::INVALID -#define INVALID_DOUBLE_VALUE -1073741824 -// return value for invalid queries (especially vehicle is not on the road), see Position::INVALID -#define INVALID_INT_VALUE -1073741824 -// maximum value for client ordering (2 ^ 30) -#define MAX_ORDER 1073741824 - - -// **************************************** -// DIFFERENT DISTANCE REQUESTS -// **************************************** -// air distance -#define REQUEST_AIRDIST 0x00 -// driving distance -#define REQUEST_DRIVINGDIST 0x01 - - -// **************************************** -// VEHICLE REMOVAL REASONS -// **************************************** -// vehicle started teleport -#define REMOVE_TELEPORT 0x00 -// vehicle removed while parking -#define REMOVE_PARKING 0x01 -// vehicle arrived -#define REMOVE_ARRIVED 0x02 -// vehicle was vaporized -#define REMOVE_VAPORIZED 0x03 -// vehicle finished route during teleport -#define REMOVE_TELEPORT_ARRIVED 0x04 - -// **************************************** -// PERSON/CONTAINER STAGES -// **************************************** -// person / container stopping -#define STAGE_WAITING_FOR_DEPART 0x00 -// person / container stopping -#define STAGE_WAITING 0x01 -// person walking / container transhiping -#define STAGE_WALKING 0x02 -// person riding / container being transported -#define STAGE_DRIVING 0x03 - -// **************************************** -// Stop Flags -// **************************************** -#define STOP_DEFAULT 0x00 -#define STOP_PARKING 0x01 -#define STOP_TRIGGERED 0x02 -#define STOP_CONTAINER_TRIGGERED 0x04 -#define STOP_BUS_STOP 0x08 -#define STOP_CONTAINER_STOP 0x10 -#define STOP_CHARGING_STATION 0x20 -#define STOP_PARKING_AREA 0x40 - -// **************************************** -// Departure Flags -// **************************************** -#define DEPARTFLAG_TRIGGERED -0x01 -#define DEPARTFLAG_CONTAINER_TRIGGERED -0x02 -#define DEPARTFLAG_NOW -0x03 - -#define DEPARTFLAG_SPEED_RANDOM -0x02 -#define DEPARTFLAG_SPEED_MAX -0x03 - -#define DEPARTFLAG_LANE_RANDOM -0x02 -#define DEPARTFLAG_LANE_FREE -0x03 -#define DEPARTFLAG_LANE_ALLOWED_FREE -0x04 -#define DEPARTFLAG_LANE_BEST_FREE -0x05 -#define DEPARTFLAG_LANE_FIRST_ALLOWED -0x06 - -#define DEPARTFLAG_POS_RANDOM -0x02 -#define DEPARTFLAG_POS_FREE -0x03 -#define DEPARTFLAG_POS_BASE -0x04 -#define DEPARTFLAG_POS_LAST -0x05 -#define DEPARTFLAG_POS_RANDOM_FREE -0x06 - -#define ARRIVALFLAG_LANE_CURRENT -0x02 -#define ARRIVALFLAG_SPEED_CURRENT -0x02 - -#define ARRIVALFLAG_POS_RANDOM -0x02 -#define ARRIVALFLAG_POS_MAX -0x03 - -// **************************************** -// Routing modes -// **************************************** -// use custom weights if available, fall back to loaded weights and then to free-flow speed -#define ROUTING_MODE_DEFAULT 0x00 -// use aggregated travel times from device.rerouting -#define ROUTING_MODE_AGGREGATED 0x01 -// use loaded efforts -#define ROUTING_MODE_EFFORT 0x02 -// use combined costs -#define ROUTING_MODE_COMBINED 0x03 - -// **************************************** -// FILTER TYPES (for context subscription filters) -// **************************************** - -// Reset all filters -#define FILTER_TYPE_NONE 0x00 - -// Filter by list of lanes relative to ego vehicle -#define FILTER_TYPE_LANES 0x01 - -// Exclude vehicles on opposite (and other) lanes from context subscription result -#define FILTER_TYPE_NOOPPOSITE 0x02 - -// Specify maximal downstream distance for vehicles in context subscription result -#define FILTER_TYPE_DOWNSTREAM_DIST 0x03 - -// Specify maximal upstream distance for vehicles in context subscription result -#define FILTER_TYPE_UPSTREAM_DIST 0x04 - -// Only return leader and follower on the specified lanes in context subscription result -#define FILTER_TYPE_LEAD_FOLLOW 0x05 - -// Only return foes on upcoming junction in context subscription result -#define FILTER_TYPE_TURN 0x07 - -// Only return vehicles of the given vClass in context subscription result -#define FILTER_TYPE_VCLASS 0x08 - -// Only return vehicles of the given vType in context subscription result -#define FILTER_TYPE_VTYPE 0x09 - - - - - -// **************************************** -// VARIABLE TYPES (for CMD_GET_*_VARIABLE) -// **************************************** -// list of instances' ids (get: all) -#define TRACI_ID_LIST 0x00 - -// count of instances (get: all) -#define ID_COUNT 0x01 - -// subscribe object variables (get: all) -#define AUTOMATIC_VARIABLES_SUBSCRIPTION 0x02 - -// subscribe context variables (get: all) -#define AUTOMATIC_CONTEXT_SUBSCRIPTION 0x03 - -// generic attributes (get/set: all) -#define GENERIC_ATTRIBUTE 0x03 - -// last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges) -#define LAST_STEP_VEHICLE_NUMBER 0x10 - -// last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges) -#define LAST_STEP_MEAN_SPEED 0x11 - -// last step vehicle list (get: induction loops, multi-entry/multi-exit detector, lanes, edges) -#define LAST_STEP_VEHICLE_ID_LIST 0x12 - -// last step occupancy (get: induction loops, lanes, edges) -#define LAST_STEP_OCCUPANCY 0x13 - -// last step vehicle halting number (get: multi-entry/multi-exit detector, lanes, edges) -#define LAST_STEP_VEHICLE_HALTING_NUMBER 0x14 - -// last step mean vehicle length (get: induction loops, lanes, edges) -#define LAST_STEP_LENGTH 0x15 - -// last step time since last detection (get: induction loops) -#define LAST_STEP_TIME_SINCE_DETECTION 0x16 - -// 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 - -// last step person list (get: edges, vehicles) -#define LAST_STEP_PERSON_ID_LIST 0x1a - -// full name (get: edges, simulation) -#define VAR_NAME 0x1b - -// traffic light states, encoded as rRgGyYoO tuple (get: traffic lights) -#define TL_RED_YELLOW_GREEN_STATE 0x20 - -// index of the phase (set: traffic lights) -#define TL_PHASE_INDEX 0x22 - -// traffic light program (set: traffic lights) -#define TL_PROGRAM 0x23 - -// phase duration (set: traffic lights) -#define TL_PHASE_DURATION 0x24 - -// controlled lanes (get: traffic lights) -#define TL_CONTROLLED_LANES 0x26 - -// controlled links (get: traffic lights) -#define TL_CONTROLLED_LINKS 0x27 - -// index of the current phase (get: traffic lights) -#define TL_CURRENT_PHASE 0x28 - -// name of the current program (get: traffic lights) -#define TL_CURRENT_PROGRAM 0x29 - -// controlled junctions (get: traffic lights) -#define TL_CONTROLLED_JUNCTIONS 0x2a - -// complete definition (get: traffic lights) -#define TL_COMPLETE_DEFINITION_RYG 0x2b - -// complete program (set: traffic lights) -#define TL_COMPLETE_PROGRAM_RYG 0x2c - -// 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) -#define LANE_LINK_NUMBER 0x30 - -// id of parent edge (get: lanes) -#define LANE_EDGE_ID 0x31 - -// outgoing link definitions (get: lanes) -#define LANE_LINKS 0x33 - -// list of allowed vehicle classes (get&set: lanes) -#define LANE_ALLOWED 0x34 - -// list of not allowed vehicle classes (get&set: lanes) -#define LANE_DISALLOWED 0x35 - -// list of foe lanes (get: lanes) -#define VAR_FOES 0x37 - -// slope (get: edge, lane, vehicle, person) -#define VAR_SLOPE 0x36 - -// speed (get: vehicle) -#define VAR_SPEED 0x40 - -// maximum allowed/possible speed (get: vehicle types, lanes, set: edges, lanes) -#define VAR_MAXSPEED 0x41 - -// position (2D) (get: vehicle, poi, inductionloop, areadetector; set: poi) -#define VAR_POSITION 0x42 - -// position (3D) (get: vehicle, poi, set: poi) -#define VAR_POSITION3D 0x39 - -// angle (get: vehicle) -#define VAR_ANGLE 0x43 - -// angle (get: vehicle types, lanes, arealdetector, set: lanes) -#define VAR_LENGTH 0x44 - -// color (get: vehicles, vehicle types, polygons, pois) -#define VAR_COLOR 0x45 - -// max. acceleration (get: vehicles, vehicle types) -#define VAR_ACCEL 0x46 - -// max. comfortable deceleration (get: vehicles, vehicle types) -#define VAR_DECEL 0x47 - -// max. (physically possible) deceleration (get: vehicles, vehicle types) -#define VAR_EMERGENCY_DECEL 0x7b - -// apparent deceleration (get: vehicles, vehicle types) -#define VAR_APPARENT_DECEL 0x7c - -// action step length (get: vehicles, vehicle types) -#define VAR_ACTIONSTEPLENGTH 0x7d - -// last action time (get: vehicles) -#define VAR_LASTACTIONTIME 0x7f - -// driver's desired headway (get: vehicle types) -#define VAR_TAU 0x48 - -// vehicle class (get: vehicle types) -#define VAR_VEHICLECLASS 0x49 - -// emission class (get: vehicle types) -#define VAR_EMISSIONCLASS 0x4a - -// shape class (get: vehicle types) -#define VAR_SHAPECLASS 0x4b - -// minimum gap (get: vehicle types) -#define VAR_MINGAP 0x4c - -// width (get: vehicle types, lanes, polygons) -#define VAR_WIDTH 0x4d - -// shape (get: polygons) -#define VAR_SHAPE 0x4e - -// type id (get: vehicles, polygons, pois) -#define VAR_TYPE 0x4f - -// road id (get: vehicles) -#define VAR_ROAD_ID 0x50 - -// lane id (get: vehicles, inductionloop, arealdetector) -#define VAR_LANE_ID 0x51 - -// lane index (get: vehicle, edge) -#define VAR_LANE_INDEX 0x52 - -// route id (get & set: vehicles) -#define VAR_ROUTE_ID 0x53 - -// edges (get: routes, vehicles) -#define VAR_EDGES 0x54 - -// update bestLanes (set: vehicle) -#define VAR_UPDATE_BESTLANES 0x6a - -// filled? (get: polygons) -#define VAR_FILL 0x55 - -// position (1D along lane) (get: vehicle) -#define VAR_LANEPOSITION 0x56 - -// route (set: vehicles) -#define VAR_ROUTE 0x57 - -// travel time information (get&set: vehicle) -#define VAR_EDGE_TRAVELTIME 0x58 - -// effort information (get&set: vehicle) -#define VAR_EDGE_EFFORT 0x59 - -// last step travel time (get: edge, lane) -#define VAR_CURRENT_TRAVELTIME 0x5a - -// signals state (get/set: vehicle) -#define VAR_SIGNALS 0x5b - -// new lane/position along (set: vehicle) -#define VAR_MOVE_TO 0x5c - -// driver imperfection (set: vehicle) -#define VAR_IMPERFECTION 0x5d - -// speed factor (set: vehicle) -#define VAR_SPEED_FACTOR 0x5e - -// speed deviation (set: vehicle) -#define VAR_SPEED_DEVIATION 0x5f - -// routing mode (get/set: vehicle) -#define VAR_ROUTING_MODE 0x89 - -// speed without TraCI influence (get: vehicle) -#define VAR_SPEED_WITHOUT_TRACI 0xb1 - -// best lanes (get: vehicle) -#define VAR_BEST_LANES 0xb2 - -// how speed is set (set: vehicle) -#define VAR_SPEEDSETMODE 0xb3 - -// move vehicle to explicit (remote controlled) position (set: vehicle) -#define MOVE_TO_XY 0xb4 - -// is the vehicle stopped, and if so parked and/or triggered? -// value = stopped + 2 * parking + 4 * triggered -#define VAR_STOPSTATE 0xb5 - -// how lane changing is performed (get/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 - -// position (1D lateral position relative to center of the current lane) (get: vehicle) -#define VAR_LANEPOSITION_LAT 0xb8 - -// get/set prefered lateral alignment within the lane (vehicle) -#define VAR_LATALIGNMENT 0xb9 - -// get/set maximum lateral speed (vehicle, vtypes) -#define VAR_MAXSPEED_LAT 0xba - -// get/set minimum lateral gap (vehicle, vtypes) -#define VAR_MINGAP_LAT 0xbb - -// get/set vehicle height (vehicle, vtypes) -#define VAR_HEIGHT 0xbc - -// get/set vehicle line -#define VAR_LINE 0xbd - -// get/set vehicle via -#define VAR_VIA 0xbe - -// current CO2 emission of a node (get: vehicle, lane, edge) -#define VAR_CO2EMISSION 0x60 - -// current CO emission of a node (get: vehicle, lane, edge) -#define VAR_COEMISSION 0x61 - -// current HC emission of a node (get: vehicle, lane, edge) -#define VAR_HCEMISSION 0x62 - -// current PMx emission of a node (get: vehicle, lane, edge) -#define VAR_PMXEMISSION 0x63 - -// current NOx emission of a node (get: vehicle, lane, edge) -#define VAR_NOXEMISSION 0x64 - -// current fuel consumption of a node (get: vehicle, lane, edge) -#define VAR_FUELCONSUMPTION 0x65 - -// current noise emission of a node (get: vehicle, lane, edge) -#define VAR_NOISEEMISSION 0x66 - -// 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 - -// edge index in current route (get: vehicle) -#define VAR_ROUTE_INDEX 0x69 - -// current waiting time (get: vehicle, lane) -#define VAR_WAITING_TIME 0x7a - -// current waiting time (get: vehicle) -#define VAR_ACCUMULATED_WAITING_TIME 0x87 - -// upcoming traffic lights (get: vehicle) -#define VAR_NEXT_TLS 0x70 - -// upcoming stops (get: vehicle) -#define VAR_NEXT_STOPS 0x73 - -// current acceleration (get: vehicle) -#define VAR_ACCELERATION 0x72 - -// current time in seconds (get: simulation) -#define VAR_TIME 0x66 - -// current time step (get: simulation) -#define VAR_TIME_STEP 0x70 - -// current electricity consumption of a node (get: vehicle, lane, edge) -#define VAR_ELECTRICITYCONSUMPTION 0x71 - -// number of loaded vehicles (get: simulation) -#define VAR_LOADED_VEHICLES_NUMBER 0x71 - -// loaded vehicle ids (get: simulation) -#define VAR_LOADED_VEHICLES_IDS 0x72 - -// number of departed vehicle (get: simulation) -#define VAR_DEPARTED_VEHICLES_NUMBER 0x73 - -// departed vehicle ids (get: simulation) -#define VAR_DEPARTED_VEHICLES_IDS 0x74 - -// number of vehicles starting to teleport (get: simulation) -#define VAR_TELEPORT_STARTING_VEHICLES_NUMBER 0x75 - -// ids of vehicles starting to teleport (get: simulation) -#define VAR_TELEPORT_STARTING_VEHICLES_IDS 0x76 - -// number of vehicles ending to teleport (get: simulation) -#define VAR_TELEPORT_ENDING_VEHICLES_NUMBER 0x77 - -// ids of vehicles ending to teleport (get: simulation) -#define VAR_TELEPORT_ENDING_VEHICLES_IDS 0x78 - -// number of arrived vehicles (get: simulation) -#define VAR_ARRIVED_VEHICLES_NUMBER 0x79 - -// ids of arrived vehicles (get: simulation) -#define VAR_ARRIVED_VEHICLES_IDS 0x7a - -// delta t (get: simulation) -#define VAR_DELTA_T 0x7b - -// bounding box (get: simulation) -#define VAR_NET_BOUNDING_BOX 0x7c - -// 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 - -// number of vehicles involved in a collision (get: simulation) -#define VAR_COLLIDING_VEHICLES_NUMBER 0x80 - -// ids of vehicles involved in a collision (get: simulation) -#define VAR_COLLIDING_VEHICLES_IDS 0x81 - -// number of vehicles involved in a collision (get: simulation) -#define VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER 0x89 - -// ids of vehicles involved in a collision (get: simulation) -#define VAR_EMERGENCYSTOPPING_VEHICLES_IDS 0x8a - -// clears the simulation of all not inserted vehicles (set: simulation) -#define CMD_CLEAR_PENDING_VEHICLES 0x94 - -// triggers saving simulation state (set: simulation) -#define CMD_SAVE_SIMSTATE 0x95 - -// sets/retrieves abstract parameter -#define VAR_PARAMETER 0x7e - - -// add an instance (poi, polygon, vehicle, person, route) -#define ADD 0x80 - -// remove an instance (poi, polygon, vehicle, person) -#define REMOVE 0x81 - -// copy an instance (vehicle type, other TBD.) -#define COPY 0x88 - -// convert coordinates -#define POSITION_CONVERSION 0x82 - -// 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 - -// find a car based route -#define FIND_ROUTE 0x86 - -// find an intermodal route -#define FIND_INTERMODAL_ROUTE 0x87 - -// force rerouting based on travel time (vehicles) -#define CMD_REROUTE_TRAVELTIME 0x90 - -// force rerouting based on effort (vehicles) -#define CMD_REROUTE_EFFORT 0x91 - -// validates current route (vehicles) -#define VAR_ROUTE_VALID 0x92 - -// retrieve information regarding the current person/container stage -#define VAR_STAGE 0xc0 - -// retrieve information regarding the next edge including crossings and walkingAreas (pedestrians only) -#define VAR_NEXT_EDGE 0xc1 - -// retrieve information regarding the number of remaining stages -#define VAR_STAGES_REMAINING 0xc2 - -// retrieve the current vehicle id for the driving stage (person, container) -#define VAR_VEHICLE 0xc3 - -// append a person stage (person) -#define APPEND_STAGE 0xc4 - -// append a person stage (person) -#define REMOVE_STAGE 0xc5 - -// zoom -#define VAR_VIEW_ZOOM 0xa0 - -// view position -#define VAR_VIEW_OFFSET 0xa1 - -// view schema -#define VAR_VIEW_SCHEMA 0xa2 - -// view by boundary -#define VAR_VIEW_BOUNDARY 0xa3 - -// screenshot -#define VAR_SCREENSHOT 0xa5 - -// track vehicle -#define VAR_TRACK_VEHICLE 0xa6 - -// presence of view -#define VAR_HAS_VIEW 0xa7 - - -#endif diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.cpp 2018-09-17 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -34,7 +34,7 @@ #include #include #include -#include "TraCIConstants.h" +#include #include "TraCIServerAPI_Edge.h" #include #include @@ -49,51 +49,51 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_EDGE_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_EDGE_VARIABLE, variable, id); try { if (!libsumo::Edge::handleVariable(id, variable, &server)) { switch (variable) { - case VAR_EDGE_TRAVELTIME: { + case libsumo::VAR_EDGE_TRAVELTIME: { double time = 0.; if (!server.readTypeCheckingDouble(inputStorage, time)) { - return server.writeErrorStatusCmd(CMD_GET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_GET_EDGE_VARIABLE, "The message must contain the time definition.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(libsumo::Edge::getAdaptedTraveltime(id, time)); break; } - case VAR_EDGE_EFFORT: { + case libsumo::VAR_EDGE_EFFORT: { double time = 0.; if (!server.readTypeCheckingDouble(inputStorage, time)) { - return server.writeErrorStatusCmd(CMD_GET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_GET_EDGE_VARIABLE, "The message must contain the time definition.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(libsumo::Edge::getEffort(id, time)); break; } - case VAR_PARAMETER: { + case libsumo::VAR_PARAMETER: { std::string paramName; if (!server.readTypeCheckingString(inputStorage, paramName)) { - return server.writeErrorStatusCmd(CMD_GET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_GET_EDGE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::Edge::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_GET_EDGE_VARIABLE, "Get Edge Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_EDGE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_EDGE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_EDGE_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -105,9 +105,9 @@ std::string warning; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != VAR_EDGE_TRAVELTIME && variable != VAR_EDGE_EFFORT && variable != VAR_MAXSPEED - && variable != VAR_PARAMETER) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + if (variable != libsumo::VAR_EDGE_TRAVELTIME && variable != libsumo::VAR_EDGE_EFFORT && variable != libsumo::VAR_MAXSPEED + && variable != libsumo::VAR_PARAMETER) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "Change Edge State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } @@ -116,32 +116,32 @@ try { // process switch (variable) { - case LANE_ALLOWED: { + case libsumo::LANE_ALLOWED: { // read and set allowed vehicle classes std::vector classes; if (!server.readTypeCheckingStringList(inputStorage, classes)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "Allowed vehicle classes must be given as a list of strings.", outputStorage); } libsumo::Edge::setAllowedVehicleClasses(id, classes); break; } - case LANE_DISALLOWED: { + case libsumo::LANE_DISALLOWED: { // read and set disallowed vehicle classes std::vector classes; if (!server.readTypeCheckingStringList(inputStorage, classes)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "Not allowed vehicle classes must be given as a list of strings.", outputStorage); } libsumo::Edge::setDisallowedVehicleClasses(id, classes); break; } - case VAR_EDGE_TRAVELTIME: { + case libsumo::VAR_EDGE_TRAVELTIME: { // read and set travel time - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "Setting travel time requires a compound object.", outputStorage); } const int parameterCount = inputStorage.readInt(); @@ -149,17 +149,17 @@ // bound by time double begTime = 0., endTime = 0., value = 0.; if (!server.readTypeCheckingDouble(inputStorage, begTime)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The first variable must be the begin time given as double.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, endTime)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The second variable must be the end time given as double.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The third variable must be the value given as double", outputStorage); } @@ -168,21 +168,21 @@ // unbound double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The variable must be the value given as double", outputStorage); } libsumo::Edge::adaptTraveltime(id, value, 0., std::numeric_limits::max()); } else { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "Setting travel time requires either begin time, end time, and value, or only value as parameter.", outputStorage); } break; } - case VAR_EDGE_EFFORT: { + case libsumo::VAR_EDGE_EFFORT: { // read and set effort - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "Setting effort requires a compound object.", outputStorage); } @@ -191,17 +191,17 @@ // bound by time double begTime = 0., endTime = 0., value = 0.; if (!server.readTypeCheckingDouble(inputStorage, begTime)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The first variable must be the begin time given as double.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, endTime)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The second variable must be the end time given as double.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The third variable must be the value given as double", outputStorage); } @@ -210,30 +210,30 @@ // unbound double value = 0.; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The variable must be the value given as double", outputStorage); } libsumo::Edge::setEffort(id, value, 0., std::numeric_limits::max()); } else { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "Setting effort requires either begin time, end time, and value, or only value as parameter.", outputStorage); } break; } - case VAR_MAXSPEED: { + case libsumo::VAR_MAXSPEED: { // read and set max. speed double value = 0.; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, "The speed must be given as a double.", + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The speed must be given as a double.", outputStorage); } libsumo::Edge::setMaxSpeed(id, value); break; } - case VAR_PARAMETER: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); } @@ -241,13 +241,13 @@ inputStorage.readInt(); std::string name; if (!server.readTypeCheckingString(inputStorage, name)) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::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, + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } @@ -258,9 +258,9 @@ break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_EDGE_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_EDGE_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Edge.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ #include #include #include -#include "TraCIConstants.h" +#include #include "TraCIServerAPI_InductionLoop.h" @@ -39,32 +39,32 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_INDUCTIONLOOP_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_INDUCTIONLOOP_VARIABLE, variable, id); try { if (!libsumo::InductionLoop::handleVariable(id, variable, &server)) { switch (variable) { - case LAST_STEP_VEHICLE_DATA: { + case libsumo::LAST_STEP_VEHICLE_DATA: { std::vector vd = libsumo::InductionLoop::getVehicleData(id); - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); tcpip::Storage tempContent; int cnt = 0; - tempContent.writeUnsignedByte(TYPE_INTEGER); + tempContent.writeUnsignedByte(libsumo::TYPE_INTEGER); tempContent.writeInt((int)vd.size()); ++cnt; for (const libsumo::TraCIVehicleData& svd : vd) { - tempContent.writeUnsignedByte(TYPE_STRING); + tempContent.writeUnsignedByte(libsumo::TYPE_STRING); tempContent.writeString(svd.id); ++cnt; - tempContent.writeUnsignedByte(TYPE_DOUBLE); + tempContent.writeUnsignedByte(libsumo::TYPE_DOUBLE); tempContent.writeDouble(svd.length); ++cnt; - tempContent.writeUnsignedByte(TYPE_DOUBLE); + tempContent.writeUnsignedByte(libsumo::TYPE_DOUBLE); tempContent.writeDouble(svd.entryTime); ++cnt; - tempContent.writeUnsignedByte(TYPE_DOUBLE); + tempContent.writeUnsignedByte(libsumo::TYPE_DOUBLE); tempContent.writeDouble(svd.leaveTime); ++cnt; - tempContent.writeUnsignedByte(TYPE_STRING); + tempContent.writeUnsignedByte(libsumo::TYPE_STRING); tempContent.writeString(svd.typeID); ++cnt; } @@ -73,15 +73,15 @@ break; } default: - return server.writeErrorStatusCmd(CMD_GET_INDUCTIONLOOP_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, "Get Induction Loop Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_INDUCTIONLOOP_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_INDUCTIONLOOP_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.h 2018-07-14 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_InductionLoop.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.cpp 2018-10-15 22:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,21 +39,21 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_JUNCTION_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_JUNCTION_VARIABLE, variable, id); try { if (!libsumo::Junction::handleVariable(id, variable, &server)) { switch (variable) { - case VAR_SHAPE: + case libsumo::VAR_SHAPE: server.writePositionVector(server.getWrapperStorage(), libsumo::Junction::getShape(id)); break; default: - return server.writeErrorStatusCmd(CMD_GET_JUNCTION_VARIABLE, "Get Junction Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_JUNCTION_VARIABLE, "Get Junction Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_JUNCTION_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_JUNCTION_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_JUNCTION_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_JUNCTION_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Junction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.cpp 2018-08-01 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,9 +25,9 @@ #include #include -#include "TraCIConstants.h" -#include "TraCIServer.h" #include +#include +#include "TraCIServer.h" #include "TraCIServerAPI_LaneArea.h" @@ -39,15 +39,15 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_LANEAREA_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_LANEAREA_VARIABLE, variable, id); try { if (!libsumo::LaneArea::handleVariable(id, variable, &server)) { - return server.writeErrorStatusCmd(CMD_GET_LANEAREA_VARIABLE, "Get Lane Area Detector Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_LANEAREA_VARIABLE, "Get Lane Area Detector Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_LANEAREA_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_LANEAREA_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_LANEAREA_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_LANEAREA_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_LaneArea.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,10 +32,10 @@ #include #include #include -#include "TraCIConstants.h" +#include +#include #include "TraCIServer.h" #include "TraCIServerAPI_Lane.h" -#include // =========================================================================== @@ -46,49 +46,49 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_LANE_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_LANE_VARIABLE, variable, id); try { if (!libsumo::Lane::handleVariable(id, variable, &server)) { switch (variable) { - case LANE_LINKS: { - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + case libsumo::LANE_LINKS: { + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); const std::vector links = libsumo::Lane::getLinks(id); tcpip::Storage tempContent; int cnt = 0; - tempContent.writeUnsignedByte(TYPE_INTEGER); + tempContent.writeUnsignedByte(libsumo::TYPE_INTEGER); tempContent.writeInt((int) links.size()); ++cnt; for (std::vector::const_iterator i = links.begin(); i != links.end(); ++i) { // approached non-internal lane (if any) - tempContent.writeUnsignedByte(TYPE_STRING); + tempContent.writeUnsignedByte(libsumo::TYPE_STRING); tempContent.writeString(i->approachedLane); ++cnt; // approached "via", internal lane (if any) - tempContent.writeUnsignedByte(TYPE_STRING); + tempContent.writeUnsignedByte(libsumo::TYPE_STRING); tempContent.writeString(i->approachedInternal); ++cnt; // priority - tempContent.writeUnsignedByte(TYPE_UBYTE); + tempContent.writeUnsignedByte(libsumo::TYPE_UBYTE); tempContent.writeUnsignedByte(i->hasPrio); ++cnt; // opened - tempContent.writeUnsignedByte(TYPE_UBYTE); + tempContent.writeUnsignedByte(libsumo::TYPE_UBYTE); tempContent.writeUnsignedByte(i->isOpen); ++cnt; // approaching foe - tempContent.writeUnsignedByte(TYPE_UBYTE); + tempContent.writeUnsignedByte(libsumo::TYPE_UBYTE); tempContent.writeUnsignedByte(i->hasFoe); ++cnt; // state (not implemented, yet) - tempContent.writeUnsignedByte(TYPE_STRING); + tempContent.writeUnsignedByte(libsumo::TYPE_STRING); tempContent.writeString(i->state); ++cnt; // direction - tempContent.writeUnsignedByte(TYPE_STRING); + tempContent.writeUnsignedByte(libsumo::TYPE_STRING); tempContent.writeString(i->direction); ++cnt; // length - tempContent.writeUnsignedByte(TYPE_DOUBLE); + tempContent.writeUnsignedByte(libsumo::TYPE_DOUBLE); tempContent.writeDouble(i->length); ++cnt; } @@ -96,12 +96,12 @@ server.getWrapperStorage().writeStorage(tempContent); break; } - case VAR_FOES: { + case libsumo::VAR_FOES: { std::string toLane; if (!server.readTypeCheckingString(inputStorage, toLane)) { - return server.writeErrorStatusCmd(CMD_GET_LANE_VARIABLE, "foe retrieval requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_LANE_VARIABLE, "foe retrieval requires a string.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRINGLIST); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRINGLIST); if (toLane == "") { server.getWrapperStorage().writeStringList(libsumo::Lane::getInternalFoes(id)); } else { @@ -109,26 +109,26 @@ } break; } - case VAR_SHAPE: + case libsumo::VAR_SHAPE: server.writePositionVector(server.getWrapperStorage(), libsumo::Lane::getShape(id)); break; - case VAR_PARAMETER: { + case libsumo::VAR_PARAMETER: { std::string paramName = ""; if (!server.readTypeCheckingString(inputStorage, paramName)) { - return server.writeErrorStatusCmd(CMD_GET_LANE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_LANE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::Lane::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_LANE_VARIABLE, "Get Lane Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_LANE_VARIABLE, "Get Lane Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_LANE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_LANE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_LANE_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_LANE_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -140,63 +140,63 @@ 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 - && variable != VAR_PARAMETER) { - return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Change Lane State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + if (variable != libsumo::VAR_MAXSPEED && variable != libsumo::VAR_LENGTH && variable != libsumo::LANE_ALLOWED && variable != libsumo::LANE_DISALLOWED + && variable != libsumo::VAR_PARAMETER) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, "Change Lane State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // id std::string id = inputStorage.readString(); MSLane* l = MSLane::dictionary(id); if (l == nullptr) { - return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Lane '" + id + "' is not known", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, "Lane '" + id + "' is not known", outputStorage); } // process switch (variable) { - case VAR_MAXSPEED: { + case libsumo::VAR_MAXSPEED: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The speed must be given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, "The speed must be given as a double.", outputStorage); } libsumo::Lane::setMaxSpeed(id, value); } break; - case VAR_LENGTH: { + case libsumo::VAR_LENGTH: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The length must be given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, "The length must be given as a double.", outputStorage); } libsumo::Lane::setLength(id, value); } break; - case LANE_ALLOWED: { + case libsumo::LANE_ALLOWED: { std::vector classes; if (!server.readTypeCheckingStringList(inputStorage, classes)) { - return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Allowed classes must be given as a list of strings.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, "Allowed classes must be given as a list of strings.", outputStorage); } libsumo::Lane::setAllowed(id, classes); } break; - case LANE_DISALLOWED: { + case libsumo::LANE_DISALLOWED: { std::vector classes; if (!server.readTypeCheckingStringList(inputStorage, classes)) { - return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Not allowed classes must be given as a list of strings.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, "Not allowed classes must be given as a list of strings.", outputStorage); } libsumo::Lane::setDisallowed(id, classes); } 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); + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } libsumo::Lane::setParameter(id, name, value); } @@ -204,7 +204,7 @@ default: break; } - server.writeStatusCmd(CMD_SET_LANE_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_LANE_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.h 2018-07-14 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Lane.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.cpp 2018-08-01 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,8 +23,8 @@ #include #include -#include "TraCIConstants.h" #include +#include #include "TraCIServerAPI_MultiEntryExit.h" @@ -36,15 +36,15 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_MULTIENTRYEXIT_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_MULTIENTRYEXIT_VARIABLE, variable, id); try { if (!libsumo::MultiEntryExit::handleVariable(id, variable, &server)) { - return server.writeErrorStatusCmd(CMD_GET_MULTIENTRYEXIT_VARIABLE, "Get Multi Entry Exit Detector Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, "Get Multi Entry Exit Detector Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_MULTIENTRYEXIT_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_MULTIENTRYEXIT_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_MultiEntryExit.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Person.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Person.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Person.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Person.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,8 +28,8 @@ #include #include #include +#include #include -#include "TraCIConstants.h" #include "TraCIServer.h" #include "TraCIServerAPI_VehicleType.h" #include "TraCIServerAPI_Person.h" @@ -43,46 +43,46 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_PERSON_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_PERSON_VARIABLE, variable, id); try { if (!libsumo::Person::handleVariable(id, variable, &server) && !libsumo::VehicleType::handleVariable(libsumo::Person::getTypeID(id), variable, &server)) { switch (variable) { - case VAR_EDGES: { + case libsumo::VAR_EDGES: { int nextStageIndex = 0; if (!server.readTypeCheckingInt(inputStorage, nextStageIndex)) { - return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRINGLIST); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRINGLIST); server.getWrapperStorage().writeStringList(libsumo::Person::getEdges(id, nextStageIndex)); break; } - case VAR_STAGE: { + case libsumo::VAR_STAGE: { int nextStageIndex = 0; if (!server.readTypeCheckingInt(inputStorage, nextStageIndex)) { - return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(libsumo::Person::getStage(id, nextStageIndex)); break; } - case VAR_PARAMETER: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::Person::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, "Get Person Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "Get Person Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_PERSON_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -94,21 +94,21 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != VAR_PARAMETER - && variable != ADD - && variable != APPEND_STAGE - && variable != REMOVE_STAGE - && variable != CMD_REROUTE_TRAVELTIME - && variable != MOVE_TO_XY - && variable != VAR_SPEED - && variable != VAR_TYPE - && variable != VAR_LENGTH - && variable != VAR_WIDTH - && variable != VAR_HEIGHT - && variable != VAR_MINGAP - && variable != VAR_COLOR + if (variable != libsumo::VAR_PARAMETER + && variable != libsumo::ADD + && variable != libsumo::APPEND_STAGE + && variable != libsumo::REMOVE_STAGE + && variable != libsumo::CMD_REROUTE_TRAVELTIME + && variable != libsumo::MOVE_TO_XY + && variable != libsumo::VAR_SPEED + && variable != libsumo::VAR_TYPE + && variable != libsumo::VAR_LENGTH + && variable != libsumo::VAR_WIDTH + && variable != libsumo::VAR_HEIGHT + && variable != libsumo::VAR_MINGAP + && variable != libsumo::VAR_COLOR ) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Change Person State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Change Person State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } try { @@ -117,226 +117,226 @@ // id std::string id = inputStorage.readString(); // TODO: remove declaration of p after completion - const bool shouldExist = variable != ADD; + const bool shouldExist = variable != libsumo::ADD; MSTransportable* p = c.get(id); if (p == nullptr && shouldExist) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Person '" + id + "' is not known", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Person '" + id + "' is not known", outputStorage); } // process switch (variable) { - case VAR_SPEED: { + case libsumo::VAR_SPEED: { double speed = 0; if (!server.readTypeCheckingDouble(inputStorage, speed)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Setting speed requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Setting speed requires a double.", outputStorage); } // set the speed for all (walking) stages libsumo::Person::setSpeed(id, speed); // modify the vType so that stages added later are also affected - TraCIServerAPI_VehicleType::setVariable(CMD_SET_VEHICLE_VARIABLE, variable, p->getSingularType().getID(), server, inputStorage, outputStorage); + TraCIServerAPI_VehicleType::setVariable(libsumo::CMD_SET_VEHICLE_VARIABLE, variable, p->getSingularType().getID(), server, inputStorage, outputStorage); } break; - case VAR_TYPE: { + case libsumo::VAR_TYPE: { std::string vTypeID; if (!server.readTypeCheckingString(inputStorage, vTypeID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The vehicle type id must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The vehicle type id must be given as a string.", outputStorage); } libsumo::Person::setType(id, vTypeID); break; } - case VAR_COLOR: { + case libsumo::VAR_COLOR: { libsumo::TraCIColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The color must be given using the according type.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The color must be given using the according type.", outputStorage); } libsumo::Person::setColor(id, col); break; } - case ADD: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Adding a person requires a compound object.", outputStorage); + case libsumo::ADD: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a person requires a compound object.", outputStorage); } if (inputStorage.readInt() != 4) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Adding a person needs four parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a person needs four parameters.", outputStorage); } std::string vTypeID; if (!server.readTypeCheckingString(inputStorage, vTypeID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "First parameter (type) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "First parameter (type) requires a string.", outputStorage); } std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Second parameter (edge) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter (edge) requires a string.", outputStorage); } double depart; if (!server.readTypeCheckingDouble(inputStorage, depart)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Third parameter (depart) requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (depart) requires a double.", outputStorage); } double pos; if (!server.readTypeCheckingDouble(inputStorage, pos)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Fourth parameter (position) requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (position) requires a double.", outputStorage); } libsumo::Person::add(id, edgeID, pos, depart, vTypeID); } break; - case APPEND_STAGE: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Adding a person stage requires a compound object.", outputStorage); + case libsumo::APPEND_STAGE: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a person stage requires a compound object.", outputStorage); } int numParameters = inputStorage.readInt(); int stageType; if (!server.readTypeCheckingInt(inputStorage, stageType)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first parameter for adding a stage must be the stage type given as int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first parameter for adding a stage must be the stage type given as int.", outputStorage); } if (stageType == MSTransportable::DRIVING) { // append driving stage if (numParameters != 4) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Adding a driving stage needs four parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a driving stage needs four parameters.", outputStorage); } std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Second parameter (edge) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter (edge) requires a string.", outputStorage); } std::string lines; if (!server.readTypeCheckingString(inputStorage, lines)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Third parameter (lines) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (lines) requires a string.", outputStorage); } std::string stopID; if (!server.readTypeCheckingString(inputStorage, stopID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage); } libsumo::Person::appendDrivingStage(id, edgeID, lines, stopID); } else if (stageType == MSTransportable::WAITING) { // append waiting stage if (numParameters != 4) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Adding a waiting stage needs four parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a waiting stage needs four parameters.", outputStorage); } int duration; if (!server.readTypeCheckingInt(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Second parameter (duration) requires an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter (duration) requires an int.", outputStorage); } std::string description; if (!server.readTypeCheckingString(inputStorage, description)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Third parameter (description) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (description) requires a string.", outputStorage); } std::string stopID; if (!server.readTypeCheckingString(inputStorage, stopID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage); } libsumo::Person::appendWaitingStage(id, STEPS2TIME(duration), description, stopID); } else if (stageType == MSTransportable::MOVING_WITHOUT_VEHICLE) { // append walking stage if (numParameters != 6) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Adding a walking stage needs six parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a walking stage needs six parameters.", outputStorage); } std::vector edgeIDs; if (!server.readTypeCheckingStringList(inputStorage, edgeIDs)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Second parameter (edges) route must be defined as a list of edge ids.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Second parameter (edges) route must be defined as a list of edge ids.", outputStorage); } double arrivalPos; if (!server.readTypeCheckingDouble(inputStorage, arrivalPos)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Third parameter (arrivalPos) requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (arrivalPos) requires a double.", outputStorage); } int duration; if (!server.readTypeCheckingInt(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Fourth parameter (duration) requires an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (duration) requires an int.", outputStorage); } double speed; if (!server.readTypeCheckingDouble(inputStorage, speed)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Fifth parameter (speed) requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fifth parameter (speed) requires a double.", outputStorage); } std::string stopID; if (!server.readTypeCheckingString(inputStorage, stopID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage); } libsumo::Person::appendWalkingStage(id, edgeIDs, arrivalPos, STEPS2TIME(duration), speed, stopID); } else { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Invalid stage type for person '" + id + "'", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Invalid stage type for person '" + id + "'", outputStorage); } } break; - case REMOVE_STAGE: { + case libsumo::REMOVE_STAGE: { int nextStageIndex = 0; if (!server.readTypeCheckingInt(inputStorage, nextStageIndex)) { - return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage); } libsumo::Person::removeStage(id, nextStageIndex); } break; - case CMD_REROUTE_TRAVELTIME: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Rerouting requires a compound object.", outputStorage); + case libsumo::CMD_REROUTE_TRAVELTIME: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Rerouting requires a compound object.", outputStorage); } if (inputStorage.readInt() != 0) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Rerouting should obtain an empty compound object.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Rerouting should obtain an empty compound object.", outputStorage); } libsumo::Person::rerouteTraveltime(id); } break; - case MOVE_TO_XY: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "MoveToXY person requires a compound object.", outputStorage); + case libsumo::MOVE_TO_XY: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "MoveToXY person requires a compound object.", outputStorage); } const int numArgs = inputStorage.readInt(); if (numArgs != 5) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "MoveToXY person should obtain: edgeID, x, y, angle and keepRouteFlag.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "MoveToXY person should obtain: edgeID, x, y, angle and keepRouteFlag.", outputStorage); } // edge ID std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The first parameter for moveToXY must be the edge ID given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The first parameter for moveToXY must be the edge ID given as a string.", outputStorage); } // x double x = 0; if (!server.readTypeCheckingDouble(inputStorage, x)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The second parameter for moveToXY must be the x-position given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The second parameter for moveToXY must be the x-position given as a double.", outputStorage); } // y double y = 0; if (!server.readTypeCheckingDouble(inputStorage, y)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The third parameter for moveToXY must be the y-position given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The third parameter for moveToXY must be the y-position given as a double.", outputStorage); } // angle double angle = 0; if (!server.readTypeCheckingDouble(inputStorage, angle)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The fourth parameter for moveToXY must be the angle given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The fourth parameter for moveToXY must be the angle given as a double.", outputStorage); } int keepRouteFlag = 1; if (!server.readTypeCheckingByte(inputStorage, keepRouteFlag)) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The fifth parameter for moveToXY must be the keepRouteFlag given as a byte.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The fifth parameter for moveToXY must be the keepRouteFlag given as a byte.", outputStorage); } libsumo::Person::moveToXY(id, edgeID, x, y, angle, keepRouteFlag); } break; - 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); + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); } //read 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); + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } libsumo::Person::setParameter(id, name, value); } break; default: try { - if (!TraCIServerAPI_VehicleType::setVariable(CMD_SET_PERSON_VARIABLE, variable, p->getSingularType().getID(), server, inputStorage, outputStorage)) { + if (!TraCIServerAPI_VehicleType::setVariable(libsumo::CMD_SET_PERSON_VARIABLE, variable, p->getSingularType().getID(), server, inputStorage, outputStorage)) { return false; } } catch (ProcessError& e) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, e.what(), outputStorage); } break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_PERSON_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Person.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Person.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Person.h 2018-07-14 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Person.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_POI.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_POI.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_POI.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_POI.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,10 +28,11 @@ #include #include #include -#include "TraCIConstants.h" #include +#include #include "TraCIServerAPI_POI.h" + // =========================================================================== // method definitions // =========================================================================== @@ -40,27 +41,27 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_POI_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_POI_VARIABLE, variable, id); try { if (!libsumo::POI::handleVariable(id, variable, &server)) { switch (variable) { - case VAR_PARAMETER: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_GET_POI_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::POI::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_POI_VARIABLE, "Get PoI Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_POI_VARIABLE, "Get PoI Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_POI_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_POI_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_POI_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_POI_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -74,92 +75,197 @@ int variable = inputStorage.readUnsignedByte(); std::string id = inputStorage.readString(); // check variable - if (variable != VAR_TYPE && - variable != VAR_COLOR && - variable != VAR_POSITION && - variable != ADD && - variable != REMOVE && - variable != VAR_PARAMETER) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "Change PoI State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + if (variable != libsumo::VAR_TYPE && + variable != libsumo::VAR_COLOR && + variable != libsumo::VAR_POSITION && + variable != libsumo::VAR_WIDTH && + variable != libsumo::VAR_HEIGHT && + variable != libsumo::VAR_ANGLE && + variable != libsumo::VAR_IMAGEFILE && + variable != libsumo::VAR_HIGHLIGHT && + variable != libsumo::ADD && + variable != libsumo::REMOVE && + variable != libsumo::VAR_PARAMETER) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "Change PoI State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // process try { switch (variable) { - case VAR_TYPE: { + case libsumo::VAR_TYPE: { std::string type; if (!server.readTypeCheckingString(inputStorage, type)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The type must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The type must be given as a string.", outputStorage); } libsumo::POI::setType(id, type); } break; - case VAR_COLOR: { + case libsumo::VAR_COLOR: { libsumo::TraCIColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The color must be given using an according type.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The color must be given using an according type.", outputStorage); } libsumo::POI::setColor(id, col); } break; - case VAR_POSITION: { + case libsumo::VAR_POSITION: { libsumo::TraCIPosition pos; if (!server.readTypeCheckingPosition2D(inputStorage, pos)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The position must be given using an accoring type.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The position must be given using an according type.", outputStorage); } libsumo::POI::setPosition(id, pos.x, pos.y); } break; - case ADD: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "A compound object is needed for setting a new PoI.", outputStorage); + case libsumo::VAR_WIDTH: { + double width; + if (!server.readTypeCheckingDouble(inputStorage, width)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The width must be given using an according type.", outputStorage); + } + libsumo::POI::setWidth(id, width); + } + break; + case libsumo::VAR_HEIGHT: { + double height; + if (!server.readTypeCheckingDouble(inputStorage, height)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The height must be given using an according type.", outputStorage); + } + libsumo::POI::setHeight(id, height); + } + break; + case libsumo::VAR_ANGLE: { + double angle; + if (!server.readTypeCheckingDouble(inputStorage, angle)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The angle must be given using an according type.", outputStorage); + } + libsumo::POI::setAngle(id, angle); + } + break; + case libsumo::VAR_IMAGEFILE: { + std::string imageFile; + if (!server.readTypeCheckingString(inputStorage, imageFile)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The type must be given as a string.", outputStorage); + } + libsumo::POI::setImageFile(id, imageFile); + } + break; + case libsumo::VAR_HIGHLIGHT: { + // Highlight the POI by adding a polygon (NOTE: duplicated code exists for vehicle domain) + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "A compound object is needed for highlighting an object.", outputStorage); + } + int itemNo = inputStorage.readUnsignedByte(); + if (itemNo > 5) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "Highlighting an object needs zero to five parameters.", outputStorage); + } + libsumo::TraCIColor col = libsumo::TraCIColor(255, 0, 0); + if (itemNo > 0) { + if (!server.readTypeCheckingColor(inputStorage, col)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The first parameter for highlighting must be the highlight color.", outputStorage); + } + } + double size = -1; + if (itemNo > 1) { + if (!server.readTypeCheckingDouble(inputStorage, size)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The second parameter for highlighting must be the highlight size.", outputStorage); + } + } + int alphaMax = -1; + if (itemNo > 2) { + if (!server.readTypeCheckingUnsignedByte(inputStorage, alphaMax)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The third parameter for highlighting must be maximal alpha.", outputStorage); + } + } + double duration = -1; + if (itemNo > 3) { + if (!server.readTypeCheckingDouble(inputStorage, duration)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fourth parameter for highlighting must be the highlight duration.", outputStorage); + } + } + int type = 0; + if (itemNo > 4) { + if (!server.readTypeCheckingUnsignedByte(inputStorage, type)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fifth parameter for highlighting must be the highlight type id as ubyte.", outputStorage); + } + } + libsumo::POI::highlight(id, col, size, alphaMax, duration, type); + } + break; + case libsumo::ADD: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "A compound object is needed for setting a new PoI.", outputStorage); } //read itemNo - inputStorage.readInt(); + const int parameterCount = inputStorage.readInt(); std::string type; if (!server.readTypeCheckingString(inputStorage, type)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The first PoI parameter must be the type encoded as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The first PoI parameter must be the type encoded as a string.", outputStorage); } libsumo::TraCIColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The second PoI parameter must be the color.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The second PoI parameter must be the color.", outputStorage); } int layer = 0; if (!server.readTypeCheckingInt(inputStorage, layer)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The third PoI parameter must be the layer encoded as int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The third PoI parameter must be the layer encoded as int.", outputStorage); } libsumo::TraCIPosition pos; if (!server.readTypeCheckingPosition2D(inputStorage, pos)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The fourth PoI parameter must be the position.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The fourth PoI parameter must be the position.", outputStorage); } - // - if (!libsumo::POI::add(id, pos.x, pos.y, col, type, layer)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "Could not add PoI.", outputStorage); + if (parameterCount == 4) { + if (!libsumo::POI::add(id, pos.x, pos.y, col, type, layer)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "Could not add PoI.", outputStorage); + } + } else if (parameterCount == 8) { + std::string imgFile; + if (!server.readTypeCheckingString(inputStorage, imgFile)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The fifth PoI parameter must be the imgFile encoded as a string.", outputStorage); + } + double width; + if (!server.readTypeCheckingDouble(inputStorage, width)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The sixth PoI parameter must be the width encoded as a double.", outputStorage); + } + double height; + if (!server.readTypeCheckingDouble(inputStorage, height)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The seventh PoI parameter must be the height encoded as a double.", outputStorage); + } + double angle; + if (!server.readTypeCheckingDouble(inputStorage, angle)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The eighth PoI parameter must be the angle encoded as a double.", outputStorage); + } + // + if (!libsumo::POI::add(id, pos.x, pos.y, col, type, layer, imgFile, width, height, angle)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "Could not add PoI.", outputStorage); + } + } else { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, + "Adding a PoI requires either only type, color, layer and position parameters or these and imageFile, width, height and angle parameters.", + outputStorage); } } break; - case REMOVE: { + case libsumo::REMOVE: { int layer = 0; // !!! layer not used yet (shouldn't the id be enough?) if (!server.readTypeCheckingInt(inputStorage, layer)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The layer must be given using an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The layer must be given using an int.", outputStorage); } if (!libsumo::POI::remove(id, layer)) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "Could not remove PoI '" + id + "'", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "Could not remove PoI '" + id + "'", outputStorage); } } 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); + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } libsumo::POI::setParameter(id, name, value); } @@ -168,9 +274,9 @@ break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_POI_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_POI_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_POI.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_POI.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_POI.h 2018-07-14 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_POI.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.cpp 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,9 +31,10 @@ #include #include #include -#include "TraCIConstants.h" +#include #include "TraCIServerAPI_Polygon.h" + // =========================================================================== // method definitions // =========================================================================== @@ -42,30 +43,30 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_POLYGON_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_POLYGON_VARIABLE, variable, id); try { if (!libsumo::Polygon::handleVariable(id, variable, &server)) { switch (variable) { - case VAR_SHAPE: + case libsumo::VAR_SHAPE: server.writePositionVector(server.getWrapperStorage(), libsumo::Polygon::getShape(id)); break; - case VAR_PARAMETER: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_GET_POLYGON_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::Polygon::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_POLYGON_VARIABLE, "Get Polygon Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_POLYGON_VARIABLE, "Get Polygon Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_POLYGON_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_POLYGON_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_POLYGON_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -76,10 +77,10 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != VAR_TYPE && variable != VAR_COLOR && variable != VAR_SHAPE && variable != VAR_FILL - && variable != VAR_WIDTH - && variable != ADD && variable != REMOVE && variable != VAR_PARAMETER) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, + if (variable != libsumo::VAR_TYPE && variable != libsumo::VAR_COLOR && variable != libsumo::VAR_SHAPE && variable != libsumo::VAR_FILL + && variable != libsumo::VAR_WIDTH && variable != libsumo::VAR_MOVE_TO + && variable != libsumo::ADD && variable != libsumo::REMOVE && variable != libsumo::VAR_PARAMETER) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "Change Polygon State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // id @@ -87,79 +88,79 @@ try { // process switch (variable) { - case VAR_TYPE: { + case libsumo::VAR_TYPE: { std::string type; if (!server.readTypeCheckingString(inputStorage, type)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The type must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The type must be given as a string.", outputStorage); } libsumo::Polygon::setType(id, type); } break; - case VAR_COLOR: { + case libsumo::VAR_COLOR: { libsumo::TraCIColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The color must be given using an according type.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The color must be given using an according type.", outputStorage); } libsumo::Polygon::setColor(id, col); } break; - case VAR_SHAPE: { + case libsumo::VAR_SHAPE: { PositionVector shape; if (!server.readTypeCheckingPolygon(inputStorage, shape)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The shape must be given using an according type.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The shape must be given using an according type.", outputStorage); } libsumo::Polygon::setShape(id, libsumo::Helper::makeTraCIPositionVector(shape)); } break; - case VAR_FILL: { + case libsumo::VAR_FILL: { int value = 0; if (!server.readTypeCheckingInt(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "'fill' must be defined using an integer.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "'fill' must be defined using an integer.", outputStorage); } libsumo::Polygon::setFilled(id, value != 0); } break; - case VAR_WIDTH: { + case libsumo::VAR_WIDTH: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "'lineWidth' must be defined using an double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "'lineWidth' must be defined using an double.", outputStorage); } libsumo::Polygon::setLineWidth(id, value); } break; - case ADD: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "A compound object is needed for setting a new polygon.", outputStorage); + case libsumo::ADD: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "A compound object is needed for setting a new polygon.", outputStorage); } int itemNo = inputStorage.readInt(); if (itemNo != 5 && itemNo != 6) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Adding a polygon needs five to six parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Adding a polygon needs five to six parameters.", outputStorage); } std::string type; if (!server.readTypeCheckingString(inputStorage, type)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The type must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The type must be given as a string.", outputStorage); } libsumo::TraCIColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The second polygon parameter must be the color.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The second polygon parameter must be the color.", outputStorage); } int value = 0; if (!server.readTypeCheckingUnsignedByte(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The third polygon parameter must be 'fill' encoded as ubyte.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The third polygon parameter must be 'fill' encoded as ubyte.", outputStorage); } bool fill = value != 0; int layer = 0; if (!server.readTypeCheckingInt(inputStorage, layer)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The fourth polygon parameter must be the layer encoded as int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The fourth polygon parameter must be the layer encoded as int.", outputStorage); } PositionVector shape; if (!server.readTypeCheckingPolygon(inputStorage, shape)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The fifth polygon parameter must be the shape.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The fifth polygon parameter must be the shape.", outputStorage); } double lineWidth = 1; if (itemNo == 6) { if (!server.readTypeCheckingDouble(inputStorage, lineWidth)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The sixth polygon parameter must be the lineWidth encoded as double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The sixth polygon parameter must be the lineWidth encoded as double.", outputStorage); } } libsumo::TraCIPositionVector tp = libsumo::Helper::makeTraCIPositionVector(shape); @@ -168,29 +169,67 @@ } break; - case REMOVE: { + case libsumo::VAR_ADD_DYNAMICS : { + // Add dynamics to polygon. + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "A compound object is needed for adding dynamics to a polygon.", outputStorage); + } + int itemNo = inputStorage.readInt(); + if (itemNo != 5) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Adding polygon dynamics needs four parameters.", outputStorage); + } + + std::string trackedID; + if (!server.readTypeCheckingString(inputStorage, trackedID)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The first parameter for adding polygon dynamics must be ID of the tracked object as a string ('' to disregard tracking).", outputStorage); + } + + std::vector timeSpan; + if (!server.readTypeCheckingDoubleList(inputStorage, timeSpan)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The second parameter for adding polygon dynamics must be the timespan of the animation (length=0 to disregard animation).", outputStorage); + } + + std::vector alphaSpan; + if (!server.readTypeCheckingDoubleList(inputStorage, alphaSpan)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The third parameter for adding polygon dynamics must be the alphaSpanStr of the animation (length=0 to disregard alpha animation).", outputStorage); + } + + int looped; + if (!server.readTypeCheckingUnsignedByte(inputStorage, looped)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The fourth parameter for adding polygon dynamics must be boolean indicating whether the animation should be looped.", outputStorage); + } + + int rotate; + if (!server.readTypeCheckingUnsignedByte(inputStorage, rotate)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The fifth parameter for adding polygon dynamics must be boolean indicating whether the tracking polygon should be rotated.", outputStorage); + } + + libsumo::Polygon::addDynamics(id, trackedID, timeSpan, alphaSpan, looped != 0, rotate != 0); + } + break; + case libsumo::REMOVE: { int layer = 0; // !!! layer not used yet (shouldn't the id be enough?) if (!server.readTypeCheckingInt(inputStorage, layer)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The layer must be given using an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The layer must be given using an int.", outputStorage); } libsumo::Polygon::remove(id, layer); } 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); + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } libsumo::Polygon::setParameter(id, name, value); @@ -200,9 +239,9 @@ break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_POLYGON_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.h 2018-07-14 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Polygon.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Route.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Route.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Route.cpp 2018-08-03 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Route.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,8 +26,8 @@ #include #include #include -#include "TraCIConstants.h" #include +#include #include "TraCIServerAPI_Route.h" @@ -39,27 +39,27 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_ROUTE_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_ROUTE_VARIABLE, variable, id); try { if (!libsumo::Route::handleVariable(id, variable, &server)) { switch (variable) { - case VAR_PARAMETER: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_GET_ROUTE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::Route::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_ROUTE_VARIABLE, "Get Route Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_ROUTE_VARIABLE, "Get Route Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_ROUTE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_ROUTE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_ROUTE_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_ROUTE_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -71,8 +71,8 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != ADD && variable != VAR_PARAMETER) { - return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "Change Route State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + if (variable != libsumo::ADD && variable != libsumo::VAR_PARAMETER) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_ROUTE_VARIABLE, "Change Route State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // id std::string id = inputStorage.readString(); @@ -80,27 +80,27 @@ try { // process switch (variable) { - case ADD: { + case libsumo::ADD: { std::vector edgeIDs; if (!server.readTypeCheckingStringList(inputStorage, edgeIDs)) { - return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "A string list is needed for adding a new route.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_ROUTE_VARIABLE, "A string list is needed for adding a new route.", outputStorage); } libsumo::Route::add(id, edgeIDs); } 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); + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_ROUTE_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); } //read 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); + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_ROUTE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } libsumo::Route::setParameter(id, name, value); } @@ -109,9 +109,9 @@ break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_ROUTE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_ROUTE_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_ROUTE_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Route.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Route.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Route.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Route.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -37,7 +37,7 @@ #include #include #include -#include "TraCIConstants.h" +#include #include "TraCIServerAPI_Simulation.h" @@ -49,97 +49,97 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_SIM_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_SIM_VARIABLE, variable, id); try { switch (variable) { - case VAR_TIME: - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + case libsumo::VAR_TIME: + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(SIMTIME); break; - case VAR_TIME_STEP: - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + case libsumo::VAR_TIME_STEP: + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt((int)libsumo::Simulation::getCurrentTime()); break; - case VAR_LOADED_VEHICLES_NUMBER: + case libsumo::VAR_LOADED_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_BUILT); break; - case VAR_LOADED_VEHICLES_IDS: + case libsumo::VAR_LOADED_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_BUILT); break; - case VAR_DEPARTED_VEHICLES_NUMBER: + case libsumo::VAR_DEPARTED_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_DEPARTED); break; - case VAR_DEPARTED_VEHICLES_IDS: + case libsumo::VAR_DEPARTED_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_DEPARTED); break; - case VAR_TELEPORT_STARTING_VEHICLES_NUMBER: + case libsumo::VAR_TELEPORT_STARTING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_STARTING_TELEPORT); break; - case VAR_TELEPORT_STARTING_VEHICLES_IDS: + case libsumo::VAR_TELEPORT_STARTING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_STARTING_TELEPORT); break; - case VAR_TELEPORT_ENDING_VEHICLES_NUMBER: + case libsumo::VAR_TELEPORT_ENDING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ENDING_TELEPORT); break; - case VAR_TELEPORT_ENDING_VEHICLES_IDS: + case libsumo::VAR_TELEPORT_ENDING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ENDING_TELEPORT); break; - case VAR_ARRIVED_VEHICLES_NUMBER: + case libsumo::VAR_ARRIVED_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ARRIVED); break; - case VAR_ARRIVED_VEHICLES_IDS: + case libsumo::VAR_ARRIVED_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ARRIVED); break; - case VAR_PARKING_STARTING_VEHICLES_NUMBER: + case libsumo::VAR_PARKING_STARTING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_STARTING_PARKING); break; - case VAR_PARKING_STARTING_VEHICLES_IDS: + case libsumo::VAR_PARKING_STARTING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_STARTING_PARKING); break; - case VAR_PARKING_ENDING_VEHICLES_NUMBER: + case libsumo::VAR_PARKING_ENDING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ENDING_PARKING); break; - case VAR_PARKING_ENDING_VEHICLES_IDS: + case libsumo::VAR_PARKING_ENDING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ENDING_PARKING); break; - case VAR_STOP_STARTING_VEHICLES_NUMBER: + case libsumo::VAR_STOP_STARTING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_STARTING_STOP); break; - case VAR_STOP_STARTING_VEHICLES_IDS: + case libsumo::VAR_STOP_STARTING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_STARTING_STOP); break; - case VAR_STOP_ENDING_VEHICLES_NUMBER: + case libsumo::VAR_STOP_ENDING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ENDING_STOP); break; - case VAR_STOP_ENDING_VEHICLES_IDS: + case libsumo::VAR_STOP_ENDING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_ENDING_STOP); break; - case VAR_COLLIDING_VEHICLES_NUMBER: + case libsumo::VAR_COLLIDING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_COLLISION); break; - case VAR_COLLIDING_VEHICLES_IDS: + case libsumo::VAR_COLLIDING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_COLLISION); break; - case VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER: + case libsumo::VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER: writeVehicleStateNumber(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_EMERGENCYSTOP); break; - case VAR_EMERGENCYSTOPPING_VEHICLES_IDS: + case libsumo::VAR_EMERGENCYSTOPPING_VEHICLES_IDS: writeVehicleStateIDs(server, server.getWrapperStorage(), MSNet::VEHICLE_STATE_EMERGENCYSTOP); break; - case VAR_DELTA_T: - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + case libsumo::VAR_DELTA_T: + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(libsumo::Simulation::getDeltaT()); break; - case VAR_MIN_EXPECTED_VEHICLES: - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + case libsumo::VAR_MIN_EXPECTED_VEHICLES: + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(libsumo::Simulation::getMinExpectedNumber()); break; - case VAR_BUS_STOP_WAITING: - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + case libsumo::VAR_BUS_STOP_WAITING: + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(libsumo::Simulation::getBusStopWaiting(id)); break; - case VAR_NET_BOUNDING_BOX: { - server.getWrapperStorage().writeUnsignedByte(TYPE_POLYGON); + case libsumo::VAR_NET_BOUNDING_BOX: { + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_POLYGON); libsumo::TraCIPositionVector tb = libsumo::Simulation::getNetBoundary(); server.getWrapperStorage().writeByte(2); server.getWrapperStorage().writeDouble(tb[0].x); @@ -148,129 +148,131 @@ server.getWrapperStorage().writeDouble(tb[1].y); break; } - case POSITION_CONVERSION: - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Position conversion requires a compound object.", outputStorage); + case libsumo::POSITION_CONVERSION: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Position conversion requires a compound object.", outputStorage); + } + const int compoundSize = inputStorage.readInt(); + if (compoundSize < 2 || compoundSize > 3) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Position conversion requires a source position and a position type as parameter.", outputStorage); } - if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Position conversion requires a source position and a position type as parameter.", outputStorage); - } - if (!commandPositionConversion(server, inputStorage, server.getWrapperStorage(), CMD_GET_SIM_VARIABLE)) { + if (!commandPositionConversion(server, inputStorage, compoundSize, server.getWrapperStorage(), libsumo::CMD_GET_SIM_VARIABLE)) { return false; } break; - case DISTANCE_REQUEST: - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of distance requires a compound object.", outputStorage); + } + case libsumo::DISTANCE_REQUEST: + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of distance requires a compound object.", outputStorage); } if (inputStorage.readInt() != 3) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of distance requires two positions and a distance type as parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of distance requires two positions and a distance type as parameter.", outputStorage); } - if (!commandDistanceRequest(server, inputStorage, server.getWrapperStorage(), CMD_GET_SIM_VARIABLE)) { + if (!commandDistanceRequest(server, inputStorage, server.getWrapperStorage(), libsumo::CMD_GET_SIM_VARIABLE)) { return false; } break; - case FIND_ROUTE: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a compound object.", outputStorage); + case libsumo::FIND_ROUTE: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a compound object.", outputStorage); } if (inputStorage.readInt() != 5) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires five parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires five parameter.", outputStorage); } std::string from, to, vtype; double depart; int routingMode; if (!server.readTypeCheckingString(inputStorage, from)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as first parameter.", outputStorage); } if (!server.readTypeCheckingString(inputStorage, to)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as second parameter.", outputStorage); } if (!server.readTypeCheckingString(inputStorage, vtype)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as third parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as third parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, depart)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as fourth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as fourth parameter.", outputStorage); } if (!server.readTypeCheckingInt(inputStorage, routingMode)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires an integer as fifth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires an integer as fifth parameter.", outputStorage); } writeStage(server.getWrapperStorage(), libsumo::Simulation::findRoute(from, to, vtype, depart, routingMode)); break; } - case FIND_INTERMODAL_ROUTE: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of an intermodal route requires a compound object.", outputStorage); + case libsumo::FIND_INTERMODAL_ROUTE: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of an intermodal route requires a compound object.", outputStorage); } if (inputStorage.readInt() != 13) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of an intermodal route requires thirteen parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of an intermodal route requires thirteen parameters.", outputStorage); } std::string from, to, modes, ptype, vtype, destStop; double depart, speed, walkFactor, departPos, arrivalPos, departPosLat; int routingMode; if (!server.readTypeCheckingString(inputStorage, from)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as first parameter.", outputStorage); } if (!server.readTypeCheckingString(inputStorage, to)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as second parameter.", outputStorage); } if (!server.readTypeCheckingString(inputStorage, modes)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as third parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as third parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, depart)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as fourth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as fourth parameter.", outputStorage); } if (!server.readTypeCheckingInt(inputStorage, routingMode)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires an integer as fifth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires an integer as fifth parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, speed)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as sixth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as sixth parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, walkFactor)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as seventh parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as seventh parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, departPos)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as eigth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as eigth parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, arrivalPos)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as nineth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as nineth parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, departPosLat)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as tenth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a double as tenth parameter.", outputStorage); } if (!server.readTypeCheckingString(inputStorage, ptype)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as eleventh parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as eleventh parameter.", outputStorage); } if (!server.readTypeCheckingString(inputStorage, vtype)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as twelvth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as twelvth parameter.", outputStorage); } if (!server.readTypeCheckingString(inputStorage, destStop)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as thirteenth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a route requires a string as thirteenth parameter.", outputStorage); } - const std::vector result = libsumo::Simulation::findIntermodalRoute(from, to, modes, depart, routingMode, speed, walkFactor, departPos, arrivalPos, departPosLat, ptype, vtype, destStop); - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + const std::vector& result = libsumo::Simulation::findIntermodalRoute(from, to, modes, depart, routingMode, speed, walkFactor, departPos, arrivalPos, departPosLat, ptype, vtype, destStop); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); server.getWrapperStorage().writeInt((int)result.size()); - for (const libsumo::TraCIStage s : result) { + for (const libsumo::TraCIStage& s : result) { writeStage(server.getWrapperStorage(), s); } break; } - case VAR_PARAMETER: { + case libsumo::VAR_PARAMETER: { std::string paramName = ""; if (!server.readTypeCheckingString(inputStorage, paramName)) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::Simulation::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Get Simulation Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, "Get Simulation Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_SIM_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -282,29 +284,29 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != CMD_CLEAR_PENDING_VEHICLES - && variable != CMD_SAVE_SIMSTATE) { - return server.writeErrorStatusCmd(CMD_SET_SIM_VARIABLE, "Set Simulation Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + if (variable != libsumo::CMD_CLEAR_PENDING_VEHICLES + && variable != libsumo::CMD_SAVE_SIMSTATE) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_SIM_VARIABLE, "Set Simulation Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // id std::string id = inputStorage.readString(); // process try { switch (variable) { - case CMD_CLEAR_PENDING_VEHICLES: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_SIM_VARIABLE, "A string is needed for clearing pending vehicles.", outputStorage); } libsumo::Simulation::clearPending(route); } break; - case CMD_SAVE_SIMSTATE: { + case libsumo::CMD_SAVE_SIMSTATE: { //save current simulation state std::string file; if (!server.readTypeCheckingString(inputStorage, file)) { - return server.writeErrorStatusCmd(CMD_SET_SIM_VARIABLE, "A string is needed for saving simulation state.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_SIM_VARIABLE, "A string is needed for saving simulation state.", outputStorage); } libsumo::Simulation::saveState(file); } @@ -313,9 +315,9 @@ break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_SIM_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_SIM_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_SIM_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } @@ -323,7 +325,7 @@ 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.writeUnsignedByte(libsumo::TYPE_INTEGER); outputStorage.writeInt((int) ids.size()); } @@ -331,37 +333,48 @@ 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.writeUnsignedByte(libsumo::TYPE_STRINGLIST); outputStorage.writeStringList(ids); } void TraCIServerAPI_Simulation::writeStage(tcpip::Storage& outputStorage, const libsumo::TraCIStage& stage) { - outputStorage.writeUnsignedByte(TYPE_COMPOUND); - outputStorage.writeInt(6); - outputStorage.writeUnsignedByte(TYPE_INTEGER); + outputStorage.writeUnsignedByte(libsumo::TYPE_COMPOUND); + outputStorage.writeInt(13); + outputStorage.writeUnsignedByte(libsumo::TYPE_INTEGER); outputStorage.writeInt(stage.type); - outputStorage.writeUnsignedByte(TYPE_STRING); + outputStorage.writeUnsignedByte(libsumo::TYPE_STRING); + outputStorage.writeString(stage.vType); + outputStorage.writeUnsignedByte(libsumo::TYPE_STRING); outputStorage.writeString(stage.line); - outputStorage.writeUnsignedByte(TYPE_STRING); + outputStorage.writeUnsignedByte(libsumo::TYPE_STRING); outputStorage.writeString(stage.destStop); - outputStorage.writeUnsignedByte(TYPE_STRINGLIST); + outputStorage.writeUnsignedByte(libsumo::TYPE_STRINGLIST); outputStorage.writeStringList(stage.edges); - outputStorage.writeUnsignedByte(TYPE_DOUBLE); + outputStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); outputStorage.writeDouble(stage.travelTime); - outputStorage.writeUnsignedByte(TYPE_DOUBLE); + outputStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); outputStorage.writeDouble(stage.cost); - outputStorage.writeUnsignedByte(TYPE_STRING); + outputStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); + outputStorage.writeDouble(stage.length); + outputStorage.writeUnsignedByte(libsumo::TYPE_STRING); outputStorage.writeString(stage.intended); - outputStorage.writeUnsignedByte(TYPE_DOUBLE); + outputStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); outputStorage.writeDouble(stage.depart); + outputStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); + outputStorage.writeDouble(stage.departPos); + outputStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); + outputStorage.writeDouble(stage.arrivalPos); + outputStorage.writeUnsignedByte(libsumo::TYPE_STRING); + outputStorage.writeString(stage.description); } bool TraCIServerAPI_Simulation::commandPositionConversion(TraCIServer& server, tcpip::Storage& inputStorage, - tcpip::Storage& outputStorage, int commandId) { + const int compoundSize, tcpip::Storage& outputStorage, + const int commandId) { std::pair roadPos; Position cartesianPos; Position geoPos; @@ -371,86 +384,99 @@ int srcPosType = inputStorage.readUnsignedByte(); switch (srcPosType) { - case POSITION_2D: - case POSITION_3D: - case POSITION_LON_LAT: - case POSITION_LON_LAT_ALT: { - double x = inputStorage.readDouble(); - double y = inputStorage.readDouble(); - if (srcPosType != POSITION_2D && srcPosType != POSITION_LON_LAT) { + case libsumo::POSITION_2D: + case libsumo::POSITION_3D: + case libsumo::POSITION_LON_LAT: + case libsumo::POSITION_LON_LAT_ALT: { + const double x = inputStorage.readDouble(); + const double y = inputStorage.readDouble(); + if (srcPosType != libsumo::POSITION_2D && srcPosType != libsumo::POSITION_LON_LAT) { z = inputStorage.readDouble(); } geoPos.set(x, y); cartesianPos.set(x, y); - if (srcPosType == POSITION_LON_LAT || srcPosType == POSITION_LON_LAT_ALT) { + if (srcPosType == libsumo::POSITION_LON_LAT || srcPosType == libsumo::POSITION_LON_LAT_ALT) { GeoConvHelper::getFinal().x2cartesian_const(cartesianPos); } else { GeoConvHelper::getFinal().cartesian2geo(geoPos); } } break; - case POSITION_ROADMAP: { - std::string roadID = inputStorage.readString(); - double pos = inputStorage.readDouble(); - int laneIdx = inputStorage.readUnsignedByte(); + case libsumo::POSITION_ROADMAP: { + const std::string roadID = inputStorage.readString(); + const double pos = inputStorage.readDouble(); + const int laneIdx = inputStorage.readUnsignedByte(); try { // convert edge,offset,laneIdx to cartesian position cartesianPos = geoPos = libsumo::Helper::getLaneChecking(roadID, laneIdx, pos)->getShape().positionAtOffset(pos); z = cartesianPos.z(); GeoConvHelper::getFinal().cartesian2geo(geoPos); } catch (libsumo::TraCIException& e) { - server.writeStatusCmd(commandId, RTYPE_ERR, e.what()); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, e.what()); return false; } } break; default: - server.writeStatusCmd(commandId, RTYPE_ERR, "Source position type not supported"); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, "Source position type not supported"); return false; } int destPosType = 0; if (!server.readTypeCheckingUnsignedByte(inputStorage, destPosType)) { - server.writeStatusCmd(commandId, RTYPE_ERR, "Destination position type must be of type ubyte."); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, "Destination position type must be of type ubyte."); return false; } + SUMOVehicleClass vClass = SVC_IGNORING; + if (compoundSize == 3) { + inputStorage.readUnsignedByte(); + const std::string& vClassString = inputStorage.readString(); + if (!SumoVehicleClassStrings.hasString(vClassString)) { + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, "Unknown vehicle class '" + vClassString + "'."); + return false; + } + vClass = SumoVehicleClassStrings.get(vClassString); + } + switch (destPosType) { - case POSITION_ROADMAP: { + case libsumo::POSITION_ROADMAP: { // convert cartesion position to edge,offset,lane_index - roadPos = libsumo::Helper::convertCartesianToRoadMap(cartesianPos); + roadPos = libsumo::Helper::convertCartesianToRoadMap(cartesianPos, vClass); + if (roadPos.first == nullptr) { + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, "No matching lane found."); + return false; + } // write result that is added to response msg - outputStorage.writeUnsignedByte(POSITION_ROADMAP); + outputStorage.writeUnsignedByte(libsumo::POSITION_ROADMAP); outputStorage.writeString(roadPos.first->getEdge().getID()); outputStorage.writeDouble(roadPos.second); - const std::vector lanes = roadPos.first->getEdge().getLanes(); - outputStorage.writeUnsignedByte((int)distance(lanes.begin(), find(lanes.begin(), lanes.end(), roadPos.first))); + outputStorage.writeUnsignedByte(roadPos.first->getIndex()); } break; - case POSITION_2D: - case POSITION_3D: - case POSITION_LON_LAT: - case POSITION_LON_LAT_ALT: + case libsumo::POSITION_2D: + case libsumo::POSITION_3D: + case libsumo::POSITION_LON_LAT: + case libsumo::POSITION_LON_LAT_ALT: outputStorage.writeUnsignedByte(destPosType); - if (destPosType == POSITION_LON_LAT || destPosType == POSITION_LON_LAT_ALT) { + if (destPosType == libsumo::POSITION_LON_LAT || destPosType == libsumo::POSITION_LON_LAT_ALT) { outputStorage.writeDouble(geoPos.x()); outputStorage.writeDouble(geoPos.y()); } else { outputStorage.writeDouble(cartesianPos.x()); outputStorage.writeDouble(cartesianPos.y()); } - if (destPosType != POSITION_2D && destPosType != POSITION_LON_LAT) { + if (destPosType != libsumo::POSITION_2D && destPosType != libsumo::POSITION_LON_LAT) { outputStorage.writeDouble(z); } break; default: - server.writeStatusCmd(commandId, RTYPE_ERR, "Destination position type not supported"); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, "Destination position type not supported"); return false; } return true; } -/****************************************************************************/ bool TraCIServerAPI_Simulation::commandDistanceRequest(TraCIServer& server, tcpip::Storage& inputStorage, @@ -463,60 +489,60 @@ // read position 1 int posType = inputStorage.readUnsignedByte(); switch (posType) { - case POSITION_ROADMAP: + case libsumo::POSITION_ROADMAP: try { std::string roadID = inputStorage.readString(); roadPos1.second = inputStorage.readDouble(); roadPos1.first = libsumo::Helper::getLaneChecking(roadID, inputStorage.readUnsignedByte(), roadPos1.second); pos1 = roadPos1.first->getShape().positionAtOffset(roadPos1.second); } catch (libsumo::TraCIException& e) { - server.writeStatusCmd(commandId, RTYPE_ERR, e.what()); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, e.what()); return false; } break; - case POSITION_2D: - case POSITION_3D: { + case libsumo::POSITION_2D: + case libsumo::POSITION_3D: { double p1x = inputStorage.readDouble(); double p1y = inputStorage.readDouble(); pos1.set(p1x, p1y); } - if (posType == POSITION_3D) { + if (posType == libsumo::POSITION_3D) { inputStorage.readDouble();// z value is ignored } - roadPos1 = libsumo::Helper::convertCartesianToRoadMap(pos1); + roadPos1 = libsumo::Helper::convertCartesianToRoadMap(pos1, SVC_IGNORING); break; default: - server.writeStatusCmd(commandId, RTYPE_ERR, "Unknown position format used for distance request"); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, "Unknown position format used for distance request"); return false; } // read position 2 posType = inputStorage.readUnsignedByte(); switch (posType) { - case POSITION_ROADMAP: + case libsumo::POSITION_ROADMAP: try { std::string roadID = inputStorage.readString(); roadPos2.second = inputStorage.readDouble(); roadPos2.first = libsumo::Helper::getLaneChecking(roadID, inputStorage.readUnsignedByte(), roadPos2.second); pos2 = roadPos2.first->getShape().positionAtOffset(roadPos2.second); } catch (libsumo::TraCIException& e) { - server.writeStatusCmd(commandId, RTYPE_ERR, e.what()); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, e.what()); return false; } break; - case POSITION_2D: - case POSITION_3D: { + case libsumo::POSITION_2D: + case libsumo::POSITION_3D: { double p2x = inputStorage.readDouble(); double p2y = inputStorage.readDouble(); pos2.set(p2x, p2y); } - if (posType == POSITION_3D) { + if (posType == libsumo::POSITION_3D) { inputStorage.readDouble();// z value is ignored } - roadPos2 = libsumo::Helper::convertCartesianToRoadMap(pos2); + roadPos2 = libsumo::Helper::convertCartesianToRoadMap(pos2, SVC_IGNORING); break; default: - server.writeStatusCmd(commandId, RTYPE_ERR, "Unknown position format used for distance request"); + server.writeStatusCmd(commandId, libsumo::RTYPE_ERR, "Unknown position format used for distance request"); return false; } @@ -524,29 +550,33 @@ int distType = inputStorage.readUnsignedByte(); double distance = 0.0; - if (distType == REQUEST_DRIVINGDIST) { + if (distType == libsumo::REQUEST_DRIVINGDIST) { // compute driving distance if ((roadPos1.first == roadPos2.first) && (roadPos1.second <= roadPos2.second)) { // same edge distance = roadPos2.second - roadPos1.second; } else { ConstMSEdgeVector newRoute; - if (roadPos2.first->isInternal()) { - distance = roadPos2.second; + while (roadPos2.first->isInternal() && roadPos2.first != roadPos1.first) { + distance += roadPos2.second; roadPos2.first = roadPos2.first->getLogicalPredecessorLane(); roadPos2.second = roadPos2.first->getLength(); } MSNet::getInstance()->getRouterTT().compute( - &roadPos1.first->getEdge(), &roadPos2.first->getEdge(), nullptr, MSNet::getInstance()->getCurrentTimeStep(), newRoute); - MSRoute route("", newRoute, false, nullptr, std::vector()); - distance += route.getDistanceBetween(roadPos1.second, roadPos2.second, &roadPos1.first->getEdge(), &roadPos2.first->getEdge()); + &roadPos1.first->getEdge(), &roadPos2.first->getEdge(), nullptr, MSNet::getInstance()->getCurrentTimeStep(), newRoute, true); + if (newRoute.size() == 0) { + distance = libsumo::INVALID_DOUBLE_VALUE; + } else { + MSRoute route("", newRoute, false, nullptr, std::vector()); + distance += route.getDistanceBetween(roadPos1.second, roadPos2.second, &roadPos1.first->getEdge(), &roadPos2.first->getEdge()); + } } } else { // compute air distance (default) distance = pos1.distanceTo(pos2); } // write response command - outputStorage.writeUnsignedByte(TYPE_DOUBLE); + outputStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); outputStorage.writeDouble(distance); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Simulation.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -59,6 +59,7 @@ tcpip::Storage& outputStorage); +private: /** * Converts a road map position to a cartesian position * @@ -67,12 +68,12 @@ */ static bool commandPositionConversion(TraCIServer& server, tcpip::Storage& inputStorage, - tcpip::Storage& outputStorage, int commandId); + const int compoundSize, tcpip::Storage& outputStorage, + const int commandId); static bool commandDistanceRequest(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, int commandId); -private: static void writeVehicleStateNumber(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state); static void writeVehicleStateIDs(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state); static void writeStage(tcpip::Storage& outputStorage, const libsumo::TraCIStage& stage); diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.cpp 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,8 +28,8 @@ #include #include #include +#include #include -#include "TraCIConstants.h" #include "TraCIServerAPI_TrafficLight.h" @@ -41,48 +41,54 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_TL_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_TL_VARIABLE, variable, id); try { if (!libsumo::TrafficLight::handleVariable(id, variable, &server)) { switch (variable) { - case TL_COMPLETE_DEFINITION_RYG: { + case libsumo::TL_COMPLETE_DEFINITION_RYG: { std::vector logics = libsumo::TrafficLight::getCompleteRedYellowGreenDefinition(id); tcpip::Storage& storage = server.getWrapperStorage(); - storage.writeUnsignedByte(TYPE_COMPOUND); + storage.writeUnsignedByte(libsumo::TYPE_COMPOUND); storage.writeInt((int)logics.size()); for (const libsumo::TraCILogic& logic : logics) { - storage.writeUnsignedByte(TYPE_COMPOUND); + storage.writeUnsignedByte(libsumo::TYPE_COMPOUND); storage.writeInt(5); - storage.writeUnsignedByte(TYPE_STRING); + storage.writeUnsignedByte(libsumo::TYPE_STRING); storage.writeString(logic.programID); // type - storage.writeUnsignedByte(TYPE_INTEGER); + storage.writeUnsignedByte(libsumo::TYPE_INTEGER); storage.writeInt(logic.type); // (current) phase index - storage.writeUnsignedByte(TYPE_INTEGER); + storage.writeUnsignedByte(libsumo::TYPE_INTEGER); storage.writeInt(logic.currentPhaseIndex); // phase number - storage.writeUnsignedByte(TYPE_COMPOUND); + storage.writeUnsignedByte(libsumo::TYPE_COMPOUND); storage.writeInt((int)logic.phases.size()); for (const libsumo::TraCIPhase& phase : logic.phases) { - storage.writeUnsignedByte(TYPE_COMPOUND); - storage.writeInt(5); - storage.writeUnsignedByte(TYPE_DOUBLE); + storage.writeUnsignedByte(libsumo::TYPE_COMPOUND); + storage.writeInt(6); + storage.writeUnsignedByte(libsumo::TYPE_DOUBLE); storage.writeDouble(phase.duration); - storage.writeUnsignedByte(TYPE_STRING); + storage.writeUnsignedByte(libsumo::TYPE_STRING); storage.writeString(phase.state); - storage.writeUnsignedByte(TYPE_DOUBLE); + storage.writeUnsignedByte(libsumo::TYPE_DOUBLE); storage.writeDouble(phase.minDur); - storage.writeUnsignedByte(TYPE_DOUBLE); + storage.writeUnsignedByte(libsumo::TYPE_DOUBLE); storage.writeDouble(phase.maxDur); - storage.writeUnsignedByte(TYPE_INTEGER); - storage.writeInt(phase.next); + storage.writeUnsignedByte(libsumo::TYPE_COMPOUND); + storage.writeInt((int)phase.next.size()); + for (int n : phase.next) { + storage.writeUnsignedByte(libsumo::TYPE_INTEGER); + storage.writeInt(n); + } + storage.writeUnsignedByte(libsumo::TYPE_STRING); + storage.writeString(phase.name); } // subparameter - storage.writeUnsignedByte(TYPE_COMPOUND); + storage.writeUnsignedByte(libsumo::TYPE_COMPOUND); storage.writeInt((int)logic.subParameter.size()); for (const auto& item : logic.subParameter) { - storage.writeUnsignedByte(TYPE_STRINGLIST); + storage.writeUnsignedByte(libsumo::TYPE_STRINGLIST); storage.writeInt(2); storage.writeString(item.first); storage.writeString(item.second); @@ -90,19 +96,19 @@ } break; } - case TL_CONTROLLED_LINKS: { + case libsumo::TL_CONTROLLED_LINKS: { const std::vector > links = libsumo::TrafficLight::getControlledLinks(id); - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); tcpip::Storage tempContent; int cnt = 0; - tempContent.writeUnsignedByte(TYPE_INTEGER); + tempContent.writeUnsignedByte(libsumo::TYPE_INTEGER); tempContent.writeInt((int)links.size()); for (const std::vector& sublinks : links) { - tempContent.writeUnsignedByte(TYPE_INTEGER); + tempContent.writeUnsignedByte(libsumo::TYPE_INTEGER); tempContent.writeInt((int)sublinks.size()); ++cnt; for (const libsumo::TraCILink& link : sublinks) { - tempContent.writeUnsignedByte(TYPE_STRINGLIST); + tempContent.writeUnsignedByte(libsumo::TYPE_STRINGLIST); tempContent.writeStringList(std::vector({ link.fromLane, link.toLane, link.viaLane })); ++cnt; } @@ -111,16 +117,16 @@ server.getWrapperStorage().writeStorage(tempContent); break; } - case VAR_PARAMETER: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_GET_TL_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::TrafficLight::getParameter(id, paramName)); break; } - case TL_EXTERNAL_STATE: { + case libsumo::TL_EXTERNAL_STATE: { if (!MSNet::getInstance()->getTLSControl().knows(id)) { throw libsumo::TraCIException("Traffic light '" + id + "' is not known"); } @@ -134,14 +140,14 @@ } } - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(num * 2); for (std::map::const_iterator i = params.begin(); i != params.end(); ++i) { if ("connection:" != (*i).first.substr(0, 11)) { continue; } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString((*i).second); // foreign id std::string connection = (*i).first.substr(11); std::string from, to; @@ -172,22 +178,22 @@ } } if (fromLane == nullptr) { - return server.writeErrorStatusCmd(CMD_GET_TL_VARIABLE, "Could not find edge or lane '" + from + "' in traffic light '" + id + "'.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_TL_VARIABLE, "Could not find edge or lane '" + from + "' in traffic light '" + id + "'.", outputStorage); } int pos = (int)std::distance(lanes.begin(), j); - server.getWrapperStorage().writeUnsignedByte(TYPE_UBYTE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_UBYTE); server.getWrapperStorage().writeUnsignedByte(state[pos]); // state } break; } default: - return server.writeErrorStatusCmd(CMD_GET_TL_VARIABLE, "Get TLS Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_TL_VARIABLE, "Get TLS Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_TL_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_TL_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_TL_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_TL_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -199,93 +205,121 @@ std::string warning = ""; // additional description for response // variable const 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 - && variable != VAR_PARAMETER) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "Change TLS State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + if (variable != libsumo::TL_PHASE_INDEX && variable != libsumo::TL_PROGRAM && variable != libsumo::TL_PHASE_DURATION + && variable != libsumo::TL_RED_YELLOW_GREEN_STATE && variable != libsumo::TL_COMPLETE_PROGRAM_RYG + && variable != libsumo::VAR_NAME + && variable != libsumo::VAR_PARAMETER) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "Change TLS State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } const std::string id = inputStorage.readString(); try { switch (variable) { - case TL_PHASE_INDEX: { + case libsumo::TL_PHASE_INDEX: { int index = 0; if (!server.readTypeCheckingInt(inputStorage, index)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "The phase index must be given as an integer.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "The phase index must be given as an integer.", outputStorage); } libsumo::TrafficLight::setPhase(id, index); } break; - case TL_PROGRAM: { + case libsumo::VAR_NAME: { + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "The phase name must be given as a string.", outputStorage); + } + libsumo::TrafficLight::setPhaseName(id, name); + } + break; + case libsumo::TL_PROGRAM: { std::string subID; if (!server.readTypeCheckingString(inputStorage, subID)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "The program must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "The program must be given as a string.", outputStorage); } libsumo::TrafficLight::setProgram(id, subID); } break; - case TL_PHASE_DURATION: { + case libsumo::TL_PHASE_DURATION: { double duration = 0.; if (!server.readTypeCheckingDouble(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "The phase duration must be given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "The phase duration must be given as a double.", outputStorage); } libsumo::TrafficLight::setPhaseDuration(id, duration); } break; - case TL_RED_YELLOW_GREEN_STATE: { + case libsumo::TL_RED_YELLOW_GREEN_STATE: { std::string state; if (!server.readTypeCheckingString(inputStorage, state)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "The phase must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "The phase must be given as a string.", outputStorage); } libsumo::TrafficLight::setRedYellowGreenState(id, state); } break; - case TL_COMPLETE_PROGRAM_RYG: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "A compound object is needed for setting a new program.", outputStorage); + case libsumo::TL_COMPLETE_PROGRAM_RYG: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "A compound object is needed for setting a new program.", outputStorage); } //read itemNo inputStorage.readInt(); libsumo::TraCILogic logic; if (!server.readTypeCheckingString(inputStorage, logic.programID)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 1. parameter (programID) must be a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 1. parameter (programID) must be a string.", outputStorage); } if (!server.readTypeCheckingInt(inputStorage, logic.type)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 2. parameter (type) must be an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 2. parameter (type) must be an int.", outputStorage); } if (!server.readTypeCheckingInt(inputStorage, logic.currentPhaseIndex)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 3. parameter (index) must be an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 3. parameter (index) must be an int.", outputStorage); } - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "A compound object is needed for the phases.", outputStorage); + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "A compound object is needed for the phases.", outputStorage); } const int numPhases = inputStorage.readInt(); for (int j = 0; j < numPhases; ++j) { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "A compound object is needed for every phase.", outputStorage); + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "A compound object is needed for every phase.", outputStorage); + } + int items = inputStorage.readInt(); + if (items != 6 && items != 5) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "A phase compound object requires 5 or 6 items.", outputStorage); } - inputStorage.readInt(); double duration = 0., minDuration = 0., maxDuration = 0.; - int next = -1; + std::vector next; + std::string name; if (!server.readTypeCheckingDouble(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 4.1. parameter (duration) must be a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 4.1. parameter (duration) must be a double.", outputStorage); } std::string state; if (!server.readTypeCheckingString(inputStorage, state)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 4.2. parameter (phase) must be a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 4.2. parameter (phase) must be a string.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, minDuration)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 4.3. parameter (min duration) must be a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 4.3. parameter (min duration) must be a double.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, maxDuration)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 4.4. parameter (max duration) must be a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 4.4. parameter (max duration) must be a double.", outputStorage); } - if (!server.readTypeCheckingInt(inputStorage, next)) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 4.5. parameter (next) must be an int.", outputStorage); + auto tmp = inputStorage.readUnsignedByte(); + if (tmp != libsumo::TYPE_COMPOUND) { + std::cout << " byte:" << tmp << "\n"; + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program 4.5 parameter (next) must be a compound (list of ints).", outputStorage); + } + const int numNext = inputStorage.readInt(); + for (int k = 0; k < numNext; k++) { + int tmp; + if (!server.readTypeCheckingInt(inputStorage, tmp)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 4.5. parameter (next) must be a list of int.", outputStorage); + } + next.push_back(tmp); + } + if (items == 6) { + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 4.6. parameter (name) must be a string.", outputStorage); + } } - logic.phases.emplace_back(libsumo::TraCIPhase(duration, state, minDuration, maxDuration, next)); + logic.phases.emplace_back(libsumo::TraCIPhase(duration, state, minDuration, maxDuration, next, name)); } - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "set program: 5. parameter (subparams) must be a compound object.", outputStorage); + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "set program: 5. parameter (subparams) must be a compound object.", outputStorage); } const int numParams = inputStorage.readInt(); for (int j = 0; j < numParams; j++) { @@ -296,19 +330,19 @@ libsumo::TrafficLight::setCompleteRedYellowGreenDefinition(id, logic); } 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); + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); } //read 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); + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } libsumo::TrafficLight::setParameter(id, name, value); } @@ -317,9 +351,9 @@ break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_TL_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_TL_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_TL_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_TrafficLight.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -15,6 +15,7 @@ /// @author Bjoern Hendriks /// @author Mario Krumnow /// @author Jakob Erdmann +/// @author Leonhard Luecken /// @author Robert Hilbrich /// @author Lara Codeca /// @date 07.05.2009 @@ -38,14 +39,14 @@ #include #include #include -#include -#include +#include +#include #include #include #include +#include #include #include -#include "TraCIConstants.h" #include "TraCIServerAPI_Simulation.h" #include "TraCIServerAPI_Vehicle.h" #include "TraCIServerAPI_VehicleType.h" @@ -59,92 +60,92 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_VEHICLE_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_VEHICLE_VARIABLE, variable, id); try { if (!libsumo::Vehicle::handleVariable(id, variable, &server) && !libsumo::VehicleType::handleVariable(libsumo::Vehicle::getTypeID(id), variable, &server)) { switch (variable) { - case VAR_LEADER: { + case libsumo::VAR_LEADER: { double dist = 0; if (!server.readTypeCheckingDouble(inputStorage, dist)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Leader retrieval requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Leader retrieval requires a double.", outputStorage); } std::pair leaderInfo = libsumo::Vehicle::getLeader(id, dist); - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); server.getWrapperStorage().writeInt(2); - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(leaderInfo.first); - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(leaderInfo.second); break; } - case VAR_EDGE_TRAVELTIME: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires a compound object.", outputStorage); + case libsumo::VAR_EDGE_TRAVELTIME: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires a compound object.", outputStorage); } if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires time and edge as parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires time and edge as parameter.", outputStorage); } double time = 0.; if (!server.readTypeCheckingDouble(inputStorage, time)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires the referenced time as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires the referenced time as first parameter.", outputStorage); } // edge std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires the referenced edge as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires the referenced edge as second parameter.", outputStorage); } // retrieve - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(libsumo::Vehicle::getAdaptedTraveltime(id, time, edgeID)); break; } - case VAR_EDGE_EFFORT: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires a compound object.", outputStorage); + case libsumo::VAR_EDGE_EFFORT: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires a compound object.", outputStorage); } if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires time and edge as parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires time and edge as parameter.", outputStorage); } double time = 0.; if (!server.readTypeCheckingDouble(inputStorage, time)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires the referenced time as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires the referenced time as first parameter.", outputStorage); } // edge std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires the referenced edge as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of effort requires the referenced edge as second parameter.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(libsumo::Vehicle::getEffort(id, time, edgeID)); break; } - case VAR_BEST_LANES: { - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + case libsumo::VAR_BEST_LANES: { + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); tcpip::Storage tempContent; int cnt = 0; - tempContent.writeUnsignedByte(TYPE_INTEGER); + tempContent.writeUnsignedByte(libsumo::TYPE_INTEGER); std::vector bestLanes = libsumo::Vehicle::getBestLanes(id); tempContent.writeInt((int)bestLanes.size()); ++cnt; for (std::vector::const_iterator i = bestLanes.begin(); i != bestLanes.end(); ++i) { const libsumo::TraCIBestLanesData& bld = *i; - tempContent.writeUnsignedByte(TYPE_STRING); + tempContent.writeUnsignedByte(libsumo::TYPE_STRING); tempContent.writeString(bld.laneID); ++cnt; - tempContent.writeUnsignedByte(TYPE_DOUBLE); + tempContent.writeUnsignedByte(libsumo::TYPE_DOUBLE); tempContent.writeDouble(bld.length); ++cnt; - tempContent.writeUnsignedByte(TYPE_DOUBLE); + tempContent.writeUnsignedByte(libsumo::TYPE_DOUBLE); tempContent.writeDouble(bld.occupation); ++cnt; - tempContent.writeUnsignedByte(TYPE_BYTE); + tempContent.writeUnsignedByte(libsumo::TYPE_BYTE); tempContent.writeByte(bld.bestLaneOffset); ++cnt; - tempContent.writeUnsignedByte(TYPE_UBYTE); + tempContent.writeUnsignedByte(libsumo::TYPE_UBYTE); bld.allowsContinuation ? tempContent.writeUnsignedByte(1) : tempContent.writeUnsignedByte(0); ++cnt; - tempContent.writeUnsignedByte(TYPE_STRINGLIST); + tempContent.writeUnsignedByte(libsumo::TYPE_STRINGLIST); tempContent.writeStringList(bld.continuationLanes); ++cnt; } @@ -152,54 +153,54 @@ server.getWrapperStorage().writeStorage(tempContent); break; } - case VAR_NEXT_TLS: { + case libsumo::VAR_NEXT_TLS: { std::vector nextTLS = libsumo::Vehicle::getNextTLS(id); - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); const int cnt = 1 + (int)nextTLS.size() * 4; server.getWrapperStorage().writeInt(cnt); - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt((int)nextTLS.size()); for (std::vector::iterator it = nextTLS.begin(); it != nextTLS.end(); ++it) { - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(it->id); - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(it->tlIndex); - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(it->dist); - server.getWrapperStorage().writeUnsignedByte(TYPE_BYTE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_BYTE); server.getWrapperStorage().writeByte(it->state); } break; } - case VAR_NEXT_STOPS: { + case libsumo::VAR_NEXT_STOPS: { std::vector nextStops = libsumo::Vehicle::getNextStops(id); - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); const int cnt = 1 + (int)nextStops.size() * 4; server.getWrapperStorage().writeInt(cnt); - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt((int)nextStops.size()); for (std::vector::iterator it = nextStops.begin(); it != nextStops.end(); ++it) { - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(it->lane); - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(it->endPos); - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(it->stoppingPlaceID); - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(it->stopFlags); - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(it->duration); - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(it->until); } break; } - case DISTANCE_REQUEST: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of distance requires a compound object.", outputStorage); + case libsumo::DISTANCE_REQUEST: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of distance requires a compound object.", outputStorage); } if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of distance requires position and distance type as parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of distance requires position and distance type as parameter.", outputStorage); } double edgePos; @@ -208,69 +209,83 @@ // read position int posType = inputStorage.readUnsignedByte(); switch (posType) { - case POSITION_ROADMAP: + case libsumo::POSITION_ROADMAP: try { std::string roadID = inputStorage.readString(); edgePos = inputStorage.readDouble(); laneIndex = inputStorage.readUnsignedByte(); - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(libsumo::Vehicle::getDrivingDistance(id, roadID, edgePos, laneIndex)); break; } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, e.what(), outputStorage); } - case POSITION_2D: - case POSITION_3D: { + case libsumo::POSITION_2D: + case libsumo::POSITION_3D: { const double p1x = inputStorage.readDouble(); const double p1y = inputStorage.readDouble(); - if (posType == POSITION_3D) { + if (posType == libsumo::POSITION_3D) { inputStorage.readDouble(); // z value is ignored } - server.getWrapperStorage().writeUnsignedByte(TYPE_DOUBLE); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_DOUBLE); server.getWrapperStorage().writeDouble(libsumo::Vehicle::getDrivingDistance2D(id, p1x, p1y)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Unknown position format used for distance request", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Unknown position format used for distance request", outputStorage); } // read distance type int distType = inputStorage.readUnsignedByte(); - if (distType != REQUEST_DRIVINGDIST) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Only driving distance is supported for vehicles.", outputStorage); + if (distType != libsumo::REQUEST_DRIVINGDIST) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Only driving distance is supported for vehicles.", outputStorage); } break; } - case CMD_CHANGELANE: { + case libsumo::CMD_CHANGELANE: { int direction = 0; if (!server.readTypeCheckingInt(inputStorage, direction)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of lane change state requires a direction as int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of lane change state requires a direction as int.", outputStorage); } const std::pair state = libsumo::Vehicle::getLaneChangeState(id, direction); - server.getWrapperStorage().writeUnsignedByte(TYPE_COMPOUND); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); server.getWrapperStorage().writeInt(2); - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(state.first); - server.getWrapperStorage().writeUnsignedByte(TYPE_INTEGER); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_INTEGER); server.getWrapperStorage().writeInt(state.second); break; } - case VAR_PARAMETER: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::Vehicle::getParameter(id, paramName)); break; } + case libsumo::VAR_NEIGHBORS: { + int mode; + if (!server.readTypeCheckingUnsignedByte(inputStorage, mode)) { + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Retrieval of neighboring vehicles needs bitset to specify mode.", outputStorage); + } + const std::map neighVehicles = libsumo::Vehicle::getNeighbors(id, mode); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_COMPOUND); + server.getWrapperStorage().writeInt((int)neighVehicles.size()); + for (auto& p : neighVehicles) { + server.getWrapperStorage().writeString(p.first->getID()); + server.getWrapperStorage().writeDouble(p.second); + } + break; + } default: - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Get Vehicle Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Get Vehicle Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_VEHICLE_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -282,156 +297,157 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != CMD_STOP && variable != CMD_CHANGELANE - && variable != CMD_REROUTE_TO_PARKING - && variable != CMD_CHANGESUBLANE && variable != CMD_OPENGAP - && variable != CMD_SLOWDOWN && variable != CMD_CHANGETARGET && variable != CMD_RESUME - && variable != VAR_TYPE && variable != VAR_ROUTE_ID && variable != VAR_ROUTE - && variable != VAR_UPDATE_BESTLANES - && 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_EMISSIONCLASS - && variable != VAR_WIDTH && variable != VAR_MINGAP && variable != VAR_SHAPECLASS - && variable != VAR_ACCEL && variable != VAR_DECEL && variable != VAR_IMPERFECTION - && variable != VAR_APPARENT_DECEL && variable != VAR_EMERGENCY_DECEL - && variable != VAR_ACTIONSTEPLENGTH - && variable != VAR_TAU && variable != VAR_LANECHANGE_MODE - && variable != VAR_SPEED && variable != VAR_SPEEDSETMODE && variable != VAR_COLOR - && variable != ADD && variable != ADD_FULL && variable != REMOVE - && variable != VAR_HEIGHT - && variable != VAR_ROUTING_MODE - && variable != VAR_LATALIGNMENT - && variable != VAR_MAXSPEED_LAT - && variable != VAR_MINGAP_LAT - && variable != VAR_LINE - && variable != VAR_VIA - && variable != MOVE_TO_XY && variable != VAR_PARAMETER/* && variable != VAR_SPEED_TIME_LINE && variable != VAR_LANE_TIME_LINE*/ + if (variable != libsumo::CMD_STOP && variable != libsumo::CMD_CHANGELANE + && variable != libsumo::CMD_REROUTE_TO_PARKING + && variable != libsumo::CMD_CHANGESUBLANE && variable != libsumo::CMD_OPENGAP + && variable != libsumo::CMD_SLOWDOWN && variable != libsumo::CMD_CHANGETARGET && variable != libsumo::CMD_RESUME + && variable != libsumo::VAR_TYPE && variable != libsumo::VAR_ROUTE_ID && variable != libsumo::VAR_ROUTE + && variable != libsumo::VAR_UPDATE_BESTLANES + && variable != libsumo::VAR_EDGE_TRAVELTIME && variable != libsumo::VAR_EDGE_EFFORT + && variable != libsumo::CMD_REROUTE_TRAVELTIME && variable != libsumo::CMD_REROUTE_EFFORT + && variable != libsumo::VAR_SIGNALS && variable != libsumo::VAR_MOVE_TO + && variable != libsumo::VAR_LENGTH && variable != libsumo::VAR_MAXSPEED && variable != libsumo::VAR_VEHICLECLASS + && variable != libsumo::VAR_SPEED_FACTOR && variable != libsumo::VAR_EMISSIONCLASS + && variable != libsumo::VAR_WIDTH && variable != libsumo::VAR_MINGAP && variable != libsumo::VAR_SHAPECLASS + && variable != libsumo::VAR_ACCEL && variable != libsumo::VAR_DECEL && variable != libsumo::VAR_IMPERFECTION + && variable != libsumo::VAR_APPARENT_DECEL && variable != libsumo::VAR_EMERGENCY_DECEL + && variable != libsumo::VAR_ACTIONSTEPLENGTH + && variable != libsumo::VAR_TAU && variable != libsumo::VAR_LANECHANGE_MODE + && variable != libsumo::VAR_SPEED && variable != libsumo::VAR_SPEEDSETMODE && variable != libsumo::VAR_COLOR + && variable != libsumo::ADD && variable != libsumo::ADD_FULL && variable != libsumo::REMOVE + && variable != libsumo::VAR_HEIGHT + && variable != libsumo::VAR_ROUTING_MODE + && variable != libsumo::VAR_LATALIGNMENT + && variable != libsumo::VAR_MAXSPEED_LAT + && variable != libsumo::VAR_MINGAP_LAT + && variable != libsumo::VAR_LINE + && variable != libsumo::VAR_VIA + && variable != libsumo::VAR_HIGHLIGHT + && variable != libsumo::MOVE_TO_XY && variable != libsumo::VAR_PARAMETER/* && variable != libsumo::VAR_SPEED_TIME_LINE && variable != libsumo::VAR_LANE_TIME_LINE*/ ) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Change Vehicle State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Change Vehicle State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } // id std::string id = inputStorage.readString(); #ifdef DEBUG_MOVEXY std::cout << SIMTIME << " processSet veh=" << id << "\n"; #endif - const bool shouldExist = variable != ADD && variable != ADD_FULL; + const bool shouldExist = variable != libsumo::ADD && variable != libsumo::ADD_FULL; SUMOVehicle* sumoVehicle = MSNet::getInstance()->getVehicleControl().getVehicle(id); if (sumoVehicle == nullptr) { if (shouldExist) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Vehicle '" + id + "' is not known", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Vehicle '" + id + "' is not known", outputStorage); } } MSVehicle* v = dynamic_cast(sumoVehicle); if (v == nullptr && shouldExist) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Vehicle '" + id + "' is not a micro-simulation vehicle", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "Vehicle '" + id + "' is not a micro-simulation vehicle", outputStorage); } try { switch (variable) { - case CMD_STOP: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Stop needs a compound object description.", outputStorage); + case libsumo::CMD_STOP: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Stop needs a compound object description.", outputStorage); } int compoundSize = inputStorage.readInt(); if (compoundSize < 4 || compoundSize > 7) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Stop needs a compound object description of four to seven items.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Stop needs a compound object description of four to seven items.", outputStorage); } // read road map position std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first stop parameter must be the edge id given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first stop parameter must be the edge id given as a string.", outputStorage); } double pos = 0; if (!server.readTypeCheckingDouble(inputStorage, pos)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second stop parameter must be the end position along the edge given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The second stop parameter must be the end position along the edge given as a double.", outputStorage); } int laneIndex = 0; if (!server.readTypeCheckingByte(inputStorage, laneIndex)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The third stop parameter must be the lane index given as a byte.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The third stop parameter must be the lane index given as a byte.", outputStorage); } // waitTime - double duration = INVALID_DOUBLE_VALUE; + double duration = libsumo::INVALID_DOUBLE_VALUE; if (!server.readTypeCheckingDouble(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "The fourth stop parameter must be the stopping duration given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLE_VARIABLE, "The fourth stop parameter must be the stopping duration given as a double.", outputStorage); } int stopFlags = 0; if (compoundSize >= 5) { if (!server.readTypeCheckingByte(inputStorage, stopFlags)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The fifth stop parameter must be a byte indicating its parking/triggered status.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fifth stop parameter must be a byte indicating its parking/triggered status.", outputStorage); } } - double startPos = INVALID_DOUBLE_VALUE; + double startPos = libsumo::INVALID_DOUBLE_VALUE; if (compoundSize >= 6) { if (!server.readTypeCheckingDouble(inputStorage, startPos)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The sixth stop parameter must be the start position along the edge given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The sixth stop parameter must be the start position along the edge given as a double.", outputStorage); } } - double until = INVALID_DOUBLE_VALUE; + double until = libsumo::INVALID_DOUBLE_VALUE; if (compoundSize >= 7) { if (!server.readTypeCheckingDouble(inputStorage, until)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The seventh stop parameter must be the minimum departure time given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The seventh stop parameter must be the minimum departure time given as a double.", outputStorage); } } libsumo::Vehicle::setStop(id, edgeID, pos, laneIndex, duration, stopFlags, startPos, until); } break; - case CMD_REROUTE_TO_PARKING: { + case libsumo::CMD_REROUTE_TO_PARKING: { // read variables - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Reroute to stop needs a compound object description.", outputStorage); + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Reroute to stop needs a compound object description.", outputStorage); } int compoundSize = inputStorage.readInt(); if (compoundSize != 1) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Reroute to stop needs a compound object description of 1 item.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Reroute to stop needs a compound object description of 1 item.", outputStorage); } std::string parkingAreaID; if (!server.readTypeCheckingString(inputStorage, parkingAreaID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first reroute to stop parameter must be the parking area id given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first reroute to stop parameter must be the parking area id given as a string.", outputStorage); } libsumo::Vehicle::rerouteParkingArea(id, parkingAreaID); } break; - case CMD_RESUME: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - server.writeStatusCmd(CMD_SET_VEHICLE_VARIABLE, RTYPE_ERR, "Resuming requires a compound object.", outputStorage); + case libsumo::CMD_RESUME: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + server.writeStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::RTYPE_ERR, "Resuming requires a compound object.", outputStorage); return false; } if (inputStorage.readInt() != 0) { - server.writeStatusCmd(CMD_SET_VEHICLE_VARIABLE, RTYPE_ERR, "Resuming should obtain an empty compound object.", outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::RTYPE_ERR, "Resuming should obtain an empty compound object.", outputStorage); return false; } libsumo::Vehicle::resume(id); } break; - case CMD_CHANGELANE: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Lane change needs a compound object description.", outputStorage); + case libsumo::CMD_CHANGELANE: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Lane change needs a compound object description.", outputStorage); } int compounds = inputStorage.readInt(); if (compounds != 3 && compounds != 2) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Lane change needs a compound object description of two or three items.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Lane change needs a compound object description of two or three 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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first lane change parameter must be the lane index given as a byte.", outputStorage); } // duration double duration = 0.; if (!server.readTypeCheckingDouble(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second lane change parameter must be the duration given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The second lane change parameter must be the duration given as a double.", outputStorage); } // relativelanechange int relative = 0; if (compounds == 3) { if (!server.readTypeCheckingByte(inputStorage, relative)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The third lane change parameter must be a Byte for defining whether a relative lane change should be applied.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The third lane change parameter must be a Byte for defining whether a relative lane change should be applied.", outputStorage); } } if ((laneIndex < 0) || (laneIndex >= (int)(v->getEdge()->getLanes().size()) && relative < 1)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "No lane with index '" + toString(laneIndex) + "' on road '" + v->getEdge()->getID() + "'.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "No lane with index '" + toString(laneIndex) + "' on road '" + v->getEdge()->getID() + "'.", outputStorage); } if (relative < 1) { @@ -441,324 +457,330 @@ } } break; - case CMD_CHANGESUBLANE: { + case libsumo::CMD_CHANGESUBLANE: { double latDist = 0; if (!server.readTypeCheckingDouble(inputStorage, latDist)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Sublane-changing requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Sublane-changing requires a double.", outputStorage); } libsumo::Vehicle::changeSublane(id, latDist); } break; - case CMD_SLOWDOWN: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Slow down needs a compound object description.", outputStorage); + case libsumo::CMD_SLOWDOWN: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Slow down needs a compound object description.", outputStorage); } if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Slow down needs a compound object description of two items.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Slow down needs a compound object description of two items.", outputStorage); } double newSpeed = 0; if (!server.readTypeCheckingDouble(inputStorage, newSpeed)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first slow down parameter must be the speed given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first slow down parameter must be the speed given as a double.", outputStorage); } if (newSpeed < 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Speed must not be negative", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Speed must not be negative", outputStorage); } double duration = 0.; if (!server.readTypeCheckingDouble(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second slow down parameter must be the duration given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The second slow down parameter must be the duration given as a double.", outputStorage); } if (duration < 0 || SIMTIME + duration > STEPS2TIME(SUMOTime_MAX - DELTA_T)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid time interval", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Invalid time interval", outputStorage); } libsumo::Vehicle::slowDown(id, newSpeed, duration); } break; - case CMD_CHANGETARGET: { + case libsumo::CMD_CHANGETARGET: { std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Change target requires a string containing the id of the new destination edge as parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Change target requires a string containing the id of the new destination edge as parameter.", outputStorage); } libsumo::Vehicle::changeTarget(id, edgeID); } break; - case CMD_OPENGAP: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Create gap needs a compound object description.", outputStorage); + case libsumo::CMD_OPENGAP: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Create gap needs a compound object description.", outputStorage); } const int nParameter = inputStorage.readInt(); - if (nParameter != 4 && nParameter != 5) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Create gap needs a compound object description of four or five items.", outputStorage); + if (nParameter != 5 && nParameter != 6) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Create gap needs a compound object description of five or six items.", outputStorage); } double newTimeHeadway = 0; if (!server.readTypeCheckingDouble(inputStorage, newTimeHeadway)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first create gap parameter must be the new desired time headway (tau) given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first create gap parameter must be the new desired time headway (tau) given as a double.", outputStorage); } double newSpaceHeadway = 0; if (!server.readTypeCheckingDouble(inputStorage, newSpaceHeadway)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second create gap parameter must be the new desired space headway given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The second create gap parameter must be the new desired space headway given as a double.", outputStorage); } double duration = 0.; if (!server.readTypeCheckingDouble(inputStorage, duration)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The third create gap parameter must be the duration given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The third create gap parameter must be the duration given as a double.", outputStorage); } double changeRate = 0; if (!server.readTypeCheckingDouble(inputStorage, changeRate)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The fourth create gap parameter must be the change rate given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fourth create gap parameter must be the change rate given as a double.", outputStorage); + } + double maxDecel = 0; + if (!server.readTypeCheckingDouble(inputStorage, maxDecel)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fifth create gap parameter must be the maximal braking rate given as a double.", outputStorage); } - if (newTimeHeadway == -1 && newSpaceHeadway == -1 && duration == -1 && changeRate == -1) { + if (newTimeHeadway == -1 && newSpaceHeadway == -1 && duration == -1 && changeRate == -1 && maxDecel == -1) { libsumo::Vehicle::deactivateGapControl(id); } else { if (newTimeHeadway <= 0) { if (newTimeHeadway != -1) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The value for the new desired time headway (tau) must be positive for create gap", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The value for the new desired time headway (tau) must be positive for create gap", outputStorage); } // else if == -1: keep vehicles current headway, see libsumo::Vehicle::openGap } if (newSpaceHeadway < 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The value for the new desired space headway must be non-negative for create gap", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The value for the new desired space headway must be non-negative for create gap", outputStorage); } if ((duration < 0 && duration != -1) || SIMTIME + duration > STEPS2TIME(SUMOTime_MAX - DELTA_T)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid time interval for create gap", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Invalid time interval for create gap", outputStorage); } if (changeRate <= 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The value for the change rate must be positive for create gap", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The value for the change rate must be positive for the openGap command", outputStorage); } - double maxDecel = -1; - if (nParameter == 5) { - if (!server.readTypeCheckingDouble(inputStorage, maxDecel)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The fifth create gap parameter must be the maximal deceleration given as a double.", outputStorage); - } - if (changeRate <= 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The value for the maximal deceleration must be positive for create gap", outputStorage); + if (maxDecel <= 0) { + if (maxDecel != -1) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The value for the maximal braking rate must be positive for the openGap command", outputStorage); + } // else if == -1: don't limit cf model's suggested brake rate, see libsumo::Vehicle::openGap + } + std::string refVehID = ""; + if (nParameter == 6) { + if (!server.readTypeCheckingString(inputStorage, refVehID)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The sixth create gap parameter must be a reference vehicle's ID given as a string.", outputStorage); } } - libsumo::Vehicle::openGap(id, newTimeHeadway, newSpaceHeadway, duration, changeRate, maxDecel); + libsumo::Vehicle::openGap(id, newTimeHeadway, newSpaceHeadway, duration, changeRate, maxDecel, refVehID); } } break; - case VAR_TYPE: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The vehicle type id must be given as a string.", outputStorage); } libsumo::Vehicle::setType(id, vTypeID); } break; - case VAR_ROUTE_ID: { + case libsumo::VAR_ROUTE_ID: { std::string rid; if (!server.readTypeCheckingString(inputStorage, rid)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The route id must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The route id must be given as a string.", outputStorage); } libsumo::Vehicle::setRouteID(id, rid); } break; - case VAR_ROUTE: { + case libsumo::VAR_ROUTE: { std::vector edgeIDs; if (!server.readTypeCheckingStringList(inputStorage, edgeIDs)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "A route must be defined as a list of edge ids.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "A route must be defined as a list of edge ids.", outputStorage); } libsumo::Vehicle::setRoute(id, edgeIDs); } break; - case VAR_EDGE_TRAVELTIME: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time requires a compound object.", outputStorage); + case libsumo::VAR_EDGE_TRAVELTIME: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time requires a compound object.", outputStorage); } int parameterCount = inputStorage.readInt(); std::string edgeID; double begTime = 0.; double endTime = std::numeric_limits::max(); - double value = INVALID_DOUBLE_VALUE; + double value = libsumo::INVALID_DOUBLE_VALUE; if (parameterCount == 4) { // begin time if (!server.readTypeCheckingDouble(inputStorage, begTime)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the begin time as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the begin time as first parameter.", outputStorage); } // begin time if (!server.readTypeCheckingDouble(inputStorage, endTime)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the end time as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the end time as second parameter.", outputStorage); } // edge if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the referenced edge as third parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the referenced edge as third parameter.", outputStorage); } // value if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the travel time as double as fourth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 4 parameters requires the travel time as double as fourth parameter.", outputStorage); } } else if (parameterCount == 2) { // edge if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 2 parameters requires the referenced edge as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 2 parameters requires the referenced edge as first parameter.", outputStorage); } // value if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 2 parameters requires the travel time as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 2 parameters requires the travel time as second parameter.", outputStorage); } } else if (parameterCount == 1) { // edge if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 1 parameter requires the referenced edge as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time using 1 parameter requires the referenced edge as first parameter.", outputStorage); } } else { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting travel time requires 1, 2, or 4 parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting travel time requires 1, 2, or 4 parameters.", outputStorage); } libsumo::Vehicle::setAdaptedTraveltime(id, edgeID, value, begTime, endTime); } break; - case VAR_EDGE_EFFORT: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort requires a compound object.", outputStorage); + case libsumo::VAR_EDGE_EFFORT: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort requires a compound object.", outputStorage); } int parameterCount = inputStorage.readInt(); std::string edgeID; double begTime = 0.; double endTime = std::numeric_limits::max(); - double value = INVALID_DOUBLE_VALUE; + double value = libsumo::INVALID_DOUBLE_VALUE; if (parameterCount == 4) { // begin time if (!server.readTypeCheckingDouble(inputStorage, begTime)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the begin time as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the begin time as first parameter.", outputStorage); } // begin time if (!server.readTypeCheckingDouble(inputStorage, endTime)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the end time as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the end time as second parameter.", outputStorage); } // edge if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the referenced edge as third parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the referenced edge as third parameter.", outputStorage); } // value if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the travel time as fourth parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort using 4 parameters requires the travel time as fourth parameter.", outputStorage); } } else if (parameterCount == 2) { // edge if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort using 2 parameters requires the referenced edge as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort using 2 parameters requires the referenced edge as first parameter.", outputStorage); } if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort using 2 parameters requires the travel time as second parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort using 2 parameters requires the travel time as second parameter.", outputStorage); } } else if (parameterCount == 1) { // edge if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort using 1 parameter requires the referenced edge as first parameter.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort using 1 parameter requires the referenced edge as first parameter.", outputStorage); } } else { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting effort requires 1, 2, or 4 parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting effort requires 1, 2, or 4 parameters.", outputStorage); } // retrieve libsumo::Vehicle::setEffort(id, edgeID, value, begTime, endTime); } break; - case CMD_REROUTE_TRAVELTIME: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Rerouting requires a compound object.", outputStorage); + case libsumo::CMD_REROUTE_TRAVELTIME: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Rerouting requires a compound object.", outputStorage); } if (inputStorage.readInt() != 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Rerouting should obtain an empty compound object.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Rerouting should obtain an empty compound object.", outputStorage); } libsumo::Vehicle::rerouteTraveltime(id); } break; - case CMD_REROUTE_EFFORT: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Rerouting requires a compound object.", outputStorage); + case libsumo::CMD_REROUTE_EFFORT: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Rerouting requires a compound object.", outputStorage); } if (inputStorage.readInt() != 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Rerouting should obtain an empty compound object.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Rerouting should obtain an empty compound object.", outputStorage); } libsumo::Vehicle::rerouteEffort(id); } break; - case VAR_SIGNALS: { + case libsumo::VAR_SIGNALS: { int signals = 0; if (!server.readTypeCheckingInt(inputStorage, signals)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting signals requires an integer.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting signals requires an integer.", outputStorage); } libsumo::Vehicle::setSignals(id, signals); } break; - case VAR_MOVE_TO: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting position requires a compound object.", outputStorage); + case libsumo::VAR_MOVE_TO: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting position requires a compound object.", outputStorage); } if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting position should obtain the lane id and the position.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting position should obtain the lane id and the position.", outputStorage); } // lane ID std::string laneID; if (!server.readTypeCheckingString(inputStorage, laneID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first parameter for setting a position must be the lane ID given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first parameter for setting a position must be the lane ID given as a string.", outputStorage); } // position on lane double position = 0; if (!server.readTypeCheckingDouble(inputStorage, position)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second parameter for setting a position must be the position given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The second parameter for setting a position must be the position given as a double.", outputStorage); } // process libsumo::Vehicle::moveTo(id, laneID, position); } break; - case VAR_SPEED: { + case libsumo::VAR_SPEED: { double speed = 0; if (!server.readTypeCheckingDouble(inputStorage, speed)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting speed requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting speed requires a double.", outputStorage); } libsumo::Vehicle::setSpeed(id, speed); } break; - case VAR_SPEEDSETMODE: { + case libsumo::VAR_SPEEDSETMODE: { int speedMode = 0; if (!server.readTypeCheckingInt(inputStorage, speedMode)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting speed mode requires an integer.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting speed mode requires an integer.", outputStorage); } libsumo::Vehicle::setSpeedMode(id, speedMode); } break; - case VAR_LANECHANGE_MODE: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting lane change mode requires an integer.", outputStorage); } libsumo::Vehicle::setLaneChangeMode(id, laneChangeMode); } break; - case VAR_ROUTING_MODE: { + case libsumo::VAR_ROUTING_MODE: { int routingMode = 0; if (!server.readTypeCheckingInt(inputStorage, routingMode)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting routing mode requires an integer.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting routing mode requires an integer.", outputStorage); } libsumo::Vehicle::setRoutingMode(id, routingMode); } break; - case VAR_COLOR: { + case libsumo::VAR_COLOR: { libsumo::TraCIColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The color must be given using the according type.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The color must be given using the according type.", outputStorage); } libsumo::Vehicle::setColor(id, col); break; } - case ADD: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Adding a vehicle requires a compound object.", outputStorage); + case libsumo::ADD: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Adding a vehicle requires a compound object.", outputStorage); } if (inputStorage.readInt() != 6) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Adding a vehicle needs six parameters.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Adding a vehicle needs six parameters.", outputStorage); } std::string vTypeID; if (!server.readTypeCheckingString(inputStorage, vTypeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "First parameter (type) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "First parameter (type) requires a string.", outputStorage); } std::string routeID; if (!server.readTypeCheckingString(inputStorage, routeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Second parameter (route) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Second parameter (route) requires a string.", outputStorage); } int departCode; if (!server.readTypeCheckingInt(inputStorage, departCode)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Third parameter (depart) requires an integer.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Third parameter (depart) requires an integer.", outputStorage); } std::string depart = toString(STEPS2TIME(departCode)); if (-departCode == DEPART_TRIGGERED) { @@ -771,7 +793,7 @@ double departPosCode; if (!server.readTypeCheckingDouble(inputStorage, departPosCode)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Fourth parameter (position) requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Fourth parameter (position) requires a double.", outputStorage); } std::string departPos = toString(departPosCode); if (-departPosCode == DEPART_POS_RANDOM) { @@ -785,12 +807,12 @@ } else if (-departPosCode == DEPART_POS_LAST) { departPos = "last"; } else if (-departPosCode == DEPART_POS_GIVEN) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid departure position.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Invalid departure position.", outputStorage); } double departSpeedCode; if (!server.readTypeCheckingDouble(inputStorage, departSpeedCode)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Fifth parameter (speed) requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Fifth parameter (speed) requires a double.", outputStorage); } std::string departSpeed = toString(departSpeedCode); if (-departSpeedCode == DEPART_SPEED_RANDOM) { @@ -801,7 +823,7 @@ int departLaneCode; if (!server.readTypeCheckingByte(inputStorage, departLaneCode)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Sixth parameter (lane) requires a byte.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Sixth parameter (lane) requires a byte.", outputStorage); } std::string departLane = toString(departLaneCode); if (-departLaneCode == DEPART_LANE_RANDOM) { @@ -818,203 +840,245 @@ libsumo::Vehicle::add(id, routeID, vTypeID, depart, departLane, departPos, departSpeed); } break; - case ADD_FULL: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Adding a vehicle requires a compound object.", outputStorage); + case libsumo::ADD_FULL: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Adding a fully specified vehicle needs fourteen parameters.", outputStorage); } std::string routeID; if (!server.readTypeCheckingString(inputStorage, routeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Second parameter (route) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Second parameter (route) requires a string.", outputStorage); } std::string vTypeID; if (!server.readTypeCheckingString(inputStorage, vTypeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "First parameter (type) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "First parameter (type) requires a string.", outputStorage); } std::string depart; if (!server.readTypeCheckingString(inputStorage, depart)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Third parameter (depart) requires an string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Third parameter (depart) requires an string.", outputStorage); } std::string departLane; if (!server.readTypeCheckingString(inputStorage, departLane)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Fourth parameter (depart lane) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Fourth parameter (depart lane) requires a string.", outputStorage); } std::string departPos; if (!server.readTypeCheckingString(inputStorage, departPos)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Fifth parameter (depart position) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Fifth parameter (depart position) requires a string.", outputStorage); } std::string departSpeed; if (!server.readTypeCheckingString(inputStorage, departSpeed)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Sixth parameter (depart speed) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Sixth parameter (depart speed) requires a string.", outputStorage); } std::string arrivalLane; if (!server.readTypeCheckingString(inputStorage, arrivalLane)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Seventh parameter (arrival lane) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Seventh parameter (arrival lane) requires a string.", outputStorage); } std::string arrivalPos; if (!server.readTypeCheckingString(inputStorage, arrivalPos)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Eighth parameter (arrival position) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Eighth parameter (arrival position) requires a string.", outputStorage); } std::string arrivalSpeed; if (!server.readTypeCheckingString(inputStorage, arrivalSpeed)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Ninth parameter (arrival speed) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Ninth parameter (arrival speed) requires a string.", outputStorage); } std::string fromTaz; if (!server.readTypeCheckingString(inputStorage, fromTaz)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Tenth parameter (from taz) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Tenth parameter (from taz) requires a string.", outputStorage); } std::string toTaz; if (!server.readTypeCheckingString(inputStorage, toTaz)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Eleventh parameter (to taz) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Eleventh parameter (to taz) requires a string.", outputStorage); } std::string line; if (!server.readTypeCheckingString(inputStorage, line)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Twelth parameter (line) requires a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Twelth parameter (line) requires a string.", outputStorage); } int personCapacity; if (!server.readTypeCheckingInt(inputStorage, personCapacity)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "13th parameter (person capacity) requires an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "13th parameter (person capacity) requires an int.", outputStorage); } int personNumber; if (!server.readTypeCheckingInt(inputStorage, personNumber)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "14th parameter (person number) requires an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "14th parameter (person number) requires an int.", outputStorage); } libsumo::Vehicle::add(id, routeID, vTypeID, depart, departLane, departPos, departSpeed, arrivalLane, arrivalPos, arrivalSpeed, fromTaz, toTaz, line, personCapacity, personNumber); } break; - case REMOVE: { + case libsumo::REMOVE: { int why = 0; if (!server.readTypeCheckingByte(inputStorage, why)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Removing a vehicle requires a byte.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Removing a vehicle requires a byte.", outputStorage); } libsumo::Vehicle::remove(id, (char)why); } break; - case MOVE_TO_XY: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "MoveToXY vehicle requires a compound object.", outputStorage); + case libsumo::MOVE_TO_XY: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "MoveToXY vehicle requires a compound object.", outputStorage); } const int numArgs = inputStorage.readInt(); if (numArgs != 5 && numArgs != 6) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "MoveToXY vehicle should obtain: edgeID, lane, x, y, angle and optionally keepRouteFlag.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "MoveToXY vehicle should obtain: edgeID, lane, x, y, angle and optionally keepRouteFlag.", outputStorage); } // edge ID std::string edgeID; if (!server.readTypeCheckingString(inputStorage, edgeID)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first parameter for moveToXY must be the edge ID given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first parameter for moveToXY must be the edge ID given as a string.", outputStorage); } // lane index int laneNum = 0; if (!server.readTypeCheckingInt(inputStorage, laneNum)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second parameter for moveToXY must be lane given as an int.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The second parameter for moveToXY must be lane given as an int.", outputStorage); } // x double x = 0; if (!server.readTypeCheckingDouble(inputStorage, x)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The third parameter for moveToXY must be the x-position given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The third parameter for moveToXY must be the x-position given as a double.", outputStorage); } // y double y = 0; if (!server.readTypeCheckingDouble(inputStorage, y)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The fourth parameter for moveToXY must be the y-position given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fourth parameter for moveToXY must be the y-position given as a double.", outputStorage); } // angle double angle = 0; if (!server.readTypeCheckingDouble(inputStorage, angle)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The fifth parameter for moveToXY must be the angle given as a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fifth parameter for moveToXY must be the angle given as a double.", outputStorage); } int keepRouteFlag = 1; if (numArgs == 6) { if (!server.readTypeCheckingByte(inputStorage, keepRouteFlag)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The sixth parameter for moveToXY must be the keepRouteFlag given as a byte.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The sixth parameter for moveToXY must be the keepRouteFlag given as a byte.", outputStorage); } } libsumo::Vehicle::moveToXY(id, edgeID, laneNum, x, y, angle, keepRouteFlag); } break; - case VAR_SPEED_FACTOR: { + case libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting speed factor requires a double.", outputStorage); } libsumo::Vehicle::setSpeedFactor(id, factor); } break; - case VAR_LINE: { + case libsumo::VAR_LINE: { std::string line; if (!server.readTypeCheckingString(inputStorage, line)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The line must be given as a string.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The line must be given as a string.", outputStorage); } libsumo::Vehicle::setLine(id, line); } break; - case VAR_VIA: { + case libsumo::VAR_VIA: { std::vector edgeIDs; if (!server.readTypeCheckingStringList(inputStorage, edgeIDs)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Vias must be defined as a list of edge ids.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Vias must be defined as a list of edge ids.", outputStorage); } libsumo::Vehicle::setVia(id, edgeIDs); } 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); + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::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); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); } try { /// XXX but a big try/catch around all retrieval cases libsumo::Vehicle::setParameter(id, name, value); } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); + } + } + break; + case libsumo::VAR_HIGHLIGHT: { + // Highlight the vehicle by adding a tracking polygon. (NOTE: duplicated code exists for POI domain) + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "A compound object is needed for highlighting an object.", outputStorage); + } + int itemNo = inputStorage.readUnsignedByte(); + if (itemNo > 5) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Highlighting an object needs zero to five parameters.", outputStorage); + } + libsumo::TraCIColor col = libsumo::TraCIColor(255, 0, 0); + if (itemNo > 0) { + if (!server.readTypeCheckingColor(inputStorage, col)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first parameter for highlighting must be the highlight color.", outputStorage); + } + } + double size = -1; + if (itemNo > 1) { + if (!server.readTypeCheckingDouble(inputStorage, size)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_POI_VARIABLE, "The second parameter for highlighting must be the highlight size.", outputStorage); + } + } + int alphaMax = -1; + if (itemNo > 2) { + if (!server.readTypeCheckingUnsignedByte(inputStorage, alphaMax)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The third parameter for highlighting must be maximal alpha.", outputStorage); + } + } + double duration = -1; + if (itemNo > 3) { + if (!server.readTypeCheckingDouble(inputStorage, duration)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fourth parameter for highlighting must be the highlight duration.", outputStorage); + } + } + int type = 0; + if (itemNo > 4) { + if (!server.readTypeCheckingUnsignedByte(inputStorage, type)) { + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The fifth parameter for highlighting must be the highlight type id as ubyte.", outputStorage); + } } + libsumo::Vehicle::highlight(id, col, size, alphaMax, duration, type); } break; - case VAR_ACTIONSTEPLENGTH: { + case libsumo::VAR_ACTIONSTEPLENGTH: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting action step length requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting action step length requires a double.", outputStorage); } if (fabs(value) == std::numeric_limits::infinity()) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid action step length.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Invalid action step length.", outputStorage); } bool resetActionOffset = value >= 0.0; libsumo::Vehicle::setActionStepLength(id, fabs(value), resetActionOffset); } break; - case VAR_UPDATE_BESTLANES: { + case libsumo::VAR_UPDATE_BESTLANES: { libsumo::Vehicle::updateBestLanes(id); } break; default: { try { - if (!TraCIServerAPI_VehicleType::setVariable(CMD_SET_VEHICLE_VARIABLE, variable, v->getSingularType().getID(), server, inputStorage, outputStorage)) { + if (!TraCIServerAPI_VehicleType::setVariable(libsumo::CMD_SET_VEHICLE_VARIABLE, variable, v->getSingularType().getID(), server, inputStorage, outputStorage)) { return false; } } catch (ProcessError& e) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); } } break; } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_SET_VEHICLE_VARIABLE, RTYPE_OK, warning, outputStorage); + server.writeStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.h 2018-07-14 22:00:16.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_Vehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,8 +30,8 @@ #include #include #include +#include #include -#include "TraCIConstants.h" #include "TraCIServerAPI_VehicleType.h" @@ -43,30 +43,30 @@ tcpip::Storage& outputStorage) { const int variable = inputStorage.readUnsignedByte(); const std::string id = inputStorage.readString(); - server.initWrapper(RESPONSE_GET_VEHICLETYPE_VARIABLE, variable, id); + server.initWrapper(libsumo::RESPONSE_GET_VEHICLETYPE_VARIABLE, variable, id); try { if (!libsumo::VehicleType::handleVariable(id, variable, &server)) { switch (variable) { - case VAR_PARAMETER: { + case libsumo::VAR_PARAMETER: { std::string paramName = ""; if (!server.readTypeCheckingString(inputStorage, paramName)) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); } - server.getWrapperStorage().writeUnsignedByte(TYPE_STRING); + server.getWrapperStorage().writeUnsignedByte(libsumo::TYPE_STRING); server.getWrapperStorage().writeString(libsumo::VehicleType::getParameter(id, paramName)); break; } default: - return server.writeErrorStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, "Get Vehicle Type Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } } } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, e.what(), outputStorage); } - server.writeStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeStatusCmd(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, server.getWrapperStorage()); return true; } @@ -78,20 +78,20 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != VAR_LENGTH && variable != VAR_MAXSPEED && variable != VAR_VEHICLECLASS - && 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_IMPERFECTION - && variable != VAR_DECEL && variable != VAR_EMERGENCY_DECEL && variable != VAR_APPARENT_DECEL - && variable != VAR_TAU && variable != VAR_COLOR && variable != VAR_ACTIONSTEPLENGTH - && variable != VAR_HEIGHT - && variable != VAR_MINGAP_LAT - && variable != VAR_MAXSPEED_LAT - && variable != VAR_LATALIGNMENT - && variable != VAR_PARAMETER - && variable != COPY + if (variable != libsumo::VAR_LENGTH && variable != libsumo::VAR_MAXSPEED && variable != libsumo::VAR_VEHICLECLASS + && variable != libsumo::VAR_SPEED_FACTOR && variable != libsumo::VAR_SPEED_DEVIATION && variable != libsumo::VAR_EMISSIONCLASS + && variable != libsumo::VAR_WIDTH && variable != libsumo::VAR_MINGAP && variable != libsumo::VAR_SHAPECLASS + && variable != libsumo::VAR_ACCEL && variable != libsumo::VAR_IMPERFECTION + && variable != libsumo::VAR_DECEL && variable != libsumo::VAR_EMERGENCY_DECEL && variable != libsumo::VAR_APPARENT_DECEL + && variable != libsumo::VAR_TAU && variable != libsumo::VAR_COLOR && variable != libsumo::VAR_ACTIONSTEPLENGTH + && variable != libsumo::VAR_HEIGHT + && variable != libsumo::VAR_MINGAP_LAT + && variable != libsumo::VAR_MAXSPEED_LAT + && variable != libsumo::VAR_LATALIGNMENT + && variable != libsumo::VAR_PARAMETER + && variable != libsumo::COPY ) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLETYPE_VARIABLE, + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, "Change Vehicle Type State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage); } @@ -99,19 +99,19 @@ std::string id = inputStorage.readString(); // MSVehicleType* v = libsumo::VehicleType::getVType(id); // if (v == 0) { -// return server.writeErrorStatusCmd(CMD_SET_VEHICLETYPE_VARIABLE, "Vehicle type '" + id + "' is not known", +// return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, "Vehicle type '" + id + "' is not known", // outputStorage); // } // process try { - if (setVariable(CMD_SET_VEHICLETYPE_VARIABLE, variable, id, server, inputStorage, outputStorage)) { - server.writeStatusCmd(CMD_SET_VEHICLETYPE_VARIABLE, RTYPE_OK, warning, outputStorage); + if (setVariable(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, variable, id, server, inputStorage, outputStorage)) { + server.writeStatusCmd(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage); return true; } } catch (ProcessError& e) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLETYPE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, e.what(), outputStorage); } catch (libsumo::TraCIException& e) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLETYPE_VARIABLE, e.what(), outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, e.what(), outputStorage); } return false; } @@ -122,7 +122,7 @@ const std::string& id, TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage) { switch (variable) { - case VAR_LENGTH: { + case libsumo::VAR_LENGTH: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting length requires a double.", outputStorage); @@ -133,7 +133,7 @@ libsumo::VehicleType::setLength(id, value); } break; - case VAR_HEIGHT: { + case libsumo::VAR_HEIGHT: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting height requires a double.", outputStorage); @@ -144,7 +144,7 @@ libsumo::VehicleType::setHeight(id, value); } break; - case VAR_MAXSPEED: { + case libsumo::VAR_MAXSPEED: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting maximum speed requires a double.", outputStorage); @@ -155,7 +155,7 @@ libsumo::VehicleType::setMaxSpeed(id, value); } break; - case VAR_VEHICLECLASS: { + case libsumo::VAR_VEHICLECLASS: { std::string vclass; if (!server.readTypeCheckingString(inputStorage, vclass)) { return server.writeErrorStatusCmd(cmd, "Setting vehicle class requires a string.", outputStorage); @@ -167,7 +167,7 @@ } } break; - case VAR_SPEED_FACTOR: { + case libsumo::VAR_SPEED_FACTOR: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting speed factor requires a double.", outputStorage); @@ -178,7 +178,7 @@ libsumo::VehicleType::setSpeedFactor(id, value); } break; - case VAR_SPEED_DEVIATION: { + case libsumo::VAR_SPEED_DEVIATION: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting speed deviation requires a double.", outputStorage); @@ -189,7 +189,7 @@ libsumo::VehicleType::setSpeedDeviation(id, value); } break; - case VAR_EMISSIONCLASS: { + case libsumo::VAR_EMISSIONCLASS: { std::string eclass; if (!server.readTypeCheckingString(inputStorage, eclass)) { return server.writeErrorStatusCmd(cmd, "Setting emission class requires a string.", outputStorage); @@ -201,7 +201,7 @@ } } break; - case VAR_WIDTH: { + case libsumo::VAR_WIDTH: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting width requires a double.", outputStorage); @@ -212,7 +212,7 @@ libsumo::VehicleType::setWidth(id, value); } break; - case VAR_MINGAP: { + case libsumo::VAR_MINGAP: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting minimum gap requires a double.", outputStorage); @@ -223,7 +223,7 @@ libsumo::VehicleType::setMinGap(id, value); } break; - case VAR_MINGAP_LAT: { + case libsumo::VAR_MINGAP_LAT: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting minimum lateral gap requires a double.", outputStorage); @@ -234,7 +234,7 @@ libsumo::VehicleType::setMinGapLat(id, value); } break; - case VAR_MAXSPEED_LAT: { + case libsumo::VAR_MAXSPEED_LAT: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting maximum lateral speed requires a double.", outputStorage); @@ -245,7 +245,7 @@ libsumo::VehicleType::setMaxSpeedLat(id, value); } break; - case VAR_LATALIGNMENT: { + case libsumo::VAR_LATALIGNMENT: { std::string latAlign; if (!server.readTypeCheckingString(inputStorage, latAlign)) { return server.writeErrorStatusCmd(cmd, "Setting preferred lateral alignment requires a string.", @@ -258,7 +258,7 @@ } } break; - case VAR_SHAPECLASS: { + case libsumo::VAR_SHAPECLASS: { std::string sclass; if (!server.readTypeCheckingString(inputStorage, sclass)) { return server.writeErrorStatusCmd(cmd, "Setting vehicle shape requires a string.", outputStorage); @@ -270,7 +270,7 @@ } } break; - case VAR_ACCEL: { + case libsumo::VAR_ACCEL: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting acceleration requires a double.", outputStorage); @@ -281,7 +281,7 @@ libsumo::VehicleType::setAccel(id, value); } break; - case VAR_DECEL: { + case libsumo::VAR_DECEL: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting deceleration requires a double.", outputStorage); @@ -292,7 +292,7 @@ libsumo::VehicleType::setDecel(id, value); } break; - case VAR_EMERGENCY_DECEL: { + case libsumo::VAR_EMERGENCY_DECEL: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting deceleration requires a double.", outputStorage); @@ -303,7 +303,7 @@ libsumo::VehicleType::setEmergencyDecel(id, value); } break; - case VAR_APPARENT_DECEL: { + case libsumo::VAR_APPARENT_DECEL: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting deceleration requires a double.", outputStorage); @@ -314,19 +314,19 @@ libsumo::VehicleType::setApparentDecel(id, value); } break; - case VAR_ACTIONSTEPLENGTH: { + case libsumo::VAR_ACTIONSTEPLENGTH: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting action step length requires a double.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Setting action step length requires a double.", outputStorage); } if (fabs(value) == std::numeric_limits::infinity()) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid action step length.", outputStorage); + return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Invalid action step length.", outputStorage); } bool resetActionOffset = value >= 0.0; libsumo::VehicleType::setActionStepLength(id, fabs(value), resetActionOffset); } break; - case VAR_IMPERFECTION: { + case libsumo::VAR_IMPERFECTION: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting driver imperfection requires a double.", outputStorage); @@ -337,7 +337,7 @@ libsumo::VehicleType::setImperfection(id, value); } break; - case VAR_TAU: { + case libsumo::VAR_TAU: { double value = 0; if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting headway time requires a double.", outputStorage); @@ -348,7 +348,7 @@ libsumo::VehicleType::setTau(id, value); } break; - case VAR_COLOR: { + case libsumo::VAR_COLOR: { libsumo::TraCIColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { return server.writeErrorStatusCmd(cmd, "The color must be given using the according type.", outputStorage); @@ -356,7 +356,7 @@ libsumo::VehicleType::setColor(id, col); } break; - case COPY: { + case libsumo::COPY: { std::string newTypeID; if (!server.readTypeCheckingString(inputStorage, newTypeID)) { return server.writeErrorStatusCmd(cmd, "copying a vehicle type requires a string.", @@ -365,8 +365,8 @@ libsumo::VehicleType::copy(id, newTypeID); } break; - case VAR_PARAMETER: { - if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + case libsumo::VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) { return server.writeErrorStatusCmd(cmd, "A compound object is needed for setting a parameter.", outputStorage); } diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.h 2018-08-05 22:00:13.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServerAPI_VehicleType.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServer.cpp sumo-1.2.0+dfsg1/src/traci-server/TraCIServer.cpp --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServer.cpp 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -66,7 +66,7 @@ #include #include #include -#include "TraCIConstants.h" +#include #include "TraCIServer.h" #include "TraCIServerAPI_InductionLoop.h" #include "TraCIServerAPI_Junction.h" @@ -90,6 +90,7 @@ //#define DEBUG_MULTI_CLIENTS //#define DEBUG_SUBSCRIPTIONS //#define DEBUG_SUBSCRIPTION_FILTERS +//#define DEBUG_RAW_INPUT // =========================================================================== @@ -113,7 +114,7 @@ bool TraCIServer::wrapDouble(const std::string& /* objID */, const int /* variable */, const double value) { - myWrapperStorage.writeUnsignedByte(TYPE_DOUBLE); + myWrapperStorage.writeUnsignedByte(libsumo::TYPE_DOUBLE); myWrapperStorage.writeDouble(value); return true; } @@ -121,7 +122,7 @@ bool TraCIServer::wrapInt(const std::string& /* objID */, const int /* variable */, const int value) { - myWrapperStorage.writeUnsignedByte(TYPE_INTEGER); + myWrapperStorage.writeUnsignedByte(libsumo::TYPE_INTEGER); myWrapperStorage.writeInt(value); return true; } @@ -129,7 +130,7 @@ bool TraCIServer::wrapString(const std::string& /* objID */, const int /* variable */, const std::string& value) { - myWrapperStorage.writeUnsignedByte(TYPE_STRING); + myWrapperStorage.writeUnsignedByte(libsumo::TYPE_STRING); myWrapperStorage.writeString(value); return true; } @@ -137,7 +138,7 @@ bool TraCIServer::wrapStringList(const std::string& /* objID */, const int /* variable */, const std::vector& value) { - myWrapperStorage.writeUnsignedByte(TYPE_STRINGLIST); + myWrapperStorage.writeUnsignedByte(libsumo::TYPE_STRINGLIST); myWrapperStorage.writeStringList(value); return true; } @@ -145,8 +146,8 @@ bool TraCIServer::wrapPosition(const std::string& /* objID */, const int variable, const libsumo::TraCIPosition& value) { - const bool includeZ = variable == VAR_POSITION3D; - myWrapperStorage.writeUnsignedByte(includeZ ? POSITION_3D : POSITION_2D); + const bool includeZ = variable == libsumo::VAR_POSITION3D; + myWrapperStorage.writeUnsignedByte(includeZ ? libsumo::POSITION_3D : libsumo::POSITION_2D); myWrapperStorage.writeDouble(value.x); myWrapperStorage.writeDouble(value.y); if (includeZ) { @@ -158,7 +159,7 @@ bool TraCIServer::wrapColor(const std::string& /* objID */, const int /* variable */, const libsumo::TraCIColor& value) { - myWrapperStorage.writeUnsignedByte(TYPE_COLOR); + myWrapperStorage.writeUnsignedByte(libsumo::TYPE_COLOR); myWrapperStorage.writeUnsignedByte(value.r); myWrapperStorage.writeUnsignedByte(value.g); myWrapperStorage.writeUnsignedByte(value.b); @@ -167,6 +168,13 @@ } +bool +TraCIServer::wrapRoadPosition(const std::string& /* objID */, const int /* variable */, const libsumo::TraCIRoadPosition& /* value */) { + // this is currently only a placeholder to allow vehicle.subscribeLeader to work with libsumo + return false; +} + + tcpip::Storage& TraCIServer::getWrapperStorage() { return myWrapperStorage; @@ -192,33 +200,33 @@ myVehicleStateChanges[MSNet::VEHICLE_STATE_COLLISION] = std::vector(); myVehicleStateChanges[MSNet::VEHICLE_STATE_EMERGENCYSTOP] = std::vector(); - myExecutors[CMD_GET_INDUCTIONLOOP_VARIABLE] = &TraCIServerAPI_InductionLoop::processGet; - myExecutors[CMD_GET_LANEAREA_VARIABLE] = &TraCIServerAPI_LaneArea::processGet; - myExecutors[CMD_GET_MULTIENTRYEXIT_VARIABLE] = &TraCIServerAPI_MultiEntryExit::processGet; - - myExecutors[CMD_GET_TL_VARIABLE] = &TraCIServerAPI_TrafficLight::processGet; - myExecutors[CMD_SET_TL_VARIABLE] = &TraCIServerAPI_TrafficLight::processSet; - myExecutors[CMD_GET_LANE_VARIABLE] = &TraCIServerAPI_Lane::processGet; - myExecutors[CMD_SET_LANE_VARIABLE] = &TraCIServerAPI_Lane::processSet; - myExecutors[CMD_GET_VEHICLE_VARIABLE] = &TraCIServerAPI_Vehicle::processGet; - myExecutors[CMD_SET_VEHICLE_VARIABLE] = &TraCIServerAPI_Vehicle::processSet; - myExecutors[CMD_GET_VEHICLETYPE_VARIABLE] = &TraCIServerAPI_VehicleType::processGet; - myExecutors[CMD_SET_VEHICLETYPE_VARIABLE] = &TraCIServerAPI_VehicleType::processSet; - myExecutors[CMD_GET_ROUTE_VARIABLE] = &TraCIServerAPI_Route::processGet; - myExecutors[CMD_SET_ROUTE_VARIABLE] = &TraCIServerAPI_Route::processSet; - myExecutors[CMD_GET_POI_VARIABLE] = &TraCIServerAPI_POI::processGet; - myExecutors[CMD_SET_POI_VARIABLE] = &TraCIServerAPI_POI::processSet; - myExecutors[CMD_GET_POLYGON_VARIABLE] = &TraCIServerAPI_Polygon::processGet; - myExecutors[CMD_SET_POLYGON_VARIABLE] = &TraCIServerAPI_Polygon::processSet; - myExecutors[CMD_GET_JUNCTION_VARIABLE] = &TraCIServerAPI_Junction::processGet; - 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; + myExecutors[libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE] = &TraCIServerAPI_InductionLoop::processGet; + myExecutors[libsumo::CMD_GET_LANEAREA_VARIABLE] = &TraCIServerAPI_LaneArea::processGet; + myExecutors[libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE] = &TraCIServerAPI_MultiEntryExit::processGet; + + myExecutors[libsumo::CMD_GET_TL_VARIABLE] = &TraCIServerAPI_TrafficLight::processGet; + myExecutors[libsumo::CMD_SET_TL_VARIABLE] = &TraCIServerAPI_TrafficLight::processSet; + myExecutors[libsumo::CMD_GET_LANE_VARIABLE] = &TraCIServerAPI_Lane::processGet; + myExecutors[libsumo::CMD_SET_LANE_VARIABLE] = &TraCIServerAPI_Lane::processSet; + myExecutors[libsumo::CMD_GET_VEHICLE_VARIABLE] = &TraCIServerAPI_Vehicle::processGet; + myExecutors[libsumo::CMD_SET_VEHICLE_VARIABLE] = &TraCIServerAPI_Vehicle::processSet; + myExecutors[libsumo::CMD_GET_VEHICLETYPE_VARIABLE] = &TraCIServerAPI_VehicleType::processGet; + myExecutors[libsumo::CMD_SET_VEHICLETYPE_VARIABLE] = &TraCIServerAPI_VehicleType::processSet; + myExecutors[libsumo::CMD_GET_ROUTE_VARIABLE] = &TraCIServerAPI_Route::processGet; + myExecutors[libsumo::CMD_SET_ROUTE_VARIABLE] = &TraCIServerAPI_Route::processSet; + myExecutors[libsumo::CMD_GET_POI_VARIABLE] = &TraCIServerAPI_POI::processGet; + myExecutors[libsumo::CMD_SET_POI_VARIABLE] = &TraCIServerAPI_POI::processSet; + myExecutors[libsumo::CMD_GET_POLYGON_VARIABLE] = &TraCIServerAPI_Polygon::processGet; + myExecutors[libsumo::CMD_SET_POLYGON_VARIABLE] = &TraCIServerAPI_Polygon::processSet; + myExecutors[libsumo::CMD_GET_JUNCTION_VARIABLE] = &TraCIServerAPI_Junction::processGet; + myExecutors[libsumo::CMD_GET_EDGE_VARIABLE] = &TraCIServerAPI_Edge::processGet; + myExecutors[libsumo::CMD_SET_EDGE_VARIABLE] = &TraCIServerAPI_Edge::processSet; + myExecutors[libsumo::CMD_GET_SIM_VARIABLE] = &TraCIServerAPI_Simulation::processGet; + myExecutors[libsumo::CMD_SET_SIM_VARIABLE] = &TraCIServerAPI_Simulation::processSet; + myExecutors[libsumo::CMD_GET_PERSON_VARIABLE] = &TraCIServerAPI_Person::processGet; + myExecutors[libsumo::CMD_SET_PERSON_VARIABLE] = &TraCIServerAPI_Person::processSet; - myParameterSizes[VAR_LEADER] = 9; + myParameterSizes[libsumo::VAR_LEADER] = 9; myDoCloseConnection = false; @@ -233,8 +241,11 @@ try { WRITE_MESSAGE("***Starting server on port " + toString(port) + " ***"); myServerSocket = new tcpip::Socket(port); + if (numClients > 1) { + WRITE_MESSAGE(" waiting for " + toString(numClients) + " clients..."); + } while ((int)mySockets.size() < numClients) { - int index = (int)mySockets.size() + MAX_ORDER + 1; + int index = (int)mySockets.size() + libsumo::MAX_ORDER + 1; mySockets[index] = new SocketInfo(myServerSocket->accept(true), begin); mySockets[index]->vehicleStateChanges[MSNet::VEHICLE_STATE_BUILT] = std::vector(); mySockets[index]->vehicleStateChanges[MSNet::VEHICLE_STATE_DEPARTED] = std::vector(); @@ -248,6 +259,9 @@ mySockets[index]->vehicleStateChanges[MSNet::VEHICLE_STATE_ENDING_STOP] = std::vector(); mySockets[index]->vehicleStateChanges[MSNet::VEHICLE_STATE_COLLISION] = std::vector(); mySockets[index]->vehicleStateChanges[MSNet::VEHICLE_STATE_EMERGENCYSTOP] = std::vector(); + if (numClients > 1) { + WRITE_MESSAGE(" client connected"); + } } // When got here, all clients have connected if (numClients > 1) { @@ -278,7 +292,7 @@ #ifdef HAVE_PYTHON || OptionsCont::getOptions().isSet("python-script") #endif - )) { + )) { myInstance = new TraCIServer(string2time(OptionsCont::getOptions().getString("begin")), OptionsCont::getOptions().getInt("remote-port"), OptionsCont::getOptions().getInt("num-clients")); @@ -357,7 +371,7 @@ #endif // Whether the received command is a permitted command for the initialization phase. // Currently, getVersion and setOrder are permitted. - bool initCommand = commandId == CMD_SETORDER || commandId == CMD_GETVERSION; + bool initCommand = commandId == libsumo::CMD_SETORDER || commandId == libsumo::CMD_GETVERSION; if (initCommand) { #ifdef DEBUG_MULTI_CLIENTS std::cout << " Init command. Sending response." << std::endl; @@ -368,7 +382,9 @@ tcpip::Storage tmp; tmp.writeStorage(myInputStorage); myInputStorage.reset(); - myInputStorage.writeUnsignedByte(commandLength); + // we don't know whether the command was set with extended + // length syntax or not so we hardcode the length here (#5037) + myInputStorage.writeUnsignedByte(commandId == libsumo::CMD_SETORDER ? 6 : 2); myInputStorage.writeUnsignedByte(commandId); myInputStorage.writeStorage(tmp); @@ -380,9 +396,9 @@ #ifdef DEBUG_MULTI_CLIENTS std::cout << " Client " << myCurrentSocket->second->socket << " did not set order initially." << std::endl; #endif - throw ProcessError("Execution order (CMD_SETORDER) was not set for all TraCI clients in pre-execution phase."); + throw ProcessError("Execution order (libsumo::CMD_SETORDER) was not set for all TraCI clients in pre-execution phase."); } - if (commandId == CMD_SETORDER) { + if (commandId == libsumo::CMD_SETORDER) { // This is what we have waited for. break; } @@ -514,8 +530,8 @@ // Simulation should run until // 1. end time reached or - // 2. got CMD_CLOSE or - // 3. got CMD_LOAD or + // 2. got libsumo::CMD_CLOSE or + // 3. got libsumo::CMD_LOAD or // 4. Client closes socket connection while (!myDoCloseConnection && myTargetTime <= (MSNet::getInstance()->getCurrentTimeStep())) { #ifdef DEBUG_MULTI_CLIENTS @@ -571,17 +587,17 @@ #ifdef DEBUG_MULTI_CLIENTS std::cout << " Received command " << cmd << std::endl; #endif - if (cmd == CMD_SIMSTEP) { + if (cmd == libsumo::CMD_SIMSTEP) { #ifdef DEBUG_MULTI_CLIENTS std::cout << " Received command SIM_STEP, end turn for client " << myCurrentSocket->second->socket << std::endl; #endif done = true; - } else if (cmd == CMD_LOAD) { + } else if (cmd == libsumo::CMD_LOAD) { #ifdef DEBUG_MULTI_CLIENTS std::cout << " Received command LOAD." << std::endl; #endif load = true; - } else if (cmd == CMD_CLOSE) { + } else if (cmd == libsumo::CMD_CLOSE) { #ifdef DEBUG_MULTI_CLIENTS std::cout << " Received command CLOSE." << std::endl; #endif @@ -776,6 +792,13 @@ if (commandLength == 0) { commandLength = myInputStorage.readInt(); } +#ifdef DEBUG_RAW_INPUT + std::cout << " commandStart=" << commandStart << " commandLength=" << commandLength << " pos=" << myInputStorage.position() << " raw="; + for (auto it = myInputStorage.begin(); it != myInputStorage.end(); ++it) { + std::cout << (int)*it << " "; + } + std::cout << "\n"; +#endif return myInputStorage.readUnsignedByte(); } @@ -794,32 +817,32 @@ success = myExecutors[commandId](*this, myInputStorage, myOutputStorage); } else { switch (commandId) { - case CMD_GETVERSION: + case libsumo::CMD_GETVERSION: success = commandGetVersion(); break; - case CMD_LOAD: { + case libsumo::CMD_LOAD: { std::vector args; if (!readTypeCheckingStringList(myInputStorage, args)) { - return writeErrorStatusCmd(CMD_LOAD, "A load command needs a list of string arguments.", myOutputStorage); + return writeErrorStatusCmd(libsumo::CMD_LOAD, "A load command needs a list of string arguments.", myOutputStorage); } #ifdef DEBUG_MULTI_CLIENTS - std::cout << " commandId == CMD_LOAD" + std::cout << " commandId == libsumo::CMD_LOAD" << ", args = " << toString(args) << std::endl; #endif try { myLoadArgs = args; success = true; - writeStatusCmd(CMD_LOAD, RTYPE_OK, ""); + writeStatusCmd(libsumo::CMD_LOAD, libsumo::RTYPE_OK, ""); // XXX: This only cares for the client that issued the load command. // Multiclient-load functionality is still to be implemented. Refs #3146. myCurrentSocket->second->socket->sendExact(myOutputStorage); myOutputStorage.reset(); } catch (libsumo::TraCIException& e) { - return writeErrorStatusCmd(CMD_LOAD, e.what(), myOutputStorage); + return writeErrorStatusCmd(libsumo::CMD_LOAD, e.what(), myOutputStorage); } break; } - case CMD_SIMSTEP: { + case libsumo::CMD_SIMSTEP: { const double nextT = myInputStorage.readDouble(); if (myAmEmbedded) { if (nextT == 0.) { @@ -841,7 +864,7 @@ myCurrentSocket->second->targetTime = TIME2STEPS(nextT); } #ifdef DEBUG_MULTI_CLIENTS - std::cout << " commandId == CMD_SIMSTEP" + std::cout << " commandId == libsumo::CMD_SIMSTEP" << ", next target time for client is " << myCurrentSocket->second->targetTime << std::endl; #endif if (myCurrentSocket->second->targetTime <= MSNet::getInstance()->getCurrentTimeStep()) { @@ -852,8 +875,8 @@ } return commandId; } - case CMD_CLOSE: - writeStatusCmd(CMD_CLOSE, RTYPE_OK, ""); + case libsumo::CMD_CLOSE: + writeStatusCmd(libsumo::CMD_CLOSE, libsumo::RTYPE_OK, ""); myCurrentSocket->second->socket->sendExact(myOutputStorage); myOutputStorage.reset(); if (mySockets.size() == 1) { @@ -862,66 +885,66 @@ } success = true; break; - case CMD_SETORDER: { + case libsumo::CMD_SETORDER: { const int order = myInputStorage.readInt(); #ifdef DEBUG_MULTI_CLIENTS - std::cout << " commandId == CMD_SETORDER" + std::cout << " commandId == libsumo::CMD_SETORDER" << ", order index is " << order << std::endl; #endif - if (order > MAX_ORDER) { - return writeErrorStatusCmd(CMD_SETORDER, "A set order command needs an int argument below " + toString(MAX_ORDER) + ".", myOutputStorage); + if (order > libsumo::MAX_ORDER) { + return writeErrorStatusCmd(libsumo::CMD_SETORDER, "A set order command needs an int argument below " + toString(libsumo::MAX_ORDER) + ".", myOutputStorage); } if (mySockets.count(order) > 0 || mySocketReorderRequests.count(order) > 0) { - return writeErrorStatusCmd(CMD_SETORDER, "Order '" + toString(order) + "' is already taken.", myOutputStorage); + return writeErrorStatusCmd(libsumo::CMD_SETORDER, "Order '" + toString(order) + "' is already taken.", myOutputStorage); } // memorize reorder request (will only take effect in the next step) mySocketReorderRequests[order] = myCurrentSocket->second; success = true; - writeStatusCmd(CMD_SETORDER, RTYPE_OK, ""); + writeStatusCmd(libsumo::CMD_SETORDER, libsumo::RTYPE_OK, ""); break; } - case CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE: - case CMD_SUBSCRIBE_LANEAREA_VARIABLE: - case CMD_SUBSCRIBE_MULTIENTRYEXIT_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: - case CMD_SUBSCRIBE_POLYGON_VARIABLE: - case CMD_SUBSCRIBE_JUNCTION_VARIABLE: - case CMD_SUBSCRIBE_EDGE_VARIABLE: - case CMD_SUBSCRIBE_SIM_VARIABLE: - case CMD_SUBSCRIBE_GUI_VARIABLE: + case libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE: + case libsumo::CMD_SUBSCRIBE_LANEAREA_VARIABLE: + case libsumo::CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE: + case libsumo::CMD_SUBSCRIBE_TL_VARIABLE: + case libsumo::CMD_SUBSCRIBE_LANE_VARIABLE: + case libsumo::CMD_SUBSCRIBE_VEHICLE_VARIABLE: + case libsumo::CMD_SUBSCRIBE_PERSON_VARIABLE: + case libsumo::CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE: + case libsumo::CMD_SUBSCRIBE_ROUTE_VARIABLE: + case libsumo::CMD_SUBSCRIBE_POI_VARIABLE: + case libsumo::CMD_SUBSCRIBE_POLYGON_VARIABLE: + case libsumo::CMD_SUBSCRIBE_JUNCTION_VARIABLE: + case libsumo::CMD_SUBSCRIBE_EDGE_VARIABLE: + case libsumo::CMD_SUBSCRIBE_SIM_VARIABLE: + case libsumo::CMD_SUBSCRIBE_GUI_VARIABLE: success = addObjectVariableSubscription(commandId, false); break; - case CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT: - case CMD_SUBSCRIBE_LANEAREA_CONTEXT: - case CMD_SUBSCRIBE_MULTIENTRYEXIT_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: - case CMD_SUBSCRIBE_POLYGON_CONTEXT: - case CMD_SUBSCRIBE_JUNCTION_CONTEXT: - case CMD_SUBSCRIBE_EDGE_CONTEXT: - case CMD_SUBSCRIBE_SIM_CONTEXT: - case CMD_SUBSCRIBE_GUI_CONTEXT: + case libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT: + case libsumo::CMD_SUBSCRIBE_LANEAREA_CONTEXT: + case libsumo::CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT: + case libsumo::CMD_SUBSCRIBE_TL_CONTEXT: + case libsumo::CMD_SUBSCRIBE_LANE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_VEHICLE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_PERSON_CONTEXT: + case libsumo::CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_ROUTE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_POI_CONTEXT: + case libsumo::CMD_SUBSCRIBE_POLYGON_CONTEXT: + case libsumo::CMD_SUBSCRIBE_JUNCTION_CONTEXT: + case libsumo::CMD_SUBSCRIBE_EDGE_CONTEXT: + case libsumo::CMD_SUBSCRIBE_SIM_CONTEXT: + case libsumo::CMD_SUBSCRIBE_GUI_CONTEXT: success = addObjectVariableSubscription(commandId, true); break; - case CMD_ADD_SUBSCRIPTION_FILTER: + case libsumo::CMD_ADD_SUBSCRIPTION_FILTER: success = addSubscriptionFilter(); break; default: - if (commandId == CMD_GET_GUI_VARIABLE || commandId == CMD_SET_GUI_VARIABLE) { - writeStatusCmd(commandId, RTYPE_NOTIMPLEMENTED, "GUI is not running, command not implemented in command line sumo"); + if (commandId == libsumo::CMD_GET_GUI_VARIABLE || commandId == libsumo::CMD_SET_GUI_VARIABLE) { + writeStatusCmd(commandId, libsumo::RTYPE_NOTIMPLEMENTED, "GUI is not running, command not implemented in command line sumo"); } else { - writeStatusCmd(commandId, RTYPE_NOTIMPLEMENTED, "Command not implemented in sumo"); + writeStatusCmd(commandId, libsumo::RTYPE_NOTIMPLEMENTED, "Command not implemented in sumo"); } } } @@ -932,10 +955,10 @@ } if ((int)myInputStorage.position() != commandStart + commandLength) { std::ostringstream msg; - msg << "Wrong position in requestMessage after dispatching command."; + msg << "Wrong position in requestMessage after dispatching command " << commandId << "."; msg << " Expected command length was " << commandLength; msg << " but " << myInputStorage.position() - commandStart << " Bytes were read."; - writeStatusCmd(commandId, RTYPE_ERR, msg.str()); + writeStatusCmd(commandId, libsumo::RTYPE_ERR, msg.str()); myDoCloseConnection = true; } return commandId; @@ -948,14 +971,14 @@ std::string sumoVersion = VERSION_STRING; // Prepare response tcpip::Storage answerTmp; - answerTmp.writeInt(TRACI_VERSION); + answerTmp.writeInt(libsumo::TRACI_VERSION); answerTmp.writeString(std::string("SUMO ") + sumoVersion); // When we get here, the response is stored in answerTmp -> put into myOutputStorage - writeStatusCmd(CMD_GETVERSION, RTYPE_OK, ""); + writeStatusCmd(libsumo::CMD_GETVERSION, libsumo::RTYPE_OK, ""); // command length myOutputStorage.writeUnsignedByte(1 + 1 + static_cast(answerTmp.size())); // command type - myOutputStorage.writeUnsignedByte(CMD_GETVERSION); + myOutputStorage.writeUnsignedByte(libsumo::CMD_GETVERSION); // and the parameter dependant part myOutputStorage.writeStorage(answerTmp); return true; @@ -968,13 +991,13 @@ #ifdef DEBUG_MULTI_CLIENTS std::cout << " postProcessSimulationStep() at time " << t << std::endl; #endif - writeStatusCmd(CMD_SIMSTEP, RTYPE_OK, ""); + writeStatusCmd(libsumo::CMD_SIMSTEP, libsumo::RTYPE_OK, ""); int noActive = 0; for (std::vector::iterator i = mySubscriptions.begin(); i != mySubscriptions.end();) { const libsumo::Subscription& s = *i; - bool isArrivedVehicle = (s.commandId == CMD_SUBSCRIBE_VEHICLE_VARIABLE || s.commandId == CMD_SUBSCRIBE_VEHICLE_CONTEXT) + bool isArrivedVehicle = (s.commandId == libsumo::CMD_SUBSCRIBE_VEHICLE_VARIABLE || s.commandId == libsumo::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()); - bool isArrivedPerson = (s.commandId == CMD_SUBSCRIBE_PERSON_VARIABLE || s.commandId == CMD_SUBSCRIBE_PERSON_CONTEXT) && MSNet::getInstance()->getPersonControl().get(s.id) == nullptr; + bool isArrivedPerson = (s.commandId == libsumo::CMD_SUBSCRIBE_PERSON_VARIABLE || s.commandId == libsumo::CMD_SUBSCRIBE_PERSON_CONTEXT) && MSNet::getInstance()->getPersonControl().get(s.id) == nullptr; if ((s.endTime < t) || isArrivedVehicle || isArrivedPerson) { i = mySubscriptions.erase(i); continue; @@ -1029,7 +1052,7 @@ << "\n Size of mySubscriptionCache is " << mySubscriptionCache.size() << std::endl; #endif - writeStatusCmd(CMD_SIMSTEP, RTYPE_OK, ""); + writeStatusCmd(libsumo::CMD_SIMSTEP, libsumo::RTYPE_OK, ""); // NOTE: the commented code would send an empty response // myOutputStorage.writeInt(0); @@ -1050,9 +1073,9 @@ void TraCIServer::writeStatusCmd(int commandId, int status, const std::string& description, tcpip::Storage& outputStorage) { - if (status == RTYPE_ERR) { + if (status == libsumo::RTYPE_ERR) { WRITE_ERROR("Answered with error to command " + toHex(commandId, 2) + ": " + description); - } else if (status == RTYPE_NOTIMPLEMENTED) { + } else if (status == libsumo::RTYPE_NOTIMPLEMENTED) { WRITE_ERROR("Requested command not implemented (" + toHex(commandId, 2) + "): " + description); } outputStorage.writeUnsignedByte(1 + 1 + 1 + 4 + static_cast(description.length())); // command length @@ -1064,7 +1087,7 @@ bool TraCIServer::writeErrorStatusCmd(int commandId, const std::string& description, tcpip::Storage& outputStorage) { - writeStatusCmd(commandId, RTYPE_ERR, description, outputStorage); + writeStatusCmd(commandId, libsumo::RTYPE_ERR, description, outputStorage); return false; } @@ -1076,7 +1099,7 @@ libsumo::Subscription* modifiedSubscription = nullptr; if (processSingleSubscription(s, writeInto, errors)) { if (s.endTime < MSNet::getInstance()->getCurrentTimeStep()) { - writeStatusCmd(s.commandId, RTYPE_ERR, "Subscription has ended."); + writeStatusCmd(s.commandId, libsumo::RTYPE_ERR, "Subscription has ended."); } else { bool needNewSubscription = true; for (libsumo::Subscription& o : mySubscriptions) { @@ -1113,7 +1136,7 @@ mySubscriptionCache.writeStorage(tmp); } } - writeStatusCmd(s.commandId, RTYPE_OK, ""); + writeStatusCmd(s.commandId, libsumo::RTYPE_OK, ""); } if (modifiedSubscription != nullptr && isVehicleToVehicleContextSubscription(*modifiedSubscription)) { // Set last modified vehicle context subscription active for filter modifications @@ -1123,7 +1146,7 @@ myLastContextSubscription = nullptr; } } else { - writeStatusCmd(s.commandId, RTYPE_ERR, "Could not add subscription (" + errors + ")."); + writeStatusCmd(s.commandId, libsumo::RTYPE_ERR, "Could not add subscription (" + errors + ")."); } myOutputStorage.writeStorage(writeInto); } @@ -1147,15 +1170,15 @@ } // try unsubscribe if (found) { - writeStatusCmd(commandId, RTYPE_OK, ""); + writeStatusCmd(commandId, libsumo::RTYPE_OK, ""); } else { - writeStatusCmd(commandId, RTYPE_ERR, "The subscription to remove was not found."); + writeStatusCmd(commandId, libsumo::RTYPE_ERR, "The subscription to remove was not found."); } } bool TraCIServer::isVehicleToVehicleContextSubscription(const libsumo::Subscription& s) { - return (s.commandId == CMD_SUBSCRIBE_VEHICLE_CONTEXT && s.contextDomain == CMD_GET_VEHICLE_VARIABLE); + return (s.commandId == libsumo::CMD_SUBSCRIBE_VEHICLE_CONTEXT && s.contextDomain == libsumo::CMD_GET_VEHICLE_VARIABLE); } @@ -1176,7 +1199,7 @@ } else { objIDs.insert(s.id); } - const int numVars = s.contextDomain > 0 && s.variables.size() == 1 && s.variables[0] == TRACI_ID_LIST ? 0 : (int)s.variables.size(); + const int numVars = s.contextDomain > 0 && s.variables.size() == 1 && s.variables[0] == libsumo::TRACI_ID_LIST ? 0 : (int)s.variables.size(); int skipped = 0; for (std::set::iterator j = objIDs.begin(); j != objIDs.end(); ++j) { if (s.contextDomain > 0) { @@ -1197,7 +1220,7 @@ if (myExecutors.find(getCommandId) != myExecutors.end()) { ok &= myExecutors[getCommandId](*this, message, tmpOutput); } else { - writeStatusCmd(s.commandId, RTYPE_NOTIMPLEMENTED, "Unsupported command specified", tmpOutput); + writeStatusCmd(s.commandId, libsumo::RTYPE_NOTIMPLEMENTED, "Unsupported command specified", tmpOutput); ok = false; } // copy response part @@ -1217,7 +1240,7 @@ int variable = tmpOutput.readUnsignedByte(); std::string id = tmpOutput.readString(); outputStorage.writeUnsignedByte(variable); - outputStorage.writeUnsignedByte(RTYPE_OK); + outputStorage.writeUnsignedByte(libsumo::RTYPE_OK); length -= (lengthLength + 1 + 4 + (int)id.length()); while (--length > 0) { outputStorage.writeUnsignedByte(tmpOutput.readUnsignedByte()); @@ -1231,8 +1254,8 @@ tmpOutput.readUnsignedByte(); std::string msg = tmpOutput.readString(); outputStorage.writeUnsignedByte(*i); - outputStorage.writeUnsignedByte(RTYPE_ERR); - outputStorage.writeUnsignedByte(TYPE_STRING); + outputStorage.writeUnsignedByte(libsumo::RTYPE_ERR); + outputStorage.writeUnsignedByte(libsumo::TYPE_STRING); outputStorage.writeString(msg); errors = errors + msg; } @@ -1265,8 +1288,8 @@ TraCIServer::addObjectVariableSubscription(const int commandId, const bool hasContext) { const double beginTime = myInputStorage.readDouble(); const double endTime = myInputStorage.readDouble(); - const SUMOTime begin = beginTime == INVALID_DOUBLE_VALUE ? 0 : TIME2STEPS(beginTime); - const SUMOTime end = endTime == INVALID_DOUBLE_VALUE || endTime > STEPS2TIME(SUMOTime_MAX) ? SUMOTime_MAX : TIME2STEPS(endTime); + const SUMOTime begin = beginTime == libsumo::INVALID_DOUBLE_VALUE ? 0 : TIME2STEPS(beginTime); + const SUMOTime end = endTime == libsumo::INVALID_DOUBLE_VALUE || endTime > STEPS2TIME(SUMOTime_MAX) ? SUMOTime_MAX : TIME2STEPS(endTime); const std::string id = myInputStorage.readString(); const int domain = hasContext ? myInputStorage.readUnsignedByte() : 0; const double range = hasContext ? myInputStorage.readDouble() : 0.; @@ -1306,11 +1329,11 @@ // dispatch according to filter type switch (filterType) { - case FILTER_TYPE_NONE: + case libsumo::FILTER_TYPE_NONE: // Remove all filters removeFilters(); break; - case FILTER_TYPE_LANES: { + case libsumo::FILTER_TYPE_LANES: { // Read relative lanes to consider for context filter int nrLanes = (int)myInputStorage.readByte(); std::vector lanes; @@ -1320,37 +1343,37 @@ addSubscriptionFilterLanes(lanes); } break; - case FILTER_TYPE_NOOPPOSITE: + case libsumo::FILTER_TYPE_NOOPPOSITE: // Add no-opposite filter addSubscriptionFilterNoOpposite(); break; - case FILTER_TYPE_DOWNSTREAM_DIST: { + case libsumo::FILTER_TYPE_DOWNSTREAM_DIST: { myInputStorage.readByte(); // read type double double dist = myInputStorage.readDouble(); addSubscriptionFilterDownstreamDistance(dist); } break; - case FILTER_TYPE_UPSTREAM_DIST: { + case libsumo::FILTER_TYPE_UPSTREAM_DIST: { myInputStorage.readByte(); // read type double double dist = myInputStorage.readDouble(); addSubscriptionFilterUpstreamDistance(dist); } break; - case FILTER_TYPE_LEAD_FOLLOW: { + case libsumo::FILTER_TYPE_LEAD_FOLLOW: { // Read relative lanes to consider for context filter addSubscriptionFilterLeadFollow(); } - break; - case FILTER_TYPE_TURN: + break; + case libsumo::FILTER_TYPE_TURN: addSubscriptionFilterTurn(); break; - case FILTER_TYPE_VCLASS: { + case libsumo::FILTER_TYPE_VCLASS: { myInputStorage.readByte(); // read type stringlist SVCPermissions vClasses = parseVehicleClasses(myInputStorage.readStringList()); addSubscriptionFilterVClass(vClasses); } break; - case FILTER_TYPE_VTYPE: { + case libsumo::FILTER_TYPE_VTYPE: { myInputStorage.readByte(); // read type stringlist std::vector vTypesVector = myInputStorage.readStringList(); std::set vTypesSet; @@ -1359,13 +1382,13 @@ } break; default: - writeStatusCmd(filterType, RTYPE_NOTIMPLEMENTED, "'" + toString(filterType) + "' is no valid filter type code."); + writeStatusCmd(filterType, libsumo::RTYPE_NOTIMPLEMENTED, "'" + toString(filterType) + "' is no valid filter type code."); success = false; } if (success) { // acknowledge filter addition - writeStatusCmd(CMD_ADD_SUBSCRIPTION_FILTER, RTYPE_OK, ""); + writeStatusCmd(libsumo::CMD_ADD_SUBSCRIPTION_FILTER, libsumo::RTYPE_OK, ""); } return success; @@ -1461,9 +1484,9 @@ } -void +void TraCIServer::writePositionVector(tcpip::Storage& outputStorage, const libsumo::TraCIPositionVector& shape) { - outputStorage.writeUnsignedByte(TYPE_POLYGON); + outputStorage.writeUnsignedByte(libsumo::TYPE_POLYGON); if (shape.size() < 256) { outputStorage.writeUnsignedByte((int)shape.size()); } else { @@ -1479,7 +1502,7 @@ bool TraCIServer::readTypeCheckingInt(tcpip::Storage& inputStorage, int& into) { - if (inputStorage.readUnsignedByte() != TYPE_INTEGER) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_INTEGER) { return false; } into = inputStorage.readInt(); @@ -1489,7 +1512,7 @@ bool TraCIServer::readTypeCheckingDouble(tcpip::Storage& inputStorage, double& into) { - if (inputStorage.readUnsignedByte() != TYPE_DOUBLE) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_DOUBLE) { return false; } into = inputStorage.readDouble(); @@ -1499,7 +1522,7 @@ bool TraCIServer::readTypeCheckingString(tcpip::Storage& inputStorage, std::string& into) { - if (inputStorage.readUnsignedByte() != TYPE_STRING) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_STRING) { return false; } into = inputStorage.readString(); @@ -1509,7 +1532,7 @@ bool TraCIServer::readTypeCheckingStringList(tcpip::Storage& inputStorage, std::vector& into) { - if (inputStorage.readUnsignedByte() != TYPE_STRINGLIST) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_STRINGLIST) { return false; } into = inputStorage.readStringList(); @@ -1518,8 +1541,18 @@ bool +TraCIServer::readTypeCheckingDoubleList(tcpip::Storage& inputStorage, std::vector& into) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_DOUBLELIST) { + return false; + } + into = inputStorage.readDoubleList(); + return true; +} + + +bool TraCIServer::readTypeCheckingColor(tcpip::Storage& inputStorage, libsumo::TraCIColor& into) { - if (inputStorage.readUnsignedByte() != TYPE_COLOR) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_COLOR) { return false; } into.r = static_cast(inputStorage.readUnsignedByte()); @@ -1532,7 +1565,7 @@ bool TraCIServer::readTypeCheckingPosition2D(tcpip::Storage& inputStorage, libsumo::TraCIPosition& into) { - if (inputStorage.readUnsignedByte() != POSITION_2D) { + if (inputStorage.readUnsignedByte() != libsumo::POSITION_2D) { return false; } into.x = inputStorage.readDouble(); @@ -1544,7 +1577,7 @@ bool TraCIServer::readTypeCheckingByte(tcpip::Storage& inputStorage, int& into) { - if (inputStorage.readByte() != TYPE_BYTE) { + if (inputStorage.readByte() != libsumo::TYPE_BYTE) { return false; } into = inputStorage.readByte(); @@ -1554,7 +1587,7 @@ bool TraCIServer::readTypeCheckingUnsignedByte(tcpip::Storage& inputStorage, int& into) { - if (inputStorage.readUnsignedByte() != TYPE_UBYTE) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_UBYTE) { return false; } into = inputStorage.readUnsignedByte(); @@ -1564,7 +1597,7 @@ bool TraCIServer::readTypeCheckingPolygon(tcpip::Storage& inputStorage, PositionVector& into) { - if (inputStorage.readUnsignedByte() != TYPE_POLYGON) { + if (inputStorage.readUnsignedByte() != libsumo::TYPE_POLYGON) { return false; } into.clear(); diff -Nru sumo-1.1.0+dfsg1/src/traci-server/TraCIServer.h sumo-1.2.0+dfsg1/src/traci-server/TraCIServer.h --- sumo-1.1.0+dfsg1/src/traci-server/TraCIServer.h 2018-11-05 23:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci-server/TraCIServer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include "TraCIServerAPI_Lane.h" @@ -199,6 +199,15 @@ bool readTypeCheckingStringList(tcpip::Storage& inputStorage, std::vector& into); + /** @brief Reads the value type and a double list, verifying the type + * + * @param[in, changed] inputStorage The storage to read from + * @param[out] into Holder of the read value + * @return Whether a double value was given (by data type) + */ + bool readTypeCheckingDoubleList(tcpip::Storage& inputStorage, std::vector& into); + + /** @brief Reads the value type and a color, verifying the type * * @param[in, changed] inputStorage The storage to read from @@ -262,6 +271,7 @@ bool wrapStringList(const std::string& objID, const int variable, const std::vector& value); bool wrapPosition(const std::string& objID, const int variable, const libsumo::TraCIPosition& value); bool wrapColor(const std::string& objID, const int variable, const libsumo::TraCIColor& value); + bool wrapRoadPosition(const std::string& objID, const int variable, const libsumo::TraCIRoadPosition& value); tcpip::Storage& getWrapperStorage(); /// @} diff -Nru sumo-1.1.0+dfsg1/src/traci_testclient/CMakeLists.txt sumo-1.2.0+dfsg1/src/traci_testclient/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/traci_testclient/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci_testclient/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -12,4 +12,4 @@ add_executable(testlibsumo testlibsumo_main.cpp) set_target_properties(testlibsumo PROPERTIES OUTPUT_NAME testlibsumo${BINARY_SUFFIX}) set_target_properties(testlibsumo PROPERTIES OUTPUT_NAME_DEBUG testlibsumo${BINARY_SUFFIX}D) -target_link_libraries(testlibsumo ${sumolibs} traciserver microsim_cfmodels microsim_devices microsim_lcmodels microsim_output) +target_link_libraries(testlibsumo ${sumolibs} traciserver microsim_cfmodels microsim_devices microsim_engine microsim_lcmodels microsim_output) diff -Nru sumo-1.1.0+dfsg1/src/traci_testclient/Makefile.in sumo-1.2.0+dfsg1/src/traci_testclient/Makefile.in --- sumo-1.1.0+dfsg1/src/traci_testclient/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci_testclient/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,679 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 = TraCITestClient$(EXEEXT) -subdir = src/traci_testclient -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -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_TraCITestClient_OBJECTS = tracitestclient_main.$(OBJEXT) \ - TraCITestClient.$(OBJEXT) -TraCITestClient_OBJECTS = $(am_TraCITestClient_OBJECTS) -TraCITestClient_DEPENDENCIES = ../utils/common/libcommon.a \ - ../utils/traci/libtraciclient.a ../foreign/tcpip/libtcpip.a -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) $(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 = $(TraCITestClient_SOURCES) -DIST_SOURCES = $(TraCITestClient_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -TraCITestClient_SOURCES = tracitestclient_main.cpp TraCITestClient.cpp TraCITestClient.h -TraCITestClient_LDADD = ../utils/common/libcommon.a \ -../utils/traci/libtraciclient.a ../foreign/tcpip/libtcpip.a - -EXTRA_DIST = testlibsumo_main.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) --foreign src/traci_testclient/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/traci_testclient/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 - -TraCITestClient$(EXEEXT): $(TraCITestClient_OBJECTS) $(TraCITestClient_DEPENDENCIES) $(EXTRA_TraCITestClient_DEPENDENCIES) - @rm -f TraCITestClient$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(TraCITestClient_OBJECTS) $(TraCITestClient_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCITestClient.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracitestclient_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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/traci_testclient/testlibsumo_main.cpp sumo-1.2.0+dfsg1/src/traci_testclient/testlibsumo_main.cpp --- sumo-1.1.0+dfsg1/src/traci_testclient/testlibsumo_main.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci_testclient/testlibsumo_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,6 +36,20 @@ } libsumo::Simulation::load(options); std::cout << "Simulation loaded\n"; + /* + std::vector result = libsumo::Simulation::findIntermodalRoute("64455492", "-22913705", "public", 21600, 3, -1, -1, 0, 0,0,"ped"); + double cost = 0; + double time = 0; + for (const auto& stage : result) + { + std::cout << " type=" << stage.type << " line=" << stage.line << " travelTime=" << stage.travelTime << " cost=" << stage.cost << " destination: "<< stage.destStop<<"\n"; + std::cout << "Descr:\n" << stage.description<< std::endl< #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ // =========================================================================== TraCITestClient::TraCITestClient(std::string outputFileName) : outputFileName(outputFileName), answerLog("") { - answerLog.setf(std::ios::fixed , std::ios::floatfield); // use decimal format + answerLog.setf(std::ios::fixed, std::ios::floatfield); // use decimal format answerLog.setf(std::ios::showpoint); // print decimal point answerLog << std::setprecision(2); } @@ -181,7 +181,7 @@ answerLog << std::endl << "-> Command sent: :" << std::endl; tcpip::Storage inMsg; std::string acknowledgement; - check_resultState(inMsg, CMD_SIMSTEP, false, &acknowledgement); + check_resultState(inMsg, libsumo::CMD_SIMSTEP, false, &acknowledgement); answerLog << acknowledgement << std::endl; validateSimulationStep2(inMsg); } catch (libsumo::TraCIException& e) { @@ -197,7 +197,7 @@ answerLog << std::endl << "-> Command sent: :" << std::endl; tcpip::Storage inMsg; std::string acknowledgement; - check_resultState(inMsg, CMD_CLOSE, false, &acknowledgement); + check_resultState(inMsg, libsumo::CMD_CLOSE, false, &acknowledgement); answerLog << acknowledgement << std::endl; } catch (libsumo::TraCIException& e) { answerLog << e.what() << std::endl; @@ -212,7 +212,7 @@ answerLog << std::endl << "-> Command sent: :" << std::endl; tcpip::Storage inMsg; std::string acknowledgement; - check_resultState(inMsg, CMD_SETORDER, false, &acknowledgement); + check_resultState(inMsg, libsumo::CMD_SETORDER, false, &acknowledgement); answerLog << acknowledgement << std::endl; } catch (libsumo::TraCIException& e) { answerLog << e.what() << std::endl; @@ -224,7 +224,8 @@ TraCITestClient::commandGetVariable(int domID, int varID, const std::string& objID, tcpip::Storage* addData) { tcpip::Storage inMsg; try { - send_commandGetVariable(domID, varID, objID, addData); + createCommand(domID, varID, objID, addData); + mySocket->sendExact(myOutput); answerLog << std::endl << "-> Command sent: :" << std::endl << " domID=" << domID << " varID=" << varID << " objID=" << objID << std::endl; @@ -262,7 +263,8 @@ if (msgS != "") { errorMsg(msg); } - send_commandSetValue(domID, varID, objID, tmp); + createCommand(domID, varID, objID, &tmp); + mySocket->sendExact(myOutput); answerLog << std::endl << "-> Command sent: :" << std::endl << " domID=" << domID << " varID=" << varID << " objID=" << objID << std::endl; @@ -379,20 +381,20 @@ length = inMsg.readInt(); } int cmdId = inMsg.readUnsignedByte(); - if (cmdId >= RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE && cmdId <= RESPONSE_SUBSCRIBE_GUI_VARIABLE) { + if (cmdId >= libsumo::RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE && cmdId <= libsumo::RESPONSE_SUBSCRIBE_GUI_VARIABLE) { answerLog << " CommandID=" << cmdId; answerLog << " ObjectID=" << inMsg.readString(); int varNo = inMsg.readUnsignedByte(); answerLog << " #variables=" << varNo << std::endl; for (int i = 0; i < varNo; ++i) { answerLog << " VariableID=" << inMsg.readUnsignedByte(); - bool ok = inMsg.readUnsignedByte() == RTYPE_OK; + bool ok = inMsg.readUnsignedByte() == libsumo::RTYPE_OK; answerLog << " ok=" << ok; int valueDataType = inMsg.readUnsignedByte(); answerLog << " valueDataType=" << valueDataType; readAndReportTypeDependent(inMsg, valueDataType); } - } else if (cmdId >= RESPONSE_SUBSCRIBE_INDUCTIONLOOP_CONTEXT && cmdId <= RESPONSE_SUBSCRIBE_GUI_CONTEXT) { + } else if (cmdId >= libsumo::RESPONSE_SUBSCRIBE_INDUCTIONLOOP_CONTEXT && cmdId <= libsumo::RESPONSE_SUBSCRIBE_GUI_CONTEXT) { answerLog << " CommandID=" << cmdId; answerLog << " ObjectID=" << inMsg.readString(); answerLog << " Domain=" << inMsg.readUnsignedByte(); @@ -404,7 +406,7 @@ answerLog << " ObjectID=" << inMsg.readString() << std::endl; for (int i = 0; i < varNo; ++i) { answerLog << " VariableID=" << inMsg.readUnsignedByte(); - bool ok = inMsg.readUnsignedByte() == RTYPE_OK; + bool ok = inMsg.readUnsignedByte() == libsumo::RTYPE_OK; answerLog << " ok=" << ok; int valueDataType = inMsg.readUnsignedByte(); answerLog << " valueDataType=" << valueDataType; @@ -434,10 +436,10 @@ std::string dataTypeS; defFile >> dataTypeS; if (dataTypeS == "") { - into.writeUnsignedByte(REQUEST_AIRDIST); + into.writeUnsignedByte(libsumo::REQUEST_AIRDIST); return 1; } else if (dataTypeS == "") { - into.writeUnsignedByte(REQUEST_DRIVINGDIST); + into.writeUnsignedByte(libsumo::REQUEST_DRIVINGDIST); return 1; } else if (dataTypeS == "") { int beginTime, endTime, numVars; @@ -456,22 +458,22 @@ double valF; if (dataTypeS == "") { defFile >> valI; - into.writeUnsignedByte(TYPE_INTEGER); + into.writeUnsignedByte(libsumo::TYPE_INTEGER); into.writeInt(valI); return 4 + 1; } else if (dataTypeS == "") { defFile >> valI; - into.writeUnsignedByte(TYPE_BYTE); + into.writeUnsignedByte(libsumo::TYPE_BYTE); into.writeByte(valI); return 1 + 1; } else if (dataTypeS == "") { defFile >> valI; - into.writeUnsignedByte(TYPE_UBYTE); + into.writeUnsignedByte(libsumo::TYPE_UBYTE); into.writeUnsignedByte(valI); return 1 + 1; } else if (dataTypeS == "") { defFile >> valF; - into.writeUnsignedByte(TYPE_DOUBLE); + into.writeUnsignedByte(libsumo::TYPE_DOUBLE); into.writeDouble(valF); return 8 + 1; } else if (dataTypeS == "") { @@ -480,7 +482,7 @@ if (valueS == "\"\"") { valueS = ""; } - into.writeUnsignedByte(TYPE_STRING); + into.writeUnsignedByte(libsumo::TYPE_STRING); into.writeString(valueS); return 4 + 1 + (int) valueS.length(); } else if (dataTypeS == "") { @@ -493,12 +495,12 @@ slValue.push_back(tmp); length += 4 + int(tmp.length()); } - into.writeUnsignedByte(TYPE_STRINGLIST); + into.writeUnsignedByte(libsumo::TYPE_STRINGLIST); into.writeStringList(slValue); return length; } else if (dataTypeS == "") { defFile >> valI; - into.writeUnsignedByte(TYPE_COMPOUND); + into.writeUnsignedByte(libsumo::TYPE_COMPOUND); into.writeInt(valI); int length = 1 + 4; for (int i = 0; i < valI; ++i) { @@ -507,7 +509,7 @@ return length; } else if (dataTypeS == "") { defFile >> valI; - into.writeUnsignedByte(TYPE_COLOR); + into.writeUnsignedByte(libsumo::TYPE_COLOR); into.writeUnsignedByte(valI); for (int i = 0; i < 3; ++i) { defFile >> valI; @@ -516,14 +518,14 @@ return 1 + 4; } else if (dataTypeS == "") { defFile >> valF; - into.writeUnsignedByte(POSITION_2D); + into.writeUnsignedByte(libsumo::POSITION_2D); into.writeDouble(valF); defFile >> valF; into.writeDouble(valF); return 1 + 8 + 8; } else if (dataTypeS == "") { defFile >> valF; - into.writeUnsignedByte(POSITION_3D); + into.writeUnsignedByte(libsumo::POSITION_3D); into.writeDouble(valF); defFile >> valF; into.writeDouble(valF); @@ -533,7 +535,7 @@ } else if (dataTypeS == "") { std::string valueS; defFile >> valueS; - into.writeUnsignedByte(POSITION_ROADMAP); + into.writeUnsignedByte(libsumo::POSITION_ROADMAP); into.writeString(valueS); int length = 1 + 8 + (int) valueS.length(); defFile >> valF; @@ -543,7 +545,7 @@ return length + 4 + 1; } else if (dataTypeS == "") { defFile >> valI; - into.writeUnsignedByte(TYPE_POLYGON); + into.writeUnsignedByte(libsumo::TYPE_POLYGON); into.writeUnsignedByte(valI); int length = 1 + 1; for (int i = 0; i < valI; ++i) { @@ -562,19 +564,19 @@ void TraCITestClient::readAndReportTypeDependent(tcpip::Storage& inMsg, int valueDataType) { - if (valueDataType == TYPE_UBYTE) { + if (valueDataType == libsumo::TYPE_UBYTE) { int ubyte = inMsg.readUnsignedByte(); answerLog << " Unsigned Byte Value: " << ubyte << std::endl; - } else if (valueDataType == TYPE_BYTE) { + } else if (valueDataType == libsumo::TYPE_BYTE) { int byte = inMsg.readByte(); answerLog << " Byte value: " << byte << std::endl; - } else if (valueDataType == TYPE_INTEGER) { + } else if (valueDataType == libsumo::TYPE_INTEGER) { int integer = inMsg.readInt(); answerLog << " Int value: " << integer << std::endl; - } else if (valueDataType == TYPE_DOUBLE) { + } else if (valueDataType == libsumo::TYPE_DOUBLE) { double doublev = inMsg.readDouble(); answerLog << " Double value: " << doublev << std::endl; - } else if (valueDataType == TYPE_POLYGON) { + } else if (valueDataType == libsumo::TYPE_POLYGON) { int size = inMsg.readUnsignedByte(); if (size == 0) { size = inMsg.readInt(); @@ -586,24 +588,24 @@ answerLog << "(" << x << "," << y << ") "; } answerLog << std::endl; - } else if (valueDataType == POSITION_3D) { + } else if (valueDataType == libsumo::POSITION_3D) { double x = inMsg.readDouble(); double y = inMsg.readDouble(); double z = inMsg.readDouble(); answerLog << " Position3DValue: " << std::endl; answerLog << " x: " << x << " y: " << y << " z: " << z << std::endl; - } else if (valueDataType == POSITION_ROADMAP) { + } else if (valueDataType == libsumo::POSITION_ROADMAP) { std::string roadId = inMsg.readString(); double pos = inMsg.readDouble(); int laneId = inMsg.readUnsignedByte(); answerLog << " RoadMapPositionValue: roadId=" << roadId << " pos=" << pos << " laneId=" << laneId << std::endl; - } else if (valueDataType == TYPE_STRING) { + } else if (valueDataType == libsumo::TYPE_STRING) { std::string s = inMsg.readString(); answerLog << " string value: " << s << std::endl; - } else if (valueDataType == TYPE_STRINGLIST) { + } else if (valueDataType == libsumo::TYPE_STRINGLIST) { std::vector s = inMsg.readStringList(); answerLog << " string list value: [ " << std::endl; for (std::vector::iterator i = s.begin(); i != s.end(); ++i) { @@ -613,7 +615,7 @@ answerLog << '"' << *i << '"'; } answerLog << " ]" << std::endl; - } else if (valueDataType == TYPE_COMPOUND) { + } else if (valueDataType == libsumo::TYPE_COMPOUND) { int no = inMsg.readInt(); answerLog << " compound value with " << no << " members: [ " << std::endl; for (int i = 0; i < no; ++i) { @@ -622,11 +624,11 @@ readAndReportTypeDependent(inMsg, currentValueDataType); } answerLog << " ]" << std::endl; - } else if (valueDataType == POSITION_2D) { + } else if (valueDataType == libsumo::POSITION_2D) { double xv = inMsg.readDouble(); double yv = inMsg.readDouble(); answerLog << " position value: (" << xv << "," << yv << ")" << std::endl; - } else if (valueDataType == TYPE_COLOR) { + } else if (valueDataType == libsumo::TYPE_COLOR) { int r = inMsg.readUnsignedByte(); int g = inMsg.readUnsignedByte(); int b = inMsg.readUnsignedByte(); @@ -776,6 +778,7 @@ vehicle.setMaxSpeed("0", 30); answerLog << " getMaxSpeed: " << vehicle.getMaxSpeed("0") << "\n"; answerLog << " isRouteValid: " << vehicle.isRouteValid("0") << "\n"; + answerLog << " getStopState: " << vehicle.getStopState("0") << "\n"; vehicle.setParameter("0", "meaningOfLife", "42"); answerLog << " param: " << vehicle.getParameter("0", "meaningOfLife") << "\n"; libsumo::TraCIColor col1; @@ -789,7 +792,7 @@ int signals = vehicle.getSignals("0"); answerLog << " getSignals: " << signals << "\n"; vehicle.setSignals("0", signals ^ TraCIAPI::VehicleScope::SIGNAL_FOGLIGHT); - vehicle.setRoutingMode("0", ROUTING_MODE_AGGREGATED); + vehicle.setRoutingMode("0", libsumo::ROUTING_MODE_AGGREGATED); answerLog << " getRoutingMode: " << vehicle.getRoutingMode("0") << "\n"; answerLog << " getNextTLS:\n"; std::vector result = vehicle.getNextTLS("0"); @@ -843,6 +846,14 @@ // simulation answerLog << " simulation:\n"; + answerLog << " convert2D: " << simulation.convert2D("e_m5", 0).getString() << "\n"; + answerLog << " convert2DGeo: " << simulation.convert2D("e_m5", 0, 0, true).getString() << "\n"; + answerLog << " convert3D: " << simulation.convert3D("e_m5", 0).getString() << "\n"; + answerLog << " convert3DGeo: " << simulation.convert3D("e_m5", 0, 0, true).getString() << "\n"; + answerLog << " convertRoad: " << simulation.convertRoad(2500, 500).getString() << "\n"; + answerLog << " convertRoadBus: " << simulation.convertRoad(2500, 500, false, "bus").getString() << "\n"; + answerLog << " convertGeo: " << simulation.convertGeo(2500, 500).getString() << "\n"; + answerLog << " convertCartesian: " << simulation.convertGeo(12, 52, true).getString() << "\n"; answerLog << " getDistance2D_air: " << simulation.getDistance2D(2500, 500, 2000, 500, false, false) << "\n"; answerLog << " getDistance2D_driving: " << simulation.getDistance2D(2500, 500, 2000, 500, false, true) << "\n"; answerLog << " getDistanceRoad_air: " << simulation.getDistanceRoad("e_m5", 0, "e_m4", 0, false) << "\n"; @@ -852,23 +863,23 @@ answerLog << " parkingArea param: " << simulation.getParameter("park1", "parkingArea.capacity") << "\n"; answerLog << " subscribe to road and pos of vehicle '1':\n"; std::vector vars; - vars.push_back(VAR_ROAD_ID); - vars.push_back(VAR_LANEPOSITION); + vars.push_back(libsumo::VAR_ROAD_ID); + vars.push_back(libsumo::VAR_LANEPOSITION); vehicle.subscribe("1", vars, 0, 100); simulationStep(); answerLog << " subscription results:\n"; libsumo::TraCIResults result3 = vehicle.getSubscriptionResults("1"); - answerLog << " roadID=" << result3[VAR_ROAD_ID]->getString() << " pos=" << result3[VAR_LANEPOSITION]->getString() << "\n"; + answerLog << " roadID=" << result3[libsumo::VAR_ROAD_ID]->getString() << " pos=" << result3[libsumo::VAR_LANEPOSITION]->getString() << "\n"; answerLog << " subscribe to vehicles around edge 'e_u1':\n"; std::vector vars2; - vars2.push_back(VAR_LANEPOSITION); - edge.subscribeContext("e_u1", CMD_GET_VEHICLE_VARIABLE, 100, vars2, 0, 100); + vars2.push_back(libsumo::VAR_LANEPOSITION); + edge.subscribeContext("e_u1", libsumo::CMD_GET_VEHICLE_VARIABLE, 100, vars2, 0, 100); simulationStep(); answerLog << " context subscription results:\n"; libsumo::SubscriptionResults result4 = edge.getContextSubscriptionResults("e_u1"); for (libsumo::SubscriptionResults::iterator it = result4.begin(); it != result4.end(); ++it) { - answerLog << " vehicle=" << it->first << " pos=" << it->second[VAR_LANEPOSITION]->getString() << "\n"; + answerLog << " vehicle=" << it->first << " pos=" << it->second[libsumo::VAR_LANEPOSITION]->getString() << "\n"; } // person @@ -891,6 +902,7 @@ answerLog << " getPosition: " << person.getPosition("p0").getString() << "\n"; answerLog << " getPosition3D: " << person.getPosition3D("p0").getString() << "\n"; answerLog << " getAngle: " << person.getAngle("p0") << "\n"; + answerLog << " getSlope: " << person.getSlope("p0") << "\n"; answerLog << " getLanePosition: " << person.getLanePosition("p0") << "\n"; answerLog << " getLength: " << person.getLength("p0") << "\n"; answerLog << " getColor: " << person.getColor("p0").getString() << "\n"; @@ -921,11 +933,14 @@ // trafficlights answerLog << " trafficlights:\n"; + trafficlights.setPhase("n_m4", 0); + trafficlights.setPhaseName("n_m4", "nameSetByTraCI"); answerLog << " getIDList: " << joinToString(trafficlights.getIDList(), " ") << "\n"; answerLog << " getIDCount: " << trafficlights.getIDCount() << "\n"; answerLog << " state: " << trafficlights.getRedYellowGreenState("n_m4") << "\n"; answerLog << " program: " << trafficlights.getProgram("n_m4") << "\n"; answerLog << " phase: " << trafficlights.getPhase("n_m4") << "\n"; + answerLog << " phaseName: " << trafficlights.getPhaseName("n_m4") << "\n"; answerLog << " phaseDuration: " << trafficlights.getPhaseDuration("n_m4") << "\n"; answerLog << " nextSwitch: " << trafficlights.getNextSwitch("n_m4") << "\n"; answerLog << " controlledLanes: " << joinToString(trafficlights.getControlledLanes("n_m4"), " ") << "\n"; @@ -938,8 +953,8 @@ } libsumo::TraCILogic logic("custom", 0, 3); logic.phases = std::vector({ libsumo::TraCIPhase(5, "rrrrrrr", 5, 5), libsumo::TraCIPhase(10, "ggggggg", 5, 15), - libsumo::TraCIPhase(3, "GGGGGGG", 3, 3), libsumo::TraCIPhase(3, "yyyyyyy", 3, 3) - }); + libsumo::TraCIPhase(3, "GGGGGGG", 3, 3), libsumo::TraCIPhase(3, "yyyyyyy", 3, 3) + }); trafficlights.setCompleteRedYellowGreenDefinition("n_m4", logic); std::vector logics = trafficlights.getCompleteRedYellowGreenDefinition("n_m4"); @@ -972,13 +987,15 @@ simulationStep(); answerLog << " getCurrentTime: " << simulation.getCurrentTime() << "\n"; vehicle.subscribe("0", vars, 0, TIME2STEPS(100)); - edge.subscribeContext("e_u1", CMD_GET_VEHICLE_VARIABLE, 100, vars2, 0, TIME2STEPS(100)); + edge.subscribeContext("e_u1", libsumo::CMD_GET_VEHICLE_VARIABLE, 100, vars2, 0, TIME2STEPS(100)); answerLog << " gui:\n"; try { answerLog << " setScheme: \n"; gui.setSchema("View #0", "real world"); answerLog << " getScheme: " << gui.getSchema("View #0") << "\n"; + gui.setZoom("View #0", 50); + answerLog << " getZoom: " << gui.getZoom() << "\n"; answerLog << " take screenshot: \n"; gui.screenshot("View #0", "image.png", 500, 500); } catch (libsumo::TraCIException&) { diff -Nru sumo-1.1.0+dfsg1/src/traci_testclient/TraCITestClient.h sumo-1.2.0+dfsg1/src/traci_testclient/TraCITestClient.h --- sumo-1.1.0+dfsg1/src/traci_testclient/TraCITestClient.h 2018-08-22 22:00:28.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci_testclient/TraCITestClient.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/traci_testclient/tracitestclient_main.cpp sumo-1.2.0+dfsg1/src/traci_testclient/tracitestclient_main.cpp --- sumo-1.1.0+dfsg1/src/traci_testclient/tracitestclient_main.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/traci_testclient/tracitestclient_main.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -6,6 +6,7 @@ add_subdirectory(iodevices) add_subdirectory(options) add_subdirectory(shapes) +add_subdirectory(router) add_subdirectory(traci) add_subdirectory(vehicle) add_subdirectory(xml) @@ -13,3 +14,15 @@ add_subdirectory(foxtools) add_subdirectory(gui) endif () + +if (SUMO_UTILS) + set(utillibs utils_distribution utils_shapes utils_options utils_xml + utils_geom utils_common utils_importio utils_iodevices foreign_tcpip ${PROJ_LIBRARY}) + add_library(sumoutils SHARED "") + install(TARGETS sumoutils DESTINATION lib) + if (MSVC OR APPLE) + target_link_libraries(sumoutils ${utillibs}) + else () + target_link_libraries(sumoutils -Wl,--whole-archive ${utillibs} -Wl,--no-whole-archive) + endif() +endif() diff -Nru sumo-1.1.0+dfsg1/src/utils/common/AbstractMutex.h sumo-1.2.0+dfsg1/src/utils/common/AbstractMutex.h --- sumo-1.1.0+dfsg1/src/utils/common/AbstractMutex.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/AbstractMutex.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file AbstractMutex.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date 2005-07-12 -/// @version $Id$ -/// -// An abstract class for encapsulating mutex implementations -/****************************************************************************/ -#ifndef AbstractMutex_h -#define AbstractMutex_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class AbstractMutex - * @brief An abstract class for encapsulating mutex implementations - * - * This class defines access to a mutex. The implementation may differ. - * - * Within gui-applications, FXMutexes may be used while this is improper - * for command-line applications. Normally, they do not need mutexes unless - * a synchronized communication with an external application is established. - * In these cases, a further class should be implemented. - */ -class AbstractMutex { -public: - /// @brief Constructor - AbstractMutex() { } - - /// @brief Destructor - virtual ~AbstractMutex() { } - - /// @brief Locks the mutex - virtual void lock() = 0; - - /// @brief Unlocks the mutex - virtual void unlock() = 0; - - /** @class ScopedLocker - * @brief A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively - */ - class ScopedLocker { - public: - /** @brief Constructor - * @param[in] lock The mutex to lock - * - * Locks the mutex. - */ - ScopedLocker(AbstractMutex& lock): myLock(lock) { - myLock.lock(); - } - - - /** @brief Destructor - * Unlocks the mutex. - */ - ~ScopedLocker() { - myLock.unlock(); - } - - private: - /// @brief The mutex to lock - AbstractMutex& myLock; - - private: - /// @brief Invalidated copy constructor. - ScopedLocker(const ScopedLocker&); - - /// Invalidated assignment operator. - ScopedLocker& operator=(const ScopedLocker&); - }; - - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/common/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/common/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/common/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,4 @@ set(utils_common_STAT_SRCS - AbstractMutex.h Command.h FileHelpers.cpp FileHelpers.h diff -Nru sumo-1.1.0+dfsg1/src/utils/common/Command.h sumo-1.2.0+dfsg1/src/utils/common/Command.h --- sumo-1.1.0+dfsg1/src/utils/common/Command.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/Command.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/FileHelpers.cpp sumo-1.2.0+dfsg1/src/utils/common/FileHelpers.cpp --- sumo-1.1.0+dfsg1/src/utils/common/FileHelpers.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/FileHelpers.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/common/FileHelpers.h sumo-1.2.0+dfsg1/src/utils/common/FileHelpers.h --- sumo-1.1.0+dfsg1/src/utils/common/FileHelpers.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/FileHelpers.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/IDSupplier.cpp sumo-1.2.0+dfsg1/src/utils/common/IDSupplier.cpp --- sumo-1.1.0+dfsg1/src/utils/common/IDSupplier.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/IDSupplier.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/common/IDSupplier.h sumo-1.2.0+dfsg1/src/utils/common/IDSupplier.h --- sumo-1.1.0+dfsg1/src/utils/common/IDSupplier.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/IDSupplier.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/InstancePool.h sumo-1.2.0+dfsg1/src/utils/common/InstancePool.h --- sumo-1.1.0+dfsg1/src/utils/common/InstancePool.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/InstancePool.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,108 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file InstancePool.h +/// @author Daniel Krajzewicz +/// @date Fri, 29.04.2005 +/// @version $Id$ +/// +// A pool of resuable instances +/****************************************************************************/ +#ifndef InstancePool_h +#define InstancePool_h + + +// =========================================================================== +// included modules +// =========================================================================== + +#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-1.1.0+dfsg1/src/utils/common/Makefile.am sumo-1.2.0+dfsg1/src/utils/common/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/common/Makefile.am 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -1,7 +1,6 @@ noinst_LIBRARIES = libcommon.a -libcommon_a_SOURCES = AbstractMutex.h \ -Command.h \ +libcommon_a_SOURCES = Command.h \ FileHelpers.cpp FileHelpers.h \ IDSupplier.h IDSupplier.cpp \ MsgHandler.h MsgHandler.cpp \ @@ -21,4 +20,5 @@ ToString.h UtilExceptions.h \ ValueRetriever.h ValueSource.h \ ValueTimeLine.h VectorHelper.h \ -WrappingCommand.h SwarmDebug.h +WrappingCommand.h ParametrisedWrappingCommand.h \ +SwarmDebug.h diff -Nru sumo-1.1.0+dfsg1/src/utils/common/Makefile.in sumo-1.2.0+dfsg1/src/utils/common/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/common/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,668 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/common -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) IDSupplier.$(OBJEXT) \ - MsgHandler.$(OBJEXT) Parameterised.$(OBJEXT) \ - RandHelper.$(OBJEXT) RGBColor.$(OBJEXT) StdDefs.$(OBJEXT) \ - StringTokenizer.$(OBJEXT) StringUtils.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libcommon.a -libcommon_a_SOURCES = AbstractMutex.h \ -Command.h \ -FileHelpers.cpp FileHelpers.h \ -IDSupplier.h IDSupplier.cpp \ -MsgHandler.h MsgHandler.cpp \ -MsgRetrievingFunction.h \ -Named.h NamedObjectCont.h NamedRTree.h \ -Parameterised.cpp Parameterised.h \ -RandHelper.h RandHelper.cpp \ -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 \ -SystemFrame.cpp SystemFrame.h \ -SysUtils.h SysUtils.cpp \ -ToString.h UtilExceptions.h \ -ValueRetriever.h ValueSource.h \ -ValueTimeLine.h VectorHelper.h \ -WrappingCommand.h SwarmDebug.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) --foreign src/utils/common/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/common/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileHelpers.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)/SUMOVehicleClass.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@ $(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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/common/MsgHandler.cpp sumo-1.2.0+dfsg1/src/utils/common/MsgHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/common/MsgHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/MsgHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -27,25 +27,26 @@ #include #include #include +#ifdef HAVE_FOX +#include +#endif #include #include #include - #include "MsgHandler.h" -#include "AbstractMutex.h" // =========================================================================== // static member variables // =========================================================================== +MsgHandler::Factory MsgHandler::myFactory = nullptr; MsgHandler* MsgHandler::myDebugInstance = nullptr; MsgHandler* MsgHandler::myGLDebugInstance = nullptr; MsgHandler* MsgHandler::myErrorInstance = nullptr; MsgHandler* MsgHandler::myWarningInstance = nullptr; MsgHandler* MsgHandler::myMessageInstance = nullptr; bool MsgHandler::myAmProcessingProcess = false; -AbstractMutex* MsgHandler::myLock = nullptr; bool MsgHandler::myWriteDebugMessages(false); bool MsgHandler::myWriteDebugGLMessages(false); @@ -57,7 +58,11 @@ MsgHandler* MsgHandler::getMessageInstance() { if (myMessageInstance == nullptr) { - myMessageInstance = new MsgHandler(MT_MESSAGE); + if (myFactory == nullptr) { + myMessageInstance = new MsgHandler(MT_MESSAGE); + } else { + myMessageInstance = myFactory(MT_MESSAGE); + } } return myMessageInstance; } @@ -111,9 +116,6 @@ void MsgHandler::inform(std::string msg, bool addType) { - if (myLock != nullptr) { - myLock->lock(); - } // beautify progress output if (myAmProcessingProcess) { myAmProcessingProcess = false; @@ -126,17 +128,11 @@ } // set the information that something occurred myWasInformed = true; - if (myLock != nullptr) { - myLock->unlock(); - } } void MsgHandler::beginProcessMsg(std::string msg, bool addType) { - if (myLock != nullptr) { - myLock->lock(); - } msg = build(msg, addType); // inform all other receivers for (auto i : myRetrievers) { @@ -145,17 +141,11 @@ } // set the information that something occurred myWasInformed = true; - if (myLock != nullptr) { - myLock->unlock(); - } } void MsgHandler::endProcessMsg(std::string msg) { - if (myLock != nullptr) { - myLock->lock(); - } // inform all other receivers for (auto i : myRetrievers) { i->inform(msg); @@ -163,56 +153,35 @@ // set the information that something occurred myWasInformed = true; myAmProcessingProcess = false; - if (myLock != nullptr) { - myLock->unlock(); - } } void MsgHandler::clear() { - if (myLock != nullptr) { - myLock->lock(); - } myWasInformed = false; - if (myLock != nullptr) { - myLock->unlock(); - } } void MsgHandler::addRetriever(OutputDevice* retriever) { - if (myLock != nullptr) { - myLock->lock(); - } if (!isRetriever(retriever)) { myRetrievers.push_back(retriever); } - if (myLock != nullptr) { - myLock->unlock(); - } } void MsgHandler::removeRetriever(OutputDevice* retriever) { - if (myLock != nullptr) { - myLock->lock(); - } - RetrieverVector::iterator i = find(myRetrievers.begin(), myRetrievers.end(), retriever); + std::vector::iterator i = find(myRetrievers.begin(), myRetrievers.end(), retriever); if (i != myRetrievers.end()) { myRetrievers.erase(i); } - if (myLock != nullptr) { - myLock->unlock(); - } } bool MsgHandler::isRetriever(OutputDevice* retriever) const { - return find(myRetrievers.begin(), myRetrievers.end(), retriever) != myRetrievers.end(); + return std::find(myRetrievers.begin(), myRetrievers.end(), retriever) != myRetrievers.end(); } @@ -270,9 +239,6 @@ void MsgHandler::cleanupOnEnd() { - if (myLock != nullptr) { - myLock->lock(); - } delete myMessageInstance; myMessageInstance = nullptr; delete myWarningInstance; @@ -283,9 +249,6 @@ myDebugInstance = nullptr; delete myGLDebugInstance; myGLDebugInstance = nullptr; - if (myLock != nullptr) { - myLock->unlock(); - } } @@ -309,11 +272,4 @@ } -void -MsgHandler::assignLock(AbstractMutex* lock) { - assert(myLock == 0); - myLock = lock; -} - /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/common/MsgHandler.h sumo-1.2.0+dfsg1/src/utils/common/MsgHandler.h --- sumo-1.1.0+dfsg1/src/utils/common/MsgHandler.h 2018-09-29 22:00:20.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/MsgHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -33,7 +32,6 @@ // =========================================================================== // class declarations // =========================================================================== -class AbstractMutex; class OutputDevice; @@ -63,6 +61,15 @@ MT_GLDEBUG }; +private: + typedef MsgHandler* (*Factory)(MsgType); + +public: + /// @brief Sets the factory function to use for new MsgHandlers + static void setFactory(Factory func) { + myFactory = func; + } + /// @brief Returns the instance to add normal messages to static MsgHandler* getMessageInstance(); @@ -104,7 +111,7 @@ static void cleanupOnEnd(); /// @brief adds a new error to the list - void inform(std::string msg, bool addType = true); + virtual void inform(std::string msg, bool addType = true); /** @brief Begins a process information * @@ -113,19 +120,19 @@ * a process message has been begun. If an error occurs, a newline will be printed. * After the action has been performed, use endProcessMsg to inform the user about it. */ - void beginProcessMsg(std::string msg, bool addType = true); + virtual void beginProcessMsg(std::string msg, bool addType = true); /// @brief Ends a process information - void endProcessMsg(std::string msg); + virtual void endProcessMsg(std::string msg); /// @brief Clears information whether an error occurred previously - void clear(); + virtual void clear(); /// @brief Adds a further retriever to the instance responsible for a certain msg type - void addRetriever(OutputDevice* retriever); + virtual void addRetriever(OutputDevice* retriever); /// @brief Removes the retriever from the handler - void removeRetriever(OutputDevice* retriever); + virtual void removeRetriever(OutputDevice* retriever); /// @brief Returns whether the given output device retrieves messages from the handler bool isRetriever(OutputDevice* retriever) const; @@ -133,9 +140,6 @@ /// @brief Returns the information whether any messages were added bool wasInformed() const; - /// @brief Sets the lock to use The lock will not be deleted - static void assignLock(AbstractMutex* lock); - /** @brief Generic output operator * @return The MsgHandler for further processing */ @@ -175,12 +179,15 @@ } -private: /// @brief standard constructor MsgHandler(MsgType type); /// @brief destructor - ~MsgHandler(); + virtual ~MsgHandler(); + +private: + /// @brief The function to call for new MsgHandlers, nullptr means use default constructor + static Factory myFactory; /// @brief The instance to handle debug static MsgHandler* myDebugInstance; @@ -200,9 +207,6 @@ /// @brief Information whether a process information is printed to cout static bool myAmProcessingProcess; - /// @brief The lock if any has to be used. The lock will not be deleted - static AbstractMutex* myLock; - private: /// @brief The type of the instance MsgType myType; @@ -210,11 +214,8 @@ /// @brief information wehther an error occurred at all bool myWasInformed; - /// @brief Definition of the list of retrievers to inform - typedef std::vector RetrieverVector; - /// @brief The list of retrievers that shall be informed about new messages or errors - RetrieverVector myRetrievers; + std::vector myRetrievers; private: /// @brief invalid copy constructor @@ -232,9 +233,6 @@ }; - - - // =========================================================================== // global definitions // =========================================================================== @@ -251,4 +249,3 @@ #endif /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/common/MsgRetrievingFunction.h sumo-1.2.0+dfsg1/src/utils/common/MsgRetrievingFunction.h --- sumo-1.1.0+dfsg1/src/utils/common/MsgRetrievingFunction.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/MsgRetrievingFunction.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/Named.h sumo-1.2.0+dfsg1/src/utils/common/Named.h --- sumo-1.1.0+dfsg1/src/utils/common/Named.h 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/Named.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -94,18 +93,24 @@ class StoringVisitor { public: /// @brief Contructor - StoringVisitor(std::set& ids) : myIDs(ids) {} + StoringVisitor(std::set& objects) : myIDs(nullptr), myObjects(&objects) {} + StoringVisitor(std::set& objects) : myIDs(&objects), myObjects(nullptr) {} /// @brief Destructor ~StoringVisitor() {} /// @brief Adds the given object to the container void add(const Named* const o) const { - myIDs.insert(o->getID()); + if (myObjects == nullptr) { + myIDs->insert(o->getID()); + } else { + myObjects->insert(o); + } } /// @brief The container - std::set& myIDs; + std::set* myIDs; + std::set* myObjects; private: /// @brief invalidated copy constructor @@ -116,7 +121,6 @@ }; - /** @brief Adds this object to the given container * @param[in, filled] cont The container to add this item to */ diff -Nru sumo-1.1.0+dfsg1/src/utils/common/NamedObjectCont.h sumo-1.2.0+dfsg1/src/utils/common/NamedObjectCont.h --- sumo-1.1.0+dfsg1/src/utils/common/NamedObjectCont.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/NamedObjectCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/NamedRTree.h sumo-1.2.0+dfsg1/src/utils/common/NamedRTree.h --- sumo-1.1.0+dfsg1/src/utils/common/NamedRTree.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/NamedRTree.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/Parameterised.cpp sumo-1.2.0+dfsg1/src/utils/common/Parameterised.cpp --- sumo-1.1.0+dfsg1/src/utils/common/Parameterised.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/Parameterised.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/common/Parameterised.h sumo-1.2.0+dfsg1/src/utils/common/Parameterised.h --- sumo-1.1.0+dfsg1/src/utils/common/Parameterised.h 2018-07-30 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/Parameterised.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/ParametrisedWrappingCommand.h sumo-1.2.0+dfsg1/src/utils/common/ParametrisedWrappingCommand.h --- sumo-1.1.0+dfsg1/src/utils/common/ParametrisedWrappingCommand.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/ParametrisedWrappingCommand.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,110 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file ParametrisedWrappingCommand.h +/// @author Leonhard Luecken +/// @date Apr 2019 +/// @version $Id$ +/// +// A wrapper for a Command function with parameter +/****************************************************************************/ + +#ifndef UTILS_COMMON_PARAMETRISEDWRAPPINGCOMMAND_H_ +#define UTILS_COMMON_PARAMETRISEDWRAPPINGCOMMAND_H_ + +#include "Command.h" + + +// =========================================================================== +// class definition +// =========================================================================== +/** + * @class ParametrisedWrappingCommand + * @brief A wrapper for a Command function with parameter + * @see WrappingCommand.h + */ +template< class T, class S > +class ParametrisedWrappingCommand : public Command { +public: + + /// @brief Type of the function to execute. (with parameter) + typedef SUMOTime(T::* Operation)(SUMOTime, S); + +public: + + /** + * @brief Constructor. + * + * @param[in] receiver Pointer to object of type T that will receive a call to one of it's methods. + * @param[in] parameter The methods parameter (must be copy-constructable) + * @param[in] operation The objects' method that will be called on execute() + */ + ParametrisedWrappingCommand(T* receiver, const S& param, Operation operation) + : myReceiver(receiver), myParameter(param), myOperation(operation), + myAmDescheduledByParent(false) {} + + + /// @brief Destructor + ~ParametrisedWrappingCommand() {} + + + /** @brief Marks this Command as being descheduled + * + * A simple boolean marker ("myAmDescheduledByParent") is set which + * prevents this command from being executed. + */ + void deschedule() { + myAmDescheduledByParent = true; + } + + /// @brief whether this command has been descheduled + bool isDescheduled() { + return myAmDescheduledByParent; + } + + + /// @name Derived from Command + /// @{ + + /** @brief Executes the command. + * + * If the command is not descheduled, the stored method of the stored instance + * is called. + * + * @param[in] currentTime The current simulation time + * @return The time after which the command shall be executed again, 0 if this command shall be descheduled. + * @exception ProcessError Derived actions may throw this exception + */ + SUMOTime execute(SUMOTime currentTime) { + // do not execute if the command was descheduled + if (myAmDescheduledByParent) { + return 0; + } + // execute if stil valid + return (myReceiver->*myOperation)(currentTime, myParameter); + } + /// @} + + +private: + /// @brief The object the action is directed to. + T* myReceiver; + + /// @brief The parameter + S myParameter; + + /// @brief The object's operation to perform. + Operation myOperation; + + /// @brief Whether this command was descheduled (is invalid) and shall not be executed + bool myAmDescheduledByParent; + +}; + +#endif /* UTILS_COMMON_PARAMETRISEDWRAPPINGCOMMAND_H_ */ diff -Nru sumo-1.1.0+dfsg1/src/utils/common/RandHelper.cpp sumo-1.2.0+dfsg1/src/utils/common/RandHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/common/RandHelper.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/RandHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/common/RandHelper.h sumo-1.2.0+dfsg1/src/utils/common/RandHelper.h --- sumo-1.1.0+dfsg1/src/utils/common/RandHelper.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/RandHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/RGBColor.cpp sumo-1.2.0+dfsg1/src/utils/common/RGBColor.cpp --- sumo-1.1.0+dfsg1/src/utils/common/RGBColor.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/RGBColor.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -297,17 +297,11 @@ RGBColor RGBColor::fromHSV(double h, double s, double v) { - // H is given on [0, 6] or UNDEFINED. S and V are given on [0, 1]. - // RGB are each returned on [0, 255]. - //float h = HSV.H, s = HSV.S, v = HSV.V, - double f; h /= 60.; - int i; - //if (h == UNDEFINED) RETURN_RGB(v, v, v); - i = int(floor(h)); - f = float(h - i); - if (!(i & 1)) { - f = 1 - f; // if i is even + const int i = int(floor(h)); + double f = h - i; + if (i % 2 == 0) { + f = 1. - f; } const unsigned char m = static_cast(v * (1 - s) * 255. + 0.5); const unsigned char n = static_cast(v * (1 - s * f) * 255. + 0.5); @@ -330,7 +324,7 @@ return RGBColor(255, 255, 255, 255); } -RGBColor +RGBColor RGBColor::randomHue(double s, double v) { return fromHSV(RandHelper::rand(360, &myRNG), s, v); } diff -Nru sumo-1.1.0+dfsg1/src/utils/common/RGBColor.h sumo-1.2.0+dfsg1/src/utils/common/RGBColor.h --- sumo-1.1.0+dfsg1/src/utils/common/RGBColor.h 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/RGBColor.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -93,6 +92,14 @@ */ void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + /** @brief Sets a new alpha value + * @param[in] alpha The new value to use + */ + inline void setAlpha(unsigned char alpha) { + myAlpha = alpha; + } + + /** @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 @@ -150,12 +157,11 @@ */ static RGBColor interpolate(const RGBColor& minColor, const RGBColor& maxColor, double weight); - /** @brief Converts the given hsv-triplet to rgb + /** @brief Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb.htm * @param[in] h Hue (0-360) * @param[in] s Saturation (0-1) * @param[in] v Value (0-1) * @return The color as RGB - * @author Alvy Ray Smith (http://www.alvyray.com/default.htm) */ static RGBColor fromHSV(double h, double s, double v); diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StaticCommand.h sumo-1.2.0+dfsg1/src/utils/common/StaticCommand.h --- sumo-1.1.0+dfsg1/src/utils/common/StaticCommand.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StaticCommand.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include "Command.h" diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StdDefs.cpp sumo-1.2.0+dfsg1/src/utils/common/StdDefs.cpp --- sumo-1.1.0+dfsg1/src/utils/common/StdDefs.cpp 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StdDefs.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2014-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2014-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,6 +28,7 @@ int gPrecisionGeo = 6; bool gHumanReadableTime = false; bool gSimulation = false; +double gWeightsRandomFactor = 1; bool gDebugFlag1 = false; bool gDebugFlag2 = false; diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StdDefs.h sumo-1.2.0+dfsg1/src/utils/common/StdDefs.h --- sumo-1.1.0+dfsg1/src/utils/common/StdDefs.h 2018-09-09 22:00:13.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StdDefs.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include #include @@ -55,6 +54,8 @@ const double SUMO_const_laneWidthAndOffset = SUMO_const_laneWidth + SUMO_const_laneOffset; const double SUMO_const_halfLaneAndOffset = SUMO_const_halfLaneWidth + SUMO_const_laneOffset; const double SUMO_const_laneMarkWidth = (double) 0.1; +const double SUMO_const_waitingPersonWidth = 0.8; +const double SUMO_const_waitingPersonDepth = 0.67; /// @brief the speed threshold at which vehicles are considered as halting const double SUMO_const_haltingSpeed = (double) 0.1; @@ -119,6 +120,7 @@ extern int gPrecisionGeo; // for lon,lat extern bool gHumanReadableTime; extern bool gSimulation; // whether the current application is sumo or sumo-gui (as opposed to a router) +extern double gWeightsRandomFactor; // randomization for edge weights /// @brief global utility flags for debugging diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StringBijection.h sumo-1.2.0+dfsg1/src/utils/common/StringBijection.h --- sumo-1.1.0+dfsg1/src/utils/common/StringBijection.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StringBijection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StringTokenizer.cpp sumo-1.2.0+dfsg1/src/utils/common/StringTokenizer.cpp --- sumo-1.1.0+dfsg1/src/utils/common/StringTokenizer.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StringTokenizer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StringTokenizer.h sumo-1.2.0+dfsg1/src/utils/common/StringTokenizer.h --- sumo-1.1.0+dfsg1/src/utils/common/StringTokenizer.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StringTokenizer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StringUtils.cpp sumo-1.2.0+dfsg1/src/utils/common/StringUtils.cpp --- sumo-1.1.0+dfsg1/src/utils/common/StringUtils.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StringUtils.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -268,6 +268,7 @@ throw EmptyData(); } char* end; + errno = 0; #ifdef _MSC_VER long long int ret = _strtoi64(data, &end, 10); #else @@ -308,7 +309,7 @@ } -double +double StringUtils::toDouble(const std::string& sData) { if (sData.size() == 0) { throw EmptyData(); diff -Nru sumo-1.1.0+dfsg1/src/utils/common/StringUtils.h sumo-1.2.0+dfsg1/src/utils/common/StringUtils.h --- sumo-1.1.0+dfsg1/src/utils/common/StringUtils.h 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/StringUtils.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -54,7 +53,7 @@ /** Replaces all occurences of the second string by the third string within the first string */ static std::string replace(std::string str, const char* what, - const char* by); + const char* by); /// Builds a time string (hh:mm:ss) from the given seconds static std::string toTimeString(int time); diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SUMOTime.cpp sumo-1.2.0+dfsg1/src/utils/common/SUMOTime.cpp --- sumo-1.1.0+dfsg1/src/utils/common/SUMOTime.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SUMOTime.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,25 +71,26 @@ double s = STEPS2TIME(t); if (s > 3600 * 24) { // days - oss << (int)(s / (3600 * 24)) << ":"; + oss << (long long)(s / (3600 * 24)) << ":"; s = fmod(s, 3600 * 24); } // hours, pad with zero - if (s / 3600 < 10) { + if (s / 3600 < 10 && s >= 0) { oss << "0"; } oss << (int)(s / 3600) << ":"; // minutes, pad with zero s = fmod(s, 3600); - if (s / 60 < 10) { + if (s / 60 < 10 && s >= 0) { oss << "0"; } oss << (int)(s / 60) << ":"; + // seconds, pad with zero s = fmod(s, 60); - if (s < 10) { + if (s < 10 && s >= 0) { oss << "0"; } - if (fmod(s, 1) == 0) { + if (fmod(s, 1) == 0 && TS == 1) { oss << (int)s; } else { oss << s; diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SUMOTime.h sumo-1.2.0+dfsg1/src/utils/common/SUMOTime.h --- sumo-1.1.0+dfsg1/src/utils/common/SUMOTime.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SUMOTime.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -57,7 +56,7 @@ #define STEPS2TIME(x) (static_cast((x)/1000.)) // static cast to long long int truncates so we must pad away from 0 for correct rounding -#define TIME2STEPS(x) (static_cast((x)*1000 + (x >= 0 ? 0.5 : -0.5))) +#define TIME2STEPS(x) (static_cast((x)*1000 + ((x) >= 0 ? 0.5 : -0.5))) #define STEPFLOOR(x) (int(x/DELTA_T)*DELTA_T) #define STEPS2MS(x) (x) diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SUMOVehicleClass.cpp sumo-1.2.0+dfsg1/src/utils/common/SUMOVehicleClass.cpp --- sumo-1.1.0+dfsg1/src/utils/common/SUMOVehicleClass.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SUMOVehicleClass.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -73,6 +73,7 @@ {"bicycle", SVC_BICYCLE}, {"pedestrian", SVC_PEDESTRIAN}, {"evehicle", SVC_E_VEHICLE}, + //{"automated", SVC_AUTOMATED}, {"ship", SVC_SHIP}, {"custom1", SVC_CUSTOM1}, {"custom2", SVC_CUSTOM2} @@ -129,42 +130,71 @@ StringBijection SumoVehicleShapeStrings( sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false); +// =========================================================================== +// static values used for cached +// =========================================================================== + +static std::map > vehicleClassNamesListCached; +static std::map parseVehicleClassesCached; +static std::map getVehicleClassNamesCached; +static std::string vehicleClassNameAll = "all"; // =========================================================================== // additional constants // =========================================================================== const int SUMOVehicleClass_MAX = SVC_CUSTOM2; + const SVCPermissions SVCAll = 2 * SUMOVehicleClass_MAX - 1; // all relevant bits set to 1 + const SVCPermissions SVC_UNSPECIFIED = -1; +const std::string DEFAULT_VTYPE_ID("DEFAULT_VEHTYPE"); + +const std::string DEFAULT_PEDTYPE_ID("DEFAULT_PEDTYPE"); + +const std::string DEFAULT_BIKETYPE_ID("DEFAULT_BIKETYPE"); + +const double DEFAULT_VEH_PROB(1.); + +const double DEFAULT_PEDESTRIAN_SPEED(5. / 3.6); + +const double DEFAULT_CONTAINER_TRANSHIP_SPEED(5. / 3.6); // =========================================================================== // method definitions // =========================================================================== // ------------ Conversion of SUMOVehicleClass -std::string +const std::string& getVehicleClassNames(SVCPermissions permissions, bool expand) { if (permissions == SVCAll && !expand) { - return "all"; + return vehicleClassNameAll; } - return joinToString(getVehicleClassNamesList(permissions), ' '); + // check if previously was cached + if (getVehicleClassNamesCached.count(permissions) == 0) { + getVehicleClassNamesCached[permissions] = joinToString(getVehicleClassNamesList(permissions), ' '); + } + return getVehicleClassNamesCached.at(permissions); } -std::vector +const std::vector& 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_IGNORING) { - result.push_back(*it); + // first check if it's cached + if (vehicleClassNamesListCached.count(permissions) == 0) { + 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_IGNORING) { + result.push_back(*it); + } } + // add it into vehicleClassNamesListCached + vehicleClassNamesListCached[permissions] = result; } - return result; + return vehicleClassNamesListCached.at(permissions); } @@ -195,22 +225,27 @@ if (allowedS == "all") { return SVCAll; } - SVCPermissions result = 0; - StringTokenizer sta(allowedS, " "); - while (sta.hasNext()) { - const std::string s = sta.next(); - if (!SumoVehicleClassStrings.hasString(s)) { - WRITE_ERROR("Unknown vehicle class '" + s + "' encountered."); - } else { - const SUMOVehicleClass vc = getVehicleClassID(s); - const std::string& realName = SumoVehicleClassStrings.getString(vc); - if (realName != s) { - deprecatedVehicleClassesSeen.insert(s); + // check if allowedS was previously cached + if (parseVehicleClassesCached.count(allowedS) == 0) { + SVCPermissions result = 0; + StringTokenizer sta(allowedS, " "); + while (sta.hasNext()) { + const std::string s = sta.next(); + if (!SumoVehicleClassStrings.hasString(s)) { + WRITE_ERROR("Unknown vehicle class '" + s + "' encountered."); + } else { + const SUMOVehicleClass vc = getVehicleClassID(s); + const std::string& realName = SumoVehicleClassStrings.getString(vc); + if (realName != s) { + deprecatedVehicleClassesSeen.insert(s); + } + result |= vc; } - result |= vc; } + // save parsed vehicle class cached + parseVehicleClassesCached[allowedS] = result; } - return result; + return parseVehicleClassesCached.at(allowedS); } @@ -219,6 +254,10 @@ if (classes == "all") { return true; } + // check if was previously cached + if (parseVehicleClassesCached.count(classes) != 0) { + return true; + } StringTokenizer sta(classes, " "); while (sta.hasNext()) { if (!SumoVehicleClassStrings.hasString(sta.next())) { @@ -229,7 +268,8 @@ } -extern SVCPermissions parseVehicleClasses(const std::string& allowedS, const std::string& disallowedS) { +SVCPermissions +parseVehicleClasses(const std::string& allowedS, const std::string& disallowedS) { if (allowedS.size() == 0 && disallowedS.size() == 0) { return SVCAll; } else if (allowedS.size() > 0 && disallowedS.size() > 0) { @@ -242,14 +282,19 @@ } } -extern SVCPermissions + +SVCPermissions invertPermissions(SVCPermissions permissions) { return SVCAll & ~permissions; } + SVCPermissions parseVehicleClasses(const std::vector& allowedS) { SVCPermissions result = 0; + if (std::find(allowedS.begin(), allowedS.end(), "all") != allowedS.end()) { + return SVCAll; + } for (std::vector::const_iterator i = allowedS.begin(); i != allowedS.end(); ++i) { const SUMOVehicleClass vc = getVehicleClassID(*i); const std::string& realName = SumoVehicleClassStrings.getString(vc); @@ -305,7 +350,8 @@ } -bool canParseVehicleShape(const std::string& shape) { +bool +canParseVehicleShape(const std::string& shape) { return SumoVehicleShapeStrings.hasString(shape); } @@ -321,23 +367,30 @@ } -bool isWaterway(SVCPermissions permissions) { +bool +isWaterway(SVCPermissions permissions) { return permissions == SVC_SHIP; } -bool isForbidden(SVCPermissions permissions) { +bool +isForbidden(SVCPermissions permissions) { return (permissions & SVCAll) == 0; } -bool isSidewalk(SVCPermissions permissions) { + +bool +isSidewalk(SVCPermissions permissions) { return (permissions & SVCAll) == SVC_PEDESTRIAN; } -bool noVehicles(SVCPermissions permissions) { + +bool +noVehicles(SVCPermissions permissions) { return isForbidden(permissions) || isSidewalk(permissions); } + std::map parseStopOffsets(const SUMOSAXAttributes& attrs, bool& ok) { const std::string vClasses = attrs.getOpt(SUMO_ATTR_VCLASSES, nullptr, ok, ""); const std::string exceptions = attrs.getOpt(SUMO_ATTR_EXCEPTIONS, nullptr, ok, ""); @@ -363,16 +416,5 @@ return offsets; } - -const std::string DEFAULT_VTYPE_ID("DEFAULT_VEHTYPE"); -const std::string DEFAULT_PEDTYPE_ID("DEFAULT_PEDTYPE"); -const std::string DEFAULT_BIKETYPE_ID("DEFAULT_BIKETYPE"); - -const double DEFAULT_VEH_PROB(1.); - -const double DEFAULT_PEDESTRIAN_SPEED(5. / 3.6); - -const double DEFAULT_CONTAINER_TRANSHIP_SPEED(5. / 3.6); - /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SUMOVehicleClass.h sumo-1.2.0+dfsg1/src/utils/common/SUMOVehicleClass.h --- sumo-1.1.0+dfsg1/src/utils/common/SUMOVehicleClass.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SUMOVehicleClass.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,7 +25,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -69,6 +68,8 @@ SVS_PASSENGER_WAGON, /// @brief render as a van SVS_PASSENGER_VAN, + /// @brief automated car (with cruise controllers) + //SVS_PASSENGER_AUTOMATED, /// @brief render as a delivery vehicle SVS_DELIVERY, /// @brief render as a transport vehicle @@ -193,6 +194,8 @@ SVC_CUSTOM1 = 1 << 23, /// @brief is a user-defined type SVC_CUSTOM2 = 1 << 24, + /// @brief is an automated car (ACC/CACC capable) + SVC_AUTOMATED = 1 << 25, //@} /// @brief classes which drive on tracks @@ -235,13 +238,13 @@ * @param[in] expand whether 'all' should be used * @return The string representation of these classes */ -extern std::string getVehicleClassNames(SVCPermissions permissions, bool expand = false); +extern const std::string& getVehicleClassNames(SVCPermissions permissions, bool expand = false); /** @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 getVehicleClassNamesList(SVCPermissions permissions); +extern const std::vector& getVehicleClassNamesList(SVCPermissions permissions); /** @brief Returns the class id of the abstract class given by its name * @param[in] name The name of the abstract vehicle class diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SwarmDebug.h sumo-1.2.0+dfsg1/src/utils/common/SwarmDebug.h --- sumo-1.1.0+dfsg1/src/utils/common/SwarmDebug.h 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SwarmDebug.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SystemFrame.cpp sumo-1.2.0+dfsg1/src/utils/common/SystemFrame.cpp --- sumo-1.1.0+dfsg1/src/utils/common/SystemFrame.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SystemFrame.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,8 +71,8 @@ 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)); - oc.addDescription("help", "Report", "Prints this screen"); + oc.doRegister("help", '?', new Option_BoolExtended(false)); + oc.addDescription("help", "Report", "Prints this screen or selected topics"); oc.doRegister("version", 'V', new Option_Bool(false)); oc.addDescription("version", "Report", "Prints the current version"); @@ -120,6 +120,9 @@ gPrecision = oc.getInt("precision"); gPrecisionGeo = oc.getInt("precision.geo"); gHumanReadableTime = oc.getBool("human-readable-time"); + if (oc.exists("weights.random-factor")) { + gWeightsRandomFactor = oc.getFloat("weights.random-factor"); + } return true; } diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SystemFrame.h sumo-1.2.0+dfsg1/src/utils/common/SystemFrame.h --- sumo-1.1.0+dfsg1/src/utils/common/SystemFrame.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SystemFrame.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,6 @@ // =========================================================================== // included modules // =========================================================================== -#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SysUtils.cpp sumo-1.2.0+dfsg1/src/utils/common/SysUtils.cpp --- sumo-1.1.0+dfsg1/src/utils/common/SysUtils.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SysUtils.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/common/SysUtils.h sumo-1.2.0+dfsg1/src/utils/common/SysUtils.h --- sumo-1.1.0+dfsg1/src/utils/common/SysUtils.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/SysUtils.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,7 +21,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/ToString.h sumo-1.2.0+dfsg1/src/utils/common/ToString.h --- sumo-1.1.0+dfsg1/src/utils/common/ToString.h 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/ToString.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -117,6 +116,17 @@ return SUMOXMLDefinitions::RightOfWayValues.getString(row); } +template <> +inline std::string toString(const FringeType& fringeType, std::streamsize accuracy) { + UNUSED_PARAMETER(accuracy); + return SUMOXMLDefinitions::FringeTypeValues.getString(fringeType); +} + +template <> +inline std::string toString(const PersonMode& personMode, std::streamsize accuracy) { + UNUSED_PARAMETER(accuracy); + return SUMOXMLDefinitions::PersonModeValues.getString(personMode); +} template <> inline std::string toString(const LinkState& linkState, std::streamsize accuracy) { diff -Nru sumo-1.1.0+dfsg1/src/utils/common/UtilExceptions.h sumo-1.2.0+dfsg1/src/utils/common/UtilExceptions.h --- sumo-1.1.0+dfsg1/src/utils/common/UtilExceptions.h 2018-11-09 23:00:30.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/UtilExceptions.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -24,7 +24,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include @@ -154,13 +153,13 @@ /// define SOFT_ASSERT raise an assertion in debug mode everywhere except on the windows test server #ifdef MSVC_TEST_SERVER - #ifdef _DEBUG - #define SOFT_ASSERT(expr) if (!(expr)) {throw ProcessError("should not happen");} - #else - #define SOFT_ASSERT(expr) - #endif +#ifdef _DEBUG +#define SOFT_ASSERT(expr) if (!(expr)) {throw ProcessError("should not happen");} #else - #define SOFT_ASSERT(expr) assert(expr); +#define SOFT_ASSERT(expr) +#endif +#else +#define SOFT_ASSERT(expr) assert(expr); #endif #endif diff -Nru sumo-1.1.0+dfsg1/src/utils/common/ValueRetriever.h sumo-1.2.0+dfsg1/src/utils/common/ValueRetriever.h --- sumo-1.1.0+dfsg1/src/utils/common/ValueRetriever.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/ValueRetriever.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,7 +21,6 @@ // =========================================================================== // included modules // =========================================================================== -#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/utils/common/ValueSource.h sumo-1.2.0+dfsg1/src/utils/common/ValueSource.h --- sumo-1.1.0+dfsg1/src/utils/common/ValueSource.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/ValueSource.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -21,7 +21,6 @@ // =========================================================================== // included modules // =========================================================================== -#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/utils/common/ValueTimeLine.h sumo-1.2.0+dfsg1/src/utils/common/ValueTimeLine.h --- sumo-1.1.0+dfsg1/src/utils/common/ValueTimeLine.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/ValueTimeLine.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,6 @@ #include #include -#include // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/utils/common/VectorHelper.h sumo-1.2.0+dfsg1/src/utils/common/VectorHelper.h --- sumo-1.1.0+dfsg1/src/utils/common/VectorHelper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/VectorHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include #include diff -Nru sumo-1.1.0+dfsg1/src/utils/common/WrappingCommand.h sumo-1.2.0+dfsg1/src/utils/common/WrappingCommand.h --- sumo-1.1.0+dfsg1/src/utils/common/WrappingCommand.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/common/WrappingCommand.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -22,7 +22,6 @@ // =========================================================================== // included modules // =========================================================================== -#include #include "Command.h" diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/DistributionCont.cpp sumo-1.2.0+dfsg1/src/utils/distribution/DistributionCont.cpp --- sumo-1.1.0+dfsg1/src/utils/distribution/DistributionCont.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/DistributionCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -71,7 +71,7 @@ for (TypedDistDict::iterator i = myDict.begin(); i != myDict.end(); i++) { DistDict& dict = (*i).second; for (DistDict::iterator j = dict.begin(); j != dict.end(); j++) { - delete(*j).second; + delete (*j).second; } } } diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/DistributionCont.h sumo-1.2.0+dfsg1/src/utils/distribution/DistributionCont.h --- sumo-1.1.0+dfsg1/src/utils/distribution/DistributionCont.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/DistributionCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/Distribution.h sumo-1.2.0+dfsg1/src/utils/distribution/Distribution.h --- sumo-1.1.0+dfsg1/src/utils/distribution/Distribution.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/Distribution.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Parameterized.cpp sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Parameterized.cpp --- sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Parameterized.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Parameterized.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -100,13 +100,20 @@ std::string Distribution_Parameterized::toStr(std::streamsize accuracy) const { - return myParameter[1] == 0. ? toString(myParameter[0]) : myID + "(" + joinToString(myParameter, ",", accuracy) + ")"; + if (myParameter[1] < 0) { + // only write simple speedFactor + return toString(myParameter[0]); + } else { + return (myParameter[1] == 0. + ? myID + "(" + toString(myParameter[0], accuracy) + "," + toString(myParameter[1], accuracy) + ")" + : myID + "(" + joinToString(myParameter, ",", accuracy) + ")"); + } } bool Distribution_Parameterized::isValid(std::string& error) { - if (myParameter.size() > 2) { + if (myParameter.size() > 2 && myParameter[1] != 0) { if (myParameter[0] > getMax()) { error = "distribution mean " + toString(myParameter[0]) + " is larger than upper boundary " + toString(getMax()); return false; diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Parameterized.h sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Parameterized.h --- sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Parameterized.h 2018-06-26 22:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Parameterized.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Points.cpp sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Points.cpp --- sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Points.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Points.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Points.h sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Points.h --- sumo-1.1.0+dfsg1/src/utils/distribution/Distribution_Points.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/Distribution_Points.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/distribution/Makefile.in sumo-1.2.0+dfsg1/src/utils/distribution/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/distribution/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,637 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/distribution -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = Distribution_Parameterized.$(OBJEXT) \ - Distribution_Points.$(OBJEXT) DistributionCont.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libdistribution.a -libdistribution_a_SOURCES = Distribution.h \ -Distribution_Parameterized.cpp Distribution_Parameterized.h \ -Distribution_Points.cpp Distribution_Points.h \ -DistributionCont.cpp DistributionCont.h \ -RandomDistributor.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) --foreign src/utils/distribution/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/distribution/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DistributionCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Distribution_Parameterized.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Distribution_Points.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/distribution/RandomDistributor.h sumo-1.2.0+dfsg1/src/utils/distribution/RandomDistributor.h --- sumo-1.1.0+dfsg1/src/utils/distribution/RandomDistributor.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/distribution/RandomDistributor.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersEnergy.cpp sumo-1.2.0+dfsg1/src/utils/emissions/HelpersEnergy.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersEnergy.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersEnergy.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersEnergy.h sumo-1.2.0+dfsg1/src/utils/emissions/HelpersEnergy.h --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersEnergy.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersEnergy.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHarmonoise.cpp sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHarmonoise.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHarmonoise.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHarmonoise.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -79,7 +79,7 @@ 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 - }; + }; @@ -87,7 +87,7 @@ 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 - }; + }; // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHarmonoise.h sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHarmonoise.h --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHarmonoise.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHarmonoise.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA3.cpp sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA3.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA3.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA3.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA3.h sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA3.h --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA3.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA3.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA.cpp sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA.h sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA.h --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersHBEFA.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersHBEFA.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersPHEMlight.cpp sumo-1.2.0+dfsg1/src/utils/emissions/HelpersPHEMlight.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersPHEMlight.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersPHEMlight.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/HelpersPHEMlight.h sumo-1.2.0+dfsg1/src/utils/emissions/HelpersPHEMlight.h --- sumo-1.1.0+dfsg1/src/utils/emissions/HelpersPHEMlight.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/HelpersPHEMlight.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/Makefile.in sumo-1.2.0+dfsg1/src/utils/emissions/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/emissions/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,647 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = HelpersEnergy.$(OBJEXT) \ - 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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = HelpersEnergy.cpp HelpersEnergy.h \ -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) --foreign src/utils/emissions/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/emissions/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)/HelpersEnergy.Po@am__quote@ -@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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/emissions/PHEMCEP.cpp sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEP.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/PHEMCEP.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEP.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/PHEMCEP.h sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEP.h --- sumo-1.1.0+dfsg1/src/utils/emissions/PHEMCEP.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEP.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/PHEMCEPHandler.cpp sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEPHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/PHEMCEPHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEPHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -43,7 +43,7 @@ PHEMCEPHandler::~PHEMCEPHandler() { std::map::iterator iter = _ceps.begin(); while (iter != _ceps.end()) { - delete(iter->second); + delete (iter->second); iter++; } // end while _ceps.clear(); diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/PHEMCEPHandler.h sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEPHandler.h --- sumo-1.1.0+dfsg1/src/utils/emissions/PHEMCEPHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/PHEMCEPHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/PHEMConstants.h sumo-1.2.0+dfsg1/src/utils/emissions/PHEMConstants.h --- sumo-1.1.0+dfsg1/src/utils/emissions/PHEMConstants.h 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/PHEMConstants.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/PollutantsInterface.cpp sumo-1.2.0+dfsg1/src/utils/emissions/PollutantsInterface.cpp --- sumo-1.1.0+dfsg1/src/utils/emissions/PollutantsInterface.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/PollutantsInterface.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/emissions/PollutantsInterface.h sumo-1.2.0+dfsg1/src/utils/emissions/PollutantsInterface.h --- sumo-1.1.0+dfsg1/src/utils/emissions/PollutantsInterface.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/emissions/PollutantsInterface.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2013-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2013-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/foxtools/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/foxtools/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,7 @@ set(utils_foxtools_STAT_SRCS FXBaseObject.cpp FXBaseObject.h + FXConditionalLock.h fxexdefs.h MFXImageHelper.cpp MFXImageHelper.h @@ -12,13 +13,14 @@ FXSevenSegment.h FXSingleEventThread.cpp FXSingleEventThread.h + FXSynchQue.h FXThreadEvent.cpp FXThreadEvent.h FXWorkerThread.h + MsgHandlerSynchronized.h + MsgHandlerSynchronized.cpp MFXCheckableButton.cpp MFXCheckableButton.h - MFXEventQue.cpp - MFXEventQue.h MFXInterThreadEventClient.h MFXAddEditTypedTable.cpp MFXAddEditTypedTable.h @@ -26,8 +28,8 @@ MFXEditableTable.h MFXMenuHeader.cpp MFXMenuHeader.h - MFXMutex.cpp - MFXMutex.h + MFXIconComboBox.cpp + MFXIconComboBox.h MFXUtils.cpp MFXUtils.h ) diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXBaseObject.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/FXBaseObject.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXBaseObject.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXBaseObject.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXBaseObject.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXBaseObject.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXBaseObject.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXBaseObject.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXConditionalLock.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXConditionalLock.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXConditionalLock.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXConditionalLock.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,63 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2018-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file FXConditionalLock.h +/// @author Michael Behrisch +/// @date 2018-11-14 +/// @version $Id$ +/// +// A scoped lock which only triggers on condition +/****************************************************************************/ + +#ifndef FXConditionalLock_h +#define FXConditionalLock_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class FXConditionalLock + * @brief A scoped lock which only triggers on condition + */ +class FXConditionalLock { +public: + /// Construct & lock associated mutex if the condition is true + FXConditionalLock(FXMutex& m, const bool condition) + : myMutex(m), myCondition(condition) { + if (condition) { + m.lock(); + } + } + + /// Destroy and unlock associated mutex + ~FXConditionalLock() { + if (myCondition) { + myMutex.unlock(); + } + } + +private: + FXMutex& myMutex; + const bool myCondition; + +private: + FXConditionalLock& operator=(const FXConditionalLock&) = delete; +}; + + +#endif diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/fxexdefs.h sumo-1.2.0+dfsg1/src/utils/foxtools/fxexdefs.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/fxexdefs.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/fxexdefs.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXLCDLabel.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/FXLCDLabel.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXLCDLabel.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXLCDLabel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXLCDLabel.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXLCDLabel.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXLCDLabel.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXLCDLabel.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXLinkLabel.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/FXLinkLabel.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXLinkLabel.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXLinkLabel.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXLinkLabel.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXLinkLabel.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXLinkLabel.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXLinkLabel.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXSevenSegment.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/FXSevenSegment.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXSevenSegment.cpp 2018-06-18 22:00:26.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXSevenSegment.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -216,23 +216,24 @@ drawSegments(dc, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE); break; case '(' : - drawSegments(dc, TRUE , TRUE , FALSE, FALSE, TRUE , FALSE, TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE); break; case ')' : - drawSegments(dc, TRUE , FALSE, TRUE , FALSE, FALSE, TRUE , TRUE); + drawSegments(dc, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE); break; case '[' : - drawSegments(dc, TRUE , TRUE , FALSE, FALSE, TRUE , FALSE, TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE); break; case ']' : - drawSegments(dc, TRUE , FALSE, TRUE , FALSE, FALSE, TRUE , TRUE); + drawSegments(dc, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE); break; case '=' : - drawSegments(dc, FALSE, FALSE, FALSE, TRUE , FALSE, FALSE, TRUE); + drawSegments(dc, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE); break; // case '+' : drawSegments (dc, FALSE,FALSE,FALSE,TRUE ,FALSE,FALSE,FALSE); break; case '-' : - drawSegments(dc, FALSE, FALSE, FALSE, TRUE , FALSE, FALSE, FALSE); + case ':' : + drawSegments(dc, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE); break; case '_' : case '.' : @@ -240,114 +241,114 @@ drawSegments(dc, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE); break; case '0' : - drawSegments(dc, TRUE , TRUE , TRUE , FALSE, TRUE , TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE); break; case '1' : - drawSegments(dc, FALSE, FALSE, TRUE , FALSE, FALSE, TRUE , FALSE); + drawSegments(dc, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE); break; case '2' : - drawSegments(dc, TRUE , FALSE, TRUE , TRUE , TRUE , FALSE, TRUE); + drawSegments(dc, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE); break; case '3' : - drawSegments(dc, TRUE , FALSE, TRUE , TRUE , FALSE, TRUE , TRUE); + drawSegments(dc, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE); break; case '4' : - drawSegments(dc, FALSE, TRUE , TRUE , TRUE , FALSE, TRUE , FALSE); + drawSegments(dc, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE); break; case '5' : - drawSegments(dc, TRUE , TRUE , FALSE, TRUE , FALSE, TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE); break; case '6' : - drawSegments(dc, TRUE , TRUE , FALSE, TRUE , TRUE , TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE); break; case '7' : - drawSegments(dc, TRUE , FALSE, TRUE , FALSE, FALSE, TRUE , FALSE); + drawSegments(dc, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE); break; case '8' : - drawSegments(dc, TRUE , TRUE , TRUE , TRUE , TRUE , TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); break; case '9' : - drawSegments(dc, TRUE , TRUE , TRUE , TRUE , FALSE, TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE); break; case 'a' : case 'A' : - drawSegments(dc, TRUE , TRUE , TRUE , TRUE , TRUE , TRUE , FALSE); + drawSegments(dc, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE); break; case 'b' : case 'B' : - drawSegments(dc, FALSE, TRUE , FALSE, TRUE , TRUE , TRUE , TRUE); + drawSegments(dc, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE); break; case 'c' : case 'C' : - drawSegments(dc, TRUE , TRUE , FALSE, FALSE, TRUE , FALSE, TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE); break; case 'd' : case 'D' : - drawSegments(dc, FALSE, FALSE, TRUE , TRUE , TRUE , TRUE , TRUE); + drawSegments(dc, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE); break; case 'e' : case 'E' : - drawSegments(dc, TRUE , TRUE , FALSE, TRUE , TRUE , FALSE, TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE); break; case 'f' : case 'F' : - drawSegments(dc, TRUE , TRUE , FALSE, TRUE , TRUE , FALSE, FALSE); + drawSegments(dc, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE); break; case 'g' : case 'G' : - drawSegments(dc, TRUE , TRUE , FALSE, FALSE, TRUE , TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE); break; case 'h' : case 'H' : - drawSegments(dc, FALSE, TRUE , FALSE, TRUE , TRUE , TRUE , FALSE); + drawSegments(dc, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE); break; case 'i' : case 'I' : - drawSegments(dc, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE , FALSE); + drawSegments(dc, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE); break; case 'j' : case 'J' : - drawSegments(dc, FALSE, FALSE, TRUE , FALSE, TRUE , TRUE , TRUE); + drawSegments(dc, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE); break; // case 'k' : // case 'k' : drawSegments (dc, FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE); break; case 'l' : case 'L' : - drawSegments(dc, FALSE, TRUE , FALSE, FALSE, TRUE , FALSE, TRUE); + drawSegments(dc, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE); break; // case 'm' : // case 'M' : drawSegments (dc, FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE); break; case 'n' : case 'N' : - drawSegments(dc, FALSE, FALSE, FALSE, TRUE , TRUE , TRUE , FALSE); + drawSegments(dc, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE); break; case 'o' : case 'O' : - drawSegments(dc, TRUE , TRUE , TRUE , FALSE, TRUE , TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE); break; case 'p' : case 'P' : - drawSegments(dc, TRUE , TRUE , TRUE , TRUE , TRUE , FALSE, FALSE); + drawSegments(dc, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE); break; case 'q' : case 'Q' : - drawSegments(dc, TRUE , TRUE , TRUE , TRUE , FALSE, TRUE , FALSE); + drawSegments(dc, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE); break; case 'r' : case 'R' : - drawSegments(dc, FALSE, FALSE, FALSE, TRUE , TRUE , FALSE, FALSE); + drawSegments(dc, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE); break; case 's' : case 'S' : - drawSegments(dc, TRUE , TRUE , FALSE, TRUE , FALSE, TRUE , TRUE); + drawSegments(dc, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE); break; case 't' : case 'T' : - drawSegments(dc, FALSE, TRUE , FALSE, TRUE , TRUE , FALSE, FALSE); + drawSegments(dc, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE); break; case 'u' : case 'U' : - drawSegments(dc, FALSE, TRUE , TRUE , FALSE, TRUE , TRUE , TRUE); + drawSegments(dc, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE); break; // case 'v' : // case 'V' : drawSegments (dc, FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE); break; @@ -355,11 +356,11 @@ // case 'W' : drawSegments (dc, FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE); break; case 'x' : case 'X' : - drawSegments(dc, FALSE, TRUE , TRUE , TRUE , TRUE , TRUE , FALSE); + drawSegments(dc, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE); break; case 'y' : case 'Y' : - drawSegments(dc, FALSE, TRUE , TRUE , TRUE , FALSE, TRUE , TRUE); + drawSegments(dc, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE); break; // case 'z' : // case 'Z' : diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXSevenSegment.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXSevenSegment.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXSevenSegment.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXSevenSegment.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXSingleEventThread.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/FXSingleEventThread.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXSingleEventThread.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXSingleEventThread.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -122,7 +122,7 @@ long -FXSingleEventThread::onThreadEvent(FXObject*, FXSelector , void*) { +FXSingleEventThread::onThreadEvent(FXObject*, FXSelector, void*) { myClient->eventOccurred(); /* FXuint seltype1 = FXSELTYPE(SEL_THREAD); diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXSingleEventThread.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXSingleEventThread.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXSingleEventThread.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXSingleEventThread.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXSynchQue.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXSynchQue.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXSynchQue.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXSynchQue.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,160 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file FXSynchQue.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id$ +/// +// missing_desc +/****************************************************************************/ +#ifndef FXSynchQue_h +#define FXSynchQue_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#ifdef HAVE_FOX +#include +#endif +#include +#include + +template > +class FXSynchQue { +public: + FXSynchQue(const bool condition = true): myCondition(condition) {} + + T top() { + assert(myItems.size() != 0); +#ifdef HAVE_FOX + if (myCondition) { + myMutex.lock(); + } +#endif + T ret = myItems.front(); +#ifdef HAVE_FOX + if (myCondition) { + myMutex.unlock(); + } +#endif + return ret; + } + + void pop() { +#ifdef HAVE_FOX + if (myCondition) { + myMutex.lock(); + } +#endif + myItems.erase(myItems.begin()); +#ifdef HAVE_FOX + if (myCondition) { + myMutex.unlock(); + } +#endif + } + + // Attention! Removes locking behavior + void unsetCondition() { + myCondition = false; + } + + // Attention! Retains the lock + Container& getContainer() { +#ifdef HAVE_FOX + if (myCondition) { + myMutex.lock(); + } +#endif + return myItems; + } + + void unlock() { +#ifdef HAVE_FOX + if (myCondition) { + myMutex.unlock(); + } +#endif + } + + void push_back(T what) { +#ifdef HAVE_FOX + if (myCondition) { + myMutex.lock(); + } +#endif + myItems.push_back(what); +#ifdef HAVE_FOX + if (myCondition) { + myMutex.unlock(); + } +#endif + } + + bool empty() { +#ifdef HAVE_FOX + if (myCondition) { + myMutex.lock(); + } +#endif + const bool ret = myItems.size() == 0; +#ifdef HAVE_FOX + if (myCondition) { + myMutex.unlock(); + } +#endif + return ret; + } + + void clear() { +#ifdef HAVE_FOX + if (myCondition) { + myMutex.lock(); + } +#endif + myItems.clear(); +#ifdef HAVE_FOX + if (myCondition) { + myMutex.unlock(); + } +#endif + } + + size_t size() const { +#ifdef HAVE_FOX + if (myCondition) { + myMutex.lock(); + } +#endif + size_t res = myItems.size(); +#ifdef HAVE_FOX + if (myCondition) { + myMutex.unlock(); + } +#endif + return res; + } + +private: +#ifdef HAVE_FOX + mutable FXMutex myMutex; +#endif + Container myItems; + bool myCondition; +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXThreadEvent.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/FXThreadEvent.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXThreadEvent.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXThreadEvent.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXThreadEvent.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXThreadEvent.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXThreadEvent.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXThreadEvent.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXThreadMessageRetriever.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXThreadMessageRetriever.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXThreadMessageRetriever.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXThreadMessageRetriever.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/FXWorkerThread.h sumo-1.2.0+dfsg1/src/utils/foxtools/FXWorkerThread.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/FXWorkerThread.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/FXWorkerThread.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -18,6 +18,10 @@ #ifndef FXWorkerThread_h #define FXWorkerThread_h +// #define WORKLOAD_PROFILING +// at which interval report maximum workload of the threads, needs WORKLOAD_PROFILING +// undefine to use summary report only +#define WORKLOAD_INTERVAL 100 // =========================================================================== // included modules @@ -27,7 +31,12 @@ #include #include #include -#include +#ifdef WORKLOAD_PROFILING +#include +#include +#include +#endif +#include // =========================================================================== @@ -85,7 +94,20 @@ * * @param[in] numThreads the number of threads to create */ - Pool(int numThreads = 0) : myPoolMutex(true), myRunningIndex(0), myNumFinished(0) { + Pool(int numThreads = 0) : myPoolMutex(true), myRunningIndex(0), myException(nullptr) +#ifdef WORKLOAD_PROFILING + , myNumBatches(0), myTotalMaxLoad(0.), myTotalSpread(0.) +#endif + { +#ifdef WORKLOAD_PROFILING + long long int timeDiff = 0; + for (int i = 0; i < 100; i++) { + const auto begin = std::chrono::high_resolution_clock::now(); + const auto end = std::chrono::high_resolution_clock::now(); + timeDiff += std::chrono::duration_cast(end - begin).count(); + } + //std::cout << ("Average cost of a timing call (in ns): " + toString(timeDiff / 100.)) << std::endl; +#endif while (numThreads > 0) { new FXWorkerThread(*this); numThreads--; @@ -103,8 +125,8 @@ /** @brief Stops and deletes all worker threads. */ void clear() { - for (std::vector::iterator it = myWorkers.begin(); it != myWorkers.end(); ++it) { - delete *it; + for (FXWorkerThread* const worker : myWorkers) { + delete worker; } myWorkers.clear(); } @@ -114,7 +136,6 @@ * @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); } @@ -125,43 +146,84 @@ * @param[in] index index of the worker thread to use or -1 for an arbitrary one */ void add(Task* const t, int index = -1) { - t->setIndex(myRunningIndex++); if (index < 0) { index = myRunningIndex % myWorkers.size(); } +#ifdef WORKLOAD_PROFILING + if (myRunningIndex == 0) { + for (FXWorkerThread* const worker : myWorkers) { + worker->startProfile(); + } + myProfileStart = std::chrono::high_resolution_clock::now(); + } +#endif + t->setIndex(myRunningIndex++); myWorkers[index]->add(t); } - /** @brief Adds the given task to the list of finished tasks and assigns it to a randomly chosen worker. + /** @brief Adds the given tasks to the list of finished tasks. * - * Locks the internal mutex and counts the finished tasks. This is to be called by the worker thread only. + * Locks the internal mutex and appends the finished tasks. This is to be called by the worker thread only. * - * @param[in] t the task to add + * @param[in] tasks the tasks to add */ - void addFinished(Task* const t) { + void addFinished(std::list& tasks) { myMutex.lock(); - myNumFinished++; - myFinishedTasks.push_back(t); + myFinishedTasks.splice(myFinishedTasks.end(), tasks); myCondition.signal(); myMutex.unlock(); } + void setException(ProcessError& e) { + myMutex.lock(); + if (myException == nullptr) { + myException = new ProcessError(e); + } + myMutex.unlock(); + } + /// @brief waits for all tasks to be finished void waitAll(const bool deleteFinished = true) { myMutex.lock(); - while (myNumFinished < myRunningIndex) { + while ((int)myFinishedTasks.size() < myRunningIndex) { myCondition.wait(myMutex); } -// if (myRunningIndex > 0) std::cout << "finished waiting for " << myRunningIndex << " tasks at " << SysUtils::getCurrentMillis() << std::endl; +#ifdef WORKLOAD_PROFILING + if (myRunningIndex > 0) { + const auto end = std::chrono::high_resolution_clock::now(); + const long long int elapsed = std::chrono::duration_cast(end - myProfileStart).count(); + double minLoad = std::numeric_limits::max(); + double maxLoad = 0.; + for (FXWorkerThread* const worker : myWorkers) { + const double load = worker->endProfile(elapsed); + minLoad = MIN2(minLoad, load); + maxLoad = MAX2(maxLoad, load); + } +#ifdef WORKLOAD_INTERVAL + myTotalMaxLoad += maxLoad; + myTotalSpread += maxLoad / minLoad; + myNumBatches++; + if (myNumBatches % WORKLOAD_INTERVAL == 0) { + WRITE_MESSAGE(toString(myFinishedTasks.size()) + " tasks, average maximum load: " + toString(myTotalMaxLoad / WORKLOAD_INTERVAL) + ", average spread: " + toString(myTotalSpread / WORKLOAD_INTERVAL)); + myTotalMaxLoad = 0.; + myTotalSpread = 0.; + } +#endif + } +#endif if (deleteFinished) { for (Task* task : myFinishedTasks) { delete task; } } + ProcessError* toRaise = myException; + myException = nullptr; myFinishedTasks.clear(); myRunningIndex = 0; - myNumFinished = 0; myMutex.unlock(); + if (toRaise != nullptr) { + throw* toRaise; + } } /** @brief Checks whether there are currently more pending tasks than threads. @@ -172,7 +234,7 @@ * @return whether there are enough tasks to let all threads work */ bool isFull() const { - return myRunningIndex - myNumFinished >= size(); + return myRunningIndex - (int)myFinishedTasks.size() >= size(); } /** @brief Returns the number of threads in the pool. @@ -206,8 +268,18 @@ 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; + /// @brief the exception from a child thread + ProcessError* myException; +#ifdef WORKLOAD_PROFILING + /// @brief the number of finished batch runs + int myNumBatches; + /// @brief the sum over the maximum loads + double myTotalMaxLoad; + /// @brief the sum over the load spreads + double myTotalSpread; + /// @brief the time when profiling started + std::chrono::high_resolution_clock::time_point myProfileStart; +#endif }; public: @@ -217,7 +289,11 @@ * * @param[in] pool the pool for this thread */ - FXWorkerThread(Pool& pool): FXThread(), myPool(pool), myStopped(false), myCounter(0) { + FXWorkerThread(Pool& pool): FXThread(), myPool(pool), myStopped(false) +#ifdef WORKLOAD_PROFILING + , myCounter(0), myBusyTime(0), myTotalBusyTime(0), myTotalTime(0) +#endif + { pool.addWorker(this); start(); } @@ -228,6 +304,12 @@ */ virtual ~FXWorkerThread() { stop(); +#ifdef WORKLOAD_PROFILING + const double load = 100. * myTotalBusyTime / myTotalTime; + WRITE_MESSAGE("Thread " + toString((long long int)this) + " ran " + toString(myCounter) + + " tasks and had a load of " + toString(load) + "% (" + toString(myTotalBusyTime) + + "us / " + toString(myTotalTime) + "us), " + toString(myTotalBusyTime / (double)myCounter) + " per task."); +#endif } /** @brief Adds the given task to this thread to be calculated @@ -257,15 +339,25 @@ myMutex.unlock(); break; } - Task* t = myTasks.front(); - myTasks.pop_front(); + myCurrentTasks.splice(myCurrentTasks.end(), myTasks); myMutex.unlock(); - t->run(this); - myCounter++; -// if (myCounter % 1000 == 0) std::cout << (int)this << " ran " << myCounter << " tasks " << std::endl; - myPool.addFinished(t); + try { + for (Task* const t : myCurrentTasks) { +#ifdef WORKLOAD_PROFILING + const auto before = std::chrono::high_resolution_clock::now(); +#endif + t->run(this); +#ifdef WORKLOAD_PROFILING + const auto after = std::chrono::high_resolution_clock::now(); + myBusyTime += std::chrono::duration_cast(after - before).count(); + myCounter++; +#endif + } + } catch (ProcessError& e) { + myPool.setException(e); + } + myPool.addFinished(myCurrentTasks); } -// std::cout << "ran " << myCounter << " tasks " << std::endl; return 0; } @@ -281,6 +373,18 @@ join(); } +#ifdef WORKLOAD_PROFILING + void startProfile() { + myBusyTime = 0; + } + + double endProfile(const long long int time) { + myTotalTime += time; + myTotalBusyTime += myBusyTime; + return time == 0 ? 100. : 100. * myBusyTime / time; + } +#endif + private: /// @brief the pool for this thread Pool& myPool; @@ -290,10 +394,20 @@ FXCondition myCondition; /// @brief the list of pending tasks std::list myTasks; + /// @brief the list of tasks which are currently calculated + std::list myCurrentTasks; /// @brief whether we are still running bool myStopped; - /// @brief counting completed tasks for debugging / profiling +#ifdef WORKLOAD_PROFILING + /// @brief counting completed tasks int myCounter; + /// @brief the time spent in calculations during the current batch + long long int myBusyTime; + /// @brief the total busy time + long long int myTotalBusyTime; + /// @brief the total time while anyone had tasks + long long int myTotalTime; +#endif }; diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/Makefile.am sumo-1.2.0+dfsg1/src/utils/foxtools/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/foxtools/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -4,19 +4,19 @@ libfoxtools_a_SOURCES = \ FXBaseObject.cpp FXBaseObject.h \ -fxexdefs.h \ +FXConditionalLock.h fxexdefs.h \ MFXImageHelper.cpp MFXImageHelper.h \ FXLCDLabel.cpp FXLCDLabel.h \ FXLinkLabel.cpp FXLinkLabel.h \ FXSevenSegment.cpp FXSevenSegment.h \ FXSingleEventThread.cpp FXSingleEventThread.h \ FXThreadEvent.cpp FXThreadEvent.h \ -FXWorkerThread.h \ +FXSynchQue.h FXWorkerThread.h \ +MsgHandlerSynchronized.h MsgHandlerSynchronized.cpp \ MFXCheckableButton.cpp MFXCheckableButton.h \ -MFXEventQue.cpp MFXEventQue.h \ MFXInterThreadEventClient.h \ MFXAddEditTypedTable.cpp MFXAddEditTypedTable.h \ MFXEditableTable.cpp MFXEditableTable.h \ MFXMenuHeader.cpp MFXMenuHeader.h \ -MFXMutex.cpp MFXMutex.h \ +MFXIconComboBox.cpp MFXIconComboBox.h \ MFXUtils.cpp MFXUtils.h diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/Makefile.in sumo-1.2.0+dfsg1/src/utils/foxtools/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/foxtools/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,667 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/foxtools -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - MFXImageHelper.$(OBJEXT) FXLCDLabel.$(OBJEXT) \ - FXLinkLabel.$(OBJEXT) FXSevenSegment.$(OBJEXT) \ - FXSingleEventThread.$(OBJEXT) FXThreadEvent.$(OBJEXT) \ - MFXCheckableButton.$(OBJEXT) MFXEventQue.$(OBJEXT) \ - MFXAddEditTypedTable.$(OBJEXT) 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libfoxtools.a -EXTRA_DIST = FXThreadMessageRetriever.h -libfoxtools_a_SOURCES = \ -FXBaseObject.cpp FXBaseObject.h \ -fxexdefs.h \ -MFXImageHelper.cpp MFXImageHelper.h \ -FXLCDLabel.cpp FXLCDLabel.h \ -FXLinkLabel.cpp FXLinkLabel.h \ -FXSevenSegment.cpp FXSevenSegment.h \ -FXSingleEventThread.cpp FXSingleEventThread.h \ -FXThreadEvent.cpp FXThreadEvent.h \ -FXWorkerThread.h \ -MFXCheckableButton.cpp MFXCheckableButton.h \ -MFXEventQue.cpp MFXEventQue.h \ -MFXInterThreadEventClient.h \ -MFXAddEditTypedTable.cpp MFXAddEditTypedTable.h \ -MFXEditableTable.cpp MFXEditableTable.h \ -MFXMenuHeader.cpp MFXMenuHeader.h \ -MFXMutex.cpp MFXMutex.h \ -MFXUtils.cpp MFXUtils.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) --foreign src/utils/foxtools/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/foxtools/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FXBaseObject.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FXLCDLabel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FXLinkLabel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FXSevenSegment.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FXSingleEventThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FXThreadEvent.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXAddEditTypedTable.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXCheckableButton.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXEditableTable.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXEventQue.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXImageHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXMenuHeader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXMutex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXUtils.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -499,7 +499,7 @@ // Clicked in list long -MFXAddEditTypedTable::onClicked(FXObject*, FXSelector , void* ptr) { +MFXAddEditTypedTable::onClicked(FXObject*, FXSelector, void* ptr) { if (editor) { delete editor; input.fm.row = -1; diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXAddEditTypedTable.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXCheckableButton.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXCheckableButton.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXCheckableButton.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXCheckableButton.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXCheckableButton.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXCheckableButton.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXCheckableButton.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXCheckableButton.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEditableTable.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEditableTable.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEditableTable.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEditableTable.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -125,7 +125,7 @@ long -MFXEditableTable::onLeftBtnClicked(FXObject*, FXSelector , void* ptr) { +MFXEditableTable::onLeftBtnClicked(FXObject*, FXSelector, void* ptr) { FXTablePos* e = (FXTablePos*)ptr; int r = e->row; int c = e->col; @@ -233,7 +233,7 @@ long -MFXEditableTable::onEditEnd(FXObject*, FXSelector , void*) { +MFXEditableTable::onEditEnd(FXObject*, FXSelector, void*) { delete myEditedItem; myEditedItem = nullptr; return 1; @@ -288,7 +288,7 @@ long -MFXEditableTable::onEditFocusOut(FXObject*, FXSelector , void*) { +MFXEditableTable::onEditFocusOut(FXObject*, FXSelector, void*) { editEnd(); return 0; } @@ -435,7 +435,7 @@ long -MFXEditableTable::onDoubleClicked(FXObject*, FXSelector , void*) { +MFXEditableTable::onDoubleClicked(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -443,7 +443,7 @@ long -MFXEditableTable::onTripleClicked(FXObject*, FXSelector , void*) { +MFXEditableTable::onTripleClicked(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -486,7 +486,7 @@ long -MFXEditableTable::onCmdDeleteColumn(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdDeleteColumn(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -494,7 +494,7 @@ long -MFXEditableTable::onUpdDeleteColumn(FXObject*, FXSelector , void*) { +MFXEditableTable::onUpdDeleteColumn(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -502,7 +502,7 @@ long -MFXEditableTable::onCmdDeleteRow(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdDeleteRow(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -510,7 +510,7 @@ long -MFXEditableTable::onUpdDeleteRow(FXObject*, FXSelector , void*) { +MFXEditableTable::onUpdDeleteRow(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -518,7 +518,7 @@ long -MFXEditableTable::onCmdInsertColumn(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdInsertColumn(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -526,7 +526,7 @@ long -MFXEditableTable::onCmdInsertRow(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdInsertRow(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -613,7 +613,7 @@ long -MFXEditableTable::onCmdSelectColumnIndex(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdSelectColumnIndex(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -621,7 +621,7 @@ long -MFXEditableTable::onCmdSelectColumn(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdSelectColumn(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -636,7 +636,7 @@ long -MFXEditableTable::onCmdSelectCell(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdSelectCell(FXObject*, FXSelector, void*) { // editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -644,7 +644,7 @@ long -MFXEditableTable::onCmdSelectAll(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdSelectAll(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); @@ -652,7 +652,7 @@ long -MFXEditableTable::onCmdDeselectAll(FXObject*, FXSelector , void*) { +MFXEditableTable::onCmdDeselectAll(FXObject*, FXSelector, void*) { editEnd(); return 1; // return FXTable::onUngrabbed(o, s, d); diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEditableTable.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEditableTable.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEditableTable.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEditableTable.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEventQue.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEventQue.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEventQue.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEventQue.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file MFXEventQue.cpp -/// @author Daniel Krajzewicz -/// @date void *ret = *(myEvents.begin()); -/// @version $Id$ -/// -// missing_desc -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#include - - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEventQue.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEventQue.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXEventQue.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXEventQue.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file MFXEventQue.h -/// @author Daniel Krajzewicz -/// @date 2004-03-19 -/// @version $Id$ -/// -// missing_desc -/****************************************************************************/ -#ifndef MFXEventQue_h -#define MFXEventQue_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include - -template -class MFXEventQue { -public: - MFXEventQue() { } - ~MFXEventQue() { } - - 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(); - } - - int size() { - myMutex.lock(); - const int ret = (int)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 myItems; -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXIconComboBox.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXIconComboBox.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXIconComboBox.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXIconComboBox.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,95 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MFXIconComboBox.cpp +/// @author Jakob Erdmann +/// @date 2018-12-19 +/// @version $Id$ +/// +// +/****************************************************************************/ + +/* ========================================================================= + * included modules + * ======================================================================= */ +#include + +#ifdef WIN32 +#define NOMINMAX +#include +#undef NOMINMAX +#endif + +#include "MFXIconComboBox.h" + + +#define SIDE_SPACING 6 // Left or right spacing between items +#define ICON_SPACING 4 // Spacing between icon and label + +FXIMPLEMENT(MFXListItem, FXListItem, nullptr, 0) +FXIMPLEMENT(MFXIconComboBox, FXComboBox, nullptr, 0) + +void MFXListItem::draw(const FXList* list, FXDC& dc, FXint xx, FXint yy, FXint ww, FXint hh) { + // almost the same code as FXListItem::draw except for using custom background color + FXFont* font = list->getFont(); + FXint ih = 0, th = 0; + if (icon) { + ih = icon->getHeight(); + } + if (!label.empty()) { + th = font->getFontHeight(); + } + if (isSelected()) { + dc.setForeground(list->getSelBackColor()); + } else if (bgColor != FXRGBA(0, 0, 0, 0)) { + dc.setForeground(bgColor); // custom code here + } else { + dc.setForeground(list->getBackColor()); + } + dc.fillRectangle(xx, yy, ww, hh); + if (hasFocus()) { + dc.drawFocusRectangle(xx + 1, yy + 1, ww - 2, hh - 2); + } + xx += SIDE_SPACING / 2; + if (icon) { + dc.drawIcon(icon, xx, yy + (hh - ih) / 2); + xx += ICON_SPACING + icon->getWidth(); + } + if (!label.empty()) { + dc.setFont(font); + if (!isEnabled()) { + dc.setForeground(makeShadowColor(list->getBackColor())); + } else if (isSelected()) { + dc.setForeground(list->getSelTextColor()); + } else { + dc.setForeground(list->getTextColor()); + } + dc.drawText(xx, yy + (hh - th) / 2 + font->getFontAscent(), label); + } +} + + +MFXIconComboBox::MFXIconComboBox( + FXComposite* p, FXint cols, FXObject* tgt, + FXSelector sel, FXuint opts, + FXint x, FXint y, FXint w, FXint h, + FXint pl, FXint pr, FXint pt, FXint pb): + FXComboBox(p, cols, tgt, sel, opts, x, y, w, h, pl, pr, pt, pb) +{} + +FXint +MFXIconComboBox::appendIconItem(const FXString& text, FXIcon* icon, FXColor bgColor, void* ptr) { + FXint index = list->appendItem(new MFXListItem(text, icon, bgColor, ptr)); + if (isItemCurrent(getNumItems() - 1)) { + field->setText(text); + } + recalc(); + return index; +} + diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXIconComboBox.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXIconComboBox.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXIconComboBox.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXIconComboBox.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,74 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MFXIconComboBox.h +/// @author Jakob Erdmann +/// @date 2018-12-19 +/// @version $Id$ +/// +// +/****************************************************************************/ + +#ifndef MFXIconComboBox_h +#define MFXIconComboBox_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include + + +/** A list item which allows for custom coloring +*/ + +class MFXListItem : public FXListItem { + FXDECLARE(MFXListItem) + +public: + /// Construct new item with given text, icon, and user-data + MFXListItem(const FXString& text, FXIcon* ic, FXColor _bgColor, void* ptr = NULL): + FXListItem(text, ic, ptr), + bgColor(_bgColor) {} + FXColor bgColor; + + + void draw(const FXList* list, FXDC& dc, FXint x, FXint y, FXint w, FXint h); + +protected: + MFXListItem(): FXListItem("", nullptr) {} + +}; + +/** A combobox which allows for icons and background color +* This class behaves behaves just like FXComboBox but allows appending items with an icon +*/ +class MFXIconComboBox : public FXComboBox { +protected: + // FOX stuff + FXDECLARE(MFXIconComboBox) + MFXIconComboBox() {} +public: + + /// same constructor as parent + MFXIconComboBox(FXComposite* p, FXint cols, FXObject* tgt = nullptr, FXSelector sel = 0, FXuint opts = COMBOBOX_NORMAL, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0, FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD); + + /// Destructor. + virtual ~MFXIconComboBox() {}; + + FXint appendIconItem(const FXString& text, FXIcon* icon, FXColor bgColor = FXRGBA(0, 0, 0, 0), void* ptr = NULL); + +}; + + + + +#endif diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXImageHelper.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXImageHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXImageHelper.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXImageHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXImageHelper.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXImageHelper.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXImageHelper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXImageHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXInterThreadEventClient.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXInterThreadEventClient.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXInterThreadEventClient.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXInterThreadEventClient.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMenuHeader.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMenuHeader.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMenuHeader.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMenuHeader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMenuHeader.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMenuHeader.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMenuHeader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMenuHeader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMutex.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMutex.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMutex.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMutex.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file MFXMutex.cpp -/// @author Mathew Robertson -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date 2007-02-19 -/// @version $Id$ -/// -// -/****************************************************************************/ - - -/* ========================================================================= - * included modules - * ======================================================================= */ -#include - -#include -#define NOMINMAX -#include -#undef NOMINMAX -#include - -using namespace FX; - -#include "MFXMutex.h" - -#ifndef WIN32 -#include -#endif - -// MFXMutex constructor -MFXMutex::MFXMutex() : lock_(0) { -#ifndef WIN32 - FXint status = 0; - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - status = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - FXASSERT(status == 0); - 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(nullptr, FALSE, nullptr); - FXASSERT(mutexHandle != NULL); -#endif -} - -// Note: lock_ is not safe here because it is not protected, but -// if you are causing the destructor to be executed while -// some other thread is accessing the mutexHandle, then you have -// a design flaw in your program, and so it should crash! -MFXMutex::~MFXMutex() { - if (lock_) { - fxerror("MFXMutex: mutex still locked\n"); - } -#if !defined(WIN32) - pthread_mutex_destroy((pthread_mutex_t*)mutexHandle); - FXFREE(&mutexHandle); -#else - CloseHandle(mutexHandle); -#endif -} - -// lock_ is safe because we dont increment it until we -// have entered the locked state - cha-ching, correct -void MFXMutex::lock() { -#if !defined(WIN32) - pthread_mutex_lock((pthread_mutex_t*)mutexHandle); -#else - WaitForSingleObject(mutexHandle, INFINITE); -#endif - lock_++; -} - -// lock_ is safe because we decrement it, before leaving the locked state -void MFXMutex::unlock() { - lock_--; -#if !defined(WIN32) - pthread_mutex_unlock((pthread_mutex_t*)mutexHandle); -#else - ReleaseMutex(mutexHandle); -#endif -} - diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMutex.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMutex.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXMutex.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXMutex.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file MFXMutex.h -/// @author Mathew Robertson -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date 2007-02-19 -/// @version $Id$ -/// -// -/****************************************************************************/ - - -#ifndef MFXMUTEX_H -#define MFXMUTEX_H - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include - -#ifndef WIN32 -// handle to a mutex -typedef void* FXThreadMutex; -#else -#define NOMINMAX -#include -#undef NOMINMAX -// handle to a mutex -typedef HANDLE FXThreadMutex; -#endif - -/** - * Recursive mutual exclusion object. - * Unlocks on destruction - */ -class MFXMutex : public AbstractMutex { -public: - /// @brief constructor - MFXMutex(); - - /// @brief destructor - virtual ~MFXMutex(); - - /// @brief lock mutex - void lock(); - - /// @brief release mutex lock - void unlock(); - - /// @brief check if mutex is locked - inline FXbool locked() { - return lock_ ? TRUE : FALSE; - } - - /// @brief return current lock value - inline FXuint lockCount() { - return lock_; - } - -protected: - /// @brief lock count - FXuint lock_; - -private: - /// @brief mutex handler - FXThreadMutex mutexHandle; - - // @brief invalidate copy constructor - MFXMutex(const MFXMutex&) = delete ; - - // @brief invalidate asignment operators - MFXMutex& operator=(const MFXMutex&) = delete ; -}; - -#endif // FXMUTEX_H diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXUtils.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MFXUtils.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXUtils.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXUtils.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MFXUtils.h sumo-1.2.0+dfsg1/src/utils/foxtools/MFXUtils.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MFXUtils.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MFXUtils.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.cpp sumo-1.2.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.cpp --- sumo-1.1.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,105 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MsgHandlerSynchronized.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Tue, 17 Jun 2003 +/// @version $Id$ +/// +// Retrieves messages about the process and gives them further to output +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#ifdef HAVE_FOX +#include +#endif +#include "MsgHandlerSynchronized.h" + + +// =========================================================================== +// static member variables +// =========================================================================== +#ifdef HAVE_FOX +FXMutex MsgHandlerSynchronized::myLock(true); +#endif + + +// =========================================================================== +// method definitions +// =========================================================================== +void +MsgHandlerSynchronized::inform(std::string msg, bool addType) { +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + MsgHandler::inform(msg, addType); +} + + +void +MsgHandlerSynchronized::beginProcessMsg(std::string msg, bool addType) { +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + MsgHandler::beginProcessMsg(msg, addType); +} + + +void +MsgHandlerSynchronized::endProcessMsg(std::string msg) { +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + MsgHandler::endProcessMsg(msg); +} + + +void +MsgHandlerSynchronized::clear() { +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + MsgHandler::clear(); +} + + +void +MsgHandlerSynchronized::addRetriever(OutputDevice* retriever) { +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + MsgHandler::addRetriever(retriever); +} + + +void +MsgHandlerSynchronized::removeRetriever(OutputDevice* retriever) { +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + MsgHandler::removeRetriever(retriever); +} + + +MsgHandlerSynchronized::MsgHandlerSynchronized(MsgType type) : + MsgHandler(type) { +} + + +MsgHandlerSynchronized::~MsgHandlerSynchronized() { +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.h sumo-1.2.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.h --- sumo-1.1.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/foxtools/MsgHandlerSynchronized.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,99 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file MsgHandlerSynchronized.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Tue, 17 Jun 2003 +/// @version $Id$ +/// +// Retrieves messages about the process and gives them further to output +/****************************************************************************/ +#ifndef MsgHandlerSynchronized_h +#define MsgHandlerSynchronized_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#ifdef HAVE_FOX +#include +#endif +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * MsgHandlerSynchronized + */ +class MsgHandlerSynchronized : public MsgHandler { +public: + static MsgHandler* create(MsgType type) { + return new MsgHandlerSynchronized(type); + } + + /// @brief adds a new error to the list + void inform(std::string msg, bool addType = true); + + /** @brief Begins a process information + * + * When a longer action is started, this method should be used to inform the user about it. + * There will be no newline printed, but the message handler will be informed that + * a process message has been begun. If an error occurs, a newline will be printed. + * After the action has been performed, use endProcessMsg to inform the user about it. + */ + void beginProcessMsg(std::string msg, bool addType = true); + + /// @brief Ends a process information + void endProcessMsg(std::string msg); + + /// @brief Clears information whether an error occurred previously + void clear(); + + /// @brief Adds a further retriever to the instance responsible for a certain msg type + void addRetriever(OutputDevice* retriever); + + /// @brief Removes the retriever from the handler + void removeRetriever(OutputDevice* retriever); + +private: + /// @brief standard constructor + MsgHandlerSynchronized(MsgType type); + + /// @brief destructor + ~MsgHandlerSynchronized(); + + /// @brief The lock for synchronizing all outputs using handlers of this class + static FXMutex myLock; + +private: + /// @brief invalid copy constructor + MsgHandlerSynchronized(const MsgHandlerSynchronized& s) = delete; + + /// @brief invalid assignment operator + MsgHandlerSynchronized& operator=(const MsgHandlerSynchronized& s) = delete; +}; + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/AbstractPoly.h sumo-1.2.0+dfsg1/src/utils/geom/AbstractPoly.h --- sumo-1.1.0+dfsg1/src/utils/geom/AbstractPoly.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/AbstractPoly.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/bezier.cpp sumo-1.2.0+dfsg1/src/utils/geom/bezier.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/bezier.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/bezier.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file bezier.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date 2003-11-19 -/// @version $Id$ -/// -// missing_desc -/****************************************************************************/ - - -/* Subroutine to generate a Bezier curve. - Copyright (c) 2000 David F. Rogers. All rights reserved. - - b[] = array containing the defining polygon vertices - b[1] contains the x-component of the vertex - b[2] contains the y-component of the vertex - b[3] contains the z-component of the vertex - Basis = function to calculate the Bernstein basis value (see MECG Eq 5-65) - cpts = number of points to be calculated on the curve - Fractrl = function to calculate the factorial of a number - j[] = array containing the basis functions for a single value of t - npts = number of defining polygon vertices - p[] = array containing the curve points - p[1] contains the x-component of the point - p[2] contains the y-component of the point - p[3] contains the z-component of the point - t = parameter value 0 <= t <= 1 -*/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include "PositionVector.h" - -/* function to calculate the factorial */ - -double factrl(int n) { - static int ntop = 6; - static double a[33] = { - 1.0, 1.0, 2.0, 6.0, 24.0, 120.0, 720.0 - } - ; /* fill in the first few values */ - int j1; - - if (n < 0) { - throw 1; - } //cout << "\nNegative factorial in routine FACTRL\n"; - if (n > 32) { - throw 1; - } //cout << "\nFactorial value too large in routine FACTRL\n"; - - while (ntop < n) { /* use the precalulated value for n = 0....6 */ - j1 = ntop++; - a[ntop] = a[j1] * ntop; - } - return a[n]; /* returns the value n! as a double */ -} - -/* function to calculate the factorial function for Bernstein basis */ - -double Ni(int n, int i) { - return factrl(n) / (factrl(i) * factrl(n - i)); -} - -/* function to calculate the Bernstein basis */ - -double Basis(int n, int i, double t) { - /* handle the special cases to avoid domain problem with pow */ - const double ti = (i == 0) ? 1.0 : pow(t, i); /* this is t^i */ - const double tni = (n == i) ? 1.0 : pow(1 - t, n - i); /* this is (1-t)^(n-i) */ - return Ni(n, i) * ti * tni; -} - -/* Bezier curve subroutine */ -void -bezier(int npts, double b[], int cpts, double p[]) { - int i; - int j; - int i1; - int icount; - int jcount; - - const double step = (double) 1.0 / (cpts - 1); - double t; - - /* calculate the points on the Bezier curve */ - - icount = 0; - t = 0; - - for (i1 = 1; i1 <= cpts; i1++) { /* main loop */ - - if ((1.0 - t) < 5e-6) { - t = 1.0; - } - - for (j = 1; j <= 3; j++) { /* generate a point on the curve */ - jcount = j; - p[icount + j] = 0.; - for (i = 1; i <= npts; i++) { /* Do x,y,z components */ - p[icount + j] = p[icount + j] + Basis(npts - 1, i - 1, t) * b[jcount]; - jcount = jcount + 3; - } - } - - icount = icount + 3; - t = t + step; - } -} - - -PositionVector -bezier(const PositionVector& init, int numPoints) { - PositionVector ret; - double* def = new double[1 + (int)init.size() * 3]; - for (int i = 0; i < (int)init.size(); ++i) { - // starts at index 1 - def[i * 3 + 1] = init[i].x(); - def[i * 3 + 2] = init[i].z(); - def[i * 3 + 3] = init[i].y(); - } - double* ret_buf = new double[numPoints * 3 + 1]; - bezier((int)init.size(), def, numPoints, ret_buf); - delete[] def; - Position prev; - for (int i = 0; i < (int)numPoints; i++) { - Position current(ret_buf[i * 3 + 1], ret_buf[i * 3 + 3], ret_buf[i * 3 + 2]); - if (prev != current && !ISNAN(current.x()) && !ISNAN(current.y()) && !ISNAN(current.z())) { - ret.push_back(current); - } - prev = current; - } - delete[] ret_buf; - return ret; -} - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/bezier.h sumo-1.2.0+dfsg1/src/utils/geom/bezier.h --- sumo-1.1.0+dfsg1/src/utils/geom/bezier.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/bezier.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file bezier.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date 2003-11-19 -/// @version $Id$ -/// -// missing_desc -/****************************************************************************/ -#ifndef bezier_h -#define bezier_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include "PositionVector.h" - -/* Bezier curve subroutine */ -void -bezier(int npts, double b[], int cpts, double p[]); - - -PositionVector -bezier(const PositionVector& init, int numPoints); - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/Boundary.cpp sumo-1.2.0+dfsg1/src/utils/geom/Boundary.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/Boundary.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Boundary.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/Boundary.h sumo-1.2.0+dfsg1/src/utils/geom/Boundary.h --- sumo-1.1.0+dfsg1/src/utils/geom/Boundary.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Boundary.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/Bresenham.cpp sumo-1.2.0+dfsg1/src/utils/geom/Bresenham.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/Bresenham.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Bresenham.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/Bresenham.h sumo-1.2.0+dfsg1/src/utils/geom/Bresenham.h --- sumo-1.1.0+dfsg1/src/utils/geom/Bresenham.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Bresenham.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/geom/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/geom/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -14,8 +14,6 @@ Position.h PositionVector.cpp PositionVector.h - bezier.cpp - bezier.h ) add_library(utils_geom STATIC ${utils_geom_STAT_SRCS}) diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/GeoConvHelper.cpp sumo-1.2.0+dfsg1/src/utils/geom/GeoConvHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/GeoConvHelper.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/GeoConvHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -51,7 +51,7 @@ GeoConvHelper::GeoConvHelper(const std::string& proj, const Position& offset, const Boundary& orig, const Boundary& conv, double scale, double rot, bool inverse, bool flatten): myProjString(proj), -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE myProjection(nullptr), myInverseProjection(nullptr), myGeoProjection(nullptr), @@ -75,10 +75,14 @@ myProjectionMethod = DHDN; } else if (proj == "DHDN_UTM") { myProjectionMethod = DHDN_UTM; -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE } else { myProjectionMethod = PROJ; +#ifdef PROJ_VERSION_MAJOR + myProjection = proj_create(PJ_DEFAULT_CTX, proj.c_str()); +#else myProjection = pj_init_plus(proj.c_str()); +#endif if (myProjection == nullptr) { // !!! check pj_errno throw ProcessError("Could not build projection!"); @@ -89,15 +93,27 @@ GeoConvHelper::~GeoConvHelper() { -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE if (myProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + proj_destroy(myProjection); +#else pj_free(myProjection); +#endif } if (myInverseProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + proj_destroy(myInverseProjection); +#else pj_free(myInverseProjection); +#endif } if (myGeoProjection != nullptr) { - pj_free(myInverseProjection); +#ifdef PROJ_VERSION_MAJOR + proj_destroy(myGeoProjection); +#else + pj_free(myGeoProjection); +#endif } #endif } @@ -130,27 +146,51 @@ mySin = orig.mySin; myUseInverseProjection = orig.myUseInverseProjection; myFlatten = orig.myFlatten; -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE if (myProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + proj_destroy(myProjection); +#else pj_free(myProjection); +#endif myProjection = nullptr; } if (myInverseProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + proj_destroy(myInverseProjection); +#else pj_free(myInverseProjection); +#endif myInverseProjection = nullptr; } if (myGeoProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + proj_destroy(myGeoProjection); +#else pj_free(myGeoProjection); +#endif myGeoProjection = nullptr; } if (orig.myProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + myProjection = proj_create(PJ_DEFAULT_CTX, orig.myProjString.c_str()); +#else myProjection = pj_init_plus(orig.myProjString.c_str()); +#endif } if (orig.myInverseProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + myInverseProjection = orig.myInverseProjection; +#else myInverseProjection = pj_init_plus(pj_get_def(orig.myInverseProjection, 0)); +#endif } if (orig.myGeoProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + myGeoProjection = orig.myGeoProjection; +#else myGeoProjection = pj_init_plus(pj_get_def(orig.myGeoProjection, 0)); +#endif } #endif return *this; @@ -170,7 +210,7 @@ proj = "-"; } -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE if (oc.getBool("proj.inverse") && oc.getString("proj") == "!") { WRITE_ERROR("Inverse projection works only with explicit proj parameters."); return false; @@ -219,7 +259,7 @@ oc.doRegister("proj.rotate", new Option_Float(0.0)); oc.addDescription("proj.rotate", "Projection", "Rotation (clockwise degrees) for input coordinates"); -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE oc.doRegister("proj.utm", new Option_Bool(false)); oc.addDescription("proj.utm", "Projection", "Determine the UTM zone (for a universal transversal mercator projection based on the WGS84 ellipsoid)"); @@ -234,7 +274,7 @@ oc.doRegister("proj.dhdnutm", new Option_Bool(false)); oc.addDescription("proj.dhdnutm", "Projection", "Convert from Gauss-Krueger to UTM"); -#endif // HAVE_PROJ +#endif // PROJ_API_FILE } @@ -262,7 +302,14 @@ cartesian.set(x, y); return; } -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE +#ifdef PROJ_VERSION_MAJOR + PJ_COORD c; + c.xy.x = cartesian.x(); + c.xy.y = cartesian.y(); + c = proj_trans(myProjection, PJ_INV, c); + cartesian.set(proj_todeg(c.lp.lam), proj_todeg(c.lp.phi)); +#else projUV p; p.u = cartesian.x(); p.v = cartesian.y(); @@ -272,6 +319,7 @@ p.v *= RAD_TO_DEG; cartesian.set((double) p.u, (double) p.v); #endif +#endif } @@ -281,7 +329,7 @@ myOrigBoundary.add(from); } // init projection parameter on first use -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE if (myProjection == nullptr) { double x = from.x() * myGeoScale; switch (myProjectionMethod) { @@ -294,8 +342,13 @@ 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"; +#ifdef PROJ_VERSION_MAJOR + myInverseProjection = proj_create(PJ_DEFAULT_CTX, myProjString.c_str()); + myGeoProjection = proj_create(PJ_DEFAULT_CTX, "+proj=latlong +datum=WGS84"); +#else myInverseProjection = pj_init_plus(myProjString.c_str()); myGeoProjection = pj_init_plus("+proj=latlong +datum=WGS84"); +#endif //!!! check pj_errno x = ((x - 500000.) / 1000000.) * 3; // continues with UTM } @@ -304,7 +357,11 @@ int zone = (int)(x + 180) / 6 + 1; myProjString = "+proj=utm +zone=" + toString(zone) + " +ellps=WGS84 +datum=WGS84 +units=m +no_defs"; +#ifdef PROJ_VERSION_MAJOR + myProjection = proj_create(PJ_DEFAULT_CTX, myProjString.c_str()); +#else myProjection = pj_init_plus(myProjString.c_str()); +#endif //!!! check pj_errno } break; @@ -317,7 +374,11 @@ 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"; +#ifdef PROJ_VERSION_MAJOR + myProjection = proj_create(PJ_DEFAULT_CTX, myProjString.c_str()); +#else myProjection = pj_init_plus(myProjString.c_str()); +#endif //!!! check pj_errno } break; @@ -326,12 +387,20 @@ } } if (myInverseProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + PJ_COORD c; + c.xy.x = from.x(); + c.xy.y = from.y(); + c = proj_trans(myInverseProjection, PJ_INV, c); + from.set(proj_todeg(c.lp.lam), proj_todeg(c.lp.phi)); +#else double x = from.x(); double y = from.y(); if (pj_transform(myInverseProjection, myGeoProjection, 1, 1, &x, &y, nullptr)) { WRITE_WARNING("Could not transform (" + toString(x) + "," + toString(y) + ")"); } from.set(double(x * RAD_TO_DEG), double(y * RAD_TO_DEG)); +#endif } #endif // perform conversion @@ -364,8 +433,17 @@ WRITE_WARNING("Invalid latitude " + toString(y)); return false; } -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE if (myProjection != nullptr) { +#ifdef PROJ_VERSION_MAJOR + PJ_COORD c; + c.lp.lam = proj_torad(x); + c.lp.phi = proj_torad(y); + c = proj_trans(myProjection, PJ_FWD, c); + //!!! check pj_errno + x = c.xy.x; + y = c.xy.y; +#else projUV p; p.u = x * DEG_TO_RAD; p.v = y * DEG_TO_RAD; @@ -373,6 +451,7 @@ //!!! check pj_errno x = p.u; y = p.v; +#endif } #endif if (myProjectionMethod == SIMPLE) { @@ -492,6 +571,4 @@ } - /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/GeoConvHelper.h sumo-1.2.0+dfsg1/src/utils/geom/GeoConvHelper.h --- sumo-1.1.0+dfsg1/src/utils/geom/GeoConvHelper.h 2018-10-08 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/GeoConvHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,8 +30,11 @@ #include #include -#ifdef HAVE_PROJ -#include +#ifdef PROJ_API_FILE +#include PROJ_API_FILE +#ifdef PROJ_VERSION_MAJOR +typedef PJ* projPJ; +#endif #endif @@ -60,7 +63,7 @@ /// @brief Constructor GeoConvHelper(const std::string& proj, const Position& offset, - const Boundary& orig, const Boundary& conv, double scale = 1.0, double rot = 0.0, bool inverse = false, bool flatten=false); + const Boundary& orig, const Boundary& conv, double scale = 1.0, double rot = 0.0, bool inverse = false, bool flatten = false); /// @brief Destructor ~GeoConvHelper(); @@ -173,7 +176,7 @@ /// @brief A proj options string describing the proj.4-projection to use std::string myProjString; -#ifdef HAVE_PROJ +#ifdef PROJ_API_FILE /// @brief The proj.4-projection to use projPJ myProjection; diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/GeomConvHelper.cpp sumo-1.2.0+dfsg1/src/utils/geom/GeomConvHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/GeomConvHelper.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/GeomConvHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/GeomConvHelper.h sumo-1.2.0+dfsg1/src/utils/geom/GeomConvHelper.h --- sumo-1.1.0+dfsg1/src/utils/geom/GeomConvHelper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/GeomConvHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/GeomHelper.cpp sumo-1.2.0+dfsg1/src/utils/geom/GeomHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/GeomHelper.cpp 2018-07-27 22:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/GeomHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,6 +30,7 @@ #include #include #include +#include #include "Boundary.h" #include "GeomHelper.h" @@ -112,6 +113,19 @@ } +double +GeomHelper::nearest_offset_on_line_to_point25D(const Position& lineStart, + const Position& lineEnd, + const Position& p, bool perpendicular) { + double result = nearest_offset_on_line_to_point2D(lineStart, lineEnd, p, perpendicular); + if (result != INVALID_OFFSET) { + const double lineLength2D = lineStart.distanceTo2D(lineEnd); + const double lineLength = lineStart.distanceTo(lineEnd); + result *= (lineLength / lineLength2D); + } + return result; +} + Position GeomHelper::crossPoint(const Boundary& b, const PositionVector& v) { if (v.intersects(Position(b.xmin(), b.ymin()), Position(b.xmin(), b.ymax()))) { @@ -220,6 +234,48 @@ return degree; } +PositionVector +GeomHelper::makeCircle(const double radius, const Position& center, unsigned int nPoints) { + if (nPoints < 3) { + WRITE_ERROR("GeomHelper::makeCircle() requires nPoints>=3"); + } + PositionVector circle; + circle.push_back({radius, 0}); + for (unsigned int i = 1; i < nPoints; ++i) { + const double a = 2.0 * M_PI * (double)i / (double) nPoints; + circle.push_back({radius * cos(a), radius * sin(a)}); + } + circle.push_back({radius, 0}); + circle.add(center); + return circle; +} + + +PositionVector +GeomHelper::makeRing(const double radius1, const double radius2, const Position& center, unsigned int nPoints) { + if (nPoints < 3) { + WRITE_ERROR("GeomHelper::makeRing() requires nPoints>=3"); + } + if (radius1 >= radius2) { + WRITE_ERROR("GeomHelper::makeRing() requires radius2>radius1"); + } + PositionVector ring; + ring.push_back({radius1, 0}); + ring.push_back({radius2, 0}); + for (unsigned int i = 1; i < nPoints; ++i) { + const double a = 2.0 * M_PI * (double)i / (double) nPoints; + ring.push_back({radius2 * cos(a), radius2 * sin(a)}); + } + ring.push_back({radius2, 0}); + ring.push_back({radius1, 0}); + for (unsigned int i = 1; i < nPoints; ++i) { + const double a = -2.0 * M_PI * (double)i / (double) nPoints; + ring.push_back({radius1 * cos(a), radius1 * sin(a)}); + } + ring.push_back({radius1, 0}); + ring.add(center); + return ring; +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/GeomHelper.h sumo-1.2.0+dfsg1/src/utils/geom/GeomHelper.h --- sumo-1.1.0+dfsg1/src/utils/geom/GeomHelper.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/GeomHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -74,6 +74,10 @@ const Position& lineStart, const Position& lineEnd, const Position& p, bool perpendicular = true); + static double nearest_offset_on_line_to_point25D( + const Position& lineStart, const Position& lineEnd, + const Position& p, bool perpendicular = true); + static Position crossPoint(const Boundary& b, const PositionVector& v); @@ -136,6 +140,23 @@ */ static double legacyDegree(const double angle, const bool positive = false); + /** Creates a circular polygon + * @param[in] radius Radius of the circle + * @param[in] center Position of the circle's center + * @param[in] nPoints Number of points of the circle (Polygon's shape will have noPoints+1 points), must be >=3 + * @return the polygon approximating the circle + */ + static PositionVector makeCircle(const double radius, const Position& center, unsigned int nPoints); + + /** Creates a circular polygon + * @param[in] radius1 Inner radius of the ring + * @param[in] radius2 Outer radius of the ring + * @param[in] center Position of the circle's center + * @param[in] nPoints Number of points of the circle (Polygon's shape will have noPoints+1 points), must be >=3 + * @return the polygon approximating the circle + */ + static PositionVector makeRing(const double radius1, const double radius2, const Position& center, unsigned int nPoints); + }; diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/Makefile.am sumo-1.2.0+dfsg1/src/utils/geom/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/geom/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -5,4 +5,4 @@ GeoConvHelper.cpp GeoConvHelper.h \ GeomHelper.cpp GeomHelper.h \ Position.cpp Position.h \ -PositionVector.cpp PositionVector.h bezier.cpp bezier.h +PositionVector.cpp PositionVector.h diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/Makefile.in sumo-1.2.0+dfsg1/src/utils/geom/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/geom/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,645 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/geom -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - GeomConvHelper.$(OBJEXT) GeoConvHelper.$(OBJEXT) \ - GeomHelper.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libgeom.a -libgeom_a_SOURCES = AbstractPoly.h Boundary.cpp Boundary.h \ -Bresenham.cpp Bresenham.h GeomConvHelper.cpp GeomConvHelper.h \ -GeoConvHelper.cpp GeoConvHelper.h \ -GeomHelper.cpp GeomHelper.h \ -Position.cpp Position.h \ -PositionVector.cpp PositionVector.h bezier.cpp bezier.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) --foreign src/utils/geom/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/geom/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Boundary.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Bresenham.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GeoConvHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GeomConvHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GeomHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Position.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PositionVector.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bezier.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/geom/Position.cpp sumo-1.2.0+dfsg1/src/utils/geom/Position.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/Position.cpp 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Position.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/Position.h sumo-1.2.0+dfsg1/src/utils/geom/Position.h --- sumo-1.1.0+dfsg1/src/utils/geom/Position.h 2018-11-15 23:00:46.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/Position.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,15 +39,15 @@ class Position { public: /// @brief default constructor - Position() : + Position() : myX(0.0), myY(0.0), myZ(0.0) { } /// @brief Parametrised constructor (only for x-y) - Position(double x, double y) : + Position(double x, double y) : myX(x), myY(y), myZ(0) { } /// @brief Parametrised constructor - Position(double x, double y, double z) : + Position(double x, double y, double z) : myX(x), myY(y), myZ(z) { } /// @brief Destructor @@ -275,7 +275,7 @@ void swapXY() { std::swap(myX, myY); } - + /// @brief check if position is NAN bool isNAN() const { return (std::isnan(myX) || std::isnan(myY) || std::isnan(myZ)); diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/PositionVector.cpp sumo-1.2.0+dfsg1/src/utils/geom/PositionVector.cpp --- sumo-1.1.0+dfsg1/src/utils/geom/PositionVector.cpp 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/PositionVector.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -614,11 +614,35 @@ void +PositionVector::sub(const Position& offset) { + sub(offset.x(), offset.y(), offset.z()); +} + + +void +PositionVector::sub(double xoff, double yoff, double zoff) { + for (int i = 0; i < (int)size(); i++) { + (*this)[i].add(-xoff, -yoff, -zoff); + } +} + + +void PositionVector::add(const Position& offset) { add(offset.x(), offset.y(), offset.z()); } +PositionVector +PositionVector::added(const Position& offset) const { + PositionVector pv; + for (auto i1 = begin(); i1 != end(); ++i1) { + pv.push_back(*i1 + offset); + } + return pv; +} + + void PositionVector::mirrorX() { for (int i = 0; i < (int)size(); i++) { @@ -817,6 +841,43 @@ } +double +PositionVector::nearest_offset_to_point25D(const Position& p, bool perpendicular) const { + if (size() == 0) { + return INVALID_DOUBLE; + } + double minDist = std::numeric_limits::max(); + double nearestPos = GeomHelper::INVALID_OFFSET; + double seen = 0; + for (const_iterator i = begin(); i != end() - 1; i++) { + const double pos = + GeomHelper::nearest_offset_on_line_to_point2D(*i, *(i + 1), p, perpendicular); + const double dist = pos == GeomHelper::INVALID_OFFSET ? minDist : p.distanceTo2D(positionAtOffset2D(*i, *(i + 1), pos)); + if (dist < minDist) { + const double pos25D = pos * (*i).distanceTo(*(i + 1)) / (*i).distanceTo2D(*(i + 1)); + nearestPos = pos25D + seen; + minDist = dist; + } + 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 double cornerDist = p.distanceTo2D(*i); + if (cornerDist < minDist) { + const double pos1 = + GeomHelper::nearest_offset_on_line_to_point2D(*(i - 1), *i, p, false); + const double 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).distanceTo(*(i + 1)); + } + return nearestPos; +} + + Position PositionVector::transformToVectorCoordinates(const Position& p, bool extend) const { if (size() == 0) { @@ -1079,7 +1140,7 @@ } -void +void PositionVector::move2side(std::vector amount) { if (size() < 2) { return; @@ -1088,8 +1149,8 @@ return; } if (size() != amount.size()) { - throw InvalidArgument("Numer of offsets (" + toString(amount.size()) - + ") does not match number of points (" + toString(size()) + ")"); + throw InvalidArgument("Numer of offsets (" + toString(amount.size()) + + ") does not match number of points (" + toString(size()) + ")"); } PositionVector shape; for (int i = 0; i < static_cast(size()); i++) { @@ -1229,7 +1290,7 @@ } -bool +bool PositionVector::isNAN() const { // iterate over all positions and check if is NAN for (auto i = begin(); i != end(); i++) { @@ -1524,6 +1585,7 @@ return result; } + PositionVector PositionVector::resample(double maxLength) const { PositionVector result; @@ -1541,6 +1603,7 @@ return result; } + double PositionVector::offsetAtIndex2D(int index) const { if (index < 0 || index >= (int)size()) { @@ -1571,5 +1634,48 @@ return result; } -/****************************************************************************/ +PositionVector +PositionVector::bezier(int numPoints) { + // inspired by David F. Rogers + assert(size() < 33); + static const double fac[33] = { + 1.0, 1.0, 2.0, 6.0, 24.0, 120.0, 720.0, 5040.0, 40320.0, 362880.0, 3628800.0, 39916800.0, 479001600.0, + 6227020800.0, 87178291200.0, 1307674368000.0, 20922789888000.0, 355687428096000.0, 6402373705728000.0, + 121645100408832000.0, 2432902008176640000.0, 51090942171709440000.0, 1124000727777607680000.0, + 25852016738884976640000.0, 620448401733239439360000.0, 15511210043330985984000000.0, + 403291461126605635584000000.0, 10888869450418352160768000000.0, 304888344611713860501504000000.0, + 8841761993739701954543616000000.0, 265252859812191058636308480000000.0, + 8222838654177922817725562880000000.0, 263130836933693530167218012160000000.0 + }; + PositionVector ret; + const int npts = (int)size(); + // calculate the points on the Bezier curve + const double step = (double) 1.0 / (numPoints - 1); + double t = 0.; + Position prev; + for (int i1 = 0; i1 < numPoints; i1++) { + if ((1.0 - t) < 5e-6) { + t = 1.0; + } + double x = 0., y = 0., z = 0.; + for (int i = 0; i < npts; i++) { + const double ti = (i == 0) ? 1.0 : pow(t, i); + const double tni = (npts == i + 1) ? 1.0 : pow(1 - t, npts - i - 1); + const double basis = fac[npts - 1] / (fac[i] * fac[npts - 1 - i]) * ti * tni; + x += basis * at(i).x(); + y += basis * at(i).y(); + z += basis * at(i).z(); + } + t += step; + Position current(x, y, z); + if (prev != current && !ISNAN(x) && !ISNAN(y) && !ISNAN(z)) { + ret.push_back(current); + } + prev = current; + } + return ret; +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/geom/PositionVector.h sumo-1.2.0+dfsg1/src/utils/geom/PositionVector.h --- sumo-1.1.0+dfsg1/src/utils/geom/PositionVector.h 2018-12-13 23:00:29.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/geom/PositionVector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -223,9 +223,18 @@ //// @brief add a position void add(double xoff, double yoff, double zoff); - //// @brief add a position + //// @brief substract a position void add(const Position& offset); + //// @brief add a position + void sub(double xoff, double yoff, double zoff); + + //// @brief substract a position + void sub(const Position& offset); + + //// @brief adds a position without modifying the vector itself but returning the result + PositionVector added(const Position& offset) const; + //// @brief mirror coordinates along the x-axis void mirrorX(); @@ -319,6 +328,9 @@ /// @brief return the nearest offest to point 2D double nearest_offset_to_point2D(const Position& p, bool perpendicular = true) const; + /// @brief return the nearest offest to point 2D projected onto the 3D geometry + double nearest_offset_to_point25D(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 @@ -391,6 +403,9 @@ */ double getMaxGrade(double& maxJump) const; + /// @brief return a bezier interpolation + PositionVector bezier(int numPoints); + private: /// @brief return whether the line segments defined by Line p11,p12 and Line p21,p22 intersect static bool intersects(const Position& p11, const Position& p12, const Position& p21, const Position& p22, const double withinDist = 0., double* x = 0, double* y = 0, double* mu = 0); diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/gui/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/gui/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -6,3 +6,4 @@ add_subdirectory(tracker) add_subdirectory(windows) add_subdirectory(cursors) +add_subdirectory(shortcuts) diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/cursors/GUICursors.h sumo-1.2.0+dfsg1/src/utils/gui/cursors/GUICursors.h --- sumo-1.1.0+dfsg1/src/utils/gui/cursors/GUICursors.h 2018-11-20 23:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/cursors/GUICursors.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.cpp sumo-1.2.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.cpp 2018-11-20 23:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.h sumo-1.2.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.h --- sumo-1.1.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.h 2018-11-20 23:00:19.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/cursors/GUICursorSubSys.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/cursors/Makefile.in sumo-1.2.0+dfsg1/src/utils/gui/cursors/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/gui/cursors/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/cursors/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,631 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/cursors -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libguiutilscursors_a_AR = $(AR) $(ARFLAGS) -libguiutilscursors_a_LIBADD = -am_libguiutilscursors_a_OBJECTS = GUICursorSubSys.$(OBJEXT) -libguiutilscursors_a_OBJECTS = $(am_libguiutilscursors_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 = $(libguiutilscursors_a_SOURCES) -DIST_SOURCES = $(libguiutilscursors_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguiutilscursors.a -libguiutilscursors_a_SOURCES = GUICursorSubSys.cpp GUICursorSubSys.h \ -GUICursors.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) --foreign src/utils/gui/cursors/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/cursors/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) - -libguiutilscursors.a: $(libguiutilscursors_a_OBJECTS) $(libguiutilscursors_a_DEPENDENCIES) $(EXTRA_libguiutilscursors_a_DEPENDENCIES) - $(AM_V_at)-rm -f libguiutilscursors.a - $(AM_V_AR)$(libguiutilscursors_a_AR) libguiutilscursors.a $(libguiutilscursors_a_OBJECTS) $(libguiutilscursors_a_LIBADD) - $(AM_V_at)$(RANLIB) libguiutilscursors.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUICursorSubSys.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/div/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/gui/div/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/gui/div/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -19,6 +19,8 @@ GUIVideoEncoder.h GLHelper.cpp GLHelper.h + GUIBaseVehicleHelper.cpp + GUIBaseVehicleHelper.h GUIDesigns.h GLObjectValuePassConnector.h ) diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GLHelper.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GLHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GLHelper.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GLHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -633,17 +633,17 @@ void GLHelper::drawTextSettings( - const GUIVisualizationTextSettings& settings, - const std::string& text, const Position& pos, - const double scale, - const double angle, - const double layer) { + const GUIVisualizationTextSettings& settings, + const std::string& text, const Position& pos, + const double scale, + const double angle, + const double layer) { drawTextBox(text, pos, layer, - settings.scaledSize(scale), - settings.color, - settings.bgColor, - RGBColor::INVISIBLE, - angle, 0, 0.2); + settings.scaledSize(scale), + settings.color, + settings.bgColor, + RGBColor::INVISIBLE, + angle, 0, 0.2); } @@ -653,28 +653,29 @@ const RGBColor& txtColor, const RGBColor& bgColor, const RGBColor& borderColor, const double angle, const double relBorder, - const double relMargin) -{ + const double relMargin) { if (!initFont()) { return; }; - const double boxAngle = 90; - const double stringWidth = size / myFontSize * fonsTextBounds(myFont, 0, 0, text.c_str(), nullptr, nullptr); - const double borderWidth = size * relBorder; - const double boxHeight = size * (0.32 + 0.6 * relMargin); - const double boxWidth = stringWidth + size * relMargin; - glPushMatrix(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glTranslated(pos.x(), pos.y(), layer); - glRotated(-angle, 0, 0, 1); - Position left(-boxWidth * 0.5, 0); - setColor(borderColor); - drawBoxLine(left, boxAngle, boxWidth, boxHeight); - left.add(borderWidth * 1.5, 0); - setColor(bgColor); - glTranslated(0, 0, 0.01); - drawBoxLine(left, boxAngle, boxWidth - 3 * borderWidth, boxHeight - 2 * borderWidth); - glPopMatrix(); + if (bgColor.alpha() != 0) { + const double boxAngle = 90; + const double stringWidth = size / myFontSize * fonsTextBounds(myFont, 0, 0, text.c_str(), nullptr, nullptr); + const double borderWidth = size * relBorder; + const double boxHeight = size * (0.32 + 0.6 * relMargin); + const double boxWidth = stringWidth + size * relMargin; + glPushMatrix(); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glTranslated(pos.x(), pos.y(), layer); + glRotated(-angle, 0, 0, 1); + Position left(-boxWidth * 0.5, 0); + setColor(borderColor); + drawBoxLine(left, boxAngle, boxWidth, boxHeight); + left.add(borderWidth * 1.5, 0); + setColor(bgColor); + glTranslated(0, 0, 0.01); + drawBoxLine(left, boxAngle, boxWidth - 3 * borderWidth, boxHeight - 2 * borderWidth); + glPopMatrix(); + } drawText(text, pos, layer + 0.02, size, txtColor, angle); } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GLHelper.h sumo-1.2.0+dfsg1/src/utils/gui/div/GLHelper.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GLHelper.h 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GLHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -313,11 +313,11 @@ double width = -1); static void drawTextSettings( - const GUIVisualizationTextSettings& settings, - const std::string& text, const Position& pos, - const double scale, - const double angle = 0, - const double layer = 2048); // GLO_MAX + const GUIVisualizationTextSettings& settings, + const std::string& text, const Position& pos, + const double scale, + const double angle = 0, + const double layer = 2048); // GLO_MAX /// @brief draw Text box with given parameters static void drawTextBox(const std::string& text, const Position& pos, diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GLObjectValuePassConnector.h sumo-1.2.0+dfsg1/src/utils/gui/div/GLObjectValuePassConnector.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GLObjectValuePassConnector.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GLObjectValuePassConnector.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,10 +30,10 @@ #include #include #include +#include #include #include #include -#include // =========================================================================== @@ -66,7 +66,7 @@ */ GLObjectValuePassConnector(GUIGlObject& o, ValueSource* source, ValueRetriever* retriever) : myObject(o), mySource(source), myRetriever(retriever) { /*, myIsInvalid(false) */ - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); myContainer.push_back(this); } @@ -89,7 +89,7 @@ /** @brief Updates all instances (passes values) */ static void updateAll() { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); std::for_each(myContainer.begin(), myContainer.end(), std::mem_fun(&GLObjectValuePassConnector::passValue)); } @@ -97,9 +97,9 @@ /** @brief Deletes all instances */ static void clear() { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); while (!myContainer.empty()) { - delete(*myContainer.begin()); + delete (*myContainer.begin()); } myContainer.clear(); } @@ -111,7 +111,7 @@ * @param[in] o The object which shall no longer be asked for values */ static void removeObject(GUIGlObject& o) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); for (typename std::vector< GLObjectValuePassConnector* >::iterator i = myContainer.begin(); i != myContainer.end();) { if ((*i)->myObject.getGlID() == o.getGlID()) { i = myContainer.erase(i); @@ -147,7 +147,7 @@ ValueRetriever* myRetriever; /// @brief The mutex used to avoid concurrent updates of the connectors container - static MFXMutex myLock; + static FXMutex myLock; /// @brief The container of items that shall be updated static std::vector< GLObjectValuePassConnector* > myContainer; @@ -167,7 +167,7 @@ template std::vector< GLObjectValuePassConnector* > GLObjectValuePassConnector::myContainer; template -MFXMutex GLObjectValuePassConnector::myLock; +FXMutex GLObjectValuePassConnector::myLock; #endif diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,637 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GUIBaseVehicleHelper.cpp +/// @author Pablo Alvarez Lopez +/// @date Feb 2018 +/// @version $Id$ +/// +// Functions used in GUIBaseVehicleHelper and GNEVehicle +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include +#include + +#include +#include +#include +#include +#include "GLHelper.h" +#include "GUIBaseVehicleHelper.h" + + +// =========================================================================== +// data definitions +// =========================================================================== +/* ------------------------------------------------------------------------- + * drawed shapes + * ----------------------------------------------------------------------- */ +double vehiclePoly_PassengerCarBody[] = { .5, 0, 0, 0, 0, .3, 0.08, .44, 0.25, .5, 0.95, .5, 1., .4, 1., -.4, 0.95, -.5, 0.25, -.5, 0.08, -.44, 0, -.3, 0, 0, -10000 }; +double vehiclePoly_PassengerCarBodyFront[] = { 0.1, 0, 0.025, 0, 0.025, 0.25, 0.27, 0.4, 0.27, -.4, 0.025, -0.25, 0.025, 0, -10000 }; +double vehiclePoly_PassengerFrontGlass[] = { 0.35, 0, 0.3, 0, 0.3, 0.4, 0.43, 0.3, 0.43, -0.3, 0.3, -0.4, 0.3, 0, -10000 }; +double vehiclePoly_PassengerSedanRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.77, -.47, 0.67, -.37, 0.45, -.37, 0.34, -.47, -10000 }; +double vehiclePoly_PassengerSedanLeftGlass[] = { 0.36, .43, 0.34, .47, 0.77, .47, 0.67, .37, 0.45, .37, 0.34, .47, -10000 }; +double vehiclePoly_PassengerSedanBackGlass[] = { 0.80, 0, 0.70, 0, 0.70, 0.3, 0.83, 0.4, 0.83, -.4, 0.70, -.3, 0.70, 0, -10000 }; +double vehiclePoly_PassengerHatchbackRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.80, -.37, 0.45, -.37, 0.34, -.47, -10000 }; +double vehiclePoly_PassengerHatchbackLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.80, .37, 0.45, .37, 0.34, .47, -10000 }; +double vehiclePoly_PassengerHatchbackBackGlass[] = { 0.92, 0, 0.80, 0, 0.80, 0.3, 0.95, 0.4, 0.95, -.4, 0.80, -.3, 0.80, 0, -10000 }; +double vehiclePoly_PassengerWagonRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.87, -.37, 0.45, -.37, 0.34, -.47, -10000 }; +double vehiclePoly_PassengerWagonLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.87, .37, 0.45, .37, 0.34, .47, -10000 }; +double vehiclePoly_PassengerWagonBackGlass[] = { 0.92, 0, 0.90, 0, 0.90, 0.3, 0.95, 0.4, 0.95, -.4, 0.90, -.3, 0.90, 0, -10000 }; + +double vehiclePoly_PassengerVanBody[] = { .5, 0, 0, 0, 0, .4, 0.1, .5, 0.97, .5, 1., .47, 1., -.47, 0.97, -.5, 0.1, -.5, 0, -.4, 0, 0, -10000 }; +double vehiclePoly_PassengerVanBodyFront[] = { 0.1, 0, 0.025, 0, 0.025, 0.25, 0.13, 0.4, 0.13, -.4, 0.025, -0.25, 0.025, 0, -10000 }; +double vehiclePoly_PassengerVanFrontGlass[] = { 0.21, 0, 0.16, 0, 0.16, 0.4, 0.29, 0.3, 0.29, -0.3, 0.16, -0.4, 0.16, 0, -10000 }; +double vehiclePoly_PassengerVanRightGlass[] = { 0.36, -.43, 0.20, -.47, 0.98, -.47, 0.91, -.37, 0.31, -.37, 0.20, -.47, -10000 }; +double vehiclePoly_PassengerVanLeftGlass[] = { 0.36, .43, 0.20, .47, 0.98, .47, 0.91, .37, 0.31, .37, 0.20, .47, -10000 }; +double vehiclePoly_PassengerVanBackGlass[] = { 0.95, 0, 0.94, 0, 0.94, 0.3, 0.98, 0.4, 0.98, -.4, 0.94, -.3, 0.94, 0, -10000 }; + +double vehiclePoly_DeliveryMediumRightGlass[] = { 0.21, -.43, 0.20, -.47, 0.38, -.47, 0.38, -.37, 0.31, -.37, 0.20, -.47, -10000 }; +double vehiclePoly_DeliveryMediumLeftGlass[] = { 0.21, .43, 0.20, .47, 0.38, .47, 0.38, .37, 0.31, .37, 0.20, .47, -10000 }; + +double vehiclePoly_TransportBody[] = { .5, 0, 0, 0, 0, .45, 0.05, .5, 2.25, .5, 2.25, -.5, 0.05, -.5, 0, -.45, 0, 0, -10000 }; +double vehiclePoly_TransportFrontGlass[] = { 0.1, 0, 0.05, 0, 0.05, 0.45, 0.25, 0.4, 0.25, -.4, 0.05, -0.45, 0.05, 0, -10000 }; +double vehiclePoly_TransportRightGlass[] = { 0.36, -.47, 0.10, -.48, 1.25, -.48, 1.25, -.4, 0.3, -.4, 0.10, -.48, -10000 }; +double vehiclePoly_TransportLeftGlass[] = { 0.36, .47, 0.10, .48, 1.25, .48, 1.25, .4, 0.3, .4, 0.10, .48, -10000 }; + +double vehiclePoly_EVehicleBody[] = { .5, 0, 0, 0, 0, .3, 0.08, .44, 0.25, .5, 0.75, .5, .92, .44, 1, .3, 1, -.3, .92, -.44, .75, -.5, .25, -.5, 0.08, -.44, 0, -.3, 0, 0, -1000 }; +double vehiclePoly_EVehicleFrontGlass[] = { .5, 0, 0.05, .05, 0.05, .25, 0.13, .39, 0.3, .45, 0.70, .45, .87, .39, .95, .25, .95, -.25, .87, -.39, .70, -.45, .3, -.45, 0.13, -.39, 0.05, -.25, 0.05, 0.05, -1000 }; +//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 }; + +double vehiclePoly_EmergencySign[] = { .2, .5, -.2, .5, -.2, -.5, .2, -.5, -10000 }; +double vehiclePoly_Emergency[] = { .1, .1, -.1, .1, -.1, -.1, .1, -.1, -10000 }; +double vehiclePoly_Emergency2[] = { .04, .3, -.04, .3, -.04, -.3, .04, -.3, -10000 }; + +double vehiclePoly_EmergencyLadder[] = { -.5, .3, .5, .3, .5, .2, -.5, .2, -10000 }; +double vehiclePoly_EmergencyLadder2[] = { -.5, -.3, .5, -.3, .5, -.2, -.5, -.2, -10000 }; +double vehiclePoly_EmergencyLadder3[] = { -.45, .3, -.4, .3, -.4, -.3, -.45, -.3, -10000 }; +double vehiclePoly_EmergencyLadder4[] = { .45, .3, .4, .3, .4, -.3, .45, -.3, -10000 }; +double vehiclePoly_EmergencyLadder5[] = { .05, .3, .0, .3, .0, -.3, .05, -.3, -10000 }; +double vehiclePoly_EmergencyLadder6[] = { -.25, .3, -.2, .3, -.2, -.3, -.25, -.3, -10000 }; +double vehiclePoly_EmergencyLadder7[] = { .25, .3, .2, .3, .2, -.3, .25, -.3, -10000 }; + +double vehiclePoly_Rickshaw[] = { 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 +// =========================================================================== + +void +GUIBaseVehicleHelper::drawPoly(const double* poses, const double offset) { + glPushMatrix(); + glTranslated(0, 0, offset * .1); + glPolygonOffset(0, (GLfloat) - offset); + glBegin(GL_TRIANGLE_FAN); + int i = 0; + while (poses[i] > -999) { + glVertex2d(poses[i], poses[i + 1]); + i = i + 2; + } + glEnd(); + glPopMatrix(); +} + +void +GUIBaseVehicleHelper::drawAction_drawVehicleAsBoxPlus(const double width, const double length) { + glPushMatrix(); + glScaled(width, length, 1.); + glBegin(GL_TRIANGLE_STRIP); + glVertex2d(0., 0.); + glVertex2d(-.5, .15); + glVertex2d(.5, .15); + glVertex2d(-.5, 1.); + glVertex2d(.5, 1.); + glEnd(); + glPopMatrix(); +} + + +void +GUIBaseVehicleHelper::drawAction_drawVehicleAsTrianglePlus(const double width, const double length) { + if (length >= 8.) { + drawAction_drawVehicleAsBoxPlus(width, length); + return; + } + glPushMatrix(); + glScaled(width, length, 1.); + glBegin(GL_TRIANGLES); + glVertex2d(0., 0.); + glVertex2d(-.5, 1.); + glVertex2d(.5, 1.); + glEnd(); + glPopMatrix(); +} + + +void +GUIBaseVehicleHelper::drawAction_drawVehicleAsPoly(const GUIVisualizationSettings& s, const SUMOVehicleShape shape, const double width, const double length, + int carriageIndex) { + UNUSED_PARAMETER(s); + RGBColor current = GLHelper::getColor(); + RGBColor lighter = current.changedBrightness(51); + RGBColor darker = current.changedBrightness(-51); + glPushMatrix(); + glRotated(90, 0, 0, 1); + glScaled(length, width, 1.); + + // draw main body + switch (shape) { + case SVS_UNKNOWN: + drawPoly(vehiclePoly_PassengerCarBody, 4); + GLHelper::setColor(lighter); + drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); + break; + case SVS_PEDESTRIAN: + glTranslated(0, 0, .045); + GLHelper::drawFilledCircle(0.25); + glTranslated(0, 0, -.045); + glScaled(.7, 2, 1); + glTranslated(0, 0, .04); + GLHelper::setColor(lighter); + GLHelper::drawFilledCircle(0.25); + 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(0.4, 0, .5); + glScaled(0.1, 0.2, 1); + GLHelper::setColor(darker); + GLHelper::drawFilledCircle(1); + 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); + glPopMatrix(); + } + break; + case SVS_PASSENGER: + case SVS_PASSENGER_SEDAN: + case SVS_PASSENGER_HATCHBACK: + case SVS_PASSENGER_WAGON: + drawPoly(vehiclePoly_PassengerCarBody, 4); + GLHelper::setColor(lighter); + drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); + break; + case SVS_PASSENGER_VAN: + drawPoly(vehiclePoly_PassengerVanBody, 4); + GLHelper::setColor(lighter); + drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); + drawPoly(vehiclePoly_PassengerVanRightGlass, 4.5); + drawPoly(vehiclePoly_PassengerVanLeftGlass, 4.5); + drawPoly(vehiclePoly_PassengerVanBackGlass, 4.5); + break; + case SVS_DELIVERY: + drawPoly(vehiclePoly_PassengerVanBody, 4); + GLHelper::setColor(lighter); + drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); + drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5); + drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5); + break; + case SVS_TRUCK: + case SVS_TRUCK_SEMITRAILER: + case SVS_TRUCK_1TRAILER: + if (carriageIndex < 1) { + glScaled(1. / (length), 1, 1.); + drawPoly(vehiclePoly_TransportBody, 4); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_TransportFrontGlass, 4.5); + drawPoly(vehiclePoly_TransportRightGlass, 4.5); + drawPoly(vehiclePoly_TransportLeftGlass, 4.5); + } + break; + case SVS_BUS: + case SVS_BUS_COACH: + case SVS_BUS_TROLLEY: { + double ml = length; + glScaled(1. / (length), 1, 1.); + glTranslated(0, 0, .04); + glBegin(GL_TRIANGLE_FAN); + glVertex2d(ml / 2., 0); + glVertex2d(0, 0); + glVertex2d(0, -.45); + glVertex2d(0 + .05, -.5); + glVertex2d(ml - .05, -.5); + glVertex2d(ml, -.45); + glVertex2d(ml, .45); + glVertex2d(ml - .05, .5); + glVertex2d(0 + .05, .5); + glVertex2d(0, .45); + glVertex2d(0, 0); + glEnd(); + glTranslated(0, 0, -.04); + + glTranslated(0, 0, .045); + glColor3d(0, 0, 0); + glBegin(GL_QUADS); + glVertex2d(0 + .05, .48); + glVertex2d(0 + .05, -.48); + glVertex2d(0 + .15, -.48); + glVertex2d(0 + .15, .48); + + glVertex2d(ml - .1, .45); + glVertex2d(ml - .1, -.45); + glVertex2d(ml - .05, -.45); + glVertex2d(ml - .05, .45); + + glVertex2d(0 + .20, .49); + glVertex2d(0 + .20, .45); + glVertex2d(ml - .20, .45); + glVertex2d(ml - .20, .49); + + glVertex2d(0 + .20, -.49); + glVertex2d(0 + .20, -.45); + glVertex2d(ml - .20, -.45); + glVertex2d(ml - .20, -.49); + + glEnd(); + glTranslated(0, 0, -.045); + } + break; + case SVS_BUS_FLEXIBLE: + case SVS_RAIL: + case SVS_RAIL_CAR: + case SVS_RAIL_CARGO: + case SVS_E_VEHICLE: + drawPoly(vehiclePoly_EVehicleBody, 4); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_EVehicleFrontGlass, 4.5); + glTranslated(0, 0, .048); + GLHelper::setColor(current); + glBegin(GL_QUADS); + glVertex2d(.3, .5); + glVertex2d(.35, .5); + glVertex2d(.35, -.5); + glVertex2d(.3, -.5); + + glVertex2d(.3, -.05); + glVertex2d(.7, -.05); + glVertex2d(.7, .05); + glVertex2d(.3, .05); + + glVertex2d(.7, .5); + glVertex2d(.65, .5); + glVertex2d(.65, -.5); + glVertex2d(.7, -.5); + glEnd(); + glTranslated(0, 0, -.048); + //drawPoly(vehiclePoly_EVehicleBackGlass, 4.5); + break; + case SVS_ANT: + glPushMatrix(); + // ant is stretched via vehicle length + GLHelper::setColor(darker); + // draw left side + GLHelper::drawBoxLine(Position(-0.2, -.10), 350, 0.5, .02); + GLHelper::drawBoxLine(Position(-0.3, -.50), 240, 0.4, .03); + GLHelper::drawBoxLine(Position(0.3, -.10), 340, 0.8, .03); + GLHelper::drawBoxLine(Position(0.05, -.80), 290, 0.6, .04); + GLHelper::drawBoxLine(Position(0.4, -.10), 20, 0.8, .03); + GLHelper::drawBoxLine(Position(0.65, -.80), 75, 0.6, .04); + GLHelper::drawBoxLine(Position(0.5, -.10), 55, 0.8, .04); + GLHelper::drawBoxLine(Position(1.1, -.55), 90, 0.6, .04); + // draw right side + GLHelper::drawBoxLine(Position(-0.2, .10), 190, 0.5, .02); + GLHelper::drawBoxLine(Position(-0.3, .50), 300, 0.4, .03); + GLHelper::drawBoxLine(Position(0.3, .10), 200, 0.8, .03); + GLHelper::drawBoxLine(Position(0.05, .80), 250, 0.6, .04); + GLHelper::drawBoxLine(Position(0.4, .10), 160, 0.8, .03); + GLHelper::drawBoxLine(Position(0.65, .80), 105, 0.6, .04); + GLHelper::drawBoxLine(Position(0.5, .10), 125, 0.8, .04); + GLHelper::drawBoxLine(Position(1.1, .55), 90, 0.6, .04); + // draw body + GLHelper::setColor(current); + glTranslated(0, 0, 0.1); + GLHelper::drawFilledCircle(.25, 16); + glTranslated(.4, 0, 0); + GLHelper::drawFilledCircle(.2, 16); + glTranslated(.4, 0, 0); + 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; + } + case SVS_EMERGENCY: // similar to delivery + drawPoly(vehiclePoly_PassengerVanBody, 4); + GLHelper::setColor(darker); + drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); + drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5); + drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5); + // first aid sign + glTranslated(0.7, 0, 0); + glColor3d(.18, .55, .34); + drawPoly(vehiclePoly_EmergencySign, 4.5); + glColor3d(1, 1, 1); + drawPoly(vehiclePoly_Emergency, 5); + drawPoly(vehiclePoly_Emergency2, 5); + break; + case SVS_FIREBRIGADE: // similar to delivery in red orange + drawPoly(vehiclePoly_PassengerVanBody, 4); + GLHelper::setColor(lighter); + drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5); + drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5); + drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5); + // draw ladder + glTranslated(0.7, 0, 0); + glColor3d(1, .5, 0); + drawPoly(vehiclePoly_EmergencySign, 4.5); + glColor3d(.5, .5, .5); + drawPoly(vehiclePoly_EmergencyLadder, 5); + drawPoly(vehiclePoly_EmergencyLadder2, 5); + drawPoly(vehiclePoly_EmergencyLadder3, 5); + drawPoly(vehiclePoly_EmergencyLadder4, 5); + drawPoly(vehiclePoly_EmergencyLadder5, 5); + drawPoly(vehiclePoly_EmergencyLadder6, 5); + drawPoly(vehiclePoly_EmergencyLadder7, 5); + break; + case SVS_POLICE: // similar to passenger grey with blue + drawPoly(vehiclePoly_PassengerCarBody, 4); + GLHelper::setColor(lighter); + drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); + // first aid sign + glTranslated(0.7, 0, 0); + glColor3d(.5, .5, .5); + drawPoly(vehiclePoly_EmergencySign, 4.5); + glColor3d(0, 0, 1); + drawPoly(vehiclePoly_Emergency, 5); + drawPoly(vehiclePoly_Emergency2, 5); + break; + case SVS_RICKSHAW: // Rickshaw + drawPoly(vehiclePoly_PassengerCarBody, 4); + // wheels + GLHelper::setColor(darker); + glPushMatrix(); + glTranslated(.5, .5, -0.1); + GLHelper::drawFilledCircle(.3, 6); + glPopMatrix(); + //other wheel + glPushMatrix(); + glTranslated(.5, -.5, -0.1); + GLHelper::drawFilledCircle(.3, 6); + glPopMatrix(); + break; + default: // same as passenger + drawPoly(vehiclePoly_PassengerCarBody, 4); + glColor3d(1, 1, 1); + drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5); + glColor3d(0, 0, 0); + drawPoly(vehiclePoly_PassengerFrontGlass, 4.5); + break; + } + + // draw decorations + switch (shape) { + case SVS_PEDESTRIAN: + break; + case SVS_BICYCLE: + //glScaled(length, 1, 1.); + glBegin(GL_TRIANGLE_FAN); + glVertex2d(1 / 2., 0); + glVertex2d(0, 0); + glVertex2d(0, -.03); + glVertex2d(0 + .05, -.05); + glVertex2d(1 - .05, -.05); + glVertex2d(1, -.03); + glVertex2d(1, .03); + glVertex2d(1 - .05, .05); + glVertex2d(0 + .05, .05); + glVertex2d(0, .03); + glVertex2d(0, 0); + glEnd(); + break; + case SVS_MOPED: + case SVS_MOTORCYCLE: + //glScaled(length, 1, 1.); + glBegin(GL_TRIANGLE_FAN); + glVertex2d(1 / 2., 0); + glVertex2d(0, 0); + glVertex2d(0, -.03); + glVertex2d(0 + .05, -.2); + glVertex2d(1 - .05, -.2); + glVertex2d(1, -.03); + glVertex2d(1, .03); + glVertex2d(1 - .05, .2); + glVertex2d(0 + .05, .2); + glVertex2d(0, .03); + glVertex2d(0, 0); + glEnd(); + break; + case SVS_PASSENGER: + case SVS_PASSENGER_SEDAN: + drawPoly(vehiclePoly_PassengerSedanRightGlass, 4.5); + drawPoly(vehiclePoly_PassengerSedanLeftGlass, 4.5); + drawPoly(vehiclePoly_PassengerSedanBackGlass, 4.5); + break; + case SVS_PASSENGER_HATCHBACK: + drawPoly(vehiclePoly_PassengerHatchbackRightGlass, 4.5); + drawPoly(vehiclePoly_PassengerHatchbackLeftGlass, 4.5); + drawPoly(vehiclePoly_PassengerHatchbackBackGlass, 4.5); + break; + case SVS_PASSENGER_WAGON: + drawPoly(vehiclePoly_PassengerWagonRightGlass, 4.5); + drawPoly(vehiclePoly_PassengerWagonLeftGlass, 4.5); + drawPoly(vehiclePoly_PassengerWagonBackGlass, 4.5); + break; + case SVS_PASSENGER_VAN: + case SVS_DELIVERY: + break; + case SVS_TRUCK: + GLHelper::setColor(current); + GLHelper::drawBoxLine(Position(2.3, 0), 90., length - 2.3, .5); + break; + case SVS_TRUCK_SEMITRAILER: + if (carriageIndex < 0) { + GLHelper::setColor(current); + GLHelper::drawBoxLine(Position(2.8, 0), 90., length - 2.8, .5); + } + break; + case SVS_TRUCK_1TRAILER: { + GLHelper::setColor(current); + double l = length - 2.3; + if (carriageIndex != 0) { + l = l / 2.; + GLHelper::drawBoxLine(Position(2.3, 0), 90., l, .5); + GLHelper::drawBoxLine(Position(2.3 + l + .5, 0), 90., l - .5, .5); + } else { + GLHelper::drawBoxLine(Position(2.3, 0), 90., l, .5); + } + break; + } + case SVS_BUS_TROLLEY: + glPushMatrix(); + glTranslated(0, 0, .1); + GLHelper::setColor(darker); + GLHelper::drawBoxLine(Position(3.8, 0), 90., 1, .3); + glTranslated(0, 0, .1); + glColor3d(0, 0, 0); + GLHelper::drawBoxLine(Position(4.3, .2), 90., 1, .06); + GLHelper::drawBoxLine(Position(4.3, -.2), 90., 1, .06); + GLHelper::drawBoxLine(Position(5.3, .2), 90., 3, .03); + GLHelper::drawBoxLine(Position(5.3, -.2), 90., 3, .03); + glPopMatrix(); + break; + case SVS_BUS: + case SVS_BUS_COACH: + case SVS_BUS_FLEXIBLE: + case SVS_RAIL: + case SVS_RAIL_CAR: + case SVS_RAIL_CARGO: + case SVS_E_VEHICLE: + case SVS_ANT: + case SVS_SHIP: + case SVS_EMERGENCY: + case SVS_FIREBRIGADE: + case SVS_POLICE: + case SVS_RICKSHAW: + break; + default: // same as passenger/sedan + drawPoly(vehiclePoly_PassengerSedanRightGlass, 4.5); + drawPoly(vehiclePoly_PassengerSedanLeftGlass, 4.5); + drawPoly(vehiclePoly_PassengerSedanBackGlass, 4.5); + break; + } + /* + glBegin(GL_TRIANGLE_FAN); + glVertex2d(.5,.5); // center - strip begin + glVertex2d(0, .5); // center, front + glVertex2d(0, .8); // ... clockwise ... (vehicle right side) + glVertex2d(0.08, .94); + glVertex2d(0.25, 1.); + glVertex2d(0.95, 1.); + glVertex2d(1., .9); + glVertex2d(1., .1); // (vehicle left side) + glVertex2d(0.95, 0.); + glVertex2d(0.25, 0.); + glVertex2d(0.08, .06); + glVertex2d(0, .2); // + glVertex2d(0, .5); // center, front (close) + glEnd(); + + glPolygonOffset(0, -4.5); + glColor3d(1, 1, 1); // front + glBegin(GL_TRIANGLE_FAN); + glVertex2d(0.1,0.5); + glVertex2d(0.025,0.5); + glVertex2d(0.025,0.75); + glVertex2d(0.27,0.9); + glVertex2d(0.27,0.1); + glVertex2d(0.025,0.25); + glVertex2d(0.025,0.5); + glEnd(); + + glColor3d(0, 0, 0); // front glass + glBegin(GL_TRIANGLE_FAN); + glVertex2d(0.35,0.5); + glVertex2d(0.3,0.5); + glVertex2d(0.3,0.9); + glVertex2d(0.43,0.8); + glVertex2d(0.43,0.2); + glVertex2d(0.3,0.1); + glVertex2d(0.3,0.5); + glEnd(); + + glBegin(GL_TRIANGLE_FAN); // back glass + glVertex2d(0.92,0.5); + glVertex2d(0.90,0.5); + glVertex2d(0.90,0.8); + glVertex2d(0.95,0.9); + glVertex2d(0.95,0.1); + glVertex2d(0.90,0.2); + glVertex2d(0.90,0.5); + glEnd(); + + glBegin(GL_TRIANGLE_FAN); // right glass + glVertex2d(0.36,0.07); + glVertex2d(0.34,0.03); + glVertex2d(0.94,0.03); + glVertex2d(0.87,0.13); + glVertex2d(0.45,0.13); + glVertex2d(0.34,0.03); + glEnd(); + + glBegin(GL_TRIANGLE_FAN); // left glass + glVertex2d(0.36,1.-0.07); + glVertex2d(0.34,1.-0.03); + glVertex2d(0.94,1.-0.03); + glVertex2d(0.87,1.-0.13); + glVertex2d(0.45,1.-0.13); + glVertex2d(0.34,1.-0.03); + glEnd(); + */ + + glPopMatrix(); +} + + +bool +GUIBaseVehicleHelper::drawAction_drawVehicleAsImage(const GUIVisualizationSettings& s, const std::string& file, const GUIGlObject* o, const double width, double length) { + if (file != "") { + int textureID = GUITexturesHelper::getTextureID(file); + if (textureID > 0) { + const double exaggeration = s.vehicleSize.getExaggeration(s, o); + if (length < 0) { + length = length * exaggeration; + } + const double halfWidth = width / 2.0 * exaggeration; + GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, 0, halfWidth, length); + return true; + } + } + return false; +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIBaseVehicleHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,69 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GUIBaseVehicleHelper.h +/// @author Pablo Alvarez Lopez +/// @date Feb 2018 +/// @version $Id$ +/// +// Functions used in GUIBaseVehicleHelper and GNEVehicle +/****************************************************************************/ +#ifndef GUIBaseVehicleHelper_h +#define GUIBaseVehicleHelper_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class GUIVisualizationSettings; +class GUIGlObject; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GUIBaseVehicleHelper + * @brief A MSVehicle extended by some values for usage within the gui + */ +class GUIBaseVehicleHelper { +public: + + /// @brief draw poly + static void drawPoly(const double* poses, const double offset); + + /// @brief draw vehicle as a Box + static void drawAction_drawVehicleAsBoxPlus(const double width, const double length); + + /// @brief draw vehicle as a triangle + static void drawAction_drawVehicleAsTrianglePlus(const double width, const double length); + + /// @brief draw vehicle as a polygon + static void drawAction_drawVehicleAsPoly(const GUIVisualizationSettings& s, const SUMOVehicleShape shape, const double width, const double length, + int carriageIndex = -1); + + /**@brief try to draw vehicle as raster image and return true if sucessful + * @param[in] length The custom length of the vehicle (defaults to the * length specified in the vehicle type if -1 is passed) + */ + static bool drawAction_drawVehicleAsImage(const GUIVisualizationSettings& s, const std::string& file, const GUIGlObject* o, const double width, double length = -1); +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIDesigns.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIDesigns.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIDesigns.h 2018-10-29 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIDesigns.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -36,12 +36,24 @@ /// @brief text field extended over Frame with thick frame and limited to Integers #define GUIDesignTextFieldInt (FRAME_THICK | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT | TEXTFIELD_INTEGER), 0, 0, 0, 23, 2, 2, 2, 2 -/// @brief text field extended over Frame with thick frame and limited to Doubles/doubles +/// @brief text field extended over Frame with thick frame and limited to doubles/floats #define GUIDesignTextFieldReal (FRAME_THICK | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT | TEXTFIELD_REAL), 0, 0, 0, 23, 2, 2, 2, 2 /// @brief text field with thick frame and size of 100x23 #define GUIDesignTextFielWidth100 (FRAME_THICK | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT), 0, 0, 100, 23, 2, 2, 2, 2 +/// @brief text field with thick frame and size of 100x23 +#define GUIDesignTextFielWidth100Real (FRAME_THICK | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT), 0, 0, 100, 23, 2, 2, 2, 2 + +/// @brief text field with thick frame, size of 180x23 and limited to integers (Used in GNEVehicleType) +#define GUIDesignTextFielWidth180Int (FRAME_THICK | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | TEXTFIELD_INTEGER), 0, 0, 180, 23, 2, 2, 2, 2 + +/// @brief text field with thick frame, size of 180x23 and limited to doubles/floats (Used in GNEVehicleType) +#define GUIDesignTextFielWidth180Real (FRAME_THICK | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | TEXTFIELD_REAL), 0, 0, 180, 23, 2, 2, 2, 2 + +/// @brief text field with thick frame, size of 180x23 /doubles (Used in GNEVehicleType) +#define GUIDesignTextFielWidth180 (FRAME_THICK | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT), 0, 0, 180, 23, 2, 2, 2, 2 + /// @brief Num of column of text field #define GUIDesignTextFieldNCol 1 @@ -68,6 +80,9 @@ /// @brief button rectangular with thick and raise frame with a size of 100x23 #define GUIDesignButtonRectangular100x23 (FRAME_THICK | FRAME_RAISED | ICON_BEFORE_TEXT | JUSTIFY_CENTER_X | JUSTIFY_CENTER_Y | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT), 0, 0, 100, 23, 2, 2, 2, 2 +/// @brief button rectangular with thick and raise frame with a size of 150x23 +#define GUIDesignButtonRectangular150x23 (FRAME_THICK | FRAME_RAISED | ICON_BEFORE_TEXT | JUSTIFY_CENTER_X | JUSTIFY_CENTER_Y | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT), 0, 0, 150, 23, 2, 2, 2, 2 + /// @} @@ -87,6 +102,9 @@ /// @brief little checkable button with icon placed in navigation toolbar #define GUIDesignButtonToolbarCheckable (BUTTON_NORMAL | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT), 0, 0, 23, 23 + +/// @brief checkable button with icon placed in navigation toolbar for supermodes +#define GUIDesignButtonToolbarSupermode (BUTTON_NORMAL | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT), 0, 0, 100, 23 /// @} @@ -114,8 +132,9 @@ /// @brief checkButton without thick extended over the frame used for attributes #define GUIDesignCheckButtonAttribute (CHECKBUTTON_NORMAL | JUSTIFY_CENTER_Y | LAYOUT_FIX_HEIGHT | JUSTIFY_LEFT), 0, 0, 0, 23, 2, 2, 2, 2 -/// @brief checkButton with thick extended over the frame used for attributes -#define GUIDesignCheckButtonAttributeLabel (CHECKBUTTON_NORMAL | JUSTIFY_CENTER_Y | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | JUSTIFY_LEFT | FRAME_THICK), 0, 0, 100, 23, 2, 2, 2, 2 +/// @brief checkButton placed in left position +#define GUIDesignCheckButtonLeft (CHECKBUTTON_NORMAL | JUSTIFY_CENTER_Y | LAYOUT_FIX_HEIGHT | JUSTIFY_LEFT), 0, 0, 0, 23, 2, 2, 2, 2 + /// @} @@ -129,13 +148,13 @@ /// @} -/// @name FXMenuChecks +/// @name FXRadiobuttons /// @{ /// @brief design for radio button #define GUIDesignRadioButton (LAYOUT_LEFT | LAYOUT_FILL_X | ICON_BEFORE_TEXT | JUSTIFY_LEFT) /// @brief design for radio button with fixed height -#define GUIDesignRadioButtonAttribute (LAYOUT_LEFT | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT | JUSTIFY_LEFT | JUSTIFY_CENTER_Y | ICON_BEFORE_TEXT), 0, 0, 0, 23, 2, 2, 2, 2 +#define GUIDesignRadioButtonAttribute (RADIOBUTTON_NORMAL | JUSTIFY_CENTER_Y | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | JUSTIFY_LEFT | ICON_BEFORE_TEXT | FRAME_THICK), 0, 0, 100, 23, 2, 2, 2, 2 /// @} @@ -165,9 +184,15 @@ /// @brief label extended over the matrix column with thick frame and height of 23 #define GUIDesignLabelAttribute (FRAME_THICK | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | ICON_BEFORE_TEXT), 0, 0, 100, 23, 2, 2, 2, 2 -/// @brief label extended over frame without thick and with text justify to center and without vertical spaces +/// @brief label extended over the matrix column with thick frame and height of 23 +#define GUIDesignLabelAttribute150 (FRAME_THICK | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | ICON_BEFORE_TEXT), 0, 0, 150, 23, 2, 2, 2, 2 + +/// @brief label extended over frame without thick and with text justify to left #define GUIDesignLabelAboutInfo (JUSTIFY_LEFT | LAYOUT_FILL_X | ICON_BEFORE_TEXT), 0, 0, 0, 0, 2, 2, 0, 0 +/// @brief label extended over frame with thick and with text justify to center +#define GUIDesignLabelAboutInfoCenter (FRAME_THICK | JUSTIFY_NORMAL | LAYOUT_FILL_X | ICON_BEFORE_TEXT), 0, 0, 0, 0, 2, 2, 0, 0 + /// @brief label ticked filled only with an icon of 32x32 #define GUIDesignLabelIcon32x32Thicked (FRAME_THICK | ICON_BEFORE_TEXT | LAYOUT_FIX_HEIGHT | LAYOUT_FIX_WIDTH), 0, 0, 24, 23, 2, 2, 2, 2 @@ -177,8 +202,8 @@ /// @brief design for label with icon #define GUIDesignLabelIcon (LAYOUT_CENTER_Y | LAYOUT_CENTER_X ), 0, 0, 0, 0, 2, 2, 0, 0 -/// @brief label ticked filled extended over frame used for VClasses. can be used by icons of 64x32 pixels -#define GUIDesignLabelIconExtendedx46Ticked (FRAME_THICK | ICON_BEFORE_TEXT | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT), 0, 0, 0, 46, 2, 2, 2, 2 +/// @brief label ticked filled extended over frame used for VClasses/VShapes. (can be used by icons of 64x32 pixels) +#define GUIDesignLabelTickedIcon180x46 (FRAME_THICK | ICON_BEFORE_TEXT | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT | LAYOUT_FIX_WIDTH), 0, 0, 180, 46, 2, 2, 2, 2 /// @brief label extended over frame without thick and with text justify to left, used to show information in frames #define GUIDesignLabelFrameInformation (JUSTIFY_LEFT | LAYOUT_FILL_X | ICON_BEFORE_TEXT), 0, 0, 0, 0, 2, 2, 2, 2 @@ -273,22 +298,33 @@ /// @name designs for toolbars /// @{ -/// @brief design for all toolbars and menubars -#define GUIDesignBar (LAYOUT_SIDE_TOP | LAYOUT_FILL_X | FRAME_RAISED) +/// @brief design for top toolbar (file, edit, processing...) +#define GUIDesignToolbarMenuBar (LAYOUT_SIDE_TOP | LAYOUT_FILL_X | FRAME_RAISED) + +/// @brief design for top toolbar (file, edit, processing...) used only in netedit (due supermodes buttons) +#define GUIDesignToolbarMenuBarNetedit (LAYOUT_SIDE_TOP | FRAME_RAISED) + +/// @brief design for default toolbar +#define GUIDesignToolBar (FRAME_NORMAL) + +/// @brief design for toolbar +#define GUIDesignToolBarRaisedSame (LAYOUT_DOCK_SAME | FRAME_RAISED) + +/// @brief design for first toolbar shell positioned in the next position of dock +#define GUIDesignToolBarRaisedNext (LAYOUT_DOCK_NEXT | FRAME_RAISED) /// @brief design used in status bar #define GUIDesignStatusBar (LAYOUT_SIDE_BOTTOM | LAYOUT_FILL_X | FRAME_RAISED) -/// @brief design for toolbar grip (used to change the position of toolbar with mouse) +/// @brief design for toolbar grip (used to change the position of toolbar with mouse) #define GUIDesignToolBarGrip (TOOLBARGRIP_DOUBLE) -/// @brief design for first toolbar shell positioned in the next position of dock -#define GUIDesignToolBarShell1 (LAYOUT_DOCK_NEXT | LAYOUT_SIDE_TOP | FRAME_RAISED) +/// @brief design for first toolbar shell positioned in the next-top position of dock +#define GUIDesignToolBarRaisedNextTop (LAYOUT_DOCK_NEXT | LAYOUT_SIDE_TOP | FRAME_RAISED) /// @brief design for first toolbar shell positioned in the same position of dock -#define GUIDesignToolBarShell2 (LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED) +#define GUIDesignToolBarRaisedSameTop (LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED) -#define GUIDesignToolBarShell3 (FRAME_NORMAL) /// @} @@ -407,28 +443,22 @@ /// @name design for dialog boxs /// @{ /// @brief design for standard dialog box with close button (for example, about dialog) -#define GUIDesignDialogBox (DECOR_CLOSE | DECOR_TITLE) +#define GUIDesignDialogBox (DECOR_CLOSE | DECOR_TITLE) /// @brief design for standard dialog box that can be stretched (But not shrinked) -#define GUIDesignDialogBoxStretchable (DECOR_CLOSE | DECOR_TITLE | DECOR_STRETCHABLE) +#define GUIDesignDialogBoxStretchable (DECOR_CLOSE | DECOR_TITLE | DECOR_STRETCHABLE) /// @brief design for standard dialog box that can be schinked (But not stretched) -#define GUIDesignDialogBoxShrinkable (DECOR_CLOSE | DECOR_TITLE | DECOR_SHRINKABLE) +#define GUIDesignDialogBoxShrinkable (DECOR_CLOSE | DECOR_TITLE | DECOR_SHRINKABLE) /// @brief design for standard dialog box (for example, about dialog) -#define GUIDesignDialogBoxResizable (DECOR_CLOSE | DECOR_TITLE | DECOR_RESIZE) +#define GUIDesignDialogBoxResizable (DECOR_CLOSE | DECOR_TITLE | DECOR_RESIZE) /// @brief design for dialog box with specift width and height (for example, additional dialogs) -#define GUIDesignDialogBoxExplicit (DECOR_CLOSE | DECOR_TITLE | LAYOUT_EXPLICIT) +#define GUIDesignDialogBoxExplicit(width, height) (DECOR_CLOSE | DECOR_TITLE | LAYOUT_EXPLICIT), 0, 0, width, height, 4, 4, 4, 4, 4, 4 /// @brief design for dialog box with specift width and height that can be stretched (But not shrinked) -#define GUIDesignDialogBoxExplicitStretchable (DECOR_CLOSE | DECOR_TITLE | LAYOUT_EXPLICIT | DECOR_STRETCHABLE) - -/// @brief design for dialog box with specift width and height that can be schinked (But not stretched) -#define GUIDesignDialogBoxExplicitShrinkable (DECOR_CLOSE | DECOR_TITLE | LAYOUT_EXPLICIT | DECOR_SHRINKABLE) - -/// @brief design for dialog box with specift width and height and resizable -#define GUIDesignDialogBoxExplicitResizable (DECOR_CLOSE | DECOR_TITLE | LAYOUT_EXPLICIT | DECOR_RESIZE) +#define GUIDesignDialogBoxExplicitStretchable(width, height) (DECOR_CLOSE | DECOR_TITLE | LAYOUT_EXPLICIT | DECOR_STRETCHABLE), 0, 0, width, height, 4, 4, 4, 4, 4, 4 /// @} @@ -490,10 +520,16 @@ #define GUIDesignTreeListFrame (TREELIST_SHOWS_LINES | TREELIST_SHOWS_BOXES | TREELIST_SINGLESELECT | FRAME_SUNKEN | FRAME_THICK | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT), 0, 0, 0, 200 /// @brief design for FXLists -#define GUIDesignList (FRAME_NORMAL | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT | LIST_NORMAL) +#define GUIDesignList (LIST_NORMAL | FRAME_NORMAL | LAYOUT_FILL_X) + +/// @brief design for FXList sthat only allow a single selected elements selected +#define GUIDesignListSingleElement (LIST_SINGLESELECT | FRAME_NORMAL | LAYOUT_FILL_X) + +/// @brief design for FXLists with height fixed +#define GUIDesignListFixedHeight (LIST_NORMAL | FRAME_NORMAL | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT) -/// @brief design for FXLists that only allow a single selected elements -#define GUIDesignListSingleElement (FRAME_NORMAL | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT | LIST_SINGLESELECT) +/// @brief design for FXLists that only allow a single selected elements selected and height fixed +#define GUIDesignListSingleElementFixedHeight (LIST_SINGLESELECT | FRAME_NORMAL | LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT), 0, 0, 0, 100 /// @brief design for FXLists #define GUIDesignListExtended (LIST_NORMAL | FRAME_SUNKEN | FRAME_THICK | LAYOUT_FILL_X | LAYOUT_FILL_Y) diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIDialog_GLChosenEditor.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIGlobalSelection.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIIOGlobals.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIIOGlobals.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIIOGlobals.cpp 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIIOGlobals.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIIOGlobals.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIIOGlobals.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIIOGlobals.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIIOGlobals.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIMessageWindow.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIMessageWindow.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIMessageWindow.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIMessageWindow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIMessageWindow.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIMessageWindow.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIMessageWindow.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIMessageWindow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2003-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2003-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParameterTableItem.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParameterTableItem.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParameterTableItem.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParameterTableItem.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -53,7 +53,7 @@ // =========================================================================== // static value definitions // =========================================================================== -MFXMutex GUIParameterTableWindow::myGlobalContainerLock; +FXMutex GUIParameterTableWindow::myGlobalContainerLock; std::vector GUIParameterTableWindow::myContainer; // =========================================================================== @@ -85,7 +85,7 @@ myLock.lock(); myObject->addParameterTable(this); myLock.unlock(); - AbstractMutex::ScopedLocker locker(myGlobalContainerLock); + FXMutexLock locker(myGlobalContainerLock); myContainer.push_back(this); // Table cannot be editable myTable->setEditable(FALSE); @@ -96,13 +96,13 @@ myApplication->removeChild(this); myLock.lock(); for (std::vector::iterator i = myItems.begin(); i != myItems.end(); ++i) { - delete(*i); + delete (*i); } if (myObject != nullptr) { myObject->removeParameterTable(this); } myLock.unlock(); - AbstractMutex::ScopedLocker locker(myGlobalContainerLock); + FXMutexLock locker(myGlobalContainerLock); std::vector::iterator i = std::find(myContainer.begin(), myContainer.end(), this); if (i != myContainer.end()) { myContainer.erase(i); @@ -112,7 +112,7 @@ void GUIParameterTableWindow::removeObject(GUIGlObject* /*i*/) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); myObject = nullptr; } @@ -204,7 +204,7 @@ void GUIParameterTableWindow::updateTable() { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); if (myObject == nullptr) { return; } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.h 2018-06-12 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParameterTableWindow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include "GUIParameterTableItem.h" @@ -197,7 +196,7 @@ /** @brief Updates all instances */ static void updateAll() { - AbstractMutex::ScopedLocker locker(myGlobalContainerLock); + FXMutexLock locker(myGlobalContainerLock); std::for_each(myContainer.begin(), myContainer.end(), std::mem_fun(&GUIParameterTableWindow::updateTable)); } @@ -211,7 +210,7 @@ void updateTable(); /// @brief The mutex used to avoid concurrent updates of the instance container - static MFXMutex myGlobalContainerLock; + static FXMutex myGlobalContainerLock; /// @brief The container of items that shall be updated static std::vector myContainer; @@ -233,7 +232,7 @@ unsigned myCurrentPos; /// @brief A lock assuring save updates in case of object deletion - mutable MFXMutex myLock; + mutable FXMutex myLock; /// @brief returns the number of parameters if obj is Parameterised and 0 otherwise static int numParams(const GUIGlObject* obj); diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.h 2018-06-12 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIParam_PopupMenu.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUISelectedStorage.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUISelectedStorage.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUISelectedStorage.cpp 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUISelectedStorage.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -101,7 +101,7 @@ } } -bool +bool GUISelectedStorage::isSelected(const GUIGlObject* o) { if (o == nullptr) { return false; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUISelectedStorage.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUISelectedStorage.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUISelectedStorage.h 2018-11-28 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUISelectedStorage.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIUserIO.cpp sumo-1.2.0+dfsg1/src/utils/gui/div/GUIUserIO.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIUserIO.cpp 2018-11-14 23:00:56.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIUserIO.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -45,7 +45,7 @@ std::string GUIUserIO::copyFromClipboard(const FXApp& app) { FXString string; - if (app.getActiveWindow()->getDNDData(FROM_CLIPBOARD,FXWindow::utf8Type,string)) { + if (app.getActiveWindow()->getDNDData(FROM_CLIPBOARD, FXWindow::utf8Type, string)) { return string.text(); }; return string.text(); diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIUserIO.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIUserIO.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIUserIO.h 2018-11-14 23:00:56.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIUserIO.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/GUIVideoEncoder.h sumo-1.2.0+dfsg1/src/utils/gui/div/GUIVideoEncoder.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/GUIVideoEncoder.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/GUIVideoEncoder.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -14,7 +14,7 @@ /// // A simple video encoder from RGBA pics to anything ffmpeg can handle. // Tested with h264 only. -// Based on work by Lei Xiaohua, Philip Schneider and Fabrice Bellard, see +// Inspired by Lei Xiaohua, Philip Schneider and Fabrice Bellard, see // https://github.com/leixiaohua1020/simplest_ffmpeg_video_encoder and // https://github.com/codefromabove/FFmpegRGBAToYUV /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/Makefile.am sumo-1.2.0+dfsg1/src/utils/gui/div/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/gui/div/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -9,6 +9,7 @@ GUIParameterTableWindow.cpp GUIParameterTableWindow.h \ GUISelectedStorage.cpp GUISelectedStorage.h \ GUIUserIO.cpp GUIUserIO.h GUIVideoEncoder.h \ +GUIBaseVehicleHelper.cpp GUIBaseVehicleHelper.h \ GLHelper.cpp GLHelper.h \ GUIDesigns.h \ GLObjectValuePassConnector.h \ diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/div/Makefile.in sumo-1.2.0+dfsg1/src/utils/gui/div/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/gui/div/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,654 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/div -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - GUIGlobalSelection.$(OBJEXT) GUIIOGlobals.$(OBJEXT) \ - GUIMessageWindow.$(OBJEXT) GUIParam_PopupMenu.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguiutilsdiv.a -libguiutilsdiv_a_SOURCES = \ -GUIDialog_GLChosenEditor.cpp GUIDialog_GLChosenEditor.h \ -GUIGlobalSelection.cpp GUIGlobalSelection.h \ -GUIIOGlobals.cpp GUIIOGlobals.h GUIMessageWindow.cpp GUIMessageWindow.h \ -GUIParam_PopupMenu.cpp GUIParam_PopupMenu.h \ -GUIParameterTableItem.h \ -GUIParameterTableWindow.cpp GUIParameterTableWindow.h \ -GUISelectedStorage.cpp GUISelectedStorage.h \ -GUIUserIO.cpp GUIUserIO.h GUIVideoEncoder.h \ -GLHelper.cpp GLHelper.h \ -GUIDesigns.h \ -GLObjectValuePassConnector.h \ -Roboto.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) --foreign src/utils/gui/div/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/div/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GLHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_GLChosenEditor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIGlobalSelection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIIOGlobals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIMessageWindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIParam_PopupMenu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIParameterTableWindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUISelectedStorage.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIUserIO.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/div/Roboto.h sumo-1.2.0+dfsg1/src/utils/gui/div/Roboto.h --- sumo-1.1.0+dfsg1/src/utils/gui/div/Roboto.h 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/div/Roboto.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/events/GUIEvent.h sumo-1.2.0+dfsg1/src/utils/gui/events/GUIEvent.h --- sumo-1.1.0+dfsg1/src/utils/gui/events/GUIEvent.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/events/GUIEvent.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/events/GUIEvent_Message.h sumo-1.2.0+dfsg1/src/utils/gui/events/GUIEvent_Message.h --- sumo-1.1.0+dfsg1/src/utils/gui/events/GUIEvent_Message.h 2018-08-17 13:34:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/events/GUIEvent_Message.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/events/GUIEvent_SimulationStep.h sumo-1.2.0+dfsg1/src/utils/gui/events/GUIEvent_SimulationStep.h --- sumo-1.1.0+dfsg1/src/utils/gui/events/GUIEvent_SimulationStep.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/events/GUIEvent_SimulationStep.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/events/Makefile.in sumo-1.2.0+dfsg1/src/utils/gui/events/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/gui/events/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/events/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,467 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/events -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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) -am__DIST_COMMON = $(srcdir)/Makefile.in -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -EXTRA_DIST = GUIEvent.h GUIEvent_Message.h \ -GUIEvent_SimulationStep.h - -all: all-am - -.SUFFIXES: -$(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) --foreign src/utils/gui/events/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/events/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -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 -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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - 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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/globjects/GLIncludes.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GLIncludes.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GLIncludes.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GLIncludes.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject.cpp sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -53,7 +53,6 @@ {"junction", GLO_JUNCTION}, {"crossing", GLO_CROSSING}, {"connection", GLO_CONNECTION}, - {"prohibition", GLO_PROHIBITION}, {"tlLogic", GLO_TLLOGIC}, {"additional", GLO_ADDITIONAL}, {"busStop", GLO_BUS_STOP}, @@ -80,9 +79,14 @@ {"polygon", GLO_POLYGON}, {"poi", GLO_POI}, {"routeElement", GLO_ROUTEELEMENT}, + {"route", GLO_ROUTE}, {"vehicle", GLO_VEHICLE}, + {"vType", GLO_VTYPE}, + {"flow", GLO_FLOW}, + {"trip", GLO_TRIP}, {"person", GLO_PERSON}, {"container", GLO_CONTAINER}, + {"stop", GLO_STOP}, {"undefined", GLO_MAX} }; @@ -144,6 +148,10 @@ return myMicrosimID; } +const std::string +GUIGlObject::getOptionalName() const { + return ""; +} void GUIGlObject::setMicrosimID(const std::string& newID) { diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObject.h 2018-11-27 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObject.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -127,6 +127,9 @@ /// @brief Returns the id of the object as known to microsim virtual const std::string& getMicrosimID() const; + /// @brief Returns the name of the object (default "") + virtual const std::string getOptionalName() const; + /// @brief Changes the microsimID of the object /// @note happens in NETEDIT virtual void setMicrosimID(const std::string& newID); diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.cpp sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "GUIGlObject.h" #include "GUIGlObjectStorage.h" @@ -40,8 +40,10 @@ // =========================================================================== // method definitions // =========================================================================== -GUIGlObjectStorage::GUIGlObjectStorage() - : myAktID(1) {} +GUIGlObjectStorage::GUIGlObjectStorage() : + myAktID(1), + myLock(true) +{} GUIGlObjectStorage::~GUIGlObjectStorage() {} @@ -49,7 +51,7 @@ GUIGlID GUIGlObjectStorage::registerObject(GUIGlObject* object, const std::string& fullName) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); GUIGlID id = myAktID++; myMap[id] = object; myFullNameMap[fullName] = object; @@ -59,7 +61,7 @@ GUIGlObject* GUIGlObjectStorage::getObjectBlocking(GUIGlID id) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); ObjectMap::iterator i = myMap.find(id); if (i == myMap.end()) { i = myBlocked.find(id); @@ -78,7 +80,7 @@ GUIGlObject* GUIGlObjectStorage::getObjectBlocking(const std::string& fullName) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); if (myFullNameMap.count(fullName)) { GUIGlID id = myFullNameMap[fullName]->getGlID(); return getObjectBlocking(id); @@ -89,7 +91,7 @@ bool GUIGlObjectStorage::remove(GUIGlID id) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); ObjectMap::iterator i = myMap.find(id); if (i == myMap.end()) { i = myBlocked.find(id); @@ -108,7 +110,7 @@ void GUIGlObjectStorage::clear() { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); myMap.clear(); myAktID = 0; } @@ -116,7 +118,7 @@ void GUIGlObjectStorage::unblockObject(GUIGlID id) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); ObjectMap::iterator i = myBlocked.find(id); if (i == myBlocked.end()) { return; @@ -129,7 +131,7 @@ std::set GUIGlObjectStorage::getAllIDs() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); std::set result; for (ObjectMap::const_iterator it = myMap.begin(); it != myMap.end(); it++) { result.insert(it->first); diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObjectStorage.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -30,7 +30,6 @@ #include #include #include "GUIGlObject.h" -#include // =========================================================================== @@ -167,7 +166,7 @@ GUIGlID myAktID; /// @brief A lock to avoid parallel access on the storages - mutable MFXMutex myLock; + mutable FXMutex myLock; /// @brief The network object GUIGlObject* myNetObject; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObjectTypes.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObjectTypes.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIGlObjectTypes.h 2018-10-28 23:00:27.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIGlObjectTypes.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -52,8 +52,6 @@ GLO_CROSSING = 5, /// @brief a connection GLO_CONNECTION = 6, - /// @brief a prohibition - GLO_PROHIBITION = 7, /// @brief a tl-logic GLO_TLLOGIC = 8, /// @brief reserved GLO type to pack all additionals @@ -106,12 +104,22 @@ GLO_POI = 202, /// @brief reserved GLO type to pack all RouteElments GLO_ROUTEELEMENT = 300, - /// @brief a vehicles - GLO_VEHICLE = 301, + /// @brief a route + GLO_ROUTE = 301, + /// @brief a vehicle + GLO_VEHICLE = 302, + /// @brief a vehicle type + GLO_VTYPE = 303, + /// @brief a flow + GLO_FLOW = 304, + /// @brief a trip + GLO_TRIP = 305, /// @brief a person - GLO_PERSON = 302, + GLO_PERSON = 306, /// @brief a container - GLO_CONTAINER = 303, + GLO_CONTAINER = 307, + /// @brief a stop + GLO_STOP = 308, /// @brief empty max GLO_MAX = 2048 }; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.cpp sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -99,11 +99,11 @@ // first clear vertices myPOIVertices.clear(); // check if POI can be drawn - if(checkDraw(s)) { + if (checkDraw(s)) { // push name (needed for getGUIGlObjectsUnderCursor(...) glPushName(getGlID()); // draw inner polygon - drawInnerPOI(s); + drawInnerPOI(s, false); // pop name glPopName(); } @@ -111,10 +111,10 @@ void -GUIPointOfInterest::setColor(const GUIVisualizationSettings& s) const { +GUIPointOfInterest::setColor(const GUIVisualizationSettings& s, bool disableSelectionColor) const { const GUIColorer& c = s.poiColorer; const int active = c.getActive(); - if (s.netedit && active != 1 && gSelected.isSelected(GLO_POI, getGlID())) { + if (s.netedit && active != 1 && gSelected.isSelected(GLO_POI, getGlID()) && disableSelectionColor) { // override with special colors (unless the color scheme is based on selection) GLHelper::setColor(RGBColor(0, 0, 204)); } else if (active == 0) { @@ -127,7 +127,7 @@ } -bool +bool GUIPointOfInterest::checkDraw(const GUIVisualizationSettings& s) const { // only continue if scale is valid if (s.scale * (1.3 / 3.0) *s.poiSize.getExaggeration(s, this) < s.poiSize.minSize) { @@ -137,11 +137,11 @@ } -void -GUIPointOfInterest::drawInnerPOI(const GUIVisualizationSettings& s) const { +void +GUIPointOfInterest::drawInnerPOI(const GUIVisualizationSettings& s, bool disableSelectionColor) const { const double exaggeration = s.poiSize.getExaggeration(s, this); glPushMatrix(); - setColor(s); + setColor(s, disableSelectionColor); glTranslated(x(), y(), getShapeLayer()); glRotated(-getShapeNaviDegree(), 0, 0, 1); // check if has to be drawn as a circle or with an image @@ -149,8 +149,8 @@ int textureID = GUITexturesHelper::getTextureID(getShapeImgFile()); if (textureID > 0) { GUITexturesHelper::drawTexturedBox(textureID, - -myHalfImgWidth * exaggeration, -myHalfImgHeight * exaggeration, - myHalfImgWidth * exaggeration, myHalfImgHeight * exaggeration); + -myHalfImgWidth * exaggeration, -myHalfImgHeight * exaggeration, + myHalfImgWidth * exaggeration, myHalfImgHeight * exaggeration); } } else { // fallback if no image is defined diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.h 2018-12-04 23:01:14.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPointOfInterest.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -112,15 +112,15 @@ void drawGL(const GUIVisualizationSettings& s) const; //@} -protected: +protected: /// @brief set color - void setColor(const GUIVisualizationSettings& s) const; + void setColor(const GUIVisualizationSettings& s, bool forceSelectionColor) const; /// @brief check if POI can be drawn bool checkDraw(const GUIVisualizationSettings& s) const; /// @brief draw inner POI (before pushName() ) - void drawInnerPOI(const GUIVisualizationSettings& s) const; + void drawInnerPOI(const GUIVisualizationSettings& s, bool forceSelectionColor) const; /// @brief after every iteration of drawgl, position of vertices that make the circle are saved here. It used to drawn a dotted contour in Netedit) static std::vector myPOIVertices; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPolygon.cpp sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPolygon.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPolygon.cpp 2018-12-09 23:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPolygon.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -143,15 +143,15 @@ void GUIPolygon::drawGL(const GUIVisualizationSettings& s) const { // first check if polygon can be drawn - if(checkDraw(s)) { - AbstractMutex::ScopedLocker locker(myLock); + if (checkDraw(s)) { + FXMutexLock locker(myLock); //if (myDisplayList == 0 || (!getFill() && myLineWidth != s.polySize.getExaggeration(s))) { // storeTesselation(s.polySize.getExaggeration(s)); //} // push name (needed for getGUIGlObjectsUnderCursor(...) glPushName(getGlID()); // draw inner polygon - drawInnerPolygon(s); + drawInnerPolygon(s, false); // pop name glPopName(); } @@ -160,7 +160,7 @@ void GUIPolygon::setShape(const PositionVector& shape) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); SUMOPolygon::setShape(shape); //storeTesselation(myLineWidth); } @@ -216,11 +216,11 @@ void -GUIPolygon::setColor(const GUIVisualizationSettings& s) const { +GUIPolygon::setColor(const GUIVisualizationSettings& s, bool disableSelectionColor) const { const GUIColorer& c = s.polyColorer; const int active = c.getActive(); - if (s.netedit && active != 1 && gSelected.isSelected(GLO_POLYGON, getGlID())) { - // override with special colors (unless the color scheme is based on selection) + if (s.netedit && active != 1 && gSelected.isSelected(GLO_POLYGON, getGlID()) && disableSelectionColor) { + // override with special selection colors (unless the color scheme is based on selection) GLHelper::setColor(RGBColor(0, 0, 204)); } else if (active == 0) { GLHelper::setColor(getShapeColor()); @@ -254,12 +254,12 @@ } -void -GUIPolygon::drawInnerPolygon(const GUIVisualizationSettings& s) const { +void +GUIPolygon::drawInnerPolygon(const GUIVisualizationSettings& s, bool disableSelectionColor) const { glPushMatrix(); glTranslated(0, 0, getShapeLayer()); glRotated(-getShapeNaviDegree(), 0, 0, 1); - setColor(s); + setColor(s, disableSelectionColor); int textureID = -1; if (getFill()) { diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPolygon.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPolygon.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIPolygon.h 2018-12-04 23:01:14.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIPolygon.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -109,17 +108,17 @@ protected: /// @brief set color - void setColor(const GUIVisualizationSettings& s) const; + void setColor(const GUIVisualizationSettings& s, bool disableSelectionColor) const; /// @brief check if Polygon can be drawn bool checkDraw(const GUIVisualizationSettings& s) const; /// @brief draw inner Polygon (before pushName() ) - void drawInnerPolygon(const GUIVisualizationSettings& s) const; + void drawInnerPolygon(const GUIVisualizationSettings& s, bool disableSelectionColor) const; private: /// The mutex used to avoid concurrent updates of the shape - mutable MFXMutex myLock; + mutable FXMutex myLock; /// @brief id of the display list for the cached tesselation mutable GLuint myDisplayList; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.cpp sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,6 +25,7 @@ #include "GUIShapeContainer.h" #include +#include #include #include #include @@ -47,7 +48,7 @@ const std::string& lane, double posOverLane, double posLat, double layer, double angle, const std::string& imgFile, bool relativePath, double width, double height, bool /* ignorePruning */) { GUIPointOfInterest* p = new GUIPointOfInterest(id, type, color, pos, geo, lane, posOverLane, posLat, layer, angle, imgFile, relativePath, width, height); - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); if (!myPOIs.add(id, p)) { if (myAllowReplacement) { GUIPointOfInterest* oldP = dynamic_cast(myPOIs.get(id)); @@ -71,7 +72,7 @@ double angle, const std::string& imgFile, bool relativePath, const PositionVector& shape, bool geo, bool fill, double lineWidth, bool /* ignorePruning */) { GUIPolygon* p = new GUIPolygon(id, type, color, shape, geo, fill, lineWidth, layer, angle, imgFile, relativePath); - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); if (!myPolygons.add(id, p)) { if (myAllowReplacement) { GUIPolygon* oldP = dynamic_cast(myPolygons.get(id)); @@ -89,21 +90,57 @@ } +PolygonDynamics* +GUIShapeContainer::addPolygonDynamics(double simtime, + std::string polyID, + SUMOTrafficObject* trackedObject, + const std::vector& timeSpan, + const std::vector& alphaSpan, + bool looped, + bool rotate) { + PolygonDynamics* pd = ShapeContainer::addPolygonDynamics(simtime, polyID, trackedObject, timeSpan, alphaSpan, looped, rotate); + if (pd != nullptr) { + pd->setRTree(&myVis); + } + return pd; +} + + +SUMOTime +GUIShapeContainer::polygonDynamicsUpdate(SUMOTime t, PolygonDynamics* pd) { + FXMutexLock locker(myLock); + SUMOTime next = ShapeContainer::polygonDynamicsUpdate(t, pd); + if (next != 0) { + // Update polygon position in RTree + GUIPolygon* p = dynamic_cast(pd->getPolygon()); + assert(p != nullptr); + myVis.removeAdditionalGLObject(p); + myVis.addAdditionalGLObject(p); + } + return next; +} + + bool -GUIShapeContainer::removePolygon(const std::string& id) { - AbstractMutex::ScopedLocker locker(myLock); +GUIShapeContainer::removePolygon(const std::string& id, bool useLock) { GUIPolygon* p = dynamic_cast(myPolygons.get(id)); if (p == nullptr) { return false; } + FXMutexLock* locker = nullptr; + if (useLock) { + locker = new FXMutexLock(myLock); + } myVis.removeAdditionalGLObject(p); - return myPolygons.remove(id); + bool succ = ShapeContainer::removePolygon(id); + delete locker; + return succ; } bool GUIShapeContainer::removePOI(const std::string& id) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); GUIPointOfInterest* p = dynamic_cast(myPOIs.get(id)); if (p == nullptr) { return false; @@ -115,7 +152,7 @@ void GUIShapeContainer::movePOI(const std::string& id, const Position& pos) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); GUIPointOfInterest* p = dynamic_cast(myPOIs.get(id)); if (p != nullptr) { myVis.removeAdditionalGLObject(p); @@ -127,7 +164,7 @@ void GUIShapeContainer::reshapePolygon(const std::string& id, const PositionVector& shape) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); GUIPolygon* p = dynamic_cast(myPolygons.get(id)); if (p != nullptr) { myVis.removeAdditionalGLObject(p); @@ -140,7 +177,7 @@ std::vector GUIShapeContainer::getPOIIds() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); std::vector ret; for (const auto& poi : getPOIs()) { ret.push_back(static_cast(poi.second)->getGlID()); @@ -151,7 +188,7 @@ std::vector GUIShapeContainer::getPolygonIDs() const { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); std::vector ret; for (const auto& poly : getPolygons()) { ret.push_back(static_cast(poly.second)->getGlID()); diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.h sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.h --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.h 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/GUIShapeContainer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,16 +25,15 @@ // =========================================================================== #include +#include #include #include -#include // =========================================================================== // class declarations // =========================================================================== class SUMORTree; class Position; -class MFXMutex; // =========================================================================== @@ -70,8 +69,21 @@ */ virtual bool addPolygon(const std::string& id, const std::string& type, const RGBColor& color, double layer, double angle, const std::string& imgFile, bool relativePath, const PositionVector& shape, bool geo, - bool fill, double lineWidth, bool ignorePruning = false); + bool fill, double lineWidth, bool ignorePruning = false) override; + /// @brief Adds dynamics to the given Polygon, @see ShapeContainer addPolygonDynamics + /// @note Supplies the visualisation RTree to the dynamics for updating the object when moving + PolygonDynamics* addPolygonDynamics(double simtime, + std::string polyID, + SUMOTrafficObject* trackedObject, + const std::vector& timeSpan, + const std::vector& alphaSpan, + bool looped, + bool rotate) override; + + /// @brief Update PolygonDynamics, @see ShapeContainer + /// @note Locks the visualisation RTree + SUMOTime polygonDynamicsUpdate(SUMOTime t, PolygonDynamics* pd) override; /** @brief Builds a POI using the given values and adds it to the container * @param[in] id The name of the POI @@ -92,7 +104,7 @@ */ virtual bool addPOI(const std::string& id, const std::string& type, const RGBColor& color, const Position& pos, bool geo, const std::string& lane, double posOverLane, double posLat, double layer, double angle, - const std::string& imgFile, bool relativePath, double width, double height, bool ignorePruning = false); + const std::string& imgFile, bool relativePath, double width, double height, bool ignorePruning = false) override; @@ -100,14 +112,14 @@ * @param[in] id The id of the polygon * @return Whether the polygon could be removed */ - virtual bool removePolygon(const std::string& id); + virtual bool removePolygon(const std::string& id, bool useLock = true) override; /** @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); + virtual bool removePOI(const std::string& id) override; @@ -115,14 +127,14 @@ * @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); + virtual void movePOI(const std::string& id, const Position& pos) override; /** @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); + virtual void reshapePolygon(const std::string& id, const PositionVector& shape) override; @@ -138,7 +150,7 @@ private: /// @brief The mutex for adding/removing operations - mutable MFXMutex myLock; + mutable FXMutex myLock; /// @brief The RTree structure to add and remove visualization elements SUMORTree& myVis; @@ -152,4 +164,3 @@ #endif /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/globjects/Makefile.in sumo-1.2.0+dfsg1/src/utils/gui/globjects/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/gui/globjects/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/globjects/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,647 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/globjects -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguiutilsglobjects.a -libguiutilsglobjects_a_SOURCES = GLIncludes.h \ -GUIGLObjectPopupMenu.cpp GUIGLObjectPopupMenu.h \ -GUIGlObject.cpp GUIGlObject.h \ -GUIGlObjectStorage.cpp GUIGlObjectStorage.h \ -GUIGlObjectTypes.h \ -GUIGlObject_AbstractAdd.cpp GUIGlObject_AbstractAdd.h \ -GUIShapeContainer.cpp GUIShapeContainer.h \ -GUIPointOfInterest.cpp GUIPointOfInterest.h \ -GUIPolygon.cpp GUIPolygon.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) --foreign src/utils/gui/globjects/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/globjects/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIGLObjectPopupMenu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIGlObject.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIGlObjectStorage.Po@am__quote@ -@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@ $(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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/images/dlr.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/dlr.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/dlr.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/dlr.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,327 @@ +/* XPM */ +static const char *dlr_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 64 64 256 2", +/* colors */ +"`` c #231f20", +"`. c #242021", +"`# c #252122", +"`a c #262222", +"`b c #272324", +"`c c #282425", +"`d c #292526", +"`e c #292626", +"`f c #2a2627", +"`g c #2b2728", +"`h c #2b2829", +"`i c #2d2929", +"`j c #2e2a2b", +"`k c #2f2b2c", +"`l c #302d2d", +"`m c #312d2e", +"`n c #332e2f", +"`o c #332f30", +"`p c #383435", +"`q c #3c3739", +"`r c #3c393a", +"`s c #413d3e", +"`t c #423e3e", +"`u c #423e40", +"`v c #464242", +"`w c #464343", +"`x c #474344", +"`y c #484445", +"`z c #494747", +"`A c #4a4748", +"`B c #4b4949", +"`C c #4c4849", +"`D c #4d4a4a", +"`E c #4e4a4b", +"`F c #4f4b4d", +"`G c #4f4c4c", +"`H c #524d4f", +"`I c #504e4e", +"`J c #514f50", +"`K c #535050", +"`L c #575555", +"`M c #575456", +"`N c #595657", +"`O c #5b5858", +"`P c #5c595b", +"`Q c #5d5a5a", +"`R c #605c5e", +"`S c #636062", +"`T c #676365", +"`U c #686565", +"`V c #6c6a6a", +"`W c #6d6b6b", +"`X c #6e6a6c", +"`Y c #6e6c6c", +"`Z c #6f6d6d", +"`0 c #716e6e", +"`1 c #716f6f", +"`2 c #726e70", +"`3 c #747173", +"`4 c #747272", +"`5 c #757273", +"`6 c #777474", +"`7 c #777577", +"`8 c #787575", +".` c #7a7777", +".. c #7b7979", +".# c #7b787a", +".a c #7e7b7b", +".b c #807d7d", +".c c #818080", +".d c #828181", +".e c #848081", +".f c #848384", +".g c #878484", +".h c #868485", +".i c #8b8788", +".j c #8a8888", +".k c #8a8889", +".l c #8d8b8b", +".m c #8e8c8c", +".n c #918f8f", +".o c #918f90", +".p c #939192", +".q c #949292", +".r c #979696", +".s c #999697", +".t c #9a9899", +".u c #9a999a", +".v c #9d9a9a", +".w c #9d9c9c", +".x c #9d9d9d", +".y c #a4a3a3", +".z c #a4a4a4", +".A c #a7a5a6", +".B c #adabab", +".C c #adacad", +".D c #afacae", +".E c #b0afaf", +".F c #b1b1b1", +".G c #b6b4b5", +".H c #b7b6b6", +".I c #bbb9b9", +".J c #bcbbbb", +".K c #bdbbbd", +".L c #bebdbd", +".M c #c0bebe", +".N c #c1c0c0", +".O c #c2c2c2", +".P c #c4c3c4", +".Q c #c6c5c5", +".R c #c8c7c7", +".S c #c9c8c9", +".T c #cbcacb", +".U c #cccaca", +".V c #d1d0d1", +".W c #d3d2d2", +".X c #d9d8d9", +".Y c #dbdada", +".Z c #dfdedf", +".0 c #e0dfdf", +".1 c #e2e1e1", +".2 c #e5e5e5", +".3 c #e6e5e6", +".4 c #e8e6e6", +".5 c #e8e7e7", +".6 c #eaeaea", +".7 c #ececec", +".8 c #ededed", +"#` c #eeeeee", +"#. c #f0f0f0", +"## c #f1f1f1", +"#a c #f2f2f2", +"#b c #f3f3f3", +"#c c #f5f3f5", +"#d c #f5f4f4", +"#e c #f6f6f6", +"#f c #f8f8f8", +"#g c #fafafa", +"#h c #fbfbfb", +"#i c #fcfbfb", +"#j c #fcfcfc", +"#k c #fdfdfd", +"#l c #fefefe", +"#m c #ffffff", +"#n c #000000", +"#o c #000000", +"#p c #000000", +"#q c #000000", +"#r c #000000", +"#s c #000000", +"#t c #000000", +"#u c #000000", +"#v c #000000", +"#w c #000000", +"#x c #000000", +"#y c #000000", +"#z c #000000", +"#A c #000000", +"#B c #000000", +"#C c #000000", +"#D c #000000", +"#E c #000000", +"#F c #000000", +"#G c #000000", +"#H c #000000", +"#I c #000000", +"#J c #000000", +"#K c #000000", +"#L c #000000", +"#M c #000000", +"#N c #000000", +"#O c #000000", +"#P c #000000", +"#Q c #000000", +"#R c #000000", +"#S c #000000", +"#T c #000000", +"#U c #000000", +"#V c #000000", +"#W c #000000", +"#X c #000000", +"#Y c #000000", +"#Z c #000000", +"#0 c #000000", +"#1 c #000000", +"#2 c #000000", +"#3 c #000000", +"#4 c #000000", +"#5 c #000000", +"#6 c #000000", +"#7 c #000000", +"#8 c #000000", +"a` c #000000", +"a. c #000000", +"a# c #000000", +"aa c #000000", +"ab c #000000", +"ac c #000000", +"ad c #000000", +"ae c #000000", +"af c #000000", +"ag c #000000", +"ah c #000000", +"ai c #000000", +"aj c #000000", +"ak c #000000", +"al c #000000", +"am c #000000", +"an c #000000", +"ao c #000000", +"ap c #000000", +"aq c #000000", +"ar c #000000", +"as c #000000", +"at c #000000", +"au c #000000", +"av c #000000", +"aw c #000000", +"ax c #000000", +"ay c #000000", +"az c #000000", +"aA c #000000", +"aB c #000000", +"aC c #000000", +"aD c #000000", +"aE c #000000", +"aF c #000000", +"aG c #000000", +"aH c #000000", +"aI c #000000", +"aJ c #000000", +"aK c #000000", +"aL c #000000", +"aM c #000000", +"aN c #000000", +"aO c #000000", +"aP c #000000", +"aQ c #000000", +"aR c #000000", +"aS c #000000", +"aT c #000000", +"aU c #000000", +"aV c #000000", +"aW c #000000", +"aX c #000000", +"aY c #000000", +"aZ c #000000", +"a0 c #000000", +"a1 c #000000", +"a2 c #000000", +"a3 c #000000", +"a4 c #000000", +"a5 c #000000", +"a6 c #000000", +"a7 c #000000", +"a8 c #000000", +/* pixels */ +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.4#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.2`z#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.3`s`i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.4`t```i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.6`w`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.7`x```````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.7`y`````````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.7`z```````````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#``A```````c`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m##`G```````K.n`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#a`I```````E#..t`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#a`H```````E#`#m.t`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#d`L```````D#`#m#m.t`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#d`N```````B#`#m#m#m.t`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#e`N```````B#`#m#m#m#m.t`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#e`O```````C#`#m#m#m#m#m.t`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#e`P```````C.8#m#m#m#m#m#m.t`````i#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m.5.r.r.r.r.r.r.r.r.r.r.r.r.r.r`N```````..g.r.r.r.r.r.r.r`S`````c.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.5#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m.6`x````````````````````````````````````````````````````````````````````````````````````````````.o#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m.7`y````````````````````````````````````````````````````````````````````````````````````````````.n#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m.6`x```````g`m`m`m`m`m`m`m`m`k`````````c`m`m`m`m`m`m`m`m`m`.```````.`m`m`m`m`m`m`m`m`m`b````````.l#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m.7`y```````D#`#m#m#m#m#m#m#m#h`T```````l.V#m#m#m#m#m#m#m#m.x```````#.E#m#m#m#m#m#m#m#m.O`f``````.g#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m.7`z```````B#`#m#m#m#m#m#m#m#h`U```````l.V#m#m#m#m#m#m#m#m.w```````#.D#m#m#m#m#m#m#m#m.S`h``````.h#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#.`F```````B#`#m#m#m#m#m#m#m#j`Y```````l.V#m#m#m#m#m#m#m#m.v```````#.D#m#m#m#m#m#m#m#m.S`i``````.f#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m##`F```````C#`#m#m#m#m#m#m#m#j`Y```````l.V#m#m#m#m#m#m#m#m.v```````..C#m#m#m#m#m#m#m#m.T`i``````.e#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m##`G```````A.8#m#m#m#m#m#m#m#j`Z```````m.V#m#m#m#m#m#m#m#m.t````````.z#m#m#m#m#m#m#m#m.T`i``````.e#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m##`I```````v.6#m#m#m#m#m#m#m#j`2```````m.V#m#m#m#m#m#m#m#m.u````````.z#m#m#m#m#m#m#m#m.U`j``````.d#l#m#m#m#m#m#m#m#m#m", +"#m#m#m#m##`G```````j.F.P.P.P.P.P.P.P.P`X```````..t.P.P.P.P.P.P.P.P.l`````````0.P.P.P.P.P.P.P.P.E`i``````.b#l#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#a`J````````````````````````````````````````````````````````````````````````````````````````````.`#l#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#a`J`````````````````````````````````````````````````````````````````````````````````````````````7#k#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#d`M`````````````````````````````````````````````````````````````````````````````````````````````8#k#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#b.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1`i````.j.1.1.1.1#`#.#..y````````.i.1.1.1.1.1.1.1.1.1.1.1.1.1.1#k#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k````.s#m#m#m#m#m#m.G`a``````.h#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k````.s#m#m#m#m#m.H`b``````.f#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k````.s#m#m#m#m.H`b``````.e#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k````.s#m#m#m.L`d``````.e#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k````.s#m#m.M`d``````.c#l#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k````.s#m.N`d``````.`#l#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k````.s.N`e``````.`#l#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k`````R`d``````.##l#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k`````````````8#k#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k```````````6#k#m#m#m#m#m#m#m#m.0.......g.x.X#m#m#m#m.A`1.Q#m#m#m#m#f......`3`6.w###m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k`````````5#k#m#m#m#m#m#m#m#m#m.U```#`m`#`````Z#f#m#m`4``.z#m#m#m#m#b`````````````q#`#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k```````3#k#m#m#m#m#m#m#m#m#m#m.U```B#m#e.D`m``.a#m#m`4``.z#m#m#m#m#b```##m#e.R`n``.z#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k`````X#i#m#m#m#m#m#m#m#m#m#m#m.U```B#m#m#m.I```c#a#m`4``.z#m#m#m#m#b```##m#m#m`X``.m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k```W#i#m#m#m#m#m#m#m#m#m#m#m#m.U```B#m#m#m#m`u``.R#m`4``.z#m#m#m#m#b```##m#m.Y`p``.I#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`k`V#i#m#m#m#m#m#m#m#m#m#m#m#m#m.U```B#m#m#m#m`O``.I#m`4``.z#m#m#m#m#b`````m`i```..o#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m`8#i#m#m#m#m#m#m#m#m#m#m#m#m#m#m.U```B#m#m#m#l`r``.T#m`4``.z#m#m#m#m#b`````Q`N`h``.q#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#k#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.U```B#m#m#m.z```h#e#m`4``.z#m#m#m#m#b```##m#m.K```j#`#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.U```z#..W.h`b``.p#m#m`4``.k.W.W.W#a#b```##m#m#m`D``.p#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.U```````````h.p#l#m#m`4``````````.J#b```##m#m#m.y```o#c#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m.4.r.r.t.B.P#d#m#m#m#m.L.r.r.r.r.r.0#g.r.s#m#m#m#b.r.r.Z#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m", +"#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m#m" +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/flag.cpp sumo-1.2.0+dfsg1/src/utils/gui/images/flag.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/images/flag.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/flag.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/flag_minus.cpp sumo-1.2.0+dfsg1/src/utils/gui/images/flag_minus.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/images/flag_minus.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/flag_minus.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/flag_plus.cpp sumo-1.2.0+dfsg1/src/utils/gui/images/flag_plus.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/images/flag_plus.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/flag_plus.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/flow.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/flow.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/flow.xpm 2018-07-04 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/flow.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -1,278 +1,28 @@ /* XPM */ static const char *flow_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 16 256 2 ", -" c black", -". c black", -"X c black", -"o c black", -"O c black", -"+ c black", -"@ c black", -"# c black", -"$ c black", -"% c black", -"& c black", -"* c black", -"= c black", -"- c black", -"; c black", -": c black", -"> c black", -", c black", -"< c black", -"1 c black", -"2 c black", -"3 c black", -"4 c black", -"5 c black", -"6 c black", -"7 c black", -"8 c black", -"9 c black", -"0 c black", -"q c black", -"w c black", -"e c black", -"r c black", -"t c black", -"y c black", -"u c black", -"i c black", -"p c black", -"a c black", -"s c black", -"d c black", -"f c black", -"g c black", -"h c black", -"j c black", -"k c black", -"l c black", -"z c black", -"x c black", -"c c black", -"v c black", -"b c black", -"n c black", -"m c black", -"M c black", -"N c black", -"B c black", -"V c black", -"C c black", -"Z c black", -"A c black", -"S c black", -"D c black", -"F c black", -"G c black", -"H c black", -"J c black", -"K c black", -"L c black", -"P c black", -"I c black", -"U c black", -"Y c black", -"T c black", -"R c black", -"E c black", -"W c black", -"Q c black", -"! c black", -"~ c black", -"^ c black", -"/ c black", -"( c black", -") c black", -"_ c black", -"` c black", -"' c black", -"] c black", -"[ c black", -"{ c black", -"} c black", -"| c black", -" . c black", -".. c black", -"X. c black", -"o. c black", -"O. c black", -"+. c black", -"@. c black", -"#. c black", -"$. c black", -"%. c black", -"&. c black", -"*. c black", -"=. c black", -"-. c black", -";. c black", -":. c black", -">. c black", -",. c black", -"<. c black", -"1. c black", -"2. c black", -"3. c black", -"4. c black", -"5. c black", -"6. c black", -"7. c black", -"8. c black", -"9. c black", -"0. c black", -"q. c black", -"w. c black", -"e. c black", -"r. c black", -"t. c black", -"y. c black", -"u. c black", -"i. c black", -"p. c black", -"a. c black", -"s. c black", -"d. c black", -"f. c black", -"g. c black", -"h. c black", -"j. c black", -"k. c black", -"l. c black", -"z. c black", -"x. c black", -"c. c black", -"v. c black", -"b. c black", -"n. c black", -"m. c black", -"M. c black", -"N. c black", -"B. c black", -"V. c black", -"C. c black", -"Z. c black", -"A. c black", -"S. c black", -"D. c black", -"F. c black", -"G. c black", -"H. c black", -"J. c black", -"K. c black", -"L. c black", -"P. c black", -"I. c black", -"U. c black", -"Y. c black", -"T. c black", -"R. c black", -"E. c black", -"W. c black", -"Q. c black", -"!. c black", -"~. c black", -"^. c black", -"/. c black", -"(. c black", -"). c black", -"_. c black", -"`. c black", -"'. c black", -"]. c black", -"[. c black", -"{. c black", -"}. c black", -"|. c black", -" X c black", -".X c black", -"XX c black", -"oX c black", -"OX c black", -"+X c black", -"@X c black", -"#X c black", -"$X c black", -"%X c black", -"&X c black", -"*X c black", -"=X c black", -"-X c black", -";X c black", -":X c black", -">X c black", -",X c black", -"&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/gui/images -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - GUITextureSubSys.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguiutilsimages.a -EXTRA_DIST = flag.cpp flag_minus.cpp flag_plus.cpp manip.cpp \ -accept.xpm \ -access.xpm \ -add.xpm \ -allow_rotation.xpm \ -app_breakpoints.xpm \ -app_finder.xpm \ -app_selector.xpm \ -app_table.xpm \ -app_tlstracker.xpm \ -app_tracker.xpm \ -busstop.xpm \ -calibrator.xpm \ -camera.xpm \ -cancel.xpm \ -chargingstation.xpm \ -cleanjunctions.xpm \ -close_gaps.xpm \ -closing.xpm \ -closinglanereroute.xpm \ -closingreroute.xpm \ -colorwheel.xpm \ -colour_lane.xpm \ -colour_vehicle.xpm \ -computejunctions.xpm \ -connection.xpm \ -cont.xpm \ -containerstop.xpm \ -correct.xpm \ -create_graph.xpm \ -crossing.xpm \ -cut.xpm \ -destprobreroute.xpm \ -dilate.xpm \ -document.xpm \ -e1.xpm \ -e1instant.xpm \ -e2.xpm \ -e3.xpm \ -e3entry.xpm \ -e3exit.xpm \ -edge.xpm \ -edit_graph.xpm \ -empty.xpm \ -erase_stains.xpm \ -erode.xpm \ -error.xpm \ -ext.xpm \ -extract_streets.xpm \ -eyedrop.xpm \ -fileopen.xpm \ -fileprint.xpm \ -filesave.xpm \ -flow.xpm \ -green_edge.xpm \ -green_person.xpm \ -green_vehicle.xpm \ -grid1.xpm \ -grid2.xpm \ -grid3.xpm \ -halt.xpm \ -joinjunctions.xpm \ -junction.xpm \ -lane.xpm \ -lanebike.xpm \ -lanebus.xpm \ -lanegreenverge.xpm \ -lanepedestrian.xpm \ -locate.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 \ -lock.xpm \ -magnify.xpm \ -modeadditional.xpm \ -modeconnection.xpm \ -modecreateedge.xpm \ -modecrossing.xpm \ -modedelete.xpm \ -modeinspect.xpm \ -modemove.xpm \ -modepolygon.xpm \ -modeprohibition.xpm \ -modeselect.xpm \ -modetaz.xpm \ -modetrafficlight.xpm \ -netedit_icon16.xpm \ -netedit_icon64.xpm \ -neteditarrowleft.xpm \ -neteditarrowright.xpm \ -netopen.xpm \ -new_window.xpm \ -no.xpm \ -open_bmp_dialog.xpm \ -opening.xpm \ -options.xpm \ -paintbrush1x.xpm \ -paintbrush2x.xpm \ -paintbrush3x.xpm \ -paintbrush4x.xpm \ -paintbrush5x.xpm \ -parkingarea.xpm \ -parkingspace.xpm \ -parkingzonereroute.xpm \ -play.xpm \ -prohibition.xpm \ -rarify.xpm \ -recenter_view.xpm \ -redo.xpm \ -reload.xpm \ -remove.xpm \ -removedb.xpm \ -rerouter.xpm \ -rerouterinterval.xpm \ -reset.xpm \ -route.xpm \ -routeprobe.xpm \ -routeprobreroute.xpm \ -rubber1x.xpm \ -rubber2x.xpm \ -rubber3x.xpm \ -rubber4x.xpm \ -rubber5x.xpm \ -savedb.xpm \ -shapeopen.xpm \ -show_tooltips.xpm \ -skeletonize.xpm \ -step.xpm \ -stop.xpm \ -sumo_icon16.xpm \ -sumo_icon64.xpm \ -sumo_logo.xpm \ -taz.xpm \ -tazedge.xpm \ -undo.xpm \ -vaporizer.xpm \ -variablespeedsign.xpm \ -vclass_army.xpm \ -vclass_authority.xpm \ -vclass_bicycle.xpm \ -vclass_bus.xpm \ -vclass_coach.xpm \ -vclass_custom1.xpm \ -vclass_custom2.xpm \ -vclass_delivery.xpm \ -vclass_emergency.xpm \ -vclass_evehicle.xpm \ -vclass_hov.xpm \ -vclass_ignoring.xpm \ -vclass_moped.xpm \ -vclass_motorcycle.xpm \ -vclass_passenger.xpm \ -vclass_pedestrian.xpm \ -vclass_private.xpm \ -vclass_rail.xpm \ -vclass_rail_electric.xpm \ -vclass_rail_urban.xpm \ -vclass_ship.xpm \ -vclass_taxi.xpm \ -vclass_trailer.xpm \ -vclass_tram.xpm \ -vclass_truck.xpm \ -vclass_vip.xpm \ -view1.xpm \ -view2.xpm \ -view3.xpm \ -vssstep.xpm \ -vtype.xpm \ -warning.xpm \ -windows_cascade.xpm \ -windows_tile_horizontally.xpm \ -windows_tile_vertically.xpm \ -yellow_edge.xpm \ -yellow_person.xpm \ -yellow_vehicle.xpm \ -yes.xpm \ -zoomstyle.xpm \ -GNETexture_Rerouter.cpp GNETexture_RerouterSelected.cpp \ -GNETexture_RouteProbe.cpp GNETexture_RouteProbeSelected.cpp \ -GNETexture_VariableSpeedSign.cpp GNETexture_VariableSpeedSignSelected.cpp \ -GNETexture_Vaporizer.cpp GNETexture_VaporizerSelected.cpp \ -GNETexture_E3.cpp GNETexture_E3Selected.cpp \ -GNETexture_Lock.cpp GNETexture_LockSelected.cpp \ -GNETexture_Empty.cpp GNETexture_EmptySelected.cpp \ -GNETexture_NotMoving.cpp GNETexture_NotMovingSelected.cpp \ -GNETexture_LaneBus.cpp GNETexture_LaneBike.cpp \ -GNETexture_LanePedestrian.cpp GNETexture_TLS.cpp - -libguiutilsimages_a_SOURCES = GUIIconSubSys.cpp GUIIconSubSys.h \ -GUITextureSubSys.cpp GUITextureSubSys.h \ -GUIIcons.h GUITexturesHelper.cpp GUITexturesHelper.h GUITextures.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) --foreign src/utils/gui/images/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/images/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIIconSubSys.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITextureSubSys.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITexturesHelper.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/images/manip.cpp sumo-1.2.0+dfsg1/src/utils/gui/images/manip.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/images/manip.cpp 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/manip.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/moderoute.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/moderoute.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/moderoute.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/moderoute.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,34 @@ +/* XPM */ +static const char *moderoute_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 12 1 ", +" c black", +". c #090809", +"X c #1E1D1F", +"o c red", +"O c #4BB3FA", +"+ c #AAAAAA", +"@ c #D0FCAC", +"# c #FDFDA6", +"$ c #D5D5D5", +"% c #E8DAEA", +"& c gray100", +"* c None", +/* pixels */ +"****************", +"****************", +".XXXXXXXXXXXXXX.", +"X%OO%%%##%%%@@@X", +"X%%%%%%##%%%%%%X", +"X##############X", +"X#o# # # # # ##X", +"X##############X", +"X%%%%%%##%%# #%X", +"X@@@%%%##%%###%X", +" @@@%%%##%%# #% ", +" +++$++++++$+++ ", +" +&+$++&&++$+&+ ", +" XXXXXXXXXXXXXX.", +"****************", +"****************" +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/modestop.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/modestop.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/modestop.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/modestop.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,26 @@ +/* XPM */ +static const char *modestop_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 4 1 ", +" c red", +". c #FFA3A3", +"X c gray100", +"o c None", +/* pixels */ +"ooooo......ooooo", +"oooo. .oooo", +"ooo. .ooo", +"oo. .oo", +"o. .o", +". .", +".XX XXX XXX XXX.", +".X X X X X X.", +".XX X X X XXX.", +". X X X X X .", +".XX X XXX X .", +"o. .o", +"oo. .oo", +"ooo. .ooo", +"oooo. .oooo", +"ooooo......ooooo" +}; \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/modevehicletype.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/modevehicletype.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/modevehicletype.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/modevehicletype.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,28 @@ +/* XPM */ +static const char *modevehicletype_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 6 1 ", +" c black", +". c #040403", +"X c gray25", +"o c red", +"O c #808080", +"+ c None", +/* pixels */ +"+++XXXXXXXX+++++", +"++++ ++++++", +"+++XXXXXXX++++++", +"X+XOOOOOOXXX++X+", +"X+XOXXXOOOOXXXX ", +"X XOX XOOOOOOOX ", +"X XOXXXXXXOOOOX ", +"X+XOOOOX.XOOOOX ", +"X+XXOOOXXXOXXXX ", +"+++XXOOOOOXX++X+", +"++++XXXXXXX+++++", +"++++++++++++++++", +"+ooo+o+o+oo+oo++", +"++o++ooo+oo+o+++", +"++o+++o++o++oo++", +"++++++++++++++++" +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/modevehicle.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/modevehicle.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/modevehicle.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/modevehicle.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,28 @@ +/* XPM */ +static const char *modevehicle_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 6 1 ", +" c black", +". c #007F46", +"X c #FFD800", +"o c cyan", +"O c #808080", +"+ c None", +/* pixels */ +"++++++++++++++++", +"+++..........+++", +"++.oooooooooo.++", +"++.oo oooo oo.++", +"+..o oo o..+", +"+..............+", +"................", +".XX..........XX.", +".XX.OOOOOOOO.XX.", +"................", +"....OOOOOOOO....", +"................", +"+ ++++++++++ +", +"+ ++++++++++ +", +"++++++++++++++++", +"++++++++++++++++" +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/new_window_3d.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/new_window_3d.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/new_window_3d.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/new_window_3d.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,103 @@ +/* XPM */ +static const char * new_window_3d_xpm[] = { +"16 16 84 2", +"Qt c None", +".9 c #020202", +"#r c #030303", +".4 c #060607", +"#q c #080808", +".3 c #0b0b0b", +"#p c #0e0e0e", +".Y c #101010", +"#o c #131313", +".S c #151515", +".H c #191919", +".N c #1a1a1a", +"#n c #1e1e1e", +".I c #1f1f1f", +"#m c #242323", +".A c #242324", +"#l c #292929", +".z c #2e2eff", +"#k c #2f2f2f", +"#j c #343434", +"#i c #3a3a3a", +".y c #3a3aff", +"#h c #3f3f3f", +".x c #3f3fff", +".G c #404040", +".i c #434343", +"#. c #444444", +".w c #4444ff", +".F c #454545", +".h c #494949", +".v c #4a4aff", +".g c #4e4e4e", +".u c #5050ff", +".Z c #525253", +".t c #5555ff", +".T c #585857", +".e c #595959", +".d c #5a5b5b", +".r c #5b5a5b", +".C c #5b5b5a", +".c c #5b5b5b", +".s c #5b5bff", +".f c #696969", +".8 c #878787", +"#g c #888888", +"#f c #8a8a8a", +"#e c #8b8b8c", +"#d c #8c8c8c", +"#c c #8d8d8d", +"#b c #8e8e8e", +"#a c #8f8f8f", +"## c #909090", +".q c #9c9cff", +".p c #9f9fff", +".o c #a2a2ff", +".n c #a4a5ff", +".m c #a7a7ff", +".l c #aaaaff", +".B c #adadad", +".k c #adadff", +".E c #c00000", +".2 c #c7c7c7", +".X c #c8c8c8", +".7 c #c9c9c9", +".R c #cacaca", +".M c #cbcbcb", +".W c #cccccc", +".Q c #cececd", +".V c #cecece", +".L c #cfcfcf", +".6 c #cfcfd0", +".1 c #d1d1d0", +".P c #d2d2d2", +".K c #d3d3d3", +".O c #d4d4d4", +".5 c #e8e8e8", +".0 c #e9e9e9", +".U c #eaeaea", +".J c #ebebeb", +".D c #ff0000", +".# c #ff8514", +".a c #ffcb0a", +".b c #ffff0a", +".j c #ffffff", +"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", +"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#", +"QtQtQtQtQtQtQtQtQtQt.aQt.#Qt.aQt", +"QtQtQtQtQtQtQtQtQtQtQt.b.b.bQtQt", +".c.c.c.c.d.e.f.g.h.i.#.b.j.b.#Qt", +".c.k.k.k.k.l.m.n.o.p.q.b.b.bQtQt", +".r.k.s.s.t.u.v.w.x.y.a.z.#.A.aQt", +".c.B.C.D.D.E.F.G.D.D.D.E.H.IQtQt", +".c.J.D.E.K.D.E.L.D.E.M.D.E.NQtQt", +".c.J.O.K.P.D.E.Q.D.E.R.D.E.SQtQt", +".T.U.K.P.D.E.V.W.D.E.X.D.E.YQtQt", +".Z.0.P.1.L.D.E.M.D.E.2.D.E.3QtQt", +".g.0.D.E.V.D.E.R.D.E.R.D.E.4QtQt", +".h.5.6.D.D.E.R.7.D.D.D.E.8.9QtQt", +"#..5###a#b#c#d#e#f#f#g.8.8.9QtQt", +"#h#i#j#k#l#m#n.H#o#p#q#r.9.9QtQt"}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/route.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/route.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/route.xpm 2018-07-04 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/route.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -1,278 +1,34 @@ /* XPM */ static const char *route_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 16 256 2 ", -" c black", -". c black", -"X c black", -"o c black", -"O c black", -"+ c black", -"@ c black", -"# c black", -"$ c black", -"% c black", -"& c black", -"* c black", -"= c black", -"- c black", -"; c black", -": c black", -"> c black", -", c black", -"< c black", -"1 c black", -"2 c black", -"3 c black", -"4 c black", -"5 c black", -"6 c black", -"7 c black", -"8 c black", -"9 c black", -"0 c black", -"q c black", -"w c black", -"e c black", -"r c black", -"t c black", -"y c black", -"u c black", -"i c black", -"p c black", -"a c black", -"s c black", -"d c black", -"f c black", -"g c black", -"h c black", -"j c black", -"k c black", -"l c black", -"z c black", -"x c black", -"c c black", -"v c black", -"b c black", -"n c black", -"m c black", -"M c black", -"N c black", -"B c black", -"V c black", -"C c black", -"Z c black", -"A c black", -"S c black", -"D c black", -"F c black", -"G c black", -"H c black", -"J c black", -"K c black", -"L c black", -"P c black", -"I c black", -"U c black", -"Y c black", -"T c black", -"R c black", -"E c black", -"W c black", -"Q c black", -"! c black", -"~ c black", -"^ c black", -"/ c black", -"( c black", -") c black", -"_ c black", -"` c black", -"' c black", -"] c black", -"[ c black", -"{ c black", -"} c black", -"| c black", -" . c black", -".. c black", -"X. c black", -"o. c black", -"O. c black", -"+. c black", -"@. c black", -"#. c black", -"$. c black", -"%. c black", -"&. c black", -"*. c black", -"=. c black", -"-. c black", -";. c black", -":. c black", -">. c black", -",. c black", -"<. c black", -"1. c black", -"2. c black", -"3. c black", -"4. c black", -"5. c black", -"6. c black", -"7. c black", -"8. c black", -"9. c black", -"0. c black", -"q. c black", -"w. c black", -"e. c black", -"r. c black", -"t. c black", -"y. c black", -"u. c black", -"i. c black", -"p. c black", -"a. c black", -"s. c black", -"d. c black", -"f. c black", -"g. c black", -"h. c black", -"j. c black", -"k. c black", -"l. c black", -"z. c black", -"x. c black", -"c. c black", -"v. c black", -"b. c black", -"n. c black", -"m. c black", -"M. c black", -"N. c black", -"B. c black", -"V. c black", -"C. c black", -"Z. c black", -"A. c black", -"S. c black", -"D. c black", -"F. c black", -"G. c black", -"H. c black", -"J. c black", -"K. c black", -"L. c black", -"P. c black", -"I. c black", -"U. c black", -"Y. c black", -"T. c black", -"R. c black", -"E. c black", -"W. c black", -"Q. c black", -"!. c black", -"~. c black", -"^. c black", -"/. c black", -"(. c black", -"). c black", -"_. c black", -"`. c black", -"'. c black", -"]. c black", -"[. c black", -"{. c black", -"}. c black", -"|. c black", -" X c black", -".X c black", -"XX c black", -"oX c black", -"OX c black", -"+X c black", -"@X c black", -"#X c black", -"$X c black", -"%X c black", -"&X c black", -"*X c black", -"=X c black", -"-X c black", -";X c black", -":X c black", -">X c black", -",X c black", -" c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bicycle.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bicycle.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bicycle.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bicycle.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_bicycle_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus_coach.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus_coach.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus_coach.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus_coach.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_bus_coach_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus_flexible.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus_flexible.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus_flexible.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus_flexible.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_bus_flexible_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus_trolley.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus_trolley.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus_trolley.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus_trolley.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_bus_trolley_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_bus.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_bus.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_bus_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_delivery.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_delivery.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_delivery.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_delivery.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_delivery_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_emergency.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_emergency.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_emergency.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_emergency.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_emergency_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_e_vehicle.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_e_vehicle.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_e_vehicle.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_e_vehicle.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_e_vehicle_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_firebrigade.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_firebrigade.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_firebrigade.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_firebrigade.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_firebrigade_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_moped.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_moped.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_moped.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_moped.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_moped_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_motorcycle.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_motorcycle.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_motorcycle.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_motorcycle.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_motorcycle_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_hatchback.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_hatchback.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_hatchback.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_hatchback.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_passenger_hatchback_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_sedan.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_sedan.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_sedan.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_sedan.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_passenger_sedan_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_van.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_van.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_van.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_van.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_passenger_van_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_wagon.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_wagon.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger_wagon.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger_wagon.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_passenger_wagon_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_passenger.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_passenger.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_passenger_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_pedestrian.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_pedestrian.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_pedestrian.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_pedestrian.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_pedestrian_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_police.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_police.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_police.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_police.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_police_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rail_cargo.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rail_cargo.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rail_cargo.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rail_cargo.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_rail_cargo_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rail_car.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rail_car.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rail_car.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rail_car.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_rail_car_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rail.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rail.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rail.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rail.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_rail_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rickshaw.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rickshaw.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_rickshaw.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_rickshaw.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_rickshaw_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_ship.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_ship.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_ship.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_ship.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_ship_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_truck_1trailer.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_truck_1trailer.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_truck_1trailer.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_truck_1trailer.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_truck_1trailer_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_truck_semitrailer.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_truck_semitrailer.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_truck_semitrailer.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_truck_semitrailer.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_truck_semitrailer_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_truck.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_truck.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_truck.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_truck.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_truck_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_unknown.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_unknown.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vshape_unknown.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vshape_unknown.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,294 @@ +/* XPM */ +static const char *vshape_unknown_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 32 256 2 ", +" c #D80027", +". c #D80128", +"X c #D80229", +"o c #D9052B", +"O c #D9072D", +"+ c #DA1034", +"@ c #DB1236", +"# c #DB1639", +"$ c #DC183B", +"% c #DC193C", +"& c #DC1C3E", +"* c #DD1E40", +"= c #DD1E41", +"- c #DD2042", +"; c #DD2143", +": c #DE2647", +"> c #DF2C4D", +", c #DF3150", +"< c #DF3151", +"1 c #E03251", +"2 c #E03655", +"3 c #E13958", +"4 c #E34B67", +"5 c #E44C68", +"6 c #E5556F", +"7 c #E65B74", +"8 c #E7637B", +"9 c #E8677E", +"0 c #E8677F", +"q c #E8687F", +"w c #E96D83", +"e c #E97288", +"r c #EA7489", +"t c #EA748A", +"y c #EA798D", +"u c #EB7E92", +"i c #EB7F93", +"p c #EB8093", +"a c #EC8295", +"s c #EC8396", +"d c #EC8497", +"f c #EE8E9F", +"g c #EF97A7", +"h c #EF98A7", +"j c #EF98A8", +"k c #EF9AA9", +"l c #F09EAD", +"z c #F09FAE", +"x c #F0A0AF", +"c c #F1A2B0", +"v c #F1A4B2", +"b c #F2ABB8", +"n c #F3AFBB", +"m c #F3B0BC", +"M c #F3B2BE", +"N c #F4B5C0", +"B c #F4B5C1", +"V c #F4B6C1", +"C c #F5C0CA", +"Z c #F6C2CB", +"A c #F6C4CD", +"S c #F6C5CE", +"D c #F6C7CF", +"F c #F7CAD2", +"G c #F7CED5", +"H c #F8CFD6", +"J c #F9DAE0", +"K c #FADCE2", +"L c #FADFE4", +"P c #FBE7EB", +"I c #FCEAED", +"U c #FDF3F5", +"Y c #FDF5F6", +"T c #FEF7F8", +"R c #FEF8F9", +"E c #FEFAFB", +"W c #FEFCFC", +"Q c #FFFDFD", +"! c #FFFDFE", +"~ c #FFFEFE", +"^ c gray100", +"/ c black", +"( c black", +") c black", +"_ c black", +"` c black", +"' c black", +"] c black", +"[ c black", +"{ c black", +"} c black", +"| c black", +" . c black", +".. c black", +"X. c black", +"o. c black", +"O. c black", +"+. c black", +"@. c black", +"#. c black", +"$. c black", +"%. c black", +"&. c black", +"*. c black", +"=. c black", +"-. c black", +";. c black", +":. c black", +">. c black", +",. c black", +"<. c black", +"1. c black", +"2. c black", +"3. c black", +"4. c black", +"5. c black", +"6. c black", +"7. c black", +"8. c black", +"9. c black", +"0. c black", +"q. c black", +"w. c black", +"e. c black", +"r. c black", +"t. c black", +"y. c black", +"u. c black", +"i. c black", +"p. c black", +"a. c black", +"s. c black", +"d. c black", +"f. c black", +"g. c black", +"h. c black", +"j. c black", +"k. c black", +"l. c black", +"z. c black", +"x. c black", +"c. c black", +"v. c black", +"b. c black", +"n. c black", +"m. c black", +"M. c black", +"N. c black", +"B. c black", +"V. c black", +"C. c black", +"Z. c black", +"A. c black", +"S. c black", +"D. c black", +"F. c black", +"G. c black", +"H. c black", +"J. c black", +"K. c black", +"L. c black", +"P. c black", +"I. c black", +"U. c black", +"Y. c black", +"T. c black", +"R. c black", +"E. c black", +"W. c black", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +" K ^ ^ ^ ^ ^ l . v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ e . i W ^ ^ ^ ^ ~ ^ ^ ^ ^ ^ W u . e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ~ e , N ! ^ ^ ^ ^ ^ ^ ! N , e ~ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ v @ = 9 h n n g 9 * @ v ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I r + + r I ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ T M r 5 3 3 5 r M T ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ", +"^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " +}; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/images/vtype.xpm sumo-1.2.0+dfsg1/src/utils/gui/images/vtype.xpm --- sumo-1.1.0+dfsg1/src/utils/gui/images/vtype.xpm 2018-07-04 22:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/images/vtype.xpm 2019-04-15 14:11:30.000000000 +0000 @@ -1,278 +1,28 @@ /* XPM */ static const char *vtype_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 16 256 2 ", -" c black", -". c black", -"X c black", -"o c black", -"O c black", -"+ c black", -"@ c black", -"# c black", -"$ c black", -"% c black", -"& c black", -"* c black", -"= c black", -"- c black", -"; c black", -": c black", -"> c black", -", c black", -"< c black", -"1 c black", -"2 c black", -"3 c black", -"4 c black", -"5 c black", -"6 c black", -"7 c black", -"8 c black", -"9 c black", -"0 c black", -"q c black", -"w c black", -"e c black", -"r c black", -"t c black", -"y c black", -"u c black", -"i c black", -"p c black", -"a c black", -"s c black", -"d c black", -"f c black", -"g c black", -"h c black", -"j c black", -"k c black", -"l c black", -"z c black", -"x c black", -"c c black", -"v c black", -"b c black", -"n c black", -"m c black", -"M c black", -"N c black", -"B c black", -"V c black", -"C c black", -"Z c black", -"A c black", -"S c black", -"D c black", -"F c black", -"G c black", -"H c black", -"J c black", -"K c black", -"L c black", -"P c black", -"I c black", -"U c black", -"Y c black", -"T c black", -"R c black", -"E c black", -"W c black", -"Q c black", -"! c black", -"~ c black", -"^ c black", -"/ c black", -"( c black", -") c black", -"_ c black", -"` c black", -"' c black", -"] c black", -"[ c black", -"{ c black", -"} c black", -"| c black", -" . c black", -".. c black", -"X. c black", -"o. c black", -"O. c black", -"+. c black", -"@. c black", -"#. c black", -"$. c black", -"%. c black", -"&. c black", -"*. c black", -"=. c black", -"-. c black", -";. c black", -":. c black", -">. c black", -",. c black", -"<. c black", -"1. c black", -"2. c black", -"3. c black", -"4. c black", -"5. c black", -"6. c black", -"7. c black", -"8. c black", -"9. c black", -"0. c black", -"q. c black", -"w. c black", -"e. c black", -"r. c black", -"t. c black", -"y. c black", -"u. c black", -"i. c black", -"p. c black", -"a. c black", -"s. c black", -"d. c black", -"f. c black", -"g. c black", -"h. c black", -"j. c black", -"k. c black", -"l. c black", -"z. c black", -"x. c black", -"c. c black", -"v. c black", -"b. c black", -"n. c black", -"m. c black", -"M. c black", -"N. c black", -"B. c black", -"V. c black", -"C. c black", -"Z. c black", -"A. c black", -"S. c black", -"D. c black", -"F. c black", -"G. c black", -"H. c black", -"J. c black", -"K. c black", -"L. c black", -"P. c black", -"I. c black", -"U. c black", -"Y. c black", -"T. c black", -"R. c black", -"E. c black", -"W. c black", -"Q. c black", -"!. c black", -"~. c black", -"^. c black", -"/. c black", -"(. c black", -"). c black", -"_. c black", -"`. c black", -"'. c black", -"]. c black", -"[. c black", -"{. c black", -"}. c black", -"|. c black", -" X c black", -".X c black", -"XX c black", -"oX c black", -"OX c black", -"+X c black", -"@X c black", -"#X c black", -"$X c black", -"%X c black", -"&X c black", -"*X c black", -"=X c black", -"-X c black", -";X c black", -":X c black", -">X c black", -",X c black", -"&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/gui -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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 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_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) -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -SUBDIRS = div events globjects images settings tracker windows cursors -all: all-recursive - -.SUFFIXES: -$(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) --foreign src/utils/gui/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp sumo-1.2.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -198,8 +198,9 @@ void -GUICompleteSchemeStorage::saveViewport(const double x, const double y, const double z) { +GUICompleteSchemeStorage::saveViewport(const double x, const double y, const double z, const double rot) { myLookFrom.set(x, y, z); + myRotation = rot; } @@ -207,7 +208,7 @@ GUICompleteSchemeStorage::setViewport(GUISUMOAbstractView* view) { if (myLookFrom.z() > 0) { // look straight down - view->setViewportFromToRot(myLookFrom, Position(myLookFrom.x(), myLookFrom.y(), 0), 0); + view->setViewportFromToRot(myLookFrom, Position(myLookFrom.x(), myLookFrom.y(), 0), myRotation); } else { view->recenterView(); } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.h sumo-1.2.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.h --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUICompleteSchemeStorage.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -115,7 +115,7 @@ * @param[in] y The y-offset * @param[in] z The camera height */ - void saveViewport(const double x, const double y, const double z); + void saveViewport(const double x, const double y, const double z, const double rot); /** @brief Sets the default viewport @@ -139,6 +139,7 @@ /// @brief The default viewport Position myLookFrom, myLookAt; + double myRotation; }; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIPropertyScheme.h sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIPropertyScheme.h --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIPropertyScheme.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIPropertyScheme.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,6 +29,7 @@ #include #include #include +#include // =========================================================================== @@ -46,10 +47,14 @@ public: /// Constructor GUIPropertyScheme(const std::string& name, const T& baseColor, - const std::string& colName = "", const bool isFixed = false, double baseValue = 0) : + const std::string& colName = "", const bool isFixed = false, double baseValue = 0, + RGBColor bgColor = RGBColor::INVISIBLE, + GUIIcon icon = ICON_EMPTY) : myName(name), myIsInterpolated(!isFixed), myIsFixed(isFixed), - myAllowNegativeValues(false) { + myAllowNegativeValues(false), + myIcon(icon), + myBgColor(bgColor) { addColor(baseColor, baseValue, colName); } @@ -162,6 +167,14 @@ myAllowNegativeValues = value; } + GUIIcon getIcon() const { + return myIcon; + } + + const RGBColor& getBackgroundColor() const { + return myBgColor; + } + void save(OutputDevice& dev) const { const std::string tag = getTagName(myColors); @@ -223,6 +236,8 @@ std::vector myNames; bool myIsFixed; bool myAllowNegativeValues; + GUIIcon myIcon; + RGBColor myBgColor; }; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIPropertySchemeStorage.h sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIPropertySchemeStorage.h --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIPropertySchemeStorage.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIPropertySchemeStorage.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,6 +28,9 @@ #include #include +#include +#include +#include #include "GUIPropertyScheme.h" @@ -55,9 +58,11 @@ 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()); + void fill(MFXIconComboBox& cb) { + for (const auto& scheme : mySchemes) { + cb.appendIconItem(scheme.getName().c_str(), + scheme.getIcon() == ICON_EMPTY ? nullptr : GUIIconSubSys::getIcon(scheme.getIcon()), + MFXUtils::getFXColor(scheme.getBackgroundColor())); } cb.setCurrentItem((FXint)myActiveScheme); } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.cpp sumo-1.2.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -116,6 +116,7 @@ break; case SUMO_TAG_VIEWSETTINGS_OPENGL: mySettings.dither = StringUtils::toBool(attrs.getStringSecure("dither", toString(mySettings.dither))); + mySettings.fps = StringUtils::toBool(attrs.getStringSecure("fps", toString(mySettings.fps))); break; case SUMO_TAG_VIEWSETTINGS_BACKGROUND: { bool ok = true; @@ -146,6 +147,7 @@ mySettings.spreadSuperposed = StringUtils::toBool(attrs.getStringSecure("spreadSuperposed", toString(mySettings.spreadSuperposed))); mySettings.edgeParam = attrs.getStringSecure("edgeParam", mySettings.edgeParam); mySettings.laneParam = attrs.getStringSecure("laneParam", mySettings.laneParam); + mySettings.edgeData = attrs.getStringSecure("edgeData", mySettings.edgeData); myCurrentColorer = element; mySettings.edgeColorer.setActive(laneEdgeMode); mySettings.edgeScaler.setActive(laneEdgeScaleMode); @@ -249,6 +251,7 @@ mySettings.drawLinkJunctionIndex = parseTextSettings("drawLinkJunctionIndex", attrs, mySettings.drawLinkJunctionIndex); mySettings.junctionName = parseTextSettings("junctionName", attrs, mySettings.junctionName); mySettings.internalJunctionName = parseTextSettings("internalJunctionName", attrs, mySettings.internalJunctionName); + mySettings.tlsPhaseIndex = parseTextSettings("tlsPhaseIndex", attrs, mySettings.tlsPhaseIndex); mySettings.showLane2Lane = StringUtils::toBool(attrs.getStringSecure("showLane2Lane", toString(mySettings.showLane2Lane))); mySettings.drawJunctionShape = StringUtils::toBool(attrs.getStringSecure("drawShape", toString(mySettings.drawJunctionShape))); mySettings.drawCrossingsAndWalkingareas = StringUtils::toBool(attrs.getStringSecure( @@ -364,8 +367,8 @@ if (mySettings.name != "") { gSchemeStorage.add(mySettings); if (view) { - FXint index = view->getColoringSchemesCombo().appendItem(mySettings.name.c_str()); - view->getColoringSchemesCombo().setCurrentItem(index); + FXint index = view->getColoringSchemesCombo()->appendItem(mySettings.name.c_str()); + view->getColoringSchemesCombo()->setCurrentItem(index); view->setColorScheme(mySettings.name); } } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.h sumo-1.2.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.h --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUISettingsHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.cpp sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -69,9 +69,17 @@ const RGBColor GUIVisualizationSettings::SUMO_color_E2(0, 204, 204); const RGBColor GUIVisualizationSettings::SUMO_color_E3Entry(0, 92, 64); const RGBColor GUIVisualizationSettings::SUMO_color_E3Exit(92, 0, 0); +const RGBColor GUIVisualizationSettings::SUMO_color_stops(220, 20, 30); const std::string GUIVisualizationSettings::SCHEME_NAME_EDGE_PARAM_NUMERICAL("by param (numerical, streetwise)"); const std::string GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL("by param (numerical, lanewise)"); +const std::string GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL("by edgeData (numerical, streetwise)"); + +// color constants for scheme background +#define COL_SCHEME_EMISSION RGBColor(255,255,210) +#define COL_SCHEME_MISC RGBColor(210,220,255) +#define COL_SCHEME_STATIC RGBColor(230,230,230) +#define COL_SCHEME_DYNAMIC RGBColor(220,255,220) // =========================================================================== // member method definitions @@ -81,14 +89,15 @@ netedit(_netedit), angle(0), dither(false), + fps(false), backgroundColor(RGBColor::WHITE), showGrid(false), gridXSize(100), gridYSize(100), laneShowBorders(false), showBikeMarkings(true), showLinkDecals(true), showLinkRules(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), + edgeName(false, 60, RGBColor(255, 128, 0, 255)), + internalEdgeName(false, 45, RGBColor(128, 64, 0, 255)), + cwaEdgeName(false, 60, RGBColor::MAGENTA), + streetName(false, 60, RGBColor::YELLOW), edgeValue(false, 100, RGBColor::CYAN), hideConnectors(false), laneWidthExaggeration(1), @@ -98,34 +107,36 @@ spreadSuperposed(false), edgeParam("EDGE_KEY"), laneParam("LANE_KEY"), + edgeData("speed"), vehicleQuality(0), showBlinker(true), drawLaneChangePreference(false), drawMinGap(false), showBTRange(false), vehicleSize(1), - vehicleName(false, 50, RGBColor(204, 153, 0, 255)), + vehicleName(false, 60, RGBColor(204, 153, 0, 255)), vehicleValue(false, 80, RGBColor::CYAN), personQuality(0), personSize(1), - personName(false, 50, RGBColor(0, 153, 204, 255)), + personName(false, 60, RGBColor(0, 153, 204, 255)), personValue(false, 80, RGBColor::CYAN), containerQuality(0), containerSize(1), - containerName(false, 50, RGBColor(0, 153, 204, 255)), + containerName(false, 60, RGBColor(0, 153, 204, 255)), drawLinkTLIndex(false, 50, RGBColor(128, 128, 255, 255)), drawLinkJunctionIndex(false, 50, RGBColor(128, 128, 255, 255)), - junctionName(false, 50, RGBColor(0, 255, 128, 255)), + junctionName(false, 60, RGBColor(0, 255, 128, 255)), internalJunctionName(false, 50, RGBColor(0, 204, 128, 255)), + tlsPhaseIndex(false, 150, RGBColor(255, 255, 0, 255)), showLane2Lane(false), drawJunctionShape(true), drawCrossingsAndWalkingareas(true), junctionSize(1), addMode(0), addSize(1), - addName(false, 50, RGBColor(255, 0, 128, 255)), - addFullName(false, 50, RGBColor(255, 0, 128, 255)), + addName(false, 60, RGBColor(255, 0, 128, 255)), + addFullName(false, 60, RGBColor(255, 0, 128, 255)), poiSize(0), poiName(false, 50, RGBColor(255, 0, 128, 255)), - poiType(false, 50, RGBColor(255, 0, 128, 255)), + poiType(false, 60, RGBColor(255, 0, 128, 255)), polySize(0), polyName(false, 50, RGBColor(255, 0, 128, 255)), - polyType(false, 50, RGBColor(255, 0, 128, 255)), + polyType(false, 60, RGBColor(255, 0, 128, 255)), showSizeLegend(true), gaming(false), selectionColor(0, 0, 204, 255), @@ -147,7 +158,7 @@ void GUIVisualizationSettings::initSumoGuiDefaults() { /// add lane coloring schemes - GUIColorScheme scheme = GUIColorScheme("uniform", RGBColor::BLACK, "road", true); + GUIColorScheme scheme = GUIColorScheme("uniform", RGBColor::BLACK, "road", true, 0); 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"); @@ -157,7 +168,7 @@ scheme.addColor(RGBColor::RED, 7, "closed"); // road closing scheme.addColor(RGBColor::GREEN, 8, "connector"); // macro-connector laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection (lane-/streetwise)", RGBColor(128, 128, 128, 255), "unselected", true); + scheme = GUIColorScheme("by selection (lane-/streetwise)", RGBColor(128, 128, 128, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); laneColorer.addScheme(scheme); scheme = GUIColorScheme("by permission code", RGBColor(240, 240, 240), "nobody"); @@ -181,19 +192,19 @@ scheme.addColor(RGBColor::BLUE, (double)(120 / 3.6)); scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by current occupancy (lanewise, brutto)", RGBColor(235, 235, 235)); + scheme = GUIColorScheme("by current occupancy (lanewise, brutto)", RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::GREEN, 0.25); scheme.addColor(RGBColor::YELLOW, 0.5); scheme.addColor(RGBColor::ORANGE, 0.75); scheme.addColor(RGBColor::RED, 1.0); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by current occupancy (lanewise, netto)", RGBColor(235, 235, 235)); + scheme = GUIColorScheme("by current occupancy (lanewise, netto)", RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::GREEN, 0.25); scheme.addColor(RGBColor::YELLOW, 0.5); scheme.addColor(RGBColor::ORANGE, 0.75); scheme.addColor(RGBColor::RED, 1.0); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by first vehicle waiting time (lanewise)", RGBColor(235, 235, 235)); + scheme = GUIColorScheme("by first vehicle waiting time (lanewise)", RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::CYAN, (double)30); scheme.addColor(RGBColor::GREEN, (double)100); scheme.addColor(RGBColor::YELLOW, (double)200); @@ -203,25 +214,25 @@ scheme.addColor(RGBColor::BLUE, (double)5); laneColorer.addScheme(scheme); // ... emissions ... - scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)(10. / 7.5 / 5.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)(0.05 / 7.5 / 2.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)(.005 / 7.5 / 5.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)(.125 / 7.5 / 5.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)(.02 / 7.5 / 4.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN); + scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)(.005 / 7.5 * 100.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN); + scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)100); laneColorer.addScheme(scheme); // ... weights (experimental) ... @@ -281,31 +292,31 @@ scheme.addColor(RGBColor::BLUE, (double) - .3); scheme.setAllowsNegativeValues(true); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by average speed", RGBColor::RED); + scheme = GUIColorScheme("by average speed", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(30 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(55 / 3.6)); scheme.addColor(RGBColor::CYAN, (double)(80 / 3.6)); scheme.addColor(RGBColor::BLUE, (double)(120 / 3.6)); scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by average relative speed ", RGBColor::RED); + scheme = GUIColorScheme("by average relative speed ", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(0.25)); scheme.addColor(RGBColor::GREEN, (double)(0.5)); scheme.addColor(RGBColor::CYAN, (double)(0.75)); scheme.addColor(RGBColor::BLUE, (double)(1)); scheme.addColor(RGBColor::MAGENTA, (double)(1.25)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by routing device assumed speed ", RGBColor::RED); + scheme = GUIColorScheme("by routing device assumed speed ", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(30 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(55 / 3.6)); scheme.addColor(RGBColor::CYAN, (double)(80 / 3.6)); scheme.addColor(RGBColor::BLUE, (double)(120 / 3.6)); scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by electricity consumption", RGBColor::GREEN); + scheme = GUIColorScheme("by electricity consumption", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)(1 / 7.5 / 5.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by insertion-backlog (streetwise)", RGBColor(204, 204, 204)); + scheme = GUIColorScheme("by insertion-backlog (streetwise)", RGBColor(204, 204, 204), "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::GREEN, (double)1); scheme.addColor(RGBColor::YELLOW, (double)10); scheme.addColor(RGBColor::RED, (double)100); @@ -318,6 +329,9 @@ scheme = GUIColorScheme(SCHEME_NAME_LANE_PARAM_NUMERICAL, RGBColor(204, 204, 204)); scheme.setAllowsNegativeValues(true); laneColorer.addScheme(scheme); + scheme = GUIColorScheme(SCHEME_NAME_EDGEDATA_NUMERICAL, RGBColor(204, 204, 204)); + scheme.setAllowsNegativeValues(true); + laneColorer.addScheme(scheme); /// add vehicle coloring schemes @@ -329,30 +343,30 @@ vehicleColorer.addScheme(GUIColorScheme("depart position as HSV", RGBColor::YELLOW, "", true)); 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 = GUIColorScheme("by speed", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(30 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(55 / 3.6)); scheme.addColor(RGBColor::CYAN, (double)(80 / 3.6)); scheme.addColor(RGBColor::BLUE, (double)(120 / 3.6)); scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by action step", RGBColor::GREY, "no action", true); + scheme = GUIColorScheme("by action step", RGBColor::GREY, "no action", true, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor(0, 255, 0, 255), 1., "action in next step"); scheme.addColor(RGBColor(80, 160, 80, 255), 2., "had action step"); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by waiting time", RGBColor::BLUE); + scheme = GUIColorScheme("by waiting time", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::CYAN, (double)30); scheme.addColor(RGBColor::GREEN, (double)100); scheme.addColor(RGBColor::YELLOW, (double)200); scheme.addColor(RGBColor::RED, (double)300); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by accumulated waiting time", RGBColor::BLUE); + scheme = GUIColorScheme("by accumulated waiting time", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::CYAN, (double)25); scheme.addColor(RGBColor::GREEN, (double)50); scheme.addColor(RGBColor::YELLOW, (double)75); scheme.addColor(RGBColor::RED, (double)100); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by time since lane change", RGBColor(179, 179, 179, 255), "0"); + scheme = GUIColorScheme("by time since lane change", RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor(189, 189, 179, 255), -180); scheme.addColor(RGBColor(255, 255, 0, 255), -20); scheme.addColor(RGBColor(255, 0, 0, 255), -0.001); @@ -369,35 +383,35 @@ scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); vehicleColorer.addScheme(scheme); // ... emissions ... - scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)5.); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, 0.05); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double).005); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double).125); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN); + scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double).02); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN); + scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double).005); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN); + scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)100.); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by reroute number", RGBColor::RED); + scheme = GUIColorScheme("by reroute number", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)1.); scheme.addColor(RGBColor::WHITE, (double)10.); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true, 0, COL_SCHEME_MISC); 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 = GUIColorScheme("by offset from best lane", RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor(255, 0, 255, 255), -100, "opposite lane"); scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-3"); scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-1"); @@ -405,7 +419,7 @@ 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 = GUIColorScheme("by acceleration", RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor(64, 0, 0, 255), -9.0); scheme.addColor(RGBColor(255, 0, 0, 255), -4.5 /* -SUMOVTypeParameter::getDefaultDecel() */); scheme.addColor(RGBColor(255, 255, 0, 255), -0.1); @@ -414,7 +428,7 @@ scheme.addColor(RGBColor(255, 0, 255, 255), 5.2); scheme.setAllowsNegativeValues(true); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by time gap on lane", RGBColor(255, 255, 0, 255), "0"); + scheme = GUIColorScheme("by time gap on lane", RGBColor(255, 255, 0, 255), "0", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor(179, 179, 179, 255), -1); scheme.addColor(RGBColor(0, 255, 255, 255), 1); scheme.addColor(RGBColor(0, 0, 255, 255), 2); @@ -426,15 +440,22 @@ scheme.addColor(RGBColor::YELLOW, (double)200); scheme.addColor(RGBColor::RED, (double)300); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by electricity consumption", RGBColor::GREEN); + scheme = GUIColorScheme("by electricity consumption", RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(RGBColor::RED, (double)5); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by time loss", RGBColor::BLUE); + scheme = GUIColorScheme("by time loss", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::CYAN, (double)10); scheme.addColor(RGBColor::GREEN, (double)60); scheme.addColor(RGBColor::YELLOW, (double)180); scheme.addColor(RGBColor::RED, (double)900); vehicleColorer.addScheme(scheme); + scheme = GUIColorScheme("by lateral speed", RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC); + scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-1.5"); + scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-0.5"); + scheme.addColor(RGBColor(0, 255, 255, 255), 1, "0.5"); + scheme.addColor(RGBColor(0, 0, 255, 255), 3, "1.5"); + scheme.setAllowsNegativeValues(true); + vehicleColorer.addScheme(scheme); vehicleColorer.addScheme(GUIColorScheme("random", RGBColor::YELLOW, "", true)); /// add person coloring schemes @@ -442,25 +463,25 @@ personColorer.addScheme(GUIColorScheme("uniform", RGBColor::BLUE, "", true)); personColorer.addScheme(GUIColorScheme("given/assigned person color", RGBColor::BLUE, "", true)); personColorer.addScheme(GUIColorScheme("given/assigned type color", RGBColor::BLUE, "", true)); - scheme = GUIColorScheme("by speed", RGBColor::RED); + scheme = GUIColorScheme("by speed", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(2.5 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(5 / 3.6)); scheme.addColor(RGBColor::BLUE, (double)(10 / 3.6)); personColorer.addScheme(scheme); - scheme = GUIColorScheme("by mode", RGBColor::GREY, "waiting for insertion", true); + scheme = GUIColorScheme("by mode", RGBColor::GREY, "waiting for insertion", true, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::RED, (double)(1), "stopped"); scheme.addColor(RGBColor::GREEN, (double)(2), "walking"); scheme.addColor(RGBColor::BLUE, (double)(3), "riding"); scheme.addColor(RGBColor::CYAN, (double)(4), "accessing trainStop"); scheme.addColor(RGBColor::YELLOW, (double)(5), "waiting for ride"); personColorer.addScheme(scheme); - scheme = GUIColorScheme("by waiting time", RGBColor::BLUE); + scheme = GUIColorScheme("by waiting time", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::CYAN, (double)30); scheme.addColor(RGBColor::GREEN, (double)100); scheme.addColor(RGBColor::YELLOW, (double)200); scheme.addColor(RGBColor::RED, (double)300); personColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); personColorer.addScheme(scheme); personColorer.addScheme(GUIColorScheme("by angle", RGBColor::YELLOW, "", true)); @@ -471,25 +492,25 @@ 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 = GUIColorScheme("by speed", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(2.5 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(5 / 3.6)); scheme.addColor(RGBColor::BLUE, (double)(10 / 3.6)); containerColorer.addScheme(scheme); - scheme = GUIColorScheme("by mode", RGBColor::GREY, "waiting for insertion", true); + scheme = GUIColorScheme("by mode", RGBColor::GREY, "waiting for insertion", true, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::RED, (double)(1), "stopped"); scheme.addColor(RGBColor::GREEN, (double)(2), "tranship"); // walking scheme.addColor(RGBColor::BLUE, (double)(3), "transport"); scheme.addColor(RGBColor::CYAN, (double)(4), "accessing trainStop"); scheme.addColor(RGBColor::YELLOW, (double)(5), "waiting for transport"); containerColorer.addScheme(scheme); - scheme = GUIColorScheme("by waiting time", RGBColor::BLUE); + scheme = GUIColorScheme("by waiting time", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::CYAN, (double)30); scheme.addColor(RGBColor::GREEN, (double)100); scheme.addColor(RGBColor::YELLOW, (double)200); scheme.addColor(RGBColor::RED, (double)300); containerColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); containerColorer.addScheme(scheme); containerColorer.addScheme(GUIColorScheme("by angle", RGBColor::YELLOW, "", true)); @@ -497,8 +518,9 @@ /// add junction coloring schemes scheme = GUIColorScheme("uniform", RGBColor::BLACK, "", true); scheme.addColor(RGBColor(150, 200, 200), 1, "waterway"); + scheme.addColor(RGBColor(0, 0, 0, 0), 2, "railway"); junctionColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection", RGBColor(128, 128, 128, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(128, 128, 128, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); junctionColorer.addScheme(scheme); scheme = GUIColorScheme("by type", RGBColor::GREEN, "traffic_light", true); @@ -511,7 +533,7 @@ scheme.addColor(RGBColor::MAGENTA, 7, "unregulated"); scheme.addColor(RGBColor::BLACK, 8, "dead_end"); scheme.addColor(RGBColor::ORANGE, 9, "rail_signal"); - scheme.addColor(RGBColor(192, 128, 64), 10, "zipper"); // light brown + scheme.addColor(RGBColor(172, 108, 44), 10, "zipper"); // brown, darker than the zipper link rule scheme.addColor(RGBColor(192, 255, 192), 11, "traffic_light_right_on_red"); // light green scheme.addColor(RGBColor(128, 0, 128), 12, "rail_crossing"); // dark purple junctionColorer.addScheme(scheme); @@ -526,14 +548,14 @@ /// add POI coloring schemes poiColorer.addScheme(GUIColorScheme("given POI color", RGBColor::RED, "", true)); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); poiColorer.addScheme(scheme); poiColorer.addScheme(GUIColorScheme("uniform", RGBColor::RED, "", true)); /// add polygon coloring schemes polyColorer.addScheme(GUIColorScheme("given polygon color", RGBColor::ORANGE, "", true)); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); polyColorer.addScheme(scheme); polyColorer.addScheme(GUIColorScheme("uniform", RGBColor::ORANGE, "", true)); @@ -542,45 +564,45 @@ { GUIScaleScheme scheme = GUIScaleScheme("default", 1, "uniform", true); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by selection (lane-/streetwise)", 0.5, "unselected", true); + scheme = GUIScaleScheme("by selection (lane-/streetwise)", 0.5, "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(5, 1, "selected"); laneScaler.addScheme(scheme); // ... traffic states ... scheme = GUIScaleScheme("by allowed speed (lanewise)", 0); scheme.addColor(10, (double)(150.0 / 3.6)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by current occupancy (lanewise, brutto)", 0); + scheme = GUIScaleScheme("by current occupancy (lanewise, brutto)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(10, 0.95); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by current occupancy (lanewise, netto)", 0); + scheme = GUIScaleScheme("by current occupancy (lanewise, netto)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(10, 0.95); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by first vehicle waiting time (lanewise)", 0); + scheme = GUIScaleScheme("by first vehicle waiting time (lanewise)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(10, (double)300); laneScaler.addScheme(scheme); scheme = GUIScaleScheme("by lane number (streetwise)", 1); scheme.addColor(10, (double)5); laneScaler.addScheme(scheme); // ... emissions ... - scheme = GUIScaleScheme("by CO2 emissions", 0); + scheme = GUIScaleScheme("by CO2 emissions", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)(10. / 7.5 / 5.)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by CO emissions", 0); + scheme = GUIScaleScheme("by CO emissions", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)(0.05 / 7.5 / 2.)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by PMx emissions", 0); + scheme = GUIScaleScheme("by PMx emissions", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)(.005 / 7.5 / 5.)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by NOx emissions", 0); + scheme = GUIScaleScheme("by NOx emissions", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)(.125 / 7.5 / 5.)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by HC emissions", 0); + scheme = GUIScaleScheme("by HC emissions", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)(.02 / 7.5 / 4.)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by fuel consumption", 0); + scheme = GUIScaleScheme("by fuel consumption", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)(.005 / 7.5 * 100.)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by noise emissions (Harmonoise)", 0); + scheme = GUIScaleScheme("by noise emissions (Harmonoise)", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)100); laneScaler.addScheme(scheme); // ... weights (experimental) ... @@ -605,18 +627,18 @@ scheme.addColor(5, (double)20); scheme.setAllowsNegativeValues(true); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by average speed", 0); + scheme = GUIScaleScheme("by average speed", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(10, (double)(150.0 / 3.6)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by average relative speed", 0); + scheme = GUIScaleScheme("by average relative speed", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(0.5, (double)(0.5)); scheme.addColor(2, (double)(1)); scheme.addColor(10, (double)(2)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by electricity consumption", 0); + scheme = GUIScaleScheme("by electricity consumption", 0, "", false, 0, COL_SCHEME_EMISSION); scheme.addColor(10, (double)(1 / 7.5 / 5.)); laneScaler.addScheme(scheme); - scheme = GUIScaleScheme("by insertion-backlog (streetwise)", 0); + scheme = GUIScaleScheme("by insertion-backlog (streetwise)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(1, (double)1); scheme.addColor(10, (double)10); scheme.addColor(50, (double)100); @@ -626,7 +648,7 @@ /// add edge coloring schemes edgeColorer.addScheme(GUIColorScheme("uniform", RGBColor(0, 0, 0, 0), "", true)); - scheme = GUIColorScheme("by selection (streetwise)", RGBColor(128, 128, 128, 255), "unselected", true); + scheme = GUIColorScheme("by selection (streetwise)", RGBColor(128, 128, 128, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); edgeColorer.addScheme(scheme); scheme = GUIColorScheme("by purpose (streetwise)", RGBColor(), "normal", true); @@ -640,27 +662,27 @@ scheme.addColor(RGBColor::BLUE, (double)(120 / 3.6)); scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by current occupancy (streetwise, brutto)", RGBColor::BLUE); + scheme = GUIColorScheme("by current occupancy (streetwise, brutto)", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::RED, 0.95); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by current speed (streetwise)", RGBColor::RED); + scheme = GUIColorScheme("by current speed (streetwise)", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(30 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(55 / 3.6)); scheme.addColor(RGBColor::CYAN, (double)(80 / 3.6)); scheme.addColor(RGBColor::BLUE, (double)(120 / 3.6)); scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by current flow (streetwise)", RGBColor::BLUE); + scheme = GUIColorScheme("by current flow (streetwise)", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::RED, (double)5000); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by relative speed (streetwise)", RGBColor::RED); + scheme = GUIColorScheme("by relative speed (streetwise)", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(0.25)); scheme.addColor(RGBColor::GREEN, (double)(0.5)); scheme.addColor(RGBColor::CYAN, (double)(0.75)); scheme.addColor(RGBColor::BLUE, (double)(1)); scheme.addColor(RGBColor::MAGENTA, (double)(1.25)); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by routing device assumed speed", RGBColor::RED); + scheme = GUIColorScheme("by routing device assumed speed", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(30 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(55 / 3.6)); scheme.addColor(RGBColor::CYAN, (double)(80 / 3.6)); @@ -671,30 +693,30 @@ scheme = GUIColorScheme("by segments (alternating)", RGBColor::BLUE, "odd", true); scheme.addColor(RGBColor::RED, 1, "even"); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by jammed state (segmentwise)", RGBColor::GREEN, "free", true); + scheme = GUIColorScheme("by jammed state (segmentwise)", RGBColor::GREEN, "free", true, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::RED, 1, "jammed"); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by current occupancy (segmentwise, brutto)", RGBColor::BLUE); + scheme = GUIColorScheme("by current occupancy (segmentwise, brutto)", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::RED, 0.95); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by current speed (segmentwise)", RGBColor::RED); + scheme = GUIColorScheme("by current speed (segmentwise)", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(30 / 3.6)); scheme.addColor(RGBColor::GREEN, (double)(55 / 3.6)); scheme.addColor(RGBColor::CYAN, (double)(80 / 3.6)); scheme.addColor(RGBColor::BLUE, (double)(120 / 3.6)); scheme.addColor(RGBColor::MAGENTA, (double)(150 / 3.6)); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by current flow (segmentwise)", RGBColor::BLUE); + scheme = GUIColorScheme("by current flow (segmentwise)", RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::RED, (double)5000); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by relative speed (segmentwise)", RGBColor::RED); + scheme = GUIColorScheme("by relative speed (segmentwise)", RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::YELLOW, (double)(0.25)); scheme.addColor(RGBColor::GREEN, (double)(0.5)); scheme.addColor(RGBColor::CYAN, (double)(0.75)); scheme.addColor(RGBColor::BLUE, (double)(1)); scheme.addColor(RGBColor::MAGENTA, (double)(1.25)); edgeColorer.addScheme(scheme); - scheme = GUIColorScheme("by insertion-backlog (streetwise)", RGBColor::GREY); + scheme = GUIColorScheme("by insertion-backlog (streetwise)", RGBColor::GREY, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(RGBColor::GREEN, (double)1); scheme.addColor(RGBColor::YELLOW, (double)10); scheme.addColor(RGBColor::RED, (double)100); @@ -706,25 +728,25 @@ /// add edge scaling schemes { edgeScaler.addScheme(GUIScaleScheme("uniform", 1, "", true)); - GUIScaleScheme scheme = GUIScaleScheme("by selection (streetwise)", 0.5, "unselected", true); + GUIScaleScheme scheme = GUIScaleScheme("by selection (streetwise)", 0.5, "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(5, 1, "selected"); edgeScaler.addScheme(scheme); scheme = GUIScaleScheme("by allowed speed (streetwise)", 0); scheme.addColor(10, (double)(150.0 / 3.6)); edgeScaler.addScheme(scheme); - scheme = GUIScaleScheme("by current occupancy (streetwise, brutto)", 0); + scheme = GUIScaleScheme("by current occupancy (streetwise, brutto)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(10, 0.95); edgeScaler.addScheme(scheme); - scheme = GUIScaleScheme("by current speed (streetwise)", 0); + scheme = GUIScaleScheme("by current speed (streetwise)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(10, (double)(150.0 / 3.6)); edgeScaler.addScheme(scheme); - scheme = GUIScaleScheme("by current flow (streetwise)", 0); + scheme = GUIScaleScheme("by current flow (streetwise)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(20, (double)5000); edgeScaler.addScheme(scheme); - scheme = GUIScaleScheme("by relative speed (streetwise)", 0); + scheme = GUIScaleScheme("by relative speed (streetwise)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(20, (double)1); edgeScaler.addScheme(scheme); - scheme = GUIScaleScheme("by insertion-backlog (streetwise)", 0); + scheme = GUIScaleScheme("by insertion-backlog (streetwise)", 0, "", false, 0, COL_SCHEME_DYNAMIC); scheme.addColor(1, (double)1); scheme.addColor(10, (double)10); scheme.addColor(50, (double)100); @@ -745,7 +767,7 @@ scheme.addColor(RGBColor::BLACK, 5, "railway"); scheme.addColor(RGBColor(92, 92, 92), 6, "no passenger"); // paths, service roads etc laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection (lane-/streetwise)", RGBColor(128, 128, 128, 255), "unselected", true); + scheme = GUIColorScheme("by selection (lane-/streetwise)", RGBColor(128, 128, 128, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); laneColorer.addScheme(scheme); scheme = GUIColorScheme("by permission code", RGBColor(240, 240, 240), "nobody"); @@ -828,7 +850,7 @@ scheme.addColor(RGBColor(153, 0, 0), 2, "geometry points"); scheme.addColor(RGBColor::GREEN, 3, "custom shape"); junctionColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection", RGBColor(128, 128, 128, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(128, 128, 128, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); junctionColorer.addScheme(scheme); scheme = GUIColorScheme("by type", RGBColor::GREEN, "traffic_light", true); @@ -841,7 +863,7 @@ scheme.addColor(RGBColor::MAGENTA, 7, "unregulated"); scheme.addColor(RGBColor::BLACK, 8, "dead_end"); scheme.addColor(RGBColor::ORANGE, 9, "rail_signal"); - scheme.addColor(RGBColor(192, 128, 64), 10, "zipper"); + scheme.addColor(RGBColor(172, 108, 44), 10, "zipper"); // brown, darker than the zipper link rule scheme.addColor(RGBColor(192, 255, 192), 11, "traffic_light_right_on_red"); scheme.addColor(RGBColor(128, 0, 128), 12, "rail_crossing"); // dark purple junctionColorer.addScheme(scheme); @@ -856,14 +878,14 @@ /// add POI coloring schemes poiColorer.addScheme(GUIColorScheme("given POI color", RGBColor::RED, "", true)); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); poiColorer.addScheme(scheme); poiColorer.addScheme(GUIColorScheme("uniform", RGBColor::RED, "", true)); /// add polygon coloring schemes polyColorer.addScheme(GUIColorScheme("given polygon color", RGBColor::ORANGE, "", true)); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true, 0, COL_SCHEME_MISC); scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); polyColorer.addScheme(scheme); polyColorer.addScheme(GUIColorScheme("uniform", RGBColor::ORANGE, "", true)); @@ -922,6 +944,7 @@ dev.writeAttr(SUMO_ATTR_NAME, name); dev.openTag(SUMO_TAG_VIEWSETTINGS_OPENGL); dev.writeAttr("dither", dither); + dev.writeAttr("fps", fps); dev.closeTag(); dev.openTag(SUMO_TAG_VIEWSETTINGS_BACKGROUND); dev.writeAttr("backgroundColor", backgroundColor); @@ -946,6 +969,7 @@ dev.writeAttr("spreadSuperposed", spreadSuperposed); dev.writeAttr("edgeParam", edgeParam); dev.writeAttr("laneParam", laneParam); + dev.writeAttr("edgeData", edgeData); dev.lf(); dev << " "; edgeName.print(dev, "edgeName"); @@ -1021,6 +1045,9 @@ internalJunctionName.print(dev, "internalJunctionName"); dev.lf(); dev << " "; + tlsPhaseIndex.print(dev, "tlsPhaseIndex"); + dev.lf(); + dev << " "; dev.writeAttr("showLane2Lane", showLane2Lane); dev.writeAttr("drawShape", drawJunctionShape); dev.writeAttr("drawCrossingsAndWalkingareas", drawCrossingsAndWalkingareas); @@ -1062,6 +1089,9 @@ if (dither != v2.dither) { return false; } + if (fps != v2.fps) { + return false; + } if (backgroundColor != v2.backgroundColor) { return false; } @@ -1156,6 +1186,9 @@ if (laneParam != v2.laneParam) { return false; } + if (edgeData != v2.edgeData) { + return false; + } if (!(vehicleColorer == v2.vehicleColorer)) { return false; } @@ -1231,6 +1264,9 @@ if (internalJunctionName != v2.internalJunctionName) { return false; } + if (tlsPhaseIndex != v2.tlsPhaseIndex) { + return false; + } if (showLane2Lane != v2.showLane2Lane) { return false; @@ -1289,9 +1325,9 @@ double GUIVisualizationSizeSettings::getExaggeration(const GUIVisualizationSettings& s, const GUIGlObject* o, double factor) const { /// @note should look normal-sized at zoom 1000 - return (constantSize && !s.drawForSelecting && (!constantSizeSelected || o == nullptr || gSelected.isSelected(o))) - ? MAX2((double)exaggeration, exaggeration * factor / s.scale) - : (!constantSizeSelected || o == nullptr || gSelected.isSelected(o) ? exaggeration : 1); + return (constantSize && (!constantSizeSelected || o == nullptr || gSelected.isSelected(o))) + ? MAX2((double)exaggeration, exaggeration * factor / s.scale) + : (!constantSizeSelected || o == nullptr || gSelected.isSelected(o) ? exaggeration : 1); } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.h sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.h --- sumo-1.1.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/GUIVisualizationSettings.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -49,7 +49,7 @@ // cannot declare this as inner class because it needs to be used in forward // declaration (@todo fix inclusion order by removing references to guisim!) struct GUIVisualizationTextSettings { - GUIVisualizationTextSettings(bool _show, double _size, RGBColor _color, RGBColor _bgColor = RGBColor(128,0,0,0), bool _constSize = true) : + GUIVisualizationTextSettings(bool _show, double _size, RGBColor _color, RGBColor _bgColor = RGBColor(128, 0, 0, 0), bool _constSize = true) : show(_show), size(_size), color(_color), bgColor(_bgColor), constSize(_constSize) {} bool show; @@ -140,6 +140,9 @@ /// @brief Information whether dithering shall be enabled bool dither; + /// @brief Information whether frames-per-second should be drawn + bool fps; + /// @name Background visualization settings //@{ @@ -194,6 +197,9 @@ /// @brief key for coloring by edge parameter std::string edgeParam; std::string laneParam; + + /// @brief key for coloring by edgeData + std::string edgeData; //@} @@ -255,7 +261,7 @@ /// @brief The junction colorer GUIColorer junctionColorer; // Setting bundles for optional drawing junction names and indices - GUIVisualizationTextSettings drawLinkTLIndex, drawLinkJunctionIndex, junctionName, internalJunctionName; + GUIVisualizationTextSettings drawLinkTLIndex, drawLinkJunctionIndex, junctionName, internalJunctionName, tlsPhaseIndex; /// @brief Information whether lane-to-lane arrows shall be drawn bool showLane2Lane; /// @brief whether the shape of the junction should be drawn @@ -403,8 +409,12 @@ /// @brief color for Exits static const RGBColor SUMO_color_E3Exit; + /// @brief color for Stops + static const RGBColor SUMO_color_stops; + static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL; static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL; + static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL; /// @brief return an angle that is suitable for reading text aligned with the given angle (degrees) double getTextAngle(double objectAngle) const; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/settings/Makefile.in sumo-1.2.0+dfsg1/src/utils/gui/settings/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/gui/settings/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/settings/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,637 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/settings -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguiutilssettings.a -libguiutilssettings_a_SOURCES = GUICompleteSchemeStorage.cpp GUICompleteSchemeStorage.h \ -GUIPropertyScheme.h GUIPropertySchemeStorage.h \ -GUISettingsHandler.cpp GUISettingsHandler.h \ -GUIVisualizationSettings.cpp GUIVisualizationSettings.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) --foreign src/utils/gui/settings/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/settings/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUICompleteSchemeStorage.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUISettingsHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIVisualizationSettings.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/shortcuts/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,8 @@ +set(utils_gui_shortcuts_STAT_SRCS + GUIShortcutsSubSys.cpp + GUIShortcutsSubSys.h + GUIShortcuts.h +) + +add_library(utils_gui_shortcuts STATIC ${utils_gui_shortcuts_STAT_SRCS}) +set_property(TARGET utils_gui_shortcuts PROPERTY PROJECT_LABEL "z_utils_gui_shortcuts") diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/GUIShortcuts.h sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/GUIShortcuts.h --- sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/GUIShortcuts.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/GUIShortcuts.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,117 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GUIShortcuts.h +/// @author Pablo Alvarez Lopez +/// @date Feb 2019 +/// @version $Id$ +/// +// An enumeration of shortcuts used by the gui applications +/****************************************************************************/ +#ifndef GUIShortcuts_h +#define GUIShortcuts_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + + +// =========================================================================== +// enumerations +// =========================================================================== +/** + * @enum GUIShortcut + * @brief An enumeration of Shortcuts used by the gui applications + */ +enum GUIShortcut { + KEY_a, + KEY_b, + KEY_c, + KEY_d, + KEY_e, + KEY_f, + KEY_g, + KEY_h, + KEY_i, + KEY_j, + KEY_k, + KEY_l, + KEY_m, + KEY_n, + KEY_o, + KEY_p, + KEY_q, + KEY_r, + KEY_s, + KEY_t, + KEY_u, + KEY_v, + KEY_w, + KEY_x, + KEY_y, + KEY_z, + + KEY_A, + KEY_B, + KEY_C, + KEY_D, + KEY_E, + KEY_F, + KEY_G, + KEY_H, + KEY_I, + KEY_J, + KEY_K, + KEY_L, + KEY_M, + KEY_N, + KEY_O, + KEY_P, + KEY_Q, + KEY_R, + KEY_S, + KEY_T, + KEY_U, + KEY_V, + KEY_W, + KEY_X, + KEY_Y, + KEY_Z, + + KEY_F1, + KEY_F2, + KEY_F3, + KEY_F4, + KEY_F5, + KEY_F6, + KEY_F7, + KEY_F8, + KEY_F9, + KEY_F10, + KEY_F11, + KEY_F12, + + KEY_ESC, + KEY_ENTER, + KEY_DEL, +}; + + +enum GUIShortcutModifier { + KEYMODIFIER_SHIFT, + KEYMODIFIER_ALT, + KEYMODIFIER_CONTROL +}; + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.cpp sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,319 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GUIShortcutsSubSys.cpp +/// @author Pablo Alvarez Lopez +/// @date Feb 2019 +/// @version $Id$ +/// +// Helper for Shortcuts +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include + +#include "GUIShortcutsSubSys.h" + +// =========================================================================== +// member definitions +// =========================================================================== + + +void +GUIShortcutsSubSys::buildSUMOAccelerators(GUIApplicationWindow* GUIApp) { + + // initialize Ctrl hotkeys with Caps Lock enabled using decimal code (to avoid problems in Linux) + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_a, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_A, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_b, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_B_EDITBREAKPOINT)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_B, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_B_EDITBREAKPOINT)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_d, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_D, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_f, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_F_FULSCREENMODE)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_F, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_F_FULSCREENMODE)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_g, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_G, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_n, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_OPEN_NETWORK)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_N, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_OPEN_NETWORK)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_o, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_OPEN_CONFIG)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_O, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_OPEN_CONFIG)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_p, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_P)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_P, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_P)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_q, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_Q, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_r, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_R_RELOAD)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_R, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_R_RELOAD)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_s, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_S, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_w, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_W, KEYMODIFIER_CONTROL), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION)); + + // Shift Keys + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_j, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEJUNCTION)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_J, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEJUNCTION)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_e, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEEDGE)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_E, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEEDGE)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_t, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATETLS)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_T, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATETLS)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_a, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEADD)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_A, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEADD)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_o, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEPOI)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_O, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEPOI)); + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_l, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEPOLY)); + GUIApp->getAccelTable()->addAccel(parseKey(KEY_L, KEYMODIFIER_SHIFT), GUIApp, FXSEL(SEL_COMMAND, MID_LOCATEPOLY)); + + // Alt Keys + + GUIApp->getAccelTable()->addAccel(parseKey(KEY_F4, KEYMODIFIER_ALT), GUIApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE)); +} + + +void +GUIShortcutsSubSys::buildNETEDITAccelerators(GNEApplicationWindow* GNEApp) { + + // initialize single hotkeys using upper and lower Keys (to avoid problems in Linux) + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_a), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_A), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_A_ADDITIONALMODE_STOPMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_c), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_C_CONNECTMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_C), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_C_CONNECTMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_d), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_D_DELETEMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_D), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_D_DELETEMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_e), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_E_EDGEMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_E), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_E_EDGEMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_i), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_I_INSPECTMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_I), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_I_INSPECTMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_m), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_M_MOVEMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_M), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_M_MOVEMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_p), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_P_POLYGONMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_P), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_P_POLYGONMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_r), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_R), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_s), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_S_SELECTMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_S), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_S_SELECTMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_t), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_T_TLSMODE_VTYPEMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_T), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_T_TLSMODE_VTYPEMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_v), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_V_VEHICLEMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_V), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_V_VEHICLEMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_w), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_W_PROHIBITIONMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_W), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_W_PROHIBITIONMODE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_z), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_Z_TAZMODE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_Z), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_Z_TAZMODE)); + + // Control Keys + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_a, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_A, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_d, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_D, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_g, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_G, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_n, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_N_NEWNETWORK)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_N, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_N_NEWNETWORK)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_o, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_OPEN_NETWORK)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_O, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_OPEN_NETWORK)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_r, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_R_RELOAD)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_R, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_R_RELOAD)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_s, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_S, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_l, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_L_SAVEASPLAINXML)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_L, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_L_SAVEASPLAINXML)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_j, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_J_SAVEJOINEDJUNCTIONS)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_J, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_J_SAVEJOINEDJUNCTIONS)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_k, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_OPEN_TLSPROGRAMS)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_K, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_OPEN_TLSPROGRAMS)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_w, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_W, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_q, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_Q, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_z, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Z_UNDO)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_Z, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Z_UNDO)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_y, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Y_REDO)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_Y, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Y_REDO)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_v, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_EDITVIEWSCHEME)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_V, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_EDITVIEWSCHEME)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_i, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_EDITVIEWPORT)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_I, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_EDITVIEWPORT)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_t, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_T_OPENSUMONETEDIT)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_T, KEYMODIFIER_CONTROL), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_T_OPENSUMONETEDIT)); + + // Shift Keys + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_j, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEJUNCTION)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_J, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEJUNCTION)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_e, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEEDGE)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_E, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEEDGE)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_t, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATETLS)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_T, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATETLS)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_a, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEADD)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_A, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEADD)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_o, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEPOI)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_O, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEPOI)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_l, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEPOLY)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_L, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_LOCATEPOLY)); + + // Control + Shift Keys + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_o, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_OPEN_CONFIG)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_O, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_OPEN_CONFIG)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_a, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_A, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_d, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMAND)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_D, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMAND)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_s, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_S_SAVENETWORKAS)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_S, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_S_SAVENETWORKAS)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_k, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_CTRL_SHIFT_K)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_K, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_CTRL_SHIFT_K)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_c, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_C_SHOWCONNECTIONS)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_C, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_C_SHOWCONNECTIONS)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_h, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_H_TOOGLEELEVATION)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_H, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_H_TOOGLEELEVATION)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_i, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_I_SELECTEDGES)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_I, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_I_SELECTEDGES)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_j, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_J_TOOGLECHAIN)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_J, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_J_TOOGLECHAIN)); + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_k, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_K_TOOGLETWOWAY)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_K, KEYMODIFIER_CONTROL, KEYMODIFIER_SHIFT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_SHIFT_K_TOOGLETWOWAY)); + + // Alt Keys + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_F4, KEYMODIFIER_ALT), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_Q_CLOSE)); + + // initialize Function Hotkeys + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_F3), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_F3_SUPERMODE_NETWORK)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_F4), GNEApp, FXSEL(SEL_COMMAND, MID_HOTKEY_F4_SUPERMODE_DEMAND)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_F12), GNEApp, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_F12)); + + // initialize rest of hotkeys + + GNEApp->getAccelTable()->addAccel(parseKey(KEY_ESC), GNEApp, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_ESC)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_DEL), GNEApp, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_DEL)); + GNEApp->getAccelTable()->addAccel(parseKey(KEY_ENTER), GNEApp, FXSEL(SEL_COMMAND, MID_GNE_HOTKEY_ENTER)); +} + + +int +GUIShortcutsSubSys::parseKey(GUIShortcut key) { + if ((key >= KEY_a) && key <= KEY_z) { + return (key + 97);// 97 is 'a' in ASCII + } else if ((key >= KEY_A) && key <= KEY_Z) { + return (key - 26 + 65);// 65 is 'A' in ASCII + } else if ((key >= KEY_F1) && key <= KEY_F12) { + return (key - 52 + 65470);// 65470 is 'F1' in ASCII + } else if (key == KEY_ESC) { + return parseAccel("Esc"); + } else if (key == KEY_ENTER) { + return parseAccel("Enter"); + } else if (key == KEY_DEL) { + return parseAccel("Del"); + } else { + return 0; + } +} + + +int +GUIShortcutsSubSys::parseKey(GUIShortcut key, GUIShortcutModifier firstModifier) { + int keyCode = parseKey(key); + // add first modifier + if (firstModifier == KEYMODIFIER_SHIFT) { + keyCode += 65536; + } else if (firstModifier == KEYMODIFIER_ALT) { + keyCode += 524288; + } else if (firstModifier == KEYMODIFIER_CONTROL) { + keyCode += 262144; + } + return keyCode; +} + + +int +GUIShortcutsSubSys::parseKey(GUIShortcut key, GUIShortcutModifier firstModifier, GUIShortcutModifier secondModifier) { + int keyCode = parseKey(key, firstModifier); + // add second modifier + if (secondModifier == KEYMODIFIER_SHIFT) { + keyCode += 65536; + } else if (secondModifier == KEYMODIFIER_ALT) { + keyCode += 524288; + } else if (secondModifier == KEYMODIFIER_CONTROL) { + keyCode += 262144; + } + return keyCode; +} + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.h sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.h --- sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/GUIShortcutsSubSys.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,61 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GUIShortcutsSubSys.h +/// @author Pablo Alvarez Lopez +/// @date Feb 2019 +/// @version $Id$ +/// +// Helper for Shortcuts +/****************************************************************************/ +#ifndef GUIShortcutsSubSys_h +#define GUIShortcutsSubSys_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include "GUIShortcuts.h" + +// =========================================================================== +// class declaration +// ========================================================================== +class GNEApplicationWindow; +class GUIApplicationWindow; + +// =========================================================================== +// class definitions +// =========================================================================== +class GUIShortcutsSubSys { +public: + /// @brief build SUMO Accelerators + static void buildSUMOAccelerators(GUIApplicationWindow* GUIApp); + + /// @brief build NETEDIT Accelerators + static void buildNETEDITAccelerators(GNEApplicationWindow* GNEApp); + +private: + // @brief parse GUIShortcut to int + static int parseKey(GUIShortcut key); + + // @brief parse GUIShortcut to int with a modifier + static int parseKey(GUIShortcut key, GUIShortcutModifier firstModifier); + + // @brief parse GUIShortcut to int with two modifiers + static int parseKey(GUIShortcut key, GUIShortcutModifier firstModifier, GUIShortcutModifier secondModifier); +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/Makefile.am sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/gui/shortcuts/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/shortcuts/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,4 @@ +noinst_LIBRARIES = libguiutilsshortcuts.a + +libguiutilsshortcuts_a_SOURCES = GUIShortcutsSubSys.cpp GUIShortcutsSubSys.h \ +GUIShortcuts.h diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.cpp sumo-1.2.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -77,11 +77,11 @@ GUIParameterTracker::~GUIParameterTracker() { myApplication->removeChild(this); for (std::vector::iterator i1 = myTracked.begin(); i1 != myTracked.end(); i1++) { - delete(*i1); + delete (*i1); } // deleted by GUINet for (std::vector*>::iterator i2 = myValuePassers.begin(); i2 != myValuePassers.end(); i2++) { - delete(*i2); + delete (*i2); } delete myToolBarDrag; delete myToolBar; @@ -97,7 +97,7 @@ void GUIParameterTracker::buildToolBar() { - myToolBarDrag = new FXToolBarShell(this, GUIDesignToolBarShell3); + myToolBarDrag = new FXToolBarShell(this, GUIDesignToolBar); myToolBar = new FXToolBar(this, myToolBarDrag, LAYOUT_SIDE_TOP | LAYOUT_FILL_X | FRAME_RAISED); new FXToolBarGrip(myToolBar, myToolBar, FXToolBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip); // save button diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.h sumo-1.2.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.h --- sumo-1.1.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/tracker/GUIParameterTracker.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/tracker/Makefile.in sumo-1.2.0+dfsg1/src/utils/gui/tracker/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/gui/tracker/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/tracker/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,634 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/tracker -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguiutilstracker.a -libguiutilstracker_a_SOURCES = \ -GUIParameterTracker.cpp GUIParameterTracker.h \ -TrackerValueDesc.cpp TrackerValueDesc.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) --foreign src/utils/gui/tracker/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/tracker/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIParameterTracker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TrackerValueDesc.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.cpp sumo-1.2.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -61,7 +61,7 @@ myMin = value < myMin ? value : myMin; myMax = value > myMax ? value : myMax; } - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); myValues.push_back(value); if (value != myInvalidValue) { myTmpLastAggValue += value; @@ -137,7 +137,7 @@ void TrackerValueDesc::setAggregationSpan(SUMOTime as) { - AbstractMutex::ScopedLocker locker(myLock); + FXMutexLock locker(myLock); if (myAggregationInterval != as / DELTA_T) { myAggregationInterval = (int)(as / DELTA_T); // ok, the aggregation has changed, diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.h sumo-1.2.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.h --- sumo-1.1.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/tracker/TrackerValueDesc.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -115,7 +114,7 @@ double myMin, myMax; // Mutex to avoid parallel drawing and insertion of new items - MFXMutex myLock; + FXMutex myLock; /// The aggregation interval in simulation steps int myAggregationInterval; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIAppEnum.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIAppEnum.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIAppEnum.h 2018-11-15 23:00:46.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIAppEnum.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,13 +39,131 @@ /// @brief Show about - dialog ID_ABOUT = FXMainWindow::ID_LAST, + + /// @name hotkeys + /// @{ + /// @brief hotkey for mode editing additionals AND stops + MID_HOTKEY_A_ADDITIONALMODE_STOPMODE, + /// @brief hotkey for mode connecting lanes + MID_HOTKEY_C_CONNECTMODE, + /// @brief hotkey for mode deleting things + MID_HOTKEY_D_DELETEMODE, + /// @brief hotkey for mode adding edges + MID_HOTKEY_E_EDGEMODE, + /// @brief hotkey for mode inspecting object attributes + MID_HOTKEY_I_INSPECTMODE, + /// @brief hotkey for mode moving element + MID_HOTKEY_M_MOVEMODE, + /// @brief hotkey for mode creating polygons + MID_HOTKEY_P_POLYGONMODE, + /// @brief hotkey for mode selecting objects + MID_HOTKEY_S_SELECTMODE, + /// @brief hotkey for mode editing crossing AND routes + MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE, + /// @brief hotkey for mode editing TLS AND Vehicle Types + MID_HOTKEY_T_TLSMODE_VTYPEMODE, + /// @brief hotkey for mode create vehicles + MID_HOTKEY_V_VEHICLEMODE, + /// @brief hotkey for mode editing connection prohibitions + MID_HOTKEY_W_PROHIBITIONMODE, + /// @brief hotkey for mode editing TAZ + MID_HOTKEY_Z_TAZMODE, + + /// @} + + /// @name Ctrl - hotkeys + /// @{ + /// @brief Start the simulation in SUMO and open Additionals Elemements in NETEDIT + MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS, + /// @brief Edit simulation breakpoints + MID_HOTKEY_CTRL_B_EDITBREAKPOINT, + /// @brief Perform a single simulation step in SUMO and open Demand Elements in NETEDIT + MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMAND, + /// @brief Toogle Gaming mode in SUMO and grid in NETEDIT + MID_HOTKEY_CTRL_G_GAMINGMODE_TOOGLEGRID, + /// @brief Fullscreen mode - menu entry + MID_HOTKEY_CTRL_F_FULSCREENMODE, + /// @brief save joined junctions + MID_HOTKEY_CTRL_J_SAVEJOINEDJUNCTIONS, + /// @brief save network as plain XML + MID_HOTKEY_CTRL_L_SAVEASPLAINXML, + /// @brief create new empty newtork + MID_HOTKEY_CTRL_N_NEWNETWORK, + /// @brief Main window closes + MID_HOTKEY_CTRL_Q_CLOSE, + /// @brief Stop the simulation in SUMO and save network in NETEDIT + MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK, + /// @brief Reload the previously loaded simulation + MID_HOTKEY_CTRL_R_RELOAD, + /// @brief Open current network in SUMO or in NETEDIT + MID_HOTKEY_CTRL_T_OPENSUMONETEDIT, + /// @brief Close simulation - ID + MID_HOTKEY_CTRL_W_CLOSESIMULATION, + /// @brief Undo + MID_HOTKEY_CTRL_Y_REDO, + /// @brief Redo + MID_HOTKEY_CTRL_Z_UNDO, + /// @brief Toogle show connections in Netedit + MID_HOTKEY_CTRL_SHIFT_C_SHOWCONNECTIONS, + /// @brief Toogle move elevation + MID_HOTKEY_CTRL_SHIFT_H_TOOGLEELEVATION, + /// @brief Toogle select edges in Netedit + MID_HOTKEY_CTRL_SHIFT_I_SELECTEDGES, + /// @brief Toogle chaing edges + MID_HOTKEY_CTRL_SHIFT_J_TOOGLECHAIN, + /// @brief Toogle two way + MID_HOTKEY_CTRL_SHIFT_K_TOOGLETWOWAY, + + /// @} + + /// @name Other hotkeys + /// @{ + + /// @brief Save Additional Elements + MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS, + /// @brief Save Demand Elements + MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMAND, + /// @brief save newtwork as + MID_HOTKEY_CTRL_SHIFT_S_SAVENETWORKAS, + /// @brief compute junctions + MID_HOTKEY_F5_RECOMPUTE, + /// @brief compute junctions with volatile options + MID_HOTKEY_SHIFT_F5_RECOMPUTEVOLATILE, + /// @brief hot key open online documentation + MID_HOTKEY_F1_ONLINEDOCUMENTATION, + /// @brief hot key open about dialog + MID_HOTKEY_F2_ABOUT, + /// @brief hot key set network mode in NETEDIT + MID_HOTKEY_F3_SUPERMODE_NETWORK, + /// @brief hot key set demand mode in NETEDIT + MID_HOTKEY_F4_SUPERMODE_DEMAND, + /// @brief hot key abort current edit operation + MID_GNE_HOTKEY_ESC, + /// @brief hot key focus upper element of current frame + MID_GNE_HOTKEY_F12, + /// @brief hot key delete selections or elements + MID_GNE_HOTKEY_DEL, + /// @brief hot key accept current operation + MID_GNE_HOTKEY_ENTER, + /// @brief save TLS Programs + MID_GNE_HOTKEY_CTRL_SHIFT_K, + /// @brief clean junctions without edges + MID_GNE_HOTKEY_F6, + /// @brief join selected junctions + MID_GNE_HOTKEY_F7, + /// @brief clean invalid crossings + MID_GNE_HOTKEY_F8, + /// @brief open options menu + MID_GNE_HOTKEY_F10, + + /// @} + /// @name application specific /// @{ /// @brief Main window-ID MID_WINDOW, - /// @brief Main window closes - MID_QUIT, + /// @} @@ -67,31 +185,18 @@ /// @brief Open network - ID MID_OPEN_NETWORK, /// @brief Load additional file with poi and polygons - MID_OPEN_SHAPES, - /// @brief Load additional file with additional elements - MID_OPEN_ADDITIONALS, + MID_HOTKEY_CTRL_P, + /// @brief Load edge data for visualization + MID_OPEN_EDGEDATA, /// @brief Load additional file with additional elements MID_OPEN_TLSPROGRAMS, - /// @brief Reload the previously loaded simulation - MID_RELOAD, /// @brief Loads a file previously loaded MID_RECENTFILE, - /// @brief Close simulation - ID - MID_CLOSE, - /// @brief About SUMO - ID - MID_ABOUT, /// @} /// @name Main Window Simulation Control - IDs /// @{ - - /// @brief Start the simulation - MID_START, - /// @brief Stop the simulation - MID_STOP, - /// @brief Perform a single simulation step - MID_STEP, /// @brief Save state to file MID_SIMSAVE, /// @} @@ -124,12 +229,8 @@ /// @brief Open editor for selections MID_EDITCHOSEN, - /// @brief Edit simulation breakpoints - MID_EDIT_BREAKPOINTS, /// @brief Open in netedit MID_NETEDIT, - /// @brief Open in SUMO GUI - MID_SUMOGUI, /// @} @@ -138,10 +239,6 @@ /// @brief Application settings - menu entry MID_APPSETTINGS, - /// @brief Gaming mode - menu entry - MID_GAMING, - /// @brief Fullscreen mode - menu entry - MID_FULLSCREEN, /// @brief Locator configuration - menu entry MID_LISTINTERNAL, MID_LISTPARKING, @@ -160,6 +257,8 @@ /// @brief Show person statistics MID_SHOWPERSONSTATS, + /// @brief update traci status + MID_TRACI_STATUS, /// @name Common View Settings - IDs /// @{ @@ -262,6 +361,10 @@ MID_SHOW_CURRENTROUTE, /// @brief Hide vehicle's current route MID_HIDE_CURRENTROUTE, + /// @brief Show vehicle's future route + MID_SHOW_FUTUREROUTE, + /// @brief Hide vehicle's future route + MID_HIDE_FUTUREROUTE, /// @brief Show vehicle's best lanes MID_SHOW_BEST_LANES, /// @brief Hide vehicle's best lanes @@ -328,6 +431,8 @@ /// @brief Center object MID_CHOOSER_CENTER, + /// @brief Track object + MID_CHOOSER_TRACK, /// @brief Text entry MID_CHOOSER_TEXT, /// @brief Object list @@ -356,6 +461,8 @@ MID_CHOOSEN_DESELECT, /// @brief Deselect selected items MID_CHOOSEN_INVERT, + /// @brief Deselect selected items + MID_CHOOSEN_NAME, /// @} /// NETEDIT @@ -368,10 +475,6 @@ MID_GNE_DELETEFRAME_INSPECT, /// @brief In GNEDeleteFrame, delete element MID_GNE_DELETEFRAME_DELETE, - /// @brief delete only geometry points - MID_GNE_DELETEFRAME_ONLYGEOMETRYPOINTS, - /// @brief automatically delete additional childs - MID_GNE_DELETEFRAME_AUTODELETEADDITIONALS, /// @} @@ -407,98 +510,17 @@ MID_ADD_REROUTER, /// @} - - /// @name NETEDIT hotkeys - /// @{ - - /// @brief hot key abort current edit operation - MID_GNE_HOTKEY_ESC, - /// @brief hot key focus upper element of current frame - MID_GNE_HOTKEY_FOCUSFRAME, - /// @brief hot key delete selections or elements - MID_GNE_HOTKEY_DEL, - /// @brief hot key accept current operation - MID_GNE_HOTKEY_ENTER, - /// @brief hot key for toogle grid - MID_GNE_HOTKEY_TOOGLE_GRID, - /// @} - - /// @name Toolbar file messages /// @{ - /// @brief create new empty newtork - MID_GNE_TOOLBARFILE_NEWNETWORK, /// @brief open foreign network MID_GNE_TOOLBARFILE_OPENFOREIGN, - /// @brief save newtork - MID_GNE_TOOLBARFILE_SAVENETWORK, - /// @brief save newtwork as - MID_GNE_TOOLBARFILE_SAVENETWORK_AS, - /// @brief save network as plain XML - MID_GNE_TOOLBARFILE_SAVEPLAINXML, - /// @brief save joined junctions - MID_GNE_TOOLBARFILE_SAVEJOINED, - /// @brief Save shapes - MID_GNE_TOOLBARFILE_SAVESHAPES, - /// @brief save shapes as - MID_GNE_TOOLBARFILE_SAVESHAPES_AS, - /// @brief Save additionals - MID_GNE_TOOLBARFILE_SAVEADDITIONALS, /// @brief save additionals as MID_GNE_TOOLBARFILE_SAVEADDITIONALS_AS, - /// @brief save TLS Programs - MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS, /// @brief save TLS Programs as MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS, - /// @} - - - /// @name Toolbar processing messages - /// @{ - - /// @brief compute junctions - MID_GNE_PROCESSING_COMPUTEJUNCTIONS, - /// @brief compute junctions with volatile options - MID_GNE_PROCESSING_COMPUTEJUNCTIONS_VOLATILE, - /// @brief clean junctions without edges - MID_GNE_PROCESSING_CLEANJUNCTIONS, - /// @brief join selected junctions - MID_GNE_PROCESSING_JOINJUNCTIONS, - /// @brief clean invalid crossings - MID_GNE_PROCESSING_CLEANINVALIDCROSSINGS, - /// @brief open options menu - MID_GNE_PROCESSING_OPTIONS, - /// @} - - - /// @name Toolbar setModes messages - /// @{ - - /// @brief mode for adding edges - MID_GNE_SETMODE_CREATE_EDGE, - /// @brief mode for moving things - MID_GNE_SETMODE_MOVE, - /// @brief mode for deleting things - MID_GNE_SETMODE_DELETE, - /// @brief mode for inspecting object attributes - MID_GNE_SETMODE_INSPECT, - /// @brief mode for selecting objects - MID_GNE_SETMODE_SELECT, - /// @brief mode for connecting lanes - MID_GNE_SETMODE_CONNECT, - /// @brief mode for editing tls - MID_GNE_SETMODE_TLS, - /// @brief mode for editing additional - MID_GNE_SETMODE_ADDITIONAL, - /// @brief mode for editing crossing - MID_GNE_SETMODE_CROSSING, - /// @brief mode for editing TAZ - MID_GNE_SETMODE_TAZ, - /// @brief mode for creating polygons - MID_GNE_SETMODE_POLYGON, - /// @brief mode for editing connection prohibitions - MID_GNE_SETMODE_PROHIBITION, + /// @brief save demand elements as + MID_GNE_TOOLBARFILE_SAVEDEMAND_AS, /// @} @@ -513,6 +535,8 @@ /// @name GNEViewNet messages /// @{ + /// @brief show demand elements + MID_GNE_VIEWNET_SHOW_DEMAND_ELEMENTS, /// @brief show connections MID_GNE_VIEWNET_SHOW_CONNECTIONS, /// @brief select edges @@ -545,12 +569,14 @@ MID_GNE_SET_ATTRIBUTE_BOOL, /// @brief attribute edited trought dialog MID_GNE_SET_ATTRIBUTE_DIALOG, + /// @brief attribute selected using a radio button + MID_GNE_SET_ATTRIBUTE_RADIOBUTTON, /// @brief select items MID_GNE_SELECT, /// @} - /// @name GNESeletorFrame messages + /// @name GNESelectorFrame messages /// @{ /// @brief select tag in selector frame @@ -603,6 +629,10 @@ MID_GNE_INSPECTORFRAME_NEXT, /// @brief inspect previous element MID_GNE_INSPECTORFRAME_PREVIOUS, + /// @brief show list of overlapped elements + MID_GNE_INSPECTORFRAME_SHOWLIST, + /// @brief list item selected + MID_GNE_INSPECTORFRAME_ITEMSELECTED, /// @} @@ -648,6 +678,19 @@ /// @} + /// @name GNETLSEditorFrame messages + /// @{ + /// @brief create vehicle types + MID_GNE_VEHICLETYPEFRAME_CREATE, + /// @brief delete a vehicle type + MID_GNE_VEHICLETYPEFRAME_DELETE, + /// @brief reset a default vehicle type + MID_GNE_VEHICLETYPEFRAME_RESET, + /// @brief copy a vehicle type + MID_GNE_VEHICLETYPEFRAME_COPY, + /// @} + + /// @name GNECrossingFrame messages /// @{ @@ -693,6 +736,18 @@ /// @} + /// @name GNEVehicleFrame messages + /// @{ + + /// @brief abort route creation + MID_GNE_VEHICLEFRAME_ABORT, + /// @brief finish route creation + MID_GNE_VEHICLEFRAME_FINISHCREATION, + /// @brief remove last inserted edge + MID_GNE_VEHICLEFRAME_REMOVELASTEDGE, + /// @} + + /// @name GNEEdge messages /// @{ @@ -730,6 +785,8 @@ MID_GNE_JUNCTION_REPLACE, /// @brief turn junction into multiple junctions MID_GNE_JUNCTION_SPLIT, + /// @brief turn junction into multiple junctions and reconnect them heuristically + MID_GNE_JUNCTION_SPLIT_RECONNECT, /// @brief edit junction shape MID_GNE_JUNCTION_EDIT_SHAPE, /// @brief reset junction shape diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_EditViewport.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -43,12 +43,14 @@ // =========================================================================== FXDEFMAP(GUIDialog_GLObjChooser) GUIDialog_GLObjChooserMap[] = { FXMAPFUNC(SEL_COMMAND, MID_CHOOSER_CENTER, GUIDialog_GLObjChooser::onCmdCenter), + FXMAPFUNC(SEL_COMMAND, MID_CHOOSER_TRACK, GUIDialog_GLObjChooser::onCmdTrack), FXMAPFUNC(SEL_COMMAND, MID_CANCEL, GUIDialog_GLObjChooser::onCmdClose), FXMAPFUNC(SEL_CHANGED, MID_CHOOSER_TEXT, GUIDialog_GLObjChooser::onChgText), FXMAPFUNC(SEL_COMMAND, MID_CHOOSER_TEXT, GUIDialog_GLObjChooser::onCmdText), FXMAPFUNC(SEL_KEYPRESS, MID_CHOOSER_LIST, GUIDialog_GLObjChooser::onListKeyPress), FXMAPFUNC(SEL_COMMAND, MID_CHOOSER_FILTER, GUIDialog_GLObjChooser::onCmdFilter), FXMAPFUNC(SEL_COMMAND, MID_CHOOSEN_INVERT, GUIDialog_GLObjChooser::onCmdToggleSelection), + FXMAPFUNC(SEL_COMMAND, MID_CHOOSEN_NAME, GUIDialog_GLObjChooser::onCmdLocateByName), }; FXIMPLEMENT(GUIDialog_GLObjChooser, FXMainWindow, GUIDialog_GLObjChooserMap, ARRAYNUMBER(GUIDialog_GLObjChooserMap)) @@ -59,7 +61,8 @@ // =========================================================================== GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(GUIGlChildWindow* parent, FXIcon* icon, const FXString& title, const std::vector& ids, GUIGlObjectStorage& /*glStorage*/) : FXMainWindow(parent->getApp(), title, icon, nullptr, GUIDesignChooserDialog), - myParent(parent) { + myParent(parent), + myLocateByName(false) { FXHorizontalFrame* hbox = new FXHorizontalFrame(this, GUIDesignAuxiliarFrame); // build the list FXVerticalFrame* layoutLeft = new FXVerticalFrame(hbox, GUIDesignChooserLayoutLeft); @@ -70,9 +73,16 @@ // build the buttons FXVerticalFrame* layoutRight = new FXVerticalFrame(hbox, GUIDesignChooserLayoutRight); myCenterButton = new FXButton(layoutRight, "Center\t\t", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), this, MID_CHOOSER_CENTER, GUIDesignChooserButtons); + myTrackButton = new FXButton(layoutRight, "Track\t\t", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), this, MID_CHOOSER_TRACK, GUIDesignChooserButtons); + // only enable Track Button if we're locating vehicles + if (title.text() != std::string("Vehicle Chooser")) { + myTrackButton->disable(); + myTrackButton->hide(); + } new FXHorizontalSeparator(layoutRight, GUIDesignHorizontalSeparator); new FXButton(layoutRight, "&Hide Unselected\t\t", GUIIconSubSys::getIcon(ICON_FLAG), this, MID_CHOOSER_FILTER, GUIDesignChooserButtons); new FXButton(layoutRight, "&Select/deselect\tSelect/deselect current object\t", GUIIconSubSys::getIcon(ICON_FLAG), this, MID_CHOOSEN_INVERT, GUIDesignChooserButtons); + new FXButton(layoutRight, "By &Name\tLocate item by name\t", nullptr, this, MID_CHOOSEN_NAME, GUIDesignChooserButtons); new FXHorizontalSeparator(layoutRight, GUIDesignHorizontalSeparator); new FXButton(layoutRight, "&Close\t\t", GUIIconSubSys::getIcon(ICON_NO), this, MID_CANCEL, GUIDesignChooserButtons); @@ -99,7 +109,24 @@ GUIDialog_GLObjChooser::onCmdCenter(FXObject*, FXSelector, void*) { int selected = myList->getCurrentItem(); if (selected >= 0) { + myParent->getView()->stopTrack(); + myParent->setView(*static_cast(myList->getItemData(selected))); + } + return 1; +} + + +long +GUIDialog_GLObjChooser::onCmdTrack(FXObject*, FXSelector, void*) { + int selected = myList->getCurrentItem(); + if (selected >= 0) { myParent->setView(*static_cast(myList->getItemData(selected))); + GUIGlID id = *static_cast(myList->getItemData(selected)); + GUIGlObject* o = GUIGlObjectStorage::gIDStorage.getObjectBlocking(id); + if (o->getType() == GLO_VEHICLE) { + myParent->getView()->startTrack(o->getGlID()); + } + GUIGlObjectStorage::gIDStorage.unblockObject(id); } return 1; } @@ -114,12 +141,26 @@ long GUIDialog_GLObjChooser::onChgText(FXObject*, FXSelector, void*) { - int id = myList->findItem(myTextEntry->getText(), -1, SEARCH_PREFIX); + int id = -1; + if (myLocateByName) { + // findItem does not support substring search + const int numItems = myList->getNumItems(); + FXString t = myTextEntry->getText().lower(); + for (int i = 0; i < numItems; i++) { + if (myList->getItemText(i).lower().find(t) >= 0) { + id = i; + break; + } + } + } else { + id = myList->findItem(myTextEntry->getText(), -1, SEARCH_PREFIX); + } if (id < 0) { if (myList->getNumItems() > 0) { myList->deselectItem(myList->getCurrentItem()); } myCenterButton->disable(); + myTrackButton->disable(); return 1; } myList->deselectItem(myList->getCurrentItem()); @@ -127,6 +168,7 @@ myList->selectItem(id); myList->setCurrentItem(id, true); myCenterButton->enable(); + myTrackButton->enable(); return 1; } @@ -173,7 +215,11 @@ std::string GUIDialog_GLObjChooser::getObjectName(GUIGlObject* o) const { - return o->getMicrosimID(); + if (myLocateByName) { + return o->getOptionalName(); + } else { + return o->getMicrosimID(); + } } void @@ -212,6 +258,31 @@ return 1; } + +long +GUIDialog_GLObjChooser::onCmdLocateByName(FXObject*, FXSelector, void*) { + std::vector > namesAndIDs; + myLocateByName = true; + const int numItems = myList->getNumItems(); + for (int i = 0; i < numItems; i++) { + GUIGlID glID = *static_cast(myList->getItemData(i)); + GUIGlObject* o = GUIGlObjectStorage::gIDStorage.getObjectBlocking(glID); + const std::string& name = getObjectName(o); + if (name != "") { + namesAndIDs.push_back(std::make_pair(name, glID)); + } + GUIGlObjectStorage::gIDStorage.unblockObject(glID); + } + std::sort(namesAndIDs.begin(), namesAndIDs.end()); + std::vector selectedGlIDs; + for (const auto& item : namesAndIDs) { + selectedGlIDs.push_back(item.second); + } + refreshList(selectedGlIDs); + myTextEntry->setFocus(); + return 1; +} + void GUIDialog_GLObjChooser::toggleSelection(int listIndex) { diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.h 2018-10-03 22:01:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_GLObjChooser.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -84,6 +84,9 @@ /// @brief Callback: The selected item shall be centered within the calling view long onCmdCenter(FXObject*, FXSelector, void*); + /// @brief Callback: The selected vehicle shall be tracked within the calling view + long onCmdTrack(FXObject*, FXSelector, void*); + /// @brief Callback: The dialog shall be closed long onCmdClose(FXObject*, FXSelector, void*); @@ -101,6 +104,9 @@ /// @brief Callback: Toggle selection status of current object long onCmdToggleSelection(FXObject*, FXSelector, void*); + + /// @brief Callback: Toggle locator by name + long onCmdLocateByName(FXObject*, FXSelector, void*); /// @} /// @brief sets the focus after the window is created to work-around bug in libfox @@ -124,6 +130,9 @@ /// @brief The button that triggers centering on the select object FXButton* myCenterButton; + /// @brief The button that triggers tracking on the select vehicle + FXButton* myTrackButton; + /// @brief The parent window GUIGlChildWindow* myParent; @@ -137,6 +146,8 @@ //volatile pointers to GUIGlObject std::set myIDs; + /// @brief whether to locate by object name instead of id + bool myLocateByName; protected: /// FOX needs this diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -93,7 +93,7 @@ } // ok-button - new FXButton(contentFrame, "OK\t\tContine with the import.", GUIIconSubSys::getIcon(ICON_ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK); + new FXButton(contentFrame, "OK\t\tAccept settings", GUIIconSubSys::getIcon(ICON_ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK); } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_Options.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,8 +28,9 @@ #include #include #include -#include +#include #include +#include #include #include #include @@ -76,7 +77,7 @@ // =========================================================================== // method definitions // =========================================================================== -GUIDialog_ViewSettings::GUIDialog_ViewSettings(GUISUMOAbstractView* parent, GUIVisualizationSettings* settings, std::vector* decals, MFXMutex* decalsLock) : +GUIDialog_ViewSettings::GUIDialog_ViewSettings(GUISUMOAbstractView* parent, GUIVisualizationSettings* settings, std::vector* decals, FXMutex* decalsLock) : FXDialogBox(parent, "View Settings", GUIDesignViewSettingsMainDialog), myParent(parent), mySettings(settings), myDecals(decals), myDecalsLock(decalsLock), @@ -159,12 +160,12 @@ FXVerticalFrame* frame22 = new FXVerticalFrame(frame2, GUIDesignViewSettingsVerticalFrame6); FXMatrix* m21 = new FXMatrix(frame22, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m21, "Color", nullptr, GUIDesignViewSettingsLabel1); - myLaneEdgeColorMode = new FXComboBox(m21, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myLaneEdgeColorMode = new MFXIconComboBox(m21, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); myLaneColorInterpolation = new FXCheckButton(m21, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); myLaneColorSettingFrame = new FXVerticalFrame(frame22, GUIDesignViewSettingsVerticalFrame4); myLaneColorRainbow = new FXButton(frame22, "Recalibrate Rainbow", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4); - myParamKey = new FXTextField(frame22, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignTextFielWidth100); + myParamKey = new FXComboBox(frame22, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); myParamKey->disable(); new FXHorizontalSeparator(frame2, GUIDesignHorizontalSeparator); @@ -172,7 +173,7 @@ FXVerticalFrame* frame23 = new FXVerticalFrame(frame2, GUIDesignViewSettingsVerticalFrame6); FXMatrix* m23 = new FXMatrix(frame23, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m23, "Scale width", nullptr, GUIDesignViewSettingsLabel1); - myLaneEdgeScaleMode = new FXComboBox(m23, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myLaneEdgeScaleMode = new MFXIconComboBox(m23, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); myLaneScaleInterpolation = new FXCheckButton(m23, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); myLaneScaleSettingFrame = new FXVerticalFrame(frame23, GUIDesignViewSettingsVerticalFrame4); @@ -211,7 +212,7 @@ new FXLabel(m22, " ", nullptr, GUIDesignViewSettingsLabel1); myShowSublanes = new FXCheckButton(m22, "Show sublanes", this, MID_SIMPLE_VIEW_COLORCHANGE); myShowSublanes->setCheck(mySettings->showSublanes); - mySpreadSuperposed = new FXCheckButton(m22, "Spread superposed", this, MID_SIMPLE_VIEW_COLORCHANGE); + mySpreadSuperposed = new FXCheckButton(m22, "Spread bidirectional railway\t\tMake both directional edges for a bidirectional railway visible", this, MID_SIMPLE_VIEW_COLORCHANGE); mySpreadSuperposed->setCheck(mySettings->spreadSuperposed); new FXLabel(m22, "Exaggerate width by", nullptr, GUIDesignViewSettingsLabel1); myLaneWidthUpscaleDialer = new FXRealSpinner(m22, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial2); @@ -236,7 +237,7 @@ FXMatrix* m31 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix3); new FXLabel(m31, "Show As", nullptr, GUIDesignViewSettingsLabel1); - myVehicleShapeDetail = new FXComboBox(m31, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myVehicleShapeDetail = new MFXIconComboBox(m31, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); myVehicleShapeDetail->appendItem("'triangles'"); myVehicleShapeDetail->appendItem("'boxes'"); myVehicleShapeDetail->appendItem("'simple shapes'"); @@ -248,7 +249,7 @@ FXMatrix* m32 = new FXMatrix(frame3, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m32, "Color", nullptr, GUIDesignViewSettingsLabel1); - myVehicleColorMode = new FXComboBox(m32, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myVehicleColorMode = new MFXIconComboBox(m32, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); mySettings->vehicleColorer.fill(*myVehicleColorMode); myVehicleColorMode->setNumVisible((int)mySettings->vehicleColorer.size()); myVehicleColorInterpolation = new FXCheckButton(m32, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); @@ -294,9 +295,9 @@ FXMatrix* m101 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix3); new FXLabel(m101, "Show As", nullptr, GUIDesignViewSettingsLabel1); - myPersonShapeDetail = new FXComboBox(m101, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myPersonShapeDetail = new MFXIconComboBox(m101, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); myPersonShapeDetail->appendItem("'triangles'"); - myPersonShapeDetail->appendItem("'boxes'"); + myPersonShapeDetail->appendItem("'circles'"); myPersonShapeDetail->appendItem("'simple shapes'"); myPersonShapeDetail->appendItem("'raster images'"); myPersonShapeDetail->setNumVisible(4); @@ -306,7 +307,7 @@ FXMatrix* m102 = new FXMatrix(frame3, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m102, "Color", nullptr, GUIDesignViewSettingsLabel1); - myPersonColorMode = new FXComboBox(m102, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myPersonColorMode = new MFXIconComboBox(m102, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); mySettings->personColorer.fill(*myPersonColorMode); myPersonColorMode->setNumVisible(10); myPersonColorInterpolation = new FXCheckButton(m102, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); @@ -332,7 +333,7 @@ FXMatrix* m101 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix3); new FXLabel(m101, "Show As", nullptr, GUIDesignViewSettingsLabel1); - myContainerShapeDetail = new FXComboBox(m101, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myContainerShapeDetail = new MFXIconComboBox(m101, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); myContainerShapeDetail->appendItem("'triangles'"); myContainerShapeDetail->appendItem("'boxes'"); myContainerShapeDetail->appendItem("'simple shapes'"); @@ -344,7 +345,7 @@ FXMatrix* m102 = new FXMatrix(frame3, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m102, "Color", nullptr, GUIDesignViewSettingsLabel1); - myContainerColorMode = new FXComboBox(m102, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myContainerColorMode = new MFXIconComboBox(m102, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); mySettings->containerColorer.fill(*myContainerColorMode); myContainerColorMode->setNumVisible(9); myContainerColorInterpolation = new FXCheckButton(m102, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); @@ -368,7 +369,7 @@ FXVerticalFrame* frame4 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2); FXMatrix* m41 = new FXMatrix(frame4, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m41, "Color", nullptr, GUIDesignViewSettingsLabel1); - myJunctionColorMode = new FXComboBox(m41, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myJunctionColorMode = new MFXIconComboBox(m41, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); mySettings->junctionColorer.fill(*myJunctionColorMode); myJunctionColorMode->setNumVisible(4); myJunctionColorInterpolation = new FXCheckButton(m41, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); @@ -379,24 +380,22 @@ new FXHorizontalSeparator(frame4, GUIDesignHorizontalSeparator); FXMatrix* m42 = new FXMatrix(frame4, 2, GUIDesignMatrixViewSettings); - myTLIndexPanel = new NamePanel(m42, this, "Show link tls index", mySettings->drawLinkTLIndex); - myJunctionIndexPanel = new NamePanel(m42, this, "Show link junction index", mySettings->drawLinkJunctionIndex); + myJunctionSizePanel = new SizePanel(m42, this, mySettings->junctionSize); + myDrawJunctionShape = new FXCheckButton(m42, "Draw junction shape", this, MID_SIMPLE_VIEW_COLORCHANGE); + myDrawJunctionShape->setCheck(mySettings->drawJunctionShape); + myDrawCrossingsAndWalkingAreas = new FXCheckButton(m42, "Draw crossings/walkingareas", this, MID_SIMPLE_VIEW_COLORCHANGE); + myDrawCrossingsAndWalkingAreas->setCheck(mySettings->drawCrossingsAndWalkingareas); myShowLane2Lane = new FXCheckButton(m42, "Show lane to lane connections", this, MID_SIMPLE_VIEW_COLORCHANGE); myShowLane2Lane->setCheck(mySettings->showLane2Lane); new FXLabel(m42, " ", nullptr, GUIDesignViewSettingsLabel1); + + myTLIndexPanel = new NamePanel(m42, this, "Show link tls index", mySettings->drawLinkTLIndex); + myJunctionIndexPanel = new NamePanel(m42, this, "Show link junction index", mySettings->drawLinkJunctionIndex); myJunctionNamePanel = new NamePanel(m42, this, "Show junction name", mySettings->junctionName); myInternalJunctionNamePanel = new NamePanel(m42, this, "Show internal junction name", mySettings->internalJunctionName); myInternalEdgeNamePanel = new NamePanel(m42, this, "Show internal edge name", mySettings->internalEdgeName); myCwaEdgeNamePanel = new NamePanel(m42, this, "Show crossing and walkingarea name", mySettings->cwaEdgeName); - myDrawJunctionShape = new FXCheckButton(m42, "Draw junction shape", this, MID_SIMPLE_VIEW_COLORCHANGE); - myDrawJunctionShape->setCheck(mySettings->drawJunctionShape); - myDrawCrossingsAndWalkingAreas = new FXCheckButton(m42, "Draw crossings/walkingareas", this, MID_SIMPLE_VIEW_COLORCHANGE); - myDrawCrossingsAndWalkingAreas->setCheck(mySettings->drawCrossingsAndWalkingareas); - - new FXHorizontalSeparator(frame4, GUIDesignHorizontalSeparator); - - FXMatrix* m43 = new FXMatrix(frame4, 2, GUIDesignViewSettingsMatrix1); - myJunctionSizePanel = new SizePanel(m43, this, mySettings->junctionSize); + myTLSPhaseIndexPanel = new NamePanel(m42, this, "Show traffic light phase", mySettings->tlsPhaseIndex); } { // detectors / triggers @@ -407,7 +406,7 @@ FXMatrix* m51 = new FXMatrix(frame5, 2, GUIDesignMatrixViewSettings); myAddNamePanel = new NamePanel(m51, this, "Show object name", mySettings->addName); myAddFullNamePanel = new NamePanel(m51, this, "Show full name", mySettings->addFullName); - new FXHorizontalSeparator(frame5 , GUIDesignHorizontalSeparator); + new FXHorizontalSeparator(frame5, GUIDesignHorizontalSeparator); FXMatrix* m52 = new FXMatrix(frame5, 2, GUIDesignMatrixViewSettings); myAddSizePanel = new SizePanel(m52, this, mySettings->addSize); @@ -425,7 +424,7 @@ FXMatrix* m63 = new FXMatrix(frame6, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m63, "Color", nullptr, GUIDesignViewSettingsLabel1); - myPOIColorMode = new FXComboBox(m63, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myPOIColorMode = new MFXIconComboBox(m63, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); mySettings->poiColorer.fill(*myPOIColorMode); myPOIColorMode->setNumVisible(3); myPOIColorInterpolation = new FXCheckButton(m63, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); @@ -436,7 +435,7 @@ FXMatrix* m61 = new FXMatrix(frame6, 2, GUIDesignMatrixViewSettings); myPOINamePanel = new NamePanel(m61, this, "Show poi names", mySettings->poiName); myPOITypePanel = new NamePanel(m61, this, "Show poi types", mySettings->poiType); - new FXHorizontalSeparator(frame6 , GUIDesignHorizontalSeparator); + new FXHorizontalSeparator(frame6, GUIDesignHorizontalSeparator); FXMatrix* m62 = new FXMatrix(frame6, 2, GUIDesignMatrixViewSettings); myPOISizePanel = new SizePanel(m62, this, mySettings->poiSize); @@ -450,7 +449,7 @@ FXMatrix* m63 = new FXMatrix(frame9, 3, GUIDesignViewSettingsMatrix3); new FXLabel(m63, "Color", nullptr, GUIDesignViewSettingsLabel1); - myPolyColorMode = new FXComboBox(m63, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); + myPolyColorMode = new MFXIconComboBox(m63, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic); mySettings->polyColorer.fill(*myPolyColorMode); myPolyColorMode->setNumVisible(3); myPolyColorInterpolation = new FXCheckButton(m63, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButton); @@ -461,7 +460,7 @@ FXMatrix* m91 = new FXMatrix(frame9, 2, GUIDesignMatrixViewSettings); myPolyNamePanel = new NamePanel(m91, this, "Show polygon names", mySettings->polyName); myPolyTypePanel = new NamePanel(m91, this, "Show polygon types", mySettings->polyType); - new FXHorizontalSeparator(frame9 , GUIDesignHorizontalSeparator); + new FXHorizontalSeparator(frame9, GUIDesignHorizontalSeparator); myPolySizePanel = new SizePanel(m91, this, mySettings->polySize); } @@ -506,6 +505,9 @@ FXMatrix* m82 = new FXMatrix(frame8, 1, GUIDesignMatrixViewSettings); myDither = new FXCheckButton(m82, "Dither", this, MID_SIMPLE_VIEW_COLORCHANGE); myDither->setCheck(mySettings->dither); + FXMatrix* m83 = new FXMatrix(frame8, 1, GUIDesignMatrixViewSettings); + myFPS = new FXCheckButton(m83, "FPS", this, MID_SIMPLE_VIEW_COLORCHANGE); + myFPS->setCheck(mySettings->fps); } FXHorizontalFrame* f2 = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame2); FXButton* initial = new FXButton(f2, "&OK", nullptr, this, MID_SETTINGS_OK, GUIDesignViewSettingsButton2); @@ -523,6 +525,7 @@ // delete name panels delete myInternalJunctionNamePanel; delete myInternalEdgeNamePanel; + delete myTLSPhaseIndexPanel; delete myCwaEdgeNamePanel; delete myStreetNamePanel; delete myEdgeValuePanel; @@ -656,6 +659,7 @@ myJunctionIndexPanel->update(mySettings->drawLinkJunctionIndex); myJunctionNamePanel->update(mySettings->junctionName); myInternalJunctionNamePanel->update(mySettings->internalJunctionName); + myTLSPhaseIndexPanel->update(mySettings->tlsPhaseIndex); myJunctionSizePanel->update(mySettings->junctionSize); myAddNamePanel->update(mySettings->addName); @@ -674,6 +678,7 @@ myDrawJunctionShape->setCheck(mySettings->drawJunctionShape); myDrawCrossingsAndWalkingAreas->setCheck(mySettings->drawCrossingsAndWalkingareas); myDither->setCheck(mySettings->dither); + myFPS->setCheck(mySettings->fps); myShowSizeLegend->setCheck(mySettings->showSizeLegend); myParent->setColorScheme(mySettings->name); @@ -841,6 +846,8 @@ tmpSettings.edgeParam = myParamKey->getText().text(); } else if (tmpSettings.laneColorer.getScheme().getName() == GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL) { tmpSettings.laneParam = myParamKey->getText().text(); + } else if (tmpSettings.laneColorer.getScheme().getName() == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) { + tmpSettings.edgeData = myParamKey->getText().text(); } } tmpSettings.laneWidthExaggeration = (double) myLaneWidthUpscaleDialer->getValue(); @@ -874,6 +881,7 @@ tmpSettings.drawLinkJunctionIndex = myJunctionIndexPanel->getSettings(); tmpSettings.junctionName = myJunctionNamePanel->getSettings(); tmpSettings.internalJunctionName = myInternalJunctionNamePanel->getSettings(); + tmpSettings.tlsPhaseIndex = myTLSPhaseIndexPanel->getSettings(); tmpSettings.junctionSize = myJunctionSizePanel->getSettings(); tmpSettings.addName = myAddNamePanel->getSettings(); @@ -894,6 +902,7 @@ tmpSettings.drawJunctionShape = (myDrawJunctionShape->getCheck() != FALSE); tmpSettings.drawCrossingsAndWalkingareas = (myDrawCrossingsAndWalkingAreas->getCheck() != FALSE); tmpSettings.dither = (myDither->getCheck() != FALSE); + tmpSettings.fps = (myFPS->getCheck() != FALSE); tmpSettings.showSizeLegend = (myShowSizeLegend->getCheck() != FALSE); // lanes (colors) @@ -1036,10 +1045,10 @@ // - the comboBox of all other views (only append) XXX @todo index = mySchemeName->appendItem(tmpSettings.name.c_str()); mySchemeName->setCurrentItem(index); - myParent->getColoringSchemesCombo().appendItem(tmpSettings.name.c_str()); + myParent->getColoringSchemesCombo()->appendItem(tmpSettings.name.c_str()); } - myParent->getColoringSchemesCombo().setCurrentItem( - myParent->getColoringSchemesCombo().findItem(tmpSettings.name.c_str())); + myParent->getColoringSchemesCombo()->setCurrentItem( + myParent->getColoringSchemesCombo()->findItem(tmpSettings.name.c_str())); gSchemeStorage.add(tmpSettings); // overwrites existing mySettings = &gSchemeStorage.get(tmpSettings.name); myParent->setColorScheme(tmpSettings.name); @@ -1072,6 +1081,9 @@ if (handler.getDelay() >= 0) { myParent->setDelay(handler.getDelay()); } + if (handler.getBreakpoints().size() > 0) { + myParent->setBreakpoints(handler.getBreakpoints()); + } handler.applyViewport(myParent); rebuildColorMatrices(true); } @@ -1148,7 +1160,7 @@ tmpSettings.name = name; gSchemeStorage.add(tmpSettings); mySchemeName->setItemText(index, tmpSettings.name.c_str()); - myParent->getColoringSchemesCombo().setItemText(index, tmpSettings.name.c_str()); + myParent->getColoringSchemesCombo()->setItemText(index, tmpSettings.name.c_str()); myParent->setColorScheme(tmpSettings.name); mySettings = &gSchemeStorage.get(name); myBackup = *mySettings; @@ -1364,7 +1376,7 @@ std::vector::const_iterator threshIt = scheme.getThresholds().begin(); std::vector::const_iterator nameIt = scheme.getNames().begin(); while (colIt != scheme.getColors().end()) { - colors.push_back(new FXColorWell(m , MFXUtils::getFXColor(*colIt), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell1)); + colors.push_back(new FXColorWell(m, MFXUtils::getFXColor(*colIt), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell1)); if (fixed) { new FXLabel(m, nameIt->c_str()); new FXLabel(m, ""); @@ -1490,15 +1502,37 @@ myJunctionColorRainbow->enable(); } const std::string activeSchemeName = myLaneEdgeColorMode->getText().text(); + myParamKey->clearItems(); + myParamKey->setEditable(true); if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGE_PARAM_NUMERICAL) { - myParamKey->setText(mySettings->edgeParam.c_str()); + myParamKey->appendItem(mySettings->edgeParam.c_str()); + for (const std::string& attr : myParent->getEdgeLaneParamKeys(true)) { + if (attr != mySettings->edgeParam) { + myParamKey->appendItem(attr.c_str()); + } + } myParamKey->enable(); } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL) { - myParamKey->setText(mySettings->laneParam.c_str()); + myParamKey->appendItem(mySettings->laneParam.c_str()); + for (const std::string& attr : myParent->getEdgeLaneParamKeys(false)) { + if (attr != mySettings->laneParam) { + myParamKey->appendItem(attr.c_str()); + } + } + myParamKey->enable(); + } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) { + myParamKey->appendItem(mySettings->edgeData.c_str()); + for (const std::string& attr : myParent->getEdgeDataAttrs()) { + if (attr != mySettings->edgeData) { + myParamKey->appendItem(attr.c_str()); + } + } myParamKey->enable(); + myParamKey->setEditable(false); } else { myParamKey->disable(); } + myParamKey->setNumVisible(myParamKey->getNumItems()); myLaneColorSettingFrame->getParent()->recalc(); m = rebuildScaleMatrix(myLaneScaleSettingFrame, myLaneScales, myLaneScaleThresholds, myLaneScaleButtons, myLaneScaleInterpolation, mySettings->getLaneEdgeScaleScheme()); @@ -1737,7 +1771,7 @@ GUIVisualizationSizeSettings GUIDialog_ViewSettings::SizePanel::getSettings() { return GUIVisualizationSizeSettings( - myMinSizeDial->getValue(), myExaggerateDial->getValue(), + myMinSizeDial->getValue(), myExaggerateDial->getValue(), myCheck->getCheck() != FALSE, myCheckSelected->getCheck() != FALSE); } diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIDialog_ViewSettings.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -33,7 +33,7 @@ // =========================================================================== // class declarations // =========================================================================== -class MFXMutex; +class MFXIconComboBox; // =========================================================================== @@ -91,7 +91,7 @@ GUIDialog_ViewSettings(GUISUMOAbstractView* parent, GUIVisualizationSettings* settings, std::vector* decals, - MFXMutex* decalsLock); + FXMutex* decalsLock); /// @brief Destructor @@ -246,7 +246,7 @@ std::vector* myDecals; /// @brief Lock used when changing the decals - MFXMutex* myDecalsLock; + FXMutex* myDecalsLock; /// @name Dialog elements /// @{ @@ -266,7 +266,7 @@ FXColorWell* mySelectedAdditionalColor; /// ... lane colorer - FXComboBox* myLaneEdgeColorMode; + MFXIconComboBox* myLaneEdgeColorMode; FXVerticalFrame* myLaneColorSettingFrame; std::vector myLaneColors; std::vector myLaneThresholds; @@ -274,10 +274,10 @@ FXCheckButton* myLaneColorInterpolation; FXButton* myLaneColorRainbow; FXButton* myJunctionColorRainbow; - FXTextField* myParamKey; + FXComboBox* myParamKey; /// ... lane scaler - FXComboBox* myLaneEdgeScaleMode; + MFXIconComboBox* myLaneEdgeScaleMode; FXVerticalFrame* myLaneScaleSettingFrame; std::vector myLaneScales; std::vector myLaneScaleThresholds; @@ -289,7 +289,7 @@ FXRealSpinner* myLaneWidthUpscaleDialer; FXRealSpinner* myLaneMinWidthDialer; - FXComboBox* myVehicleColorMode, *myVehicleShapeDetail; + MFXIconComboBox* myVehicleColorMode, *myVehicleShapeDetail; FXVerticalFrame* myVehicleColorSettingFrame; std::vector myVehicleColors; std::vector myVehicleThresholds; @@ -297,14 +297,14 @@ FXCheckButton* myVehicleColorInterpolation; FXCheckButton* myShowBlinker, *myShowMinGap, *myShowBTRange; /* *myShowLaneChangePreference,*/ - FXComboBox* myPersonColorMode, *myPersonShapeDetail; + MFXIconComboBox* myPersonColorMode, *myPersonShapeDetail; FXVerticalFrame* myPersonColorSettingFrame; std::vector myPersonColors; std::vector myPersonThresholds; std::vector myPersonButtons; FXCheckButton* myPersonColorInterpolation; - FXComboBox* myContainerColorMode, *myContainerShapeDetail; + MFXIconComboBox* myContainerColorMode, *myContainerShapeDetail; FXVerticalFrame* myContainerColorSettingFrame; std::vector myContainerColors; std::vector myContainerThresholds; @@ -312,21 +312,21 @@ FXCheckButton* myContainerColorInterpolation; FXRealSpinner* myContainerMinSizeDialer, *myContainerUpscaleDialer; - FXComboBox* myJunctionColorMode; + MFXIconComboBox* myJunctionColorMode; FXVerticalFrame* myJunctionColorSettingFrame; std::vector myJunctionColors; std::vector myJunctionThresholds; std::vector myJunctionButtons; FXCheckButton* myJunctionColorInterpolation; - FXComboBox* myPOIColorMode, *myPOIShapeDetail; + MFXIconComboBox* myPOIColorMode, *myPOIShapeDetail; FXVerticalFrame* myPOIColorSettingFrame; std::vector myPOIColors; std::vector myPOIThresholds; std::vector myPOIButtons; FXCheckButton* myPOIColorInterpolation; - FXComboBox* myPolyColorMode, *myPolyShapeDetail; + MFXIconComboBox* myPolyColorMode, *myPolyShapeDetail; FXVerticalFrame* myPolyColorSettingFrame; std::vector myPolyColors; std::vector myPolyThresholds; @@ -337,11 +337,13 @@ FXCheckButton* myDrawJunctionShape; FXCheckButton* myDrawCrossingsAndWalkingAreas; FXCheckButton* myDither; + FXCheckButton* myFPS; FXCheckButton* myShowSizeLegend; NamePanel* myEdgeNamePanel, *myInternalEdgeNamePanel, *myCwaEdgeNamePanel, *myStreetNamePanel, *myEdgeValuePanel, *myJunctionIndexPanel, *myTLIndexPanel, *myJunctionNamePanel, *myInternalJunctionNamePanel, + *myTLSPhaseIndexPanel, *myVehicleNamePanel, *myVehicleValuePanel, *myPersonNamePanel, *myPersonValuePanel, *myContainerNamePanel, diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,6 +28,8 @@ #include #include #include +#include + #include "GUIGlChildWindow.h" @@ -49,84 +51,102 @@ // =========================================================================== // member method definitions // =========================================================================== -GUIGlChildWindow::GUIGlChildWindow( - FXMDIClient* p, - GUIMainWindow* parentWindow, - FXMDIMenu* mdimenu, const FXString& name, - FXIcon* ic, - FXuint opts, FXint x, FXint y, FXint w, FXint h) : +GUIGlChildWindow::GUIGlChildWindow(FXMDIClient* p, GUIMainWindow* parentWindow, FXMDIMenu* mdimenu, + const FXString& name, FXMenuBar* gripNavigationToolbar, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) : FXMDIChild(p, name, ic, mdimenu, opts, x, y, w, h), - myView(nullptr), - myParent(parentWindow) { + myParent(parentWindow), + myGripNavigationToolbar(gripNavigationToolbar), + myStaticNavigationToolBar(nullptr), + myView(nullptr) { // Make MDI Window Menu setTracking(); + // create a vertical frame to add elements myContentFrame = new FXVerticalFrame(this, GUIDesignFrameArea); - // build the tool bar + // if menuBarGripElements isn't NULL, use it to create a grip navigation elements. In other cas, create a static FXToolbar + if (myGripNavigationToolbar == nullptr) { + myStaticNavigationToolBar = new FXToolBar(myContentFrame, GUIDesignToolbarMenuBar); + } + // build the tool bars buildNavigationToolBar(); // always there (recenter) buildColoringToolBar(); // always there (coloring) - buildScreenshotToolBar(); // always there (screen shot) + buildScreenshotToolBar(); // always there (screenshot) } GUIGlChildWindow::~GUIGlChildWindow() { delete myLocatorPopup; - delete myNavigationToolBar; + // only delete static navigation bar if it was created + if (myStaticNavigationToolBar) { + delete myStaticNavigationToolBar; + } } void GUIGlChildWindow::create() { FXMDIChild::create(); - myNavigationToolBar->create(); + // only create static navigation bar if it was created + if (myStaticNavigationToolBar) { + myStaticNavigationToolBar->create(); + } else { + myGripNavigationToolbar->create(); + } myLocatorPopup->create(); myView->create(); } +GUISUMOAbstractView* +GUIGlChildWindow::getView() const { + return myView; +} + + +GUIMainWindow* +GUIGlChildWindow::getParent() { + return myParent; +} + + void GUIGlChildWindow::buildNavigationToolBar() { - // Build navigation toolbar - myNavigationToolBar = new FXToolBar(myContentFrame, GUIDesignBar); - // build the view settings // recenter view - new FXButton(myNavigationToolBar, + new FXButton(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, "\tRecenter View\tRecenter view to the simulated area.", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), this, MID_RECENTERVIEW, GUIDesignButtonToolbar); // add viewport button - new FXButton(myNavigationToolBar, - "\tEdit Viewport...\tOpens a menu which lets you edit the viewport.", + new FXButton(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, + "\tEdit ViewporttOpens a menu which lets you edit the viewport.", GUIIconSubSys::getIcon(ICON_EDITVIEWPORT), this, MID_EDITVIEWPORT, GUIDesignButtonToolbar); // toggle button for zooming style - MFXCheckableButton* zoomBut = new MFXCheckableButton(false, myNavigationToolBar, + MFXCheckableButton* zoomBut = new MFXCheckableButton(false, myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, "\tToggles Zooming Style\tToggles whether zooming is based at cursor position or at the center of the view.", GUIIconSubSys::getIcon(ICON_ZOOMSTYLE), this, MID_ZOOM_STYLE, GUIDesignButtonToolbarCheckable); zoomBut->setChecked(getApp()->reg().readIntEntry("gui", "zoomAtCenter", 1) != 1); - // build the locator popup - myLocatorPopup = new FXPopup(myNavigationToolBar, POPUP_VERTICAL); - myLocatorButton = new FXMenuButton(myNavigationToolBar, "\tLocate Structures\tLocate structures within the network.", - GUIIconSubSys::getIcon(ICON_LOCATE), myLocatorPopup, - GUIDesignButtonToolbarLocator); + myLocatorPopup = new FXPopup(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, POPUP_VERTICAL); + // build locator button + myLocatorButton = new FXMenuButton(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, + "\tLocate Structures\tLocate structures within the network.", + GUIIconSubSys::getIcon(ICON_LOCATE), myLocatorPopup, GUIDesignButtonToolbarLocator); // add toggle button for tool-tips on/off - new MFXCheckableButton(false, myNavigationToolBar, + new MFXCheckableButton(false, myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, "\tToggles Tool Tips\tToggles whether tool tips shall be shown.", GUIIconSubSys::getIcon(ICON_SHOWTOOLTIPS), this, MID_SHOWTOOLTIPS, GUIDesignButtonToolbarCheckable); - } void GUIGlChildWindow::buildColoringToolBar() { // Create Vertical separator - new FXVerticalSeparator(myNavigationToolBar, GUIDesignVerticalSeparator); - + new FXVerticalSeparator(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, GUIDesignVerticalSeparator); // build coloring tools - // combo - myColoringSchemes = new FXComboBox(myNavigationToolBar, GUIDesignComboBoxNCol, this, MID_COLOURSCHEMECHANGE, GUIDesignComboBoxStatic); + myColoringSchemes = new FXComboBox(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, + GUIDesignComboBoxNCol, this, MID_COLOURSCHEMECHANGE, GUIDesignComboBoxStatic); // editor - new FXButton(myNavigationToolBar, - "\tEdit Coloring Schemes...\tOpens a menu which lets you edit the coloring schemes.", + new FXButton(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, + "\tEdit Coloring Schemes\tOpens a menu which lets you edit the coloring schemes.", GUIIconSubSys::getIcon(ICON_COLORWHEEL), this, MID_EDITVIEWSCHEME, GUIDesignButtonToolbar); } @@ -134,9 +154,9 @@ void GUIGlChildWindow::buildScreenshotToolBar() { // Create Vertical separator - new FXVerticalSeparator(myNavigationToolBar, GUIDesignVerticalSeparator); + new FXVerticalSeparator(myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, GUIDesignVerticalSeparator); // snapshot - new MFXCheckableButton(false, myNavigationToolBar, + new MFXCheckableButton(false, myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar, "\tMake Snapshot\tMakes a snapshot of the view.", GUIIconSubSys::getIcon(ICON_CAMERA), this, MID_MAKESNAPSHOT, GUIDesignButtonToolbar); } @@ -148,9 +168,9 @@ } -FXToolBar& +FXToolBar* GUIGlChildWindow::getNavigationToolBar(GUISUMOAbstractView&) { - return *myNavigationToolBar; + return myGripNavigationToolbar ? myGripNavigationToolbar : myStaticNavigationToolBar; } @@ -160,9 +180,9 @@ } -FXComboBox& +FXComboBox* GUIGlChildWindow::getColoringSchemesCombo() { - return *myColoringSchemes; + return myColoringSchemes; } @@ -212,7 +232,7 @@ long -GUIGlChildWindow::onCmdChangeColorScheme(FXObject*, FXSelector , void* data) { +GUIGlChildWindow::onCmdChangeColorScheme(FXObject*, FXSelector, void* data) { myView->setColorScheme((char*) data); return 1; } @@ -230,5 +250,6 @@ GUIGlChildWindow::isSelected(GUIGlObject* o) const { return gSelected.isSelected(o->getType(), o->getGlID()); } + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIGlChildWindow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -41,75 +41,98 @@ class GUIGlChildWindow : public FXMDIChild { FXDECLARE(GUIGlChildWindow) public: + /// @brief constructor GUIGlChildWindow(FXMDIClient* p, GUIMainWindow* parentWindow, - FXMDIMenu* mdimenu, const FXString& name, + FXMDIMenu* mdimenu, const FXString& name, FXMenuBar* gripNavigationToolbar, FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0); + /// @brief destructor virtual ~GUIGlChildWindow(); + /// @brief get build GL Canvas virtual FXGLCanvas* getBuildGLCanvas() const; + + /// @brief create GUIGlChildWindow virtual void create(); - GUISUMOAbstractView* getView() const { - return myView; - } + /// @brief return GUISUMOAbstractView + GUISUMOAbstractView* getView() const; + + /** @brief Returns the main window + * @return This view's parent + */ + GUIMainWindow* getParent(); + /// @name buttons call backs + /// @{ long onCmdRecenterView(FXObject*, FXSelector, void*); long onCmdEditViewport(FXObject*, FXSelector, void*); long onCmdEditViewScheme(FXObject*, FXSelector, void*); long onCmdShowToolTips(FXObject* sender, FXSelector, void*); long onCmdZoomStyle(FXObject* sender, FXSelector, void*); long onCmdChangeColorScheme(FXObject*, FXSelector sel, void*); + /// @} - void buildNavigationToolBar(); - void buildColoringToolBar(); - void buildScreenshotToolBar(); + /// @brief return a reference to navigation toolbar + FXToolBar* getNavigationToolBar(GUISUMOAbstractView& v); - - FXToolBar& getNavigationToolBar(GUISUMOAbstractView& v); + /// @ brief return a pointer to locator popup FXPopup* getLocatorPopup(); - FXComboBox& getColoringSchemesCombo(); + + /// @brief return combobox with the current coloring schemes (standard, fastest standard, real world...) + FXComboBox* getColoringSchemesCombo(); /** @brief Centers the view onto the given artifact * @param[in] id The id of the object to center the view on */ void setView(GUIGlID id); + /// @brief true if the object is selected (may include extra logic besides calling gSelected) + virtual bool isSelected(GUIGlObject* o) const; - /** @brief Returns the main window - * @return This view's parent - */ - GUIMainWindow* getParent() { - return myParent; - } +protected: + /// @brief fox need this + GUIGlChildWindow() {} + /// @brief The parent window + GUIMainWindow* myParent; - /// @brief true if the object is selected (may include extra logic besides calling gSelected) - virtual bool isSelected(GUIGlObject* o) const; + /// @brief The grip navigation tool bar + FXMenuBar* myGripNavigationToolbar; + /// @brief The static navigation tool bar + FXToolBar* myStaticNavigationToolBar; -protected: - /// the view + /// @brief The view GUISUMOAbstractView* myView; - /// The tool bar - FXToolBar* myNavigationToolBar; - /// The locator menu FXPopup* myLocatorPopup; + + /// @brief The locator button FXMenuButton* myLocatorButton; + /// @brief The contents frame FXVerticalFrame* myContentFrame; + /// @brief The coloring schemes FXComboBox* myColoringSchemes; - /// @brief The parent window - GUIMainWindow* myParent; + /// @brief build navigation toolbar + void buildNavigationToolBar(); + /// @brief build coloring toolbar + void buildColoringToolBar(); -protected: - GUIGlChildWindow() { } + /// @brief build screenshot toolbar + void buildScreenshotToolBar(); + +private: + /// @brief Invalidated copy constructor. + GUIGlChildWindow(const GUIGlChildWindow&) = delete; + /// @brief Invalidated assignment operator. + GUIGlChildWindow& operator=(const GUIGlChildWindow&) = delete; }; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIMainWindow.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIMainWindow.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIMainWindow.cpp 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIMainWindow.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -55,6 +55,7 @@ GUIMainWindow::GUIMainWindow(FXApp* a) : FXMainWindow(a, "SUMO-gui main window", nullptr, nullptr, DECOR_ALL, 20, 20, 600, 400), myAmFullScreen(false), + myTrackerLock(true), myGLVisual(new FXGLVisual(a, VISUAL_DOUBLEBUFFER)), myAmGaming(false), myListInternal(false), diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIMainWindow.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIMainWindow.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIMainWindow.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIMainWindow.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,7 +31,6 @@ #include #include #include -#include // =========================================================================== @@ -113,6 +112,10 @@ */ virtual void setDelay(double) {} + /** @brief Sets the breakpoints of the parent application + */ + virtual void setBreakpoints(const std::vector&) {} + /** @brief Sends an event from the application thread to the GUI and waits until it is handled * @param event the event to send */ @@ -144,7 +147,7 @@ std::vector myGLWindows; std::vector myTrackerWindows; /// A lock to make the removal and addition of trackers secure - MFXMutex myTrackerLock; + FXMutex myTrackerLock; /// Font used for popup-menu titles FXFont* myBoldFont; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUIPerspectiveChanger.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.cpp sumo-1.2.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.cpp --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.cpp 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -150,7 +151,7 @@ GUISUMOAbstractView::~GUISUMOAbstractView() { gSchemeStorage.setDefault(myVisualizationSettings->name); - gSchemeStorage.saveViewport(myChanger->getXPos(), myChanger->getYPos(), myChanger->getZPos()); + gSchemeStorage.saveViewport(myChanger->getXPos(), myChanger->getYPos(), myChanger->getZPos(), myChanger->getRotation()); delete myPopup; delete myChanger; delete myViewportChooser; @@ -272,6 +273,7 @@ if (getWidth() == 0 || getHeight() == 0) { return; } + const long start = SysUtils::getCurrentMillis(); if (getTrackedID() != GUIGlObject::INVALID_ID) { centerTo(getTrackedID(), false); @@ -304,6 +306,11 @@ if (myVisualizationSettings->showSizeLegend) { displayLegend(); } + const long end = SysUtils::getCurrentMillis(); + myFrameDrawTime = end - start; + if (myVisualizationSettings->fps) { + drawFPS(); + } // check whether the select mode /tooltips) // shall be computed, too if (myUseToolTips && id != GUIGlObject::INVALID_ID) { @@ -319,7 +326,7 @@ } -std::vector +std::vector GUISUMOAbstractView::getObjectstUnderCursor() { return getObjectsAtPosition(getPositionInformation(), SENSITIVITY); @@ -342,7 +349,7 @@ int idMax = 0; double maxLayer = -std::numeric_limits::max(); // iterate over obtained GUIGlIDs - for (const auto &i : ids) { + for (const auto& i : ids) { // obtain GUIGlObject GUIGlObject* o = GUIGlObjectStorage::gIDStorage.getObjectBlocking(i); // check that GUIGlObject exist @@ -392,7 +399,7 @@ // obtain GUIGlID of objects in boundary const std::vector ids = getObjectsInBoundary(selection); // iterate over obtained GUIGlIDs - for (const auto &i : ids) { + for (const auto& i : ids) { // obtain GUIGlObject GUIGlObject* o = GUIGlObjectStorage::gIDStorage.getObjectBlocking(i); // check that GUIGlObject exist @@ -427,7 +434,7 @@ // obtain GUIGlID of objects in boundary const std::vector ids = getObjectsInBoundary(selection); // iterate over obtained GUIGlIDs - for (const auto &i : ids) { + for (const auto& i : ids) { // obtain GUIGlObject GUIGlObject* o = GUIGlObjectStorage::gIDStorage.getObjectBlocking(i); // check that GUIGlObject exist @@ -493,7 +500,7 @@ Position pos = getPositionInformation(); pos.add(0, p2m(15)); std::string label = object->getFullName(); - if (myVisualizationSettings->edgeValue.show && + if (myVisualizationSettings->edgeValue.show && (object->getType() == GLO_EDGE || object->getType() == GLO_LANE)) { const int activeScheme = myVisualizationSettings->getLaneEdgeMode(); label += " (" + toString(object->getColorValue(*myVisualizationSettings, activeScheme)) + ")"; @@ -613,6 +620,30 @@ glPopMatrix(); } +double +GUISUMOAbstractView::getFPS() const { + return 1000.0 / MAX2((long)1, myFrameDrawTime); +} + +void +GUISUMOAbstractView::drawFPS() { + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + const double fontHeight = 0.2 * 300. / getHeight(); + const double fontWidth = 0.2 * 300. / getWidth(); + GLHelper::drawText(toString((int)getFPS()) + " FPS", Position(0.82, 0.88), -1, fontHeight, RGBColor::RED, 0, FONS_ALIGN_LEFT, fontWidth); + + // restore matrices + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); +} + double GUISUMOAbstractView::m2p(double meter) const { @@ -663,6 +694,12 @@ } */ +Position +GUISUMOAbstractView::getWindowCursorPosition() const { + return Position(myWindowCursorPositionX, myWindowCursorPositionY); +} + + void GUISUMOAbstractView::setWindowCursorPosition(FXint x, FXint y) { myWindowCursorPositionX = x + myMouseHotspotX; @@ -724,7 +761,7 @@ long -GUISUMOAbstractView::onLeftBtnPress(FXObject*, FXSelector , void* data) { +GUISUMOAbstractView::onLeftBtnPress(FXObject*, FXSelector, void* data) { destroyPopup(); setFocus(); FXEvent* e = (FXEvent*) data; @@ -755,7 +792,7 @@ long -GUISUMOAbstractView::onLeftBtnRelease(FXObject*, FXSelector , void* data) { +GUISUMOAbstractView::onLeftBtnRelease(FXObject*, FXSelector, void* data) { destroyPopup(); myChanger->onLeftBtnRelease(data); if (myApp->isGaming()) { @@ -779,7 +816,7 @@ long -GUISUMOAbstractView::onRightBtnPress(FXObject*, FXSelector , void* data) { +GUISUMOAbstractView::onRightBtnPress(FXObject*, FXSelector, void* data) { destroyPopup(); myChanger->onRightBtnPress(data); grab(); @@ -794,6 +831,9 @@ if (!myChanger->onRightBtnRelease(data) && !myApp->isGaming()) { openObjectDialog(); } + if (myApp->isGaming()) { + onGamingRightClick(getPositionInformation()); + } ungrab(); return 1; } @@ -806,7 +846,7 @@ long -GUISUMOAbstractView::onMouseWheel(FXObject*, FXSelector , void* data) { +GUISUMOAbstractView::onMouseWheel(FXObject*, FXSelector, void* data) { if (!myApp->isGaming()) { myChanger->onMouseWheel(data); // upddate viewport @@ -822,7 +862,7 @@ long -GUISUMOAbstractView::onMouseMove(FXObject*, FXSelector , void* data) { +GUISUMOAbstractView::onMouseMove(FXObject*, FXSelector, void* data) { // if popup exist but isn't shown, destroy it first if (myPopup && (myPopup->shown() == false)) { destroyPopup(); @@ -843,7 +883,7 @@ long -GUISUMOAbstractView::onMouseLeft(FXObject*, FXSelector , void* /*data*/) { +GUISUMOAbstractView::onMouseLeft(FXObject*, FXSelector, void* /*data*/) { return 1; } @@ -976,7 +1016,7 @@ glGetIntegerv(GL_VIEWPORT, viewport); while (state == GL2PS_OVERFLOW) { buffsize += 1024 * 1024; - gl2psBeginPage(destFile.c_str(), "sumo-gui; http://sumo.dlr.de", viewport, format, GL2PS_SIMPLE_SORT, + gl2psBeginPage(destFile.c_str(), "sumo-gui; https://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); @@ -1245,8 +1285,12 @@ GUISUMOAbstractView::onGamingClick(Position /*pos*/) { } +void +GUISUMOAbstractView::onGamingRightClick(Position /*pos*/) { +} + -FXComboBox& +FXComboBox* GUISUMOAbstractView::getColoringSchemesCombo() { return myParent->getColoringSchemesCombo(); } @@ -1445,8 +1489,8 @@ rotBound.add(Position(bound.xmax(), bound.ymin()).rotateAround2D(rad, bound.getCenter())); rotBound.add(Position(bound.xmax(), bound.ymax()).rotateAround2D(rad, bound.getCenter())); bound = rotBound; - myVisualizationSettings->angle = myChanger->getRotation(); } + myVisualizationSettings->angle = myChanger->getRotation(); return bound; } @@ -1463,6 +1507,12 @@ } +void +GUISUMOAbstractView::setBreakpoints(const std::vector& breakpoints) { + myApp->setBreakpoints(breakpoints); +} + + GUISUMOAbstractView::Decal::Decal() : filename(), centerX(0), diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.h sumo-1.2.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.h --- sumo-1.1.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.h 2018-12-11 23:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/GUISUMOAbstractView.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,7 +39,6 @@ #undef NOMINMAX #endif -#include #include #include #include @@ -114,6 +113,9 @@ ///@note disabled //bool allowRotation() const; + /// @brief return windows cursor position + Position getWindowCursorPosition() const; + /// @brief Returns the gl-id of the object under the given coordinates void setWindowCursorPosition(FXint x, FXint y); @@ -209,6 +211,16 @@ /// @brief recalibrate color scheme according to the current value range virtual void buildColorRainbow(const GUIVisualizationSettings& /*s*/, GUIColorScheme& /*scheme*/, int /*active*/, GUIGlObjectType /*objectType*/) { } + /// @brief return list of loaded edgeData attributes + virtual std::vector getEdgeDataAttrs() const { + return std::vector(); + } + + /// @brief return list of available edge parameters + virtual std::vector getEdgeLaneParamKeys(bool /*edgeKeys*/) const { + return std::vector(); + } + /// @brief remove viewport void remove(GUIDialog_EditViewport*); @@ -234,6 +246,7 @@ /// @brief on gaming click virtual void onGamingClick(Position /*pos*/); + virtual void onGamingRightClick(Position /*pos*/); /// @brief @name Additional visualisations ///@{ @@ -307,7 +320,7 @@ public: /// @brief get coloring schemes combo - FXComboBox& getColoringSchemesCombo(); + FXComboBox* getColoringSchemesCombo(); /// @brief Returns the cursor's x/y position within the network Position getPositionInformation() const; @@ -332,11 +345,17 @@ /// @brief Sets the delay of the parent application void setDelay(double delay); + /** @brief Sets the breakpoints of the parent application */ + void setBreakpoints(const std::vector& breakpoints); + /// @brief retrieve breakpoints if provided by the application virtual const std::vector retrieveBreakpoints() const { return std::vector(); } + /// @brief retrieve FPS + double getFPS() const; + protected: /// @brief performs the painting of the simulation void paintGL(); @@ -353,9 +372,12 @@ /// @brief paints a grid void paintGLGrid(); - /// @briefDraws a line with ticks, and the length information. + /// @brief Draws a line with ticks, and the length information. void displayLegend(); + /// @brief Draws frames-per-second indicator + void drawFPS(); + /// @brief returns the id of the front object under the cursor using GL_SELECT GUIGlID getObjectUnderCursor(); @@ -444,7 +466,7 @@ std::vector myDecals; /// @brief The mutex to use before accessing the decals list in order to avoid thread conflicts - MFXMutex myDecalsLock; + FXMutex myDecalsLock; ///@} /// @brief Snapshots @@ -457,11 +479,14 @@ FXCondition mySnapshotCondition; /// @brief poly draw lock - mutable MFXMutex myPolyDrawLock; + mutable FXMutex myPolyDrawLock; /// @brief List of objects for which GUIGlObject::drawGLAdditional is called std::map myAdditionallyDrawn; + /// @brief counter for measuring rendering time + long myFrameDrawTime; + private: // @brief sensitivity for "<>AtPosition(...) functions static const double SENSITIVITY; diff -Nru sumo-1.1.0+dfsg1/src/utils/gui/windows/Makefile.in sumo-1.2.0+dfsg1/src/utils/gui/windows/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/gui/windows/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/gui/windows/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,654 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/gui/windows -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = \ - GUIDanielPerspectiveChanger.$(OBJEXT) \ - GUIDialog_EditViewport.$(OBJEXT) \ - GUIDialog_ViewSettings.$(OBJEXT) GUIDialog_Options.$(OBJEXT) \ - GUIGlChildWindow.$(OBJEXT) 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libguiutilsWindows.a -libguiutilsWindows_a_SOURCES = \ -GUIAppEnum.h \ -GUIDanielPerspectiveChanger.cpp GUIDanielPerspectiveChanger.h \ -GUIDialog_EditViewport.cpp GUIDialog_EditViewport.h \ -GUIDialog_ViewSettings.cpp GUIDialog_ViewSettings.h \ -GUIDialog_Options.cpp GUIDialog_Options.h \ -GUIGlChildWindow.cpp GUIGlChildWindow.h \ -GUIMainWindow.cpp GUIMainWindow.h \ -GUIPerspectiveChanger.cpp GUIPerspectiveChanger.h \ -GUISUMOAbstractView.cpp GUISUMOAbstractView.h \ -GUIDialog_GLObjChooser.cpp GUIDialog_GLObjChooser.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) --foreign src/utils/gui/windows/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/gui/windows/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDanielPerspectiveChanger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_EditViewport.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_GLObjChooser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_Options.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_ViewSettings.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIGlChildWindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIMainWindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIPerspectiveChanger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUISUMOAbstractView.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/importio/LineHandler.h sumo-1.2.0+dfsg1/src/utils/importio/LineHandler.h --- sumo-1.1.0+dfsg1/src/utils/importio/LineHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/importio/LineHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/importio/LineReader.cpp sumo-1.2.0+dfsg1/src/utils/importio/LineReader.cpp --- sumo-1.1.0+dfsg1/src/utils/importio/LineReader.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/importio/LineReader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/importio/LineReader.h sumo-1.2.0+dfsg1/src/utils/importio/LineReader.h --- sumo-1.1.0+dfsg1/src/utils/importio/LineReader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/importio/LineReader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/importio/Makefile.in sumo-1.2.0+dfsg1/src/utils/importio/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/importio/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/importio/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,636 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/importio -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libimportio.a -EXTRA_DIST = LineHandler.h -libimportio_a_SOURCES = LineReader.cpp \ -NamedColumnsParser.cpp \ -LineReader.h \ -NamedColumnsParser.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) --foreign src/utils/importio/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/importio/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LineReader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NamedColumnsParser.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/importio/NamedColumnsParser.cpp sumo-1.2.0+dfsg1/src/utils/importio/NamedColumnsParser.cpp --- sumo-1.1.0+dfsg1/src/utils/importio/NamedColumnsParser.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/importio/NamedColumnsParser.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/importio/NamedColumnsParser.h sumo-1.2.0+dfsg1/src/utils/importio/NamedColumnsParser.h --- sumo-1.1.0+dfsg1/src/utils/importio/NamedColumnsParser.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/importio/NamedColumnsParser.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryFormatter.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryFormatter.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryFormatter.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryFormatter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryFormatter.h sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryFormatter.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryFormatter.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryFormatter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryInputDevice.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryInputDevice.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryInputDevice.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryInputDevice.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryInputDevice.h sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryInputDevice.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/BinaryInputDevice.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/BinaryInputDevice.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/Makefile.in sumo-1.2.0+dfsg1/src/utils/iodevices/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/iodevices/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,652 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/iodevices -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - BinaryFormatter.$(OBJEXT) BinaryInputDevice.$(OBJEXT) \ - OutputDevice_CERR.$(OBJEXT) OutputDevice_COUT.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libiodevices.a -EXTRA_DIST = -libiodevices_a_SOURCES = OutputDevice.cpp OutputDevice.h\ -BinaryFormatter.cpp BinaryFormatter.h \ -BinaryInputDevice.cpp BinaryInputDevice.h \ -OutputDevice_CERR.cpp OutputDevice_CERR.h \ -OutputDevice_COUT.cpp OutputDevice_COUT.h \ -OutputDevice_File.cpp OutputDevice_File.h \ -OutputDevice_String.cpp OutputDevice_String.h \ -OutputDevice_Network.cpp OutputDevice_Network.h \ -OutputFormatter.h \ -PlainXMLFormatter.cpp PlainXMLFormatter.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) --foreign src/utils/iodevices/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/iodevices/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BinaryFormatter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BinaryInputDevice.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDevice.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDevice_CERR.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDevice_COUT.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDevice_File.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDevice_Network.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDevice_String.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PlainXMLFormatter.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.h sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_CERR.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.h sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_COUT.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice.cpp 2018-11-11 23:03:09.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -165,7 +165,7 @@ if (v < pow(10., -precision)) { oss.setf(std::ios::scientific, std::ios::floatfield); } else { - oss.setf(std::ios::fixed , std::ios::floatfield); // use decimal format + oss.setf(std::ios::fixed, std::ios::floatfield); // use decimal format oss.setf(std::ios::showpoint); // print decimal point oss << std::setprecision(precision); } diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_File.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_File.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_File.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_File.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_File.h sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_File.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_File.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_File.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice.h sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice.h 2018-09-13 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_Network.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_Network.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_Network.cpp 2018-08-17 22:00:35.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_Network.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_Network.h sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_Network.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_Network.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_Network.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_String.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_String.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_String.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_String.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_String.h sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_String.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputDevice_String.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputDevice_String.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/OutputFormatter.h sumo-1.2.0+dfsg1/src/utils/iodevices/OutputFormatter.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/OutputFormatter.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/OutputFormatter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.cpp sumo-1.2.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.cpp --- sumo-1.1.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.h sumo-1.2.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.h --- sumo-1.1.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/iodevices/PlainXMLFormatter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/Makefile.am sumo-1.2.0+dfsg1/src/utils/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -3,5 +3,5 @@ endif SUBDIRS = common distribution emissions \ -geom importio iodevices options shapes \ +geom importio iodevices options router shapes \ traci vehicle xml $(GUI_DIRS) diff -Nru sumo-1.1.0+dfsg1/src/utils/Makefile.in sumo-1.2.0+dfsg1/src/utils/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/Makefile.in 2018-12-17 23:00:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,650 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -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 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_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 emissions geom importio iodevices \ - options shapes traci vehicle xml foxtools gui -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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@ -@WITH_GUI_TRUE@GUI_DIRS = foxtools gui -SUBDIRS = common distribution emissions \ -geom importio iodevices options shapes \ -traci vehicle xml $(GUI_DIRS) - -all: all-recursive - -.SUFFIXES: -$(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) --foreign src/utils/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(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-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 - -GTAGS: - 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 - -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 - @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; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -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-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/options/Makefile.in sumo-1.2.0+dfsg1/src/utils/options/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/options/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,640 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/options -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = liboptions.a -liboptions_a_SOURCES = Option.cpp Option.h \ -OptionsCont.cpp OptionsCont.h \ -OptionsIO.cpp OptionsIO.h \ -OptionsLoader.cpp OptionsLoader.h \ -OptionsParser.cpp OptionsParser.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) --foreign src/utils/options/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/options/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Option.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionsCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionsIO.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionsLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionsParser.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/options/Option.cpp sumo-1.2.0+dfsg1/src/utils/options/Option.cpp --- sumo-1.1.0+dfsg1/src/utils/options/Option.cpp 2018-11-27 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/Option.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -405,6 +405,55 @@ } + +/* ------------------------------------------------------------------------- + * Option_BoolExtended - methods + * ----------------------------------------------------------------------- */ +Option_BoolExtended::Option_BoolExtended(bool value) + : Option_Bool(value), myValueString(value ? "true" : "false") { +} + + +Option_BoolExtended::~Option_BoolExtended() {} + + +Option_BoolExtended::Option_BoolExtended(const Option_BoolExtended& s) + : Option_Bool(s.myValue) { + myValueString = s.myValueString; +} + + +Option_BoolExtended& +Option_BoolExtended::operator=(const Option_BoolExtended& s) { + if (this == &s) { + return *this; + } + Option::operator=(s); + myValue = s.myValue; + myValueString = s.myValueString; + return *this; +} + + +bool +Option_BoolExtended::set(const std::string& v) { + try { + myValue = StringUtils::toBool(v); + myValueString = ""; + } catch (...) { + myValue = true; + myValueString = v; + } + return markSet(); +} + + +std::string +Option_BoolExtended::getValueString() const { + return myValueString; +} + + /* ------------------------------------------------------------------------- * Option_FileName - methods diff -Nru sumo-1.1.0+dfsg1/src/utils/options/Option.h sumo-1.2.0+dfsg1/src/utils/options/Option.h --- sumo-1.1.0+dfsg1/src/utils/options/Option.h 2018-11-27 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/Option.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -567,7 +567,7 @@ bool getBool() const; /** sets the given value (converts it to bool) */ - bool set(const std::string& v); + virtual bool set(const std::string& v); /** @brief Returns the string-representation of the value @@ -577,7 +577,7 @@ * @see std::string Option::getValueString() * @return The stored value encoded into a string */ - std::string getValueString() const; + virtual std::string getValueString() const; /** @brief Returns true, the information whether the option is a bool option @@ -590,13 +590,61 @@ bool isBool() const; -private: +protected: /** the value, valid only when the base-classes "myAmSet"-member is true */ bool myValue; }; + +/* ------------------------------------------------------------------------- + * Option_BoolExtended + * ----------------------------------------------------------------------- */ +class Option_BoolExtended : public Option_Bool { +public: + /** @brief Constructor for an option that can be used without an argument + * like Option_BoolExtended but which also handles value strings + * + * Calls Option(true) + * + * @param[in] value This option's default value + */ + Option_BoolExtended(bool value); + + + /** @brief Copy constructor */ + Option_BoolExtended(const Option_BoolExtended& s); + + + /** @brief Destructor */ + ~Option_BoolExtended(); + + + /** @brief Assignment operator */ + Option_BoolExtended& operator=(const Option_BoolExtended& s); + + + /** sets the given value (converts it to bool) */ + bool set(const std::string& v); + + + /** @brief Returns the string-representation of the value + * + * If myValue is true, "true" is returned, "false" otherwise. + * + * @see std::string Option::getValueString() + * @return The stored value encoded into a string + */ + std::string getValueString() const; + + +private: + /** the value, valid only when the base-classes "myAmSet"-member is true */ + std::string myValueString; + +}; + /* ------------------------------------------------------------------------- * Option_FileName * ----------------------------------------------------------------------- */ diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsCont.cpp sumo-1.2.0+dfsg1/src/utils/options/OptionsCont.cpp --- sumo-1.1.0+dfsg1/src/utils/options/OptionsCont.cpp 2018-11-27 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsCont.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -62,7 +62,7 @@ OptionsCont::OptionsCont() : myAddresses(), myValues(), myDeprecatedSynonymes(), myHaveInformedAboutDeprecatedDivider(false) { - myCopyrightNotices.push_back("Copyright (C) 2001-2018 German Aerospace Center (DLR) and others; http://sumo.dlr.de"); + myCopyrightNotices.push_back("Copyright (C) 2001-2019 German Aerospace Center (DLR) and others; https://sumo.dlr.de"); } @@ -74,7 +74,7 @@ void OptionsCont::doRegister(const std::string& name, Option* v) { assert(v != 0); - ItemAddressContType::iterator i = find(myAddresses.begin(), myAddresses.end(), v); + ItemAddressContType::iterator i = std::find(myAddresses.begin(), myAddresses.end(), v); if (i == myAddresses.end()) { myAddresses.push_back(v); } @@ -306,7 +306,7 @@ os << "Options set:" << std::endl; for (OptionsCont::KnownContType::const_iterator i = oc.myValues.begin(); i != oc.myValues.end(); i++) { - std::vector::iterator j = find(done.begin(), done.end(), (*i).first); + std::vector::iterator j = std::find(done.begin(), done.end(), (*i).first); if (j == done.end()) { std::vector synonymes = oc.getSynonymes((*i).first); if (synonymes.size() != 0) { @@ -460,7 +460,7 @@ OptionsCont::clear() { ItemAddressContType::iterator i; for (i = myAddresses.begin(); i != myAddresses.end(); i++) { - delete(*i); + delete (*i); } myAddresses.clear(); myValues.clear(); @@ -663,14 +663,8 @@ // print application description splitLines(os, myAppDescription, 0, 0); os << std::endl; - // print usage BNF - os << "Usage: " << myAppName << " [OPTION]*" << std::endl; - // print additional text if any - if (myAdditionalMessage.length() > 0) { - os << myAdditionalMessage << std::endl << ' ' << std::endl; - } - // print the options - // check their sizes first + + // check option sizes first // we want to know how large the largest not-too-large-entry will be int tooLarge = 40; int maxSize = 0; @@ -700,43 +694,33 @@ } } - for (i = mySubTopics.begin(); i != mySubTopics.end(); ++i) { - os << *i << " Options:" << std::endl; - const std::vector& entries = mySubTopicEntries[*i]; - for (j = entries.begin(); j != entries.end(); ++j) { - // start length computation - int csize = (int)j->length() + 2; - Option* o = getSecure(*j); - os << " "; - // write abbreviation if given - std::vector synonymes = getSynonymes(*j); - for (std::vector::const_iterator s = synonymes.begin(); s != synonymes.end(); ++s) { - if (s->length() == 1 && myDeprecatedSynonymes.count(*s) == 0) { - os << '-' << *s << ", "; - csize += 4; - break; - } - } - // write leading '-'/"--" - os << "--"; - csize += 2; - // write the name - os << *j; - // write the type if not a bool option - if (!o->isBool()) { - os << ' ' << o->getTypeName(); - csize += 1 + (int)o->getTypeName().length(); - } - csize += 2; - // write the description formatting it - os << " "; - for (int r = maxSize; r > csize; --r) { - os << ' '; + const std::string helpTopic = StringUtils::to_lower_case(getSecure("help")->getValueString()); + if (helpTopic != "") { + bool foundTopic = false; + for (const std::string& topic : mySubTopics) { + if (StringUtils::to_lower_case(topic).find(helpTopic) != std::string::npos) { + foundTopic = true; + printHelpOnTopic(topic, tooLarge, maxSize, os); + } + } + if (!foundTopic) { + // print topic list + os << "Help Topics:" << std::endl; + for (std::string t : mySubTopics) { + os << " " << t << std::endl; } - int offset = csize > tooLarge ? csize : maxSize; - splitLines(os, o->getDescription(), offset, maxSize); } - os << std::endl; + return; + } + // print usage BNF + os << "Usage: " << myAppName << " [OPTION]*" << std::endl; + // print additional text if any + if (myAdditionalMessage.length() > 0) { + os << myAdditionalMessage << std::endl << ' ' << std::endl; + } + // print the options + for (i = mySubTopics.begin(); i != mySubTopics.end(); ++i) { + printHelpOnTopic(*i, tooLarge, maxSize, os); } os << std::endl; // print usage examples, calc size first @@ -752,6 +736,44 @@ os << "Get in contact via ." << std::endl; } +void +OptionsCont::printHelpOnTopic(const std::string& topic, int tooLarge, int maxSize, std::ostream& os) { + os << topic << " Options:" << std::endl; + for (std::string entry : mySubTopicEntries[topic]) { + // start length computation + int csize = (int)entry.length() + 2; + Option* o = getSecure(entry); + os << " "; + // write abbreviation if given + std::vector synonymes = getSynonymes(entry); + for (std::vector::const_iterator s = synonymes.begin(); s != synonymes.end(); ++s) { + if (s->length() == 1 && myDeprecatedSynonymes.count(*s) == 0) { + os << '-' << *s << ", "; + csize += 4; + break; + } + } + // write leading '-'/"--" + os << "--"; + csize += 2; + // write the name + os << entry; + // write the type if not a bool option + if (!o->isBool()) { + os << ' ' << o->getTypeName(); + csize += 1 + (int)o->getTypeName().length(); + } + csize += 2; + // write the description formatting it + os << " "; + for (int r = maxSize; r > csize; --r) { + os << ' '; + } + int offset = csize > tooLarge ? csize : maxSize; + splitLines(os, o->getDescription(), offset, maxSize); + } + os << std::endl; +} void OptionsCont::writeConfiguration(std::ostream& os, const bool filled, @@ -917,7 +939,7 @@ const std::string& itemName) { if (isSet(optionName)) { std::vector values = getStringVector(optionName); - return find(values.begin(), values.end(), itemName) != values.end(); + return std::find(values.begin(), values.end(), itemName) != values.end(); } return false; } diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsCont.h sumo-1.2.0+dfsg1/src/utils/options/OptionsCont.h --- sumo-1.1.0+dfsg1/src/utils/options/OptionsCont.h 2018-11-27 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsCont.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -86,8 +86,6 @@ * subtopic the option belongs to must be given to OptionsCont. This is * done using addDescription(, , ). * @see addDescription - * - * @see http://sumo.dlr.de/wiki/index.php/OptionsSubSystem */ class OptionsCont { public: @@ -166,6 +164,12 @@ */ void printHelp(std::ostream& os); + /** @brief Prints help on the given topic + * + * @param[in] topic The topic name + * @param[in] os The stream to write the help into + */ + void printHelpOnTopic(const std::string& topic, int tooLarge, int maxSize, std::ostream& os); /** @brief Writes the configuration * diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsIO.cpp sumo-1.2.0+dfsg1/src/utils/options/OptionsIO.cpp --- sumo-1.1.0+dfsg1/src/utils/options/OptionsIO.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsIO.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsIO.h sumo-1.2.0+dfsg1/src/utils/options/OptionsIO.h --- sumo-1.1.0+dfsg1/src/utils/options/OptionsIO.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsIO.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsLoader.cpp sumo-1.2.0+dfsg1/src/utils/options/OptionsLoader.cpp --- sumo-1.1.0+dfsg1/src/utils/options/OptionsLoader.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsLoader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsLoader.h sumo-1.2.0+dfsg1/src/utils/options/OptionsLoader.h --- sumo-1.1.0+dfsg1/src/utils/options/OptionsLoader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsLoader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsParser.cpp sumo-1.2.0+dfsg1/src/utils/options/OptionsParser.cpp --- sumo-1.1.0+dfsg1/src/utils/options/OptionsParser.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsParser.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/options/OptionsParser.h sumo-1.2.0+dfsg1/src/utils/options/OptionsParser.h --- sumo-1.1.0+dfsg1/src/utils/options/OptionsParser.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/options/OptionsParser.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/router/AccessEdge.h sumo-1.2.0+dfsg1/src/utils/router/AccessEdge.h --- sumo-1.1.0+dfsg1/src/utils/router/AccessEdge.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/AccessEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,55 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file AccessEdge.h +/// @author Michael Behrisch +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The AccessEdge is a special intermodal edge connecting different modes +/****************************************************************************/ +#ifndef AccessEdge_h +#define AccessEdge_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "IntermodalEdge.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the access edge connecting different modes that is given to the internal router (SUMOAbstractRouter) +template +class AccessEdge : public IntermodalEdge { +private: + typedef IntermodalEdge _IntermodalEdge; + +public: + AccessEdge(int numericalID, const _IntermodalEdge* inEdge, const _IntermodalEdge* outEdge, const double length) : + _IntermodalEdge(inEdge->getID() + ":" + outEdge->getID(), numericalID, outEdge->getEdge(), "!access"), + myLength(length > 0. ? length : NUMERICAL_EPS) { } + + double getTravelTime(const IntermodalTrip* const trip, double /* time */) const { + return myLength / trip->speed; + } + +private: + const double myLength; + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/AStarLookupTable.h sumo-1.2.0+dfsg1/src/utils/router/AStarLookupTable.h --- sumo-1.1.0+dfsg1/src/utils/router/AStarLookupTable.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/AStarLookupTable.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,409 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file AStarLookupTable.h +/// @author Jakob Erdmann +/// @date July 2017 +/// @version $Id$ +/// +// Precomputed landmark distances to speed up the A* routing algorithm +/****************************************************************************/ +#ifndef AStarLookupTable_h +#define AStarLookupTable_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include + +#ifdef HAVE_FOX +#include +#endif + +#define UNREACHABLE (std::numeric_limits::max() / 1000.0) + +//#define ASTAR_DEBUG_LOOKUPTABLE +//#define ASTAR_DEBUG_LOOKUPTABLE_FROM "disabled" +//#define ASTAR_DEBUG_UNREACHABLE + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class LandmarkLookupTable + * @brief Computes the shortest path through a network using the A* 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_withPermissions/noProhibitions) + * @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 AbstractLookupTable { +public: + /// @brief provide a lower bound on the distance between from and to (excluding traveltime of both edges) + virtual double lowerBound(const E* from, const E* to, double speed, double speedFactor, double fromEffort, double toEffort) const = 0; + + /// @brief whether the heuristic ist consistent (found nodes are always visited on the shortest path the first time) + virtual bool consistent() const = 0; +}; + + +template +class FullLookupTable : public AbstractLookupTable { +public: + FullLookupTable(const std::string& filename, const int size) : + myTable(size) { + BinaryInputDevice dev(filename); + for (int i = 0; i < size; i++) { + for (int j = 0; j < size; j++) { + double val; + dev >> val; + myTable[i].push_back(val); + } + } + } + + virtual ~FullLookupTable() { + } + + double lowerBound(const E* from, const E* to, double /*speed*/, double speedFactor, double /*fromEffort*/, double /*toEffort*/) const { + return myTable[from->getNumericalID()][to->getNumericalID()] / speedFactor; + } + + bool consistent() const { + return true; + } + +private: + std::vector > myTable; +}; + + +template +class LandmarkLookupTable : public AbstractLookupTable { +public: + LandmarkLookupTable(const std::string& filename, const std::vector& edges, SUMOAbstractRouter* router, const V* defaultVehicle, const std::string& outfile, const int maxNumThreads) { + myFirstNonInternal = -1; + std::map numericID; + for (E* e : edges) { + if (!e->isInternal()) { + if (myFirstNonInternal == -1) { + myFirstNonInternal = e->getNumericalID(); + } + numericID[e->getID()] = e->getNumericalID() - myFirstNonInternal; + } + } + std::ifstream strm(filename.c_str()); + if (!strm.good()) { + throw ProcessError("Could not load landmark-lookup-table from '" + filename + "'."); + } + std::ofstream* ostrm = nullptr; + if (!outfile.empty()) { + ostrm = new std::ofstream(outfile.c_str()); + if (!ostrm->good()) { + throw ProcessError("Could not open file '" + outfile + "' for writing."); + } + } + std::string line; + int numLandMarks = 0; + while (std::getline(strm, line)) { + if (line == "") { + break; + } + //std::cout << "'" << line << "'" << "\n"; + StringTokenizer st(line); + if (st.size() == 1) { + const std::string lm = st.get(0); + myLandmarks[lm] = numLandMarks++; + myFromLandmarkDists.push_back(std::vector(0)); + myToLandmarkDists.push_back(std::vector(0)); + if (ostrm != nullptr) { + (*ostrm) << lm << "\n"; + } + } else { + assert(st.size() == 4); + const std::string lm = st.get(0); + const std::string edge = st.get(1); + if (numericID[edge] != (int)myFromLandmarkDists[myLandmarks[lm]].size()) { + WRITE_WARNING("Unknown or unordered edge '" + edge + "' in landmark file."); + } + const double distFrom = StringUtils::toDouble(st.get(2)); + const double distTo = StringUtils::toDouble(st.get(3)); + myFromLandmarkDists[myLandmarks[lm]].push_back(distFrom); + myToLandmarkDists[myLandmarks[lm]].push_back(distTo); + } + } + if (myLandmarks.empty()) { + WRITE_WARNING("No landmarks in '" + filename + "', falling back to standard A*."); + delete ostrm; + return; + } +#ifdef HAVE_FOX + FXWorkerThread::Pool threadPool; +#endif + for (int i = 0; i < (int)myLandmarks.size(); ++i) { + if ((int)myFromLandmarkDists[i].size() != (int)edges.size() - myFirstNonInternal) { + const std::string landmarkID = getLandmark(i); + const E* landmark = nullptr; + // retrieve landmark edge + for (const E* const edge : edges) { + if (edge->getID() == landmarkID) { + landmark = edge; + break; + } + } + if (landmark == nullptr) { + WRITE_WARNING("Landmark '" + landmarkID + "' does not exist in the network."); + continue; + } + if (router != nullptr) { + const std::string missing = outfile.empty() ? filename + ".missing" : outfile; + WRITE_WARNING("Not all network edges were found in the lookup table '" + filename + "' for landmark '" + landmarkID + "'. Saving missing values to '" + missing + "'."); + if (ostrm == nullptr) { + ostrm = new std::ofstream(missing.c_str()); + if (!ostrm->good()) { + throw ProcessError("Could not open file '" + missing + "' for writing."); + } + } + } else { + throw ProcessError("Not all network edges were found in the lookup table '" + filename + "' for landmark '" + landmarkID + "'."); + } + std::vector routeLM(1, landmark); + const double lmCost = router->recomputeCosts(routeLM, defaultVehicle, 0); + std::vector route; +#ifdef HAVE_FOX + if (maxNumThreads > 0) { + if (threadPool.size() == 0) { + // The CHRouter needs initialization + // before it gets cloned, so we do a dummy routing which is not in parallel + router->compute(landmark, landmark, defaultVehicle, 0, route); + route.clear(); + while ((int)threadPool.size() < maxNumThreads) { + new WorkerThread(threadPool, router->clone(), defaultVehicle); + } + } + std::vector currentTasks; + for (int j = (int)myFromLandmarkDists[i].size() + myFirstNonInternal; j < (int)edges.size(); ++j) { + const E* edge = edges[j]; + if (landmark != edge) { + std::vector routeE(1, edge); + const double sourceDestCost = lmCost + router->recomputeCosts(routeE, defaultVehicle, 0); + // compute from-distance (skip taz-sources and other unreachable edges) + if (edge->getPredecessors().size() > 0 && landmark->getSuccessors().size() > 0) { + currentTasks.push_back(new RoutingTask(landmark, edge, sourceDestCost)); + threadPool.add(currentTasks.back()); + } + // compute to-distance (skip unreachable landmarks) + if (landmark->getPredecessors().size() > 0 && edge->getSuccessors().size() > 0) { + currentTasks.push_back(new RoutingTask(edge, landmark, sourceDestCost)); + threadPool.add(currentTasks.back()); + } + } + } + threadPool.waitAll(false); + int taskIndex = 0; + for (int j = (int)myFromLandmarkDists[i].size() + myFirstNonInternal; j < (int)edges.size(); ++j) { + const E* edge = edges[j]; + double distFrom = -1; + double distTo = -1; + if (landmark == edge) { + distFrom = 0; + distTo = 0; + } else { + if (edge->getPredecessors().size() > 0 && landmark->getSuccessors().size() > 0) { + distFrom = currentTasks[taskIndex]->getCost(); + delete currentTasks[taskIndex++]; + } + if (landmark->getPredecessors().size() > 0 && edge->getSuccessors().size() > 0) { + distTo = currentTasks[taskIndex]->getCost(); + delete currentTasks[taskIndex++]; + } + } + myFromLandmarkDists[i].push_back(distFrom); + myToLandmarkDists[i].push_back(distTo); + (*ostrm) << landmarkID << " " << edge->getID() << " " << distFrom << " " << distTo << "\n"; + } + currentTasks.clear(); + continue; + } +#else + UNUSED_PARAMETER(maxNumThreads); +#endif + for (int j = (int)myFromLandmarkDists[i].size() + myFirstNonInternal; j < (int)edges.size(); ++j) { + const E* edge = edges[j]; + double distFrom = -1.; + double distTo = -1.; + if (landmark == edge) { + distFrom = 0.; + distTo = 0.; + } else { + std::vector routeE(1, edge); + const double sourceDestCost = lmCost + router->recomputeCosts(routeE, defaultVehicle, 0); + // compute from-distance (skip taz-sources and other unreachable edges) + if (edge->getPredecessors().size() > 0 && landmark->getSuccessors().size() > 0) { + if (router->compute(landmark, edge, defaultVehicle, 0, route)) { + distFrom = MAX2(0.0, router->recomputeCosts(route, defaultVehicle, 0) - sourceDestCost); + route.clear(); + } + } + // compute to-distance (skip unreachable landmarks) + if (landmark->getPredecessors().size() > 0 && edge->getSuccessors().size() > 0) { + if (router->compute(edge, landmark, defaultVehicle, 0, route)) { + distTo = MAX2(0.0, router->recomputeCosts(route, defaultVehicle, 0) - sourceDestCost); + route.clear(); + } + } + } + myFromLandmarkDists[i].push_back(distFrom); + myToLandmarkDists[i].push_back(distTo); + (*ostrm) << landmarkID << " " << edge->getID() << " " << distFrom << " " << distTo << "\n"; + } + } + } + delete ostrm; + } + + virtual ~LandmarkLookupTable() { + } + + double lowerBound(const E* from, const E* to, double speed, double speedFactor, double fromEffort, double toEffort) const { + double result = from->getDistanceTo(to) / speed; +#ifdef ASTAR_DEBUG_LOOKUPTABLE + if (from->getID() == ASTAR_DEBUG_LOOKUPTABLE_FROM) { + std::cout << " lowerBound to=" << to->getID() << " result1=" << result << "\n"; + } +#endif + for (int i = 0; i < (int)myLandmarks.size(); ++i) { + // a cost of -1 is used to encode unreachability. + const double fl = myToLandmarkDists[i][from->getNumericalID() - myFirstNonInternal]; + const double tl = myToLandmarkDists[i][to->getNumericalID() - myFirstNonInternal]; + if (fl >= 0 && tl >= 0) { + const double bound = (fl - tl - toEffort) / speedFactor; +#ifdef ASTAR_DEBUG_LOOKUPTABLE + if (from->getID() == ASTAR_DEBUG_LOOKUPTABLE_FROM && result < bound) { + std::cout << " landmarkTo=" << getLandmark(i) << " result2=" << bound + << " fl=" << fl << " tl=" << tl << "\n"; + } +#endif + result = MAX2(result, bound); + } + const double lt = myFromLandmarkDists[i][to->getNumericalID() - myFirstNonInternal]; + const double lf = myFromLandmarkDists[i][from->getNumericalID() - myFirstNonInternal]; + if (lt >= 0 && lf >= 0) { + const double bound = (lt - lf - fromEffort) / speedFactor; +#ifdef ASTAR_DEBUG_LOOKUPTABLE + if (from->getID() == ASTAR_DEBUG_LOOKUPTABLE_FROM && result < bound) { + std::cout << " landmarkFrom=" << getLandmark(i) << " result3=" << bound + << " lt=" << lt << " lf=" << lf << "\n"; + } +#endif + result = MAX2(result, bound); + } + if ((tl >= 0 && fl < 0) + || (lf >= 0 && lt < 0)) { + // target unreachable. +#ifdef ASTAR_DEBUG_UNREACHABLE + std::cout << " unreachable: from=" << from->getID() << " to=" << to->getID() << " landmark=" << getLandmark(i) << " " + << ((tl >= 0 && fl < 0) ? " (toLandmark)" : " (fromLandmark)") + << " fl=" << fl << " tl=" << tl << " lt=" << lt << " lf=" << lf + << "\n"; +#endif + return UNREACHABLE; + } + } + return result; + } + + bool consistent() const { + return false; + } + +private: + std::map myLandmarks; + std::vector > myFromLandmarkDists; + std::vector > myToLandmarkDists; + int myFirstNonInternal; + +#ifdef HAVE_FOX +private: + class WorkerThread : public FXWorkerThread { + public: + WorkerThread(FXWorkerThread::Pool& pool, + SUMOAbstractRouter* router, const V* vehicle) + : FXWorkerThread(pool), myRouter(router), myVehicle(vehicle) {} + virtual ~WorkerThread() { + delete myRouter; + } + double compute(const E* src, const E* dest, const double costOff) { + double result = -1.; + if (myRouter->compute(src, dest, myVehicle, 0, myRoute)) { + result = MAX2(0.0, myRouter->recomputeCosts(myRoute, myVehicle, 0) + costOff); + myRoute.clear(); + } + return result; + } + private: + SUMOAbstractRouter* myRouter; + const V* myVehicle; + std::vector myRoute; + }; + + class RoutingTask : public FXWorkerThread::Task { + public: + RoutingTask(const E* src, const E* dest, const double costOff) + : mySrc(src), myDest(dest), myCost(-costOff) {} + void run(FXWorkerThread* context) { + myCost = ((WorkerThread*)context)->compute(mySrc, myDest, myCost); + } + double getCost() { + return myCost; + } + private: + const E* const mySrc; + const E* const myDest; + double myCost; + private: + /// @brief Invalidated assignment operator. + RoutingTask& operator=(const RoutingTask&); + }; + + +private: + /// @brief for multi threaded routing +#endif + + std::string getLandmark(int i) const { + for (std::map::const_iterator it = myLandmarks.begin(); it != myLandmarks.end(); ++it) { + if (it->second == i) { + return it->first; + } + } + return ""; + } +}; + + + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/router/AStarRouter.h sumo-1.2.0+dfsg1/src/utils/router/AStarRouter.h --- sumo-1.1.0+dfsg1/src/utils/router/AStarRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/AStarRouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,316 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file AStarRouter.h +/// @author Jakob Erdmann +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date January 2012 +/// @version $Id$ +/// +// A* Algorithm using euclidean distance heuristic. +// Based on DijkstraRouter. For routing by effort a novel heuristic would be needed. +/****************************************************************************/ +#ifndef AStarRouter_h +#define AStarRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "AStarLookupTable.h" +#include "SUMOAbstractRouter.h" + +#define UNREACHABLE (std::numeric_limits::max() / 1000.0) + +//#define ASTAR_DEBUG_QUERY +//#define ASTAR_DEBUG_QUERY_FOLLOWERS +//#define ASTAR_DEBUG_QUERY_PERF +//#define ASTAR_DEBUG_VISITED +//#define ASTAR_DEBUG_LOOKUPTABLE +//#define ASTAR_DEBUG_LOOKUPTABLE_FROM "disabled" +//#define ASTAR_DEBUG_UNREACHABLE + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class AStarRouter + * @brief Computes the shortest path through a network using the A* algorithm. + * + * The template parameters are: + * @param E The edge class to use (MSEdge/ROEdge) + * @param V The vehicle class to use (MSVehicle/ROVehicle) + * @param BASE The base class to use (SUMOAbstractRouterPermissions/SUMOAbstractRouter) + * + * 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 BASE { +public: + typedef AbstractLookupTable LookupTable; + typedef FullLookupTable FLT; + typedef LandmarkLookupTable LMLT; + + /** + * @class EdgeInfoComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeInfoComparator { + public: + /// Comparing method + bool operator()(const typename BASE::EdgeInfo* nod1, const typename BASE::EdgeInfo* nod2) const { + if (nod1->heuristicEffort == nod2->heuristicEffort) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->heuristicEffort > nod2->heuristicEffort; + } + }; + + /// Constructor + AStarRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation operation, const std::shared_ptr lookup = 0) : + BASE("AStarRouter", unbuildIsWarning, operation), + myLookupTable(lookup), + myMaxSpeed(NUMERICAL_EPS) { + for (const E* const edge : edges) { + myEdgeInfos.push_back(typename BASE::EdgeInfo(edge)); + myMaxSpeed = MAX2(myMaxSpeed, edge->getSpeedLimit() * MAX2(1.0, edge->getLengthGeometryFactor())); + } + } + + AStarRouter(const std::vector& edgeInfos, bool unbuildIsWarning, typename BASE::Operation operation, const std::shared_ptr lookup = 0) : + BASE("AStarRouter", unbuildIsWarning, operation), + myLookupTable(lookup), + myMaxSpeed(NUMERICAL_EPS) { + for (const auto& edgeInfo : edgeInfos) { + myEdgeInfos.push_back(typename BASE::EdgeInfo(edgeInfo.edge)); + myMaxSpeed = MAX2(myMaxSpeed, edgeInfo.edge->getSpeedLimit() * edgeInfo.edge->getLengthGeometryFactor()); + } + } + + /// Destructor + virtual ~AStarRouter() {} + + virtual SUMOAbstractRouter* clone() { + return new AStarRouter(myEdgeInfos, this->myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, myLookupTable); + } + + void init() { + // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up + for (auto& edgeInfo : myFrontierList) { + edgeInfo->reset(); + } + myFrontierList.clear(); + for (auto& edgeInfo : myFound) { + edgeInfo->reset(); + } + myFound.clear(); + } + + + /** @brief Builds the route between the given edges using the minimum travel time */ + virtual bool compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into, bool silent = false) { + assert(from != 0 && to != 0); + // check whether from and to can be used + if (this->isProhibited(from, vehicle)) { + if (!silent) { + this->myErrorMsgHandler->inform("Vehicle '" + Named::getIDSecure(vehicle) + "' is not allowed on source edge '" + from->getID() + "'."); + } + return false; + } + if (this->isProhibited(to, vehicle)) { + if (!silent) { + this->myErrorMsgHandler->inform("Vehicle '" + Named::getIDSecure(vehicle) + "' is not allowed on destination edge '" + to->getID() + "'."); + } + return false; + } + double length = 0.; // dummy for the via edge cost update + this->startQuery(); +#ifdef ASTAR_DEBUG_QUERY + std::cout << "DEBUG: starting search for '" << Named::getIDSecure(vehicle) << "' speed: " << MIN2(vehicle->getMaxSpeed(), myMaxSpeed * vehicle->getChosenSpeedFactor()) << " time: " << STEPS2TIME(msTime) << "\n"; +#endif + const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); + if (this->myBulkMode) { + const auto& toInfo = myEdgeInfos[to->getNumericalID()]; + if (toInfo.visited) { + buildPathFrom(&toInfo, into); + this->endQuery(1); + return true; + } + } else { + init(); + // add begin node + auto* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); + fromInfo->effort = 0.; + fromInfo->heuristicEffort = 0.; + fromInfo->prev = nullptr; + fromInfo->leaveTime = STEPS2TIME(msTime); + myFrontierList.push_back(fromInfo); + } + // loop + int num_visited = 0; + const bool mayRevisit = myLookupTable != 0 && !myLookupTable->consistent(); + const double speed = vehicle == nullptr ? myMaxSpeed : MIN2(vehicle->getMaxSpeed(), myMaxSpeed * vehicle->getChosenSpeedFactor()); + while (!myFrontierList.empty()) { + num_visited += 1; + // use the node with the minimal length + auto* const minimumInfo = myFrontierList.front(); + const E* const minEdge = minimumInfo->edge; + // check whether the destination node was already reached + if (minEdge == to) { + buildPathFrom(minimumInfo, into); + this->endQuery(num_visited); +#ifdef ASTAR_DEBUG_QUERY_PERF + std::cout << "visited " + toString(num_visited) + " edges (final path length=" + toString(into.size()) + + " time=" + toString(recomputeCosts(into, vehicle, msTime)) + + " edges=" + toString(into) + ")\n"; +#endif +#ifdef ASTAR_DEBUG_VISITED + OutputDevice& dev = OutputDevice::getDevice(Named::getIDSecure(vehicle) + "_" + time2string(msTime) + "_" + from->getID() + "_" + to->getID()); + for (const auto& i : myEdgeInfos) { + if (i.visited) { + dev << "edge:" << i.edge->getID() << "\n"; + } + } + dev.close(); +#endif + return true; + } + std::pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + myFrontierList.pop_back(); + myFound.push_back(minimumInfo); + minimumInfo->visited = true; +#ifdef ASTAR_DEBUG_QUERY + std::cout << "DEBUG: hit=" << minEdge->getID() + << " TT=" << minimumInfo->effort + << " EF=" << this->getEffort(minEdge, vehicle, minimumInfo->leaveTime) + << " HT=" << minimumInfo->heuristicEffort + << " Q(TT,HT,Edge)="; + for (typename std::vector::iterator it = myFrontierList.begin(); it != myFrontierList.end(); it++) { + std::cout << (*it)->effort << "," << (*it)->heuristicEffort << "," << (*it)->edge->getID() << " "; + } + std::cout << "\n"; +#endif + const double effortDelta = this->getEffort(minEdge, vehicle, minimumInfo->leaveTime); + const double leaveTime = minimumInfo->leaveTime + this->getTravelTime(minEdge, vehicle, minimumInfo->leaveTime, effortDelta); + + // admissible A* heuristic: straight line distance at maximum speed + const double heuristic_remaining = (myLookupTable == nullptr ? minEdge->getDistanceTo(to) / speed : + myLookupTable->lowerBound(minEdge, to, speed, vehicle->getChosenSpeedFactor(), + minEdge->getMinimumTravelTime(nullptr), to->getMinimumTravelTime(nullptr))); + if (heuristic_remaining == UNREACHABLE) { + continue; + } + const double heuristicEffort = minimumInfo->effort + effortDelta + heuristic_remaining; + // check all ways from the node with the minimal length + for (const std::pair& follower : minEdge->getViaSuccessors(vClass)) { + auto* const followerInfo = &(myEdgeInfos[follower.first->getNumericalID()]); + // check whether it can be used + if (this->isProhibited(follower.first, vehicle)) { + continue; + } + double effort = minimumInfo->effort + effortDelta; + double time = leaveTime; + this->updateViaEdgeCost(follower.second, vehicle, time, effort, length); + const double oldEffort = followerInfo->effort; + if ((!followerInfo->visited || mayRevisit) && effort < oldEffort) { + followerInfo->effort = effort; + // if we use the effort including the via effort below we would count the via twice as shown by the ticket676 test + followerInfo->heuristicEffort = MIN2(heuristicEffort, followerInfo->heuristicEffort); + followerInfo->leaveTime = time; + followerInfo->prev = minimumInfo; +#ifdef ASTAR_DEBUG_QUERY_FOLLOWERS + std::cout << " follower=" << followerInfo->edge->getID() + << " OEF=" << (oldEffort == std::numeric_limits::max() ? "inf" : toString(oldEffort)) + << " TT=" << effort << " HR=" << heuristic_remaining << " HT=" << followerInfo->heuristicEffort << "\n"; +#endif + if (oldEffort == std::numeric_limits::max()) { + myFrontierList.push_back(followerInfo); + std::push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + } else { + auto fi = std::find(myFrontierList.begin(), myFrontierList.end(), followerInfo); + if (fi == myFrontierList.end()) { + assert(mayRevisit); + myFrontierList.push_back(followerInfo); + std::push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + } else { + std::push_heap(myFrontierList.begin(), fi + 1, myComparator); + } + } + } + } + } + this->endQuery(num_visited); +#ifdef ASTAR_DEBUG_QUERY_PERF + std::cout << "visited " + toString(num_visited) + " edges (unsuccessful path length: " + toString(into.size()) + ")\n"; +#endif + if (!silent) { + this->myErrorMsgHandler->inform("No connection between edge '" + from->getID() + "' and edge '" + to->getID() + "' found."); + } + return false; + } + +public: + /// Builds the path from marked edges + void buildPathFrom(const typename BASE::EdgeInfo* rbegin, std::vector& edges) { + std::vector tmp; + while (rbegin != 0) { + tmp.push_back(rbegin->edge); + rbegin = rbegin->prev; + } + std::copy(tmp.rbegin(), tmp.rend(), 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 lookup table for travel time heuristics + const std::shared_ptr myLookupTable; + + /// @brief maximum speed in the network + double myMaxSpeed; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/router/CarEdge.h sumo-1.2.0+dfsg1/src/utils/router/CarEdge.h --- sumo-1.1.0+dfsg1/src/utils/router/CarEdge.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/CarEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,141 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file CarEdge.h +/// @author Michael Behrisch +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The CarEdge is a special intermodal edge representing the SUMO network edge +/****************************************************************************/ +#ifndef CarEdge_h +#define CarEdge_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#ifdef HAVE_FOX +#include +#endif +#include "IntermodalEdge.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the car edge type that is given to the internal router (SUMOAbstractRouter) +template +class CarEdge : public IntermodalEdge { +private: + typedef IntermodalEdge _IntermodalEdge; + +public: + CarEdge(int numericalID, const E* edge, const double pos = -1.) : + _IntermodalEdge(edge->getID() + "_car" + toString(pos), numericalID, edge, "!car"), + myStartPos(pos >= 0 ? pos : 0.) { } + + bool includeInRoute(bool /* allEdges */) const { + return true; + } + + const std::vector<_IntermodalEdge*>& getSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { + if (vClass == SVC_IGNORING) { + return this->myFollowingEdges; + } +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + typename std::map >::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 successors + const std::set classedCarFollowers = std::set(this->getEdge()->getSuccessors(vClass).begin(), this->getEdge()->getSuccessors(vClass).end()); + for (_IntermodalEdge* const e : this->myFollowingEdges) { + if (!e->includeInRoute(false) || e->getEdge() == this->getEdge() || classedCarFollowers.count(e->getEdge()) > 0) { + myClassesSuccessorMap[vClass].push_back(e); + } + } + return myClassesSuccessorMap[vClass]; + } + } + + virtual const std::vector >& getViaSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { + if (vClass == SVC_IGNORING) { + return this->myFollowingViaEdges; + } +#ifdef HAVE_FOX + FXMutexLock locker(myLock); +#endif + typename std::map > >::const_iterator i = myClassesViaSuccessorMap.find(vClass); + if (i != myClassesViaSuccessorMap.end()) { + // can use cached value + return i->second; + } else { + // this vClass is requested for the first time. rebuild all successors + const std::set > classedCarFollowers = std::set >(this->getEdge()->getViaSuccessors(vClass).begin(), this->getEdge()->getViaSuccessors(vClass).end()); + for (const std::pair& e : this->myFollowingViaEdges) { + const auto viaPair = std::make_pair(e.first->getEdge(), e.second == nullptr ? nullptr : e.second->getEdge()); + if (!e.first->includeInRoute(false) || e.first->getEdge() == this->getEdge() || classedCarFollowers.count(viaPair) > 0) { + myClassesViaSuccessorMap[vClass].push_back(e); + } + } + return myClassesViaSuccessorMap[vClass]; + } + } + + bool prohibits(const IntermodalTrip* const trip) const { + return trip->vehicle == 0 || this->getEdge()->prohibits(trip->vehicle); + } + + double getTravelTime(const IntermodalTrip* const trip, double time) const { + const double travelTime = E::getTravelTimeStatic(this->getEdge(), trip->vehicle, time); + double distTravelled = this->getLength(); + // checking arrivalPos first to have it correct for identical depart and arrival edge + if (this->getEdge() == trip->to) { + distTravelled = trip->arrivalPos - myStartPos; + } + if (this->getEdge() == trip->from) { + distTravelled -= trip->departPos - myStartPos; + } + return travelTime * distTravelled / this->getEdge()->getLength(); + } + + double getStartPos() const { + return myStartPos; + } + + double getEndPos() const { + return myStartPos + this->getLength(); + } + +private: + /// @brief the starting position for split edges + const double myStartPos; + + /// @brief The successors available for a given vClass + mutable std::map > myClassesSuccessorMap; + + /// @brief The successors available for a given vClass + mutable std::map > > myClassesViaSuccessorMap; + +#ifdef HAVE_FOX + /// The mutex used to avoid concurrent updates of myClassesSuccessorMap + mutable FXMutex myLock; +#endif +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/CHBuilder.h sumo-1.2.0+dfsg1/src/utils/router/CHBuilder.h --- sumo-1.1.0+dfsg1/src/utils/router/CHBuilder.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/CHBuilder.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,529 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file CHBuilder.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date February 2012 +/// @version $Id$ +/// +// Contraction Hierarchy Builder for the shortest path search +/****************************************************************************/ +#ifndef CHBuilder_h +#define CHBuilder_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "SPTree.h" + +//#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_withPermissions/noProhibitions) + * + * 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 CHBuilder { + +public: + /// @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(int t, double c, SVCPermissions p): target(t), cost(c), permissions(p) {} + int target; + double cost; + SVCPermissions permissions; + }; + + typedef std::pair ConstEdgePair; + typedef std::map ShortcutVia; + struct Hierarchy { + ShortcutVia shortcuts; + std::vector > forwardUplinks; + std::vector > backwardUplinks; + }; + + /** @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 svc + */ + CHBuilder(const std::vector& edges, bool unbuildIsWarning, + const SUMOVehicleClass svc, + bool validatePermissions): + myEdges(edges), + myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), + mySPTree(new SPTree(4, validatePermissions)), + mySVC(svc), + myUpdateCount(0) { + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + myCHInfos.push_back(CHInfo(*i)); + } + } + + /// Destructor + virtual ~CHBuilder() { + delete mySPTree; + } + + + const Hierarchy* buildContractionHierarchy(SUMOTime time, const V* const vehicle, const SUMOAbstractRouter* effortProvider) { + Hierarchy* result = new Hierarchy(); + const int numEdges = (int)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 + // reset previous connections etc + for (int i = 0; i < numEdges; i++) { + myCHInfos[i].resetContractionState(); + result->forwardUplinks.push_back(std::vector()); + result->backwardUplinks.push_back(std::vector()); + } + // copy connections from the original net + const double time_seconds = STEPS2TIME(time); // timelines store seconds! + for (int i = 0; i < numEdges; i++) { + synchronize(myCHInfos[i], time_seconds, vehicle, effortProvider); + } + // synchronization is finished. now we can compute priorities for the first time + for (int i = 0; i < numEdges; i++) { + myCHInfos[i].updatePriority(mySPTree); + queue.push_back(&(myCHInfos[i])); + } + std::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 + const E* const edge = max->edge; + // add outgoing connections to the forward search + const int edgeID = edge->getNumericalID(); + for (typename CHConnections::const_iterator it = max->followers.begin(); it != max->followers.end(); it++) { + const CHConnection& con = *it; + result->forwardUplinks[edgeID].push_back(Connection(con.target->edge->getNumericalID(), con.cost, con.permissions)); + disconnect(con.target->approaching, max); + con.target->updatePriority(0); + } + // add incoming connections to the backward search + for (typename CHConnections::const_iterator it = max->approaching.begin(); it != max->approaching.end(); it++) { + const CHConnection& con = *it; + result->backwardUplinks[edgeID].push_back(Connection(con.target->edge->getNumericalID(), con.cost, con.permissions)); + disconnect(con.target->followers, max); + con.target->updatePriority(0); + } + // add shortcuts to the net + for (typename std::vector::const_iterator it = max->shortcuts.begin(); it != max->shortcuts.end(); it++) { + const ConstEdgePair& edgePair = it->edgePair; + result->shortcuts[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)); + } + // if you need to debug the chrouter with MSVC uncomment the following line, hierarchy building will get slower and the hierarchy may change though + //std::make_heap(queue.begin(), queue.end(), myCmp); + // remove from queue + std::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); + } + std::make_heap(queue.begin(), queue.end(), myCmp); + } + */ + contractionRank++; + } + // reporting + const long duration = SysUtils::getCurrentMillis() - startMillis; + WRITE_MESSAGE("Created " + toString(result->shortcuts.size()) + " shortcuts."); + WRITE_MESSAGE("Recomputed priority " + toString(myUpdateCount) + " times."); + MsgHandler::getMessageInstance()->endProcessMsg("done (" + toString(duration) + "ms)."); + PROGRESS_DONE_MESSAGE(); + myUpdateCount = 0; + return result; + } + +private: + struct Shortcut { + Shortcut(ConstEdgePair e, double c, int u, SVCPermissions p): + edgePair(e), cost(c), underlying(u), permissions(p) {} + ConstEdgePair edgePair; + double cost; + int underlying; + SVCPermissions permissions; + }; + + + class CHInfo; + + /// @brief Forward/backward connection with associated FORWARD cost + class CHConnection { + public: + CHConnection(CHInfo* t, double c, SVCPermissions p, int u): + target(t), cost(c), permissions(p), underlying(u) {} + CHInfo* target; + double 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 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(const E* e) : + edge(e), + priority(0.), + contractedNeighbors(0), + rank(-1), + level(0), + underlyingTotal(0), + visited(false), + traveltime(std::numeric_limits::max()), + depth(0), + permissions(SVC_IGNORING) { + } + + /// @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 double oldPriority = priority; + // priority term as used by abraham [] + const int edge_difference = (int)followers.size() + (int)approaching.size() - 2 * (int)shortcuts.size(); + priority = (double)(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 = (int)approaching.size() + (int)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 double 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(ConstEdgePair(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 double 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(ConstEdgePair(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 + const E* edge; + /// @brief The contraction priority + double priority; + /// @brief The needed shortcuts + std::vector 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 + double 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 double 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"; + } + + }; + + + /** + * @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, double time, const V* const vehicle, const SUMOAbstractRouter* effortProvider) { + // 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 double baseCost = effortProvider->getEffort(edge, vehicle, time); + + for (const std::pair& successor : edge->getViaSuccessors(mySVC)) { + const E* fEdge = successor.first; + if (prune && ((fEdge->getPermissions() & mySVC) != mySVC)) { + continue; + } + CHInfo* const follower = getCHInfo(fEdge); + const SVCPermissions permissions = (edge->getPermissions() & fEdge->getPermissions()); + double cost = baseCost; + const E* viaEdge = successor.second; + while (viaEdge != nullptr && viaEdge->isInternal()) { + cost += effortProvider->getEffort(viaEdge, vehicle, time); + viaEdge = viaEdge->getViaSuccessors().front().first; + } + 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); + } + + /** @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)) { + std::pop_heap(queue.begin(), queue.end(), myCmp); + std::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 all edges with numerical ids + const std::vector& myEdges; + + /// @brief the handler for routing errors + MsgHandler* const myErrorMsgHandler; + + /// @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 permissions for which the hierarchy was constructed + const SUMOVehicleClass mySVC; + + /// @brief counters for performance logging + int myUpdateCount; + +private: + /// @brief Invalidated assignment operator + CHBuilder& operator=(const CHBuilder& s); +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/router/CHRouter.h sumo-1.2.0+dfsg1/src/utils/router/CHRouter.h --- sumo-1.1.0+dfsg1/src/utils/router/CHRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/CHRouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,412 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file CHRouter.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date February 2012 +/// @version $Id$ +/// +// Shortest Path search using a Contraction Hierarchy +/****************************************************************************/ +#ifndef CHRouter_h +#define CHRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "CHBuilder.h" + +//#define CHRouter_DEBUG_QUERY +//#define CHRouter_DEBUG_QUERY_PERF + +// =========================================================================== +// 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_withPermissions/noProhibitions) + * + * 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 BASE { + +public: + /// Type of the function that is used to retrieve the edge effort. + typedef double(* Operation)(const E* const, const V* const, double); + + /// A meeting point of the two search scopes + typedef std::pair Meeting; + + /** + * @class Unidirectional + * class for searching in one direction + */ + class Unidirectional { + public: + /// @brief Constructor + Unidirectional(const std::vector& edges, bool forward): + myAmForward(forward), + myVehicle(0) { + for (const E* const e : edges) { + myEdgeInfos.push_back(typename BASE::EdgeInfo(e)); + } + } + + inline bool found(const E* const edge) const { + return myFound.count(edge) > 0; + } + + inline typename BASE::EdgeInfo* getEdgeInfo(const E* const edge) { + return &(myEdgeInfos[edge->getNumericalID()]); + } + + inline const typename BASE::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 typename BASE::EdgeInfo* nod1, const typename BASE::EdgeInfo* nod2) const { + if (nod1->effort == nod2->effort) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->effort > nod2->effort; + } + }; + + + 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 (auto ei : myFrontier) { + ei->reset(); + } + myFrontier.clear(); + for (auto edge : myFound) { + getEdgeInfo(edge)->reset(); + } + myFound.clear(); + myVehicle = vehicle; + auto startInfo = getEdgeInfo(start); + startInfo->effort = 0.; + startInfo->prev = nullptr; + myFrontier.push_back(startInfo); + } + + + typedef std::vector::Connection> ConnectionVector; + /** @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 std::vector& uplinks, const Unidirectional& otherSearch, double& minTTSeen, Meeting& meeting) { + // pop the node with the minimal length + auto* const minimumInfo = myFrontier.front(); + std::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 auto* const otherInfo = otherSearch.getEdgeInfo(minEdge); + const double ttSeen = minimumInfo->effort + otherInfo->effort; +#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 (const auto& uplink : uplinks[minEdge->getNumericalID()]) { + const auto upwardInfo = &myEdgeInfos[uplink.target]; + const double effort = minimumInfo->effort + uplink.cost; + const SUMOVehicleClass svc = myVehicle->getVClass(); + // check whether it can be used + if ((uplink.permissions & svc) != svc) { + continue; + } + const double oldEffort = upwardInfo->effort; + if (!upwardInfo->visited && effort < oldEffort) { + upwardInfo->effort = effort; + upwardInfo->prev = minimumInfo; + if (oldEffort == std::numeric_limits::max()) { + myFrontier.push_back(upwardInfo); + std::push_heap(myFrontier.begin(), myFrontier.end(), myComparator); + } else { + std::push_heap(myFrontier.begin(), + std::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()->effort < minTTSeen; + } + + private: + /// @brief the role of this search + bool myAmForward; + /// @brief the min edge heap + std::vector myFrontier; + /// @brief the set of visited (settled) Edges + std::set myFound; + /// @brief The container of edge information + std::vector myEdgeInfos; + + EdgeInfoByTTComparator myComparator; + + const V* myVehicle; + + }; + + /** @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 svc + */ + CHRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation operation, + const SUMOVehicleClass svc, + SUMOTime weightPeriod, + bool validatePermissions): + BASE("CHRouter", unbuildIsWarning, operation), + myEdges(edges), + myForwardSearch(edges, true), + myBackwardSearch(edges, false), + myHierarchyBuilder(new CHBuilder(edges, unbuildIsWarning, svc, validatePermissions)), + myHierarchy(0), + myWeightPeriod(weightPeriod), + myValidUntil(0), + mySVC(svc) { + } + + /** @brief Cloning constructor + */ + CHRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation operation, + const SUMOVehicleClass svc, + SUMOTime weightPeriod, + const typename CHBuilder::Hierarchy* hierarchy) : + BASE("CHRouterClone", unbuildIsWarning, operation), + myEdges(edges), + myForwardSearch(edges, true), + myBackwardSearch(edges, false), + myHierarchyBuilder(0), + myHierarchy(hierarchy), + myWeightPeriod(weightPeriod), + myValidUntil(0), + mySVC(svc) { + } + + /// Destructor + virtual ~CHRouter() { + if (myHierarchyBuilder != 0) { + delete myHierarchy; + delete myHierarchyBuilder; + } + } + + + virtual SUMOAbstractRouter* clone() { + WRITE_MESSAGE("Cloning Contraction Hierarchy for " + SumoVehicleClassStrings.getString(mySVC) + " and time " + time2string(myValidUntil) + "."); + CHRouter* clone = new CHRouter(myEdges, this->myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, + mySVC, myWeightPeriod, myHierarchy); + clone->myValidUntil = myValidUntil; + return clone; + } + + /** @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 bool compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into, bool silent = false) { + assert(from != 0 && to != 0); + // assert(myHierarchyBuilder.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); + double minTTSeen = std::numeric_limits::max(); + Meeting meeting(nullptr, nullptr); + bool continueForward = true; + bool continueBackward = true; + int num_visited_fw = 0; + int num_visited_bw = 0; + bool result = true; + while (continueForward || continueBackward) { + if (continueForward) { + continueForward = myForwardSearch.step(myHierarchy->forwardUplinks, myBackwardSearch, minTTSeen, meeting); + num_visited_fw += 1; + } + if (continueBackward) { + continueBackward = myBackwardSearch.step(myHierarchy->backwardUplinks, myForwardSearch, minTTSeen, meeting); + num_visited_bw += 1; + } + } + if (minTTSeen < std::numeric_limits::max()) { + buildPathFromMeeting(meeting, into); + } else { + if (!silent) { + this->myErrorMsgHandler->inform("No connection between edge '" + from->getID() + "' and edge '" + to->getID() + "' found."); + } + result = false; + } +#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); + return result; + } + + /// normal routing methods + + /// Builds the path from marked edges + void buildPathFromMeeting(Meeting meeting, std::vector& into) const { + std::deque tmp; + const auto* 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); + } + } + } + } + + void buildContractionHierarchy(SUMOTime time, const V* const vehicle) { + if (myHierarchyBuilder != 0) { + delete myHierarchy; + myHierarchy = myHierarchyBuilder->buildContractionHierarchy(time, vehicle, this); + } + // declare new validUntil (prevent overflow) + if (myWeightPeriod < std::numeric_limits::max()) { + myValidUntil = time + myWeightPeriod; + } else { + myValidUntil = myWeightPeriod; + } + } + +private: + // retrieve the via edge for a shortcut + const E* getVia(const E* forwardFrom, const E* forwardTo) const { + typename CHBuilder::ConstEdgePair forward(forwardFrom, forwardTo); + typename CHBuilder::ShortcutVia::const_iterator it = myHierarchy->shortcuts.find(forward); + if (it != myHierarchy->shortcuts.end()) { + return it->second; + } else { + return 0; + } + } + + +private: + /// @brief all edges with numerical ids + const std::vector& myEdges; + + /// @brief the unidirectional search queues + Unidirectional myForwardSearch; + Unidirectional myBackwardSearch; + + CHBuilder* myHierarchyBuilder; + const typename CHBuilder::Hierarchy* myHierarchy; + + /// @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 + const SUMOVehicleClass mySVC; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/router/CHRouterWrapper.h sumo-1.2.0+dfsg1/src/utils/router/CHRouterWrapper.h --- sumo-1.1.0+dfsg1/src/utils/router/CHRouterWrapper.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/CHRouterWrapper.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,192 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file CHRouterWrapper.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date March 2012 +/// @version $Id$ +/// +// Wraps multiple CHRouters for different vehicle types +/****************************************************************************/ +#ifndef CHRouterWrapper_h +#define CHRouterWrapper_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "CHRouter.h" + +#ifdef HAVE_FOX +#include +#endif + + +// =========================================================================== +// 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_withPermissions/noProhibitions) + * + * 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 BASE { + +public: + /// Type of the function that is used to retrieve the edge effort. + typedef double(* Operation)(const E* const, const V* const, double); + + /** @brief Constructor + */ + CHRouterWrapper(const std::vector& edges, const bool ignoreErrors, typename BASE::Operation operation, + const SUMOTime begin, const SUMOTime end, const SUMOTime weightPeriod, const int numThreads) : + BASE("CHRouterWrapper", ignoreErrors, operation), + myEdges(edges), + myIgnoreErrors(ignoreErrors), + myBegin(begin), + myEnd(end), + myWeightPeriod(weightPeriod), + myMaxNumInstances(numThreads) { + } + + ~CHRouterWrapper() { + for (typename RouterMap::iterator i = myRouters.begin(); i != myRouters.end(); ++i) { + for (typename std::vector::iterator j = i->second.begin(); j != i->second.end(); ++j) { + delete *j; + } + } + } + + + virtual SUMOAbstractRouter* clone() { + CHRouterWrapper* clone = new CHRouterWrapper(myEdges, myIgnoreErrors, this->myOperation, myBegin, myEnd, myWeightPeriod, myMaxNumInstances); + for (typename RouterMap::iterator i = myRouters.begin(); i != myRouters.end(); ++i) { + for (typename std::vector::iterator j = i->second.begin(); j != i->second.end(); ++j) { + clone->myRouters[i->first].push_back(static_cast((*j)->clone())); + } + } + return clone; + } + + + bool compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into, bool silent = false) { + const std::pair svc = std::make_pair(vehicle->getVClass(), vehicle->getMaxSpeed()); + int index = 0; + int numIntervals = 1; +#ifdef HAVE_FOX + if (myMaxNumInstances >= 2 && myEnd < std::numeric_limits::max()) { + index = (int)((msTime - myBegin) / myWeightPeriod); + numIntervals = (int)((myEnd - myBegin) / myWeightPeriod); + if (numIntervals > 0) { + while ((int)myThreadPool.size() < myMaxNumInstances) { + new FXWorkerThread(myThreadPool); + } + } else { + // this covers the cases of negative (unset) end time and unset weight period (no weight file) + numIntervals = 1; + } + } +#endif + 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 + for (int i = 0; i < numIntervals; i++) { + myRouters[svc].push_back(new CHRouterType( + myEdges, myIgnoreErrors, &E::getTravelTimeStatic, svc.first, myWeightPeriod, false)); +#ifdef HAVE_FOX + if (myThreadPool.size() > 0) { + myThreadPool.add(new ComputeHierarchyTask(myRouters[svc].back(), vehicle, myBegin + i * myWeightPeriod)); + } +#endif + } +#ifdef HAVE_FOX + if (myThreadPool.size() > 0) { + myThreadPool.waitAll(); + } +#endif + } + return myRouters[svc][index]->compute(from, to, vehicle, msTime, into, silent); + } + + +private: + typedef CHRouter > CHRouterType; + +#ifdef HAVE_FOX +private: + class ComputeHierarchyTask : public FXWorkerThread::Task { + public: + ComputeHierarchyTask(CHRouterType* router, const V* const vehicle, const SUMOTime msTime) + : myRouter(router), myVehicle(vehicle), myStartTime(msTime) {} + void run(FXWorkerThread* /* context */) { + myRouter->buildContractionHierarchy(myStartTime, myVehicle); + } + private: + CHRouterType* myRouter; + const V* const myVehicle; + const SUMOTime myStartTime; + private: + /// @brief Invalidated assignment operator. + ComputeHierarchyTask& operator=(const ComputeHierarchyTask&); + }; + + +private: + /// @brief for multi threaded routing + FXWorkerThread::Pool myThreadPool; +#endif + +private: + typedef std::map, std::vector > RouterMap; + + RouterMap myRouters; + + /// @brief all edges with numerical ids + const std::vector& myEdges; + + const bool myIgnoreErrors; + + const SUMOTime myBegin; + const SUMOTime myEnd; + const SUMOTime myWeightPeriod; + const int myMaxNumInstances; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/router/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/router/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/router/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,31 @@ +set(utils_router_STAT_SRCS + AStarLookupTable.h + AStarRouter.h + AccessEdge.h + CarEdge.h + PedestrianEdge.h + PublicTransportEdge.h + StopEdge.h + CHBuilder.h + CHRouter.h + CHRouterWrapper.h + DijkstraRouter.h + IntermodalEdge.h + IntermodalNetwork.h + IntermodalRouter.h + IntermodalTrip.h + EffortCalculator.h + GawronCalculator.h + LogitCalculator.h + RouteCostCalculator.h + PedestrianRouter.h + RouterProvider.h + SUMOAbstractRouter.h + SPTree.h + FareModul.h + FareToken.h + FareZones.h) + +if (MSVC) + add_custom_target(z_utils_router SOURCES ${utils_router_STAT_SRCS}) +endif() \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/src/utils/router/DijkstraRouter.h sumo-1.2.0+dfsg1/src/utils/router/DijkstraRouter.h --- sumo-1.1.0+dfsg1/src/utils/router/DijkstraRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/DijkstraRouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,274 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file DijkstraRouter.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 25 July 2005 +/// @version $Id$ +/// +// Dijkstra shortest path algorithm using travel time or other values +/****************************************************************************/ +#ifndef DijkstraRouter_h +#define DijkstraRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "EffortCalculator.h" +#include "SUMOAbstractRouter.h" + +//#define DijkstraRouter_DEBUG_QUERY +//#define DijkstraRouter_DEBUG_QUERY_PERF + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class DijkstraRouter + * @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 BASE The base class to use (SUMOAbstractRouterPermissions/SUMOAbstractRouter) + * + * 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 DijkstraRouter : public BASE { +public: + /** + * @class EdgeInfoByEffortComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeInfoByEffortComparator { + public: + /// Comparing method + bool operator()(const typename BASE::EdgeInfo* nod1, const typename BASE::EdgeInfo* nod2) const { + if (nod1->effort == nod2->effort) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->effort > nod2->effort; + } + }; + + + /// Constructor + DijkstraRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation effortOperation, + typename BASE::Operation ttOperation = nullptr, bool silent = false, EffortCalculator* calc = nullptr) : + BASE("DijkstraRouter", unbuildIsWarning, effortOperation, ttOperation), + mySilent(silent), myExternalEffort(calc) { + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + myEdgeInfos.push_back(typename BASE::EdgeInfo(*i)); + } + } + + /// Destructor + virtual ~DijkstraRouter() { } + + virtual SUMOAbstractRouter* clone() { + return new DijkstraRouter(myEdgeInfos, this->myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, this->myTTOperation, mySilent, myExternalEffort); + } + + void init() { + // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up + for (auto& edgeInfo : myFrontierList) { + edgeInfo->reset(); + } + myFrontierList.clear(); + for (auto& edgeInfo : myFound) { + edgeInfo->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 bool compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into, bool silent = false) { + assert(from != 0 && (vehicle == 0 || to != 0)); + // check whether from and to can be used + if (this->isProhibited(from, vehicle)) { + if (!silent) { + this->myErrorMsgHandler->inform("Vehicle '" + Named::getIDSecure(vehicle) + "' is not allowed on source edge '" + from->getID() + "'."); + } + return false; + } + if (this->isProhibited(to, vehicle)) { + if (!silent) { + this->myErrorMsgHandler->inform("Vehicle '" + Named::getIDSecure(vehicle) + "' is not allowed on destination edge '" + to->getID() + "'."); + } + return false; + } + double length = 0.; // dummy for the via edge cost update + this->startQuery(); +#ifdef DijkstraRouter_DEBUG_QUERY + std::cout << "DEBUG: starting search for '" << Named::getIDSecure(vehicle) << "' time: " << STEPS2TIME(msTime) << "\n"; +#endif + const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); + if (this->myBulkMode) { + const auto& toInfo = myEdgeInfos[to->getNumericalID()]; + if (toInfo.visited) { + buildPathFrom(&toInfo, into); + this->endQuery(1); + return true; + } + } else { + init(); + // add begin node + auto* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); + fromInfo->effort = 0.; + fromInfo->prev = nullptr; + fromInfo->leaveTime = STEPS2TIME(msTime); + if (myExternalEffort != nullptr) { + myExternalEffort->setInitialState(fromInfo->edge->getNumericalID()); + } + myFrontierList.push_back(fromInfo); + } + // loop + int num_visited = 0; + while (!myFrontierList.empty()) { + num_visited += 1; + // use the node with the minimal length + auto* const minimumInfo = myFrontierList.front(); + const E* const minEdge = minimumInfo->edge; +#ifdef DijkstraRouter_DEBUG_QUERY + std::cout << "DEBUG: hit '" << minEdge->getID() << "' Eff: " << minimumInfo->effort << ", Leave: " << minimumInfo->leaveTime << " Q: "; + for (auto& it : myFrontierList) { + std::cout << it->effort << "," << it->edge->getID() << " "; + } + std::cout << "\n"; +#endif + // check whether the destination node was already reached + if (minEdge == to) { + //propagate last external effort state to destination edge + if (myExternalEffort != nullptr) { + myExternalEffort->update(minEdge->getNumericalID(), minimumInfo->prev->edge->getNumericalID(), minEdge->getLength()); + } + buildPathFrom(minimumInfo, into); + this->endQuery(num_visited); +#ifdef DijkstraRouter_DEBUG_QUERY_PERF + std::cout << "visited " + toString(num_visited) + " edges (final path length=" + toString(into.size()) + " edges=" + toString(into) + ")\n"; +#endif + return true; + } + std::pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + myFrontierList.pop_back(); + myFound.push_back(minimumInfo); + minimumInfo->visited = true; + const double effortDelta = this->getEffort(minEdge, vehicle, minimumInfo->leaveTime); + const double leaveTime = minimumInfo->leaveTime + this->getTravelTime(minEdge, vehicle, minimumInfo->leaveTime, effortDelta); + if (myExternalEffort != nullptr) { + myExternalEffort->update(minEdge->getNumericalID(), minimumInfo->prev->edge->getNumericalID(), minEdge->getLength()); + } + // check all ways from the node with the minimal length + for (const std::pair& follower : minEdge->getViaSuccessors(vClass)) { + auto* const followerInfo = &(myEdgeInfos[follower.first->getNumericalID()]); + // check whether it can be used + if (this->isProhibited(follower.first, vehicle)) { + continue; + } + double effort = minimumInfo->effort + effortDelta; + double time = leaveTime; + this->updateViaEdgeCost(follower.second, vehicle, time, effort, length); + assert(effort >= minimumInfo->effort); + assert(time >= minimumInfo->leaveTime); + const double oldEffort = followerInfo->effort; + if (!followerInfo->visited && effort < oldEffort) { + followerInfo->effort = effort; + followerInfo->leaveTime = time; + followerInfo->prev = minimumInfo; + if (oldEffort == std::numeric_limits::max()) { + myFrontierList.push_back(followerInfo); + std::push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + } else { + std::push_heap(myFrontierList.begin(), + std::find(myFrontierList.begin(), myFrontierList.end(), followerInfo) + 1, + myComparator); + } + } + } + } + this->endQuery(num_visited); +#ifdef DijkstraRouter_DEBUG_QUERY_PERF + std::cout << "visited " + toString(num_visited) + " edges (unsuccessful path length: " + toString(into.size()) + ")\n"; +#endif + if (to != 0 && !mySilent && !silent) { + this->myErrorMsgHandler->inform("No connection between edge '" + from->getID() + "' and edge '" + to->getID() + "' found."); + } + return false; + } + + + /// Builds the path from marked edges + void buildPathFrom(const typename BASE::EdgeInfo* rbegin, std::vector& edges) { + std::vector tmp; + while (rbegin != 0) { + tmp.push_back(rbegin->edge); + rbegin = rbegin->prev; + } + std::copy(tmp.rbegin(), tmp.rend(), std::back_inserter(edges)); + } + + const typename BASE::EdgeInfo& getEdgeInfo(int index) const { + return myEdgeInfos[index]; + } + +private: + DijkstraRouter(const std::vector& edgeInfos, bool unbuildIsWarning, + typename BASE::Operation effortOperation, typename BASE::Operation ttOperation, bool silent, EffortCalculator* calc) : + BASE("DijkstraRouter", unbuildIsWarning, effortOperation, ttOperation), + mySilent(silent), + myExternalEffort(calc) { + for (const auto& edgeInfo : edgeInfos) { + myEdgeInfos.push_back(typename BASE::EdgeInfo(edgeInfo.edge)); + } + } + +private: + /// @brief whether to supress warning/error if no route was found + bool mySilent; + + EffortCalculator* const myExternalEffort; + + /// 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; +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/EffortCalculator.h sumo-1.2.0+dfsg1/src/utils/router/EffortCalculator.h --- sumo-1.1.0+dfsg1/src/utils/router/EffortCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/EffortCalculator.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,60 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file EffortCalculator.h +/// @author Michael Behrisch +/// @date 2018-08-21 +/// @version $Id$ +/// +// The EffortCalculator is an interface for additional edge effort calculators +/****************************************************************************/ +#ifndef EffortCalculator_h +#define EffortCalculator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the effort calculator interface +class EffortCalculator { + +public: + + /** Pass the set of all edges in the routing query to the effortCalculator **/ + virtual void init(const std::vector& edges) = 0; + + /** Add information about stops **/ + virtual void addStop(const int stopEdge, const Parameterised& params) = 0; + + /** Return the effort of a given edge **/ + virtual double getEffort(const int numericalID) const = 0; + + /** Update the effort of the edge **/ + virtual void update(const int edge, const int prev, const double length) = 0; + + /** Set the effort of the first edge in the query to zero **/ + virtual void setInitialState(const int edge) = 0; + + /** basic output facility to inform about effort at this edge **/ + virtual std::string output(const int edge) const = 0; + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/FareModul.h sumo-1.2.0+dfsg1/src/utils/router/FareModul.h --- sumo-1.1.0+dfsg1/src/utils/router/FareModul.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/FareModul.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,561 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file FareModul.h +/// @author Ricardo Euler +/// @date Thu, 17 August 2018 +/// @version $Id$ +/// +// Fare Modul for calculating prices during intermodal routing +/****************************************************************************/ +#ifndef SUMO_FAREMODUL_H +#define SUMO_FAREMODUL_H + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include "EffortCalculator.h" +#include "FareToken.h" +#include "FareZones.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +class ZoneCounter { +public: + + explicit ZoneCounter(unsigned int ct) : + myCount(ct) { + + } + + inline void addZone(int zoneNumber) { + zoneNumber = getOverlayZone(zoneNumber); + if (zoneNumber == 0) { + return; + } + long long int repNum = fareZoneToRep[zoneNumber]; + //assert power of 2 + if (bitcount(repNum) == 0) { + return; + } + myCount = myCount | repNum; + } + + + int numZones() const { + return bitcount(myCount); + } + + +private: + inline int bitcount(long long int intVal) const { + int count = 0; + long long int counter = intVal; + + while (counter != 0) { + counter = counter & (counter - 1); + ++count; + } + return count; + } + +private: + long long int myCount; + + +}; + + + +/** + * A fare state collects all the information that is necessary to compute the price. Is used as an edge label + * in IntermodalRouter + */ +struct FareState { + friend class FareModul; + +public: + + /** default constructor for unlabeled edges**/ + explicit FareState(): + myFareToken(FareToken::None), + myCounter(std::numeric_limits::max()), + myTravelledDistance(std::numeric_limits::max()), + myVisistedStops(std::numeric_limits::max()), + myPriceDiff(0) { + }; + + /** + * + * @param token + */ + explicit FareState(FareToken token): + myFareToken(token), + myCounter(0), + myTravelledDistance(0), + myVisistedStops(0), + myPriceDiff(0) {} + + /** Destructor **/ + ~FareState() = default; + + /** + * returns true if fare state is set and not on default + * @return if state is set + */ + bool isValid() const { + return !(myFareToken == FareToken::None); + } + +private: + + /** fare token **/ + FareToken myFareToken; + /** zone counter **/ + ZoneCounter myCounter; + /** travelled distance in km**/ + double myTravelledDistance; + /**num of visited stops**/ + int myVisistedStops; + /** price diff to previous edge **/ + double myPriceDiff; + +}; + + + +struct Prices { + + + + /** Prices for zones **/ + std::vector zonePrices = std::vector {1.9, 3.4, 4.9, 6.2, 7.7, 9.2}; + double halle = 2.3; + double leipzig = 2.7; + double t1 = 1.5; + double t2 = 1.6; + double t3 = 1.6; + double shortTrip = 1.6; + double shortTripLeipzig = 1.9; + double shortTripHalle = 1.7; + double maxPrice = 10.6; +}; + + +/** + * The fare modul responsible for calculating prices + */ +class FareModul : public EffortCalculator { +public: + + /** Constructor ***/ + FareModul() : + myFareStates() + {}; + + /**Implementation of EffortCalculator **/ + void init(const std::vector& edges) override { + myEdges = edges; + myFareStates.resize(edges.size()); + } + + void addStop(const int stopEdge, const Parameterised& params) override { + myStopFareZone[stopEdge] = StringUtils::toInt(params.getParameter("fareZone")); + myStopFareToken[stopEdge] = FareUtil::stringToToken(params.getParameter("fareToken")); + myStopStartToken[stopEdge] = FareUtil::stringToToken(params.getParameter("startToken")); + } + + /**Implementation of EffortCalculator **/ + double getEffort(const int numericalID) const override { + double effort = 0; + FareState const& state = myFareStates.at(numericalID); + if (state.isValid()) { + effort = state.myPriceDiff; + } else { + effort = std::numeric_limits::max(); + } + return effort; + } + + /** Implementation of EffortCalculator **/ + void update(const int edge, const int prev, const double length) override { + + std::string const& edgeType = myEdges[edge]; + + //get propagated fare state + FareState& state = myFareStates.at(prev); + + double oldPr; + if (state.myFareToken == FareToken::START) { + oldPr = 0; + } else { + oldPr = computePrice(state); + } + //treat public transport edges + if (edgeType.c_str()[0] != '!') { + updateFareStatePublic(state, edge, length); + } else if (edgeType == "!stop") { + updateFareStateStop(state, edge); + } else if (edgeType == "!ped") { + updateFareStatePedestrian(state, edge); + } else if (edgeType == "!access") { + updateFareStateAccess(state, edge, prev); + } else { + updateFareState(state, edge); + } + FareState& stateAtE = myFareStates[edge]; + double newPr = computePrice(stateAtE); + stateAtE.myPriceDiff = newPr - oldPr; + + assert(stateAtE.myPriceDiff >= 0); + + } + + /** Implementation of EffortCalculator + * _IntermodalEdge should be an Connector Edge **/ + void setInitialState(const int edge) override { +// assert( edge->getLine() == "!connector"); + + myFareStates[edge] = FareState(FareToken::START); + + } + + +private: + /** List of all fare states **/ + std::vector myFareStates; + + /** List of all edge line attributes **/ + std::vector myEdges; + + /** the fare zone this stop is a part of **/ + std::map myStopFareZone; + + /** the faretoken that can be collected at this station **/ + std::map myStopFareToken; + + /** the faretoken that is used when a trip is started at this station **/ + std::map myStopStartToken; + + /** List of the prices **/ + Prices prices; + + double computePrice(FareState const& fareState) const { + switch (fareState.myFareToken) { + case FareToken ::H: + return prices.halle; + case FareToken ::L: + return prices.leipzig; + case FareToken ::T1: + return prices.t1; + case FareToken ::T2: + return prices.t2; + case FareToken ::T3: + return prices.t3; + case FareToken::U: + return prices.zonePrices[0]; + case FareToken ::Z: + return prices.zonePrices[fareState.myCounter.numZones() - 1]; + case FareToken ::M: + return prices.maxPrice; + case FareToken ::K: + return prices.shortTrip; + case FareToken ::KL: + case FareToken ::KLZ: + case FareToken ::KLU: + return prices.shortTripLeipzig; + case FareToken ::KH: + case FareToken ::KHU: + case FareToken ::KHZ: + return prices.shortTripHalle; + case FareToken::Free: + return 1.4; + case FareToken ::START: + return 0; + case FareToken::ZU: + case FareToken::None: + assert(false); + + } + return std::numeric_limits::max(); + } + + + + std::string output(const int edge) const override { + + FareState const& my = myFareStates[edge]; + std::stringstream msg; + /* + msg << "Final fare state at edge of type: " << myEdges[edge] << std::endl; + msg << "Faretoken" << FareUtil::tokenToString(my.myFareToken) << std::endl; + msg << "Price:" << computePrice(my) << std::endl; + msg << "Zones " << my.myCounter.numZones() << std::endl; + msg << "Stations: " << my.myVisistedStops << std::endl; + msg << "Distance:" << my.myTravelledDistance << std::endl; + */ + msg << FareUtil::tokenToTicket(my.myFareToken) << " "; + if (my.myFareToken == FareToken::Z) { + msg << my.myCounter.numZones() << " "; + if (my.myCounter.numZones() == 1) { + msg << "Zone"; + } else { + msg << "Zonen"; + } + + } else if (my.myFareToken == FareToken::U) { + msg << my.myCounter.numZones() << "1 Zone"; + + } + msg << ":" << computePrice(my); + return msg.str(); + } + + void updateFareStateStop(FareState const& currentFareState, const int stopEdge) { + + FareToken collectedToken = myStopFareToken[stopEdge]; + + //if station has no fare information, just propagate + if (collectedToken == FareToken::None) { + std::cout << "Progagating fare state for stop w/o a price!" << std::endl; + return; + } + + FareToken const& token = currentFareState.myFareToken; + + FareState& stateAtE = myFareStates[stopEdge]; + + stateAtE = currentFareState; + + stateAtE.myCounter.addZone(myStopFareZone[stopEdge]); + + stateAtE.myVisistedStops++; + + switch (token) { + case FareToken ::Free: + stateAtE.myFareToken = myStopStartToken[stopEdge]; + break; + case FareToken::M : + break; + + case FareToken::Z : + if (stateAtE.myCounter.numZones() > 6) { + stateAtE.myFareToken = FareToken::M; + } + break; + + case FareToken::T1 : + case FareToken::T2 : + case FareToken::T3 : + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = stateAtE.myTravelledDistance <= 4000 ? FareToken::K : FareToken::Z; + } + break; + case FareToken::U : + if (collectedToken == FareToken::H) { + stateAtE.myFareToken = FareToken::H; + } + if (collectedToken == FareToken::L) { + stateAtE.myFareToken = FareToken::L; + } + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken::Z; + } + break; + case FareToken::H: + case FareToken::L: + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken::Z; + } + break; + case FareToken::KH: + if (stateAtE.myVisistedStops <= 4) { + if (collectedToken == FareToken::U) { + stateAtE.myFareToken = FareToken::KHU; + } + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken::KHZ; + } + } else { + if (collectedToken == FareToken::H) { + stateAtE.myFareToken = FareToken ::H; + } + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken ::Z; + } + if (collectedToken == FareToken::U) { + stateAtE.myFareToken = FareToken ::U; + } + } + break; + case FareToken::KL: + if (stateAtE.myVisistedStops <= 4) { + if (collectedToken == FareToken::U) { + stateAtE.myFareToken = FareToken::KLU; + } + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken::KLZ; + } + } else { + if (collectedToken == FareToken::L) { + stateAtE.myFareToken = FareToken ::L; + } + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken ::Z; + } + if (collectedToken == FareToken::U) { + stateAtE.myFareToken = FareToken ::U; + } + } + break; + case FareToken::K: + if (stateAtE.myTravelledDistance > 4000) { + if (collectedToken == FareToken::U) { + stateAtE.myFareToken = FareToken ::U; + } + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken ::Z; + } + } + break; + case FareToken::KHU : + case FareToken::KLU : + if (stateAtE.myVisistedStops > 4) { + if (collectedToken == FareToken::U) { + stateAtE.myFareToken = FareToken::U; + } + } + break; + + case FareToken::KLZ: + case FareToken::KHZ: + if (stateAtE.myVisistedStops > 4) { + if (collectedToken == FareToken::Z) { + stateAtE.myFareToken = FareToken::Z; + } + } + break; + case FareToken::ZU : + assert(false); + if (collectedToken == FareToken::U) { + stateAtE.myFareToken = FareToken::U; + } else { + stateAtE.myFareToken = FareToken::Z; + } + + break; + default: + std::cout << "Reached invalid position in fareToken selection!" << std::endl; + assert(false); + break; + } + } + + void updateFareStatePedestrian(FareState const& currentFareState, const int pedestrianEdge) { + + //only propagates the fare state + FareState& stateAtE = myFareStates[pedestrianEdge]; + + stateAtE = currentFareState; + + if (currentFareState.myFareToken == FareToken::START) { + stateAtE.myFareToken = FareToken::Free; + } + + } + + + void updateFareStatePublic(FareState const& currentFareState, const int publicTransportEdge, const double length) { + + + if (currentFareState.myFareToken == FareToken::None) { + return; + } + + FareState& stateAtE = myFareStates[publicTransportEdge]; + + stateAtE = currentFareState; + stateAtE.myTravelledDistance += length; + } + + void updateFareState(FareState const& currentFareState, const int intermodalEdge) { + + if (currentFareState.myFareToken == FareToken::None) { + return; + } + + FareState& stateAtE = myFareStates[intermodalEdge]; + + stateAtE = currentFareState; + + if (currentFareState.myFareToken == FareToken::START) { + stateAtE.myFareToken = FareToken::Free; + } + + } + + void updateFareStateAccess(FareState const& currentFareState, const int accessEdge, const int prev) { + + FareToken const& token = currentFareState.myFareToken; + + FareState& stateAtE = myFareStates[accessEdge]; + + stateAtE = currentFareState; + + if (currentFareState.myFareToken == FareToken::START) { + stateAtE.myFareToken = FareToken::Free; + } + + if (myEdges[prev] == "!ped") { + switch (token) { + + case FareToken::Free ://we have not yet taken public transport + break; + case FareToken::K : + if (currentFareState.myCounter.numZones() == 0) { + stateAtE.myFareToken = FareToken::U; + } else { + stateAtE.myFareToken = FareToken::Z; + } + break; + case FareToken::KH : + stateAtE.myFareToken = FareToken::H; + break; + case FareToken::KL : + stateAtE.myFareToken = FareToken::L; + break; + case FareToken::KLU : + stateAtE.myFareToken = FareToken::L; + break; + case FareToken::KHU: + stateAtE.myFareToken = FareToken::H; + break; + case FareToken::KLZ : + stateAtE.myFareToken = FareToken::Z; + break; + case FareToken::KHZ: + stateAtE.myFareToken = FareToken::Z; + break; + default: + return; + } + } + + } +}; + + +#endif //SUMO_FAREMODUL_H diff -Nru sumo-1.1.0+dfsg1/src/utils/router/FareToken.h sumo-1.2.0+dfsg1/src/utils/router/FareToken.h --- sumo-1.1.0+dfsg1/src/utils/router/FareToken.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/FareToken.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,206 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file FareToken.h +/// @author Ricardo Euler +/// @date Thu, 17 August 2018 +/// @version $Id$ +/// +// Fare Modul for calculating prices during intermodal routing +/****************************************************************************/ + +#ifndef SUMO_FARETOKEN_H +#define SUMO_FARETOKEN_H +enum class FareToken : int { + None = 0, + Free = 1, // walking and other things can be free + H = 2, + L = 3, + T1 = 4, + T2 = 5, + T3 = 6, + Z = 7, + M = 8, + U = 9, + KL = 10, + KH = 11, + K = 12, + KHU = 13, + KLU = 14, + KHZ = 15, + KLZ = 16, + ZU = 17, //Artificial state for after leaving short trip khu or klu since a pedestrian edge does not allow us + //to distinguish between z or u zones + START = 18 + +}; + +namespace FareUtil { + +inline std::string tokenToString(FareToken const& token) { + switch (token) { + case FareToken::H: + return "H"; + case FareToken::L: + return "L"; + case FareToken::T1: + return "T1"; + case FareToken::T2: + return "T2"; + case FareToken::T3: + return "T3"; + case FareToken::U: + return "U"; + case FareToken::Z: + return "Z"; + case FareToken::M: + return "M"; + case FareToken::K: + return "K"; + case FareToken::KL: + return "KL"; + case FareToken::KH: + return "KH"; + case FareToken::ZU: + return "ZU"; + case FareToken::None: + return "None"; + case FareToken::Free: + return "Free"; + case FareToken::KHU: + return "KHU"; + case FareToken::KLU: + return "KLU"; + case FareToken ::KHZ: + return "KHZ"; + case FareToken ::KLZ: + return "KLZ"; + default: + return ""; + } +} + + +inline std::string tokenToTicket(FareToken const& token) { + switch (token) { + case FareToken::H: + return "Einzelticket Halle"; + case FareToken::L: + return "Einzelticket Leipzig"; + case FareToken::T1: + return "Einzelticket Stadtverkehr 1"; + case FareToken::T2: + return "Einzelticket Stadtverkehr 2"; + case FareToken::T3: + return "Einzelticket Stadtverkehr 3"; + case FareToken::U: + return "Einzelticket"; + case FareToken::Z: + return "Einzelticket"; + case FareToken::M: + return "Einzelticket Verbundpreis"; + case FareToken::K: + return "Kurzstreckenticket"; + case FareToken::KL: + return "Kurzstreckenticket Leipzig"; + case FareToken::KH: + return "Kurzstreckenticket Halle"; + case FareToken::ZU: + return "None"; + case FareToken::None: + return "None"; + case FareToken::Free: + return "Free"; + case FareToken::KHU: + return "Kurzstreckenticket Halle"; + case FareToken::KLU: + return "Kurzstreckenticket Leipzig"; + case FareToken ::KHZ: + return "Kurzstreckenticket Halle"; + case FareToken ::KLZ: + return "Kurzstreckenticket Leipzig"; + case FareToken ::START: + return "forbidden START"; + } + return ""; //surpress compiler warning +} + +inline FareToken stringToToken(std::string str) { + if (str == "H") { + return FareToken::H; + } + if (str == "L") { + return FareToken::L; + } + if (str == "T1") { + return FareToken::T1; + } + if (str == "T2") { + return FareToken::T2; + } + if (str == "T3") { + return FareToken::T3; + } + if (str == "1") { + return FareToken::T1; + } + if (str == "2") { + return FareToken::T2; + } + if (str == "3") { + return FareToken::T3; + } + if (str == "U") { + return FareToken::U; + } + if (str == "Z") { + return FareToken::Z; + } + if (str == "M") { + return FareToken::M; + } + if (str == "K") { + return FareToken::K; + } + if (str == "KL") { + return FareToken::KL; + } + if (str == "KH") { + return FareToken::KH; + } + if (str == "ZU") { + return FareToken::ZU; + } + if (str == "None") { + return FareToken::None; + } + if (str == "Free") { + return FareToken::Free; + } + if (str == "KHU") { + return FareToken::KHU; + } + if (str == "KLU") { + return FareToken::KLU; + } + if (str == "KHZ") { + return FareToken::KHZ; + } + if (str == "KLZ") { + return FareToken::KLZ; + } + if (str == "NOTFOUND") { + return FareToken::None; + } + assert(false); + return FareToken::None; +} + +} +#endif //SUMO_FARETOKEN_H diff -Nru sumo-1.1.0+dfsg1/src/utils/router/FareZones.h sumo-1.2.0+dfsg1/src/utils/router/FareZones.h --- sumo-1.1.0+dfsg1/src/utils/router/FareZones.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/FareZones.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,209 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file FareZones.h +/// @author Ricardo Euler +/// @date Thu, 17 August 2018 +/// @version $Id$ +/// +// Fare Modul for calculating prices during intermodal routing +/****************************************************************************/ + +#ifndef SUMO_FAREZONES_H +#define SUMO_FAREZONES_H + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include + +static std::unordered_map repToFareZone = std::unordered_map { + {1, 110}, + {2, 121}, + {4, 122}, + {8, 123}, + {16, 124}, + {32, 125}, + {64, 126}, + {128, 127}, + {256, 128}, + {512, 129}, + {1024, 131}, + {2048, 132}, + {4096, 133}, + {8192, 134}, + {16384, 141}, + {32768, 142}, + {65536, 143}, + {131072, 144}, + {262144, 145}, + {524288, 146}, + {1048576, 147}, + {2097152, 151}, + {4194304, 152}, + {8388608, 153}, + {16777216, 154}, + {33554432, 155}, + {67108864, 156}, + {134217728, 162}, + {268435456, 163}, + {536870912, 164}, + {1073741824, 165}, + {2147483648, 166}, + {4294967296, 167}, + {8589934592, 168}, + {17179869184, 210}, + {34359738368, 221}, + {68719476736, 222}, + {137438953472, 223}, + {274877906944, 224}, + {549755813888, 225}, + {1099511627776, 231}, + {2199023255552, 232}, + {4398046511104, 233}, + {8796093022208, 234}, + {17592186044416, 241}, + {35184372088832, 242}, + {70368744177664, 243}, + {140737488355328, 251}, + {281474976710656, 252}, + {562949953421312, 253}, + {1125899906842624, 254}, + {2251799813685248, 255}, + {4503599627370496, 256}, + {9007199254740992, 257}, + {18014398509481984, 258}, + {36028797018963968, 259}, + {72057594037927936, 261}, + {144115188075855872, 299}, + {288230376151711744, 321}, + {576460752303423488, 322}, + {1152921504606846976, 323}, + {2305843009213693952, 324} +}; + +static std::unordered_map fareZoneToRep = std::unordered_map { + {110, 1 }, + {121, 2 }, + {122, 4 }, + {123, 8 }, + {124, 16 }, + {125, 32 }, + {126, 64 }, + {127, 128 }, + {128, 256 }, + {129, 512 }, + {131, 1024 }, + {132, 2048 }, + {133, 4096 }, + {134, 8192 }, + {141, 16384 }, + {142, 32768 }, + {143, 65536 }, + {144, 131072 }, + {145, 262144 }, + {146, 524288 }, + {147, 1048576 }, + {151, 2097152 }, + {152, 4194304 }, + {153, 8388608 }, + {154, 16777216 }, + {155, 33554432 }, + {156, 67108864 }, + {162, 134217728 }, + {163, 268435456 }, + {164, 536870912 }, + {165, 1073741824 }, + {166, 2147483648 }, + {167, 4294967296 }, + {168, 8589934592 }, + {210, 17179869184 }, + {221, 34359738368 }, + {222, 68719476736 }, + {223, 137438953472 }, + {224, 274877906944 }, + {225, 549755813888 }, + {231, 1099511627776 }, + {232, 2199023255552 }, + {233, 4398046511104 }, + {234, 8796093022208 }, + {241, 17592186044416 }, + {242, 35184372088832 }, + {243, 70368744177664 }, + {251, 140737488355328 }, + {252, 281474976710656 }, + {253, 562949953421312 }, + {254, 1125899906842624 }, + {255, 2251799813685248 }, + {256, 4503599627370496 }, + {257, 9007199254740992 }, + {258, 18014398509481984 }, + {259, 36028797018963968 }, + {261, 72057594037927936 }, + {299, 144115188075855872 }, + {321, 288230376151711744 }, + {322, 576460752303423488 }, + {323, 1152921504606846976 }, + {324, 2305843009213693952 } +}; + +/** + * Returns the zone the specified lower rank zones is a part of + * @return + */ + +inline int getOverlayZone(int zoneNumber) { + if (zoneNumber < 400) { + return zoneNumber; //real "zone" numbers, no city zones + } + + switch (zoneNumber) { + case 511: + return 165; + case 512: + return 166; + case 513: + return 167; + case 514: + return 142; + case 515: + return 123; + case 516: + return 127; + case 518: + return 145; + case 519: + return 144; + case 521: + return 153; + case 551: + return 231; + case 552: + return 232; + case 553: + return 233; + case 554: + return 259; + case 555: + return 241; + case 556: + return 255; + case 571: + return 322; + case 572: + return 324; + default: + return zoneNumber; + } +} + +#endif //SUMO_FAREZONES_H diff -Nru sumo-1.1.0+dfsg1/src/utils/router/GawronCalculator.h sumo-1.2.0+dfsg1/src/utils/router/GawronCalculator.h --- sumo-1.1.0+dfsg1/src/utils/router/GawronCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/GawronCalculator.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,118 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file GawronCalculator.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Sept 2002 +/// @version $Id$ +/// +// Calculators for route costs and probabilities +/****************************************************************************/ +#ifndef GawronCalculator_h +#define GawronCalculator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GawronCalculator + * @brief Cost calculation with Gawron's method. + */ +template +class GawronCalculator : public RouteCostCalculator { +public: + /// Constructor + GawronCalculator(const double beta, const double a) : myBeta(beta), myA(a) {} + + /// Destructor + virtual ~GawronCalculator() {} + + void setCosts(R* route, const double costs, const bool isActive = false) const { + if (isActive) { + route->setCosts(costs); + } else { + route->setCosts(myBeta * costs + ((double) 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 double delta = + (pS->getCosts() - pR->getCosts()) / + (pS->getCosts() + pR->getCosts()); + // see [Gawron, 1998] (4.3a, 4.3b) + double newPR = gawronF(pR->getProbability(), pS->getProbability(), delta); + double newPS = pR->getProbability() + pS->getProbability() - newPR; + if (ISNAN(newPR) || ISNAN(newPS)) { + newPR = pS->getCosts() > pR->getCosts() + ? (double) 1. : 0; + newPS = pS->getCosts() > pR->getCosts() + ? 0 : (double) 1.; + } + newPR = MIN2((double) MAX2(newPR, (double) 0), (double) 1); + newPS = MIN2((double) MAX2(newPS, (double) 0), (double) 1); + pR->setProbability(newPR); + pS->setProbability(newPS); + } + } + } + +private: + /** @brief Performs the gawron - f() function + From "Dynamic User Equilibria..." */ + double gawronF(const double pdr, const double pds, const double 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..." */ + double gawronG(const double a, const double x) const { + if (((1.0 - (x * x)) == 0)) { + return std::numeric_limits::max(); + } + return (double) exp((a * x) / (1.0 - (x * x))); + } + +private: + /// @brief gawron beta - value + const double myBeta; + + /// @brief gawron a - value + const double myA; + +private: + /** @brief invalidated assignment operator */ + GawronCalculator& operator=(const GawronCalculator& s); + +}; +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/router/IntermodalEdge.h sumo-1.2.0+dfsg1/src/utils/router/IntermodalEdge.h --- sumo-1.1.0+dfsg1/src/utils/router/IntermodalEdge.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/IntermodalEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,211 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file IntermodalEdge.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Robert Hilbrich +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The Edge definition for the Intermodal Router +/****************************************************************************/ +#ifndef IntermodalEdge_h +#define IntermodalEdge_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include "IntermodalTrip.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the base edge type that is given to the internal router (SUMOAbstractRouter) +template +class IntermodalEdge : public Named { +public: + IntermodalEdge(const std::string id, int numericalID, const E* edge, const std::string& line, const double length = 0.) : + Named(id), + myNumericalID(numericalID), + myEdge(edge), + myLine(line), + myLength(edge == nullptr || length > 0. ? length : edge->getLength()), + myEfforts(nullptr) { } + + virtual ~IntermodalEdge() {} + + virtual bool includeInRoute(bool /* allEdges */) const { + return false; + } + + inline const std::string& getLine() const { + return myLine; + } + + inline const E* getEdge() const { + return myEdge; + } + + int getNumericalID() const { + return myNumericalID; + } + + void addSuccessor(IntermodalEdge* const s, IntermodalEdge* const via = nullptr) { + myFollowingEdges.push_back(s); + myFollowingViaEdges.push_back(std::make_pair(s, via)); + } + + void transferSuccessors(IntermodalEdge* to) { + to->myFollowingEdges = myFollowingEdges; + to->myFollowingViaEdges = myFollowingViaEdges; + myFollowingEdges.clear(); + myFollowingViaEdges.clear(); + } + + void removeSuccessor(const IntermodalEdge* const edge) { + myFollowingEdges.erase(std::find(myFollowingEdges.begin(), myFollowingEdges.end(), edge)); + for (auto it = myFollowingViaEdges.begin(); it != myFollowingViaEdges.end();) { + if (it->first == edge) { + it = myFollowingViaEdges.erase(it); + } else { + ++it; + } + } + } + + virtual const std::vector& getSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { + UNUSED_PARAMETER(vClass); + // the network is already tailored. No need to check for permissions here + return myFollowingEdges; + } + + virtual const std::vector >& getViaSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { + UNUSED_PARAMETER(vClass); + // the network is already tailored. No need to check for permissions here + return myFollowingViaEdges; + } + + virtual bool prohibits(const IntermodalTrip* const /* trip */) const { + return false; + } + + virtual double getTravelTime(const IntermodalTrip* const /* trip */, double /* time */) const { + return 0.; + } + + /// @brief get intended vehicle id and departure time of next public transport ride + virtual double getIntended(const double /* time */, std::string& /* intended */) const { + return 0.; + } + + static inline double getTravelTimeStatic(const IntermodalEdge* const edge, const IntermodalTrip* const trip, double time) { + return edge == nullptr ? 0. : edge->getTravelTime(trip, time); + } + + static inline double getTravelTimeStaticRandomized(const IntermodalEdge* const edge, const IntermodalTrip* const trip, double time) { + return edge == nullptr ? 0. : edge->getTravelTime(trip, time) * RandHelper::rand(1., gWeightsRandomFactor);; + } + + virtual double getEffort(const IntermodalTrip* const /* trip */, double /* time */) const { + return 0.; + } + + static inline double getEffortStatic(const IntermodalEdge* const edge, const IntermodalTrip* const trip, double time) { + return edge == nullptr || !edge->hasEffort() ? 0. : edge->getEffort(trip, time); + } + + inline double getLength() const { + return myLength; + } + + inline void setLength(const double length) { + myLength = length; + } + + inline bool isInternal() const { + return myEdge != nullptr && myEdge->isInternal(); + } + + virtual bool hasEffort() const { + return myEfforts != nullptr; + } + + virtual double getStartPos() const { + return 0.; + } + + virtual double getEndPos() const { + return myLength; + } + + // only used by AStar + inline double getSpeedLimit() const { + return myEdge != nullptr ? myEdge->getSpeedLimit() : 200. / 3.6; + } + + // only used by AStar + inline double getLengthGeometryFactor() const { + return myEdge != nullptr ? myEdge->getLengthGeometryFactor() : 1; + } + + // only used by AStar + inline double getDistanceTo(const IntermodalEdge* other) const { + return myEdge != nullptr && other->myEdge != nullptr ? myEdge->getDistanceTo(other->myEdge, true) : 0.; + } + + // only used by AStar + inline double getMinimumTravelTime(const IntermodalTrip* const trip) const { + return myLength / trip->getMaxSpeed(); + } + +protected: + /// @brief List of edges that may be approached from this edge + std::vector myFollowingEdges; + + /// @brief List of edges that may be approached from this edge with optional internal vias + std::vector > myFollowingViaEdges; + +private: + /// @brief the index in myEdges + const int myNumericalID; + + /// @brief the original edge + const E* const myEdge; + + /// @brief public transport line or ped vs car + const std::string myLine; + + /// @brief adaptable length (for splitted edges) + double myLength; + + /// @brief Container for passing effort varying over time for the edge + ValueTimeLine* myEfforts; + +private: + /// @brief Invalidated copy constructor + IntermodalEdge(const IntermodalEdge& src); + + /// @brief Invalidated assignment operator + IntermodalEdge& operator=(const IntermodalEdge& src); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/IntermodalNetwork.h sumo-1.2.0+dfsg1/src/utils/router/IntermodalNetwork.h --- sumo-1.1.0+dfsg1/src/utils/router/IntermodalNetwork.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/IntermodalNetwork.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,746 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file IntermodalNetwork.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Robert Hilbrich +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The Edge definition for the Intermodal Router +/****************************************************************************/ +#ifndef IntermodalNetwork_h +#define IntermodalNetwork_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "AccessEdge.h" +#include "CarEdge.h" +#include "IntermodalEdge.h" +#include "PedestrianEdge.h" +#include "PublicTransportEdge.h" +#include "StopEdge.h" + +//#define IntermodalRouter_DEBUG_NETWORK + + +// =========================================================================== +// function definitions +// =========================================================================== +template +inline const L* getSidewalk(const E* edge) { + if (edge == nullptr) { + return nullptr; + } + // prefer lanes that are exclusive to pedestrians + const std::vector& lanes = edge->getLanes(); + for (const L* const lane : lanes) { + if (lane->getPermissions() == SVC_PEDESTRIAN) { + return lane; + } + } + for (const L* const lane : lanes) { + if (lane->allowsVehicleClass(SVC_PEDESTRIAN)) { + return lane; + } + } + return nullptr; +} + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the intermodal network storing edges, connections and the mappings to the "real" edges +template +class IntermodalNetwork { +private: + typedef IntermodalEdge _IntermodalEdge; + typedef AccessEdge _AccessEdge; + typedef PedestrianEdge _PedestrianEdge; + typedef PublicTransportEdge _PTEdge; + typedef std::pair<_IntermodalEdge*, _IntermodalEdge*> EdgePair; + +public: + /** @brief where mode changes are possible + */ + enum ModeChangeOptions { + /// @brief parking areas + PARKING_AREAS = 1, + /// @brief public transport stops and access + PT_STOPS = 2, + /// @brief junctions with edges allowing the additional mode + ALL_JUNCTIONS = 4 + }; + + /* @brief build the pedestrian part of the intermodal network (once) + * @param edges The list of MSEdge or ROEdge to build from + * @param numericalID the start number for the creation of new edges + */ + IntermodalNetwork(const std::vector& edges, const bool pedestrianOnly, const int carWalkTransfer = 0) + : myNumericalID(0), myCarWalkTransfer(carWalkTransfer) { +#ifdef IntermodalRouter_DEBUG_NETWORK + std::cout << "initIntermodalNetwork\n"; +#endif + // build the pedestrian edges and the depart / arrival connectors with lookup tables + bool haveSeenWalkingArea = false; + for (const E* const edge : edges) { + if (edge->isTazConnector()) { + continue; + } + const L* lane = getSidewalk(edge); + if (lane != 0) { + if (edge->isWalkingArea()) { + // only a single edge + addEdge(new _PedestrianEdge(myNumericalID++, edge, lane, true)); + myBidiLookup[edge] = std::make_pair(myEdges.back(), myEdges.back()); + myDepartLookup[edge].push_back(myEdges.back()); + myArrivalLookup[edge].push_back(myEdges.back()); + haveSeenWalkingArea = true; + } else { // regular edge or crossing + // forward and backward edges + addEdge(new _PedestrianEdge(myNumericalID++, edge, lane, true)); + addEdge(new _PedestrianEdge(myNumericalID++, edge, lane, false)); + myBidiLookup[edge] = std::make_pair(myEdges[myNumericalID - 2], myEdges.back()); + } + } + if (!edge->isWalkingArea()) { + // depart and arrival edges (the router can decide the initial direction to take and the direction to arrive from) + _IntermodalEdge* const departConn = new _IntermodalEdge(edge->getID() + "_depart_connector", myNumericalID++, edge, "!connector"); + _IntermodalEdge* const arrivalConn = new _IntermodalEdge(edge->getID() + "_arrival_connector", myNumericalID++, edge, "!connector"); + addConnectors(departConn, arrivalConn, 0); + } + } + + // build the walking connectors if there are no walking areas + for (const E* const edge : edges) { + if (edge->isTazConnector() || edge->isInternal()) { + continue; + } + if (haveSeenWalkingArea) { + // connectivity needs to be ensured only in the real intermodal case, for simple pedestrian routing we don't have connectors if we have walking areas + if (!pedestrianOnly && getSidewalk(edge) == nullptr) { + const N* const node = edge->getToJunction(); + if (myWalkingConnectorLookup.count(node) == 0) { + addEdge(new _IntermodalEdge(node->getID() + "_walking_connector", myNumericalID++, nullptr, "!connector")); + myWalkingConnectorLookup[node] = myEdges.back(); + } + } + } else { + for (const N* const node : { + edge->getFromJunction(), edge->getToJunction() + }) { + if (myWalkingConnectorLookup.count(node) == 0) { + addEdge(new _IntermodalEdge(node->getID() + "_walking_connector", myNumericalID++, nullptr, "!connector")); + myWalkingConnectorLookup[node] = myEdges.back(); + } + } + } + } + // build the connections + for (const E* const edge : edges) { + const L* const sidewalk = getSidewalk(edge); + if (sidewalk == nullptr) { + continue; + } + // find all incoming and outgoing lanes for the sidewalk and + // connect the corresponding IntermodalEdges + const EdgePair& pair = getBothDirections(edge); +#ifdef IntermodalRouter_DEBUG_NETWORK + std::cout << " building connections from " << sidewalk->getID() << "\n"; +#endif + if (haveSeenWalkingArea) { + const std::vector > outgoing = sidewalk->getOutgoingViaLanes(); + // if one of the outgoing lanes is a walking area it must be used. + // All other connections shall be ignored + // if it has no outgoing walking area, it probably is a walking area itself + bool hasWalkingArea = false; + for (const auto& target : outgoing) { + if (target.first->getEdge().isWalkingArea()) { + hasWalkingArea = true; + break; + } + } + for (const auto& target : outgoing) { + const E* const targetEdge = &(target.first->getEdge()); + const bool used = (target.first == getSidewalk(targetEdge) + && (!hasWalkingArea || targetEdge->isWalkingArea())); +#ifdef IntermodalRouter_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->addSuccessor(targetPair.first); + targetPair.second->addSuccessor(pair.second); +#ifdef IntermodalRouter_DEBUG_NETWORK + std::cout << " " << pair.first->getID() << " -> " << targetPair.first->getID() << "\n"; + std::cout << " " << targetPair.second->getID() << " -> " << pair.second->getID() << "\n"; +#endif + } + } + } + // We may have a network without pedestrian structures or a car-only edge. + // In the first case we assume that all sidewalks at a junction are interconnected, + // in the second we connect all car-only edges to all sidewalks. + _IntermodalEdge* const toNodeConn = myWalkingConnectorLookup[edge->getToJunction()]; + if (toNodeConn != nullptr) { + // Check for the outgoing vias and use the shortest one as an approximation + const std::vector > outgoing = sidewalk->getOutgoingViaLanes(); + double minViaLength = std::numeric_limits::max(); + const E* minVia = nullptr; + for (const auto& target : outgoing) { + if (target.second != nullptr && target.second->getLength() < minViaLength) { + minViaLength = target.second->getLength(); + minVia = target.second; + } + } + EdgePair interVia = std::make_pair(nullptr, nullptr); + if (minVia != nullptr) { + const auto it = myBidiLookup.find(minVia); + if (it != myBidiLookup.end()) { + interVia = it->second; + } + } + if (!haveSeenWalkingArea) { + // if we have walking areas we should use them and not the connector + pair.first->addSuccessor(toNodeConn, interVia.first); + } + toNodeConn->addSuccessor(pair.second, interVia.second); + } + _IntermodalEdge* const fromNodeConn = myWalkingConnectorLookup[edge->getFromJunction()]; + if (fromNodeConn != nullptr) { + if (!haveSeenWalkingArea) { + pair.second->addSuccessor(fromNodeConn); + } + fromNodeConn->addSuccessor(pair.first); + } + if (!edge->isWalkingArea()) { + // build connections from depart connector + _IntermodalEdge* startConnector = getDepartConnector(edge); + startConnector->addSuccessor(pair.first); + startConnector->addSuccessor(pair.second); + // build connections to arrival connector + _IntermodalEdge* endConnector = getArrivalConnector(edge); + pair.first->addSuccessor(endConnector); + pair.second->addSuccessor(endConnector); + } +#ifdef IntermodalRouter_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 + } + } + + ~IntermodalNetwork() { + for (typename std::vector<_IntermodalEdge*>::iterator it = myEdges.begin(); it != myEdges.end(); ++it) { + delete *it; + } + } + + void addEdge(_IntermodalEdge* edge) { + while ((int)myEdges.size() <= edge->getNumericalID()) { + myEdges.push_back(0); + } + myEdges[edge->getNumericalID()] = edge; + } + + void addConnectors(_IntermodalEdge* const depConn, _IntermodalEdge* const arrConn, const int index) { + addEdge(depConn); + addEdge(arrConn); + myDepartLookup[depConn->getEdge()].insert(myDepartLookup[depConn->getEdge()].begin() + index, depConn); + myArrivalLookup[arrConn->getEdge()].insert(myArrivalLookup[arrConn->getEdge()].begin() + index, arrConn); + } + + const std::vector<_IntermodalEdge*>& getAllEdges() { + return myEdges; + } + + /// @brief Returns the pair of forward and backward edge + const EdgePair& getBothDirections(const E* e) const { + typename std::map::const_iterator it = myBidiLookup.find(e); + if (it == myBidiLookup.end()) { + assert(false); + throw ProcessError("Edge '" + e->getID() + "' not found in intermodal network.'"); + } + return (*it).second; + } + + /// @brief Returns the departing intermodal edge + const _IntermodalEdge* getDepartEdge(const E* e, const double pos) const { + typename std::map >::const_iterator it = myDepartLookup.find(e); + if (it == myDepartLookup.end()) { + throw ProcessError("Depart edge '" + e->getID() + "' not found in intermodal network."); + } + double totalLength = 0.; + double bestDist = std::numeric_limits::max(); + const _IntermodalEdge* best = nullptr; + for (const _IntermodalEdge* split : it->second) { + totalLength += split->getLength(); + double dist = fabs(totalLength - pos); + if (dist < bestDist) { + bestDist = dist; + best = split; + } else { + break; + } + } + assert(best != 0); + return best; + } + + /// @brief Returns the departing intermodal connector at the given split offset + _IntermodalEdge* getDepartConnector(const E* e, const int splitIndex = 0) const { + typename std::map >::const_iterator it = myDepartLookup.find(e); + if (it == myDepartLookup.end()) { + throw ProcessError("Depart edge '" + e->getID() + "' not found in intermodal network."); + } + if (splitIndex >= (int)it->second.size()) { + throw ProcessError("Split index " + toString(splitIndex) + " invalid for depart edge '" + e->getID() + "' ."); + } + return it->second[splitIndex]; + } + + /// @brief Returns the arriving intermodal edge + _IntermodalEdge* getArrivalEdge(const E* e, const double pos) const { + typename std::map >::const_iterator it = myArrivalLookup.find(e); + if (it == myArrivalLookup.end()) { + throw ProcessError("Arrival edge '" + e->getID() + "' not found in intermodal network."); + } + const std::vector<_IntermodalEdge*>& splitList = it->second; + typename std::vector<_IntermodalEdge*>::const_iterator splitIt = splitList.begin(); + double totalLength = 0.; + while (splitIt != splitList.end() && totalLength + (*splitIt)->getLength() < pos) { + totalLength += (*splitIt)->getLength(); + ++splitIt; + } + return *splitIt; + } + + /// @brief Returns the arriving intermodal connector at the given split offset + _IntermodalEdge* getArrivalConnector(const E* e, const int splitIndex = 0) const { + return myArrivalLookup.find(e)->second[splitIndex]; + } + + /// @brief Returns the outgoing pedestrian edge, which is either a walking area or a walking connector + _IntermodalEdge* getWalkingConnector(const E* e) const { + typename std::map::const_iterator it = myWalkingConnectorLookup.find(e->getToJunction()); + if (it == myWalkingConnectorLookup.end()) { + const L* const sidewalk = getSidewalk(e); + if (e->isInternal() || sidewalk == 0) { + return 0; + } + for (const auto& target : sidewalk->getOutgoingViaLanes()) { + if (target.first->getEdge().isWalkingArea()) { + return getBothDirections(&target.first->getEdge()).first; + } + } + return 0; + } + return it->second; + } + + void addCarEdges(const std::vector& edges) { + for (const E* const edge : edges) { + if (edge->getFunction() == EDGEFUNC_NORMAL || edge->getFunction() == EDGEFUNC_INTERNAL) { + myCarLookup[edge] = new CarEdge(myNumericalID++, edge); + addEdge(myCarLookup[edge]); + } + } + for (const auto& edgePair : myCarLookup) { + _IntermodalEdge* const carEdge = edgePair.second; + for (const auto& suc : edgePair.first->getViaSuccessors()) { + _IntermodalEdge* const sucCarEdge = getCarEdge(suc.first); + _IntermodalEdge* const sucViaEdge = getCarEdge(suc.second); + if (sucCarEdge != nullptr) { + carEdge->addSuccessor(sucCarEdge, sucViaEdge); + } + } + if ((myCarWalkTransfer & ALL_JUNCTIONS) != 0) { + _IntermodalEdge* const walkCon = getWalkingConnector(edgePair.first); + if (walkCon != 0) { + carEdge->addSuccessor(walkCon); + } else { + // we are on an edge where pedestrians are forbidden and want to continue on an arbitrary pedestrian edge + for (const E* const out : edgePair.first->getToJunction()->getOutgoing()) { + if (!out->isInternal() && !out->isTazConnector() && getSidewalk(out) != 0) { + carEdge->addSuccessor(getBothDirections(out).first); + } + } + for (const E* const in : edgePair.first->getToJunction()->getIncoming()) { + if (!in->isInternal() && !in->isTazConnector() && getSidewalk(in) != 0) { + carEdge->addSuccessor(getBothDirections(in).second); + } + } + } + } + getDepartConnector(edgePair.first)->addSuccessor(carEdge); + carEdge->addSuccessor(getArrivalConnector(edgePair.first)); + } + } + + /// @brief Returns the associated car edge + _IntermodalEdge* getCarEdge(const E* e) const { + typename std::map::const_iterator it = myCarLookup.find(e); + if (it == myCarLookup.end()) { + return nullptr; + } + return it->second; + } + + /// @brief Returns the associated stop edge + _IntermodalEdge* getStopEdge(const std::string& stopId) const { + auto it = myStopConnections.find(stopId); + if (it == myStopConnections.end()) { + return nullptr; + } + return it->second; + } + + /** @brief Adds access edges for stopping places to the intermodal network + * + * This method creates an intermodal stop edge to represent the stopping place + * (if not present yet) and determines the edges which need to be splitted (usually the forward + * and the backward pedestrian edges and the car edge) and calls splitEdge for the + * actual split and the connection of the stop edge with access edges. After that it adds and adapts + * the depart and arrival connectors to the new edge(s). + * + * @param[in] stopId The id of the stop to add + * @param[in] stopEdge The edge on which the stop is located + * @param[in] pos The relative position on the edge where the stop is located + * @param[in] category The type of stop + */ + void addAccess(const std::string& stopId, const E* stopEdge, const double pos, const double length, const SumoXMLTag category) { + assert(stopEdge != 0); + //std::cout << "addAccess stopId=" << stopId << " stopEdge=" << stopEdge->getID() << " pos=" << pos << " length=" << length << " cat=" << category << "\n"; + if (myStopConnections.count(stopId) == 0) { + myStopConnections[stopId] = new StopEdge(stopId, myNumericalID++, stopEdge); + addEdge(myStopConnections[stopId]); + } + _IntermodalEdge* const stopConn = myStopConnections[stopId]; + const L* lane = getSidewalk(stopEdge); + if (lane != 0) { + const std::pair<_IntermodalEdge*, _IntermodalEdge*>& pair = getBothDirections(stopEdge); + double relPos; + bool needSplit; + const int splitIndex = findSplitIndex(pair.first, pos, relPos, needSplit); + _IntermodalEdge* const fwdSplit = needSplit ? new PedestrianEdge(myNumericalID++, stopEdge, lane, true, pos) : nullptr; + splitEdge(pair.first, splitIndex, fwdSplit, relPos, length, needSplit, stopConn); + _IntermodalEdge* const backSplit = needSplit ? new PedestrianEdge(myNumericalID++, stopEdge, lane, false, pos) : nullptr; + splitEdge(pair.second, splitIndex, backSplit, relPos, length, needSplit, stopConn, false); + _IntermodalEdge* carSplit = nullptr; + if (myCarLookup.count(stopEdge) > 0) { + if (needSplit) { + carSplit = new CarEdge(myNumericalID++, stopEdge, pos); + } + splitEdge(myCarLookup[stopEdge], splitIndex, carSplit, relPos, length, needSplit, stopConn, true, false); + } + if (needSplit) { + if (carSplit != nullptr && ((category == SUMO_TAG_PARKING_AREA && (myCarWalkTransfer & PARKING_AREAS) != 0) || (category == SUMO_TAG_BUS_STOP && (myCarWalkTransfer & PT_STOPS) != 0))) { + // adding access from car to walk + _IntermodalEdge* const beforeSplit = myAccessSplits[myCarLookup[stopEdge]][splitIndex]; + for (_IntermodalEdge* conn : { + fwdSplit, backSplit + }) { + _AccessEdge* access = new _AccessEdge(myNumericalID++, beforeSplit, conn, length); + addEdge(access); + beforeSplit->addSuccessor(access); + access->addSuccessor(conn); + } + } + + // fixing depart connections for the forward pedestrian, the backward pedestrian and the car edge + _IntermodalEdge* const prevDep = getDepartConnector(stopEdge, splitIndex); + const std::vector<_IntermodalEdge*>& backSplitList = myAccessSplits[pair.second]; + _IntermodalEdge* const backBeforeSplit = backSplitList[backSplitList.size() - 2 - splitIndex]; + _IntermodalEdge* const depConn = new _IntermodalEdge(stopEdge->getID() + "_depart_connector" + toString(pos), myNumericalID++, stopEdge, "!connector"); + depConn->addSuccessor(fwdSplit); + depConn->addSuccessor(backBeforeSplit); + depConn->setLength(fwdSplit->getLength()); + prevDep->removeSuccessor(backBeforeSplit); + prevDep->addSuccessor(backSplit); + prevDep->setLength(backSplit->getLength()); + if (carSplit != nullptr) { + depConn->addSuccessor(carSplit); + } + + // fixing arrival connections for the forward pedestrian, the backward pedestrian and the car edge + _IntermodalEdge* const prevArr = getArrivalConnector(stopEdge, splitIndex); + _IntermodalEdge* const fwdBeforeSplit = myAccessSplits[pair.first][splitIndex]; + _IntermodalEdge* const arrConn = new _IntermodalEdge(stopEdge->getID() + "_arrival_connector" + toString(pos), myNumericalID++, stopEdge, "!connector"); + fwdSplit->addSuccessor(arrConn); + backBeforeSplit->addSuccessor(arrConn); + arrConn->setLength(fwdSplit->getLength()); + fwdSplit->removeSuccessor(prevArr); + fwdBeforeSplit->addSuccessor(prevArr); + prevArr->setLength(backSplit->getLength()); + if (carSplit != nullptr) { + carSplit->addSuccessor(arrConn); + carSplit->removeSuccessor(prevArr); + myAccessSplits[myCarLookup[stopEdge]][splitIndex]->addSuccessor(prevArr); + } + addConnectors(depConn, arrConn, splitIndex + 1); + } + } else { + // pedestrians cannot walk here: + // add depart connectors on the stop edge so that pedestrians may start at the stop + auto& splitList = myDepartLookup[stopEdge]; + assert(splitList.size() > 0); + typename std::vector<_IntermodalEdge*>::iterator splitIt = splitList.begin(); + double totalLength = 0.; + _IntermodalEdge* last = nullptr; + while (splitIt != splitList.end() && totalLength < pos) { + totalLength += (*splitIt)->getLength(); + last = *splitIt; + ++splitIt; + } + auto* stopConnector = myStopConnections[stopId]; + // insert before last + const double newLength = pos - (totalLength - last->getLength()); + stopConnector->setLength(newLength); + splitList.insert(splitIt - 1, stopConnector); + // correct length of subsequent edge + last->setLength(last->getLength() - newLength); + } + } + + void addSchedule(const SUMOVehicleParameter& pars, const std::vector* addStops = nullptr) { + SUMOTime lastUntil = 0; + std::vector validStops; + if (addStops != nullptr) { + // stops are part of a stand-alone route. until times are offsets from vehicle departure + for (const SUMOVehicleParameter::Stop& stop : *addStops) { + if (myStopConnections.count(stop.busstop) > 0) { + // compute stop times for the first vehicle + const SUMOTime newUntil = stop.until + pars.depart; + if (newUntil >= lastUntil) { + validStops.push_back(stop); + validStops.back().until = newUntil; + lastUntil = newUntil; + } else { + WRITE_WARNING("Ignoring unordered stop at '" + stop.busstop + "' until " + time2string(stop.until) + " for vehicle '" + pars.id + "'."); + } + } + } + } + for (const SUMOVehicleParameter::Stop& stop : pars.stops) { + // stops are part of the vehicle until times are absolute times for the first vehicle + if (myStopConnections.count(stop.busstop) > 0 && stop.until >= lastUntil) { + validStops.push_back(stop); + lastUntil = stop.until; + } else { + WRITE_WARNING("Ignoring stop at '" + stop.busstop + "' until " + time2string(stop.until) + " for vehicle '" + pars.id + "'."); + } + } + if (validStops.size() < 2) { + WRITE_WARNING("Not using public transport line '" + pars.line + "' for routing persons. It has less than two usable stops."); + return; + } + + typename std::vector<_PTEdge*>& lineEdges = myPTLines[pars.line]; + if (lineEdges.empty()) { + _IntermodalEdge* lastStop = nullptr; + Position lastPos; + SUMOTime lastTime = 0; + for (const SUMOVehicleParameter::Stop& s : validStops) { + _IntermodalEdge* currStop = myStopConnections[s.busstop]; + Position stopPos = E::getStopPosition(s); + if (lastStop != nullptr) { + _PTEdge* const newEdge = new _PTEdge(s.busstop, myNumericalID++, lastStop, currStop->getEdge(), pars.line, lastPos.distanceTo(stopPos)); + addEdge(newEdge); + newEdge->addSchedule(pars.id, lastTime, pars.repetitionNumber, pars.repetitionOffset, s.until - lastTime); + lastStop->addSuccessor(newEdge); + newEdge->addSuccessor(currStop); + lineEdges.push_back(newEdge); + } + lastTime = s.until; + lastStop = currStop; + lastPos = stopPos; + } + } else { + if (validStops.size() != lineEdges.size() + 1) { + WRITE_WARNING("Number of stops for public transport line '" + pars.line + "' does not match earlier definitions, ignoring schedule."); + return; + } + if (lineEdges.front()->getEntryStop() != myStopConnections[validStops.front().busstop]) { + WRITE_WARNING("Different stop for '" + pars.line + "' compared to earlier definitions, ignoring schedule."); + return; + } + typename std::vector<_PTEdge*>::const_iterator lineEdge = lineEdges.begin(); + typename std::vector::const_iterator s = validStops.begin() + 1; + for (; s != validStops.end(); ++s, ++lineEdge) { + if ((*lineEdge)->getSuccessors(SVC_IGNORING)[0] != myStopConnections[s->busstop]) { + WRITE_WARNING("Different stop for '" + pars.line + "' compared to earlier definitions, ignoring schedule."); + return; + } + } + SUMOTime lastTime = validStops.front().until; + if (lineEdges.front()->hasSchedule(lastTime)) { + WRITE_WARNING("Duplicate schedule for '" + pars.line + "' at time " + time2string(lastTime) + "."); + } + for (lineEdge = lineEdges.begin(), s = validStops.begin() + 1; lineEdge != lineEdges.end(); ++lineEdge, ++s) { + (*lineEdge)->addSchedule(pars.id, lastTime, pars.repetitionNumber, pars.repetitionOffset, s->until - lastTime); + lastTime = s->until; + } + } + } + + +private: + /** @brief Returns where to insert or use the split edge + * + * This method determines whether an edge needs to be split at the given position + * (if there is not already a split nearby) and returns the corresponding index in the split list. + * + * @param[in] toSplit The first edge in the split list + * @param[in] pos The relative position on the edge where the stop is located + * @param[out] relPos The relative position on the splitted edge + * @param[out] needSplit whether a new split is needed or we reuse an exisiting one + * @return the index in the split list where the split edge needs to be added or reused + */ + int findSplitIndex(_IntermodalEdge* const toSplit, const double pos, double& relPos, bool& needSplit) { + relPos = pos; + needSplit = true; + int splitIndex = 0; + std::vector<_IntermodalEdge*>& splitList = myAccessSplits[toSplit]; + if (!splitList.empty()) { + for (const _IntermodalEdge* const split : splitList) { + if (relPos < split->getLength() + POSITION_EPS) { + break; + } + relPos -= split->getLength(); + splitIndex++; + } + assert(splitIndex < (int)splitList.size()); + if (splitIndex + 1 < (int)splitList.size() && fabs(relPos - splitList[splitIndex]->getLength()) < POSITION_EPS) { + needSplit = false; + } + } + return splitIndex; + } + + /** @brief Splits an edge (if necessary) and connects it to a stopping edge + * + * This method determines whether an edge needs to be split at the given position + * (if there is not already a split nearby) and connects the stop edge via new access edges. + * + * @param[in] toSplit The first edge in the split list + * @param[in] afterSplit The edge to add if a split is performed + * @param[in] pos The relative position on the edge where the stop is located + * @param[in] stopConn The stop edge to connect to + * @param[in] forward whether we are aplitting a forward edge (backward edges get different names) + * @param[in] addExit whether we can just enter the stop or exit as well (cars should not exit yet) + */ + void splitEdge(_IntermodalEdge* const toSplit, int splitIndex, + _IntermodalEdge* afterSplit, const double relPos, const double length, const bool needSplit, + _IntermodalEdge* const stopConn, const bool forward = true, const bool addExit = true) { + std::vector<_IntermodalEdge*>& splitList = myAccessSplits[toSplit]; + if (splitList.empty()) { + splitList.push_back(toSplit); + } + if (!forward) { + splitIndex = (int)splitList.size() - 1 - splitIndex; + if (!needSplit) { + splitIndex--; + } + } + _IntermodalEdge* beforeSplit = splitList[splitIndex]; + if (needSplit) { + addEdge(afterSplit); + beforeSplit->transferSuccessors(afterSplit); + beforeSplit->addSuccessor(afterSplit); + if (forward) { + afterSplit->setLength(beforeSplit->getLength() - relPos); + beforeSplit->setLength(relPos); + } else { + afterSplit->setLength(relPos); + beforeSplit->setLength(beforeSplit->getLength() - relPos); + // rename backward edges for easier referencing + const std::string newID = beforeSplit->getID(); + beforeSplit->setID(afterSplit->getID()); + afterSplit->setID(newID); + } + splitList.insert(splitList.begin() + splitIndex + 1, afterSplit); + } else { + // don't split, use the present split edges + afterSplit = splitList[splitIndex + 1]; + } + // add access to / from edge + _AccessEdge* access = new _AccessEdge(myNumericalID++, beforeSplit, stopConn, length); + addEdge(access); + beforeSplit->addSuccessor(access); + access->addSuccessor(stopConn); + if (addExit) { + // pedestrian case only, exit from public to pedestrian + _AccessEdge* exit = new _AccessEdge(myNumericalID++, stopConn, afterSplit, length); + addEdge(exit); + stopConn->addSuccessor(exit); + exit->addSuccessor(afterSplit); + } + } + + +private: + /// @brief the edge dictionary + std::vector<_IntermodalEdge*> myEdges; + + /// @brief retrieve the forward and backward edge for the given input edge E + std::map myBidiLookup; + + /// @brief retrieve the depart edges for the given input edge E + std::map > myDepartLookup; + + /// @brief retrieve the arrival edges for the given input edge E + std::map > myArrivalLookup; + + /// @brief the walking connector edge (fake walking area) + std::map myWalkingConnectorLookup; + + /// @brief retrieve the car edge for the given input edge E + std::map myCarLookup; + + /// @brief retrieve the public transport edges for the given line + std::map > myPTLines; + + /// @brief retrieve the representing edge for the given stopping place + std::map myStopConnections; + + /// @brief retrieve the splitted edges for the given "original" + std::map<_IntermodalEdge*, std::vector<_IntermodalEdge*> > myAccessSplits; + + int myNumericalID; + const int myCarWalkTransfer; + +private: + /// @brief Invalidated assignment operator + IntermodalNetwork& operator=(const IntermodalNetwork& s); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/IntermodalRouter.h sumo-1.2.0+dfsg1/src/utils/router/IntermodalRouter.h --- sumo-1.1.0+dfsg1/src/utils/router/IntermodalRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/IntermodalRouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,313 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file IntermodalRouter.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The IntermodalRouter builds a special network and (delegates to a SUMOAbstractRouter) +/****************************************************************************/ +#ifndef IntermodalRouter_h +#define IntermodalRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include "SUMOAbstractRouter.h" +#include "DijkstraRouter.h" +#include "AStarRouter.h" +#include "IntermodalNetwork.h" +#include "EffortCalculator.h" +#include "CarEdge.h" +#include "StopEdge.h" +#include "PedestrianRouter.h" + +//#define IntermodalRouter_DEBUG_ROUTES + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class IntermodalRouter + * The router for pedestrians (on a bidirectional network of sidewalks and crossings) + */ +template +class IntermodalRouter : public SUMOAbstractRouter > { +public: + typedef IntermodalNetwork Network; + +private: + typedef void(*CreateNetCallback)(IntermodalRouter &); + typedef IntermodalEdge _IntermodalEdge; + typedef IntermodalTrip _IntermodalTrip; + typedef SUMOAbstractRouterPermissions<_IntermodalEdge, _IntermodalTrip> _InternalRouter; + typedef DijkstraRouter<_IntermodalEdge, _IntermodalTrip, _InternalRouter> _InternalDijkstra; + typedef AStarRouter<_IntermodalEdge, _IntermodalTrip, _InternalRouter> _InternalAStar; + +public: + struct TripItem { + TripItem(const std::string& _line = "") : + line(_line), intended(_line), depart(-1), traveltime(0.), cost(0.) {} + std::string line; + std::string vType; + std::string destStop; + std::string intended; // intended public transport vehicle id + double depart; // intended public transport departure + std::vector edges; + double traveltime; + double cost; + double length; + double departPos; + double arrivalPos; + std::string description; + }; + + /// Constructor + IntermodalRouter(CreateNetCallback callback, const int carWalkTransfer, const std::string& routingAlgorithm, + const int routingMode = 0, EffortCalculator* calc = nullptr) : + SUMOAbstractRouter("IntermodalRouter", true), + myAmClone(false), myInternalRouter(nullptr), myIntermodalNet(nullptr), + myCallback(callback), myCarWalkTransfer(carWalkTransfer), myRoutingAlgorithm(routingAlgorithm), + myRoutingMode(routingMode), myExternalEffort(calc) { + } + + /// Destructor + virtual ~IntermodalRouter() { + delete myInternalRouter; + if (!myAmClone) { + delete myIntermodalNet; + } + } + + SUMOAbstractRouter* clone() { + createNet(); + return new IntermodalRouter(myIntermodalNet, myCarWalkTransfer, myRoutingAlgorithm, myRoutingMode, myExternalEffort); + } + + /** @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 */ + bool compute(const E* from, const E* to, const double departPos, const double arrivalPos, + const std::string stopID, const double speed, + const V* const vehicle, const SVCPermissions modeSet, const SUMOTime msTime, + std::vector& into, const double externalFactor = 0.) { + createNet(); + _IntermodalTrip trip(from, to, departPos, arrivalPos, speed, msTime, 0, vehicle, modeSet, myExternalEffort, externalFactor); + std::vector intoEdges; + //std::cout << "compute from=" << from->getID() << " to=" << to->getID() << " dPos=" << departPos << " aPos=" << arrivalPos << " stopID=" << stopID << " speed=" << speed << " veh=" << Named::getIDSecure(vehicle) << " modeSet=" << modeSet << " t=" << msTime << " iFrom=" << myIntermodalNet->getDepartEdge(from, trip.departPos)->getID() << " iTo=" << (stopID != "" ? myIntermodalNet->getStopEdge(stopID) : myIntermodalNet->getArrivalEdge(to, trip.arrivalPos))->getID() << "\n"; + const bool success = myInternalRouter->compute(myIntermodalNet->getDepartEdge(from, trip.departPos), + stopID != "" ? myIntermodalNet->getStopEdge(stopID) : myIntermodalNet->getArrivalEdge(to, trip.arrivalPos), + &trip, msTime, intoEdges); + if (success) { + std::string lastLine = ""; + double time = STEPS2TIME(msTime); + double effort = 0.; + double length = 0.; + const _IntermodalEdge* prev = nullptr; + for (const _IntermodalEdge* iEdge : intoEdges) { + if (iEdge->includeInRoute(false)) { + if (iEdge->getLine() == "!stop") { + if (into.size() > 0) { + // previous stage ends at stop + into.back().destStop = iEdge->getID(); + if (myExternalEffort != nullptr) { + into.back().description = myExternalEffort->output(iEdge->getNumericalID()); + } + if (lastLine == "!ped") { + lastLine = ""; // a stop always starts a new trip item + } + } else { + // trip starts at stop + lastLine = ""; + into.push_back(TripItem("!stop")); + into.back().destStop = iEdge->getID(); + } + } else { + if (iEdge->getLine() != lastLine) { + lastLine = iEdge->getLine(); + if (lastLine == "!car") { + into.push_back(TripItem(vehicle->getID())); + into.back().vType = vehicle->getParameter().vtypeid; + } else if (lastLine == "!ped") { + into.push_back(TripItem()); + } else { + into.push_back(TripItem(lastLine)); + into.back().depart = iEdge->getIntended(time, into.back().intended); + } + into.back().departPos = iEdge->getStartPos(); + } + if (into.back().edges.empty() || into.back().edges.back() != iEdge->getEdge()) { + into.back().edges.push_back(iEdge->getEdge()); + into.back().arrivalPos = iEdge->getEndPos(); + } + } + } + const double prevTime = time, prevEffort = effort, prevLength = length; + myInternalRouter->updateViaCost(prev, iEdge, &trip, time, effort, length); + prev = iEdge; + if (!into.empty()) { + into.back().traveltime += time - prevTime; + into.back().cost += effort - prevEffort; + into.back().length += length - prevLength; + } + } + } +#ifdef IntermodalRouter_DEBUG_ROUTES + double time = STEPS2TIME(msTime); + for (const _IntermodalEdge* iEdge : intoEdges) { + const double edgeEffort = myInternalRouter->getEffort(iEdge, &trip, time); + time += edgeEffort; + std::cout << iEdge->getID() << "(" << iEdge->getLine() << "): " << edgeEffort << std::endl; + } + std::cout << TIME2STEPS(msTime) << " trip from " << from->getID() << " to " << (to != nullptr ? to->getID() : stopID) + << " departPos=" << trip.departPos + << " arrivalPos=" << trip.arrivalPos + << " edges=" << toString(intoEdges) +// << " resultEdges=" << toString(into) + << " time=" << time + << "\n"; +#endif + return success; + } + + /** @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 */ + bool compute(const E*, const E*, const _IntermodalTrip* const, + SUMOTime, std::vector&, bool) { + throw ProcessError("Do not use this method"); + } + + void prohibit(const std::vector& toProhibit) { + createNet(); + std::vector<_IntermodalEdge*> toProhibitPE; + for (typename std::vector::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) { + toProhibitPE.push_back(myIntermodalNet->getBothDirections(*it).first); + toProhibitPE.push_back(myIntermodalNet->getBothDirections(*it).second); + toProhibitPE.push_back(myIntermodalNet->getCarEdge(*it)); + } + myInternalRouter->prohibit(toProhibitPE); + } + + void writeNetwork(OutputDevice& dev) { + createNet(); + for (_IntermodalEdge* e : myIntermodalNet->getAllEdges()) { + dev.openTag(SUMO_TAG_EDGE); + dev.writeAttr(SUMO_ATTR_ID, e->getID()); + dev.writeAttr(SUMO_ATTR_LINE, e->getLine()); + dev.writeAttr(SUMO_ATTR_LENGTH, e->getLength()); + dev.writeAttr("successors", toString(e->getSuccessors(SVC_IGNORING))); + dev.closeTag(); + } + } + + void writeWeights(OutputDevice& dev) { + createNet(); + _IntermodalTrip trip(nullptr, nullptr, 0., 0., DEFAULT_PEDESTRIAN_SPEED, 0, 0, nullptr, SVC_PASSENGER | SVC_BICYCLE | SVC_BUS); + for (_IntermodalEdge* e : myIntermodalNet->getAllEdges()) { + dev.openTag(SUMO_TAG_EDGE); + dev.writeAttr(SUMO_ATTR_ID, e->getID()); + dev.writeAttr("traveltime", e->getTravelTime(&trip, 0.)); + dev.writeAttr("effort", e->getEffort(&trip, 0.)); + dev.closeTag(); + } + } + + Network* getNetwork() const { + return myIntermodalNet; + } + + EffortCalculator* getExternalEffort() const { + return myExternalEffort; + } + +private: + IntermodalRouter(Network* net, const int carWalkTransfer, const std::string& routingAlgorithm, + const int routingMode, EffortCalculator* calc) : + SUMOAbstractRouter("IntermodalRouterClone", true), myAmClone(true), + myInternalRouter(new _InternalDijkstra(net->getAllEdges(), true, + gWeightsRandomFactor > 1 ? & _IntermodalEdge::getTravelTimeStaticRandomized : & _IntermodalEdge::getTravelTimeStatic)), + myIntermodalNet(net), myCarWalkTransfer(carWalkTransfer), myRoutingAlgorithm(routingAlgorithm), myRoutingMode(routingMode), myExternalEffort(calc) {} + + static inline double getEffortAggregated(const _IntermodalEdge* const edge, const _IntermodalTrip* const trip, double time) { + return edge == nullptr || !edge->hasEffort() ? 0. : edge->getEffort(trip, time); + } + + static inline double getCombined(const _IntermodalEdge* const edge, const _IntermodalTrip* const trip, double time) { + return edge->getTravelTime(trip, time) + trip->externalFactor * trip->calc->getEffort(edge->getNumericalID()); + } + + inline void createNet() { + if (myIntermodalNet == nullptr) { + myIntermodalNet = new Network(E::getAllEdges(), false, myCarWalkTransfer); + myIntermodalNet->addCarEdges(E::getAllEdges()); + myCallback(*this); + switch (myRoutingMode) { + case 0: + if (myRoutingAlgorithm == "astar") { + myInternalRouter = new _InternalAStar(myIntermodalNet->getAllEdges(), true, + gWeightsRandomFactor > 1 ? &_IntermodalEdge::getTravelTimeStaticRandomized : &_IntermodalEdge::getTravelTimeStatic); + } else { + myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, + gWeightsRandomFactor > 1 ? &_IntermodalEdge::getTravelTimeStaticRandomized : &_IntermodalEdge::getTravelTimeStatic); + } + break; + case 1: + myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, &getEffortAggregated, &_IntermodalEdge::getTravelTimeStatic); + break; + case 2: + myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, &_IntermodalEdge::getEffortStatic, &_IntermodalEdge::getTravelTimeStatic); + break; + case 3: + if (myExternalEffort != nullptr) { + std::vector edgeLines; + for (const auto e : myIntermodalNet->getAllEdges()) { + edgeLines.push_back(e->getLine()); + } + myExternalEffort->init(edgeLines); + } + myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, &getCombined, &_IntermodalEdge::getTravelTimeStatic, false, myExternalEffort); + break; + } + } + } + +private: + const bool myAmClone; + _InternalRouter* myInternalRouter; + Network* myIntermodalNet; + CreateNetCallback myCallback; + const int myCarWalkTransfer; + const std::string myRoutingAlgorithm; + const int myRoutingMode; + EffortCalculator* const myExternalEffort; + + +private: + /// @brief Invalidated assignment operator + IntermodalRouter& operator=(const IntermodalRouter& s); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/IntermodalTrip.h sumo-1.2.0+dfsg1/src/utils/router/IntermodalTrip.h --- sumo-1.1.0+dfsg1/src/utils/router/IntermodalTrip.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/IntermodalTrip.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,98 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file IntermodalTrip.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Robert Hilbrich +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The "vehicle" definition for the Intermodal Router +/****************************************************************************/ +#ifndef IntermodalTrip_h +#define IntermodalTrip_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include + +#include "EffortCalculator.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the "vehicle" type that is given to the internal router (SUMOAbstractRouter) +template +class IntermodalTrip { +public: + IntermodalTrip(const E* _from, const E* _to, double _departPos, double _arrivalPos, + double _speed, SUMOTime _departTime, const N* _node, + const V* _vehicle = 0, const SVCPermissions _modeSet = SVC_PEDESTRIAN, + const EffortCalculator* const _calc = nullptr, const double _externalFactor = 0.) : + from(_from), + to(_to), + departPos(_departPos < 0 ? _from->getLength() + _departPos : _departPos), + arrivalPos(_arrivalPos < 0 ? _to->getLength() + _arrivalPos : _arrivalPos), + speed(_speed), + departTime(_departTime), + node(_node), + vehicle(_vehicle), + modeSet(_modeSet), + calc(_calc), + externalFactor(_externalFactor) { + } + + // exists just for debugging purposes + std::string getID() const { + return from->getID() + ":" + to->getID() + ":" + time2string(departTime); + } + + + inline SUMOVehicleClass getVClass() const { + return vehicle != 0 ? vehicle->getVClass() : SVC_PEDESTRIAN; + } + + // only used by AStar + inline double getMaxSpeed() const { + return vehicle != nullptr ? vehicle->getMaxSpeed() : speed; + } + + // only used by AStar + inline double getChosenSpeedFactor() const { + return vehicle != nullptr ? vehicle->getChosenSpeedFactor() : 1.0; + } + + const E* const from; + const E* const to; + const double departPos; + const double arrivalPos; + const double speed; + const SUMOTime departTime; + const N* const node; // indicates whether only routing across this node shall be performed + const V* const vehicle; // indicates which vehicle may be used + const SVCPermissions modeSet; + const EffortCalculator* const calc; + const double externalFactor; + +private: + /// @brief Invalidated assignment operator. + IntermodalTrip& operator=(const IntermodalTrip&); +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/LogitCalculator.h sumo-1.2.0+dfsg1/src/utils/router/LogitCalculator.h --- sumo-1.1.0+dfsg1/src/utils/router/LogitCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/LogitCalculator.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,158 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file LogitCalculator.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Sept 2002 +/// @version $Id$ +/// +// Calculators for route costs and probabilities +/****************************************************************************/ +#ifndef LogitCalculator_h +#define LogitCalculator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class LogitCalculator + * @brief Cost calculation with c-logit or logit method. + */ +template +class LogitCalculator : public RouteCostCalculator { +public: + /// Constructor + LogitCalculator(const double beta, const double gamma, + const double theta) : myBeta(beta), myGamma(gamma), myTheta(theta) {} + + /// Destructor + virtual ~LogitCalculator() {} + + void setCosts(R* route, const double 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 double theta = myTheta >= 0 ? myTheta : getThetaForCLogit(alternatives); + const double 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; + double 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)); + } + double overlapSum = 0; + for (typename std::vector::const_iterator j = alternatives.begin(); j != alternatives.end(); j++) { + const R* pS = *j; + double overlapLength = 0.; + double 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; + double 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 */ + double getBetaForCLogit(const std::vector alternatives) const { + double min = std::numeric_limits::max(); + for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { + const double cost = (*i)->getCosts() / 3600.; + if (cost < min) { + min = cost; + } + } + return min; + } + + /** @brief calculate the scaling factor in the logit model */ + double getThetaForCLogit(const std::vector alternatives) const { + // @todo this calculation works for travel times only + double sum = 0.; + double diff = 0.; + double min = std::numeric_limits::max(); + for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { + const double cost = (*i)->getCosts() / 3600.; + sum += cost; + if (cost < min) { + min = cost; + } + } + const double meanCost = sum / double(alternatives.size()); + for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { + diff += pow((*i)->getCosts() / 3600. - meanCost, 2); + } + const double cvCost = sqrt(diff / double(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 double myBeta; + + /// @brief logit gamma - value + const double myGamma; + + /// @brief logit theta - value + const double 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-1.1.0+dfsg1/src/utils/router/Makefile.am sumo-1.2.0+dfsg1/src/utils/router/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/router/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,26 @@ +EXTRA_DIST = AccessEdge.h \ +AStarLookupTable.h \ +AStarRouter.h \ +CarEdge.h \ +CHBuilder.h \ +CHRouter.h \ +CHRouterWrapper.h \ +DijkstraRouter.h \ +EffortCalculator.h \ +FareModul.h \ +FareToken.h \ +FareZones.h \ +GawronCalculator.h \ +IntermodalEdge.h \ +IntermodalNetwork.h \ +IntermodalRouter.h \ +IntermodalTrip.h \ +LogitCalculator.h \ +PedestrianEdge.h \ +PedestrianRouter.h \ +PublicTransportEdge.h \ +RouteCostCalculator.h \ +RouterProvider.h \ +SPTree.h \ +StopEdge.h \ +SUMOAbstractRouter.h diff -Nru sumo-1.1.0+dfsg1/src/utils/router/PedestrianEdge.h sumo-1.2.0+dfsg1/src/utils/router/PedestrianEdge.h --- sumo-1.1.0+dfsg1/src/utils/router/PedestrianEdge.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/PedestrianEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,112 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file PedestrianEdge.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Robert Hilbrich +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The pedestrian accessible edges for the Intermodal Router +/****************************************************************************/ +#ifndef PedestrianEdge_h +#define PedestrianEdge_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#define TL_RED_PENALTY 20 + +//#define IntermodalRouter_DEBUG_EFFORTS + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the pedestrian edge type that is given to the internal router (SUMOAbstractRouter) +template +class PedestrianEdge : public IntermodalEdge { +public: + PedestrianEdge(int numericalID, const E* edge, const L* lane, bool forward, const double pos = -1.) : + IntermodalEdge(edge->getID() + (edge->isWalkingArea() ? "" : (forward ? "_fwd" : "_bwd")) + toString(pos), numericalID, edge, "!ped"), + myLane(lane), + myForward(forward), + myStartPos(pos >= 0 ? pos : (forward ? 0. : edge->getLength())) { } + + bool includeInRoute(bool allEdges) const { + return allEdges || (!this->getEdge()->isCrossing() && !this->getEdge()->isWalkingArea() && !this->getEdge()->isInternal()); + } + + bool prohibits(const IntermodalTrip* const trip) const { + if (trip->node == 0) { + // network only includes IntermodalEdges + return false; + } else { + // limit routing to the surroundings of the specified node + return (this->getEdge()->getFromJunction() != trip->node + && this->getEdge()->getToJunction() != trip->node); + } + } + + virtual double getTravelTime(const IntermodalTrip* const trip, double time) const { + double length = this->getLength(); + if (this->getEdge() == trip->from && !myForward && trip->departPos < myStartPos) { + length = trip->departPos - (myStartPos - this->getLength()); + } + if (this->getEdge() == trip->to && myForward && trip->arrivalPos < myStartPos + this->getLength()) { + length = trip->arrivalPos - myStartPos; + } + if (this->getEdge() == trip->from && myForward && trip->departPos > myStartPos) { + length -= (trip->departPos - myStartPos); + } + if (this->getEdge() == trip->to && !myForward && trip->arrivalPos > myStartPos - this->getLength()) { + length -= (trip->arrivalPos - (myStartPos - this->getLength())); + } + // ensure that 'normal' edges always have a higher weight than connector edges + length = MAX2(length, NUMERICAL_EPS); + double tlsDelay = 0; + // @note pedestrian traffic lights should never have LINKSTATE_TL_REDYELLOW + if (this->getEdge()->isCrossing() && myLane->getIncomingLinkState() == LINKSTATE_TL_RED) { + // red traffic lights occurring later in the route may be green by the time we arrive + tlsDelay += MAX2(double(0), TL_RED_PENALTY - (time - STEPS2TIME(trip->departTime))); + } +#ifdef IntermodalRouter_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; + } + + double getStartPos() const { + return myStartPos; + } + + double getEndPos() const { + return myForward ? myStartPos + this->getLength() : myStartPos - this->getLength(); + } + +private: + /// @brief the original edge + const L* myLane; + + /// @brief the direction of this edge + const bool myForward; + + /// @brief the starting position for split edges + const double myStartPos; + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/PedestrianRouter.h sumo-1.2.0+dfsg1/src/utils/router/PedestrianRouter.h --- sumo-1.1.0+dfsg1/src/utils/router/PedestrianRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/PedestrianRouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,153 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file PedestrianRouter.h +/// @author Jakob Erdmann +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The Pedestrian Router builds a special network and delegates to a SUMOAbstractRouter. +/****************************************************************************/ +#ifndef PedestrianRouter_h +#define PedestrianRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include "SUMOAbstractRouter.h" +#include "DijkstraRouter.h" +#include "IntermodalNetwork.h" + +//#define PedestrianRouter_DEBUG_ROUTES + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class PedestrianRouter + * The router for pedestrians (on a bidirectional network of sidewalks and crossings) + */ +template +class PedestrianRouter : public SUMOAbstractRouter > { +private: + typedef IntermodalEdge _IntermodalEdge; + typedef IntermodalNetwork _IntermodalNetwork; + typedef IntermodalTrip _IntermodalTrip; + typedef DijkstraRouter<_IntermodalEdge, _IntermodalTrip, SUMOAbstractRouterPermissions<_IntermodalEdge, _IntermodalTrip > > _InternalRouter; + +public: + /// Constructor + PedestrianRouter(): + SUMOAbstractRouter("PedestrianRouter", true), myAmClone(false) { + myPedNet = new _IntermodalNetwork(E::getAllEdges(), true); + myInternalRouter = new _InternalRouter(myPedNet->getAllEdges(), true, + gWeightsRandomFactor > 1 ? &_IntermodalEdge::getTravelTimeStaticRandomized : &_IntermodalEdge::getTravelTimeStatic); + } + + PedestrianRouter(_IntermodalNetwork* net): + SUMOAbstractRouter("PedestrianRouterClone", true), myAmClone(true) { + myPedNet = net; + myInternalRouter = new _InternalRouter(myPedNet->getAllEdges(), true, + gWeightsRandomFactor > 1 ? &_IntermodalEdge::getTravelTimeStaticRandomized : &_IntermodalEdge::getTravelTimeStatic); + } + + /// Destructor + virtual ~PedestrianRouter() { + delete myInternalRouter; + if (!myAmClone) { + delete myPedNet; + } + } + + virtual SUMOAbstractRouter* clone() { + return new PedestrianRouter(myPedNet); + } + + /** @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 */ + double compute(const E* from, const E* to, double departPos, double arrivalPos, double speed, + SUMOTime msTime, const N* onlyNode, std::vector& into, bool allEdges = false) { + if (getSidewalk(from) == 0) { + WRITE_WARNING("Departure edge '" + from->getID() + "' does not allow pedestrians."); + return false; + } + if (getSidewalk(to) == 0) { + WRITE_WARNING("Destination edge '" + to->getID() + "' does not allow pedestrians."); + return false; + } + _IntermodalTrip trip(from, to, departPos, arrivalPos, speed, msTime, onlyNode); + std::vector intoPed; + const bool success = myInternalRouter->compute(myPedNet->getDepartConnector(from), + myPedNet->getArrivalConnector(to), + &trip, msTime, intoPed); + double time = 0.; + if (success) { + for (const _IntermodalEdge* pedEdge : intoPed) { + if (pedEdge->includeInRoute(allEdges)) { + into.push_back(pedEdge->getEdge()); + } + time += myInternalRouter->getEffort(pedEdge, &trip, time); + } + } +#ifdef PedestrianRouter_DEBUG_ROUTES + 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 + return success ? time : -1.; + } + + /** @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 */ + bool compute(const E*, const E*, const _IntermodalTrip* const, + SUMOTime, std::vector&, bool) { + throw ProcessError("Do not use this method"); + } + + void prohibit(const std::vector& toProhibit) { + std::vector<_IntermodalEdge*> toProhibitPE; + for (typename std::vector::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) { + toProhibitPE.push_back(myPedNet->getBothDirections(*it).first); + toProhibitPE.push_back(myPedNet->getBothDirections(*it).second); + } + myInternalRouter->prohibit(toProhibitPE); + } + +private: + const bool myAmClone; + _InternalRouter* myInternalRouter; + _IntermodalNetwork* myPedNet; + + +private: + /// @brief Invalidated assignment operator + PedestrianRouter& operator=(const PedestrianRouter& s); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/PublicTransportEdge.h sumo-1.2.0+dfsg1/src/utils/router/PublicTransportEdge.h --- sumo-1.1.0+dfsg1/src/utils/router/PublicTransportEdge.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/PublicTransportEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,165 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file PublicTransportEdge.h +/// @author Michael Behrisch +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The PublicTransportEdge is a special intermodal edge connecting the stop edges with scheduled traffic +/****************************************************************************/ +#ifndef PublicTransportEdge_h +#define PublicTransportEdge_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "IntermodalEdge.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the public transport edge type connecting the stop edges +template +class PublicTransportEdge : public IntermodalEdge { +private: + struct Schedule { + Schedule(const std::string& _id, const SUMOTime _begin, const int _repetitionNumber, const SUMOTime _period, const SUMOTime _travelTime) + : ids({ + _id + }), begin(_begin), repetitionNumber(_repetitionNumber), period(_period), travelTime(_travelTime) {} + // the id of the vehicle or flow from which this schedule is generated + std::vector ids; + const SUMOTime begin; + int repetitionNumber; + // the repetition period for a flow or -1 for a vehicle + SUMOTime period; + const SUMOTime travelTime; + private: + /// @brief Invalidated assignment operator + Schedule& operator=(const Schedule& src); + }; + +public: + PublicTransportEdge(const std::string id, int numericalID, const IntermodalEdge* entryStop, const E* endEdge, const std::string& line, const double length) : + IntermodalEdge(line + ":" + (id != "" ? id : endEdge->getID()), numericalID, endEdge, line, length), myEntryStop(entryStop) { } + + bool includeInRoute(bool /* allEdges */) const { + return true; + } + + bool prohibits(const IntermodalTrip* const trip) const { + return (trip->modeSet & SVC_BUS) == 0; + } + + const IntermodalEdge* getEntryStop() const { + return myEntryStop; + } + + bool hasSchedule(const SUMOTime begin) const { + return mySchedules.find(begin) != mySchedules.end(); + } + + void addSchedule(const std::string id, const SUMOTime begin, const int repetitionNumber, const SUMOTime period, const SUMOTime travelTime) { + // try to merge with existing vehicle or flow + bool found = false; + for (auto& it : mySchedules) { + Schedule& s = it.second; + if (travelTime == s.travelTime) { + if (repetitionNumber == -1 && s.repetitionNumber == 1) { + if (begin > s.begin) { + s.period = begin - s.begin; + found = true; + } + } else if (begin == s.begin + s.repetitionNumber * s.period) { + found = true; + } + if (found) { + s.repetitionNumber += MAX2(repetitionNumber, 1); + s.ids.push_back(id); + break; + } + } + } + if (!found) { + mySchedules.insert(std::make_pair(begin, Schedule(id, begin, MAX2(repetitionNumber, 1), MAX2(period, 1), travelTime))); + } + } + + double getTravelTime(const IntermodalTrip* const /* trip */, double time) const { + SUMOTime minArrival = SUMOTime_MAX; + const SUMOTime step = TIME2STEPS(time); + for (typename std::multimap::const_iterator it = mySchedules.begin(); it != mySchedules.end(); ++it) { + const Schedule& s = it->second; + if (it->first > minArrival) { + break; + } + const SUMOTime offset = MAX2(0, step - s.begin); + int running = (int)(offset / s.period); + if (offset % s.period != 0) { + running++; + } + if (running < s.repetitionNumber) { + const SUMOTime nextDepart = s.begin + running * s.period; + minArrival = MIN2(nextDepart + s.travelTime, minArrival); + //std::cout << " edge=" << myEntryStop->getID() << "->" << this->getID() << " beg=" << s.begin << " end=" << s.end + // << " atTime=" << time + // << " running=" << running << " nextDepart=" << nextDepart + // << " minASec=" << minArrivalSec << " travelTime=" << minArrivalSec - time << "\n"; + } + } + return STEPS2TIME(minArrival - step); + } + + double getIntended(const double time, std::string& intended) const { + /// @note: duplicates some code of getTravelTime() + SUMOTime minArrival = SUMOTime_MAX; + double bestDepartTime = std::numeric_limits::max(); + const SUMOTime step = TIME2STEPS(time); + for (typename std::multimap::const_iterator it = mySchedules.begin(); it != mySchedules.end(); ++it) { + const Schedule& s = it->second; + if (it->first > minArrival) { + break; + } + const SUMOTime offset = MAX2(0, step - s.begin); + int running = (int)(offset / s.period); + if (offset % s.period != 0) { + running++; + } + if (running < s.repetitionNumber) { + const SUMOTime nextDepart = s.begin + running * s.period; + if (nextDepart + s.travelTime < minArrival) { + minArrival = nextDepart + s.travelTime; + bestDepartTime = STEPS2TIME(nextDepart); + // see naming scheme inMSInsertionControl::determineCandidates() + if (s.ids.size() == 1 || running >= (int)s.ids.size()) { + intended = s.repetitionNumber == 1 ? s.ids[0] : s.ids[0] + "." + toString(running); + } else { + intended = s.ids[running]; + } + } + } + } + return bestDepartTime; + } + +private: + std::multimap mySchedules; + const IntermodalEdge* const myEntryStop; + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/RouteCostCalculator.h sumo-1.2.0+dfsg1/src/utils/router/RouteCostCalculator.h --- sumo-1.1.0+dfsg1/src/utils/router/RouteCostCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/RouteCostCalculator.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,122 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file RouteCostCalculator.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Sept 2002 +/// @version $Id$ +/// +// Calculators for route costs and probabilities +/****************************************************************************/ +#ifndef RouteCostCalculator_h +#define RouteCostCalculator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#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 double 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; + + 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 + 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-1.1.0+dfsg1/src/utils/router/RouterProvider.h sumo-1.2.0+dfsg1/src/utils/router/RouterProvider.h --- sumo-1.1.0+dfsg1/src/utils/router/RouterProvider.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/RouterProvider.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,84 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file RouterProvider.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The RouterProvider provides car, pedestrian and intermodal routing in one object +/****************************************************************************/ +#ifndef RouterProvider_h +#define RouterProvider_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "IntermodalRouter.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class RouterProvider + * The encapsulation of the routers for vehicles and pedestrians + */ +template +class RouterProvider { +public: + RouterProvider(SUMOAbstractRouter* vehRouter, + PedestrianRouter* pedRouter, + IntermodalRouter* interRouter) + : myVehRouter(vehRouter), myPedRouter(pedRouter), myInterRouter(interRouter) {} + + RouterProvider(const RouterProvider& original) + : myVehRouter(original.getVehicleRouter().clone()), + myPedRouter(static_cast*>(original.myPedRouter == 0 ? 0 : original.getPedestrianRouter().clone())), + myInterRouter(static_cast*>(original.myInterRouter == 0 ? 0 : original.getIntermodalRouter().clone())) {} + + SUMOAbstractRouter& getVehicleRouter() const { + return *myVehRouter; + } + + PedestrianRouter& getPedestrianRouter() const { + return *myPedRouter; + } + + IntermodalRouter& getIntermodalRouter() const { + return *myInterRouter; + } + + virtual ~RouterProvider() { + delete myVehRouter; + delete myPedRouter; + delete myInterRouter; + } + + +private: + SUMOAbstractRouter* const myVehRouter; + PedestrianRouter* const myPedRouter; + IntermodalRouter* const myInterRouter; + + +private: + /// @brief Invalidated assignment operator + RouterProvider& operator=(const RouterProvider& src); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/SPTree.h sumo-1.2.0+dfsg1/src/utils/router/SPTree.h --- sumo-1.1.0+dfsg1/src/utils/router/SPTree.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/SPTree.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,243 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SPTree.h +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date February 2012 +/// @version $Id$ +/// +// Shortest Path tree of limited depth using Dijkstras algorithm +/****************************************************************************/ +#ifndef SPTree_h +#define SPTree_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#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(); + std::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 double traveltime = min->traveltime + con.cost; + const double 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); + std::push_heap(myFrontier.begin(), myFrontier.end(), myCmp); + } else { + std::push_heap(myFrontier.begin(), + std::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 double bestWitness = dijkstraTT( + aInfo->target, fInfo->target, excluded, (aInfo->permissions & fInfo->permissions)); + const double viaCost = aInfo->cost + fInfo->cost; + if (viaCost < bestWitness) { + myNeededShortcuts.push_back(*it); + } + } + myShortcutsToValidate.clear(); + return myNeededShortcuts; + } + + +private: + // perform dijkstra search under permission constraints + double 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; + } + std::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 double traveltime = min->traveltime + con.cost; + const double 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); + std::push_heap(myFrontier.begin(), myFrontier.end(), myCmp); + } else { + std::push_heap(myFrontier.begin(), + std::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-1.1.0+dfsg1/src/utils/router/StopEdge.h sumo-1.2.0+dfsg1/src/utils/router/StopEdge.h --- sumo-1.1.0+dfsg1/src/utils/router/StopEdge.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/StopEdge.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,47 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file StopEdge.h +/// @author Michael Behrisch +/// @date Mon, 03 March 2014 +/// @version $Id$ +/// +// The StopEdge is a special intermodal edge representing bus and train stops +/****************************************************************************/ +#ifndef StopEdge_h +#define StopEdge_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include "IntermodalEdge.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/// @brief the stop edge type representing bus and train stops +template +class StopEdge : public IntermodalEdge { +public: + StopEdge(const std::string id, int numericalID, const E* edge) : + IntermodalEdge(id, numericalID, edge, "!stop") { } + + bool includeInRoute(bool /* allEdges */) const { + return true; + } +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/router/SUMOAbstractRouter.h sumo-1.2.0+dfsg1/src/utils/router/SUMOAbstractRouter.h --- sumo-1.1.0+dfsg1/src/utils/router/SUMOAbstractRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/router/SUMOAbstractRouter.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,289 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2006-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMOAbstractRouter.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 25.Jan 2006 +/// @version $Id$ +/// +// An abstract router base class +/****************************************************************************/ +#ifndef SUMOAbstractRouter_h +#define SUMOAbstractRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#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: + /** + * @class 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(const E* const e) + : edge(e), effort(std::numeric_limits::max()), + heuristicEffort(std::numeric_limits::max()), + leaveTime(0.), prev(nullptr), visited(false) {} + + /// The current edge + const E* const edge; + + /// Effort to reach the edge + double effort; + + /// Estimated effort to reach the edge (effort + lower bound on remaining effort) + // only used by A* + double heuristicEffort; + + /// The time the vehicle leaves the edge + double leaveTime; + + /// The previous edge + const EdgeInfo* prev; + + /// The previous edge + bool visited; + + inline void reset() { + effort = std::numeric_limits::max(); + heuristicEffort = std::numeric_limits::max(); + visited = false; + } + + private: + /// @brief Invalidated assignment operator + EdgeInfo& operator=(const EdgeInfo& s) = delete; + + }; + + /// Type of the function that is used to retrieve the edge effort. + typedef double(* Operation)(const E* const, const V* const, double); + + /// Constructor + SUMOAbstractRouter(const std::string& type, bool unbuildIsWarning, Operation operation = nullptr, Operation ttOperation = nullptr) : + myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), + myOperation(operation), myTTOperation(ttOperation), + myBulkMode(false), + 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() = 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 bool compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into, bool silent = false) = 0; + + /** @brief Builds the route between the given edges using the minimum effort at the given time + * if from == to, return the shortest looped route */ + bool computeLooped(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into, bool silent = false) { + if (from != to) { + return compute(from, to, vehicle, msTime, into, silent); + } + double minEffort = std::numeric_limits::max(); + std::vector best; + const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); + for (const std::pair& follower : from->getViaSuccessors(vClass)) { + std::vector tmp; + compute(follower.first, to, vehicle, msTime, tmp, true); + if (tmp.size() > 0) { + double effort = recomputeCosts(tmp, vehicle, msTime); + if (effort < minEffort) { + minEffort = effort; + best = tmp; + } + } + } + if (minEffort != std::numeric_limits::max()) { + into.push_back(from); + std::copy(best.begin(), best.end(), std::back_inserter(into)); + return true; + } else if (!silent && myErrorMsgHandler != nullptr) { + myErrorMsgHandler->inform("No connection between edge '" + from->getID() + "' and edge '" + to->getID() + "' found."); + } + return false; + } + + virtual bool isProhibited(const E* const /* edge */, const V* const /* vehicle */) const { + return false; + } + + + inline double getTravelTime(const E* const e, const V* const v, const double t, const double effort) const { + return myTTOperation == nullptr ? effort : (*myTTOperation)(e, v, t); + } + + inline void updateViaEdgeCost(const E* viaEdge, const V* const v, double& time, double& effort, double& length) const { + while (viaEdge != nullptr && viaEdge->isInternal()) { + const double viaEffortDelta = this->getEffort(viaEdge, v, time); + time += getTravelTime(viaEdge, v, time, viaEffortDelta); + effort += viaEffortDelta; + length += viaEdge->getLength(); + viaEdge = viaEdge->getViaSuccessors().front().second; + } + } + + inline void updateViaCost(const E* const prev, const E* const e, const V* const v, double& time, double& effort, double& length) const { + if (prev != nullptr) { + for (const std::pair& follower : prev->getViaSuccessors()) { + if (follower.first == e) { + updateViaEdgeCost(follower.second, v, time, effort, length); + break; + } + } + } + const double effortDelta = this->getEffort(e, v, time); + effort += effortDelta; + time += getTravelTime(e, v, time, effortDelta); + length += e->getLength(); + } + + + inline double recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime, double* lengthp = nullptr) const { + double time = STEPS2TIME(msTime); + double effort = 0.; + double length = 0.; + if (lengthp == nullptr) { + lengthp = &length; + } else { + *lengthp = 0.; + } + const E* prev = nullptr; + for (const E* const e : edges) { + if (isProhibited(e, v)) { + return -1; + } + updateViaCost(prev, e, v, time, effort, *lengthp); + prev = e; + } + return effort; + } + + + inline double getEffort(const E* const e, const V* const v, double 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); + } + + void setBulkMode(const bool mode) { + myBulkMode = mode; + } + +protected: + /// @brief the handler for routing errors + MsgHandler* const myErrorMsgHandler; + + /// @brief The object's operation to perform. + Operation myOperation; + + /// @brief The object's operation to perform for travel times + Operation myTTOperation; + + /// @brief whether we are currently operating several route queries in a bulk + bool myBulkMode; + +private: + /// @brief the type of this router + const std::string myType; + + /// @brief counters for performance logging + long long int myQueryVisits; + long long int myNumQueries; + /// @brief the time spent querying in milliseconds + long long int myQueryStartTime; + long long int myQueryTimeSum; +private: + /// @brief Invalidated assignment operator + SUMOAbstractRouter& operator=(const SUMOAbstractRouter& s); +}; + + +template +class SUMOAbstractRouterPermissions : public SUMOAbstractRouter { +public: + /// Constructor + SUMOAbstractRouterPermissions(const std::string& type, bool unbuildIsWarning, + typename SUMOAbstractRouter::Operation operation = nullptr, typename SUMOAbstractRouter::Operation ttOperation = nullptr) : + SUMOAbstractRouter(type, unbuildIsWarning, operation, ttOperation) { + } + + /// Destructor + virtual ~SUMOAbstractRouterPermissions() { + } + + bool isProhibited(const E* const edge, const V* const 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; + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/shapes/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/shapes/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -4,6 +4,8 @@ Shape.h SUMOPolygon.cpp SUMOPolygon.h + PolygonDynamics.cpp + PolygonDynamics.h ShapeHandler.cpp ShapeHandler.h ShapeContainer.cpp diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/Makefile.am sumo-1.2.0+dfsg1/src/utils/shapes/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/shapes/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -3,5 +3,6 @@ libshapes_a_SOURCES = PointOfInterest.h \ Shape.cpp Shape.h \ SUMOPolygon.cpp SUMOPolygon.h \ +PolygonDynamics.cpp PolygonDynamics.h \ ShapeHandler.cpp ShapeHandler.h \ ShapeContainer.cpp ShapeContainer.h diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/Makefile.in sumo-1.2.0+dfsg1/src/utils/shapes/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/shapes/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,638 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/shapes -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) SUMOPolygon.$(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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libshapes.a -libshapes_a_SOURCES = PointOfInterest.h \ -Shape.cpp Shape.h \ -SUMOPolygon.cpp SUMOPolygon.h \ -ShapeHandler.cpp ShapeHandler.h \ -ShapeContainer.cpp ShapeContainer.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) --foreign src/utils/shapes/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/shapes/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOPolygon.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@ $(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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/shapes/PointOfInterest.h sumo-1.2.0+dfsg1/src/utils/shapes/PointOfInterest.h --- sumo-1.1.0+dfsg1/src/utils/shapes/PointOfInterest.h 2018-06-07 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/PointOfInterest.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -95,6 +95,11 @@ inline double getHeight() const { return myHalfImgHeight * 2.0; } + + /// @brief Returns the image center of the POI + Position getCenter() const { + return {x() + myHalfImgWidth, y() + myHalfImgHeight}; + } /// @} diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/PolygonDynamics.cpp sumo-1.2.0+dfsg1/src/utils/shapes/PolygonDynamics.cpp --- sumo-1.1.0+dfsg1/src/utils/shapes/PolygonDynamics.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/PolygonDynamics.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,248 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file PolygonDynamics.cpp +/// @author Leonhard Luecken +/// @date Apr 2019 +/// @version $Id$ +/// +// A polygon, which holds a timeSpan for displaying dynamic properties +/****************************************************************************/ + + +#include "PolygonDynamics.h" + +#include +#include "utils/vehicle/SUMOTrafficObject.h" +#include "utils/common/SUMOTime.h" +#include "foreign/rtree/SUMORTree.h" + + +//#define DEBUG_DYNAMIC_SHAPES + +PolygonDynamics::PolygonDynamics(double creationTime, + SUMOPolygon* p, + SUMOTrafficObject* trackedObject, + const std::vector& timeSpan, + const std::vector& alphaSpan, + bool looped, + bool rotate) : + myPolygon(p), + myCurrentTime(0), + myLastUpdateTime(creationTime), + animated(!timeSpan.empty()), + looped(looped), + tracking(trackedObject != nullptr), + rotate(rotate), + myTrackedObject(trackedObject), + myTrackedObjectID(""), + myTrackedObjectsInitialPositon(nullptr), + myTrackedObjectsInitialAngle(-1), + myOriginalShape(nullptr), + myTimeSpan(nullptr), + myAlphaSpan(nullptr), + myVis(nullptr) { + // Check for consistency + if (animated) { + myTimeSpan = std::unique_ptr >(new std::vector(timeSpan)); + assert(myTimeSpan->size() >= 2); + assert((*myTimeSpan)[0] == 0.0); + assert(myAlphaSpan == nullptr || myAlphaSpan->size() >= 2); +#ifdef DEBUG_DYNAMIC_SHAPES + if (myTimeSpan->size() >= 2) { + for (unsigned int i = 1; i < myTimeSpan->size(); ++i) { + assert((*myTimeSpan)[i - 1] <= (*myTimeSpan)[i]); + } + } +#endif + myPrevTime = myTimeSpan->begin(); + myNextTime = ++myTimeSpan->begin(); + } +#ifdef DEBUG_DYNAMIC_SHAPES + else { + assert(myAlphaSpan == nullptr); + } +#endif + + myOriginalShape = std::unique_ptr(new PositionVector(p->getShape())); + + if (tracking) { + // Try initializing the tracked position (depends on whether object is already on the road) + initTrackedPosition(); + myTrackedObjectID = myTrackedObject->getID(); + } + + if (!alphaSpan.empty()) { + myAlphaSpan = std::unique_ptr >(new std::vector(alphaSpan)); + assert(myAlphaSpan->size() >= 2); + assert(myAlphaSpan->size() == myTimeSpan->size()); + myPrevAlpha = myAlphaSpan->begin(); + myNextAlpha = ++myAlphaSpan->begin(); + } +} + +PolygonDynamics::~PolygonDynamics() +{} + + +SUMOTime +PolygonDynamics::update(SUMOTime t) { +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << t << " PolygonDynamics::update() for polygon '" << myPolygon->getID() << "'" << std::endl; +#endif + const double simtime = STEPS2TIME(t); + const double dt = simtime - myLastUpdateTime; + myLastUpdateTime = simtime; + assert(dt > 0); + + SUMOTime ret = DELTA_T; + + if (tracking) { + if (myTrackedObjectsInitialPositon == nullptr) { + // Tracked object hasn't entered the network, until now. + // Continuously try to obtain its initial position + initTrackedPosition(); + } + if (myTrackedObjectsInitialPositon != nullptr) { + // Initial position was initialized, relative tracking is possible + const Position& objPos = myTrackedObject->getPosition(); + const bool onRoad = objPos != Position::INVALID; + if (onRoad) { +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " Tracked object '" << myTrackedObject->getID() << "' is on the road. Tracked position=" << objPos << std::endl; +#endif + // Update polygon's shape + myPolygon->myShape = *myOriginalShape; + if (rotate) { + const double relRotation = myTrackedObject->getAngle() - myTrackedObjectsInitialAngle; + myPolygon->myShape.rotate2D(relRotation); + } + myPolygon->myShape.add(objPos); +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " Relative offset to original position: " << relOffset << std::endl; +#endif + + } +#ifdef DEBUG_DYNAMIC_SHAPES + else { + // tracked object is off road + std::cout << " Tracked object '" << myTrackedObject->getID() << "' is off road." << std::endl; + } +#endif + } +#ifdef DEBUG_DYNAMIC_SHAPES + else { + // Initial position was not initialized, yet + std::cout << " Tracked object '" << myTrackedObject->getID() << "' hasn't entered the network since tracking was started." << std::endl; + } +#endif + } + + if (animated) { + // Continue animation + myCurrentTime += dt; + while (myCurrentTime >= *myNextTime) { + // step forward along time lines to appropriate anchor points + ++myPrevTime; + ++myNextTime; + if (myNextTime == myTimeSpan->end()) { + // Set iterators back to point to valid positions + --myPrevTime; + --myNextTime; + break; + } else { + // Forward corresponding iterators for property time lines + if (myAlphaSpan != nullptr) { + ++myPrevAlpha; + ++myNextAlpha; + } + } + } + + // Linear interpolation factor between previous and next time + double theta = 1.0; +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " animation: dt=" << dt + << ", current animation time: " << myCurrentTime + << ", previous anchor time: " << *myPrevTime + << ", next anchor time: " << *myNextTime; +#endif + if (looped) { + const bool resetAnimation = myCurrentTime >= *myNextTime; +#ifdef DEBUG_DYNAMIC_SHAPES + if (resetAnimation) { + std::cout << " (resetting animation!)"; + } +#endif + if (resetAnimation) { + // Reset animation time line to start, if appropriate + while (myCurrentTime >= *myNextTime) { + myCurrentTime -= *myNextTime; + } + myCurrentTime = MAX2(myCurrentTime, 0.0); + myPrevTime = myTimeSpan->begin(); + myNextTime = ++myTimeSpan->begin(); + if (myAlphaSpan != nullptr) { + myPrevAlpha = myAlphaSpan->begin(); + myNextAlpha = ++myAlphaSpan->begin(); + } + } + } + if (myCurrentTime >= *myNextTime) { + assert(!looped); + // Reached the end of the dynamics, indicate expiration by returning zero + // and set all properties to the final state (theta remains one) + ret = 0; +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " (animation elapsed!)"; +#endif + } else { + // Animation is still going on, schedule next update + if (*myNextTime - *myPrevTime != 0) { + theta = (myCurrentTime - *myPrevTime) / (*myNextTime - *myPrevTime); + } + } + if (myAlphaSpan != nullptr) { + // Interpolate values of properties + setAlpha(*myPrevAlpha + theta * (*myNextAlpha - *myPrevAlpha)); +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << ", previous anchor alpha: " << *myPrevAlpha + << ", next anchor alpha: " << *myNextAlpha; +#endif + } +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << ", theta=" << theta << std::endl; +#endif + } + return ret; +} + +void +PolygonDynamics::initTrackedPosition() { + const Position& objPos = myTrackedObject->getPosition(); + if (objPos != Position::INVALID) { + // Initialize Position of tracked object + myTrackedObjectsInitialPositon = std::unique_ptr(new Position(objPos)); + myTrackedObjectsInitialAngle = myTrackedObject->getAngle(); + // Store original polygon shape relative to the tracked object's original position + myOriginalShape->sub(*myTrackedObjectsInitialPositon); +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " Tracking object '" << myTrackedObject->getID() << "' at initial positon: " << *myTrackedObjectsInitialPositon << std::endl; +#endif + } +} + +void +PolygonDynamics::setAlpha(double alpha) { + int a = (int) alpha; + myPolygon->setShapeAlpha((unsigned char) a); +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << "\n DynamicPolygon::setAlpha() Converted alpha=" << alpha << " into myAlpha=" << a << std::endl; +#endif +} diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/PolygonDynamics.h sumo-1.2.0+dfsg1/src/utils/shapes/PolygonDynamics.h --- sumo-1.1.0+dfsg1/src/utils/shapes/PolygonDynamics.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/PolygonDynamics.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,143 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file PolygonDynamics.h +/// @author Leonhard Luecken +/// @date Apr 2019 +/// @version $Id$ +/// +// A polygon, which holds a timeSpan for displaying dynamic properties +/****************************************************************************/ + + +#ifndef UTILS_SHAPES_POLYGONDYNAMICS_H_ +#define UTILS_SHAPES_POLYGONDYNAMICS_H_ + +#include +#include "SUMOPolygon.h" +#include "utils/common/SUMOTime.h" + +class SUMOTrafficObject; +class ShapeContainer; +class SUMORTree; + +class PolygonDynamics { +public: + /** + * @brief Constructor that takes a SUMOPolygon and adds timelines for the properties to be modified dynamically. + * @param p Polygon to be modified + * @param trackedObject A tracked object (nullptr indicates that no tracking is desired) + * @param timeSpan Anchor time points + * For animated polygons: assumed to have a size >= 2, and start at timeSpan[0]=0, + * such that timeSpan[i+1] >= timeSpan[i]) + * If no animation is desired, give timeSpan == nullptr + * @param ...Span property timelines (assumed to be either nullptr, or of size equal to timeSpan (in case of animated poly)) + * @param looped Whether the animation should restart when the last keyframe is reached. In that case + * the animation jumps to the first keyframe as soon as the last is reached. + * If looped==false, the controlled polygon is removed as soon as the timeSpan elapses. + * @param rotate Whether the polygon shall be rotated with the tracked object. + */ + PolygonDynamics(double creationTime, + SUMOPolygon* p, + SUMOTrafficObject* trackedObject, + const std::vector& timeSpan, + const std::vector& alphaSpan, + bool looped, + bool rotate); + virtual ~PolygonDynamics(); + + const std::string& getPolygonID() const { + return myPolygon->getID(); + } + + SUMOPolygon* getPolygon() const { + return myPolygon; + } + + inline const std::string& getTrackedObjectID() const { + return myTrackedObjectID; + } + + /// @brief Updates the polygon according to its timeSpan and follows the tracked object + /// @param t Current sumo time step (in ms.) when this is called + /// @returns Next desired update time. + SUMOTime update(SUMOTime t); + + /// @brief Set the RTree + void setRTree(SUMORTree* rtree) { + myVis = rtree; + } + +private: + + /// @brief Sets the alpha value for the shape's color + void setAlpha(double alpha); + + /// @brief Initialize the object's position + void initTrackedPosition(); + + /// @brief The polygon this dynamics acts upon. + SUMOPolygon* myPolygon; + + /// @brief Current time + double myCurrentTime; + + /// @brief The last time the animation has been updated + double myLastUpdateTime; + + /// @brief Whether this polygon is animated, i.e., whether + /// timelines should be used to control properties. + bool animated; + + /// @brief Whether animation should be looped. + bool looped; + + /// @brief Whether this polygon tracks an object + bool tracking; + + /// @brief Whether this polygon should be rotated with the tracked object + bool rotate; + + /// @brief An object tracked by the shape, deletion by caller + SUMOTrafficObject* myTrackedObject; + std::string myTrackedObjectID; + + /// @brief Initial position of the tracked object + std::unique_ptr myTrackedObjectsInitialPositon; + + /// @brief Initial angle of the tracked object + double myTrackedObjectsInitialAngle; + + /// @brief the original shape of the polygon + /// (in case of tracking another object, this is converted to relative + /// coords wrt to the other objects initial position as origin) + std::unique_ptr myOriginalShape; + + /// @brief Time points corresponding to the anchor values of the dynamic properties + /// @note Assumed to have a size >= 2, and start at timeSpan[0]=0, such that timeSpan[i+1] >= timeSpan[i] + std::unique_ptr > myTimeSpan; + + /// @brief Pointer to the next time points in timeSpan + /// @note These iterators are only valid if timeSpan != nullptr + std::vector::const_iterator myPrevTime; + std::vector::const_iterator myNextTime; + + /// @brief Alpha values corresponding to + std::unique_ptr > myAlphaSpan; + /// @brief Pointer to the next alpha points in alphaSpan + /// @note These iterators are only valid if alphaSpan != nullptr + std::vector::const_iterator myPrevAlpha; + std::vector::const_iterator myNextAlpha; + + /// @brief RTree will be supplied in case of GUI simulation to be updated on move + SUMORTree* myVis; + +}; + +#endif /* UTILS_SHAPES_POLYGONDYNAMICS_H_ */ diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/ShapeContainer.cpp sumo-1.2.0+dfsg1/src/utils/shapes/ShapeContainer.cpp --- sumo-1.1.0+dfsg1/src/utils/shapes/ShapeContainer.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/ShapeContainer.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -35,15 +35,31 @@ #include #include #include +#include +#include "PolygonDynamics.h" #include "ShapeContainer.h" +// Debug defines +//#define DEBUG_DYNAMIC_SHAPES + // =========================================================================== // method definitions // =========================================================================== ShapeContainer::ShapeContainer() {} -ShapeContainer::~ShapeContainer() {} +ShapeContainer::~ShapeContainer() { + for (auto& p : myPolygonUpdateCommands) { + p.second->deschedule(); + } + myPolygonUpdateCommands.clear(); + + for (auto& p : myPolygonDynamics) { + delete p.second; + } + myPolygonDynamics.clear(); + +} bool ShapeContainer::addPolygon(const std::string& id, const std::string& type, @@ -54,6 +70,78 @@ } +PolygonDynamics* +ShapeContainer::addPolygonDynamics(double simtime, + std::string polyID, + SUMOTrafficObject* trackedObject, + const std::vector& timeSpan, + const std::vector& alphaSpan, + bool looped, + bool rotate) { + +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << simtime << " ShapeContainer::addPolygonDynamics() called for polygon '" << polyID << "'" << std::endl; +#endif + + SUMOPolygon* p = myPolygons.get(polyID); + if (p == nullptr) { +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " polygon '" << polyID << "' doesn't exist!" << std::endl; +#endif + return nullptr; + } + // remove eventually existent previously assigne dynamics + removePolygonDynamics(polyID); + + // Add new dynamics + PolygonDynamics* pd = new PolygonDynamics(simtime, p, trackedObject, timeSpan, alphaSpan, looped, rotate); + myPolygonDynamics.insert(std::make_pair(polyID, pd)); + + // Add tracking information + if (trackedObject != nullptr) { + auto i = myTrackingPolygons.find(pd->getTrackedObjectID()); + if (i == myTrackingPolygons.end()) { + myTrackingPolygons.insert(std::make_pair(pd->getTrackedObjectID(), std::set({p}))); + } else { + i->second.insert(p); + } + } + return pd; +} + + +bool +ShapeContainer::removePolygonDynamics(const std::string& polyID) { + SUMOPolygon* p = myPolygons.get(polyID); + if (p == nullptr) { + return false; + } + auto d = myPolygonDynamics.find(polyID); + if (d != myPolygonDynamics.end()) { +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " Removing dynamics of polygon '" << polyID << "'" << std::endl; +#endif + const std::string& trackedObjID = d->second->getTrackedObjectID(); + if (trackedObjID != "") { + // Remove tracking information + auto i = myTrackingPolygons.find(trackedObjID); + assert(i != myTrackingPolygons.end()); + assert(i->second.find(p) != i->second.end()); + i->second.erase(p); + // Remove highlighting information + clearHighlights(trackedObjID); + } + delete d->second; + myPolygonDynamics.erase(d); + // Clear existing polygon dynamics commands before adding new dynamics + cleanupPolygonDynamics(polyID); + return true; + } else { + return false; + } +} + + bool ShapeContainer::addPOI(const std::string& id, const std::string& type, const RGBColor& color, const Position& pos, bool geo, const std::string& lane, double posOverLane, double posLat, double layer, double angle, @@ -63,7 +151,11 @@ bool -ShapeContainer::removePolygon(const std::string& id) { +ShapeContainer::removePolygon(const std::string& id, bool /* useLock */) { +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << "ShapeContainer: Removing Polygon '" << id << "'" << std::endl; +#endif + removePolygonDynamics(id); return myPolygons.remove(id); } @@ -112,5 +204,87 @@ } +void +ShapeContainer::cleanupPolygonDynamics(const std::string& id) { + auto j = myPolygonUpdateCommands.find(id); + if (j != myPolygonUpdateCommands.end()) { + j->second->deschedule(); + myPolygonUpdateCommands.erase(j); + } +} + + +SUMOTime +ShapeContainer::polygonDynamicsUpdate(SUMOTime t, PolygonDynamics* pd) { + SUMOTime next = pd->update(t); + if (next == 0) { + // Dynamics have expired => remove polygon + myPolygonUpdateCommands[pd->getPolygonID()]->deschedule(); + // Don't aquire lock (in GUI case GUIShapeContainer::polygonDynamicsUpdate() does this) + removePolygon(pd->getPolygonID(), false); + } + return next; +} + +void +ShapeContainer::registerHighlight(const std::string& objectID, const int type, const std::string& polygonID) { + std::string toRemove = ""; + clearHighlight(objectID, type, toRemove); + if (toRemove != "") { + removePolygon(toRemove); + } + auto i = myHighlightPolygons.find(objectID); + if (i == myHighlightPolygons.end()) { + myHighlightPolygons.insert(std::make_pair(objectID, std::map({std::make_pair(type, polygonID)}))); + } else { + i->second.insert(std::make_pair(type, polygonID)); + } + myHighlightedObjects.insert(std::make_pair(polygonID, objectID)); +} + +void +ShapeContainer::clearHighlight(const std::string& objectID, const int type, std::string& toRemove) { + auto i = myHighlightPolygons.find(objectID); + if (i != myHighlightPolygons.end()) { + auto j = i->second.find(type); + if (j != i->second.end()) { + toRemove = j->second; + myHighlightedObjects.erase(toRemove); + i->second.erase(j); + if (i->second.empty()) { + myHighlightPolygons.erase(i); + } + } + } +} + +void +ShapeContainer::clearHighlights(const std::string& objectID) { + auto i = myHighlightPolygons.find(objectID); + if (i != myHighlightPolygons.end()) { + myHighlightPolygons.erase(i); + } +} + +void +ShapeContainer::addPolygonUpdateCommand(std::string polyID, ParametrisedWrappingCommand* cmd) { + myPolygonUpdateCommands.insert(std::make_pair(polyID, cmd)); +} + + +void +ShapeContainer::removeTrackers(std::string objectID) { + auto i = myTrackingPolygons.find(objectID); + if (i != myTrackingPolygons.end()) { +#ifdef DEBUG_DYNAMIC_SHAPES + std::cout << " Removing tracking polygons for object '" << objectID << "'" << std::endl; +#endif + for (const SUMOPolygon* p : i->second) { + removePolygon(p->getID()); + } + myTrackingPolygons.erase(i); + } +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/ShapeContainer.h sumo-1.2.0+dfsg1/src/utils/shapes/ShapeContainer.h --- sumo-1.1.0+dfsg1/src/utils/shapes/ShapeContainer.h 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/ShapeContainer.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2005-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2005-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -26,10 +26,19 @@ #include #include +#include +#include #include #include "PointOfInterest.h" #include "SUMOPolygon.h" +// =========================================================================== +// class declarations +// =========================================================================== +class PolygonDynamics; +class SUMOTrafficObject; +template +class ParametrisedWrappingCommand; // =========================================================================== // class definitions @@ -71,6 +80,27 @@ bool relativePath, const PositionVector& shape, bool geo, bool fill, double lineWidth, bool ignorePruning = false); + /** + * @brief Adds dynamics (animation / tracking) to the given polygon + * @param polyID ID of the polygon which should become dynamic + * @return true if the operation was successful, false if not. + * @see PolygonDynamics() + */ + virtual PolygonDynamics* addPolygonDynamics(double simtime, + std::string polyID, + SUMOTrafficObject* trackedObject, + const std::vector& timeSpan, + const std::vector& alphaSpan, + bool looped, + bool rotate); + + /** + * @brief Remove dynamics (animation / tracking) for the given polygon + * @param polyID ID of the polygon for which dynamics shall be removed + * @return true if the operation was successful (dynamics existed for the polygon), false if not. + */ + virtual bool removePolygonDynamics(const std::string& polyID); + /** @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 @@ -96,7 +126,7 @@ * @param[in] id The id of the polygon * @return Whether the polygon could be removed */ - virtual bool removePolygon(const std::string& id); + virtual bool removePolygon(const std::string& id, bool useLock = true); /** @brief Removes a PoI from the container * @param[in] id The id of the PoI @@ -126,6 +156,22 @@ return myPOIs; } + /** @brief Regular update event for updating polygon dynamics + * @param[in] t The time at which the update is called + * @param[in] pd The dynamics to be updated + * @returns zero If dynamics has expired, next update time otherwise + */ + virtual SUMOTime polygonDynamicsUpdate(SUMOTime t, PolygonDynamics* pd); + + /// @brief Register update command (for descheduling at removal) + virtual void addPolygonUpdateCommand(std::string polyID, ParametrisedWrappingCommand* cmd); + + /// @brief Remove all tracking polygons for the given object + virtual void removeTrackers(std::string objectID); + + /// @brief register highlight of the specified type if the given id + virtual void registerHighlight(const std::string& objectID, const int type, const std::string& polygonID); + protected: /// @brief add polygon virtual bool add(SUMOPolygon* poly, bool ignorePruning = false); @@ -133,12 +179,46 @@ /// @brief add poi virtual bool add(PointOfInterest* poi, bool ignorePruning = false); + /** @brief Unschedules the removal and update commands of the given polygon. + * @param[in] id The id of the polygon + */ + virtual void cleanupPolygonDynamics(const std::string& id); + + /// @name Management of highlights. For each type, only one highlight can be active, + /// @see myHighlightPolygons, myHighlightedObjects + /// @{ + /// @brief Remove any previously added highlight polygon of the specified type + /// @param[out] toRemove will hold the id of any polygon that was highlighting the given object + virtual void clearHighlight(const std::string& objectID, const int type, std::string& toRemove); + /// @brief Clears all highlight information from the maps when the object leaves the net + /// (Highlight polygons and dynamics are removed via removeTrackers()) + virtual void clearHighlights(const std::string& objectID); + /// @} + protected: /// @brief stored Polygons Polygons myPolygons; + /// @brief stored PolygonDynamics + std::map myPolygonDynamics; + + /// @brief maps objects to a map of highlight types to highlighting polygons + std::map > myHighlightPolygons; + /// @brief inverse map to myHighlightPolygons saves the highlighted object for each polygon + std::map myHighlightedObjects; + + /// @brief Information about tracked objects + /// @note Maps tracked object IDs to set of polygons, which are tracking the object. + /// Needed at object removal to cancel tacking (i.e. remove tracking poly). + std::map > myTrackingPolygons; + /// @brief stored POIs POIs myPOIs; + +private: + /// @brief Command pointers for scheduled polygon update. Maps PolyID->Command + std::map*> myPolygonUpdateCommands; + }; diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/Shape.cpp sumo-1.2.0+dfsg1/src/utils/shapes/Shape.cpp --- sumo-1.1.0+dfsg1/src/utils/shapes/Shape.cpp 2018-12-05 23:01:12.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/Shape.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/Shape.h sumo-1.2.0+dfsg1/src/utils/shapes/Shape.h --- sumo-1.1.0+dfsg1/src/utils/shapes/Shape.h 2018-12-05 23:01:12.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/Shape.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -131,6 +131,13 @@ myColor = col; } + /** @brief Sets a new alpha value + * @param[in] alpha The new value to use + */ + inline void setShapeAlpha(unsigned char alpha) { + myColor.setAlpha(alpha); + } + /** @brief Sets a new layer * @param[in] layer The new layer to use */ diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/ShapeHandler.cpp sumo-1.2.0+dfsg1/src/utils/shapes/ShapeHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/shapes/ShapeHandler.cpp 2018-12-05 23:01:12.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/ShapeHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -32,6 +32,7 @@ #include #include #include + #include "Shape.h" #include "ShapeContainer.h" #include "ShapeHandler.h" @@ -40,10 +41,16 @@ // =========================================================================== // method definitions // =========================================================================== -ShapeHandler::ShapeHandler(const std::string& file, ShapeContainer& sc) : - SUMOSAXHandler(file), myShapeContainer(sc), - myPrefix(""), myDefaultColor(RGBColor::RED), myDefaultLayer(), myDefaultFill(false), - myLastParameterised(nullptr) { + +ShapeHandler::ShapeHandler(const std::string& file, ShapeContainer& sc, const GeoConvHelper* geoConvHelper) : + SUMOSAXHandler(file), + myShapeContainer(sc), + myPrefix(""), + myDefaultColor(RGBColor::RED), + myDefaultLayer(0), + myDefaultFill(false), + myLastParameterised(nullptr), + myGeoConvHelper(geoConvHelper) { } @@ -55,10 +62,12 @@ try { switch (element) { case SUMO_TAG_POLY: + // default layer is different depending if we're parsing a Poly or a POI, therefore it has to be here defined myDefaultLayer = Shape::DEFAULT_LAYER; addPoly(attrs, false, false); break; case SUMO_TAG_POI: + // default layer is different depending if we're parsing a Poly or a POI, therefore it has to be here defined myDefaultLayer = Shape::DEFAULT_LAYER_POI; addPOI(attrs, false, false); break; @@ -99,6 +108,7 @@ } } + void ShapeHandler::addPOI(const SUMOSAXAttributes& attrs, const bool ignorePruning, const bool useProcessing) { bool ok = true; @@ -125,8 +135,12 @@ if (!ok) { return; } - const GeoConvHelper& gch = useProcessing ? GeoConvHelper::getProcessing() : GeoConvHelper::getFinal(); - if (useProcessing && gch.usingGeoProjection()) { + const GeoConvHelper* gch = (myGeoConvHelper != nullptr + ? myGeoConvHelper + : (useProcessing + ? &GeoConvHelper::getProcessing() + : &GeoConvHelper::getFinal())); + if (useProcessing && gch->usingGeoProjection()) { if (lat == INVALID_POSITION || lon == INVALID_POSITION) { lon = x; lat = y; @@ -144,7 +158,7 @@ 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 (!gch.usingGeoProjection()) { + } else if (!gch->usingGeoProjection()) { WRITE_ERROR("(lon, lat) is specified for PoI '" + id + "' but no geo-conversion is specified for the network."); return; } @@ -154,7 +168,7 @@ if (useProcessing) { success = GeoConvHelper::getProcessing().x2cartesian(pos); } else { - success = GeoConvHelper::getFinal().x2cartesian_const(pos); + success = gch->x2cartesian_const(pos); } if (!success) { WRITE_ERROR("Unable to project coordinates for PoI '" + id + "'."); @@ -189,6 +203,7 @@ const RGBColor color = attrs.hasAttribute(SUMO_ATTR_COLOR) ? attrs.get(SUMO_ATTR_COLOR, id.c_str(), ok) : myDefaultColor; PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); bool geo = false; + const GeoConvHelper* gch = myGeoConvHelper != nullptr ? myGeoConvHelper : &GeoConvHelper::getFinal(); if (attrs.getOpt(SUMO_ATTR_GEO, id.c_str(), ok, false)) { geo = true; bool success = true; @@ -196,7 +211,7 @@ if (useProcessing) { success &= GeoConvHelper::getProcessing().x2cartesian(shape[i]); } else { - success &= GeoConvHelper::getFinal().x2cartesian_const(shape[i]); + success &= gch->x2cartesian_const(shape[i]); } } if (!success) { @@ -228,6 +243,11 @@ } +Parameterised* +ShapeHandler::getLastParameterised() const { + return myLastParameterised; +} + bool ShapeHandler::loadFiles(const std::vector& files, ShapeHandler& sh) { @@ -250,5 +270,9 @@ } +bool +ShapeHandler::addLanePosParams() { + return false; +} /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/ShapeHandler.h sumo-1.2.0+dfsg1/src/utils/shapes/ShapeHandler.h --- sumo-1.1.0+dfsg1/src/utils/shapes/ShapeHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/ShapeHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -33,6 +33,7 @@ // =========================================================================== class ShapeContainer; class Parameterised; +class GeoConvHelper; // =========================================================================== @@ -56,7 +57,7 @@ * @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); + ShapeHandler(const std::string& file, ShapeContainer& sc, const GeoConvHelper* = nullptr); /// @brief Destructor virtual ~ShapeHandler(); @@ -75,8 +76,7 @@ * @see GenericSAXHandler::myStartElement * @todo Refactor/describe */ - virtual void myStartElement(int element, - const SUMOSAXAttributes& attrs); + virtual void myStartElement(int element, const SUMOSAXAttributes& attrs); /** @brief Called when a closing tag occurs * @@ -88,13 +88,11 @@ virtual void myEndElement(int element); //@} - /// @brief get position for a given laneID + /// @brief get position for a given laneID (Has to be implemented in all child) virtual Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat) = 0; - /// @brief Whether some input attributes shall be automatically added as params - virtual bool addLanePosParams() { - return false; - } + /// @brief Whether some input attributes shall be automatically added as params (Can be implemented in all child) + virtual bool addLanePosParams(); protected: /// @brief set default values @@ -106,10 +104,13 @@ /// @brief adds a polygon void addPoly(const SUMOSAXAttributes& attrs, const bool ignorePruning, const bool useProcessing); + /// @brief get last parameterised object + Parameterised* getLastParameterised() const; + protected: + /// @brief reference to shape container in which all Shares are being added ShapeContainer& myShapeContainer; -private: /// @brief The prefix to use std::string myPrefix; @@ -125,7 +126,9 @@ /// @brief element to receive parameters Parameterised* myLastParameterised; -private: + /// @brief geo-conversion to use during loading + const GeoConvHelper* myGeoConvHelper; + /// @brief invalidate copy constructor ShapeHandler(const ShapeHandler& s) = delete; diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/SUMOPolygon.cpp sumo-1.2.0+dfsg1/src/utils/shapes/SUMOPolygon.cpp --- sumo-1.1.0+dfsg1/src/utils/shapes/SUMOPolygon.cpp 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/SUMOPolygon.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -39,8 +39,7 @@ myShape(shape), myGEO(geo), myFill(fill), - myLineWidth(lineWidth) -{ + myLineWidth(lineWidth) { } diff -Nru sumo-1.1.0+dfsg1/src/utils/shapes/SUMOPolygon.h sumo-1.2.0+dfsg1/src/utils/shapes/SUMOPolygon.h --- sumo-1.1.0+dfsg1/src/utils/shapes/SUMOPolygon.h 2018-10-16 22:00:38.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/shapes/SUMOPolygon.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2004-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2004-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -45,6 +45,7 @@ * @brief A 2D- or 3D-polygon */ class SUMOPolygon : public Shape, public Parameterised { + friend class PolygonDynamics; public: /** @brief Constructor * @param[in] id The name of the polygon diff -Nru sumo-1.1.0+dfsg1/src/utils/traci/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/traci/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/traci/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/traci/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -5,3 +5,13 @@ add_library(utils_traci STATIC ${utils_traci_STAT_SRCS}) set_property(TARGET utils_traci PROPERTY PROJECT_LABEL "z_utils_traci") + +if (SUMO_UTILS) + add_library(traciclient SHARED ${utils_traci_STAT_SRCS}) + install(TARGETS traciclient DESTINATION lib) + if (MSVC OR APPLE) + target_link_libraries(traciclient foreign_tcpip) + else () + target_link_libraries(traciclient -Wl,--whole-archive foreign_tcpip -Wl,--no-whole-archive) + endif() +endif() diff -Nru sumo-1.1.0+dfsg1/src/utils/traci/Makefile.in sumo-1.2.0+dfsg1/src/utils/traci/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/traci/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/traci/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,629 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/traci -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 = -libtraciclient_a_AR = $(AR) $(ARFLAGS) -libtraciclient_a_LIBADD = -am_libtraciclient_a_OBJECTS = TraCIAPI.$(OBJEXT) -libtraciclient_a_OBJECTS = $(am_libtraciclient_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 = $(libtraciclient_a_SOURCES) -DIST_SOURCES = $(libtraciclient_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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libtraciclient.a -libtraciclient_a_SOURCES = TraCIAPI.cpp TraCIAPI.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) --foreign src/utils/traci/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/traci/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) - -libtraciclient.a: $(libtraciclient_a_OBJECTS) $(libtraciclient_a_DEPENDENCIES) $(EXTRA_libtraciclient_a_DEPENDENCIES) - $(AM_V_at)-rm -f libtraciclient.a - $(AM_V_AR)$(libtraciclient_a_AR) libtraciclient.a $(libtraciclient_a_OBJECTS) $(libtraciclient_a_LIBADD) - $(AM_V_at)$(RANLIB) libtraciclient.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIAPI.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/traci/TraCIAPI.cpp sumo-1.2.0+dfsg1/src/utils/traci/TraCIAPI.cpp --- sumo-1.1.0+dfsg1/src/utils/traci/TraCIAPI.cpp 2018-11-29 23:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/traci/TraCIAPI.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -45,20 +45,20 @@ simulation(*this), trafficlights(*this), vehicle(*this), vehicletype(*this), mySocket(nullptr) { - myDomains[RESPONSE_SUBSCRIBE_EDGE_VARIABLE] = &edge; - myDomains[RESPONSE_SUBSCRIBE_GUI_VARIABLE] = &gui; - myDomains[RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE] = &junction; - myDomains[RESPONSE_SUBSCRIBE_LANE_VARIABLE] = &lane; - myDomains[RESPONSE_SUBSCRIBE_LANEAREA_VARIABLE] = &lanearea; - myDomains[RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE] = &multientryexit; - myDomains[RESPONSE_SUBSCRIBE_PERSON_VARIABLE] = &person; - myDomains[RESPONSE_SUBSCRIBE_POI_VARIABLE] = &poi; - myDomains[RESPONSE_SUBSCRIBE_POLYGON_VARIABLE] = &polygon; - myDomains[RESPONSE_SUBSCRIBE_ROUTE_VARIABLE] = &route; - myDomains[RESPONSE_SUBSCRIBE_SIM_VARIABLE] = &simulation; - myDomains[RESPONSE_SUBSCRIBE_TL_VARIABLE] = &trafficlights; - myDomains[RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE] = &vehicle; - myDomains[RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE] = &vehicletype; + myDomains[libsumo::RESPONSE_SUBSCRIBE_EDGE_VARIABLE] = &edge; + myDomains[libsumo::RESPONSE_SUBSCRIBE_GUI_VARIABLE] = &gui; + myDomains[libsumo::RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE] = &junction; + myDomains[libsumo::RESPONSE_SUBSCRIBE_LANE_VARIABLE] = &lane; + myDomains[libsumo::RESPONSE_SUBSCRIBE_LANEAREA_VARIABLE] = &lanearea; + myDomains[libsumo::RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE] = &multientryexit; + myDomains[libsumo::RESPONSE_SUBSCRIBE_PERSON_VARIABLE] = &person; + myDomains[libsumo::RESPONSE_SUBSCRIBE_POI_VARIABLE] = &poi; + myDomains[libsumo::RESPONSE_SUBSCRIBE_POLYGON_VARIABLE] = &polygon; + myDomains[libsumo::RESPONSE_SUBSCRIBE_ROUTE_VARIABLE] = &route; + myDomains[libsumo::RESPONSE_SUBSCRIBE_SIM_VARIABLE] = &simulation; + myDomains[libsumo::RESPONSE_SUBSCRIBE_TL_VARIABLE] = &trafficlights; + myDomains[libsumo::RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE] = &vehicle; + myDomains[libsumo::RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE] = &vehicletype; } #ifdef _MSC_VER #pragma warning(pop) @@ -89,12 +89,12 @@ // command length outMsg.writeUnsignedByte(1 + 1 + 4); // command id - outMsg.writeUnsignedByte(CMD_SETORDER); + outMsg.writeUnsignedByte(libsumo::CMD_SETORDER); outMsg.writeInt(order); // send request message mySocket->sendExact(outMsg); tcpip::Storage inMsg; - check_resultState(inMsg, CMD_SETORDER); + check_resultState(inMsg, libsumo::CMD_SETORDER); } @@ -103,7 +103,7 @@ send_commandClose(); tcpip::Storage inMsg; std::string acknowledgement; - check_resultState(inMsg, CMD_CLOSE, false, &acknowledgement); + check_resultState(inMsg, libsumo::CMD_CLOSE, false, &acknowledgement); closeSocket(); } @@ -125,7 +125,7 @@ // command length outMsg.writeUnsignedByte(1 + 1 + 8); // command id - outMsg.writeUnsignedByte(CMD_SIMSTEP); + outMsg.writeUnsignedByte(libsumo::CMD_SIMSTEP); outMsg.writeDouble(time); // send request message mySocket->sendExact(outMsg); @@ -138,7 +138,7 @@ // command length outMsg.writeUnsignedByte(1 + 1); // command id - outMsg.writeUnsignedByte(CMD_CLOSE); + outMsg.writeUnsignedByte(libsumo::CMD_CLOSE); mySocket->sendExact(outMsg); } @@ -149,7 +149,7 @@ // command length outMsg.writeUnsignedByte(1 + 1 + 4); // command id - outMsg.writeUnsignedByte(CMD_SETORDER); + outMsg.writeUnsignedByte(libsumo::CMD_SETORDER); // client index outMsg.writeInt(order); mySocket->sendExact(outMsg); @@ -157,50 +157,26 @@ void -TraCIAPI::send_commandGetVariable(int domID, int varID, const std::string& objID, tcpip::Storage* add) const { - if (mySocket == nullptr) { - throw tcpip::SocketException("Socket is not initialised"); - } - tcpip::Storage outMsg; +TraCIAPI::createCommand(int cmdID, int varID, const std::string& objID, tcpip::Storage* add) const { + myOutput.reset(); // command length int length = 1 + 1 + 1 + 4 + (int) objID.length(); if (add != nullptr) { length += (int)add->size(); } - outMsg.writeUnsignedByte(length); - // command id - outMsg.writeUnsignedByte(domID); - // variable id - outMsg.writeUnsignedByte(varID); - // object id - outMsg.writeString(objID); + if (length <= 255) { + myOutput.writeUnsignedByte(length); + } else { + myOutput.writeUnsignedByte(0); + myOutput.writeInt(length + 4); + } + myOutput.writeUnsignedByte(cmdID); + myOutput.writeUnsignedByte(varID); + myOutput.writeString(objID); // additional values if (add != nullptr) { - outMsg.writeStorage(*add); + myOutput.writeStorage(*add); } - // send request message - mySocket->sendExact(outMsg); -} - - -void -TraCIAPI::send_commandSetValue(int domID, int varID, const std::string& objID, tcpip::Storage& content) const { - if (mySocket == nullptr) { - throw tcpip::SocketException("Socket is not initialised"); - } - tcpip::Storage outMsg; - // command length (domID, varID, objID, dataType, data) - outMsg.writeUnsignedByte(1 + 1 + 1 + 4 + (int) objID.length() + (int)content.size()); - // command id - outMsg.writeUnsignedByte(domID); - // variable id - outMsg.writeUnsignedByte(varID); - // object id - outMsg.writeString(objID); - // data type - outMsg.writeStorage(content); - // send message - mySocket->sendExact(outMsg); } @@ -262,25 +238,6 @@ mySocket->sendExact(outMsg); } -void -TraCIAPI::send_commandMoveToXY(const std::string& vehicleID, const std::string& edgeID, const int lane, const double x, const double y, const double angle, const int keepRoute) const { - tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); - content.writeInt(6); - content.writeUnsignedByte(TYPE_STRING); - content.writeString(edgeID); - content.writeUnsignedByte(TYPE_INTEGER); - content.writeInt(lane); - content.writeUnsignedByte(TYPE_DOUBLE); - content.writeDouble(x); - content.writeUnsignedByte(TYPE_DOUBLE); - content.writeDouble(y); - content.writeUnsignedByte(TYPE_DOUBLE); - content.writeDouble(angle); - content.writeUnsignedByte(TYPE_BYTE); - content.writeByte(keepRoute); - send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, MOVE_TO_XY, vehicleID, content); -} void TraCIAPI::check_resultState(tcpip::Storage& inMsg, int command, bool ignoreCommandId, std::string* acknowledgement) const { @@ -303,11 +260,11 @@ throw libsumo::TraCIException("#Error: an exception was thrown while reading result state message"); } switch (resultType) { - case RTYPE_ERR: + case libsumo::RTYPE_ERR: throw libsumo::TraCIException(".. Answered with error to command (" + toString(command) + "), [description: " + msg + "]"); - case RTYPE_NOTIMPLEMENTED: + case libsumo::RTYPE_NOTIMPLEMENTED: throw libsumo::TraCIException(".. Sent command is not implemented (" + toString(command) + "), [description: " + msg + "]"); - case RTYPE_OK: + case libsumo::RTYPE_OK: if (acknowledgement != nullptr) { (*acknowledgement) = ".. Command acknowledged (" + toString(command) + "), [description: " + msg + "]"; } @@ -345,65 +302,88 @@ } -void -TraCIAPI::processGET(tcpip::Storage& inMsg, int command, int expectedType, bool ignoreCommandId) const { - check_resultState(inMsg, command, ignoreCommandId); - check_commandGetResult(inMsg, command, expectedType, ignoreCommandId); +bool +TraCIAPI::processGet(int command, int expectedType, bool ignoreCommandId) { + if (mySocket != nullptr) { + mySocket->sendExact(myOutput); + myInput.reset(); + check_resultState(myInput, command, ignoreCommandId); + check_commandGetResult(myInput, command, expectedType, ignoreCommandId); + return true; + } + return false; +} + + +bool +TraCIAPI::processSet(int command) { + if (mySocket != nullptr) { + mySocket->sendExact(myOutput); + myInput.reset(); + check_resultState(myInput, command); + return true; + } + return false; } int TraCIAPI::getUnsignedByte(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_UBYTE); - return inMsg.readUnsignedByte(); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_UBYTE)) { + return myInput.readUnsignedByte(); + } + return libsumo::INVALID_INT_VALUE; } int TraCIAPI::getByte(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_BYTE); - return inMsg.readByte(); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_BYTE)) { + return myInput.readByte(); + } + return libsumo::INVALID_INT_VALUE; } + int TraCIAPI::getInt(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_INTEGER); - return inMsg.readInt(); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_INTEGER)) { + return myInput.readInt(); + } + return libsumo::INVALID_INT_VALUE; } double TraCIAPI::getDouble(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_DOUBLE); - return inMsg.readDouble(); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_DOUBLE)) { + return myInput.readDouble(); + } + return libsumo::INVALID_DOUBLE_VALUE; } libsumo::TraCIPositionVector TraCIAPI::getPolygon(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_POLYGON); - int size = inMsg.readUnsignedByte(); - if (size == 0) { - size = inMsg.readInt(); - } libsumo::TraCIPositionVector ret; - for (int i = 0; i < size; ++i) { - libsumo::TraCIPosition p; - p.x = inMsg.readDouble(); - p.y = inMsg.readDouble(); - p.z = 0; - ret.push_back(p); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_POLYGON)) { + int size = myInput.readUnsignedByte(); + if (size == 0) { + size = myInput.readInt(); + } + for (int i = 0; i < size; ++i) { + libsumo::TraCIPosition p; + p.x = myInput.readDouble(); + p.y = myInput.readDouble(); + p.z = 0.; + ret.push_back(p); + } } return ret; } @@ -411,48 +391,49 @@ libsumo::TraCIPosition TraCIAPI::getPosition(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, POSITION_2D); libsumo::TraCIPosition p; - p.x = inMsg.readDouble(); - p.y = inMsg.readDouble(); - p.z = 0; + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::POSITION_2D)) { + p.x = myInput.readDouble(); + p.y = myInput.readDouble(); + p.z = 0; + } return p; } libsumo::TraCIPosition TraCIAPI::getPosition3D(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, POSITION_3D); libsumo::TraCIPosition p; - p.x = inMsg.readDouble(); - p.y = inMsg.readDouble(); - p.z = inMsg.readDouble(); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::POSITION_3D)) { + p.x = myInput.readDouble(); + p.y = myInput.readDouble(); + p.z = myInput.readDouble(); + } return p; } std::string TraCIAPI::getString(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_STRING); - return inMsg.readString(); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_STRING)) { + return myInput.readString(); + } + return ""; } std::vector TraCIAPI::getStringVector(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_STRINGLIST); - int size = inMsg.readInt(); std::vector r; - for (int i = 0; i < size; ++i) { - r.push_back(inMsg.readString()); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_STRINGLIST)) { + const int size = myInput.readInt(); + for (int i = 0; i < size; ++i) { + r.push_back(myInput.readString()); + } } return r; } @@ -460,14 +441,14 @@ libsumo::TraCIColor TraCIAPI::getColor(int cmd, int var, const std::string& id, tcpip::Storage* add) { - tcpip::Storage inMsg; - send_commandGetVariable(cmd, var, id, add); - processGET(inMsg, cmd, TYPE_COLOR); libsumo::TraCIColor c; - c.r = (unsigned char)inMsg.readUnsignedByte(); - c.g = (unsigned char)inMsg.readUnsignedByte(); - c.b = (unsigned char)inMsg.readUnsignedByte(); - c.a = (unsigned char)inMsg.readUnsignedByte(); + createCommand(cmd, var, id, add); + if (processGet(cmd, libsumo::TYPE_COLOR)) { + c.r = (unsigned char)myInput.readUnsignedByte(); + c.g = (unsigned char)myInput.readUnsignedByte(); + c.b = (unsigned char)myInput.readUnsignedByte(); + c.a = (unsigned char)myInput.readUnsignedByte(); + } return c; } @@ -480,15 +461,15 @@ const int status = inMsg.readUnsignedByte(); const int type = inMsg.readUnsignedByte(); - if (status == RTYPE_OK) { + if (status == libsumo::RTYPE_OK) { switch (type) { - case TYPE_DOUBLE: + case libsumo::TYPE_DOUBLE: into[objectID][variableID] = std::make_shared(inMsg.readDouble()); break; - case TYPE_STRING: + case libsumo::TYPE_STRING: into[objectID][variableID] = std::make_shared(inMsg.readString()); break; - case POSITION_2D: { + case libsumo::POSITION_2D: { auto p = std::make_shared(); p->x = inMsg.readDouble(); p->y = inMsg.readDouble(); @@ -496,7 +477,7 @@ into[objectID][variableID] = p; break; } - case POSITION_3D: { + case libsumo::POSITION_3D: { auto p = std::make_shared(); p->x = inMsg.readDouble(); p->y = inMsg.readDouble(); @@ -504,7 +485,7 @@ into[objectID][variableID] = p; break; } - case TYPE_COLOR: { + case libsumo::TYPE_COLOR: { auto c = std::make_shared(); c->r = (unsigned char)inMsg.readUnsignedByte(); c->g = (unsigned char)inMsg.readUnsignedByte(); @@ -513,10 +494,10 @@ into[objectID][variableID] = c; break; } - case TYPE_INTEGER: + case libsumo::TYPE_INTEGER: into[objectID][variableID] = std::make_shared(inMsg.readInt()); break; - case TYPE_STRINGLIST: { + case libsumo::TYPE_STRINGLIST: { auto sl = std::make_shared(); int n = inMsg.readInt(); for (int i = 0; i < n; ++i) { @@ -567,7 +548,7 @@ TraCIAPI::simulationStep(double time) { send_commandSimulationStep(time); tcpip::Storage inMsg; - check_resultState(inMsg, CMD_SIMSTEP); + check_resultState(inMsg, libsumo::CMD_SIMSTEP); for (auto it : myDomains) { it.second->clearSubscriptionResults(); @@ -575,7 +556,7 @@ int numSubs = inMsg.readInt(); while (numSubs > 0) { int cmdId = check_commandGetResult(inMsg, 0, -1, true); - if (cmdId >= RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE && cmdId <= RESPONSE_SUBSCRIBE_PERSON_VARIABLE) { + if (cmdId >= libsumo::RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE && cmdId <= libsumo::RESPONSE_SUBSCRIBE_PERSON_VARIABLE) { readVariableSubscription(cmdId, inMsg); } else { readContextSubscription(cmdId + 0x50, inMsg); @@ -594,12 +575,12 @@ tcpip::Storage content; content.writeUnsignedByte(0); content.writeInt(1 + 4 + 1 + 1 + 4 + numChars + 4 * (int)args.size()); - content.writeUnsignedByte(CMD_LOAD); - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::CMD_LOAD); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeStringList(args); mySocket->sendExact(content); tcpip::Storage inMsg; - check_resultState(inMsg, CMD_LOAD); + check_resultState(inMsg, libsumo::CMD_LOAD); } @@ -608,167 +589,164 @@ // --------------------------------------------------------------------------- std::vector TraCIAPI::EdgeScope::getIDList() const { - return myParent.getStringVector(CMD_GET_EDGE_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::EdgeScope::getIDCount() const { - return myParent.getInt(CMD_GET_EDGE_VARIABLE, ID_COUNT, ""); + return myParent.getInt(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::ID_COUNT, ""); } double TraCIAPI::EdgeScope::getAdaptedTraveltime(const std::string& edgeID, double time) const { tcpip::Storage content; - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(time); - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_EDGE_TRAVELTIME, edgeID, &content); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_EDGE_TRAVELTIME, edgeID, &content); } double TraCIAPI::EdgeScope::getEffort(const std::string& edgeID, double time) const { tcpip::Storage content; - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(time); - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_EDGE_EFFORT, edgeID, &content); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_EDGE_EFFORT, edgeID, &content); } double TraCIAPI::EdgeScope::getCO2Emission(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_CO2EMISSION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_CO2EMISSION, edgeID); } double TraCIAPI::EdgeScope::getCOEmission(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_COEMISSION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_COEMISSION, edgeID); } double TraCIAPI::EdgeScope::getHCEmission(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_HCEMISSION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_HCEMISSION, edgeID); } double TraCIAPI::EdgeScope::getPMxEmission(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_PMXEMISSION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_PMXEMISSION, edgeID); } double TraCIAPI::EdgeScope::getNOxEmission(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_NOXEMISSION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_NOXEMISSION, edgeID); } double TraCIAPI::EdgeScope::getFuelConsumption(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_FUELCONSUMPTION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_FUELCONSUMPTION, edgeID); } double TraCIAPI::EdgeScope::getNoiseEmission(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_NOISEEMISSION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_NOISEEMISSION, edgeID); } double TraCIAPI::EdgeScope::getElectricityConsumption(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_ELECTRICITYCONSUMPTION, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_ELECTRICITYCONSUMPTION, edgeID); } double TraCIAPI::EdgeScope::getLastStepMeanSpeed(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, LAST_STEP_MEAN_SPEED, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::LAST_STEP_MEAN_SPEED, edgeID); } double TraCIAPI::EdgeScope::getLastStepOccupancy(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, LAST_STEP_OCCUPANCY, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::LAST_STEP_OCCUPANCY, edgeID); } double TraCIAPI::EdgeScope::getLastStepLength(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, LAST_STEP_LENGTH, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::LAST_STEP_LENGTH, edgeID); } double TraCIAPI::EdgeScope::getTraveltime(const std::string& edgeID) const { - return myParent.getDouble(CMD_GET_EDGE_VARIABLE, VAR_CURRENT_TRAVELTIME, edgeID); + return myParent.getDouble(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_CURRENT_TRAVELTIME, edgeID); } int TraCIAPI::EdgeScope::getLastStepVehicleNumber(const std::string& edgeID) const { - return myParent.getInt(CMD_GET_EDGE_VARIABLE, LAST_STEP_VEHICLE_NUMBER, edgeID); + return myParent.getInt(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::LAST_STEP_VEHICLE_NUMBER, edgeID); } double TraCIAPI::EdgeScope::getLastStepHaltingNumber(const std::string& edgeID) const { - return myParent.getInt(CMD_GET_EDGE_VARIABLE, LAST_STEP_VEHICLE_HALTING_NUMBER, edgeID); + return myParent.getInt(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER, edgeID); } std::vector TraCIAPI::EdgeScope::getLastStepVehicleIDs(const std::string& edgeID) const { - return myParent.getStringVector(CMD_GET_EDGE_VARIABLE, LAST_STEP_VEHICLE_ID_LIST, edgeID); + return myParent.getStringVector(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::LAST_STEP_VEHICLE_ID_LIST, edgeID); } int TraCIAPI::EdgeScope::getLaneNumber(const std::string& edgeID) const { - return myParent.getInt(CMD_GET_EDGE_VARIABLE, VAR_LANE_INDEX, edgeID); + return myParent.getInt(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_LANE_INDEX, edgeID); } std::string TraCIAPI::EdgeScope::getStreetName(const std::string& edgeID) const { - return myParent.getString(CMD_GET_EDGE_VARIABLE, VAR_NAME, edgeID); + return myParent.getString(libsumo::CMD_GET_EDGE_VARIABLE, libsumo::VAR_NAME, edgeID); } void TraCIAPI::EdgeScope::adaptTraveltime(const std::string& edgeID, double time, double beginSeconds, double endSeconds) const { tcpip::Storage content; - content.writeByte(TYPE_COMPOUND); + content.writeByte(libsumo::TYPE_COMPOUND); if (endSeconds != std::numeric_limits::max()) { content.writeInt(3); - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(beginSeconds); - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(endSeconds); } else { content.writeInt(1); } - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(time); - myParent.send_commandSetValue(CMD_SET_EDGE_VARIABLE, VAR_EDGE_TRAVELTIME, edgeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_EDGE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_EDGE_VARIABLE, libsumo::VAR_EDGE_TRAVELTIME, edgeID, &content); + myParent.processSet(libsumo::CMD_SET_EDGE_VARIABLE); } void TraCIAPI::EdgeScope::setEffort(const std::string& edgeID, double effort, double beginSeconds, double endSeconds) const { tcpip::Storage content; - content.writeByte(TYPE_COMPOUND); + content.writeByte(libsumo::TYPE_COMPOUND); if (endSeconds != std::numeric_limits::max()) { content.writeInt(3); - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(beginSeconds); - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(endSeconds); } else { content.writeInt(1); } - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(effort); - myParent.send_commandSetValue(CMD_SET_EDGE_VARIABLE, VAR_EDGE_EFFORT, edgeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_EDGE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_EDGE_VARIABLE, libsumo::VAR_EDGE_EFFORT, edgeID, &content); + myParent.processSet(libsumo::CMD_SET_EDGE_VARIABLE); } void TraCIAPI::EdgeScope::setMaxSpeed(const std::string& edgeID, double speed) const { tcpip::Storage content; content.writeDouble(speed); - myParent.send_commandSetValue(CMD_SET_EDGE_VARIABLE, VAR_MAXSPEED, edgeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_EDGE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_EDGE_VARIABLE, libsumo::VAR_MAXSPEED, edgeID, &content); + myParent.processSet(libsumo::CMD_SET_EDGE_VARIABLE); } @@ -779,291 +757,282 @@ // --------------------------------------------------------------------------- std::vector TraCIAPI::GUIScope::getIDList() const { - return myParent.getStringVector(CMD_GET_GUI_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_GUI_VARIABLE, libsumo::TRACI_ID_LIST, ""); } double TraCIAPI::GUIScope::getZoom(const std::string& viewID) const { - return myParent.getDouble(CMD_GET_GUI_VARIABLE, VAR_VIEW_ZOOM, viewID); + return myParent.getDouble(libsumo::CMD_GET_GUI_VARIABLE, libsumo::VAR_VIEW_ZOOM, viewID); } libsumo::TraCIPosition TraCIAPI::GUIScope::getOffset(const std::string& viewID) const { - return myParent.getPosition(CMD_GET_GUI_VARIABLE, VAR_VIEW_OFFSET, viewID); + return myParent.getPosition(libsumo::CMD_GET_GUI_VARIABLE, libsumo::VAR_VIEW_OFFSET, viewID); } std::string TraCIAPI::GUIScope::getSchema(const std::string& viewID) const { - return myParent.getString(CMD_GET_GUI_VARIABLE, VAR_VIEW_SCHEMA, viewID); + return myParent.getString(libsumo::CMD_GET_GUI_VARIABLE, libsumo::VAR_VIEW_SCHEMA, viewID); } libsumo::TraCIPositionVector TraCIAPI::GUIScope::getBoundary(const std::string& viewID) const { - return myParent.getPolygon(CMD_GET_GUI_VARIABLE, VAR_VIEW_BOUNDARY, viewID); + return myParent.getPolygon(libsumo::CMD_GET_GUI_VARIABLE, libsumo::VAR_VIEW_BOUNDARY, viewID); } void TraCIAPI::GUIScope::setZoom(const std::string& viewID, double zoom) const { tcpip::Storage content; + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(zoom); - myParent.send_commandSetValue(CMD_SET_GUI_VARIABLE, VAR_VIEW_ZOOM, viewID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_GUI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_GUI_VARIABLE, libsumo::VAR_VIEW_ZOOM, viewID, &content); + myParent.processSet(libsumo::CMD_SET_GUI_VARIABLE); } void TraCIAPI::GUIScope::setOffset(const std::string& viewID, double x, double y) const { tcpip::Storage content; - content.writeUnsignedByte(POSITION_2D); + content.writeUnsignedByte(libsumo::POSITION_2D); content.writeDouble(x); content.writeDouble(y); - myParent.send_commandSetValue(CMD_SET_GUI_VARIABLE, VAR_VIEW_OFFSET, viewID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_GUI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_GUI_VARIABLE, libsumo::VAR_VIEW_OFFSET, viewID, &content); + myParent.processSet(libsumo::CMD_SET_GUI_VARIABLE); } void TraCIAPI::GUIScope::setSchema(const std::string& viewID, const std::string& schemeName) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(schemeName); - myParent.send_commandSetValue(CMD_SET_GUI_VARIABLE, VAR_VIEW_SCHEMA, viewID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_GUI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_GUI_VARIABLE, libsumo::VAR_VIEW_SCHEMA, viewID, &content); + myParent.processSet(libsumo::CMD_SET_GUI_VARIABLE); } void TraCIAPI::GUIScope::setBoundary(const std::string& viewID, double xmin, double ymin, double xmax, double ymax) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_POLYGON); + content.writeUnsignedByte(libsumo::TYPE_POLYGON); content.writeByte(2); content.writeDouble(xmin); content.writeDouble(ymin); content.writeDouble(xmax); content.writeDouble(ymax); - myParent.send_commandSetValue(CMD_SET_GUI_VARIABLE, VAR_VIEW_BOUNDARY, viewID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_GUI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_GUI_VARIABLE, libsumo::VAR_VIEW_BOUNDARY, viewID, &content); + myParent.processSet(libsumo::CMD_SET_GUI_VARIABLE); } void TraCIAPI::GUIScope::screenshot(const std::string& viewID, const std::string& filename, const int width, const int height) const { tcpip::Storage content; - content.writeByte(TYPE_COMPOUND); + content.writeByte(libsumo::TYPE_COMPOUND); content.writeInt(3); - content.writeByte(TYPE_STRING); + content.writeByte(libsumo::TYPE_STRING); content.writeString(filename); - content.writeByte(TYPE_INTEGER); + content.writeByte(libsumo::TYPE_INTEGER); content.writeInt(width); - content.writeByte(TYPE_INTEGER); + content.writeByte(libsumo::TYPE_INTEGER); content.writeInt(height); - myParent.send_commandSetValue(CMD_SET_GUI_VARIABLE, VAR_SCREENSHOT, viewID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_GUI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_GUI_VARIABLE, libsumo::VAR_SCREENSHOT, viewID, &content); + myParent.processSet(libsumo::CMD_SET_GUI_VARIABLE); } void TraCIAPI::GUIScope::trackVehicle(const std::string& viewID, const std::string& vehID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(vehID); - myParent.send_commandSetValue(CMD_SET_GUI_VARIABLE, VAR_TRACK_VEHICLE, viewID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_GUI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_GUI_VARIABLE, libsumo::VAR_TRACK_VEHICLE, viewID, &content); + myParent.processSet(libsumo::CMD_SET_GUI_VARIABLE); } - - // --------------------------------------------------------------------------- // TraCIAPI::InductionLoopScope-methods // --------------------------------------------------------------------------- std::vector TraCIAPI::InductionLoopScope::getIDList() const { - return myParent.getStringVector(CMD_GET_INDUCTIONLOOP_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::TRACI_ID_LIST, ""); } double TraCIAPI::InductionLoopScope::getPosition(const std::string& loopID) const { - return myParent.getDouble(CMD_GET_INDUCTIONLOOP_VARIABLE, VAR_POSITION, loopID); + return myParent.getDouble(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::VAR_POSITION, loopID); } std::string TraCIAPI::InductionLoopScope::getLaneID(const std::string& loopID) const { - return myParent.getString(CMD_GET_INDUCTIONLOOP_VARIABLE, VAR_LANE_ID, loopID); + return myParent.getString(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::VAR_LANE_ID, loopID); } int TraCIAPI::InductionLoopScope::getLastStepVehicleNumber(const std::string& loopID) const { - return myParent.getInt(CMD_GET_INDUCTIONLOOP_VARIABLE, LAST_STEP_VEHICLE_NUMBER, loopID); + return myParent.getInt(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::LAST_STEP_VEHICLE_NUMBER, loopID); } double TraCIAPI::InductionLoopScope::getLastStepMeanSpeed(const std::string& loopID) const { - return myParent.getDouble(CMD_GET_INDUCTIONLOOP_VARIABLE, LAST_STEP_MEAN_SPEED, loopID); + return myParent.getDouble(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::LAST_STEP_MEAN_SPEED, loopID); } std::vector TraCIAPI::InductionLoopScope::getLastStepVehicleIDs(const std::string& loopID) const { - return myParent.getStringVector(CMD_GET_INDUCTIONLOOP_VARIABLE, LAST_STEP_VEHICLE_ID_LIST, loopID); + return myParent.getStringVector(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::LAST_STEP_VEHICLE_ID_LIST, loopID); } double TraCIAPI::InductionLoopScope::getLastStepOccupancy(const std::string& loopID) const { - return myParent.getDouble(CMD_GET_INDUCTIONLOOP_VARIABLE, LAST_STEP_OCCUPANCY, loopID); + return myParent.getDouble(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::LAST_STEP_OCCUPANCY, loopID); } double TraCIAPI::InductionLoopScope::getLastStepMeanLength(const std::string& loopID) const { - return myParent.getDouble(CMD_GET_INDUCTIONLOOP_VARIABLE, LAST_STEP_LENGTH, loopID); + return myParent.getDouble(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::LAST_STEP_LENGTH, loopID); } double TraCIAPI::InductionLoopScope::getTimeSinceDetection(const std::string& loopID) const { - return myParent.getDouble(CMD_GET_INDUCTIONLOOP_VARIABLE, LAST_STEP_TIME_SINCE_DETECTION, loopID); + return myParent.getDouble(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::LAST_STEP_TIME_SINCE_DETECTION, loopID); } + std::vector TraCIAPI::InductionLoopScope::getVehicleData(const std::string& loopID) const { - tcpip::Storage inMsg; - myParent.send_commandGetVariable(CMD_GET_INDUCTIONLOOP_VARIABLE, LAST_STEP_VEHICLE_DATA, loopID); - myParent.processGET(inMsg, CMD_GET_INDUCTIONLOOP_VARIABLE, TYPE_COMPOUND); std::vector result; - inMsg.readInt(); // components - // number of items - inMsg.readUnsignedByte(); - const int n = inMsg.readInt(); - for (int i = 0; i < n; ++i) { - libsumo::TraCIVehicleData vd; - - inMsg.readUnsignedByte(); - vd.id = inMsg.readString(); - - inMsg.readUnsignedByte(); - vd.length = inMsg.readDouble(); + myParent.createCommand(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::LAST_STEP_VEHICLE_DATA, loopID); + if (myParent.processGet(libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::TYPE_COMPOUND)) { + myParent.myInput.readInt(); // components + // number of items + myParent.myInput.readUnsignedByte(); + const int n = myParent.myInput.readInt(); + for (int i = 0; i < n; ++i) { + libsumo::TraCIVehicleData vd; + + myParent.myInput.readUnsignedByte(); + vd.id = myParent.myInput.readString(); + + myParent.myInput.readUnsignedByte(); + vd.length = myParent.myInput.readDouble(); + + myParent.myInput.readUnsignedByte(); + vd.entryTime = myParent.myInput.readDouble(); - inMsg.readUnsignedByte(); - vd.entryTime = inMsg.readDouble(); + myParent.myInput.readUnsignedByte(); + vd.leaveTime = myParent.myInput.readDouble(); - inMsg.readUnsignedByte(); - vd.leaveTime = inMsg.readDouble(); + myParent.myInput.readUnsignedByte(); + vd.typeID = myParent.myInput.readString(); - inMsg.readUnsignedByte(); - vd.typeID = inMsg.readString(); - - result.push_back(vd); + result.push_back(vd); + } } return result; } - - // --------------------------------------------------------------------------- // TraCIAPI::JunctionScope-methods // --------------------------------------------------------------------------- std::vector TraCIAPI::JunctionScope::getIDList() const { - return myParent.getStringVector(CMD_GET_JUNCTION_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_JUNCTION_VARIABLE, libsumo::TRACI_ID_LIST, ""); } + libsumo::TraCIPosition TraCIAPI::JunctionScope::getPosition(const std::string& junctionID) const { - return myParent.getPosition(CMD_GET_JUNCTION_VARIABLE, VAR_POSITION, junctionID); + return myParent.getPosition(libsumo::CMD_GET_JUNCTION_VARIABLE, libsumo::VAR_POSITION, junctionID); } - - // --------------------------------------------------------------------------- // TraCIAPI::LaneScope-methods // --------------------------------------------------------------------------- std::vector TraCIAPI::LaneScope::getIDList() const { - return myParent.getStringVector(CMD_GET_LANE_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_LANE_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::LaneScope::getIDCount() const { - return myParent.getInt(CMD_GET_LANE_VARIABLE, ID_COUNT, ""); + return myParent.getInt(libsumo::CMD_GET_LANE_VARIABLE, libsumo::ID_COUNT, ""); } double TraCIAPI::LaneScope::getLength(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_LENGTH, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_LENGTH, laneID); } double TraCIAPI::LaneScope::getMaxSpeed(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_MAXSPEED, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_MAXSPEED, laneID); } double TraCIAPI::LaneScope::getWidth(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_WIDTH, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_WIDTH, laneID); } std::vector TraCIAPI::LaneScope::getAllowed(const std::string& laneID) const { - return myParent.getStringVector(CMD_GET_LANE_VARIABLE, LANE_ALLOWED, laneID); + return myParent.getStringVector(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LANE_ALLOWED, laneID); } std::vector TraCIAPI::LaneScope::getDisallowed(const std::string& laneID) const { - return myParent.getStringVector(CMD_GET_LANE_VARIABLE, LANE_DISALLOWED, laneID); + return myParent.getStringVector(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LANE_DISALLOWED, laneID); } int TraCIAPI::LaneScope::getLinkNumber(const std::string& laneID) const { - return myParent.getInt(CMD_GET_LANE_VARIABLE, LANE_LINK_NUMBER, laneID); + return myParent.getInt(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LANE_LINK_NUMBER, laneID); } std::vector TraCIAPI::LaneScope::getLinks(const std::string& laneID) const { - tcpip::Storage inMsg; - myParent.send_commandGetVariable(CMD_GET_LANE_VARIABLE, LANE_LINKS, laneID); - myParent.processGET(inMsg, CMD_GET_LANE_VARIABLE, TYPE_COMPOUND); std::vector ret; + myParent.createCommand(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LANE_LINKS, laneID); + if (myParent.processGet(libsumo::CMD_GET_LANE_VARIABLE, libsumo::TYPE_COMPOUND)) { + myParent.myInput.readUnsignedByte(); + myParent.myInput.readInt(); + + int linkNo = myParent.myInput.readInt(); + for (int i = 0; i < linkNo; ++i) { + + myParent.myInput.readUnsignedByte(); + std::string approachedLane = myParent.myInput.readString(); + + myParent.myInput.readUnsignedByte(); + std::string approachedLaneInternal = myParent.myInput.readString(); + + myParent.myInput.readUnsignedByte(); + bool hasPrio = myParent.myInput.readUnsignedByte() != 0; + + myParent.myInput.readUnsignedByte(); + bool isOpen = myParent.myInput.readUnsignedByte() != 0; + + myParent.myInput.readUnsignedByte(); + bool hasFoe = myParent.myInput.readUnsignedByte() != 0; + + myParent.myInput.readUnsignedByte(); + std::string state = myParent.myInput.readString(); + + myParent.myInput.readUnsignedByte(); + std::string direction = myParent.myInput.readString(); + + myParent.myInput.readUnsignedByte(); + double length = myParent.myInput.readDouble(); + + ret.push_back(libsumo::TraCIConnection(approachedLane, + hasPrio, + isOpen, + hasFoe, + approachedLaneInternal, + state, + direction, + length)); - inMsg.readUnsignedByte(); - inMsg.readInt(); - - int linkNo = inMsg.readInt(); - for (int i = 0; i < linkNo; ++i) { - - inMsg.readUnsignedByte(); - std::string approachedLane = inMsg.readString(); - - inMsg.readUnsignedByte(); - std::string approachedLaneInternal = inMsg.readString(); - - inMsg.readUnsignedByte(); - bool hasPrio = inMsg.readUnsignedByte() != 0; - - inMsg.readUnsignedByte(); - bool isOpen = inMsg.readUnsignedByte() != 0; - - inMsg.readUnsignedByte(); - bool hasFoe = inMsg.readUnsignedByte() != 0; - - inMsg.readUnsignedByte(); - std::string state = inMsg.readString(); - - inMsg.readUnsignedByte(); - std::string direction = inMsg.readString(); - - inMsg.readUnsignedByte(); - double length = inMsg.readDouble(); - - ret.push_back(libsumo::TraCIConnection(approachedLane, - hasPrio, - isOpen, - hasFoe, - approachedLaneInternal, - state, - direction, - length)); + } } return ret; @@ -1071,102 +1040,102 @@ libsumo::TraCIPositionVector TraCIAPI::LaneScope::getShape(const std::string& laneID) const { - return myParent.getPolygon(CMD_GET_LANE_VARIABLE, VAR_SHAPE, laneID); + return myParent.getPolygon(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_SHAPE, laneID); } std::string TraCIAPI::LaneScope::getEdgeID(const std::string& laneID) const { - return myParent.getString(CMD_GET_LANE_VARIABLE, LANE_EDGE_ID, laneID); + return myParent.getString(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LANE_EDGE_ID, laneID); } double TraCIAPI::LaneScope::getCO2Emission(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_CO2EMISSION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_CO2EMISSION, laneID); } double TraCIAPI::LaneScope::getCOEmission(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_COEMISSION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_COEMISSION, laneID); } double TraCIAPI::LaneScope::getHCEmission(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_HCEMISSION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_HCEMISSION, laneID); } double TraCIAPI::LaneScope::getPMxEmission(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_PMXEMISSION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_PMXEMISSION, laneID); } double TraCIAPI::LaneScope::getNOxEmission(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_NOXEMISSION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_NOXEMISSION, laneID); } double TraCIAPI::LaneScope::getFuelConsumption(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_FUELCONSUMPTION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_FUELCONSUMPTION, laneID); } double TraCIAPI::LaneScope::getNoiseEmission(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_NOISEEMISSION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_NOISEEMISSION, laneID); } double TraCIAPI::LaneScope::getElectricityConsumption(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_ELECTRICITYCONSUMPTION, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_ELECTRICITYCONSUMPTION, laneID); } double TraCIAPI::LaneScope::getLastStepMeanSpeed(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, LAST_STEP_MEAN_SPEED, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LAST_STEP_MEAN_SPEED, laneID); } double TraCIAPI::LaneScope::getLastStepOccupancy(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, LAST_STEP_OCCUPANCY, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LAST_STEP_OCCUPANCY, laneID); } double TraCIAPI::LaneScope::getLastStepLength(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, LAST_STEP_LENGTH, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LAST_STEP_LENGTH, laneID); } double TraCIAPI::LaneScope::getTraveltime(const std::string& laneID) const { - return myParent.getDouble(CMD_GET_LANE_VARIABLE, VAR_CURRENT_TRAVELTIME, laneID); + return myParent.getDouble(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_CURRENT_TRAVELTIME, laneID); } int TraCIAPI::LaneScope::getLastStepVehicleNumber(const std::string& laneID) const { - return myParent.getInt(CMD_GET_LANE_VARIABLE, LAST_STEP_VEHICLE_NUMBER, laneID); + return myParent.getInt(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LAST_STEP_VEHICLE_NUMBER, laneID); } int TraCIAPI::LaneScope::getLastStepHaltingNumber(const std::string& laneID) const { - return myParent.getInt(CMD_GET_LANE_VARIABLE, LAST_STEP_VEHICLE_HALTING_NUMBER, laneID); + return myParent.getInt(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER, laneID); } std::vector TraCIAPI::LaneScope::getLastStepVehicleIDs(const std::string& laneID) const { - return myParent.getStringVector(CMD_GET_LANE_VARIABLE, LAST_STEP_VEHICLE_ID_LIST, laneID); + return myParent.getStringVector(libsumo::CMD_GET_LANE_VARIABLE, libsumo::LAST_STEP_VEHICLE_ID_LIST, laneID); } std::vector TraCIAPI::LaneScope::getFoes(const std::string& laneID, const std::string& toLaneID) const { + std::vector r; tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(toLaneID); - myParent.send_commandGetVariable(CMD_GET_LANE_VARIABLE, VAR_FOES, laneID, &content); - tcpip::Storage inMsg; - myParent.processGET(inMsg, CMD_GET_LANE_VARIABLE, TYPE_STRINGLIST); - int size = inMsg.readInt(); - std::vector r; - for (int i = 0; i < size; ++i) { - r.push_back(inMsg.readString()); + myParent.createCommand(libsumo::CMD_GET_LANE_VARIABLE, libsumo::VAR_FOES, laneID, &content); + if (myParent.processGet(libsumo::CMD_GET_LANE_VARIABLE, libsumo::TYPE_STRINGLIST)) { + const int size = myParent.myInput.readInt(); + for (int i = 0; i < size; ++i) { + r.push_back(myParent.myInput.readString()); + } } return r; } @@ -1180,47 +1149,43 @@ void TraCIAPI::LaneScope::setAllowed(const std::string& laneID, const std::vector& allowedClasses) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeInt((int)allowedClasses.size()); for (int i = 0; i < (int)allowedClasses.size(); ++i) { content.writeString(allowedClasses[i]); } - myParent.send_commandSetValue(CMD_SET_LANE_VARIABLE, LANE_ALLOWED, laneID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_LANE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_LANE_VARIABLE, libsumo::LANE_ALLOWED, laneID, &content); + myParent.processSet(libsumo::CMD_SET_LANE_VARIABLE); } void TraCIAPI::LaneScope::setDisallowed(const std::string& laneID, const std::vector& disallowedClasses) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeInt((int)disallowedClasses.size()); for (int i = 0; i < (int)disallowedClasses.size(); ++i) { content.writeString(disallowedClasses[i]); } - myParent.send_commandSetValue(CMD_SET_LANE_VARIABLE, LANE_DISALLOWED, laneID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_LANE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_LANE_VARIABLE, libsumo::LANE_DISALLOWED, laneID, &content); + myParent.processSet(libsumo::CMD_SET_LANE_VARIABLE); } void TraCIAPI::LaneScope::setMaxSpeed(const std::string& laneID, double speed) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - myParent.send_commandSetValue(CMD_SET_LANE_VARIABLE, VAR_MAXSPEED, laneID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_LANE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_LANE_VARIABLE, libsumo::VAR_MAXSPEED, laneID, &content); + myParent.processSet(libsumo::CMD_SET_LANE_VARIABLE); } void TraCIAPI::LaneScope::setLength(const std::string& laneID, double length) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(length); - myParent.send_commandSetValue(CMD_SET_LANE_VARIABLE, VAR_LENGTH, laneID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_LANE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_LANE_VARIABLE, libsumo::VAR_LENGTH, laneID, &content); + myParent.processSet(libsumo::CMD_SET_LANE_VARIABLE); } @@ -1229,7 +1194,7 @@ // --------------------------------------------------------------------------- std::vector TraCIAPI::LaneAreaScope::getIDList() const { - return myParent.getStringVector(CMD_GET_LANEAREA_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_LANEAREA_VARIABLE, libsumo::TRACI_ID_LIST, ""); } @@ -1240,27 +1205,27 @@ // --------------------------------------------------------------------------- std::vector TraCIAPI::MeMeScope::getIDList() const { - return myParent.getStringVector(CMD_GET_MULTIENTRYEXIT_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::MeMeScope::getLastStepVehicleNumber(const std::string& detID) const { - return myParent.getInt(CMD_GET_MULTIENTRYEXIT_VARIABLE, LAST_STEP_VEHICLE_NUMBER, detID); + return myParent.getInt(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, libsumo::LAST_STEP_VEHICLE_NUMBER, detID); } double TraCIAPI::MeMeScope::getLastStepMeanSpeed(const std::string& detID) const { - return myParent.getInt(CMD_GET_MULTIENTRYEXIT_VARIABLE, LAST_STEP_MEAN_SPEED, detID); + return myParent.getInt(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, libsumo::LAST_STEP_MEAN_SPEED, detID); } std::vector TraCIAPI::MeMeScope::getLastStepVehicleIDs(const std::string& detID) const { - return myParent.getStringVector(CMD_GET_MULTIENTRYEXIT_VARIABLE, LAST_STEP_VEHICLE_ID_LIST, detID); + return myParent.getStringVector(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, libsumo::LAST_STEP_VEHICLE_ID_LIST, detID); } int TraCIAPI::MeMeScope::getLastStepHaltingNumber(const std::string& detID) const { - return myParent.getInt(CMD_GET_MULTIENTRYEXIT_VARIABLE, LAST_STEP_VEHICLE_HALTING_NUMBER, detID); + return myParent.getInt(libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER, detID); } @@ -1270,96 +1235,160 @@ // --------------------------------------------------------------------------- std::vector TraCIAPI::POIScope::getIDList() const { - return myParent.getStringVector(CMD_GET_POI_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_POI_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::POIScope::getIDCount() const { - return myParent.getInt(CMD_GET_POI_VARIABLE, ID_COUNT, ""); + return myParent.getInt(libsumo::CMD_GET_POI_VARIABLE, libsumo::ID_COUNT, ""); } std::string TraCIAPI::POIScope::getType(const std::string& poiID) const { - return myParent.getString(CMD_GET_POI_VARIABLE, VAR_TYPE, poiID); + return myParent.getString(libsumo::CMD_GET_POI_VARIABLE, libsumo::VAR_TYPE, poiID); } libsumo::TraCIPosition TraCIAPI::POIScope::getPosition(const std::string& poiID) const { - return myParent.getPosition(CMD_GET_POI_VARIABLE, VAR_POSITION, poiID); + return myParent.getPosition(libsumo::CMD_GET_POI_VARIABLE, libsumo::VAR_POSITION, poiID); } libsumo::TraCIColor TraCIAPI::POIScope::getColor(const std::string& poiID) const { - return myParent.getColor(CMD_GET_POI_VARIABLE, VAR_COLOR, poiID); + return myParent.getColor(libsumo::CMD_GET_POI_VARIABLE, libsumo::VAR_COLOR, poiID); +} + +double +TraCIAPI::POIScope::getWidth(const std::string& poiID) const { + return myParent.getDouble(libsumo::CMD_GET_POI_VARIABLE, libsumo::VAR_WIDTH, poiID); +} + +double +TraCIAPI::POIScope::getHeight(const std::string& poiID) const { + return myParent.getDouble(libsumo::CMD_GET_POI_VARIABLE, libsumo::VAR_HEIGHT, poiID); +} + +double +TraCIAPI::POIScope::getAngle(const std::string& poiID) const { + return myParent.getDouble(libsumo::CMD_GET_POI_VARIABLE, libsumo::VAR_ANGLE, poiID); +} + +std::string +TraCIAPI::POIScope::getImageFile(const std::string& poiID) const { + return myParent.getString(libsumo::CMD_GET_POI_VARIABLE, libsumo::VAR_IMAGEFILE, poiID); } void TraCIAPI::POIScope::setType(const std::string& poiID, const std::string& setType) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(setType); - myParent.send_commandSetValue(CMD_SET_POI_VARIABLE, VAR_TYPE, poiID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::VAR_TYPE, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); } void TraCIAPI::POIScope::setPosition(const std::string& poiID, double x, double y) const { tcpip::Storage content; - content.writeUnsignedByte(POSITION_2D); + content.writeUnsignedByte(libsumo::POSITION_2D); content.writeDouble(x); content.writeDouble(y); - myParent.send_commandSetValue(CMD_SET_POI_VARIABLE, VAR_POSITION, poiID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::VAR_POSITION, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); } void TraCIAPI::POIScope::setColor(const std::string& poiID, const libsumo::TraCIColor& c) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COLOR); + content.writeUnsignedByte(libsumo::TYPE_COLOR); content.writeUnsignedByte(c.r); content.writeUnsignedByte(c.g); content.writeUnsignedByte(c.b); content.writeUnsignedByte(c.a); - myParent.send_commandSetValue(CMD_SET_POI_VARIABLE, VAR_COLOR, poiID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::VAR_COLOR, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); } + void -TraCIAPI::POIScope::add(const std::string& poiID, double x, double y, const libsumo::TraCIColor& c, const std::string& type, int layer) const { +TraCIAPI::POIScope::setWidth(const std::string& poiID, double width) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); - content.writeInt(4); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(width); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::VAR_WIDTH, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); +} + + +void +TraCIAPI::POIScope::setHeight(const std::string& poiID, double height) const { + tcpip::Storage content; + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(height); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::VAR_HEIGHT, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); +} + + +void +TraCIAPI::POIScope::setAngle(const std::string& poiID, double angle) const { + tcpip::Storage content; + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(angle); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::VAR_ANGLE, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); +} + + +void +TraCIAPI::POIScope::setImageFile(const std::string& poiID, const std::string& imageFile) const { + tcpip::Storage content; + content.writeUnsignedByte(libsumo::TYPE_STRING); + content.writeString(imageFile); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::VAR_IMAGEFILE, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); +} + + +void +TraCIAPI::POIScope::add(const std::string& poiID, double x, double y, const libsumo::TraCIColor& c, const std::string& type, int layer, const std::string& imgFile, double width, double height, double angle) const { + tcpip::Storage content; + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); + content.writeInt(8); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(type); - content.writeUnsignedByte(TYPE_COLOR); + content.writeUnsignedByte(libsumo::TYPE_COLOR); content.writeUnsignedByte(c.r); content.writeUnsignedByte(c.g); content.writeUnsignedByte(c.b); content.writeUnsignedByte(c.a); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(layer); - content.writeUnsignedByte(POSITION_2D); + content.writeUnsignedByte(libsumo::POSITION_2D); content.writeDouble(x); content.writeDouble(y); - myParent.send_commandSetValue(CMD_SET_POI_VARIABLE, ADD, poiID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POI_VARIABLE); + content.writeUnsignedByte(libsumo::TYPE_STRING); + content.writeString(imgFile); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(width); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(height); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(angle); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::ADD, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); } void TraCIAPI::POIScope::remove(const std::string& poiID, int layer) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(layer); - myParent.send_commandSetValue(CMD_SET_POI_VARIABLE, REMOVE, poiID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POI_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POI_VARIABLE, libsumo::REMOVE, poiID, &content); + myParent.processSet(libsumo::CMD_SET_POI_VARIABLE); } @@ -1369,59 +1398,57 @@ // --------------------------------------------------------------------------- std::vector TraCIAPI::PolygonScope::getIDList() const { - return myParent.getStringVector(CMD_GET_POLYGON_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::PolygonScope::getIDCount() const { - return myParent.getInt(CMD_GET_POLYGON_VARIABLE, ID_COUNT, ""); + return myParent.getInt(libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::ID_COUNT, ""); } double TraCIAPI::PolygonScope::getLineWidth(const std::string& polygonID) const { - return myParent.getDouble(CMD_GET_POLYGON_VARIABLE, VAR_WIDTH, polygonID); + return myParent.getDouble(libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::VAR_WIDTH, polygonID); } std::string TraCIAPI::PolygonScope::getType(const std::string& polygonID) const { - return myParent.getString(CMD_GET_POLYGON_VARIABLE, VAR_TYPE, polygonID); + return myParent.getString(libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::VAR_TYPE, polygonID); } libsumo::TraCIPositionVector TraCIAPI::PolygonScope::getShape(const std::string& polygonID) const { - return myParent.getPolygon(CMD_GET_POLYGON_VARIABLE, VAR_SHAPE, polygonID); + return myParent.getPolygon(libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::VAR_SHAPE, polygonID); } libsumo::TraCIColor TraCIAPI::PolygonScope::getColor(const std::string& polygonID) const { - return myParent.getColor(CMD_GET_POLYGON_VARIABLE, VAR_COLOR, polygonID); + return myParent.getColor(libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::VAR_COLOR, polygonID); } void TraCIAPI::PolygonScope::setLineWidth(const std::string& polygonID, const double lineWidth) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(lineWidth); - myParent.send_commandSetValue(CMD_SET_POLYGON_VARIABLE, VAR_WIDTH, polygonID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POLYGON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::VAR_WIDTH, polygonID, &content); + myParent.processSet(libsumo::CMD_SET_POLYGON_VARIABLE); } void TraCIAPI::PolygonScope::setType(const std::string& polygonID, const std::string& setType) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(setType); - myParent.send_commandSetValue(CMD_SET_POLYGON_VARIABLE, VAR_TYPE, polygonID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POLYGON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::VAR_TYPE, polygonID, &content); + myParent.processSet(libsumo::CMD_SET_POLYGON_VARIABLE); } void TraCIAPI::PolygonScope::setShape(const std::string& polygonID, const libsumo::TraCIPositionVector& shape) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_POLYGON); + content.writeUnsignedByte(libsumo::TYPE_POLYGON); if (shape.size() < 256) { content.writeUnsignedByte((int)shape.size()); } else { @@ -1432,210 +1459,292 @@ content.writeDouble(pos.x); content.writeDouble(pos.y); } - myParent.send_commandSetValue(CMD_SET_POLYGON_VARIABLE, VAR_SHAPE, polygonID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POLYGON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::VAR_SHAPE, polygonID, &content); + myParent.processSet(libsumo::CMD_SET_POLYGON_VARIABLE); } void TraCIAPI::PolygonScope::setColor(const std::string& polygonID, const libsumo::TraCIColor& c) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COLOR); + content.writeUnsignedByte(libsumo::TYPE_COLOR); content.writeUnsignedByte(c.r); content.writeUnsignedByte(c.g); content.writeUnsignedByte(c.b); content.writeUnsignedByte(c.a); - myParent.send_commandSetValue(CMD_SET_POLYGON_VARIABLE, VAR_COLOR, polygonID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POLYGON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::VAR_COLOR, polygonID, &content); + myParent.processSet(libsumo::CMD_SET_POLYGON_VARIABLE); } void TraCIAPI::PolygonScope::add(const std::string& polygonID, const libsumo::TraCIPositionVector& shape, const libsumo::TraCIColor& c, bool fill, const std::string& type, int layer) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(5); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(type); - content.writeUnsignedByte(TYPE_COLOR); + content.writeUnsignedByte(libsumo::TYPE_COLOR); content.writeUnsignedByte(c.r); content.writeUnsignedByte(c.g); content.writeUnsignedByte(c.b); content.writeUnsignedByte(c.a); - content.writeUnsignedByte(TYPE_UBYTE); + content.writeUnsignedByte(libsumo::TYPE_UBYTE); int f = fill ? 1 : 0; content.writeUnsignedByte(f); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(layer); - content.writeUnsignedByte(TYPE_POLYGON); + content.writeUnsignedByte(libsumo::TYPE_POLYGON); content.writeUnsignedByte((int)shape.size()); for (int i = 0; i < (int)shape.size(); ++i) { content.writeDouble(shape[i].x); content.writeDouble(shape[i].y); } - myParent.send_commandSetValue(CMD_SET_POLYGON_VARIABLE, ADD, polygonID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POLYGON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::ADD, polygonID, &content); + myParent.processSet(libsumo::CMD_SET_POLYGON_VARIABLE); } void TraCIAPI::PolygonScope::remove(const std::string& polygonID, int layer) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(layer); - myParent.send_commandSetValue(CMD_SET_POLYGON_VARIABLE, REMOVE, polygonID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_POLYGON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::REMOVE, polygonID, &content); + myParent.processSet(libsumo::CMD_SET_POLYGON_VARIABLE); } - // --------------------------------------------------------------------------- // TraCIAPI::RouteScope-methods // --------------------------------------------------------------------------- std::vector TraCIAPI::RouteScope::getIDList() const { - return myParent.getStringVector(CMD_GET_ROUTE_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_ROUTE_VARIABLE, libsumo::TRACI_ID_LIST, ""); } std::vector TraCIAPI::RouteScope::getEdges(const std::string& routeID) const { - return myParent.getStringVector(CMD_GET_ROUTE_VARIABLE, VAR_EDGES, routeID); + return myParent.getStringVector(libsumo::CMD_GET_ROUTE_VARIABLE, libsumo::VAR_EDGES, routeID); } void TraCIAPI::RouteScope::add(const std::string& routeID, const std::vector& edges) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeStringList(edges); - myParent.send_commandSetValue(CMD_SET_ROUTE_VARIABLE, ADD, routeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_ROUTE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_ROUTE_VARIABLE, libsumo::ADD, routeID, &content); + myParent.processSet(libsumo::CMD_SET_ROUTE_VARIABLE); } - - - // --------------------------------------------------------------------------- // TraCIAPI::SimulationScope-methods // --------------------------------------------------------------------------- int TraCIAPI::SimulationScope::getCurrentTime() const { - return myParent.getInt(CMD_GET_SIM_VARIABLE, VAR_TIME_STEP, ""); + return myParent.getInt(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_TIME_STEP, ""); } double TraCIAPI::SimulationScope::getTime() const { - return myParent.getDouble(CMD_GET_SIM_VARIABLE, VAR_TIME, ""); + return myParent.getDouble(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_TIME, ""); } int TraCIAPI::SimulationScope::getLoadedNumber() const { - return (int) myParent.getInt(CMD_GET_SIM_VARIABLE, VAR_LOADED_VEHICLES_NUMBER, ""); + return (int) myParent.getInt(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_LOADED_VEHICLES_NUMBER, ""); } std::vector TraCIAPI::SimulationScope::getLoadedIDList() const { - return myParent.getStringVector(CMD_GET_SIM_VARIABLE, VAR_LOADED_VEHICLES_IDS, ""); + return myParent.getStringVector(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_LOADED_VEHICLES_IDS, ""); } int TraCIAPI::SimulationScope::getDepartedNumber() const { - return (int) myParent.getInt(CMD_GET_SIM_VARIABLE, VAR_DEPARTED_VEHICLES_NUMBER, ""); + return (int) myParent.getInt(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_DEPARTED_VEHICLES_NUMBER, ""); } std::vector TraCIAPI::SimulationScope::getDepartedIDList() const { - return myParent.getStringVector(CMD_GET_SIM_VARIABLE, VAR_DEPARTED_VEHICLES_IDS, ""); + return myParent.getStringVector(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_DEPARTED_VEHICLES_IDS, ""); } int TraCIAPI::SimulationScope::getArrivedNumber() const { - return (int) myParent.getInt(CMD_GET_SIM_VARIABLE, VAR_ARRIVED_VEHICLES_NUMBER, ""); + return (int) myParent.getInt(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_ARRIVED_VEHICLES_NUMBER, ""); } std::vector TraCIAPI::SimulationScope::getArrivedIDList() const { - return myParent.getStringVector(CMD_GET_SIM_VARIABLE, VAR_ARRIVED_VEHICLES_IDS, ""); + return myParent.getStringVector(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_ARRIVED_VEHICLES_IDS, ""); } int TraCIAPI::SimulationScope::getStartingTeleportNumber() const { - return (int) myParent.getInt(CMD_GET_SIM_VARIABLE, VAR_TELEPORT_STARTING_VEHICLES_NUMBER, ""); + return (int) myParent.getInt(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_TELEPORT_STARTING_VEHICLES_NUMBER, ""); } std::vector TraCIAPI::SimulationScope::getStartingTeleportIDList() const { - return myParent.getStringVector(CMD_GET_SIM_VARIABLE, VAR_TELEPORT_STARTING_VEHICLES_IDS, ""); + return myParent.getStringVector(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_TELEPORT_STARTING_VEHICLES_IDS, ""); } int TraCIAPI::SimulationScope::getEndingTeleportNumber() const { - return (int) myParent.getInt(CMD_GET_SIM_VARIABLE, VAR_TELEPORT_ENDING_VEHICLES_NUMBER, ""); + return (int) myParent.getInt(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_TELEPORT_ENDING_VEHICLES_NUMBER, ""); } std::vector TraCIAPI::SimulationScope::getEndingTeleportIDList() const { - return myParent.getStringVector(CMD_GET_SIM_VARIABLE, VAR_TELEPORT_ENDING_VEHICLES_IDS, ""); + return myParent.getStringVector(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_TELEPORT_ENDING_VEHICLES_IDS, ""); } double TraCIAPI::SimulationScope::getDeltaT() const { - return myParent.getDouble(CMD_GET_SIM_VARIABLE, VAR_DELTA_T, ""); + return myParent.getDouble(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_DELTA_T, ""); } libsumo::TraCIPositionVector TraCIAPI::SimulationScope::getNetBoundary() const { - return myParent.getPolygon(CMD_GET_SIM_VARIABLE, VAR_NET_BOUNDING_BOX, ""); + return myParent.getPolygon(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_NET_BOUNDING_BOX, ""); } int TraCIAPI::SimulationScope::getMinExpectedNumber() const { - return myParent.getInt(CMD_GET_SIM_VARIABLE, VAR_MIN_EXPECTED_VEHICLES, ""); + return myParent.getInt(libsumo::CMD_GET_SIM_VARIABLE, libsumo::VAR_MIN_EXPECTED_VEHICLES, ""); +} + + +libsumo::TraCIPosition +TraCIAPI::SimulationScope::convert2D(const std::string& edgeID, double pos, int laneIndex, bool toGeo) const { + const int posType = toGeo ? libsumo::POSITION_LON_LAT : libsumo::POSITION_2D; + libsumo::TraCIPosition result; + tcpip::Storage content; + content.writeByte(libsumo::TYPE_COMPOUND); + content.writeInt(2); + content.writeByte(libsumo::POSITION_ROADMAP); + content.writeString(edgeID); + content.writeDouble(pos); + content.writeByte(laneIndex); + content.writeByte(libsumo::TYPE_UBYTE); + content.writeByte(posType); + myParent.createCommand(libsumo::CMD_GET_SIM_VARIABLE, libsumo::POSITION_CONVERSION, "", &content); + if (myParent.processGet(libsumo::CMD_GET_SIM_VARIABLE, posType)) { + result.x = myParent.myInput.readDouble(); + result.y = myParent.myInput.readDouble(); + } + return result; +} + + +libsumo::TraCIPosition +TraCIAPI::SimulationScope::convert3D(const std::string& edgeID, double pos, int laneIndex, bool toGeo) const { + const int posType = toGeo ? libsumo::POSITION_LON_LAT_ALT : libsumo::POSITION_3D; + libsumo::TraCIPosition result; + tcpip::Storage content; + content.writeByte(libsumo::TYPE_COMPOUND); + content.writeInt(2); + content.writeByte(libsumo::POSITION_ROADMAP); + content.writeString(edgeID); + content.writeDouble(pos); + content.writeByte(laneIndex); + content.writeByte(libsumo::TYPE_UBYTE); + content.writeByte(posType); + myParent.createCommand(libsumo::CMD_GET_SIM_VARIABLE, libsumo::POSITION_CONVERSION, "", &content); + if (myParent.processGet(libsumo::CMD_GET_SIM_VARIABLE, posType)) { + result.x = myParent.myInput.readDouble(); + result.y = myParent.myInput.readDouble(); + result.z = myParent.myInput.readDouble(); + } + return result; +} + + +libsumo::TraCIRoadPosition +TraCIAPI::SimulationScope::convertRoad(double x, double y, bool isGeo, const std::string& vClass) const { + libsumo::TraCIRoadPosition result; + tcpip::Storage content; + content.writeByte(libsumo::TYPE_COMPOUND); + content.writeInt(3); + content.writeByte(isGeo ? libsumo::POSITION_LON_LAT : libsumo::POSITION_2D); + content.writeDouble(x); + content.writeDouble(y); + content.writeByte(libsumo::TYPE_UBYTE); + content.writeByte(libsumo::POSITION_ROADMAP); + content.writeByte(libsumo::TYPE_STRING); + content.writeString(vClass); + myParent.createCommand(libsumo::CMD_GET_SIM_VARIABLE, libsumo::POSITION_CONVERSION, "", &content); + if (myParent.processGet(libsumo::CMD_GET_SIM_VARIABLE, libsumo::POSITION_ROADMAP)) { + result.edgeID = myParent.myInput.readString(); + result.pos = myParent.myInput.readDouble(); + result.laneIndex = myParent.myInput.readUnsignedByte(); + } + return result; +} + + +libsumo::TraCIPosition +TraCIAPI::SimulationScope::convertGeo(double x, double y, bool fromGeo) const { + const int posType = fromGeo ? libsumo::POSITION_2D : libsumo::POSITION_LON_LAT; + libsumo::TraCIPosition result; + tcpip::Storage content; + content.writeByte(libsumo::TYPE_COMPOUND); + content.writeInt(2); + content.writeByte(fromGeo ? libsumo::POSITION_LON_LAT : libsumo::POSITION_2D); + content.writeDouble(x); + content.writeDouble(y); + content.writeByte(libsumo::TYPE_UBYTE); + content.writeByte(posType); + myParent.createCommand(libsumo::CMD_GET_SIM_VARIABLE, libsumo::POSITION_CONVERSION, "", &content); + if (myParent.processGet(libsumo::CMD_GET_SIM_VARIABLE, posType)) { + result.x = myParent.myInput.readDouble(); + result.y = myParent.myInput.readDouble(); + } + return result; } double TraCIAPI::SimulationScope::getDistance2D(double x1, double y1, double x2, double y2, bool isGeo, bool isDriving) { tcpip::Storage content; - content.writeByte(TYPE_COMPOUND); + content.writeByte(libsumo::TYPE_COMPOUND); content.writeInt(3); - content.writeByte(isGeo ? POSITION_LON_LAT : POSITION_2D); + content.writeByte(isGeo ? libsumo::POSITION_LON_LAT : libsumo::POSITION_2D); content.writeDouble(x1); content.writeDouble(y1); - content.writeByte(isGeo ? POSITION_LON_LAT : POSITION_2D); + content.writeByte(isGeo ? libsumo::POSITION_LON_LAT : libsumo::POSITION_2D); content.writeDouble(x2); content.writeDouble(y2); - content.writeByte(isDriving ? REQUEST_DRIVINGDIST : REQUEST_AIRDIST); - myParent.send_commandGetVariable(CMD_GET_SIM_VARIABLE, DISTANCE_REQUEST, "", &content); - tcpip::Storage inMsg; - myParent.processGET(inMsg, CMD_GET_SIM_VARIABLE, TYPE_DOUBLE); - return inMsg.readDouble(); + content.writeByte(isDriving ? libsumo::REQUEST_DRIVINGDIST : libsumo::REQUEST_AIRDIST); + myParent.createCommand(libsumo::CMD_GET_SIM_VARIABLE, libsumo::DISTANCE_REQUEST, "", &content); + if (myParent.processGet(libsumo::CMD_GET_SIM_VARIABLE, libsumo::TYPE_DOUBLE)) { + return myParent.myInput.readDouble(); + } + return 0.; } double TraCIAPI::SimulationScope::getDistanceRoad(const std::string& edgeID1, double pos1, const std::string& edgeID2, double pos2, bool isDriving) { tcpip::Storage content; - content.writeByte(TYPE_COMPOUND); + content.writeByte(libsumo::TYPE_COMPOUND); content.writeInt(3); - content.writeByte(POSITION_ROADMAP); + content.writeByte(libsumo::POSITION_ROADMAP); content.writeString(edgeID1); content.writeDouble(pos1); content.writeByte(0); // lane - content.writeByte(POSITION_ROADMAP); + content.writeByte(libsumo::POSITION_ROADMAP); content.writeString(edgeID2); content.writeDouble(pos2); content.writeByte(0); // lane - content.writeByte(isDriving ? REQUEST_DRIVINGDIST : REQUEST_AIRDIST); - myParent.send_commandGetVariable(CMD_GET_SIM_VARIABLE, DISTANCE_REQUEST, "", &content); - tcpip::Storage inMsg; - myParent.processGET(inMsg, CMD_GET_SIM_VARIABLE, TYPE_DOUBLE); - return inMsg.readDouble(); + content.writeByte(isDriving ? libsumo::REQUEST_DRIVINGDIST : libsumo::REQUEST_AIRDIST); + myParent.createCommand(libsumo::CMD_GET_SIM_VARIABLE, libsumo::DISTANCE_REQUEST, "", &content); + if (myParent.processGet(libsumo::CMD_GET_SIM_VARIABLE, libsumo::TYPE_DOUBLE)) { + return myParent.myInput.readDouble(); + } + return 0.; } @@ -1644,310 +1753,328 @@ // --------------------------------------------------------------------------- std::vector TraCIAPI::TrafficLightScope::getIDList() const { - return myParent.getStringVector(CMD_GET_TL_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_TL_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::TrafficLightScope::getIDCount() const { - return myParent.getInt(CMD_GET_TL_VARIABLE, ID_COUNT, ""); + return myParent.getInt(libsumo::CMD_GET_TL_VARIABLE, libsumo::ID_COUNT, ""); } std::string TraCIAPI::TrafficLightScope::getRedYellowGreenState(const std::string& tlsID) const { - return myParent.getString(CMD_GET_TL_VARIABLE, TL_RED_YELLOW_GREEN_STATE, tlsID); + return myParent.getString(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_RED_YELLOW_GREEN_STATE, tlsID); } std::vector TraCIAPI::TrafficLightScope::getCompleteRedYellowGreenDefinition(const std::string& tlsID) const { - tcpip::Storage inMsg; - myParent.send_commandGetVariable(CMD_GET_TL_VARIABLE, TL_COMPLETE_DEFINITION_RYG, tlsID); - myParent.processGET(inMsg, CMD_GET_TL_VARIABLE, TYPE_COMPOUND); std::vector ret; - - int logicNo = inMsg.readInt(); - for (int i = 0; i < logicNo; ++i) { - inMsg.readUnsignedByte(); - inMsg.readInt(); - inMsg.readUnsignedByte(); - const std::string programID = inMsg.readString(); - inMsg.readUnsignedByte(); - const int type = inMsg.readInt(); - inMsg.readUnsignedByte(); - const int phaseIndex = inMsg.readInt(); - inMsg.readUnsignedByte(); - const int phaseNumber = inMsg.readInt(); - libsumo::TraCILogic logic(programID, type, phaseIndex); - for (int j = 0; j < phaseNumber; j++) { - inMsg.readUnsignedByte(); - inMsg.readInt(); - inMsg.readUnsignedByte(); - const double duration = inMsg.readDouble(); - inMsg.readUnsignedByte(); - const std::string state = inMsg.readString(); - inMsg.readUnsignedByte(); - const double minDur = inMsg.readDouble(); - inMsg.readUnsignedByte(); - const double maxDur = inMsg.readDouble(); - inMsg.readUnsignedByte(); - const int next = inMsg.readInt(); - logic.phases.emplace_back(libsumo::TraCIPhase(duration, state, minDur, maxDur, next)); - } - inMsg.readUnsignedByte(); - const int paramNumber = inMsg.readInt(); - for (int j = 0; j < paramNumber; j++) { - inMsg.readUnsignedByte(); - const std::vector par = inMsg.readStringList(); - logic.subParameter[par[0]] = par[1]; + myParent.createCommand(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_COMPLETE_DEFINITION_RYG, tlsID); + if (myParent.processGet(libsumo::CMD_GET_TL_VARIABLE, libsumo::TYPE_COMPOUND)) { + const int logicNo = myParent.myInput.readInt(); + for (int i = 0; i < logicNo; ++i) { + myParent.myInput.readUnsignedByte(); + myParent.myInput.readInt(); + myParent.myInput.readUnsignedByte(); + const std::string programID = myParent.myInput.readString(); + myParent.myInput.readUnsignedByte(); + const int type = myParent.myInput.readInt(); + myParent.myInput.readUnsignedByte(); + const int phaseIndex = myParent.myInput.readInt(); + myParent.myInput.readUnsignedByte(); + const int phaseNumber = myParent.myInput.readInt(); + libsumo::TraCILogic logic(programID, type, phaseIndex); + for (int j = 0; j < phaseNumber; j++) { + myParent.myInput.readUnsignedByte(); + myParent.myInput.readInt(); + myParent.myInput.readUnsignedByte(); + const double duration = myParent.myInput.readDouble(); + myParent.myInput.readUnsignedByte(); + const std::string state = myParent.myInput.readString(); + myParent.myInput.readUnsignedByte(); + const double minDur = myParent.myInput.readDouble(); + myParent.myInput.readUnsignedByte(); + const double maxDur = myParent.myInput.readDouble(); + myParent.myInput.readUnsignedByte(); + const int numNext = myParent.myInput.readInt(); + std::vector next; + for (int k = 0; k < numNext; k++) { + myParent.myInput.readUnsignedByte(); + next.push_back(myParent.myInput.readInt()); + } + myParent.myInput.readUnsignedByte(); + const std::string name = myParent.myInput.readString(); + logic.phases.emplace_back(libsumo::TraCIPhase(duration, state, minDur, maxDur, next, name)); + } + myParent.myInput.readUnsignedByte(); + const int paramNumber = myParent.myInput.readInt(); + for (int j = 0; j < paramNumber; j++) { + myParent.myInput.readUnsignedByte(); + const std::vector par = myParent.myInput.readStringList(); + logic.subParameter[par[0]] = par[1]; + } + ret.emplace_back(logic); } - ret.emplace_back(logic); } return ret; } std::vector TraCIAPI::TrafficLightScope::getControlledLanes(const std::string& tlsID) const { - return myParent.getStringVector(CMD_GET_TL_VARIABLE, TL_CONTROLLED_LANES, tlsID); + return myParent.getStringVector(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_CONTROLLED_LANES, tlsID); } std::vector > TraCIAPI::TrafficLightScope::getControlledLinks(const std::string& tlsID) const { - tcpip::Storage inMsg; - myParent.send_commandGetVariable(CMD_GET_TL_VARIABLE, TL_CONTROLLED_LINKS, tlsID); - myParent.processGET(inMsg, CMD_GET_TL_VARIABLE, TYPE_COMPOUND); std::vector > result; + myParent.createCommand(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_CONTROLLED_LINKS, tlsID); + if (myParent.processGet(libsumo::CMD_GET_TL_VARIABLE, libsumo::TYPE_COMPOUND)) { - inMsg.readUnsignedByte(); - inMsg.readInt(); + myParent.myInput.readUnsignedByte(); + myParent.myInput.readInt(); - int linkNo = inMsg.readInt(); - for (int i = 0; i < linkNo; ++i) { - inMsg.readUnsignedByte(); - int no = inMsg.readInt(); - std::vector ret; - for (int i1 = 0; i1 < no; ++i1) { - inMsg.readUnsignedByte(); - inMsg.readInt(); - std::string from = inMsg.readString(); - std::string to = inMsg.readString(); - std::string via = inMsg.readString(); - ret.emplace_back(libsumo::TraCILink(from, via, to)); + int linkNo = myParent.myInput.readInt(); + for (int i = 0; i < linkNo; ++i) { + myParent.myInput.readUnsignedByte(); + int no = myParent.myInput.readInt(); + std::vector ret; + for (int i1 = 0; i1 < no; ++i1) { + myParent.myInput.readUnsignedByte(); + myParent.myInput.readInt(); + std::string from = myParent.myInput.readString(); + std::string to = myParent.myInput.readString(); + std::string via = myParent.myInput.readString(); + ret.emplace_back(libsumo::TraCILink(from, via, to)); + } + result.emplace_back(ret); } - result.emplace_back(ret); } return result; } std::string TraCIAPI::TrafficLightScope::getProgram(const std::string& tlsID) const { - return myParent.getString(CMD_GET_TL_VARIABLE, TL_CURRENT_PROGRAM, tlsID); + return myParent.getString(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_CURRENT_PROGRAM, tlsID); } int TraCIAPI::TrafficLightScope::getPhase(const std::string& tlsID) const { - return myParent.getInt(CMD_GET_TL_VARIABLE, TL_CURRENT_PHASE, tlsID); + return myParent.getInt(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_CURRENT_PHASE, tlsID); +} + +std::string +TraCIAPI::TrafficLightScope::getPhaseName(const std::string& tlsID) const { + return myParent.getString(libsumo::CMD_GET_TL_VARIABLE, libsumo::VAR_NAME, tlsID); } double TraCIAPI::TrafficLightScope::getPhaseDuration(const std::string& tlsID) const { - return myParent.getDouble(CMD_GET_TL_VARIABLE, TL_PHASE_DURATION, tlsID); + return myParent.getDouble(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_PHASE_DURATION, tlsID); } double TraCIAPI::TrafficLightScope::getNextSwitch(const std::string& tlsID) const { - return myParent.getDouble(CMD_GET_TL_VARIABLE, TL_NEXT_SWITCH, tlsID); + return myParent.getDouble(libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_NEXT_SWITCH, tlsID); } void TraCIAPI::TrafficLightScope::setRedYellowGreenState(const std::string& tlsID, const std::string& state) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(state); - myParent.send_commandSetValue(CMD_SET_TL_VARIABLE, TL_RED_YELLOW_GREEN_STATE, tlsID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_TL_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_RED_YELLOW_GREEN_STATE, tlsID, &content); + myParent.processSet(libsumo::CMD_SET_TL_VARIABLE); } void TraCIAPI::TrafficLightScope::setPhase(const std::string& tlsID, int index) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(index); - myParent.send_commandSetValue(CMD_SET_TL_VARIABLE, TL_PHASE_INDEX, tlsID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_TL_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_PHASE_INDEX, tlsID, &content); + myParent.processSet(libsumo::CMD_SET_TL_VARIABLE); +} + +void +TraCIAPI::TrafficLightScope::setPhaseName(const std::string& tlsID, const std::string& name) const { + tcpip::Storage content; + content.writeUnsignedByte(libsumo::TYPE_STRING); + content.writeString(name); + myParent.createCommand(libsumo::CMD_SET_TL_VARIABLE, libsumo::VAR_NAME, tlsID, &content); + myParent.processSet(libsumo::CMD_SET_TL_VARIABLE); } void TraCIAPI::TrafficLightScope::setProgram(const std::string& tlsID, const std::string& programID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(programID); - myParent.send_commandSetValue(CMD_SET_TL_VARIABLE, TL_PROGRAM, tlsID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_TL_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_PROGRAM, tlsID, &content); + myParent.processSet(libsumo::CMD_SET_TL_VARIABLE); } void TraCIAPI::TrafficLightScope::setPhaseDuration(const std::string& tlsID, double phaseDuration) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(phaseDuration); - myParent.send_commandSetValue(CMD_SET_TL_VARIABLE, TL_PHASE_DURATION, tlsID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_TL_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_PHASE_DURATION, tlsID, &content); + myParent.processSet(libsumo::CMD_SET_TL_VARIABLE); } void TraCIAPI::TrafficLightScope::setCompleteRedYellowGreenDefinition(const std::string& tlsID, const libsumo::TraCILogic& logic) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(5); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(logic.programID); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(logic.type); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(logic.currentPhaseIndex); - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt((int)logic.phases.size()); for (const libsumo::TraCIPhase& p : logic.phases) { - content.writeUnsignedByte(TYPE_COMPOUND); - content.writeInt(5); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); + content.writeInt(6); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(p.duration); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(p.state); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(p.minDur); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(p.maxDur); - content.writeUnsignedByte(TYPE_INTEGER); - content.writeInt(p.next); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); + content.writeInt((int)p.next.size()); + for (int n : p.next) { + content.writeUnsignedByte(libsumo::TYPE_INTEGER); + content.writeInt(n); + } + content.writeUnsignedByte(libsumo::TYPE_STRING); + content.writeString(p.name); } - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt((int)logic.subParameter.size()); for (const auto& item : logic.subParameter) { - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeInt(2); content.writeString(item.first); content.writeString(item.second); } - myParent.send_commandSetValue(CMD_SET_TL_VARIABLE, TL_COMPLETE_PROGRAM_RYG, tlsID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_TL_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_COMPLETE_PROGRAM_RYG, tlsID, &content); + myParent.processSet(libsumo::CMD_SET_TL_VARIABLE); } - - - // --------------------------------------------------------------------------- // TraCIAPI::VehicleTypeScope-methods // --------------------------------------------------------------------------- std::vector TraCIAPI::VehicleTypeScope::getIDList() const { - return myParent.getStringVector(CMD_GET_VEHICLETYPE_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::TRACI_ID_LIST, ""); } double TraCIAPI::VehicleTypeScope::getLength(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_LENGTH, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_LENGTH, typeID); } double TraCIAPI::VehicleTypeScope::getMaxSpeed(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_MAXSPEED, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_MAXSPEED, typeID); } double TraCIAPI::VehicleTypeScope::getSpeedFactor(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_SPEED_FACTOR, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_SPEED_FACTOR, typeID); } double TraCIAPI::VehicleTypeScope::getSpeedDeviation(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_SPEED_DEVIATION, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_SPEED_DEVIATION, typeID); } double TraCIAPI::VehicleTypeScope::getAccel(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_ACCEL, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_ACCEL, typeID); } double TraCIAPI::VehicleTypeScope::getDecel(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_DECEL, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_DECEL, typeID); } double TraCIAPI::VehicleTypeScope::getEmergencyDecel(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_EMERGENCY_DECEL, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_EMERGENCY_DECEL, typeID); } double TraCIAPI::VehicleTypeScope::getApparentDecel(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_APPARENT_DECEL, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_APPARENT_DECEL, typeID); } double TraCIAPI::VehicleTypeScope::getImperfection(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_IMPERFECTION, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_IMPERFECTION, typeID); } double TraCIAPI::VehicleTypeScope::getTau(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_TAU, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_TAU, typeID); } std::string TraCIAPI::VehicleTypeScope::getVehicleClass(const std::string& typeID) const { - return myParent.getString(CMD_GET_VEHICLETYPE_VARIABLE, VAR_VEHICLECLASS, typeID); + return myParent.getString(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_VEHICLECLASS, typeID); } std::string TraCIAPI::VehicleTypeScope::getEmissionClass(const std::string& typeID) const { - return myParent.getString(CMD_GET_VEHICLETYPE_VARIABLE, VAR_EMISSIONCLASS, typeID); + return myParent.getString(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_EMISSIONCLASS, typeID); } std::string TraCIAPI::VehicleTypeScope::getShapeClass(const std::string& typeID) const { - return myParent.getString(CMD_GET_VEHICLETYPE_VARIABLE, VAR_SHAPECLASS, typeID); + return myParent.getString(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_SHAPECLASS, typeID); } double TraCIAPI::VehicleTypeScope::getMinGap(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_MINGAP, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_MINGAP, typeID); } double TraCIAPI::VehicleTypeScope::getMinGapLat(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_MINGAP_LAT, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_MINGAP_LAT, typeID); } double TraCIAPI::VehicleTypeScope::getMaxSpeedLat(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_MAXSPEED_LAT, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_MAXSPEED_LAT, typeID); } std::string TraCIAPI::VehicleTypeScope::getLateralAlignment(const std::string& typeID) const { - return myParent.getString(CMD_GET_VEHICLETYPE_VARIABLE, VAR_LATALIGNMENT, typeID); + return myParent.getString(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_LATALIGNMENT, typeID); } double TraCIAPI::VehicleTypeScope::getWidth(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_WIDTH, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_WIDTH, typeID); } double TraCIAPI::VehicleTypeScope::getHeight(const std::string& typeID) const { - return myParent.getDouble(CMD_GET_VEHICLETYPE_VARIABLE, VAR_HEIGHT, typeID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_HEIGHT, typeID); } libsumo::TraCIColor TraCIAPI::VehicleTypeScope::getColor(const std::string& typeID) const { - return myParent.getColor(CMD_GET_VEHICLETYPE_VARIABLE, VAR_COLOR, typeID); + return myParent.getColor(libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VAR_COLOR, typeID); } @@ -1955,466 +2082,442 @@ void TraCIAPI::VehicleTypeScope::setLength(const std::string& typeID, double length) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(length); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_LENGTH, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_LENGTH, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setMaxSpeed(const std::string& typeID, double speed) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_MAXSPEED, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_MAXSPEED, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setVehicleClass(const std::string& typeID, const std::string& clazz) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(clazz); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_VEHICLECLASS, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_VEHICLECLASS, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setSpeedFactor(const std::string& typeID, double factor) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(factor); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_SPEED_FACTOR, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_SPEED_FACTOR, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setSpeedDeviation(const std::string& typeID, double deviation) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(deviation); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_SPEED_DEVIATION, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_SPEED_DEVIATION, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setEmissionClass(const std::string& typeID, const std::string& clazz) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(clazz); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_EMISSIONCLASS, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_EMISSIONCLASS, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setWidth(const std::string& typeID, double width) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(width); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_WIDTH, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_WIDTH, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setHeight(const std::string& typeID, double height) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(height); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_HEIGHT, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_HEIGHT, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setMinGap(const std::string& typeID, double minGap) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(minGap); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_MINGAP, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_MINGAP, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setMinGapLat(const std::string& typeID, double minGapLat) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(minGapLat); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_MINGAP_LAT, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_MINGAP_LAT, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setMaxSpeedLat(const std::string& typeID, double speed) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_MAXSPEED_LAT, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_MAXSPEED_LAT, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setLateralAlignment(const std::string& typeID, const std::string& latAlignment) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(latAlignment); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_LATALIGNMENT, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_LATALIGNMENT, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::copy(const std::string& origTypeID, const std::string& newTypeID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(newTypeID); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, COPY, origTypeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::COPY, origTypeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setShapeClass(const std::string& typeID, const std::string& clazz) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(clazz); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_SHAPECLASS, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_SHAPECLASS, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setAccel(const std::string& typeID, double accel) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(accel); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_ACCEL, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_ACCEL, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setDecel(const std::string& typeID, double decel) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(decel); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_DECEL, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_DECEL, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setEmergencyDecel(const std::string& typeID, double decel) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(decel); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_EMERGENCY_DECEL, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_EMERGENCY_DECEL, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setApparentDecel(const std::string& typeID, double decel) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(decel); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_APPARENT_DECEL, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_APPARENT_DECEL, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setImperfection(const std::string& typeID, double imperfection) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(imperfection); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_IMPERFECTION, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_IMPERFECTION, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setTau(const std::string& typeID, double tau) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(tau); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_TAU, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_TAU, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } void TraCIAPI::VehicleTypeScope::setColor(const std::string& typeID, const libsumo::TraCIColor& c) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COLOR); + content.writeUnsignedByte(libsumo::TYPE_COLOR); content.writeUnsignedByte(c.r); content.writeUnsignedByte(c.g); content.writeUnsignedByte(c.b); content.writeUnsignedByte(c.a); - myParent.send_commandSetValue(CMD_SET_VEHICLETYPE_VARIABLE, VAR_COLOR, typeID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLETYPE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::VAR_COLOR, typeID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLETYPE_VARIABLE); } - - - // --------------------------------------------------------------------------- // TraCIAPI::VehicleScope-methods // --------------------------------------------------------------------------- std::vector TraCIAPI::VehicleScope::getIDList() const { - return myParent.getStringVector(CMD_GET_VEHICLE_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::VehicleScope::getIDCount() const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, ID_COUNT, ""); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::ID_COUNT, ""); } double TraCIAPI::VehicleScope::getSpeed(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_SPEED, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SPEED, vehicleID); } double TraCIAPI::VehicleScope::getAcceleration(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_ACCELERATION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ACCELERATION, vehicleID); } double TraCIAPI::VehicleScope::getMaxSpeed(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_MAXSPEED, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_MAXSPEED, vehicleID); } libsumo::TraCIPosition TraCIAPI::VehicleScope::getPosition(const std::string& vehicleID) const { - return myParent.getPosition(CMD_GET_VEHICLE_VARIABLE, VAR_POSITION, vehicleID); + return myParent.getPosition(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_POSITION, vehicleID); } libsumo::TraCIPosition TraCIAPI::VehicleScope::getPosition3D(const std::string& vehicleID) const { - return myParent.getPosition3D(CMD_GET_VEHICLE_VARIABLE, VAR_POSITION3D, vehicleID); + return myParent.getPosition3D(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_POSITION3D, vehicleID); } double TraCIAPI::VehicleScope::getAngle(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_ANGLE, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ANGLE, vehicleID); } std::string TraCIAPI::VehicleScope::getRoadID(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_ROAD_ID, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ROAD_ID, vehicleID); } std::string TraCIAPI::VehicleScope::getLaneID(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_LANE_ID, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LANE_ID, vehicleID); } int TraCIAPI::VehicleScope::getLaneIndex(const std::string& vehicleID) const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, VAR_LANE_INDEX, vehicleID); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LANE_INDEX, vehicleID); } std::string TraCIAPI::VehicleScope::getTypeID(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_TYPE, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_TYPE, vehicleID); } std::string TraCIAPI::VehicleScope::getRouteID(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_ROUTE_ID, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ROUTE_ID, vehicleID); } int TraCIAPI::VehicleScope::getRouteIndex(const std::string& vehicleID) const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, VAR_ROUTE_INDEX, vehicleID); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ROUTE_INDEX, vehicleID); } std::vector TraCIAPI::VehicleScope::getRoute(const std::string& vehicleID) const { - return myParent.getStringVector(CMD_GET_VEHICLE_VARIABLE, VAR_EDGES, vehicleID); + return myParent.getStringVector(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_EDGES, vehicleID); } libsumo::TraCIColor TraCIAPI::VehicleScope::getColor(const std::string& vehicleID) const { - return myParent.getColor(CMD_GET_VEHICLE_VARIABLE, VAR_COLOR, vehicleID); + return myParent.getColor(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_COLOR, vehicleID); } double TraCIAPI::VehicleScope::getLanePosition(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_LANEPOSITION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LANEPOSITION, vehicleID); } double TraCIAPI::VehicleScope::getDistance(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_DISTANCE, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_DISTANCE, vehicleID); } int TraCIAPI::VehicleScope::getSignals(const std::string& vehicleID) const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, VAR_SIGNALS, vehicleID); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SIGNALS, vehicleID); } double TraCIAPI::VehicleScope::getLateralLanePosition(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_LANEPOSITION_LAT, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LANEPOSITION_LAT, vehicleID); } double TraCIAPI::VehicleScope::getCO2Emission(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_CO2EMISSION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_CO2EMISSION, vehicleID); } double TraCIAPI::VehicleScope::getCOEmission(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_COEMISSION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_COEMISSION, vehicleID); } double TraCIAPI::VehicleScope::getHCEmission(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_HCEMISSION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_HCEMISSION, vehicleID); } double TraCIAPI::VehicleScope::getPMxEmission(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_PMXEMISSION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_PMXEMISSION, vehicleID); } double TraCIAPI::VehicleScope::getNOxEmission(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_NOXEMISSION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_NOXEMISSION, vehicleID); } double TraCIAPI::VehicleScope::getFuelConsumption(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_FUELCONSUMPTION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_FUELCONSUMPTION, vehicleID); } double TraCIAPI::VehicleScope::getNoiseEmission(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_NOISEEMISSION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_NOISEEMISSION, vehicleID); } double TraCIAPI::VehicleScope::getElectricityConsumption(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_ELECTRICITYCONSUMPTION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ELECTRICITYCONSUMPTION, vehicleID); } double TraCIAPI::VehicleScope::getWaitingTime(const std::string& vehID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_WAITING_TIME, vehID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_WAITING_TIME, vehID); } int TraCIAPI::VehicleScope::getSpeedMode(const std::string& vehID) const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, VAR_SPEEDSETMODE, vehID); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SPEEDSETMODE, vehID); } double TraCIAPI::VehicleScope::getSlope(const std::string& vehID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_SLOPE, vehID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SLOPE, vehID); } std::string TraCIAPI::VehicleScope::getLine(const std::string& typeID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_LINE, typeID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LINE, typeID); } std::vector TraCIAPI::VehicleScope::getVia(const std::string& vehicleID) const { - return myParent.getStringVector(CMD_GET_VEHICLE_VARIABLE, VAR_VIA, vehicleID); + return myParent.getStringVector(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_VIA, vehicleID); } std::string TraCIAPI::VehicleScope::getEmissionClass(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_EMISSIONCLASS, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_EMISSIONCLASS, vehicleID); } std::string TraCIAPI::VehicleScope::getShapeClass(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_SHAPECLASS, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SHAPECLASS, vehicleID); } std::vector TraCIAPI::VehicleScope::getNextTLS(const std::string& vehID) const { - tcpip::Storage inMsg; - myParent.send_commandGetVariable(CMD_GET_VEHICLE_VARIABLE, VAR_NEXT_TLS, vehID); - myParent.processGET(inMsg, CMD_GET_VEHICLE_VARIABLE, TYPE_COMPOUND); std::vector result; - inMsg.readInt(); // components - // number of items - inMsg.readUnsignedByte(); - const int n = inMsg.readInt(); - for (int i = 0; i < n; ++i) { - libsumo::TraCINextTLSData d; - inMsg.readUnsignedByte(); - d.id = inMsg.readString(); - - inMsg.readUnsignedByte(); - d.tlIndex = inMsg.readInt(); + myParent.createCommand(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_NEXT_TLS, vehID); + if (myParent.processGet(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::TYPE_COMPOUND)) { + myParent.myInput.readInt(); // components + // number of items + myParent.myInput.readUnsignedByte(); + const int n = myParent.myInput.readInt(); + for (int i = 0; i < n; ++i) { + libsumo::TraCINextTLSData d; + myParent.myInput.readUnsignedByte(); + d.id = myParent.myInput.readString(); + + myParent.myInput.readUnsignedByte(); + d.tlIndex = myParent.myInput.readInt(); - inMsg.readUnsignedByte(); - d.dist = inMsg.readDouble(); + myParent.myInput.readUnsignedByte(); + d.dist = myParent.myInput.readDouble(); - inMsg.readUnsignedByte(); - d.state = (char)inMsg.readByte(); + myParent.myInput.readUnsignedByte(); + d.state = (char)myParent.myInput.readByte(); - result.push_back(d); + result.push_back(d); + } } return result; } std::vector TraCIAPI::VehicleScope::getBestLanes(const std::string& vehicleID) const { - tcpip::Storage inMsg; - myParent.send_commandGetVariable(CMD_GET_VEHICLE_VARIABLE, VAR_BEST_LANES, vehicleID); - myParent.processGET(inMsg, CMD_GET_VEHICLE_VARIABLE, TYPE_COMPOUND); - inMsg.readInt(); - inMsg.readUnsignedByte(); - std::vector result; - const int n = inMsg.readInt(); // number of following edge information - for (int i = 0; i < n; ++i) { - libsumo::TraCIBestLanesData info; - inMsg.readUnsignedByte(); - info.laneID = inMsg.readString(); - - inMsg.readUnsignedByte(); - info.length = inMsg.readDouble(); - - inMsg.readUnsignedByte(); - info.occupation = inMsg.readDouble(); - - inMsg.readUnsignedByte(); - info.bestLaneOffset = inMsg.readByte(); - - inMsg.readUnsignedByte(); - info.allowsContinuation = (inMsg.readUnsignedByte() == 1); - - inMsg.readUnsignedByte(); - const int m = inMsg.readInt(); - for (int i = 0; i < m; ++i) { - info.continuationLanes.push_back(inMsg.readString()); - } + myParent.createCommand(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_BEST_LANES, vehicleID); + if (myParent.processGet(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::TYPE_COMPOUND)) { + myParent.myInput.readInt(); + myParent.myInput.readUnsignedByte(); + + const int n = myParent.myInput.readInt(); // number of following edge information + for (int i = 0; i < n; ++i) { + libsumo::TraCIBestLanesData info; + myParent.myInput.readUnsignedByte(); + info.laneID = myParent.myInput.readString(); + + myParent.myInput.readUnsignedByte(); + info.length = myParent.myInput.readDouble(); + + myParent.myInput.readUnsignedByte(); + info.occupation = myParent.myInput.readDouble(); + + myParent.myInput.readUnsignedByte(); + info.bestLaneOffset = myParent.myInput.readByte(); + + myParent.myInput.readUnsignedByte(); + info.allowsContinuation = (myParent.myInput.readUnsignedByte() == 1); + + myParent.myInput.readUnsignedByte(); + const int m = myParent.myInput.readInt(); + for (int i = 0; i < m; ++i) { + info.continuationLanes.push_back(myParent.myInput.readString()); + } - result.push_back(info); + result.push_back(info); + } } return result; } @@ -2423,145 +2526,147 @@ std::pair TraCIAPI::VehicleScope::getLeader(const std::string& vehicleID, double dist) const { tcpip::Storage content; - content.writeByte(TYPE_DOUBLE); + content.writeByte(libsumo::TYPE_DOUBLE); content.writeDouble(dist); - myParent.send_commandGetVariable(CMD_GET_VEHICLE_VARIABLE, VAR_LEADER, vehicleID, &content); - tcpip::Storage inMsg; - myParent.processGET(inMsg, CMD_GET_VEHICLE_VARIABLE, TYPE_COMPOUND); - inMsg.readInt(); // components - inMsg.readUnsignedByte(); - const std::string leaderID = inMsg.readString(); - inMsg.readUnsignedByte(); - const double gap = inMsg.readDouble(); - return std::make_pair(leaderID, gap); + myParent.createCommand(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LEADER, vehicleID, &content); + if (myParent.processGet(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::TYPE_COMPOUND)) { + myParent.myInput.readInt(); // components + myParent.myInput.readUnsignedByte(); + const std::string leaderID = myParent.myInput.readString(); + myParent.myInput.readUnsignedByte(); + const double gap = myParent.myInput.readDouble(); + return std::make_pair(leaderID, gap); + } + return std::make_pair("", libsumo::INVALID_DOUBLE_VALUE); } std::pair TraCIAPI::VehicleScope::getLaneChangeState(const std::string& vehicleID, int direction) const { tcpip::Storage content; - content.writeByte(TYPE_INTEGER); + content.writeByte(libsumo::TYPE_INTEGER); content.writeInt(direction); - myParent.send_commandGetVariable(CMD_GET_VEHICLE_VARIABLE, CMD_CHANGELANE, vehicleID, &content); - tcpip::Storage inMsg; - myParent.processGET(inMsg, CMD_GET_VEHICLE_VARIABLE, TYPE_COMPOUND); - inMsg.readInt(); // components - inMsg.readUnsignedByte(); - const int stateWithoutTraCI = inMsg.readInt(); - inMsg.readUnsignedByte(); - const int state = inMsg.readInt(); - return std::make_pair(stateWithoutTraCI, state); + myParent.createCommand(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::CMD_CHANGELANE, vehicleID, &content); + if (myParent.processGet(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::TYPE_COMPOUND)) { + myParent.myInput.readInt(); // components + myParent.myInput.readUnsignedByte(); + const int stateWithoutTraCI = myParent.myInput.readInt(); + myParent.myInput.readUnsignedByte(); + const int state = myParent.myInput.readInt(); + return std::make_pair(stateWithoutTraCI, state); + } + return std::make_pair(libsumo::INVALID_INT_VALUE, libsumo::INVALID_INT_VALUE); } int TraCIAPI::VehicleScope::getStopState(const std::string& vehicleID) const { - return myParent.getUnsignedByte(CMD_GET_VEHICLE_VARIABLE, VAR_STOPSTATE, vehicleID); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_STOPSTATE, vehicleID); } int TraCIAPI::VehicleScope::getRoutingMode(const std::string& vehicleID) const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, VAR_ROUTING_MODE, vehicleID); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ROUTING_MODE, vehicleID); } double TraCIAPI::VehicleScope::getAccel(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_ACCEL, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ACCEL, vehicleID); } double TraCIAPI::VehicleScope::getDecel(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_DECEL, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_DECEL, vehicleID); } double TraCIAPI::VehicleScope::getTau(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_TAU, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_TAU, vehicleID); } double TraCIAPI::VehicleScope::getImperfection(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_IMPERFECTION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_IMPERFECTION, vehicleID); } double TraCIAPI::VehicleScope::getSpeedFactor(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_SPEED_FACTOR, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SPEED_FACTOR, vehicleID); } double TraCIAPI::VehicleScope::getSpeedDeviation(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_SPEED_DEVIATION, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SPEED_DEVIATION, vehicleID); } std::string TraCIAPI::VehicleScope::getVehicleClass(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_VEHICLECLASS, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_VEHICLECLASS, vehicleID); } double TraCIAPI::VehicleScope::getMinGap(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_MINGAP, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_MINGAP, vehicleID); } double TraCIAPI::VehicleScope::getWidth(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_WIDTH, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_WIDTH, vehicleID); } double TraCIAPI::VehicleScope::getLength(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_LENGTH, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LENGTH, vehicleID); } double TraCIAPI::VehicleScope::getHeight(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_HEIGHT, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_HEIGHT, vehicleID); } double TraCIAPI::VehicleScope::getAccumulatedWaitingTime(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_ACCUMULATED_WAITING_TIME, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ACCUMULATED_WAITING_TIME, vehicleID); } double TraCIAPI::VehicleScope::getAllowedSpeed(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_ALLOWED_SPEED, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ALLOWED_SPEED, vehicleID); } int TraCIAPI::VehicleScope::getPersonNumber(const std::string& vehicleID) const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, VAR_PERSON_NUMBER, vehicleID); + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_PERSON_NUMBER, vehicleID); } std::vector TraCIAPI::VehicleScope::getPersonIDList(const std::string& vehicleID) const { - return myParent.getStringVector(CMD_GET_VEHICLE_VARIABLE, LAST_STEP_PERSON_ID_LIST, vehicleID); + return myParent.getStringVector(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::LAST_STEP_PERSON_ID_LIST, vehicleID); } double TraCIAPI::VehicleScope::getSpeedWithoutTraCI(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_SPEED_WITHOUT_TRACI, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_SPEED_WITHOUT_TRACI, vehicleID); } bool TraCIAPI::VehicleScope::isRouteValid(const std::string& vehicleID) const { - return myParent.getInt(CMD_GET_VEHICLE_VARIABLE, VAR_ROUTE_VALID, vehicleID) != 0; + return myParent.getInt(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_ROUTE_VALID, vehicleID) != 0; } double TraCIAPI::VehicleScope::getMaxSpeedLat(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_MAXSPEED_LAT, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_MAXSPEED_LAT, vehicleID); } double TraCIAPI::VehicleScope::getMinGapLat(const std::string& vehicleID) const { - return myParent.getDouble(CMD_GET_VEHICLE_VARIABLE, VAR_MINGAP_LAT, vehicleID); + return myParent.getDouble(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_MINGAP_LAT, vehicleID); } std::string TraCIAPI::VehicleScope::getLateralAlignment(const std::string& vehicleID) const { - return myParent.getString(CMD_GET_VEHICLE_VARIABLE, VAR_LATALIGNMENT, vehicleID); + return myParent.getString(libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::VAR_LATALIGNMENT, vehicleID); } void @@ -2585,54 +2690,52 @@ depart = toString(myParent.simulation.getCurrentTime() / 1000.0); } tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(14); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(routeID); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(typeID); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(depart); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(departLane); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(departPos); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(departSpeed); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(arrivalLane); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(arrivalPos); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(arrivalSpeed); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(fromTaz); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(toTaz); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(line); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(personCapacity); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(personNumber); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, ADD_FULL, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::ADD_FULL, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::remove(const std::string& vehicleID, char reason) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_BYTE); + content.writeUnsignedByte(libsumo::TYPE_BYTE); content.writeUnsignedByte(reason); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, REMOVE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::REMOVE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } @@ -2640,79 +2743,73 @@ void TraCIAPI::VehicleScope::changeTarget(const std::string& vehicleID, const std::string& edgeID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(edgeID); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_CHANGETARGET, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_CHANGETARGET, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::changeLane(const std::string& vehicleID, int laneIndex, double duration) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(2); - content.writeUnsignedByte(TYPE_BYTE); + content.writeUnsignedByte(libsumo::TYPE_BYTE); content.writeByte(laneIndex); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(duration); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_CHANGELANE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_CHANGELANE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::changeLaneRelative(const std::string& vehicleID, int laneChange, double duration) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(3); - content.writeUnsignedByte(TYPE_BYTE); + content.writeUnsignedByte(libsumo::TYPE_BYTE); content.writeByte(laneChange); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(duration); - content.writeUnsignedByte(TYPE_BYTE); + content.writeUnsignedByte(libsumo::TYPE_BYTE); content.writeByte(1); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_CHANGELANE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_CHANGELANE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::changeSublane(const std::string& vehicleID, double latDist) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(latDist); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_CHANGESUBLANE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_CHANGESUBLANE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setRouteID(const std::string& vehicleID, const std::string& routeID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(routeID); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_ROUTE_ID, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_ROUTE_ID, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setRoute(const std::string& vehicleID, const std::vector& edges) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeInt((int)edges.size()); for (int i = 0; i < (int)edges.size(); ++i) { content.writeString(edges[i]); } - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_ROUTE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_ROUTE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } @@ -2727,223 +2824,220 @@ } tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(0); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_REROUTE_TRAVELTIME, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_REROUTE_TRAVELTIME, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::moveTo(const std::string& vehicleID, const std::string& laneID, double position) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(2); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(laneID); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(position); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_MOVE_TO, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_MOVE_TO, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::moveToXY(const std::string& vehicleID, const std::string& edgeID, const int lane, const double x, const double y, const double angle, const int keepRoute) const { - myParent.send_commandMoveToXY(vehicleID, edgeID, lane, x, y, angle, keepRoute); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + tcpip::Storage content; + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); + content.writeInt(6); + content.writeUnsignedByte(libsumo::TYPE_STRING); + content.writeString(edgeID); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); + content.writeInt(lane); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(x); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(y); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); + content.writeDouble(angle); + content.writeUnsignedByte(libsumo::TYPE_BYTE); + content.writeByte(keepRoute); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::MOVE_TO_XY, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::slowDown(const std::string& vehicleID, double speed, double duration) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(2); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(duration); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_SLOWDOWN, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_SLOWDOWN, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::openGap(const std::string& vehicleID, double newTau, double duration, double changeRate, double maxDecel) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); if (maxDecel > 0) { content.writeInt(4); } else { content.writeInt(3); } - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(newTau); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(duration); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(changeRate); if (maxDecel > 0) { - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(maxDecel); } - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_OPENGAP, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_OPENGAP, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setSpeed(const std::string& vehicleID, double speed) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_SPEED, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_SPEED, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setSpeedMode(const std::string& vehicleID, int mode) const { tcpip::Storage content; - content.writeByte(TYPE_INTEGER); + content.writeByte(libsumo::TYPE_INTEGER); content.writeInt(mode); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_SPEEDSETMODE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_SPEEDSETMODE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setStop(const std::string vehicleID, const std::string edgeID, const double endPos, const int laneIndex, const double duration, const int flags, const double startPos, const double until) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(7); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(edgeID); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(endPos); - content.writeUnsignedByte(TYPE_BYTE); + content.writeUnsignedByte(libsumo::TYPE_BYTE); content.writeByte(laneIndex); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(duration); - content.writeUnsignedByte(TYPE_BYTE); + content.writeUnsignedByte(libsumo::TYPE_BYTE); content.writeByte(flags); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(startPos); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(until); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, CMD_STOP, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_STOP, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setType(const std::string& vehicleID, const std::string& typeID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(typeID); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_TYPE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_TYPE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setSpeedFactor(const std::string& vehicleID, double factor) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(factor); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_SPEED_FACTOR, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_SPEED_FACTOR, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setMaxSpeed(const std::string& vehicleID, double speed) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_MAXSPEED, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_MAXSPEED, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setColor(const std::string& vehicleID, const libsumo::TraCIColor& c) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COLOR); + content.writeUnsignedByte(libsumo::TYPE_COLOR); content.writeUnsignedByte(c.r); content.writeUnsignedByte(c.g); content.writeUnsignedByte(c.b); content.writeUnsignedByte(c.a); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_COLOR, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_COLOR, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setLine(const std::string& vehicleID, const std::string& line) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(line); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_LINE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_LINE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setVia(const std::string& vehicleID, const std::vector& via) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeInt((int)via.size()); for (int i = 0; i < (int)via.size(); ++i) { content.writeString(via[i]); } - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_VIA, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_VIA, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setSignals(const std::string& vehicleID, int signals) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(signals); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_SIGNALS, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_SIGNALS, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setRoutingMode(const std::string& vehicleID, int routingMode) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt(routingMode); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_ROUTING_MODE, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_ROUTING_MODE, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setShapeClass(const std::string& vehicleID, const std::string& clazz) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(clazz); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_SHAPECLASS, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_SHAPECLASS, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } void TraCIAPI::VehicleScope::setEmissionClass(const std::string& vehicleID, const std::string& clazz) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(clazz); - myParent.send_commandSetValue(CMD_SET_VEHICLE_VARIABLE, VAR_EMISSIONCLASS, vehicleID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_VEHICLE_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::VAR_EMISSIONCLASS, vehicleID, &content); + myParent.processSet(libsumo::CMD_SET_VEHICLE_VARIABLE); } @@ -2953,94 +3047,99 @@ std::vector TraCIAPI::PersonScope::getIDList() const { - return myParent.getStringVector(CMD_GET_PERSON_VARIABLE, TRACI_ID_LIST, ""); + return myParent.getStringVector(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::TRACI_ID_LIST, ""); } int TraCIAPI::PersonScope::getIDCount() const { - return myParent.getInt(CMD_GET_PERSON_VARIABLE, ID_COUNT, ""); + return myParent.getInt(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::ID_COUNT, ""); } double TraCIAPI::PersonScope::getSpeed(const std::string& personID) const { - return myParent.getDouble(CMD_GET_PERSON_VARIABLE, VAR_SPEED, personID); + return myParent.getDouble(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_SPEED, personID); } libsumo::TraCIPosition TraCIAPI::PersonScope::getPosition(const std::string& personID) const { - return myParent.getPosition(CMD_GET_PERSON_VARIABLE, VAR_POSITION, personID); + return myParent.getPosition(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_POSITION, personID); } libsumo::TraCIPosition TraCIAPI::PersonScope::getPosition3D(const std::string& personID) const { - return myParent.getPosition3D(CMD_GET_PERSON_VARIABLE, VAR_POSITION3D, personID); + return myParent.getPosition3D(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_POSITION3D, personID); } double TraCIAPI::PersonScope::getAngle(const std::string& personID) const { - return myParent.getDouble(CMD_GET_PERSON_VARIABLE, VAR_ANGLE, personID); + return myParent.getDouble(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_ANGLE, personID); +} + +double +TraCIAPI::PersonScope::getSlope(const std::string& personID) const { + return myParent.getDouble(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_SLOPE, personID); } double TraCIAPI::PersonScope::getLanePosition(const std::string& personID) const { - return myParent.getDouble(CMD_GET_PERSON_VARIABLE, VAR_LANEPOSITION, personID); + return myParent.getDouble(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_LANEPOSITION, personID); } libsumo::TraCIColor TraCIAPI::PersonScope::getColor(const std::string& personID) const { - return myParent.getColor(CMD_GET_PERSON_VARIABLE, VAR_COLOR, personID); + return myParent.getColor(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_COLOR, personID); } double TraCIAPI::PersonScope::getLength(const std::string& personID) const { - return myParent.getDouble(CMD_GET_PERSON_VARIABLE, VAR_LENGTH, personID); + return myParent.getDouble(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_LENGTH, personID); } std::string TraCIAPI::PersonScope::getRoadID(const std::string& personID) const { - return myParent.getString(CMD_GET_PERSON_VARIABLE, VAR_ROAD_ID, personID); + return myParent.getString(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_ROAD_ID, personID); } std::string TraCIAPI::PersonScope::getTypeID(const std::string& personID) const { - return myParent.getString(CMD_GET_PERSON_VARIABLE, VAR_TYPE, personID); + return myParent.getString(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_TYPE, personID); } double TraCIAPI::PersonScope::getWaitingTime(const std::string& personID) const { - return myParent.getDouble(CMD_GET_PERSON_VARIABLE, VAR_WAITING_TIME, personID); + return myParent.getDouble(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_WAITING_TIME, personID); } std::string TraCIAPI::PersonScope::getNextEdge(const std::string& personID) const { - return myParent.getString(CMD_GET_PERSON_VARIABLE, VAR_NEXT_EDGE, personID); + return myParent.getString(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_NEXT_EDGE, personID); } std::string TraCIAPI::PersonScope::getVehicle(const std::string& personID) const { - return myParent.getString(CMD_GET_PERSON_VARIABLE, VAR_VEHICLE, personID); + return myParent.getString(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_VEHICLE, personID); } int TraCIAPI::PersonScope::getRemainingStages(const std::string& personID) const { - return myParent.getInt(CMD_GET_PERSON_VARIABLE, VAR_STAGES_REMAINING, personID); + return myParent.getInt(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_STAGES_REMAINING, personID); } int TraCIAPI::PersonScope::getStage(const std::string& personID, int nextStageIndex) const { tcpip::Storage content; - content.writeByte(TYPE_INTEGER); + content.writeByte(libsumo::TYPE_INTEGER); content.writeInt(nextStageIndex); - return myParent.getInt(CMD_GET_PERSON_VARIABLE, VAR_STAGE, personID, &content); + return myParent.getInt(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_STAGE, personID, &content); } std::vector TraCIAPI::PersonScope::getEdges(const std::string& personID, int nextStageIndex) const { tcpip::Storage content; - content.writeByte(TYPE_INTEGER); + content.writeByte(libsumo::TYPE_INTEGER); content.writeInt(nextStageIndex); - return myParent.getStringVector(CMD_GET_PERSON_VARIABLE, VAR_EDGES, personID, &content); + return myParent.getStringVector(libsumo::CMD_GET_PERSON_VARIABLE, libsumo::VAR_EDGES, personID, &content); } void @@ -3056,48 +3155,46 @@ void TraCIAPI::PersonScope::rerouteTraveltime(const std::string& personID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(0); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, CMD_REROUTE_TRAVELTIME, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::CMD_REROUTE_TRAVELTIME, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } + void TraCIAPI::PersonScope::add(const std::string& personID, const std::string& edgeID, double pos, double depart, const std::string typeID) { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(4); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(typeID); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(edgeID); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(depart); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(pos); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, ADD, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::ADD, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::appendWaitingStage(const std::string& personID, double duration, const std::string& description, const std::string& stopID) { duration *= 1000; tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(4); - content.writeUnsignedByte(TYPE_INTEGER); - content.writeInt(STAGE_WAITING); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); + content.writeInt(libsumo::STAGE_WAITING); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt((int)duration); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(description); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(stopID); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, APPEND_STAGE, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::APPEND_STAGE, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void @@ -3106,152 +3203,141 @@ duration *= 1000; } tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(6); - content.writeUnsignedByte(TYPE_INTEGER); - content.writeInt(STAGE_WALKING); - content.writeUnsignedByte(TYPE_STRINGLIST); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); + content.writeInt(libsumo::STAGE_WALKING); + content.writeUnsignedByte(libsumo::TYPE_STRINGLIST); content.writeStringList(edges); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(arrivalPos); - content.writeUnsignedByte(TYPE_INTEGER); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); content.writeInt((int)duration); - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(stopID); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, APPEND_STAGE, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::APPEND_STAGE, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::appendDrivingStage(const std::string& personID, const std::string& toEdge, const std::string& lines, const std::string& stopID) { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(4); - content.writeUnsignedByte(TYPE_INTEGER); - content.writeInt(STAGE_DRIVING); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_INTEGER); + content.writeInt(libsumo::STAGE_DRIVING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(toEdge); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(lines); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(stopID); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, APPEND_STAGE, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::APPEND_STAGE, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::removeStage(const std::string& personID, int nextStageIndex) const { tcpip::Storage content; - content.writeByte(TYPE_INTEGER); + content.writeByte(libsumo::TYPE_INTEGER); content.writeInt(nextStageIndex); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, REMOVE_STAGE, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::REMOVE_STAGE, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::setSpeed(const std::string& personID, double speed) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(speed); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, VAR_SPEED, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::VAR_SPEED, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::setType(const std::string& personID, const std::string& typeID) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(typeID); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, VAR_TYPE, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::VAR_TYPE, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::setLength(const std::string& personID, double length) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(length); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, VAR_LENGTH, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::VAR_LENGTH, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::setWidth(const std::string& personID, double width) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(width); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, VAR_WIDTH, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::VAR_WIDTH, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::setHeight(const std::string& personID, double height) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(height); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, VAR_HEIGHT, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::VAR_HEIGHT, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::setMinGap(const std::string& personID, double minGap) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_DOUBLE); + content.writeUnsignedByte(libsumo::TYPE_DOUBLE); content.writeDouble(minGap); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, VAR_MINGAP, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::VAR_MINGAP, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } void TraCIAPI::PersonScope::setColor(const std::string& personID, const libsumo::TraCIColor& c) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COLOR); + content.writeUnsignedByte(libsumo::TYPE_COLOR); content.writeUnsignedByte(c.r); content.writeUnsignedByte(c.g); content.writeUnsignedByte(c.b); content.writeUnsignedByte(c.a); - myParent.send_commandSetValue(CMD_SET_PERSON_VARIABLE, VAR_COLOR, personID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, CMD_SET_PERSON_VARIABLE); + myParent.createCommand(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::VAR_COLOR, personID, &content); + myParent.processSet(libsumo::CMD_SET_PERSON_VARIABLE); } std::string TraCIAPI::TraCIScopeWrapper::getParameter(const std::string& objectID, const std::string& key) const { tcpip::Storage content; - content.writeByte(TYPE_STRING); + content.writeByte(libsumo::TYPE_STRING); content.writeString(key); - return myParent.getString(myCmdGetID, VAR_PARAMETER, objectID, &content); + return myParent.getString(myCmdGetID, libsumo::VAR_PARAMETER, objectID, &content); } void TraCIAPI::TraCIScopeWrapper::setParameter(const std::string& objectID, const std::string& key, const std::string& value) const { tcpip::Storage content; - content.writeUnsignedByte(TYPE_COMPOUND); + content.writeUnsignedByte(libsumo::TYPE_COMPOUND); content.writeInt(2); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(key); - content.writeUnsignedByte(TYPE_STRING); + content.writeUnsignedByte(libsumo::TYPE_STRING); content.writeString(value); - myParent.send_commandSetValue(myCmdSetID, VAR_PARAMETER, objectID, content); - tcpip::Storage inMsg; - myParent.check_resultState(inMsg, myCmdSetID); + myParent.createCommand(myCmdSetID, libsumo::VAR_PARAMETER, objectID, &content); + myParent.processSet(myCmdSetID); } @@ -3329,4 +3415,3 @@ /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/traci/TraCIAPI.h sumo-1.2.0+dfsg1/src/utils/traci/TraCIAPI.h --- sumo-1.1.0+dfsg1/src/utils/traci/TraCIAPI.h 2018-11-08 23:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/traci/TraCIAPI.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include // =========================================================================== @@ -55,11 +55,9 @@ */ TraCIAPI(); - /// @brief Destructor ~TraCIAPI(); - /// @name Connection handling /// @{ @@ -97,6 +95,9 @@ libsumo::TraCIColor getColor(int cmd, int var, const std::string& id, tcpip::Storage* add = 0); /// @} + const tcpip::Storage& getCommandStorage() const { + return myOutput; + } /** @class TraCIScopeWrapper * @brief An abstract interface for accessing type-dependent values @@ -169,7 +170,7 @@ */ class EdgeScope : public TraCIScopeWrapper { public: - EdgeScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_EDGE_VARIABLE, CMD_SET_EDGE_VARIABLE, CMD_SUBSCRIBE_EDGE_VARIABLE, CMD_SUBSCRIBE_EDGE_CONTEXT) {} + EdgeScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_EDGE_VARIABLE, libsumo::CMD_SET_EDGE_VARIABLE, libsumo::CMD_SUBSCRIBE_EDGE_VARIABLE, libsumo::CMD_SUBSCRIBE_EDGE_CONTEXT) {} virtual ~EdgeScope() {} std::vector getIDList() const; @@ -216,7 +217,7 @@ */ class GUIScope : public TraCIScopeWrapper { public: - GUIScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_GUI_VARIABLE, CMD_SET_GUI_VARIABLE, CMD_SUBSCRIBE_GUI_VARIABLE, CMD_SUBSCRIBE_GUI_CONTEXT) {} + GUIScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_GUI_VARIABLE, libsumo::CMD_SET_GUI_VARIABLE, libsumo::CMD_SUBSCRIBE_GUI_VARIABLE, libsumo::CMD_SUBSCRIBE_GUI_CONTEXT) {} virtual ~GUIScope() {} std::vector getIDList() const; @@ -249,7 +250,7 @@ */ class InductionLoopScope : public TraCIScopeWrapper { public: - InductionLoopScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_INDUCTIONLOOP_VARIABLE, -1, CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE, CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT) {} + InductionLoopScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, -1, libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE, libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT) {} virtual ~InductionLoopScope() {} std::vector getIDList() const; @@ -282,7 +283,7 @@ */ class JunctionScope : public TraCIScopeWrapper { public: - JunctionScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_JUNCTION_VARIABLE, CMD_SET_JUNCTION_VARIABLE, CMD_SUBSCRIBE_JUNCTION_VARIABLE, CMD_SUBSCRIBE_JUNCTION_CONTEXT) {} + JunctionScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_JUNCTION_VARIABLE, libsumo::CMD_SET_JUNCTION_VARIABLE, libsumo::CMD_SUBSCRIBE_JUNCTION_VARIABLE, libsumo::CMD_SUBSCRIBE_JUNCTION_CONTEXT) {} virtual ~JunctionScope() {} std::vector getIDList() const; @@ -306,7 +307,7 @@ */ class LaneScope : public TraCIScopeWrapper { public: - LaneScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_LANE_VARIABLE, CMD_SET_LANE_VARIABLE, CMD_SUBSCRIBE_LANE_VARIABLE, CMD_SUBSCRIBE_LANE_CONTEXT) {} + LaneScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_LANE_VARIABLE, libsumo::CMD_SET_LANE_VARIABLE, libsumo::CMD_SUBSCRIBE_LANE_VARIABLE, libsumo::CMD_SUBSCRIBE_LANE_CONTEXT) {} virtual ~LaneScope() {} std::vector getIDList() const; @@ -358,7 +359,7 @@ */ class LaneAreaScope : public TraCIScopeWrapper { public: - LaneAreaScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_LANEAREA_VARIABLE, -1, CMD_SUBSCRIBE_LANEAREA_VARIABLE, CMD_SUBSCRIBE_LANEAREA_CONTEXT) {} + LaneAreaScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_LANEAREA_VARIABLE, -1, libsumo::CMD_SUBSCRIBE_LANEAREA_VARIABLE, libsumo::CMD_SUBSCRIBE_LANEAREA_CONTEXT) {} virtual ~LaneAreaScope() {} std::vector getIDList() const; @@ -378,7 +379,7 @@ */ class MeMeScope : public TraCIScopeWrapper { public: - MeMeScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_MULTIENTRYEXIT_VARIABLE, -1, CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE, CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT) {} + MeMeScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, -1, libsumo::CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE, libsumo::CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT) {} virtual ~MeMeScope() {} std::vector getIDList() const; @@ -405,7 +406,7 @@ */ class POIScope : public TraCIScopeWrapper { public: - POIScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_POI_VARIABLE, CMD_SET_POI_VARIABLE, CMD_SUBSCRIBE_POI_VARIABLE, CMD_SUBSCRIBE_POI_CONTEXT) {} + POIScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_POI_VARIABLE, libsumo::CMD_SET_POI_VARIABLE, libsumo::CMD_SUBSCRIBE_POI_VARIABLE, libsumo::CMD_SUBSCRIBE_POI_CONTEXT) {} virtual ~POIScope() {} std::vector getIDList() const; @@ -413,11 +414,19 @@ std::string getType(const std::string& poiID) const; libsumo::TraCIPosition getPosition(const std::string& poiID) const; libsumo::TraCIColor getColor(const std::string& poiID) const; + double getWidth(const std::string& poiID) const; + double getHeight(const std::string& poiID) const; + double getAngle(const std::string& poiID) const; + std::string getImageFile(const std::string& poiID) const; void setType(const std::string& poiID, const std::string& setType) const; void setPosition(const std::string& poiID, double x, double y) const; void setColor(const std::string& poiID, const libsumo::TraCIColor& c) const; - void add(const std::string& poiID, double x, double y, const libsumo::TraCIColor& c, const std::string& type, int layer) const; + void setWidth(const std::string& poiID, double width) const; + void setHeight(const std::string& poiID, double height) const; + void setAngle(const std::string& poiID, double angle) const; + void setImageFile(const std::string& poiID, const std::string& imageFile) const; + void add(const std::string& poiID, double x, double y, const libsumo::TraCIColor& c, const std::string& type, int layer, const std::string& imgFile, double width, double height, double angle) const; void remove(const std::string& poiID, int layer = 0) const; private: @@ -438,7 +447,7 @@ */ class PolygonScope : public TraCIScopeWrapper { public: - PolygonScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_POLYGON_VARIABLE, CMD_SET_POLYGON_VARIABLE, CMD_SUBSCRIBE_POLYGON_VARIABLE, CMD_SUBSCRIBE_POLYGON_CONTEXT) {} + PolygonScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::CMD_SUBSCRIBE_POLYGON_VARIABLE, libsumo::CMD_SUBSCRIBE_POLYGON_CONTEXT) {} virtual ~PolygonScope() {} std::vector getIDList() const; @@ -472,7 +481,7 @@ */ class RouteScope : public TraCIScopeWrapper { public: - RouteScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_ROUTE_VARIABLE, CMD_SET_ROUTE_VARIABLE, CMD_SUBSCRIBE_ROUTE_VARIABLE, CMD_SUBSCRIBE_ROUTE_CONTEXT) {} + RouteScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_ROUTE_VARIABLE, libsumo::CMD_SET_ROUTE_VARIABLE, libsumo::CMD_SUBSCRIBE_ROUTE_VARIABLE, libsumo::CMD_SUBSCRIBE_ROUTE_CONTEXT) {} virtual ~RouteScope() {} std::vector getIDList() const; @@ -496,7 +505,7 @@ */ class SimulationScope : public TraCIScopeWrapper { public: - SimulationScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_SIM_VARIABLE, CMD_SET_SIM_VARIABLE, CMD_SUBSCRIBE_SIM_VARIABLE, CMD_SUBSCRIBE_SIM_CONTEXT) {} + SimulationScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_SIM_VARIABLE, libsumo::CMD_SET_SIM_VARIABLE, libsumo::CMD_SUBSCRIBE_SIM_VARIABLE, libsumo::CMD_SUBSCRIBE_SIM_CONTEXT) {} virtual ~SimulationScope() {} int getCurrentTime() const; @@ -514,6 +523,12 @@ double getDeltaT() const; libsumo::TraCIPositionVector getNetBoundary() const; int getMinExpectedNumber() const; + + libsumo::TraCIPosition convert2D(const std::string& edgeID, double pos, int laneIndex = 0, bool toGeo = false) const; + libsumo::TraCIPosition convert3D(const std::string& edgeID, double pos, int laneIndex = 0, bool toGeo = false) const; + libsumo::TraCIRoadPosition convertRoad(double x, double y, bool isGeo = false, const std::string& vClass = "ignoring") const; + libsumo::TraCIPosition convertGeo(double x, double y, bool fromGeo = false) const; + double getDistance2D(double x1, double y1, double x2, double y2, bool isGeo = false, bool isDriving = false); double getDistanceRoad(const std::string& edgeID1, double pos1, const std::string& edgeID2, double pos2, bool isDriving = false); @@ -536,7 +551,7 @@ */ class TrafficLightScope : public TraCIScopeWrapper { public: - TrafficLightScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_TL_VARIABLE, CMD_SET_TL_VARIABLE, CMD_SUBSCRIBE_TL_VARIABLE, CMD_SUBSCRIBE_TL_CONTEXT) {} + TrafficLightScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_TL_VARIABLE, libsumo::CMD_SET_TL_VARIABLE, libsumo::CMD_SUBSCRIBE_TL_VARIABLE, libsumo::CMD_SUBSCRIBE_TL_CONTEXT) {} virtual ~TrafficLightScope() {} std::vector getIDList() const; @@ -549,9 +564,11 @@ int getPhase(const std::string& tlsID) const; double getPhaseDuration(const std::string& tlsID) const; double getNextSwitch(const std::string& tlsID) const; + std::string getPhaseName(const std::string& tlsID) const; void setRedYellowGreenState(const std::string& tlsID, const std::string& state) const; void setPhase(const std::string& tlsID, int index) const; + void setPhaseName(const std::string& tlsID, const std::string& name) const; void setProgram(const std::string& tlsID, const std::string& programID) const; void setPhaseDuration(const std::string& tlsID, double phaseDuration) const; void setCompleteRedYellowGreenDefinition(const std::string& tlsID, const libsumo::TraCILogic& logic) const; @@ -574,7 +591,7 @@ */ class VehicleTypeScope : public TraCIScopeWrapper { public: - VehicleTypeScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_VEHICLETYPE_VARIABLE, CMD_SET_VEHICLETYPE_VARIABLE, CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE, CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT) {} + VehicleTypeScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_VEHICLETYPE_VARIABLE, libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE, libsumo::CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT) {} virtual ~VehicleTypeScope() {} std::vector getIDList() const; @@ -639,7 +656,7 @@ */ class VehicleScope : public TraCIScopeWrapper { public: - VehicleScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_VEHICLE_VARIABLE, CMD_SET_VEHICLE_VARIABLE, CMD_SUBSCRIBE_VEHICLE_VARIABLE, CMD_SUBSCRIBE_VEHICLE_CONTEXT) {} + VehicleScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_SUBSCRIBE_VEHICLE_VARIABLE, libsumo::CMD_SUBSCRIBE_VEHICLE_CONTEXT) {} virtual ~VehicleScope() {} enum VehicleSignal { @@ -767,7 +784,7 @@ const int flags = 0, const double startPos = std::numeric_limits::min(), const double until = -1) const; void setType(const std::string& vehicleID, const std::string& typeID) const; - void remove(const std::string& vehicleID, char reason = REMOVE_VAPORIZED) const; + void remove(const std::string& vehicleID, char reason = libsumo::REMOVE_VAPORIZED) const; void setColor(const std::string& vehicleID, const libsumo::TraCIColor& c) const; void setLine(const std::string& vehicleID, const std::string& line) const; void setVia(const std::string& vehicleID, const std::vector& via) const; @@ -797,7 +814,7 @@ * */ class PersonScope : public TraCIScopeWrapper { public: - PersonScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, CMD_GET_PERSON_VARIABLE, CMD_SET_PERSON_VARIABLE, CMD_SUBSCRIBE_PERSON_VARIABLE, CMD_SUBSCRIBE_PERSON_CONTEXT) {} + PersonScope(TraCIAPI& parent) : TraCIScopeWrapper(parent, libsumo::CMD_GET_PERSON_VARIABLE, libsumo::CMD_SET_PERSON_VARIABLE, libsumo::CMD_SUBSCRIBE_PERSON_VARIABLE, libsumo::CMD_SUBSCRIBE_PERSON_CONTEXT) {} virtual ~PersonScope() {} std::vector getIDList() const; @@ -814,6 +831,7 @@ int getStage(const std::string& personID, int nextStageIndex = 0) const; std::vector getEdges(const std::string& personID, int nextStageIndex = 0) const; double getAngle(const std::string& personID) const; + double getSlope(const std::string& personID) const; double getLanePosition(const std::string& personID) const; libsumo::TraCIColor getColor(const std::string& personID) const; @@ -824,7 +842,7 @@ void removeStages(const std::string& personID) const; - void add(const std::string& personID, const std::string& edgeID, double pos, double depart = DEPARTFLAG_NOW, const std::string typeID = "DEFAULT_PEDTYPE"); + void add(const std::string& personID, const std::string& edgeID, double pos, double depart = libsumo::DEPARTFLAG_NOW, const std::string typeID = "DEFAULT_PEDTYPE"); void appendWaitingStage(const std::string& personID, double duration, const std::string& description = "waiting", const std::string& stopID = ""); void appendWalkingStage(const std::string& personID, const std::vector& edges, double arrivalPos, double duration = -1, double speed = -1, const std::string& stopID = ""); void appendDrivingStage(const std::string& personID, const std::string& toEdge, const std::string& lines, const std::string& stopID = ""); @@ -899,22 +917,14 @@ */ void send_commandSetOrder(int order) const; - /** @brief Sends a GetVariable request - * @param[in] domID The domain of the variable + /** @brief Sends a GetVariable / SetVariable request if mySocket is connected. + * Otherwise writes to myOutput only. + * @param[in] cmdID The command and domain of the variable * @param[in] varID The variable to retrieve * @param[in] objID The object to retrieve the variable from * @param[in] add Optional additional parameter */ - void send_commandGetVariable(int domID, int varID, const std::string& objID, tcpip::Storage* add = 0) const; - - - /** @brief Sends a SetVariable request - * @param[in] domID The domain of the variable - * @param[in] varID The variable to set - * @param[in] objID The object to change - * @param[in] content The value of the variable - */ - void send_commandSetValue(int domID, int varID, const std::string& objID, tcpip::Storage& content) const; + void createCommand(int cmdID, int varID, const std::string& objID, tcpip::Storage* add = nullptr) const; /** @brief Sends a SubscribeVariable request @@ -941,10 +951,6 @@ /// @} - void send_commandMoveToXY(const std::string& vehicleID, const std::string& edgeID, const int lane, - const double x, const double y, const double angle, const int keepRoute) const; - - /// @name Command sending methods /// @{ @@ -961,7 +967,8 @@ */ int check_commandGetResult(tcpip::Storage& inMsg, int command, int expectedType = -1, bool ignoreCommandId = false) const; - void processGET(tcpip::Storage& inMsg, int command, int expectedType, bool ignoreCommandId = false) const; + bool processGet(int command, int expectedType, bool ignoreCommandId = false); + bool processSet(int command); /// @} void readVariableSubscription(int cmdId, tcpip::Storage& inMsg); @@ -971,7 +978,7 @@ template static inline std::string toString(const T& t, std::streamsize accuracy = PRECISION) { std::ostringstream oss; - oss.setf(std::ios::fixed , std::ios::floatfield); + oss.setf(std::ios::fixed, std::ios::floatfield); oss << std::setprecision(accuracy); oss << t; return oss.str(); @@ -984,10 +991,13 @@ std::map myDomains; /// @brief The socket tcpip::Socket* mySocket; + /// @brief The reusable output storage + mutable tcpip::Storage myOutput; + /// @brief The reusable input storage + mutable tcpip::Storage myInput; }; #endif /****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/AccessEdge.h sumo-1.2.0+dfsg1/src/utils/vehicle/AccessEdge.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/AccessEdge.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/AccessEdge.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file AccessEdge.h -/// @author Michael Behrisch -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The AccessEdge is a special intermodal edge connecting different modes -/****************************************************************************/ -#ifndef AccessEdge_h -#define AccessEdge_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include "IntermodalEdge.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the access edge connecting different modes that is given to the internal router (SUMOAbstractRouter) -template -class AccessEdge : public IntermodalEdge { -private: - typedef IntermodalEdge _IntermodalEdge; - -public: - AccessEdge(int numericalID, const _IntermodalEdge* inEdge, const _IntermodalEdge* outEdge, const double length) : - _IntermodalEdge(inEdge->getID() + ":" + outEdge->getID(), numericalID, outEdge->getEdge(), "!access"), - myLength(length > 0. ? length : NUMERICAL_EPS) { } - - double getTravelTime(const IntermodalTrip* const trip, double /* time */) const { - return myLength / trip->speed; - } - -private: - const double myLength; - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/AStarLookupTable.h sumo-1.2.0+dfsg1/src/utils/vehicle/AStarLookupTable.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/AStarLookupTable.h 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/AStarLookupTable.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,401 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file AStarLookupTable.h -/// @author Jakob Erdmann -/// @date July 2017 -/// @version $Id$ -/// -// Precomputed landmark distances to speed up the A* routing algorithm -/****************************************************************************/ -#ifndef AStarLookupTable_h -#define AStarLookupTable_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include - -#ifdef HAVE_FOX -#include -#endif - -#define UNREACHABLE (std::numeric_limits::max() / 1000.0) - -//#define ASTAR_DEBUG_LOOKUPTABLE -//#define ASTAR_DEBUG_LOOKUPTABLE_FROM "disabled" -//#define ASTAR_DEBUG_UNREACHABLE - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class LandmarkLookupTable - * @brief Computes the shortest path through a network using the A* 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_withPermissions/noProhibitions) - * @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 AbstractLookupTable { -public: - /// @brief provide a lower bound on the distance between from and to (excluding traveltime of both edges) - virtual double lowerBound(const E* from, const E* to, double speed, double speedFactor, double fromEffort, double toEffort) const = 0; - - /// @brief whether the heuristic ist consistent (found nodes are always visited on the shortest path the first time) - virtual bool consistent() const = 0; -}; - - -template -class FullLookupTable : public AbstractLookupTable { -public: - FullLookupTable(const std::string& filename, const int size) : - myTable(size) { - BinaryInputDevice dev(filename); - for (int i = 0; i < size; i++) { - for (int j = 0; j < size; j++) { - double val; - dev >> val; - myTable[i].push_back(val); - } - } - } - - double lowerBound(const E* from, const E* to, double /*speed*/, double speedFactor, double /*fromEffort*/, double /*toEffort*/) const { - return myTable[from->getNumericalID()][to->getNumericalID()] / speedFactor; - } - - bool consistent() const { - return true; - } - -private: - std::vector > myTable; -}; - - -template -class LandmarkLookupTable : public AbstractLookupTable { -public: - LandmarkLookupTable(const std::string& filename, const std::vector& edges, SUMOAbstractRouter* router, const V* defaultVehicle, const std::string& outfile, const int maxNumThreads) { - myFirstNonInternal = -1; - std::map numericID; - for (E* e : edges) { - if (!e->isInternal()) { - if (myFirstNonInternal == -1) { - myFirstNonInternal = e->getNumericalID(); - } - numericID[e->getID()] = e->getNumericalID() - myFirstNonInternal; - } - } - std::ifstream strm(filename.c_str()); - if (!strm.good()) { - throw ProcessError("Could not load landmark-lookup-table from '" + filename + "'."); - } - std::ofstream* ostrm = nullptr; - if (!outfile.empty()) { - ostrm = new std::ofstream(outfile.c_str()); - if (!ostrm->good()) { - throw ProcessError("Could not open file '" + outfile + "' for writing."); - } - } - std::string line; - int numLandMarks = 0; - while (std::getline(strm, line)) { - if (line == "") { - break; - } - //std::cout << "'" << line << "'" << "\n"; - StringTokenizer st(line); - if (st.size() == 1) { - const std::string lm = st.get(0); - myLandmarks[lm] = numLandMarks++; - myFromLandmarkDists.push_back(std::vector(0)); - myToLandmarkDists.push_back(std::vector(0)); - if (ostrm != nullptr) { - (*ostrm) << lm << "\n"; - } - } else { - assert(st.size() == 4); - const std::string lm = st.get(0); - const std::string edge = st.get(1); - if (numericID[edge] != (int)myFromLandmarkDists[myLandmarks[lm]].size()) { - WRITE_WARNING("Unknown or unordered edge '" + edge + "' in landmark file."); - } - const double distFrom = StringUtils::toDouble(st.get(2)); - const double distTo = StringUtils::toDouble(st.get(3)); - myFromLandmarkDists[myLandmarks[lm]].push_back(distFrom); - myToLandmarkDists[myLandmarks[lm]].push_back(distTo); - } - } - if (myLandmarks.empty()) { - WRITE_WARNING("No landmarks in '" + filename + "', falling back to standard A*."); - delete ostrm; - return; - } -#ifdef HAVE_FOX - FXWorkerThread::Pool threadPool; -#endif - for (int i = 0; i < (int)myLandmarks.size(); ++i) { - if ((int)myFromLandmarkDists[i].size() != (int)edges.size() - myFirstNonInternal) { - const std::string landmarkID = getLandmark(i); - const E* landmark = nullptr; - // retrieve landmark edge - for (const E* const edge : edges) { - if (edge->getID() == landmarkID) { - landmark = edge; - break; - } - } - if (landmark == nullptr) { - WRITE_WARNING("Landmark '" + landmarkID + "' does not exist in the network."); - continue; - } - if (router != nullptr) { - const std::string missing = outfile.empty() ? filename + ".missing" : outfile; - WRITE_WARNING("Not all network edges were found in the lookup table '" + filename + "' for landmark '" + landmarkID + "'. Saving missing values to '" + missing + "'."); - if (ostrm == nullptr) { - ostrm = new std::ofstream(missing.c_str()); - if (!ostrm->good()) { - throw ProcessError("Could not open file '" + missing + "' for writing."); - } - } - } else { - throw ProcessError("Not all network edges were found in the lookup table '" + filename + "' for landmark '" + landmarkID + "'."); - } - std::vector routeLM(1, landmark); - const double lmCost = router->recomputeCosts(routeLM, defaultVehicle, 0); - std::vector route; -#ifdef HAVE_FOX - if (maxNumThreads > 0) { - if (threadPool.size() == 0) { - // The CHRouter needs initialization - // before it gets cloned, so we do a dummy routing which is not in parallel - router->compute(landmark, landmark, defaultVehicle, 0, route); - route.clear(); - while ((int)threadPool.size() < maxNumThreads) { - new WorkerThread(threadPool, router->clone(), defaultVehicle); - } - } - std::vector currentTasks; - for (int j = (int)myFromLandmarkDists[i].size() + myFirstNonInternal; j < (int)edges.size(); ++j) { - const E* edge = edges[j]; - if (landmark != edge) { - std::vector routeE(1, edge); - const double sourceDestCost = lmCost + router->recomputeCosts(routeE, defaultVehicle, 0); - // compute from-distance (skip taz-sources and other unreachable edges) - if (edge->getPredecessors().size() > 0 && landmark->getSuccessors().size() > 0) { - currentTasks.push_back(new RoutingTask(landmark, edge, sourceDestCost)); - threadPool.add(currentTasks.back()); - } - // compute to-distance (skip unreachable landmarks) - if (landmark->getPredecessors().size() > 0 && edge->getSuccessors().size() > 0) { - currentTasks.push_back(new RoutingTask(edge, landmark, sourceDestCost)); - threadPool.add(currentTasks.back()); - } - } - } - threadPool.waitAll(false); - int taskIndex = 0; - for (int j = (int)myFromLandmarkDists[i].size() + myFirstNonInternal; j < (int)edges.size(); ++j) { - const E* edge = edges[j]; - double distFrom = -1; - double distTo = -1; - if (landmark == edge) { - distFrom = 0; - distTo = 0; - } else { - if (edge->getPredecessors().size() > 0 && landmark->getSuccessors().size() > 0) { - distFrom = currentTasks[taskIndex]->getCost(); - delete currentTasks[taskIndex++]; - } - if (landmark->getPredecessors().size() > 0 && edge->getSuccessors().size() > 0) { - distTo = currentTasks[taskIndex]->getCost(); - delete currentTasks[taskIndex++]; - } - } - myFromLandmarkDists[i].push_back(distFrom); - myToLandmarkDists[i].push_back(distTo); - (*ostrm) << landmarkID << " " << edge->getID() << " " << distFrom << " " << distTo << "\n"; - } - currentTasks.clear(); - continue; - } -#endif - for (int j = (int)myFromLandmarkDists[i].size() + myFirstNonInternal; j < (int)edges.size(); ++j) { - const E* edge = edges[j]; - double distFrom = -1.; - double distTo = -1.; - if (landmark == edge) { - distFrom = 0.; - distTo = 0.; - } else { - std::vector routeE(1, edge); - const double sourceDestCost = lmCost + router->recomputeCosts(routeE, defaultVehicle, 0); - // compute from-distance (skip taz-sources and other unreachable edges) - if (edge->getPredecessors().size() > 0 && landmark->getSuccessors().size() > 0) { - if (router->compute(landmark, edge, defaultVehicle, 0, route)) { - distFrom = MAX2(0.0, router->recomputeCosts(route, defaultVehicle, 0) - sourceDestCost); - route.clear(); - } - } - // compute to-distance (skip unreachable landmarks) - if (landmark->getPredecessors().size() > 0 && edge->getSuccessors().size() > 0) { - if (router->compute(edge, landmark, defaultVehicle, 0, route)) { - distTo = MAX2(0.0, router->recomputeCosts(route, defaultVehicle, 0) - sourceDestCost); - route.clear(); - } - } - } - myFromLandmarkDists[i].push_back(distFrom); - myToLandmarkDists[i].push_back(distTo); - (*ostrm) << landmarkID << " " << edge->getID() << " " << distFrom << " " << distTo << "\n"; - } - } - } - delete ostrm; - } - - double lowerBound(const E* from, const E* to, double speed, double speedFactor, double fromEffort, double toEffort) const { - double result = from->getDistanceTo(to) / speed; -#ifdef ASTAR_DEBUG_LOOKUPTABLE - if (from->getID() == ASTAR_DEBUG_LOOKUPTABLE_FROM) { - std::cout << " lowerBound to=" << to->getID() << " result1=" << result << "\n"; - } -#endif - for (int i = 0; i < (int)myLandmarks.size(); ++i) { - // a cost of -1 is used to encode unreachability. - const double fl = myToLandmarkDists[i][from->getNumericalID() - myFirstNonInternal]; - const double tl = myToLandmarkDists[i][to->getNumericalID() - myFirstNonInternal]; - if (fl >= 0 && tl >= 0) { - const double bound = (fl - tl - toEffort) / speedFactor; -#ifdef ASTAR_DEBUG_LOOKUPTABLE - if (from->getID() == ASTAR_DEBUG_LOOKUPTABLE_FROM && result < bound) { - std::cout << " landmarkTo=" << getLandmark(i) << " result2=" << bound - << " fl=" << fl << " tl=" << tl << "\n"; - } -#endif - result = MAX2(result, bound); - } - const double lt = myFromLandmarkDists[i][to->getNumericalID() - myFirstNonInternal]; - const double lf = myFromLandmarkDists[i][from->getNumericalID() - myFirstNonInternal]; - if (lt >= 0 && lf >= 0) { - const double bound = (lt - lf - fromEffort) / speedFactor; -#ifdef ASTAR_DEBUG_LOOKUPTABLE - if (from->getID() == ASTAR_DEBUG_LOOKUPTABLE_FROM && result < bound) { - std::cout << " landmarkFrom=" << getLandmark(i) << " result3=" << bound - << " lt=" << lt << " lf=" << lf << "\n"; - } -#endif - result = MAX2(result, bound); - } - if ((tl >= 0 && fl < 0) - || (lf >= 0 && lt < 0)) { - // target unreachable. -#ifdef ASTAR_DEBUG_UNREACHABLE - std::cout << " unreachable: from=" << from->getID() << " to=" << to->getID() << " landmark=" << getLandmark(i) << " " - << ((tl >= 0 && fl < 0) ? " (toLandmark)" : " (fromLandmark)") - << " fl=" << fl << " tl=" << tl << " lt=" << lt << " lf=" << lf - << "\n"; -#endif - return UNREACHABLE; - } - } - return result; - } - - bool consistent() const { - return false; - } - -private: - std::map myLandmarks; - std::vector > myFromLandmarkDists; - std::vector > myToLandmarkDists; - int myFirstNonInternal; - -#ifdef HAVE_FOX -private: - class WorkerThread : public FXWorkerThread { - public: - WorkerThread(FXWorkerThread::Pool& pool, - SUMOAbstractRouter* router, const V* vehicle) - : FXWorkerThread(pool), myRouter(router), myVehicle(vehicle) {} - virtual ~WorkerThread() { - delete myRouter; - } - double compute(const E* src, const E* dest, const double costOff) { - double result = -1.; - if (myRouter->compute(src, dest, myVehicle, 0, myRoute)) { - result = MAX2(0.0, myRouter->recomputeCosts(myRoute, myVehicle, 0) + costOff); - myRoute.clear(); - } - return result; - } - private: - SUMOAbstractRouter* myRouter; - const V* myVehicle; - std::vector myRoute; - }; - - class RoutingTask : public FXWorkerThread::Task { - public: - RoutingTask(const E* src, const E* dest, const double costOff) - : mySrc(src), myDest(dest), myCost(-costOff) {} - void run(FXWorkerThread* context) { - myCost = ((WorkerThread*)context)->compute(mySrc, myDest, myCost); - } - double getCost() { - return myCost; - } - private: - const E* const mySrc; - const E* const myDest; - double myCost; - private: - /// @brief Invalidated assignment operator. - RoutingTask& operator=(const RoutingTask&); - }; - - -private: - /// @brief for multi threaded routing -#endif - - std::string getLandmark(int i) const { - for (std::map::const_iterator it = myLandmarks.begin(); it != myLandmarks.end(); ++it) { - if (it->second == i) { - return it->first; - } - } - return ""; - } -}; - - - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/AStarRouter.h sumo-1.2.0+dfsg1/src/utils/vehicle/AStarRouter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/AStarRouter.h 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/AStarRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,327 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file AStarRouter.h -/// @author Jakob Erdmann -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date January 2012 -/// @version $Id$ -/// -// A* Algorithm using euclidean distance heuristic. -// Based on DijkstraRouter. For routing by effort a novel heuristic would be needed. -/****************************************************************************/ -#ifndef AStarRouter_h -#define AStarRouter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "AStarLookupTable.h" -#include "SUMOAbstractRouter.h" - -#define UNREACHABLE (std::numeric_limits::max() / 1000.0) - -//#define ASTAR_DEBUG_QUERY -//#define ASTAR_DEBUG_QUERY_FOLLOWERS -//#define ASTAR_DEBUG_QUERY_PERF -//#define ASTAR_DEBUG_VISITED -//#define ASTAR_DEBUG_LOOKUPTABLE -//#define ASTAR_DEBUG_LOOKUPTABLE_FROM "disabled" -//#define ASTAR_DEBUG_UNREACHABLE - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class AStarRouter - * @brief Computes the shortest path through a network using the A* algorithm. - * - * The template parameters are: - * @param E The edge class to use (MSEdge/ROEdge) - * @param V The vehicle class to use (MSVehicle/ROVehicle) - * @param BASE The base class to use (SUMOAbstractRouterPermissions/SUMOAbstractRouter) - * - * 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 BASE { -public: - typedef AbstractLookupTable LookupTable; - typedef FullLookupTable FLT; - typedef LandmarkLookupTable LMLT; - - /** - * @class EdgeInfoComparator - * Class to compare (and so sort) nodes by their effort - */ - class EdgeInfoComparator { - public: - /// Comparing method - bool operator()(const typename BASE::EdgeInfo* nod1, const typename BASE::EdgeInfo* nod2) const { - if (nod1->heuristicEffort == nod2->heuristicEffort) { - return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); - } - return nod1->heuristicEffort > nod2->heuristicEffort; - } - }; - - /// Constructor - AStarRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation operation, const std::shared_ptr lookup = 0) : - BASE("AStarRouter", operation), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), - myLookupTable(lookup), - myMaxSpeed(NUMERICAL_EPS) { - for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - myEdgeInfos.push_back(typename BASE::EdgeInfo(*i)); - myMaxSpeed = MAX2(myMaxSpeed, (*i)->getSpeedLimit() * MAX2(1.0, (*i)->getLengthGeometryFactor())); - } - } - - AStarRouter(const std::vector& edgeInfos, bool unbuildIsWarning, typename BASE::Operation operation, const std::shared_ptr lookup = 0) : - BASE("AStarRouter", operation), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), - myLookupTable(lookup), - myMaxSpeed(NUMERICAL_EPS) { - for (const auto& edgeInfo : edgeInfos) { - myEdgeInfos.push_back(typename BASE::EdgeInfo(edgeInfo.edge)); - myMaxSpeed = MAX2(myMaxSpeed, edgeInfo.edge->getSpeedLimit() * edgeInfo.edge->getLengthGeometryFactor()); - } - } - - /// Destructor - virtual ~AStarRouter() {} - - virtual SUMOAbstractRouter* clone() { - return new AStarRouter(myEdgeInfos, myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, myLookupTable); - } - - void init() { - // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up - for (auto& edgeInfo : myFrontierList) { - edgeInfo->reset(); - } - myFrontierList.clear(); - for (auto& edgeInfo : myFound) { - edgeInfo->reset(); - } - myFound.clear(); - } - - - /** @brief Builds the route between the given edges using the minimum travel time */ - virtual bool compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) { - assert(from != 0 && to != 0); - // check whether from and to can be used - if (this->isProhibited(from, vehicle)) { - myErrorMsgHandler->inform("Vehicle '" + vehicle->getID() + "' is not allowed on source edge '" + from->getID() + "'."); - return false; - } - if (this->isProhibited(to, vehicle)) { - myErrorMsgHandler->inform("Vehicle '" + vehicle->getID() + "' is not allowed on destination edge '" + to->getID() + "'."); - return false; - } - this->startQuery(); -#ifdef ASTAR_DEBUG_QUERY - std::cout << "DEBUG: starting search for '" << vehicle->getID() << "' speed: " << MIN2(vehicle->getMaxSpeed(), myMaxSpeed * vehicle->getChosenSpeedFactor()) << " time: " << STEPS2TIME(msTime) << "\n"; -#endif - const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); - if (this->myBulkMode) { - const auto& toInfo = myEdgeInfos[to->getNumericalID()]; - if (toInfo.visited) { - buildPathFrom(&toInfo, into); - this->endQuery(1); - return true; - } - } else { - init(); - // add begin node - auto* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); - fromInfo->effort = 0.; - fromInfo->prev = nullptr; - fromInfo->leaveTime = STEPS2TIME(msTime); - myFrontierList.push_back(fromInfo); - } - // loop - int num_visited = 0; - const bool mayRevisit = myLookupTable != 0 && !myLookupTable->consistent(); - const double speed = vehicle == nullptr ? myMaxSpeed : MIN2(vehicle->getMaxSpeed(), myMaxSpeed * vehicle->getChosenSpeedFactor()); - while (!myFrontierList.empty()) { - num_visited += 1; - // use the node with the minimal length - auto* const minimumInfo = myFrontierList.front(); - const E* const minEdge = minimumInfo->edge; - // check whether the destination node was already reached - if (minEdge == to) { - buildPathFrom(minimumInfo, into); - this->endQuery(num_visited); -#ifdef ASTAR_DEBUG_QUERY_PERF - std::cout << "visited " + toString(num_visited) + " edges (final path length=" + toString(into.size()) - + " time=" + toString(recomputeCosts(into, vehicle, msTime)) - + " edges=" + toString(into) + ")\n"; -#endif -#ifdef ASTAR_DEBUG_VISITED - OutputDevice& dev = OutputDevice::getDevice(vehicle->getID() + "_" + time2string(msTime) + "_" + from->getID() + "_" + to->getID()); - for (const auto& i : myEdgeInfos) { - if (i.visited) { - dev << "edge:" << i.edge->getID() << "\n"; - } - } - dev.close(); -#endif - return true; - } - pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - myFrontierList.pop_back(); - myFound.push_back(minimumInfo); - minimumInfo->visited = true; - const E* viaEdge = minimumInfo->via; -#ifdef ASTAR_DEBUG_QUERY - std::cout << "DEBUG: hit=" << minEdge->getID() - << " TT=" << minimumInfo->traveltime - << " EF=" << this->getEffort(minEdge, vehicle, time + minimumInfo->traveltime) - << " HT=" << minimumInfo->heuristicTime - << " Q(TT,HT,Edge)="; - for (typename std::vector::iterator it = myFrontierList.begin(); it != myFrontierList.end(); it++) { - std::cout << (*it)->traveltime << "," << (*it)->heuristicTime << "," << (*it)->edge->getID() << " "; - } - std::cout << "\n"; -#endif - double effort = minimumInfo->effort; - double leaveTime = minimumInfo->leaveTime; - while (viaEdge != nullptr && viaEdge->isInternal()) { - const double viaEffortDelta = this->getEffort(viaEdge, vehicle, leaveTime); - leaveTime += this->getTravelTime(viaEdge, vehicle, leaveTime, viaEffortDelta); - effort += viaEffortDelta; - viaEdge = viaEdge->getViaSuccessors().front().first; - } - const double effortDelta = this->getEffort(minEdge, vehicle, leaveTime); - leaveTime += this->getTravelTime(minEdge, vehicle, minimumInfo->leaveTime, effortDelta); - effort += effortDelta; - - // admissible A* heuristic: straight line distance at maximum speed - const double heuristic_remaining = (myLookupTable == nullptr ? minEdge->getDistanceTo(to) / speed : - myLookupTable->lowerBound(minEdge, to, speed, vehicle->getChosenSpeedFactor(), minEdge->getMinimumTravelTime(0), to->getMinimumTravelTime(0))); - if (heuristic_remaining == UNREACHABLE) { - continue; - } - // check all ways from the node with the minimal length - for (const std::pair& follower : minEdge->getViaSuccessors(vClass)) { - auto* const followerInfo = &(myEdgeInfos[follower.first->getNumericalID()]); - // check whether it can be used - if (this->isProhibited(follower.first, vehicle)) { - continue; - } - const double oldEffort = followerInfo->effort; - if ((!followerInfo->visited || mayRevisit) && effort < oldEffort) { - followerInfo->effort = effort; - followerInfo->heuristicEffort = effort + heuristic_remaining; - followerInfo->leaveTime = leaveTime; - followerInfo->prev = minimumInfo; - followerInfo->via = follower.second; - /* 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) / speed; - } else { - followerInfo->heuristicTime += this->getEffort(follower, vehicle, time + traveltime) + (*myLookupTable)[follower->getNumericalID()][to->getNumericalID()] / vehicle->getChosenSpeedFactor(); - } - }*/ -#ifdef ASTAR_DEBUG_QUERY_FOLLOWERS - std::cout << " follower=" << followerInfo->edge->getID() << " OEF=" << oldEffort << " TT=" << traveltime << " HR=" << heuristic_remaining << " HT=" << followerInfo->heuristicTime << "\n"; -#endif - if (oldEffort == std::numeric_limits::max()) { - myFrontierList.push_back(followerInfo); - push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - } else { - auto fi = find(myFrontierList.begin(), myFrontierList.end(), followerInfo); - if (fi == myFrontierList.end()) { - assert(mayRevisit); - myFrontierList.push_back(followerInfo); - push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - } else { - push_heap(myFrontierList.begin(), fi + 1, myComparator); - } - } - } - } - } - this->endQuery(num_visited); -#ifdef ASTAR_DEBUG_QUERY_PERF - std::cout << "visited " + toString(num_visited) + " edges (unsuccesful path length: " + toString(into.size()) + ")\n"; -#endif - myErrorMsgHandler->inform("No connection between edge '" + from->getID() + "' and edge '" + to->getID() + "' found."); - return false; - } - -public: - /// Builds the path from marked edges - void buildPathFrom(const typename BASE::EdgeInfo* rbegin, std::vector& edges) { - std::vector tmp; - while (rbegin != 0) { - tmp.push_back(rbegin->edge); - rbegin = rbegin->prev; - } - std::copy(tmp.rbegin(), tmp.rend(), 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 std::shared_ptr myLookupTable; - - /// @brief maximum speed in the network - double myMaxSpeed; -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/CarEdge.h sumo-1.2.0+dfsg1/src/utils/vehicle/CarEdge.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/CarEdge.h 2018-09-11 22:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/CarEdge.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,141 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file CarEdge.h -/// @author Michael Behrisch -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The CarEdge is a special intermodal edge representing the SUMO network edge -/****************************************************************************/ -#ifndef CarEdge_h -#define CarEdge_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#ifdef HAVE_FOX -#include -#endif -#include "IntermodalEdge.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the car edge type that is given to the internal router (SUMOAbstractRouter) -template -class CarEdge : public IntermodalEdge { -private: - typedef IntermodalEdge _IntermodalEdge; - -public: - CarEdge(int numericalID, const E* edge, const double pos = -1.) : - _IntermodalEdge(edge->getID() + "_car" + toString(pos), numericalID, edge, "!car"), - myStartPos(pos >= 0 ? pos : 0.) { } - - bool includeInRoute(bool /* allEdges */) const { - return true; - } - - const std::vector<_IntermodalEdge*>& getSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { - if (vClass == SVC_IGNORING) { - return this->myFollowingEdges; - } -#ifdef HAVE_FOX - FXMutexLock locker(myLock); -#endif - typename std::map >::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 successors - const std::set classedCarFollowers = std::set(this->getEdge()->getSuccessors(vClass).begin(), this->getEdge()->getSuccessors(vClass).end()); - for (_IntermodalEdge* const e : this->myFollowingEdges) { - if (!e->includeInRoute(false) || e->getEdge() == this->getEdge() || classedCarFollowers.count(e->getEdge()) > 0) { - myClassesSuccessorMap[vClass].push_back(e); - } - } - return myClassesSuccessorMap[vClass]; - } - } - - virtual const std::vector >& getViaSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { - if (vClass == SVC_IGNORING) { - return this->myFollowingViaEdges; - } -#ifdef HAVE_FOX - FXMutexLock locker(myLock); -#endif - typename std::map > >::const_iterator i = myClassesViaSuccessorMap.find(vClass); - if (i != myClassesViaSuccessorMap.end()) { - // can use cached value - return i->second; - } else { - // this vClass is requested for the first time. rebuild all successors - const std::set > classedCarFollowers = std::set >(this->getEdge()->getViaSuccessors(vClass).begin(), this->getEdge()->getViaSuccessors(vClass).end()); - for (const std::pair& e : this->myFollowingViaEdges) { - const auto viaPair = std::make_pair(e.first->getEdge(), e.second == nullptr ? nullptr : e.second->getEdge()); - if (!e.first->includeInRoute(false) || e.first->getEdge() == this->getEdge() || classedCarFollowers.count(viaPair) > 0) { - myClassesViaSuccessorMap[vClass].push_back(e); - } - } - return myClassesViaSuccessorMap[vClass]; - } - } - - bool prohibits(const IntermodalTrip* const trip) const { - return trip->vehicle == 0 || this->getEdge()->prohibits(trip->vehicle); - } - - double getTravelTime(const IntermodalTrip* const trip, double time) const { - const double travelTime = E::getTravelTimeStatic(this->getEdge(), trip->vehicle, time); - double distTravelled = this->getLength(); - // checking arrivalPos first to have it correct for identical depart and arrival edge - if (this->getEdge() == trip->to) { - distTravelled = trip->arrivalPos - myStartPos; - } - if (this->getEdge() == trip->from) { - distTravelled -= trip->departPos - myStartPos; - } - return travelTime * distTravelled / this->getEdge()->getLength(); - } - - double getStartPos() const { - return myStartPos; - } - - double getEndPos() const { - return myStartPos + this->getLength(); - } - -private: - /// @brief the starting position for split edges - const double myStartPos; - - /// @brief The successors available for a given vClass - mutable std::map > myClassesSuccessorMap; - - /// @brief The successors available for a given vClass - mutable std::map > > myClassesViaSuccessorMap; - -#ifdef HAVE_FOX - /// The mutex used to avoid concurrent updates of myClassesSuccessorMap - mutable FXMutex myLock; -#endif -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/CHBuilder.h sumo-1.2.0+dfsg1/src/utils/vehicle/CHBuilder.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/CHBuilder.h 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/CHBuilder.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,529 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file CHBuilder.h -/// @author Jakob Erdmann -/// @author Laura Bieker -/// @author Michael Behrisch -/// @date February 2012 -/// @version $Id$ -/// -// Contraction Hierarchy Builder for the shortest path search -/****************************************************************************/ -#ifndef CHBuilder_h -#define CHBuilder_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "SPTree.h" - -//#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_withPermissions/noProhibitions) - * - * 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 CHBuilder { - -public: - /// @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(int t, double c, SVCPermissions p): target(t), cost(c), permissions(p) {} - int target; - double cost; - SVCPermissions permissions; - }; - - typedef std::pair ConstEdgePair; - typedef std::map ShortcutVia; - struct Hierarchy { - ShortcutVia shortcuts; - std::vector > forwardUplinks; - std::vector > backwardUplinks; - }; - - /** @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 svc - */ - CHBuilder(const std::vector& edges, bool unbuildIsWarning, - const SUMOVehicleClass svc, - bool validatePermissions): - myEdges(edges), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), - mySPTree(new SPTree(4, validatePermissions)), - mySVC(svc), - myUpdateCount(0) { - for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - myCHInfos.push_back(CHInfo(*i)); - } - } - - /// Destructor - virtual ~CHBuilder() { - delete mySPTree; - } - - - const Hierarchy* buildContractionHierarchy(SUMOTime time, const V* const vehicle, const SUMOAbstractRouter* effortProvider) { - Hierarchy* result = new Hierarchy(); - const int numEdges = (int)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 - // reset previous connections etc - for (int i = 0; i < numEdges; i++) { - myCHInfos[i].resetContractionState(); - result->forwardUplinks.push_back(std::vector()); - result->backwardUplinks.push_back(std::vector()); - } - // copy connections from the original net - const double time_seconds = STEPS2TIME(time); // timelines store seconds! - for (int i = 0; i < numEdges; i++) { - synchronize(myCHInfos[i], time_seconds, vehicle, effortProvider); - } - // synchronization is finished. now we can compute priorities for the first time - for (int 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 - const E* const edge = max->edge; - // add outgoing connections to the forward search - const int edgeID = edge->getNumericalID(); - for (typename CHConnections::const_iterator it = max->followers.begin(); it != max->followers.end(); it++) { - const CHConnection& con = *it; - result->forwardUplinks[edgeID].push_back(Connection(con.target->edge->getNumericalID(), con.cost, con.permissions)); - disconnect(con.target->approaching, max); - con.target->updatePriority(0); - } - // add incoming connections to the backward search - for (typename CHConnections::const_iterator it = max->approaching.begin(); it != max->approaching.end(); it++) { - const CHConnection& con = *it; - result->backwardUplinks[edgeID].push_back(Connection(con.target->edge->getNumericalID(), con.cost, con.permissions)); - disconnect(con.target->followers, max); - con.target->updatePriority(0); - } - // add shortcuts to the net - for (typename std::vector::const_iterator it = max->shortcuts.begin(); it != max->shortcuts.end(); it++) { - const ConstEdgePair& edgePair = it->edgePair; - result->shortcuts[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)); - } - // if you need to debug the chrouter with MSVC uncomment the following line, hierarchy building will get slower and the hierarchy may change though - //make_heap(queue.begin(), queue.end(), myCmp); - // 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(result->shortcuts.size()) + " shortcuts."); - WRITE_MESSAGE("Recomputed priority " + toString(myUpdateCount) + " times."); - MsgHandler::getMessageInstance()->endProcessMsg("done (" + toString(duration) + "ms)."); - PROGRESS_DONE_MESSAGE(); - myUpdateCount = 0; - return result; - } - -private: - struct Shortcut { - Shortcut(ConstEdgePair e, double c, int u, SVCPermissions p): - edgePair(e), cost(c), underlying(u), permissions(p) {} - ConstEdgePair edgePair; - double cost; - int underlying; - SVCPermissions permissions; - }; - - - class CHInfo; - - /// @brief Forward/backward connection with associated FORWARD cost - class CHConnection { - public: - CHConnection(CHInfo* t, double c, SVCPermissions p, int u): - target(t), cost(c), permissions(p), underlying(u) {} - CHInfo* target; - double 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 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(const E* e) : - edge(e), - priority(0.), - contractedNeighbors(0), - rank(-1), - level(0), - underlyingTotal(0), - visited(false), - traveltime(std::numeric_limits::max()), - depth(0), - permissions(SVC_IGNORING) { - } - - /// @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 double oldPriority = priority; - // priority term as used by abraham [] - const int edge_difference = (int)followers.size() + (int)approaching.size() - 2 * (int)shortcuts.size(); - priority = (double)(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 = (int)approaching.size() + (int)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 double 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(ConstEdgePair(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 double 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(ConstEdgePair(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 - const E* edge; - /// @brief The contraction priority - double priority; - /// @brief The needed shortcuts - std::vector 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 - double 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 double 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"; - } - - }; - - - /** - * @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, double time, const V* const vehicle, const SUMOAbstractRouter* effortProvider) { - // 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 double baseCost = effortProvider->getEffort(edge, vehicle, time); - - for (const std::pair& successor : edge->getViaSuccessors(mySVC)) { - const E* fEdge = successor.first; - if (prune && ((fEdge->getPermissions() & mySVC) != mySVC)) { - continue; - } - CHInfo* const follower = getCHInfo(fEdge); - const SVCPermissions permissions = (edge->getPermissions() & fEdge->getPermissions()); - double cost = baseCost; - const E* viaEdge = successor.second; - while (viaEdge != nullptr && viaEdge->isInternal()) { - cost += effortProvider->getEffort(viaEdge, vehicle, time); - viaEdge = viaEdge->getViaSuccessors().front().first; - } - 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); - } - - /** @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 all edges with numerical ids - const std::vector& myEdges; - - /// @brief the handler for routing errors - MsgHandler* const myErrorMsgHandler; - - /// @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 permissions for which the hierarchy was constructed - const SUMOVehicleClass mySVC; - - /// @brief counters for performance logging - int myUpdateCount; - -private: - /// @brief Invalidated assignment operator - CHBuilder& operator=(const CHBuilder& s); -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/CHRouter.h sumo-1.2.0+dfsg1/src/utils/vehicle/CHRouter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/CHRouter.h 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/CHRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,415 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file CHRouter.h -/// @author Jakob Erdmann -/// @author Laura Bieker -/// @author Michael Behrisch -/// @date February 2012 -/// @version $Id$ -/// -// Shortest Path search using a Contraction Hierarchy -/****************************************************************************/ -#ifndef CHRouter_h -#define CHRouter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "CHBuilder.h" - -//#define CHRouter_DEBUG_QUERY -//#define CHRouter_DEBUG_QUERY_PERF - -// =========================================================================== -// 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_withPermissions/noProhibitions) - * - * 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 BASE { - -public: - /// Type of the function that is used to retrieve the edge effort. - typedef double(* Operation)(const E* const, const V* const, double); - - /// A meeting point of the two search scopes - typedef std::pair Meeting; - - /** - * @class Unidirectional - * class for searching in one direction - */ - class Unidirectional { - public: - /// @brief Constructor - Unidirectional(const std::vector& edges, bool forward): - myAmForward(forward), - myVehicle(0) { - for (const E* const e: edges) { - myEdgeInfos.push_back(typename BASE::EdgeInfo(e)); - } - } - - inline bool found(const E* const edge) const { - return myFound.count(edge) > 0; - } - - inline typename BASE::EdgeInfo* getEdgeInfo(const E* const edge) { - return &(myEdgeInfos[edge->getNumericalID()]); - } - - inline const typename BASE::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 typename BASE::EdgeInfo* nod1, const typename BASE::EdgeInfo* nod2) const { - if (nod1->effort == nod2->effort) { - return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); - } - return nod1->effort > nod2->effort; - } - }; - - - 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 (auto ei : myFrontier) { - ei->reset(); - } - myFrontier.clear(); - for (auto edge : myFound) { - getEdgeInfo(edge)->reset(); - } - myFound.clear(); - myVehicle = vehicle; - auto startInfo = getEdgeInfo(start); - startInfo->effort = 0.; - startInfo->prev = nullptr; - myFrontier.push_back(startInfo); - } - - - typedef std::vector::Connection> ConnectionVector; - /** @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 std::vector& uplinks, const Unidirectional& otherSearch, double& minTTSeen, Meeting& meeting) { - // pop the node with the minimal length - auto* 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 auto* const otherInfo = otherSearch.getEdgeInfo(minEdge); - const double ttSeen = minimumInfo->effort + otherInfo->effort; -#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 (const auto& uplink : uplinks[minEdge->getNumericalID()]) { - const auto upwardInfo = &myEdgeInfos[uplink.target]; - const double effort = minimumInfo->effort + uplink.cost; - const SUMOVehicleClass svc = myVehicle->getVClass(); - // check whether it can be used - if ((uplink.permissions & svc) != svc) { - continue; - } - const double oldEffort = upwardInfo->effort; - if (!upwardInfo->visited && effort < oldEffort) { - upwardInfo->effort = effort; - upwardInfo->prev = minimumInfo; - if (oldEffort == 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()->effort < minTTSeen; - } - - private: - /// @brief the role of this search - bool myAmForward; - /// @brief the min edge heap - std::vector myFrontier; - /// @brief the set of visited (settled) Edges - std::set myFound; - /// @brief The container of edge information - std::vector myEdgeInfos; - - EdgeInfoByTTComparator myComparator; - - const V* myVehicle; - - }; - - /** @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 svc - */ - CHRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation operation, - const SUMOVehicleClass svc, - SUMOTime weightPeriod, - bool validatePermissions): - BASE("CHRouter", operation), - myEdges(edges), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), - myForwardSearch(edges, true), - myBackwardSearch(edges, false), - myHierarchyBuilder(new CHBuilder(edges, unbuildIsWarning, svc, validatePermissions)), - myHierarchy(0), - myWeightPeriod(weightPeriod), - myValidUntil(0), - mySVC(svc) { - } - - /** @brief Cloning constructor - */ - CHRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation operation, - const SUMOVehicleClass svc, - SUMOTime weightPeriod, - const typename CHBuilder::Hierarchy* hierarchy) : - BASE("CHRouterClone", operation), - myEdges(edges), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), - myForwardSearch(edges, true), - myBackwardSearch(edges, false), - myHierarchyBuilder(0), - myHierarchy(hierarchy), - myWeightPeriod(weightPeriod), - myValidUntil(0), - mySVC(svc) { - } - - /// Destructor - virtual ~CHRouter() { - if (myHierarchyBuilder != 0) { - delete myHierarchy; - delete myHierarchyBuilder; - } - } - - - virtual SUMOAbstractRouter* clone() { - WRITE_MESSAGE("Cloning Contraction Hierarchy for " + SumoVehicleClassStrings.getString(mySVC) + " and time " + time2string(myValidUntil) + "."); - CHRouter* clone = new CHRouter(myEdges, myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, - mySVC, myWeightPeriod, myHierarchy); - clone->myValidUntil = myValidUntil; - return clone; - } - - /** @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 bool compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) { - assert(from != 0 && to != 0); - // assert(myHierarchyBuilder.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); - double minTTSeen = std::numeric_limits::max(); - Meeting meeting(nullptr, nullptr); - bool continueForward = true; - bool continueBackward = true; - int num_visited_fw = 0; - int num_visited_bw = 0; - bool result = true; - while (continueForward || continueBackward) { - if (continueForward) { - continueForward = myForwardSearch.step(myHierarchy->forwardUplinks, myBackwardSearch, minTTSeen, meeting); - num_visited_fw += 1; - } - if (continueBackward) { - continueBackward = myBackwardSearch.step(myHierarchy->backwardUplinks, myForwardSearch, minTTSeen, meeting); - num_visited_bw += 1; - } - } - if (minTTSeen < std::numeric_limits::max()) { - buildPathFromMeeting(meeting, into); - } else { - myErrorMsgHandler->inform("No connection between edge '" + from->getID() + "' and edge '" + to->getID() + "' found."); - result = false; - } -#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); - return result; - } - - /// normal routing methods - - /// Builds the path from marked edges - void buildPathFromMeeting(Meeting meeting, std::vector& into) const { - std::deque tmp; - const auto* 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); - } - } - } - } - - void buildContractionHierarchy(SUMOTime time, const V* const vehicle) { - if (myHierarchyBuilder != 0) { - delete myHierarchy; - myHierarchy = myHierarchyBuilder->buildContractionHierarchy(time, vehicle, this); - } - // declare new validUntil (prevent overflow) - if (myWeightPeriod < std::numeric_limits::max()) { - myValidUntil = time + myWeightPeriod; - } else { - myValidUntil = myWeightPeriod; - } - } - -private: - // retrieve the via edge for a shortcut - const E* getVia(const E* forwardFrom, const E* forwardTo) const { - typename CHBuilder::ConstEdgePair forward(forwardFrom, forwardTo); - typename CHBuilder::ShortcutVia::const_iterator it = myHierarchy->shortcuts.find(forward); - if (it != myHierarchy->shortcuts.end()) { - return it->second; - } else { - return 0; - } - } - - -private: - /// @brief all edges with numerical ids - const std::vector& myEdges; - - /// @brief the handler for routing errors - MsgHandler* const myErrorMsgHandler; - - /// @brief the unidirectional search queues - Unidirectional myForwardSearch; - Unidirectional myBackwardSearch; - - CHBuilder* myHierarchyBuilder; - const typename CHBuilder::Hierarchy* myHierarchy; - - /// @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 - const SUMOVehicleClass mySVC; -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/CHRouterWrapper.h sumo-1.2.0+dfsg1/src/utils/vehicle/CHRouterWrapper.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/CHRouterWrapper.h 2018-08-21 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/CHRouterWrapper.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,192 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file CHRouterWrapper.h -/// @author Jakob Erdmann -/// @author Laura Bieker -/// @author Michael Behrisch -/// @date March 2012 -/// @version $Id$ -/// -// Wraps multiple CHRouters for different vehicle types -/****************************************************************************/ -#ifndef CHRouterWrapper_h -#define CHRouterWrapper_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "CHRouter.h" - -#ifdef HAVE_FOX -#include -#endif - - -// =========================================================================== -// 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_withPermissions/noProhibitions) - * - * 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 BASE { - -public: - /// Type of the function that is used to retrieve the edge effort. - typedef double(* Operation)(const E* const, const V* const, double); - - /** @brief Constructor - */ - CHRouterWrapper(const std::vector& edges, const bool ignoreErrors, typename BASE::Operation operation, - const SUMOTime begin, const SUMOTime end, const SUMOTime weightPeriod, const int numThreads) : - BASE("CHRouterWrapper", operation), - myEdges(edges), - myIgnoreErrors(ignoreErrors), - myBegin(begin), - myEnd(end), - myWeightPeriod(weightPeriod), - myMaxNumInstances(numThreads) { - } - - ~CHRouterWrapper() { - for (typename RouterMap::iterator i = myRouters.begin(); i != myRouters.end(); ++i) { - for (typename std::vector::iterator j = i->second.begin(); j != i->second.end(); ++j) { - delete *j; - } - } - } - - - virtual SUMOAbstractRouter* clone() { - CHRouterWrapper* clone = new CHRouterWrapper(myEdges, myIgnoreErrors, this->myOperation, myBegin, myEnd, myWeightPeriod, myMaxNumInstances); - for (typename RouterMap::iterator i = myRouters.begin(); i != myRouters.end(); ++i) { - for (typename std::vector::iterator j = i->second.begin(); j != i->second.end(); ++j) { - clone->myRouters[i->first].push_back(static_cast((*j)->clone())); - } - } - return clone; - } - - - bool 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()); - int index = 0; - int numIntervals = 1; -#ifdef HAVE_FOX - if (myMaxNumInstances >= 2 && myEnd < std::numeric_limits::max()) { - index = (int)((msTime - myBegin) / myWeightPeriod); - numIntervals = (int)((myEnd - myBegin) / myWeightPeriod); - if (numIntervals > 0) { - while ((int)myThreadPool.size() < myMaxNumInstances) { - new FXWorkerThread(myThreadPool); - } - } else { - // this covers the cases of negative (unset) end time and unset weight period (no weight file) - numIntervals = 1; - } - } -#endif - 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 - for (int i = 0; i < numIntervals; i++) { - myRouters[svc].push_back(new CHRouterType( - myEdges, myIgnoreErrors, &E::getTravelTimeStatic, svc.first, myWeightPeriod, false)); -#ifdef HAVE_FOX - if (myThreadPool.size() > 0) { - myThreadPool.add(new ComputeHierarchyTask(myRouters[svc].back(), vehicle, myBegin + i * myWeightPeriod)); - } -#endif - } -#ifdef HAVE_FOX - if (myThreadPool.size() > 0) { - myThreadPool.waitAll(); - } -#endif - } - return myRouters[svc][index]->compute(from, to, vehicle, msTime, into); - } - - -private: - typedef CHRouter > CHRouterType; - -#ifdef HAVE_FOX -private: - class ComputeHierarchyTask : public FXWorkerThread::Task { - public: - ComputeHierarchyTask(CHRouterType* router, const V* const vehicle, const SUMOTime msTime) - : myRouter(router), myVehicle(vehicle), myStartTime(msTime) {} - void run(FXWorkerThread* /* context */) { - myRouter->buildContractionHierarchy(myStartTime, myVehicle); - } - private: - CHRouterType* myRouter; - const V* const myVehicle; - const SUMOTime myStartTime; - private: - /// @brief Invalidated assignment operator. - ComputeHierarchyTask& operator=(const ComputeHierarchyTask&); - }; - - -private: - /// @brief for multi threaded routing - FXWorkerThread::Pool myThreadPool; -#endif - -private: - typedef std::map, std::vector > RouterMap; - - RouterMap myRouters; - - /// @brief all edges with numerical ids - const std::vector& myEdges; - - const bool myIgnoreErrors; - - const SUMOTime myBegin; - const SUMOTime myEnd; - const SUMOTime myWeightPeriod; - const int myMaxNumInstances; -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/vehicle/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/vehicle/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -1,33 +1,18 @@ set(utils_vehicle_STAT_SRCS - AStarLookupTable.h - AStarRouter.h - AccessEdge.h - CarEdge.h - PedestrianEdge.h - PublicTransportEdge.h - StopEdge.h - CHBuilder.h - CHRouter.h - CHRouterWrapper.h - DijkstraRouter.h - IntermodalEdge.h - IntermodalNetwork.h - IntermodalRouter.h - IntermodalTrip.h - EffortCalculator.h - GawronCalculator.h - LogitCalculator.h - RouteCostCalculator.h - PedestrianRouter.h - RouterProvider.h - SUMOAbstractRouter.h - SPTree.h + SUMORouteHandler.cpp + SUMORouteHandler.h + SUMORouteLoader.cpp + SUMORouteLoader.h + SUMORouteLoaderControl.cpp + SUMORouteLoaderControl.h SUMOVehicle.h + SUMOTrafficObject.h SUMOVehicleParameter.cpp SUMOVehicleParameter.h + SUMOVehicleParserHelper.cpp + SUMOVehicleParserHelper.h SUMOVTypeParameter.cpp - SUMOVTypeParameter.h -) + SUMOVTypeParameter.h) add_library(utils_vehicle STATIC ${utils_vehicle_STAT_SRCS}) set_property(TARGET utils_vehicle PROPERTY PROJECT_LABEL "z_utils_vehicle") diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/DijkstraRouter.h sumo-1.2.0+dfsg1/src/utils/vehicle/DijkstraRouter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/DijkstraRouter.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/DijkstraRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,275 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file DijkstraRouter.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 25 July 2005 -/// @version $Id$ -/// -// Dijkstra shortest path algorithm using travel time or other values -/****************************************************************************/ -#ifndef DijkstraRouter_h -#define DijkstraRouter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "EffortCalculator.h" -#include "SUMOAbstractRouter.h" - -//#define DijkstraRouter_DEBUG_QUERY -//#define DijkstraRouter_DEBUG_QUERY_PERF - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class DijkstraRouter - * @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 BASE The base class to use (SUMOAbstractRouterPermissions/SUMOAbstractRouter) - * - * 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 DijkstraRouter : public BASE { -public: - /** - * @class EdgeInfoByEffortComparator - * Class to compare (and so sort) nodes by their effort - */ - class EdgeInfoByEffortComparator { - public: - /// Comparing method - bool operator()(const typename BASE::EdgeInfo* nod1, const typename BASE::EdgeInfo* nod2) const { - if (nod1->effort == nod2->effort) { - return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); - } - return nod1->effort > nod2->effort; - } - }; - - - /// Constructor - DijkstraRouter(const std::vector& edges, bool unbuildIsWarning, typename BASE::Operation effortOperation, - typename BASE::Operation ttOperation = nullptr, bool silent = false, EffortCalculator* calc = nullptr) : - BASE("DijkstraRouter", effortOperation, ttOperation), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), - mySilent(silent), myExternalEffort(calc) { - for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - myEdgeInfos.push_back(typename BASE::EdgeInfo(*i)); - } - } - - /// Destructor - virtual ~DijkstraRouter() { } - - virtual SUMOAbstractRouter* clone() { - return new DijkstraRouter(myEdgeInfos, myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, this->myTTOperation, mySilent, myExternalEffort); - } - - void init() { - // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up - for (auto& edgeInfo : myFrontierList) { - edgeInfo->reset(); - } - myFrontierList.clear(); - for (auto& edgeInfo : myFound) { - edgeInfo->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 bool compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) { - assert(from != 0 && (vehicle == 0 || to != 0)); - // check whether from and to can be used - if (this->isProhibited(from, vehicle)) { - myErrorMsgHandler->inform("Vehicle '" + vehicle->getID() + "' is not allowed on source edge '" + from->getID() + "'."); - return false; - } - if (this->isProhibited(to, vehicle)) { - myErrorMsgHandler->inform("Vehicle '" + vehicle->getID() + "' is not allowed on destination edge '" + to->getID() + "'."); - return false; - } - this->startQuery(); -#ifdef DijkstraRouter_DEBUG_QUERY - std::cout << "DEBUG: starting search for '" << vehicle->getID() << "' time: " << STEPS2TIME(msTime) << "\n"; -#endif - const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); - if (this->myBulkMode) { - const auto& toInfo = myEdgeInfos[to->getNumericalID()]; - if (toInfo.visited) { - buildPathFrom(&toInfo, into); - this->endQuery(1); - return true; - } - } else { - init(); - // add begin node - auto* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); - fromInfo->effort = 0.; - fromInfo->prev = nullptr; - 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 - auto* const minimumInfo = myFrontierList.front(); - const E* const minEdge = minimumInfo->edge; -#ifdef DijkstraRouter_DEBUG_QUERY - std::cout << "DEBUG: hit '" << minEdge->getID() << "' Eff: " << minimumInfo->effort << ", Leave: " << minimumInfo->leaveTime << " Q: "; - for (auto& it : myFrontierList) { - std::cout << it->effort << "," << 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 DijkstraRouter_DEBUG_QUERY_PERF - std::cout << "visited " + toString(num_visited) + " edges (final path length=" + toString(into.size()) + " edges=" + toString(into) + ")\n"; -#endif - return true; - } - pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - myFrontierList.pop_back(); - myFound.push_back(minimumInfo); - minimumInfo->visited = true; - const E* viaEdge = minimumInfo->via; - double effort = minimumInfo->effort; - double leaveTime = minimumInfo->leaveTime; - while (viaEdge != nullptr && viaEdge->isInternal()) { - const double viaEffortDelta = this->getEffort(viaEdge, vehicle, leaveTime); - leaveTime += this->getTravelTime(viaEdge, vehicle, leaveTime, viaEffortDelta); - effort += viaEffortDelta; - viaEdge = viaEdge->getViaSuccessors().front().first; - } - const double effortDelta = this->getEffort(minEdge, vehicle, leaveTime); - leaveTime += this->getTravelTime(minEdge, vehicle, minimumInfo->leaveTime, effortDelta); - effort += effortDelta; - if (myExternalEffort != nullptr) { - myExternalEffort->update(minEdge->getNumericalID(), minimumInfo->prev->edge->getNumericalID(), minEdge->getLength()); - } - assert(effort >= minimumInfo->effort); - assert(leaveTime >= minimumInfo->leaveTime); - // check all ways from the node with the minimal length - for (const std::pair& follower : minEdge->getViaSuccessors(vClass)) { - auto* const followerInfo = &(myEdgeInfos[follower.first->getNumericalID()]); - // check whether it can be used - if (this->isProhibited(follower.first, vehicle)) { - continue; - } - const double oldEffort = followerInfo->effort; - if (!followerInfo->visited && effort < oldEffort) { - followerInfo->effort = effort; - followerInfo->leaveTime = leaveTime; - followerInfo->prev = minimumInfo; - followerInfo->via = follower.second; - 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 DijkstraRouter_DEBUG_QUERY_PERF - std::cout << "visited " + toString(num_visited) + " edges (unsuccessful path length: " + toString(into.size()) + ")\n"; -#endif - if (to != 0 && !mySilent) { - myErrorMsgHandler->inform("No connection between edge '" + from->getID() + "' and edge '" + to->getID() + "' found."); - } - return false; - } - - - /// Builds the path from marked edges - void buildPathFrom(const typename BASE::EdgeInfo* rbegin, std::vector& edges) { - std::vector tmp; - while (rbegin != 0) { - tmp.push_back(rbegin->edge); - rbegin = rbegin->prev; - } - std::copy(tmp.rbegin(), tmp.rend(), std::back_inserter(edges)); - } - - const typename BASE::EdgeInfo& getEdgeInfo(int index) const { - return myEdgeInfos[index]; - } - -private: - DijkstraRouter(const std::vector& edgeInfos, bool unbuildIsWarning, - typename BASE::Operation effortOperation, typename BASE::Operation ttOperation, bool silent, EffortCalculator* calc) : - BASE("DijkstraRouter", effortOperation, ttOperation), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), - mySilent(silent), - myExternalEffort(calc) { - for (const auto& edgeInfo : edgeInfos) { - myEdgeInfos.push_back(typename BASE::EdgeInfo(edgeInfo.edge)); - } - } - -private: - /// @brief the handler for routing errors - MsgHandler* const myErrorMsgHandler; - - /// @brief whether to supress warning/error if no route was found - bool mySilent; - - EffortCalculator* const myExternalEffort; - - /// 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; -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/EffortCalculator.h sumo-1.2.0+dfsg1/src/utils/vehicle/EffortCalculator.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/EffortCalculator.h 2018-08-21 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/EffortCalculator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file EffortCalculator.h -/// @author Michael Behrisch -/// @date 2018-08-21 -/// @version $Id$ -/// -// The EffortCalculator is an interface for additional edge effort calculators -/****************************************************************************/ -#ifndef EffortCalculator_h -#define EffortCalculator_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the effort calculator interface -class EffortCalculator { -public: - virtual void init(const std::vector& edges) = 0; - virtual double getEffort(const int edge) const = 0; - virtual void update(const int edge, const int prev, const double length) = 0; -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/GawronCalculator.h sumo-1.2.0+dfsg1/src/utils/vehicle/GawronCalculator.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/GawronCalculator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/GawronCalculator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file GawronCalculator.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date Sept 2002 -/// @version $Id$ -/// -// Calculators for route costs and probabilities -/****************************************************************************/ -#ifndef GawronCalculator_h -#define GawronCalculator_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GawronCalculator - * @brief Cost calculation with Gawron's method. - */ -template -class GawronCalculator : public RouteCostCalculator { -public: - /// Constructor - GawronCalculator(const double beta, const double a) : myBeta(beta), myA(a) {} - - /// Destructor - virtual ~GawronCalculator() {} - - void setCosts(R* route, const double costs, const bool isActive = false) const { - if (isActive) { - route->setCosts(costs); - } else { - route->setCosts(myBeta * costs + ((double) 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 double delta = - (pS->getCosts() - pR->getCosts()) / - (pS->getCosts() + pR->getCosts()); - // see [Gawron, 1998] (4.3a, 4.3b) - double newPR = gawronF(pR->getProbability(), pS->getProbability(), delta); - double newPS = pR->getProbability() + pS->getProbability() - newPR; - if (ISNAN(newPR) || ISNAN(newPS)) { - newPR = pS->getCosts() > pR->getCosts() - ? (double) 1. : 0; - newPS = pS->getCosts() > pR->getCosts() - ? 0 : (double) 1.; - } - newPR = MIN2((double) MAX2(newPR, (double) 0), (double) 1); - newPS = MIN2((double) MAX2(newPS, (double) 0), (double) 1); - pR->setProbability(newPR); - pS->setProbability(newPS); - } - } - } - -private: - /** @brief Performs the gawron - f() function - From "Dynamic User Equilibria..." */ - double gawronF(const double pdr, const double pds, const double 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..." */ - double gawronG(const double a, const double x) const { - if (((1.0 - (x * x)) == 0)) { - return std::numeric_limits::max(); - } - return (double) exp((a * x) / (1.0 - (x * x))); - } - -private: - /// @brief gawron beta - value - const double myBeta; - - /// @brief gawron a - value - const double myA; - -private: - /** @brief invalidated assignment operator */ - GawronCalculator& operator=(const GawronCalculator& s); - -}; -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalEdge.h sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalEdge.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalEdge.h 2018-12-12 23:00:32.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalEdge.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,206 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file IntermodalEdge.h -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Robert Hilbrich -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The Edge definition for the Intermodal Router -/****************************************************************************/ -#ifndef IntermodalEdge_h -#define IntermodalEdge_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include "IntermodalTrip.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the base edge type that is given to the internal router (SUMOAbstractRouter) -template -class IntermodalEdge : public Named { -public: - IntermodalEdge(const std::string id, int numericalID, const E* edge, const std::string& line, const double length = 0.) : - Named(id), - myNumericalID(numericalID), - myEdge(edge), - myLine(line), - myLength(edge == nullptr || length > 0. ? length : edge->getLength()), - myEfforts(nullptr) { } - - virtual ~IntermodalEdge() {} - - virtual bool includeInRoute(bool /* allEdges */) const { - return false; - } - - inline const std::string& getLine() const { - return myLine; - } - - inline const E* getEdge() const { - return myEdge; - } - - int getNumericalID() const { - return myNumericalID; - } - - void addSuccessor(IntermodalEdge* const s, IntermodalEdge* const via = nullptr) { - myFollowingEdges.push_back(s); - myFollowingViaEdges.push_back(std::make_pair(s, via)); - } - - void transferSuccessors(IntermodalEdge* to) { - to->myFollowingEdges = myFollowingEdges; - to->myFollowingViaEdges = myFollowingViaEdges; - myFollowingEdges.clear(); - myFollowingViaEdges.clear(); - } - - void removeSuccessor(const IntermodalEdge* const edge) { - myFollowingEdges.erase(std::find(myFollowingEdges.begin(), myFollowingEdges.end(), edge)); - for (auto it = myFollowingViaEdges.begin(); it != myFollowingViaEdges.end();) { - if (it->first == edge) { - it = myFollowingViaEdges.erase(it); - } else { - ++it; - } - } - } - - virtual const std::vector& getSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { - UNUSED_PARAMETER(vClass); - // the network is already tailored. No need to check for permissions here - return myFollowingEdges; - } - - virtual const std::vector >& getViaSuccessors(SUMOVehicleClass vClass = SVC_IGNORING) const { - UNUSED_PARAMETER(vClass); - // the network is already tailored. No need to check for permissions here - return myFollowingViaEdges; - } - - virtual bool prohibits(const IntermodalTrip* const /* trip */) const { - return false; - } - - virtual double getTravelTime(const IntermodalTrip* const /* trip */, double /* time */) const { - return 0.; - } - - /// @brief get intended vehicle id and departure time of next public transport ride - virtual double getIntended(const double /* time */, std::string& /* intended */) const { - return 0.; - } - - static inline double getTravelTimeStatic(const IntermodalEdge* const edge, const IntermodalTrip* const trip, double time) { - return edge == nullptr ? 0. : edge->getTravelTime(trip, time); - } - - virtual double getEffort(const IntermodalTrip* const /* trip */, double /* time */) const { - return 0.; - } - - static inline double getEffortStatic(const IntermodalEdge* const edge, const IntermodalTrip* const trip, double time) { - return edge == nullptr || !edge->hasEffort() ? 0. : edge->getEffort(trip, time); - } - - inline double getLength() const { - return myLength; - } - - inline void setLength(const double length) { - myLength = length; - } - - inline bool isInternal() const { - return myEdge != nullptr && myEdge->isInternal(); - } - - virtual bool hasEffort() const { - return myEfforts != nullptr; - } - - virtual double getStartPos() const { - return 0.; - } - - virtual double getEndPos() const { - return myLength; - } - - // only used by AStar - inline double getSpeedLimit() const { - return myEdge != nullptr ? myEdge->getSpeedLimit() : 200. / 3.6; - } - - // only used by AStar - inline double getLengthGeometryFactor() const { - return myEdge != nullptr ? myEdge->getLengthGeometryFactor() : 1; - } - - // only used by AStar - inline double getDistanceTo(const IntermodalEdge* other) const { - return myEdge != nullptr && other->myEdge != nullptr ? myEdge->getDistanceTo(other->myEdge, true) : 0.; - } - - // only used by AStar - inline double getMinimumTravelTime(const IntermodalTrip* const trip) const { - return myLength / trip->getMaxSpeed(); - } - -protected: - /// @brief List of edges that may be approached from this edge - std::vector myFollowingEdges; - - /// @brief List of edges that may be approached from this edge with optional internal vias - std::vector > myFollowingViaEdges; - -private: - /// @brief the index in myEdges - const int myNumericalID; - - /// @brief the original edge - const E* const myEdge; - - /// @brief public transport line or ped vs car - const std::string myLine; - - /// @brief adaptable length (for splitted edges) - double myLength; - - /// @brief Container for passing effort varying over time for the edge - ValueTimeLine* myEfforts; - -private: - /// @brief Invalidated copy constructor - IntermodalEdge(const IntermodalEdge& src); - - /// @brief Invalidated assignment operator - IntermodalEdge& operator=(const IntermodalEdge& src); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalNetwork.h sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalNetwork.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalNetwork.h 2018-10-24 22:01:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalNetwork.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,718 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file IntermodalNetwork.h -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Robert Hilbrich -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The Edge definition for the Intermodal Router -/****************************************************************************/ -#ifndef IntermodalNetwork_h -#define IntermodalNetwork_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "AccessEdge.h" -#include "CarEdge.h" -#include "IntermodalEdge.h" -#include "PedestrianEdge.h" -#include "PublicTransportEdge.h" -#include "StopEdge.h" -#include "SUMOVehicleParameter.h" - -//#define IntermodalRouter_DEBUG_NETWORK - - -// =========================================================================== -// function definitions -// =========================================================================== -template -inline const L* getSidewalk(const E* edge) { - if (edge == nullptr) { - return nullptr; - } - // prefer lanes that are exclusive to pedestrians - const std::vector& lanes = edge->getLanes(); - for (const L* const lane : lanes) { - if (lane->getPermissions() == SVC_PEDESTRIAN) { - return lane; - } - } - for (const L* const lane : lanes) { - if (lane->allowsVehicleClass(SVC_PEDESTRIAN)) { - return lane; - } - } - return nullptr; -} - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the intermodal network storing edges, connections and the mappings to the "real" edges -template -class IntermodalNetwork { -private: - typedef IntermodalEdge _IntermodalEdge; - typedef AccessEdge _AccessEdge; - typedef PedestrianEdge _PedestrianEdge; - typedef PublicTransportEdge _PTEdge; - typedef std::pair<_IntermodalEdge*, _IntermodalEdge*> EdgePair; - -public: - /** @brief where mode changes are possible - */ - enum ModeChangeOptions { - /// @brief parking areas - PARKING_AREAS = 1, - /// @brief public transport stops and access - PT_STOPS = 2, - /// @brief junctions with edges allowing the additional mode - ALL_JUNCTIONS = 4 - }; - - /* @brief build the pedestrian part of the intermodal network (once) - * @param edges The list of MSEdge or ROEdge to build from - * @param numericalID the start number for the creation of new edges - */ - IntermodalNetwork(const std::vector& edges, const bool pedestrianOnly, const int carWalkTransfer = 0) - : myNumericalID(0), myCarWalkTransfer(carWalkTransfer) { -#ifdef IntermodalRouter_DEBUG_NETWORK - std::cout << "initIntermodalNetwork\n"; -#endif - // build the pedestrian edges and the depart / arrival connectors with lookup tables - bool haveSeenWalkingArea = false; - for (const E* const edge : edges) { - if (edge->isTazConnector()) { - continue; - } - const L* lane = getSidewalk(edge); - if (lane != 0) { - if (edge->isWalkingArea()) { - // only a single edge - addEdge(new _PedestrianEdge(myNumericalID++, edge, lane, true)); - myBidiLookup[edge] = std::make_pair(myEdges.back(), myEdges.back()); - myDepartLookup[edge].push_back(myEdges.back()); - myArrivalLookup[edge].push_back(myEdges.back()); - haveSeenWalkingArea = true; - } else { // regular edge or crossing - // forward and backward edges - addEdge(new _PedestrianEdge(myNumericalID++, edge, lane, true)); - addEdge(new _PedestrianEdge(myNumericalID++, edge, lane, false)); - myBidiLookup[edge] = std::make_pair(myEdges[myNumericalID - 2], myEdges.back()); - } - } - if (!edge->isWalkingArea()) { - // depart and arrival edges (the router can decide the initial direction to take and the direction to arrive from) - _IntermodalEdge* const departConn = new _IntermodalEdge(edge->getID() + "_depart_connector", myNumericalID++, edge, "!connector"); - _IntermodalEdge* const arrivalConn = new _IntermodalEdge(edge->getID() + "_arrival_connector", myNumericalID++, edge, "!connector"); - addConnectors(departConn, arrivalConn, 0); - } - } - - // build the walking connectors if there are no walking areas - for (const E* const edge : edges) { - if (edge->isTazConnector() || edge->isInternal()) { - continue; - } - if (haveSeenWalkingArea) { - // connectivity needs to be ensured only in the real intermodal case, for simple pedestrian routing we don't have connectors if we have walking areas - if (!pedestrianOnly && getSidewalk(edge) == nullptr) { - const N* const node = edge->getToJunction(); - if (myWalkingConnectorLookup.count(node) == 0) { - addEdge(new _IntermodalEdge(node->getID() + "_walking_connector", myNumericalID++, nullptr, "!connector")); - myWalkingConnectorLookup[node] = myEdges.back(); - } - } - } else { - for (const N* const node : { - edge->getFromJunction(), edge->getToJunction() - }) { - if (myWalkingConnectorLookup.count(node) == 0) { - addEdge(new _IntermodalEdge(node->getID() + "_walking_connector", myNumericalID++, nullptr, "!connector")); - myWalkingConnectorLookup[node] = myEdges.back(); - } - } - } - } - // build the connections - for (const E* const edge : edges) { - const L* const sidewalk = getSidewalk(edge); - if (sidewalk == nullptr) { - continue; - } - // find all incoming and outgoing lanes for the sidewalk and - // connect the corresponding IntermodalEdges - const EdgePair& pair = getBothDirections(edge); -#ifdef IntermodalRouter_DEBUG_NETWORK - std::cout << " building connections from " << sidewalk->getID() << "\n"; -#endif - if (haveSeenWalkingArea) { - const std::vector > outgoing = sidewalk->getOutgoingViaLanes(); - // if one of the outgoing lanes is a walking area it must be used. - // All other connections shall be ignored - // if it has no outgoing walking area, it probably is a walking area itself - bool hasWalkingArea = false; - for (const auto& target : outgoing) { - if (target.first->getEdge().isWalkingArea()) { - hasWalkingArea = true; - break; - } - } - for (const auto& target : outgoing) { - const E* const targetEdge = &(target.first->getEdge()); - const bool used = (target.first == getSidewalk(targetEdge) - && (!hasWalkingArea || targetEdge->isWalkingArea())); -#ifdef IntermodalRouter_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->addSuccessor(targetPair.first); - targetPair.second->addSuccessor(pair.second); -#ifdef IntermodalRouter_DEBUG_NETWORK - std::cout << " " << pair.first->getID() << " -> " << targetPair.first->getID() << "\n"; - std::cout << " " << targetPair.second->getID() << " -> " << pair.second->getID() << "\n"; -#endif - } - } - } - // We may have a network without pedestrian structures or a car-only edge. - // In the first case we assume that all sidewalks at a junction are interconnected, - // in the second we connect all car-only edges to all sidewalks. - _IntermodalEdge* const toNodeConn = myWalkingConnectorLookup[edge->getToJunction()]; - if (toNodeConn != nullptr) { - // Check for the outgoing vias and use the shortest one as an approximation - const std::vector > outgoing = sidewalk->getOutgoingViaLanes(); - double minViaLength = std::numeric_limits::max(); - const E* minVia = nullptr; - for (const auto& target : outgoing) { - if (target.second != nullptr && target.second->getLength() < minViaLength) { - minViaLength = target.second->getLength(); - minVia = target.second; - } - } - EdgePair interVia = std::make_pair(nullptr, nullptr); - if (minVia != nullptr) { - const auto it = myBidiLookup.find(minVia); - if (it != myBidiLookup.end()) { - interVia = it->second; - } - } - if (!haveSeenWalkingArea) { - // if we have walking areas we should use them and not the connector - pair.first->addSuccessor(toNodeConn, interVia.first); - } - toNodeConn->addSuccessor(pair.second, interVia.second); - } - _IntermodalEdge* const fromNodeConn = myWalkingConnectorLookup[edge->getFromJunction()]; - if (fromNodeConn != nullptr) { - if (!haveSeenWalkingArea) { - pair.second->addSuccessor(fromNodeConn); - } - fromNodeConn->addSuccessor(pair.first); - } - if (!edge->isWalkingArea()) { - // build connections from depart connector - _IntermodalEdge* startConnector = getDepartConnector(edge); - startConnector->addSuccessor(pair.first); - startConnector->addSuccessor(pair.second); - // build connections to arrival connector - _IntermodalEdge* endConnector = getArrivalConnector(edge); - pair.first->addSuccessor(endConnector); - pair.second->addSuccessor(endConnector); - } -#ifdef IntermodalRouter_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 - } - } - - ~IntermodalNetwork() { - for (typename std::vector<_IntermodalEdge*>::iterator it = myEdges.begin(); it != myEdges.end(); ++it) { - delete *it; - } - } - - void addEdge(_IntermodalEdge* edge) { - while ((int)myEdges.size() <= edge->getNumericalID()) { - myEdges.push_back(0); - } - myEdges[edge->getNumericalID()] = edge; - } - - void addConnectors(_IntermodalEdge* const depConn, _IntermodalEdge* const arrConn, const int index) { - addEdge(depConn); - addEdge(arrConn); - myDepartLookup[depConn->getEdge()].insert(myDepartLookup[depConn->getEdge()].begin() + index, depConn); - myArrivalLookup[arrConn->getEdge()].insert(myArrivalLookup[arrConn->getEdge()].begin() + index, arrConn); - } - - const std::vector<_IntermodalEdge*>& getAllEdges() { - return myEdges; - } - - /// @brief Returns the pair of forward and backward edge - const EdgePair& getBothDirections(const E* e) const { - typename std::map::const_iterator it = myBidiLookup.find(e); - if (it == myBidiLookup.end()) { - assert(false); - throw ProcessError("Edge '" + e->getID() + "' not found in intermodal network.'"); - } - return (*it).second; - } - - /// @brief Returns the departing intermodal edge - _IntermodalEdge* getDepartEdge(const E* e, const double pos) const { - typename std::map >::const_iterator it = myDepartLookup.find(e); - if (it == myDepartLookup.end()) { - throw ProcessError("Depart edge '" + e->getID() + "' not found in intermodal network."); - } - const std::vector<_IntermodalEdge*>& splitList = it->second; - typename std::vector<_IntermodalEdge*>::const_iterator splitIt = splitList.begin(); - double totalLength = 0.; - while (splitIt != splitList.end() && totalLength + (*splitIt)->getLength() < pos) { - totalLength += (*splitIt)->getLength(); - ++splitIt; - } - return *splitIt; - } - - /// @brief Returns the departing intermodal connector at the given split offset - _IntermodalEdge* getDepartConnector(const E* e, const int splitIndex = 0) const { - typename std::map >::const_iterator it = myDepartLookup.find(e); - if (it == myDepartLookup.end()) { - throw ProcessError("Depart edge '" + e->getID() + "' not found in intermodal network."); - } - if (splitIndex >= (int)it->second.size()) { - throw ProcessError("Split index " + toString(splitIndex) + " invalid for depart edge '" + e->getID() + "' ."); - } - return it->second[splitIndex]; - } - - /// @brief Returns the arriving intermodal edge - _IntermodalEdge* getArrivalEdge(const E* e, const double pos) const { - typename std::map >::const_iterator it = myArrivalLookup.find(e); - if (it == myArrivalLookup.end()) { - throw ProcessError("Arrival edge '" + e->getID() + "' not found in intermodal network."); - } - const std::vector<_IntermodalEdge*>& splitList = it->second; - typename std::vector<_IntermodalEdge*>::const_iterator splitIt = splitList.begin(); - double totalLength = 0.; - while (splitIt != splitList.end() && totalLength + (*splitIt)->getLength() < pos) { - totalLength += (*splitIt)->getLength(); - ++splitIt; - } - return *splitIt; - } - - /// @brief Returns the arriving intermodal connector at the given split offset - _IntermodalEdge* getArrivalConnector(const E* e, const int splitIndex = 0) const { - return myArrivalLookup.find(e)->second[splitIndex]; - } - - /// @brief Returns the outgoing pedestrian edge, which is either a walking area or a walking connector - _IntermodalEdge* getWalkingConnector(const E* e) const { - typename std::map::const_iterator it = myWalkingConnectorLookup.find(e->getToJunction()); - if (it == myWalkingConnectorLookup.end()) { - const L* const sidewalk = getSidewalk(e); - if (e->isInternal() || sidewalk == 0) { - return 0; - } - for (const auto& target : sidewalk->getOutgoingViaLanes()) { - if (target.first->getEdge().isWalkingArea()) { - return getBothDirections(&target.first->getEdge()).first; - } - } - return 0; - } - return it->second; - } - - void addCarEdges(const std::vector& edges) { - for (const E* const edge : edges) { - if (edge->getFunction() == EDGEFUNC_NORMAL || edge->getFunction() == EDGEFUNC_INTERNAL) { - myCarLookup[edge] = new CarEdge(myNumericalID++, edge); - addEdge(myCarLookup[edge]); - } - } - for (const auto& edgePair : myCarLookup) { - _IntermodalEdge* const carEdge = edgePair.second; - for (const auto& suc : edgePair.first->getViaSuccessors()) { - _IntermodalEdge* const sucCarEdge = getCarEdge(suc.first); - _IntermodalEdge* const sucViaEdge = getCarEdge(suc.second); - if (sucCarEdge != nullptr) { - carEdge->addSuccessor(sucCarEdge, sucViaEdge); - } - } - if ((myCarWalkTransfer & ALL_JUNCTIONS) != 0) { - _IntermodalEdge* const walkCon = getWalkingConnector(edgePair.first); - if (walkCon != 0) { - carEdge->addSuccessor(walkCon); - } else { - // we are on an edge where pedestrians are forbidden and want to continue on an arbitrary pedestrian edge - for (const E* const out : edgePair.first->getToJunction()->getOutgoing()) { - if (!out->isInternal() && !out->isTazConnector() && getSidewalk(out) != 0) { - carEdge->addSuccessor(getBothDirections(out).first); - } - } - for (const E* const in : edgePair.first->getToJunction()->getIncoming()) { - if (!in->isInternal() && !in->isTazConnector() && getSidewalk(in) != 0) { - carEdge->addSuccessor(getBothDirections(in).second); - } - } - } - } - getDepartConnector(edgePair.first)->addSuccessor(carEdge); - carEdge->addSuccessor(getArrivalConnector(edgePair.first)); - } - } - - /// @brief Returns the associated car edge - _IntermodalEdge* getCarEdge(const E* e) const { - typename std::map::const_iterator it = myCarLookup.find(e); - if (it == myCarLookup.end()) { - return nullptr; - } - return it->second; - } - - /// @brief Returns the associated stop edge - _IntermodalEdge* getStopEdge(const std::string& stopId) const { - auto it = myStopConnections.find(stopId); - if (it == myStopConnections.end()) { - return 0; - } - return it->second; - } - - /** @brief Adds access edges for stopping places to the intermodal network - * - * This method creates an intermodal stop edge to represent the stopping place - * (if not present yet) and determines the edges which need to be splitted (usually the forward - * and the backward pedestrian edges and the car edge) and calls splitEdge for the - * actual split and the connection of the stop edge with access edges. After that it adds and adapts - * the depart and arrival connectors to the new edge(s). - * - * @param[in] stopId The id of the stop to add - * @param[in] stopEdge The edge on which the stop is located - * @param[in] pos The relative position on the edge where the stop is located - * @param[in] category The type of stop - */ - void addAccess(const std::string& stopId, const E* stopEdge, const double pos, const double length, const SumoXMLTag category) { - assert(stopEdge != 0); - if (myStopConnections.count(stopId) == 0) { - myStopConnections[stopId] = new StopEdge(stopId, myNumericalID++, stopEdge); - addEdge(myStopConnections[stopId]); - } - _IntermodalEdge* const stopConn = myStopConnections[stopId]; - const L* lane = getSidewalk(stopEdge); - if (lane != 0) { - const std::pair<_IntermodalEdge*, _IntermodalEdge*>& pair = getBothDirections(stopEdge); - double relPos; - bool needSplit; - const int splitIndex = findSplitIndex(pair.first, pos, relPos, needSplit); - _IntermodalEdge* const fwdSplit = needSplit ? new PedestrianEdge(myNumericalID++, stopEdge, lane, true, pos) : nullptr; - splitEdge(pair.first, splitIndex, fwdSplit, relPos, length, needSplit, stopConn); - _IntermodalEdge* const backSplit = needSplit ? new PedestrianEdge(myNumericalID++, stopEdge, lane, false, pos) : nullptr; - splitEdge(pair.second, splitIndex, backSplit, relPos, length, needSplit, stopConn, false); - _IntermodalEdge* carSplit = nullptr; - if (myCarLookup.count(stopEdge) > 0) { - if (needSplit) { - carSplit = new CarEdge(myNumericalID++, stopEdge, pos); - } - splitEdge(myCarLookup[stopEdge], splitIndex, carSplit, relPos, length, needSplit, stopConn, true, false); - } - if (needSplit) { - if (carSplit != nullptr && ((category == SUMO_TAG_PARKING_AREA && (myCarWalkTransfer & PARKING_AREAS) != 0) || (category == SUMO_TAG_BUS_STOP && (myCarWalkTransfer & PT_STOPS) != 0))) { - // adding access from car to walk - _IntermodalEdge* const beforeSplit = myAccessSplits[myCarLookup[stopEdge]][splitIndex]; - for (_IntermodalEdge* conn : { - fwdSplit, backSplit - }) { - _AccessEdge* access = new _AccessEdge(myNumericalID++, beforeSplit, conn, length); - addEdge(access); - beforeSplit->addSuccessor(access); - access->addSuccessor(conn); - } - } - - // fixing depart connections for the forward pedestrian, the backward pedestrian and the car edge - _IntermodalEdge* const prevDep = getDepartConnector(stopEdge, splitIndex); - const std::vector<_IntermodalEdge*>& backSplitList = myAccessSplits[pair.second]; - _IntermodalEdge* const backBeforeSplit = backSplitList[backSplitList.size() - 2 - splitIndex]; - _IntermodalEdge* const depConn = new _IntermodalEdge(stopEdge->getID() + "_depart_connector" + toString(pos), myNumericalID++, stopEdge, "!connector"); - depConn->addSuccessor(fwdSplit); - depConn->addSuccessor(backBeforeSplit); - depConn->setLength(fwdSplit->getLength()); - prevDep->removeSuccessor(backBeforeSplit); - prevDep->addSuccessor(backSplit); - prevDep->setLength(backSplit->getLength()); - if (carSplit != nullptr) { - depConn->addSuccessor(carSplit); - } - - // fixing arrival connections for the forward pedestrian, the backward pedestrian and the car edge - _IntermodalEdge* const prevArr = getArrivalConnector(stopEdge, splitIndex); - _IntermodalEdge* const fwdBeforeSplit = myAccessSplits[pair.first][splitIndex]; - _IntermodalEdge* const arrConn = new _IntermodalEdge(stopEdge->getID() + "_arrival_connector" + toString(pos), myNumericalID++, stopEdge, "!connector"); - fwdSplit->addSuccessor(arrConn); - backBeforeSplit->addSuccessor(arrConn); - arrConn->setLength(fwdSplit->getLength()); - fwdSplit->removeSuccessor(prevArr); - fwdBeforeSplit->addSuccessor(prevArr); - prevArr->setLength(backSplit->getLength()); - if (carSplit != nullptr) { - carSplit->addSuccessor(arrConn); - carSplit->removeSuccessor(prevArr); - myAccessSplits[myCarLookup[stopEdge]][splitIndex]->addSuccessor(prevArr); - } - addConnectors(depConn, arrConn, splitIndex + 1); - } - } - } - - void addSchedule(const SUMOVehicleParameter& pars, const std::vector* addStops = nullptr) { - SUMOTime lastUntil = 0; - std::vector validStops; - if (addStops != nullptr) { - // stops are part of a stand-alone route. until times are offsets from vehicle departure - for (const SUMOVehicleParameter::Stop& stop : *addStops) { - if (myStopConnections.count(stop.busstop) > 0) { - // compute stop times for the first vehicle - const SUMOTime newUntil = stop.until + pars.depart; - if (newUntil >= lastUntil) { - validStops.push_back(stop); - validStops.back().until = newUntil; - lastUntil = newUntil; - } else { - WRITE_WARNING("Ignoring unordered stop at '" + stop.busstop + "' until " + time2string(stop.until) + " for vehicle '" + pars.id + "'."); - } - } - } - } - for (const SUMOVehicleParameter::Stop& stop : pars.stops) { - // stops are part of the vehicle until times are absolute times for the first vehicle - if (myStopConnections.count(stop.busstop) > 0 && stop.until >= lastUntil) { - validStops.push_back(stop); - lastUntil = stop.until; - } else { - WRITE_WARNING("Ignoring stop at '" + stop.busstop + "' until " + time2string(stop.until) + " for vehicle '" + pars.id + "'."); - } - } - if (validStops.size() < 2) { - WRITE_WARNING("Not using public transport line '" + pars.line + "' for routing persons. It has less than two usable stops."); - return; - } - - typename std::vector<_PTEdge*>& lineEdges = myPTLines[pars.line]; - if (lineEdges.empty()) { - _IntermodalEdge* lastStop = nullptr; - Position lastPos; - SUMOTime lastTime = 0; - for (const SUMOVehicleParameter::Stop& s : validStops) { - _IntermodalEdge* currStop = myStopConnections[s.busstop]; - Position stopPos = E::getStopPosition(s); - if (lastStop != nullptr) { - _PTEdge* const newEdge = new _PTEdge(s.busstop, myNumericalID++, lastStop, currStop->getEdge(), pars.line, lastPos.distanceTo(stopPos)); - addEdge(newEdge); - newEdge->addSchedule(pars.id, lastTime, pars.repetitionNumber, pars.repetitionOffset, s.until - lastTime); - lastStop->addSuccessor(newEdge); - newEdge->addSuccessor(currStop); - lineEdges.push_back(newEdge); - } - lastTime = s.until; - lastStop = currStop; - lastPos = stopPos; - } - } else { - if (validStops.size() != lineEdges.size() + 1) { - WRITE_WARNING("Number of stops for public transport line '" + pars.line + "' does not match earlier definitions, ignoring schedule."); - return; - } - if (lineEdges.front()->getEntryStop() != myStopConnections[validStops.front().busstop]) { - WRITE_WARNING("Different stop for '" + pars.line + "' compared to earlier definitions, ignoring schedule."); - return; - } - typename std::vector<_PTEdge*>::const_iterator lineEdge = lineEdges.begin(); - typename std::vector::const_iterator s = validStops.begin() + 1; - for (; s != validStops.end(); ++s, ++lineEdge) { - if ((*lineEdge)->getSuccessors(SVC_IGNORING)[0] != myStopConnections[s->busstop]) { - WRITE_WARNING("Different stop for '" + pars.line + "' compared to earlier definitions, ignoring schedule."); - return; - } - } - SUMOTime lastTime = validStops.front().until; - if (lineEdges.front()->hasSchedule(lastTime)) { - WRITE_WARNING("Duplicate schedule for '" + pars.line + "' at time " + time2string(lastTime) + "."); - } - for (lineEdge = lineEdges.begin(), s = validStops.begin() + 1; lineEdge != lineEdges.end(); ++lineEdge, ++s) { - (*lineEdge)->addSchedule(pars.id, lastTime, pars.repetitionNumber, pars.repetitionOffset, s->until - lastTime); - lastTime = s->until; - } - } - } - - -private: - /** @brief Returns where to insert or use the split edge - * - * This method determines whether an edge needs to be split at the given position - * (if there is not already a split nearby) and returns the corresponding index in the split list. - * - * @param[in] toSplit The first edge in the split list - * @param[in] pos The relative position on the edge where the stop is located - * @param[out] relPos The relative position on the splitted edge - * @param[out] needSplit whether a new split is needed or we reuse an exisiting one - * @return the index in the split list where the split edge needs to be added or reused - */ - int findSplitIndex(_IntermodalEdge* const toSplit, const double pos, double& relPos, bool& needSplit) { - relPos = pos; - needSplit = true; - int splitIndex = 0; - std::vector<_IntermodalEdge*>& splitList = myAccessSplits[toSplit]; - if (!splitList.empty()) { - for (const _IntermodalEdge* const split : splitList) { - if (relPos < split->getLength() + POSITION_EPS) { - break; - } - relPos -= split->getLength(); - splitIndex++; - } - assert(splitIndex < (int)splitList.size()); - if (splitIndex + 1 < (int)splitList.size() && fabs(relPos - splitList[splitIndex]->getLength()) < POSITION_EPS) { - needSplit = false; - } - } - return splitIndex; - } - - /** @brief Splits an edge (if necessary) and connects it to a stopping edge - * - * This method determines whether an edge needs to be split at the given position - * (if there is not already a split nearby) and connects the stop edge via new access edges. - * - * @param[in] toSplit The first edge in the split list - * @param[in] afterSplit The edge to add if a split is performed - * @param[in] pos The relative position on the edge where the stop is located - * @param[in] stopConn The stop edge to connect to - * @param[in] forward whether we are aplitting a forward edge (backward edges get different names) - * @param[in] addExit whether we can just enter the stop or exit as well (cars should not exit yet) - */ - void splitEdge(_IntermodalEdge* const toSplit, int splitIndex, - _IntermodalEdge* afterSplit, const double relPos, const double length, const bool needSplit, - _IntermodalEdge* const stopConn, const bool forward = true, const bool addExit = true) { - std::vector<_IntermodalEdge*>& splitList = myAccessSplits[toSplit]; - if (splitList.empty()) { - splitList.push_back(toSplit); - } - if (!forward) { - splitIndex = (int)splitList.size() - 1 - splitIndex; - if (!needSplit) { - splitIndex--; - } - } - _IntermodalEdge* beforeSplit = splitList[splitIndex]; - if (needSplit) { - addEdge(afterSplit); - beforeSplit->transferSuccessors(afterSplit); - beforeSplit->addSuccessor(afterSplit); - if (forward) { - afterSplit->setLength(beforeSplit->getLength() - relPos); - beforeSplit->setLength(relPos); - } else { - afterSplit->setLength(relPos); - beforeSplit->setLength(beforeSplit->getLength() - relPos); - // rename backward edges for easier referencing - const std::string newID = beforeSplit->getID(); - beforeSplit->setID(afterSplit->getID()); - afterSplit->setID(newID); - } - splitList.insert(splitList.begin() + splitIndex + 1, afterSplit); - } else { - // don't split, use the present split edges - afterSplit = splitList[splitIndex + 1]; - } - // add access to / from edge - _AccessEdge* access = new _AccessEdge(myNumericalID++, beforeSplit, stopConn, length); - addEdge(access); - beforeSplit->addSuccessor(access); - access->addSuccessor(stopConn); - if (addExit) { - // pedestrian case only, exit from public to pedestrian - _AccessEdge* exit = new _AccessEdge(myNumericalID++, stopConn, afterSplit, length); - addEdge(exit); - stopConn->addSuccessor(exit); - exit->addSuccessor(afterSplit); - } - } - - -private: - /// @brief the edge dictionary - std::vector<_IntermodalEdge*> myEdges; - - /// @brief retrieve the forward and backward edge for the given input edge E - std::map myBidiLookup; - - /// @brief retrieve the depart edges for the given input edge E - std::map > myDepartLookup; - - /// @brief retrieve the arrival edges for the given input edge E - std::map > myArrivalLookup; - - /// @brief the walking connector edge (fake walking area) - std::map myWalkingConnectorLookup; - - /// @brief retrieve the car edge for the given input edge E - std::map myCarLookup; - - /// @brief retrieve the public transport edges for the given line - std::map > myPTLines; - - /// @brief retrieve the representing edge for the given stopping place - std::map myStopConnections; - - /// @brief retrieve the splitted edges for the given "original" - std::map<_IntermodalEdge*, std::vector<_IntermodalEdge*> > myAccessSplits; - - int myNumericalID; - const int myCarWalkTransfer; - -private: - /// @brief Invalidated assignment operator - IntermodalNetwork& operator=(const IntermodalNetwork& s); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalRouter.h sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalRouter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalRouter.h 2018-09-23 22:00:20.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,294 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file IntermodalRouter.h -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The IntermodalRouter builds a special network and (delegates to a SUMOAbstractRouter) -/****************************************************************************/ -#ifndef IntermodalRouter_h -#define IntermodalRouter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include "SUMOAbstractRouter.h" -#include "DijkstraRouter.h" -#include "AStarRouter.h" -#include "IntermodalNetwork.h" -#include "EffortCalculator.h" -#include "CarEdge.h" -#include "StopEdge.h" -#include "PedestrianRouter.h" - -//#define IntermodalRouter_DEBUG_ROUTES - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class IntermodalRouter - * The router for pedestrians (on a bidirectional network of sidewalks and crossings) - */ -template -class IntermodalRouter : public SUMOAbstractRouter > { -public: - typedef IntermodalNetwork Network; - -private: - typedef void(*CreateNetCallback)(IntermodalRouter &); - typedef IntermodalEdge _IntermodalEdge; - typedef IntermodalTrip _IntermodalTrip; - typedef SUMOAbstractRouterPermissions<_IntermodalEdge, _IntermodalTrip> _InternalRouter; - typedef DijkstraRouter<_IntermodalEdge, _IntermodalTrip, _InternalRouter> _InternalDijkstra; - typedef AStarRouter<_IntermodalEdge, _IntermodalTrip, _InternalRouter> _InternalAStar; - -public: - struct TripItem { - TripItem(const std::string& _line = "") : - line(_line), intended(_line), depart(-1), traveltime(0.), cost(0.) {} - std::string line; - std::string vType; - std::string destStop; - std::string intended; // intended public transport vehicle id - double depart; // intended public transport departure - std::vector edges; - double traveltime; - double cost; - double length; - double departPos; - double arrivalPos; - std::string description; - }; - - /// Constructor - IntermodalRouter(CreateNetCallback callback, const int carWalkTransfer, const std::string& routingAlgorithm, - const int routingMode = 0, EffortCalculator* calc = nullptr) : - SUMOAbstractRouter("IntermodalRouter"), - myAmClone(false), myInternalRouter(nullptr), myIntermodalNet(nullptr), - myCallback(callback), myCarWalkTransfer(carWalkTransfer), myRoutingAlgorithm(routingAlgorithm), - myRoutingMode(routingMode), myExternalEffort(calc) { - } - - /// Destructor - virtual ~IntermodalRouter() { - delete myInternalRouter; - if (!myAmClone) { - delete myIntermodalNet; - } - } - - SUMOAbstractRouter* clone() { - createNet(); - return new IntermodalRouter(myIntermodalNet, myCarWalkTransfer, myRoutingAlgorithm, myRoutingMode, myExternalEffort); - } - - /** @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 */ - bool compute(const E* from, const E* to, const double departPos, const double arrivalPos, - const std::string stopID, const double speed, - const V* const vehicle, const SVCPermissions modeSet, const SUMOTime msTime, - std::vector& into, const double externalFactor = 0.) { - createNet(); - _IntermodalTrip trip(from, to, departPos, arrivalPos, speed, msTime, 0, vehicle, modeSet, myExternalEffort, externalFactor); - std::vector intoEdges; - const bool success = myInternalRouter->compute(myIntermodalNet->getDepartEdge(from, trip.departPos), - stopID != "" ? myIntermodalNet->getStopEdge(stopID) : myIntermodalNet->getArrivalEdge(to, trip.arrivalPos), - &trip, msTime, intoEdges); - if (success) { - std::string lastLine = ""; - double time = STEPS2TIME(msTime); - double effort = 0.; - double length = 0.; - const _IntermodalEdge* prev = nullptr; - for (const _IntermodalEdge* iEdge : intoEdges) { - if (iEdge->includeInRoute(false)) { - if (iEdge->getLine() == "!stop") { - into.back().destStop = iEdge->getID(); - if (lastLine == "!ped") { - lastLine = ""; // a stop always starts a new trip item - } - } else { - if (iEdge->getLine() != lastLine) { - lastLine = iEdge->getLine(); - if (lastLine == "!car") { - into.push_back(TripItem(vehicle->getID())); - into.back().vType = vehicle->getParameter().vtypeid; - } else if (lastLine == "!ped") { - into.push_back(TripItem()); - } else { - into.push_back(TripItem(lastLine)); - into.back().depart = iEdge->getIntended(time, into.back().intended); - } - into.back().departPos = iEdge->getStartPos(); - } - if (into.back().edges.empty() || into.back().edges.back() != iEdge->getEdge()) { - into.back().edges.push_back(iEdge->getEdge()); - into.back().arrivalPos = iEdge->getEndPos(); - } - } - } - const double prevTime = time, prevEffort = effort, prevLength = length; - myInternalRouter->updateViaCost(prev, iEdge, &trip, time, effort, length); - prev = iEdge; - if (!into.empty()) { - into.back().traveltime += time - prevTime; - into.back().cost += effort - prevEffort; - into.back().length += length - prevLength; - } - } - } -#ifdef IntermodalRouter_DEBUG_ROUTES - double time = STEPS2TIME(msTime); - for (const _IntermodalEdge* iEdge : intoEdges) { - const double edgeEffort = myInternalRouter->getEffort(iEdge, &trip, time); - time += edgeEffort; - std::cout << iEdge->getID() << "(" << iEdge->getLine() << "): " << edgeEffort << std::endl; - } - std::cout << TIME2STEPS(msTime) << " trip from " << from->getID() << " to " << (to != nullptr ? to->getID() : stopID) - << " departPos=" << trip.departPos - << " arrivalPos=" << trip.arrivalPos - << " edges=" << toString(intoEdges) -// << " resultEdges=" << toString(into) - << " time=" << time - << "\n"; -#endif - return success; - } - - /** @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 */ - bool compute(const E*, const E*, const _IntermodalTrip* const, - SUMOTime, std::vector&) { - throw ProcessError("Do not use this method"); - } - - void prohibit(const std::vector& toProhibit) { - createNet(); - std::vector<_IntermodalEdge*> toProhibitPE; - for (typename std::vector::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) { - toProhibitPE.push_back(myIntermodalNet->getBothDirections(*it).first); - toProhibitPE.push_back(myIntermodalNet->getBothDirections(*it).second); - toProhibitPE.push_back(myIntermodalNet->getCarEdge(*it)); - } - myInternalRouter->prohibit(toProhibitPE); - } - - void writeNetwork(OutputDevice& dev) { - createNet(); - for (_IntermodalEdge* e : myIntermodalNet->getAllEdges()) { - dev.openTag(SUMO_TAG_EDGE); - dev.writeAttr(SUMO_ATTR_ID, e->getID()); - dev.writeAttr(SUMO_ATTR_LINE, e->getLine()); - dev.writeAttr(SUMO_ATTR_LENGTH, e->getLength()); - dev.writeAttr("successors", toString(e->getSuccessors(SVC_IGNORING))); - dev.closeTag(); - } - } - - void writeWeights(OutputDevice& dev) { - createNet(); - _IntermodalTrip trip(nullptr, nullptr, 0., 0., DEFAULT_PEDESTRIAN_SPEED, 0, 0, nullptr, SVC_PASSENGER | SVC_BICYCLE | SVC_BUS); - for (_IntermodalEdge* e : myIntermodalNet->getAllEdges()) { - dev.openTag(SUMO_TAG_EDGE); - dev.writeAttr(SUMO_ATTR_ID, e->getID()); - dev.writeAttr("traveltime", e->getTravelTime(&trip, 0.)); - dev.writeAttr("effort", e->getEffort(&trip, 0.)); - dev.closeTag(); - } - } - - Network* getNetwork() const { - return myIntermodalNet; - } - -private: - IntermodalRouter(Network* net, const int carWalkTransfer, const std::string& routingAlgorithm, - const int routingMode, EffortCalculator* calc) : - SUMOAbstractRouter("IntermodalRouterClone"), myAmClone(true), - myInternalRouter(new _InternalDijkstra(net->getAllEdges(), true, &_IntermodalEdge::getTravelTimeStatic)), - myIntermodalNet(net), myCarWalkTransfer(carWalkTransfer), myRoutingAlgorithm(routingAlgorithm), myRoutingMode(routingMode), myExternalEffort(calc) {} - - static inline double getEffortAggregated(const _IntermodalEdge* const edge, const _IntermodalTrip* const trip, double time) { - return edge == nullptr || !edge->hasEffort() ? 0. : edge->getEffort(trip, time); - } - - static inline double getCombined(const _IntermodalEdge* const edge, const _IntermodalTrip* const trip, double time) { - return edge->getTravelTime(trip, time) + trip->externalFactor * trip->calc->getEffort(edge->getNumericalID()); - } - - inline void createNet() { - if (myIntermodalNet == nullptr) { - myIntermodalNet = new Network(E::getAllEdges(), false, myCarWalkTransfer); - myIntermodalNet->addCarEdges(E::getAllEdges()); - myCallback(*this); - switch (myRoutingMode) { - case 0: - if (myRoutingAlgorithm == "astar") { - myInternalRouter = new _InternalAStar(myIntermodalNet->getAllEdges(), true, &_IntermodalEdge::getTravelTimeStatic); - } else { - myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, &_IntermodalEdge::getTravelTimeStatic); - } - break; - case 1: - myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, &getEffortAggregated, &_IntermodalEdge::getTravelTimeStatic); - break; - case 2: - myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, &_IntermodalEdge::getEffortStatic, &_IntermodalEdge::getTravelTimeStatic); - break; - case 3: - if (myExternalEffort != nullptr) { - std::vector edgeIDs; - for (const auto e : myIntermodalNet->getAllEdges()) { - edgeIDs.push_back(e->getID()); - } - myExternalEffort->init(edgeIDs); - } - myInternalRouter = new _InternalDijkstra(myIntermodalNet->getAllEdges(), true, &getCombined, &_IntermodalEdge::getTravelTimeStatic, false, myExternalEffort); - break; - } - } - } - -private: - const bool myAmClone; - _InternalRouter* myInternalRouter; - Network* myIntermodalNet; - CreateNetCallback myCallback; - const int myCarWalkTransfer; - const std::string myRoutingAlgorithm; - const int myRoutingMode; - EffortCalculator* const myExternalEffort; - - -private: - /// @brief Invalidated assignment operator - IntermodalRouter& operator=(const IntermodalRouter& s); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalTrip.h sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalTrip.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/IntermodalTrip.h 2018-09-13 22:00:18.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/IntermodalTrip.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file IntermodalTrip.h -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Robert Hilbrich -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The "vehicle" definition for the Intermodal Router -/****************************************************************************/ -#ifndef IntermodalTrip_h -#define IntermodalTrip_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include - -#include "EffortCalculator.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the "vehicle" type that is given to the internal router (SUMOAbstractRouter) -template -class IntermodalTrip { -public: - IntermodalTrip(const E* _from, const E* _to, double _departPos, double _arrivalPos, - double _speed, SUMOTime _departTime, const N* _node, - const V* _vehicle = 0, const SVCPermissions _modeSet = SVC_PEDESTRIAN, - const EffortCalculator* const _calc = nullptr, const double _externalFactor = 0.) : - from(_from), - to(_to), - departPos(_departPos < 0 ? _from->getLength() + _departPos : _departPos), - arrivalPos(_arrivalPos < 0 ? _to->getLength() + _arrivalPos : _arrivalPos), - speed(_speed), - departTime(_departTime), - node(_node), - vehicle(_vehicle), - modeSet(_modeSet), - calc(_calc), - externalFactor(_externalFactor) { - } - - // exists just for debugging purposes - std::string getID() const { - return from->getID() + ":" + to->getID() + ":" + time2string(departTime); - } - - - inline SUMOVehicleClass getVClass() const { - return vehicle != 0 ? vehicle->getVClass() : SVC_PEDESTRIAN; - } - - // only used by AStar - inline double getMaxSpeed() const { - return vehicle != nullptr ? vehicle->getMaxSpeed() : speed; - } - - // only used by AStar - inline double getChosenSpeedFactor() const { - return vehicle != nullptr ? vehicle->getChosenSpeedFactor() : 1.0; - } - - const E* const from; - const E* const to; - const double departPos; - const double arrivalPos; - const double speed; - const SUMOTime departTime; - const N* const node; // indicates whether only routing across this node shall be performed - const V* const vehicle; // indicates which vehicle may be used - const SVCPermissions modeSet; - const EffortCalculator* const calc; - const double externalFactor; - -private: - /// @brief Invalidated assignment operator. - IntermodalTrip& operator=(const IntermodalTrip&); -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/LogitCalculator.h sumo-1.2.0+dfsg1/src/utils/vehicle/LogitCalculator.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/LogitCalculator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/LogitCalculator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,158 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file LogitCalculator.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date Sept 2002 -/// @version $Id$ -/// -// Calculators for route costs and probabilities -/****************************************************************************/ -#ifndef LogitCalculator_h -#define LogitCalculator_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class LogitCalculator - * @brief Cost calculation with c-logit or logit method. - */ -template -class LogitCalculator : public RouteCostCalculator { -public: - /// Constructor - LogitCalculator(const double beta, const double gamma, - const double theta) : myBeta(beta), myGamma(gamma), myTheta(theta) {} - - /// Destructor - virtual ~LogitCalculator() {} - - void setCosts(R* route, const double 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 double theta = myTheta >= 0 ? myTheta : getThetaForCLogit(alternatives); - const double 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; - double 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)); - } - double overlapSum = 0; - for (typename std::vector::const_iterator j = alternatives.begin(); j != alternatives.end(); j++) { - const R* pS = *j; - double overlapLength = 0.; - double 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; - double 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 */ - double getBetaForCLogit(const std::vector alternatives) const { - double min = std::numeric_limits::max(); - for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { - const double cost = (*i)->getCosts() / 3600.; - if (cost < min) { - min = cost; - } - } - return min; - } - - /** @brief calculate the scaling factor in the logit model */ - double getThetaForCLogit(const std::vector alternatives) const { - // @todo this calculation works for travel times only - double sum = 0.; - double diff = 0.; - double min = std::numeric_limits::max(); - for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { - const double cost = (*i)->getCosts() / 3600.; - sum += cost; - if (cost < min) { - min = cost; - } - } - const double meanCost = sum / double(alternatives.size()); - for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { - diff += pow((*i)->getCosts() / 3600. - meanCost, 2); - } - const double cvCost = sqrt(diff / double(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 double myBeta; - - /// @brief logit gamma - value - const double myGamma; - - /// @brief logit theta - value - const double 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-1.1.0+dfsg1/src/utils/vehicle/Makefile.am sumo-1.2.0+dfsg1/src/utils/vehicle/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/vehicle/Makefile.am 2018-08-22 22:00:28.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -1,13 +1,11 @@ noinst_LIBRARIES = libvehicle.a -libvehicle_a_SOURCES = AStarRouter.h \ -AStarLookupTable.h \ -AccessEdge.h CarEdge.h PedestrianEdge.h PublicTransportEdge.h StopEdge.h \ -CHBuilder.h CHRouter.h CHRouterWrapper.h \ -DijkstraRouter.h EffortCalculator.h \ -IntermodalEdge.h IntermodalNetwork.h IntermodalRouter.h IntermodalTrip.h \ -GawronCalculator.h LogitCalculator.h RouteCostCalculator.h \ -PedestrianRouter.h RouterProvider.h SUMOAbstractRouter.h \ -SPTree.h SUMOVehicle.h \ +libvehicle_a_SOURCES = SUMOVehicle.h \ +SUMOTrafficObject.h \ +SUMORouteHandler.cpp SUMORouteHandler.h \ +SUMORouteLoader.cpp SUMORouteLoader.h \ +SUMORouteLoaderControl.cpp SUMORouteLoaderControl.h \ SUMOVehicleParameter.cpp SUMOVehicleParameter.h \ +SUMOVehicleParameter.cpp SUMOVehicleParameter.h \ +SUMOVehicleParserHelper.cpp SUMOVehicleParserHelper.h \ SUMOVTypeParameter.cpp SUMOVTypeParameter.h diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/Makefile.in sumo-1.2.0+dfsg1/src/utils/vehicle/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/vehicle/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,642 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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 -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 \ -AStarLookupTable.h \ -AccessEdge.h CarEdge.h PedestrianEdge.h PublicTransportEdge.h StopEdge.h \ -CHBuilder.h CHRouter.h CHRouterWrapper.h \ -DijkstraRouter.h EffortCalculator.h \ -IntermodalEdge.h IntermodalNetwork.h IntermodalRouter.h IntermodalTrip.h \ -GawronCalculator.h LogitCalculator.h RouteCostCalculator.h \ -PedestrianRouter.h RouterProvider.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) --foreign src/utils/vehicle/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/vehicle/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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/vehicle/PedestrianEdge.h sumo-1.2.0+dfsg1/src/utils/vehicle/PedestrianEdge.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/PedestrianEdge.h 2018-09-11 22:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/PedestrianEdge.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file PedestrianEdge.h -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Robert Hilbrich -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The pedestrian accessible edges for the Intermodal Router -/****************************************************************************/ -#ifndef PedestrianEdge_h -#define PedestrianEdge_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#define TL_RED_PENALTY 20 - -//#define IntermodalRouter_DEBUG_EFFORTS - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the pedestrian edge type that is given to the internal router (SUMOAbstractRouter) -template -class PedestrianEdge : public IntermodalEdge { -public: - PedestrianEdge(int numericalID, const E* edge, const L* lane, bool forward, const double pos = -1.) : - IntermodalEdge(edge->getID() + (edge->isWalkingArea() ? "" : (forward ? "_fwd" : "_bwd")) + toString(pos), numericalID, edge, "!ped"), - myLane(lane), - myForward(forward), - myStartPos(pos >= 0 ? pos : (forward ? 0. : edge->getLength())) { } - - bool includeInRoute(bool allEdges) const { - return allEdges || (!this->getEdge()->isCrossing() && !this->getEdge()->isWalkingArea() && !this->getEdge()->isInternal()); - } - - bool prohibits(const IntermodalTrip* const trip) const { - if (trip->node == 0) { - // network only includes IntermodalEdges - return false; - } else { - // limit routing to the surroundings of the specified node - return (this->getEdge()->getFromJunction() != trip->node - && this->getEdge()->getToJunction() != trip->node); - } - } - - virtual double getTravelTime(const IntermodalTrip* const trip, double time) const { - double length = this->getLength(); - if (this->getEdge() == trip->from && !myForward && trip->departPos < myStartPos) { - length = trip->departPos - (myStartPos - this->getLength()); - } - if (this->getEdge() == trip->to && myForward && trip->arrivalPos < myStartPos + this->getLength()) { - length = trip->arrivalPos - myStartPos; - } - if (this->getEdge() == trip->from && myForward && trip->departPos > myStartPos) { - length -= (trip->departPos - myStartPos); - } - if (this->getEdge() == trip->to && !myForward && trip->arrivalPos > myStartPos - this->getLength()) { - length -= (trip->arrivalPos - (myStartPos - this->getLength())); - } - // ensure that 'normal' edges always have a higher weight than connector edges - length = MAX2(length, NUMERICAL_EPS); - double tlsDelay = 0; - // @note pedestrian traffic lights should never have LINKSTATE_TL_REDYELLOW - if (this->getEdge()->isCrossing() && myLane->getIncomingLinkState() == LINKSTATE_TL_RED) { - // red traffic lights occurring later in the route may be green by the time we arrive - tlsDelay += MAX2(double(0), TL_RED_PENALTY - (time - STEPS2TIME(trip->departTime))); - } -#ifdef IntermodalRouter_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; - } - - double getStartPos() const { - return myStartPos; - } - - double getEndPos() const { - return myForward ? myStartPos + this->getLength() : myStartPos - this->getLength(); - } - -private: - /// @brief the original edge - const L* myLane; - - /// @brief the direction of this edge - const bool myForward; - - /// @brief the starting position for split edges - const double myStartPos; - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/PedestrianRouter.h sumo-1.2.0+dfsg1/src/utils/vehicle/PedestrianRouter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/PedestrianRouter.h 2018-08-21 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/PedestrianRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file PedestrianRouter.h -/// @author Jakob Erdmann -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The Pedestrian Router builds a special network and delegates to a SUMOAbstractRouter. -/****************************************************************************/ -#ifndef PedestrianRouter_h -#define PedestrianRouter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include "SUMOAbstractRouter.h" -#include "DijkstraRouter.h" -#include "IntermodalNetwork.h" - -//#define PedestrianRouter_DEBUG_ROUTES - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class PedestrianRouter - * The router for pedestrians (on a bidirectional network of sidewalks and crossings) - */ -template -class PedestrianRouter : public SUMOAbstractRouter > { -private: - typedef IntermodalEdge _IntermodalEdge; - typedef IntermodalNetwork _IntermodalNetwork; - typedef IntermodalTrip _IntermodalTrip; - typedef DijkstraRouter<_IntermodalEdge, _IntermodalTrip, SUMOAbstractRouterPermissions<_IntermodalEdge, _IntermodalTrip > > _InternalRouter; - -public: - /// Constructor - PedestrianRouter(): - SUMOAbstractRouter("PedestrianRouter"), myAmClone(false) { - myPedNet = new _IntermodalNetwork(E::getAllEdges(), true); - myInternalRouter = new _InternalRouter(myPedNet->getAllEdges(), true, &_IntermodalEdge::getTravelTimeStatic); - } - - PedestrianRouter(_IntermodalNetwork* net): - SUMOAbstractRouter("PedestrianRouterClone"), myAmClone(true) { - myPedNet = net; - myInternalRouter = new _InternalRouter(myPedNet->getAllEdges(), true, &_IntermodalEdge::getTravelTimeStatic); - } - - /// Destructor - virtual ~PedestrianRouter() { - delete myInternalRouter; - if (!myAmClone) { - delete myPedNet; - } - } - - virtual SUMOAbstractRouter* clone() { - return new PedestrianRouter(myPedNet); - } - - /** @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 */ - double compute(const E* from, const E* to, double departPos, double arrivalPos, double speed, - SUMOTime msTime, const N* onlyNode, std::vector& into, bool allEdges = false) { - if (getSidewalk(from) == 0) { - WRITE_WARNING("Departure edge '" + from->getID() + "' does not allow pedestrians."); - return false; - } - if (getSidewalk(to) == 0) { - WRITE_WARNING("Destination edge '" + to->getID() + "' does not allow pedestrians."); - return false; - } - _IntermodalTrip trip(from, to, departPos, arrivalPos, speed, msTime, onlyNode); - std::vector intoPed; - const bool success = myInternalRouter->compute(myPedNet->getDepartConnector(from), - myPedNet->getArrivalConnector(to), - &trip, msTime, intoPed); - double time = 0.; - if (success) { - for (const _IntermodalEdge* pedEdge : intoPed) { - if (pedEdge->includeInRoute(allEdges)) { - into.push_back(pedEdge->getEdge()); - } - time += myInternalRouter->getEffort(pedEdge, &trip, time); - } - } -#ifdef PedestrianRouter_DEBUG_ROUTES - 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 - return success ? time : -1.; - } - - /** @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 */ - bool compute(const E*, const E*, const _IntermodalTrip* const, - SUMOTime, std::vector&) { - throw ProcessError("Do not use this method"); - } - - void prohibit(const std::vector& toProhibit) { - std::vector<_IntermodalEdge*> toProhibitPE; - for (typename std::vector::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) { - toProhibitPE.push_back(myPedNet->getBothDirections(*it).first); - toProhibitPE.push_back(myPedNet->getBothDirections(*it).second); - } - myInternalRouter->prohibit(toProhibitPE); - } - -private: - const bool myAmClone; - _InternalRouter* myInternalRouter; - _IntermodalNetwork* myPedNet; - - -private: - /// @brief Invalidated assignment operator - PedestrianRouter& operator=(const PedestrianRouter& s); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/PublicTransportEdge.h sumo-1.2.0+dfsg1/src/utils/vehicle/PublicTransportEdge.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/PublicTransportEdge.h 2018-09-24 22:00:25.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/PublicTransportEdge.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file PublicTransportEdge.h -/// @author Michael Behrisch -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The PublicTransportEdge is a special intermodal edge connecting the stop edges with scheduled traffic -/****************************************************************************/ -#ifndef PublicTransportEdge_h -#define PublicTransportEdge_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include "IntermodalEdge.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the public transport edge type connecting the stop edges -template -class PublicTransportEdge : public IntermodalEdge { -private: - struct Schedule { - Schedule(const std::string& _id, const SUMOTime _begin, const int _repetitionNumber, const SUMOTime _period, const SUMOTime _travelTime) - : ids( { - _id - }), begin(_begin), repetitionNumber(_repetitionNumber), period(_period), travelTime(_travelTime) {} - // the id of the vehicle or flow from which this schedule is generated - std::vector ids; - const SUMOTime begin; - int repetitionNumber; - // the repetition period for a flow or -1 for a vehicle - SUMOTime period; - const SUMOTime travelTime; - private: - /// @brief Invalidated assignment operator - Schedule& operator=(const Schedule& src); - }; - -public: - PublicTransportEdge(const std::string id, int numericalID, const IntermodalEdge* entryStop, const E* endEdge, const std::string& line, const double length) : - IntermodalEdge(line + ":" + (id != "" ? id : endEdge->getID()), numericalID, endEdge, line, length), myEntryStop(entryStop) { } - - bool includeInRoute(bool /* allEdges */) const { - return true; - } - - bool prohibits(const IntermodalTrip* const trip) const { - return (trip->modeSet & SVC_BUS) == 0; - } - - const IntermodalEdge* getEntryStop() const { - return myEntryStop; - } - - bool hasSchedule(const SUMOTime begin) const { - return mySchedules.find(begin) != mySchedules.end(); - } - - void addSchedule(const std::string id, const SUMOTime begin, const int repetitionNumber, const SUMOTime period, const SUMOTime travelTime) { - // try to merge with existing vehicle or flow - bool found = false; - for (auto& it : mySchedules) { - Schedule& s = it.second; - if (travelTime == s.travelTime) { - if (repetitionNumber == -1 && s.repetitionNumber == 1) { - if (begin > s.begin) { - s.period = begin - s.begin; - found = true; - } - } else if (begin == s.begin + s.repetitionNumber * s.period) { - found = true; - } - if (found) { - s.repetitionNumber += MAX2(repetitionNumber, 1); - s.ids.push_back(id); - break; - } - } - } - if (!found) { - mySchedules.insert(std::make_pair(begin, Schedule(id, begin, MAX2(repetitionNumber, 1), MAX2(period, 1), travelTime))); - } - } - - double getTravelTime(const IntermodalTrip* const /* trip */, double time) const { - SUMOTime minArrival = SUMOTime_MAX; - const SUMOTime step = TIME2STEPS(time); - for (typename std::multimap::const_iterator it = mySchedules.begin(); it != mySchedules.end(); ++it) { - const Schedule& s = it->second; - if (it->first > minArrival) { - break; - } - const SUMOTime offset = MAX2(0, step - s.begin); - int running = (int)(offset / s.period); - if (offset % s.period != 0) { - running++; - } - if (running < s.repetitionNumber) { - const SUMOTime nextDepart = s.begin + running * s.period; - minArrival = MIN2(nextDepart + s.travelTime, minArrival); - //std::cout << " edge=" << myEntryStop->getID() << "->" << this->getID() << " beg=" << s.begin << " end=" << s.end - // << " atTime=" << time - // << " running=" << running << " nextDepart=" << nextDepart - // << " minASec=" << minArrivalSec << " travelTime=" << minArrivalSec - time << "\n"; - } - } - return STEPS2TIME(minArrival - step); - } - - double getIntended(const double time, std::string& intended) const { - /// @note: duplicates some code of getTravelTime() - SUMOTime minArrival = SUMOTime_MAX; - double bestDepartTime = std::numeric_limits::max(); - const SUMOTime step = TIME2STEPS(time); - for (typename std::multimap::const_iterator it = mySchedules.begin(); it != mySchedules.end(); ++it) { - const Schedule& s = it->second; - if (it->first > minArrival) { - break; - } - const SUMOTime offset = MAX2(0, step - s.begin); - int running = (int)(offset / s.period); - if (offset % s.period != 0) { - running++; - } - if (running < s.repetitionNumber) { - const SUMOTime nextDepart = s.begin + running * s.period; - if (nextDepart + s.travelTime < minArrival) { - minArrival = nextDepart + s.travelTime; - bestDepartTime = STEPS2TIME(nextDepart); - // see naming scheme inMSInsertionControl::determineCandidates() - if (s.ids.size() == 1 || running >= (int)s.ids.size()) { - intended = s.repetitionNumber == 1 ? s.ids[0] : s.ids[0] + "." + toString(running); - } else { - intended = s.ids[running]; - } - } - } - } - return bestDepartTime; - } - -private: - std::multimap mySchedules; - const IntermodalEdge* const myEntryStop; - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/RouteCostCalculator.h sumo-1.2.0+dfsg1/src/utils/vehicle/RouteCostCalculator.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/RouteCostCalculator.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/RouteCostCalculator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file RouteCostCalculator.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date Sept 2002 -/// @version $Id$ -/// -// Calculators for route costs and probabilities -/****************************************************************************/ -#ifndef RouteCostCalculator_h -#define RouteCostCalculator_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#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 double 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; - - 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 - 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-1.1.0+dfsg1/src/utils/vehicle/RouterProvider.h sumo-1.2.0+dfsg1/src/utils/vehicle/RouterProvider.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/RouterProvider.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/RouterProvider.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file RouterProvider.h -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The RouterProvider provides car, pedestrian and intermodal routing in one object -/****************************************************************************/ -#ifndef RouterProvider_h -#define RouterProvider_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include "IntermodalRouter.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class RouterProvider - * The encapsulation of the routers for vehicles and pedestrians - */ -template -class RouterProvider { -public: - RouterProvider(SUMOAbstractRouter* vehRouter, - PedestrianRouter* pedRouter, - IntermodalRouter* interRouter) - : myVehRouter(vehRouter), myPedRouter(pedRouter), myInterRouter(interRouter) {} - - RouterProvider(const RouterProvider& original) - : myVehRouter(original.getVehicleRouter().clone()), - myPedRouter(static_cast*>(original.myPedRouter == 0 ? 0 : original.getPedestrianRouter().clone())), - myInterRouter(static_cast*>(original.myInterRouter == 0 ? 0 : original.getIntermodalRouter().clone())) {} - - SUMOAbstractRouter& getVehicleRouter() const { - return *myVehRouter; - } - - PedestrianRouter& getPedestrianRouter() const { - return *myPedRouter; - } - - IntermodalRouter& getIntermodalRouter() const { - return *myInterRouter; - } - - virtual ~RouterProvider() { - delete myVehRouter; - delete myPedRouter; - delete myInterRouter; - } - - -private: - SUMOAbstractRouter* const myVehRouter; - PedestrianRouter* const myPedRouter; - IntermodalRouter* const myInterRouter; - - -private: - /// @brief Invalidated assignment operator - RouterProvider& operator=(const RouterProvider& src); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SPTree.h sumo-1.2.0+dfsg1/src/utils/vehicle/SPTree.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SPTree.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SPTree.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,243 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SPTree.h -/// @author Laura Bieker -/// @author Michael Behrisch -/// @date February 2012 -/// @version $Id$ -/// -// Shortest Path tree of limited depth using Dijkstras algorithm -/****************************************************************************/ -#ifndef SPTree_h -#define SPTree_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#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 double traveltime = min->traveltime + con.cost; - const double 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 double bestWitness = dijkstraTT( - aInfo->target, fInfo->target, excluded, (aInfo->permissions & fInfo->permissions)); - const double viaCost = aInfo->cost + fInfo->cost; - if (viaCost < bestWitness) { - myNeededShortcuts.push_back(*it); - } - } - myShortcutsToValidate.clear(); - return myNeededShortcuts; - } - - -private: - // perform dijkstra search under permission constraints - double 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 double traveltime = min->traveltime + con.cost; - const double 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-1.1.0+dfsg1/src/utils/vehicle/StopEdge.h sumo-1.2.0+dfsg1/src/utils/vehicle/StopEdge.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/StopEdge.h 2018-08-21 22:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/StopEdge.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file StopEdge.h -/// @author Michael Behrisch -/// @date Mon, 03 March 2014 -/// @version $Id$ -/// -// The StopEdge is a special intermodal edge representing bus and train stops -/****************************************************************************/ -#ifndef StopEdge_h -#define StopEdge_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include "IntermodalEdge.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/// @brief the stop edge type representing bus and train stops -template -class StopEdge : public IntermodalEdge { -public: - StopEdge(const std::string id, int numericalID, const E* edge) : - IntermodalEdge(id, numericalID, edge, "!stop") { } - - bool includeInRoute(bool /* allEdges */) const { - return true; - } -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOAbstractRouter.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOAbstractRouter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOAbstractRouter.h 2018-12-10 23:00:21.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOAbstractRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,246 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2006-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMOAbstractRouter.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date 25.Jan 2006 -/// @version $Id$ -/// -// An abstract router base class -/****************************************************************************/ -#ifndef SUMOAbstractRouter_h -#define SUMOAbstractRouter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#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: - /** - * @class 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(const E* const e) - : edge(e), effort(std::numeric_limits::max()), - heuristicEffort(std::numeric_limits::max()), - leaveTime(0.), prev(nullptr), via(nullptr), visited(false) {} - - /// The current edge - const E* const edge; - - /// Effort to reach the edge - double effort; - - /// Estimated effort to reach the edge (effort + lower bound on remaining effort) - // only used by A* - double heuristicEffort; - - /// The time the vehicle leaves the edge - double leaveTime; - - /// The previous edge - const EdgeInfo* prev; - - /// The optional internal edge corresponding to prev - const E* via; - - /// The previous edge - bool visited; - - inline void reset() { - effort = std::numeric_limits::max(); - via = nullptr; - visited = false; - } - - private: - /// @brief Invalidated assignment operator - EdgeInfo& operator=(const EdgeInfo& s) = delete; - - }; - - /// Type of the function that is used to retrieve the edge effort. - typedef double(* Operation)(const E* const, const V* const, double); - - /// Constructor - SUMOAbstractRouter(const std::string& type, Operation operation = nullptr, Operation ttOperation = nullptr) : - myOperation(operation), myTTOperation(ttOperation), - myBulkMode(false), - 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() = 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 bool compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) = 0; - - virtual bool isProhibited(const E* const /* edge */, const V* const /* vehicle */) const { - return false; - } - - inline double getTravelTime(const E* const e, const V* const v, const double t, const double effort) const { - return myTTOperation == nullptr ? effort : (*myTTOperation)(e, v, t); - } - - inline void updateViaCost(const E* const prev, const E* const e, const V* const v, double& time, double& effort, double& length) const { - if (prev != nullptr) { - for (const std::pair& follower : prev->getViaSuccessors()) { - if (follower.first == e) { - const E* viaEdge = follower.second; - while (viaEdge != nullptr && viaEdge->isInternal()) { - const double viaEffortDelta = this->getEffort(viaEdge, v, time); - time += getTravelTime(viaEdge, v, time, viaEffortDelta); - effort += viaEffortDelta; - length += viaEdge->getLength(); - viaEdge = viaEdge->getViaSuccessors().front().first; - } - break; - } - } - } - const double effortDelta = this->getEffort(e, v, time); - effort += effortDelta; - time += getTravelTime(e, v, time, effortDelta); - length += e->getLength(); - } - - - inline double recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { - double time = STEPS2TIME(msTime); - double effort = 0.; - double length = 0.; - const E* prev = nullptr; - for (const E* const e : edges) { - if (isProhibited(e, v)) { - return -1; - } - updateViaCost(prev, e, v, time, effort, length); - prev = e; - } - return effort; - } - - - inline double getEffort(const E* const e, const V* const v, double 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); - } - - void setBulkMode(const bool mode) { - myBulkMode = mode; - } - -protected: - /// @brief The object's operation to perform. - Operation myOperation; - - /// @brief The object's operation to perform for travel times - Operation myTTOperation; - - /// @brief whether we are currently operating several route queries in a bulk - bool myBulkMode; - -private: - /// @brief the type of this router - const std::string myType; - - /// @brief counters for performance logging - long long int myQueryVisits; - long long int myNumQueries; - /// @brief the time spent querying in milliseconds - long long int myQueryStartTime; - long long int myQueryTimeSum; -private: - /// @brief Invalidated assignment operator - SUMOAbstractRouter& operator=(const SUMOAbstractRouter& s); -}; - - -template -class SUMOAbstractRouterPermissions : public SUMOAbstractRouter { -public: - /// Constructor - SUMOAbstractRouterPermissions(const std::string& type, typename SUMOAbstractRouter::Operation operation = nullptr, typename SUMOAbstractRouter::Operation ttOperation = nullptr) : - SUMOAbstractRouter(type, operation, ttOperation) { - } - - /// Destructor - virtual ~SUMOAbstractRouterPermissions() { - } - - bool isProhibited(const E* const edge, const V* const 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; - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteHandler.cpp sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,408 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMORouteHandler.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @date Mon, 9 Jul 2001 +/// @version $Id$ +/// +// Parser for routes during their loading +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "SUMORouteHandler.h" + + +// =========================================================================== +// method definitions +// =========================================================================== +SUMORouteHandler::SUMORouteHandler(const std::string& file, const std::string& expectedRoot) : + SUMOSAXHandler(file, XMLSubSys::isValidating() ? expectedRoot : ""), + myVehicleParameter(nullptr), + myLastDepart(-1), + myActiveRouteColor(nullptr), + myCurrentCosts(0.), + myCurrentVType(nullptr), + myBeginDefault(string2time(OptionsCont::getOptions().getString("begin"))), + myEndDefault(string2time(OptionsCont::getOptions().getString("end"))), + myFirstDepart(-1), myInsertStopEdgesAt(-1) { +} + + +SUMORouteHandler::~SUMORouteHandler() { + delete myCurrentVType; +} + + +SUMOTime +SUMORouteHandler::getLastDepart() const { + return myLastDepart; +} + + +bool +SUMORouteHandler::checkLastDepart() { + if (myVehicleParameter->departProcedure == DEPART_GIVEN) { + if (myVehicleParameter->depart < myLastDepart) { + WRITE_WARNING("Route file should be sorted by departure time, ignoring '" + myVehicleParameter->id + "'!"); + return false; + } + } + return true; +} + + +void +SUMORouteHandler::registerLastDepart() { + // register only non public transport to parse all public transport lines in advance + if (myVehicleParameter->line == "" && 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 +} + + +void +SUMORouteHandler::myStartElement(int element, + const SUMOSAXAttributes& attrs) { + switch (element) { + case SUMO_TAG_VEHICLE: + delete myVehicleParameter; + myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs); + break; + case SUMO_TAG_PERSON: + delete myVehicleParameter; + myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs, false, false, true); + addPerson(attrs); + break; + case SUMO_TAG_CONTAINER: + delete myVehicleParameter; + myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs); + addContainer(attrs); + break; + case SUMO_TAG_FLOW: + delete myVehicleParameter; + myVehicleParameter = SUMOVehicleParserHelper::parseFlowAttributes(attrs, myBeginDefault, myEndDefault); + break; + case SUMO_TAG_PERSONFLOW: + delete myVehicleParameter; + myVehicleParameter = SUMOVehicleParserHelper::parseFlowAttributes(attrs, myBeginDefault, myEndDefault, true); + break; + case SUMO_TAG_VTYPE: + // XXX: Where is this deleted? Delegated to subclasses?! MSRouteHandler takes care of this, in case of RORouteHandler this is not obvious. Consider introduction of a shared_ptr + myCurrentVType = SUMOVehicleParserHelper::beginVTypeParsing(attrs, getFileName()); + break; + case SUMO_TAG_VTYPE_DISTRIBUTION: + openVehicleTypeDistribution(attrs); + break; + case SUMO_TAG_ROUTE: + openRoute(attrs); + break; + case SUMO_TAG_ROUTE_DISTRIBUTION: + openRouteDistribution(attrs); + break; + case SUMO_TAG_STOP: + addStop(attrs); + break; + case SUMO_TAG_TRIP: { + myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs, true); + if (myVehicleParameter->id == "") { + WRITE_WARNING("Omitting trip ids is deprecated!"); + myVehicleParameter->id = myIdSupplier.getNext(); + } + myVehicleParameter->parametersSet |= VEHPARS_FORCE_REROUTE; + myActiveRouteID = "!" + myVehicleParameter->id; + // open trip + openTrip(attrs); + break; + } + case SUMO_TAG_PERSONTRIP: + case SUMO_TAG_WALK: + if (attrs.hasAttribute(SUMO_ATTR_EDGES) || attrs.hasAttribute(SUMO_ATTR_ROUTE)) { + addWalk(attrs); + } else { + addPersonTrip(attrs); + } + break; + case SUMO_TAG_INTERVAL: { + bool ok; + myBeginDefault = attrs.getSUMOTimeReporting(SUMO_ATTR_BEGIN, nullptr, ok); + myEndDefault = attrs.getSUMOTimeReporting(SUMO_ATTR_END, nullptr, ok); + break; + } + case SUMO_TAG_RIDE: + addRide(attrs); + break; + case SUMO_TAG_TRANSPORT: + addTransport(attrs); + break; + case SUMO_TAG_TRANSHIP: + addTranship(attrs); + break; + case SUMO_TAG_PARAM: + addParam(attrs); + break; + default: + // parse embedded car following model information + if (myCurrentVType != nullptr) { + WRITE_WARNING("Defining car following parameters in a nested element is deprecated in vType '" + myCurrentVType->id + "', use attributes instead!"); + SUMOVehicleParserHelper::parseVTypeEmbedded(*myCurrentVType, (SumoXMLTag)element, attrs); + } + break; + } +} + + +void +SUMORouteHandler::myEndElement(int element) { + switch (element) { + case SUMO_TAG_ROUTE: + closeRoute(); + break; + case SUMO_TAG_VTYPE: + closeVType(); + break; + case SUMO_TAG_PERSON: + closePerson(); + delete myVehicleParameter; + myVehicleParameter = nullptr; + break; + case SUMO_TAG_PERSONFLOW: + closePersonFlow(); + delete myVehicleParameter; + myVehicleParameter = nullptr; + break; + case SUMO_TAG_CONTAINER: + closeContainer(); + delete myVehicleParameter; + myVehicleParameter = nullptr; + break; + case SUMO_TAG_VEHICLE: + if (myVehicleParameter->repetitionNumber > 0) { + myVehicleParameter->repetitionNumber++; // for backwards compatibility + // it is a flow, thus no break here + FALLTHROUGH; + } else { + closeVehicle(); + delete myVehicleParameter; + myVehicleParameter = nullptr; + break; + } + case SUMO_TAG_FLOW: + closeFlow(); + break; + case SUMO_TAG_TRIP: + closeTrip(); + delete myVehicleParameter; + myVehicleParameter = nullptr; + myInsertStopEdgesAt = -1; + break; + case SUMO_TAG_VTYPE_DISTRIBUTION: + closeVehicleTypeDistribution(); + break; + case SUMO_TAG_ROUTE_DISTRIBUTION: + closeRouteDistribution(); + break; + case SUMO_TAG_INTERVAL: + myBeginDefault = string2time(OptionsCont::getOptions().getString("begin")); + myEndDefault = string2time(OptionsCont::getOptions().getString("end")); + break; + default: + break; + } +} + + +bool +SUMORouteHandler::checkStopPos(double& startPos, double& endPos, const double laneLength, + const double minLength, const bool friendlyPos) { + if (minLength > laneLength) { + return false; + } + if (startPos < 0) { + startPos += laneLength; + } + if (endPos < 0) { + endPos += laneLength; + } + if (endPos < minLength || endPos > laneLength) { + if (!friendlyPos) { + return false; + } + if (endPos < minLength) { + endPos = minLength; + } + if (endPos > laneLength) { + endPos = laneLength; + } + } + if (startPos < 0 || startPos > endPos - minLength) { + if (!friendlyPos) { + return false; + } + if (startPos < 0) { + startPos = 0; + } + if (startPos > endPos - minLength) { + startPos = endPos - minLength; + } + } + return true; +} + + +void +SUMORouteHandler::addParam(const SUMOSAXAttributes& attrs) { + bool ok = true; + const std::string key = attrs.get(SUMO_ATTR_KEY, nullptr, ok); + // circumventing empty string test + const std::string val = attrs.hasAttribute(SUMO_ATTR_VALUE) ? attrs.getString(SUMO_ATTR_VALUE) : ""; + if (myVehicleParameter != nullptr) { + myVehicleParameter->setParameter(key, val); + } else if (myCurrentVType != nullptr) { + myCurrentVType->setParameter(key, val); + } +} + + +bool +SUMORouteHandler::parseStop(SUMOVehicleParameter::Stop& stop, const SUMOSAXAttributes& attrs, std::string errorSuffix, MsgHandler* const errorOutput) { + stop.parametersSet = 0; + if (attrs.hasAttribute(SUMO_ATTR_ENDPOS)) { + stop.parametersSet |= STOP_END_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_STARTPOS)) { + stop.parametersSet |= STOP_START_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_TRIGGERED)) { + stop.parametersSet |= STOP_TRIGGER_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_TRIGGERED)) { + stop.parametersSet |= STOP_CONTAINER_TRIGGER_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_PARKING)) { + stop.parametersSet |= STOP_PARKING_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_EXPECTED)) { + stop.parametersSet |= STOP_EXPECTED_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_EXPECTED_CONTAINERS)) { + stop.parametersSet |= STOP_EXPECTED_CONTAINERS_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_TRIP_ID)) { + stop.parametersSet |= STOP_TRIP_ID_SET; + } + bool ok = true; + stop.busstop = attrs.getOpt(SUMO_ATTR_BUS_STOP, nullptr, ok, ""); + stop.chargingStation = attrs.getOpt(SUMO_ATTR_CHARGING_STATION, nullptr, ok, ""); + stop.containerstop = attrs.getOpt(SUMO_ATTR_CONTAINER_STOP, nullptr, ok, ""); + stop.parkingarea = attrs.getOpt(SUMO_ATTR_PARKING_AREA, nullptr, ok, ""); + if (stop.busstop != "") { + errorSuffix = " at '" + stop.busstop + "'" + errorSuffix; + } else if (stop.chargingStation != "") { + errorSuffix = " at '" + stop.chargingStation + "'" + errorSuffix; + } else if (stop.containerstop != "") { + errorSuffix = " at '" + stop.containerstop + "'" + errorSuffix; + } else if (stop.parkingarea != "") { + errorSuffix = " at '" + stop.parkingarea + "'" + 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, nullptr, ok, true); + stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, nullptr, ok, false); + } else { + stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, nullptr, ok, true); + stop.containerTriggered = attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, nullptr, ok, false); + } + stop.duration = -1; + stop.until = -1; + } else { + stop.duration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DURATION, nullptr, ok, -1); + stop.until = attrs.getOptSUMOTimeReporting(SUMO_ATTR_UNTIL, nullptr, 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, nullptr, ok, false); + stop.containerTriggered = attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, nullptr, ok, false); + } + stop.parking = attrs.getOpt(SUMO_ATTR_PARKING, nullptr, ok, stop.triggered || stop.containerTriggered || stop.parkingarea != ""); + if (stop.parkingarea != "" && !stop.parking) { + ok = false; + } + if (!ok) { + errorOutput->inform("Invalid bool for 'triggered', 'containerTriggered' or 'parking' for stop" + errorSuffix); + return false; + } + + // expected persons + const std::vector& expected = attrs.getOptStringVector(SUMO_ATTR_EXPECTED, nullptr, ok); + stop.awaitedPersons.insert(expected.begin(), expected.end()); + if (stop.awaitedPersons.size() > 0 && (stop.parametersSet & STOP_TRIGGER_SET) == 0) { + stop.triggered = true; + if ((stop.parametersSet & STOP_PARKING_SET) == 0) { + stop.parking = true; + } + } + + // expected containers + const std::vector& expectedContainers = attrs.getOptStringVector(SUMO_ATTR_EXPECTED_CONTAINERS, nullptr, ok); + stop.awaitedContainers.insert(expectedContainers.begin(), expectedContainers.end()); + if (stop.awaitedContainers.size() > 0 && (stop.parametersSet & STOP_CONTAINER_TRIGGER_SET) == 0) { + stop.containerTriggered = true; + if ((stop.parametersSet & STOP_PARKING_SET) == 0) { + stop.parking = true; + } + } + // public transport trip id + stop.tripId = attrs.getOpt(SUMO_ATTR_TRIP_ID, nullptr, ok, ""); + + const std::string idx = attrs.getOpt(SUMO_ATTR_INDEX, nullptr, 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, nullptr, ok); + if (!ok || stop.index < 0) { + errorOutput->inform("Invalid 'index' for stop" + errorSuffix); + return false; + } + } + return true; +} + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteHandler.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteHandler.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,244 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMORouteHandler.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 9 Jul 2001 +/// @version $Id$ +/// +// Parser for routes during their loading +/****************************************************************************/ +#ifndef SUMORouteHandler_h +#define SUMORouteHandler_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MsgHandler; +class SUMOVTypeParameter; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class SUMORouteHandler + * @brief Parser for routes during their loading + * + * SUMORouteHandler is the abstract super class for routers + * and simulation loading routes. + */ +class SUMORouteHandler : public SUMOSAXHandler { +public: + /// @brief standard constructor + SUMORouteHandler(const std::string& file, const std::string& expectedRoot); + + /// @brief standard destructor + virtual ~SUMORouteHandler(); + + /// @brief Returns the last loaded depart time + SUMOTime getLastDepart() const; + + /// @brief check start and end position of a stop + static bool checkStopPos(double& startPos, double& endPos, const double laneLength, + const double minLength, const bool friendlyPos); + + /// @brief returns the first departure time that was ever read + SUMOTime getFirstDepart() const { + return myFirstDepart; + } + +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 + */ + 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); + //@} + + /// @name open element functions + //@{ + + /// @brief opens a type distribution for reading + virtual void openVehicleTypeDistribution(const SUMOSAXAttributes& attrs) = 0; + + /// @brief closes (ends) the building of a distribution + virtual void closeVehicleTypeDistribution() = 0; + + /// @brief opens a route for reading + virtual void openRoute(const SUMOSAXAttributes& attrs) = 0; + + /// @brief opens a trip for reading + virtual void openTrip(const SUMOSAXAttributes& attrs) = 0; + //@} + + /// @name close element functions + //@{ + + /**closes (ends) the building of a route. + * Afterwards no edges may be added to it; + * this method may throw exceptions when + * a) the route is empty or + * b) another route with the same id already exists + */ + virtual void closeRoute(const bool mayBeDisconnected = false) = 0; + + /// @brief opens a route distribution for reading + virtual void openRouteDistribution(const SUMOSAXAttributes& attrs) = 0; + + /// @brief closes (ends) the building of a distribution + virtual void closeRouteDistribution() = 0; + + /// @brief Ends the processing of a vehicle + virtual void closeVehicle() = 0; + + /// @brief Ends the processing of a vehicle type + virtual void closeVType() = 0; + + /// @brief Ends the processing of a person + virtual void closePerson() = 0; + + /// @brief Ends the processing of a person + virtual void closePersonFlow() = 0; + + /// @brief Ends the processing of a container + virtual void closeContainer() = 0; + + /// @brief Ends the processing of a flow + virtual void closeFlow() = 0; + + /// @brief Ends the processing of a trip + virtual void closeTrip() = 0; + //@} + + /// @name add element functions + //@{ + + /// @brief Processing of a stop + virtual void addStop(const SUMOSAXAttributes& attrs) = 0; + + /// @brief add a routing request for a walking or intermodal person + virtual void addPersonTrip(const SUMOSAXAttributes& attrs) = 0; + + /// @brief add a fully specified walk + virtual void addWalk(const SUMOSAXAttributes& attrs) = 0; + + /// @brief Processing of a person + virtual void addPerson(const SUMOSAXAttributes& attrs) = 0; + + /// @brief Processing of a container + virtual void addContainer(const SUMOSAXAttributes& attrs) = 0; + + /// @brief Processing of a ride + virtual void addRide(const SUMOSAXAttributes& attrs) = 0; + + /// @brief Processing of a transport + virtual void addTransport(const SUMOSAXAttributes& attrs) = 0; + + /// @brief Processing of a tranship + virtual void addTranship(const SUMOSAXAttributes& attrs) = 0; + + //@} + + /// @brief Checks whether the route file is sorted by departure time if needed + bool checkLastDepart(); + + /// @brief save last depart (only to be used if vehicle is not discarded) + void registerLastDepart(); + + /// @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, container or flow + SUMOVehicleParameter* myVehicleParameter; + + /// @brief The insertion time of the vehicle read last + SUMOTime myLastDepart; + + /// @brief The id of the current route + std::string myActiveRouteID; + + /// @brief The id of the route the current route references to + std::string myActiveRouteRefID; + + /// @brief The probability of the current route + double myActiveRouteProbability; + + /// @brief The currently parsed route's color + const RGBColor* myActiveRouteColor; + + /// @brief The currently parsed route costs + double myCurrentCosts; + + /// @brief List of the stops on the parsed route + std::vector myActiveRouteStops; + + /// @brief The currently parsed vehicle type + SUMOVTypeParameter* myCurrentVType; + + /// @brief generates numerical ids + IDSupplier myIdSupplier; + + /// @brief The default value for flow begins + SUMOTime myBeginDefault; + + /// @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) = delete; + + /// @brief Invalidated assignment operator + SUMORouteHandler& operator=(const SUMORouteHandler& s) = delete; +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.cpp sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.cpp --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,84 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMORouteLoaderControl.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Wed, 06 Nov 2002 +/// @version $Id$ +/// +// Class responsible for loading of routes from some files +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include "SUMORouteLoader.h" +#include "SUMORouteLoaderControl.h" + + +// =========================================================================== +// method definitions +// =========================================================================== +SUMORouteLoaderControl::SUMORouteLoaderControl(SUMOTime inAdvanceStepNo): + myFirstLoadTime(SUMOTime_MAX), + myCurrentLoadTime(-SUMOTime_MAX), + myInAdvanceStepNo(inAdvanceStepNo), + myRouteLoaders(), + myLoadAll(inAdvanceStepNo <= 0), + myAllLoaded(false) { +} + + +SUMORouteLoaderControl::~SUMORouteLoaderControl() { + for (std::vector::iterator i = myRouteLoaders.begin(); + i != myRouteLoaders.end(); ++i) { + delete (*i); + } +} + + +void +SUMORouteLoaderControl::add(SUMORouteLoader* loader) { + myRouteLoaders.push_back(loader); +} + + +void +SUMORouteLoaderControl::loadNext(SUMOTime step) { + // check whether new vehicles shall be loaded + // return if not + if (myAllLoaded) { + return; + } + 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) { + myCurrentLoadTime = MIN2(myCurrentLoadTime, (*i)->loadUntil(loadMaxTime)); + if ((*i)->getFirstDepart() != -1) { + myFirstLoadTime = MIN2(myFirstLoadTime, (*i)->getFirstDepart()); + } + furtherAvailable |= (*i)->moreAvailable(); + } + myAllLoaded = !furtherAvailable; +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoaderControl.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,102 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMORouteLoaderControl.h +/// @author Daniel Krajzewicz +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Wed, 06 Nov 2002 +/// @version $Id$ +/// +// Class responsible for loading of routes from some files +/****************************************************************************/ +#ifndef SUMORouteLoaderControl_h +#define SUMORouteLoaderControl_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class SUMORouteLoader; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class SUMORouteLoaderControl + * + * SUMORouteLoaderControl + * This controls is initialised with the list of route loaders and uses them + * to load routes step wise. + * The parameter myInAdvanceStepNo holds the number of time steps to read the + * routes in forward. If it is 0 (default), all routes will be read at once. + */ +class SUMORouteLoaderControl { +public: + /// @brief constructor + SUMORouteLoaderControl(SUMOTime inAdvanceStepNo); + + /// @brief destructor + ~SUMORouteLoaderControl(); + + /// @brief add another loader + void add(SUMORouteLoader* loader); + + /// @brief loads the next routes up to and including the given time step + void loadNext(SUMOTime step); + + /// @brief returns the timestamp of the first loaded vehicle or flow + SUMOTime getFirstLoadTime() const { + return myFirstLoadTime; + } + + /// @brief returns whether loading is completed + bool haveAllLoaded() const { + return myAllLoaded; + } + +private: + /// @brief the first time step for which vehicles were loaded + SUMOTime myFirstLoadTime; + + /// @brief the time step up to which vehicles were loaded + SUMOTime myCurrentLoadTime; + + /// @brief the number of routes to read in forward + const SUMOTime myInAdvanceStepNo; + + /// @brief the list of route loaders + std::vector myRouteLoaders; + + /// @brief information whether all routes shall be loaded and whether they were loaded + bool myLoadAll, myAllLoaded; + +private: + /// @brief Invalidated copy constructor + SUMORouteLoaderControl(const SUMORouteLoaderControl& src); + + /// @brief Invalidated assignment operator + SUMORouteLoaderControl& operator=(const SUMORouteLoaderControl& src); +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoader.cpp sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoader.cpp --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,81 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMORouteLoader.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Wed, 6 Nov 2002 +/// @version $Id$ +/// +// A class that performs the loading of routes +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include "SUMORouteHandler.h" +#include "SUMORouteLoader.h" + + +// =========================================================================== +// method definitions +// =========================================================================== +SUMORouteLoader::SUMORouteLoader(SUMORouteHandler* handler) + : myParser(nullptr), myMoreAvailable(true), myHandler(handler) { + myParser = XMLSubSys::getSAXReader(*myHandler); + if (!myParser->parseFirst(myHandler->getFileName())) { + throw ProcessError("Can not read XML-file '" + myHandler->getFileName() + "'."); + } +} + + +SUMORouteLoader::~SUMORouteLoader() { + delete myParser; + delete myHandler; +} + + +SUMOTime +SUMORouteLoader::loadUntil(SUMOTime time) { + // read only when further data is available, no error occurred + // and vehicles may be found in the between the departure time of + // the last read vehicle and the time to read until + if (!myMoreAvailable) { + return SUMOTime_MAX; + } + // read vehicles until specified time or the period to read vehicles + // until is reached + while (myHandler->getLastDepart() <= time) { + if (!myParser->parseNext()) { + // no data available anymore + myMoreAvailable = false; + return SUMOTime_MAX; + } + } + return myHandler->getLastDepart(); +} + + +bool +SUMORouteLoader::moreAvailable() const { + return myMoreAvailable; +} + + +SUMOTime +SUMORouteLoader::getFirstDepart() const { + return myHandler->getFirstDepart(); +} + + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoader.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoader.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMORouteLoader.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMORouteLoader.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,75 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMORouteLoader.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Wed, 6 Nov 2002 +/// @version $Id$ +/// +// A class that performs the loading of routes +/****************************************************************************/ +#ifndef SUMORouteLoader_h +#define SUMORouteLoader_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class SUMORouteHandler; +class SUMOSAXReader; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class SUMORouteLoader + */ +class SUMORouteLoader { +public: + /// @brief constructor + SUMORouteLoader(SUMORouteHandler* handler); + + /// @brief destructor + ~SUMORouteLoader(); + + /// @brief loads vehicles until a vehicle is read that starts after the specified time + SUMOTime loadUntil(SUMOTime time); + + /// @brief returns the information whether new data is available + bool moreAvailable() const; + + /// @brief returns the first departure time that was ever read + SUMOTime getFirstDepart() const; + +private: + /// @brief the used SAXReader + SUMOSAXReader* myParser; + + /// @brief flag with information whether more vehicles should be available + bool myMoreAvailable; + + /// @brief the used Handler + SUMORouteHandler* myHandler; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOTrafficObject.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOTrafficObject.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOTrafficObject.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOTrafficObject.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,148 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMOTrafficObject.h +/// @author Jakob Erdmann +/// @date Mon, 25 Mar 2019 +/// @version $Id$ +/// +// Abstract base class for vehicle and person representations +/****************************************************************************/ +#ifndef SUMOTrafficObject_h +#define SUMOTrafficObject_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSVehicleType; +class MSEdge; +class MSLane; +class Position; + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class SUMOTrafficObject + * @brief Representation of a vehicle or person + */ +class SUMOTrafficObject { +public: + /// @brief Destructor + virtual ~SUMOTrafficObject() {} + + /** @brief Get the vehicle's ID + * @return The the ID of the vehicle + */ + virtual bool isVehicle() const = 0; + + /** @brief Get the vehicle's ID + * @return The the ID of the vehicle + */ + virtual const std::string& getID() const = 0; + + /** @brief Returns the vehicle's type + * @return The vehicle's type + */ + virtual const MSVehicleType& getVehicleType() const = 0; + + /** @brief Returns whether the vehicle is at a stop + * @return Whether the has stopped + */ + virtual bool isStopped() 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 slope of the road at vehicle's position + * @return The slope + */ + virtual double getSlope() const = 0; + + virtual double getChosenSpeedFactor() const = 0; + + /** @brief Returns the vehicle's access class + * @return The vehicle's access class + */ + virtual SUMOVehicleClass getVClass() const = 0; + + /** @brief Returns the vehicle's maximum speed + * @return The vehicle's maximum speed + */ + virtual double getMaxSpeed() const = 0; + + virtual SUMOTime getWaitingTime() const = 0; + + /** @brief Returns the vehicle's current speed + * @return The vehicle's speed + */ + virtual double getSpeed() const = 0; + + // This definition was introduced to make the MSVehicle's previousSpeed Refs. #2579 + /** @brief Returns the vehicle's previous speed + * @return The vehicle's previous speed + */ + virtual double getPreviousSpeed() const = 0; + + + /** @brief Returns the vehicle's acceleration + * @return The acceleration + */ + virtual double getAcceleration() 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 double getPositionOnLane() const = 0; + + /** @brief Get the vehicle's back position along the given lane + * @return The position of the vehicle (in m from the given lane's begin) + */ + virtual double getBackPositionOnLane(const MSLane* lane) 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 double offset = 0) const = 0; + + /** @brief Returns the objects angle in degrees + */ + virtual double getAngle() const = 0; + + /** @brief Returns whether this vehicle has arrived + */ + virtual bool hasArrived() const = 0; + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicle.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicle.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicle.h 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicle.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,22 +29,23 @@ #include #include #include -#include +#include #include +#include #include // =========================================================================== // class declarations // =========================================================================== -class MSVehicleType; class MSRoute; class MSEdge; class MSLane; -class MSVehicleDevice; class MSPerson; class MSTransportable; class MSParkingArea; +class MSStoppingPlace; +class MSVehicleDevice; class SUMOSAXAttributes; typedef std::vector ConstMSEdgeVector; @@ -57,37 +58,13 @@ * @class SUMOVehicle * @brief Representation of a vehicle */ -class SUMOVehicle { +class SUMOVehicle : public SUMOTrafficObject { public: typedef long long int NumericalID; - // XXX: This definition was introduced to make the MSVehicle's previousSpeed - // available in the context of MSMoveReminder::notifyMove(). Another solution - // would be to modify notifyMove()'s interface to work with MSVehicle instead - // of SUMOVehicle (it is only called with MSVehicles!). Refs. #2579 - /** @brief Returns the vehicle's previous speed - * @return The vehicle's speed - */ - virtual double getPreviousSpeed() const = 0; - /// @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 double getPositionOnLane() const = 0; - - /** @brief Get the vehicle's back position along the given lane - * @return The position of the vehicle (in m from the given lane's begin) - */ - virtual double getBackPositionOnLane(const MSLane* lane) const = 0; - /** @brief Get the vehicle's lateral position on the lane * @return The lateral position of the vehicle (in m relative to the * centerline of the lane) @@ -99,39 +76,11 @@ */ virtual double 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 double offset = 0) const = 0; - - /** @brief Returns the vehicle's maximum speed - * @return The vehicle's maximum speed - */ - virtual double getMaxSpeed() const = 0; - - /** @brief Returns the vehicle's current speed - * @return The vehicle's speed - */ - virtual double getSpeed() const = 0; - /** @brief Returns the lane the vehicle is on * @return The vehicle's current lane */ virtual MSLane* getLane() 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; @@ -171,7 +120,7 @@ * @param[in] router The router to use * @see replaceRoute */ - virtual void reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter& router, const bool onInit = false, const bool withTaz = false) = 0; + virtual void reroute(SUMOTime t, const std::string& info, SUMOAbstractRouter& router, const bool onInit = false, const bool withTaz = false, const bool silent = false) = 0; /** @brief Validates the current or given route * @param[out] msg Description why the route is not valid (if it is the case) @@ -186,22 +135,6 @@ */ virtual const ConstMSEdgeVector::const_iterator& getCurrentRouteEdge() const = 0; - /** @brief Returns the vehicle's acceleration - * @return The acceleration - */ - virtual double getAcceleration() const = 0; - - /** @brief Returns the slope of the road at vehicle's position - * @return The slope - */ - virtual double 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 @@ -270,20 +203,11 @@ */ 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 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 @@ -333,6 +257,9 @@ virtual bool addStop(const SUMOVehicleParameter::Stop& stopPar, std::string& errorMsg, SUMOTime untilOffset = 0, bool collision = false, ConstMSEdgeVector::const_iterator* searchStart = 0) = 0; + /// @brief return list of route indices and stop positions for the remaining stops + virtual std::vector > getStopIndices() const = 0; + /** * returns the next imminent stop in the stop queue @@ -348,11 +275,6 @@ */ virtual bool replaceParkingArea(MSParkingArea* parkingArea, std::string& errorMsg) = 0; - /** @brief Returns whether the vehicle is at a stop - * @return Whether the has stopped - */ - virtual bool isStopped() const = 0; - /// @brief Returns the remaining stop duration for a stopped vehicle or 0 virtual SUMOTime remainingStopDuration() const = 0; @@ -363,16 +285,11 @@ /** @brief Returns whether the vehicle is stoped in range of the given position */ virtual bool isStoppedInRange(double pos) const = 0; - /// @brief Returns a device of the given type if it exists or 0 - virtual MSVehicleDevice* getDevice(const std::type_info& type) const = 0; - - - virtual double getChosenSpeedFactor() const = 0; + /** @brief Returns whether the vehicle stops at the given stopping place */ + virtual bool stopsAt(MSStoppingPlace* stop) const = 0; virtual void setChosenSpeedFactor(const double factor) = 0; - virtual SUMOTime getWaitingTime() const = 0; - virtual SUMOTime getAccumulatedWaitingTime() const = 0; virtual SUMOTime getDepartDelay() const = 0; @@ -383,9 +300,22 @@ /// @brief Returns this vehicles impatience virtual double getImpatience() const = 0; + /** @brief Returns this vehicle's devices + * @return This vehicle's devices + */ + virtual const std::vector& getDevices() const = 0; + + /// @brief Returns a device of the given type if it exists or 0 + virtual MSVehicleDevice* getDevice(const std::type_info& type) const = 0; + /// @brief whether this vehicle is selected in the GUI virtual bool isSelected() const = 0; + /** @brief Returns the associated RNG for this vehicle + * @return The vehicle's associated RNG + */ + virtual std::mt19937* getRNG() const = 0; + /// @brief return the numerical ID which is only for internal usage // (especially fast comparison in maps which need vehicles as keys) virtual NumericalID getNumericalID() const = 0; diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.cpp sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.cpp --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.cpp 2018-12-08 23:00:30.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -68,227 +68,79 @@ } else { dev.writeAttr(SUMO_ATTR_TYPE, typeID); } - if (departProcedure == DEPART_TRIGGERED) { - dev.writeAttr(SUMO_ATTR_DEPART, "triggered"); - } else if (departProcedure == DEPART_CONTAINER_TRIGGERED) { - dev.writeAttr(SUMO_ATTR_DEPART, "containerTriggered"); + // write depart depending of tag + if (tag == SUMO_TAG_FLOW) { + dev.writeAttr(SUMO_ATTR_BEGIN, getDepart()); } else { - dev.writeAttr(SUMO_ATTR_DEPART, time2string(depart)); + dev.writeAttr(SUMO_ATTR_DEPART, getDepart()); } - // 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); + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTLANE, getDepartLane()); } else if (oc.exists("departlane") && 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_LAST: - val = "last"; - break; - case DEPART_POS_BASE: - val = "base"; - break; - case DEPART_POS_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS, val); + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS, getDepartPos()); } else if (oc.exists("departpos") && oc.isSet("departpos")) { dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS, oc.getString("departpos")); } // departPosLat if (wasSet(VEHPARS_DEPARTPOSLAT_SET)) { - std::string val; - switch (departPosLatProcedure) { - case DEPART_POSLAT_GIVEN: - val = toString(departPos); - break; - case DEPART_POSLAT_RANDOM: - val = "random"; - break; - case DEPART_POSLAT_RANDOM_FREE: - val = "random_free"; - break; - case DEPART_POSLAT_FREE: - val = "free"; - break; - case DEPART_POSLAT_RIGHT: - val = "right"; - break; - case DEPART_POSLAT_CENTER: - val = "center"; - break; - case DEPART_POSLAT_LEFT: - val = "left"; - break; - case DEPART_POSLAT_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS_LAT, val); + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS_LAT, getDepartPosLat()); } + // 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); + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTSPEED, getDepartSpeed()); } else if (oc.exists("departspeed") && 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); + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALLANE, getArrivalLane()); } else if (oc.exists("arrivallane") && 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_CENTER: - val = "center"; - break; - case ARRIVAL_POS_MAX: - val = "max"; - break; - case ARRIVAL_POS_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS, val); + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS, getArrivalPos()); } else if (oc.exists("arrivalpos") && oc.isSet("arrivalpos")) { dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS, oc.getString("arrivalpos")); } // arrivalPosLat if (wasSet(VEHPARS_ARRIVALPOSLAT_SET)) { - std::string val; - switch (arrivalPosLatProcedure) { - case ARRIVAL_POSLAT_GIVEN: - val = toString(arrivalPos); - break; - case ARRIVAL_POSLAT_RIGHT: - val = "right"; - break; - case ARRIVAL_POSLAT_CENTER: - val = "center"; - break; - case ARRIVAL_POSLAT_LEFT: - val = "left"; - break; - case ARRIVAL_POSLAT_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS_LAT, val); + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS_LAT, getArrivalPosLat()); } // 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); + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALSPEED, getArrivalSpeed()); } else if (oc.exists("arrivalspeed") && oc.isSet("arrivalspeed")) { dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALSPEED, oc.getString("arrivalspeed")); } - // color if (wasSet(VEHPARS_COLOR_SET)) { dev.writeAttr(SUMO_ATTR_COLOR, color); } + // line if (wasSet(VEHPARS_LINE_SET)) { dev.writeAttr(SUMO_ATTR_LINE, line); } + // from TAZ if (wasSet(VEHPARS_FROM_TAZ_SET)) { dev.writeAttr(SUMO_ATTR_FROM_TAZ, fromTaz); } + // to TAZ if (wasSet(VEHPARS_TO_TAZ_SET)) { dev.writeAttr(SUMO_ATTR_TO_TAZ, toTaz); } + // person number if (wasSet(VEHPARS_PERSON_NUMBER_SET)) { dev.writeAttr(SUMO_ATTR_PERSON_NUMBER, personNumber); } + // container number if (wasSet(VEHPARS_CONTAINER_NUMBER_SET)) { dev.writeAttr(SUMO_ATTR_CONTAINER_NUMBER, containerNumber); } @@ -337,6 +189,9 @@ if ((parametersSet & STOP_EXPECTED_CONTAINERS_SET) != 0) { dev.writeAttr(SUMO_ATTR_EXPECTED_CONTAINERS, awaitedContainers); } + if ((parametersSet & STOP_TRIP_ID_SET) != 0) { + dev.writeAttr(SUMO_ATTR_TRIP_ID, tripId); + } dev.closeTag(); } @@ -597,4 +452,213 @@ } +std::string +SUMOVehicleParameter::getDepart() const { + if (departProcedure == DEPART_TRIGGERED) { + return "triggered"; + } else if (departProcedure == DEPART_CONTAINER_TRIGGERED) { + return "containerTriggered"; + } else { + return time2string(depart); + } +} + + +std::string +SUMOVehicleParameter::getDepartLane() const { + 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; + } + return val; +} + + +std::string +SUMOVehicleParameter::getDepartPos() const { + 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_LAST: + val = "last"; + break; + case DEPART_POS_BASE: + val = "base"; + break; + case DEPART_POS_DEFAULT: + default: + break; + } + return val; +} + + +std::string +SUMOVehicleParameter::getDepartPosLat() const { + std::string val; + switch (departPosLatProcedure) { + case DEPART_POSLAT_GIVEN: + val = toString(departPos); + break; + case DEPART_POSLAT_RANDOM: + val = "random"; + break; + case DEPART_POSLAT_RANDOM_FREE: + val = "random_free"; + break; + case DEPART_POSLAT_FREE: + val = "free"; + break; + case DEPART_POSLAT_RIGHT: + val = "right"; + break; + case DEPART_POSLAT_CENTER: + val = "center"; + break; + case DEPART_POSLAT_LEFT: + val = "left"; + break; + case DEPART_POSLAT_DEFAULT: + default: + break; + } + return val; +} + + +std::string +SUMOVehicleParameter::getDepartSpeed() const { + 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; + } + return val; +} + + +std::string +SUMOVehicleParameter::getArrivalLane() const { + 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; + } + return val; +} + + +std::string +SUMOVehicleParameter::getArrivalPos() const { + std::string val; + switch (arrivalPosProcedure) { + case ARRIVAL_POS_GIVEN: + val = toString(arrivalPos); + break; + case ARRIVAL_POS_RANDOM: + val = "random"; + break; + case ARRIVAL_POS_CENTER: + val = "center"; + break; + case ARRIVAL_POS_MAX: + val = "max"; + break; + case ARRIVAL_POS_DEFAULT: + default: + break; + } + return val; +} + + +std::string +SUMOVehicleParameter::getArrivalPosLat() const { + std::string val; + switch (arrivalPosLatProcedure) { + case ARRIVAL_POSLAT_GIVEN: + val = toString(arrivalPos); + break; + case ARRIVAL_POSLAT_RIGHT: + val = "right"; + break; + case ARRIVAL_POSLAT_CENTER: + val = "center"; + break; + case ARRIVAL_POSLAT_LEFT: + val = "left"; + break; + case ARRIVAL_POSLAT_DEFAULT: + default: + break; + } + return val; +} + + +std::string +SUMOVehicleParameter::getArrivalSpeed() const { + 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; + } + return val; +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParameter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -48,22 +48,25 @@ 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 << 16; -const int VEHPARS_DEPARTPOSLAT_SET = 2 << 17; -const int VEHPARS_ARRIVALPOSLAT_SET = 2 << 18; -const int VEHPARS_VIA_SET = 2 << 19; +const int VEHPARS_END_SET = 2 << 4; +const int VEHPARS_NUMBER_SET = 2 << 5; +const int VEHPARS_PERIOD_SET = 2 << 6; +const int VEHPARS_VPH_SET = 2 << 7; +const int VEHPARS_PROB_SET = 2 << 8; +const int VEHPARS_ROUTE_SET = 2 << 9; +const int VEHPARS_ARRIVALLANE_SET = 2 << 10; +const int VEHPARS_ARRIVALPOS_SET = 2 << 11; +const int VEHPARS_ARRIVALSPEED_SET = 2 << 12; +const int VEHPARS_LINE_SET = 2 << 13; +const int VEHPARS_FROM_TAZ_SET = 2 << 14; +const int VEHPARS_TO_TAZ_SET = 2 << 15; +const int VEHPARS_FORCE_REROUTE = 2 << 16; +const int VEHPARS_PERSON_CAPACITY_SET = 2 << 17; +const int VEHPARS_PERSON_NUMBER_SET = 2 << 18; +const int VEHPARS_CONTAINER_NUMBER_SET = 2 << 19; +const int VEHPARS_DEPARTPOSLAT_SET = 2 << 20; +const int VEHPARS_ARRIVALPOSLAT_SET = 2 << 21; +const int VEHPARS_VIA_SET = 2 << 22; const int STOP_INDEX_END = -1; const int STOP_INDEX_FIT = -2; @@ -75,6 +78,7 @@ const int STOP_EXPECTED_SET = 2 << 3; const int STOP_CONTAINER_TRIGGER_SET = 2 << 4; const int STOP_EXPECTED_CONTAINERS_SET = 2 << 5; +const int STOP_TRIP_ID_SET = 2 << 6; // =========================================================================== @@ -286,7 +290,7 @@ SUMOVehicleParameter(); /// @brief Destructor - ~SUMOVehicleParameter(); + virtual ~SUMOVehicleParameter(); /** @brief Returns whether the given parameter was set * @param[in] what The parameter which one asks for @@ -452,8 +456,10 @@ /// @brief The vehicle's route id std::string routeid; + /// @brief The vehicle's type id std::string vtypeid; + /// @brief The vehicle's color, TraCI may change this mutable RGBColor color; @@ -482,7 +488,6 @@ DepartSpeedDefinition departSpeedProcedure; /// @} - /// @name Arrival definition /// @{ @@ -504,7 +509,6 @@ ArrivalSpeedDefinition arrivalSpeedProcedure; /// @} - /// @name Repetition definition /// @{ @@ -520,7 +524,6 @@ SUMOTime repetitionEnd; /// @} - /// @brief The vehicle's line (mainly for public transport) mutable std::string line; @@ -562,7 +565,9 @@ std::set awaitedPersons; /// @brief IDs of containers the vehicle has to wait for until departing std::set awaitedContainers; - /// @brief lanes and positions connected to this stop + /// @brief id of the trip within a cyclical public transport route + std::string tripId; + /// @brief lanes and positions connected to this stop (only used by duarouter where Stop is used to store stopping places) std::vector > accessPos; /// @brief at which position in the stops list int index; @@ -592,6 +597,33 @@ /// @brief Information for the router which parameter were set, TraCI may modify this (whe changing color) mutable int parametersSet; +protected: + /// @brief obtain depart parameter in string format + std::string getDepart() const; + + /// @brief obtain depart lane parameter in string format + std::string getDepartLane() const; + + /// @brief obtain depart pos parameter in string format + std::string getDepartPos() const; + + /// @brief obtain depart pos lat parameter in string format + std::string getDepartPosLat() const; + + /// @brief obtain depart speed parameter in string format + std::string getDepartSpeed() const; + + /// @brief obtain arrival lane parameter in string format + std::string getArrivalLane() const; + + /// @brief obtain arrival pos parameter in string format + std::string getArrivalPos() const; + + /// @brief obtain arrival pos lat parameter in string format + std::string getArrivalPosLat() const; + + /// @brief obtain arrival speed parameter in string format + std::string getArrivalSpeed() const; }; #endif diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.cpp sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,913 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMOVehicleParserHelper.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Axel Wegener +/// @author Michael Behrisch +/// @author Laura Bieker +/// @date Mon, 07.04.2008 +/// @version $Id$ +/// +// Helper methods for parsing vehicle attributes +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "SUMOVehicleParserHelper.h" + + +// =========================================================================== +// static members +// =========================================================================== +SUMOVehicleParserHelper::CFAttrMap SUMOVehicleParserHelper::allowedCFModelAttrs; +SUMOVehicleParserHelper::LCAttrMap SUMOVehicleParserHelper::allowedLCModelAttrs; +std::set SUMOVehicleParserHelper::allowedJMAttrs; + + +// =========================================================================== +// method definitions +// =========================================================================== +SUMOVehicleParameter* +SUMOVehicleParserHelper::parseFlowAttributes(const SUMOSAXAttributes& attrs, const SUMOTime beginDefault, const SUMOTime endDefault, bool isPerson) { + bool ok = true; + std::string id = attrs.get(SUMO_ATTR_ID, nullptr, ok); + if (!SUMOXMLDefinitions::isValidVehicleID(id)) { + throw ProcessError("Invalid flow id '" + id + "'."); + } + if (attrs.hasAttribute(SUMO_ATTR_PERIOD) && attrs.hasAttribute(SUMO_ATTR_VEHSPERHOUR)) { + throw ProcessError("At most one of '" + attrs.getName(SUMO_ATTR_PERIOD) + + "' 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_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_PERSONSPERHOUR) || attrs.hasAttribute(SUMO_ATTR_PROB)) { + if (attrs.hasAttribute(SUMO_ATTR_END) && attrs.hasAttribute(SUMO_ATTR_NUMBER)) { + throw ProcessError("If '" + attrs.getName(SUMO_ATTR_PERIOD) + + "', '" + 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 + "'."); + } + } else { + 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 + "'."); + } + } + SUMOVehicleParameter* ret = new SUMOVehicleParameter(); + ret->id = id; + if (isPerson) { + ret->vtypeid = DEFAULT_PEDTYPE_ID; + } + try { + parseCommonAttributes(attrs, ret, "flow"); + } catch (ProcessError&) { + delete ret; + throw; + } + + // parse repetition information + if (attrs.hasAttribute(SUMO_ATTR_PERIOD)) { + ret->parametersSet |= VEHPARS_PERIOD_SET; + ret->repetitionOffset = attrs.getSUMOTimeReporting(SUMO_ATTR_PERIOD, id.c_str(), ok); + } + if (attrs.hasAttribute(SUMO_ATTR_VEHSPERHOUR)) { + ret->parametersSet |= VEHPARS_VPH_SET; + const double vph = attrs.get(SUMO_ATTR_VEHSPERHOUR, id.c_str(), ok); + if (ok && vph <= 0) { + delete ret; + throw ProcessError("Invalid repetition rate in the definition of flow '" + id + "'."); + } + if (ok && vph != 0) { + ret->repetitionOffset = TIME2STEPS(3600. / vph); + } + } + if (attrs.hasAttribute(SUMO_ATTR_PERSONSPERHOUR)) { + ret->parametersSet |= VEHPARS_VPH_SET; + const double vph = attrs.get(SUMO_ATTR_PERSONSPERHOUR, id.c_str(), ok); + if (ok && vph <= 0) { + delete ret; + throw ProcessError("Invalid repetition rate in the definition of personFlow '" + id + "'."); + } + if (ok && vph != 0) { + ret->repetitionOffset = TIME2STEPS(3600. / vph); + } + } + if (attrs.hasAttribute(SUMO_ATTR_PROB)) { + ret->parametersSet |= VEHPARS_PROB_SET; + 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)) { + ret->depart = attrs.getSUMOTimeReporting(SUMO_ATTR_BEGIN, id.c_str(), ok); + } + if (ok && ret->depart < 0) { + delete ret; + throw ProcessError("Negative begin time in the definition of flow '" + id + "'."); + } + ret->repetitionEnd = endDefault; + if (ret->repetitionEnd < 0) { + ret->repetitionEnd = SUMOTime_MAX; + } + if (attrs.hasAttribute(SUMO_ATTR_END)) { + ret->repetitionEnd = attrs.getSUMOTimeReporting(SUMO_ATTR_END, id.c_str(), ok); + ret->parametersSet |= VEHPARS_END_SET; + } else if (!attrs.hasAttribute(SUMO_ATTR_NUMBER) && + // see SUMOTIME_MAXSTRING (which differs slightly from SUMOTime_MAX) + (endDefault >= TIME2STEPS(9223372036854773) || endDefault < 0)) { + WRITE_WARNING("Undefined end for flow '" + id + "', defaulting to 24hour duration."); + ret->repetitionEnd = ret->depart + TIME2STEPS(24 * 3600); + } + if (ok && ret->repetitionEnd < ret->depart) { + delete ret; + throw ProcessError("Flow '" + id + "' ends before its begin time."); + } + if (attrs.hasAttribute(SUMO_ATTR_NUMBER)) { + ret->repetitionNumber = attrs.get(SUMO_ATTR_NUMBER, id.c_str(), ok); + ret->parametersSet |= VEHPARS_NUMBER_SET; + if (ret->repetitionNumber == 0) { + WRITE_WARNING("Flow '" + id + "' has 0 vehicles; will skip it."); + } else { + if (ok && ret->repetitionNumber < 0) { + delete ret; + throw ProcessError("Negative repetition number in the definition of flow '" + id + "'."); + } + if (ok && ret->repetitionOffset < 0) { + ret->repetitionOffset = (ret->repetitionEnd - ret->depart) / ret->repetitionNumber; + } + } + ret->repetitionEnd = ret->depart + ret->repetitionNumber * ret->repetitionOffset; + } else { + // interpret repetitionNumber + if (ok && ret->repetitionProbability > 0) { + ret->repetitionNumber = std::numeric_limits::max(); + } else { + if (ok && ret->repetitionOffset <= 0) { + delete ret; + throw ProcessError("Invalid repetition rate in the definition of flow '" + id + "'."); + } + if (ret->repetitionEnd == SUMOTime_MAX) { + ret->repetitionNumber = std::numeric_limits::max(); + } else { + const double repLength = (double)(ret->repetitionEnd - ret->depart); + ret->repetitionNumber = (int)ceil(repLength / ret->repetitionOffset); + } + } + } + if (!ok) { + delete ret; + throw ProcessError(); + } + return ret; +} + + +SUMOVehicleParameter* +SUMOVehicleParserHelper::parseVehicleAttributes(const SUMOSAXAttributes& attrs, + const bool optionalID, const bool skipDepart, const bool isPerson) { + bool ok = true; + std::string id, errorMsg; + if (optionalID) { + id = attrs.getOpt(SUMO_ATTR_ID, nullptr, ok, ""); + } else { + id = attrs.get(SUMO_ATTR_ID, nullptr, ok); + if (!SUMOXMLDefinitions::isValidVehicleID(id)) { + throw ProcessError("Invalid vehicle id '" + id + "'."); + } + } + SUMOVehicleParameter* ret = new SUMOVehicleParameter(); + ret->id = id; + if (isPerson) { + ret->vtypeid = DEFAULT_PEDTYPE_ID; + } + try { + parseCommonAttributes(attrs, ret, "vehicle"); + 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); + } + } + } catch (ProcessError&) { + delete ret; + throw; + } + return ret; +} + + +void +SUMOVehicleParserHelper::parseCommonAttributes(const SUMOSAXAttributes& attrs, + SUMOVehicleParameter* ret, std::string element) { + //ret->refid = attrs.getStringSecure(SUMO_ATTR_REFID, ""); + bool ok = true; + // parse route information + if (attrs.hasAttribute(SUMO_ATTR_ROUTE)) { + ret->parametersSet |= VEHPARS_ROUTE_SET; // !!! needed? + ret->routeid = attrs.get(SUMO_ATTR_ROUTE, ret->id.c_str(), ok); + } + // parse type information + if (attrs.hasAttribute(SUMO_ATTR_TYPE)) { + ret->parametersSet |= VEHPARS_VTYPE_SET; // !!! needed? + ret->vtypeid = attrs.get(SUMO_ATTR_TYPE, ret->id.c_str(), ok); + } + // parse line information + if (attrs.hasAttribute(SUMO_ATTR_LINE)) { + ret->parametersSet |= VEHPARS_LINE_SET; // !!! needed? + ret->line = attrs.get(SUMO_ATTR_LINE, ret->id.c_str(), ok); + } + // parse zone information + if (attrs.hasAttribute(SUMO_ATTR_FROM_TAZ)) { + ret->parametersSet |= 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->parametersSet |= 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, nullptr, ok, false)) { + ret->parametersSet |= VEHPARS_FORCE_REROUTE; + } + + std::string error; + // parse depart lane information + if (attrs.hasAttribute(SUMO_ATTR_DEPARTLANE)) { + ret->parametersSet |= VEHPARS_DEPARTLANE_SET; + 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); + } + } + // parse depart position information + if (attrs.hasAttribute(SUMO_ATTR_DEPARTPOS)) { + ret->parametersSet |= VEHPARS_DEPARTPOS_SET; + 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); + } + } + // parse lateral depart position information + if (attrs.hasAttribute(SUMO_ATTR_DEPARTPOS_LAT)) { + ret->parametersSet |= VEHPARS_DEPARTPOSLAT_SET; + const std::string helper = attrs.get(SUMO_ATTR_DEPARTPOS_LAT, ret->id.c_str(), ok); + if (!SUMOVehicleParameter::parseDepartPosLat(helper, element, ret->id, ret->departPosLat, ret->departPosLatProcedure, error)) { + throw ProcessError(error); + } + } + // parse depart speed information + if (attrs.hasAttribute(SUMO_ATTR_DEPARTSPEED)) { + ret->parametersSet |= VEHPARS_DEPARTSPEED_SET; + 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); + } + } + + // parse arrival lane information + if (attrs.hasAttribute(SUMO_ATTR_ARRIVALLANE)) { + ret->parametersSet |= VEHPARS_ARRIVALLANE_SET; + 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); + } + } + // parse arrival position information + if (attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS)) { + ret->parametersSet |= VEHPARS_ARRIVALPOS_SET; + 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); + } + } + // parse lateral arrival position information + if (attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS_LAT)) { + ret->parametersSet |= VEHPARS_ARRIVALPOSLAT_SET; + std::string helper = attrs.get(SUMO_ATTR_ARRIVALPOS_LAT, ret->id.c_str(), ok); + if (!SUMOVehicleParameter::parseArrivalPosLat(helper, element, ret->id, ret->arrivalPosLat, ret->arrivalPosLatProcedure, error)) { + throw ProcessError(error); + } + } + // parse arrival speed information + if (attrs.hasAttribute(SUMO_ATTR_ARRIVALSPEED)) { + ret->parametersSet |= VEHPARS_ARRIVALSPEED_SET; + 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); + } + } + + // parse color + if (attrs.hasAttribute(SUMO_ATTR_COLOR)) { + ret->parametersSet |= VEHPARS_COLOR_SET; + ret->color = attrs.get(SUMO_ATTR_COLOR, ret->id.c_str(), ok); + } else { + ret->color = RGBColor::DEFAULT_COLOR; + } + // parse person number + if (attrs.hasAttribute(SUMO_ATTR_PERSON_NUMBER)) { + ret->parametersSet |= VEHPARS_PERSON_NUMBER_SET; + ret->personNumber = attrs.get(SUMO_ATTR_PERSON_NUMBER, ret->id.c_str(), ok); + } + // parse container number + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_NUMBER)) { + ret->parametersSet |= VEHPARS_CONTAINER_NUMBER_SET; + ret->containerNumber = attrs.get(SUMO_ATTR_CONTAINER_NUMBER, ret->id.c_str(), ok); + } + /*/ parse via + if (attrs.hasAttribute(SUMO_ATTR_VIA)) { + ret->setParameter |= VEHPARS_VIA_SET; + SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_VIA, ret->id.c_str(), ok), ret->via); + } + */ +} + + +SUMOVTypeParameter* +SUMOVehicleParserHelper::beginVTypeParsing(const SUMOSAXAttributes& attrs, const std::string& file) { + bool ok = true; + std::string id = attrs.get(SUMO_ATTR_ID, nullptr, ok); + if (!SUMOXMLDefinitions::isValidTypeID(id)) { + throw ProcessError("Invalid vType id '" + id + "'."); + } + SUMOVehicleClass vClass = SVC_PASSENGER; + if (attrs.hasAttribute(SUMO_ATTR_VCLASS)) { + vClass = parseVehicleClass(attrs, id); + } + SUMOVTypeParameter* vtype = new SUMOVTypeParameter(id, vClass); + if (attrs.hasAttribute(SUMO_ATTR_VCLASS)) { + vtype->parametersSet |= VTYPEPARS_VEHICLECLASS_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_LENGTH)) { + vtype->length = attrs.get(SUMO_ATTR_LENGTH, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_LENGTH_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_MINGAP)) { + vtype->minGap = attrs.get(SUMO_ATTR_MINGAP, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_MINGAP_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_MAXSPEED)) { + vtype->maxSpeed = attrs.get(SUMO_ATTR_MAXSPEED, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_MAXSPEED_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_SPEEDFACTOR)) { + vtype->speedFactor.parse(attrs.get(SUMO_ATTR_SPEEDFACTOR, vtype->id.c_str(), ok)); + vtype->parametersSet |= VTYPEPARS_SPEEDFACTOR_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_SPEEDDEV)) { + vtype->speedFactor.getParameter()[1] = attrs.get(SUMO_ATTR_SPEEDDEV, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_SPEEDFACTOR_SET; + } + // validate speed distribution + std::string error; + if (!vtype->speedFactor.isValid(error)) { + WRITE_ERROR("Invalid speed distribution when parsing vType '" + vtype->id + "' (" + error + ")"); + throw ProcessError(); + } + if (attrs.hasAttribute(SUMO_ATTR_ACTIONSTEPLENGTH)) { + double actionStepLengthSecs = attrs.get(SUMO_ATTR_ACTIONSTEPLENGTH, vtype->id.c_str(), ok); + vtype->actionStepLength = processActionStepLength(actionStepLengthSecs); + vtype->parametersSet |= VTYPEPARS_ACTIONSTEPLENGTH_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_HASDRIVERSTATE)) { + vtype->hasDriverState = attrs.get(SUMO_ATTR_HASDRIVERSTATE, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_HASDRIVERSTATE_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_EMISSIONCLASS)) { + vtype->emissionClass = PollutantsInterface::getClassByName(attrs.getOpt(SUMO_ATTR_EMISSIONCLASS, id.c_str(), ok, "")); + vtype->parametersSet |= VTYPEPARS_EMISSIONCLASS_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_IMPATIENCE)) { + // allow empty attribute because .sbx saves this only as float + bool ok2; + if (attrs.get(SUMO_ATTR_IMPATIENCE, vtype->id.c_str(), ok2, false) == "off") { + vtype->impatience = -std::numeric_limits::max(); + } else { + vtype->impatience = attrs.get(SUMO_ATTR_IMPATIENCE, vtype->id.c_str(), ok); + } + vtype->parametersSet |= VTYPEPARS_IMPATIENCE_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_WIDTH)) { + vtype->width = attrs.get(SUMO_ATTR_WIDTH, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_WIDTH_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_HEIGHT)) { + vtype->height = attrs.get(SUMO_ATTR_HEIGHT, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_HEIGHT_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_GUISHAPE)) { + vtype->shape = parseGuiShape(attrs, vtype->id); + vtype->parametersSet |= VTYPEPARS_SHAPE_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_OSGFILE)) { + vtype->osgFile = attrs.get(SUMO_ATTR_OSGFILE, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_OSGFILE_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_IMGFILE)) { + vtype->imgFile = attrs.get(SUMO_ATTR_IMGFILE, vtype->id.c_str(), ok); + if (vtype->imgFile != "" && !FileHelpers::isAbsolute(vtype->imgFile)) { + vtype->imgFile = FileHelpers::getConfigurationRelative(file, vtype->imgFile); + } + vtype->parametersSet |= VTYPEPARS_IMGFILE_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_COLOR)) { + vtype->color = attrs.get(SUMO_ATTR_COLOR, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_COLOR_SET; + } else { + vtype->color = RGBColor::YELLOW; + } + if (attrs.hasAttribute(SUMO_ATTR_PROB)) { + vtype->defaultProbability = attrs.get(SUMO_ATTR_PROB, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_PROBABILITY_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_LANE_CHANGE_MODEL)) { + vtype->parametersSet |= VTYPEPARS_LANE_CHANGE_MODEL_SET; + std::string lcmS = attrs.get(SUMO_ATTR_LANE_CHANGE_MODEL, vtype->id.c_str(), ok); + if (lcmS == "JE2013") { + WRITE_WARNING("Lane change model 'JE2013' is deprecated. Using default model instead."); + lcmS = "default"; + } + if (SUMOXMLDefinitions::LaneChangeModels.hasString(lcmS)) { + vtype->lcModel = SUMOXMLDefinitions::LaneChangeModels.get(lcmS); + } else { + WRITE_ERROR("Unknown lane change model '" + lcmS + "' when parsing vType '" + vtype->id + "'"); + throw ProcessError(); + } + } + if (attrs.hasAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL)) { + const std::string cfmS = attrs.get(SUMO_ATTR_CAR_FOLLOW_MODEL, vtype->id.c_str(), ok); + if (SUMOXMLDefinitions::CarFollowModels.hasString(cfmS)) { + vtype->cfModel = SUMOXMLDefinitions::CarFollowModels.get(cfmS); + vtype->parametersSet |= VTYPEPARS_CAR_FOLLOW_MODEL; + } else { + WRITE_ERROR("Unknown car following model '" + cfmS + "' 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->parametersSet |= VTYPEPARS_PERSON_CAPACITY; + } + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_CAPACITY)) { + vtype->containerCapacity = attrs.get(SUMO_ATTR_CONTAINER_CAPACITY, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_CONTAINER_CAPACITY; + } + if (attrs.hasAttribute(SUMO_ATTR_BOARDING_DURATION)) { + vtype->boardingDuration = attrs.getSUMOTimeReporting(SUMO_ATTR_BOARDING_DURATION, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_BOARDING_DURATION; + } + if (attrs.hasAttribute(SUMO_ATTR_LOADING_DURATION)) { + vtype->loadingDuration = attrs.getSUMOTimeReporting(SUMO_ATTR_LOADING_DURATION, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_LOADING_DURATION; + } + if (attrs.hasAttribute(SUMO_ATTR_MAXSPEED_LAT)) { + vtype->maxSpeedLat = attrs.get(SUMO_ATTR_MAXSPEED_LAT, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_MAXSPEED_LAT_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_MINGAP_LAT)) { + vtype->minGapLat = attrs.get(SUMO_ATTR_MINGAP_LAT, vtype->id.c_str(), ok); + vtype->parametersSet |= VTYPEPARS_MINGAP_LAT_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_LATALIGNMENT)) { + const std::string alignS = attrs.get(SUMO_ATTR_LATALIGNMENT, vtype->id.c_str(), ok); + if (SUMOXMLDefinitions::LateralAlignments.hasString(alignS)) { + vtype->latAlignment = SUMOXMLDefinitions::LateralAlignments.get(alignS); + vtype->parametersSet |= VTYPEPARS_LATALIGNMENT_SET; + } else { + WRITE_ERROR("Unknown lateral alignment '" + alignS + "' when parsing vType '" + vtype->id + "'"); + throw ProcessError(); + } + } + parseVTypeEmbedded(*vtype, vtype->cfModel, attrs, true); + parseLCParams(*vtype, vtype->lcModel, attrs); + parseJMParams(*vtype, attrs); + if (!ok) { + delete vtype; + throw ProcessError(); + } + return vtype; +} + + +void +SUMOVehicleParserHelper::parseVTypeEmbedded(SUMOVTypeParameter& into, + const SumoXMLTag element, const SUMOSAXAttributes& attrs, + const bool fromVType) { + const CFAttrMap& allowedAttrs = getAllowedCFModelAttrs(); + CFAttrMap::const_iterator cf_it = allowedAttrs.find(element); + if (cf_it == allowedAttrs.end()) { + if (SUMOXMLDefinitions::Tags.has((int)element)) { + WRITE_ERROR("Unknown car following model " + toString(element) + " when parsing vType '" + into.id + "'"); + } else { + WRITE_ERROR("Unknown car following model when parsing vType '" + into.id + "'"); + } + throw ProcessError(); + return; + } + if (!fromVType) { + into.cfModel = cf_it->first; + into.parametersSet |= VTYPEPARS_CAR_FOLLOW_MODEL; + } + bool ok = true; + for (std::set::const_iterator it = cf_it->second.begin(); it != cf_it->second.end(); ++it) { + if (attrs.hasAttribute(*it)) { + into.cfParameter[*it] = attrs.get(*it, into.id.c_str(), ok); + if (*it == SUMO_ATTR_TAU && string2time(into.cfParameter[*it]) < DELTA_T && gSimulation) { + WRITE_WARNING("Value of tau=" + toString(into.cfParameter[*it]) + + " in car following model '" + toString(into.cfModel) + "' lower than simulation step size may cause collisions"); + } + } + } + if (!ok) { + throw ProcessError(); + } +} + + +const SUMOVehicleParserHelper::CFAttrMap& +SUMOVehicleParserHelper::getAllowedCFModelAttrs() { + // init on first use + if (allowedCFModelAttrs.size() == 0) { + std::set kraussParams; + kraussParams.insert(SUMO_ATTR_ACCEL); + kraussParams.insert(SUMO_ATTR_DECEL); + kraussParams.insert(SUMO_ATTR_APPARENTDECEL); + kraussParams.insert(SUMO_ATTR_EMERGENCYDECEL); + kraussParams.insert(SUMO_ATTR_SIGMA); + kraussParams.insert(SUMO_ATTR_TAU); + allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS] = kraussParams; + allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_ORIG1] = kraussParams; + allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_PLUS_SLOPE] = kraussParams; + std::set allParams(kraussParams); + + std::set kraussXParams(kraussParams); + kraussXParams.insert(SUMO_ATTR_TMP1); + kraussXParams.insert(SUMO_ATTR_TMP2); + kraussXParams.insert(SUMO_ATTR_TMP3); + kraussXParams.insert(SUMO_ATTR_TMP4); + kraussXParams.insert(SUMO_ATTR_TMP5); + allowedCFModelAttrs[SUMO_TAG_CF_KRAUSSX] = kraussXParams; + allParams.insert(kraussXParams.begin(), kraussXParams.end()); + + std::set smartSKParams; + smartSKParams.insert(SUMO_ATTR_ACCEL); + smartSKParams.insert(SUMO_ATTR_DECEL); + smartSKParams.insert(SUMO_ATTR_EMERGENCYDECEL); + smartSKParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + smartSKParams.insert(SUMO_ATTR_SIGMA); + smartSKParams.insert(SUMO_ATTR_TAU); + smartSKParams.insert(SUMO_ATTR_TMP1); + smartSKParams.insert(SUMO_ATTR_TMP2); + smartSKParams.insert(SUMO_ATTR_TMP3); + smartSKParams.insert(SUMO_ATTR_TMP4); + smartSKParams.insert(SUMO_ATTR_TMP5); + allowedCFModelAttrs[SUMO_TAG_CF_SMART_SK] = smartSKParams; + allParams.insert(smartSKParams.begin(), smartSKParams.end()); + + std::set daniel1Params; + daniel1Params.insert(SUMO_ATTR_ACCEL); + daniel1Params.insert(SUMO_ATTR_DECEL); + daniel1Params.insert(SUMO_ATTR_EMERGENCYDECEL); + daniel1Params.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + daniel1Params.insert(SUMO_ATTR_SIGMA); + daniel1Params.insert(SUMO_ATTR_TAU); + daniel1Params.insert(SUMO_ATTR_TMP1); + daniel1Params.insert(SUMO_ATTR_TMP2); + daniel1Params.insert(SUMO_ATTR_TMP3); + daniel1Params.insert(SUMO_ATTR_TMP4); + daniel1Params.insert(SUMO_ATTR_TMP5); + allowedCFModelAttrs[SUMO_TAG_CF_DANIEL1] = daniel1Params; + allParams.insert(daniel1Params.begin(), daniel1Params.end()); + + std::set pwagParams; + pwagParams.insert(SUMO_ATTR_ACCEL); + pwagParams.insert(SUMO_ATTR_DECEL); + pwagParams.insert(SUMO_ATTR_EMERGENCYDECEL); + pwagParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + pwagParams.insert(SUMO_ATTR_SIGMA); + pwagParams.insert(SUMO_ATTR_TAU); + pwagParams.insert(SUMO_ATTR_CF_PWAGNER2009_TAULAST); + pwagParams.insert(SUMO_ATTR_CF_PWAGNER2009_APPROB); + allowedCFModelAttrs[SUMO_TAG_CF_PWAGNER2009] = pwagParams; + allParams.insert(pwagParams.begin(), pwagParams.end()); + + std::set idmParams; + idmParams.insert(SUMO_ATTR_ACCEL); + idmParams.insert(SUMO_ATTR_DECEL); + idmParams.insert(SUMO_ATTR_EMERGENCYDECEL); + idmParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + idmParams.insert(SUMO_ATTR_TAU); + idmParams.insert(SUMO_ATTR_CF_IDM_DELTA); + idmParams.insert(SUMO_ATTR_CF_IDM_STEPPING); + allowedCFModelAttrs[SUMO_TAG_CF_IDM] = idmParams; + allParams.insert(idmParams.begin(), idmParams.end()); + + std::set idmmParams; + idmmParams.insert(SUMO_ATTR_ACCEL); + idmmParams.insert(SUMO_ATTR_DECEL); + idmmParams.insert(SUMO_ATTR_EMERGENCYDECEL); + idmmParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + idmmParams.insert(SUMO_ATTR_TAU); + idmmParams.insert(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR); + idmmParams.insert(SUMO_ATTR_CF_IDMM_ADAPT_TIME); + idmmParams.insert(SUMO_ATTR_CF_IDM_STEPPING); + allowedCFModelAttrs[SUMO_TAG_CF_IDMM] = idmmParams; + allParams.insert(idmmParams.begin(), idmmParams.end()); + + std::set bkernerParams; + bkernerParams.insert(SUMO_ATTR_ACCEL); + bkernerParams.insert(SUMO_ATTR_DECEL); + bkernerParams.insert(SUMO_ATTR_EMERGENCYDECEL); + bkernerParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + bkernerParams.insert(SUMO_ATTR_TAU); + bkernerParams.insert(SUMO_ATTR_K); + bkernerParams.insert(SUMO_ATTR_CF_KERNER_PHI); + allowedCFModelAttrs[SUMO_TAG_CF_BKERNER] = bkernerParams; + allParams.insert(bkernerParams.begin(), bkernerParams.end()); + + std::set wiedemannParams; + wiedemannParams.insert(SUMO_ATTR_ACCEL); + wiedemannParams.insert(SUMO_ATTR_DECEL); + wiedemannParams.insert(SUMO_ATTR_EMERGENCYDECEL); + wiedemannParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + wiedemannParams.insert(SUMO_ATTR_CF_WIEDEMANN_SECURITY); + wiedemannParams.insert(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION); + allowedCFModelAttrs[SUMO_TAG_CF_WIEDEMANN] = wiedemannParams; + allParams.insert(wiedemannParams.begin(), wiedemannParams.end()); + + std::set railParams; + railParams.insert(SUMO_ATTR_TRAIN_TYPE); + allowedCFModelAttrs[SUMO_TAG_CF_RAIL] = railParams; + allParams.insert(railParams.begin(), railParams.end()); + + std::set ACCParams; + ACCParams.insert(SUMO_ATTR_ACCEL); + ACCParams.insert(SUMO_ATTR_DECEL); + ACCParams.insert(SUMO_ATTR_EMERGENCYDECEL); + ACCParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + ACCParams.insert(SUMO_ATTR_TAU); + ACCParams.insert(SUMO_ATTR_SC_GAIN); + ACCParams.insert(SUMO_ATTR_GCC_GAIN_SPEED); + ACCParams.insert(SUMO_ATTR_GCC_GAIN_SPACE); + ACCParams.insert(SUMO_ATTR_GC_GAIN_SPEED); + ACCParams.insert(SUMO_ATTR_GC_GAIN_SPACE); + ACCParams.insert(SUMO_ATTR_CA_GAIN_SPEED); + ACCParams.insert(SUMO_ATTR_CA_GAIN_SPACE); + allowedCFModelAttrs[SUMO_TAG_CF_ACC] = ACCParams; + allParams.insert(ACCParams.begin(), ACCParams.end()); + + std::set CACCParams; + CACCParams.insert(SUMO_ATTR_ACCEL); + CACCParams.insert(SUMO_ATTR_DECEL); + CACCParams.insert(SUMO_ATTR_EMERGENCYDECEL); + CACCParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); + CACCParams.insert(SUMO_ATTR_TAU); + CACCParams.insert(SUMO_ATTR_SC_GAIN_CACC); + CACCParams.insert(SUMO_ATTR_GCC_GAIN_GAP_CACC); + CACCParams.insert(SUMO_ATTR_GCC_GAIN_GAP_DOT_CACC); + CACCParams.insert(SUMO_ATTR_GC_GAIN_GAP_CACC); + CACCParams.insert(SUMO_ATTR_GC_GAIN_GAP_DOT_CACC); + CACCParams.insert(SUMO_ATTR_CA_GAIN_GAP_CACC); + CACCParams.insert(SUMO_ATTR_CA_GAIN_GAP_DOT_CACC); + CACCParams.insert(SUMO_ATTR_GCC_GAIN_SPEED); + CACCParams.insert(SUMO_ATTR_GCC_GAIN_SPACE); + CACCParams.insert(SUMO_ATTR_GC_GAIN_SPEED); + CACCParams.insert(SUMO_ATTR_GC_GAIN_SPACE); + CACCParams.insert(SUMO_ATTR_CA_GAIN_SPEED); + CACCParams.insert(SUMO_ATTR_CA_GAIN_SPACE); + allowedCFModelAttrs[SUMO_TAG_CF_CACC] = CACCParams; + allParams.insert(CACCParams.begin(), CACCParams.end()); + + std::set ccParams; + ccParams.insert(SUMO_ATTR_ACCEL); + ccParams.insert(SUMO_ATTR_DECEL); + ccParams.insert(SUMO_ATTR_TAU); + ccParams.insert(SUMO_ATTR_CF_CC_C1); + ccParams.insert(SUMO_ATTR_CF_CC_CCDECEL); + ccParams.insert(SUMO_ATTR_CF_CC_CONSTSPACING); + ccParams.insert(SUMO_ATTR_CF_CC_KP); + ccParams.insert(SUMO_ATTR_CF_CC_LAMBDA); + ccParams.insert(SUMO_ATTR_CF_CC_OMEGAN); + ccParams.insert(SUMO_ATTR_CF_CC_TAU); + ccParams.insert(SUMO_ATTR_CF_CC_XI); + ccParams.insert(SUMO_ATTR_CF_CC_LANES_COUNT); + ccParams.insert(SUMO_ATTR_CF_CC_CCACCEL); + ccParams.insert(SUMO_ATTR_CF_CC_PLOEG_KP); + ccParams.insert(SUMO_ATTR_CF_CC_PLOEG_KD); + ccParams.insert(SUMO_ATTR_CF_CC_PLOEG_H); + ccParams.insert(SUMO_ATTR_CF_CC_FLATBED_KA); + ccParams.insert(SUMO_ATTR_CF_CC_FLATBED_KV); + ccParams.insert(SUMO_ATTR_CF_CC_FLATBED_KP); + ccParams.insert(SUMO_ATTR_CF_CC_FLATBED_D); + ccParams.insert(SUMO_ATTR_CF_CC_FLATBED_H); + allowedCFModelAttrs[SUMO_TAG_CF_CC] = ccParams; + allParams.insert(ccParams.begin(), ccParams.end()); + + allowedCFModelAttrs[SUMO_TAG_NOTHING] = allParams; + } + return allowedCFModelAttrs; +} + + +void +SUMOVehicleParserHelper::parseLCParams(SUMOVTypeParameter& into, LaneChangeModel model, const SUMOSAXAttributes& attrs) { + if (allowedLCModelAttrs.size() == 0) { + // init static map + std::set lc2013Params; + lc2013Params.insert(SUMO_ATTR_LCA_STRATEGIC_PARAM); + lc2013Params.insert(SUMO_ATTR_LCA_COOPERATIVE_PARAM); + lc2013Params.insert(SUMO_ATTR_LCA_SPEEDGAIN_PARAM); + lc2013Params.insert(SUMO_ATTR_LCA_KEEPRIGHT_PARAM); + lc2013Params.insert(SUMO_ATTR_LCA_OPPOSITE_PARAM); + lc2013Params.insert(SUMO_ATTR_LCA_LOOKAHEADLEFT); + lc2013Params.insert(SUMO_ATTR_LCA_SPEEDGAINRIGHT); + lc2013Params.insert(SUMO_ATTR_LCA_MAXSPEEDLATSTANDING); + lc2013Params.insert(SUMO_ATTR_LCA_MAXSPEEDLATFACTOR); + lc2013Params.insert(SUMO_ATTR_LCA_ASSERTIVE); + lc2013Params.insert(SUMO_ATTR_LCA_EXPERIMENTAL1); + allowedLCModelAttrs[LCM_LC2013] = lc2013Params; + + std::set sl2015Params = lc2013Params; + sl2015Params.insert(SUMO_ATTR_LCA_PUSHY); + sl2015Params.insert(SUMO_ATTR_LCA_PUSHYGAP); + sl2015Params.insert(SUMO_ATTR_LCA_SUBLANE_PARAM); + sl2015Params.insert(SUMO_ATTR_LCA_IMPATIENCE); + sl2015Params.insert(SUMO_ATTR_LCA_TIME_TO_IMPATIENCE); + sl2015Params.insert(SUMO_ATTR_LCA_ACCEL_LAT); + sl2015Params.insert(SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE); + allowedLCModelAttrs[LCM_SL2015] = sl2015Params; + + std::set noParams; + allowedLCModelAttrs[LCM_DK2008] = noParams; + + // default model may be either LC2013 or SL2015 + // we allow both sets (sl2015 is a superset of lc2013Params) + allowedLCModelAttrs[LCM_DEFAULT] = sl2015Params; + } + bool ok = true; + std::set allowed = allowedLCModelAttrs[model]; + for (std::set::const_iterator it = allowed.begin(); it != allowed.end(); it++) { + if (attrs.hasAttribute(*it)) { + into.lcParameter[*it] = attrs.get(*it, into.id.c_str(), ok); + } + } + if (!ok) { + throw ProcessError(); + } +} + + +void +SUMOVehicleParserHelper::parseJMParams(SUMOVTypeParameter& into, const SUMOSAXAttributes& attrs) { + if (allowedJMAttrs.size() == 0) { + // init static set (there is only one model) + allowedJMAttrs.insert(SUMO_ATTR_JM_CROSSING_GAP); + allowedJMAttrs.insert(SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME); + allowedJMAttrs.insert(SUMO_ATTR_JM_DRIVE_RED_SPEED); + allowedJMAttrs.insert(SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME); + allowedJMAttrs.insert(SUMO_ATTR_JM_IGNORE_FOE_SPEED); + allowedJMAttrs.insert(SUMO_ATTR_JM_IGNORE_FOE_PROB); + allowedJMAttrs.insert(SUMO_ATTR_JM_SIGMA_MINOR); + allowedJMAttrs.insert(SUMO_ATTR_JM_TIMEGAP_MINOR); + } + bool ok = true; + for (std::set::const_iterator it = allowedJMAttrs.begin(); it != allowedJMAttrs.end(); it++) { + if (attrs.hasAttribute(*it)) { + into.jmParameter[*it] = attrs.get(*it, into.id.c_str(), ok); + } + } + if (!ok) { + throw ProcessError(); + } +} + + +SUMOVehicleClass +SUMOVehicleParserHelper::parseVehicleClass(const SUMOSAXAttributes& attrs, + const std::string& id) { + SUMOVehicleClass vclass = SVC_IGNORING; + try { + bool ok = true; + std::string vclassS = attrs.getOpt(SUMO_ATTR_VCLASS, id.c_str(), ok, ""); + if (vclassS == "") { + return vclass; + } + 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."); + } + return vclass; +} + + +SUMOVehicleShape +SUMOVehicleParserHelper::parseGuiShape(const SUMOSAXAttributes& attrs, const std::string& id) { + bool ok = true; + std::string vclassS = attrs.getOpt(SUMO_ATTR_GUISHAPE, id.c_str(), ok, ""); + if (SumoVehicleShapeStrings.hasString(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; + } +} + + +double +SUMOVehicleParserHelper::parseWalkPos(SumoXMLAttr attr, const std::string& id, double maxPos, const std::string& val, std::mt19937* rng) { + double result; + std::string error; + ArrivalPosDefinition proc; + // only supports 'random' and 'max' + if (!SUMOVehicleParameter::parseArrivalPos(val, toString(SUMO_TAG_WALK), id, result, proc, error)) { + throw ProcessError(error); + } + if (proc == ARRIVAL_POS_RANDOM) { + result = RandHelper::rand(maxPos, rng); + } else if (proc == ARRIVAL_POS_CENTER) { + result = maxPos / 2.; + } else if (proc == ARRIVAL_POS_MAX) { + result = maxPos; + } + return SUMOVehicleParameter::interpretEdgePos(result, maxPos, attr, id); +} + + +SUMOTime +SUMOVehicleParserHelper::processActionStepLength(double given) { + SUMOTime result = TIME2STEPS(given); + if (result <= 0) { + if (result < 0) { + std::stringstream ss; + ss << "The parameter action-step-length must be a non-negative multiple of the simulation step-length. Ignoring given value (=" + << STEPS2TIME(result) << " s.)"; + WRITE_WARNING(ss.str()); + } + result = DELTA_T; + } else if (result % DELTA_T != 0) { + std::stringstream ss; + result = (SUMOTime)(DELTA_T * floor(double(result) / double(DELTA_T))); + result = MAX2(DELTA_T, result); + if (fabs(given * 1000. - double(result)) > NUMERICAL_EPS) { + ss << "The parameter action-step-length must be a non-negative multiple of the simulation step-length. Parsing given value (" + << given << " s.) to the adjusted value " + << STEPS2TIME(result) << " s."; + WRITE_WARNING(ss.str()); + } + } + return result; +} + + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVehicleParserHelper.h 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,195 @@ +/****************************************************************************/ +// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +// Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. +// This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v2.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v20.html +// SPDX-License-Identifier: EPL-2.0 +/****************************************************************************/ +/// @file SUMOVehicleParserHelper.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Laura Bieker +/// @date Mon, 07.04.2008 +/// @version $Id$ +/// +// Helper methods for parsing vehicle attributes +/****************************************************************************/ +#ifndef SUMOVehicleParserHelper_h +#define SUMOVehicleParserHelper_h + + +// =========================================================================== +// included modules +// =========================================================================== +#include + +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class SUMOSAXAttributes; +class SUMOVehicleParameter; +class SUMOVTypeParameter; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class SUMOVehicleParserHelper + * @brief Helper methods for parsing vehicle attributes + * + * This class supports helper methods for parsing a vehicle's attributes. + */ +class SUMOVehicleParserHelper { +public: + /** @brief Parses a flow's attributes + * + * Parses all attributes stored in "SUMOVehicleParameter". + * + * @see SUMOVehicleParameter + * @param[in] attr The SAX-attributes to get vehicle parameter from + * @return The parsed attribute structure if no error occurred, 0 otherwise + * @exception ProcessError If an attribute's value is invalid + * @note: the caller is responsible for deleting the returned pointer + */ + static SUMOVehicleParameter* parseFlowAttributes(const SUMOSAXAttributes& attrs, const SUMOTime beginDefault, const SUMOTime endDefault, bool isPerson = false); + + + /** @brief Parses a vehicle's attributes + * + * Parses all attributes stored in "SUMOVehicleParameter". + * + * @see SUMOVehicleParameter + * @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 occurred, 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, + const bool optionalID = false, const bool skipDepart = false, const bool isPerson = false); + + + /** @brief Starts to parse a vehicle type + * + * @param[in] attr The SAX-attributes to get vehicle parameter from + * @param[in] file The name of the file being parsed (for resolving paths) + * @exception ProcessError If an attribute's value is invalid + * @see SUMOVTypeParameter + * @note: the caller is responsible for deleting the returned pointer + */ + static SUMOVTypeParameter* beginVTypeParsing(const SUMOSAXAttributes& attrs, const std::string& file); + + + /** @brief Parses an element embedded in vtype definition + * + * @param[in, filled] into The structure to fill with parsed values + * @param[in] element The id of the currently parsed XML-element + * @param[in] attr The SAX-attributes to get vehicle parameter from + * @param[in] fromVType Whether the attributes are a part of the vtype-definition + * @exception ProcessError If an attribute's value is invalid + * @see SUMOVTypeParameter + */ + static void parseVTypeEmbedded(SUMOVTypeParameter& into, + const SumoXMLTag element, const SUMOSAXAttributes& attrs, + const bool fromVType = false); + + /// @brief Parses lane change model attributes + static void parseLCParams(SUMOVTypeParameter& into, LaneChangeModel model, const SUMOSAXAttributes& attrs); + + /// @brief Parses junction model attributes + static void parseJMParams(SUMOVTypeParameter& into, const SUMOSAXAttributes& attrs); + + /** @brief Parses the vehicle class + * + * 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_IGNORING) + * is returned. + * + * @param[in] attrs The attributes to read the class from + * @param[in] id The id of the parsed element, for error message generation + * @return The parsed vehicle class + * @see SUMOVehicleClass + * @todo Recheck how errors are handled and what happens if they occure + */ + static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes& attrs, const std::string& id); + + + /** @brief Parses the vehicle class + * + * When given, the vehicle class is parsed using getVehicleShapeID. + * Exceptions occuring within this process are catched and reported. + * + * If no vehicle class is available in the attributes, the default class (SVS_UNKNOWN) + * is returned. + * + * @param[in] attrs The attributes to read the class from + * @param[in] id The id of the parsed element, for error message generation + * @return The parsed vehicle shape + * @see SUMOVehicleShape + * @todo Recheck how errors are handled and what happens if they occure + */ + static SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes& attrs, const std::string& id); + + /// @brief parse departPos or arrivalPos for a walk + static double parseWalkPos(SumoXMLAttr attr, const std::string& id, double maxPos, const std::string& val, std::mt19937* rng = 0); + + + /** @brief Checks and converts given value for the action step length from seconds + * to miliseconds assuring it being a positive multiple of the simulation step width + * + * @param[in] given The value parsed from the configuration (seconds). + * @return The milisecond value rounded to the next positive multiple of the simulation step length. + */ + static SUMOTime processActionStepLength(double given); + + +private: + /** @brief Parses attributes common to vehicles and flows + * + * Parses all attributes stored in "SUMOVehicleParameter". + * + * @see SUMOVehicleParameter + * @param[in] attr The SAX-attributes to get vehicle parameter from + * @param[out] ret The parameter to parse into + * @param[in] element The name of the element (vehicle or flow) + * @exception ProcessError If an attribute's value is invalid + */ + static void parseCommonAttributes(const SUMOSAXAttributes& attrs, + SUMOVehicleParameter* ret, std::string element); + + + typedef std::map > CFAttrMap; + typedef std::map > LCAttrMap; + + // returns allowed attrs for each known CF-model (init on first use) + static const CFAttrMap& getAllowedCFModelAttrs(); + + // brief allowed attrs for each known CF-model + static CFAttrMap allowedCFModelAttrs; + // brief allowed attrs for each known LC-model + static LCAttrMap allowedLCModelAttrs; + // brief allowed attrs for the junction model + static std::set allowedJMAttrs; + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.cpp sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.cpp --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.cpp 2018-11-30 23:00:17.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -49,6 +49,7 @@ cfModel(SUMO_TAG_CF_KRAUSS), hasDriverState(false), lcModel(LCM_DEFAULT), maxSpeedLat(1.0), latAlignment(LATALIGN_CENTER), minGapLat(0.6), + carriageLength(-1), locomotiveLength(-1), carriageGap(1), parametersSet(0), saved(false), onlyReferenced(false) { const OptionsCont& oc = OptionsCont::getOptions(); if (oc.exists("carfollow.model")) { @@ -113,7 +114,7 @@ maxSpeed = 130. / 3.6; width = 2.55; height = 4.; - shape = SVS_TRUCK_SEMITRAILER; + shape = SVS_TRUCK_1TRAILER; osgFile = "car-microcargo-citrus.obj"; personCapacity = 2; containerCapacity = 2; @@ -147,6 +148,8 @@ width = 2.4; height = 3.2; shape = SVS_RAIL_CAR; + carriageLength = 5.71; // http://de.wikipedia.org/wiki/Bombardier_Flexity_Berlin + locomotiveLength = 5.71; personCapacity = 120; emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass); break; @@ -156,6 +159,8 @@ width = 3.0; height = 3.6; shape = SVS_RAIL_CAR; + carriageLength = 18.4; // https://en.wikipedia.org/wiki/DBAG_Class_481 + locomotiveLength = 18.4; personCapacity = 300; emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass); break; @@ -165,6 +170,8 @@ width = 2.84; height = 3.75; shape = SVS_RAIL; + carriageLength = 24.5; // http://de.wikipedia.org/wiki/UIC-Y-Wagen_%28DR%29 + locomotiveLength = 16.4; // https://en.wikipedia.org/wiki/DB_Class_218 personCapacity = 434; // slight understatement (-: emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "HDV_D_EU0", vclass); @@ -175,6 +182,8 @@ width = 2.95; height = 3.89; shape = SVS_RAIL; + carriageLength = 24.775; // http://de.wikipedia.org/wiki/ICE_3 + locomotiveLength = 25.835; personCapacity = 425; emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass); break; @@ -382,6 +391,17 @@ } } + +std::string +SUMOVTypeParameter::getJMParamString(const SumoXMLAttr attr, const std::string defaultValue) const { + if (jmParameter.count(attr)) { + return jmParameter.find(attr)->second; + } else { + return defaultValue; + } +} + + double SUMOVTypeParameter::getDefaultAccel(const SUMOVehicleClass vc) { switch (vc) { diff -Nru sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.h sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.h --- sumo-1.1.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.h 2018-09-05 22:00:15.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/vehicle/SUMOVTypeParameter.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -88,6 +88,7 @@ */ SUMOVTypeParameter(const std::string& vtid, const SUMOVehicleClass vc = SVC_IGNORING); + virtual ~SUMOVTypeParameter() {}; /** @brief Returns whether the given parameter was set * @param[in] what The parameter which one asks for @@ -105,11 +106,9 @@ */ void write(OutputDevice& dev) const; - /** @brief Validates stored car-following parameter - */ + /// @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 @@ -144,6 +143,12 @@ */ double getJMParam(const SumoXMLAttr attr, const double defaultValue) 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 + */ + std::string getJMParamString(const SumoXMLAttr attr, const std::string defaultValue) const; /// @brief The vehicle type's id std::string id; @@ -221,6 +226,11 @@ /// @brief The vehicle type's minimum lateral gap [m] double minGapLat; + /// @brief the length of train carriages and locomotive + double carriageLength; + double locomotiveLength; + double carriageGap; + /// @brief Information for the router which parameter were set int parametersSet; diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/CMakeLists.txt sumo-1.2.0+dfsg1/src/utils/xml/CMakeLists.txt --- sumo-1.1.0+dfsg1/src/utils/xml/CMakeLists.txt 2018-12-18 09:58:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/CMakeLists.txt 2019-04-15 14:11:30.000000000 +0000 @@ -9,18 +9,10 @@ SUMOSAXAttributesImpl_Xerces.h SUMOSAXAttributesImpl_Cached.cpp SUMOSAXAttributesImpl_Cached.h - SUMORouteHandler.cpp - SUMORouteHandler.h - SUMORouteLoader.cpp - SUMORouteLoader.h - SUMORouteLoaderControl.cpp - SUMORouteLoaderControl.h SUMOSAXHandler.cpp SUMOSAXHandler.h SUMOSAXReader.cpp SUMOSAXReader.h - SUMOVehicleParserHelper.cpp - SUMOVehicleParserHelper.h SUMOXMLDefinitions.cpp SUMOXMLDefinitions.h SAXWeightsHandler.cpp diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/GenericSAXHandler.cpp sumo-1.2.0+dfsg1/src/utils/xml/GenericSAXHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/GenericSAXHandler.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/GenericSAXHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/GenericSAXHandler.h sumo-1.2.0+dfsg1/src/utils/xml/GenericSAXHandler.h --- sumo-1.1.0+dfsg1/src/utils/xml/GenericSAXHandler.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/GenericSAXHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/Makefile.am sumo-1.2.0+dfsg1/src/utils/xml/Makefile.am --- sumo-1.1.0+dfsg1/src/utils/xml/Makefile.am 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/Makefile.am 2019-04-15 14:11:30.000000000 +0000 @@ -5,12 +5,8 @@ SUMOSAXAttributesImpl_Binary.cpp SUMOSAXAttributesImpl_Binary.h \ SUMOSAXAttributesImpl_Xerces.cpp SUMOSAXAttributesImpl_Xerces.h \ SUMOSAXAttributesImpl_Cached.cpp SUMOSAXAttributesImpl_Cached.h \ -SUMORouteHandler.cpp SUMORouteHandler.h \ -SUMORouteLoader.cpp SUMORouteLoader.h \ -SUMORouteLoaderControl.cpp SUMORouteLoaderControl.h \ SUMOSAXHandler.cpp SUMOSAXHandler.h \ SUMOSAXReader.cpp SUMOSAXReader.h \ -SUMOVehicleParserHelper.cpp SUMOVehicleParserHelper.h \ SUMOXMLDefinitions.cpp SUMOXMLDefinitions.h \ SAXWeightsHandler.cpp SAXWeightsHandler.h \ XMLSubSys.cpp XMLSubSys.h diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/Makefile.in sumo-1.2.0+dfsg1/src/utils/xml/Makefile.in --- sumo-1.1.0+dfsg1/src/utils/xml/Makefile.in 2018-12-17 23:00:40.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,665 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 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 = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -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/xml -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) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) \ - SUMOSAXAttributes.$(OBJEXT) \ - SUMOSAXAttributesImpl_Binary.$(OBJEXT) \ - SUMOSAXAttributesImpl_Xerces.$(OBJEXT) \ - SUMOSAXAttributesImpl_Cached.$(OBJEXT) \ - SUMORouteHandler.$(OBJEXT) SUMORouteLoader.$(OBJEXT) \ - SUMORouteLoaderControl.$(OBJEXT) SUMOSAXHandler.$(OBJEXT) \ - SUMOSAXReader.$(OBJEXT) SUMOVehicleParserHelper.$(OBJEXT) \ - 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) -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 = $(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 -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp -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@ -ARFLAGS = @ARFLAGS@ -AR_FLAGS = @AR_FLAGS@ -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@ -FFMPEG_LIBS = @FFMPEG_LIBS@ -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@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -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@ -runstatedir = @runstatedir@ -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 = libxml.a -libxml_a_SOURCES = GenericSAXHandler.h GenericSAXHandler.cpp \ -SUMOSAXAttributes.cpp SUMOSAXAttributes.h \ -SUMOSAXAttributesImpl_Binary.cpp SUMOSAXAttributesImpl_Binary.h \ -SUMOSAXAttributesImpl_Xerces.cpp SUMOSAXAttributesImpl_Xerces.h \ -SUMOSAXAttributesImpl_Cached.cpp SUMOSAXAttributesImpl_Cached.h \ -SUMORouteHandler.cpp SUMORouteHandler.h \ -SUMORouteLoader.cpp SUMORouteLoader.h \ -SUMORouteLoaderControl.cpp SUMORouteLoaderControl.h \ -SUMOSAXHandler.cpp SUMOSAXHandler.h \ -SUMOSAXReader.cpp SUMOSAXReader.h \ -SUMOVehicleParserHelper.cpp SUMOVehicleParserHelper.h \ -SUMOXMLDefinitions.cpp SUMOXMLDefinitions.h \ -SAXWeightsHandler.cpp SAXWeightsHandler.h \ -XMLSubSys.cpp XMLSubSys.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) --foreign src/utils/xml/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/xml/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) - -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) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GenericSAXHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAXWeightsHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMORouteHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMORouteLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMORouteLoaderControl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOSAXAttributes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOSAXAttributesImpl_Binary.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOSAXAttributesImpl_Cached.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOSAXAttributesImpl_Xerces.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOSAXHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOSAXReader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOVehicleParserHelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOXMLDefinitions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLSubSys.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 - -.PRECIOUS: Makefile - - -# 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-1.1.0+dfsg1/src/utils/xml/SAXWeightsHandler.cpp sumo-1.2.0+dfsg1/src/utils/xml/SAXWeightsHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SAXWeightsHandler.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SAXWeightsHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SAXWeightsHandler.h sumo-1.2.0+dfsg1/src/utils/xml/SAXWeightsHandler.h --- sumo-1.1.0+dfsg1/src/utils/xml/SAXWeightsHandler.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SAXWeightsHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteHandler.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteHandler.cpp 2018-11-01 23:00:23.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteHandler.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,364 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMORouteHandler.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Sascha Krieg -/// @author Michael Behrisch -/// @date Mon, 9 Jul 2001 -/// @version $Id$ -/// -// Parser for routes during their loading -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "SUMORouteHandler.h" - - -// =========================================================================== -// method definitions -// =========================================================================== -SUMORouteHandler::SUMORouteHandler(const std::string& file, const std::string& expectedRoot) : - SUMOSAXHandler(file, XMLSubSys::isValidating() ? expectedRoot : ""), - myVehicleParameter(nullptr), - myLastDepart(-1), - myActiveRouteColor(nullptr), - myCurrentCosts(0.), - myCurrentVType(nullptr), - myBeginDefault(string2time(OptionsCont::getOptions().getString("begin"))), - myEndDefault(string2time(OptionsCont::getOptions().getString("end"))), - myFirstDepart(-1), myInsertStopEdgesAt(-1) { -} - - -SUMORouteHandler::~SUMORouteHandler() { - delete myCurrentVType; -} - - -SUMOTime -SUMORouteHandler::getLastDepart() const { - return myLastDepart; -} - - -bool -SUMORouteHandler::checkLastDepart() { - if (myVehicleParameter->departProcedure == DEPART_GIVEN) { - if (myVehicleParameter->depart < myLastDepart) { - WRITE_WARNING("Route file should be sorted by departure time, ignoring '" + myVehicleParameter->id + "'!"); - return false; - } - } - return true; -} - - -void -SUMORouteHandler::registerLastDepart() { - // register only non public transport to parse all public transport lines in advance - if (myVehicleParameter->line == "" && 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 -} - - -void -SUMORouteHandler::myStartElement(int element, - const SUMOSAXAttributes& attrs) { - switch (element) { - case SUMO_TAG_VEHICLE: - delete myVehicleParameter; - myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs); - 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: - delete myVehicleParameter; - myVehicleParameter = SUMOVehicleParserHelper::parseFlowAttributes(attrs, myBeginDefault, myEndDefault); - break; - case SUMO_TAG_VTYPE: - // XXX: Where is this deleted? Delegated to subclasses?! MSRouteHandler takes care of this, in case of RORouteHandler this is not obvious. Consider introduction of a shared_ptr - myCurrentVType = SUMOVehicleParserHelper::beginVTypeParsing(attrs, getFileName()); - break; - case SUMO_TAG_VTYPE_DISTRIBUTION: - openVehicleTypeDistribution(attrs); - break; - case SUMO_TAG_ROUTE: - openRoute(attrs); - break; - case SUMO_TAG_ROUTE_DISTRIBUTION: - openRouteDistribution(attrs); - break; - case SUMO_TAG_STOP: - addStop(attrs); - break; - case SUMO_TAG_TRIP: { - myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs, true); - if (myVehicleParameter->id == "") { - WRITE_WARNING("Omitting trip ids is deprecated!"); - myVehicleParameter->id = myIdSupplier.getNext(); - } - myVehicleParameter->parametersSet |= VEHPARS_FORCE_REROUTE; - myActiveRouteID = "!" + myVehicleParameter->id; - break; - } - case SUMO_TAG_PERSONTRIP: - case SUMO_TAG_WALK: - if (attrs.hasAttribute(SUMO_ATTR_EDGES) || attrs.hasAttribute(SUMO_ATTR_ROUTE)) { - addWalk(attrs); - } else { - addPersonTrip(attrs); - } - break; - case SUMO_TAG_INTERVAL: { - bool ok; - myBeginDefault = attrs.getSUMOTimeReporting(SUMO_ATTR_BEGIN, nullptr, ok); - myEndDefault = attrs.getSUMOTimeReporting(SUMO_ATTR_END, nullptr, ok); - break; - } - case SUMO_TAG_PARAM: - addParam(attrs); - break; - default: - // parse embedded car following model information - if (myCurrentVType != nullptr) { - WRITE_WARNING("Defining car following parameters in a nested element is deprecated in vType '" + myCurrentVType->id + "', use attributes instead!"); - SUMOVehicleParserHelper::parseVTypeEmbedded(*myCurrentVType, (SumoXMLTag)element, attrs); - } - break; - } -} - - -void -SUMORouteHandler::myEndElement(int element) { - switch (element) { - case SUMO_TAG_ROUTE: - closeRoute(); - break; - case SUMO_TAG_PERSON: - closePerson(); - delete myVehicleParameter; - myVehicleParameter = nullptr; - break; - case SUMO_TAG_CONTAINER: - closeContainer(); - delete myVehicleParameter; - myVehicleParameter = nullptr; - break; - case SUMO_TAG_VEHICLE: - if (myVehicleParameter->repetitionNumber > 0) { - myVehicleParameter->repetitionNumber++; // for backwards compatibility - // it is a flow, thus no break here - FALLTHROUGH; - } else { - closeVehicle(); - delete myVehicleParameter; - myVehicleParameter = nullptr; - break; - } - case SUMO_TAG_FLOW: - closeFlow(); - break; - case SUMO_TAG_VTYPE_DISTRIBUTION: - closeVehicleTypeDistribution(); - break; - case SUMO_TAG_ROUTE_DISTRIBUTION: - closeRouteDistribution(); - break; - case SUMO_TAG_INTERVAL: - myBeginDefault = string2time(OptionsCont::getOptions().getString("begin")); - myEndDefault = string2time(OptionsCont::getOptions().getString("end")); - break; - default: - break; - } -} - - -bool -SUMORouteHandler::checkStopPos(double& startPos, double& endPos, const double laneLength, - const double minLength, const bool friendlyPos) { - if (minLength > laneLength) { - return false; - } - if (startPos < 0) { - startPos += laneLength; - } - if (endPos < 0) { - endPos += laneLength; - } - if (endPos < minLength || endPos > laneLength) { - if (!friendlyPos) { - return false; - } - if (endPos < minLength) { - endPos = minLength; - } - if (endPos > laneLength) { - endPos = laneLength; - } - } - if (startPos < 0 || startPos > endPos - minLength) { - if (!friendlyPos) { - return false; - } - if (startPos < 0) { - startPos = 0; - } - if (startPos > endPos - minLength) { - startPos = endPos - minLength; - } - } - return true; -} - - -void -SUMORouteHandler::addParam(const SUMOSAXAttributes& attrs) { - bool ok = true; - const std::string key = attrs.get(SUMO_ATTR_KEY, nullptr, ok); - // circumventing empty string test - const std::string val = attrs.hasAttribute(SUMO_ATTR_VALUE) ? attrs.getString(SUMO_ATTR_VALUE) : ""; - if (myVehicleParameter != nullptr) { - myVehicleParameter->setParameter(key, val); - } else if (myCurrentVType != nullptr) { - myCurrentVType->setParameter(key, val); - } -} - - -bool -SUMORouteHandler::parseStop(SUMOVehicleParameter::Stop& stop, const SUMOSAXAttributes& attrs, std::string errorSuffix, MsgHandler* const errorOutput) { - stop.parametersSet = 0; - if (attrs.hasAttribute(SUMO_ATTR_ENDPOS)) { - stop.parametersSet |= STOP_END_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_STARTPOS)) { - stop.parametersSet |= STOP_START_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_TRIGGERED)) { - stop.parametersSet |= STOP_TRIGGER_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_TRIGGERED)) { - stop.parametersSet |= STOP_CONTAINER_TRIGGER_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_PARKING)) { - stop.parametersSet |= STOP_PARKING_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_EXPECTED)) { - stop.parametersSet |= STOP_EXPECTED_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_EXPECTED_CONTAINERS)) { - stop.parametersSet |= STOP_EXPECTED_CONTAINERS_SET; - } - bool ok = true; - stop.busstop = attrs.getOpt(SUMO_ATTR_BUS_STOP, nullptr, ok, ""); - stop.chargingStation = attrs.getOpt(SUMO_ATTR_CHARGING_STATION, nullptr, ok, ""); - stop.containerstop = attrs.getOpt(SUMO_ATTR_CONTAINER_STOP, nullptr, ok, ""); - stop.parkingarea = attrs.getOpt(SUMO_ATTR_PARKING_AREA, nullptr, ok, ""); - if (stop.busstop != "") { - errorSuffix = " at '" + stop.busstop + "'" + errorSuffix; - } else if (stop.chargingStation != "") { - errorSuffix = " at '" + stop.chargingStation + "'" + errorSuffix; - } else if (stop.containerstop != "") { - errorSuffix = " at '" + stop.containerstop + "'" + errorSuffix; - } else if (stop.parkingarea != "") { - errorSuffix = " at '" + stop.parkingarea + "'" + 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, nullptr, ok, true); - stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, nullptr, ok, false); - } else { - stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, nullptr, ok, true); - stop.containerTriggered = attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, nullptr, ok, false); - } - stop.duration = -1; - stop.until = -1; - } else { - stop.duration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DURATION, nullptr, ok, -1); - stop.until = attrs.getOptSUMOTimeReporting(SUMO_ATTR_UNTIL, nullptr, 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, nullptr, ok, false); - stop.containerTriggered = attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, nullptr, ok, false); - } - stop.parking = attrs.getOpt(SUMO_ATTR_PARKING, nullptr, ok, stop.triggered || stop.containerTriggered || stop.parkingarea != ""); - if (stop.parkingarea != "" && !stop.parking) { - ok = false; - } - 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, nullptr, ok, ""); - std::set personIDs; - SUMOSAXAttributes::parseStringSet(expectedStr, personIDs); - stop.awaitedPersons = personIDs; - - // expected containers - std::string expectedContainersStr = attrs.getOpt(SUMO_ATTR_EXPECTED_CONTAINERS, nullptr, ok, ""); - std::set containerIDs; - SUMOSAXAttributes::parseStringSet(expectedContainersStr, containerIDs); - stop.awaitedContainers = containerIDs; - - const std::string idx = attrs.getOpt(SUMO_ATTR_INDEX, nullptr, 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, nullptr, ok); - if (!ok || stop.index < 0) { - errorOutput->inform("Invalid 'index' for stop" + errorSuffix); - return false; - } - } - return true; -} - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteHandler.h sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteHandler.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteHandler.h 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteHandler.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,206 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMORouteHandler.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 9 Jul 2001 -/// @version $Id$ -/// -// Parser for routes during their loading -/****************************************************************************/ -#ifndef SUMORouteHandler_h -#define SUMORouteHandler_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class MsgHandler; -class SUMOVTypeParameter; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class SUMORouteHandler - * @brief Parser for routes during their loading - * - * SUMORouteHandler is the abstract super class for routers - * and simulation loading routes. - */ -class SUMORouteHandler : public SUMOSAXHandler { -public: - /// standard constructor - SUMORouteHandler(const std::string& file, const std::string& expectedRoot); - - /// standard destructor - virtual ~SUMORouteHandler(); - - /// Returns the last loaded depart time - SUMOTime getLastDepart() const; - - /// check start and end position of a stop - static bool checkStopPos(double& startPos, double& endPos, const double laneLength, - const double minLength, const bool friendlyPos); - - /// @brief returns the first departure time that was ever read - SUMOTime getFirstDepart() const { - return myFirstDepart; - } - -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 - */ - 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); - //@} - - - /** opens a type distribution for reading */ - virtual void openVehicleTypeDistribution(const SUMOSAXAttributes& attrs) = 0; - - /** closes (ends) the building of a distribution */ - virtual void closeVehicleTypeDistribution() = 0; - - /** opens a route for reading */ - virtual void openRoute(const SUMOSAXAttributes& attrs) = 0; - - /** closes (ends) the building of a route. - Afterwards no edges may be added to it; - this method may throw exceptions when - a) the route is empty or - b) another route with the same id already exists */ - virtual void closeRoute(const bool mayBeDisconnected = false) = 0; - - /** opens a route distribution for reading */ - virtual void openRouteDistribution(const SUMOSAXAttributes& attrs) = 0; - - /** closes (ends) the building of a distribution */ - virtual void closeRouteDistribution() = 0; - - /// Ends the processing of a vehicle - virtual void closeVehicle() = 0; - - /// 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; - - /// Processing of a stop - virtual void addStop(const SUMOSAXAttributes& attrs) = 0; - - /// @brief add a routing request for a walking or intermodal person - virtual void addPersonTrip(const SUMOSAXAttributes& attrs) = 0; - - /// @brief add a fully specified walk - virtual void addWalk(const SUMOSAXAttributes& attrs) = 0; - - /// Checks whether the route file is sorted by departure time if needed - bool checkLastDepart(); - - /// save last depart (only to be used if vehicle is not discarded) - void registerLastDepart(); - - /// @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, container or flow - SUMOVehicleParameter* myVehicleParameter; - - /// @brief The insertion time of the vehicle read last - SUMOTime myLastDepart; - - /// @brief The id of the current route - std::string myActiveRouteID; - - /// @brief The id of the route the current route references to - std::string myActiveRouteRefID; - - /// @brief The probability of the current route - double myActiveRouteProbability; - - /// @brief The currently parsed route's color - const RGBColor* myActiveRouteColor; - - /// @brief The currently parsed route costs - double myCurrentCosts; - - /// @brief List of the stops on the parsed route - std::vector myActiveRouteStops; - - /// @brief The currently parsed vehicle type - SUMOVTypeParameter* myCurrentVType; - - /// generates numerical ids - IDSupplier myIdSupplier; - - /// @brief The default value for flow begins - SUMOTime myBeginDefault; - - /// @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); - - /// @brief Invalidated assignment operator - SUMORouteHandler& operator=(const SUMORouteHandler& s); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.cpp 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMORouteLoaderControl.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date Wed, 06 Nov 2002 -/// @version $Id$ -/// -// Class responsible for loading of routes from some files -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include "SUMORouteLoader.h" -#include "SUMORouteLoaderControl.h" - - -// =========================================================================== -// method definitions -// =========================================================================== -SUMORouteLoaderControl::SUMORouteLoaderControl(SUMOTime inAdvanceStepNo): - myFirstLoadTime(SUMOTime_MAX), - myCurrentLoadTime(-SUMOTime_MAX), - myInAdvanceStepNo(inAdvanceStepNo), - myRouteLoaders(), - myLoadAll(inAdvanceStepNo <= 0), - myAllLoaded(false) { -} - - -SUMORouteLoaderControl::~SUMORouteLoaderControl() { - for (std::vector::iterator i = myRouteLoaders.begin(); - i != myRouteLoaders.end(); ++i) { - delete(*i); - } -} - - -void -SUMORouteLoaderControl::add(SUMORouteLoader* loader) { - myRouteLoaders.push_back(loader); -} - - -void -SUMORouteLoaderControl::loadNext(SUMOTime step) { - // check whether new vehicles shall be loaded - // return if not - if (myAllLoaded) { - return; - } - 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) { - myCurrentLoadTime = MIN2(myCurrentLoadTime, (*i)->loadUntil(loadMaxTime)); - if ((*i)->getFirstDepart() != -1) { - myFirstLoadTime = MIN2(myFirstLoadTime, (*i)->getFirstDepart()); - } - furtherAvailable |= (*i)->moreAvailable(); - } - myAllLoaded = !furtherAvailable; -} - - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.h sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoaderControl.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMORouteLoaderControl.h -/// @author Daniel Krajzewicz -/// @author Sascha Krieg -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date Wed, 06 Nov 2002 -/// @version $Id$ -/// -// Class responsible for loading of routes from some files -/****************************************************************************/ -#ifndef SUMORouteLoaderControl_h -#define SUMORouteLoaderControl_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class SUMORouteLoader; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class SUMORouteLoaderControl - * - * SUMORouteLoaderControl - * This controls is initialised with the list of route loaders and uses them - * to load routes step wise. - * The parameter myInAdvanceStepNo holds the number of time steps to read the - * routes in forward. If it is 0 (default), all routes will be read at once. - */ -class SUMORouteLoaderControl { -public: - /// constructor - SUMORouteLoaderControl(SUMOTime inAdvanceStepNo); - - /// destructor - ~SUMORouteLoaderControl(); - - /// add another loader - void add(SUMORouteLoader* loader); - - /// 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 - SUMOTime getFirstLoadTime() const { - 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 - const SUMOTime myInAdvanceStepNo; - - /// the list of route loaders - std::vector myRouteLoaders; - - /** information whether all routes shall be loaded and whether - they were loaded */ - bool myLoadAll, myAllLoaded; - -private: - /// @brief Invalidated copy constructor - SUMORouteLoaderControl(const SUMORouteLoaderControl& src); - - /// @brief Invalidated assignment operator - SUMORouteLoaderControl& operator=(const SUMORouteLoaderControl& src); -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoader.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoader.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoader.cpp 2018-10-25 22:00:51.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoader.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMORouteLoader.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Wed, 6 Nov 2002 -/// @version $Id$ -/// -// A class that performs the loading of routes -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include "SUMORouteLoader.h" - - -// =========================================================================== -// method definitions -// =========================================================================== -SUMORouteLoader::SUMORouteLoader(SUMORouteHandler* handler) - : myParser(nullptr), myMoreAvailable(true), myHandler(handler) { - myParser = XMLSubSys::getSAXReader(*myHandler); - if (!myParser->parseFirst(myHandler->getFileName())) { - throw ProcessError("Can not read XML-file '" + myHandler->getFileName() + "'."); - } -} - - -SUMORouteLoader::~SUMORouteLoader() { - delete myParser; - delete myHandler; -} - - -SUMOTime -SUMORouteLoader::loadUntil(SUMOTime time) { - // read only when further data is available, no error occurred - // and vehicles may be found in the between the departure time of - // the last read vehicle and the time to read until - if (!myMoreAvailable) { - return SUMOTime_MAX; - } - // read vehicles until specified time or the period to read vehicles - // until is reached - while (myHandler->getLastDepart() <= time) { - if (!myParser->parseNext()) { - // no data available anymore - myMoreAvailable = false; - return SUMOTime_MAX; - } - } - return myHandler->getLastDepart(); -} - - -bool -SUMORouteLoader::moreAvailable() const { - return myMoreAvailable; -} - - -SUMOTime -SUMORouteLoader::getFirstDepart() const { - return myHandler->getFirstDepart(); -} - - -/****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoader.h sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoader.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMORouteLoader.h 2018-05-29 22:00:22.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMORouteLoader.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMORouteLoader.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Wed, 6 Nov 2002 -/// @version $Id$ -/// -// A class that performs the loading of routes -/****************************************************************************/ -#ifndef SUMORouteLoader_h -#define SUMORouteLoader_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class SUMORouteHandler; -class SUMOSAXReader; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class SUMORouteLoader - */ -class SUMORouteLoader { -public: - /// constructor - SUMORouteLoader(SUMORouteHandler* handler); - - /// destructor - ~SUMORouteLoader(); - - /** loads vehicles until a vehicle is read that starts after - the specified time */ - SUMOTime loadUntil(SUMOTime time); - - /// 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; - - /// information whether more vehicles should be available - bool myMoreAvailable; - - /// the used Handler - SUMORouteHandler* myHandler; - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributes.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributes.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributes.cpp 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributes.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include "SUMOSAXAttributes.h" @@ -109,6 +110,40 @@ } +const std::vector +SUMOSAXAttributes::getStringVector(int attr) const { + const std::vector& ret = StringTokenizer(getString(attr)).getVector(); + if (ret.empty()) { + throw EmptyData(); + } + return ret; +} + + +const std::vector +SUMOSAXAttributes::getOptStringVector(int attr, const char* objectid, bool& ok, bool report) const { + return getOpt >(attr, objectid, ok, std::vector(), report); +} + +const std::vector +SUMOSAXAttributes::getIntVector(int attr) const { + const std::vector& tmp = StringTokenizer(getString(attr)).getVector(); + if (tmp.empty()) { + throw EmptyData(); + } + std::vector ret; + for (const std::string& s : tmp) { + ret.push_back(StringUtils::toInt(s)); + } + return ret; +} + + +const std::vector +SUMOSAXAttributes::getOptIntVector(int attr, const char* objectid, bool& ok, bool report) const { + return getOpt >(attr, objectid, ok, std::vector(), report); +} + void SUMOSAXAttributes::emitUngivenError(const std::string& attrname, const char* objectid) const { std::ostringstream oss; @@ -151,24 +186,6 @@ } -void -SUMOSAXAttributes::parseStringVector(const std::string& def, std::vector& into) { - StringTokenizer st(def, " ", true); - while (st.hasNext()) { - into.push_back(st.next()); - } -} - - -void -SUMOSAXAttributes::parseStringSet(const std::string& def, std::set& into) { - StringTokenizer st(def, " ", true); - while (st.hasNext()) { - into.insert(st.next()); - } -} - - const int invalid_return::value = -1; const std::string invalid_return::type = "int"; template<> @@ -225,4 +242,19 @@ } +const std::vector invalid_return >::value = std::vector(); +const std::string invalid_return >::type = "StringVector"; +template<> +std::vector SUMOSAXAttributes::getInternal(const int attr) const { + return getStringVector(attr); +} + + +const std::vector invalid_return >::value = std::vector(); +const std::string invalid_return >::type = "StringVector"; +template<> +std::vector SUMOSAXAttributes::getInternal(const int attr) const { + return getIntVector(attr); +} + /****************************************************************************/ diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributes.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributes.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributes.h 2018-12-07 23:01:03.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributes.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -316,10 +316,12 @@ virtual SumoXMLNodeType getNodeType(bool& ok) const = 0; /** - * @brief Returns the right-of-way method + * @brief Returns the right-of-way method */ virtual RightOfWay getRightOfWay(bool& ok) const = 0; + /// @brief returns fringe type + virtual FringeType getFringeType(bool& ok) const = 0; /** * @brief Returns the value of the named attribute @@ -346,10 +348,29 @@ /** @brief Tries to read given attribute assuming it is a string vector * + * The behavior is similar to Python's string.split(), so multiple consecutive + * whitespace do not generate empty strings and leading and trailing whitespace is silently omitted. + * + * @param[in] attr The id of the attribute to read + * @return The read value if given and not empty; empty vector if an error occurred + */ + const std::vector getStringVector(int attr) const; + + /// @brief convenience function to avoid the default argument and the template stuff at getOpt<> + const std::vector getOptStringVector(int attr, const char* objectid, bool& ok, bool report = true) const; + + /** @brief Tries to read given attribute assuming it is an int vector + * + * The behavior is similar to Python's string.split(), so multiple consecutive + * whitespace do not generate empty strings and leading and trailing whitespace is silently omitted. + * * @param[in] attr The id of the attribute to read * @return The read value if given and not empty; empty vector if an error occurred */ - virtual std::vector getStringVector(int attr) const = 0; + const std::vector getIntVector(int attr) const; + + /// @brief convenience function to avoid the default argument and the template stuff at getOpt<> + const std::vector getOptIntVector(int attr, const char* objectid, bool& ok, bool report = true) const; //} @@ -367,6 +388,10 @@ */ virtual void serialize(std::ostream& os) const = 0; + /** @brief Retrieves all attribute names + */ + virtual std::vector getAttributeNames() const = 0; + /// @brief return the objecttype to which these attributes belong const std::string& getObjectType() const { @@ -383,28 +408,6 @@ static const std::string ENCODING; - /** @brief Splits the given string - * - * Spaces, ",", and ";" are assumed to be separator characters. - * Though, in the case a "," or a ";" occurs, a warning is generated (once). - * - * @param[in] def The string to split - * @param[out] into The vector to fill - */ - static void parseStringVector(const std::string& def, std::vector& into); - - - /** @brief Splits the given string, stores it in a set - * - * Spaces, ",", and ";" are assumed to be separator characters. - * Though, in the case a "," or a ";" occurs, a warning is generated (once). - * - * @param[in] def The string to split - * @param[out] into The set to fill - */ - static void parseStringSet(const std::string& def, std::set& into); - - protected: template T getInternal(const int attr) const; void emitUngivenError(const std::string& attrname, const char* objectid) const; @@ -475,6 +478,16 @@ static const std::string type; }; +template<> struct invalid_return > { + static const std::vector value; + static const std::string type; +}; + +template<> struct invalid_return > { + static const std::vector value; + static const std::string type; +}; + template T SUMOSAXAttributes::get(int attr, const char* objectid, diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -279,6 +279,19 @@ } +FringeType +SUMOSAXAttributesImpl_Binary::getFringeType(bool& ok) const { + try { + return SUMOXMLDefinitions::FringeTypeValues.get(getString(SUMO_ATTR_FRINGE)); + } catch (InvalidArgument) { + ok = false; + return FRINGE_TYPE_DEFAULT; + } catch (EmptyData) { + return FRINGE_TYPE_DEFAULT; + } +} + + RGBColor SUMOSAXAttributesImpl_Binary::getColor() const { const std::map::const_iterator i = myIntValues.find(SUMO_ATTR_COLOR); @@ -313,15 +326,6 @@ } -std::vector -SUMOSAXAttributesImpl_Binary::getStringVector(int attr) const { - std::string def = getString(attr); - std::vector ret; - parseStringVector(def, ret); - return ret; -} - - std::string SUMOSAXAttributesImpl_Binary::getName(int attr) const { if (myAttrIds.find(attr) == myAttrIds.end()) { @@ -339,6 +343,15 @@ } } +std::vector +SUMOSAXAttributesImpl_Binary::getAttributeNames() const { + std::vector result; + for (std::set::const_iterator i = myAttrs.begin(); i != myAttrs.end(); ++i) { + result.push_back(getName(*i)); + } + return result; +} + SUMOSAXAttributes* SUMOSAXAttributesImpl_Binary::clone() const { diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -232,7 +232,10 @@ SumoXMLNodeType getNodeType(bool& ok) const; /// @brief returns rightOfWay method - RightOfWay getRightOfWay(bool& ok) const; + RightOfWay getRightOfWay(bool& ok) const; + + /// @brief returns fringe type + FringeType getFringeType(bool& ok) const; /** * @brief Returns the value of the named attribute @@ -258,14 +261,6 @@ */ Boundary getBoundary(int attr) const; - /** @brief Tries to read given attribute assuming it is a string vector - * - * @param[in] attr The id of the attribute to read - * @return The read value if given and not empty; empty vector if an error occurred - */ - std::vector getStringVector(int attr) const; - - /** @brief Converts the given attribute id into a man readable string * * Returns a "?" if the attribute is not known. @@ -282,6 +277,10 @@ */ void serialize(std::ostream& os) const; + /** @brief Retrieves all attribute names + */ + std::vector getAttributeNames() const; + /// @brief return a new deep-copy attributes object SUMOSAXAttributes* clone() const; diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -49,10 +49,22 @@ myPredefinedTagsMML(predefinedTagsMML) { } -SUMOSAXAttributesImpl_Cached::~SUMOSAXAttributesImpl_Cached() { +SUMOSAXAttributesImpl_Cached::SUMOSAXAttributesImpl_Cached( + const std::map& attrs, + const std::map& predefinedTagsMML, + const std::string& objectType) : + SUMOSAXAttributes(objectType), + myPredefinedTagsMML(predefinedTagsMML) { + // parse to + for (const auto& i : attrs) { + myAttrs[toString(i.first)] = i.second; + } } +SUMOSAXAttributesImpl_Cached::~SUMOSAXAttributesImpl_Cached() { } + + bool SUMOSAXAttributesImpl_Cached::hasAttribute(int id) const { std::map::const_iterator i = myPredefinedTagsMML.find(id); @@ -170,6 +182,17 @@ return RIGHT_OF_WAY_DEFAULT; } +FringeType +SUMOSAXAttributesImpl_Cached::getFringeType(bool& ok) const { + if (hasAttribute(SUMO_ATTR_FRINGE)) { + std::string fringeString = getString(SUMO_ATTR_FRINGE); + if (SUMOXMLDefinitions::FringeTypeValues.hasString(fringeString)) { + return SUMOXMLDefinitions::FringeTypeValues.get(fringeString); + } + ok = false; + } + return FRINGE_TYPE_DEFAULT; +} RGBColor SUMOSAXAttributesImpl_Cached::getColor() const { @@ -214,15 +237,6 @@ } -std::vector -SUMOSAXAttributesImpl_Cached::getStringVector(int attr) const { - std::string def = getString(attr); - std::vector ret; - parseStringVector(def, ret); - return ret; -} - - std::string SUMOSAXAttributesImpl_Cached::getName(int attr) const { if (myPredefinedTagsMML.find(attr) == myPredefinedTagsMML.end()) { @@ -240,6 +254,14 @@ } } +std::vector +SUMOSAXAttributesImpl_Cached::getAttributeNames() const { + std::vector result; + for (std::map::const_iterator it = myAttrs.begin(); it != myAttrs.end(); ++it) { + result.push_back(it->first); + } + return result; +} SUMOSAXAttributes* SUMOSAXAttributesImpl_Cached::clone() const { diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.h 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Cached.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -45,20 +45,26 @@ public: /** @brief Constructor * - * @param[in] attrs The encapsulated xerces-attributes - * @param[in] predefinedTags Map of attribute ids to their xerces-representation + * @param[in] attrs The encapsulated xerces-attributes (string-string) * @param[in] predefinedTagsMML Map of attribute ids to their (readable) string-representation + * @param[in] objectType object type in string format */ SUMOSAXAttributesImpl_Cached(const std::map& attrs, const std::map& predefinedTagsMML, const std::string& objectType); + /** @brief Constructor + * + * @param[in] attrs The encapsulated xerces-attributes (SumoXMLAttr-string) + * @param[in] predefinedTagsMML Map of attribute ids to their (readable) string-representation + * @param[in] objectType object type in string format + */ + SUMOSAXAttributesImpl_Cached(const std::map& attrs, + const std::map& predefinedTagsMML, + const std::string& objectType); /// @brief Destructor - virtual ~SUMOSAXAttributesImpl_Cached(); - - - + ~SUMOSAXAttributesImpl_Cached(); /// @name methods for retrieving attribute values /// @{ @@ -70,7 +76,6 @@ */ bool hasAttribute(int id) const; - /** * @brief Returns the bool-value of the named (by its enum-value) attribute * @@ -88,7 +93,6 @@ */ bool getBool(int id) const; - /** * @brief Returns the int-value of the named (by its enum-value) attribute * @@ -106,7 +110,6 @@ */ int getInt(int id) const; - /** * @brief Returns the long-value of the named (by its enum-value) attribute * @@ -124,7 +127,6 @@ */ long long int getLong(int id) const; - /** * @brief Returns the string-value of the named (by its enum-value) attribute * @@ -151,9 +153,7 @@ * @return The attribute's value as a string, if it could be read and parsed * @exception EmptyData If the attribute is not known or the attribute value is an empty string */ - std::string getStringSecure(int id, - const std::string& def) const; - + std::string getStringSecure(int id, const std::string& def) const; /** * @brief Returns the double-value of the named (by its enum-value) attribute @@ -172,13 +172,9 @@ */ double getFloat(int id) const; - - /** - * @brief Returns the information whether the named attribute is within the current list - */ + /// @brief Returns the information whether the named attribute is within the current list bool hasAttribute(const std::string& id) const; - /** * @brief Returns the double-value of the named attribute * @@ -196,7 +192,6 @@ */ double getFloat(const std::string& id) const; - /** * @brief Returns the string-value of the named (by its enum-value) attribute * @@ -208,8 +203,7 @@ */ std::string getStringSecure(const std::string& id, const std::string& def) const; - //} - + /// @} /** * @brief Returns the value of the named attribute @@ -219,7 +213,6 @@ */ SumoXMLEdgeFunc getEdgeFunc(bool& ok) const; - /** * @brief Returns the value of the named attribute * @@ -229,7 +222,10 @@ SumoXMLNodeType getNodeType(bool& ok) const; /// @brief returns rightOfWay method - RightOfWay getRightOfWay(bool& ok) const; + RightOfWay getRightOfWay(bool& ok) const; + + /// @brief returns fringe type + FringeType getFringeType(bool& ok) const; /** * @brief Returns the value of the named attribute @@ -247,7 +243,6 @@ */ PositionVector getShape(int attr) const; - /** @brief Tries to read given attribute assuming it is a Boundary * * @param[in] attr The id of the attribute to read @@ -255,13 +250,6 @@ */ Boundary getBoundary(int attr) const; - /** @brief Tries to read given attribute assuming it is a string vector - * - * @param[in] attr The id of the attribute to read - * @return The read value if given and not empty; empty vector if an error occurred - */ - std::vector getStringVector(int attr) const; - /** @brief Converts the given attribute id into a man readable string * * Returns a "?" if the attribute is not known. @@ -271,13 +259,16 @@ */ std::string getName(int attr) const; - /** @brief Prints all attribute names and values into the given stream * * @param[in] os The stream to use */ void serialize(std::ostream& os) const; + /** @brief Retrieves all attribute names + */ + std::vector getAttributeNames() const; + /// @brief return a new deep-copy attributes object SUMOSAXAttributes* clone() const; @@ -290,7 +281,6 @@ */ const std::string& getAttributeValueSecure(int id) const; - private: /// @brief The encapsulated attributes std::map myAttrs; @@ -298,15 +288,12 @@ /// @brief Map of attribute ids to their (readable) string-representation const std::map& myPredefinedTagsMML; - private: /// @brief Invalidated copy constructor. - SUMOSAXAttributesImpl_Cached(const SUMOSAXAttributesImpl_Cached& src); + SUMOSAXAttributesImpl_Cached(const SUMOSAXAttributesImpl_Cached& src) = delete; /// @brief Invalidated assignment operator. - SUMOSAXAttributesImpl_Cached& operator=(const SUMOSAXAttributesImpl_Cached& src); - - + SUMOSAXAttributesImpl_Cached& operator=(const SUMOSAXAttributesImpl_Cached& src) = delete; }; diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -183,6 +183,17 @@ return RIGHT_OF_WAY_DEFAULT; } +FringeType +SUMOSAXAttributesImpl_Xerces::getFringeType(bool& ok) const { + if (hasAttribute(SUMO_ATTR_FRINGE)) { + std::string fringeString = getString(SUMO_ATTR_FRINGE); + if (SUMOXMLDefinitions::FringeTypeValues.hasString(fringeString)) { + return SUMOXMLDefinitions::FringeTypeValues.get(fringeString); + } + ok = false; + } + return FRINGE_TYPE_DEFAULT; +} RGBColor SUMOSAXAttributesImpl_Xerces::getColor() const { @@ -227,15 +238,6 @@ } -std::vector -SUMOSAXAttributesImpl_Xerces::getStringVector(int attr) const { - std::string def = getString(attr); - std::vector ret; - parseStringVector(def, ret); - return ret; -} - - std::string SUMOSAXAttributesImpl_Xerces::getName(int attr) const { if (myPredefinedTagsMML.find(attr) == myPredefinedTagsMML.end()) { @@ -254,6 +256,16 @@ } +std::vector +SUMOSAXAttributesImpl_Xerces::getAttributeNames() const { + std::vector result; + for (int i = 0; i < (int)myAttrs.getLength(); ++i) { + result.push_back(StringUtils::transcode(myAttrs.getLocalName(i))); + } + return result; +} + + SUMOSAXAttributes* SUMOSAXAttributesImpl_Xerces::clone() const { std::map attrs; diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h 2018-11-23 23:01:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -232,7 +232,10 @@ SumoXMLNodeType getNodeType(bool& ok) const; /// @brief returns rightOfWay method - RightOfWay getRightOfWay(bool& ok) const; + RightOfWay getRightOfWay(bool& ok) const; + + /// @brief returns fringe type + FringeType getFringeType(bool& ok) const; /** * @brief Returns the value of the named attribute @@ -258,13 +261,6 @@ */ Boundary getBoundary(int attr) const; - /** @brief Tries to read given attribute assuming it is a string vector - * - * @param[in] attr The id of the attribute to read - * @return The read value if given and not empty; empty vector if an error occurred - */ - std::vector getStringVector(int attr) const; - /** @brief Converts the given attribute id into a man readable string * * Returns a "?" if the attribute is not known. @@ -281,6 +277,10 @@ */ void serialize(std::ostream& os) const; + /** @brief Retrieves all attribute names + */ + std::vector getAttributeNames() const; + /// @brief return a new deep-copy attributes object SUMOSAXAttributes* clone() const; diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXHandler.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXHandler.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXHandler.cpp 2018-06-25 22:00:20.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXHandler.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXHandler.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXHandler.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXHandler.h 2018-09-03 14:26:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXHandler.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXReader.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXReader.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXReader.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXReader.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -110,7 +110,7 @@ bool SUMOSAXReader::parseFirst(std::string systemID) { - if (systemID.substr(systemID.length() - 4) == ".sbx") { + if (systemID.length() >= 4 && systemID.substr(systemID.length() - 4) == ".sbx") { myBinaryInput = new BinaryInputDevice(systemID, true, myValidationScheme == XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Always); *myBinaryInput >> mySbxVersion; if (mySbxVersion < 1 || mySbxVersion > 2) { @@ -217,26 +217,22 @@ XERCES_CPP_NAMESPACE::InputSource* SUMOSAXReader::LocalSchemaResolver::resolveEntity(const XMLCh* const /* publicId */, const XMLCh* const systemId) { const std::string url = StringUtils::transcode(systemId); - const std::string::size_type pos = url.rfind("/"); + const std::string::size_type pos = url.find("/xsd/"); 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") { - myHandler->setSchemaSeen(); - const char* sumoPath = std::getenv("SUMO_HOME"); - if (sumoPath == nullptr) { - WRITE_WARNING("Environment variable SUMO_HOME is not set, schema resolution will use slow website lookups."); - return nullptr; - } - 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."); - } + myHandler->setSchemaSeen(); + const char* sumoPath = std::getenv("SUMO_HOME"); + if (sumoPath == nullptr) { + WRITE_WARNING("Environment variable SUMO_HOME is not set, schema resolution will use slow website lookups."); + return nullptr; + } + const std::string file = sumoPath + std::string("/data") + url.substr(pos); + 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 read local schema '" + file + "', will try website lookup."); } } return nullptr; diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXReader.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXReader.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOSAXReader.h 2018-06-26 22:00:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOSAXReader.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -25,9 +25,12 @@ // =========================================================================== #include +#include +#include #include #include #include +#include "SUMOXMLDefinitions.h" // =========================================================================== diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.cpp 2018-11-21 23:00:37.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,872 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMOVehicleParserHelper.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Axel Wegener -/// @author Michael Behrisch -/// @author Laura Bieker -/// @date Mon, 07.04.2008 -/// @version $Id$ -/// -// Helper methods for parsing vehicle attributes -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "SUMOVehicleParserHelper.h" - - -// =========================================================================== -// static members -// =========================================================================== -SUMOVehicleParserHelper::CFAttrMap SUMOVehicleParserHelper::allowedCFModelAttrs; -SUMOVehicleParserHelper::LCAttrMap SUMOVehicleParserHelper::allowedLCModelAttrs; -std::set SUMOVehicleParserHelper::allowedJMAttrs; - - -// =========================================================================== -// method definitions -// =========================================================================== -SUMOVehicleParameter* -SUMOVehicleParserHelper::parseFlowAttributes(const SUMOSAXAttributes& attrs, const SUMOTime beginDefault, const SUMOTime endDefault) { - bool ok = true; - std::string id = attrs.get(SUMO_ATTR_ID, nullptr, ok); - if (!SUMOXMLDefinitions::isValidVehicleID(id)) { - throw ProcessError("Invalid flow id '" + id + "'."); - } - if (attrs.hasAttribute(SUMO_ATTR_PERIOD) && attrs.hasAttribute(SUMO_ATTR_VEHSPERHOUR)) { - throw ProcessError("At most one of '" + attrs.getName(SUMO_ATTR_PERIOD) + - "' 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_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) + - "', '" + 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 + "'."); - } - } else { - 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 + "'."); - } - } - SUMOVehicleParameter* ret = new SUMOVehicleParameter(); - ret->id = id; - try { - parseCommonAttributes(attrs, ret, "flow"); - } catch (ProcessError&) { - delete ret; - throw; - } - - // parse repetition information - if (attrs.hasAttribute(SUMO_ATTR_PERIOD)) { - ret->parametersSet |= VEHPARS_PERIODFREQ_SET; - ret->repetitionOffset = attrs.getSUMOTimeReporting(SUMO_ATTR_PERIOD, id.c_str(), ok); - } - if (attrs.hasAttribute(SUMO_ATTR_VEHSPERHOUR)) { - ret->parametersSet |= VEHPARS_PERIODFREQ_SET; - const double vph = attrs.get(SUMO_ATTR_VEHSPERHOUR, id.c_str(), ok); - if (ok && vph <= 0) { - delete ret; - throw ProcessError("Invalid repetition rate in the definition of flow '" + id + "'."); - } - if (ok && vph != 0) { - 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)) { - ret->depart = attrs.getSUMOTimeReporting(SUMO_ATTR_BEGIN, id.c_str(), ok); - } - if (ok && ret->depart < 0) { - delete ret; - throw ProcessError("Negative begin time in the definition of flow '" + id + "'."); - } - ret->repetitionEnd = endDefault; - if (ret->repetitionEnd < 0) { - ret->repetitionEnd = SUMOTime_MAX; - } - if (attrs.hasAttribute(SUMO_ATTR_END)) { - ret->repetitionEnd = attrs.getSUMOTimeReporting(SUMO_ATTR_END, id.c_str(), ok); - } else if (!attrs.hasAttribute(SUMO_ATTR_NUMBER) && - // see SUMOTIME_MAXSTRING (which differs slightly from SUMOTime_MAX) - (endDefault >= TIME2STEPS(9223372036854773) || endDefault < 0)) { - WRITE_WARNING("Undefined end for flow '" + id + "', defaulting to 24hour duration."); - ret->repetitionEnd = ret->depart + TIME2STEPS(24 * 3600); - } - if (ok && ret->repetitionEnd < ret->depart) { - delete ret; - throw ProcessError("Flow '" + id + "' ends before its begin time."); - } - if (attrs.hasAttribute(SUMO_ATTR_NUMBER)) { - ret->repetitionNumber = attrs.get(SUMO_ATTR_NUMBER, id.c_str(), ok); - ret->parametersSet |= VEHPARS_PERIODFREQ_SET; - if (ret->repetitionNumber == 0) { - WRITE_WARNING("Flow '" + id + "' has 0 vehicles; will skip it."); - } else { - if (ok && ret->repetitionNumber < 0) { - delete ret; - throw ProcessError("Negative repetition number in the definition of flow '" + id + "'."); - } - if (ok && ret->repetitionOffset < 0) { - ret->repetitionOffset = (ret->repetitionEnd - ret->depart) / ret->repetitionNumber; - } - } - ret->repetitionEnd = ret->depart + ret->repetitionNumber * ret->repetitionOffset; - } else { - // interpret repetitionNumber - if (ok && ret->repetitionProbability > 0) { - ret->repetitionNumber = std::numeric_limits::max(); - } else { - if (ok && ret->repetitionOffset <= 0) { - delete ret; - throw ProcessError("Invalid repetition rate in the definition of flow '" + id + "'."); - } - if (ret->repetitionEnd == SUMOTime_MAX) { - ret->repetitionNumber = std::numeric_limits::max(); - } else { - const double repLength = (double)(ret->repetitionEnd - ret->depart); - ret->repetitionNumber = (int)ceil(repLength / ret->repetitionOffset); - } - } - } - if (!ok) { - delete ret; - throw ProcessError(); - } - return ret; -} - - -SUMOVehicleParameter* -SUMOVehicleParserHelper::parseVehicleAttributes(const SUMOSAXAttributes& attrs, - const bool optionalID, const bool skipDepart, const bool isPerson) { - bool ok = true; - std::string id, errorMsg; - if (optionalID) { - id = attrs.getOpt(SUMO_ATTR_ID, nullptr, ok, ""); - } else { - id = attrs.get(SUMO_ATTR_ID, nullptr, ok); - if (!SUMOXMLDefinitions::isValidVehicleID(id)) { - throw ProcessError("Invalid vehicle id '" + id + "'."); - } - } - SUMOVehicleParameter* ret = new SUMOVehicleParameter(); - ret->id = id; - if (isPerson) { - ret->vtypeid = DEFAULT_PEDTYPE_ID; - } - try { - parseCommonAttributes(attrs, ret, "vehicle"); - 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); - } - } - } catch (ProcessError&) { - delete ret; - throw; - } - return ret; -} - - -void -SUMOVehicleParserHelper::parseCommonAttributes(const SUMOSAXAttributes& attrs, - SUMOVehicleParameter* ret, std::string element) { - //ret->refid = attrs.getStringSecure(SUMO_ATTR_REFID, ""); - bool ok = true; - // parse route information - if (attrs.hasAttribute(SUMO_ATTR_ROUTE)) { - ret->parametersSet |= VEHPARS_ROUTE_SET; // !!! needed? - ret->routeid = attrs.get(SUMO_ATTR_ROUTE, ret->id.c_str(), ok); - } - // parse type information - if (attrs.hasAttribute(SUMO_ATTR_TYPE)) { - ret->parametersSet |= VEHPARS_VTYPE_SET; // !!! needed? - ret->vtypeid = attrs.get(SUMO_ATTR_TYPE, ret->id.c_str(), ok); - } - // parse line information - if (attrs.hasAttribute(SUMO_ATTR_LINE)) { - ret->parametersSet |= VEHPARS_LINE_SET; // !!! needed? - ret->line = attrs.get(SUMO_ATTR_LINE, ret->id.c_str(), ok); - } - // parse zone information - if (attrs.hasAttribute(SUMO_ATTR_FROM_TAZ)) { - ret->parametersSet |= 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->parametersSet |= 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, nullptr, ok, false)) { - ret->parametersSet |= VEHPARS_FORCE_REROUTE; - } - - std::string error; - // parse depart lane information - if (attrs.hasAttribute(SUMO_ATTR_DEPARTLANE)) { - ret->parametersSet |= VEHPARS_DEPARTLANE_SET; - 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); - } - } - // parse depart position information - if (attrs.hasAttribute(SUMO_ATTR_DEPARTPOS)) { - ret->parametersSet |= VEHPARS_DEPARTPOS_SET; - 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); - } - } - // parse lateral depart position information - if (attrs.hasAttribute(SUMO_ATTR_DEPARTPOS_LAT)) { - ret->parametersSet |= VEHPARS_DEPARTPOSLAT_SET; - const std::string helper = attrs.get(SUMO_ATTR_DEPARTPOS_LAT, ret->id.c_str(), ok); - if (!SUMOVehicleParameter::parseDepartPosLat(helper, element, ret->id, ret->departPosLat, ret->departPosLatProcedure, error)) { - throw ProcessError(error); - } - } - // parse depart speed information - if (attrs.hasAttribute(SUMO_ATTR_DEPARTSPEED)) { - ret->parametersSet |= VEHPARS_DEPARTSPEED_SET; - 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); - } - } - - // parse arrival lane information - if (attrs.hasAttribute(SUMO_ATTR_ARRIVALLANE)) { - ret->parametersSet |= VEHPARS_ARRIVALLANE_SET; - 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); - } - } - // parse arrival position information - if (attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS)) { - ret->parametersSet |= VEHPARS_ARRIVALPOS_SET; - 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); - } - } - // parse lateral arrival position information - if (attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS_LAT)) { - ret->parametersSet |= VEHPARS_ARRIVALPOSLAT_SET; - std::string helper = attrs.get(SUMO_ATTR_ARRIVALPOS_LAT, ret->id.c_str(), ok); - if (!SUMOVehicleParameter::parseArrivalPosLat(helper, element, ret->id, ret->arrivalPosLat, ret->arrivalPosLatProcedure, error)) { - throw ProcessError(error); - } - } - // parse arrival speed information - if (attrs.hasAttribute(SUMO_ATTR_ARRIVALSPEED)) { - ret->parametersSet |= VEHPARS_ARRIVALSPEED_SET; - 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); - } - } - - // parse color - if (attrs.hasAttribute(SUMO_ATTR_COLOR)) { - ret->parametersSet |= VEHPARS_COLOR_SET; - ret->color = attrs.get(SUMO_ATTR_COLOR, ret->id.c_str(), ok); - } else { - ret->color = RGBColor::DEFAULT_COLOR; - } - // parse person number - if (attrs.hasAttribute(SUMO_ATTR_PERSON_NUMBER)) { - ret->parametersSet |= VEHPARS_PERSON_NUMBER_SET; - ret->personNumber = attrs.get(SUMO_ATTR_PERSON_NUMBER, ret->id.c_str(), ok); - } - // parse container number - if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_NUMBER)) { - ret->parametersSet |= VEHPARS_CONTAINER_NUMBER_SET; - ret->containerNumber = attrs.get(SUMO_ATTR_CONTAINER_NUMBER, ret->id.c_str(), ok); - } - /*/ parse via - if (attrs.hasAttribute(SUMO_ATTR_VIA)) { - ret->setParameter |= VEHPARS_VIA_SET; - SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_VIA, ret->id.c_str(), ok), ret->via); - } - */ -} - - -SUMOVTypeParameter* -SUMOVehicleParserHelper::beginVTypeParsing(const SUMOSAXAttributes& attrs, const std::string& file) { - bool ok = true; - std::string id = attrs.get(SUMO_ATTR_ID, nullptr, ok); - if (!SUMOXMLDefinitions::isValidTypeID(id)) { - throw ProcessError("Invalid vType id '" + id + "'."); - } - SUMOVehicleClass vClass = SVC_PASSENGER; - if (attrs.hasAttribute(SUMO_ATTR_VCLASS)) { - vClass = parseVehicleClass(attrs, id); - } - SUMOVTypeParameter* vtype = new SUMOVTypeParameter(id, vClass); - if (attrs.hasAttribute(SUMO_ATTR_VCLASS)) { - vtype->parametersSet |= VTYPEPARS_VEHICLECLASS_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_LENGTH)) { - vtype->length = attrs.get(SUMO_ATTR_LENGTH, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_LENGTH_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_MINGAP)) { - vtype->minGap = attrs.get(SUMO_ATTR_MINGAP, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_MINGAP_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_MAXSPEED)) { - vtype->maxSpeed = attrs.get(SUMO_ATTR_MAXSPEED, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_MAXSPEED_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_SPEEDFACTOR)) { - vtype->speedFactor.parse(attrs.get(SUMO_ATTR_SPEEDFACTOR, vtype->id.c_str(), ok)); - vtype->parametersSet |= VTYPEPARS_SPEEDFACTOR_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_SPEEDDEV)) { - vtype->speedFactor.getParameter()[1] = attrs.get(SUMO_ATTR_SPEEDDEV, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_SPEEDFACTOR_SET; - } - // validate speed distribution - std::string error; - if (!vtype->speedFactor.isValid(error)) { - WRITE_ERROR("Invalid speed distribution when parsing vType '" + vtype->id + "' (" + error + ")"); - throw ProcessError(); - } - if (attrs.hasAttribute(SUMO_ATTR_ACTIONSTEPLENGTH)) { - double actionStepLengthSecs = attrs.get(SUMO_ATTR_ACTIONSTEPLENGTH, vtype->id.c_str(), ok); - vtype->actionStepLength = processActionStepLength(actionStepLengthSecs); - vtype->parametersSet |= VTYPEPARS_ACTIONSTEPLENGTH_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_HASDRIVERSTATE)) { - vtype->hasDriverState = attrs.get(SUMO_ATTR_HASDRIVERSTATE, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_HASDRIVERSTATE_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_EMISSIONCLASS)) { - vtype->emissionClass = PollutantsInterface::getClassByName(attrs.getOpt(SUMO_ATTR_EMISSIONCLASS, id.c_str(), ok, "")); - vtype->parametersSet |= VTYPEPARS_EMISSIONCLASS_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_IMPATIENCE)) { - // allow empty attribute because .sbx saves this only as float - bool ok2; - if (attrs.get(SUMO_ATTR_IMPATIENCE, vtype->id.c_str(), ok2, false) == "off") { - vtype->impatience = -std::numeric_limits::max(); - } else { - vtype->impatience = attrs.get(SUMO_ATTR_IMPATIENCE, vtype->id.c_str(), ok); - } - vtype->parametersSet |= VTYPEPARS_IMPATIENCE_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_WIDTH)) { - vtype->width = attrs.get(SUMO_ATTR_WIDTH, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_WIDTH_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_HEIGHT)) { - vtype->height = attrs.get(SUMO_ATTR_HEIGHT, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_HEIGHT_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_GUISHAPE)) { - vtype->shape = parseGuiShape(attrs, vtype->id); - vtype->parametersSet |= VTYPEPARS_SHAPE_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_OSGFILE)) { - vtype->osgFile = attrs.get(SUMO_ATTR_OSGFILE, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_OSGFILE_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_IMGFILE)) { - vtype->imgFile = attrs.get(SUMO_ATTR_IMGFILE, vtype->id.c_str(), ok); - if (vtype->imgFile != "" && !FileHelpers::isAbsolute(vtype->imgFile)) { - vtype->imgFile = FileHelpers::getConfigurationRelative(file, vtype->imgFile); - } - vtype->parametersSet |= VTYPEPARS_IMGFILE_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_COLOR)) { - vtype->color = attrs.get(SUMO_ATTR_COLOR, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_COLOR_SET; - } else { - vtype->color = RGBColor::YELLOW; - } - if (attrs.hasAttribute(SUMO_ATTR_PROB)) { - vtype->defaultProbability = attrs.get(SUMO_ATTR_PROB, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_PROBABILITY_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_LANE_CHANGE_MODEL)) { - vtype->parametersSet |= VTYPEPARS_LANE_CHANGE_MODEL_SET; - std::string lcmS = attrs.get(SUMO_ATTR_LANE_CHANGE_MODEL, vtype->id.c_str(), ok); - if (lcmS == "JE2013") { - WRITE_WARNING("Lane change model 'JE2013' is deprecated. Using default model instead."); - lcmS = "default"; - } - if (SUMOXMLDefinitions::LaneChangeModels.hasString(lcmS)) { - vtype->lcModel = SUMOXMLDefinitions::LaneChangeModels.get(lcmS); - } else { - WRITE_ERROR("Unknown lane change model '" + lcmS + "' when parsing vType '" + vtype->id + "'"); - throw ProcessError(); - } - } - if (attrs.hasAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL)) { - const std::string cfmS = attrs.get(SUMO_ATTR_CAR_FOLLOW_MODEL, vtype->id.c_str(), ok); - if (SUMOXMLDefinitions::CarFollowModels.hasString(cfmS)) { - vtype->cfModel = SUMOXMLDefinitions::CarFollowModels.get(cfmS); - vtype->parametersSet |= VTYPEPARS_CAR_FOLLOW_MODEL; - } else { - WRITE_ERROR("Unknown car following model '" + cfmS + "' 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->parametersSet |= VTYPEPARS_PERSON_CAPACITY; - } - if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_CAPACITY)) { - vtype->containerCapacity = attrs.get(SUMO_ATTR_CONTAINER_CAPACITY, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_CONTAINER_CAPACITY; - } - if (attrs.hasAttribute(SUMO_ATTR_BOARDING_DURATION)) { - vtype->boardingDuration = attrs.getSUMOTimeReporting(SUMO_ATTR_BOARDING_DURATION, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_BOARDING_DURATION; - } - if (attrs.hasAttribute(SUMO_ATTR_LOADING_DURATION)) { - vtype->loadingDuration = attrs.getSUMOTimeReporting(SUMO_ATTR_LOADING_DURATION, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_LOADING_DURATION; - } - if (attrs.hasAttribute(SUMO_ATTR_MAXSPEED_LAT)) { - vtype->maxSpeedLat = attrs.get(SUMO_ATTR_MAXSPEED_LAT, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_MAXSPEED_LAT_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_MINGAP_LAT)) { - vtype->minGapLat = attrs.get(SUMO_ATTR_MINGAP_LAT, vtype->id.c_str(), ok); - vtype->parametersSet |= VTYPEPARS_MINGAP_LAT_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_LATALIGNMENT)) { - const std::string alignS = attrs.get(SUMO_ATTR_LATALIGNMENT, vtype->id.c_str(), ok); - if (SUMOXMLDefinitions::LateralAlignments.hasString(alignS)) { - vtype->latAlignment = SUMOXMLDefinitions::LateralAlignments.get(alignS); - vtype->parametersSet |= VTYPEPARS_LATALIGNMENT_SET; - } else { - WRITE_ERROR("Unknown lateral alignment '" + alignS + "' when parsing vType '" + vtype->id + "'"); - throw ProcessError(); - } - } - parseVTypeEmbedded(*vtype, vtype->cfModel, attrs, true); - parseLCParams(*vtype, vtype->lcModel, attrs); - parseJMParams(*vtype, attrs); - if (!ok) { - delete vtype; - throw ProcessError(); - } - return vtype; -} - - -void -SUMOVehicleParserHelper::parseVTypeEmbedded(SUMOVTypeParameter& into, - const SumoXMLTag element, const SUMOSAXAttributes& attrs, - const bool fromVType) { - const CFAttrMap& allowedAttrs = getAllowedCFModelAttrs(); - CFAttrMap::const_iterator cf_it = allowedAttrs.find(element); - if (cf_it == allowedAttrs.end()) { - if (SUMOXMLDefinitions::Tags.has((int)element)) { - WRITE_ERROR("Unknown car following model " + toString(element) + " when parsing vType '" + into.id + "'"); - } else { - WRITE_ERROR("Unknown car following model when parsing vType '" + into.id + "'"); - } - throw ProcessError(); - return; - } - if (!fromVType) { - into.cfModel = cf_it->first; - into.parametersSet |= VTYPEPARS_CAR_FOLLOW_MODEL; - } - bool ok = true; - for (std::set::const_iterator it = cf_it->second.begin(); it != cf_it->second.end(); ++it) { - if (attrs.hasAttribute(*it)) { - into.cfParameter[*it] = attrs.get(*it, into.id.c_str(), ok); - if (*it == SUMO_ATTR_TAU && string2time(into.cfParameter[*it]) < DELTA_T && gSimulation) { - WRITE_WARNING("Value of tau=" + toString(into.cfParameter[*it]) - + " in car following model '" + toString(into.cfModel) + "' lower than simulation step size may cause collisions"); - } - } - } - if (!ok) { - throw ProcessError(); - } -} - - -const SUMOVehicleParserHelper::CFAttrMap& -SUMOVehicleParserHelper::getAllowedCFModelAttrs() { - // init on first use - if (allowedCFModelAttrs.size() == 0) { - std::set kraussParams; - kraussParams.insert(SUMO_ATTR_ACCEL); - kraussParams.insert(SUMO_ATTR_DECEL); - kraussParams.insert(SUMO_ATTR_APPARENTDECEL); - kraussParams.insert(SUMO_ATTR_EMERGENCYDECEL); - kraussParams.insert(SUMO_ATTR_EMERGENCYDECEL); - kraussParams.insert(SUMO_ATTR_SIGMA); - kraussParams.insert(SUMO_ATTR_TAU); - allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS] = kraussParams; - allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_ORIG1] = kraussParams; - allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_PLUS_SLOPE] = kraussParams; - std::set allParams(kraussParams); - - std::set kraussXParams(kraussParams); - kraussXParams.insert(SUMO_ATTR_TMP1); - kraussXParams.insert(SUMO_ATTR_TMP2); - kraussXParams.insert(SUMO_ATTR_TMP3); - kraussXParams.insert(SUMO_ATTR_TMP4); - kraussXParams.insert(SUMO_ATTR_TMP5); - allowedCFModelAttrs[SUMO_TAG_CF_KRAUSSX] = kraussXParams; - allParams.insert(kraussXParams.begin(), kraussXParams.end()); - - std::set smartSKParams; - smartSKParams.insert(SUMO_ATTR_ACCEL); - smartSKParams.insert(SUMO_ATTR_DECEL); - smartSKParams.insert(SUMO_ATTR_EMERGENCYDECEL); - smartSKParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - smartSKParams.insert(SUMO_ATTR_SIGMA); - smartSKParams.insert(SUMO_ATTR_TAU); - smartSKParams.insert(SUMO_ATTR_TMP1); - smartSKParams.insert(SUMO_ATTR_TMP2); - smartSKParams.insert(SUMO_ATTR_TMP3); - smartSKParams.insert(SUMO_ATTR_TMP4); - smartSKParams.insert(SUMO_ATTR_TMP5); - allowedCFModelAttrs[SUMO_TAG_CF_SMART_SK] = smartSKParams; - allParams.insert(smartSKParams.begin(), smartSKParams.end()); - - std::set daniel1Params; - daniel1Params.insert(SUMO_ATTR_ACCEL); - daniel1Params.insert(SUMO_ATTR_DECEL); - daniel1Params.insert(SUMO_ATTR_EMERGENCYDECEL); - daniel1Params.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - daniel1Params.insert(SUMO_ATTR_SIGMA); - daniel1Params.insert(SUMO_ATTR_TAU); - daniel1Params.insert(SUMO_ATTR_TMP1); - daniel1Params.insert(SUMO_ATTR_TMP2); - daniel1Params.insert(SUMO_ATTR_TMP3); - daniel1Params.insert(SUMO_ATTR_TMP4); - daniel1Params.insert(SUMO_ATTR_TMP5); - allowedCFModelAttrs[SUMO_TAG_CF_DANIEL1] = daniel1Params; - allParams.insert(daniel1Params.begin(), daniel1Params.end()); - - std::set pwagParams; - pwagParams.insert(SUMO_ATTR_ACCEL); - pwagParams.insert(SUMO_ATTR_DECEL); - pwagParams.insert(SUMO_ATTR_EMERGENCYDECEL); - pwagParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - pwagParams.insert(SUMO_ATTR_SIGMA); - pwagParams.insert(SUMO_ATTR_TAU); - pwagParams.insert(SUMO_ATTR_CF_PWAGNER2009_TAULAST); - pwagParams.insert(SUMO_ATTR_CF_PWAGNER2009_APPROB); - allowedCFModelAttrs[SUMO_TAG_CF_PWAGNER2009] = pwagParams; - allParams.insert(pwagParams.begin(), pwagParams.end()); - - std::set idmParams; - idmParams.insert(SUMO_ATTR_ACCEL); - idmParams.insert(SUMO_ATTR_DECEL); - idmParams.insert(SUMO_ATTR_EMERGENCYDECEL); - idmParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - idmParams.insert(SUMO_ATTR_TAU); - idmParams.insert(SUMO_ATTR_CF_IDM_DELTA); - idmParams.insert(SUMO_ATTR_CF_IDM_STEPPING); - allowedCFModelAttrs[SUMO_TAG_CF_IDM] = idmParams; - allParams.insert(idmParams.begin(), idmParams.end()); - - std::set idmmParams; - idmmParams.insert(SUMO_ATTR_ACCEL); - idmmParams.insert(SUMO_ATTR_DECEL); - idmmParams.insert(SUMO_ATTR_EMERGENCYDECEL); - idmmParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - idmmParams.insert(SUMO_ATTR_TAU); - idmmParams.insert(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR); - idmmParams.insert(SUMO_ATTR_CF_IDMM_ADAPT_TIME); - idmmParams.insert(SUMO_ATTR_CF_IDM_STEPPING); - allowedCFModelAttrs[SUMO_TAG_CF_IDMM] = idmmParams; - allParams.insert(idmmParams.begin(), idmmParams.end()); - - std::set bkernerParams; - bkernerParams.insert(SUMO_ATTR_ACCEL); - bkernerParams.insert(SUMO_ATTR_DECEL); - bkernerParams.insert(SUMO_ATTR_EMERGENCYDECEL); - bkernerParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - bkernerParams.insert(SUMO_ATTR_TAU); - bkernerParams.insert(SUMO_ATTR_K); - bkernerParams.insert(SUMO_ATTR_CF_KERNER_PHI); - allowedCFModelAttrs[SUMO_TAG_CF_BKERNER] = bkernerParams; - allParams.insert(bkernerParams.begin(), bkernerParams.end()); - - std::set wiedemannParams; - wiedemannParams.insert(SUMO_ATTR_ACCEL); - wiedemannParams.insert(SUMO_ATTR_DECEL); - wiedemannParams.insert(SUMO_ATTR_EMERGENCYDECEL); - wiedemannParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - wiedemannParams.insert(SUMO_ATTR_CF_WIEDEMANN_SECURITY); - wiedemannParams.insert(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION); - allowedCFModelAttrs[SUMO_TAG_CF_WIEDEMANN] = wiedemannParams; - allParams.insert(wiedemannParams.begin(), wiedemannParams.end()); - - std::set railParams; - railParams.insert(SUMO_ATTR_TRAIN_TYPE); - allowedCFModelAttrs[SUMO_TAG_CF_RAIL] = railParams; - allParams.insert(railParams.begin(), railParams.end()); - - std::set ACCParams; - ACCParams.insert(SUMO_ATTR_ACCEL); - ACCParams.insert(SUMO_ATTR_DECEL); - ACCParams.insert(SUMO_ATTR_EMERGENCYDECEL); - ACCParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - ACCParams.insert(SUMO_ATTR_TAU); - ACCParams.insert(SUMO_ATTR_SC_GAIN); - ACCParams.insert(SUMO_ATTR_GCC_GAIN_SPEED); - ACCParams.insert(SUMO_ATTR_GCC_GAIN_SPACE); - ACCParams.insert(SUMO_ATTR_GC_GAIN_SPEED); - ACCParams.insert(SUMO_ATTR_GC_GAIN_SPACE); - ACCParams.insert(SUMO_ATTR_CA_GAIN_SPEED); - ACCParams.insert(SUMO_ATTR_CA_GAIN_SPACE); - allowedCFModelAttrs[SUMO_TAG_CF_ACC] = ACCParams; - allParams.insert(ACCParams.begin(), ACCParams.end()); - - std::set CACCParams; - CACCParams.insert(SUMO_ATTR_ACCEL); - CACCParams.insert(SUMO_ATTR_DECEL); - CACCParams.insert(SUMO_ATTR_EMERGENCYDECEL); - CACCParams.insert(SUMO_ATTR_COLLISION_MINGAP_FACTOR); - CACCParams.insert(SUMO_ATTR_TAU); - CACCParams.insert(SUMO_ATTR_SC_GAIN_CACC); - CACCParams.insert(SUMO_ATTR_GCC_GAIN_GAP_CACC); - CACCParams.insert(SUMO_ATTR_GCC_GAIN_GAP_DOT_CACC); - CACCParams.insert(SUMO_ATTR_GC_GAIN_GAP_CACC); - CACCParams.insert(SUMO_ATTR_GC_GAIN_GAP_DOT_CACC); - CACCParams.insert(SUMO_ATTR_CA_GAIN_GAP_CACC); - CACCParams.insert(SUMO_ATTR_CA_GAIN_GAP_DOT_CACC); - CACCParams.insert(SUMO_ATTR_GCC_GAIN_SPEED); - CACCParams.insert(SUMO_ATTR_GCC_GAIN_SPACE); - CACCParams.insert(SUMO_ATTR_GC_GAIN_SPEED); - CACCParams.insert(SUMO_ATTR_GC_GAIN_SPACE); - CACCParams.insert(SUMO_ATTR_CA_GAIN_SPEED); - CACCParams.insert(SUMO_ATTR_CA_GAIN_SPACE); - allowedCFModelAttrs[SUMO_TAG_CF_CACC] = CACCParams; - allParams.insert(CACCParams.begin(), CACCParams.end()); - - allowedCFModelAttrs[SUMO_TAG_NOTHING] = allParams; - } - return allowedCFModelAttrs; -} - - -void -SUMOVehicleParserHelper::parseLCParams(SUMOVTypeParameter& into, LaneChangeModel model, const SUMOSAXAttributes& attrs) { - if (allowedLCModelAttrs.size() == 0) { - // init static map - std::set lc2013Params; - lc2013Params.insert(SUMO_ATTR_LCA_STRATEGIC_PARAM); - lc2013Params.insert(SUMO_ATTR_LCA_COOPERATIVE_PARAM); - lc2013Params.insert(SUMO_ATTR_LCA_SPEEDGAIN_PARAM); - lc2013Params.insert(SUMO_ATTR_LCA_KEEPRIGHT_PARAM); - lc2013Params.insert(SUMO_ATTR_LCA_OPPOSITE_PARAM); - lc2013Params.insert(SUMO_ATTR_LCA_LOOKAHEADLEFT); - lc2013Params.insert(SUMO_ATTR_LCA_SPEEDGAINRIGHT); - lc2013Params.insert(SUMO_ATTR_LCA_MAXSPEEDLATSTANDING); - lc2013Params.insert(SUMO_ATTR_LCA_MAXSPEEDLATFACTOR); - lc2013Params.insert(SUMO_ATTR_LCA_ASSERTIVE); - lc2013Params.insert(SUMO_ATTR_LCA_EXPERIMENTAL1); - allowedLCModelAttrs[LCM_LC2013] = lc2013Params; - - std::set sl2015Params = lc2013Params; - sl2015Params.insert(SUMO_ATTR_LCA_PUSHY); - sl2015Params.insert(SUMO_ATTR_LCA_PUSHYGAP); - sl2015Params.insert(SUMO_ATTR_LCA_SUBLANE_PARAM); - sl2015Params.insert(SUMO_ATTR_LCA_IMPATIENCE); - sl2015Params.insert(SUMO_ATTR_LCA_TIME_TO_IMPATIENCE); - sl2015Params.insert(SUMO_ATTR_LCA_ACCEL_LAT); - sl2015Params.insert(SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE); - allowedLCModelAttrs[LCM_SL2015] = sl2015Params; - - std::set noParams; - allowedLCModelAttrs[LCM_DK2008] = noParams; - - // default model may be either LC2013 or SL2015 - // we allow both sets (sl2015 is a superset of lc2013Params) - allowedLCModelAttrs[LCM_DEFAULT] = sl2015Params; - } - bool ok = true; - std::set allowed = allowedLCModelAttrs[model]; - for (std::set::const_iterator it = allowed.begin(); it != allowed.end(); it++) { - if (attrs.hasAttribute(*it)) { - into.lcParameter[*it] = attrs.get(*it, into.id.c_str(), ok); - } - } - if (!ok) { - throw ProcessError(); - } -} - - -void -SUMOVehicleParserHelper::parseJMParams(SUMOVTypeParameter& into, const SUMOSAXAttributes& attrs) { - if (allowedJMAttrs.size() == 0) { - // init static set (there is only one model) - allowedJMAttrs.insert(SUMO_ATTR_JM_CROSSING_GAP); - allowedJMAttrs.insert(SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME); - allowedJMAttrs.insert(SUMO_ATTR_JM_DRIVE_RED_SPEED); - allowedJMAttrs.insert(SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME); - allowedJMAttrs.insert(SUMO_ATTR_JM_IGNORE_FOE_SPEED); - allowedJMAttrs.insert(SUMO_ATTR_JM_IGNORE_FOE_PROB); - allowedJMAttrs.insert(SUMO_ATTR_JM_SIGMA_MINOR); - allowedJMAttrs.insert(SUMO_ATTR_JM_TIMEGAP_MINOR); - } - bool ok = true; - for (std::set::const_iterator it = allowedJMAttrs.begin(); it != allowedJMAttrs.end(); it++) { - if (attrs.hasAttribute(*it)) { - into.jmParameter[*it] = attrs.get(*it, into.id.c_str(), ok); - } - } - if (!ok) { - throw ProcessError(); - } -} - - -SUMOVehicleClass -SUMOVehicleParserHelper::parseVehicleClass(const SUMOSAXAttributes& attrs, - const std::string& id) { - SUMOVehicleClass vclass = SVC_IGNORING; - try { - bool ok = true; - std::string vclassS = attrs.getOpt(SUMO_ATTR_VCLASS, id.c_str(), ok, ""); - if (vclassS == "") { - return vclass; - } - 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."); - } - return vclass; -} - - -SUMOVehicleShape -SUMOVehicleParserHelper::parseGuiShape(const SUMOSAXAttributes& attrs, const std::string& id) { - bool ok = true; - std::string vclassS = attrs.getOpt(SUMO_ATTR_GUISHAPE, id.c_str(), ok, ""); - if (SumoVehicleShapeStrings.hasString(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; - } -} - - -double -SUMOVehicleParserHelper::parseWalkPos(SumoXMLAttr attr, const std::string& id, double maxPos, const std::string& val, std::mt19937* rng) { - double result; - std::string error; - ArrivalPosDefinition proc; - // only supports 'random' and 'max' - if (!SUMOVehicleParameter::parseArrivalPos(val, toString(SUMO_TAG_WALK), id, result, proc, error)) { - throw ProcessError(error); - } - if (proc == ARRIVAL_POS_RANDOM) { - result = RandHelper::rand(maxPos, rng); - } else if (proc == ARRIVAL_POS_CENTER) { - result = maxPos / 2.; - } else if (proc == ARRIVAL_POS_MAX) { - result = maxPos; - } - return SUMOVehicleParameter::interpretEdgePos(result, maxPos, attr, id); -} - - -SUMOTime -SUMOVehicleParserHelper::processActionStepLength(double given) { - SUMOTime result = TIME2STEPS(given); - if (result <= 0) { - if (result < 0) { - std::stringstream ss; - ss << "The parameter action-step-length must be a non-negative multiple of the simulation step-length. Ignoring given value (=" - << STEPS2TIME(result) << " s.)"; - WRITE_WARNING(ss.str()); - } - result = DELTA_T; - } else if (result % DELTA_T != 0) { - std::stringstream ss; - result = (SUMOTime)(DELTA_T * floor(double(result) / double(DELTA_T))); - result = MAX2(DELTA_T, result); - if (fabs(given * 1000. - double(result)) > NUMERICAL_EPS) { - ss << "The parameter action-step-length must be a non-negative multiple of the simulation step-length. Parsing given value (" - << given << " s.) to the adjusted value " - << STEPS2TIME(result) << " s."; - WRITE_WARNING(ss.str()); - } - } - return result; -} - - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.h 2018-08-15 22:00:31.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOVehicleParserHelper.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,195 +0,0 @@ -/****************************************************************************/ -// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. -// This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v2.0 -// which accompanies this distribution, and is available at -// http://www.eclipse.org/legal/epl-v20.html -// SPDX-License-Identifier: EPL-2.0 -/****************************************************************************/ -/// @file SUMOVehicleParserHelper.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Laura Bieker -/// @date Mon, 07.04.2008 -/// @version $Id$ -/// -// Helper methods for parsing vehicle attributes -/****************************************************************************/ -#ifndef SUMOVehicleParserHelper_h -#define SUMOVehicleParserHelper_h - - -// =========================================================================== -// included modules -// =========================================================================== -#include - -#include -#include -#include -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class SUMOSAXAttributes; -class SUMOVehicleParameter; -class SUMOVTypeParameter; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class SUMOVehicleParserHelper - * @brief Helper methods for parsing vehicle attributes - * - * This class supports helper methods for parsing a vehicle's attributes. - */ -class SUMOVehicleParserHelper { -public: - /** @brief Parses a flow's attributes - * - * Parses all attributes stored in "SUMOVehicleParameter". - * - * @see SUMOVehicleParameter - * @param[in] attr The SAX-attributes to get vehicle parameter from - * @return The parsed attribute structure if no error occurred, 0 otherwise - * @exception ProcessError If an attribute's value is invalid - * @note: the caller is responsible for deleting the returned pointer - */ - static SUMOVehicleParameter* parseFlowAttributes(const SUMOSAXAttributes& attrs, const SUMOTime beginDefault, const SUMOTime endDefault); - - - /** @brief Parses a vehicle's attributes - * - * Parses all attributes stored in "SUMOVehicleParameter". - * - * @see SUMOVehicleParameter - * @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 occurred, 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, - const bool optionalID = false, const bool skipDepart = false, const bool isPerson = false); - - - /** @brief Starts to parse a vehicle type - * - * @param[in] attr The SAX-attributes to get vehicle parameter from - * @param[in] file The name of the file being parsed (for resolving paths) - * @exception ProcessError If an attribute's value is invalid - * @see SUMOVTypeParameter - * @note: the caller is responsible for deleting the returned pointer - */ - static SUMOVTypeParameter* beginVTypeParsing(const SUMOSAXAttributes& attrs, const std::string& file); - - - /** @brief Parses an element embedded in vtype definition - * - * @param[in, filled] into The structure to fill with parsed values - * @param[in] element The id of the currently parsed XML-element - * @param[in] attr The SAX-attributes to get vehicle parameter from - * @param[in] fromVType Whether the attributes are a part of the vtype-definition - * @exception ProcessError If an attribute's value is invalid - * @see SUMOVTypeParameter - */ - static void parseVTypeEmbedded(SUMOVTypeParameter& into, - const SumoXMLTag element, const SUMOSAXAttributes& attrs, - const bool fromVType = false); - - /// @brief Parses lane change model attributes - static void parseLCParams(SUMOVTypeParameter& into, LaneChangeModel model, const SUMOSAXAttributes& attrs); - - /// @brief Parses junction model attributes - static void parseJMParams(SUMOVTypeParameter& into, const SUMOSAXAttributes& attrs); - - /** @brief Parses the vehicle class - * - * 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_IGNORING) - * is returned. - * - * @param[in] attrs The attributes to read the class from - * @param[in] id The id of the parsed element, for error message generation - * @return The parsed vehicle class - * @see SUMOVehicleClass - * @todo Recheck how errors are handled and what happens if they occure - */ - static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes& attrs, const std::string& id); - - - /** @brief Parses the vehicle class - * - * When given, the vehicle class is parsed using getVehicleShapeID. - * Exceptions occuring within this process are catched and reported. - * - * If no vehicle class is available in the attributes, the default class (SVS_UNKNOWN) - * is returned. - * - * @param[in] attrs The attributes to read the class from - * @param[in] id The id of the parsed element, for error message generation - * @return The parsed vehicle shape - * @see SUMOVehicleShape - * @todo Recheck how errors are handled and what happens if they occure - */ - static SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes& attrs, const std::string& id); - - /// @brief parse departPos or arrivalPos for a walk - static double parseWalkPos(SumoXMLAttr attr, const std::string& id, double maxPos, const std::string& val, std::mt19937* rng = 0); - - - /** @brief Checks and converts given value for the action step length from seconds - * to miliseconds assuring it being a positive multiple of the simulation step width - * - * @param[in] given The value parsed from the configuration (seconds). - * @return The milisecond value rounded to the next positive multiple of the simulation step length. - */ - static SUMOTime processActionStepLength(double given); - - -private: - /** @brief Parses attributes common to vehicles and flows - * - * Parses all attributes stored in "SUMOVehicleParameter". - * - * @see SUMOVehicleParameter - * @param[in] attr The SAX-attributes to get vehicle parameter from - * @param[out] ret The parameter to parse into - * @param[in] element The name of the element (vehicle or flow) - * @exception ProcessError If an attribute's value is invalid - */ - static void parseCommonAttributes(const SUMOSAXAttributes& attrs, - SUMOVehicleParameter* ret, std::string element); - - - typedef std::map > CFAttrMap; - typedef std::map > LCAttrMap; - - // returns allowed attrs for each known CF-model (init on first use) - static const CFAttrMap& getAllowedCFModelAttrs(); - - // brief allowed attrs for each known CF-model - static CFAttrMap allowedCFModelAttrs; - // brief allowed attrs for each known LC-model - static LCAttrMap allowedLCModelAttrs; - // brief allowed attrs for the junction model - static std::set allowedJMAttrs; - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.cpp sumo-1.2.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.cpp 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -28,7 +28,7 @@ #include #include -#include +#include #include "SUMOXMLDefinitions.h" @@ -87,7 +87,9 @@ { "tlLogic", SUMO_TAG_TLLOGIC }, { "phase", SUMO_TAG_PHASE }, { "trip", SUMO_TAG_TRIP }, + { "tripTAZ", SUMO_TAG_TRIP_TAZ }, { "flow", SUMO_TAG_FLOW }, + { "calibratorFlow", SUMO_TAG_CALIBRATORFLOW }, { "flowState", SUMO_TAG_FLOWSTATE }, { "step", SUMO_TAG_STEP }, { "interval", SUMO_TAG_INTERVAL }, @@ -102,6 +104,11 @@ { "segment", SUMO_TAG_SEGMENT }, { "delete", SUMO_TAG_DELETE }, { "stop", SUMO_TAG_STOP }, + { "stopBusStop", SUMO_TAG_STOP_BUSSTOP }, + { "stopContainerStop", SUMO_TAG_STOP_CONTAINERSTOP }, + { "stopChargingStation", SUMO_TAG_STOP_CHARGINGSTATION }, + { "stopParkingArea", SUMO_TAG_STOP_PARKINGAREA }, + { "stopLane", SUMO_TAG_STOP_LANE }, { "destProbReroute", SUMO_TAG_DEST_PROB_REROUTE }, { "closingReroute", SUMO_TAG_CLOSING_REROUTE }, { "closingLaneReroute", SUMO_TAG_CLOSING_LANE_REROUTE }, @@ -175,11 +182,13 @@ { "carFollowing-Rail", SUMO_TAG_CF_RAIL }, { "carFollowing-ACC", SUMO_TAG_CF_ACC }, { "carFollowing-CACC", SUMO_TAG_CF_CACC }, + { "carFollowing-CC", SUMO_TAG_CF_CC }, // Person { "person", SUMO_TAG_PERSON }, { "personTrip", SUMO_TAG_PERSONTRIP }, { "ride", SUMO_TAG_RIDE }, { "walk", SUMO_TAG_WALK }, + { "personFlow", SUMO_TAG_PERSONFLOW }, // Transport { "container", SUMO_TAG_CONTAINER }, { "transport", SUMO_TAG_TRANSPORT }, @@ -391,6 +400,10 @@ { "lanes", SUMO_ATTR_LANES }, { "from", SUMO_ATTR_FROM }, { "to", SUMO_ATTR_TO }, + { "fromLonLat", SUMO_ATTR_FROMLONLAT }, + { "toLonLat", SUMO_ATTR_TOLONLAT }, + { "fromXY", SUMO_ATTR_FROMXY }, + { "toXY", SUMO_ATTR_TOXY }, { "period", SUMO_ATTR_PERIOD }, { "fromTaz", SUMO_ATTR_FROM_TAZ }, { "toTaz", SUMO_ATTR_TO_TAZ }, @@ -428,6 +441,7 @@ { "customShape", SUMO_ATTR_CUSTOMSHAPE }, { "keepClear", SUMO_ATTR_KEEP_CLEAR }, { "rightOfWay", SUMO_ATTR_RIGHT_OF_WAY }, + { "fringe", SUMO_ATTR_FRINGE }, { "color", SUMO_ATTR_COLOR }, { "dir", SUMO_ATTR_DIR }, { "state", SUMO_ATTR_STATE }, @@ -442,6 +456,8 @@ { "dest", SUMO_ATTR_DEST }, { "source", SUMO_ATTR_SOURCE }, { "via", SUMO_ATTR_VIA }, + { "viaLonLat", SUMO_ATTR_VIALONLAT }, + { "viaXY", SUMO_ATTR_VIAXY }, { "nodes", SUMO_ATTR_NODES }, { "visibility", SUMO_ATTR_VISIBILITY_DISTANCE }, @@ -478,6 +494,7 @@ { "chargingStation", SUMO_ATTR_CHARGING_STATION}, { "line", SUMO_ATTR_LINE }, { "lines", SUMO_ATTR_LINES }, + { "tripId", SUMO_ATTR_TRIP_ID }, { "intended", SUMO_ATTR_INTENDED }, { "value", SUMO_ATTR_VALUE }, { "prohibitor", SUMO_ATTR_PROHIBITOR }, @@ -487,6 +504,7 @@ { "prefer", SUMO_ATTR_PREFER }, { "controlledInner", SUMO_ATTR_CONTROLLED_INNER }, { "vehsPerHour", SUMO_ATTR_VEHSPERHOUR }, + { "personsPerHour", SUMO_ATTR_PERSONSPERHOUR }, { "output", SUMO_ATTR_OUTPUT }, { "height", SUMO_ATTR_HEIGHT }, { "guiShape", SUMO_ATTR_GUISHAPE }, @@ -509,6 +527,7 @@ { "excludeEmpty", SUMO_ATTR_EXCLUDE_EMPTY }, { "withInternal", SUMO_ATTR_WITH_INTERNAL }, { "trackVehicles", SUMO_ATTR_TRACK_VEHICLES }, + { "detectPersons", SUMO_ATTR_DETECT_PERSONS }, { "maxTraveltime", SUMO_ATTR_MAX_TRAVELTIME }, { "minSamples", SUMO_ATTR_MIN_SAMPLES }, @@ -541,6 +560,25 @@ { "security", SUMO_ATTR_CF_WIEDEMANN_SECURITY }, { "estimation", SUMO_ATTR_CF_WIEDEMANN_ESTIMATION }, + { "ccDecel", SUMO_ATTR_CF_CC_CCDECEL }, + { "constSpacing", SUMO_ATTR_CF_CC_CONSTSPACING }, + { "kp", SUMO_ATTR_CF_CC_KP }, + { "lambda", SUMO_ATTR_CF_CC_LAMBDA }, + { "c1", SUMO_ATTR_CF_CC_C1 }, + { "xi", SUMO_ATTR_CF_CC_XI }, + { "omegaN", SUMO_ATTR_CF_CC_OMEGAN }, + { "tauEngine", SUMO_ATTR_CF_CC_TAU }, + { "lanesCount", SUMO_ATTR_CF_CC_LANES_COUNT }, + { "ccAccel", SUMO_ATTR_CF_CC_CCACCEL }, + { "ploegKp", SUMO_ATTR_CF_CC_PLOEG_KP }, + { "ploegKd", SUMO_ATTR_CF_CC_PLOEG_KD }, + { "ploegH", SUMO_ATTR_CF_CC_PLOEG_H }, + { "flatbedKa", SUMO_ATTR_CF_CC_FLATBED_KA }, + { "flatbedKv", SUMO_ATTR_CF_CC_FLATBED_KV }, + { "flatbedKp", SUMO_ATTR_CF_CC_FLATBED_KP }, + { "flatbedD", SUMO_ATTR_CF_CC_FLATBED_D }, + { "flatbedH", SUMO_ATTR_CF_CC_FLATBED_H }, + { "generateWalks", SUMO_ATTR_GENERATE_WALKS }, { "actType", SUMO_ATTR_ACTTYPE }, { "slope", SUMO_ATTR_SLOPE }, @@ -552,7 +590,7 @@ { "lefthand", SUMO_ATTR_LEFTHAND }, { "limitTurnSpeed", SUMO_ATTR_LIMIT_TURN_SPEED }, { "checkLaneFoesAll", SUMO_ATTR_CHECKLANEFOES_ALL }, - { "checkLaneFoesRoundabout",SUMO_ATTR_CHECKLANEFOES_ROUNDABOUT }, + { "checkLaneFoesRoundabout", SUMO_ATTR_CHECKLANEFOES_ROUNDABOUT }, { "actorConfig", SUMO_ATTR_ACTORCONFIG }, { "vehicle", SUMO_ATTR_VEHICLE }, @@ -613,6 +651,7 @@ { "closedShape", GNE_ATTR_CLOSE_SHAPE }, { "parentItem", GNE_ATTR_PARENT }, { "genericParameter", GNE_ATTR_GENERIC }, + { "defaultVTypeModified", GNE_ATTR_DEFAULT_VTYPE_MODIFIED }, { "targetLanes", SUMO_ATTR_TARGETLANE }, { "crossing", SUMO_ATTR_CROSSING }, @@ -674,10 +713,23 @@ }; StringBijection::Entry SUMOXMLDefinitions::rightOfWayValuesInitializer[] = { - {"edgePriority", RIGHT_OF_WAY_EDGEPRIORITY }, + {"edgePriority", RIGHT_OF_WAY_EDGEPRIORITY }, {"default", RIGHT_OF_WAY_DEFAULT } // default (must be the last one) }; +StringBijection::Entry SUMOXMLDefinitions::fringeTypeValuesInitializer[] = { + {"outer", FRINGE_TYPE_OUTER }, + {"inner", FRINGE_TYPE_INNER }, + {"default", FRINGE_TYPE_DEFAULT } // default (must be the last one) +}; + +StringBijection::Entry SUMOXMLDefinitions::personModeValuesInitializer[] = { + {"none", PERSONMODE_NONE}, + {"walk", PERSONMODE_WALK}, + {"bicycle", PERSONMODE_BICYCLE }, + {"car", PERSONMODE_CAR }, + {"public", PERSONMODE_PUBLIC} // (must be the last one) +}; StringBijection::Entry SUMOXMLDefinitions::linkStateValues[] = { { "G", LINKSTATE_TL_GREEN_MAJOR }, @@ -759,6 +811,7 @@ { "PWagner2009", SUMO_TAG_CF_PWAGNER2009 }, { "BKerner", SUMO_TAG_CF_BKERNER }, { "Rail", SUMO_TAG_CF_RAIL }, + { "CC", SUMO_TAG_CF_CC }, { "ACC", SUMO_TAG_CF_ACC }, { "CACC", SUMO_TAG_CF_CACC }, { "Wiedemann", SUMO_TAG_CF_WIEDEMANN } //< must be the last one @@ -796,6 +849,18 @@ { "unknown", LCA_UNKNOWN } //< must be the last one }; +StringBijection::Entry SUMOXMLDefinitions::trainTypeValues[] = { + { "NGT400", TRAINTYPE_NGT400 }, + { "NGT400_16", TRAINTYPE_NGT400_16 }, + { "RB425", TRAINTYPE_RB425 }, + { "RB628", TRAINTYPE_RB628 }, + { "ICE1", TRAINTYPE_ICE1 }, + { "REDosto7", TRAINTYPE_REDOSTO7 }, + { "Freight", TRAINTYPE_FREIGHT }, + { "ICE3", TRAINTYPE_ICE3 } +}; + + StringBijection SUMOXMLDefinitions::Tags( SUMOXMLDefinitions::tags, SUMO_TAG_NOTHING); @@ -814,6 +879,12 @@ StringBijection SUMOXMLDefinitions::RightOfWayValues( SUMOXMLDefinitions::rightOfWayValuesInitializer, RIGHT_OF_WAY_DEFAULT); +StringBijection SUMOXMLDefinitions::FringeTypeValues( + SUMOXMLDefinitions::fringeTypeValuesInitializer, FRINGE_TYPE_DEFAULT); + +StringBijection SUMOXMLDefinitions::PersonModeValues( + SUMOXMLDefinitions::personModeValuesInitializer, PERSONMODE_PUBLIC); + StringBijection SUMOXMLDefinitions::LinkStates( SUMOXMLDefinitions::linkStateValues, LINKSTATE_DEADEND); @@ -835,6 +906,9 @@ StringBijection SUMOXMLDefinitions::LaneChangeActions( SUMOXMLDefinitions::laneChangeActionValues, LCA_UNKNOWN); +StringBijection SUMOXMLDefinitions::TrainTypes( + SUMOXMLDefinitions::trainTypeValues, TRAINTYPE_NGT400); + std::string SUMOXMLDefinitions::getJunctionIDFromInternalEdge(const std::string internalEdge) { @@ -887,8 +961,7 @@ bool SUMOXMLDefinitions::isValidListOfNetIDs(const std::string& value) { - std::vector typeIDs; - SUMOSAXAttributes::parseStringVector(value, typeIDs); + const std::vector& typeIDs = StringTokenizer(value).getVector(); if (typeIDs.empty()) { return false; } else { @@ -905,8 +978,7 @@ bool SUMOXMLDefinitions::isValidListOfTypeID(const std::string& value) { - std::vector typeIDs; - SUMOSAXAttributes::parseStringVector(value, typeIDs); + const std::vector& typeIDs = StringTokenizer(value).getVector(); if (typeIDs.empty()) { return false; } else { diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.h sumo-1.2.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.h --- sumo-1.1.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.h 2018-12-14 23:01:02.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/SUMOXMLDefinitions.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -140,8 +140,12 @@ SUMO_TAG_PHASE, /// @brief a single trip definition (used by router) SUMO_TAG_TRIP, + /// @brief a single trip definition that uses TAZs (used in NETEDIT) + SUMO_TAG_TRIP_TAZ, /// @brief a flow definition (used by router) SUMO_TAG_FLOW, + /// @brief a flow definition within in Calibrator (used in NETEDIT) + SUMO_TAG_CALIBRATORFLOW, /// @brief a flow state definition (used when saving and loading simulatino state) SUMO_TAG_FLOWSTATE, /// @brief trigger: a step description @@ -167,6 +171,16 @@ SUMO_TAG_DELETE, /// @brief stop for vehicles SUMO_TAG_STOP, + /// @brief stop placed over a lane (used in netedit) + SUMO_TAG_STOP_LANE, + /// @brief stop placed over a busStop (used in netedit) + SUMO_TAG_STOP_BUSSTOP, + /// @brief stop placed over a containerStop (used in netedit) + SUMO_TAG_STOP_CONTAINERSTOP, + /// @brief stop placed over a charging station (used in netedit) + SUMO_TAG_STOP_CHARGINGSTATION, + /// @brief stop placed over a parking area (used in netedit) + SUMO_TAG_STOP_PARKINGAREA, /// @brief probability of destiny of a reroute SUMO_TAG_DEST_PROB_REROUTE, /// @brief reroute of type closing @@ -267,6 +281,7 @@ SUMO_TAG_CF_ACC, SUMO_TAG_CF_CACC, SUMO_TAG_CF_RAIL, + SUMO_TAG_CF_CC, /// @} /// @name Pedestrians @@ -275,6 +290,7 @@ SUMO_TAG_PERSONTRIP, SUMO_TAG_RIDE, SUMO_TAG_WALK, + SUMO_TAG_PERSONFLOW, /// @} SUMO_TAG_CONTAINER, @@ -590,6 +606,10 @@ SUMO_ATTR_LANES, SUMO_ATTR_FROM, SUMO_ATTR_TO, + SUMO_ATTR_FROMLONLAT, + SUMO_ATTR_TOLONLAT, + SUMO_ATTR_FROMXY, + SUMO_ATTR_TOXY, SUMO_ATTR_PERIOD, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_TO_TAZ, @@ -643,6 +663,8 @@ SUMO_ATTR_KEEP_CLEAR, /// @brief How to compute right of way SUMO_ATTR_RIGHT_OF_WAY, + /// @brief Fringe type of node + SUMO_ATTR_FRINGE, /// @brief whether a given shape is user-defined SUMO_ATTR_CUSTOMSHAPE, /// @brief A color information @@ -666,6 +688,8 @@ SUMO_ATTR_DEST, SUMO_ATTR_SOURCE, SUMO_ATTR_VIA, + SUMO_ATTR_VIALONLAT, + SUMO_ATTR_VIAXY, /// @brief a list of node ids, used for controlling joining SUMO_ATTR_NODES, @@ -717,6 +741,7 @@ SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_LINE, SUMO_ATTR_LINES, + SUMO_ATTR_TRIP_ID, SUMO_ATTR_INTENDED, SUMO_ATTR_VALUE, SUMO_ATTR_PROHIBITOR, @@ -726,6 +751,7 @@ SUMO_ATTR_PREFER, SUMO_ATTR_CONTROLLED_INNER, SUMO_ATTR_VEHSPERHOUR, + SUMO_ATTR_PERSONSPERHOUR, SUMO_ATTR_OUTPUT, SUMO_ATTR_HEIGHT, SUMO_ATTR_GUISHAPE, @@ -748,6 +774,7 @@ SUMO_ATTR_EXCLUDE_EMPTY, SUMO_ATTR_WITH_INTERNAL, SUMO_ATTR_TRACK_VEHICLES, + SUMO_ATTR_DETECT_PERSONS, SUMO_ATTR_MAX_TRAVELTIME, SUMO_ATTR_MIN_SAMPLES, @@ -780,6 +807,25 @@ SUMO_ATTR_CF_KERNER_PHI, SUMO_ATTR_CF_WIEDEMANN_SECURITY, SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, + + SUMO_ATTR_CF_CC_CCDECEL, + SUMO_ATTR_CF_CC_CONSTSPACING, + SUMO_ATTR_CF_CC_KP, + SUMO_ATTR_CF_CC_LAMBDA, + SUMO_ATTR_CF_CC_C1, + SUMO_ATTR_CF_CC_XI, + SUMO_ATTR_CF_CC_OMEGAN, + SUMO_ATTR_CF_CC_TAU, + SUMO_ATTR_CF_CC_LANES_COUNT, + SUMO_ATTR_CF_CC_CCACCEL, + SUMO_ATTR_CF_CC_PLOEG_KP, + SUMO_ATTR_CF_CC_PLOEG_KD, + SUMO_ATTR_CF_CC_PLOEG_H, + SUMO_ATTR_CF_CC_FLATBED_KA, + SUMO_ATTR_CF_CC_FLATBED_KV, + SUMO_ATTR_CF_CC_FLATBED_KP, + SUMO_ATTR_CF_CC_FLATBED_D, + SUMO_ATTR_CF_CC_FLATBED_H, /// @} SUMO_ATTR_GENERATE_WALKS, @@ -913,6 +959,8 @@ GNE_ATTR_AVERAGE_SINK, /// @brief Color of TAZSources/TAZChilds GNE_ATTR_TAZCOLOR, + /// @brief Flag to check if a default VType was modified + GNE_ATTR_DEFAULT_VTYPE_MODIFIED, // @} SUMO_ATTR_TARGETLANE, @@ -1004,6 +1052,21 @@ RIGHT_OF_WAY_EDGEPRIORITY }; +/// @brief algorithms for computing right of way +enum FringeType { + FRINGE_TYPE_OUTER, + FRINGE_TYPE_INNER, + FRINGE_TYPE_DEFAULT +}; + +/// @brief travel modes for persons +enum PersonMode { + PERSONMODE_NONE = 0, + PERSONMODE_WALK = 1, + PERSONMODE_BICYCLE = 2, + PERSONMODE_CAR = 4, + PERSONMODE_PUBLIC = 8 +}; /** * @enum LinkState @@ -1137,11 +1200,11 @@ LCA_BLOCKED_BY_RIGHT_FOLLOWER = 1 << 12, /// @brief The vehicle is blocked being overlapping LCA_OVERLAPPING = 1 << 13, - /// @brief The vehicle does not have enough space to complete a continuous lane and change before the next turning movement + /// @brief The vehicle does not have enough space to complete a continuous change before the next turn LCA_INSUFFICIENT_SPACE = 1 << 14, /// @brief used by the sublane model LCA_SUBLANE = 1 << 15, - /// @brief Vehicle is too slow to guarantee success of lane change (used for continuous lane changing in case that maxSpeedLatStanding==0) + /// @brief Vehicle is too slow to complete a continuous lane change (in case that maxSpeedLatStanding==0) LCA_INSUFFICIENT_SPEED = 1 << 28, /// @brief lane can change LCA_WANTS_LANECHANGE = LCA_LEFT | LCA_RIGHT, @@ -1190,6 +1253,19 @@ LCM_DEFAULT }; +/// @enum train types +enum TrainType { + TRAINTYPE_NGT400, + TRAINTYPE_NGT400_16, + TRAINTYPE_RB425, + TRAINTYPE_RB628, + TRAINTYPE_ICE1, + TRAINTYPE_REDOSTO7, + TRAINTYPE_FREIGHT, + TRAINTYPE_ICE3, + TRAINTYPE_UNKNOWN +}; + /** * @enum LateralAlignment * @brief Numbers representing special SUMO-XML-attribute values @@ -1243,9 +1319,15 @@ /// @brief lane spread functions static StringBijection LaneSpreadFunctions; - /// @brief lane spread functions + /// @brief righ of way algorithms static StringBijection RightOfWayValues; + /// @brief fringe types + static StringBijection FringeTypeValues; + + /// @brief person modes + static StringBijection PersonModeValues; + /// @brief link states static StringBijection LinkStates; @@ -1266,6 +1348,9 @@ /// @brief lane change actions static StringBijection LaneChangeActions; + + /// @brief train types + static StringBijection TrainTypes; /// @} /// @name Helper functions for ID-string manipulations @@ -1307,8 +1392,8 @@ /// @brief return edge id when given the lane ID static std::string getEdgeIDFromLane(const std::string laneID); /// @} - - /// @brief all allowed characters for phase state + + /// @brief all allowed characters for phase state static const std::string ALLOWED_TLS_LINKSTATES; @@ -1329,6 +1414,12 @@ /// @brief lane spread function values static StringBijection::Entry rightOfWayValuesInitializer[]; + /// @brief lane spread function values + static StringBijection::Entry fringeTypeValuesInitializer[]; + + /// @brief person mode values + static StringBijection::Entry personModeValuesInitializer[]; + /// @brief link state values static StringBijection::Entry linkStateValues[]; @@ -1349,9 +1440,12 @@ /// @brief lane change action values static StringBijection::Entry laneChangeActionValues[]; + + /// @brief train type values values + static StringBijection::Entry trainTypeValues[]; /// @} - - /// @brief all allowed characters for phase state + + /// @brief all allowed characters for phase state static const char AllowedTLS_linkStatesInitializer[]; }; diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/XMLSubSys.cpp sumo-1.2.0+dfsg1/src/utils/xml/XMLSubSys.cpp --- sumo-1.1.0+dfsg1/src/utils/xml/XMLSubSys.cpp 2018-11-12 23:01:50.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/XMLSubSys.cpp 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -112,6 +112,7 @@ bool XMLSubSys::runParser(GenericSAXHandler& handler, const std::string& file, const bool isNet) { + MsgHandler::getErrorInstance()->clear(); try { XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes validationScheme = isNet ? myNetValidationScheme : myValidationScheme; if (myNextFreeReader == (int)myReaders.size()) { diff -Nru sumo-1.1.0+dfsg1/src/utils/xml/XMLSubSys.h sumo-1.2.0+dfsg1/src/utils/xml/XMLSubSys.h --- sumo-1.1.0+dfsg1/src/utils/xml/XMLSubSys.h 2018-10-28 23:00:27.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/utils/xml/XMLSubSys.h 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ /****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2002-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2002-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/src/version.h sumo-1.2.0+dfsg1/src/version.h --- sumo-1.1.0+dfsg1/src/version.h 2018-12-18 09:57:36.000000000 +0000 +++ sumo-1.2.0+dfsg1/src/version.h 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#define VERSION_STRING "v1_0_1+1122-2147d155b1" diff -Nru sumo-1.1.0+dfsg1/sumo.doxyconf sumo-1.2.0+dfsg1/sumo.doxyconf --- sumo-1.1.0+dfsg1/sumo.doxyconf 2018-04-10 21:24:24.000000000 +0000 +++ sumo-1.2.0+dfsg1/sumo.doxyconf 2019-04-15 14:11:30.000000000 +0000 @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.13 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -32,26 +32,26 @@ # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "SUMO - Simulation of Urban MObility" +PROJECT_NAME = "Eclipse SUMO - Simulation of Urban MObility" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = +PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. -PROJECT_LOGO = docs/logo/032x032.bmp +PROJECT_LOGO = data/logo/sumo-145x50.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -60,7 +60,7 @@ OUTPUT_DIRECTORY = . -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -145,7 +145,7 @@ INLINE_INHERITED_MEMB = YES -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -162,7 +162,7 @@ # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -171,7 +171,7 @@ # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -209,22 +209,15 @@ MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = YES - # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -245,13 +238,13 @@ # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = +ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. -TCL_SUBST = +TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -293,12 +286,12 @@ # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = +EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -310,10 +303,19 @@ MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -353,13 +355,20 @@ IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent @@ -418,7 +427,7 @@ # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -428,35 +437,35 @@ EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = YES -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -481,21 +490,21 @@ # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -509,7 +518,7 @@ INTERNAL_DOCS = YES # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -518,12 +527,19 @@ CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -551,14 +567,14 @@ # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -603,27 +619,25 @@ STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -634,7 +648,7 @@ # sections, marked by \if ... \endif and \cond # ... \endcond blocks. -ENABLED_SECTIONS = +ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the @@ -648,18 +662,12 @@ MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = YES - # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). @@ -682,7 +690,7 @@ # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated @@ -695,7 +703,7 @@ # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -705,7 +713,7 @@ # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. -CITE_BIB_FILES = +CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -719,7 +727,7 @@ QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -727,7 +735,7 @@ WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -744,12 +752,18 @@ # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated @@ -773,7 +787,7 @@ # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with -# spaces. +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = ./src @@ -789,12 +803,17 @@ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = *.c \ *.cc \ @@ -852,7 +871,7 @@ # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -868,7 +887,8 @@ # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = */.svn/* */.git/* +EXCLUDE_PATTERNS = */.svn/* \ + */.git/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -879,13 +899,13 @@ # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -905,7 +925,7 @@ # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -921,8 +941,12 @@ # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. -INPUT_FILTER = +INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the @@ -930,11 +954,15 @@ # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. -FILTER_PATTERNS = +FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -946,14 +974,14 @@ # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. -FILTER_SOURCE_PATTERNS = +FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -994,7 +1022,7 @@ REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -1041,13 +1069,13 @@ VERBATIM_HEADERS = YES -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. +# generated with the -Duse-libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO @@ -1058,7 +1086,7 @@ # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. -CLANG_OPTIONS = +CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index @@ -1084,13 +1112,13 @@ # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1128,7 +1156,7 @@ # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1138,7 +1166,7 @@ # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1150,26 +1178,20 @@ # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES +HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1179,10 +1201,10 @@ # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1213,8 +1235,9 @@ # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES @@ -1307,31 +1330,31 @@ # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_FILE = +CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -HHC_LOCATION = +HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1359,7 +1382,7 @@ # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. -QCH_FILE = +QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace @@ -1384,7 +1407,7 @@ # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom @@ -1392,21 +1415,21 @@ # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = +QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1445,7 +1468,7 @@ # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1473,7 +1496,7 @@ TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1502,7 +1525,7 @@ # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1539,7 +1562,7 @@ # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site @@ -1547,7 +1570,7 @@ # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_CODEFILE = +MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and @@ -1588,7 +1611,7 @@ # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1601,13 +1624,13 @@ # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -1623,7 +1646,7 @@ # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH_ID = +EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are @@ -1633,13 +1656,13 @@ # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. -EXTRA_SEARCH_MAPPINGS = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = YES @@ -1670,7 +1693,7 @@ MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1688,13 +1711,16 @@ PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names -# that should be included in the LaTeX output. To get the times font for -# instance you can specify -# EXTRA_PACKAGES=times +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1705,12 +1731,12 @@ # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_HEADER = +LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last @@ -1721,7 +1747,18 @@ # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_FOOTER = +LATEX_FOOTER = + +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output @@ -1729,7 +1766,7 @@ # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_FILES = +LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will @@ -1741,7 +1778,7 @@ PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1782,11 +1819,19 @@ LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1801,7 +1846,7 @@ RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1829,20 +1874,30 @@ # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is # similar to doxygen's config file. A template extensions file can be generated # using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = + +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1871,7 +1926,7 @@ # MAN_EXTENSION with the initial . removed. # This tag requires that the tag GENERATE_MAN is set to YES. -MAN_SUBDIR = +MAN_SUBDIR = # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # will generate one additional man file for each entity documented in the real @@ -1886,7 +1941,7 @@ # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1900,7 +1955,7 @@ XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1913,7 +1968,7 @@ # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1927,7 +1982,7 @@ DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1940,10 +1995,10 @@ # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1952,7 +2007,7 @@ # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1960,7 +2015,7 @@ GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1968,9 +2023,9 @@ PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1984,20 +2039,20 @@ # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -2013,7 +2068,7 @@ EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2025,7 +2080,7 @@ # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = +INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -2033,7 +2088,7 @@ # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. @@ -2043,7 +2098,7 @@ # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2052,7 +2107,7 @@ # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have @@ -2081,28 +2136,29 @@ # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2119,7 +2175,7 @@ # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2135,16 +2191,16 @@ # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. -DIA_PATH = +DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2155,7 +2211,7 @@ # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO -# The default value is: NO. +# The default value is: YES. HAVE_DOT = YES @@ -2167,7 +2223,7 @@ # Minimum value: 0, maximum value: 32, default value: 0. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_NUM_THREADS = 4 +DOT_NUM_THREADS = 0 # When you want a differently looking font in the dot files that doxygen # generates you can specify the font name using DOT_FONTNAME. You need to make @@ -2191,7 +2247,7 @@ # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTPATH = +DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. @@ -2217,7 +2273,7 @@ GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2269,7 +2325,8 @@ # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2280,7 +2337,8 @@ # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2303,15 +2361,21 @@ DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). -# Possible values are: png, jpg, gif and svg. +# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, +# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, +# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_IMAGE_FORMAT = png +DOT_IMAGE_FORMAT = svg # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. @@ -2323,41 +2387,50 @@ # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -INTERACTIVE_SVG = NO +INTERACTIVE_SVG = YES # The DOT_PATH tag can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_PATH = +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile # command). # This tag requires that the tag HAVE_DOT is set to YES. -DOTFILE_DIRS = +DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). -MSCFILE_DIRS = +MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). -DIAFILE_DIRS = +DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # path where java can find the plantuml.jar file. If left blank, it is assumed # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. -PLANTUML_JAR_PATH = +PLANTUML_JAR_PATH = + +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes @@ -2395,7 +2468,7 @@ DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2412,7 +2485,7 @@ GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff -Nru sumo-1.1.0+dfsg1/tools/addStops2Routes.py sumo-1.2.0+dfsg1/tools/addStops2Routes.py --- sumo-1.1.0+dfsg1/tools/addStops2Routes.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/addStops2Routes.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/Assignment.py sumo-1.2.0+dfsg1/tools/assign/Assignment.py --- sumo-1.1.0+dfsg1/tools/assign/Assignment.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/Assignment.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -33,15 +33,17 @@ import operator from xml.sax import make_parser from optparse import OptionParser -from network import Net, DistrictsReader, ExtraSignalInformationReader -from dijkstra import dijkstraBoost, dijkstraPlain, dijkstra -from inputs import getMatrix, getConnectionTravelTime -from outputs import timeForInput, outputODZone, outputNetwork, outputStatistics, sortedVehOutput, linkChoicesOutput -from assign import doSUEAssign, doLohseStopCheck, doSUEVehAssign, doIncAssign -from tables import updateCurveTable -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +sys.path.append(os.path.join(os.environ["SUMO_HOME"], 'tools')) import sumolib.net # noqa +from network import Net, DistrictsReader, ExtraSignalInformationReader # noqa +from dijkstra import dijkstraBoost, dijkstraPlain, dijkstra # noqa +from inputs import getMatrix, getConnectionTravelTime # noqa +from outputs import timeForInput, outputODZone, outputNetwork, outputStatistics, sortedVehOutput, linkChoicesOutput # noqa +from assign import doSUEAssign, doLohseStopCheck, doSUEVehAssign, doIncAssign # noqa +from tables import updateCurveTable # noqa + def initLinkChoiceMap(net, startVertices, endVertices, matrixPshort, linkChoiceMap, odPairsMap): odpairCounts = 0 diff -Nru sumo-1.1.0+dfsg1/tools/assign/assign.py sumo-1.2.0+dfsg1/tools/assign/assign.py --- sumo-1.1.0+dfsg1/tools/assign/assign.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/assign.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/cadytsIterate.py sumo-1.2.0+dfsg1/tools/assign/cadytsIterate.py --- sumo-1.1.0+dfsg1/tools/assign/cadytsIterate.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/cadytsIterate.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/costFunctionChecker.py sumo-1.2.0+dfsg1/tools/assign/costFunctionChecker.py --- sumo-1.1.0+dfsg1/tools/assign/costFunctionChecker.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/costFunctionChecker.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2009-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2009-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/costMemory.py sumo-1.2.0+dfsg1/tools/assign/costMemory.py --- sumo-1.1.0+dfsg1/tools/assign/costMemory.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/costMemory.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/dijkstra.py sumo-1.2.0+dfsg1/tools/assign/dijkstra.py --- sumo-1.1.0+dfsg1/tools/assign/dijkstra.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/dijkstra.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/duaIterate_analysis.py sumo-1.2.0+dfsg1/tools/assign/duaIterate_analysis.py --- sumo-1.1.0+dfsg1/tools/assign/duaIterate_analysis.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/duaIterate_analysis.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2012-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/duaIterate.py sumo-1.2.0+dfsg1/tools/assign/duaIterate.py --- sumo-1.1.0+dfsg1/tools/assign/duaIterate.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/duaIterate.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -113,9 +113,8 @@ type=float, default=0, help="Start for incrementing scale") argParser.add_argument("--inc-max", dest="incMax", type=float, default=1, help="Maximum for incrementing scale") - argParser.add_argument("--inc-base", dest="incBase", - type=int, default=-1, help="Give the incrementation base. Negative values disable " + - "incremental scaling") + argParser.add_argument("--inc-base", dest="incBase", type=int, default=-1, + help="Give the incrementation base. Negative values disable incremental scaling") argParser.add_argument("--incrementation", dest="incValue", type=int, default=1, help="Give the incrementation") argParser.add_argument("--time-inc", dest="timeInc", @@ -128,8 +127,7 @@ type=int, default=10, help="Number of iterations to use for convergence calculation") argParser.add_argument("--max-convergence-deviation", dest="convDev", type=float, help="Maximum relative standard deviation in travel times") - argParser.add_argument( - "-D", "--districts", help="use districts as sources and targets", metavar="FILE") + argParser.add_argument("-D", "--districts", help="use districts as sources and targets", metavar="FILE") argParser.add_argument("-x", "--vehroute-file", dest="routefile", choices=['None', 'routesonly', 'detailed'], default='None', help="choose the format of the route file") @@ -137,10 +135,8 @@ default=False, help="output the last routes") argParser.add_argument("-K", "--keep-allroutes", action="store_true", dest="allroutes", default=False, help="save routes with near zero probability") - argParser.add_argument( - "--routing-algorithm", default="dijkstra", help="select the routing algorithm") - argParser.add_argument( - "--max-alternatives", default=5, help="prune the number of alternatives to INT") + argParser.add_argument("--routing-algorithm", default="dijkstra", help="select the routing algorithm") + argParser.add_argument("--max-alternatives", default=5, help="prune the number of alternatives to INT") argParser.add_argument("--skip-first-routing", action="store_true", dest="skipFirstRouting", default=False, help="run simulation with demands before first routing") argParser.add_argument("--logit", action="store_true", dest="logit", @@ -162,9 +158,8 @@ "travel times when using the external gawron calculation") argParser.add_argument("--weight-memory", action="store_true", default=False, dest="weightmemory", help="smooth edge weights across iterations") - argParser.add_argument( - "--pessimism", default=1, type=float, help="give traffic jams a higher weight when using option " + - " --weight-memory") + argParser.add_argument("--pessimism", default=1, type=float, + help="give traffic jams a higher weight when using option --weight-memory") argParser.add_argument("--clean-alt", action="store_true", dest="clean_alt", default=False, help="Whether old rou.alt.xml files shall be removed") argParser.add_argument("--binary", action="store_true", diff -Nru sumo-1.1.0+dfsg1/tools/assign/elements.py sumo-1.2.0+dfsg1/tools/assign/elements.py --- sumo-1.1.0+dfsg1/tools/assign/elements.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/elements.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -25,10 +25,8 @@ import sys import math -import os from tables import crCurveTable, laneTypeTable -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -import sumolib.net # noqa +import sumolib # This class is used for finding the k shortest paths. @@ -44,14 +42,14 @@ # includes the update-function for searching the k shortest paths. -class Vertex(sumolib.net.Node): +class Vertex(sumolib.net.node.Node): """ This class is to store node attributes and the respective incoming/outgoing links. """ def __init__(self, id, type=None, coord=None, incLanes=None): - sumolib.net.Node.__init__(self, id, type, coord, incLanes) + sumolib.net.node.Node.__init__(self, id, type, coord, incLanes) self.preds = [] self.wasUpdated = False @@ -107,14 +105,14 @@ # read from the net. -class Edge(sumolib.net.Edge): +class Edge(sumolib.net.edge.Edge): """ This class is to record link attributes """ def __init__(self, label, source, target, prio, function, name): - sumolib.net.Edge.__init__( + sumolib.net.edge.Edge.__init__( self, label, source, target, prio, function, name) self.capacity = sys.maxsize # parameter for estimating capacities according to signal timing plans @@ -160,7 +158,7 @@ self.capThrough = 0. def addLane(self, lane): - sumolib.net.Edge.addLane(self, lane) + sumolib.net.edge.Edge.addLane(self, lane) if self._from._id == self._to._id: self.freeflowtime = 0.0 else: diff -Nru sumo-1.1.0+dfsg1/tools/assign/inputs.py sumo-1.2.0+dfsg1/tools/assign/inputs.py --- sumo-1.1.0+dfsg1/tools/assign/inputs.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/inputs.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/matrixDailyToHourly.py sumo-1.2.0+dfsg1/tools/assign/matrixDailyToHourly.py --- sumo-1.1.0+dfsg1/tools/assign/matrixDailyToHourly.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/matrixDailyToHourly.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/network.py sumo-1.2.0+dfsg1/tools/assign/network.py --- sumo-1.1.0+dfsg1/tools/assign/network.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/network.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -21,14 +21,12 @@ from __future__ import print_function import os -import sys import datetime import operator from xml.sax import handler from elements import Predecessor, Vertex, Edge, Path, TLJunction, Signalphase from dijkstra import dijkstraPlain, dijkstraBoost, dijkstra -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -import sumolib.net # noqa +import sumolib # Net class stores the network (vertex and edge collection). # Moreover, the methods for finding k shortest paths and for generating vehicular releasing times diff -Nru sumo-1.1.0+dfsg1/tools/assign/networkStatistics.py sumo-1.2.0+dfsg1/tools/assign/networkStatistics.py --- sumo-1.1.0+dfsg1/tools/assign/networkStatistics.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/networkStatistics.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/one-shot.py sumo-1.2.0+dfsg1/tools/assign/one-shot.py --- sumo-1.1.0+dfsg1/tools/assign/one-shot.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/one-shot.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/outputs.py sumo-1.2.0+dfsg1/tools/assign/outputs.py --- sumo-1.1.0+dfsg1/tools/assign/outputs.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/outputs.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/routeChoices.py sumo-1.2.0+dfsg1/tools/assign/routeChoices.py --- sumo-1.1.0+dfsg1/tools/assign/routeChoices.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/routeChoices.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/run.py sumo-1.2.0+dfsg1/tools/assign/run.py --- sumo-1.1.0+dfsg1/tools/assign/run.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/run.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/statisticsElements.py sumo-1.2.0+dfsg1/tools/assign/statisticsElements.py --- sumo-1.1.0+dfsg1/tools/assign/statisticsElements.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/statisticsElements.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/assign/tables.py sumo-1.2.0+dfsg1/tools/assign/tables.py --- sumo-1.1.0+dfsg1/tools/assign/tables.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/assign/tables.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,5 +1,5 @@ # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/averageRuns.py sumo-1.2.0+dfsg1/tools/averageRuns.py --- sumo-1.1.0+dfsg1/tools/averageRuns.py 2018-12-18 09:58:41.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/averageRuns.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2007-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2007-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/apply_astyle.py sumo-1.2.0+dfsg1/tools/build/apply_astyle.py --- sumo-1.1.0+dfsg1/tools/build/apply_astyle.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/apply_astyle.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/buildHTMLDocs.py sumo-1.2.0+dfsg1/tools/build/buildHTMLDocs.py --- sumo-1.1.0+dfsg1/tools/build/buildHTMLDocs.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/buildHTMLDocs.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -215,16 +215,19 @@ imageFiles = [] for i in images: print("Fetching image %s" % i) + if i.startswith("https://"): + f = urlopen(i) + i = i[i.rfind("/") + 1:] if i.find(":") >= 0: - f = urlopen("http://sumo.dlr.de%s" % i) + f = urlopen("https://sumo.dlr.de%s" % i) c = f.read() b = c.find("
") b = c.find("href=", b) + 6 e = c.find("\"", b + 1) - f = urlopen("http://sumo.dlr.de/%s" % c[b:e]) + f = urlopen("https://sumo.dlr.de/%s" % c[b:e]) i = i[i.find(":") + 1:] else: - f = urlopen("http://sumo.dlr.de/%s" % i) + f = urlopen("https://sumo.dlr.de/%s" % i) i = i[i.rfind("/") + 1:] if i.find("px-") >= 0: i = i[:i.find('-') + 1] @@ -302,7 +305,7 @@ if name.endswith(".css"): print("Skipping css-file %s" % name) continue - fromStr = 'generated on %s from the wiki page for %s' % ( + fromStr = 'generated on %s from the wiki page for %s' % ( datetime.datetime.now(), name, name) name = name + ".html" t = os.path.join(options.output, name) @@ -310,8 +313,12 @@ c = fd.read().decode("utf8") if options.version: fromStr += " for SUMO %s" % options.version - c = c.replace( - '
From Sumo
', '
%s
' % fromStr) + c = c.replace('
From Sumo
', + '
%s
' % fromStr) + navLink = c.find(' 0: + c = c[:navLink] + c[c.find('', navLink)+4:] + navLink = c.find('= 0: diff -Nru sumo-1.1.0+dfsg1/tools/build/checkAuthors.py sumo-1.2.0+dfsg1/tools/build/checkAuthors.py --- sumo-1.1.0+dfsg1/tools/build/checkAuthors.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/checkAuthors.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/checkImages.py sumo-1.2.0+dfsg1/tools/build/checkImages.py --- sumo-1.1.0+dfsg1/tools/build/checkImages.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/checkImages.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2016-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2016-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/checkStyle.py sumo-1.2.0+dfsg1/tools/build/checkStyle.py --- sumo-1.1.0+dfsg1/tools/build/checkStyle.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/checkStyle.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2010-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2010-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -20,7 +20,6 @@ from __future__ import print_function import os -import sys import subprocess import xml.sax import codecs @@ -53,7 +52,7 @@ SEPARATOR = "/****************************************************************************/\n" EPL_HEADER = """/****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -// Copyright (C) 2001-2018 German Aerospace Center (DLR) and others. +// Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. // This program and the accompanying materials // are made available under the terms of the Eclipse Public License v2.0 // which accompanies this distribution, and is available at @@ -146,22 +145,21 @@ if lines[idx][:5] == '# -*-': idx += 1 license = EPL_HEADER.replace("// ", "# ").replace("// ", "# ").replace("\n//", "") - end = idx + 7 + end = lines.index("\n", idx) if len(lines) < 13: print(self._file, "is too short (%s lines, at least 13 required for valid header)" % len(lines)) return year = lines[idx + 1][16:20] license = license.replace("2001", year).replace(SEPARATOR, "") if "module" in lines[idx + 2]: - end += 2 fileLicense = "".join(lines[idx:idx + 2]) + "".join(lines[idx + 4:end]) else: fileLicense = "".join(lines[idx:end]) if fileLicense != license: - print(self._file, "invalid license") + print(self._file, "different license:") + print(fileLicense) if options.verbose: print("!!%s!!" % os.path.commonprefix([fileLicense, license])) - print(fileLicense) print(license) self.checkDoxyLines(lines, end + 1, "#") if self._haveFixed: @@ -170,7 +168,7 @@ def startElement(self, name, attrs): if name == 'target': self._file = attrs['path'] - seen.add(os.path.join(svnRoot, self._file)) + seen.add(os.path.join(repoRoot, self._file)) if name == 'property': self._property = attrs['name'] @@ -232,7 +230,7 @@ self._hadEOL = False self._hadKeywords = False - def checkFile(self, fileName=None): + def checkFile(self, fileName=None, exclude=None): if fileName is not None: self._file = fileName ext = os.path.splitext(self._file)[1] @@ -241,16 +239,17 @@ except UnicodeDecodeError as e: print(self._file, e) self.checkFileHeader(ext) - if self._pep and ext == ".py" and "/contributed/" not in self._file: + if exclude: + for x in exclude: + if x + "/" in self._file: + return + if self._pep and ext == ".py": if HAVE_FLAKE and os.path.getsize(self._file) < 1000000: # flake hangs on very large files subprocess.call(["flake8", "--max-line-length", "120", self._file]) if HAVE_AUTOPEP and self._fix: subprocess.call(["autopep8", "--max-line-length", "120", "--in-place", self._file]) -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") @@ -258,32 +257,41 @@ default=False, help="fix invalid svn properties") optParser.add_option("-s", "--skip-pep", action="store_true", default=False, help="skip autopep8 and flake8 tests") +optParser.add_option("-d", "--directory", help="check given subdirectory of sumo tree") +optParser.add_option("-x", "--exclude", default="contributed", + help="comma-separated list of (sub-)paths to exclude from pep checks") (options, args) = optParser.parse_args() seen = set() +sumoRoot = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) if len(args) > 0: - svnRoots = [os.path.abspath(a) for a in args] -for svnRoot in svnRoots: + repoRoots = [os.path.abspath(a) for a in args] +elif options.directory: + repoRoots = [os.path.join(sumoRoot, options.directory)] +else: + repoRoots = [sumoRoot] +for repoRoot in repoRoots: if options.verbose: - print("checking", svnRoot) + print("checking", repoRoot) propRead = PropertyReader(options.fix, not options.skip_pep) try: - output = subprocess.check_output(["svn", "pl", "-v", "-R", "--xml", svnRoot]) - xml.sax.parseString(output, propRead) - except (OSError, subprocess.CalledProcessError) as e: - print("This seems to be no valid svn repository", svnRoot, e) - if options.verbose: - print("trying git at", svnRoot) oldDir = os.getcwd() - os.chdir(svnRoot) + os.chdir(repoRoot) + exclude = options.exclude.split(",") for name in subprocess.check_output(["git", "ls-files"]).splitlines(): ext = os.path.splitext(name)[1] if ext in _SOURCE_EXT: - propRead.checkFile(name) + propRead.checkFile(name, exclude) os.chdir(oldDir) - sys.exit() + continue + except (OSError, subprocess.CalledProcessError) as e: + print("This seems to be no valid git repository", repoRoot, e) + if options.verbose: + print("trying svn at", repoRoot) + output = subprocess.check_output(["svn", "pl", "-v", "-R", "--xml", repoRoot]) + xml.sax.parseString(output, propRead) if options.verbose: - print("re-checking tree at", svnRoot) - for root, dirs, files in os.walk(svnRoot): + print("re-checking tree at", repoRoot) + for root, dirs, files in os.walk(repoRoot): for name in files: ext = os.path.splitext(name)[1] if name not in _IGNORE: diff -Nru sumo-1.1.0+dfsg1/tools/build/configTemplateToWiki.py sumo-1.2.0+dfsg1/tools/build/configTemplateToWiki.py --- sumo-1.1.0+dfsg1/tools/build/configTemplateToWiki.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/configTemplateToWiki.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/dailyBuildMSVC.py sumo-1.2.0+dfsg1/tools/build/dailyBuildMSVC.py --- sumo-1.1.0+dfsg1/tools/build/dailyBuildMSVC.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/dailyBuildMSVC.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -84,8 +84,7 @@ (date.today().strftime("%d%b%y"), gitrev)] ttBin = "texttestc.py" if options.suffix == "extra": - runInternalTests.runInternal( - debugSuffix, fullOpt, log, True, True, debugSuffix == "") + runExtraTests.run(debugSuffix, fullOpt, log, True, True, debugSuffix == "") else: subprocess.call([ttBin] + fullOpt, env=env, stdout=log, stderr=subprocess.STDOUT, shell=True) @@ -139,7 +138,7 @@ (options, args) = optParser.parse_args() sys.path.append(os.path.join(options.rootDir, options.testsDir)) -import runInternalTests # noqa +import runExtraTests # noqa env = os.environ if "SUMO_HOME" not in env: diff -Nru sumo-1.1.0+dfsg1/tools/build/dailyUpdateMakeGCC.sh sumo-1.2.0+dfsg1/tools/build/dailyUpdateMakeGCC.sh --- sumo-1.1.0+dfsg1/tools/build/dailyUpdateMakeGCC.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/dailyUpdateMakeGCC.sh 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,100 @@ +#!/bin/bash +PREFIX=$1 +export FILEPREFIX=$2 +export SMTP_SERVER=$3 +MAKELOG=$PREFIX/${FILEPREFIX}make.log +MAKEALLLOG=$PREFIX/${FILEPREFIX}makealloptions.log +STATUSLOG=$PREFIX/${FILEPREFIX}status.log +TESTLOG=$PREFIX/${FILEPREFIX}test.log +export SUMO_BATCH_RESULT=$PREFIX/${FILEPREFIX}batch_result +export SUMO_REPORT=$PREFIX/${FILEPREFIX}report +export SUMO_BINDIR=$PREFIX/sumo/bin +if test $# -ge 4; then + CONFIGURE_OPT=$4 +fi + +rm -f $STATUSLOG +echo -n "$FILEPREFIX " > $STATUSLOG +date >> $STATUSLOG +echo "--" >> $STATUSLOG +cd $PREFIX/sumo +if test "${CONFIGURE_OPT::5}" == "cmake"; then + rm -rf build/$FILEPREFIX +else + make distclean &> /dev/null + make -f Makefile.cvs clean &> /dev/null +fi +basename $MAKELOG >> $STATUSLOG +git pull &> $MAKELOG || (echo "git pull failed" | tee -a $STATUSLOG; tail -10 $MAKELOG) +GITREV=`tools/build/version.py -` +date >> $MAKELOG +if test "${CONFIGURE_OPT::5}" == "cmake"; then + mkdir build/$FILEPREFIX && cd build/$FILEPREFIX + cmake ${CONFIGURE_OPT:5} -DCMAKE_INSTALL_PREFIX=$PREFIX ../.. >> $MAKELOG 2>&1 || (echo "cmake failed" | tee -a $STATUSLOG; tail -10 $MAKELOG) +else + make -f Makefile.cvs >> $MAKELOG 2>&1 || (echo "autoreconf failed" | tee -a $STATUSLOG; tail -10 $MAKELOG) + ./configure --prefix=$PREFIX/sumo $CONFIGURE_OPT >> $MAKELOG 2>&1 || (echo "configure failed" | tee -a $STATUSLOG; tail -10 $MAKELOG) +fi +if make -j32 >> $MAKELOG 2>&1; then + date >> $MAKELOG + if make install >> $MAKELOG 2>&1; then + if test "$FILEPREFIX" == "gcc4_64"; then + make -j distcheck >> $MAKELOG 2>&1 || (echo "make distcheck failed" | tee -a $STATUSLOG; tail -10 $MAKELOG) + make dist-complete >> $MAKELOG 2>&1 || (echo "make dist-complete failed" | tee -a $STATUSLOG; tail -10 $MAKELOG) + fi + else + echo "make install failed" | tee -a $STATUSLOG; tail -10 $MAKELOG + fi +else + echo "make failed" | tee -a $STATUSLOG; tail -20 $MAKELOG +fi +date >> $MAKELOG +echo `grep -c '[Ww]arn[iu]ng:' $MAKELOG` warnings >> $STATUSLOG + +echo "--" >> $STATUSLOG +cd $PREFIX/sumo +if test -e $SUMO_BINDIR/sumo -a $SUMO_BINDIR/sumo -nt $PREFIX/sumo/configure; then + # run tests + export PATH=$PREFIX/texttest/bin:$PATH + export TEXTTEST_TMP=$PREFIX/texttesttmp + TESTLABEL=`LANG=C date +%d%b%y`r$GITREV + rm -rf $TEXTTEST_TMP/* + if test ${FILEPREFIX::6} == "extra_"; then + tests/runExtraTests.py --gui "b $FILEPREFIX" &> $TESTLOG + else + tests/runTests.sh -b $FILEPREFIX -name $TESTLABEL &> $TESTLOG + if which Xvfb &>/dev/null; then + tests/runTests.sh -a sumo.gui -b $FILEPREFIX -name $TESTLABEL >> $TESTLOG 2>&1 + tests/runTests.sh -a netedit.daily -b $FILEPREFIX -name $TESTLABEL >> $TESTLOG 2>&1 + fi + fi + tests/runTests.sh -b $FILEPREFIX -name $TESTLABEL -coll >> $TESTLOG 2>&1 + echo "batchreport" >> $STATUSLOG +fi + +if test -e $PREFIX/sumo/src/sumo_main.gcda; then + date >> $TESTLOG + tests/runExtraTests.py --gui "b $FILEPREFIX" >> $TESTLOG 2>&1 + $SIP_HOME/tests/runTests.sh -b $FILEPREFIX >> $TESTLOG 2>&1 + make lcov >> $TESTLOG 2>&1 || (echo "make lcov failed"; tail -10 $TESTLOG) + date >> $TESTLOG +fi + +echo "--" >> $STATUSLOG +basename $MAKEALLLOG >> $STATUSLOG +export CXXFLAGS="$CXXFLAGS -Wall -W -pedantic -Wno-long-long -Wformat -Wformat-security" +if test "${CONFIGURE_OPT::5}" == "cmake"; then + rm -rf build/debug-$FILEPREFIX + mkdir build/debug-$FILEPREFIX && cd build/debug-$FILEPREFIX + cmake ${CONFIGURE_OPT:5} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PREFIX ../.. > $MAKEALLLOG 2>&1 || (echo "cmake debug failed" | tee -a $STATUSLOG; tail -10 $MAKEALLLOG) +else + ./configure --prefix=$PREFIX/sumo --program-suffix=A --with-python --with-ffmpeg \ + $CONFIGURE_OPT &> $MAKEALLLOG || (echo "configure with all options failed" | tee -a $STATUSLOG; tail -10 $MAKEALLLOG) +fi +if make -j32 >> $MAKEALLLOG 2>&1; then + make install >> $MAKEALLLOG 2>&1 || (echo "make install with all options failed" | tee -a $STATUSLOG; tail -10 $MAKEALLLOG) +else + echo "make with all options failed" | tee -a $STATUSLOG; tail -20 $MAKEALLLOG +fi +echo `grep -c '[Ww]arn[iu]ng:' $MAKEALLLOG` warnings >> $STATUSLOG +echo "--" >> $STATUSLOG diff -Nru sumo-1.1.0+dfsg1/tools/build/history.py sumo-1.2.0+dfsg1/tools/build/history.py --- sumo-1.1.0+dfsg1/tools/build/history.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/history.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/mirrorWiki.py sumo-1.2.0+dfsg1/tools/build/mirrorWiki.py --- sumo-1.1.0+dfsg1/tools/build/mirrorWiki.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/mirrorWiki.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -43,14 +43,14 @@ def getAllPages(args): if len(args) == 0: - f = urlopen("http://sumo.dlr.de/w/api.php?action=query&list=allpages&aplimit=500&format=json") + f = urlopen("https://sumo.dlr.de/w/api.php?action=query&list=allpages&aplimit=500&format=json") result = json.loads(f.read().decode('utf8')) return [entry["title"].replace(" ", "_") for entry in result["query"]["allpages"]] return [a.replace(" ", "_") for a in args] def readParsePage(page): - f = urlopen("http://sumo.dlr.de/wiki/%s" % page) + f = urlopen("https://sumo.dlr.de/wiki/%s" % page) c = f.read().decode('utf8') b = c.find("This page was last modified on") e = c.find("<", b) @@ -66,7 +66,7 @@ def readParseEditPage(page): f = urlopen( - "http://sumo.dlr.de/w/index.php?title=%s&action=edit" % page) + "https://sumo.dlr.de/w/index.php?title=%s&action=edit" % page) c = f.read().decode('utf8') b = c.find("wpTextbox1") b = c.find('>', b) + 1 @@ -118,15 +118,15 @@ for i in images: print("Fetching image %s" % i) if i.find(":") >= 0: - f = urlopen("http://sumo.dlr.de/wiki/%s" % i) + f = urlopen("https://sumo.dlr.de/wiki/%s" % i) c = f.read() b = c.find("
") b = c.find("href=", b) + 6 e = c.find("\"", b + 1) - f = urlopen("http://sourceforge.net/%s" % c[b:e]) + f = urlopen("https://sumo.dlr.de/%s" % c[b:e]) i = i[i.find(":") + 1:] else: - f = urlopen("http://sourceforge.net/%s" % i) + f = urlopen("https://sumo.dlr.de/%s" % i) i = i[i.rfind("/") + 1:] if i.find("px-") >= 0: i = i[:i.find('-') + 1] diff -Nru sumo-1.1.0+dfsg1/tools/build/rebuild_cscope.sh sumo-1.2.0+dfsg1/tools/build/rebuild_cscope.sh --- sumo-1.1.0+dfsg1/tools/build/rebuild_cscope.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/rebuild_cscope.sh 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,21 @@ +#!/bin/bash +# script for building ctags/cscope index files +# to be run from the root directory + +export FOXDIR=~/programs/fox-1.6.43 +export CSTMP=~/tmp/cscope.files +export CSOUT=cscope.out +export TAGSOUT=tags + +cd src +rm $CSTMP +rm $CSOUT +rm $TAGSOUT +#find $FOXDIR/src -name '*.cpp' > $CSTMP +#find $FOXDIR/include -name '*.h' >> $CSTMP +find -name '*.cpp' >> $CSTMP +find -name '*.h' >> $CSTMP +#find ../unittest -name '*.cpp' >> $CSTMP +#find ../unittest -name '*.h' >> $CSTMP +cscope -i $CSTMP -b -f $CSOUT +ctags -L $CSTMP -f $TAGSOUT diff -Nru sumo-1.1.0+dfsg1/tools/build/setup-libsumo.py sumo-1.2.0+dfsg1/tools/build/setup-libsumo.py --- sumo-1.1.0+dfsg1/tools/build/setup-libsumo.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/setup-libsumo.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -24,7 +24,7 @@ setup( name='libsumo', version=SUMO_VERSION, - url='http://sumo.dlr.de/wiki/Libsumo', + url='https://sumo.dlr.de/wiki/Libsumo', author='DLR and contributors', author_email='sumo@dlr.de', license='EPL-2.0', diff -Nru sumo-1.1.0+dfsg1/tools/build/setup-sumolib.py sumo-1.2.0+dfsg1/tools/build/setup-sumolib.py --- sumo-1.1.0+dfsg1/tools/build/setup-sumolib.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/setup-sumolib.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -24,7 +24,7 @@ setup( name='sumolib', version=SUMO_VERSION, - url='http://sumo.dlr.de/wiki/Tools/Sumolib', + url='https://sumo.dlr.de/wiki/Tools/Sumolib', author='DLR and contributors', author_email='sumo@dlr.de', license='EPL-2.0', diff -Nru sumo-1.1.0+dfsg1/tools/build/setup-traci.py sumo-1.2.0+dfsg1/tools/build/setup-traci.py --- sumo-1.1.0+dfsg1/tools/build/setup-traci.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/setup-traci.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2017-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2017-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -24,7 +24,7 @@ setup( name='traci', version=SUMO_VERSION, - url='http://sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python', + url='https://sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python', author='DLR and contributors', author_email='sumo@dlr.de', license='EPL-2.0', diff -Nru sumo-1.1.0+dfsg1/tools/build/status.py sumo-1.2.0+dfsg1/tools/build/status.py --- sumo-1.1.0+dfsg1/tools/build/status.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/status.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/timing.py sumo-1.2.0+dfsg1/tools/build/timing.py --- sumo-1.1.0+dfsg1/tools/build/timing.py 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/timing.py 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,102 @@ +#!/usr/bin/env python +# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +# Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v20.html +# SPDX-License-Identifier: EPL-2.0 + +# @file timing.py +# @author Michael Behrisch +# @date 2018-11-30 +# @version $Id$ + +""" +This script uses either a directory with historic sumo versions +or git bisect to compare performance of differnt sumo versions. +""" +from __future__ import absolute_import +from __future__ import print_function + +import subprocess +import argparse +import os +import sys +import collections +import numpy + + +def build(): + sumoSubdir = False + if os.path.exists(os.path.join("sumo", "src", "sumo_main.cpp")): + os.chdir("sumo") + sumoSubdir = True + subprocess.check_call(["make", "-j"]) + if sumoSubdir: + os.chdir("..") + return "sumo" + return "" + + +def runHistory(args, versions, extraInfo=""): + results = collections.defaultdict(list) + for d in versions: + command = ['/usr/bin/time', '-v', os.path.join(d, 'bin', 'sumo'), "-v", "-c", args.cfg] + try: + for _ in range(args.runs): + for l in subprocess.check_output(command, stderr=subprocess.STDOUT).splitlines(): + if "User time" in l: + t = float(l.split(": ")[-1]) # noqa + elif "wall clock" in l: + w = float(l.split(":")[-1]) # noqa + elif "UPS: " in l: + u = 1e6 / max(1., float(l.split(": ")[-1])) # noqa + elif "Maximum resident" in l: + m = float(l.split(": ")[-1]) # noqa + # adapt the return values as needed below + results[d].append((u, t)) + except subprocess.CalledProcessError as e: + if len(versions) == 1: + raise + else: + print(e, file=sys.stderr) + continue + with open(args.stats, "a") as out: + for d, r in sorted(results.items()): + r = sorted(r)[:args.runs - args.skip] + print(d, extraInfo, " ".join(map(str, numpy.mean(r, 0))), file=out) + return numpy.mean(r, 0)[0] + + +argparser = argparse.ArgumentParser() +argparser.add_argument("cfg", help="sumo config to run") +argparser.add_argument("--versions", nargs="*", help="sumo versions to run") +argparser.add_argument("--stats", help="stats file to write") +argparser.add_argument("--basedir", default="buildHistory", help="where to find the version subdirs") +argparser.add_argument("--bisect", type=float, help="run git bisect with the given threshold value") +argparser.add_argument("--runs", type=int, default=5, help="number of runs for each version") +argparser.add_argument("--skip", type=int, default=2, help="number of worst runs to skip for each version") +args = argparser.parse_args() +if args.stats is None: + args.stats = os.path.dirname(args.cfg) + ".stats" +if args.skip >= args.runs: + args.skip = args.runs // 2 + print("Skipping too many runs, reducing skip to %s." % args.skip, file=sys.stderr) +if args.versions: + versions = args.versions +else: + versions = [os.path.join(args.basedir, v) for v in os.listdir(args.basedir)] +if args.bisect: + versions = [build()] + +if args.bisect: + try: + time = runHistory(args, versions, subprocess.check_output(["git", "describe", "--always"]).strip()) + except subprocess.CalledProcessError as e: + print(e, file=sys.stderr) + sys.exit(125) # an exit code of 125 asks "git bisect" to "skip" the current commit +# subprocess.call(["git", "reset", "--hard"]) # to allow bisect to continue even when there are local modifications + sys.exit(0 if time < args.bisect else 1) +else: + runHistory(args, versions) diff -Nru sumo-1.1.0+dfsg1/tools/build/typemap.py sumo-1.2.0+dfsg1/tools/build/typemap.py --- sumo-1.1.0+dfsg1/tools/build/typemap.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/typemap.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2015-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2015-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/build/version.py sumo-1.2.0+dfsg1/tools/build/version.py --- sumo-1.1.0+dfsg1/tools/build/version.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/version.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2008-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at @@ -38,7 +38,18 @@ command = ["git", "describe", "--long", "--always", commit] if gitDir: command[1:1] = ["--git-dir=" + gitDir] - d = subprocess.check_output(command, universal_newlines=True).strip() + try: + d = subprocess.check_output(command, universal_newlines=True).strip() + except subprocess.CalledProcessError: + # try to find the version in the config.h + configFile = join(dirname(__file__), '..', '..', 'src', 'config.h.cmake') + if exists(configFile): + config = open(configFile).read() + if "//#define HAVE_VERSION_H" in config: + version = config.find("VERSION_STRING") + 16 + if version > 16: + return "v" + config[version:config.find('"\n', version)] + "-" + (10 * "0") + return UNKNOWN_REVISION if "-" in d: # remove the "g" in describe output d = d.replace("-g", "-") diff -Nru sumo-1.1.0+dfsg1/tools/build/wix.py sumo-1.2.0+dfsg1/tools/build/wix.py --- sumo-1.1.0+dfsg1/tools/build/wix.py 2018-12-18 09:58:39.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/build/wix.py 2019-04-15 14:11:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo -# Copyright (C) 2011-2018 German Aerospace Center (DLR) and others. +# Copyright (C) 2011-2019 German Aerospace Center (DLR) and others. # This program and the accompanying materials # are made available under the terms of the Eclipse Public License v2.0 # which accompanies this distribution, and is available at diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/pom.xml sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/pom.xml --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/pom.xml 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/pom.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ - - - 4.0.0 - - floetteroed.bioroute - bioroute - 1.0.0-SNAPSHOT - - - true - - - - - bintray - https://api.bintray.com/maven/matsim/matsim/bioroute - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - false - false - UTF-8 - - true - 128m - 512m - - 4000 - 100 - - - - - - - - - floetteroed.utilities - floetteroed-utilities - 1.0.0 - - - org.apache.commons - commons-math3 - 3.4.1 - - - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/AnalysisRunner.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/AnalysisRunner.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/AnalysisRunner.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/AnalysisRunner.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,408 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.analysis; - -import static floetteroed.bioroute.BiorouteRunner.BIOROUTE_ELEMENT; -import static floetteroed.bioroute.BiorouteRunner.CLASSNAME_ELEMENT; -import static floetteroed.bioroute.BiorouteRunner.NETWORKLOADER_ELEMENT; -import static floetteroed.bioroute.BiorouteRunner.NETWORKPREPROCESSOR_ELEMENT; -import static floetteroed.bioroute.BiorouteRunner.PATHWRITER_CONFIG_ELEMENT; -import static floetteroed.bioroute.pathwriter.PathXMLWriter.FILENAME_ELEMENT; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; - -import floetteroed.bioroute.utilities.NetworkInstantiator; -import floetteroed.utilities.ErrorMsgPrinter; -import floetteroed.utilities.commandlineparser.CommandLineParser; -import floetteroed.utilities.commandlineparser.CommandLineParserElement; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.config.ConfigReader; -import floetteroed.utilities.networks.basic.BasicNetwork; - -/** - * Provides various analysis functionality for sampled path sets. - * - * @author Gunnar Flötteröd - * - */ -public class AnalysisRunner { - - // -------------------- CONSTANTS -------------------- - - public static final String CONFIGFILE_KEY = "-configfile"; - public static final String RESULTFILE_KEY = "-resultfile"; - - // -------------------- CONSTRUCTION -------------------- - - protected AnalysisRunner() { - } - - // -------------------- STATIONARITY ANALYSIS -------------------- - - public static final String STATIONARITY_MAINKEY = "STATIONARITY"; - public static final String CORRELATIONFILE_KEY = "-correlationfile"; - public static final String WINDOWSIZE_KEY = "-windowsize"; - public static final String SLOPETHRESHOLD_KEY = "-slopethreshold"; - - private void stationarityAnalysis(final String[] params) throws IOException { - /* - * (1) extract and check command line parameters - */ - final CommandLineParser clp = new CommandLineParser(); - clp.defineParameter(CORRELATIONFILE_KEY, true, null, - "result file of a CORRELATION analysis"); - // clp.defineParameter(RESULTFILE_KEY, true, null, - // "the file where to write the results"); - clp.defineParameter(WINDOWSIZE_KEY, false, Integer.toString(10), - "regression window size"); - clp.defineParameter(SLOPETHRESHOLD_KEY, false, Double.toString(1e-3), - "stationarity slope threshold"); - clp.parse(params); - if (!clp.isComplete()) { - System.out.println(STATIONARITY_MAINKEY - + " takes the following parameters:"); - for (CommandLineParserElement element : clp.getElements()) { - System.out.println(" " + element.toString()); - } - System.exit(-1); - } - - /* - * (2) run the analysis algorithm - */ - final StationarityTester st = new StationarityTester( - clp.getInteger(WINDOWSIZE_KEY), - clp.getDouble(SLOPETHRESHOLD_KEY)); - st.run(clp.getString(CORRELATIONFILE_KEY)); - } - - // -------------------- FREQUENCY ANALYSIS -------------------- - - public static final String FREQUENCIES_MAINKEY = "FREQUENCIES"; - public static final String SAMPLEINTERVAL_KEY = "-sampleinterval"; - public static final String TOTALKS_KEY = "-totals"; - - private void frequenciesAnalysis(final String[] params) throws IOException { - /* - * (1) extract and check command line parameters - */ - final CommandLineParser clp = new CommandLineParser(); - clp.defineParameter(CONFIGFILE_KEY, true, null, - "the configuration file"); - clp.defineParameter(RESULTFILE_KEY, true, null, - "the file where to write the results"); - clp.defineParameter(SAMPLEINTERVAL_KEY, false, Integer.toString(1), - "interval at which paths are taken from file"); - clp.defineParameter(TOTALKS_KEY, false, "false", - "if totals instead of frequencies are to be computed"); - clp.parse(params); - if (!clp.isComplete()) { - System.out.println(FREQUENCIES_MAINKEY - + " takes the following parameters:"); - for (CommandLineParserElement element : clp.getElements()) { - System.out.println(" " + element.toString()); - } - System.exit(-1); - } - /* - * (2) build data structures - */ - final String configFile = clp.getString(CONFIGFILE_KEY); - final Config config = (new ConfigReader()).read(configFile); - final String pathfile = config.absolutePath(config.get( - BIOROUTE_ELEMENT, PATHWRITER_CONFIG_ELEMENT, FILENAME_ELEMENT)); - final BasicNetwork network = NetworkInstantiator.loadNetwork(config, - BIOROUTE_ELEMENT, NETWORKLOADER_ELEMENT, CLASSNAME_ELEMENT); - NetworkInstantiator.preprocessNetwork(network, config, - BIOROUTE_ELEMENT, NETWORKPREPROCESSOR_ELEMENT, - CLASSNAME_ELEMENT); - /* - * (3) run the analysis algorithm - */ - final FrequencyAnalyzer sa = new FrequencyAnalyzer(network, - clp.getInteger(SAMPLEINTERVAL_KEY), clp.getBoolean(TOTALKS_KEY)); - sa.run(pathfile, clp.getString(RESULTFILE_KEY)); - } - - // -------------------- CHI^2 ANALYSIS -------------------- - - public static final String CHI2_MAINKEY = "CHI2"; - public static final String TOTALSFILE_KEY = "-totalsfile"; - - // this is public such that it can accessed by bioroute unit tests - public double computeChi2(final String totalsFile, final boolean msg) - throws IOException { - final BufferedReader reader = new BufferedReader(new FileReader( - totalsFile)); - double chi2 = 0; - int distinct = 0; - int total = 0; - String line; - do { - line = reader.readLine(); - if (line != null && !"".equals(line.trim())) { - final String[] columns = line.split("\\s"); - final double e = Double.parseDouble(columns[0].trim()); - final double o = Double.parseDouble(columns[1].trim()); - chi2 += ((o - e) / e) * (o - e); - distinct++; - total += (int) o; - } else { - if (total > 0 && msg) { - System.out.println("chi2 = " + chi2 + "; computed from " - + distinct + "(" + total - + ") distinct(total) observations"); - } - // chi2 = 0; - // distinct = 0; - // total = 0; - } - } while (line != null); - reader.close(); - return chi2; - } - - private void chi2Analysis(final String[] params) throws IOException { - /* - * (1) extract and check command line parameters - */ - final CommandLineParser clp = new CommandLineParser(); - clp.defineParameter(TOTALSFILE_KEY, true, null, - "the totals file to be analyzed"); - clp.parse(params); - if (!clp.isComplete()) { - System.out.println(CHI2_MAINKEY - + " takes the following parameters:"); - for (CommandLineParserElement element : clp.getElements()) { - System.out.println(" " + element.toString()); - } - System.exit(-1); - } - /* - * (2) build data structures - */ - final String totalsFile = clp.getString(TOTALSFILE_KEY); - /* - * (3) run the analysis algorithm - */ - computeChi2(totalsFile, true); - // TODO NEW - // final BufferedReader reader = new BufferedReader(new FileReader( - // totalsFile)); - // double chi2 = 0; - // int distinct = 0; - // int total = 0; - // String line; - // do { - // line = reader.readLine(); - // if (line != null && !"".equals(line.trim())) { - // final String[] columns = line.split("\\s"); - // final double e = Double.parseDouble(columns[0].trim()); - // final double o = Double.parseDouble(columns[1].trim()); - // chi2 += ((o - e) / e) * (o - e); - // distinct++; - // total += (int) o; - // } else { - // if (total > 0) { - // System.out.println("chi2 = " + chi2 + "; computed from " - // + distinct + "(" + total - // + ") distinct(total) observations"); - // } - // chi2 = 0; - // distinct = 0; - // total = 0; - // } - // } while (line != null); - // reader.close(); - } - - // -------------------- CORRELATION ANALYSIS -------------------- - - public static final String CORRELATION_MAINKEY = "CORRELATION"; - // public static final String DISTANCEBIN_KEY = "-distancebin"; - public static final String MAXDISTANCE_KEY = "-maxdistance"; - - private void correlationAnalysis(final String[] params) throws IOException { - /* - * (1) define, extract and check command line parameters - */ - final CommandLineParser clp = new CommandLineParser(); - clp.defineParameter(CONFIGFILE_KEY, true, null, - "the configuration file"); - // clp.defineParameter(DISTANCEBIN_KEY, false, "1", - // "at which discretization distance in the chain is evaluated"); - clp.defineParameter(MAXDISTANCE_KEY, true, null, - "the largest analyzed distance in the chain"); - clp.defineParameter(RESULTFILE_KEY, true, null, - "the file where to write the results"); - clp.parse(params); - if (!clp.isComplete()) { - System.out.println(CORRELATION_MAINKEY - + " takes the following parameters:"); - for (CommandLineParserElement element : clp.getElements()) { - System.out.println(" " + element.toString()); - } - System.exit(-1); - } - /* - * (2) build data structures - */ - final Config config = (new ConfigReader()).read(clp - .getString(CONFIGFILE_KEY)); - final String pathfile = config.absolutePath(config.get( - BIOROUTE_ELEMENT, PATHWRITER_CONFIG_ELEMENT, FILENAME_ELEMENT)); - final BasicNetwork network = NetworkInstantiator.loadNetwork(config, - BIOROUTE_ELEMENT, NETWORKLOADER_ELEMENT, CLASSNAME_ELEMENT); - NetworkInstantiator.preprocessNetwork(network, config, - BIOROUTE_ELEMENT, NETWORKPREPROCESSOR_ELEMENT, - CLASSNAME_ELEMENT); - /* - * (3) run the analysis algorithm - */ - final SimilarityAnalyzer ca = new SimilarityAnalyzer( - clp.getInteger(MAXDISTANCE_KEY), // clp.getInteger(DISTANCEBIN_KEY), - network); - ca.run(pathfile, clp.getString(RESULTFILE_KEY)); - } - - // -------------------- VISUAL ANALYSIS -------------------- - - private static final String VISUAL_MAINKEY = "VISUAL"; - private static final String VISCONFIGFILE_KEY = "-visconfigfile"; - private static final String VISDATAFILE_KEY = "-visdatafile"; - - private void visualAnalysis(final String[] params) throws IOException { - /* - * (1) extract and check command line parameters - */ - final CommandLineParser clp = new CommandLineParser(); - clp.defineParameter(CONFIGFILE_KEY, true, null, - "the configuration file"); - clp.defineParameter(VISCONFIGFILE_KEY, true, null, - "the file where to write the visual configuration"); - clp.defineParameter(VISDATAFILE_KEY, true, null, - "the file where to write the visualization data"); - clp.parse(params); - if (params.length == 0 || !clp.isComplete()) { - System.out.println(VISUAL_MAINKEY - + " takes the following parameters:"); - for (CommandLineParserElement element : clp.getElements()) { - System.out.println(" " + element.toString()); - } - System.exit(-1); - } - /* - * (2) build data structures - */ - final Config config = (new ConfigReader()).read(clp - .getString(CONFIGFILE_KEY)); - final BasicNetwork network = NetworkInstantiator.loadNetwork(config, - BIOROUTE_ELEMENT, NETWORKLOADER_ELEMENT, CLASSNAME_ELEMENT); - NetworkInstantiator.preprocessNetwork(network, config, - BIOROUTE_ELEMENT, NETWORKPREPROCESSOR_ELEMENT, - CLASSNAME_ELEMENT); - final String pathFile = config.absolutePath(config.get( - BIOROUTE_ELEMENT, PATHWRITER_CONFIG_ELEMENT, FILENAME_ELEMENT)); - /* - * (3) run the analysis algorithm - */ - final VisualAnalyzer va = newVisualAnalyzer(config, network); - va.run(pathFile, clp.getString(VISCONFIGFILE_KEY), - clp.getString(VISDATAFILE_KEY)); - } - - protected VisualAnalyzer newVisualAnalyzer(final Config config, - final BasicNetwork network) { - return new VisualAnalyzer(network, config.newSubConfig( - BIOROUTE_ELEMENT, NETWORKLOADER_ELEMENT)); - } - - // -------------------- RUNNER IMPLEMENTATION -------------------- - - private void taskInfo() { - System.out.println("First argument must be one of the following:"); - System.out.println(" " + STATIONARITY_MAINKEY - + " --> for stationarity analysis"); - System.out.println(" " + CORRELATION_MAINKEY - + " --> for within-chain correlation analysis"); - System.out.println(" " + FREQUENCIES_MAINKEY - + " --> for sample frequency analysis"); - System.out.println(" " + CHI2_MAINKEY + " --> for chi2 analysis"); - System.out.println(" " + VISUAL_MAINKEY + " --> for visual analysis"); - } - - public void run(final String[] args) { - try { - - System.out.println("STARTED.."); - /* - * CHECK COMMAND LINE ARGUMENTS FOR BASIC FEASIBILIY - */ - if (args == null || args.length < 1) { - this.taskInfo(); - System.exit(-1); - } - /* - * DECIDE WHAT TO DO - */ - final String task = args[0].toUpperCase(); - final String[] params = new String[args.length - 1]; - System.arraycopy(args, 1, params, 0, args.length - 1); - if (STATIONARITY_MAINKEY.equals(task)) { - // TODO NEW - System.out.println("Starting stationarity analysis."); - this.stationarityAnalysis(params); - } else if (CORRELATION_MAINKEY.equals(task)) { - System.out.println("Starting correlation analysis."); - this.correlationAnalysis(params); - } else if (FREQUENCIES_MAINKEY.equals(task)) { - System.out.println("Starting frequency analysis."); - this.frequenciesAnalysis(params); - } else if (CHI2_MAINKEY.equals(task)) { - System.out.println("Starting chi2 analysis."); - this.chi2Analysis(params); - } else if (VISUAL_MAINKEY.equals(task)) { - System.out.println("Starting visual analysis."); - this.visualAnalysis(params); - } else { - System.out.println("Unknown analysis task: " + task); - this.taskInfo(); - System.exit(-1); - } - System.out.println("..DONE"); - - } catch (Exception e) { - ErrorMsgPrinter.toStdOut(e); - ErrorMsgPrinter.toErrOut(e); - } - } - - public static void main(String[] args) { - final AnalysisRunner runner = new AnalysisRunner(); - runner.run(args); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/FrequencyAnalyzer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/FrequencyAnalyzer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/FrequencyAnalyzer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/FrequencyAnalyzer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,181 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.analysis; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.xml.sax.Attributes; - -import floetteroed.bioroute.pathgenerator.metropolishastings.MHPathWriterWrapper; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; - -/** - * Analyzes the (absolute/relative) frequency of individual paths in a given - * sample. - * - * @author Gunnar Flötteröd - * - */ -class FrequencyAnalyzer implements PathHandler { - - // -------------------- CONSTANTS -------------------- - - private final BasicNetwork network; - - private final int sampleInterval; - - private final boolean printTotals; - - // -------------------- MEMBERS -------------------- - - // TODO CHANGED - private Map, Integer> path2count = new HashMap, Integer>(); - - // TODO CHANGED - private Map, Double> path2LogWeight = new HashMap, Double>(); - - private double maxLogWeight; - - private PrintWriter writer = null; - - private String toFile = null; - - private int skipped = 0; - - // -------------------- CONSTRUCTION -------------------- - - FrequencyAnalyzer(final BasicNetwork network, final int sampleInterval, - final boolean printTotals) { - if (network == null) { - throw new IllegalArgumentException("network is null"); - } - this.network = network; - this.sampleInterval = sampleInterval; - this.printTotals = printTotals; - } - - // -------------------- IMPLEMENTATION -------------------- - - void run(final String fromFile, final String toFile) throws IOException { - if (fromFile == null) { - throw new IllegalArgumentException("from file is null"); - } - if (toFile == null) { - throw new IllegalArgumentException("to file is null"); - } - this.toFile = toFile; - final PathXMLParser parser = new PathXMLParser(this.network); - parser.parse(fromFile, this); - - } - - // -------------------- IMPLEMENTATION OF PathHandler -------------------- - - @Override - public void startPaths(final Attributes attrs) { - try { - this.writer = new PrintWriter(this.toFile); - } catch (FileNotFoundException e) { - throw new RuntimeException(e); - } - } - - @Override - public void startOdPair(final BasicNode origin, final BasicNode destination) { - this.path2count.clear(); - this.path2LogWeight.clear(); - this.maxLogWeight = Double.NEGATIVE_INFINITY; - System.out.println("starting od pair " + origin.getId() + " -> " - + destination.getId()); - // TODO NEW - this.skipped = 0; - } - - @Override - // TODO CHANGED - public void startPath(final List nodePath, - final List linkPath, final Attributes attrs) { - if (this.skipped == this.sampleInterval - 1) { - this.skipped = 0; - final Integer oldCnt = this.path2count.get(nodePath); - this.path2count.put(nodePath, (oldCnt == null ? 0 : oldCnt) + 1); - final double logWeight = Double.parseDouble(attrs - .getValue(MHPathWriterWrapper.LOGWEIGHT_ATTRIBUTE)); - this.path2LogWeight.put(nodePath, logWeight); - this.maxLogWeight = Math.max(this.maxLogWeight, logWeight); - } else { - this.skipped++; - } - } - - @Override - public void endPath() { - } - - @Override - public void endOdPair() { - - double totalCnt = 0; - for (int cnt : this.path2count.values()) { - totalCnt += cnt; - } - - double totalWeight = 0; - for (Double logWeight : this.path2LogWeight.values()) { - totalWeight += Math.exp(logWeight - this.maxLogWeight); - } - - // TODO CHANGED - for (List path : this.path2count.keySet()) { - final double relFreq = Math.exp(this.path2LogWeight.get(path) - - this.maxLogWeight) - / totalWeight; - if (this.printTotals) { - this.writer.print(relFreq * totalCnt); - this.writer.print(" "); - this.writer.println(this.path2count.get(path)); - } else { - this.writer.print(relFreq); - this.writer.print(" "); - this.writer.println(this.path2count.get(path) / totalCnt); - } - } - this.writer.println(); - this.writer.flush(); - } - - @Override - public void endPaths() { - this.writer.flush(); - this.writer.close(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathHandler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathHandler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathHandler.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathHandler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.analysis; - -import java.util.List; - -import org.xml.sax.Attributes; - -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNode; - - -/** - * A handler for the PathXMLParser. - * - * @author Gunnar Flötteröd - * - */ -public interface PathHandler { - - public void startPaths(final Attributes attrs); - - // TODO CHANGED - public void startOdPair(final BasicNode origin, final BasicNode destination); - - // TODO CHANGED - public void startPath(final List nodePath, - final List linkPath, final Attributes attrs); - - public void endPath(); - - public void endOdPair(); - - public void endPaths(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathXMLParser.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathXMLParser.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathXMLParser.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/PathXMLParser.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.analysis; - -import static floetteroed.bioroute.pathwriter.PathXMLWriter.FROM_ATTRIBUTE; -import static floetteroed.bioroute.pathwriter.PathXMLWriter.LINKS_ATTRIBUTE; -import static floetteroed.bioroute.pathwriter.PathXMLWriter.NODES_ATTRIBUTE; -import static floetteroed.bioroute.pathwriter.PathXMLWriter.ODPAIR_ELEMENT; -import static floetteroed.bioroute.pathwriter.PathXMLWriter.PATHS_ELEMENT; -import static floetteroed.bioroute.pathwriter.PathXMLWriter.PATH_ELEMENT; -import static floetteroed.bioroute.pathwriter.PathXMLWriter.TO_ATTRIBUTE; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.Attributes; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.DefaultHandler; - -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; - - -/** - * Parser for path XML files created by - * bioroute.pathwriter.PathXMLWriter. Calls an instance of - * PathHandler. - * - * @author Gunnar Flötteröd - * - */ -public class PathXMLParser extends DefaultHandler { - - // -------------------- MEMBERS -------------------- - - private final BasicNetwork network; - - private PathHandler handler = null; - - // -------------------- CONSTRUCTION -------------------- - - public PathXMLParser(final BasicNetwork network) { - if (network == null) { - throw new IllegalArgumentException("network is null"); - } - this.network = network; - } - - // -------------------- IMPLEMENTATION -------------------- - - public void parse(final String file, final PathHandler handler) { - if (file == null) { - throw new IllegalArgumentException("file is null"); - } - if (handler == null) { - throw new IllegalArgumentException("handler is null"); - } - this.handler = handler; - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(false); - factory.setNamespaceAware(false); - final SAXParser parser = factory.newSAXParser(); - final XMLReader reader = parser.getXMLReader(); - reader.setContentHandler(this); - reader.setFeature("http://apache.org/xml/features/" - + "nonvalidating/load-external-dtd", false); - reader.setFeature("http://xml.org/sax/features/" + "validation", - false); - reader.parse(file); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - // -------------------- Overriding of DefaultHandler -------------------- - - @Override - public void startElement(final String uri, final String lName, - final String qName, final Attributes attrs) { - if (PATHS_ELEMENT.equals(qName)) { - this.handler.startPaths(attrs); - } else if (ODPAIR_ELEMENT.equals(qName)) { - // final BasicLink origin = this.network.getLink(attrs - // .getValue(FROM_ATTRIBUTE)); - // final BasicLink destination = this.network.getLink(attrs - // .getValue(TO_ATTRIBUTE)); - final BasicNode origin = this.network.getNode(attrs - .getValue(FROM_ATTRIBUTE)); - final BasicNode destination = this.network.getNode(attrs - .getValue(TO_ATTRIBUTE)); - this.handler.startOdPair(origin, destination); - } else if (PATH_ELEMENT.equals(qName)) { - // >>>>> TODO CHANGED >>>>> - final List nodePath = new ArrayList(); - for (String nodeId : attrs.getValue(NODES_ATTRIBUTE).split("\\s")) { - nodePath.add(this.network.getNode(nodeId.trim())); - } - final List linkPath = new ArrayList(); - for (String linkId : attrs.getValue(LINKS_ATTRIBUTE).split("\\s")) { - linkPath.add(this.network.getLink(linkId.trim())); - } - this.handler.startPath(nodePath, linkPath, attrs); - // final List path = new ArrayList(); - // for (String linkId : - // attrs.getValue(LINKS_ATTRIBUTE).split("\\s")) { - // path.add(this.network.getLink(linkId.trim())); - // } - // this.handler.startPath(path, attrs); - // <<<<< TODO CHANGED <<<<< - } - } - - @Override - public void endElement(final String uri, final String lName, - final String qName) { - if (PATHS_ELEMENT.equals(qName)) { - this.handler.endPaths(); - } else if (ODPAIR_ELEMENT.equals(qName)) { - this.handler.endOdPair(); - } else if (PATH_ELEMENT.equals(qName)) { - this.handler.endPath(); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/SimilarityAnalyzer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/SimilarityAnalyzer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/SimilarityAnalyzer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/SimilarityAnalyzer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,173 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.analysis; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Arrays; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; - -import org.xml.sax.Attributes; - -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; - - -/** - * Analyzes the within-chain similarity of paths within a given sample. - * - * @author Gunnar Flötteröd - * - */ -class SimilarityAnalyzer implements PathHandler { - - // -------------------- CONSTANTS -------------------- - - // private final int sampleInterval; - - private final BasicNetwork network; - - // -------------------- MEMBERS -------------------- - - private String toFile = null; - - private PrintWriter writer = null; - - // TODO CHANGED - private final LinkedList> routeBuffer = new LinkedList>(); - - private final double[] binCnt; - - private long totalCnt; - - // -------------------- CONSTRUCTION -------------------- - - SimilarityAnalyzer(final int maxDist, // final int sampleInterval, - final BasicNetwork network) { - // if (sampleInterval < 1) { - // throw new IllegalArgumentException("sample interval < 1"); - // } - if (maxDist < 0) { - throw new IllegalArgumentException("max. dist. < 0"); - } - if (network == null) { - throw new IllegalArgumentException("network is null"); - } - // this.sampleInterval = sampleInterval; - // this.binCnt = new double[maxDist / sampleInterval + 1]; - this.binCnt = new double[maxDist + 1]; - this.network = network; - } - - // -------------------- IMPLEMENTATION -------------------- - - void run(final String fromFile, final String toFile) throws IOException { - if (fromFile == null) { - throw new IllegalArgumentException("from file is null"); - } - if (toFile == null) { - throw new IllegalArgumentException("to file is null"); - } - this.toFile = toFile; - final PathXMLParser parser = new PathXMLParser(this.network); - parser.parse(fromFile, this); - } - - // -------------------- IMPLEMENTATION OF PathHandler -------------------- - - @Override - public void startPaths(final Attributes attrs) { - try { - this.writer = new PrintWriter(this.toFile); - } catch (FileNotFoundException e) { - throw new RuntimeException(e); - } - } - - @Override - public void startOdPair(final BasicNode origin, final BasicNode destination) { - this.totalCnt = 0; - Arrays.fill(this.binCnt, 0.0); - this.routeBuffer.clear(); - System.out.println("starting od pair " + origin.getId() + " -> " - + destination.getId()); - } - - @Override - // TODO CHANGED - public void startPath(final List nodePath, - final List linkPath, final Attributes attrs) { - /* - * (1) update the buffer - */ - this.routeBuffer.addFirst(nodePath); - while (this.routeBuffer.size() > this.binCnt.length) { - this.routeBuffer.removeLast(); - } - /* - * (2) update the statistics - */ - if (this.routeBuffer.size() == this.binCnt.length) { - this.binCnt[0] += 1.0; - final Set nodes1 = new HashSet( - this.routeBuffer.getFirst()); - for (int bin = 1; bin < this.binCnt.length; bin++) { - final Set nodes2 = new HashSet( - this.routeBuffer.get(bin)); - final double denom = 0.5 * (nodes1.size() + nodes2.size()); - nodes2.retainAll(nodes1); - this.binCnt[bin] += nodes2.size() / denom; - } - this.totalCnt++; - } - } - - @Override - public void endPath() { - } - - @Override - public void endOdPair() { - for (int i = 0; i < this.binCnt.length; i++) { - // this.writer.print(i * this.sampleInterval); - this.writer.print(i); - this.writer.print(" "); - this.writer.println(this.binCnt[i] / this.totalCnt); - } - this.writer.println(); - this.writer.flush(); - } - - @Override - public void endPaths() { - this.writer.flush(); - this.writer.close(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/StationarityTester.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/StationarityTester.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/StationarityTester.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/StationarityTester.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.analysis; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import floetteroed.utilities.math.PolynomialTrendFilter; -import floetteroed.utilities.tabularfileparser.TabularFileHandler; -import floetteroed.utilities.tabularfileparser.TabularFileParser; - - -/** - * - * @author Gunnar Flötteröd - * - */ -class StationarityTester implements TabularFileHandler { - - // -------------------- CONSTANTS -------------------- - - private final int regressionWindow; - - private final double slopeThreshold; - - // -------------------- MEMBERS -------------------- - - private final List binList = new ArrayList(); - - private final List similarityList = new ArrayList(); - - // -------------------- CONSTRUCTION -------------------- - - StationarityTester(final int regressionWindow, final double slopeThreshold) { - this.regressionWindow = regressionWindow; - this.slopeThreshold = slopeThreshold; - } - - // -------------------- IMPLEMENTATION -------------------- - - void run(final String correlationFile) throws IOException { - - final TabularFileParser parser = new TabularFileParser(); - parser.setDelimiterRegex("\\s"); - parser.parse(correlationFile, this); - - for (int startIndex = this.similarityList.size() - - this.regressionWindow; startIndex >= 0; startIndex--) { - - final PolynomialTrendFilter filter = new PolynomialTrendFilter(1.0, - 1); - for (int index = startIndex; index < startIndex - + this.regressionWindow; index++) { - filter.add(this.similarityList.get(index)); - } - - final double slope = filter.getRegressionCoefficients().get(1); - System.out.println(startIndex + "\t" + slope - + (Math.abs(slope) <= this.slopeThreshold ? "\tOK" : "")); - } - - } - - // --------------- IMPLEMENTATION OF TabularFileHandler --------------- - - @Override - public String preprocess(final String line) { - return line; - } - - @Override - public void startDocument() { - this.binList.clear(); - this.similarityList.clear(); - } - - @Override - public void startRow(final String[] row) { - if (row == null || row.length != 2) { - System.err.println("skipping row with " - + (row == null ? 0 : row.length) + " columns"); - } else { - this.binList.add(Integer.parseInt(row[0])); - this.similarityList.add(Double.parseDouble(row[1])); - } - } - - @Override - public void endDocument() { - } - - public static void main(String[] args) throws IOException { - - System.out.println("STARTED"); - - AnalysisRunner.main(new String[] { "STATIONARITY", "-correlationfile", - "./testdata/corr__psplice_0-5__profract_1-0__mu_0-02.txt", - "-slopethreshold", "1e-3", "-windowsize", "10" }); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/VisualAnalyzer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/VisualAnalyzer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/VisualAnalyzer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/analysis/VisualAnalyzer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,320 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.analysis; - -import static floetteroed.bioroute.BiorouteRunner.NETWORKLOADER_ELEMENT; -import static floetteroed.bioroute.networkloader.SUMOLoader.CONNECTIONFILE_ELEMENT; -import static floetteroed.bioroute.networkloader.SUMOLoader.EDGEFILE_ELEMENT; -import static floetteroed.bioroute.networkloader.SUMOLoader.NODEFILE_ELEMENT; -import static floetteroed.utilities.networks.containerloaders.MATSimNetworkContainerLoader.MATSIM_NETWORK_TYPE; -import static floetteroed.utilities.networks.containerloaders.OpenStreetMapNetworkContainerLoader.OPENSTREETMAP_NETWORK_TYPE; -import static floetteroed.utilities.networks.containerloaders.SUMONetworkContainerLoader.SUMO_NETWORK_TYPE; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.ANTIALIASING_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.COLOR_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.DELAY_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.LINKDATAFILE_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.LINKWIDTH_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.LOGO_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.MULTILANE_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.NETVISCONFIG_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.NETWORKTYPE_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.SHOWLINKLABELS_ELEMENT; -import static floetteroed.utilities.visualization.NetvisFromFileRunner.SHOWNODELABELS_ELEMENT; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.List; - -import org.xml.sax.Attributes; - -import floetteroed.bioroute.networkloader.AbstractNetworkLoader; -import floetteroed.bioroute.networkloader.SUMOLoader; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.DynamicDataXMLFileIO; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; -import floetteroed.utilities.visualization.NetvisFromFileRunner; - -/** - * Creates a graphical representation of the paths in a given sample. - * - * @author Gunnar Flötteröd - * - */ -class VisualAnalyzer extends DynamicDataXMLFileIO implements - PathHandler { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private final BasicNetwork network; - - private final Config networkLoaderConfig; - - // -------------------- MEMBERS -------------------- - - private String toConfigFile = null; - - private String toDataFile = null; - - private DynamicData data = new DynamicData(0, 1, 100); - - // private Set allLinks = new HashSet(); - - private int nextBin = 0; - - // -------------------- CONSTRUCTION -------------------- - - VisualAnalyzer(final BasicNetwork network, final Config networkLoaderConfig) { - if (network == null) { - throw new IllegalArgumentException("network is null"); - } - if (networkLoaderConfig == null) { - throw new IllegalArgumentException("network loader config is null"); - } - this.network = network; - this.networkLoaderConfig = networkLoaderConfig; - } - - // -------------------- IMPLEMENTATION -------------------- - - void run(final String fromFile, final String toConfigFile, - final String toDataFile) throws IOException { - if (fromFile == null) { - throw new IllegalArgumentException("from file is null"); - } - if (toConfigFile == null) { - throw new IllegalArgumentException("visual config file is null"); - } - this.toConfigFile = toConfigFile; - this.toDataFile = toDataFile; - - final PathXMLParser parser = new PathXMLParser(this.network); - parser.parse(fromFile, this); - } - - // -------------------- IMPLEMENTATION OF PathHandler -------------------- - - @Override - public void startPaths(final Attributes attrs) { - /* - * (1) initialize internally - */ - this.data = new DynamicData(0, 1, 100); - this.nextBin = 0; - /* - * (2) write config file - */ - try { - final PrintWriter writer = new PrintWriter(this.toConfigFile); - writer.println("<" + NETVISCONFIG_ELEMENT + ">"); - - writer.println(" <" + LOGO_ELEMENT + " value = \"\"/>"); - writer.println(" <" + DELAY_ELEMENT + " value = \"250\"/>"); - writer.println(" <" + LINKWIDTH_ELEMENT + " value = \"1\"/>"); - writer.println(" <" + SHOWNODELABELS_ELEMENT - + " value = \"false\"/>"); - writer.println(" <" + SHOWLINKLABELS_ELEMENT - + " value = \"false\"/>"); - writer.println(" <" + COLOR_ELEMENT - + " value = \"white 0 red 1 black 2\"/>"); - writer.println(" <" + LINKDATAFILE_ELEMENT + " value = \"" - + (new File(this.toDataFile)).getAbsolutePath() + "\"/>"); - writer.println(" <" + MULTILANE_ELEMENT + " value = \"false\"/>"); - writer.println(" <" + ANTIALIASING_ELEMENT - + " value = \"false\"/>"); - - // final String netType = - // this.network.getAttr(BasicNetwork.TYPE_ATTRIBUTE); - final String netType = this.network.getType(); - writer.println(" <" + NETWORKTYPE_ELEMENT + " value = \"" - + netType + "\"/>"); - if (MATSIM_NETWORK_TYPE.equals(netType) - || OPENSTREETMAP_NETWORK_TYPE.equals(netType)) { - writer.println(" <" - + NetvisFromFileRunner.NETWORKFILENAME_ELEMENT - + " value = \"" - + this.networkLoaderConfig.absolutePath(this.networkLoaderConfig - .get(NETWORKLOADER_ELEMENT, - AbstractNetworkLoader.FILENAME_ELEMENT)) - + "\"/>"); - } else if (SUMO_NETWORK_TYPE.equals(netType)) { - writer.println(" <" - + NODEFILE_ELEMENT - + " value = \"" - + this.networkLoaderConfig - .absolutePath(this.networkLoaderConfig - .get(NETWORKLOADER_ELEMENT, - NODEFILE_ELEMENT)) + "\"/>"); - writer.println(" <" - + EDGEFILE_ELEMENT - + " value = \"" - + this.networkLoaderConfig - .absolutePath(this.networkLoaderConfig - .get(NETWORKLOADER_ELEMENT, - EDGEFILE_ELEMENT)) + "\"/>"); - final String connectionFile = this.networkLoaderConfig.get( - NETWORKLOADER_ELEMENT, - SUMOLoader.CONNECTIONFILE_ELEMENT); - if (connectionFile != null) { - writer.println(" <" - + CONNECTIONFILE_ELEMENT - + " value = \"" - + this.networkLoaderConfig.get( - NETWORKLOADER_ELEMENT, - CONNECTIONFILE_ELEMENT) + "\"/>"); - } - } else if (!writeUnknownNetworkLoaderConfig(netType, writer, - this.networkLoaderConfig)) { - writer.flush(); - writer.close(); - throw new IllegalArgumentException("unknown network type"); - } - - writer.println(""); - writer.flush(); - writer.close(); - } catch (FileNotFoundException e) { - throw new RuntimeException(e); - } - } - - protected boolean writeUnknownNetworkLoaderConfig(final String networkType, - final PrintWriter writer, final Config networkLoaderConfig) { - return false; - } - - @Override - public void startOdPair(final BasicNode origin, final BasicNode destination) { - // this.allLinks = new HashSet(); - } - - @Override - // TODO CHANGED - public void startPath(final List nodePath, - final List linkPath, final Attributes attrs) { - // final List linkPath = Router.toLinkRoute(nodePath); // - // TODO - /* - * (1) bookkeeping - */ - // this.allLinks.addAll(linkPath); - /* - * (3) memory management - */ - if (this.nextBin >= this.data.getBinCnt()) { - this.data.resize((int) (1.2 * this.data.getBinCnt())); - } - - /* - * (2) update - */ - if (this.nextBin > 0) { - for (BasicLink link : this.network.getLinks()) { - this.data - .put(link, this.nextBin, Math.abs(this.data - .getBinValue(link, this.nextBin - 1))); - } - } - for (BasicLink link : linkPath) { - this.data.put(link, this.nextBin, - -this.data.getBinValue(link, this.nextBin) - 1.0); - } - - this.nextBin++; - - /* - * (4) update - */ - // for (BasicLink link : this.allLinks) { - // this.data.put(link, this.nextBin, 1.0); - // } - // for (BasicLink link : linkPath) { - // this.data.put(link, this.nextBin, 2.0); - // } - // this.nextBin++; - } - - @Override - public void endPath() { - } - - @Override - public void endOdPair() { - } - - @Override - public void endPaths() { - - this.data.resize(Math.max(this.nextBin + 1, 1)); - - // duplicate very last snapshot - for (BasicLink link : this.network.getLinks()) { - this.data.put(link, this.data.getBinCnt() - 1, - this.data.getBinValue(link, this.data.getBinCnt() - 2)); - } - - // normalize and add path to all but the last snapshot - for (int bin = 0; bin < this.data.getBinCnt(); bin++) { - double max = 1; // to avoid division by zero - for (BasicLink link : this.network.getLinks()) { - max = Math.max(max, Math.abs(this.data.getBinValue(link, bin))); - } - for (BasicLink link : this.network.getLinks()) { - final double val = this.data.getBinValue(link, bin); - if ((val >= 0) || (bin == this.data.getBinCnt() - 1)) { - this.data.put(link, bin, Math.abs(val) / max); - } else { - this.data.put(link, bin, 2.0); - } - } - } - - if (this.toDataFile != null) { - try { - this.write(this.toDataFile, this.data); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } - - // --------------- IMPLEMENTATION OF DynamicDataXMLFileIO --------------- - - @Override - protected BasicLink attrValue2key(final String id) { - return this.network.getLink(id); - } - - @Override - protected String key2attrValue(final BasicLink link) { - return link.getId().toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/BiorouteRunner.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/BiorouteRunner.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/BiorouteRunner.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/BiorouteRunner.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,294 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute; - -import java.util.ArrayList; -import java.util.List; - -import floetteroed.bioroute.utilities.NetworkInstantiator; -import floetteroed.utilities.ErrorMsgPrinter; -import floetteroed.utilities.Tuple; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.config.ConfigReader; -import floetteroed.utilities.config.ConfigurableInstantiator; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; - -/** - * The main class for running BIOROUTE. It - *
    - *
  1. reads the configuration XML file; - *
  2. instantiates the indicated classes; - *
  3. configures these classes; - *
  4. executes them. - *
- * - * @author Gunnar Flötteröd - * - */ -public class BiorouteRunner { - - // -------------------- CONSTANTS -------------------- - - public static final String BIOROUTE_ELEMENT = "bioroute"; - - public static final String CLASSNAME_ELEMENT = "classname"; - - public static final String NETWORKLOADER_ELEMENT = "networkloader"; - - public static final String NETWORKPREPROCESSOR_ELEMENT = "networkpreprocessor"; - - public static final String ODPAIRS_ELEMENT = "odpairs"; - - public static final String ODPAIR_ELEMENT = "odpair"; - - public static final String ORIGIN_ELEMENT = "origin"; - - public static final String DESTINATION_ELEMENT = "destination"; - - public static final String PATHGENERATOR_ELEMENT = "pathgenerator"; - - public static final String PATHWRITER_CONFIG_ELEMENT = "pathwriter"; - - // -------------------- IMPLEMENTATION -------------------- - - /** - * Private constructor -- this class cannot be instantiated. - */ - private BiorouteRunner() { - } - - // -------------------- IMPLEMENTATION -------------------- - - /** - * Parses the BIOROUTE_ELEMENT.ODPAIRS_ELEMENT subtree of the - * full XML configuration config instance for - * origin/destination pair specifications. - * - * @param net - * the network - * @param config - * the (full) configuration - * @return a list of origin/destination node reference tuples - */ - protected static List> extractOdPairs( - final BasicNetwork net, final Config config) { - final int odPairCnt = config.getList(BIOROUTE_ELEMENT, ODPAIRS_ELEMENT, - ODPAIR_ELEMENT, ORIGIN_ELEMENT).size(); - final List> result = new ArrayList>( - odPairCnt); - for (int i = 0; i < odPairCnt; i++) { - final String origin = config.get(i, BIOROUTE_ELEMENT, - ODPAIRS_ELEMENT, ODPAIR_ELEMENT, ORIGIN_ELEMENT); - final String destination = config.get(i, BIOROUTE_ELEMENT, - ODPAIRS_ELEMENT, ODPAIR_ELEMENT, DESTINATION_ELEMENT); - - if (origin.equals(destination)) { - System.out.println("Skipping O/D pair " + origin + "/" - + destination - + " because origin and destination are identical."); - } else { - final BasicLink shortcut = net.getLink(origin, destination); - if (shortcut == null) { - result.add(new Tuple(net - .getNode(origin), net.getNode(destination))); - } else { - System.out.println("Skipping O/D pair " + origin + "/" - + destination - + " because it is directly connected by link " - + shortcut.getId() + "."); - } - } - } - return result; - } - - // private static Tuple getStartEndLinksForNodeIds( - // final BasicNetwork net, final String origin, - // final String destination) { - // BasicLink startLink = null; - // BasicLink endLink = null; - // for (BasicLink link : net.getLinks()) { - // if (link.getFromNode().getId().equals(origin)) { - // startLink = link; - // } - // if (link.getToNode().getId().equals(destination)) { - // endLink = link; - // } - // } - // if (startLink == null) { - // System.err.println("origin node " + origin - // + " has no outgoing link"); - // } - // if (endLink == null) { - // System.err.println("destination node " + destination - // + " has no ingoing link"); - // } - // if (startLink != null && endLink != null) { - // return new Tuple(startLink, endLink); - // } else { - // return null; - // } - // } - - // TODO running original - // protected static List> extractOdPairs( - // final BasicNetwork net, final Config config) { - // final int odPairCnt = config.getList(BIOROUTE_ELEMENT, ODPAIRS_ELEMENT, - // ODPAIR_ELEMENT, ORIGIN_ELEMENT).size(); - // final List> result = new - // ArrayList>( - // odPairCnt); - // for (int i = 0; i < odPairCnt; i++) { - // final String origin = config.get(i, BIOROUTE_ELEMENT, - // ODPAIRS_ELEMENT, ODPAIR_ELEMENT, ORIGIN_ELEMENT); - // final String destination = config.get(i, BIOROUTE_ELEMENT, - // ODPAIRS_ELEMENT, ODPAIR_ELEMENT, DESTINATION_ELEMENT); - // result.add(new Tuple(net.getLink(origin), net - // .getLink(destination))); - // } - // return result; - // } - - // -------------------- MAIN-FUNCTION -------------------- - - /** - * The BIOROUTE main function. - * - * @params args command-line parameters; should contain exactly one entry - * indicating the config XML file - */ - public static void main(String[] args) { - - try { - - System.out.println("STARTED.."); - - /* - * >>>>> TODO TEST >>>>> - */ - // System.out.print("Waiting until one processor is assigned ... "); - // int proc = 0; - // Runtime rt; - // do { - // rt = Runtime.getRuntime(); - // if (rt.availableProcessors() != proc) { - // proc = rt.availableProcessors(); - // System.out.print("(available=" + proc+") "); - // } - // } while (rt.availableProcessors() > 1); - // System.out.println("OK"); - /* - * <<<<< TODO TEST <<<<< - */ - - /* - * (1) Extract single command line parameter. - */ - if (args == null || args.length == 0) { - System.err.println("name of configuration file is missing"); - System.exit(-1); - } - final String configFileName = args[0]; - - /* - * (2) Load configuration. - */ - final Config config = (new ConfigReader()).read(configFileName); - - /* - * (3) Instantiate and run the network loader and preprocessor. - */ - final BasicNetwork network = NetworkInstantiator.loadNetwork( - config, BIOROUTE_ELEMENT, NETWORKLOADER_ELEMENT, - CLASSNAME_ELEMENT); - NetworkInstantiator.preprocessNetwork(network, config, - BIOROUTE_ELEMENT, NETWORKPREPROCESSOR_ELEMENT, - CLASSNAME_ELEMENT); - - /* - * (4) Instantiate the path writer. - */ - final PathWriter pathWriter = (PathWriter) ConfigurableInstantiator - .newConfiguredInstance(config, BIOROUTE_ELEMENT, - PATHWRITER_CONFIG_ELEMENT, CLASSNAME_ELEMENT); - - /* - * (5) Instantiate and initialize the path generator. - */ - final PathGenerator pathGenerator = (PathGenerator) ConfigurableInstantiator - .newConfiguredInstance(config, BIOROUTE_ELEMENT, - PATHGENERATOR_ELEMENT, CLASSNAME_ELEMENT); - pathGenerator.setNetwork(network); - pathGenerator.setPathWriter(pathWriter); - - /* - * (6) Run the whole thing. - */ - int i = 0; - pathWriter.open(); - List> odPairs = extractOdPairs(network, - config); - for (Tuple odPair : odPairs) { - System.out.println("processing od pair #" + (++i) + "/" - + odPairs.size() + " from link " - + odPair.getA().getId() + " to link " - + odPair.getB().getId()); - pathWriter.startOdPair(odPair.getA().getId(), odPair.getB() - .getId()); - // if (odPair.getA().getToNode() - // .equals(odPair.getB().getFromNode())) { - // System.err.println("skipping adjacent links"); - // } else { - pathGenerator.run(odPair.getA(), odPair.getB()); - // } - pathWriter.endOdPair(); - } - pathWriter.close(); - - /* - * >>>>> TODO EXPERIMENTAL >>>>> - */ - // final String correlationFile = "corr.txt"; - // AnalysisRunner.main(new String[] { "CORRELATION", "-configfile", - // "config.xml", "-maxdistance", "100", "-resultfile", - // correlationFile }); - // AnalysisRunner.main(new String[] { "STATIONARITY", - // "-correlationfile", correlationFile, "-slopethreshold", - // "1e-3", "-windowsize", "10" }); - /* - * <<<<< TODO EXPERIMENTAL <<<<< - */ - - System.out.println("..DONE"); - - } catch (Exception e) { - ErrorMsgPrinter.toStdOut(e); - ErrorMsgPrinter.toErrOut(e); - } - - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/examples/michelemma/RunMichelEmma.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/examples/michelemma/RunMichelEmma.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/examples/michelemma/RunMichelEmma.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/examples/michelemma/RunMichelEmma.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -package floetteroed.bioroute.examples.michelemma; - -import floetteroed.bioroute.BiorouteRunner; -import floetteroed.bioroute.analysis.AnalysisRunner; -import floetteroed.utilities.visualization.NetvisFromFileRunner; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class RunMichelEmma { - - public static void main(String[] args) { - - final String testdataPath = "./testdata/MichelEmmaNetwork/"; - final String biorouteConfig = testdataPath + "config.xml"; - final String netvisConfig = testdataPath + "vis-config.xml"; - - BiorouteRunner.main(new String[] { biorouteConfig }); - - AnalysisRunner.main(new String[] { "VISUAL", "-CONFIGFILE", - biorouteConfig, "-VISCONFIGFILE", netvisConfig, "-VISDATAFILE", - testdataPath + "vis-data.xml" }); - - // set link with to 250 to see something meaningful - NetvisFromFileRunner.main(new String[] { netvisConfig }); - - - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/AbstractNetworkLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/AbstractNetworkLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/AbstractNetworkLoader.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/AbstractNetworkLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkloader; - -import static floetteroed.bioroute.BiorouteRunner.NETWORKLOADER_ELEMENT; - -import floetteroed.bioroute.NetworkLoader; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.networks.basic.BasicNetwork; - -/** - * Abstract implementation of a basic network loader. - * - * @author Gunnar Flötteröd - * - */ -public abstract class AbstractNetworkLoader implements NetworkLoader { - - // -------------------- CONSTANTS -------------------- - - public static final String FILENAME_ELEMENT = "filename"; - - // -------------------- MEMBERS -------------------- - - private String fileName = null; - - // -------------------- CONSTRUCTION -------------------- - - public AbstractNetworkLoader() { - // no-argument constructor for reflective instantiation - } - - // ---------- PARTIAL IMPLEMENTATION OF NetworkLoader ---------- - - @Override - public void configure(final Config config) { - this.fileName = config.get(NETWORKLOADER_ELEMENT, FILENAME_ELEMENT); - if (this.fileName == null) { - throw new IllegalArgumentException( - "There is not network file specified. " - + "Check if the following configuration entry exists: " - + NETWORKLOADER_ELEMENT + "." + FILENAME_ELEMENT); - } - this.fileName = config.absolutePath(this.fileName); - } - - @Override - public abstract BasicNetwork loadNetwork(); - - // -------------------- GETTERS -------------------- - - public String getFileName() { - return this.fileName; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/MATSimLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/MATSimLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/MATSimLoader.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/MATSimLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkloader; - -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNetworkFactory; -import floetteroed.utilities.networks.construction.NetworkContainer; -import floetteroed.utilities.networks.containerloaders.MATSimNetworkContainerLoader; - -/** - * Loads a subset of the MATSim network XML file format. - * - * @author Gunnar Flötteröd - * - */ -public class MATSimLoader extends AbstractNetworkLoader { - - // -------------------- CONSTRUCTION -------------------- - - public MATSimLoader() { - } - - // ---------- REMAINING IMPLEMENTATION OF NetworkLoader ---------- - - @Override - public BasicNetwork loadNetwork() { - final NetworkContainer container = (new MATSimNetworkContainerLoader()) - .load(this.getFileName()); - return (new BasicNetworkFactory()).newNetwork(container); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/OpenStreetMapLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/OpenStreetMapLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/OpenStreetMapLoader.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/OpenStreetMapLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkloader; - -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNetworkFactory; -import floetteroed.utilities.networks.construction.NetworkContainer; -import floetteroed.utilities.networks.containerloaders.OpenStreetMapNetworkContainerLoader; - -/** - * - * Loads a subset of the MATSim network XML file format. - * - * @author Gunnar Flötteröd - * - */ -public class OpenStreetMapLoader extends AbstractNetworkLoader { - - // -------------------- CONSTRUCTION -------------------- - - public OpenStreetMapLoader() { - } - - // ---------- REMAINING IMPLEMENTATION OF NetworkLoader ---------- - - @Override - public BasicNetwork loadNetwork() { - final NetworkContainer container = (new OpenStreetMapNetworkContainerLoader()) - .load(this.getFileName()); - return (new BasicNetworkFactory()).newNetwork(container); - - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/SUMOLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/SUMOLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/SUMOLoader.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkloader/SUMOLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkloader; - -import static floetteroed.bioroute.BiorouteRunner.NETWORKLOADER_ELEMENT; - -import floetteroed.bioroute.NetworkLoader; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNetworkFactory; -import floetteroed.utilities.networks.construction.NetworkContainer; -import floetteroed.utilities.networks.containerloaders.SUMONetworkContainerLoader; - -/** - * Loads a subset of the SUMO network XML format(s). - * - * @author Gunnar Flötteröd - * - */ -public class SUMOLoader implements NetworkLoader { - - // -------------------- CONSTANTS -------------------- - - public static final String NODEFILE_ELEMENT = "nodefile"; - - public static final String EDGEFILE_ELEMENT = "edgefile"; - - public static final String CONNECTIONFILE_ELEMENT = "connectionfile"; - - // -------------------- MEMBERS -------------------- - - private String nodeFile = null; - - private String edgeFile = null; - - private String connectionFile = null; - - // -------------------- CONSTRUCTION -------------------- - - public SUMOLoader() { - } - - // -------------------- IMPLEMENTATION OF NetworkLoader -------------------- - - @Override - public void configure(final Config config) { - this.nodeFile = config.get(NETWORKLOADER_ELEMENT, NODEFILE_ELEMENT); - if (this.nodeFile == null) { - throw new IllegalArgumentException( - "There is no node file specified. " - + "Check if the following configuration entry exists: " - + NETWORKLOADER_ELEMENT + "." + NODEFILE_ELEMENT); - } - this.nodeFile = config.absolutePath(this.nodeFile); - this.edgeFile = config.get(NETWORKLOADER_ELEMENT, EDGEFILE_ELEMENT); - if (this.edgeFile == null) { - throw new IllegalArgumentException( - "There is no edge file specified. " - + "Check if the following configuration entry exists: " - + NETWORKLOADER_ELEMENT + "." + EDGEFILE_ELEMENT); - } - this.edgeFile = config.absolutePath(this.edgeFile); - this.connectionFile = config.get(NETWORKLOADER_ELEMENT, - CONNECTIONFILE_ELEMENT); // OK to be null - if (this.connectionFile != null) { - this.connectionFile = config.absolutePath(this.connectionFile); - } - } - - @Override - public BasicNetwork loadNetwork() { - // final SUMONetworkLoader loader = new SUMONetworkLoader(); - // return loader.loadNetwork(this.nodeFile, this.edgeFile, - // this.connectionFile); - final NetworkContainer container = (new SUMONetworkContainerLoader()) - .loadNetworkContainer(nodeFile, edgeFile, connectionFile); - return (new BasicNetworkFactory()).newNetwork(container); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkLoader.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute; - -import floetteroed.utilities.config.Configurable; -import floetteroed.utilities.networks.basic.BasicNetwork; - -/** - * BIOROUTE interface. To be implemented by the network loader. - * - * @author Gunnar Flötteröd - * - */ -public interface NetworkLoader extends Configurable { - - /** - * Loads the network. - * - * @return the network - */ - public BasicNetwork loadNetwork(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/DoNothingPreprocessor.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/DoNothingPreprocessor.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/DoNothingPreprocessor.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/DoNothingPreprocessor.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkpreprocessor; - -import floetteroed.bioroute.NetworkPreprocessor; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.networks.basic.BasicNetwork; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class DoNothingPreprocessor implements NetworkPreprocessor { - - @Override - public void configure(Config config) { - } - - @Override - public void preprocess(BasicNetwork network) { - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/MATSimPreprocessor.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/MATSimPreprocessor.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/MATSimPreprocessor.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/MATSimPreprocessor.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkpreprocessor; - -import floetteroed.bioroute.NetworkPreprocessor; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; - -/** - * Preprocessor for MATSim networks. Infers the free flow travel time from link - * length and free flow speed. - * - * @author Gunnar Flötteröd - * - */ -public class MATSimPreprocessor implements NetworkPreprocessor { - - // -------------------- CONSTANTS -------------------- - - /** - * Required link attribute for the preprocessing; also available afterwards. - */ - public static final String FREESPEED_ATTRIBUTE = "freespeed"; - - /** - * Required link attribute for the preprocessing; also available afterwards. - */ - public static final String LENGTH_ATTRIBUTE = "length"; - - /** - * Available link attribute after the preprocessing. - */ - public static final String TRAVELTIME_ATTRIBUTE = "traveltime"; - - // -------------------- CONSTRUCTION -------------------- - - public MATSimPreprocessor() { - } - - // -------------------- CONSTANTS -------------------- - - @Override - public void configure(final Config config) { - } - - @Override - public void preprocess(final BasicNetwork network) { - for (BasicLink link : network.getLinks()) { - final double length_m = Double.parseDouble(link - .getAttr(LENGTH_ATTRIBUTE)); - final double vMax_m_s = Double.parseDouble(link - .getAttr(FREESPEED_ATTRIBUTE)); - final double tt_s = length_m / vMax_m_s; - link.setAttr(TRAVELTIME_ATTRIBUTE, Double.toString(tt_s)); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/OpenStreetMapPreprocessor.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/OpenStreetMapPreprocessor.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/OpenStreetMapPreprocessor.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/OpenStreetMapPreprocessor.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkpreprocessor; - -import java.awt.geom.Point2D; -import java.util.Map; - -import floetteroed.bioroute.NetworkPreprocessor; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; -import floetteroed.utilities.visualization.OpenStreetMap2VisNetwork; - -/** - * Preprocessor for OpenStreetMap networks. Infers Euklidean node coordinates - * and link lengths (naive, projected) from node longitudes/latitudes. - * - * @author Gunnar Flötteröd - * - */ -public class OpenStreetMapPreprocessor implements NetworkPreprocessor { - - // -------------------- CONSTANTS -------------------- - - /** - * Available link attribute after the prep-rocessing. - */ - public static final String NAIVELENGTH_ATTRIBUTE = "naivelength"; - - /** - * Available link attribute after the pre-processing. - */ - public static final String PROJECTEDLENGTH_ATTRIBUTE = "projectedlength"; - - // -------------------- CONSTRUCTION -------------------- - - public OpenStreetMapPreprocessor() { - } - - // --------------- IMPLEMENTATION OF NetworkPreprocessor --------------- - - @Override - public void configure(final Config config) { - } - - @Override - public void preprocess(final BasicNetwork network) { - /* - * (1) extract node coordinates - */ - // final Map node2LonLat = - // OpenStreetMapNetVisPreprocessor - // .node2LonLat(network); - // final Map node2xy = - // OpenStreetMapNetVisPreprocessor - // .node2xy(node2LonLat); - final Map node2LonLat = OpenStreetMap2VisNetwork - .node2LonLat(network); - final Map node2xy = OpenStreetMap2VisNetwork - .node2xy(node2LonLat); - /* - * (2) add link attributes - */ - for (BasicLink link : network.getLinks()) { - /* - * (2.1) naive length - */ - final Point2D.Double fromLonLat = node2LonLat.get(link - .getFromNode()); - final Point2D.Double toLonLat = node2LonLat.get(link.getToNode()); - final double naiveLength = MathHelpers.length(fromLonLat.x, - fromLonLat.y, toLonLat.x, toLonLat.y); - link.setAttr(NAIVELENGTH_ATTRIBUTE, Double.toString(naiveLength)); - /* - * (2.2) projected length - */ - final Point2D.Double fromXY = node2xy.get(link.getFromNode()); - final Point2D.Double toXY = node2xy.get(link.getToNode()); - final double projectedLength = MathHelpers.length(fromXY.x, - fromXY.y, toXY.x, toXY.y); - link.setAttr(PROJECTEDLENGTH_ATTRIBUTE, - Double.toString(projectedLength)); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/SUMOPreprocessor.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/SUMOPreprocessor.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/SUMOPreprocessor.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/networkpreprocessor/SUMOPreprocessor.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.networkpreprocessor; - -import floetteroed.bioroute.NetworkPreprocessor; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; - -/** - * Preprocessor for SUMO networks. Infers link lengths from node coordinates. - * - * @author Gunnar Flötteröd - * - */ -public class SUMOPreprocessor implements NetworkPreprocessor { - - // -------------------- CONSTANTS -------------------- - - /** - * Required node attribute for the preprocessing. - */ - public static final String NODE_X_ATTRIBUTE = "x"; - - /** - * Required node attribute for the preprocessing. - */ - public static final String NODE_Y_ATTRIBUTE = "y"; - - /** - * Available link attribute after the preprocessing. - */ - public static final String NAIVELENGTH_ATTRIBUTE = "naivelength"; - - // -------------------- CONSTRUCTION -------------------- - - public SUMOPreprocessor() { - } - - // --------------- IMPLEMENTATION OF NetworkPreprocessor --------------- - - @Override - public void configure(final Config config) { - } - - @Override - public void preprocess(final BasicNetwork network) { - for (BasicLink link : network.getLinks()) { - final BasicNode from = link.getFromNode(); - final BasicNode to = link.getToNode(); - final double naiveLength = MathHelpers.length(Double - .parseDouble(from.getAttr(NODE_X_ATTRIBUTE)), Double - .parseDouble(from.getAttr(NODE_Y_ATTRIBUTE)), Double - .parseDouble(to.getAttr(NODE_X_ATTRIBUTE)), Double - .parseDouble(to.getAttr(NODE_Y_ATTRIBUTE))); - link.setAttr(NAIVELENGTH_ATTRIBUTE, Double.toString(naiveLength)); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkPreprocessor.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkPreprocessor.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkPreprocessor.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/NetworkPreprocessor.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute; - -import floetteroed.utilities.config.Configurable; -import floetteroed.utilities.networks.basic.BasicNetwork; - -/** - * BIOROUTE interface. Defines the network preprocessor. - * - * @author Gunnar Flötteröd - * - */ -public interface NetworkPreprocessor extends Configurable { - - /** - * Preprocesses the network. - * - * @param network - * the network; possibly modified by a call to this function - */ - public void preprocess(final BasicNetwork network); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLinkAndPathCost.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLinkAndPathCost.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLinkAndPathCost.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLinkAndPathCost.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import static floetteroed.bioroute.BiorouteRunner.PATHGENERATOR_ELEMENT; - -import floetteroed.utilities.config.Config; -import floetteroed.utilities.math.MathHelpers; - -/** - * Computes link costs and path weights. - * - * @author Gunnar Flötteröd - * - */ -class MHGPSLinkAndPathCost extends MHLinkAndPathCost { - - // -------------------- CONSTANTS -------------------- - - // XML CONFIGURATION - - static final String GPSFILE_ELEMENT = "gpsfile"; - - static final String LOGLIKELIHOODSCALE_ELEMENT = "loglikelihoodscale"; - - // DEFAULT VALUES - - static final double DEFAULT_LOGLIKELIHOODSCALE = 1.0; - - // -------------------- MEMBERS -------------------- - - // CONFIGURATION - - private String gpsFile = null; - - private Double logLikelihoodScale = null; - - private MHGPSLogLikelihood gpsLogLikelihood = null; - - // -------------------- CONSTRUCTION -------------------- - - public MHGPSLinkAndPathCost() { - // no-argument constructor for reflective instantiation - } - - // -------------------- INITIALIZATION -------------------- - - @Override - void configure(final Config config) { - - super.configure(config); - - this.gpsFile = config.absolutePath(config.get(PATHGENERATOR_ELEMENT, - GPSFILE_ELEMENT)); - this.gpsLogLikelihood = new MHGPSLogLikelihood(); - if (this.gpsFile != null) { - this.gpsLogLikelihood.parse(this.gpsFile); - } - - this.logLikelihoodScale = MathHelpers.parseDouble(config.get( - PATHGENERATOR_ELEMENT, LOGLIKELIHOODSCALE_ELEMENT)); - if (this.logLikelihoodScale == null) { - // TODO default values should be put into config object - this.logLikelihoodScale = DEFAULT_LOGLIKELIHOODSCALE; - } - } - - // -------------------- IMPLEMENTATION OF MHWeight -------------------- - - @Override - double logWeightWithoutCorrection(final MHPath path) { - return (super.logWeightWithoutCorrection(path) + this.logLikelihoodScale - * this.gpsLogLikelihood.logLikelihood(path)); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLogLikelihood.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLogLikelihood.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLogLikelihood.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSLogLikelihood.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.Attributes; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.DefaultHandler; - -import floetteroed.utilities.networks.basic.BasicNode; - - -/** - * - * @author Gunnar Flötteröd - * - */ -class MHGPSLogLikelihood extends DefaultHandler { - - // -------------------- CONSTANTS -------------------- - - final String GPSPOINT_ELEMENT = "gpspoint"; - - final String DISTANCE_ELEMENT = "distance"; - - final String LINK_ATTRIBUTE = "link"; - - final String VALUE_ATTRIBUTE = "value"; - - // -------------------- MEMBERS -------------------- - - private final List> link2distances = new ArrayList>(); - - // -------------------- CONSTRUCTION -------------------- - - MHGPSLogLikelihood() { - } - - // -------------------- PARSING -------------------- - - void parse(final String gpsFile) { - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(false); - factory.setNamespaceAware(false); - final SAXParser parser = factory.newSAXParser(); - final XMLReader reader = parser.getXMLReader(); - reader.setContentHandler(this); - reader.setFeature("http://apache.org/xml/features/" - + "nonvalidating/load-external-dtd", false); - reader.setFeature("http://xml.org/sax/features/" + "validation", - false); - reader.parse(gpsFile); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - // -------------------- CONTENT ACCESS -------------------- - - double logLikelihood(final MHPath path) { - double result = 0; - for (Map link2dist : this.link2distances) { - double minDist = Double.MAX_VALUE; - for (BasicNode invertedNode : path.getNodes()) { - final String linkId = invertedNode.getId(); - minDist = Math.min(minDist, link2dist.get(linkId)); - } - result -= minDist * minDist; - } - return result; - } - - // -------------------- OVERRIDING OF DefaultHandler -------------------- - - private Map link2dist = null; - - @Override - public void startDocument() { - this.link2dist = null; - } - - @Override - public void startElement(final String uri, final String lName, - final String qName, final Attributes attrs) { - if (GPSPOINT_ELEMENT.equals(qName)) { - this.link2dist = new LinkedHashMap(); - } else if (DISTANCE_ELEMENT.equals(qName)) { - final String linkId = attrs.getValue(LINK_ATTRIBUTE); - final Double dist = Double.parseDouble(attrs - .getValue(VALUE_ATTRIBUTE)); - this.link2dist.put(linkId, dist); - } - } - - @Override - public void endElement(final String uri, final String lName, - final String qName) { - if (GPSPOINT_ELEMENT.equals(qName)) { - this.link2distances.add(this.link2dist); - this.link2dist = null; - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSPathGenerator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSPathGenerator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSPathGenerator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHGPSPathGenerator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import floetteroed.bioroute.PathGenerator; -import floetteroed.utilities.config.Config; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class MHGPSPathGenerator extends MHPathGenerator implements - PathGenerator { - - // -------------------- CONSTRUCTION -------------------- - - public MHGPSPathGenerator() { - // no-argument constructor for reflective instantiation - // TODO but this (and its superclass) is not at all used reflectively! - } - - @Override - MHLinkAndPathCost newConfiguredLinkAndPathCost(final Config config) { - final MHGPSLinkAndPathCost result = new MHGPSLinkAndPathCost(); - result.configure(config); - return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHLinkAndPathCost.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHLinkAndPathCost.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHLinkAndPathCost.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHLinkAndPathCost.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,205 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import static floetteroed.bioroute.BiorouteRunner.PATHGENERATOR_ELEMENT; -import static floetteroed.bioroute.pathgenerator.metropolishastings.MHPathGenerator.RELATIVECOSTSCALE_ELEMENT; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import floetteroed.utilities.config.Config; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.math.metropolishastings.MHWeight; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.shortestpaths.LinkCost; - - -/** - * Computes link costs and path weights. - * - * @author Gunnar Flötteröd - * - */ -class MHLinkAndPathCost implements LinkCost, MHWeight { - - // -------------------- CONSTANTS -------------------- - - // XML CONFIGURATION - - static final String LINKCOST_ELEMENT = "linkcost"; - - static final String ATTRIBUTE_ELEMENT = "attribute"; - - static final String COEFFICIENT_ELEMENT = "coefficient"; - - static final String LINKCOSTSCALE_ELEMENT = "linkcostscale"; - - // TODO REMOVED - // static final String NODELOOPSCALE_ELEMENT = "nodeloopscale"; - - // DEFAULT VALUES - - // TODO REMOVED - // static final double DEFAULT_NODELOOPSCALE = 0.0; - - // -------------------- MEMBERS -------------------- - - // CONFIGURATION - - private List attributes = null; - - private List coefficients = null; - - private Double linkCostScale = null; - - // TODO REMOVED - // private Double nodeLoopScale = null; - - // RUNTIME - - private Map link2weight = null; - - // -------------------- CONSTRUCTION -------------------- - - public MHLinkAndPathCost() { - // no-argument constructor for reflective instantiation - } - - // -------------------- INITIALIZATION -------------------- - - void configure(final Config config) { - - this.attributes = config.getList(PATHGENERATOR_ELEMENT, - LINKCOST_ELEMENT, ATTRIBUTE_ELEMENT); - if (this.attributes == null || this.attributes.size() == 0) { - throw new IllegalArgumentException("attributes are not specified"); - } - - final List coeffStrs = config.getList(PATHGENERATOR_ELEMENT, - LINKCOST_ELEMENT, COEFFICIENT_ELEMENT); - if (coeffStrs == null || coeffStrs.size() != this.attributes.size()) { - throw new IllegalArgumentException( - "coefficients do not match attributes"); - } - this.coefficients = new ArrayList(coeffStrs.size()); - for (String coeffStr : coeffStrs) { - this.coefficients.add(Double.parseDouble(coeffStr)); - } - - this.linkCostScale = MathHelpers.parseDouble(config.get( - PATHGENERATOR_ELEMENT, LINKCOSTSCALE_ELEMENT)); - if (this.linkCostScale == null - && config.get(PATHGENERATOR_ELEMENT, RELATIVECOSTSCALE_ELEMENT) == null) { - throw new IllegalArgumentException(LINKCOSTSCALE_ELEMENT - + " is unspecified but " + RELATIVECOSTSCALE_ELEMENT - + " is unspecified as well"); - } - - // TODO REMOVED - // this.nodeLoopScale = MathHelpers.parseDouble(config.get( - // PATHGENERATOR_ELEMENT, NODELOOPSCALE_ELEMENT)); - // if (this.nodeLoopScale == null) { - // this.nodeLoopScale = DEFAULT_NODELOOPSCALE; - // } - } - - // -------------------- SETTERS AND GETTERS -------------------- - - void setNetwork(final BasicNetwork network) { - this.link2weight = new HashMap(); - for (BasicLink link : network.getLinks()) { - double weight = 0; - for (int i = 0; i < this.attributes.size(); i++) { - weight += this.coefficients.get(i) - * Double.parseDouble(link.getAttr(this.attributes - .get(i))); - } - this.link2weight.put(link, weight); - } - } - - void setLinkCostScale(final double linkCostScale) { - this.linkCostScale = linkCostScale; - } - - double getLinkCostScale() { - return this.linkCostScale; - } - - // void setNodeLoopScale(final double nodeLoopScale) { - // this.nodeLoopScale = nodeLoopScale; - // } - - // double getNodeLoopScale() { - // return this.nodeLoopScale; - // } - - // -------------------- IMPLEMENTATION OF LinkCost -------------------- - - @Override - public double getCost(final BasicLink link) { - return this.link2weight.get(link); - } - - // -------------------- IMPLEMENTATION OF MHWeight -------------------- - - double logWeightWithoutCorrection(final MHPath path) { - - double pathCost = 0; - for (BasicLink link : path.getLinks()) { - pathCost += this.getCost(link); - } - - return (-this.linkCostScale * pathCost); - - // final double nodeLoopCnt; - // if (this.nodeLoopScale != 0.0) { - // // we know that we are dealing with an inverted network here - // final Set originalNodeIds = new HashSet(); - // originalNodeIds.add(path.getNodes().get(0) - // .getAttr(NODE_ORIGINALFROMNODE_ID)); - // for (Node invertedNode : path.getNodes()) { - // originalNodeIds.add(invertedNode - // .getAttr(NODE_ORIGINALTONODE_ID)); - // } - // nodeLoopCnt = (path.getLinks().size() + 2) - originalNodeIds.size(); - // } else { - // nodeLoopCnt = 0.0; - // } - // - // return (-this.linkCostScale * pathCost - this.nodeLoopScale - // * nodeLoopCnt); - } - - @Override - public double logWeight(final MHPath path) { - return (this.logWeightWithoutCorrection(path) - Math.log(path - .pointCombinationSize())); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathGenerator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathGenerator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathGenerator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathGenerator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,364 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Random; - -import floetteroed.bioroute.BiorouteRunner; -import floetteroed.bioroute.PathGenerator; -import floetteroed.bioroute.PathWriter; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.math.metropolishastings.MHAlgorithm; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; -import floetteroed.utilities.networks.shortestpaths.Router; - -/** - * A Metropolis-Hastings code for path sampling. - * - * @see
Flötteröd & Bierlaire (2011) - * - * @author Gunnar Flötteröd - * - */ -public class MHPathGenerator implements PathGenerator { - - // -------------------- CONSTANTS -------------------- - - // DEFAULT PARAMETER VALUES - - public static final int DEFAULT_MSGINTERVAL = Integer.MAX_VALUE; - - public static final int DEFAULT_BURNINITERATIONS = 0; - - public static final int DEFAULT_SAMPLEINTERVAL = 1; - - public static final double DEFAULT_SPLICEPROBABILITY = 0.5; - - public static final double DEFAULT_PROPOSALSCALEFACTOR = 1.0; - - // CONFIG ELEMENTS - - public static final String RANDOMSEED_ELEMENT = "randomseed"; - - public static final String MSGINTERVAL_ELEMENT = "msginterval"; - - public static final String TOTALITERATIONS_ELEMENT = "totaliterations"; - - public static final String SAMPLEINTERVAL_ELEMENT = "sampleinterval"; - - public static final String RELATIVECOSTSCALE_ELEMENT = "relativecostscale"; - - public static final String RELATIVECOSTOFFSET_ELEMENT = "relativecostoffset"; - - public static final String SPLICEPROBABILITY_ELEMENT = "spliceprobability"; - - public static final String PROPOSALSCALEFACTOR_ELEMENT = "proposalscalefactor"; - - // -------------------- MEMBERS -------------------- - - // CONFIGURATION - - private Integer msgInterval = null; - - // private Long randomSeed = null; - - private Integer totalIterations = null; - - private Integer sampleInterval = null; - - private Double relativeCostScale = null; - - private Double relativeCostOffset = null; - - private Double spliceProbability = null; - - private Double proposalScaleFactor = null; - - // RUNTIME - - private Random rnd = null; - - private MHLinkAndPathCost linkAndPathCost = null; - - // private Network invertedNetwork = null; - private BasicNetwork network = null; - - private PathWriter pathWriter = null; - - // -------------------- CONSTRUCTION -------------------- - - public MHPathGenerator() { - // no-argument constructor for reflective instantiation - } - - // TODO NEW - MHLinkAndPathCost newConfiguredLinkAndPathCost(final Config config) { - // final MHLinkAndPathCost result = new MHLinkAndPathCost(); - final MHLinkAndPathCost result = this.newLinkAndPathCost(); - result.configure(config); - return result; - } - - protected MHLinkAndPathCost newLinkAndPathCost() { - return new MHLinkAndPathCost(); - } - - protected MHPath initialState(final BasicNode originNode, - final BasicNode destinationNode, final Router router) { - return null; - } - - - // -------------------- IMPLEMENTATION OF PathGenerator -------------------- - - @Override - public void configure(final Config config) { - - this.msgInterval = MathHelpers.parseInteger(config.get( - BiorouteRunner.PATHGENERATOR_ELEMENT, MSGINTERVAL_ELEMENT)); - if (this.msgInterval == null) { - this.msgInterval = DEFAULT_MSGINTERVAL; - } - - // TODO NEW - Long randomSeed = MathHelpers.parseLong(config.get( - BiorouteRunner.PATHGENERATOR_ELEMENT, RANDOMSEED_ELEMENT)); - if (randomSeed == null) { - randomSeed = (new Random()).nextLong(); - } - this.rnd = new Random(randomSeed); - System.out.println("random seed = " + randomSeed); - // if (this.randomSeed == null) { - // this.rnd = new Random(); - // } else { - // this.rnd = new Random(this.randomSeed); - // } - - this.totalIterations = MathHelpers.parseInteger(config.get( - BiorouteRunner.PATHGENERATOR_ELEMENT, TOTALITERATIONS_ELEMENT)); - if (this.totalIterations == null) { - throw new IllegalArgumentException( - "total iterations is not specified"); - } - - this.sampleInterval = MathHelpers.parseInteger(config.get( - BiorouteRunner.PATHGENERATOR_ELEMENT, SAMPLEINTERVAL_ELEMENT)); - if (this.sampleInterval == null) { - this.sampleInterval = DEFAULT_SAMPLEINTERVAL; - } - - // may be null: - this.relativeCostScale = MathHelpers.parseDouble(config - .get(BiorouteRunner.PATHGENERATOR_ELEMENT, - RELATIVECOSTSCALE_ELEMENT)); - - // may be null - this.relativeCostOffset = MathHelpers.parseDouble(config.get( - BiorouteRunner.PATHGENERATOR_ELEMENT, - RELATIVECOSTOFFSET_ELEMENT)); - - this.spliceProbability = MathHelpers.parseDouble(config - .get(BiorouteRunner.PATHGENERATOR_ELEMENT, - SPLICEPROBABILITY_ELEMENT)); - if (this.spliceProbability == null) { - this.spliceProbability = DEFAULT_SPLICEPROBABILITY; - } - - this.proposalScaleFactor = MathHelpers.parseDouble(config.get( - BiorouteRunner.PATHGENERATOR_ELEMENT, - PROPOSALSCALEFACTOR_ELEMENT)); - if (this.proposalScaleFactor == null) { - this.proposalScaleFactor = DEFAULT_PROPOSALSCALEFACTOR; - } - - // TODO NEW - this.linkAndPathCost = this.newConfiguredLinkAndPathCost(config); - } - - @Override - public void setNetwork(final BasicNetwork network) { - this.network = network; - // this.invertedNetwork = NetworkInverter.newInvertedNetwork(network); - } - - @Override - public void setPathWriter(final PathWriter pathWriter) { - this.pathWriter = pathWriter; - } - - @Override - public void run(final BasicNode originNode, final BasicNode destinationNode) { - - /* - * (1) switch to a fresh copy of the original network - * - * TODO CHANGED - */ - this.linkAndPathCost.setNetwork(this.network); - // final Network invertedNetwork = new Network(this.invertedNetwork); - // this.linkAndPathCost.setNetwork(invertedNetwork); - - /* - * (2) identify OD pair in inverted network - * - * TODO CHANGED - */ - // final BasicNode originNode = originLink.getToNode(); - // final BasicNode destinationNode = destinationLink.getFromNode(); - // final Node invertedOriginNode = invertedNetwork.getNode(originLink - // .getId()); - // final Node invertedDestinationNode = invertedNetwork - // .getNode(destinationLink.getId()); - - /* - * (3) compute shortest path link cost and new scale if it is defined in - * relative terms - * - * TODO CHANGED - */ - final Router router = new Router(this.network, this.linkAndPathCost); - if (this.relativeCostScale != null) { - final double linkCostSP = router.fwdCost(originNode, - destinationNode).get(destinationNode); - this.linkAndPathCost - .setLinkCostScale(Math.log(2.0) - / (linkCostSP + (this.relativeCostOffset != null ? this.relativeCostOffset - : 0.0)) / (this.relativeCostScale - 1)); - } - // final Router router = new Router(this.invertedNetwork, - // this.linkAndPathCost); - // if (this.relativeCostScale != null) { - // final double nodeLoopScale = this.linkAndPathCost - // .getNodeLoopScale(); - // this.linkAndPathCost.setNodeLoopScale(0.0); - // final double linkCostSP = router.fwdCost(invertedOriginNode, - // invertedDestinationNode).get(invertedDestinationNode); - // this.linkAndPathCost.setNodeLoopScale(nodeLoopScale); - // this.linkAndPathCost.setLinkCostScale(Math.log(2.0) / linkCostSP - // / (this.relativeCostScale - 1)); - // } - - /* - * (4) compute fixed SPLICE proposal probabilities - * - * TODO CHANGED - */ - final Map proposalProbabilities = new LinkedHashMap(); - final Map fwdCost = router.fwdCost(originNode); - final Map bwdCost = router.bwdCost(destinationNode); - double minCost = Double.POSITIVE_INFINITY; - for (BasicNode node : this.network.getNodes()) { - final double cost; - if ((fwdCost.get(node) != null) && (bwdCost.get(node) != null)) { - cost = fwdCost.get(node) + bwdCost.get(node); - } else { - cost = Double.POSITIVE_INFINITY; - } - minCost = Math.min(minCost, cost); - proposalProbabilities.put(node, cost); - } - double weightSum = 0; - for (BasicNode node : this.network.getNodes()) { - final double cost = proposalProbabilities.get(node); - final double weight; - if (Double.isInfinite(cost)) { - weight = 0; - } else { - weight = Math.exp(this.linkAndPathCost.getLinkCostScale() - * this.proposalScaleFactor * (-cost + minCost)); - weightSum += weight; - } - proposalProbabilities.put(node, weight); - } - for (BasicNode node : this.network.getNodes()) { - final double weight = proposalProbabilities.get(node); - proposalProbabilities.put(node, weight / weightSum); - } - // final Map proposalProbabilities = new - // LinkedHashMap(); - // final Map fwdCost = router.fwdCost(invertedOriginNode); - // final Map bwdCost = router - // .bwdCost(invertedDestinationNode); - // double minCost = Double.POSITIVE_INFINITY; - // for (Node node : this.invertedNetwork.getNodes()) { - // final double cost = fwdCost.get(node) + bwdCost.get(node); - // minCost = Math.min(minCost, cost); - // proposalProbabilities.put(node, cost); - // } - // double weightSum = 0; - // for (Node node : this.invertedNetwork.getNodes()) { - // final double cost = proposalProbabilities.get(node); - // final double weight = Math.exp(this.linkAndPathCost - // .getLinkCostScale() - // * this.proposalScaleFactor - // * (-cost + minCost)); - // weightSum += weight; - // proposalProbabilities.put(node, weight); - // } - // for (Node node : this.invertedNetwork.getNodes()) { - // final double weight = proposalProbabilities.get(node); - // proposalProbabilities.put(node, weight / weightSum); - // // System.out.println("weight(" + node.getId() + ") = " - // // + proposalProbabilities.get(node)); - // } - - /* - * (5) run the algorithm - * - * TODO CHANGED - */ - final MHPathProposal_NEW proposal = new MHPathProposal_NEW(originNode, - destinationNode, router, this.spliceProbability, - proposalProbabilities, this.rnd); - final MHAlgorithm algo = new MHAlgorithm(proposal, - this.linkAndPathCost, this.rnd); - algo.setMsgInterval(this.msgInterval); - algo.addStateProcessor(new MHPathWriterWrapper(this.pathWriter, - this.sampleInterval, this.linkAndPathCost)); - - algo.setInitialState(this.initialState(originNode, destinationNode, router)); - - algo.run(this.totalIterations); - System.out.println("total MH runtime = " + algo.getLastCompTime_ms()); - // final MHPathProposal proposal = new - // MHPathProposal(invertedOriginNode, - // invertedDestinationNode, router, this.spliceProbability, - // proposalProbabilities, this.rnd); - // final MHAlgorithm algo = new MHAlgorithm(proposal, - // this.linkAndPathCost, this.rnd); - // algo.setMsgInterval(this.msgInterval); - // algo.addStateProcessor(new MHPathWriterWrapper(this.pathWriter, - // this.sampleInterval, this.linkAndPathCost)); - // algo.run(this.totalIterations); - // System.out.println("total MH runtime = " + - // algo.getLastCompTime_ms()); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPath.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPath.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPath.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPath.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,340 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import floetteroed.utilities.Triple; -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNode; -import floetteroed.utilities.networks.shortestpaths.Router; - - -/** - * Path representation for the Metropolis-Hastings PathGenerator. - * - * @author Gunnar Flötteröd - * - */ -public class MHPath { - - // TODO >>>>>>>>>>>>>>>>>>>> NEW STUFF >>>>>>>>>>>>>>>>>>>> - // - // private final Router router1; - // - // private final Router router2; - // - // private BasicNode lastInsertNode = null; - // - // private List lastSegmentAB = null; - // - // private List lastSegmentBC = null; - // - // private static long calls = 0; - // - // private static long recalcs = 0; - // - // private Tuple, List> getSegmentsABC( - // final BasicNode insertNode) { - // calls++; - // // if (!insertNode.equals(this.lastInsertNode)) { - // recalcs++; - // final RouterThread threadAB = new RouterThread(this.router1, this, - // insertNode, RouterThread.MODE.AB); - // threadAB.start(); - // final RouterThread threadBC = new RouterThread(this.router2, this, - // insertNode, RouterThread.MODE.BC); - // threadBC.start(); - // // this.lastInsertNode = insertNode; - // try { - // threadAB.join(); - // this.lastSegmentAB = threadAB.getResult(); - // threadBC.join(); - // this.lastSegmentBC = threadBC.getResult(); - // } catch (InterruptedException e) { - // throw new RuntimeException(e); - // } - // // } - // if (calls % 100000 == 0) { - // System.out.println(calls + "\tcalls"); - // System.out.println(recalcs + "\trecalculations"); - // System.out.println(Thread.activeCount() + "\trunning threads"); - // } - // - // return new Tuple, List>(this.lastSegmentAB, - // this.lastSegmentBC); - // } - // - // boolean isSpliceable() { - // if (this.spliceable == null) { - // final Tuple, List> pathsABC = this - // .getSegmentsABC(this.getNodeB()); - // final List pathAB = pathsABC.getA(); - // final List pathBC = pathsABC.getB(); - // // final List pathAB = - // // this.newSpliceSegmentAB(this.getNodeB()); - // if (!Router.equals(this.nodes, this.points.getA(), - // this.points.getB(), pathAB, 0, pathAB.size() - 1)) { - // this.spliceable = false; - // } else { - // // final List pathBC = this.newSpliceSegmentBC(this - // // .getNodeB()); - // this.spliceable = (Router.equals(this.nodes, - // this.points.getB(), this.points.getC(), pathBC, 0, - // pathBC.size() - 1)); - // } - // } - // return this.spliceable; - // } - - // TODO <<<<<<<<<<<<<<<<<<<< NEW STUFF <<<<<<<<<<<<<<<<<<<< - - // -------------------- CONSTANTS -------------------- - - private final Router router; - - // -------------------- MEMBERS -------------------- - - private final LinkedList nodes; - - private Triple points; - - // --------------- CACHED MEMBERS & ACCESS FUNCTIONS --------------- - - private List links = null; - - private Double cost = null; - - private Boolean spliceable = null; - - public List getLinks() { - if (this.links == null) { - this.links = Router.toLinkRoute(this.nodes); - } - return this.links; - } - - double getCost() { - if (this.cost == null) { - this.cost = this.router.cost(this.getLinks()); - } - return this.cost; - } - - // TODO WORKING ORIGINAL - boolean isSpliceable() { - if (this.spliceable == null) { - final List pathAB = this.newSpliceSegmentAB(this - .getNodeB()); - if (!Router.equals(this.nodes, this.points.getA(), - this.points.getB(), pathAB, 0, pathAB.size() - 1)) { - this.spliceable = false; - } else { - final List pathBC = this.newSpliceSegmentBC(this - .getNodeB()); - this.spliceable = (Router.equals(this.nodes, - this.points.getB(), this.points.getC(), pathBC, 0, - pathBC.size() - 1)); - } - } - return this.spliceable; - } - - // -------------------- CONSTRUCTION -------------------- - - MHPath(final LinkedList nodes, - final Triple points, final Router router) { - this.nodes = new LinkedList(nodes); - this.points = points; - this.router = router; - // this.router1 = router1; - // this.router2 = router2; - this.links = null; - this.cost = null; - this.spliceable = null; - } - - MHPath(final MHPath parent) { - // this(parent.nodes, parent.points, parent.router1, parent.router2); - this(parent.nodes, parent.points, parent.router); - this.links = (parent.links == null ? null : new LinkedList( - parent.links)); - this.cost = parent.cost; - this.spliceable = parent.spliceable; - } - - // -------------------- GETTERS -------------------- - - // TODO WORKING ORIGINAL - private LinkedList newSpliceSegmentAB(final BasicNode insertNode) { - final Set excludedNodes = new HashSet( - this.nodes.subList(0, this.getPoints().getA())); - excludedNodes.addAll(this.nodes.subList(this.getPoints().getC(), - this.size())); - final Map modifiedFwdCost = this.router - .fwdCostWithoutExcludedNodes(this.getNodeA(), insertNode, - this.router.getNetwork().getNodes(), excludedNodes, - null); - return this.router.bestRouteFwd(this.getNodeA(), insertNode, - modifiedFwdCost); - } - - // TODO WORKING ORIGINAL - private LinkedList newSpliceSegmentBC(final BasicNode insertNode) { - final Set excludedNodes = new HashSet( - this.nodes.subList(0, this.getPoints().getA() + 1)); - excludedNodes.addAll(this.nodes.subList(this.getPoints().getC() + 1, - this.size())); - final Map modifiedBwdCost = this.router - .bwdCostWithoutExcludedNodes(this.getNodeC(), insertNode, - this.router.getNetwork().getNodes(), excludedNodes, - null); - return this.router.bestRouteBwd(insertNode, this.getNodeC(), - modifiedBwdCost); - } - - int size() { - return this.nodes.size(); - } - - long pointCombinationSize() { - return 1l * this.size() * (this.size() - 1) * (this.size() - 2) / 6; - } - - public List getNodes() { - return this.nodes; - } - - BasicNode getNode(final int index) { - return this.nodes.get(index); - } - - BasicNode getNodeA() { - return this.getNode(this.getPoints().getA()); - } - - BasicNode getNodeB() { - return this.getNode(this.getPoints().getB()); - } - - BasicNode getNodeC() { - return this.getNode(this.getPoints().getC()); - } - - Triple getPoints() { - return this.points; - } - - boolean hasCycle() { - return ((new HashSet(this.nodes)).size() < this.nodes.size()); - } - - // -------------------- SETTERS -------------------- - - void setPoints(final Triple points) { - if (!this.points.equals(points)) { - this.points = points; - this.spliceable = null; - } - } - - // -------------------- PATH MANIPULATIONS -------------------- - - boolean insertDetour(final BasicNode nodeB) { - - /* - * (1) compute new path segments - */ - // >>>>> TODO WORKING ORIGINAL >>>>> - final List pathAB = this.newSpliceSegmentAB(nodeB); - if (pathAB == null) { - return false; - } - final List pathBC = this.newSpliceSegmentBC(nodeB); - if (pathBC == null) { - return false; - } - // >>>>> TODO PARALLEL VERSION >>>>> - // final Tuple, List> pathsABC = this - // .getSegmentsABC(this.getNodeB()); - // final List pathAB = pathsABC.getA(); - // if (pathAB == null) { - // return false; - // } - // final List pathBC = pathsABC.getB(); - // if (pathBC == null) { - // return false; - // } - // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - /* - * (2) build new path - */ - final LinkedList newNodes = new LinkedList(); - newNodes.addAll(this.nodes.subList(0, this.points.getA())); - newNodes.addAll(pathAB); - newNodes.addAll(pathBC.subList(1, pathBC.size() - 1)); - newNodes.addAll(this.nodes.subList(this.points.getC(), - this.nodes.size())); - /* - * (3) update indices - */ - int newB = this.points.getA() + (pathAB.size() - 1); - int newC = newB + (pathBC.size() - 1); - final Triple newPoints = new Triple( - this.points.getA(), newB, newC); - /* - * (4) clear/update internal cache - */ - this.links = null; - this.cost = null; - this.spliceable = true; // because this was created by a splice - /* - * (5) update further data structures - */ - this.nodes.clear(); - this.nodes.addAll(newNodes); - this.points = newPoints; - - return true; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - for (int i = 0; i < this.nodes.size() - 1; i++) { - result.append(this.nodes.get(i).getId()); - result.append(" "); - } - result.append(this.nodes.getLast().getId()); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,285 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import static java.lang.Math.log; - -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.Map; -import java.util.Random; - -import floetteroed.utilities.Triple; -import floetteroed.utilities.math.metropolishastings.MHProposal; -import floetteroed.utilities.math.metropolishastings.MHTransition; -import floetteroed.utilities.networks.basic.BasicNode; -import floetteroed.utilities.networks.shortestpaths.Router; - - -/** - * Proposal distribution for the Metropolis-Hastings PathGenerator. - * - * @author Gunnar Flötteröd - * - */ -class MHPathProposal implements MHProposal { - - // -------------------- MEMBERS -------------------- - - private final BasicNode origin; - - private final BasicNode destination; - - private final Router router; - - // private final Router router2; - - private final Random rnd; - - // TODO NEW - final double spliceProbability; - - // TODO NEW - final Map proposalProbabilities; - - // -------------------- CONSTRUCTION -------------------- - - MHPathProposal(final BasicNode origin, final BasicNode destination, - final Router router, final double spliceProbability, - final Map proposalProbabilities, final Random rnd) { - if (origin == null) { - throw new IllegalArgumentException("origin is null"); - } - if (destination == null) { - throw new IllegalArgumentException("destination is null"); - } - if (router == null) { - throw new IllegalArgumentException("router is null"); - } - // if (router1 == null || router2 == null) { - // throw new IllegalArgumentException("router is null"); - // } - if (rnd == null) { - throw new IllegalArgumentException("rnd is null"); - } - this.origin = origin; - this.destination = destination; - this.router = router; - this.spliceProbability = spliceProbability; - this.proposalProbabilities = new LinkedHashMap( - proposalProbabilities); - this.rnd = rnd; - } - - // -------------------- INTERNALS -------------------- - - static Triple drawPoints(final int n, - final Random rnd) { - /* - * (1) check - */ - if (n < 3) { - throw new RuntimeException("less than three alternatives!"); - } - /* - * (2) draw three disjoint numbers - */ - int u1 = rnd.nextInt(n); - int u2 = rnd.nextInt(n - 1); - if (u2 >= u1) { - u2++; - } - int u3 = rnd.nextInt(n - 2); - if (u3 >= Math.min(u1, u2)) { - u3++; - } - if (u3 >= Math.max(u1, u2)) { - u3++; - } - /* - * (3) return sorted numbers - */ - if (u1 < u2 && u1 < u3) { - if (u2 < u3) { - return new Triple(u1, u2, u3); - } else { - return new Triple(u1, u3, u2); - } - } else if (u2 < u1 && u2 < u3) { - if (u1 < u3) { - return new Triple(u2, u1, u3); - } else { - return new Triple(u2, u3, u1); - } - } else { - if (u1 < u2) { - return new Triple(u3, u1, u2); - } else { - return new Triple(u3, u2, u1); - } - } - } - - private double transitionLogProb(final MHPath fromRoute, - final MHPath toRoute) { - - if (!fromRoute.getNodes().equals(toRoute.getNodes())) { - /* - * different routes -- a feasible SPLICE has occurred - */ - return log(this.spliceProbability) - + log(this.proposalProbabilities.get(toRoute.getNodeB())); - } else { - /* - * identical routes (this means that indices and nodes are equiv.) - */ - if (fromRoute.getPoints().getA().equals(toRoute.getPoints().getA()) - && fromRoute.getPoints().getC() - .equals(toRoute.getPoints().getC())) { - /* - * identical routes, identical points a and c - */ - if (fromRoute.getPoints().getB() - .equals(toRoute.getPoints().getB())) { - /* - * identical routes, identical points a, b, and c - */ - return 0.0; - } else { - /* - * identical routes, identical points a and c, different - * point b -- a feasible SPLICE must have occurred because - * shuffle-b-only is not allowed - */ - return log(this.spliceProbability) - + log(this.proposalProbabilities.get(toRoute - .getNodeB())); - } - } else { - /* - * identical routes, different points a or c -- a SHUFFLE must - * have occurred - */ - final long forbiddenSize = fromRoute.getPoints().getC() - - fromRoute.getPoints().getA() - 2; - if (fromRoute.isSpliceable()) { - return log(1.0 - this.spliceProbability) - - log(fromRoute.pointCombinationSize() - - forbiddenSize); - } else { - return -log(fromRoute.pointCombinationSize() - - forbiddenSize); - } - } - } - } - - // -------------------- IMPLEMENTATION OF MHProposal -------------------- - - @Override - public MHPath newInitialState() { - final LinkedList nodes = this.router.bestRoute(this.origin, - this.destination); - final Triple points = drawPoints( - nodes.size(), this.rnd); - return new MHPath(nodes, points, this.router); - } - - // TODO NEW - private BasicNode drawInsertNode() { - final double u = this.rnd.nextDouble(); - double probabilitySum = 0; - for (Map.Entry entry : this.proposalProbabilities - .entrySet()) { - probabilitySum += entry.getValue(); - if (probabilitySum >= u) { - return entry.getKey(); - } - } - return null; - } - - @Override - public MHTransition newTransition(final MHPath fromRoute) { - final MHPath toRoute; - if (this.rnd.nextDouble() < this.spliceProbability - && fromRoute.isSpliceable()) { - /* - * SPLICE - */ - final BasicNode insertNode = this.drawInsertNode(); - if ((insertNode == null) - || fromRoute.getNodes() - .subList(0, fromRoute.getPoints().getA() + 1) - .contains(insertNode) - || fromRoute - .getNodes() - .subList(fromRoute.getPoints().getC(), - fromRoute.getNodes().size()) - .contains(insertNode)) { - toRoute = new MHPath(fromRoute); - } else { - final MHPath proposalRoute = new MHPath(fromRoute); - if (proposalRoute.insertDetour(insertNode)) { - if (proposalRoute.hasCycle()) { - toRoute = new MHPath(fromRoute); - } else { - toRoute = proposalRoute; - - // System.out.println("SPLICE with proposal node " - // + insertNode.getId() - // + " and new proposal route " + toRoute); - - } - } else { - toRoute = new MHPath(fromRoute); - } - } - } else { - /* - * SHUFFLE - * - * It is not allowed to only shuffle B. The loop below will - * eventually terminate because there is always the chance to - * shuffle such that A, B, and C are the same as before. - */ - toRoute = new MHPath(fromRoute); - Triple newPoints; - do { - newPoints = drawPoints(toRoute.size(), this.rnd); - } while (fromRoute.getPoints().getA().equals(newPoints.getA()) - && fromRoute.getPoints().getC().equals(newPoints.getC()) - && !fromRoute.getPoints().getB().equals(newPoints.getB())); - toRoute.setPoints(newPoints); - - // System.out.println("SHUFFLE with new points " + newPoints); - - } - final double fwdLogProb = this.transitionLogProb(fromRoute, toRoute); - final double bwdLogProb = this.transitionLogProb(toRoute, fromRoute); - return new MHTransition(fromRoute, toRoute, fwdLogProb, - bwdLogProb); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal_NEW.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal_NEW.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal_NEW.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathProposal_NEW.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,308 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import static java.lang.Math.log; - -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.Map; -import java.util.Random; - -import floetteroed.utilities.Triple; -import floetteroed.utilities.math.metropolishastings.MHProposal; -import floetteroed.utilities.math.metropolishastings.MHTransition; -import floetteroed.utilities.networks.basic.BasicNode; -import floetteroed.utilities.networks.shortestpaths.Router; - - -/** - * Proposal distribution for the Metropolis-Hastings PathGenerator. - * - * @author Gunnar Flötteröd - * - */ -class MHPathProposal_NEW implements MHProposal { - - // -------------------- MEMBERS -------------------- - - private final BasicNode origin; - - private final BasicNode destination; - - private final Router router; - - private final Random rnd; - - // TODO NEW - private final double spliceProbability; - - // TODO NEW - private final Map proposalProbabilities; - - // -------------------- CONSTRUCTION -------------------- - - MHPathProposal_NEW(final BasicNode origin, final BasicNode destination, - final Router router, final double spliceProbability, - final Map proposalProbabilities, final Random rnd) { - if (origin == null) { - throw new IllegalArgumentException("origin is null"); - } - if (destination == null) { - throw new IllegalArgumentException("destination is null"); - } - if (router == null) { - throw new IllegalArgumentException("router is null"); - } - if (rnd == null) { - throw new IllegalArgumentException("rnd is null"); - } - this.origin = origin; - this.destination = destination; - this.router = router; - this.spliceProbability = spliceProbability; - this.proposalProbabilities = new LinkedHashMap( - proposalProbabilities); - this.rnd = rnd; - } - - // -------------------- INTERNALS -------------------- - - static Triple drawPoints(final int n, - final Random rnd) { - /* - * (1) check - */ - if (n < 3) { - throw new RuntimeException("less than three alternatives!"); - } - /* - * (2) draw three disjoint numbers - */ - int u1 = rnd.nextInt(n); - int u2 = rnd.nextInt(n - 1); - if (u2 >= u1) { - u2++; - } - int u3 = rnd.nextInt(n - 2); - if (u3 >= Math.min(u1, u2)) { - u3++; - } - if (u3 >= Math.max(u1, u2)) { - u3++; - } - /* - * (3) return sorted numbers - */ - if (u1 < u2 && u1 < u3) { - if (u2 < u3) { - return new Triple(u1, u2, u3); - } else { - return new Triple(u1, u3, u2); - } - } else if (u2 < u1 && u2 < u3) { - if (u1 < u3) { - return new Triple(u2, u1, u3); - } else { - return new Triple(u2, u3, u1); - } - } else { - if (u1 < u2) { - return new Triple(u3, u1, u2); - } else { - return new Triple(u3, u2, u1); - } - } - } - - private double transitionLogProb(final MHPath fromRoute, - final MHPath toRoute) { - - if (!fromRoute.getNodes().equals(toRoute.getNodes())) { - /* - * different nodes -- a SPLICE has occurred - */ - return log(this.spliceProbability) - + log(this.proposalProbabilities.get(toRoute.getNodeB())); - } else if (!fromRoute.getPoints().getA() - .equals(toRoute.getPoints().getA()) - || !fromRoute.getPoints().getC() - .equals(toRoute.getPoints().getC())) { - /* - * same nodes but different a or c -- a SHUFFLE has occurred - */ - if (fromRoute.isSpliceable()) { - return log(1.0 - this.spliceProbability) - - log(fromRoute.pointCombinationSize()); - } else { - return -log(fromRoute.pointCombinationSize()); - } - } else if (!fromRoute.getPoints().getB() - .equals(toRoute.getPoints().getB())) { - /* - * same nodes,a,c but different b -- not yet clear what happened - */ - if (fromRoute.isSpliceable()) { - return log(this.spliceProbability - * this.proposalProbabilities.get(toRoute.getNodeB()) - + (1.0 - this.spliceProbability) - / fromRoute.pointCombinationSize()); - } else { - return -log(fromRoute.pointCombinationSize()); - } - } else { - /* - * self-loop: nothing has changed - */ - return 0.0; - } - - // if (!fromRoute.getNodes().equals(toRoute.getNodes())) { - // /* - // * different routes -- a feasible SPLICE has occurred - // */ - // return log(this.spliceProbability) - // + log(this.proposalProbabilities.get(toRoute.getNodeB())); - // } else { - // /* - // * identical routes (this means that indices and nodes are equiv.) - // */ - // if (fromRoute.getPoints().getA().equals(toRoute.getPoints().getA()) - // && fromRoute.getPoints().getC() - // .equals(toRoute.getPoints().getC())) { - // /* - // * identical routes, identical points a and c - // */ - // if (fromRoute.getPoints().getB() - // .equals(toRoute.getPoints().getB())) { - // /* - // * identical routes, identical points a, b, and c - // */ - // return 0.0; - // } else { - // /* - // * identical routes, identical points a and c, different - // * point b -- a feasible SPLICE must have occurred because - // * shuffle-b-only is not allowed - // */ - // return log(this.spliceProbability) - // + log(this.proposalProbabilities.get(toRoute - // .getNodeB())); - // } - // } else { - // /* - // * identical routes, different points a or c -- a SHUFFLE must - // * have occurred - // */ - // final long forbiddenSize = fromRoute.getPoints().getC() - // - fromRoute.getPoints().getA() - 2; - // if (fromRoute.isSpliceable()) { - // return log(1.0 - this.spliceProbability) - // - log(fromRoute.pointCombinationSize() - // - forbiddenSize); - // } else { - // return -log(fromRoute.pointCombinationSize() - // - forbiddenSize); - // } - // } - // } - } - - // -------------------- IMPLEMENTATION OF MHProposal -------------------- - - @Override - public MHPath newInitialState() { - final LinkedList nodes = this.router.bestRoute(this.origin, - this.destination); - final Triple points = drawPoints( - nodes.size(), this.rnd); - return new MHPath(nodes, points, this.router); - } - - // TODO NEW - // TODO could replace this drawElement(..) from simulation package - private BasicNode drawInsertNode() { - final double u = this.rnd.nextDouble(); - double probabilitySum = 0; - for (Map.Entry entry : this.proposalProbabilities - .entrySet()) { - probabilitySum += entry.getValue(); - if (probabilitySum >= u) { - return entry.getKey(); - } - } - return null; - } - - @Override - public MHTransition newTransition(final MHPath fromRoute) { - final MHPath toRoute; - if (this.rnd.nextDouble() < this.spliceProbability - && fromRoute.isSpliceable()) { - /* - * SPLICE - */ - final BasicNode insertNode = this.drawInsertNode(); - if ((insertNode == null) - || fromRoute.getNodes() - .subList(0, fromRoute.getPoints().getA() + 1) - .contains(insertNode) - || fromRoute - .getNodes() - .subList(fromRoute.getPoints().getC(), - fromRoute.getNodes().size()) - .contains(insertNode)) { - toRoute = new MHPath(fromRoute); - } else { - final MHPath proposalRoute = new MHPath(fromRoute); - if (proposalRoute.insertDetour(insertNode)) { - if (proposalRoute.hasCycle()) { - toRoute = new MHPath(fromRoute); - } else { - toRoute = proposalRoute; - } - } else { - toRoute = new MHPath(fromRoute); - } - } - } else { - /* - * SHUFFLE - */ - toRoute = new MHPath(fromRoute); - Triple newPoints; - // do { - newPoints = drawPoints(toRoute.size(), this.rnd); - // } while (fromRoute.getPoints().getA().equals(newPoints.getA()) - // && fromRoute.getPoints().getC().equals(newPoints.getC()) - // && !fromRoute.getPoints().getB().equals(newPoints.getB())); - toRoute.setPoints(newPoints); - } - final double fwdLogProb = this.transitionLogProb(fromRoute, toRoute); - final double bwdLogProb = this.transitionLogProb(toRoute, fromRoute); - return new MHTransition(fromRoute, toRoute, fwdLogProb, - bwdLogProb); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathWriterWrapper.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathWriterWrapper.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathWriterWrapper.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/MHPathWriterWrapper.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import java.util.HashMap; -import java.util.Map; - -import floetteroed.bioroute.PathWriter; -import floetteroed.utilities.math.metropolishastings.MHStateProcessor; - -/** - * Wraps a PathWriter into a MHStateProcessor. - * - * @author Gunnar Flötteröd - * - */ -public class MHPathWriterWrapper implements MHStateProcessor { - - // -------------------- CONSTANTS -------------------- - - public static final String LOGWEIGHT_ATTRIBUTE = "logweight"; - - // -------------------- MEMBERS -------------------- - - // CONFIGURATION - - private final PathWriter pathWriter; - - private final int sampleInterval; - - private final MHLinkAndPathCost pathCost; - - // RUNTIME - - private int pathCnt; - - // -------------------- CONSTRUCTION -------------------- - - MHPathWriterWrapper(final PathWriter pathWriter, final int sampleInterval, - final MHLinkAndPathCost pathCost) { - if (pathWriter == null) { - throw new IllegalArgumentException("path writer is null"); - } - if (sampleInterval <= 0) { - throw new IllegalArgumentException( - "sample interval is not strictly positive"); - } - if (pathCost == null) { - throw new IllegalArgumentException("path cost is null"); - } - this.pathWriter = pathWriter; - this.sampleInterval = sampleInterval; - this.pathCost = pathCost; - } - - // --------------- IMPLEMENTATION OF MHStateProcessor --------------- - - @Override - public void start() { - this.pathCnt = 0; - } - - @Override - public void processState(final MHPath path) { - /* - * (1) check if this path should be written - */ - this.pathCnt++; - if (this.pathCnt % this.sampleInterval != 0) { - return; - } - /* - * (2) write out the link IDs that correspond to the inverted nodes - */ - // final List invertedNodes = path.getNodes(); - // final List ids = new ArrayList(invertedNodes.size()); - // for (BasicNode invertedNode : invertedNodes) { - // ids.add(invertedNode.getId()); - // } - final Map attrs = new HashMap(); - attrs.put(LOGWEIGHT_ATTRIBUTE, - Double.toString(this.pathCost.logWeightWithoutCorrection(path))); - // TODO NEW - // this.pathWriter.writePath(ids, attrs); - this.pathWriter.writePath(path.getLinks(), attrs); - } - - @Override - public void end() { - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/RouterThread.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/RouterThread.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/RouterThread.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathgenerator/metropolishastings/RouterThread.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathgenerator.metropolishastings; - -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import floetteroed.utilities.networks.basic.BasicNode; -import floetteroed.utilities.networks.shortestpaths.Router; - - -/** - * - * @author Gunnar Flötteröd - * - */ -class RouterThread extends Thread { - - enum MODE { - AB, BC - }; - - private final Router router; - - private final MHPath path; - - private final BasicNode insertNode; - - private final MODE mode; - - private List result = null; - - RouterThread(final Router router, final MHPath path, final BasicNode nodeB, - final MODE mode) { - if (router == null || path == null || nodeB == null || mode == null) { - throw new IllegalArgumentException(); - } - this.router = router; - this.path = path; - this.insertNode = nodeB; - this.mode = mode; - } - - @Override - public void run() { - if (MODE.AB.equals(this.mode)) { - final Set excludedNodes = new HashSet(this.path - .getNodes().subList(0, this.path.getPoints().getA())); - excludedNodes.addAll(this.path.getNodes().subList( - this.path.getPoints().getC(), this.path.size())); - final Map modifiedFwdCost = this.router - .fwdCostWithoutExcludedNodes(this.path.getNodeA(), - this.insertNode, this.router.getNetwork() - .getNodes(), excludedNodes, null); - this.result = this.router.bestRouteFwd(this.path.getNodeA(), - this.insertNode, modifiedFwdCost); - } else { - final Set excludedNodes = new HashSet(this.path - .getNodes().subList(0, this.path.getPoints().getA() + 1)); - excludedNodes.addAll(this.path.getNodes().subList( - this.path.getPoints().getC() + 1, this.path.size())); - final Map modifiedBwdCost = this.router - .bwdCostWithoutExcludedNodes(this.path.getNodeC(), - this.insertNode, this.router.getNetwork() - .getNodes(), excludedNodes, null); - this.result = this.router.bestRouteBwd(this.insertNode, - this.path.getNodeC(), modifiedBwdCost); - } - } - - List getResult() { - return this.result; - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathGenerator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathGenerator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathGenerator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathGenerator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute; - -import floetteroed.utilities.config.Configurable; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; - -/** - * BIOROUTE interface. Defines the path generation algorithm. - * - * @author Gunnar Flötteröd - * - */ -public interface PathGenerator extends Configurable { - - /** - * Sets the network. It is called after configure (inherited - * from Configurable) and before setPathWriter. - * - * @param network - * the network - */ - public void setNetwork(final BasicNetwork network); - - /** - * Sets the path writer. It is called after setNetwork and - * (once) before all calls to run. - *

- * The implementing class is expected to call - * {@link floetteroed.bioroute.PathWriter#writePath(java.util.List, java.util.Map)} once - * for every generated path. All other functions of PathWriter - * are called by BiorouteRunner. - * - * @param writer - * the path writer - */ - public void setPathWriter(final PathWriter writer); - - /** - * TODO changed this back to node-based representation - * - * Generates paths for the indicated OD pair. Is called once for every - * origin/destination pair in the XML configuration file. - * - * @param origin - * the origin - * @param destination - * the destination - */ - public void run(final BasicNode origin, final BasicNode destination); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathwriter/PathXMLWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathwriter/PathXMLWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathwriter/PathXMLWriter.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/pathwriter/PathXMLWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,216 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.pathwriter; - -import static floetteroed.bioroute.BiorouteRunner.PATHWRITER_CONFIG_ELEMENT; - -import java.io.FileNotFoundException; -import java.io.PrintWriter; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import floetteroed.bioroute.PathWriter; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.networks.basic.BasicLink; - -/** - * Writes paths in an XML file. - * - * @author Gunnar Flötteröd - * - */ -public class PathXMLWriter implements PathWriter { - - // -------------------- CONSTANTS -------------------- - - // DEFAULT VALUES - - public static final Boolean DEFAULT_SKIPDUPLICATES = false; - - // CONFIGURATION XML SPECIFICATION - - public static final String FILENAME_ELEMENT = "filename"; - - public static final String SKIPDUPLICATES_ELEMENT = "skipduplicates"; - - // PATH FILE XML SPECIFICATION - - public static final String PATHS_ELEMENT = "paths"; - - public static final String ODPAIR_ELEMENT = "odpair"; - - public static final String FROM_ATTRIBUTE = "from"; - - public static final String TO_ATTRIBUTE = "to"; - - public static final String PATH_ELEMENT = "path"; - - public static final String NODES_ATTRIBUTE = "nodes"; - - public static final String LINKS_ATTRIBUTE = "links"; - - // -------------------- MEMBERS -------------------- - - // CONFIGURATION - - private String fileName = null; - - private Boolean skipDuplicates = null; - - // RUNTIME - - private PrintWriter writer = null; - - private final Set> pathsSoFar = new HashSet>(); - - // -------------------- CONSTUCTION -------------------- - - public PathXMLWriter() { - // no-argument constructor for reflective instantiation - } - - // -------------------- IMPLEMENTATION OF PathWriter -------------------- - - @Override - public void configure(final Config config) { - - this.fileName = config.get(PATHWRITER_CONFIG_ELEMENT, FILENAME_ELEMENT); - if (fileName == null) { - throw new IllegalArgumentException(FILENAME_ELEMENT - + " is not specified"); - } - this.fileName = config.absolutePath(this.fileName); - - this.skipDuplicates = MathHelpers.parseBoolean(config.get( - PATHWRITER_CONFIG_ELEMENT, SKIPDUPLICATES_ELEMENT)); - if (this.skipDuplicates == null) { - this.skipDuplicates = DEFAULT_SKIPDUPLICATES; - } - } - - @Override - public void open() { - try { - this.writer = new PrintWriter(this.fileName); - } catch (FileNotFoundException e) { - throw new RuntimeException(e); - } - this.writer.println("<" + PATHS_ELEMENT + ">"); - } - - @Override - public void startOdPair(final String from, final String to) { - this.pathsSoFar.clear(); - this.writer.println(" <" + ODPAIR_ELEMENT + " " + FROM_ATTRIBUTE - + "=\"" + from + "\" " + TO_ATTRIBUTE + "=\"" + to + "\">"); - } - - // private String nodesAndLinksToString(final List path) { - // final StringBuffer nodes = new StringBuffer(NODES_ATTRIBUTE + "=\""); - // final StringBuffer links = new StringBuffer(LINKS_ATTRIBUTE + "=\""); - // for (BasicLink link : path) { - // nodes.append(link.getFromNode().getId()); - // nodes.append(" "); - // links.append(link.getId()); - // links.append(" "); - // } - // nodes.append(path.get(path.size() - 1).getToNode().getId()); - // nodes.append(" "); - // return nodes.toString() + " " + links.toString(); - // } - - // private List pathNodeIDs(final List path) { - // final List result = new ArrayList(path.size() + 1); - // result.add(path.get(0).getFromNode().getId()); - // for (BasicLink link : path) { - // result.add(link.getToNode().getId()); - // } - // return result; - // } - - @Override - public void writePath(final List linkPath, - final Map attrs) { - - // TODO NEW - // final List path = this.pathNodeIDs(linkPath); - - if (this.skipDuplicates && this.pathsSoFar.contains(linkPath)) { - return; - } - this.pathsSoFar.add(linkPath); - - this.writer.print(" <" + PATH_ELEMENT + " "); - - final StringBuffer nodes = new StringBuffer(NODES_ATTRIBUTE + "=\""); - final StringBuffer links = new StringBuffer(LINKS_ATTRIBUTE + "=\""); - for (int i = 0; i < linkPath.size() - 1; i++) { - final BasicLink link = linkPath.get(i); - nodes.append(link.getFromNode().getId()); - nodes.append(" "); - links.append(link.getId()); - links.append(" "); - } - final BasicLink link = linkPath.get(linkPath.size() - 1); - nodes.append(link.getFromNode().getId()); - nodes.append(" "); - nodes.append(link.getToNode().getId()); - nodes.append("\" "); - links.append(link.getId()); - links.append("\" "); - this.writer.print(nodes); - this.writer.print(links); - - // this.writer.print(LINKS_ATTRIBUTE + "=\""); - // for (int i = 0; i < path.size() - 1; i++) { - // this.writer.print(path.get(i) + " "); - // } - // this.writer.print(path.get(path.size() - 1) + "\""); - - if (attrs != null) { - for (Map.Entry entry : attrs.entrySet()) { - this.writer.print(entry.getKey() + "=\"" + entry.getValue() - + "\""); - } - } - this.writer.println("/>"); - } - - @Override - public void endOdPair() { - this.writer.println(" "); - this.writer.flush(); // so one can follow the progress in the file - } - - @Override - public void close() { - this.writer.println(""); - this.writer.flush(); - this.writer.close(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathWriter.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/PathWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute; - -import java.util.List; -import java.util.Map; - -import floetteroed.utilities.config.Configurable; -import floetteroed.utilities.networks.basic.BasicLink; - - -/** - * BIOROUTE interface. Defines the path writer. - * - * @author Gunnar Flötteröd - * - */ -public interface PathWriter extends Configurable { - - /** - * Opens the path writer. Called once before the writing is started. - */ - public void open(); - - /** - * TODO origin in the form of nodes or links or ??? - * - * Indicates that the following paths apply to the OD pair - * from/to. Called once per OD pair, before all respective - * calls to writePath. - * - * @param from - * the origin link - * @param to - * the destination link - * - */ - public void startOdPair(final String from, final String to); - - /** - * Writes path to file. - * - * @param path - * the path, represented by a list of link IDs - * @param attrs - * additional attribute/value pairs that are to be written - * together with this path - */ - public void writePath(final List path, - final Map attrs); - - /** - * Indicates that all paths for the current OD pair have been written. - * Called once pair OD pair, after all calls to writePath. - */ - public void endOdPair(); - - /** - * Closes the path writer. Called once at the end of all writing. - */ - public void close(); -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/utilities/NetworkInstantiator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/utilities/NetworkInstantiator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/utilities/NetworkInstantiator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/src/main/java/floetteroed/bioroute/utilities/NetworkInstantiator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -/* - * BIOROUTE - * - * Copyright 2011-2016 Gunnar Flötteröd and Michel Bierlaire - * - * - * This file is part of BIOROUTE. - * - * BIOROUTE 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. - * - * BIOROUTE 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with BIOROUTE. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.bioroute.utilities; - -import floetteroed.bioroute.NetworkLoader; -import floetteroed.bioroute.NetworkPreprocessor; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.config.ConfigurableInstantiator; -import floetteroed.utilities.networks.basic.BasicNetwork; - -/** - * Instantiates and preprocesses a Network. - * - * @author Gunnar Flötteröd - * - */ -public class NetworkInstantiator { - - // -------------------- CONSTRUCTION -------------------- - - private NetworkInstantiator() { - // not to be instantiated - } - - // -------------------- IMPLEMENTATION -------------------- - - public static BasicNetwork loadNetwork(final Config config, - final String... elements) { - final NetworkLoader networkLoader = (NetworkLoader) ConfigurableInstantiator - .newConfiguredInstance(config, elements); - return networkLoader.loadNetwork(); - } - - public static void preprocessNetwork(final BasicNetwork network, - final Config config, final String... elements) { - final NetworkPreprocessor networkPreprocessor = (NetworkPreprocessor) ConfigurableInstantiator - .newConfiguredInstance(config, elements); - networkPreprocessor.preprocess(network); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/config.xml sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/config.xml --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/config.xml 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/config.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/MichelEmma.xml sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/MichelEmma.xml --- sumo-1.1.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/MichelEmma.xml 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/bioroute/testdata/MichelEmmaNetwork/MichelEmma.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,387 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/pom.xml sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/pom.xml --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/pom.xml 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/pom.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ - - - 4.0.0 - - floetteroed.cadyts - cadyts - 1.3.0-SNAPSHOT - - - true - - - - - bintray - https://api.bintray.com/maven/matsim/matsim/cadyts - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - false - false - UTF-8 - - true - 128m - 512m - - 4000 - 100 - - - - - - - - - floetteroed.utilities - floetteroed-utilities - 1.0.0 - - - org.apache.commons - commons-math3 - 3.4.1 - - - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/analytical/AnalyticalCalibrator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/analytical/AnalyticalCalibrator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/analytical/AnalyticalCalibrator.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/analytical/AnalyticalCalibrator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,184 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.analytical; - -import static floetteroed.utilities.math.MathHelpers.draw; -import static java.lang.Math.exp; - -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.Calibrator; -import floetteroed.cadyts.demand.Plan; -import floetteroed.utilities.math.Vector; - -/** - * A Calibrator that is applicable to analytical demand simulators that - * enumerate choice sets and provide a choice probability for every element of - * every choice set. - * - * @author Gunnar Flötteröd - * - * @param - * the network link type - */ -public class AnalyticalCalibrator extends Calibrator { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - protected static final double MIN_PROB = 1e-6; - - public static final boolean DEFAULT_BRUTE_FORCE = false; - - // -------------------- MEMBERS -------------------- - - private Vector lastChoiceProbs; - - private int lastChoiceIndex; - - private boolean bruteForce = DEFAULT_BRUTE_FORCE; - - // -------------------- CONSTRUCTION -------------------- - - public AnalyticalCalibrator(final String logFile, final Long randomSeed, - final int timeBinSize_s) { - super(logFile, randomSeed, timeBinSize_s); - Logger.getLogger(this.myName).info( - "default bruteForce is " + this.bruteForce); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - public void setBruteForce(final boolean bruteForce) { - this.bruteForce = bruteForce; - Logger.getLogger(myName).info("set bruteForce to " + this.bruteForce); - } - - public boolean getBruteForce() { - return this.bruteForce; - } - - // -------------------- RESULT ACCESS -------------------- - - // TODO NEW - public Vector getLastChoiceProbs() { - return this.lastChoiceProbs; - } - - public double getLastChoiceProb(final int index) { - return this.lastChoiceProbs.get(index); - } - - public int getLastChoiceIndex() { - return this.lastChoiceIndex; - } - - // -------------------- IMPLEMENTATION -------------------- - - public int selectPlan(final List> plans, - final Vector choiceProbs) { - return this.selectPlan(null, plans, choiceProbs); - } - - protected int selectPlan(final Integer overrideChoice, - final List> plans, final Vector choiceProbs) { - - // CHECK - - if (plans == null) { - throw new IllegalArgumentException("plans list ist null"); - } - if (plans.size() == 0) { - throw new IllegalArgumentException("plans list is empty"); - } - if (choiceProbs == null) { - throw new IllegalArgumentException( - "choice probability list is null"); - } - if (choiceProbs.size() == 0) { - throw new IllegalArgumentException( - "choice probability list is empty"); - } - if (plans.size() != choiceProbs.size()) { - throw new IllegalArgumentException("plans list has " + plans.size() - + " elements, but choice probability list has " - + choiceProbs.size() + " elements"); - } - if (overrideChoice != null - && (overrideChoice < 0 || overrideChoice >= plans.size())) { - throw new IllegalArgumentException("overriding choice " - + overrideChoice + "is not in {0,...," + (plans.size() - 1) - + "}"); - } - - // CONTINUE - - if (this.bruteForce) { - final List bestIndices = new ArrayList(plans - .size()); - double bestLambda = Double.NEGATIVE_INFINITY; - for (int i = 0; i < plans.size(); i++) { - final double lambda = this.calcLinearPlanEffect(plans.get(i)); - if (lambda > bestLambda) { - bestIndices.clear(); - bestIndices.add(i); - bestLambda = lambda; - } else if (lambda == bestLambda) { - bestIndices.add(i); - } - } - this.lastChoiceProbs = new Vector(plans.size()); - for (Integer index : bestIndices) { - this.lastChoiceProbs.set(index, Math.max(MIN_PROB, choiceProbs - .get(index))); - } - } else { - this.lastChoiceProbs = choiceProbs.copy(); - final Vector lambdas = new Vector(plans.size()); - for (int i = 0; i < plans.size(); i++) { - lambdas.set(i, this.calcLinearPlanEffect(plans.get(i))); - } - final double maxLambda = lambdas.max(); - for (int i = 0; i < plans.size(); i++) { - this.lastChoiceProbs.mult(i, exp(lambdas.get(i) - maxLambda)); - this.lastChoiceProbs.set(i, Math.max(MIN_PROB, - this.lastChoiceProbs.get(i))); - } - } - this.lastChoiceProbs.mult(1.0 / this.lastChoiceProbs.sum()); - - if (overrideChoice == null) { - this.lastChoiceIndex = draw(this.lastChoiceProbs, this.getRandom()); - } else { - this.lastChoiceIndex = overrideChoice; - } - - this.addToDemand(plans.get(this.getLastChoiceIndex())); - return this.getLastChoiceIndex(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Analyzer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Analyzer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Analyzer.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Analyzer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,647 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators; - -import static java.lang.Math.max; -import static java.lang.Math.min; - -import java.io.FileNotFoundException; -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.logging.Logger; - -import floetteroed.cadyts.demand.Demand; -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.demand.PlanBuilder; -import floetteroed.cadyts.demand.PlanStep; -import floetteroed.cadyts.measurements.MultiLinkMeasurement; -import floetteroed.cadyts.measurements.SingleLinkMeasurement; -import floetteroed.cadyts.supply.SimResults; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.Time; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.math.Vector; - -/** - * - * A helper class of the Calibrator that is responsible for most algorithmic - * issues (whereas the Calibrator deals more with the program sequence control). - * - * @author Gunnar Flötteröd - * - * @param L - * the network link type - * - */ -class Analyzer implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private static final double maxAbsPlanLambda = 15; - - // -------------------- MEMBER VARIABLES -------------------- - - private final Demand demand; - - private StatisticsTracker statisticsTracker; - - // SINGLE-LINK MEASUREMENTS - - private final List> allSingleLinkMeas; - - private final List> planListeningSingleLinkMeas; - - private final Map>> link2meas; - - // MULTI-LINK MEASUREMENTS - - private final Set observedLinks; - - private final List> allMultiLinkMeas; - - private Vector matchList; - - private Vector newMatchList; - - // -------------------- CONSTRUCTION -------------------- - - Analyzer(final int startTime_s, final int binSize_s, final int binCnt) { - - this.demand = new Demand(startTime_s, binSize_s, binCnt); - this.statisticsTracker = new StatisticsTracker(null); - - this.allSingleLinkMeas = new ArrayList>(); - this.planListeningSingleLinkMeas = new ArrayList>(); - this.link2meas = new LinkedHashMap>>(); - - this.observedLinks = new LinkedHashSet(); - this.allMultiLinkMeas = new ArrayList>(); - this.matchList = null; - this.newMatchList = null; - } - - // -------------------- SETTERS AND GETTERS ------------------- - - void setStatisticsFile(final String statisticsFile) { - this.statisticsTracker = new StatisticsTracker(statisticsFile); - } - - String getStatisticsFile() { - return this.statisticsTracker.getFileName(); - } - - // -------------------- SIMPLE FUNCTIONALITY -------------------- - - int getBinSize_s() { - return this.demand.getBinSize_s(); - } - - void freeze() { - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - meas.freeze(); - } - for (MultiLinkMeasurement meas : this.allMultiLinkMeas) { - meas.freeze(); - } - } - - // -------------------- MEASUREMENT BOOKKEEPING ------------------- - - void addMeasurement(final SingleLinkMeasurement meas) { - this.allSingleLinkMeas.add(meas); - this.allocateSingleLinkMeasurement(meas); - } - - void addMeasurement(final MultiLinkMeasurement meas) { - this.allMultiLinkMeas.add(meas); - this.observedLinks.addAll(meas.getObservedLinks()); - } - - // -------------------- SINGLE-LINK-HELPERS -------------------- - - private void allocateSingleLinkMeasurement( - final SingleLinkMeasurement meas) { - if (meas.isPlanListening()) { - this.planListeningSingleLinkMeas.add(meas); - } - for (L link : meas.getRelevantLinks()) { - List> measList = this.link2meas.get(link); - if (measList == null) { - measList = new ArrayList>(); - this.link2meas.put(link, measList); - } - measList.add(meas); - } - } - - // -------------------- MULTI-LINK-HELPERS -------------------- - - private int[] indicesInMeas(final Plan plan) { - final int[] result = new int[this.allMultiLinkMeas.size()]; - for (PlanStep step : plan) { - for (int m = 0; m < this.allMultiLinkMeas.size(); m++) { - final MultiLinkMeasurement meas = this.allMultiLinkMeas - .get(m); - final int indexInMeas = result[m]; - if (indexInMeas < meas.size() - && meas.appliesTo(indexInMeas, step)) { - result[m]++; - } - } - } - return result; - } - - private int numberOfMatches(int[] indicesInMeas) { - int result = 0; - for (int m = 0; m < this.allMultiLinkMeas.size(); m++) { - if (indicesInMeas[m] == this.allMultiLinkMeas.get(m).size()) { - result++; - } - } - return result; - } - - private List matchingMeasurementIndices(final Plan plan) { - final List result = new ArrayList(); - final int[] indicesInMeas = this.indicesInMeas(plan); - for (int m = 0; m < this.allMultiLinkMeas.size(); m++) { - if (indicesInMeas[m] == this.allMultiLinkMeas.get(m).size()) { - result.add(m); - } - } - return result; - } - - // -------------------- ANALYSIS FUNCTIONALITY -------------------- - - void notifyPlanChoice(final Plan plan) { - if (plan == null) { - return; - } - /* - * (1) NOTIFY SINGLE-LINK MEASUREMENTS - */ - for (SingleLinkMeasurement meas : this.planListeningSingleLinkMeas) { - meas.notifyPlanChoice(plan); - } - /* - * (2) NOTIFY MULTI-LINK MEASUREMENTS - */ - if (this.allMultiLinkMeas.size() > 0) { - if (this.newMatchList == null) { - this.newMatchList = new Vector(this.allMultiLinkMeas.size()); - } - final List matchingMeasIndices = this - .matchingMeasurementIndices(plan); - final double oneByMatches = 1.0 / matchingMeasIndices.size(); - for (int m : matchingMeasIndices) { - this.newMatchList.add(m, oneByMatches); - } - } - /* - * (3) UPDATE DEMAND AND STATISTICS - */ - for (PlanStep planStep : plan) { - if (this.link2meas.keySet().contains(planStep.getLink()) - || (this.observedLinks.contains(planStep.getLink()))) { - this.demand.add(planStep); - } - } - this.statisticsTracker.registerChoice(); - } - - double calcLinearPlanEffect(final Plan plan) { - if (plan == null) { - return 0.0; - } - double result = 0; - /* - * (1) SINGLE-LINK MEASUREMENTS - */ - for (PlanStep step : plan) { - final List> measList = this.link2meas - .get(step.getLink()); - if (measList != null) { - for (SingleLinkMeasurement meas : measList) { - final double lambda = meas.getLambda(step); - this.statisticsTracker.registerLinkLambda(lambda); - result += lambda; - } - } - } - /* - * (2) MULTI-LINK MEASUREMENTS - */ - if (this.allMultiLinkMeas.size() > 0) { - final int[] indicesInMeas = this.indicesInMeas(plan); - final double numberOfMatches = this.numberOfMatches(indicesInMeas); - for (int m = 0; m < this.allMultiLinkMeas.size(); m++) { - if (indicesInMeas[m] == this.allMultiLinkMeas.get(m).size()) { - result += this.allMultiLinkMeas.get(m).dll_dMatches() - / numberOfMatches; - } - } - } - /* - * (4) POSTPROCESS RESULT - */ - result = Math.min(result, maxAbsPlanLambda); - result = Math.max(result, -maxAbsPlanLambda); - this.statisticsTracker.registerPlanLambda(result); - return result; - } - - void afterNetworkLoading(final SimResults simResults, - final String flowAnalysisFile) { - /* - * (0) dump flow analysis information - */ - if (flowAnalysisFile != null) { - try { - final PrintWriter writer = new PrintWriter(flowAnalysisFile); - writer.println("link\tstart-time\tend-time\tstart-time(sec)\t" - + "end-time(sec)\ttype\tsimulated\tmeasured\t" - + "standard-deviation\terror\tabsolute-error\t" - + "relative-error\trelative-absolute-error"); - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - final L link = meas.getLink(); - final SingleLinkMeasurement.TYPE type = meas.getType(); - final int start_s = meas.getStartTime_s(); - final int end_s = meas.getEndTime_s(); - final double simValue = simResults.getSimValue(link, - start_s, end_s, type); - final double measValue = meas.getMeasValue(); - writer.print(link); - writer.print("\t"); - writer.print(Time.strFromSec(start_s, ':')); - writer.print("\t"); - writer.print(Time.strFromSec(end_s, ':')); - writer.print("\t"); - writer.print(start_s); - writer.print("\t"); - writer.print(end_s); - writer.print("\t"); - writer.print(type); - writer.print("\t"); - writer.print(simValue); - writer.print("\t"); - writer.print(measValue); - writer.print("\t"); - writer.print(meas.getMeasStddev()); - writer.print("\t"); - writer.print(simValue - measValue); - writer.print("\t"); - writer.print(Math.abs(simValue - measValue)); - writer.print("\t"); - writer.print((simValue - measValue) / measValue); - writer.print("\t"); - writer.println(Math.abs(simValue - measValue) / measValue); - } - writer.flush(); - writer.close(); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - } - - /* - * (1) update regressions - * - * All demand data of this iteration was collected conditionally on the - * current measurement lists and the current definitions of relevant - * links, so the updates should happen before the measurement lists are - * rearranged. - */ - if (this.allSingleLinkMeas.size() > 0) { - double ll = 0; - double llPredErr = 0; - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - meas.update(this.demand, simResults); - ll += meas.getLastLL(); - llPredErr += Math.abs(meas.getLastLLPredErr()); - } - Logger.getLogger(this.getClass().getName()).info( - "single-link log-likelihood" + " is " + ll + " +/- " - + llPredErr); - this.statisticsTracker.registerSingleLinkLL(ll); - this.statisticsTracker.registerSingleLinkLLPredError(llPredErr); - } - - if (this.allMultiLinkMeas.size() > 0) { - this.matchList = this.newMatchList.copy(); - this.newMatchList = null; - for (int m = 0; m < this.allMultiLinkMeas.size(); m++) { - this.allMultiLinkMeas.get(m).update(this.matchList.get(m), - this.demand, simResults); - } - double ll = 0; - for (int m = 0; m < this.allMultiLinkMeas.size(); m++) { - ll += this.allMultiLinkMeas.get(m).ll(this.matchList.get(m)); - } - this.statisticsTracker.registerMultiLinkLL(ll); - } - - /* - * (2) internal updates - */ - this.statisticsTracker.writeToFile(); - this.statisticsTracker.clear(); - this.demand.clear(); - - /* - * (3) (re)allocate measurements to task-specific lists - * - * The previous call to Measurement.update(..) might have changed the - * internal state of the network. In particular, the plan listening of - * the measurements might have changed because their internal subnetwork - * representations might have been completed. - */ - this.planListeningSingleLinkMeas.clear(); - this.link2meas.clear(); - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - this.allocateSingleLinkMeasurement(meas); - } - if (this.planListeningSingleLinkMeas.size() > 0) { - Logger.getLogger(this.getClass().getName()).info( - this.planListeningSingleLinkMeas.size() - + " inactive measurement(s)"); - } - } - - // -------------------- TRANSFORMATION INTO DynamicData -------------------- - - DynamicData getLinkCostOffsets() { - Logger.getLogger(this.getClass().getName()).warning( - "experimental function, " - + "accounts only for single-link measurements"); - final DynamicData result = new DynamicData( - this.demand.getStartTime_s(), this.demand.getBinSize_s(), - this.demand.getBinCnt()); - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - final int startBin = max(result.bin(meas.getStartTime_s()), 0); - final int endBin = min(result.bin(meas.getEndTime_s() - 1), - result.getBinCnt() - 1); - for (int bin = startBin; bin <= endBin; bin++) { - final double weight = MathHelpers.overlap( - result.binStart_s(bin), - result.binStart_s(bin) + result.getBinSize_s(), - meas.getStartTime_s(), meas.getEndTime_s()) - / result.getBinSize_s(); - result.add(meas.getLink(), bin, - weight * meas.getLambdaCoefficient(meas.getLink())); - } - } - return result; - } - - // -------------------- REDUCTION OF PLANS -------------------- - - // TODO NEW - Plan newReducedPlan(final Plan fullPlan) { - final PlanBuilder builder = new PlanBuilder(); - for (PlanStep step : fullPlan) { - if (this.link2meas.keySet().contains(step.getLink())) { - builder.addTurn(step.getLink(), step.getEntryTime_s()); - } - } - return builder.getResult(); - } - - // TODO NEW - int getBinCnt() { - return this.demand.getBinCnt(); - } - - // TODO NEW - double logLikelihood(final Demand demand) { - double result = 0; - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - result += meas.logLikelihood(demand); - } - return result; - } - - // TODO NEW - double d_logLikelihood_dPlanChoiceProba(final Plan plan, - final Demand demand) { - double result = 0; - for (PlanStep step : plan) { - for (SingleLinkMeasurement meas : this.link2meas.get(step - .getLink())) { - result += meas.d_logLikelihood_d_linkDemand(step.getLink(), - step.getEntryTime_s(), demand); - } - } - return result; - } - - // ---------- TODO NEW FOR LEVENBERG-MARCQUARDT ---------- - - private Map, Integer> meas2index = null; - - private void createMeasIndex() { - this.meas2index = new LinkedHashMap, Integer>(); - for (int i = 0; i < this.allSingleLinkMeas.size(); i++) { - this.meas2index.put(this.allSingleLinkMeas.get(i), i); - } - Logger.getLogger(this.getClass().getName()) - .info("Indexed " + this.meas2index.size() - + " distinct measurements."); - if (this.meas2index.size() != this.allSingleLinkMeas.size()) { - Logger.getLogger(this.getClass().getName()).warning( - "number of registered single link measurements is " - + this.allSingleLinkMeas.size()); - } - } - - private int measIndex(final SingleLinkMeasurement meas) { - if (this.meas2index == null) { - this.createMeasIndex(); - } - return this.meas2index.get(meas); - } - - Vector residuals(final Demand demand) { - final Vector result = new Vector(this.allSingleLinkMeas.size()); - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - result.set(this.measIndex(meas), meas.residual(demand)); - } - return result; - } - - Vector dResiduals_dLinkDemand() { - final Vector result = new Vector(this.allSingleLinkMeas.size()); - for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - result.set(this.measIndex(meas), meas.dResidual_dLinkDemand()); - } - return result; - } - - List affectedMeasurementIndices(final Plan plan) { - final List result = new ArrayList(); - for (PlanStep step : plan) { - for (SingleLinkMeasurement meas : this.link2meas.get(step - .getLink())) { - if ((step.getEntryTime_s() >= meas.getStartTime_s()) - && (step.getEntryTime_s() < meas.getEndTime_s())) { - result.add(this.measIndex(meas)); - } - } - } - return result; - } - - // -------------------------------------------------------- - // -------------------- VERY OLD STUFF -------------------- - // -------------------------------------------------------- - - // /* - // * This is new code for the estimation of demand model parameters. It - // * implements [[TODO COMPLETE]]. Variables are like in that article, only - // * that "\Pi" is written as "P" and "\beta" as "b". - // */ - // - // /** - // * The Hessian of the sensor data's log-likelihood function L with respect - // * to the parameter vector b. - // */ - // // private Matrix d2L_dbdb = null; - // private Matrix d2L_dbdb_BHHH = null; - // private Matrix d2L_dbdb_add = null; - // - // /** - // * Performs two tasks: First, it adds all terms for one agent n to the - // * right-hand side sum in Equation (24). Second, it adds all terms - // specific - // * to agent n to the result of Equation (25). - // * - // * @param plans - // * the choice set of agent n - // * @param dL_dPn - // * a vector that contains the derivatives of the sensor-data's - // * log-likelihood with respect to all plan choice probabilities - // * of agent n (elsewhere called the Lambda coefficients of those - // * plans) - // * @param dPn_db - // * a matrix that contains in every row i the sensitivities of of - // * plan i's choice probability with respect to the parameter - // * vector b - // * @param d2Pn_dbdb - // * a list of matrices where the ith matrix contains the Hessian - // * of choice probability i with respect to the parameter vector b - // */ - // public void update_d2L_dbdb(final List> plans, - // final Vector dL_dPn, final Matrix dPn_db, - // final List d2Pn_dbdb) { - // - // // if (this.d2L_dbdb == null) { - // // this.d2L_dbdb = new Matrix(dPn_db.columnSize(), dPn_db.columnSize()); - // // } - // if (this.d2L_dbdb_BHHH == null) { - // this.d2L_dbdb_BHHH = new Matrix(dPn_db.columnSize(), dPn_db - // .columnSize()); - // } - // if (this.d2L_dbdb_add == null) { - // this.d2L_dbdb_add = new Matrix(dPn_db.columnSize(), dPn_db - // .columnSize()); - // } - // - // // update of right-hand side of Equation (24) - // // omission leads to Gauss-Newton like approximation of the Hessian - // if (d2Pn_dbdb != null) { - // for (int i = 0; i < plans.size(); i++) { - // this.d2L_dbdb_add.add(d2Pn_dbdb.get(i), dL_dPn.get(i)); - // } - // } - // // update of Equation (26) - // for (int i = 0; i < plans.size(); i++) { - // final Plan plan = plans.get(i); - // for (PlanStep step : plan) { - // final List> measList = this.link2meas - // .get(step.getLink()); - // if (measList != null) { - // for (SingleLinkMeasurement meas : measList) { - // meas.register_dPni_db(dPn_db.getRow(i)); - // } - // } - // } - // } - // } - // - // /** - // * Adds the left-hand side of Equation (24) to its right-hand side, which - // is - // * assumed to have been built through previous calls to - // * update_dL_dParam(..). Uses results of Equation (25), which have been - // * computed through the same previous function calls to - // update_dL_dParam(..) - // */ - // public void complete_d2L_dbdb() { - // if (this.d2L_dbdb_BHHH == null) { - // return; - // } - // for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - // final double var = meas.getMeasVariance(); - // final Vector dqak_db = meas.get_dqak_db(); - // if (dqak_db != null) { - // for (int r = 0; r < this.d2L_dbdb_BHHH.rowSize(); r++) { - // for (int s = 0; s < r; s++) { - // final double rsAddend = (-1.0 / var) * dqak_db.get(r) - // * dqak_db.get(s); - // this.d2L_dbdb_BHHH.getRow(r).add(s, rsAddend); - // this.d2L_dbdb_BHHH.getRow(s).add(r, rsAddend); - // } - // this.d2L_dbdb_BHHH.getRow(r).add(r, - // (-1.0 / var) * dqak_db.get(r) * dqak_db.get(r)); - // } - // } - // } - // } - // - // public Matrix get_d2L_dbdb_GS() { - // return this.d2L_dbdb_BHHH; - // } - // - // public Matrix get_d2L_dbdb_ADD() { - // return this.d2L_dbdb_add; - // } - // - // public void clear_d2L_dbdb() { - // this.d2L_dbdb_BHHH = null; - // this.d2L_dbdb_add = null; - // for (SingleLinkMeasurement meas : this.allSingleLinkMeas) { - // meas.clear_dqak_db(); - // } - // } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Calibrator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Calibrator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Calibrator.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/Calibrator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,699 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators; - -import static java.lang.Math.max; -import static java.lang.Math.sqrt; - -import java.io.File; -import java.io.IOException; -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.logging.FileHandler; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.Logger; - -import floetteroed.cadyts.demand.Demand; -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.demand.PlanBuilder; -import floetteroed.cadyts.measurements.MultiLinkMeasurement; -import floetteroed.cadyts.measurements.SingleLinkMeasurement; -import floetteroed.cadyts.supply.LinkLoading; -import floetteroed.cadyts.supply.LinkLoadingLocal; -import floetteroed.cadyts.supply.LinkLoadingProportional; -import floetteroed.cadyts.supply.SimResults; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.SimpleLogFormatter; -import floetteroed.utilities.Units; -import floetteroed.utilities.math.Vector; - -/** - * - * The basic calibration class. - * - * @param L - * the network link type - * - * @author Gunnar Flötteröd - * - */ -public class Calibrator implements Serializable { - - // -------------------- CONSTANTS -------------------- - - // MISC - - private static final long serialVersionUID = 1L; - - public static final String VERSION = "1.1.0"; - - public static final String BASE_PACKAGE = ""; // "cadyts"; - - protected final String myName = this.getClass().getName(); - - // DEFAULT PARAMETER VALUES - - public static final long DEFAULT_RANDOM_SEED = 0L; - - public static final double DEFAULT_REGRESSION_INERTIA = 0.95; - - public static final int DEFAULT_FREEZE_ITERATION = Integer.MAX_VALUE; - - public static final double DEFAULT_VARIANCE_SCALE = 1.0; - - public static final double DEFAULT_MIN_FLOW_STDDEV_VEH_H = 25; - - public static final double DEFAULT_MIN_COUNT_STDDEV_VEH = 25; - - public static final int DEFAULT_PREPARATORY_ITERATIONS = 1; - - public static final boolean DEFAULT_CENTER_REGRESSION = false; - - public static final String DEFAULT_STATISTICS_FILE = "calibration-stats.txt"; - - public static final boolean DEFAULT_PROPORTIONAL_ASSIGNMENT = false; - - public static final boolean DEFAULT_DEBUG_MODE = false; - - public static final String DEFAULT_FLOW_ANALYSIS_FILE = null; - - // TODO NEW - public static final boolean DEFAULT_COUNT_FIRST_LINK = false; - - // TODO NEW - public static final boolean DEFAULT_COUNT_LAST_LINK = true; - - // -------------------- MEMBER VARIABLES -------------------- - - // MISC - - private final String logFile; - - private final long randomSeed; - - private final Analyzer analyzer; - - private final Random random; - - // PARAMETERS - - private final Map type2minStddev; - - private double regressionInertia = DEFAULT_REGRESSION_INERTIA; - - private int freezeIteration = DEFAULT_FREEZE_ITERATION; - - private double varianceScale = DEFAULT_VARIANCE_SCALE; - - private int preparatoryIterations = DEFAULT_PREPARATORY_ITERATIONS; - - private boolean centerRegression = DEFAULT_CENTER_REGRESSION; - - private String statisticsFile = DEFAULT_STATISTICS_FILE; - - private boolean proportionalAssignment = DEFAULT_PROPORTIONAL_ASSIGNMENT; - - private boolean debugMode = DEFAULT_DEBUG_MODE; - - private String flowAnalysisFile = DEFAULT_FLOW_ANALYSIS_FILE; - - private boolean countFirstLink = DEFAULT_COUNT_FIRST_LINK; - - private boolean countLastLink = DEFAULT_COUNT_LAST_LINK; - - private int iteration = 0; - - // -------------------- CONSTRUCTION -------------------- - - /** - * @param logFile - * name of the file in which to write logging messages; can be - * null if no logging to file is desired - * - * @param randomSeed - * provides control over reproducible random number generation; - * if this is null, a default random seed will be used - * - * @param timeBinSize_s - * the time bin size in which the calibration stores and - * evaluates network-related information; the length of a day in - * seconds must be an integer multiple of this value - */ - public Calibrator(final String logFile, Long randomSeed, - final int timeBinSize_s) { - - // INITIALIZE LOGGING - - this.logFile = logFile; - final boolean couldNotDeleteOldLogfile; - if (logFile != null) { - couldNotDeleteOldLogfile = !(new File(logFile)).delete(); - } else { - couldNotDeleteOldLogfile = false; - } - initLogging(); - if (couldNotDeleteOldLogfile) { - Logger.getLogger(this.getClass().getName()).warning( - "unable to delete old logfile"); - } - Logger.getLogger(this.getClass().getName()).info( - "starting " + this.getClass().getSimpleName() + " version " - + VERSION); - - // CHECK - - if (randomSeed == null) { - Logger.getLogger(this.getClass().getName()).warning( - "using default random seed"); - randomSeed = DEFAULT_RANDOM_SEED; - } - - final int dayLength_s = (int) Units.S_PER_D; - final int timeBinCnt = dayLength_s / timeBinSize_s; - if (timeBinCnt * timeBinSize_s != dayLength_s) { - throw new IllegalArgumentException("day length (" + dayLength_s - + " s) must be an integer multiple of timeBinSize_s"); - } - - // CONTINUE - - Logger.getLogger(this.getClass().getName()).info( - "initializing with randomSeed = " + randomSeed - + ", timeBinSize_s = " + timeBinSize_s - + ", timeBinCnt = " + timeBinCnt); - - this.randomSeed = randomSeed; - this.random = new Random(randomSeed); - this.analyzer = new Analyzer(0, timeBinSize_s, timeBinCnt); - - Logger.getLogger(this.myName).info( - "default regressionInertia is " + this.regressionInertia); - Logger.getLogger(this.myName).info( - "default freezeIteration is " + this.freezeIteration); - Logger.getLogger(this.myName).info( - "default varianceScale is " + this.varianceScale); - Logger.getLogger(this.myName).info( - "default preparatoryIterations is " - + this.preparatoryIterations); - Logger.getLogger(this.myName).info( - "default centerRegression is " + this.centerRegression); - Logger.getLogger(this.myName).info( - "default statisticsFile is " + this.statisticsFile); - Logger.getLogger(this.myName).info( - "default proportionalAssignment is " - + this.proportionalAssignment); - Logger.getLogger(this.myName).info( - "default debugMode is " + this.debugMode); - Logger.getLogger(this.myName).info( - "default flowAnalysisFile is " + this.flowAnalysisFile); - Logger.getLogger(this.myName).info( - "default countFirstLink is " + this.countFirstLink); - Logger.getLogger(this.myName).info( - "default countLastLink is " + this.countLastLink); - - this.type2minStddev = new HashMap(); - this.type2minStddev.put(SingleLinkMeasurement.TYPE.FLOW_VEH_H, - DEFAULT_MIN_FLOW_STDDEV_VEH_H); - this.type2minStddev.put(SingleLinkMeasurement.TYPE.COUNT_VEH, - DEFAULT_MIN_COUNT_STDDEV_VEH); - for (Map.Entry entry : this.type2minStddev - .entrySet()) { - Logger.getLogger(this.myName).info( - "default minimum standard deviation for " + entry.getKey() - + " is " + entry.getValue()); - } - } - - // -------------------- INTERNALS -------------------- - - private void initLogging() { - - final Logger logger = Logger.getLogger(BASE_PACKAGE); - logger.setUseParentHandlers(false); - for (Handler h : logger.getHandlers()) { - h.flush(); - if (h instanceof FileHandler) { // don't close the console stream - h.close(); - } - logger.removeHandler(h); - } - - final StreamFlushHandler stdOutHandler = new StreamFlushHandler( - System.out, new SimpleLogFormatter("Calibration ")); - logger.addHandler(stdOutHandler); - - if (this.logFile != null) { - try { - final FileHandler fileHandler = new FileHandler(this.logFile, - true); - fileHandler.setFormatter(new SimpleLogFormatter(null)); - logger.addHandler(fileHandler); - } catch (IOException e) { - logger.warning("unable to create " + this.logFile); - } - } - - this.setLogLevel(); - } - - private void setLogLevel() { - final Level level = this.debugMode ? Level.FINE : Level.INFO; - final Logger logger = Logger.getLogger(BASE_PACKAGE); - logger.setLevel(level); - for (Handler h : logger.getHandlers()) { - h.setLevel(level); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws IOException { - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws IOException, - ClassNotFoundException { - in.defaultReadObject(); - initLogging(); - } - - // -------------------- GETTERS AND SETTERS -------------------- - - public long getRandomSeed() { - return this.randomSeed; - } - - public Random getRandom() { - return this.random; - } - - public int getTimeBinSize_s() { - return this.analyzer.getBinSize_s(); - } - - public int getIteration() { - return this.iteration; - } - - public DynamicData getLinkCostOffsets() { - Logger.getLogger(this.getClass().getName()).warning( - "link cost offsets only account for single-link measurements"); - return this.analyzer.getLinkCostOffsets(); - } - - public void setRegressionInertia(final double regressionInertia) { - if (regressionInertia <= 0 || regressionInertia > 1) { - throw new IllegalArgumentException( - "regressionInertia must be in (0,1]"); - } - this.regressionInertia = regressionInertia; - Logger.getLogger(this.myName).info( - "set regressionInertia to " + this.regressionInertia); - } - - public double getRegressionInertia() { - return this.regressionInertia; - } - - public void setFreezeIteration(int freezeIteration) { - if (freezeIteration < 0) { - throw new IllegalArgumentException( - "freezeIteration must be at least 0"); - } - this.freezeIteration = freezeIteration; - Logger.getLogger(this.myName).info( - "set freezeIteration to " + this.freezeIteration); - if (this.freezeIteration < this.iteration) { - Logger.getLogger(this.myName) - .warning( - "new freeze iteration " + this.freezeIteration - + " will have no effect because" - + " current iteration is already " - + this.iteration); - } - } - - public int getFreezeIteration() { - return this.freezeIteration; - } - - public void setVarianceScale(double varianceScale) { - if (varianceScale <= 0) { - throw new IllegalArgumentException( - "varianceScale must be strictly positive"); - } - this.varianceScale = varianceScale; - Logger.getLogger(this.myName).info( - "set varianceScale to " + this.varianceScale); - } - - public double getVarianceScale() { - return this.varianceScale; - } - - public void setMinStddev(final double minStddev, - final SingleLinkMeasurement.TYPE type) { - if (minStddev <= 0) { - throw new IllegalArgumentException( - "minStddev for must be strictly positive"); - } - if (type == null) { - throw new IllegalArgumentException( - "measurement type must not be null"); - } - this.type2minStddev.put(type, minStddev); - Logger.getLogger(this.myName).info( - "set minimum standard deviation for " + type + " to " - + this.type2minStddev.get(type)); - } - - public double getMinStddev(final SingleLinkMeasurement.TYPE type) { - return this.type2minStddev.get(type); - } - - public void setPreparatoryIterations(final int preparatoryIterations) { - if (preparatoryIterations < 1) { - throw new IllegalArgumentException( - "preparatoryIterations must at least be one"); - } - this.preparatoryIterations = preparatoryIterations; - Logger.getLogger(this.myName).info( - "set preparatoryIterations to " + this.preparatoryIterations); - } - - public int getPreparatoryIterations() { - return this.preparatoryIterations; - } - - public void setCenterRegression(final boolean centerRegression) { - this.centerRegression = centerRegression; - Logger.getLogger(this.myName).info( - "set centerRegression to " + this.centerRegression); - } - - public boolean getCenterRegression() { - return this.centerRegression; - } - - public void setStatisticsFile(final String statisticsFile) { - this.analyzer.setStatisticsFile(statisticsFile); - Logger.getLogger(this.myName).info( - "set statisticsFile to " + this.getStatisticsFile()); - } - - public String getStatisticsFile() { - return this.analyzer.getStatisticsFile(); - } - - public void setProportionalAssignment(final boolean proportionalAssignment) { - this.proportionalAssignment = proportionalAssignment; - Logger.getLogger(this.myName).info( - "set proportionalAssignment to " + this.proportionalAssignment); - } - - public boolean getProportionalAssignment() { - return this.proportionalAssignment; - } - - public void setDebugMode(final boolean debugMode) { - this.debugMode = debugMode; - this.setLogLevel(); - Logger.getLogger(this.myName) - .info("set debugMode to " + this.debugMode); - } - - public boolean getDebugMode() { - return this.debugMode; - } - - public void setFlowAnalysisFile(final String flowAnalysisFile) { - this.flowAnalysisFile = flowAnalysisFile; - Logger.getLogger(this.myName).info( - "set flowAnalysisFile to " + this.flowAnalysisFile); - } - - public String getFlowAnalysisFile() { - return this.flowAnalysisFile; - } - - public void setCountFirstLink(final boolean countFirstLink) { - this.countFirstLink = countFirstLink; - Logger.getLogger(this.myName).info( - "set countFirstLink to " + this.countFirstLink); - } - - public boolean getCountFirstLink() { - return this.countFirstLink; - } - - public void setCountLastLink(final boolean countLastLink) { - this.countLastLink = countLastLink; - Logger.getLogger(this.myName).info( - "set countLastLink to " + this.countLastLink); - } - - public boolean getCountLastLink() { - return this.countLastLink; - } - - // -------------------- IMPLEMENTATION -------------------- - - public PlanBuilder newPlanBuilder() { - return new PlanBuilder(this.countFirstLink, this.countLastLink); - } - - /** - * This function returns a real number that approximately describes the - * effect of the plan on the log-likelihood function (and hence on the - * quality of the measurement reproduction). Based on this, Calibrator - * subclasses determine how to affect the demand in consideration of the - * measurements. - * - * @param plan - * the plan of a simulated traveler - * - * @return the approximate effect on the log-likelihood of executing the - * plan - */ - public double calcLinearPlanEffect(final Plan plan) { - if (this.iteration >= this.preparatoryIterations) { - return this.analyzer.calcLinearPlanEffect(plan); - } else { - return 0.0; - } - } - - /** - * In every iteration, all plans that are actually selected for execution by - * the traveler population must registered through this function, and no - * other plans must be registered here. - *

- * This function is not public because it should not be called directly by - * the simulator. Proper calls to this function are implemented in concrete - * Calibrator subclasses. - * - * @param plan - * the actually selected plan of a simulated traveler - */ - public void addToDemand(final Plan plan) { - this.analyzer.notifyPlanChoice(plan); - } - - /** - * "Freezes" all learning procedures in that the recursive regression that - * tracks the effect of plan choices on network conditions as from now - * operates with a maximum inertia. - *

- * This function is available to subclasses because in particular cases the - * "freezing" may be implemented by stabilizing other aspects of the - * iterative calibration procedure than the regression. - */ - protected void freeze() { - Logger.getLogger(this.myName).fine("entering"); - Logger.getLogger(this.myName).info("freezing all learning procedures"); - this.analyzer.freeze(); - Logger.getLogger(this.myName).fine("exiting"); - } - - public LinkLoading newLinkLoading(final L link, final int start_s, - final int end_s, final SingleLinkMeasurement.TYPE type) { - if (this.getProportionalAssignment()) { - return new LinkLoadingProportional(link, start_s, end_s, type, - this.getRegressionInertia()); - } else { - return new LinkLoadingLocal(link, start_s, end_s, - this.getRegressionInertia(), this.getCenterRegression()); - } - } - - public void addMeasurement(final SingleLinkMeasurement meas) { - Logger.getLogger(this.myName).fine("entering"); - if (meas == null) { - throw new IllegalArgumentException("measurement is null"); - } - meas.init(this); - this.analyzer.addMeasurement(meas); - Logger.getLogger(this.getClass().getName()).info("added " + meas); - Logger.getLogger(this.myName).fine("exiting"); - } - - public void addMeasurement(final L link, final int start_s, - final int end_s, final double value, final double stddev, - final SingleLinkMeasurement.TYPE type) { - Logger.getLogger(this.myName).fine("entering"); - final SingleLinkMeasurement meas = new SingleLinkMeasurement( - link, value, stddev * stddev, start_s, end_s, type); - this.addMeasurement(meas); - Logger.getLogger(this.myName).fine("exiting"); - } - - public void addMeasurement(final L link, final int start_s, - final int end_s, final double value, - final SingleLinkMeasurement.TYPE type) { - Logger.getLogger(this.myName).fine("entering"); - final double stddev = max(this.getMinStddev(type), - sqrt(this.getVarianceScale() * value)); - this.addMeasurement(link, start_s, end_s, value, stddev, type); - Logger.getLogger(this.myName).fine("exiting"); - } - - public void addMeasurement(final MultiLinkMeasurement meas) { - Logger.getLogger(this.myName).fine("entering"); - if (meas == null) { - throw new IllegalArgumentException("measurement is null"); - } - meas.init(this); - this.analyzer.addMeasurement(meas); - Logger.getLogger(this.getClass().getName()).info("added " + meas); - Logger.getLogger(this.myName).fine("exiting"); - } - - /** - * Must be called exactly once after every network loading. - * - * @param simResults - * a container implementation that provides access to the - * simulation results of the most recent network loading - */ - public void afterNetworkLoading(final SimResults simResults) { - Logger.getLogger(this.myName).fine("entering"); - if ((this.iteration == 0 && this.regressionInertia == 1.0) - || (this.iteration == this.freezeIteration)) { - this.freeze(); - } - this.analyzer.afterNetworkLoading(simResults, this.flowAnalysisFile); - this.iteration++; - Logger.getLogger(this.myName).fine("exiting"); - } - - // -------------------- REDUCTION OF PLANS -------------------- - - // TODO NEW - public Plan newReducedPlan(final Plan fullPlan) { - return this.analyzer.newReducedPlan(fullPlan); - } - - // TODO NEW - public int getBinSize_s() { - return this.analyzer.getBinSize_s(); - } - - // TODO NEW - public int getBinCnt() { - return this.analyzer.getBinCnt(); - } - - // TODO NEW - public double logLikelihood(final Demand demand) { - return this.analyzer.logLikelihood(demand); - } - - // TODO NEW - public double d_logLikelihood_dPlanChoiceProba(final Plan plan, - final Demand demand) { - return this.analyzer.d_logLikelihood_dPlanChoiceProba(plan, demand); - } - - // ---------- TODO NEW FOR LEVENBERG-MARCQUARDT ---------- - - public Vector residuals(final Demand demand) { - return this.analyzer.residuals(demand); - } - - public Vector dResiduals_dLinkDemand() { - return this.analyzer.dResiduals_dLinkDemand(); - } - - public List affectedMeasurementIndices(final Plan plan) { - return this.analyzer.affectedMeasurementIndices(plan); - } - - // -------------------------------------------------------- - // -------------------- VERY OLD STUFF -------------------- - // -------------------------------------------------------- - - // /* - // * New code for parameter estimation. Forwards all calls to (package - // * private) Analyzer class. Described in [[TODO CITE]]. - // */ - // - // /** - // * @see cadyts.calibrators.Analyzer.update_d2L_dbdb(final List> plans, final Vector dL_dPn, final Matrix dPn_db, final - // * List d2Pn_dbdb) - // */ - // protected void update_d2L_dbdb(final List> plans, - // final Vector dL_dPn, final Matrix dPn_db, - // final List d2Pn_dbdb) { - // this.analyzer.update_d2L_dbdb(plans, dL_dPn, dPn_db, d2Pn_dbdb); - // } - // - // /** - // * @see cadyts.calibrators.Analyzer.complete_d2L_dbdb() - // */ - // protected void complete_d2L_dbdb() { - // this.analyzer.complete_d2L_dbdb(); - // } - // - // /** - // * @see cadyts.calibrators.Analyzer.get_d2L_dbdb() - // */ - // protected Matrix get_d2L_dbdb_GS() { - // return this.analyzer.get_d2L_dbdb_GS(); - // } - // - // protected Matrix get_d2L_dbdb_ADD() { - // return this.analyzer.get_d2L_dbdb_ADD(); - // } - // - // /** - // * @see cadyts.calibrators.Analyzer.clear_d2L_dbdb() - // */ - // protected void clear_d2L_dbdb() { - // this.analyzer.clear_d2L_dbdb(); - // } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/Agent.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/Agent.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/Agent.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/Agent.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased; - -import java.util.ArrayList; -import java.util.List; - -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.demand.PlanChoiceModel; - -/** - * - * @author Gunnar Flötteröd - * - * @param P - * the plan type - * @param DEPARTURE - * the plan choice model type - */ -public class Agent

, D extends PlanChoiceModel

> { - - // ------------------- CONSTANTS AND MEMBERS -------------------- - - private final Object id; - - private final List

plans = new ArrayList

(); - - private final D planChoiceModel; - - // -------------------- CONSTRUCTION -------------------- - - public Agent(final Object id, final D planChoiceModel) { - - if (id == null) { - throw new IllegalArgumentException("agent id is null"); - } - if (planChoiceModel == null) { - throw new IllegalArgumentException("plan choice model is null"); - } - this.id = id; - this.planChoiceModel = planChoiceModel; - } - - // -------------------- SETTERS -------------------- - - public void addPlan(final P plan) { - this.plans.add(plan); - } - - // -------------------- GETTERS -------------------- - - public Object getId() { - return this.id; - } - - public List

getPlans() { - return this.plans; - } - - public D getPlanChoiceModel() { - return this.planChoiceModel; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/ChoiceFileWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/ChoiceFileWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/ChoiceFileWriter.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/ChoiceFileWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased; - -import java.io.IOException; - -import floetteroed.cadyts.demand.Plan; - -/** - * - * @author Gunnar Flötteröd - * - * @param ARRIVAL - * the agent type - * @param P - * the plan type - */ -public interface ChoiceFileWriter, P extends Plan> { - - public void open(final String choiceFile) throws IOException; - - public void write(final A agent, final P plan) throws IOException; - - public void close() throws IOException; - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/FileBasedController.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/FileBasedController.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/FileBasedController.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/FileBasedController.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,441 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased; - -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.util.List; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.Calibrator; -import floetteroed.cadyts.calibrators.analytical.AnalyticalCalibrator; -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.demand.PlanChoiceModel; -import floetteroed.cadyts.measurements.SingleLinkMeasurement; -import floetteroed.utilities.commandlineparser.CommandLineParser; -import floetteroed.utilities.commandlineparser.CommandLineParserElement; - -/** - * This class allows to link a (subclass of) an AnalyticalCalibrator via files - * to a DTA simulation. The coupling is realized in three stages: - *

- * The INIT stage is entered only once. During this stage, the calibration is - * intialized. Then, in every iteration of the simulation, the CHOICE stage and - * the UPDATE stage are sequentially called. In the CHOICE stage, all agents - * replan. In the UPDATE stage, the resulting network conditions are fed back to - * the calibration. - * - * A concrete subclass needs to implement several abstract functions. Beyond - * this, a number of hooks are provided. - * - * @author Gunnar Flötteröd - * - * @param C - * the calibrator type - * @param ARRIVAL - * the agent type - * @param P - * the plan type - * - */ -public abstract class FileBasedController, A extends Agent>, P extends Plan, L> { - - // -------------------- CONSTANTS -------------------- - - public static final String FILENAME_SEPARATOR_REGEX = "\\,"; - public static final String SERIALIZED_FILE = "serialized.bin"; - - public static final String INIT = "INIT"; - public static final String MEASFILE_KEY = "-measfile"; - public static final String LOGFILE_KEY = "-logfile"; - public static final String RNDSEED_KEY = "-rndseed"; - public static final String BINSIZE_KEY = "-binsize"; - public static final String REGRINERTIA_KEY = "-regrinertia"; - public static final String FREEZEIT_KEY = "-freezeit"; - public static final String VARSCALE_KEY = "-varscale"; - public static final String MINFLOWSTDDEV_KEY = "-minflowstddev"; - public static final String MINCOUNTSTDDEV_KEY = "-mincountstddev"; - public static final String PREPITS_KEY = "-prepits"; - public static final String CENTERREGR_KEY = "-centerregr"; - public static final String STATSFILE_KEY = "-statsfile"; - public static final String PROPASSIGN_KEY = "-propassign"; - public static final String CNTFIRSTLINK_KEY = "-cntfirstlink"; - public static final String CNTLASTLINK_KEY = "-cntlastlink"; - public static final String DEBUGMODE_KEY = "-debug"; - public static final String BRUTEFORCE_KEY = "-bruteforce"; - - public static final String UPDATE = "UPDATE"; - public static final String CHOICESETFILE_KEY = "-choicesetfile"; - public static final String CHOICEFILE_KEY = "-choicefile"; - - public static final String CHOICE = "CHOICE"; - public static final String NETFILE_KEY = "-netfile"; - public static final String FLOWFILE_KEY = "-flowfile"; - - // -------------------- CONSTRUCTION -------------------- - - protected FileBasedController() { - } - - // ==================== the INIT stage ==================== - - protected void init(final String[] args) throws IOException { - final CommandLineParser clp = new CommandLineParser(); - this.prepareCommandLineParserINIT(clp); - clp.parse(args); - if (!clp.isComplete()) { - this.exitWithParameterList(clp, INIT); - } - final C calibrator = newCalibrator(clp); - this.prepareCalibratorINIT(calibrator, clp); - - for (String measFile : clp.getString(MEASFILE_KEY).split( - FILENAME_SEPARATOR_REGEX)) { - if (measFile != null && !"".equals(measFile)) { - Logger.getLogger(this.getClass().getName()).info( - "loading measurement file " + measFile); - this.loadMeasurements(calibrator, measFile); - } - } - - this.serialize(calibrator); - } - - /** - * Implement this factory method to create subclasses of - * FileBasedCalibrator. - * - * @param clp - * provides access to the command line parameters - */ - protected abstract C newCalibrator(final CommandLineParser clp); - - /** - * Extend this function to specify additional INIT command line parameters. - * - * @param clp - * provides access to the command line parameters - */ - protected void prepareCommandLineParserINIT(final CommandLineParser clp) { - clp.defineParameter(LOGFILE_KEY, false, null, "logfile"); - clp.defineParameter(MEASFILE_KEY, true, null, - "comma-separated list of files that contain the measurements"); - clp.defineParameter(BINSIZE_KEY, true, null, "numerical bin size [s]"); - clp.defineParameter(RNDSEED_KEY, false, Long - .toString(Calibrator.DEFAULT_RANDOM_SEED), "random seed"); - clp.defineParameter(VARSCALE_KEY, false, Double - .toString(Calibrator.DEFAULT_VARIANCE_SCALE), - "scales measurement variance"); - clp.defineParameter(REGRINERTIA_KEY, false, Double - .toString(Calibrator.DEFAULT_REGRESSION_INERTIA), - "regression inertia"); - clp.defineParameter(FREEZEIT_KEY, false, Integer - .toString(Calibrator.DEFAULT_FREEZE_ITERATION), - "number of iterations until system freezes"); - clp.defineParameter(MINFLOWSTDDEV_KEY, false, Double - .toString(Calibrator.DEFAULT_MIN_FLOW_STDDEV_VEH_H), - "minimum flow standard deviation [veh/h]"); - clp.defineParameter(MINCOUNTSTDDEV_KEY, false, Double - .toString(Calibrator.DEFAULT_MIN_COUNT_STDDEV_VEH), - "minimum count standard deviation [veh]"); - clp.defineParameter(PREPITS_KEY, false, Integer - .toString(Calibrator.DEFAULT_PREPARATORY_ITERATIONS), - "number of preparatory iterations"); - clp.defineParameter(CENTERREGR_KEY, false, Boolean - .toString(Calibrator.DEFAULT_CENTER_REGRESSION), - "centering of internal regressions"); - clp.defineParameter(STATSFILE_KEY, false, - Calibrator.DEFAULT_STATISTICS_FILE, - "name of file where statistics are written"); - clp.defineParameter(PROPASSIGN_KEY, false, Boolean - .toString(Calibrator.DEFAULT_PROPORTIONAL_ASSIGNMENT), - "if the calibration is to use a proportional assignment"); - clp.defineParameter(CNTFIRSTLINK_KEY, false, Boolean - .toString(Calibrator.DEFAULT_COUNT_FIRST_LINK), - "if entering vehicles are assumed to cross the " - + "upstream sensor of their entry link"); - clp.defineParameter(CNTLASTLINK_KEY, false, Boolean - .toString(Calibrator.DEFAULT_COUNT_LAST_LINK), - "if exiting vehicles are assumed to cross the " - + "upstream sensor of their exit link"); - clp.defineParameter(DEBUGMODE_KEY, false, Boolean - .toString(Calibrator.DEFAULT_DEBUG_MODE), - "if fine-grained debug messages are to be generated"); - clp.defineParameter(BRUTEFORCE_KEY, false, Boolean - .toString(AnalyticalCalibrator.DEFAULT_BRUTE_FORCE), - "enforces best effort in measurement reproduction"); - } - - /** - * Extend this function to feed additional INIT parameters into the - * Calibrator. - * - * @param calibrator - * the calibrator that is to be configured - * @param clp - * provides access to the command line parameters - */ - protected void prepareCalibratorINIT(final C calibrator, - final CommandLineParser clp) { - calibrator.setRegressionInertia(clp.getDouble(REGRINERTIA_KEY)); - calibrator.setVarianceScale(clp.getDouble(VARSCALE_KEY)); - calibrator.setFreezeIteration(clp.getInteger(FREEZEIT_KEY)); - calibrator.setMinStddev(clp.getDouble(MINFLOWSTDDEV_KEY), - SingleLinkMeasurement.TYPE.FLOW_VEH_H); - calibrator.setMinStddev(clp.getDouble(MINCOUNTSTDDEV_KEY), - SingleLinkMeasurement.TYPE.COUNT_VEH); - calibrator.setPreparatoryIterations(clp.getInteger(PREPITS_KEY)); - calibrator.setCenterRegression(clp.getBoolean(CENTERREGR_KEY)); - calibrator.setStatisticsFile(clp.getString(STATSFILE_KEY)); - calibrator.setProportionalAssignment(clp.getBoolean(PROPASSIGN_KEY)); - calibrator.setCountFirstLink(clp.getBoolean(CNTFIRSTLINK_KEY)); - calibrator.setCountLastLink(clp.getBoolean(CNTLASTLINK_KEY)); - calibrator.setDebugMode(clp.getBoolean(DEBUGMODE_KEY)); - calibrator.setBruteForce(clp.getBoolean(BRUTEFORCE_KEY)); - } - - /** - * Writes the measurement data into the calibrator. - * - * @param measFile - * the file that contains the measurements - */ - abstract protected void loadMeasurements(final C calibrator, - final String measFile); - - // ==================== the CHOICE stage ==================== - - protected void choice(final String[] args) throws IOException, - ClassNotFoundException { - final CommandLineParser clp = new CommandLineParser(); - prepareCommandLineParserCHOICE(clp); - clp.parse(args); - if (!clp.isComplete()) { - this.exitWithParameterList(clp, CHOICE); - } - final C calibrator = deserialize(); - prepareCalibratorCHOICE(calibrator, clp); - this.selectPlans(calibrator, clp); - this.serialize(calibrator); - } - - /** - * Extend this function to specify additional CHOICE parameters. - * - * @param clp - * provides access to the command line parameters - */ - protected void prepareCommandLineParserCHOICE(final CommandLineParser clp) { - clp.defineParameter(CHOICESETFILE_KEY, true, null, - "comma-separated list of files that contain the choice sets"); - clp.defineParameter(CHOICEFILE_KEY, true, null, - "fine where the choices are to be written"); - } - - /** - * Extend this function to feed additional CHOICE parameters into the - * Calibrator. - * - * @param calibrator - * the calibrator that is to be configured - * @param clp - * provides access to the command line parameters - */ - protected void prepareCalibratorCHOICE(final C calibrator, - final CommandLineParser clp) { - } - - protected void selectPlans(final C calibrator, final CommandLineParser clp) - throws IOException { - - final PopulationFileReader popFileReader = this.newPopulationReader( - calibrator, clp); - final ChoiceFileWriter choiceFileWriter = this - .newChoiceFileWriter(calibrator); - - // CHECK - - if (popFileReader == null) { - throw new NullPointerException("population file reader is null"); - } - if (choiceFileWriter == null) { - throw new NullPointerException("choice file writer is null"); - } - - // CONTINUE - - final String choiceFile = clp.getString(CHOICEFILE_KEY); - choiceFileWriter.open(choiceFile); - Logger.getLogger(this.getClass().getName()).info( - "creating choice file " + choiceFile); - for (String popFile : clp.getString(CHOICESETFILE_KEY).split( - FILENAME_SEPARATOR_REGEX)) { - if (popFile != null && !"".equals(popFile)) { - Logger.getLogger(this.getClass().getName()).info( - "loading choice set file " + popFile); - for (A agent : popFileReader.getPopulationSource(popFile)) { - this.beforeChoice(calibrator, agent); - final List

plans = agent.getPlans(); - final int planIndex = calibrator - .selectPlan(plans, agent.getPlanChoiceModel() - .getChoiceProbabilities(plans)); - final P plan = plans.get(planIndex); - this.afterChoice(calibrator, agent, plan); - choiceFileWriter.write(agent, plan); - } - } - } - choiceFileWriter.close(); - } - - protected abstract PopulationFileReader newPopulationReader( - final C calibrator, final CommandLineParser clp); - - protected abstract ChoiceFileWriter newChoiceFileWriter( - final C calibrator); - - protected void beforeChoice(final C calibrator, final A agent) { - } - - protected void afterChoice(final C calibrator, final A agent, final P plan) { - } - - // ==================== the UPDATE stage ==================== - - protected void update(final String[] args) throws IOException, - ClassNotFoundException { - final CommandLineParser clp = new CommandLineParser(); - prepareCommandLineParserUPDATE(clp); - clp.parse(args); - if (!clp.isComplete()) { - this.exitWithParameterList(clp, UPDATE); - } - final C calibrator = deserialize(); - prepareCalibratorUPDATE(calibrator, clp); - this.update(calibrator, clp); - this.serialize(calibrator); - } - - /** - * Extend this function to specify additional UPDATE parameters. - * - * @param clp - * provides access to the command line parameters - */ - protected void prepareCommandLineParserUPDATE(final CommandLineParser clp) { - clp.defineParameter(NETFILE_KEY, true, null, - "file that contains the network conditions"); - clp.defineParameter(FLOWFILE_KEY, false, null, - "file in which to write comparisons of measured " - + "and simulated flows"); - } - - /** - * Extend this function to specify additional UPDATE parameters. - * - * @param calibrator - * the calibrator that is to be configured - * @param clp - * provides access to the command line parameters - */ - protected void prepareCalibratorUPDATE(final C calibrator, - final CommandLineParser clp) { - } - - /** - * Implementations should notify the calibrator of the network conditions - * that resulted from the most recent choice set. - * - * @param netCondFile - * the file that contains the simulated network conditions - */ - abstract protected void update(final C calibrator, - final CommandLineParser clp); - - // -------------------- HELPERS -------------------- - - protected void serialize(final C calibrator) throws IOException { - Logger.getLogger(this.getClass().getName()).info( - "serializing to file " + SERIALIZED_FILE); - final FileOutputStream fos = new FileOutputStream(SERIALIZED_FILE); - final ObjectOutputStream out = new ObjectOutputStream(fos); - out.writeObject(calibrator); - out.flush(); - out.close(); - } - - @SuppressWarnings("unchecked") - // cast to C makes no trouble if the serialized file was written by "this" - protected C deserialize() throws IOException, ClassNotFoundException { - final FileInputStream fis = new FileInputStream(SERIALIZED_FILE); - final ObjectInputStream in = new ObjectInputStream(fis); - final C result = (C) in.readObject(); - Logger.getLogger(this.getClass().getName()).info( - "deserialized from file " + SERIALIZED_FILE); - return result; - } - - protected void exitWithGeneralHelp() { - System.err.println("Calibration: Unknown parameters. " - + "For help, call with single parameter " + INIT + ", " - + CHOICE + " or " + UPDATE + "."); - System.exit(-1); - } - - protected void exitWithParameterList(final CommandLineParser clp, - final String phase) { - System.err.println("Use the following command line parameters for " - + phase + " :"); - for (CommandLineParserElement element : clp.getElements()) { - System.err.println(element); - } - System.exit(-1); - } - - // -------------------- MAIN-FUNCTION -------------------- - - public void run(final String args[]) throws IOException, - ClassNotFoundException { - if (args == null || args.length == 0) { - this.exitWithGeneralHelp(); - } else { - final String action = args[0]; - final String[] params = new String[args.length - 1]; - System.arraycopy(args, 1, params, 0, args.length - 1); - if (INIT.equalsIgnoreCase(action)) { - init(params); - } else if (CHOICE.equalsIgnoreCase(action)) { - choice(params); - } else if (UPDATE.equalsIgnoreCase(action)) { - update(params); - } else { - this.exitWithGeneralHelp(); - } - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/PopulationFileReader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/PopulationFileReader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/PopulationFileReader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/PopulationFileReader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased; - -/** - * - * @author Gunnar Flötteröd - * - * @param ARRIVAL - * the agent type - */ -public interface PopulationFileReader> { - - public Iterable getPopulationSource(final String populationFile); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/AgentIterator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/AgentIterator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/AgentIterator.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/AgentIterator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased.xml; - -import java.util.Iterator; - -import floetteroed.cadyts.calibrators.filebased.Agent; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the agent type - */ -class AgentIterator> implements Iterator { - - // -------------------- MEMBER VARIABLES -------------------- - - private final PopulationHandler populationHandler; - - private A bufferedAgent = null; - - // -------------------- CONSTRUCTION -------------------- - - AgentIterator(final PopulationHandler populationHandler) { - - if (populationHandler == null) { - throw new IllegalArgumentException( - "populationHandler must not be null"); - } - - this.populationHandler = populationHandler; - this.bufferedAgent = this.populationHandler.getNextAgent(); - } - - // -------------------- IMPLEMENTATION OF Iterator -------------------- - - @Override - public boolean hasNext() { - return (this.bufferedAgent != null); - } - - @Override - public A next() { - final A result = this.bufferedAgent; - this.bufferedAgent = this.populationHandler.getNextAgent(); - return result; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/PopulationHandler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/PopulationHandler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/PopulationHandler.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/PopulationHandler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased.xml; - -import java.util.Iterator; -import java.util.logging.Logger; - -import org.xml.sax.helpers.DefaultHandler; - -import floetteroed.cadyts.calibrators.filebased.Agent; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the agent type - */ -public class PopulationHandler> extends DefaultHandler - implements Iterable { - - // -------------------- MEMBER VARIABLES -------------------- - - private A bufferedAgent = null; - - private boolean noData = true; - - // -------------------- CONSTRUCTION -------------------- - - public PopulationHandler() { - } - - // -------------------- SYNCHRONIZED BUFFER UPDATE -------------------- - - public synchronized A getNextAgent() { - Logger.getLogger(this.getClass().getName()).fine( - "waiting until there is a pending agent"); - while (this.noData) { - try { - wait(); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - this.noData = true; - notifyAll(); - Logger.getLogger(this.getClass().getName()).fine( - "returning pending agent"); - return this.bufferedAgent; - } - - protected synchronized void putNextAgent(final A agent) { - Logger.getLogger(this.getClass().getName()).fine( - "waiting until there is no pending agent (next agent is " - + agent + ")"); - while (!this.noData) { - try { - wait(); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - this.bufferedAgent = agent; - this.noData = false; - notifyAll(); - - if (agent != null) { - Logger.getLogger(this.getClass().getName()).fine( - "...received new pending agent"); - } else { - Logger.getLogger(this.getClass().getName()).fine( - "parser thread returns immediately because " - + "it wrote a null agent (end of file)"); - } - } - - // -------------------- IMPLEMENTATION OF Iterable -------------------- - - @Override - public Iterator iterator() { - return new AgentIterator(this); - } - - // -------------------- OVERRIDING OF DefaultHandler -------------------- - - /* - * Subclasses should override DefaultHandler with functions that use the - * data provided by the SAX parser to build instances of the agent type A. - * Once a complete agent is built, that agent should be registered by a call - * to putAgent(A). If there are no more agents, this should be indicated by - * a call to putAgent(null), like in the default implementation of - * endDocument() given below. This default implementation generates an - * Iterator over an empty population, independently of the contents of the - * xml file. - */ - - @Override - public void endDocument() { - this.putNextAgent(null); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/SAXParserThread.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/SAXParserThread.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/SAXParserThread.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/SAXParserThread.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased.xml; - -import java.util.logging.Logger; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.helpers.DefaultHandler; - -/** - * - * @author Gunnar Flötteröd - * - */ -class SAXParserThread extends Thread { - - // -------------------- SINGLETON ACCESS -------------------- - - private static SAXParserThread instance = null; - - static synchronized SAXParserThread newInstance(final String fileName, - final DefaultHandler handler) { - /* - * (1) make sure that the previous thread is done - */ - if (instance != null && instance.isAlive()) { - try { - Logger.getLogger(SAXParserThread.class.getName()).fine( - "waiting for previous parser thread to terminate"); - final long waitStart_ms = System.currentTimeMillis(); - instance.join(); - Logger.getLogger(SAXParserThread.class.getName()).fine( - "previous parser thread terminated after " - + (System.currentTimeMillis() - waitStart_ms) - + " ms"); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - /* - * (2) only now create a new thread - */ - instance = new SAXParserThread(fileName, handler); - return instance; - } - - // -------------------- CONSTANTS AND MEMBERS -------------------- - - private final String fileName; - - private final DefaultHandler handler; - - // -------------------- CONSTRUCTION -------------------- - - private SAXParserThread(final String fileName, final DefaultHandler handler) { - - // CHECK - - if (fileName == null) { - throw new IllegalArgumentException("fileName must not be null"); - } - if (handler == null) { - throw new IllegalArgumentException("handler must not be null"); - } - - // CONTINUE - - this.fileName = fileName; - this.handler = handler; - } - - // -------------------- OVERRIDING OF Thread -------------------- - - @Override - public void run() { - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - final SAXParser saxParser = factory.newSAXParser(); - saxParser.parse(this.fileName, this.handler); - } catch (Exception e) { - throw new RuntimeException(e); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/XMLPopulationFileReader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/XMLPopulationFileReader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/XMLPopulationFileReader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/filebased/xml/XMLPopulationFileReader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.filebased.xml; - -import floetteroed.cadyts.calibrators.filebased.Agent; -import floetteroed.cadyts.calibrators.filebased.PopulationFileReader; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the agent class - */ -public class XMLPopulationFileReader> implements - PopulationFileReader { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private PopulationHandler populationHandler = null; - - // -------------------- CONSTRUCTION -------------------- - - public XMLPopulationFileReader() { - } - - // -------------------- IMPLEMENTATION -------------------- - - public void setPopulationHandler( - final PopulationHandler populationHandler) { - this.populationHandler = populationHandler; - } - - public PopulationHandler getPopulationHandler() { - return this.populationHandler; - } - - // --------------- IMPLEMENATION OF PopulationFileReader --------------- - - @Override - public Iterable getPopulationSource(final String populationFile) { - final SAXParserThread parserThread = SAXParserThread.newInstance( - populationFile, this.populationHandler); - parserThread.start(); - return this.populationHandler; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSamplerFactory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSamplerFactory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSamplerFactory.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSamplerFactory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.sampling; - -import java.io.Serializable; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public interface ChoiceSamplerFactory extends Serializable { - - public ChoiceSampler newSampler(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSampler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSampler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSampler.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/ChoiceSampler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.sampling; - -import floetteroed.cadyts.demand.Plan; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public interface ChoiceSampler { - - /** - * Whenever an agent is about to make a choice, draw plans according to this - * agent's behavioral model (i.e., this agents prior choice distribution) - * until this function returns an "accept". The first accepted plan can be - * considered a draw from the agent's behavioral posterior distribution. - * It is of greatest importance that the - * agent does indeed implement the first accepted plan! - * - * @param plan - * the plan under consideration, must be a draw from the - * behavioral prior distribution - * @return if the plan is accepted - */ - public boolean isAccepted(final Plan plan); - - /** - * Enforces that the next proposed plan is accepted. - */ - public void enforceNextAccept(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSamplerFactory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSamplerFactory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSamplerFactory.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSamplerFactory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.sampling; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public class RecursiveSamplerFactory implements ChoiceSamplerFactory { - - private static final long serialVersionUID = 1L; - - private final SamplingCalibrator calibrator; - - public RecursiveSamplerFactory(final SamplingCalibrator calibrator) { - this.calibrator = calibrator; - } - - @Override - public ChoiceSampler newSampler() { - return new RecursiveSampler(this.calibrator); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSampler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSampler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSampler.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/RecursiveSampler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,168 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.sampling; - -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Logger; - -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.demand.PlanStep; -import floetteroed.utilities.math.PolynomialTrendFilter; - -/** - * Implements a scaling of the prior plan choice distribution that is based on - * sampling importance resampling. - * - * TODO: Currently, the linear trend filter is only updated _after_ an accept. - * The precision would improve if the update occurred even during the rejects! - * - * @author Gunnar Flötteröd - * - */ -public class RecursiveSampler implements ChoiceSampler { - - // -------------------- MEMBERS -------------------- - - private final SamplingCalibrator calibrator; - - private final PolynomialTrendFilter likelihoodTrendFilter; - - // runtime parameters - - private final Map>, Double> plan2linEffect = new HashMap>, Double>(); - - private int draws = 0; - - private double likelihoodSum = 0; - - private boolean acceptNext = false; - - // -------------------- CONSTRUCTION AND INITIALIZATION -------------------- - - public RecursiveSampler(final SamplingCalibrator calibrator) { - // CHECK - if (calibrator == null) - throw new IllegalArgumentException("calibrator is null"); - // CONTINUE - this.calibrator = calibrator; - this.likelihoodTrendFilter = new PolynomialTrendFilter(calibrator - .getRegressionInertia(), 1); - this.init(); - } - - private void init() { - this.likelihoodTrendFilter.setLambda(this.calibrator - .getRegressionInertia()); - this.plan2linEffect.clear(); - this.draws = 0; - this.likelihoodSum = 0; - this.acceptNext = false; - } - - // -------------------- BASIC FUNCTIONALITY -------------------- - - public double getPredictedLikelihood() { - return this.likelihoodTrendFilter.predict(1); - } - - // for testing purposes - PolynomialTrendFilter getLikelihoodTrendFilter() { - return this.likelihoodTrendFilter; - } - - // -------------------- ACCEPT/REJECT FUNCTIONALITY -------------------- - - private double likelihood(final Plan plan) { - Double linEffect = this.plan2linEffect.get(plan); - if (linEffect == null) { - linEffect = this.calibrator.calcLinearPlanEffect(plan); - this.plan2linEffect.put(plan, linEffect); - } - return Math.exp(linEffect); - } - - @Override - public void enforceNextAccept() { - this.acceptNext = true; - } - - /** - * Whenever an agent is about to make a choice, draw plans according to this - * agent's behavioral model (i.e., this agents prior choice distribution) - * until this function returns an "accept". The first accepted plan can be - * considered a draw from the agent's behavioral posterior distribution. - * It is of greatest importance that the - * agent does indeed implement the first accepted plan! - * - * @param plan - * the plan under consideration, must be a draw from the - * behavioral prior distribution - * @return if the plan is accepted - */ - @Override - public boolean isAccepted(final Plan plan) { - - this.draws++; - final double likelihood = this.likelihood(plan); - final boolean infiniteLikelihood = Double.isInfinite(likelihood); - if (!infiniteLikelihood) { - this.likelihoodSum += likelihood; - } - - final boolean isAccepted; - if (this.acceptNext) { - isAccepted = true; - } else { - if (infiniteLikelihood) { - isAccepted = true; - Logger.getLogger(this.getClass().getName()).warning( - "infinite likelihood numerator"); - } else { - final double pAccept = likelihood - / (likelihood + (this.calibrator.getMaxDraws() - this.draws) - * this.likelihoodTrendFilter.predict(1)); - isAccepted = (this.calibrator.getRandom().nextDouble() < pAccept); - } - } - - if (isAccepted || (this.calibrator.getMaxDraws() == this.draws)) { - if (!isAccepted) { - Logger.getLogger(this.getClass().getName()).warning( - "no accept after maximum number of draws"); - } - if (infiniteLikelihood) { - this.draws--; - } - if (this.draws > 0) { - this.likelihoodTrendFilter.add(this.likelihoodSum / this.draws); - } - this.calibrator.addToDemand(plan); - this.init(); - } - - return isAccepted; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/SamplingCalibrator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/SamplingCalibrator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/SamplingCalibrator.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/sampling/SamplingCalibrator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators.sampling; - -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.Calibrator; - -/** - * - * A version of the Calibrator class for sampling-based plan selection. Does not - * assume the true plan selection probabilities to be known. - * - * @param L - * the network link type - * - * @author Gunnar Flötteröd - * - */ -public class SamplingCalibrator extends Calibrator { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - public static final int DEFAULT_MAX_DRAWS = 20; - - // -------------------- MEMBERS -------------------- - - private final Map> samplers = new HashMap>(); - - private ChoiceSamplerFactory choiceSamplerFactory; - - private int maxDraws = DEFAULT_MAX_DRAWS; - - // -------------------- CONSTRUCTION -------------------- - - public SamplingCalibrator(final String logFile, final Long randomSeed, - final int timeBinSize_s) { - - super(logFile, randomSeed, timeBinSize_s); - this.choiceSamplerFactory = new RecursiveSamplerFactory(this); - - Logger.getLogger(this.getClass().getName()).info( - "default maxDraws is " + this.maxDraws); - Logger.getLogger(this.getClass().getName()).info( - "default choiceSamplerFactory is " - + RecursiveSamplerFactory.class.getSimpleName()); - } - - // -------------------- SIMPLE FUNCTIONALITY -------------------- - - /** - * @param maxDraws - * the maximum number of draws that is requested from a - * replanning agent until a plan is accepted. Must be at least 3. - */ - public void setMaxDraws(final int maxDraws) { - if (maxDraws < 2) { - throw new IllegalArgumentException( - "maximum number of draws must be at least 2"); - } - this.maxDraws = maxDraws; - Logger.getLogger(this.getClass().getName()).info( - "set maxDraws to " + this.maxDraws); - } - - public int getMaxDraws() { - return this.maxDraws; - } - - public void setChoiceSamplerFactory( - final ChoiceSamplerFactory choiceSamplerFactory) { - if (choiceSamplerFactory == null) { - throw new IllegalArgumentException( - "choiceSamplerFactory must not be null"); - } - this.choiceSamplerFactory = choiceSamplerFactory; - Logger.getLogger(this.getClass().getName()).info( - "set choiceSamplerFactory to " - + this.choiceSamplerFactory.getClass().getSimpleName()); - } - - public ChoiceSamplerFactory getChoiceSamplerFactory() { - return this.choiceSamplerFactory; - } - - // -------------------- CALIBRATION LOGIC INTERFACE -------------------- - - /** - * @param agent - * the agent for which replanning is to be conducted - */ - public ChoiceSampler getSampler(final Object agent) { - - // CHECK - - if (agent == null) - throw new IllegalArgumentException( - "reference agent must not be null;"); - - // CONTINUE - - ChoiceSampler sampler = this.samplers.get(agent); - if (sampler == null) { - sampler = this.getChoiceSamplerFactory().newSampler(); - this.samplers.put(agent, sampler); - } - if (this.getIteration() < this.getPreparatoryIterations()) { - sampler.enforceNextAccept(); - } - return sampler; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StatisticsTracker.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StatisticsTracker.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StatisticsTracker.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StatisticsTracker.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators; - -import java.io.BufferedWriter; -import java.io.FileWriter; -import java.io.IOException; -import java.io.Serializable; -import java.util.logging.Logger; - -import floetteroed.utilities.math.BasicStatistics; - - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class StatisticsTracker implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private final String fileName; - - // -------------------- MEMBER VARIABLES -------------------- - - private double logLikelihood = 0; - - private boolean logLikelihoodRegistered = false; - - private double logLikelihoodPredErr = 0; - - private boolean logLikelihoodPredErrRegistered = false; - - private double p2pLogLikelihood = 0; - - private boolean p2pLogLikelihoodRegistered = false; - - private final BasicStatistics linkLambda = new BasicStatistics(); - - private final BasicStatistics planLambda = new BasicStatistics(); - - private long choices = 0; - - // -------------------- CONSTRUCTION AND INITIALIZATION -------------------- - - public StatisticsTracker(final String fileName) { - this.fileName = fileName; - this.clear(); - - if (this.fileName != null) { - try { - final BufferedWriter writer = new BufferedWriter( - new FileWriter(this.fileName, false)); - writer.write("count-ll\t"); - writer.write("count-ll-pred-err\t"); - writer.write("p2p-ll\t"); - writer.write("total-ll\t"); - writer.write("link-lambda-avg\t"); - writer.write("link-lambda-stddev\t"); - writer.write("link-lambda-min\t"); - writer.write("link-lambda-max\t"); - writer.write("plan-lambda-avg\t"); - writer.write("plan-lambda-stddev\t"); - writer.write("plan-lambda-min\t"); - writer.write("plan-lambda-max\t"); - writer.write("replan-count"); - writer.newLine(); - writer.flush(); - writer.close(); - } catch (IOException e) { - Logger.getLogger(this.getClass().getName()).warning( - "unable to create file: " + this.fileName); - } - } - } - - public void clear() { - this.logLikelihood = 0; - this.logLikelihoodRegistered = false; - this.logLikelihoodPredErr = 0; - this.logLikelihoodPredErrRegistered = false; - this.p2pLogLikelihood = 0; - this.p2pLogLikelihoodRegistered = false; - this.linkLambda.clear(); - this.planLambda.clear(); - this.choices = 0; - } - - // -------------------- SETTERS & GETTERS -------------------- - - public String getFileName() { - return this.fileName; - } - - // -------------------- DATA REGISTRATION -------------------- - - public void registerSingleLinkLL(final double val) { - this.logLikelihood = val; - this.logLikelihoodRegistered = true; - } - - public void registerSingleLinkLLPredError(final double val) { - this.logLikelihoodPredErr = val; - this.logLikelihoodPredErrRegistered = true; - } - - public void registerMultiLinkLL(final double val) { - this.p2pLogLikelihood = val; - this.p2pLogLikelihoodRegistered = true; - } - - public void registerLinkLambda(final double val) { - this.linkLambda.add(val); - } - - public void registerPlanLambda(final double val) { - this.planLambda.add(val); - } - - public void registerChoice() { - this.choices++; - } - - // -------------------- FILE WRITING -------------------- - - public void writeToFile() { - - if (this.fileName == null) { - return; - } - - try { - final BufferedWriter writer = new BufferedWriter(new FileWriter( - this.fileName, true)); - writer.write(this.logLikelihoodRegistered ? Double - .toString(this.logLikelihood) : "--"); - writer.write("\t"); - writer.write(this.logLikelihoodPredErrRegistered ? Double - .toString(this.logLikelihoodPredErr) : "--"); - writer.write("\t"); - writer.write(this.p2pLogLikelihoodRegistered ? Double - .toString(this.p2pLogLikelihood) : "--"); - writer.write("\t"); - - if (this.logLikelihoodRegistered || this.p2pLogLikelihoodRegistered) { - double totalLL = 0; - if (this.logLikelihoodRegistered) { - totalLL += this.logLikelihood; - } - if (this.p2pLogLikelihoodRegistered) { - totalLL += this.p2pLogLikelihood; - } - writer.write(Double.toString(totalLL)); - } else { - writer.write("--"); - } - writer.write("\t"); - - if (this.linkLambda.size() > 0) { - writer.write(Double.toString(this.linkLambda.getAvg())); - writer.write("\t"); - writer.write(Double.toString(this.linkLambda.getStddev())); - writer.write("\t"); - writer.write(Double.toString(this.linkLambda.getMin())); - writer.write("\t"); - writer.write(Double.toString(this.linkLambda.getMax())); - } else { - writer.write("--\t--\t--\t--"); - } - writer.write("\t"); - if (this.planLambda.size() > 0) { - writer.write(Double.toString(this.planLambda.getAvg())); - writer.write("\t"); - writer.write(Double.toString(this.planLambda.getStddev())); - writer.write("\t"); - writer.write(Double.toString(this.planLambda.getMin())); - writer.write("\t"); - writer.write(Double.toString(this.planLambda.getMax())); - } else { - writer.write("--\t--\t--\t--"); - } - writer.write("\t"); - writer.write(Long.toString(this.choices)); - writer.newLine(); - writer.flush(); - writer.close(); - } catch (IOException e) { - Logger.getLogger(this.getClass().getName()).warning( - "unable to append data to file: " + this.fileName); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StreamFlushHandler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StreamFlushHandler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StreamFlushHandler.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/StreamFlushHandler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators; - -import java.io.OutputStream; -import java.util.logging.Formatter; -import java.util.logging.LogRecord; -import java.util.logging.StreamHandler; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class StreamFlushHandler extends StreamHandler { - - // -------------------- CONSTRUCTION -------------------- - - public StreamFlushHandler(final OutputStream out, final Formatter formatter) { - super(out, formatter); - } - - // -------------------- OVERRIDING OF StreamHandler -------------------- - - @Override - public void publish(final LogRecord record) { - super.publish(record); - this.flush(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/TimedElement.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/TimedElement.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/TimedElement.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/calibrators/TimedElement.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.calibrators; - -import java.io.Serializable; - -import floetteroed.utilities.Units; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class TimedElement implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - public static final int MIN_START_TIME_S = 0; - - public static final int MAX_END_TIME_S = (int) Units.S_PER_D; - - private final int startTime_s; - - private final int endTime_s; - - // -------------------- CONSTRUCTION -------------------- - - public TimedElement(final int startTime_s, final int endTime_s) { - if (startTime_s >= endTime_s) { - throw new IllegalArgumentException("start time " + startTime_s - + " s is not strictly before end time " + endTime_s + " s"); - } - if (startTime_s < MIN_START_TIME_S) { - throw new IllegalArgumentException( - "smallest allowed measurement start time is " - + MIN_START_TIME_S + " s"); - } - if (endTime_s > MAX_END_TIME_S) { - throw new IllegalArgumentException( - "largest allowed measurement end time is " + MAX_END_TIME_S - + " s"); - } - this.startTime_s = startTime_s; - this.endTime_s = endTime_s; - } - - // -------------------- GETTERS -------------------- - - public int getStartTime_s() { - return this.startTime_s; - } - - public int getEndTime_s() { - return this.endTime_s; - } - - public int getDuration_s() { - return this.getEndTime_s() - this.getStartTime_s(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/BasicPlan.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/BasicPlan.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/BasicPlan.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/BasicPlan.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.logging.Logger; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public class BasicPlan implements Plan { - - // -------------------- MEMBERS -------------------- - - private final ArrayList> planSteps = new ArrayList>(); - - // -------------------- CONSTRUCTION -------------------- - - public BasicPlan() { - } - - // -------------------- CONTENT MODIFICATIONS -------------------- - - void addStep(final PlanStep step) { - if (step == null) { - throw new IllegalArgumentException("added step must not be null"); - } - this.planSteps.add(step); - } - - void removeLastStep() { - if (this.planSteps.size() > 0) { - this.planSteps.remove(this.planSteps.size() - 1); - } else { - Logger.getLogger(this.getClass().getName()).warning( - "trying to remove last step from empty plan"); - } - } - - protected void trim() { - this.planSteps.trimToSize(); - } - - // -------------------- CONTENT ACCESS -------------------- - - public int size() { - return this.planSteps.size(); - } - - public PlanStep getStep(int i) { - return this.planSteps.get(i); - } - - public String toString() { - return this.planSteps.toString(); - } - - // -------------------- IMPLEMENTATION OF Iterable -------------------- - - public Iterator> iterator() { - return this.planSteps.iterator(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Demand.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Demand.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Demand.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Demand.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - -import floetteroed.utilities.DynamicData; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public class Demand extends DynamicData { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- CONSTRUCTION -------------------- - - public Demand(int startTime_s, int timePeriod_s, int binCnt) { - - super(startTime_s, timePeriod_s, binCnt); - - if (startTime_s < 0) { - throw new IllegalArgumentException( - "start time must not be negative"); - } - } - - // -------------------- IMPLEMENTATION -------------------- - - public boolean add(final PlanStep planStep) { - final int bin = bin(planStep.getEntryTime_s()); - if (bin < 0 || bin >= this.getBinCnt()) { - return false; - } - this.add(planStep.getLink(), bin, 1.0); - return true; - } - - // TODO NEW; TODO remove code duplication - public boolean add(final PlanStep planStep, final double weight) { - final int bin = bin(planStep.getEntryTime_s()); - if (bin < 0 || bin >= this.getBinCnt()) { - return false; - } - this.add(planStep.getLink(), bin, weight); - return true; - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/ODRelation.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/ODRelation.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/ODRelation.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/ODRelation.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - -import java.io.Serializable; - -import floetteroed.utilities.Tuple; - - - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the zone type - */ -public class ODRelation extends Tuple implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- CONSTRUCTION -------------------- - - public ODRelation(final Z fromTAZ, final Z toTAZ) { - super(fromTAZ, toTAZ); - } - - // -------------------- CONTENT ACCESS -------------------- - - public Z getFromTAZ() { - return super.getA(); - } - - public Z getToTAZ() { - return super.getB(); - } - - // -------------------- OVERRIDING OF Object-------------------- - - @Override - public String toString() { - return this.getClass().getSimpleName() + "(" + this.getFromTAZ() + ", " - + this.getToTAZ() + ")"; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanBuilder.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanBuilder.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanBuilder.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanBuilder.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - -import floetteroed.cadyts.calibrators.Calibrator; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public class PlanBuilder { - - // -------------------- MEMBERS -------------------- - - private final boolean countFirstLink; - - private final boolean countLastLink; - - private BasicPlan result; - - // -------------------- CONSTRUCTION -------------------- - - public PlanBuilder(final boolean countFirstLink, final boolean countLastLink) { - this.countFirstLink = countFirstLink; - this.countLastLink = countLastLink; - reset(); - } - - public PlanBuilder() { - this(Calibrator.DEFAULT_COUNT_FIRST_LINK, Calibrator.DEFAULT_COUNT_LAST_LINK); - } - - // -------------------- PLAN BUILDING PROCEDURE -------------------- - - public void reset() { - this.result = new BasicPlan(); - } - - public void reset(final BasicPlan result) { - this.result = result; - } - - public void addEntry(L entryLink, int time_s) { - if (this.countFirstLink) { - this.result.addStep(new PlanStep(entryLink, time_s)); - } - } - - public void addTurn(L toLink, int time_s) { - this.result.addStep(new PlanStep(toLink, time_s)); - } - - public void addExit(int time_s) { - if (!this.countLastLink && this.result.size() > 0) { - this.result.removeLastStep(); - } - } - - public Plan getResult() { - this.result.trim(); - return this.result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceDistribution.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceDistribution.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceDistribution.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceDistribution.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - -import java.util.List; - -import floetteroed.utilities.math.Vector; - - - -/** - * - * @author Gunnar Flötteröd - * - * @param

- * the plan type - */ -public class PlanChoiceDistribution

> implements - PlanChoiceModel

{ - - // -------------------- MEMBERS -------------------- - - private Vector choiceProbs = null; - - // -------------------- CONSTRUCTION -------------------- - - public PlanChoiceDistribution() { - } - - // -------------------- SETTERS -------------------- - - public void setChoiceProbabilities(final Vector choiceProbs) { - this.choiceProbs = choiceProbs; - } - - public void addChoiceProbability(final double choiceProb) { - if (choiceProb < 0 || choiceProb > 1) { - throw new IllegalArgumentException( - "choice probability must be in [0,1]"); - } - if (this.choiceProbs == null) { - this.choiceProbs = new Vector(1); - } else { - this.choiceProbs = this.choiceProbs.copyEnlarged(1); - } - this.choiceProbs.set(this.choiceProbs.size() - 1, choiceProb); - } - - // --------------- IMPLEMENTATION OF PlanChoiceModel --------------- - - @Override - public Vector getChoiceProbabilities(final List plans) { - return this.choiceProbs; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceModel.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceModel.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceModel.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanChoiceModel.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - -import java.util.List; - -import floetteroed.utilities.math.Vector; - - - -/** - * - * @author Gunnar Flötteröd - * - * @param

- * the plan type - */ -public interface PlanChoiceModel

> { - - public Vector getChoiceProbabilities(final List plans); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Plan.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Plan.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Plan.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/Plan.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public interface Plan extends Iterable> { - - public int size(); - - public PlanStep getStep(int i); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanStep.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanStep.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanStep.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/demand/PlanStep.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.demand; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public class PlanStep { - - // -------------------- MEMBERS -------------------- - - private final L link; - - private final int entryTime_s; - - // -------------------- CONSTRUCTION -------------------- - - PlanStep(final L link, final int entryTime_s) { - if (link == null) { - throw new IllegalArgumentException("link must not be null"); - } - if (entryTime_s < 0) { - throw new IllegalArgumentException( - "entry time must not be negative"); - } - this.link = link; - this.entryTime_s = entryTime_s; - } - - // -------------------- CONTENT ACCESS -------------------- - - public L getLink() { - return this.link; - } - - public int getEntryTime_s() { - return this.entryTime_s; - } - - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.getClass().getSimpleName()); - result.append("("); - result.append(this.link); - result.append(", "); - result.append(this.entryTime_s); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.defaults; - -import static floetteroed.utilities.Time.secFromStr; -import static java.lang.Double.parseDouble; -import static java.lang.Integer.parseInt; - -import java.util.logging.Logger; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.Attributes; -import org.xml.sax.helpers.DefaultHandler; - -import floetteroed.cadyts.calibrators.Calibrator; -import floetteroed.cadyts.measurements.MultiLinkMeasurement; -import floetteroed.cadyts.measurements.SingleLinkMeasurement; -import floetteroed.utilities.Time; - -/** - * - * @author Gunnar Flötteröd - * - */ -public abstract class BasicMeasurementLoader extends DefaultHandler { - - // -------------------- CONSTANTS -------------------- - - private static final String SINGLE_LINK_ELEMENT = "singlelink"; - - private static final String LINK_ATTRIBUTE = "link"; - - private static final String START_TIME_ATTRIBUTE = "start"; - - private static final String END_TIME_ATTRIBUTE = "end"; - - private static final String VALUE_ATTRIBUTE = "value"; - - private static final String STDDEV_ATTRIBUTE = "stddev"; - - private static final String TYPE_ATTRIBUTE = "type"; - - private static final String MULTI_LINK_ELEMENT = "multilink"; - - private static final String DETECTIONRATE_ATTRIBUTE = "detectionrate"; - - private static final String OBSERVATION_ELEMENT = "observation"; - - // -------------------- MEMBERS -------------------- - - private final Calibrator calibrator; - - private MultiLinkMeasurement p2pCrispMeas = null; - - // -------------------- CONSTRUCTION -------------------- - - public BasicMeasurementLoader(final Calibrator calibrator) { - if (calibrator == null) { - throw new IllegalArgumentException("calibrator is null"); - } - this.calibrator = calibrator; - } - - // -------------------- IMPLEMENTATION -------------------- - - public void load(final String... measurementFileNames) { - - if (measurementFileNames == null || measurementFileNames.length == 0) { - Logger.getLogger(this.getClass().getName()).info( - "no measurement files specified"); - return; - } - - for (String fileName : measurementFileNames) { - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - final SAXParser saxParser = factory.newSAXParser(); - saxParser.parse(fileName, this); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - - // --------------- OVERRIDING OF DefaultHandler --------------- - - @Override - public void startElement(String namespaceURI, String sName, String qName, - Attributes attrs) { - if (SINGLE_LINK_ELEMENT.equals(qName)) { - final SingleLinkMeasurement.TYPE type = SingleLinkMeasurement.TYPE - .valueOf(attrs.getValue(TYPE_ATTRIBUTE)); - if (SingleLinkMeasurement.TYPE.FLOW_VEH_H.equals(type) - || SingleLinkMeasurement.TYPE.COUNT_VEH.equals(type)) { - final L link = this.label2link(attrs.getValue(LINK_ATTRIBUTE)); - final double value = Double.parseDouble(attrs - .getValue(VALUE_ATTRIBUTE)); - final int start_s = Time.secFromStr(attrs - .getValue(START_TIME_ATTRIBUTE)); - final int end_s = Time.secFromStr(attrs - .getValue(END_TIME_ATTRIBUTE)); - final String stddevString = attrs.getValue(STDDEV_ATTRIBUTE); - if (stddevString == null) { - this.calibrator.addMeasurement(link, start_s, end_s, value, - type); - } else { - final double stddev = Double.parseDouble(stddevString); - this.calibrator.addMeasurement(link, start_s, end_s, value, - stddev, type); - } - } else { - Logger.getLogger(this.getClass().getName()).warning( - "skipping \"onlink\" measurement type: " + type); - } - } else if (MULTI_LINK_ELEMENT.equals(qName)) { - final int value = parseInt(attrs.getValue(VALUE_ATTRIBUTE)); - final double detectionRate = parseDouble(attrs - .getValue(DETECTIONRATE_ATTRIBUTE)); - this.p2pCrispMeas = new MultiLinkMeasurement(value, - detectionRate); - } else if (OBSERVATION_ELEMENT.equals(qName)) { - final L link = this.label2link(attrs.getValue(LINK_ATTRIBUTE)); - final int start_s = secFromStr(attrs.getValue(START_TIME_ATTRIBUTE)); - final int end_s = secFromStr(attrs.getValue(END_TIME_ATTRIBUTE)); - this.p2pCrispMeas.addObservation(link, start_s, end_s); - } - } - - @Override - public void endElement(String uri, String localName, String qName) { - if (MULTI_LINK_ELEMENT.equals(qName)) { - this.calibrator.addMeasurement(this.p2pCrispMeas); - this.p2pCrispMeas = null; - } - } - - // -------------------- INTERFACE DEFINITION -------------------- - - protected abstract L label2link(final String label); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoaderStringLinks.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoaderStringLinks.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoaderStringLinks.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/defaults/BasicMeasurementLoaderStringLinks.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.defaults; - -import floetteroed.cadyts.calibrators.Calibrator; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class BasicMeasurementLoaderStringLinks extends - BasicMeasurementLoader { - - // -------------------- CONSTRUCTION -------------------- - - public BasicMeasurementLoaderStringLinks(final Calibrator calibrator) { - super(calibrator); - } - - // --------------- IMPLEMENTATION OF BasicMeasurementLoader --------------- - - @Override - protected String label2link(String label) { - return label; - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaAgent.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaAgent.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaAgent.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaAgent.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import floetteroed.cadyts.calibrators.filebased.Agent; -import floetteroed.cadyts.demand.PlanChoiceModel; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaAgent extends Agent> { - - // -------------------- CONSTANTS -------------------- - - private final DraculaODRelation od; - - private final int dptTime_s; - - private final String[] misc; - - // -------------------- CONSTRUCTION -------------------- - - DraculaAgent(final long id, - final PlanChoiceModel planChoiceModel, - final DraculaODRelation od, final int dptTime_s, final String[] misc) { - - super(id, planChoiceModel); - - if (od == null) { - throw new IllegalArgumentException("od is null"); - } - if (dptTime_s < 0) { - throw new IllegalArgumentException("departure time " + dptTime_s - + " s is negative"); - } - this.od = od; - this.dptTime_s = dptTime_s; - this.misc = misc; - } - - // -------------------- GETTERS & SETTERS -------------------- - - DraculaODRelation getOD() { - return this.od; - } - - int getDepartureTime_s() { - return this.dptTime_s; - } - - String[] getMisc() { - return misc; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.getClass().getSimpleName()); - result.append("(id = "); - result.append(this.getId()); - result.append(", od = "); - result.append(this.getOD()); - result.append(", dptTime_s = "); - result.append(this.getDepartureTime_s()); - result.append(", plans = "); - result.append(this.getPlans()); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaCalibrator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaCalibrator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaCalibrator.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaCalibrator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,219 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.analytical.AnalyticalCalibrator; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaCalibrator extends AnalyticalCalibrator { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - static final int DEFAULT_WARMUP_S = 0; - - static final double DEFAULT_BETA_TT_S = 0.0; - - static final int DEFAULT_DEMAND_PERIODS = 1; - - static final String DEFAULT_OD_PREFIX = null; - - static final double DEFAULT_DEMAND_SCALE = 1.0; - - static final String DEFAULT_FLOW_PREFIX = null; - - static final String DEFAULT_TRAVEL_TIME_PREFIX = null; - - // -------------------- MEMBERS -------------------- - - private int warmUp_s = DEFAULT_WARMUP_S; - - private double betaTT_s = DEFAULT_BETA_TT_S; - - private int demandPeriods = DEFAULT_DEMAND_PERIODS; - - private String odPrefix = DEFAULT_OD_PREFIX; - - private double demandScale = DEFAULT_DEMAND_SCALE; - - private String flowPrefix = DEFAULT_FLOW_PREFIX; - - private String travelTimePrefix = DEFAULT_TRAVEL_TIME_PREFIX; - - private DraculaRoutes routes = null; - - private DraculaTravelTimes travelTimes = null; - - private final Map minTravelTime_s = new LinkedHashMap(); - - // -------------------- CONSTRUCTION -------------------- - - DraculaCalibrator(final String logFile, final Long randomSeed, - final int timeBinSize_s) { - - super(logFile, randomSeed, timeBinSize_s); - - Logger.getLogger(this.getClass().getName()).info( - "default warmup_s is " + this.warmUp_s); - Logger.getLogger(this.getClass().getName()).info( - "default betaTT_s is " + this.betaTT_s); - Logger.getLogger(this.getClass().getName()).info( - "default demandPeriods is " + this.demandPeriods); - Logger.getLogger(this.getClass().getName()).info( - "default odPrefix is " + this.odPrefix); - Logger.getLogger(this.getClass().getName()).info( - "default demandScale is " + this.demandScale); - Logger.getLogger(this.getClass().getName()).info( - "default flowPrefix is " + this.flowPrefix); - Logger.getLogger(this.getClass().getName()).info( - "default travelTimePrefix is " + this.travelTimePrefix); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - void setWarmUp_s(final int warmUp_s) { - if (warmUp_s < 0) { - throw new IllegalArgumentException("warmup_s " + warmUp_s - + " is negative"); - } - this.warmUp_s = warmUp_s; - Logger.getLogger(this.getClass().getName()).info( - "set warmUp_s to " + this.warmUp_s); - } - - int getWarmUp_s() { - return this.warmUp_s; - } - - void setBetaTT_s(final double betaTT_s) { - this.betaTT_s = betaTT_s; - Logger.getLogger(this.getClass().getName()).info( - "set betaTT_s to " + this.betaTT_s); - } - - double getBetaTT_s() { - return this.betaTT_s; - } - - void setDemandPeriods(final int demandPeriods) { - if (demandPeriods < 1) { - throw new IllegalArgumentException("demandPeriods " + demandPeriods - + " is not strictly positive"); - } - this.demandPeriods = demandPeriods; - Logger.getLogger(this.getClass().getName()).info( - "set demandPeriods to " + this.demandPeriods); - } - - int getDemandPeriods() { - return this.demandPeriods; - } - - void setOdPrefix(final String odPrefix) { - this.odPrefix = odPrefix; - Logger.getLogger(this.getClass().getName()).info( - "set odPrefix to " + this.odPrefix); - } - - String getOdPrefix() { - return this.odPrefix; - } - - void setDemandScale(final double demandScale) { - if (demandScale < 1.0) { - throw new IllegalArgumentException( - "demandScale must not be smaller than one"); - } - this.demandScale = demandScale; - Logger.getLogger(this.getClass().getName()).info( - "set demandScale to " + this.demandScale); - } - - double getDemandScale() { - return this.demandScale; - } - - void setRoutes(final DraculaRoutes routes) { - if (routes == null) { - throw new IllegalArgumentException("routes are null"); - } - if (this.routes != null) { - throw new UnsupportedOperationException( - "routes have already been set"); - } - this.routes = routes; - Logger.getLogger(this.getClass().getName()).info("set routes"); - } - - DraculaRoutes getRoutes() { - return this.routes; - } - - void setTravelTimes(final DraculaTravelTimes travelTimes) { - if (travelTimes == null) { - throw new IllegalArgumentException("travel times are null"); - } - this.travelTimes = travelTimes; - Logger.getLogger(this.getClass().getName()).info("set travelTimes"); - } - - DraculaTravelTimes getTravelTimes() { - return this.travelTimes; - } - - void setFlowPrefix(final String flowPrefix) { - this.flowPrefix = flowPrefix; - Logger.getLogger(this.getClass().getName()).info( - "set flowPrefix to " + this.flowPrefix); - } - - String getFlowPrefix() { - return this.flowPrefix; - } - - void setTravelTimePrefix(final String travelTimePrefix) { - this.travelTimePrefix = travelTimePrefix; - Logger.getLogger(this.getClass().getName()).info( - "set travelTimePrefix to " + this.travelTimePrefix); - } - - String getTravelTimePrefix() { - return this.travelTimePrefix; - } - - Map getMinTravelTimes() { - return this.minTravelTime_s; - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaChoiceWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaChoiceWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaChoiceWriter.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaChoiceWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,154 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.filebased.ChoiceFileWriter; - -/** - * - * Writes a new .VEH file. - * - * @author Gunnar Flötteröd - * - */ -class DraculaChoiceWriter implements - ChoiceFileWriter { - - // -------------------- MEMBERS -------------------- - - private final DraculaCalibrator calibrator; - - private String choiceFile; - - private PrintWriter writer = null; - - private long agentCnt = 0; - - // -------------------- CONSTRUCTION -------------------- - - DraculaChoiceWriter(final DraculaCalibrator calibrator) { - if (calibrator == null) { - throw new IllegalArgumentException("calibrator is null"); - } - this.calibrator = calibrator; - } - - // --------------- IMPLEMENTATION OF ChoiceFileWriter --------------- - - private String tmpFileName() { - return this.choiceFile + ".TMP"; - } - - @Override - public void open(String choiceFile) throws IOException { - this.choiceFile = choiceFile; - this.writer = new PrintWriter(this.tmpFileName()); - this.agentCnt = 0; - } - - @Override - public void write(DraculaAgent agent, DraculaPlan plan) throws IOException { - this.writer.print(agent.getId()); - this.writer.print("\t"); - // !!! no warmup in .veh file !!! - this.writer.print(agent.getDepartureTime_s() - - this.calibrator.getWarmUp_s()); - this.writer.print("\t"); - this.writer.print(plan.getRoute().getId()); - if (agent.getMisc() != null) { - for (String misc : agent.getMisc()) { - this.writer.print("\t"); - this.writer.print(misc); - } - } - this.writer.println(); - this.agentCnt++; - } - - @Override - public void close() throws IOException { - this.writer.flush(); - this.writer.close(); - - final BufferedReader reader = new BufferedReader(new FileReader(this - .tmpFileName())); - this.writer = new PrintWriter(this.choiceFile); - this.writer.println(this.agentCnt); - String line; - while ((line = reader.readLine()) != null) { - this.writer.println(line); - } - this.writer.flush(); - this.writer.close(); - reader.close(); - - final boolean tmpDel = (new File(this.tmpFileName())).delete(); - if (!tmpDel) { - Logger.getLogger(this.getClass().getName()).warning( - "could not delete temporary file " + this.tmpFileName()); - } - } - - // -------------------- MAIN FUNCTION, only for testing -------------------- - - public static void main(String[] args) throws Exception { - - DraculaCalibrator calibrator = new DraculaCalibrator(null, null, 3600); - - DraculaRoutes routes = new DraculaRoutes( - "C:\\dracula\\otley\\otley.dem", calibrator); - System.out.println("LOADED ROUTES FROM .DEM FILE"); - - calibrator.setRoutes(routes); - - DraculaTravelTimes travelTimes = new DraculaTravelTimes( - "C:\\dracula\\otley\\otley.ltt", calibrator); - System.out.println("LOADED TRAVEL TIMES FROM .LTT FILE"); - - calibrator.setTravelTimes(travelTimes); - - DraculaPopulation r = new DraculaPopulation(calibrator); - System.out.println("LOADED TRAVEL DEMAND FROM .VEH FILE"); - Iterable s = r - .getPopulationSource("C:\\dracula\\otley\\otley.veh"); - - DraculaChoiceWriter w = new DraculaChoiceWriter(calibrator); - w.open("C:\\dracula\\otley\\otley.veh.test"); - for (DraculaAgent a : s) { - w.write(a, a.getPlans().get(0)); - } - w.close(); - System.out.println("WROTE C:\\dracula\\otley\\otley.veh.test"); - - System.out.println("DONE"); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaController.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaController.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaController.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaController.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,210 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import static floetteroed.cadyts.interfaces.dracula.DraculaCalibrator.DEFAULT_BETA_TT_S; -import static floetteroed.cadyts.interfaces.dracula.DraculaCalibrator.DEFAULT_DEMAND_PERIODS; -import static floetteroed.cadyts.interfaces.dracula.DraculaCalibrator.DEFAULT_DEMAND_SCALE; -import static floetteroed.cadyts.interfaces.dracula.DraculaCalibrator.DEFAULT_OD_PREFIX; - -import java.io.IOException; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.filebased.ChoiceFileWriter; -import floetteroed.cadyts.calibrators.filebased.FileBasedController; -import floetteroed.cadyts.calibrators.filebased.PopulationFileReader; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.commandlineparser.CommandLineParser; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class DraculaController - extends - FileBasedController { - - // -------------------- CONSTANTS -------------------- - - public static final String WARMUP = "-warmup"; - public static final String BETA_TT = "-betatt"; - public static final String DEMAND_FILE = "-demandfile"; - public static final String FLOW_PREFIX = "-flowprefix"; - public static final String TT_PREFIX = "-ttprefix"; - public static final String INITIAL_TT_FILE = "-initialttfile"; - public static final String DEMAND_PERIODS = "-demandperiods"; - public static final String ODPREFIX_KEY = "-odprefix"; - public static final String DEMANDSCALE_KEY = "-demandscale"; - - // --------------- OVERRIDING OF FileBasedController --------------- - - // - - - - - INIT - - - - - - - @Override - protected DraculaCalibrator newCalibrator(final CommandLineParser clp) { - final String logFile = clp.containsKey(LOGFILE_KEY) ? clp - .getString(LOGFILE_KEY) : "calibration-log.txt"; - final DraculaCalibrator result = new DraculaCalibrator(logFile, clp - .getLong(RNDSEED_KEY), clp.getInteger(BINSIZE_KEY)); - return result; - } - - @Override - protected void prepareCommandLineParserINIT(final CommandLineParser clp) { - super.prepareCommandLineParserINIT(clp); - clp.defineParameter(WARMUP, false, Integer - .toString(DraculaCalibrator.DEFAULT_WARMUP_S), - "duration of warmup period [s]"); - clp.defineParameter(BETA_TT, true, Double.toString(DEFAULT_BETA_TT_S), - "the travel time coefficient [1/s]"); - clp.defineParameter(DEMAND_FILE, true, null, "the initial .DEM file"); - clp.defineParameter(FLOW_PREFIX, false, null, - "prefix of flow bookkeeping file"); - clp.defineParameter(TT_PREFIX, false, null, - "prefix of travel time bookkeeping file"); - clp.defineParameter(INITIAL_TT_FILE, true, null, - "the initial .LTT file"); - clp.defineParameter(DEMAND_PERIODS, false, Integer - .toString(DEFAULT_DEMAND_PERIODS), "number of demand periods"); - clp.defineParameter(ODPREFIX_KEY, false, DEFAULT_OD_PREFIX, - "file prefix for estimated OD matrix"); - clp.defineParameter(DEMANDSCALE_KEY, false, Double - .toString(DEFAULT_DEMAND_SCALE), - "demand has been artificially scaled up by this factor"); - } - - @Override - protected void prepareCalibratorINIT(final DraculaCalibrator calibrator, - final CommandLineParser clp) { - super.prepareCalibratorINIT(calibrator, clp); - calibrator.setWarmUp_s(clp.getInteger(WARMUP)); - calibrator.setBetaTT_s(clp.getDouble(BETA_TT)); - calibrator.setDemandPeriods(clp.getInteger(DEMAND_PERIODS)); - calibrator.setRoutes(new DraculaRoutes(clp.getString(DEMAND_FILE), - calibrator)); - calibrator.setFlowPrefix(clp.getString(FLOW_PREFIX)); - calibrator.setTravelTimePrefix(clp.getString(TT_PREFIX)); - calibrator.setTravelTimes(new DraculaTravelTimes(clp - .getString(INITIAL_TT_FILE), calibrator)); - calibrator.setOdPrefix(clp.getString(ODPREFIX_KEY)); - calibrator.setDemandScale(clp.getDouble(DEMANDSCALE_KEY)); - } - - @Override - protected void loadMeasurements(final DraculaCalibrator calibrator, - final String measFile) { - final DraculaMeasurementLoader loader = new DraculaMeasurementLoader( - calibrator); - loader.load(measFile); - } - - // - - - - - CHOICE - - - - - - - @Override - protected PopulationFileReader newPopulationReader( - DraculaCalibrator calibrator, final CommandLineParser clp) { - return new DraculaPopulation(calibrator); - } - - @Override - protected ChoiceFileWriter newChoiceFileWriter( - DraculaCalibrator calibrator) { - return new DraculaChoiceWriter(calibrator); - } - - private DynamicData odMatrix; - - @Override - protected void selectPlans(final DraculaCalibrator calibrator, - final CommandLineParser clp) throws IOException { - - if (calibrator.getOdPrefix() != null) { - this.odMatrix = new DynamicData(0, calibrator - .getTimeBinSize_s(), (int) Math - .ceil(24.0 * 3600.0 / calibrator.getTimeBinSize_s())); - } else { - this.odMatrix = null; - } - - super.selectPlans(calibrator, clp); - - if (this.odMatrix != null) { - (new DraculaODMatrixXMLFileIO()).write(calibrator.getOdPrefix() - + calibrator.getIteration() + ".xml", this.odMatrix); - this.odMatrix = null; - } - } - - @Override - protected void afterChoice(final DraculaCalibrator calibrator, - final DraculaAgent agent, final DraculaPlan plan) { - if (this.odMatrix != null) { - for (int i = 0; i < agent.getPlans().size(); i++) { - double moveProb = 0; - final DraculaPlan trip = agent.getPlans().get(i); - if (!agent.getPlans().get(i).isStayAtHome()) { - moveProb += calibrator.getLastChoiceProb(i); - } - final DraculaODRelation key = trip.getOD(); - if (key != null) { - // TODO bin(...) does not check for bounds! - this.odMatrix.add(key, this.odMatrix.bin(trip - .getDepartureTime_s()), moveProb); - } - } - } - } - - // - - - - - UPDATE - - - - - - - @Override - protected void update(final DraculaCalibrator calibrator, - final CommandLineParser clp) { - final DraculaTravelTimes travelTimes = new DraculaTravelTimes(clp - .getString(NETFILE_KEY), calibrator); - calibrator.setTravelTimes(travelTimes); - calibrator.afterNetworkLoading(travelTimes); - } - - // -------------------- MAIN-FUNCTION -------------------- - - public static void main(String[] args) throws Exception { - final StringBuffer msg = new StringBuffer("processing call: "); - if (args != null) { - for (String arg : args) { - msg.append(arg); - msg.append(" "); - } - } - Logger.getLogger(DraculaController.class.getName()) - .info(msg.toString()); - try { - (new DraculaController()).run(args); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaDataAnalyzer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaDataAnalyzer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaDataAnalyzer.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaDataAnalyzer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.io.File; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -import floetteroed.utilities.DynamicData; - - - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaDataAnalyzer { - - // -------------------- MEMBERS -------------------- - - private final Set allKeys = new LinkedHashSet(); - - private final List> dataList = new ArrayList>(); - - // -------------------- CONSTRUCTION -------------------- - - DraculaDataAnalyzer(final String prefix) { - final DynamicXMLFileIOStringKey reader = new DynamicXMLFileIOStringKey(); - int i = 0; - File f; - while ((f = new File(prefix + i + ".xml")).exists()) { - final DynamicData data = reader.read(f.getAbsolutePath()); - this.allKeys.addAll(data.keySet()); - this.dataList.add(data); - i++; - } - System.out.println(allKeys); - } - - // -------------------- GETTERS -------------------- - - int getEntries() { - return dataList.size(); - } - - // -------------------- IMPLEMENTATION -------------------- - - void printDataField(final String key) { - final StringBuffer result = new StringBuffer(); - for (int i = 0; i < this.getEntries(); i++) { - DynamicData data = this.dataList.get(i); - for (int bin = 0; bin < data.getBinCnt(); bin++) { - result.append(data.getBinValue(key, bin)); - result.append("\t"); - } - result.append("\n"); - } - System.out.println(); - System.out.println(result); - System.out.println(); - } - - public static final void main(String[] args) { - - // final String path = - // "C:\\Documents and Settings\\floetter\\My Documents\\temp\\Leeds_2010\\net1\\"; - final String path = "C:\\dracula\\net1\\"; - final String link = "3"; // "9"; - - DraculaDataAnalyzer dda = new DraculaDataAnalyzer(path + "flows"); - System.out.println("found " + dda.getEntries() + " entries"); - dda.printDataField(link); - System.out.println(); - - dda = new DraculaDataAnalyzer(path + "tt"); - System.out.println("found " + dda.getEntries() + " entries"); - dda.printDataField(link); - - System.out.println("DONE"); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaLink.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaLink.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaLink.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaLink.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.io.Serializable; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaLink implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private final int index; - - // -------------------- CONSTRUCTION -------------------- - - DraculaLink(final int index) { - this.index = index; - } - - // -------------------- GETTERS -------------------- - - int getIndex() { - return this.index; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public int hashCode() { - return this.index; - } - - @Override - public boolean equals(final Object o) { - if (o == null) { - return false; - } else { - try { - return (this.index == ((DraculaLink) o).index); - } catch (ClassCastException e) { - return false; - } - } - } - - @Override - public String toString() { - return this.getClass().getSimpleName() + "(" + this.index + ")"; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaMeasurementLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaMeasurementLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaMeasurementLoader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaMeasurementLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import floetteroed.cadyts.interfaces.defaults.BasicMeasurementLoader; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaMeasurementLoader extends BasicMeasurementLoader { - - // -------------------- CONSTRUCTION -------------------- - - DraculaMeasurementLoader(final DraculaCalibrator calibrator) { - super(calibrator); - } - - // --------------- IMPLEMENTATION OF BasicMeasurementLoader --------------- - - @Override - protected DraculaLink label2link(final String label) { - return new DraculaLink(Integer.parseInt(label)); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODMatrixXMLFileIO.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODMatrixXMLFileIO.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODMatrixXMLFileIO.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODMatrixXMLFileIO.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import floetteroed.utilities.DynamicDataXMLFileIO; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class DraculaODMatrixXMLFileIO extends - DynamicDataXMLFileIO { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private static final String TAZ_SEPARATOR = "_"; - - // --------------- IMPLEMENTATION OF DynamicDataXMLFileIO --------------- - - @Override - protected DraculaODRelation attrValue2key(final String string) { - final String[] zones = string.split("\\Q" + TAZ_SEPARATOR + "\\E"); - final Integer from = Integer.parseInt(zones[0]); - final Integer to = Integer.parseInt(zones[1]); - return new DraculaODRelation(from, to); - } - - @Override - protected String key2attrValue(final DraculaODRelation key) { - return key.getFromTAZ() + TAZ_SEPARATOR + key.getToTAZ(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODRelation.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODRelation.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODRelation.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaODRelation.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.Set; - -import floetteroed.cadyts.demand.ODRelation; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaODRelation extends ODRelation { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final Set routes = new LinkedHashSet(); - - // -------------------- CONSTRUCTION -------------------- - - DraculaODRelation(final Integer fromTAZ, final Integer toTAZ) { - super(fromTAZ, toTAZ); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - void addRoute(final DraculaRoute route) { - if (route == null) { - throw new IllegalArgumentException("route is null"); - } - this.routes.add(route); - } - - Collection getRoutes() { - return this.routes; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlanChoiceModel.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlanChoiceModel.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlanChoiceModel.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlanChoiceModel.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import static floetteroed.utilities.math.MathHelpers.round; - -import java.util.List; -import java.util.logging.Logger; - -import floetteroed.cadyts.demand.PlanChoiceModel; -import floetteroed.utilities.math.MultinomialLogit; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaPlanChoiceModel implements PlanChoiceModel { - - // -------------------- MEMBERS -------------------- - - private final DraculaCalibrator calibrator; - - private final double stayAtHomeProb; - - // -------------------- CONSTRUCTION -------------------- - - DraculaPlanChoiceModel(final DraculaCalibrator calibrator) { - if (calibrator == null) { - throw new IllegalArgumentException("calibrator is null"); - } - this.calibrator = calibrator; - this.stayAtHomeProb = (calibrator.getDemandScale() - 1.0) - / calibrator.getDemandScale(); - } - - // --------------- IMPLEMENTATION OF PlanChoiceModel --------------- - - @Override - public Vector getChoiceProbabilities(List plans) { - /* - * (1) identify choice probabilities for all non-stay-at-home plans - */ - final MultinomialLogit mnl = new MultinomialLogit(plans.size() - 1, 1); - mnl.setCoefficient(0, this.calibrator.getBetaTT_s()); - for (int i = 0; i < plans.size() - 1; i++) { - final DraculaPlan plan = plans.get(i); - if (plan.isStayAtHome()) { - Logger.getLogger(this.getClass().getName()).warning( - "encountered stay-at-home plan " - + "before last position in plan list"); - } - double tt_s = 0; - for (DraculaLink link : plan.getRoute().getLinks()) { - tt_s += this.calibrator.getTravelTimes().getTT_s(link, - plan.getDepartureTime_s() + round(tt_s)); - } - mnl.setAttribute(i, 0, tt_s); - } - /* - * (2) scale down real choice probs and add stay-at-home alternative - */ - final DraculaPlan lastPlan = plans.get(plans.size() - 1); - if (!lastPlan.isStayAtHome()) { - Logger.getLogger(this.getClass().getName()).warning( - "last plan in list is no stay-at-home plan"); - } - final Vector result = mnl.getProbs().copyEnlarged(1); - result.mult(1.0 - this.stayAtHomeProb); - result.set(result.size() - 1, this.stayAtHomeProb); - return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlan.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlan.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlan.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPlan.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,129 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.util.List; -import java.util.logging.Logger; - -import floetteroed.cadyts.demand.BasicPlan; -import floetteroed.cadyts.demand.PlanBuilder; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaPlan extends BasicPlan { - - // -------------------- CONSTANTS -------------------- - - private final DraculaRoute route; - - private final int departureTime_s; - - // -------------------- CONSTRUCTION -------------------- - - DraculaPlan(final DraculaRoute route, final int dptTime_s, - final PlanBuilder planBuilder, - final DraculaTravelTimes travelTimes) { - - /* - * (1) set constant plan properties - */ - if (route == null) { - throw new IllegalArgumentException("route is null"); - } - if (route.getId() > 0 && travelTimes == null) { - throw new IllegalArgumentException( - "travel times are null but route is not empty"); - } - this.route = route; - this.departureTime_s = dptTime_s; - - if (planBuilder == null) { - throw new IllegalArgumentException("planBuilder is null"); - } - - /* - * (2) build internal turning-move structure - */ - if (!this.isStayAtHome()) { - final List links = route.getLinks(); - if (links.size() > 0) { - // final PlanBuilder builder = new - // PlanBuilder(); - planBuilder.reset(this); - - int time_s = dptTime_s; - DraculaLink link = links.get(0); - planBuilder.addEntry(link, time_s); - time_s += travelTimes.getTT_s(link, time_s); - - for (int i = 1; i < links.size(); i++) { - link = links.get(i); - planBuilder.addTurn(link, time_s); - time_s += travelTimes.getTT_s(link, time_s); - } - planBuilder.addExit(time_s); - } else { - Logger.getLogger(this.getClass().getName()).warning( - "non-stay-at-home route " + route.getId() - + " has zero links"); - } - } - this.trim(); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - protected DraculaRoute getRoute() { - return this.route; - } - - int getDepartureTime_s() { - return this.departureTime_s; - } - - DraculaODRelation getOD() { - return this.route.getOD(); - } - - boolean isStayAtHome() { - return (this.route.getId() == 0); - } - - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.getClass().getSimpleName()); - result.append("(dptTime_s = "); - result.append(this.departureTime_s); - result.append(", route = "); - result.append(this.route); - result.append(", link_entries = "); - result.append(super.toString()); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPopulation.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPopulation.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPopulation.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaPopulation.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import static java.lang.Double.parseDouble; -import static java.lang.Math.round; -import static java.util.Arrays.copyOfRange; - -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.Map; - -import floetteroed.cadyts.calibrators.filebased.PopulationFileReader; -import floetteroed.cadyts.demand.PlanChoiceModel; -import floetteroed.utilities.tabularfileparser.TabularFileHandler; -import floetteroed.utilities.tabularfileparser.TabularFileParser; - -/** - * - * Loads a population of vehicles from the .VEH file. - * - * @author Gunnar Flötteröd - * - */ -class DraculaPopulation implements TabularFileHandler, - PopulationFileReader { - - // -------------------- CONSTANTS -------------------- - - private final static int ID_INDEX = 0; - - private final static int DPT_TIME_INDEX = 1; - - private final static int ROUTE_INDEX = 2; - - private final static int MISC_START_INDEX = 3; - - // -------------------- MEMBERS -------------------- - - private final DraculaCalibrator calibrator; - - private final Map id2agent = new LinkedHashMap(); - - // -------------------- CONSTRUCTION -------------------- - - DraculaPopulation(final DraculaCalibrator calibrator) { - if (calibrator == null) { - throw new IllegalArgumentException("calibrator is null"); - } - this.calibrator = calibrator; - } - - // --------------- IMPLEMENTATION OF PopulationFileReader --------------- - - @Override - public Iterable getPopulationSource( - final String populationFile) { - this.id2agent.clear(); - final TabularFileParser parser = new TabularFileParser(); - parser.setDelimiterRegex("\\s"); - parser.setMinRowLength(MISC_START_INDEX); - try { - parser.parse(populationFile, this); - } catch (IOException e) { - e.printStackTrace(); - } - return this.id2agent.values(); - } - - // --------------- IMPLEMENTATION OF TabularFileHandler --------------- - - @Override - public void startDocument() { - } - - @Override - public void endDocument() { - } - - @Override - public String preprocess(String line) { - return line; - } - - @Override - public void startRow(String[] row) { - /* - * (1) extract relevant file entries - */ - final long agentId = Long.parseLong(row[ID_INDEX]); - final int dptTime_s = this.calibrator.getWarmUp_s() - + (int) round(parseDouble(row[DPT_TIME_INDEX])); - // !!! no warmup in .veh file !!! - final long routeId = Long.parseLong(row[ROUTE_INDEX]); - final String[] misc = copyOfRange(row, MISC_START_INDEX, row.length); - /* - * (2) identify according data structures - */ - final DraculaODRelation od = this.calibrator.getRoutes().getRoute( - routeId).getOD(); - final PlanChoiceModel choiceModel = new DraculaPlanChoiceModel( - this.calibrator); - final DraculaAgent agent = new DraculaAgent(agentId, choiceModel, od, - dptTime_s, misc); - /* - * (3) provide all real plans (those which imply physical movement) - */ - for (DraculaRoute route : agent.getOD().getRoutes()) { - final DraculaPlan plan = new DraculaPlan(route, dptTime_s, - this.calibrator.newPlanBuilder(), this.calibrator - .getTravelTimes()); - agent.addPlan(plan); - } - /* - * (4) provide stay-at-home plan as last alternative - */ - final DraculaRoute stayAtHomeRoute = new DraculaRoute(0L, od); - final DraculaPlan stayAtHomePlan = new DraculaPlan(stayAtHomeRoute, - dptTime_s, this.calibrator.newPlanBuilder(), null); - agent.addPlan(stayAtHomePlan); - /* - * (5) store complete agent - */ - this.id2agent.put(agentId, agent); - } - - // -------------------- MAIN-FUNCTION, ONLY FOR TESTING -------------------- - - public static void main(String[] args) { - - DraculaCalibrator calibrator = new DraculaCalibrator(null, null, 3600); - - DraculaRoutes routes = new DraculaRoutes("C:\\dracula\\net1\\net1.dem", - calibrator); - System.out.println("LOADED ROUTES FROM .DEM FILE"); - - calibrator.setRoutes(routes); - - DraculaTravelTimes travelTimes = new DraculaTravelTimes( - "C:\\dracula\\net1\\net1.ltt", calibrator); - calibrator.setTravelTimes(travelTimes); - System.out.println("LOADED TRAVEL TIMES FROM .LTT FILE"); - - DraculaPopulation r = new DraculaPopulation(calibrator); - for (DraculaAgent agent : r - .getPopulationSource("C:\\dracula\\net1\\net1-initial.veh")) { - System.out.println(agent); - } - System.out.println("LOADED TRAVEL DEMAND FROM .VEH FILE"); - System.out.println("DONE"); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoute.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoute.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoute.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoute.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DraculaRoute implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final long id; - - private final DraculaODRelation od; - - private final int hashCode; - - private final ArrayList links = new ArrayList(); - - // -------------------- CONSTRUCTION -------------------- - - DraculaRoute(final long id, final DraculaODRelation od) { - if (od == null) { - throw new IllegalArgumentException("od is null"); - } - this.id = id; - this.od = od; - this.hashCode = 1 + 31 * ((int) this.id + 31 * this.od.hashCode()); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - void addLink(final DraculaLink link) { - if (link == null) { - throw new IllegalArgumentException("link is null"); - } else { - this.links.add(link); - } - } - - void trimToSize() { - this.links.trimToSize(); - } - - long getId() { - return this.id; - } - - DraculaODRelation getOD() { - return this.od; - } - - List getLinks() { - return this.links; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public int hashCode() { - return this.hashCode; - } - - @Override - public boolean equals(final Object o) { - if (o == null) { - return false; - } else { - try { - final DraculaRoute r = (DraculaRoute) o; - return (this.id == r.id && this.od.equals(r.od)); - } catch (ClassCastException e) { - return false; - } - } - } - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.getClass().getSimpleName()); - result.append("(id = "); - result.append(this.id); - result.append(", od = "); - result.append(this.od); - result.append(", links = "); - result.append(this.links); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoutes.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoutes.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoutes.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaRoutes.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import java.io.IOException; -import java.io.Serializable; -import java.util.LinkedHashMap; -import java.util.Map; - -import floetteroed.utilities.Tuple; -import floetteroed.utilities.tabularfileparser.TabularFileHandler; -import floetteroed.utilities.tabularfileparser.TabularFileParser; - - - -/** - * - * Extracts all routes from the Dracula .DEM file. - * - * @author Gunnar Flötteröd - * - */ -class DraculaRoutes implements TabularFileHandler, Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private static final String START_TAG = "&ROUTES"; - - private static final String END_TAG = "&PUB_SERVICES"; - - private static final int ROUTE_ID_INDEX = 0; - - private static final int ORIGIN_ZONE_INDEX = 1; - - private static final int DESTINATION_ZONE_INDEX = 2; - - private final int LINK_CNT_INDEX; // depends on number of demand periods - - private final int FIRST_LINK_INDEX; // depends on number of demand periods - - // -------------------- MEMBERS -------------------- - - private Map, DraculaODRelation> zones2od = new LinkedHashMap, DraculaODRelation>(); - - private Map id2route = new LinkedHashMap(); - - // -------------------- CONSTRUCTION -------------------- - - DraculaRoutes(final String routeFileName, final DraculaCalibrator calibrator) { - if (routeFileName == null) { - throw new IllegalArgumentException("routeFileName is null"); - } - if (calibrator == null) { - throw new IllegalArgumentException("calibrator is null"); - } - this.LINK_CNT_INDEX = 9 + (calibrator.getDemandPeriods() - 1); - this.FIRST_LINK_INDEX = 10 + (calibrator.getDemandPeriods() - 1); - - final TabularFileParser parser = new TabularFileParser(); - parser.setStartTag(START_TAG); - parser.setEndTag(END_TAG); - parser.setDelimiterRegex("\\s"); - parser.setMinRowLength(FIRST_LINK_INDEX + 1); - try { - parser.parse(routeFileName, this); - } catch (IOException e) { - e.printStackTrace(); - } - } - - // -------------------- GETTERS AND SETTERS -------------------- - - DraculaRoute getRoute(final Long id) { - return this.id2route.get(id); - } - - // --------------- IMPLEMENTATION OF TabularFileHandler --------------- - - @Override - public void startDocument() { - } - - @Override - public void endDocument() { - } - - @Override - public String preprocess(String line) { - return line; - } - - @Override - public void startRow(String[] row) { - - /* - * (1) extract zones and identify (or create) OD pair - */ - final Integer fromZone = Integer.parseInt(row[ORIGIN_ZONE_INDEX]); - final Integer toZone = Integer.parseInt(row[DESTINATION_ZONE_INDEX]); - final Tuple zones = new Tuple(fromZone, toZone); - - final DraculaODRelation od; - if (this.zones2od.containsKey(zones)) { - od = this.zones2od.get(zones); - } else { - od = new DraculaODRelation(fromZone, toZone); - this.zones2od.put(zones, od); - } - - /* - * (2) extract route information and add route to OD pair - */ - final long routeId = Long.parseLong(row[ROUTE_ID_INDEX]); - final DraculaRoute route = new DraculaRoute(routeId, od); - - final int linkCnt = Integer.parseInt(row[LINK_CNT_INDEX].replaceAll( - "/", "")); - for (int i = FIRST_LINK_INDEX; i < FIRST_LINK_INDEX + linkCnt; i++) { - final int linkIndex = Integer.parseInt(row[i].replaceAll("/", "")); - route.addLink(new DraculaLink(linkIndex)); - } - route.trimToSize(); - this.id2route.put(route.getId(), route); - od.addRoute(route); - } - - // -------------------- MAIN-FUNCTION, ONLY FOR TESTING -------------------- - - public static void main(String[] args) { - DraculaCalibrator c = new DraculaCalibrator(null, null, 3600); - DraculaRoutes routeSet = new DraculaRoutes( - "C:\\dracula\\otley\\otley.dem", c); - for (Map.Entry entry : routeSet.id2route.entrySet()) { - System.out.println(entry.getKey() + " --> " + entry.getValue()); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaTravelTimes.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaTravelTimes.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaTravelTimes.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DraculaTravelTimes.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,331 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import static floetteroed.utilities.math.MathHelpers.round; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.logging.Logger; - -import floetteroed.cadyts.measurements.SingleLinkMeasurement.TYPE; -import floetteroed.cadyts.supply.SimResults; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.DynamicDataXMLFileIO; -import floetteroed.utilities.Units; -import floetteroed.utilities.tabularfileparser.TabularFileHandler; -import floetteroed.utilities.tabularfileparser.TabularFileParser; - -/** - * - * Extracts time-dependent link travel times from the Dracula .LTT file. - * - * Since the .LTT file only contains data from the main demand period, both the - * average travel times and the average flow rates obtained from that file are - * already constrained to the main demand period. Hence, no departure time - * checks are conducted here, and the start of the main demand period does not - * need to be known. - * - * @author Gunnar Flötteröd - * - */ -class DraculaTravelTimes implements TabularFileHandler, SimResults { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private static final String START_TAG = "22222"; - - private static final String END_TAG = "99999"; - - private static final int ROUTE_ID_INDEX = 3; - - private static final int DEPARTURE_TIME_INDEX = 10; - - private static final int ARRIVAL_TIME_INDEX = 11; - - private static final int LINK_COUNT_INDEX = 12; - - private static final int FIRST_TT_INDEX = 13; - - // -------------------- MEMBERS -------------------- - - private final DraculaCalibrator calibrator; - - // -------------------- MEMBERS -------------------- - - private final Map minTravelTime_s; - - private final DynamicData travelTimeSum_s; - - private final DynamicData entryCount; - - // -------------------- CONSTRUCTOR -------------------- - - DraculaTravelTimes(final String travelTimeFileName, - final DraculaCalibrator calibrator) { - - /* - * (1) set parameters - */ - if (travelTimeFileName == null) { - throw new IllegalArgumentException("travel time file name is null"); - } - if (calibrator == null) { - throw new IllegalArgumentException("calibrator is null"); - } - if (calibrator.getRoutes() == null) { - throw new IllegalArgumentException("no routes in calibrator"); - } - this.calibrator = calibrator; - final int binCnt = (int) Math.ceil(24.0 * 3600.0 / calibrator - .getTimeBinSize_s()); - this.travelTimeSum_s = new DynamicData(0, calibrator - .getTimeBinSize_s(), binCnt); - this.entryCount = new DynamicData(0, calibrator - .getTimeBinSize_s(), binCnt); - - /* - * obtain reference to minimum travel times - */ - this.minTravelTime_s = calibrator.getMinTravelTimes(); - - /* - * (2) load data - */ - final TabularFileParser parser = new TabularFileParser(); - parser.setStartTag(START_TAG); - parser.setEndTag(END_TAG); - parser.setDelimiterRegex("\\s"); - parser.setMinRowLength(FIRST_TT_INDEX + 1); - try { - parser.parse(travelTimeFileName, this); - } catch (IOException e) { - e.printStackTrace(); - } - - /* - * (3) do flow bookkeeping - */ - if (calibrator.getFlowPrefix() != null) { - final DynamicDataXMLFileIO flowWriter = new DynamicDataXMLFileIO() { - - private static final long serialVersionUID = 1L; - - @Override - protected String key2attrValue(final DraculaLink key) { - return Integer.toString(key.getIndex()); - } - - @Override - protected DraculaLink attrValue2key(final String string) { - throw new UnsupportedOperationException(); - } - }; - final String flowFileName = calibrator.getFlowPrefix() - + calibrator.getIteration() + ".xml"; - try { - flowWriter.write(flowFileName, this.entryCount); - } catch (IOException e) { - Logger.getLogger(this.getClass().getName()).warning( - "could not write flow file: " + flowFileName); - } - } - } - - // -------------------- SETTERS AND GETTERS -------------------- - - private void updateTT_s(final DraculaLink link, final int time_s, - final double tt_s) { - /* - * (1) update minimum travel time (to incrementally approximate the free - * flow travel time without parsing the network file) - */ - final Double oldMinTT_s = this.minTravelTime_s.get(link); - if (oldMinTT_s == null || tt_s < oldMinTT_s) { - this.minTravelTime_s.put(link, tt_s); - } - /* - * (2) update average travel time - */ - final int bin = Math.max(0, Math.min(this.travelTimeSum_s.bin(time_s), - this.travelTimeSum_s.getBinCnt() - 1)); - this.travelTimeSum_s.add(link, bin, tt_s); - this.entryCount.add(link, bin, 1.0); - } - - double getTT_s(final DraculaLink link, final int time_s) { - final int bin = Math.max(0, Math.min(this.entryCount.bin(time_s), - this.entryCount.getBinCnt() - 1)); - final double count = this.entryCount.getBinValue(link, bin); - if (count > 0) { - return (this.travelTimeSum_s.getBinValue(link, bin) / count); - } else { - final Double minTT_s = this.minTravelTime_s.get(link); - return (minTT_s != null ? minTT_s : 0.0); - } - } - - // --------------- IMPLEMENTATION OF TabularFileHandler --------------- - - @Override - public void startDocument() { - } - - @Override - public String preprocess(String line) { - return line; - } - - @Override - public void startRow(String[] row) { - /* - * (1) extract numbers from file - */ - final Long routeId = Long.parseLong(row[ROUTE_ID_INDEX]); - final double dptTime_s = Double.parseDouble(row[DEPARTURE_TIME_INDEX]); - final double arrTime_s = Double.parseDouble(row[ARRIVAL_TIME_INDEX]); - final int linkCnt = Integer.parseInt(row[LINK_COUNT_INDEX]); - final List linkTTList_s = new ArrayList(linkCnt); - for (int i = FIRST_TT_INDEX; i < FIRST_TT_INDEX + 2 * linkCnt; i += 2) { - linkTTList_s.add(Double.parseDouble(row[i])); - } - /* - * (2) check data consistency - */ - final DraculaRoute route = this.calibrator.getRoutes() - .getRoute(routeId); - if (route == null) { - Logger.getLogger(this.getClass().getName()).warning( - "unknown route " + routeId + " -- ignoring trip"); - return; - } else if (route.getLinks().size() != linkCnt) { - Logger.getLogger(this.getClass().getName()).warning( - "inconsistent length of route " + routeId - + " -- some data may be lost"); - } - /* - * (3) update average travel times and flows - */ - double totalTT_s = 0; - for (int i = 0; i < Math.min(route.getLinks().size(), linkCnt); i++) { - final DraculaLink link = route.getLinks().get(i); - final double tt_s = linkTTList_s.get(i); - this.updateTT_s(link, round(dptTime_s + totalTT_s), tt_s); - totalTT_s += tt_s; - } - /* - * (4) check consistency of route travel time - */ - final double err = (dptTime_s + totalTT_s) - arrTime_s; - if (Math.abs(err) > 1.0) { - Logger.getLogger(this.getClass().getName()).warning( - "travel time error of " + err + " s on route " + routeId); - } - } - - @Override - public void endDocument() { - if (this.calibrator.getTravelTimePrefix() != null) { - - final DynamicData tts = new DynamicData( - this.entryCount.getStartTime_s(), this.entryCount - .getBinSize_s(), this.entryCount.getBinCnt()); - for (DraculaLink link : this.minTravelTime_s.keySet()) { - for (int bin = 0; bin < tts.getBinCnt(); bin++) { - tts.put(link, bin, this.getTT_s(link, tts.binStart_s(bin))); - } - } - - final DynamicDataXMLFileIO writer = new DynamicDataXMLFileIO() { - - private static final long serialVersionUID = 1L; - - @Override - protected String key2attrValue(final DraculaLink key) { - return Integer.toString(key.getIndex()); - } - - @Override - protected DraculaLink attrValue2key(final String string) { - throw new UnsupportedOperationException(); - } - }; - final String ttFileName = calibrator.getTravelTimePrefix() - + calibrator.getIteration() + ".xml"; - try { - writer.write(ttFileName, tts); - } catch (IOException e) { - Logger.getLogger(this.getClass().getName()).warning( - "could not write travel time file: " + ttFileName); - } - } - } - - // -------------------- IMPLEMENTATION OF SimResults -------------------- - - @Override - public double getSimValue(DraculaLink link, int startTime_s, int endTime_s, - TYPE type) { - - if (!TYPE.FLOW_VEH_H.equals(type)) { - throw new IllegalArgumentException( - "current implementation only allows for data type " - + TYPE.FLOW_VEH_H); - } - - final double dur_h = Units.H_PER_S * (endTime_s - startTime_s); - return (this.entryCount.getSum(link, startTime_s, endTime_s) / dur_h); - } - - // -------------------- MAIN FUNCTION, ONLY FOR TESTING -------------------- - - public static void main(String[] args) { - - DraculaCalibrator calibrator = new DraculaCalibrator(null, 0L, 3600); - - DraculaRoutes routes = new DraculaRoutes( - "C:\\dracula\\otley\\otley.dem", calibrator); - System.out.println("LOADED ROUTES FROM .DEM FILE"); - - calibrator.setRoutes(routes); - - DraculaTravelTimes dTT = new DraculaTravelTimes( - "C:\\dracula\\otley\\otley.ltt", calibrator); - System.out.println("LOADED TRAVEL TIMES FROM .LTT FILE"); - - System.out.println("number of links = " - + dTT.minTravelTime_s.keySet().size()); - for (DraculaLink link : dTT.minTravelTime_s.keySet()) { - System.out.println("link = " + link + ", value = " - + dTT.minTravelTime_s.get(link)); - } - - System.out.println("DONE"); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DynamicXMLFileIOStringKey.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DynamicXMLFileIOStringKey.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DynamicXMLFileIOStringKey.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/dracula/DynamicXMLFileIOStringKey.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.dracula; - -import floetteroed.utilities.DynamicDataXMLFileIO; - -/** - * - * @author Gunnar Flötteröd - * - */ -class DynamicXMLFileIOStringKey extends DynamicDataXMLFileIO { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // --------------- IMPLEMENTATION OF DynamicDataFileIO --------------- - - @Override - protected String attrValue2key(String string) { - return string; - } - - @Override - protected String key2attrValue(String key) { - return key; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/ExpBetaPlanChanger.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/ExpBetaPlanChanger.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/ExpBetaPlanChanger.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/ExpBetaPlanChanger.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,393 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.matsim; - -import static java.lang.Math.exp; -import static java.lang.Math.min; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.math.Matrix; -import floetteroed.utilities.math.Vector; - - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class ExpBetaPlanChanger { - - // -------------------- EXOGENEOUS PARAMETERS -------------------- - - private double utilityScale; - - private final Vector coeff; - - private final Vector asc; - - private final Matrix attr; - - // -------------------- ENDOGENEOUS PARAMETERS -------------------- - - private int currentChoice; - - private final Vector utilities; - - private final Vector choiceProbs; - - private final Matrix dProbs_dCoeffs; - - private final Matrix dProbs_dASCs; - - private boolean consistent; - - private boolean inSmoothConditions; - - // -------------------- CONSTRUCTION -------------------- - - public ExpBetaPlanChanger(final int choiceSetSize, final int attributeCount) { - this.utilityScale = 1.0; - this.coeff = new Vector(attributeCount); - this.asc = new Vector(choiceSetSize); - this.attr = new Matrix(choiceSetSize, attributeCount); - this.utilities = new Vector(choiceSetSize); - this.choiceProbs = new Vector(choiceSetSize); - this.dProbs_dCoeffs = new Matrix(choiceSetSize, attributeCount); - this.dProbs_dASCs = new Matrix(choiceSetSize, choiceSetSize); - this.consistent = false; - } - - // -------------------- SETTERS -------------------- - - public void setUtilityScale(final double value) { - this.consistent = false; - this.utilityScale = value; - } - - public void setCoefficient(final int attrIndex, final double value) { - this.consistent = false; - this.coeff.set(attrIndex, value); - } - - public void setASC(final int choiceIndex, final double value) { - this.consistent = false; - this.asc.set(choiceIndex, value); - } - - public void setAttribute(final int choiceIndex, final int attrIndex, - final double value) { - this.consistent = false; - this.attr.getRow(choiceIndex).set(attrIndex, value); - } - - public void setCurrentChoice(final int currentChoice) { - this.consistent = false; - this.currentChoice = currentChoice; - } - - // -------------------- UPDATE -------------------- - - public void enforcedUpdate() { - - /* - * (1) update utilities - */ - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final double v = this.coeff.innerProd(this.attr.getRow(i)) - + this.asc.get(i); - this.utilities.set(i, v); - } - - /* - * (2) update choice probabilities - */ - final boolean[] inSmoothConditions = new boolean[this - .getChoiceSetSize()]; // currentChoice index is undefined! - this.inSmoothConditions = true; - double pSum = 0; - double currentUtility = this.utilities.get(this.currentChoice); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - if (i != this.currentChoice) { - double p = min(1.0, 0.01 * exp(0.5 * this.utilityScale - * (this.utilities.get(i) - currentUtility))); - this.inSmoothConditions &= (p < 1.0); - inSmoothConditions[i] = (p < 1.0); - p /= this.getChoiceSetSize(); - this.choiceProbs.set(i, p); - pSum += p; - } - } - this.choiceProbs.set(this.currentChoice, 1.0 - pSum); - - /* - * (3) update derivatives of choice probabilities w.r.t. coefficients - */ - this.dProbs_dCoeffs.clear(); - final Vector attrCurrent = this.attr.getRow(this.currentChoice); - final Vector dProbsCurrent_dCoeffs = this.dProbs_dCoeffs - .getRow(this.currentChoice); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - if (i != this.currentChoice && inSmoothConditions[i]) { - final Vector dProbi_dCoeff = this.dProbs_dCoeffs.getRow(i); - final double probi = this.choiceProbs.get(i); - final Vector attri = this.attr.getRow(i); - for (int j = 0; j < this.getAttrCount(); j++) { - final double dProbi_dCoeffj = probi * 0.5 - * this.utilityScale - * (attri.get(j) - attrCurrent.get(j)); - dProbi_dCoeff.set(j, dProbi_dCoeffj); - dProbsCurrent_dCoeffs.add(j, -dProbi_dCoeffj); - } - } - } - - /* - * (3) update derivatives of choice probabilities w.r.t. ASCs - */ - this.dProbs_dASCs.clear(); // TODO eventually when necessary - - this.consistent = true; - } - - public void conditionalUpdate() { - if (!this.consistent) { - this.enforcedUpdate(); - } - } - - // -------------------- GETTERS AND THE LIKE -------------------- - - public int getChoiceSetSize() { - return this.choiceProbs.size(); - } - - public int getAttrCount() { - return this.coeff.size(); - } - - public Vector getCoeff() { - return this.coeff.newImmutableView(); - } - - public Vector getASC() { - return this.asc.newImmutableView(); - } - - public Vector getProbs() { - this.conditionalUpdate(); - return this.choiceProbs.newImmutableView(); - } - - public Vector getUtils() { - this.conditionalUpdate(); - return this.utilities.newImmutableView(); - } - - public Matrix get_dProbs_dCoeffs() { - this.conditionalUpdate(); - return this.dProbs_dCoeffs.newImmutableView(); - } - - public Matrix get_dProbs_dASCs() { - this.conditionalUpdate(); - return this.dProbs_dASCs.newImmutableView(); - } - - public boolean getInSmoothConditions() { - this.conditionalUpdate(); - return this.inSmoothConditions; - } - - // -------------------- MISCELLANEOUS -------------------- - - public int draw(final Random rnd) { - return MathHelpers.draw(this.getProbs(), rnd); - } - - // --------------- PARAMETER VECTOR EXTERNALIZATION --------------- - - public int getParameterSize(final boolean withASC) { - return this.getAttrCount() + (withASC ? this.getChoiceSetSize() : 0); - } - - public int getParameterSize(final List attributeIndices, - final boolean withASC) { - return attributeIndices.size() - + (withASC ? this.getChoiceSetSize() : 0); - } - - public double getParameter(final int j) { - if (j < this.getAttrCount()) { - return this.getCoeff().get(j); - } else { - return this.getASC().get(j - this.getAttrCount()); - } - } - - public Vector getParameters(final boolean withASC) { - final Vector result = new Vector(this.getParameterSize(withASC)); - for (int j = 0; j < result.size(); j++) { - result.set(j, this.getParameter(j)); - } - return result; - } - - public void setParameter(final int j, final double value) { - this.consistent = false; - if (j < this.getAttrCount()) { - this.setCoefficient(j, value); - } else { - this.setASC(j - this.getAttrCount(), value); - } - } - - public void setParameters(final Vector parameters, - final List attributeIndices) { - if (parameters.size() != attributeIndices.size()) { - throw new IllegalArgumentException( - "arguments must have the same dimension"); - } - this.consistent = false; - for (int j = 0; j < parameters.size(); j++) { - this.setParameter(attributeIndices.get(j), parameters.get(j)); - } - // this.consistent = false; - // for (int j = 0; j < parameters.size(); j++) { - // this.setParameter(j, parameters.get(j)); - // } - } - - public Matrix get_dProb_dParameters(final List attributeIndices, - final boolean withASC) { - this.conditionalUpdate(); - final Matrix result = new Matrix(this.getChoiceSetSize(), this - .getParameterSize(attributeIndices, withASC)); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final Vector resulti = result.getRow(i); - final Vector dProbi_dCoeff = this.get_dProbs_dCoeffs().getRow(i); - final Vector dProbi_dASC = this.get_dProbs_dASCs().getRow(i); - int l = 0; - for (int j : attributeIndices) { - // for (int j = 0; j < this.getAttrCount(); j++) { - resulti.set(l++, dProbi_dCoeff.get(j)); - } - if (withASC) { - for (int i2 = 0; i2 < this.getChoiceSetSize(); i2++) { - resulti.set(l++, dProbi_dASC.get(i2)); - } - } - } - return result; - // this.conditionalUpdate(); - // final Matrix result = new Matrix(this.getChoiceSetSize(), this - // .getParameterSize(withASC)); - // for (int i = 0; i < this.getChoiceSetSize(); i++) { - // final Vector resulti = result.getRow(i); - // final Vector dProbi_dCoeff = this.get_dProbs_dCoeffs().getRow(i); - // final Vector dProbi_dASC = this.get_dProbs_dASCs().getRow(i); - // int l = 0; - // for (int j = 0; j < this.getAttrCount(); j++) { - // resulti.set(l++, dProbi_dCoeff.get(j)); - // } - // if (withASC) { - // for (int i2 = 0; i2 < this.getChoiceSetSize(); i2++) { - // resulti.set(l++, dProbi_dASC.get(i2)); - // } - // } - // } - // return result; - } - - /** - * Provides a numerical approximation of the Hessian of each choice - * probability with respect to the model parameters. - * - * @param delta - * the step size of the finite differences - * - * @param withASC - * if the alternative specific constants are to be accounted for - * - * @returns a numerical approximation of the Hessian of each choice - * probability with respect to the model parameters - */ - public List get_d2P_dbdb(final double delta, - final List attributeIndices, final boolean withASC) { - - final List result = new ArrayList(this - .getChoiceSetSize()); - final int paramSize = this.getParameterSize(attributeIndices, withASC); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - result.add(new Matrix(paramSize, paramSize)); - } - - final Matrix dP_db0 = this.get_dProb_dParameters(attributeIndices, - withASC).copy(); - int resultIndex = 0; // TODO not nice... - for (int r : attributeIndices) { // TODO ASCs... - final double br0 = this.getParameter(r); - this.setParameter(r, br0 + delta); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final Vector d2Pi_dbrdb = result.get(i).getRow(resultIndex); - d2Pi_dbrdb.add(this.get_dProb_dParameters(attributeIndices, - withASC).getRow(i), +1.0); - d2Pi_dbrdb.add(dP_db0.getRow(i), -1.0); - d2Pi_dbrdb.mult(1.0 / delta); - } - this.setParameter(r, br0); - resultIndex++; - } - - return result; - - // final List result = new ArrayList(this - // .getChoiceSetSize()); - // for (int i = 0; i < this.getChoiceSetSize(); i++) { - // result.add(new Matrix(this.getParameterSize(withASC), this - // .getParameterSize(withASC))); - // } - // - // final Matrix dP_db0 = this.get_dProb_dParameters(withASC).copy(); - // for (int r = 0; r < this.getParameterSize(withASC); r++) { - // final double br0 = this.getParameter(r); - // this.setParameter(r, br0 + delta); - // for (int i = 0; i < this.getChoiceSetSize(); i++) { - // final Vector d2Pi_dbrdb = result.get(i).getRow(r); - // d2Pi_dbrdb.add(this.get_dProb_dParameters(withASC).getRow(i), - // +1.0); - // d2Pi_dbrdb.add(dP_db0.getRow(i), -1.0); - // d2Pi_dbrdb.mult(1.0 / delta); - // } - // this.setParameter(r, br0); - // } - // - // return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MatsimCalibratorDEPRECATED.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MatsimCalibratorDEPRECATED.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MatsimCalibratorDEPRECATED.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MatsimCalibratorDEPRECATED.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.matsim; - -import java.util.Random; - -import floetteroed.cadyts.calibrators.sampling.SamplingCalibrator; -import floetteroed.cadyts.demand.Plan; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public class MatsimCalibratorDEPRECATED extends SamplingCalibrator { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- CONSTRUCTION -------------------- - - public MatsimCalibratorDEPRECATED(final Random rnd, final double regressionInertia) { - super("calibration-log.txt", rnd.nextLong(), 3600); - this.setRegressionInertia(regressionInertia); - } - - public MatsimCalibratorDEPRECATED(final String logFile, final Random rnd, - final double regressionInertia) { - super(logFile, rnd.nextLong(), 3600); - this.setRegressionInertia(regressionInertia); - } - - // -------------------- MATSIM-SPECIFICS -------------------- - - public double getUtilityCorrection(final Plan plan) { - return super.calcLinearPlanEffect(plan); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MATSimUtilityModificationCalibrator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MATSimUtilityModificationCalibrator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MATSimUtilityModificationCalibrator.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/matsim/MATSimUtilityModificationCalibrator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.matsim; - -import java.util.Random; - -import floetteroed.cadyts.calibrators.analytical.AnalyticalCalibrator; -import floetteroed.cadyts.demand.Plan; - -/** - * - * This calibrator affects the MATSim choice distributions through utility - * corrections. For this, do the following in every iteration for every - * replanning agent: - * - * (1) obtain the utility correction for every plan in the considered agent's - * choice set with getUtilityCorrection(..); - * - * (2) let MATSim select a plan based on the modified utilities; - * - * (3) indicate the selectedPlan with registerChoice(..). - * - * Apart from this, the usual rules for calibration hold: configuration and - * measurement registration must be done before the iterations, and after every - * network loading a call to afterNetworkLoading(..) is necessary. - * - * @author Gunnar Flötteröd - * - */ -public class MATSimUtilityModificationCalibrator extends - AnalyticalCalibrator { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- CONSTRUCTION -------------------- - - public MATSimUtilityModificationCalibrator(final Random rnd, - final double regressionInertia) { - super("calibration-log.txt", rnd.nextLong(), 3600); - this.setRegressionInertia(regressionInertia); - } - - public MATSimUtilityModificationCalibrator(final String logFile, - final Random rnd, final double regressionInertia) { - super(logFile, rnd.nextLong(), 3600); - this.setRegressionInertia(regressionInertia); - } - - // -------------------- MATSIM-SPECIFICS -------------------- - - /** - * Call this before each replanning to evaluate all plans of every - * considered agent. - */ - public double getUtilityCorrection(final Plan plan) { - return super.calcLinearPlanEffect(plan); - } - - /** - * Call this before each network loading to indicate the selected plan of - * every considered agent. - */ - public void registerChoice(final Plan plan) { - super.addToDemand(plan); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgentCloner.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgentCloner.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgentCloner.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgentCloner.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.filebased.xml.XMLPopulationFileReader; -import floetteroed.cadyts.demand.ODRelation; -import floetteroed.cadyts.demand.PlanBuilder; - -/** - * - * @author Gunnar Flötteröd - * - */ -class SumoAgentCloner { - - // -------------------- MEMBERS -------------------- - - private final PlanBuilder planBuilder; - - private final Map, List> od2agentIDs; - - private final Set cloneAgentIDs; - - // -------------------- CONSTRUCTION -------------------- - - SumoAgentCloner(final PlanBuilder planBuilder) { - - if (planBuilder == null) { - throw new IllegalArgumentException("planBuilder is null"); - } - this.planBuilder = planBuilder; - - this.od2agentIDs = new LinkedHashMap, List>(); - this.cloneAgentIDs = new LinkedHashSet(); - } - - // -------------------- IMPLEMENTATION -------------------- - - Set getClonedAgentIDs() { - return this.cloneAgentIDs; - } - - void run(final String[] fileNames, final double demandScale) { - - if (fileNames == null) { - throw new IllegalArgumentException("file name is null"); - } - if (demandScale < 1 || demandScale > 2) { - throw new IllegalArgumentException("demand scale of " + demandScale - + " is not in [1,2]"); - } - - /* - * (1) analyze the population - */ - this.od2agentIDs.clear(); - for (String fileName : fileNames) { - if (fileName != null && fileName.length() > 0) { - Logger.getLogger(this.getClass().getName()).info( - "cloning file: " + fileName); - final XMLPopulationFileReader reader = new XMLPopulationFileReader(); - final SumoPopulationHandler handler = new SumoPopulationHandler( - this.planBuilder, null, 1.0); - reader.setPopulationHandler(handler); - for (SumoAgent agent : reader.getPopulationSource(fileName)) { - List agentIDs = this.od2agentIDs.get(agent - .getODRelation()); - if (agentIDs == null) { - agentIDs = new ArrayList(); - this.od2agentIDs.put(agent.getODRelation(), agentIDs); - } - agentIDs.add(agent.getId()); - } - } - } - - /* - * (2) define agents to be cloned - */ - this.cloneAgentIDs.clear(); - final double m = 1.0 / (demandScale - 1.0); // clone every m-th agent - int totalCnt = 0; - for (Map.Entry, List> entry : this.od2agentIDs - .entrySet()) { - double cnt = 0; - for (Object agentID : entry.getValue()) { - totalCnt++; - cnt++; - if (cnt >= m) { - this.cloneAgentIDs.add(agentID); - cnt -= m; - } - } - } - - Logger.getLogger(this.getClass().getName()).info( - "cloned " + this.cloneAgentIDs.size() + " out of " + totalCnt - + " agents"); - } - - // ----------------- MAIN-FUNCTION, ONLY FOR TESTING ----------------- - - public static void main(String[] args) { - SumoAgentCloner g = new SumoAgentCloner(new PlanBuilder()); - g.run(new String[] { "testdata/sumo/choiceset.xml", - "testdata/sumo/emptyChoiceSet.xml" }, 1.333); - System.out.println("DONE"); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgent.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgent.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgent.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoAgent.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import java.util.List; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.filebased.Agent; -import floetteroed.cadyts.demand.ODRelation; -import floetteroed.cadyts.demand.PlanChoiceDistribution; -import floetteroed.utilities.Tuple; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -class SumoAgent extends Agent> { - - // -------------------- MEMBERS -------------------- - - private final int dpt_s; - - private final ODRelation odRelation; - - private final boolean isClone; - - private final List> miscAttrs; - - // -------------------- CONSTRUCTION -------------------- - - SumoAgent(final String id, final int dpt_s, final String fromTAZ, - final String toTAZ, boolean isClone, - final List> miscAttrs) { - super(id, new PlanChoiceDistribution()); - this.dpt_s = dpt_s; - if (fromTAZ != null && toTAZ != null) { - this.odRelation = new ODRelation(fromTAZ, toTAZ); - } else { - this.odRelation = null; - } - this.isClone = isClone; - this.miscAttrs = miscAttrs; - } - - SumoAgent(final String id, final int dpt_s, final String fromTAZ, - final String toTAZ, final List> miscAttrs) { - this(id, dpt_s, fromTAZ, toTAZ, false, miscAttrs); - } - - SumoAgent(final SumoAgent parent, final String idPostfix) { - this(parent.getId() + idPostfix, parent.getDptTime_s(), parent - .getFromTAZ(), parent.getToTAZ(), true, parent.getMiscAttrs()); - final List plans = parent.getPlans(); - final Vector probs = parent.getPlanChoiceModel() - .getChoiceProbabilities(plans); - for (int i = 0; i < plans.size(); i++) { - this.addPlan(plans.get(i), probs.get(i)); - } - } - - // -------------------- CONTENT WRITE ACCESS -------------------- - - void addPlan(final SumoPlan plan, final double choiceProb) { - Logger.getLogger(this.getClass().getName()).fine( - "agent " + this.getId() + " received route " - + plan.getRouteId()); - this.addPlan(plan); - this.getPlanChoiceModel().addChoiceProbability(choiceProb); - } - - // -------------------- CONTENT READ ACCESS -------------------- - - int getDptTime_s() { - return this.dpt_s; - } - - ODRelation getODRelation() { - return this.odRelation; - } - - String getFromTAZ() { - return (this.getODRelation() != null ? this.getODRelation() - .getFromTAZ() : null); - } - - String getToTAZ() { - return (this.getODRelation() != null ? this.getODRelation().getToTAZ() - : null); - } - - boolean isClone() { - return this.isClone; - } - - List> getMiscAttrs() { - return this.miscAttrs; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoCalibrator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoCalibrator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoCalibrator.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoCalibrator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.analytical.AnalyticalCalibrator; -import floetteroed.utilities.DynamicData; - -/** - * - * @author Gunnar Flötteröd - * - */ -class SumoCalibrator extends AnalyticalCalibrator { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - static final double DEFAULT_DEMAND_SCALE = 1.0; - - static final boolean DEFAULT_OVERRIDE_TRAVELTIMES = false; - - static final String DEFAULT_FMA_PREFIX = null; - - static final String DEFAULT_CLONE_POSTFIX = "-CLONE"; - - // -------------------- MEMBERS -------------------- - - private double demandScale = DEFAULT_DEMAND_SCALE; - - private boolean overrideTravelTimes = DEFAULT_OVERRIDE_TRAVELTIMES; - - private DynamicData travelTimes; - - private String fmaPrefix = DEFAULT_FMA_PREFIX; - - private String clonePostfix = DEFAULT_CLONE_POSTFIX; - - // -------------------- CONSTRUCTION -------------------- - - SumoCalibrator(final String logFile, final Long randomSeed, - final int binSize_s) { - super(logFile, randomSeed, binSize_s); - Logger.getLogger(this.myName).info( - "default demandScale is " + this.demandScale); - Logger.getLogger(this.myName).info( - "default overrideTravelTimes is " + this.overrideTravelTimes); - Logger.getLogger(this.myName).info( - "default fmaPrefix is " + this.fmaPrefix); - Logger.getLogger(this.myName).info( - "default clonePostfix is " + this.clonePostfix); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - void setDemandScale(final double demandScale) { - if (demandScale < 1) { - throw new IllegalArgumentException( - "demandScale must not be smaller than one"); - } - this.demandScale = demandScale; - Logger.getLogger(this.getClass().getName()).info( - "set demandScale to " + this.demandScale); - } - - double getDemandScale() { - return this.demandScale; - } - - void setOverrideTravelTimes(final boolean overrideTravelTimes) { - this.overrideTravelTimes = overrideTravelTimes; - Logger.getLogger(this.myName).info( - "set overrideTravelTimes to " + this.overrideTravelTimes); - } - - boolean getOverrideTravelTimes() { - return this.overrideTravelTimes; - } - - void overrideTravelTimes(final DynamicData travelTimes) { - if (!this.overrideTravelTimes) { - Logger.getLogger(this.myName).warning( - "ignoring call to overrideTravelTimes(..)"); - return; - } - if (this.travelTimes == null) { - this.travelTimes = travelTimes; - } else { - this.travelTimes.overrideWithNonZeros(travelTimes); - } - Logger.getLogger(this.myName).fine("overrode travelTimes"); - } - - DynamicData getTravelTimes() { - return this.travelTimes; - } - - void setFmaPrefix(final String fmaPrefix) { - this.fmaPrefix = fmaPrefix; - Logger.getLogger(this.myName) - .info("set fmaPrefix to " + this.fmaPrefix); - } - - String getFmaPrefix() { - return this.fmaPrefix; - } - - void setClonePostfix(final String clonePostfix) { - if (clonePostfix == null) { - throw new IllegalArgumentException("clonePostfix is null"); - } - this.clonePostfix = clonePostfix; - Logger.getLogger(this.myName).info( - "set clonePostfix to " + this.clonePostfix); - } - - String getClonePostfix() { - return this.clonePostfix; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoChoiceWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoChoiceWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoChoiceWriter.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoChoiceWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,160 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.CHOICEPROB_ATTR; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.DEPART_ATTR; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.EDGES_ATTR; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.EXITTIMES_ATTR; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.FROMTAZ_ATTR; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.ROUTE_ELEM; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.TOTAZ_ATTR; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.VEHICLEID_ATTR; -import static floetteroed.cadyts.interfaces.sumo.SumoPopulationHandler.VEHICLE_ELEM; -import static floetteroed.utilities.XMLHelpers.writeAttr; - -import java.io.IOException; -import java.io.PrintWriter; - -import floetteroed.cadyts.calibrators.filebased.ChoiceFileWriter; -import floetteroed.cadyts.demand.PlanStep; -import floetteroed.utilities.Tuple; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SumoChoiceWriter implements ChoiceFileWriter { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - static final String ROUTE_ALTERNATIVES = "route-alternatives"; - - // -------------------- MEMBERS -------------------- - - private transient PrintWriter writer = null; - - // -------------------- CONSTRUCTION -------------------- - - SumoChoiceWriter() { - } - - // --------------- IMPLEMENTATION OF ChoiceFileWriter --------------- - - @Override - public void open(final String choiceFile) throws IOException { - this.writer = new PrintWriter(choiceFile); - - this.writer.write("<"); - this.writer.write(ROUTE_ALTERNATIVES); - this.writer.write(">"); - this.writer.println(); - } - - @Override - public void write(final SumoAgent agent, final SumoPlan plan) - throws IOException { - - if (plan.isStayAtHome()) { - return; - } - - this.writer.write("<"); - this.writer.write(VEHICLE_ELEM); - this.writer.write(" "); - writeAttr(VEHICLEID_ATTR, agent.getId(), this.writer); - writeAttr(DEPART_ATTR, agent.getDptTime_s(), this.writer); - if (agent.getODRelation() != null) { - writeAttr(FROMTAZ_ATTR, agent.getODRelation().getFromTAZ(), - this.writer); - writeAttr(TOTAZ_ATTR, agent.getODRelation().getToTAZ(), this.writer); - } - if (agent.getMiscAttrs() != null) { - for (Tuple miscAttr : agent.getMiscAttrs()) { - writeAttr(miscAttr.getA(), miscAttr.getB(), this.writer); - } - } - - this.writer.write(">"); - this.writer.println(); - - final StringBuffer edges = new StringBuffer(); - final StringBuffer exits = new StringBuffer(); - - // >>>>> TODO BUGFIX STARTING HERE >>>>> - String lastLink = plan.getStartLink(); - for (PlanStep step : plan.getPlan4fileDump()) { - edges.append(lastLink); - edges.append(" "); - exits.append(step.getEntryTime_s()); - exits.append(" "); - lastLink = step.getLink(); - } - edges.append(lastLink); - exits.append(plan.getExitTime_s()); - // <<<<< TODO BUGFIX ENDING HERE <<<<< - - // >>>>> TODO ORIGINAL STARTING HERE >>>>> - // String lastLink = plan.getStartLink(); - // for (PlanStep step : plan) { - // edges.append(lastLink); - // edges.append(" "); - // exits.append(step.getEntryTime_s()); - // exits.append(" "); - // lastLink = step.getLink(); - // } - // edges.append(lastLink); - // exits.append(plan.getExitTime_s()); - // <<<<< TODO ORIGINAL ENDING HERE - - this.writer.write(" <"); - this.writer.write(ROUTE_ELEM); - this.writer.write(" "); - // writeAttr(ROUTEID_ATTR, plan.getRouteId(), this.writer); - writeAttr(EDGES_ATTR, edges.toString(), this.writer); - writeAttr(EXITTIMES_ATTR, exits.toString(), this.writer); - writeAttr(CHOICEPROB_ATTR, "1", this.writer); - this.writer.write("/>"); - this.writer.println(); - - this.writer.write(""); - this.writer.println(); - } - - @Override - public void close() throws IOException { - writer.write(""); - this.writer.println(); - writer.flush(); - writer.close(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoController.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoController.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoController.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoController.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,224 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import static floetteroed.cadyts.interfaces.sumo.SumoCalibrator.DEFAULT_CLONE_POSTFIX; -import static floetteroed.cadyts.interfaces.sumo.SumoCalibrator.DEFAULT_OVERRIDE_TRAVELTIMES; - -import java.io.IOException; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.filebased.ChoiceFileWriter; -import floetteroed.cadyts.calibrators.filebased.FileBasedController; -import floetteroed.cadyts.calibrators.filebased.PopulationFileReader; -import floetteroed.cadyts.calibrators.filebased.xml.XMLPopulationFileReader; -import floetteroed.cadyts.demand.ODRelation; -import floetteroed.cadyts.interfaces.defaults.BasicMeasurementLoaderStringLinks; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.commandlineparser.CommandLineParser; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SumoController extends - FileBasedController { - - // -------------------- CONSTANTS -------------------- - - public static final String DEMANDSCALE_KEY = "-demandscale"; - public static final String OVERRIDETT_KEY = "-overridett"; - public static final String FMAPREFIX_KEY = "-fmaprefix"; - public static final String CLONEPOSTFIX_KEY = "-clonepostfix"; - - // -------------------- extending the INIT stage -------------------- - - @Override - protected SumoCalibrator newCalibrator(final CommandLineParser clp) { - final String logFile = clp.containsKey(LOGFILE_KEY) ? clp - .getString(LOGFILE_KEY) : "calibration-log.txt"; - final SumoCalibrator result = new SumoCalibrator(logFile, clp - .getLong(RNDSEED_KEY), clp.getInteger(BINSIZE_KEY)); - return result; - } - - @Override - protected void prepareCommandLineParserINIT(final CommandLineParser clp) { - super.prepareCommandLineParserINIT(clp); - clp.defineParameter(DEMANDSCALE_KEY, false, Double - .toString(SumoCalibrator.DEFAULT_DEMAND_SCALE), - "demand is artifically scaled up by this factor"); - clp.defineParameter(OVERRIDETT_KEY, false, Boolean - .toString(DEFAULT_OVERRIDE_TRAVELTIMES), - "if plan travel times are to be overriden" - + " from dump file travel times"); - clp.defineParameter(FMAPREFIX_KEY, false, null, - "prefix of OD matrix files in visum format"); - clp.defineParameter(CLONEPOSTFIX_KEY, false, DEFAULT_CLONE_POSTFIX, - "postfix attached to clone ids"); - } - - @Override - protected void prepareCalibratorINIT(final SumoCalibrator calibrator, - final CommandLineParser clp) { - super.prepareCalibratorINIT(calibrator, clp); - calibrator.setDemandScale(clp.getDouble(DEMANDSCALE_KEY)); - calibrator.setOverrideTravelTimes(clp.getBoolean(OVERRIDETT_KEY)); - calibrator.setFmaPrefix(clp.getString(FMAPREFIX_KEY)); - calibrator.setClonePostfix(clp.getString(CLONEPOSTFIX_KEY)); - } - - @Override - protected void loadMeasurements(SumoCalibrator calibrator, String measFile) { - if (measFile == null) { - Logger.getLogger(this.getClass().getName()).warning( - "no measurement file specified"); - return; - } - (new BasicMeasurementLoaderStringLinks(calibrator)).load(measFile); - } - - // -------------------- extending the CHOICE stage -------------------- - - private DynamicData> odMatrix = null; - - @Override - protected PopulationFileReader newPopulationReader( - final SumoCalibrator calibrator, final CommandLineParser clp) { - - final XMLPopulationFileReader reader = new XMLPopulationFileReader(); - SumoPopulationHandler populationHandler = new SumoPopulationHandler( - calibrator.newPlanBuilder(), calibrator.getTravelTimes(), - calibrator.getDemandScale()); - reader.setPopulationHandler(populationHandler); - - if (calibrator.getDemandScale() > 1.0) { - final SumoAgentCloner cloner = new SumoAgentCloner(calibrator - .newPlanBuilder()); - cloner.run(clp.getString(CHOICESETFILE_KEY).split( - FILENAME_SEPARATOR_REGEX), calibrator.getDemandScale()); - // could move this to INIT and store the cloned agents in Calibrator - populationHandler.setClonedAgentIDs(cloner.getClonedAgentIDs(), - calibrator.getClonePostfix()); - } - - return reader; - } - - @Override - protected ChoiceFileWriter newChoiceFileWriter( - final SumoCalibrator calibrator) { - return new SumoChoiceWriter(); - } - - @Override - protected void selectPlans(final SumoCalibrator calibrator, - final CommandLineParser clp) throws IOException { - - if (calibrator.getFmaPrefix() != null) { - this.odMatrix = new DynamicData>(0, calibrator - .getTimeBinSize_s(), (int) Math - .ceil(24.0 * 3600.0 / calibrator.getTimeBinSize_s())); - } else { - this.odMatrix = null; - } - - super.selectPlans(calibrator, clp); - - if (calibrator.getFmaPrefix() != null) { - try { - Logger.getLogger(this.getClass().getName()).info( - "writing files " + calibrator.getFmaPrefix() + "[..]"); - (new SumoODWriter()).write(this.odMatrix, calibrator - .getFmaPrefix()); - } catch (IOException e) { - Logger.getLogger(this.getClass().getName()).warning( - "unable to write files " + calibrator.getFmaPrefix() - + "[..]"); - } - } - } - - @Override - protected void afterChoice(final SumoCalibrator calibrator, - final SumoAgent agent, final SumoPlan plan) { - - super.afterChoice(calibrator, agent, plan); - - if (this.odMatrix != null) { - for (int i = 0; i < agent.getPlans().size(); i++) { - double moveProb = 0; - if (!agent.getPlans().get(i).isStayAtHome()) { - moveProb += calibrator.getLastChoiceProb(i); - } - final ODRelation key = agent.getODRelation(); - if (key != null) { - // TODO bin(..) does not check for bounds - this.odMatrix.add(key, this.odMatrix.bin(agent - .getDptTime_s()), moveProb); - } - } - } - } - - // -------------------- extending the UPDATE stage -------------------- - - @Override - protected void update(final SumoCalibrator calibrator, - final CommandLineParser clp) { - - if (clp.getString(NETFILE_KEY) == null) { - Logger.getLogger(this.getClass().getName()).warning( - "no network conditions file specified"); - return; - } - - final SumoFlowLoader loader = new SumoFlowLoader(calibrator); - loader.load(clp.getString(NETFILE_KEY)); - calibrator.setFlowAnalysisFile(clp.getString(FLOWFILE_KEY)); - calibrator.afterNetworkLoading(loader.getResults()); - - calibrator.overrideTravelTimes(loader.getTravelTimes()); - } - - // -------------------- MAIN FUNCTION -------------------- - - public static void main(String[] args) { - final StringBuffer msg = new StringBuffer("processing call: "); - if (args != null) { - for (String arg : args) { - msg.append(arg); - msg.append(" "); - } - } - Logger.getLogger(SumoController.class.getName()).info(msg.toString()); - try { - (new SumoController()).run(args); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoFlowLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoFlowLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoFlowLoader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoFlowLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,221 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import java.util.logging.Logger; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.Attributes; -import org.xml.sax.helpers.DefaultHandler; - -import floetteroed.cadyts.measurements.SingleLinkMeasurement; -import floetteroed.cadyts.supply.BasicSimResults; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.Units; - -/** - * - * @author Gunnar Flötteröd - * - */ -class SumoFlowLoader extends DefaultHandler { - - // -------------------- CONSTANTS -------------------- - - static final String INTERVAL_ELEM = "interval"; - - static final String START_ATTR = "begin"; - - static final String END_ATTR = "end"; - - static final String EDGE_ELEM = "edge"; - - static final String ID_ATTR = "id"; - - static final String ENTERED_ATTR = "entered"; - - static final String ARRIVED_ATTR = "arrived"; - - static final String DEPARTED_ATTR = "departed"; - - static final String TT_ATTR = "traveltime"; - - // -------------------- MEMBERS -------------------- - - private final SumoCalibrator calibrator; - - private final BasicSimResults result; - - private final DynamicData flowResult; - - private final DynamicData countResult; - - private final DynamicData ttResult; - - private int start_s = 0; - - private int end_s = 0; - - // -------------------- CONSTRUCTION -------------------- - - SumoFlowLoader(final SumoCalibrator calibrator) { - - if (calibrator == null) { - throw new IllegalArgumentException("calibrator is null"); - } - this.calibrator = calibrator; - - this.result = new BasicSimResults(0, calibrator - .getTimeBinSize_s(), ((int) Units.S_PER_D) - / calibrator.getTimeBinSize_s()); - this.flowResult = this.result - .getSimResults(SingleLinkMeasurement.TYPE.FLOW_VEH_H); - this.countResult = this.result - .getSimResults(SingleLinkMeasurement.TYPE.COUNT_VEH); - this.ttResult = new DynamicData(this.countResult - .getStartTime_s(), this.countResult.getBinSize_s(), - this.countResult.getBinCnt()); - } - - // -------------------- IMPLEMENTATION -------------------- - - void load(final String fileName) { - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - final SAXParser saxParser = factory.newSAXParser(); - saxParser.parse(fileName, this); - } catch (Exception e) { - e.printStackTrace(); - } - } - - BasicSimResults getResults() { - return this.result; - } - - DynamicData getTravelTimes() { - return this.ttResult; - } - - // -------------------- INTERNALS -------------------- - - private void checkTimes(final int start_s, final int end_s, - final int binSize_s, final int bin) { - if (start_s != bin * binSize_s) { - Logger.getLogger(this.getClass().getName()).warning( - "flow start time " + start_s - + " s is not the beginning of a " + binSize_s - + " s time bin; corrected into " - + (bin * binSize_s) + " s"); - } - if (end_s != (bin + 1) * binSize_s) { - Logger.getLogger(this.getClass().getName()).warning( - "flow end time " + end_s + " s is not " + binSize_s - + " s larger than (proper) start time; " - + "corrected into " + ((bin + 1) * binSize_s) - + " s"); - } - } - - public void startFlow(final double flow_veh, final int start_s, - final int end_s, final String link) { - final int binSize_s = this.flowResult.getBinSize_s(); - // TODO bin(..) does not check for bounds - final int bin = this.flowResult.bin(start_s); - this.checkTimes(start_s, end_s, binSize_s, bin); - - this.countResult.put(link, bin, flow_veh); - final double flow_veh_h = flow_veh / (end_s - start_s) * 3600.0; - this.flowResult.put(link, bin, flow_veh_h); - } - - public void startTT(double tt_s, int start_s, int end_s, String link) { - final int binSize_s = this.flowResult.getBinSize_s(); - // TODO bin(..) does not check for bounds - final int bin = this.flowResult.bin(start_s); - this.checkTimes(start_s, end_s, binSize_s, bin); - this.ttResult.put(link, bin, tt_s); - } - - // -------------------- OVERRIDING OF DefaultHandler -------------------- - - @Override - public void startElement(String namespaceURI, String sName, String qName, - Attributes attrs) { - if (INTERVAL_ELEM.equals(qName)) { - this.start_s = (int) Math.round(Double.parseDouble(attrs - .getValue(START_ATTR))); - this.end_s = (int) Math.round(Double.parseDouble(attrs - .getValue(END_ATTR))); - if (this.start_s < 0) { - Logger.getLogger(this.getClass().getName()).warning( - "start time is negative; corrected"); - this.start_s = 0; - } - if (this.end_s > Units.S_PER_D) { - Logger.getLogger(this.getClass().getName()).warning( - "end time goes beyond one day; corrected"); - this.end_s = (int) Units.S_PER_D; - } - if (this.start_s >= this.end_s) { - Logger.getLogger(this.getClass().getName()).warning( - "meaningless time interval [" + start_s + ", " + end_s - + ") s; ignored"); - } - } else if (EDGE_ELEM.equals(qName) && (this.start_s < this.end_s)) { - - final String linkId = attrs.getValue(ID_ATTR); - // final double flow_veh = Integer.parseInt(attrs - // .getValue(ENTERED_ATTR)); - double flow_veh = Integer.parseInt(attrs.getValue(ENTERED_ATTR)); - if (this.calibrator.getCountFirstLink()) { - flow_veh += Integer.parseInt(attrs.getValue(DEPARTED_ATTR)); - } - if (!this.calibrator.getCountLastLink()) { - flow_veh -= Integer.parseInt(attrs.getValue(ARRIVED_ATTR)); - } - if (flow_veh < 0) { - Logger - .getLogger(this.getClass().getName()) - .warning( - "simulated flow on link " - + linkId - + " is " - + flow_veh - + " (probably because too many arrived vehicles were " - + "subtracted from entered vehicles)"); - } - this.startFlow(flow_veh, this.start_s, this.end_s, linkId); - - final String ttString = attrs.getValue(TT_ATTR); - if (ttString != null) { - final double tt_s = Double.parseDouble(ttString); - this.startTT(tt_s, this.start_s, this.end_s, linkId); - } - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoODWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoODWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoODWriter.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoODWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import java.io.FileNotFoundException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.List; -import java.util.SortedSet; -import java.util.TreeSet; - -import floetteroed.cadyts.demand.ODRelation; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.math.Matrix; - -/** - * - * Writes time-dependent OD matrices as a sequence of visum OD matrix files. - * - * @author Gunnar Flötteröd - * - */ -class SumoODWriter { - - // -------------------- CONSTRUCTION -------------------- - - SumoODWriter() { - } - - // -------------------- IMPLEMENTATION -------------------- - - private List extractZones(final DynamicData> od) { - final SortedSet zones = new TreeSet(); - for (ODRelation key : od.keySet()) { - zones.add(key.getFromTAZ()); - zones.add(key.getToTAZ()); - } - return new ArrayList(zones); - } - - private Matrix tripMatrix(final DynamicData> od, - final int bin, final List zones) { - final Matrix result = new Matrix(zones.size(), zones.size()); - for (int i = 0; i < zones.size(); i++) { - for (int j = 0; j < zones.size(); j++) { - final ODRelation key = new ODRelation(zones - .get(i), zones.get(j)); - result.getRow(i).set(j, od.getBinValue(key, bin)); - } - } - return result; - } - - void write(final DynamicData> od, final String filePrefix) - throws FileNotFoundException { - - final List zones = this.extractZones(od); - - for (int bin = 0; bin < od.getBinCnt(); bin++) { - - final Matrix tripMatrix = this.tripMatrix(od, bin, zones); - if (tripMatrix.frobeniusNorm() > 0) { - - final int h_start = od.binStart_s(bin) / 3600; - final int m_start = (od.binStart_s(bin) - h_start * 3600) / 60; - final int h_end = od.binStart_s(bin + 1) / 3600; - final int m_end = (od.binStart_s(bin + 1) - h_end * 3600) / 60; - - final PrintWriter writer = new PrintWriter(filePrefix + "_" - + h_start + "h" + m_start + "m-" + h_end + "h" + m_end - + "m.fma"); - writer.println("$VMR"); - writer.println("* vehicle type"); - writer.println("0"); - writer.println("* from-time to-time"); - writer.println(h_start + "." + m_start + " " + h_end + "." - + m_end); - writer.println("* factor"); - writer.println("1.0"); - writer.println("* district number"); - writer.println(zones.size()); - writer.println("* names"); - for (String zone : zones) { - writer.print("\t" + zone); - } - writer.println(); - writer.println("*"); - for (int i = 0; i < zones.size(); i++) { - writer.println("* district " + zones.get(i) + " sum = " - + tripMatrix.getRow(i).sum()); - for (int j = 0; j < zones.size(); j++) { - writer.print("\t" + tripMatrix.getRow(i).get(j)); - } - writer.println(); - } - writer.flush(); - writer.close(); - } - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPlan.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPlan.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPlan.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPlan.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,251 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import static java.lang.Math.max; -import static java.lang.Math.min; - -import java.util.Iterator; -import java.util.List; - -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.demand.PlanBuilder; -import floetteroed.cadyts.demand.PlanStep; -import floetteroed.utilities.DynamicData; - -/** - * - * @author Gunnar Flötteröd - * - */ -class SumoPlan implements Plan { - - // -------------------- MEMBERS -------------------- - - private final int routeId; - - private final String startLink; - - private final Plan plan; - - private final int exitTime_s; - - // TODO BUGFIX - private final Plan plan4fileDump; - - // -------------------- CONSTRUCTION -------------------- - - /** - * @param startTime_s - * start time of this route - * @param edges - * list of edges as contained in SUMO XML file - * @param exits - * list of integer(!) exit times as contained in SUMO XML file - * @param travelTimes - * optional travel time information (if non-null, overrides - * travel time information contained in exits parameters) - */ - SumoPlan(final int routeId, final int startTime_s, - final List edges, final List exits, - final DynamicData travelTimes, - final PlanBuilder factory) { - - this.routeId = routeId; - - if (edges.size() == 0) { - /* - * "Stay at home" route. exitTime_s receives a meaningless value. - */ - this.startLink = null; - this.plan = null; - this.exitTime_s = startTime_s; - - // TODO BUGFIX - this.plan4fileDump = null; - } else { - /*- - * A real route that describes a physical movement through the - * network. Requires to translate the SUMO route representation - * into the internal plan format. - * - * Example route: - * - * link 1 link 2 link 3 - * o----------------o----------------o----------------o - * ^ ^ ^ ^ - * entry reach node reach node exit - * at t=0 at t=5 at t=10 at t=15 - * - * SUMO representation: - * 1. enter network at t=0 - * 2. leave link 1 at t=5 - * 3. leave link 2 at t=10 - * 4. leave link 3 at t=15 - * => edges and exits parameters of this constructor have 3 entries - * - * internal representation: - * 1. enter network on link 1 at t=0 - * 2. enter link 2 at t=5 - * 3. enter link 3 at t=10 - * 4. leave network at t=15 - * remark: since sensors are assumed to be located at the very - * upstream end of a link, only steps 2 and 3 are evaluated - * in the calibration - */ - - /* - * If travelTimes are specified, the exit times are accordingly - * adjusted. This is important when there is no router within the - * calibration loop because the calibration changes the agent - * behavior: this also results in changed network conditions and - * changed travel times, which should be reflected in the exit times - * (that otherwise remain unchanged because a fixed route - * alternative file is used). - * - * This implementation assumes downstream queues in that the agent - * experiences the full (adjusted) travel time on the upstream link - * but only the original travel time on the downstream link. - */ - if (travelTimes != null) { - - // memorize the travel time on the last link - final int lastLinkTT_s; - if (exits.size() > 1) { - lastLinkTT_s = exits.get(exits.size() - 1) - - exits.get(exits.size() - 2); - } else if (exits.size() == 1) { - lastLinkTT_s = exits.get(exits.size() - 1) - startTime_s; - } else { - throw new RuntimeException("route " + routeId + " has " - + edges.size() + " edges but " + exits.size() - + " exit times"); - } - - // update travel times across intermediate links - int time_s = startTime_s; - for (int i = 0; i < exits.size() - 1; i++) { - final int bin = max(0, min(travelTimes.bin(time_s), - travelTimes.getBinCnt() - 1)); - time_s += travelTimes.getBinValue(edges.get(i), bin); - exits.set(i, time_s); - } - - // use memorized travel time on the last link - time_s += lastLinkTT_s; - exits.set(exits.size() - 1, time_s); - } - - /* - * Build the internal plan format given the (possibly adjusted) exit - * times. - */ - this.startLink = edges.get(0); - // final PlanBuilder factory = new PlanBuilder(); - factory.reset(); - factory.addEntry(this.startLink, startTime_s); - for (int i = 1; i < edges.size(); i++) { - factory.addTurn(edges.get(i), exits.get(i - 1)); - } - this.exitTime_s = exits.get(exits.size() - 1); - factory.addExit(this.exitTime_s); - this.plan = factory.getResult(); - - /* - * TODO BUGFIX - */ - final PlanBuilder planBuilder4fileDump = new PlanBuilder(); - planBuilder4fileDump.reset(); - planBuilder4fileDump.addEntry(this.startLink, startTime_s); - for (int i = 1; i < edges.size(); i++) { - planBuilder4fileDump.addTurn(edges.get(i), exits.get(i - 1)); - } - planBuilder4fileDump.addExit(this.exitTime_s); - this.plan4fileDump = planBuilder4fileDump.getResult(); - } - } - - // -------------------- CONTENT ACCESS -------------------- - - int getRouteId() { - return this.routeId; - } - - String getStartLink() { - return this.startLink; - } - - int getExitTime_s() { - return this.exitTime_s; - } - - boolean isStayAtHome() { - return (this.plan == null); - } - - // TODO BUGFIX - Plan getPlan4fileDump() { - return this.plan4fileDump; - } - - // --------------- IMPLEMENTATION OF Plan --------------- - - @Override - public Iterator> iterator() { - if (this.isStayAtHome()) { - return new Iterator>() { - @Override - public boolean hasNext() { - return false; - } - - @Override - public PlanStep next() { - return null; - } - - @Override - public void remove() { - } - }; - } else { - return this.plan.iterator(); - } - } - - @Override - public PlanStep getStep(final int i) { - return this.plan.getStep(i); - } - - @Override - public int size() { - if (this.isStayAtHome()) { - return 0; - } else { - return this.plan.size(); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPopulationHandler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPopulationHandler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPopulationHandler.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/interfaces/sumo/SumoPopulationHandler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,185 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.interfaces.sumo; - -import static floetteroed.utilities.XMLHelpers.DOUBLE2INT_EXTRACTOR; -import static floetteroed.utilities.XMLHelpers.extractItems; -import static java.lang.Double.parseDouble; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.logging.Logger; - -import org.xml.sax.Attributes; - -import floetteroed.cadyts.calibrators.filebased.xml.PopulationHandler; -import floetteroed.cadyts.demand.PlanBuilder; -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.Tuple; - -/** - * - * @author Gunnar Flötteröd - * - */ -class SumoPopulationHandler extends PopulationHandler { - - // -------------------- CONSTANTS -------------------- - - static final String VEHICLE_ELEM = "vehicle"; - - static final String VEHICLEID_ATTR = "id"; - - static final String DEPART_ATTR = "depart"; - - static final String FROMTAZ_ATTR = "fromtaz"; - - static final String TOTAZ_ATTR = "totaz"; - - static final String ROUTE_ELEM = "route"; - - static final String EDGES_ATTR = "edges"; - - static final String EXITTIMES_ATTR = "exitTimes"; - - static final String CHOICEPROB_ATTR = "probability"; - - // -------------------- MEMBERS -------------------- - - private final DynamicData travelTimes; - - private final PlanBuilder planBuilder; - - private final double demandScale; - - private final double stayAtHomeProb; - - private Set clonedAgentIDs = null; - - private String clonePostfix = null; - - private SumoAgent tempAgent = null; - - // -------------------- CONSTRUCTION -------------------- - - SumoPopulationHandler(final PlanBuilder planBuilder, - final DynamicData travelTimes, final double demandScale) { - - if (planBuilder == null) { - throw new IllegalArgumentException("planBuilder is null"); - } - this.planBuilder = planBuilder; - - this.travelTimes = travelTimes; - Logger.getLogger(this.getClass().getName()).fine( - "travelTimes is " + (this.travelTimes == null ? "" : "not ") - + "null"); - - if (demandScale < 1 || demandScale > 2) { - throw new IllegalArgumentException("demandScale of " + demandScale - + " is not in [1,2]"); - } - this.demandScale = demandScale; - this.stayAtHomeProb = (demandScale - 1.0) / demandScale; - } - - void setClonedAgentIDs(final Set clonedAgentIDs, - final String clonePostfix) { - if (clonePostfix == null && clonedAgentIDs != null) { - throw new IllegalArgumentException("clonePostfix is null"); - } - this.clonePostfix = clonePostfix; - this.clonedAgentIDs = clonedAgentIDs; - } - - // -------------------- OVERRIDING OF DefaultHandler -------------------- - - private List> extractMiscAttrs( - final Attributes allAttrs) { - final List> result = new ArrayList>(); - for (int i = 0; i < allAttrs.getLength(); i++) { - final String name = allAttrs.getQName(i); - if ((!VEHICLEID_ATTR.equals(name)) && (!DEPART_ATTR.equals(name)) - && (!FROMTAZ_ATTR.equals(name)) - && (!TOTAZ_ATTR.equals(name))) { - final String value = allAttrs.getValue(i); - result.add(new Tuple(name, value)); - } - } - return result; - } - - @Override - public void startElement(String namespaceURI, String sName, String qName, - Attributes attrs) { - if (VEHICLE_ELEM.equals(qName)) { - final String agentId = attrs.getValue(VEHICLEID_ATTR); - final int dpt_s = DOUBLE2INT_EXTRACTOR.extract(attrs - .getValue(DEPART_ATTR)); - final String fromTAZ = attrs.getValue(FROMTAZ_ATTR); - final String toTAZ = attrs.getValue(TOTAZ_ATTR); - final List> miscAttrs = this - .extractMiscAttrs(attrs); - this.tempAgent = new SumoAgent(agentId, dpt_s, fromTAZ, toTAZ, - miscAttrs); - if (this.stayAtHomeProb > 0) { - final SumoPlan stayAtHomePlan = new SumoPlan(this.tempAgent - .getPlans().size(), dpt_s, new ArrayList(0), - new ArrayList(0), this.travelTimes, - this.planBuilder); - this.tempAgent.addPlan(stayAtHomePlan, this.stayAtHomeProb); - } - } else if (ROUTE_ELEM.equals(qName)) { - final List edges = extractItems(attrs.getValue(EDGES_ATTR)); - final List exits = extractItems(attrs - .getValue(EXITTIMES_ATTR), DOUBLE2INT_EXTRACTOR); - if (edges.size() != exits.size()) { - throw new RuntimeException("vehicle " + this.tempAgent.getId() - + ": there are " + edges.size() + " edges but " - + exits.size() + " exit times in its route."); - } - final int routeId = this.tempAgent.getPlans().size(); - final double prob = parseDouble(attrs.getValue(CHOICEPROB_ATTR)) - / this.demandScale; - final SumoPlan newPlan = new SumoPlan(routeId, this.tempAgent - .getDptTime_s(), edges, exits, this.travelTimes, - this.planBuilder); - this.tempAgent.addPlan(newPlan, prob); - } - } - - @Override - public void endElement(String uri, String lName, String qName) { - if (VEHICLE_ELEM.equals(qName)) { - this.putNextAgent(this.tempAgent); - if (this.clonedAgentIDs != null - && this.clonedAgentIDs.contains(this.tempAgent.getId())) { - this.putNextAgent(new SumoAgent(this.tempAgent, "-CLONE" - + this.clonePostfix)); - } - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/MultiLinkMeasurement.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/MultiLinkMeasurement.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/MultiLinkMeasurement.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/MultiLinkMeasurement.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,227 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.measurements; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.Calibrator; -import floetteroed.cadyts.calibrators.TimedElement; -import floetteroed.cadyts.demand.Demand; -import floetteroed.cadyts.demand.PlanStep; -import floetteroed.cadyts.supply.LinkLoading; -import floetteroed.cadyts.supply.SimResults; -import floetteroed.utilities.math.SignalSmoother; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class MultiLinkMeasurement implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- CONSTANT MEMBERS -------------------- - - private final int value_veh; - - private final double eta; - - // -------------------- MEMBERS -------------------- - - private double sensitivity; - - // temporary -- non-null only before init(..) - - private List tempLinkList = new ArrayList(); - - private List tempTimes = new ArrayList(); - - // permanent -- non-null only after init(..) - - private Calibrator calibrator = null; - - private SignalSmoother avgMatches_veh = null; - - private List> loadings = null; - - private Set observedLinks = null; - - // -------------------- CONSTRUCTION -------------------- - - public MultiLinkMeasurement(final int value_veh, final double detectionRate) { - if (value_veh < 0) { - throw new IllegalArgumentException("count must not be negative"); - } - if (detectionRate <= 0.0 || detectionRate > 1.0) { - throw new IllegalArgumentException("detection rate of " - + detectionRate + " is not in (0,1]"); - } - this.value_veh = value_veh; - this.eta = detectionRate; - this.sensitivity = 0.0; - } - - public void init(final Calibrator calibrator) { - if (calibrator == null) { - throw new IllegalArgumentException("calibrator must not be null"); - } else if (this.calibrator != null) { - Logger.getLogger(this.getClass().getName()).warning( - "init(..) has already been called; this call is ignored"); - } else { - this.calibrator = calibrator; - this.avgMatches_veh = new SignalSmoother(1.0 - calibrator - .getRegressionInertia()); - this.loadings = new ArrayList>(); - this.observedLinks = new LinkedHashSet(); - for (int i = 0; i < this.tempLinkList.size(); i++) { - final LinkLoading loading = calibrator.newLinkLoading( - this.tempLinkList.get(i), this.tempTimes.get(i) - .getStartTime_s(), this.tempTimes.get(i) - .getEndTime_s(), - SingleLinkMeasurement.TYPE.COUNT_VEH); - this.loadings.add(loading); - this.observedLinks.add(loading.getLink()); - } - this.tempLinkList = null; - this.tempTimes = null; - } - } - - // -------------------- SETTERS -------------------- - - public void addObservation(final L link, final int start_s, final int end_s) { - this.tempLinkList.add(link); - this.tempTimes.add(new TimedElement(start_s, end_s)); - } - - // -------------------- GETTERS -------------------- - - public int getCount() { - return this.value_veh; - } - - public double getDetectionRate() { - return this.eta; - } - - public int size() { - return this.loadings.size(); - } - - public Set getObservedLinks() { - return this.observedLinks; - } - - // -------------------- SIMPLE FUNCTIONALITY -------------------- - - public void freeze() { - this.avgMatches_veh.freeze(); - for (LinkLoading loading : this.loadings) { - loading.freeze(); - } - } - - // -------------------- IMPLEMENTATION -------------------- - - public boolean appliesTo(final int observationIndex, - final PlanStep planStep) { - final LinkLoading loading = this.loadings.get(observationIndex); - if (loading.getLink().equals(planStep.getLink())) { - final int entry_s = planStep.getEntryTime_s(); - return ((loading.getStartTime_s() <= entry_s) && (loading - .getEndTime_s() > entry_s)); - } else { - return false; - } - } - - public void update(final double matches_veh, final Demand demand, - final SimResults simResults) { - - this.avgMatches_veh.addValue(matches_veh); - - this.sensitivity = 1.0; - for (LinkLoading loading : this.loadings) { - final L link = loading.getLink(); - final double flow_veh = simResults.getSimValue(link, loading - .getStartTime_s(), loading.getEndTime_s(), - SingleLinkMeasurement.TYPE.COUNT_VEH); - loading.update(demand, flow_veh); - this.sensitivity = Math.min(this.sensitivity, loading - .get_dLinkFeature_dDemand(link)); - } - this.sensitivity = Math.max(0.0, this.sensitivity); - } - - private double var_veh2() { - return this.calibrator.getVarianceScale() - * this.value_veh - * (1.0 - this.eta) - + this.eta - * this.eta - * this.calibrator - .getMinStddev(SingleLinkMeasurement.TYPE.COUNT_VEH) - * this.calibrator - .getMinStddev(SingleLinkMeasurement.TYPE.COUNT_VEH); - } - - public double ll(final double matches_veh) { - final double e_veh = this.value_veh - this.eta * matches_veh; - return (-1.0) * e_veh * e_veh / 2.0 / var_veh2(); - } - - public double dll_dMatches() { - final double e_veh = this.value_veh - this.eta - * this.avgMatches_veh.getSmoothedValue(); - return this.sensitivity * e_veh / var_veh2() * this.eta; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(this.getClass() - .getSimpleName()); - result.append("("); - for (LinkLoading loading : this.loadings) { - result.append(loading.getLink()); - result.append(", "); - } - result.append("count="); - result.append(this.value_veh); - result.append(", detectionRate="); - result.append(this.eta); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/SingleLinkMeasurement.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/SingleLinkMeasurement.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/SingleLinkMeasurement.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/measurements/SingleLinkMeasurement.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,317 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.measurements; - -import java.io.Serializable; -import java.util.Set; -import java.util.logging.Logger; - -import floetteroed.cadyts.calibrators.Calibrator; -import floetteroed.cadyts.calibrators.TimedElement; -import floetteroed.cadyts.demand.Demand; -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.demand.PlanStep; -import floetteroed.cadyts.supply.LinkLoading; -import floetteroed.cadyts.supply.SimResults; -import floetteroed.utilities.math.SignalSmoother; - -/** - * - * @author Gunnar Flötteröd - * - * @param L - * the link type - * - */ -public class SingleLinkMeasurement extends TimedElement implements - Serializable { - - // -------------------- TYPE DEFINITIONS -------------------- - - public static enum TYPE { - FLOW_VEH_H, COUNT_VEH - }; - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- CONSTANT MEMBERS -------------------- - - private final TYPE type; - - private final double measValue; - - private final double measVariance; - - private final L link; - - // -------------------- MEMBERS -------------------- - - private LinkLoading loading; - - private SignalSmoother avgLinkFeature; - - private double lastLL = 0; - - private double lastLLPredErr = 0; - - private double lastLinkFeaturePredErr = 0; - - // -------------------- CONSTRUCTION -------------------- - - public SingleLinkMeasurement(final L link, final double measValue, - final double measVariance, final int startTime_s, - final int endTime_s, final TYPE type) { - - super(startTime_s, endTime_s); - - // CHECK - - if (link == null) { - throw new IllegalArgumentException("link is null"); - } - if (Double.isNaN(measValue) || Double.isInfinite(measValue)) { - throw new IllegalArgumentException("infeasible measurement value: " - + measValue); - } - if (measVariance <= 0 || Double.isNaN(measVariance) - || Double.isInfinite(measVariance)) { - throw new IllegalArgumentException("infeasible variance value: " - + measVariance); - } - if (type == null) { - throw new IllegalArgumentException("type must not be null"); - } - - // CONTINUE - - this.link = link; - this.measValue = measValue; - this.measVariance = measVariance; - this.type = type; - this.loading = null; // only until initialization - this.avgLinkFeature = null; // only until initialization - } - - public void init(final Calibrator calibrator) { - if (calibrator == null) { - throw new IllegalArgumentException("calibrator must not be null"); - } else if (this.loading != null) { - Logger.getLogger(this.getClass().getName()).warning( - "init(..) has already been called; this call is ignored"); - } else { - this.loading = calibrator.newLinkLoading(this.getLink(), - this.getStartTime_s(), this.getEndTime_s(), this.getType()); - this.avgLinkFeature = new SignalSmoother( - 1.0 - calibrator.getRegressionInertia()); - } - } - - // -------------------- SIMPLE FUNCTIONALITY -------------------- - - public L getLink() { - return this.link; - } - - public double getMeasValue() { - return this.measValue; - } - - public double getMeasVariance() { - return this.measVariance; - } - - public double getMeasStddev() { - return Math.sqrt(this.getMeasVariance()); - } - - public TYPE getType() { - return this.type; - } - - public Set getRelevantLinks() { - return this.loading.getRelevantLinks(); - } - - public boolean isPlanListening() { - return this.loading.isPlanListening(); - } - - public void notifyPlanChoice(final Plan plan) { - this.loading.notifyPlanChoice(plan); - } - - public void freeze() { - this.loading.freeze(); - this.avgLinkFeature.freeze(); - } - - // -------------------- IMPLEMENTATION -------------------- - - protected double ll(final double simValue) { - final double e = simValue - this.getMeasValue(); - return (-1.0) * e * e / 2.0 / this.getMeasVariance(); - } - - protected double dll_dAvgLinkFeature() { - return (this.getMeasValue() - this.avgLinkFeature.getSmoothedValue()) - / this.getMeasVariance(); - } - - public void update(final Demand demand, final SimResults simResults) { - - final double linkFeature = simResults.getSimValue(this.getLink(), - this.getStartTime_s(), this.getEndTime_s(), this.getType()); - final double predLinkFeature = this.loading.predictLinkFeature(demand); - - this.lastLL = this.ll(linkFeature); - this.lastLLPredErr = this.lastLL - this.ll(predLinkFeature); - this.lastLinkFeaturePredErr = linkFeature - predLinkFeature; - - this.avgLinkFeature.addValue(linkFeature); - this.loading.update(demand, linkFeature); - } - - public double getLambdaCoefficient(final L link) { - double result = this.dll_dAvgLinkFeature() - * this.loading.get_dLinkFeature_dDemand(link); - return result; - } - - public double getLambda(final PlanStep step) { - if (step.getEntryTime_s() < this.getStartTime_s() - || step.getEntryTime_s() >= this.getEndTime_s()) { - return 0; - } else { - return this.getLambdaCoefficient(step.getLink()); - } - } - - public double getLastLL() { - return this.lastLL; - } - - public double getLastLLPredErr() { - return this.lastLLPredErr; - } - - public double getLastLinkFeaturePredErr() { - return this.lastLinkFeaturePredErr; - } - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.getClass().getSimpleName()); - result.append("("); - result.append("type = "); - result.append(this.getType()); - result.append(", link = "); - result.append(this.getLink()); - result.append(", start_s = "); - result.append(this.getStartTime_s()); - result.append(", dur_s = "); - result.append(this.getDuration_s()); - result.append(", value = "); - result.append(this.getMeasValue()); - result.append(", stddev = "); - result.append(this.getMeasStddev()); - result.append(")"); - return result.toString(); - } - - // -------------------- PLAIN LL EVALUATION -------------------- - - // TODO NEW - public double logLikelihood(final Demand demand) { - return this.ll(this.loading.predictLinkFeature(demand)); - } - - // TODO NEW - public double d_logLikelihood_d_linkDemand(final L link, final int time_s, - final Demand demand) { - if (time_s < this.getStartTime_s() || time_s >= this.getEndTime_s()) { - return 0; - } else { - return (this.getMeasValue() - this.loading - .predictLinkFeature(demand)) - / this.getMeasVariance() - * this.loading.get_dLinkFeature_dDemand(link); - } - } - - // ---------- TODO NEW FOR LEVENBERG-MARCQUARDT ---------- - - public double residual(final Demand demand) { - return (this.measValue - this.loading.predictLinkFeature(demand)) - / Math.sqrt(this.measVariance); - } - - // TODO this only works for single-link demand! - public double dResidual_dLinkDemand() { - return (-1.0) * this.loading.get_dLinkFeature_dDemand(this.link) - / Math.sqrt(this.measVariance); - } - - // -------------------------------------------------------- - // -------------------- VERY OLD STUFF -------------------- - // -------------------------------------------------------- - - // /* - // * This is new code for the estimation of demand model parameters. It - // * implements the incremental computation of Equation (25) for all choice - // * model parameters. in the article [[TODO CITE]]. Variables are like in - // * that article, only that "\Pi" is written as "P" and "\beta" as "b". - // * [[TODO Move this into a subclass?]] - // */ - // - // /** - // * A vector that contains the incrementally calculated result of Equation - // * (25) for all choice model parameters. - // */ - // private Vector dqak_db = null; - // - // /** - // * Adds the sensitivity terms for plan i of agent n to the result of - // * Equation (25); assumes that the plan actually crosses this link! - // */ - // public void register_dPni_db(final Vector dPni_db) { - // if (this.dqak_db == null) { - // this.dqak_db = new Vector(dPni_db.size()); - // } - // final double dq_dPni = this.loading.get_dLinkFeature_dDemand(this - // .getLink()); - // this.dqak_db.add(dPni_db, dq_dPni); - // } - // - // public Vector get_dqak_db() { - // return this.dqak_db; - // } - // - // public void clear_dqak_db() { - // this.dqak_db = null; - // } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/BasicSimResults.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/BasicSimResults.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/BasicSimResults.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/BasicSimResults.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.supply; - -import java.util.HashMap; -import java.util.Map; - -import floetteroed.cadyts.measurements.SingleLinkMeasurement; -import floetteroed.utilities.DynamicData; - -/** - * An implementation of the SimResults interface that guarantees access to all - * types of network conditions specified in Measurement.TYPE. - * - * @author Gunnar Flötteröd - * - * @param - * the link type - */ -public class BasicSimResults implements SimResults { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final Map> contents; - - // -------------------- CONSTRUCTOR -------------------- - - public BasicSimResults(final int startTime_s, final int binSize_s, - final int binCnt) { - this.contents = new HashMap>( - SingleLinkMeasurement.TYPE.values().length); - for (SingleLinkMeasurement.TYPE type : SingleLinkMeasurement.TYPE.values()) { - this.contents.put(type, new DynamicData(startTime_s, binSize_s, - binCnt)); - } - } - - // -------------------- CONTENT ACCESS -------------------- - - public DynamicData getSimResults(final SingleLinkMeasurement.TYPE type) { - return this.contents.get(type); - } - - // -------------------- IMPLEMENTATION OF SimResults -------------------- - - @Override - public double getSimValue(final L link, final int startTime_s, - final int endTime_s, final SingleLinkMeasurement.TYPE type) { - if (type == null) { - throw new IllegalArgumentException( - "measurement type must not be null"); - } - if (SingleLinkMeasurement.TYPE.FLOW_VEH_H.equals(type)) { - return this.getSimResults(type).getAverage(link, startTime_s, - endTime_s); - } else if (SingleLinkMeasurement.TYPE.COUNT_VEH.equals(type)) { - return this.getSimResults(type) - .getSum(link, startTime_s, endTime_s); - } else { - throw new IllegalArgumentException("unknown measurement type " - + type + " -- this should not happen"); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoading.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoading.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoading.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoading.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.supply; - -import java.io.Serializable; -import java.util.Set; - -import floetteroed.cadyts.demand.Demand; -import floetteroed.cadyts.demand.Plan; - -/** - * - * @author Gunnar Flötteröd - * - * @param the link type - */ -public interface LinkLoading extends Serializable { - - public int getStartTime_s(); - - public int getEndTime_s(); - - public L getLink(); - - public Set getRelevantLinks(); - - public double getRegressionInertia(); - - public void freeze(); - - public void update(Demand demand, double linkFeature); - - public double predictLinkFeature(Demand demand); - - public boolean isPlanListening(); - - public void notifyPlanChoice(Plan plan); - - public double get_dLinkFeature_dDemand(L link); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingLocal.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingLocal.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingLocal.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingLocal.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.supply; - -import java.util.HashSet; -import java.util.Set; - -import floetteroed.cadyts.calibrators.TimedElement; -import floetteroed.cadyts.demand.Demand; -import floetteroed.cadyts.demand.Plan; -import floetteroed.utilities.math.Regression; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - * @param L - * the link type - */ -public class LinkLoadingLocal extends TimedElement implements LinkLoading { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- REGRESSION -------------------- - - private final L link; - - private final Regression regression; - - private int iteration = 0; - - // -------------------- CONSTRUCTION -------------------- - - public LinkLoadingLocal(final L link, final int startTime_s, - final int endTime_s, final double regressionInertia, - final boolean centerRegression) { - - super(startTime_s, endTime_s); - - if (link == null) { - throw new IllegalArgumentException("link must not be null"); - } - this.link = link; - this.regression = new Regression(regressionInertia, 2); - - if (centerRegression) { - this.regression.enableInputCentering(DEMAND_INDEX); - } - } - - // -------------------- HELPERS -------------------- - - private static final int DEMAND_INDEX = 0; - - private static final int OFFSET_INDEX = 1; - - private final Vector regrInput = new Vector(2); - - private Vector regrInput(final Demand demand) { - this.regrInput.set(DEMAND_INDEX, demand.getSum(this.getLink(), this - .getStartTime_s(), this.getEndTime_s())); - this.regrInput.set(OFFSET_INDEX, 1.0); - return this.regrInput; - } - - // -------------------- IMPLEMENTATION OF LinkLoading -------------------- - - @Override - public L getLink() { - return this.link; - } - - @Override - public Set getRelevantLinks() { - final Set result = new HashSet(); - result.add(this.getLink()); - return result; - } - - @Override - public void freeze() { - this.regression.setInertia(1.0); - } - - @Override - public double getRegressionInertia() { - return this.regression.getInertia(); - } - - @Override - public double get_dLinkFeature_dDemand(final L link) { - if (!this.isPlanListening() && this.link.equals(link)) { - return this.regression.getCoefficients().get(DEMAND_INDEX); - } else { - return 0; - } - } - - @Override - public void update(final Demand demand, final double linkFeature) { - this.iteration++; - this.regression.update(this.regrInput(demand), linkFeature); - } - - @Override - public double predictLinkFeature(final Demand demand) { - return this.regression.predict(regrInput(demand)); - } - - @Override - public boolean isPlanListening() { - return this.iteration < 5; - } - - @Override - public void notifyPlanChoice(final Plan plan) { - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingProportional.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingProportional.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingProportional.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/LinkLoadingProportional.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.supply; - -import java.util.HashSet; -import java.util.Set; - -import floetteroed.cadyts.calibrators.TimedElement; -import floetteroed.cadyts.demand.Demand; -import floetteroed.cadyts.demand.Plan; -import floetteroed.cadyts.measurements.SingleLinkMeasurement; -import floetteroed.utilities.Units; -import floetteroed.utilities.math.SignalSmoother; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class LinkLoadingProportional extends TimedElement implements - LinkLoading { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- REGRESSION -------------------- - - private final L link; - - private final SignalSmoother avgDemand_veh; - - private final SignalSmoother avgLinkFeature; - - private final SingleLinkMeasurement.TYPE type; - - // -------------------- CONSTRUCTION -------------------- - - public LinkLoadingProportional(final L link, final int startTime_s, - final int endTime_s, final SingleLinkMeasurement.TYPE type, - final double regressionInertia) { - - super(startTime_s, endTime_s); - - if (link == null) { - throw new IllegalArgumentException("link is null"); - } - if (type == null) { - throw new IllegalArgumentException("type is null"); - } - - this.link = link; - this.type = type; - - this.avgDemand_veh = new SignalSmoother(1.0 - regressionInertia); - this.avgLinkFeature = new SignalSmoother(1.0 - regressionInertia); - } - - // -------------------- IMPLEMENTATION OF LinkLoading -------------------- - - @Override - public L getLink() { - return this.link; - } - - @Override - public Set getRelevantLinks() { - final Set result = new HashSet(1); - result.add(this.getLink()); - return result; - } - - @Override - public void freeze() { - this.avgDemand_veh.freeze(); - this.avgLinkFeature.freeze(); - } - - @Override - public double getRegressionInertia() { - if (this.avgDemand_veh.isFrozen()) { - return 1.0; - } else { - return 1.0 - this.avgDemand_veh.getLastInnovationWeight(); - } - } - - @Override - public double predictLinkFeature(final Demand demand) { - final double demand_veh = demand.getSum(this.getLink(), this - .getStartTime_s(), this.getEndTime_s()); - return this.avgLinkFeature.getSmoothedValue() - + this.get_dLinkFeature_dDemand(this.link) - * (demand_veh - this.avgDemand_veh.getSmoothedValue()); - } - - @Override - public double get_dLinkFeature_dDemand(final L link) { - if (this.link.equals(link)) { - if (SingleLinkMeasurement.TYPE.FLOW_VEH_H.equals(this.type)) { - return Units.VEH_H_PER_VEH_S / this.getDuration_s(); - } else if (SingleLinkMeasurement.TYPE.COUNT_VEH.equals(this.type)) { - return 1.0; - } else { - throw new RuntimeException("unknown measurement type " - + this.type + " -- this should not happen"); - } - } else { - return 0; - } - } - - @Override - public void update(final Demand demand, final double linkFeature) { - this.avgDemand_veh.addValue(demand.getSum(this.getLink(), this - .getStartTime_s(), this.getEndTime_s())); - this.avgLinkFeature.addValue(linkFeature); - } - - @Override - public boolean isPlanListening() { - return false; - } - - @Override - public void notifyPlanChoice(final Plan plan) { - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/SimResults.java sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/SimResults.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/SimResults.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/cadyts/src/main/java/floetteroed/cadyts/supply/SimResults.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* - * Cadyts - Calibration of dynamic traffic simulations - * - * Copyright 2009-2016 Gunnar Flötteröd - * - * - * This file is part of Cadyts. - * - * Cadyts 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. - * - * Cadyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cadyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.cadyts.supply; - -import java.io.Serializable; - -import floetteroed.cadyts.measurements.SingleLinkMeasurement; - -/** - * - * Specifies a container for network conditions (the results of a network - * loading). - * - * @author Gunnar Flötteröd - * - * @param L - * the link type - */ -public interface SimResults extends Serializable { - - /** - * @param link - * the link for which the simulated value is requested - * @param startTime_s - * the start time (inclusive) of the considered time period (in - * seconds after midnight) - * @param endTime_s - * the end time (exclusive) of the considered time period (in - * seconds after midnight) - * @param type - * the type of the simulated value - */ - public double getSimValue(L link, int startTime_s, int endTime_s, - SingleLinkMeasurement.TYPE type); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/pom.xml sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/pom.xml --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/pom.xml 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/pom.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ - - - 4.0.0 - - floetteroed.opdyts - opdyts - 1.0.0 - - - GNU General Public License - - - - - - - bintray - https://api.bintray.com/maven/matsim/matsim/opdyts - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - false - false - UTF-8 - - true - 128m - 512m - - 4000 - 100 - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - - - - - floetteroed.utilities - floetteroed-utilities - 1.0.0 - - - - org.apache.commons - commons-math3 - 3.4.1 - - - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterion.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterion.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterion.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterion.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.convergencecriteria; - -import java.util.List; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.Transition; - -/** - * - * @author Gunnar Flötteröd - * - */ -public interface ConvergenceCriterion { - - /** - * Evaluates the ConvergenceCriterion for the given TransitionSequence. - * - * @param transitionSequence - * convergence is evaluated for this sequence - */ - public ConvergenceCriterionResult evaluate( - final List> mostRecentTransitionSequence, - final int totalTransitionSequenceLength); - - // public double effectiveAveragingIterations(); -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterionResult.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterionResult.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterionResult.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/ConvergenceCriterionResult.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.convergencecriteria; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class ConvergenceCriterionResult { - - public final boolean converged; - - public final Double finalObjectiveFunctionValue; - - public final Double finalObjectiveFunctionValueStddev; - - public final Double finalEquilbiriumGap; - - public final Double finalUniformityGap; - - public final Object lastDecisionVariable; - - public final Integer lastTransitionSequenceLength; - - public ConvergenceCriterionResult(final boolean converged, final Double finalObjectiveFunctionValue, - final Double finalObjectiveFunctionValueStddev, - final Double finalEquilibiriumGap, final Double finalUniformityGap, - final Object lastDecisionVariable, - final Integer lastTransitionSequenceLength) { - this.converged = converged; - this.finalObjectiveFunctionValue = finalObjectiveFunctionValue; - this.finalObjectiveFunctionValueStddev = finalObjectiveFunctionValueStddev; - this.finalEquilbiriumGap = finalEquilibiriumGap; - this.finalUniformityGap = finalUniformityGap; - this.lastDecisionVariable = lastDecisionVariable; - this.lastTransitionSequenceLength = lastTransitionSequenceLength; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/FixedIterationNumberConvergenceCriterion.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/FixedIterationNumberConvergenceCriterion.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/FixedIterationNumberConvergenceCriterion.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/convergencecriteria/FixedIterationNumberConvergenceCriterion.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.convergencecriteria; - -import java.util.ArrayList; -import java.util.List; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.Transition; -import floetteroed.utilities.math.BasicStatistics; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class FixedIterationNumberConvergenceCriterion implements - ConvergenceCriterion { - - // -------------------- CONSTANTS -------------------- - - private final int iterationsToConvergence; - - private final int averagingIterations; - - // -------------------- CONSTRUCTION -------------------- - - public FixedIterationNumberConvergenceCriterion( - final int iterationsToConvergence, final int averagingIterations) { - this.iterationsToConvergence = iterationsToConvergence; - this.averagingIterations = averagingIterations; - } - - // -------------------- INTERNALS -------------------- - - private List objectiveFunctionValues( - final List> transitions) { - final List result = new ArrayList(transitions.size()); - for (Transition transition : transitions) { - result.add(transition.getToStateObjectiveFunctionValue()); - } - return result; - } - - // --------------- IMPLEMENTATION OF ConvergenceCriterion --------------- - - @Override - public ConvergenceCriterionResult evaluate( - final List> mostRecentTransitionSequence, - final int totalTransitionSequenceLength) { - - if (mostRecentTransitionSequence.size() >= this.averagingIterations) { - - // objective function statistics - final List objectiveFunctionValues = this - .objectiveFunctionValues(mostRecentTransitionSequence); - final BasicStatistics objectiveFunctionValueStats = new BasicStatistics(); - for (int i = mostRecentTransitionSequence.size() - - this.averagingIterations; i < mostRecentTransitionSequence - .size(); i++) { - objectiveFunctionValueStats.add(objectiveFunctionValues.get(i)); - } - - // gap statistics - final Vector totalDelta = mostRecentTransitionSequence - .get(mostRecentTransitionSequence.size() - - this.averagingIterations).getDelta().copy(); - for (int i = mostRecentTransitionSequence.size() - - this.averagingIterations + 1; i < mostRecentTransitionSequence - .size(); i++) { - totalDelta.add(mostRecentTransitionSequence.get(i).getDelta()); - } - - // package the results - final boolean converged = (totalTransitionSequenceLength >= this.iterationsToConvergence); - return new ConvergenceCriterionResult(converged, - objectiveFunctionValueStats.getAvg(), - objectiveFunctionValueStats.getStddev() - / Math.sqrt(this.averagingIterations), - totalDelta.euclNorm() / this.averagingIterations, - 1.0 / this.averagingIterations, - mostRecentTransitionSequence.get(0).getDecisionVariable(), - mostRecentTransitionSequence.size()); - - } else { - - return new ConvergenceCriterionResult(false, null, null, null, - null, null, null); - - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariable.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariable.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariable.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariable.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts; - -/** - * A decision variable is a set of parameters that may be chosen such that an - * objective function, represented by an instance of ObjectiveFunction, is - * minimized. - * - * @author Gunnar Flötteröd - * - */ -public interface DecisionVariable { - - /** - * Implements the effect of this decision variable in the simulation, - * meaning that the next simulation transition is according to this decision - * variable. - *

- * Notes:
    - *
  • This needs to influence the simulation in each iteration, not just at the start iterations.
  • - *
- */ - public void implementInSimulation(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariableRandomizer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariableRandomizer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariableRandomizer.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/DecisionVariableRandomizer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts; - -import java.util.Collection; - -/** - * Creates random decision variables that are used as "innovations" in an - * iterative, stochastic optimization process. - * - * @param U - * the decision variable type - * - * @author Gunnar Flötteröd - * - */ -public interface DecisionVariableRandomizer { - - /** - * The result should contain at least one random variation of - * decisionVariable. - *

- * It is, however, recommended to implement one of the following sampling - * strategies: - *

    - *
  • Return two random variations of decisionVariable that are symmetric ( - * "positive and negative") to the extent possible. - *
  • Return an even larger number of decision variable variations (up to - * the total number of candidate decision variables specified in - * RandomSearch) by some experimental plan. - *
- *

- */ - public Collection newRandomVariations(final U decisionVariable); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariable.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariable.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariable.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariable.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.filebased; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.PrintWriter; - -import floetteroed.opdyts.DecisionVariable; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class FileBasedDecisionVariable implements DecisionVariable { - - // -------------------- CONSTANTS -------------------- - - private final String decisionVariableId; - - private final String executionFolder; - - private final String newDecisionVariableFileName; - - // -------------------- CONSTRUCTION -------------------- - - public FileBasedDecisionVariable(final String decisionVariableId, final String executionFolder, - final String decisionVariableFileName) { - this.decisionVariableId = decisionVariableId; - this.executionFolder = executionFolder; - this.newDecisionVariableFileName = decisionVariableFileName; - } - - // -------------------- FILE-BASED FUNCTIONALITY -------------------- - - public void writeToNewDecisionVariableFile(final String folder, final String fileName) { - try { - final PrintWriter writer = new PrintWriter(new File(folder, fileName)); - writer.print(this.decisionVariableId); - writer.flush(); - writer.close(); - } catch (FileNotFoundException e) { - throw new RuntimeException(e); - } - } - - // --------------- IMPLEMENTATION OF DecisionVariable --------------- - - @Override - public void implementInSimulation() { - this.writeToNewDecisionVariableFile(this.executionFolder, this.newDecisionVariableFileName); - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - return this.decisionVariableId; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariableRandomzier.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariableRandomzier.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariableRandomzier.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedDecisionVariableRandomzier.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.filebased; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.util.Collection; -import java.util.LinkedList; -import java.util.List; - -import floetteroed.opdyts.DecisionVariableRandomizer; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class FileBasedDecisionVariableRandomzier implements DecisionVariableRandomizer { - - // -------------------- CONSTANTS -------------------- - - private final String executionFolder; - - private final String createNewDecisionVariablesCommand; - - private final String originalDecisionVariableFileName; - - private final String newDecisionVariablesFileName; - - // -------------------- CONSTRUCTION -------------------- - - public FileBasedDecisionVariableRandomzier(final String executionFolder, - final String createNewDecisionVariablesCommand, final String originalDecisionVariableFileName, - final String newDecisionVariablesFileName) { - this.executionFolder = executionFolder; - this.createNewDecisionVariablesCommand = createNewDecisionVariablesCommand; - this.originalDecisionVariableFileName = originalDecisionVariableFileName; - this.newDecisionVariablesFileName = newDecisionVariablesFileName; - } - - // ---------- IMPLEMENTATION OF DecisionVariableRandomizer ---------- - - @Override - public Collection newRandomVariations( - FileBasedDecisionVariable originalDecisionVariable) { - - if (originalDecisionVariable != null) { - originalDecisionVariable.writeToNewDecisionVariableFile(this.executionFolder, - this.originalDecisionVariableFileName); - } else { -// final File file = new File(this.executionFolder, this.originalDecisionVariableFileName); -// if (file.exists()) { -// file.delete(); -// } - } - - final Process proc; - final int exitVal; - try { - proc = Runtime.getRuntime().exec(this.createNewDecisionVariablesCommand, null, - new File(this.executionFolder)); - exitVal = proc.waitFor(); - if (exitVal != 0) { - throw new RuntimeException("Decision variable generation terminated with exit code " + exitVal + "."); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - - final List result = new LinkedList<>(); - try { - String line; - final BufferedReader reader = new BufferedReader( - new FileReader(new File(this.executionFolder, this.newDecisionVariablesFileName))); - while ((line = reader.readLine()) != null) { - result.add(new FileBasedDecisionVariable(line.trim(), this.executionFolder, - this.originalDecisionVariableFileName)); - } - reader.close(); - } catch (Exception e) { - throw new RuntimeException(e); - } - return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedObjectiveFunction.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedObjectiveFunction.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedObjectiveFunction.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedObjectiveFunction.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.filebased; - -import floetteroed.opdyts.ObjectiveFunction; -import floetteroed.opdyts.SimulatorState; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class FileBasedObjectiveFunction implements ObjectiveFunction { - - // -------------------- CONSTRUCTION -------------------- - - public FileBasedObjectiveFunction() { - } - - // --------------- IMPLEMENTATION OF ObjectiveFunction --------------- - - @Override - public double value(final SimulatorState state) { - return ((FileBasedSimulatorState) state).getObjectiveFunctionValue(); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulator.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.filebased; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.util.LinkedList; -import java.util.List; - -import floetteroed.opdyts.SimulatorState; -import floetteroed.opdyts.searchalgorithms.Simulator; -import floetteroed.opdyts.trajectorysampling.TrajectorySampler; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class FileBasedSimulator implements Simulator { - - // -------------------- CONSTANTS -------------------- - - private final String executionFolder; - - private final String advanceSimulationCommand; - - private final String newStateFileName; - - // -------------------- CONSTRUCTION -------------------- - - public FileBasedSimulator(final String executionFolder, final String advanceSimulationCommand, - final String newStateFileName) { - this.executionFolder = executionFolder; - this.advanceSimulationCommand = advanceSimulationCommand; - this.newStateFileName = newStateFileName; - } - - // -------------------- INTERNALS -------------------- - - private void advanceSimulation() { - final Process proc; - final int exitVal; - try { - proc = Runtime.getRuntime().exec(this.advanceSimulationCommand, null, new File(this.executionFolder)); - exitVal = proc.waitFor(); - if (exitVal != 0) { - throw new RuntimeException("Simulation terminated with exit code " + exitVal + "."); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private FileBasedSimulatorState loadNewState() { - final List numbers = new LinkedList<>(); - try { - String line; - final BufferedReader reader = new BufferedReader( - new FileReader(new File(this.executionFolder, this.newStateFileName))); - while ((line = reader.readLine()) != null) { - line = line.trim(); - numbers.add(Double.parseDouble(line)); - } - reader.close(); - } catch (Exception e) { - throw new RuntimeException(e); - } - return new FileBasedSimulatorState(numbers.get(0), new Vector(numbers.subList(1, numbers.size()))); - } - - // -------------------- IMPLEMENTATION OF Simulator -------------------- - - @Override - public SimulatorState run(final TrajectorySampler evaluator) { - return this.run(evaluator, null); - } - - @Override - public SimulatorState run(final TrajectorySampler evaluator, - final SimulatorState initialState) { - // evaluator.initialize(); - FileBasedSimulatorState newState = null; - while (!evaluator.foundSolution()) { - this.advanceSimulation(); - newState = this.loadNewState(); - evaluator.afterIteration(newState); - } - return newState; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulatorState.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulatorState.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulatorState.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/filebased/FileBasedSimulatorState.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.filebased; - -import floetteroed.opdyts.SimulatorState; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class FileBasedSimulatorState implements SimulatorState { - - // -------------------- CONSTANTS -------------------- - - private final Vector stateVector; - - private final double objectiveFunctionValue; - - // -------------------- CONSTRUCTION -------------------- - - public FileBasedSimulatorState(final double objectiveFunctionValue, - final Vector stateVector) { - this.stateVector = stateVector; - this.objectiveFunctionValue = objectiveFunctionValue; - } - - // -------------------- GETTERS -------------------- - - public double getObjectiveFunctionValue() { - return this.objectiveFunctionValue; - } - - // --------------- IMPLEMENTATION OF SimulatorState --------------- - - @Override - public Vector getReferenceToVectorRepresentation() { - return this.stateVector; - } - - @Override - public void implementInSimulation() { - /* - * Do nothing: Decision variables are already uniquely coupled to - * simulation trajectories. - */ - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AbstractDecisionVariableAverage.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AbstractDecisionVariableAverage.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AbstractDecisionVariableAverage.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AbstractDecisionVariableAverage.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public abstract class AbstractDecisionVariableAverage - implements Statistic> { - - // -------------------- CONSTRUCTION -------------------- - - public AbstractDecisionVariableAverage() { - } - - // --------------- IMPLEMENTATION OF SearchStatistic --------------- - - @Override - public String label() { - return "Average " + this.realValueLabel(); - } - - @Override - public String value(final SamplingStage samplingStage) { - double average = 0; - for (U decisionVariable : samplingStage.getDecisionVariables()) { - average += samplingStage.getAlphaSum(decisionVariable) - * this.realValue(decisionVariable); - } - return Double.toString(average); - } - - // -------------------- INTERFACE DEFINITION -------------------- - - public abstract String realValueLabel(); - - public abstract double realValue(DecisionVariable decisionVariable); -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AllSolutions.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AllSolutions.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AllSolutions.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AllSolutions.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class AllSolutions implements - Statistic> { - - // -------------------- MEMBERS -------------------- - - private final List allDecisionVariables; - - private final String separator; - - // -------------------- CONSTRUCTION -------------------- - - public AllSolutions( - final Set allDecisionVariables, - final String separator) { - this.allDecisionVariables = new ArrayList<>(allDecisionVariables); - this.separator = separator; - } - - // --------------- IMPLEMENTATION OF SearchStatistic --------------- - - @Override - public String label() { - final StringBuffer result = new StringBuffer(); - result.append(this.allDecisionVariables.get(0)); - for (int i = 1; i < this.allDecisionVariables.size(); i++) { - result.append(this.separator); - result.append("alpha(" + this.allDecisionVariables.get(i) + ")"); - } - return result.toString(); - } - - @Override - public String value(final SamplingStage samplingStage) { - final StringBuffer result = new StringBuffer(); - result.append(this.allDecisionVariables.get(0)); - for (int i = 1; i < this.allDecisionVariables.size(); i++) { - result.append(this.separator); - result.append(samplingStage.getAlphaSum(this.allDecisionVariables - .get(i))); - } - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AlphaStatistic.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AlphaStatistic.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AlphaStatistic.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/AlphaStatistic.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class AlphaStatistic implements - Statistic> { - - // -------------------- MEMBERS -------------------- - - private final List decisionVariables; - - // -------------------- CONSTRUCTION -------------------- - - public AlphaStatistic( - final Set decisionVariables) { - this.decisionVariables = new ArrayList( - decisionVariables); - } - - // -------------------- IMPLEMENTATION OF Statistic -------------------- - - @Override - public String label() { - final StringBuffer result = new StringBuffer("alpha(" - + this.decisionVariables.get(0).toString() + ")"); - for (int i = 1; i < this.decisionVariables.size(); i++) { - result.append("\t"); - result.append("alpha(" + this.decisionVariables.get(i) + ")"); - } - return result.toString(); - } - - @Override - public String value(final SamplingStage data) { - final StringBuffer result = new StringBuffer(Double.toString(data - .getAlphaSum(this.decisionVariables.get(0)))); - for (int i = 1; i < this.decisionVariables.size(); i++) { - result.append("\t"); - result.append(Double.toString(data - .getAlphaSum(this.decisionVariables.get(i)))); - } - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/ConvergedObjectiveFunctionValue.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/ConvergedObjectiveFunctionValue.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/ConvergedObjectiveFunctionValue.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/ConvergedObjectiveFunctionValue.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class ConvergedObjectiveFunctionValue - implements Statistic> { - - public static final String LABEL = "Converged Objective Function Value"; - - @Override - public String label() { - return LABEL; - } - - @Override - public String value(final SamplingStage samplingStage) { - final Double value = samplingStage.getConvergedObjectiveFunctionValue(); - if (value == null) { - return ""; - } else { - return Double.toString(value); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGap.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGap.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGap.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGap.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class EquilibriumGap implements - Statistic> { - - @Override - public String label() { - return "Equilibrium Gap"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage.getEquilibriumGap()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGapWeight.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGapWeight.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGapWeight.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/EquilibriumGapWeight.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class EquilibriumGapWeight implements - Statistic> { - - public static final String LABEL = "Equilibrium Gap Weight"; - - @Override - public String label() { - return LABEL; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage.getEquilibriumGapWeight()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/FreeMemory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/FreeMemory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/FreeMemory.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/FreeMemory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * TODO This should become general-purpose. - * - * @author Gunnar Flötteröd - * - */ -public class FreeMemory implements - Statistic> { - - @Override - public String label() { - return "Free Memory"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Long.toString(Runtime.getRuntime().freeMemory()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastDecisionVariable.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastDecisionVariable.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastDecisionVariable.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastDecisionVariable.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class LastDecisionVariable implements - Statistic> { - - @Override - public String label() { - return "Last Decision Variable"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return samplingStage.getLastDecisionVariable().toString(); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastEquilibriumGap.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastEquilibriumGap.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastEquilibriumGap.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastEquilibriumGap.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class LastEquilibriumGap implements - Statistic> { - - @Override - public String label() { - return "Last Equilibrium Gap"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage.getLastEquilibriumGap()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastObjectiveFunctionValue.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastObjectiveFunctionValue.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastObjectiveFunctionValue.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/LastObjectiveFunctionValue.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class LastObjectiveFunctionValue implements - Statistic> { - - @Override - public String label() { - return "Last Objective Function Value"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage.getLastObjectiveFunctionValue()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/MaxMemory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/MaxMemory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/MaxMemory.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/MaxMemory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * TODO This should become general-purpose. - * - * @author Gunnar Flötteröd - * - */ -public class MaxMemory implements - Statistic> { - - @Override - public String label() { - return "Max. Memory"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Long.toString(Runtime.getRuntime().maxMemory()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/SurrogateObjectiveFunctionValue.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/SurrogateObjectiveFunctionValue.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/SurrogateObjectiveFunctionValue.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/SurrogateObjectiveFunctionValue.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SurrogateObjectiveFunctionValue - implements Statistic> { - - public static final String LABEL = "Surrogate Objective Function Value"; - - @Override - public String label() { - return LABEL; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage - .getSurrogateObjectiveFunctionValue()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TotalMemory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TotalMemory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TotalMemory.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TotalMemory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * TODO This should become general-purpose. - * - * @author Gunnar Flötteröd - * - */ -public class TotalMemory implements - Statistic> { - - @Override - public String label() { - return "Total Memory"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Long.toString(Runtime.getRuntime().totalMemory()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TransientObjectiveFunctionValue.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TransientObjectiveFunctionValue.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TransientObjectiveFunctionValue.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/TransientObjectiveFunctionValue.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class TransientObjectiveFunctionValue - implements Statistic> { - - public static final String LABEL = "Q_interpol(alpha)"; - - @Override - public String label() { - return LABEL; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage - .getOriginalObjectiveFunctionValue()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGap.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGap.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGap.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGap.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class UniformityGap implements - Statistic> { - - public UniformityGap() { - } - - @Override - public String label() { - return "Uniformity Gap"; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage.getUniformityGap()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGapWeight.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGapWeight.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGapWeight.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/logging/UniformityGapWeight.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.logging; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class UniformityGapWeight implements - Statistic> { - - public static final String LABEL = "Uniformity Gap Weight"; - - @Override - public String label() { - return LABEL; - } - - @Override - public String value(final SamplingStage samplingStage) { - return Double.toString(samplingStage.getUniformityGapWeight()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/ObjectiveFunction.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/ObjectiveFunction.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/ObjectiveFunction.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/ObjectiveFunction.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts; - -/** - * - * Am objective function that evaluates a SimulatorState. The smaller the - * objective function value, the better the state. - * - * @author Gunnar Flötteröd - * - */ -public interface ObjectiveFunction { - - public double value(final SimulatorState state); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/OuterIterationStatistics.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/OuterIterationStatistics.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/OuterIterationStatistics.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/OuterIterationStatistics.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,225 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.searchalgorithms; - -import java.text.SimpleDateFormat; - -import floetteroed.utilities.statisticslogging.Statistic; -import floetteroed.utilities.statisticslogging.StatisticsWriter; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class OuterIterationStatistics { - - // -------------------- STATIC FUNCTIONALITY -------------------- - - public static final String INITIAL_TIMESTAMP = "Initial Timestamp"; - - public static final String ITERATION_NUMBER = "Iteration Number"; - - public static final String INITIAL_TRANSITION_NUMBER = "Initial Transition Number"; - - public static final String INITIAL_EQUILIBRIUM_GAP_WEIGHT = "Initial Equilibrium Gap Weight"; - - public static final String INITIAL_UNIFORMITY_GAP_WEIGHT = "Initial Uniformity Gap Weight"; - - public static final String FINAL_OBJECTIVE_FUNCTION_VALUE = "Final Objective Function Value"; - - public static final String ADDITIONAL_TRANSITION_NUMBER = "Additional Transition Number"; - - public static final String FINAL_TIMESTAMP = "Final Timestamp"; - - private static String emptyStrForNull(final Object data) { - return (data == null ? "" : data.toString()); - } - - static void initializeWriter( - final StatisticsWriter writer) { - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return INITIAL_TIMESTAMP; - } - - @Override - public String value(final OuterIterationStatistics data) { - if (data.initialTime_ms != null) { - return (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")) - .format(data.initialTime_ms); - } else { - return ""; - } - } - - }); - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return ITERATION_NUMBER; - } - - @Override - public String value(final OuterIterationStatistics data) { - return emptyStrForNull(data.iterationNumber); - } - - }); - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return INITIAL_TRANSITION_NUMBER; - } - - @Override - public String value(final OuterIterationStatistics data) { - return emptyStrForNull(data.initialTransitionNumber); - } - - }); - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return INITIAL_EQUILIBRIUM_GAP_WEIGHT; - } - - @Override - public String value(final OuterIterationStatistics data) { - return emptyStrForNull(data.initialEquilibriumGapWeight); - } - - }); - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return INITIAL_UNIFORMITY_GAP_WEIGHT; - } - - @Override - public String value(final OuterIterationStatistics data) { - return emptyStrForNull(data.initialUniformityGapWeight); - } - - }); - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return FINAL_OBJECTIVE_FUNCTION_VALUE; - } - - @Override - public String value(final OuterIterationStatistics data) { - return emptyStrForNull(data.finalObjectiveFunctionValue); - } - - }); - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return ADDITIONAL_TRANSITION_NUMBER; - } - - @Override - public String value(final OuterIterationStatistics data) { - return emptyStrForNull(data.additionalTransitionNumber); - } - - }); - - writer.addSearchStatistic(new Statistic() { - @Override - public String label() { - return FINAL_TIMESTAMP; - } - - @Override - public String value(final OuterIterationStatistics data) { - if (data.finalTime_ms != null) { - return (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")) - .format(data.finalTime_ms); - } else { - return ""; - } - } - - }); - } - - // -------------------- MEMBERS -------------------- - - private final Long initialTime_ms; - - private final Integer iterationNumber; - - private final Integer initialTransitionNumber; - - private final Double initialEquilibriumGapWeight; - - private final Double initialUniformityGapWeight; - - private boolean finalized = false; - - private Double finalObjectiveFunctionValue = null; - - private Integer additionalTransitionNumber = null; - - private Long finalTime_ms = null; - - // -------------------- CONSTRUCTION -------------------- - - OuterIterationStatistics(final Long initialTime_ms, - final Integer iterationNumber, - final Integer initialTransitinNumber, - final Double initialEquilibriumGapWeight, - final Double initialUniformityGapWeight) { - this.initialTime_ms = initialTime_ms; - this.iterationNumber = iterationNumber; - this.initialTransitionNumber = initialTransitinNumber; - this.initialEquilibriumGapWeight = initialEquilibriumGapWeight; - this.initialUniformityGapWeight = initialUniformityGapWeight; - this.finalized = false; - } - - void finalize(final Double finalObjectiveFunctionValue, - final Integer additionalTransitionNumber, final Long finalTime_ms) { - if (this.finalized) { - throw new RuntimeException(this.getClass().getSimpleName() - + " is already finalized."); - } - this.finalized = true; - this.finalObjectiveFunctionValue = finalObjectiveFunctionValue; - this.finalTime_ms = finalTime_ms; - this.additionalTransitionNumber = additionalTransitionNumber; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearchBuilder.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearchBuilder.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearchBuilder.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearchBuilder.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -package floetteroed.opdyts.searchalgorithms; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.DecisionVariableRandomizer; -import floetteroed.opdyts.ObjectiveFunction; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterion; - -/** - * - * @author Kai Nagel - * - * @param - * the decision variable type - */ -public class RandomSearchBuilder { - - private Simulator simulator = null; - private DecisionVariableRandomizer randomizer = null; - private U initialDecisionVariable = null; - private ConvergenceCriterion convergenceCriterion = null; - private int maxIterations = 10; - private int maxTransitions = Integer.MAX_VALUE; - private int populationSize = 10; - // private Random rnd = new Random(4711); - // private boolean interpolate = true; - private ObjectiveFunction objectiveFunction = null; - // private boolean includeCurrentBest = false; - // private int warmupIterations = 1; - // private boolean useAllWarmupIterations = false; - - private static void assertTrue(boolean condition) { - if (!condition) { - throw new RuntimeException("something is wrong; follow stack trace"); - } - } - - private static void assertNotNull(Object object) { - assertTrue(object != null); - } - - /** - * See {@link Simulator}. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setSimulator(Simulator simulator) { - this.simulator = simulator; - return this; - } - - /** - * Very problem-specific: given a decision variable, create trial variations - * thereof. These variations should be large enough to yield a measurable - * change in objective function value but they should still be relatively - * small (in the sense of a local search). - * - * From the experiments performed so far, it appears as if the number of - * trial decision variables should be as large as memory allows. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setRandomizer(DecisionVariableRandomizer randomizer) { - this.randomizer = randomizer; - return this; - } - - /** - * The starting point of the search. The initial simulation configuration - * should be such the simulation is converged given this decision variable. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setInitialDecisionVariable(U initialDecisionVariable) { - this.initialDecisionVariable = initialDecisionVariable; - return this; - } - - /** - * Defines the convergence criterion. - * - * This requires to set (i) the number of iterations until the simulation - * has converged and (ii) the number of iterations over which to average to - * get rid of the simulation noise. - * - * (i) The number of iterations until the simulation has converged is - * relative to the amount of variability in the decision variable - * randomization. Let X be any decision variable and Y be a random variation - * thereof. Let the simulation start with a converged plans file obtained - * with decision variable X. The number of iterations must then be large - * enough to reach a new converged state for any decision variable Y. - * - * (ii) The number of iterations over which to average should be large - * enough to make the remaining simulation noise small compared to the - * expected difference between the objective function values of any decision - * variable and its random variation. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setConvergenceCriterion(ConvergenceCriterion convergenceCriterion) { - this.convergenceCriterion = convergenceCriterion; - return this; - } - - /** - * Maximum number of random search iterations. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setMaxIterations(int maxIterations) { - this.maxIterations = maxIterations; - return this; - } - - /** - * Maximum total number of evaluated simulator transitions. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setMaxTransitions(int maxTransitions) { - this.maxTransitions = maxTransitions; - return this; - } - - /** - * How many candidate decision variables are to be created. Based on - * empirical experience, the more the better. Available memory defines an - * upper limit. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setPopulationSize(int populationSize) { - this.populationSize = populationSize; - return this; - } - - // /** - // * For default value see code of {@link RandomSearch.Builder}. - // */ - // public final RandomSearchBuilder setRnd(Random rnd) { - // this.rnd = rnd; - // return this; - // } - - // /** - // * For all practical purposes, keep this "true". "false" is only for - // * debugging. - // * - // * For default value see code of {@link RandomSearch.Builder}. - // */ - // public final RandomSearchBuilder setInterpolate(boolean interpolate) { - // this.interpolate = interpolate; - // return this; - // } - - /** - * The objective function: a quantitative measure of what one wants to - * achieve. To be minimized. - * - * For default value see code of {@link RandomSearch.Builder}. - */ - public final RandomSearchBuilder setObjectiveFunction(ObjectiveFunction objectiveFunction) { - this.objectiveFunction = objectiveFunction; - return this; - } - - // /** - // * If the currently best decision variable is to be included in the set of - // * new candidate decision variables. More an experimental feature, better - // * keep it "false". - // * - // * For default value see code of {@link RandomSearch.Builder}. - // */ - // public final RandomSearchBuilder setIncludeCurrentBest(boolean - // includeCurrentBest) { - // this.includeCurrentBest = includeCurrentBest; - // return this; - // } - - // public final RandomSearchBuilder setWarmupIterations(int - // warmupIterations) { - // this.warmupIterations = warmupIterations; - // return this; - // } - - // public final RandomSearchBuilder setUseAllWarmupIterations(boolean - // useAllWarmupIterations) { - // this.useAllWarmupIterations = useAllWarmupIterations; - // return this; - // } - - public final RandomSearch build() { - assertNotNull(simulator); - assertNotNull(randomizer); - assertNotNull(initialDecisionVariable); - assertNotNull(convergenceCriterion); - assertTrue(maxIterations > 0); - assertTrue(maxTransitions > 0); - assertTrue(populationSize > 0); - assertNotNull(objectiveFunction); - return new RandomSearch<>(simulator, randomizer, initialDecisionVariable, convergenceCriterion, maxIterations, - maxTransitions, populationSize, objectiveFunction); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearch.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearch.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearch.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/RandomSearch.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,455 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.searchalgorithms; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.nio.file.Paths; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Random; -import java.util.Set; -import java.util.logging.Logger; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.DecisionVariableRandomizer; -import floetteroed.opdyts.ObjectiveFunction; -import floetteroed.opdyts.SimulatorState; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterion; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterionResult; -import floetteroed.opdyts.trajectorysampling.MultiTrajectorySampler; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.opdyts.trajectorysampling.SingleTrajectorySampler; -import floetteroed.opdyts.trajectorysampling.Transition; -import floetteroed.utilities.statisticslogging.Statistic; -import floetteroed.utilities.statisticslogging.StatisticsWriter; -import floetteroed.utilities.statisticslogging.TimeStampStatistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class RandomSearch { - - // -------------------- CONSTANTS -------------------- - - public static final String RANDOM_SEARCH_ITERATION = "Random Search Iteration"; - - public static final String BEST_OVERALL_DECISION_VARIABLE = "Best Overall Decision Variable"; - - public static final String BEST_OVERALL_SOLUTION = "Best Overall Solution"; - - // members without obvious default values -> set in constructor - - private final Simulator simulator; - - private final DecisionVariableRandomizer randomizer; - - private final U initialDecisionVariable; - - private final ConvergenceCriterion convergenceCriterion; - - private final int maxIterations; - - private final int maxTransitions; - - private final int populationSize; - - private final ObjectiveFunction objectiveFunction; - - // members with sensible default values - - private int warmupIterations = 1; - - private boolean useAllWarmupIterations = false; - - private double initialEquilibriumGapWeight = 0.0; - - private double initialUniformityGapWeight = 0.0; - - private SelfTuner selfTuner = new SelfTuner(0.9); - - private int maxTotalMemory = Integer.MAX_VALUE; - - private int maxMemoryPerTrajectory = Integer.MAX_VALUE; - - private boolean maintainAllTrajectories = true; - - private boolean includeCurrentBest = false; - - private boolean interpolate = true; - - private Random rnd = new Random(); - - // -------------------- MEMBERS -------------------- - - private String logFileName = null; - - private String convergenceTrackingFileName = null; - - private String outerIterationLogFileName = null; - - // -------------------- CONSTRUCTION -------------------- - - public RandomSearch(final Simulator simulator, final DecisionVariableRandomizer randomizer, - final U initialDecisionVariable, final ConvergenceCriterion convergenceCriterion, final int maxIterations, - final int maxTransitions, final int populationSize, final ObjectiveFunction objectiveFunction) { - this.simulator = simulator; - this.randomizer = randomizer; - this.initialDecisionVariable = initialDecisionVariable; - this.convergenceCriterion = convergenceCriterion; - this.maxIterations = maxIterations; - this.maxTransitions = maxTransitions; - this.populationSize = populationSize; - this.objectiveFunction = objectiveFunction; - } - - // -------------------- SETTERS AND GETTERS -------------------- - - /** - * Set opdyts log file name. Default is "null". - */ - public void setLogFileName(final String logFileName) { - this.logFileName = logFileName; - } - - /** - * Set opdyts convergence tracking file name. Default is "null". - */ - public void setConvergenceTrackingFileName(final String convergenceTrackingFileName) { - this.convergenceTrackingFileName = convergenceTrackingFileName; - } - - /** - * Set opdyts outer iteration log file name. Default is "null". - */ - public void setOuterIterationLogFileName(final String outerIterationLogFileName) { - this.outerIterationLogFileName = outerIterationLogFileName; - } - - /** - * Essentially, switch on opdyts logging. - */ - public void setLogPath(String path) { - new File(path).mkdirs(); - this.setLogFileName(Paths.get(path, "opdyts.log").toString()); - this.setConvergenceTrackingFileName(Paths.get(path, "opdyts.con").toString()); - this.setOuterIterationLogFileName(Paths.get(path, "opdyts.sum").toString()); - } - - public void setMaxTotalMemory(final int maxTotalMemory) { - this.maxTotalMemory = maxTotalMemory; - } - - public void setMaxMemoryPerTrajectory(final int maxMemoryPerTrajectory) { - this.maxMemoryPerTrajectory = maxMemoryPerTrajectory; - } - - public void setMaintainAllTrajectories(final boolean maintainAllTrajectories) { - this.maintainAllTrajectories = maintainAllTrajectories; - } - - public void setInitialEquilibriumGapWeight(final double initialEquilibriumGapWeight) { - this.initialEquilibriumGapWeight = initialEquilibriumGapWeight; - } - - public void setInitialUniformityGapWeight(final double initialUniformityGapWeight) { - this.initialUniformityGapWeight = initialUniformityGapWeight; - } - - public void setSelfTuner(final SelfTuner selfTuner) { - this.selfTuner = selfTuner; - } - - public void setWarmupIterations(final int warmupIterations) { - this.warmupIterations = warmupIterations; - } - - public void setUseAllWarmupIterations(final boolean useAllWarmupIterations) { - this.useAllWarmupIterations = useAllWarmupIterations; - } - - public void setIncludeCurrentBest(final boolean includeCurrentBest) { - this.includeCurrentBest = includeCurrentBest; - } - - public void setInterpolate(final boolean interpolate) { - this.interpolate = interpolate; - } - - public void setRandom(final Random rnd) { - this.rnd = rnd; - } - - // -------------------- IMPLEMENTATION -------------------- - - private void deleteIfPossible(final String fileName) { - if (fileName != null) { - final File file = new File(fileName); - if (file.exists()) { - file.delete(); - } - } - } - - // public void run(double equilibriumGapWeight, double uniformityGapWeight) - // { - // this.run(equilibriumGapWeight, uniformityGapWeight, null); - // } - - // public void run(final SelfTuner selfTuner) { - // this.run(0.0, 0.0, selfTuner); - // } - - // public void run(double equilibriumGapWeight, double uniformityGapWeight, - // SelfTuner weightOptimizer) { - public void run() { - - double equilibriumGapWeight = this.initialEquilibriumGapWeight; - double uniformityGapWeight = this.initialUniformityGapWeight; - - int totalTransitionCnt = 0; - - this.deleteIfPossible(this.logFileName); - this.deleteIfPossible(this.convergenceTrackingFileName); - this.deleteIfPossible(this.outerIterationLogFileName); - - final StatisticsWriter outerIterationStatsWriter; - if (this.outerIterationLogFileName != null) { - outerIterationStatsWriter = new StatisticsWriter(this.outerIterationLogFileName, - false); - OuterIterationStatistics.initializeWriter(outerIterationStatsWriter); - } else { - outerIterationStatsWriter = null; - } - - U bestDecisionVariable = this.initialDecisionVariable; - Double bestObjectiveFunctionValue = null; - SimulatorState newInitialState = null; - - for (int it = 0; it < this.maxIterations && totalTransitionCnt < this.maxTransitions; it++) { - - Logger.getLogger(this.getClass().getName()).info("Iteration " + (it + 1) + " of " + this.maxIterations - + ", transitions " + totalTransitionCnt + " of " + this.maxTransitions + " ===================="); - - final Set candidates = new LinkedHashSet(); - if (this.includeCurrentBest) { - candidates.add(bestDecisionVariable); - } - while (candidates.size() < this.populationSize) { - candidates.addAll(this.randomizer.newRandomVariations(bestDecisionVariable)); - } - - int transitionsPerIteration = 0; - U newBestDecisionVariable; - double newBestObjectiveFunctionValue; - - final OuterIterationStatistics outerIterationStats; - - if (this.interpolate) { - - /* - * >>>>>>>>>>>>>>>>>>>> PARALLEL SAMPLING >>>>>>>>>>>>>>>>>>>> - */ - - outerIterationStats = new OuterIterationStatistics(System.currentTimeMillis(), it + 1, - totalTransitionCnt, equilibriumGapWeight, uniformityGapWeight); - - final MultiTrajectorySampler sampler; - sampler = new MultiTrajectorySampler<>(candidates, this.objectiveFunction, this.convergenceCriterion, - this.rnd, equilibriumGapWeight, uniformityGapWeight, (it > 0), this.maxTotalMemory, - this.maxMemoryPerTrajectory, this.maintainAllTrajectories, this.warmupIterations, - this.useAllWarmupIterations); - - if (this.logFileName != null) { - - sampler.addStatistic(this.logFileName, new TimeStampStatistic>()); - - final int currentIt = it; // inner class requires final - sampler.addStatistic(this.logFileName, new Statistic>() { - @Override - public String label() { - return RANDOM_SEARCH_ITERATION; - } - - @Override - public String value(final SamplingStage data) { - return Integer.toString(currentIt); - } - }); - - final String currentBestDecisionVariable = bestDecisionVariable.toString(); - sampler.addStatistic(this.logFileName, new Statistic>() { - @Override - public String label() { - return BEST_OVERALL_DECISION_VARIABLE; - } - - @Override - public String value(final SamplingStage data) { - return currentBestDecisionVariable; - } - }); - - final Double currentBestObjectiveFunctionValue = bestObjectiveFunctionValue; - sampler.addStatistic(this.logFileName, new Statistic>() { - @Override - public String label() { - return BEST_OVERALL_SOLUTION; - } - - @Override - public String value(final SamplingStage data) { - if (currentBestObjectiveFunctionValue == null) { - return ""; - } else { - return Double.toString(currentBestObjectiveFunctionValue); - } - } - }); - - sampler.setStandardLogFileName(this.logFileName); - } - - newInitialState = this.simulator.run(sampler, newInitialState); - newBestDecisionVariable = sampler.getDecisionVariable2convergenceResultView().keySet().iterator() - .next(); - newBestObjectiveFunctionValue = sampler.getDecisionVariable2convergenceResultView() - .get(newBestDecisionVariable).finalObjectiveFunctionValue; - transitionsPerIteration = sampler.getTotalTransitionCnt(); - - if (this.convergenceTrackingFileName != null) { - try { - if (!new File(this.convergenceTrackingFileName).exists()) { - final PrintWriter writer = new PrintWriter(this.convergenceTrackingFileName); - writer.println( - "Raw Objective Function Value\tAveraged Objective Function Value\tConverged"); - writer.flush(); - writer.close(); - } - final BufferedWriter writer = new BufferedWriter( - new FileWriter(this.convergenceTrackingFileName, true)); - final List> transitions = sampler.getTransitions(newBestDecisionVariable); - for (int i = 0; i < transitions.size(); i++) { - final ConvergenceCriterionResult convRes = this.convergenceCriterion.evaluate( - transitions.subList(0, i + 1), sampler.additionCnt(newBestDecisionVariable)); - writer.write( - transitions.get(i).getToStateObjectiveFunctionValue() + "\t" - + (convRes.finalObjectiveFunctionValue != null - ? convRes.finalObjectiveFunctionValue : "") - + "\t" + convRes.converged); - writer.newLine(); - } - writer.flush(); - writer.close(); - } catch (IOException e) { - Logger.getLogger(this.getClass().getName()).warning(e.getMessage()); - } - } - - if (selfTuner != null) { - selfTuner.update(sampler.getSamplingStages(), - sampler.getDecisionVariable2convergenceResultView() - .get(newBestDecisionVariable).finalObjectiveFunctionValue); - equilibriumGapWeight = selfTuner.getEquilibriumGapWeight(); - uniformityGapWeight = selfTuner.getUniformityGapWeight(); - } - - /* - * <<<<<<<<<<<<<<<<<<<< PARALLEL SAMPLING <<<<<<<<<<<<<<<<<<<< - */ - - } else { - - /* - * >>>>>>>>>>>>>>>>>>>> SEQUENTIAL SAMPLING >>>>>>>>>>>>>>>>>>>> - */ - - outerIterationStats = new OuterIterationStatistics(System.currentTimeMillis(), it + 1, - totalTransitionCnt, null, null); - - if (bestObjectiveFunctionValue != null) { - try { - final PrintWriter logWriter = new PrintWriter( - new BufferedWriter(new FileWriter(this.logFileName, true))); - logWriter.print((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")) - .format(new Date(System.currentTimeMillis())) + "\t"); - logWriter.print(it + "\t"); - logWriter.print(totalTransitionCnt + "\t"); - logWriter.print(bestObjectiveFunctionValue + "\t"); - logWriter.println(bestDecisionVariable); - logWriter.flush(); - logWriter.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - final SimulatorState thisRoundsInitialState = newInitialState; - - newBestDecisionVariable = null; - newBestObjectiveFunctionValue = Double.POSITIVE_INFINITY; - - for (U candidate : candidates) { - final SingleTrajectorySampler singleSampler; - singleSampler = new SingleTrajectorySampler<>(candidate, this.objectiveFunction, - this.convergenceCriterion); - final SimulatorState candidateInitialState = this.simulator.run(singleSampler, - thisRoundsInitialState); - final double candidateObjectiveFunctionValue = singleSampler - .getDecisionVariable2convergenceResultView().get(candidate).finalObjectiveFunctionValue; - if (candidateObjectiveFunctionValue < newBestObjectiveFunctionValue) { - newBestDecisionVariable = candidate; - newBestObjectiveFunctionValue = candidateObjectiveFunctionValue; - newInitialState = candidateInitialState; - } - transitionsPerIteration += singleSampler.getTotalTransitionCnt(); - } - - /* - * <<<<<<<<<<<<<<<<<<<< SEQUENTIAL SAMPLING <<<<<<<<<<<<<<<<<<<< - */ - } - - if (bestObjectiveFunctionValue == null || newBestObjectiveFunctionValue < bestObjectiveFunctionValue) { - bestDecisionVariable = newBestDecisionVariable; - bestObjectiveFunctionValue = newBestObjectiveFunctionValue; - } - totalTransitionCnt += transitionsPerIteration; - - outerIterationStats.finalize(bestObjectiveFunctionValue, transitionsPerIteration, - System.currentTimeMillis()); - if (outerIterationStatsWriter != null) { - outerIterationStatsWriter.writeToFile(outerIterationStats); - } - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/SelfTuner.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/SelfTuner.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/SelfTuner.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/SelfTuner.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.searchalgorithms; - -import static java.lang.Math.abs; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.logging.Logger; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.SamplingStage; -import floetteroed.utilities.math.Regression; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SelfTuner { - - // -------------------- MEMBERS -------------------- - - final double inertia; - - // most recent ones first - private final LinkedList> equililibriumGaps = new LinkedList<>(); - - // most recent ones first - private final LinkedList> uniformityGaps = new LinkedList<>(); - - // most recent ones first - private final LinkedList> avgObjFctVals = new LinkedList<>(); - - // most recent ones first - private final LinkedList finalObjFctVals = new LinkedList<>(); - - private double equilibriumGapWeight = 0.0; - - private double uniformityGapWeight = 0.0; - - private boolean noisySystem = true; - - private double weightScale = 1.0; - - // -------------------- CONSTRUCTION -------------------- - - public SelfTuner(final double inertia) { - this.inertia = inertia; - } - - public void setNoisySystem(final boolean noisySystem) { - this.noisySystem = noisySystem; - } - - public void setWeightScale(final double weightScale) { - this.weightScale = weightScale; - } - - // -------------------- GETTERS -------------------- - - public double getEquilibriumGapWeight() { - return (this.weightScale * this.equilibriumGapWeight); - } - - public double getUniformityGapWeight() { - return (this.weightScale * this.uniformityGapWeight); - } - - // -------------------- IMPLEMENTATION -------------------- - - private void addMeasurements(final Regression regr, final List equilGaps, final List unifGaps, - final List avgObjFctVals, final double finalObjFctVal, final double dataWeight) { - for (int k = 0; k < avgObjFctVals.size(); k++) { - final Vector x = new Vector(regr.getDimension()); - { - int i = 0; - if (equilGaps != null) { - x.set(i++, dataWeight * equilGaps.get(k)); - } - if (unifGaps != null) { - x.set(i, dataWeight * unifGaps.get(k)); - } - } - regr.update(x, dataWeight * abs(avgObjFctVals.get(k) - finalObjFctVal)); - } - } - - private void fit(final boolean useEquilGap, final boolean useUnifGap) { - final int dim = (useEquilGap ? 1 : 0) + (useUnifGap ? 1 : 0); - final Regression regr = new Regression(1.0, dim); - for (int i = 0; i < this.equililibriumGaps.size(); i++) { - this.addMeasurements(regr, (useEquilGap ? this.equililibriumGaps.get(i) : null), - (useUnifGap ? this.uniformityGaps.get(i) : null), this.avgObjFctVals.get(i), - this.finalObjFctVals.get(i), Math.pow(this.inertia, i * 0.5)); - } - int i = 0; - if (useEquilGap) { - this.equilibriumGapWeight = regr.getCoefficients().get(i++); - } else { - this.equilibriumGapWeight = 0.0; - } - if (useUnifGap) { - this.uniformityGapWeight = regr.getCoefficients().get(i); - } else { - this.uniformityGapWeight = 0.0; - } - } - - public void update(final List> stages, - final double newFinalObjFctVal) { - - final List newEquilibriumGaps = new ArrayList<>(stages.size()); - final List newUniformityGaps = new ArrayList<>(stages.size()); - final List newAvgObjFctVals = new ArrayList<>(stages.size()); - for (int k = 0; k < stages.size(); k++) { - newEquilibriumGaps.add(stages.get(k).getEquilibriumGap()); - newUniformityGaps.add(stages.get(k).getUniformityGap()); - newAvgObjFctVals.add(stages.get(k).getOriginalObjectiveFunctionValue()); - } - this.equililibriumGaps.addFirst(newEquilibriumGaps); - this.uniformityGaps.addFirst(newUniformityGaps); - this.avgObjFctVals.addFirst(newAvgObjFctVals); - this.finalObjFctVals.addFirst(newFinalObjFctVal); - - if (this.noisySystem) { - this.fit(true, true); - if ((this.equilibriumGapWeight < 0.0)) { - if (this.uniformityGapWeight > 0.0) { - this.fit(false, true); - } else { - // both non-positive, constrain to (0, 0) - } - } else { - if (this.uniformityGapWeight < 0.0) { - this.fit(true, false); - } else { - // both non-negative, no constraint needed - } - } - } else { - this.fit(true, false); - } - this.equilibriumGapWeight = Math.max(0.0, this.equilibriumGapWeight); - this.uniformityGapWeight = Math.max(0.0, this.uniformityGapWeight); - - Logger.getLogger(this.getClass().getName()) - .info("v=" + this.equilibriumGapWeight + ", w=" + this.uniformityGapWeight); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/Simulator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/Simulator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/Simulator.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/searchalgorithms/Simulator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.searchalgorithms; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.SimulatorState; -import floetteroed.opdyts.trajectorysampling.TrajectorySampler; - -/** - * - * @author Gunnar Flötteröd - * - */ -public interface Simulator { - - /** - * Implements the same functionality as run(TrajectorySampler, null). - */ - public SimulatorState run(TrajectorySampler evaluator); - - public SimulatorState run(TrajectorySampler evaluator, - SimulatorState initialState); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/SimulatorState.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/SimulatorState.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/SimulatorState.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/SimulatorState.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts; - -import floetteroed.utilities.math.Vector; - -/** - * Represents a simulator state. - * - * @author Gunnar Flötteröd - * - */ -public interface SimulatorState { - - /** - * Returns a reference to a real-valued, fixed-dimensional vector - * representation of this state. - * - * @return a reference to a real-valued, fixed-dimensional vector - * representation of this state - */ - public Vector getReferenceToVectorRepresentation(); - - /** - * Sets the simulator to this SimulatorState, meaning that the next - * simulation transition starts out from this state. - */ - public void implementInSimulation(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/FrankWolfe.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/FrankWolfe.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/FrankWolfe.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/FrankWolfe.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,214 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.apache.commons.math3.analysis.MultivariateFunction; -import org.apache.commons.math3.analysis.MultivariateVectorFunction; -import org.apache.commons.math3.optim.PointValuePair; -import org.apache.commons.math3.optim.linear.LinearConstraint; -import org.apache.commons.math3.optim.linear.LinearConstraintSet; -import org.apache.commons.math3.optim.linear.LinearObjectiveFunction; -import org.apache.commons.math3.optim.linear.Relationship; -import org.apache.commons.math3.optim.linear.SimplexSolver; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class FrankWolfe { - - // -------------------- MEMBERS -------------------- - - private final MultivariateFunction objectiveFunction; - - private final MultivariateVectorFunction gradientFunction; - - private final LineSearch lineSearch; - - // private final int dim; - - private final int maxIts = 1000; - - private final double eps; - - private Double value = null; - - private double[] point = null; - - // -------------------- CONSTRUCTION -------------------- - - public FrankWolfe(final MultivariateFunction objectiveFunction, - final MultivariateVectorFunction gradientFunction, - final LineSearch lineSearch, - // final int dim, - final double eps) { - this.objectiveFunction = objectiveFunction; - this.gradientFunction = gradientFunction; - this.lineSearch = lineSearch; - // this.dim = dim; - this.eps = eps; - } - - // -------------------- INTERNALS -------------------- - - public static double innerProd(final double[] a, final double[] b) { - double result = 0; - for (int i = 0; i < a.length; i++) { - result += a[i] * b[i]; - } - return result; - } - - private double[] sum(final double[] a, final double weightA, - final double[] b, final double weightB) { - final double[] result = new double[a.length]; - for (int i = 0; i < a.length; i++) { - result[i] = weightA * a[i] + weightB * b[i]; - } - return result; - } - - private double maxAbs(final double[] v) { - double result = 0; - for (int i = 0; i < v.length; i++) { - result = Math.max(result, Math.abs(v[i])); - } - return result; - } - - private double sum(final double[] v) { - double result = 0; - for (double val : v) { - result += val; - } - return result; - } - - // -------------------- IMPLEMENTATION -------------------- - - public double[] getPoint() { - return this.point; - } - - public double getValue() { - return this.value; - } - - public void run(final double[] initialPoint) { - - int it = 0; - - this.point = new double[initialPoint.length]; - System.arraycopy(initialPoint, 0, this.point, 0, initialPoint.length); - // Arrays.fill(this.point, 1.0 / this.dim); - this.value = this.objectiveFunction.value(this.point); - double residual = 0.0; - - do { - it++; - - /*- - * Construct linear objective function. - * - * Q(x) = Q(x0) + grad * (x - x0) - * = grad * x + [Q(x0) - grad * x0] - * - */ - final double[] grad = this.gradientFunction.value(this.point); - final LinearObjectiveFunction linearObjFctApprox = new LinearObjectiveFunction( - grad, this.value - innerProd(grad, this.point)); - - /* - * Construct constraints. - */ - final List constraints = new ArrayList( - initialPoint.length + 1); - // non-negative - for (int i = 0; i < initialPoint.length; i++) { - final double[] coeffs = new double[initialPoint.length]; - coeffs[i] = 1.0; - constraints.add(new LinearConstraint(coeffs, Relationship.GEQ, - 0.0)); - } - // sum is one - final double coeffs[] = new double[initialPoint.length]; - Arrays.fill(coeffs, 1.0); - constraints.add(new LinearConstraint(coeffs, Relationship.EQ, 1.0)); - - /* - * Solve the problem. - */ - final PointValuePair result = (new SimplexSolver()).optimize( - linearObjFctApprox, new LinearConstraintSet(constraints)); - - /* - * Update solution point. - */ - if (lineSearch == null) { - final double innoWeight = 1.0 / it; - final double[] newPoint = this.sum(result.getPoint(), - innoWeight, this.point, 1.0 - innoWeight); - final double[] dir = this.sum(newPoint, 1.0, this.point, -1.0); - // Logger.getLogger(this.getClass().getName()).info( - // "dir=" + (new Vector(dir))); - // residual = this.maxAbs(dir); - this.point = newPoint; - this.value = this.objectiveFunction.value(this.point); - } else { - final double[] dir = this.sum(result.getPoint(), 1.0, - this.point, -1.0); - double eta = this.lineSearch.stepLength(this.point, dir); - // Logger.getLogger(this.getClass().getName()).info( - // "eta(orig)=" + eta); - eta = Math.max(0, Math.min(1.0, eta)); - // Logger.getLogger(this.getClass().getName()).info( - // "dir=" + (new Vector(dir))); - // Logger.getLogger(this.getClass().getName()).info( - // "eta(constr)=" + eta); - // residual = Math.abs(eta) * Math.sqrt(innerProd(dir, dir)); // - // Math.abs(eta) * this.maxAbs(dir); - this.point = this.sum(this.point, 1.0, dir, eta); - this.value = this.objectiveFunction.value(this.point); - } - - residual = Math.abs(linearObjFctApprox.value(this.point) - - this.value); - -// Logger.getLogger(this.getClass().getName()).info( -// "it " + it + ": val = " + this.value + ", residual=" -// + residual); - - } while ((residual > this.eps) && (it < this.maxIts)); - } - - public static interface LineSearch { - public double stepLength(double[] point, double[] dir); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/MultiTrajectorySampler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/MultiTrajectorySampler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/MultiTrajectorySampler.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/MultiTrajectorySampler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,301 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import static java.util.Collections.unmodifiableMap; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.Set; -import java.util.logging.Logger; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.ObjectiveFunction; -import floetteroed.opdyts.SimulatorState; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterion; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterionResult; -import floetteroed.opdyts.logging.ConvergedObjectiveFunctionValue; -import floetteroed.opdyts.logging.EquilibriumGap; -import floetteroed.opdyts.logging.EquilibriumGapWeight; -import floetteroed.opdyts.logging.FreeMemory; -import floetteroed.opdyts.logging.LastDecisionVariable; -import floetteroed.opdyts.logging.LastEquilibriumGap; -import floetteroed.opdyts.logging.LastObjectiveFunctionValue; -import floetteroed.opdyts.logging.MaxMemory; -import floetteroed.opdyts.logging.SurrogateObjectiveFunctionValue; -import floetteroed.opdyts.logging.TotalMemory; -import floetteroed.opdyts.logging.UniformityGap; -import floetteroed.opdyts.logging.UniformityGapWeight; -import floetteroed.utilities.statisticslogging.Statistic; -import floetteroed.utilities.statisticslogging.StatisticsMultiWriter; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class MultiTrajectorySampler implements TrajectorySampler { - - // -------------------- MEMBERS -------------------- - - // set during construction - - private final ObjectiveFunction objectiveFunction; - - private final ConvergenceCriterion convergenceCriterion; - - private final Random rnd; - - private final double equilibriumWeight; - - private final double uniformityWeight; - - // minimum value is one per decision variable - private final Map decisionVariable2remainingWarmupIterations = new LinkedHashMap<>(); - - // if set to false, only the last warm-up iteration is used - private final boolean useAllWarmupIterations; - - // further program control parameters - - private final StatisticsMultiWriter> statisticsWriter; - - // runtime variables - - private int totalTransitionCnt = 0; - - private TransitionSequenceSet allTransitionSequences; - - // the common initial state of all simulation trajectories - private SimulatorState initialState = null; - - // the previously visited state - private SimulatorState fromState = null; - - private U currentDecisionVariable = null; - - private Map decisionVariable2convergenceResult = new LinkedHashMap<>(); - - private final List> samplingStages = new ArrayList<>(); - - // -------------------- CONSTRUCTION -------------------- - - public MultiTrajectorySampler(final Set decisionVariables, final ObjectiveFunction objectiveFunction, - final ConvergenceCriterion convergenceCriterion, final Random rnd, final double equilibriumWeight, - final double uniformityWeight, final boolean appendToLogFile, final int maxTotalMemory, - final int maxMemoryPerTrajectory, final boolean maintainAllTrajectories, final int warmupIterations, - final boolean useAllWarmupIterations) { - this.useAllWarmupIterations = useAllWarmupIterations; - for (U decisionVariable : decisionVariables) { - this.decisionVariable2remainingWarmupIterations.put(decisionVariable, warmupIterations); - } - this.objectiveFunction = objectiveFunction; - this.convergenceCriterion = convergenceCriterion; - this.rnd = rnd; - this.equilibriumWeight = equilibriumWeight; - this.uniformityWeight = uniformityWeight; - this.statisticsWriter = new StatisticsMultiWriter<>(appendToLogFile); - this.allTransitionSequences = new TransitionSequenceSet(maxTotalMemory, maxMemoryPerTrajectory, - maintainAllTrajectories); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - @Override - public void addStatistic(final String logFileName, final Statistic> statistic) { - this.statisticsWriter.addStatistic(logFileName, statistic); - } - - @Override - public void setStandardLogFileName(final String logFileName) { - this.addStatistic(logFileName, new SurrogateObjectiveFunctionValue()); - this.addStatistic(logFileName, new LastObjectiveFunctionValue()); - this.addStatistic(logFileName, new ConvergedObjectiveFunctionValue()); - this.addStatistic(logFileName, new EquilibriumGapWeight()); - this.addStatistic(logFileName, new EquilibriumGap()); - this.addStatistic(logFileName, new LastEquilibriumGap()); - this.addStatistic(logFileName, new UniformityGapWeight()); - this.addStatistic(logFileName, new UniformityGap()); - this.addStatistic(logFileName, new TotalMemory()); - this.addStatistic(logFileName, new FreeMemory()); - this.addStatistic(logFileName, new MaxMemory()); - this.addStatistic(logFileName, new LastDecisionVariable()); - } - - @Override - public U getCurrentDecisionVariable() { - return this.currentDecisionVariable; - } - - public int getTotalTransitionCnt() { - return this.totalTransitionCnt; - } - - @Override - public Map getDecisionVariable2convergenceResultView() { - return unmodifiableMap(this.decisionVariable2convergenceResult); - } - - @Override - public boolean foundSolution() { - return (this.decisionVariable2convergenceResult.size() > 0); - } - - public List> getSamplingStages() { - return this.samplingStages; - } - - public List> getTransitions() { - return this.allTransitionSequences.getAllTransitionsInInsertionOrder(); - } - - @Override - public ObjectiveFunction getObjectiveFunction() { - return this.objectiveFunction; - } - - public List> getTransitions(final U decisionVariable) { - return this.allTransitionSequences.getTransitions(decisionVariable); - } - - public int additionCnt(final U decisionVariable) { - return this.allTransitionSequences.additionCnt(decisionVariable); - } - - // -------------------- IMPLEMENTATION -------------------- - - public void afterIteration(final SimulatorState newState) { - - /* - * When this function is called for the first time, all of the following - * variables are null: currentDecisionVariable, initialState, fromState. - * - * Implications: - * - * The simulation needs to ensure that a sensible initial decision - * variable is used. This should be the decision variable of which - * variations are to be tried out (i.e. the "mean" decision variable). - * - * Since currentDecisionVariable, initialState, fromState are - * initialized with null values only at construction time, instances of - * this class cannot be recycled. - */ - - this.totalTransitionCnt++; - Logger.getLogger(this.getClass().getName()).info("Trajectory sampling iteration " + this.totalTransitionCnt); - - /* - * If the currentDecisionVariable is null then one has just observed the - * first simulator transition after initialization; not much can be - * learned from that. (The currentDecisionVariable being null implies - * both the fromState and the initialState being null.) - * - * If the currentDecisionVariable is not null, a full transition has - * been observed that can now be memorized for (later) processing. If - * this is done depends on if it is a warm-up iteration and what the - * configuration for using such iterations is. - */ - - if ((this.currentDecisionVariable != null) && (this.useAllWarmupIterations - || (this.decisionVariable2remainingWarmupIterations.get(this.currentDecisionVariable) == null))) { - - this.allTransitionSequences.addTransition(this.fromState, this.currentDecisionVariable, newState, - this.objectiveFunction.value(newState)); - - } - - /* - * Prepare the next iteration. - */ - - if (this.decisionVariable2remainingWarmupIterations.size() > 0) { - - // Still in the warm-up phase. - - if (this.currentDecisionVariable == null) { - // very first iteration - this.initialState = newState; - this.fromState = newState; - } else if (!this.decisionVariable2remainingWarmupIterations.containsKey(this.currentDecisionVariable)) { - // switch to new warm-up trajectory - this.fromState = this.initialState; - this.fromState.implementInSimulation(); - } else { - // continue a warm-up trajectory - this.fromState = newState; - } - - this.currentDecisionVariable = this.decisionVariable2remainingWarmupIterations.keySet().iterator().next(); // relies - this.currentDecisionVariable.implementInSimulation(); - - { - final int remainingWarmupIterations = this.decisionVariable2remainingWarmupIterations - .get(this.currentDecisionVariable); - if (remainingWarmupIterations == 1) { - this.decisionVariable2remainingWarmupIterations.remove(this.currentDecisionVariable); - } else { - this.decisionVariable2remainingWarmupIterations.put(this.currentDecisionVariable, - remainingWarmupIterations - 1); - } - } - - this.statisticsWriter.writeToFile(null, EquilibriumGapWeight.LABEL, Double.toString(this.equilibriumWeight), - UniformityGapWeight.LABEL, Double.toString(this.uniformityWeight)); - - } else { - - // Warm-up phase is over. - - // Check for convergence. - final ConvergenceCriterionResult convergenceResult = this.convergenceCriterion.evaluate( - this.allTransitionSequences.getTransitions(this.currentDecisionVariable), - this.allTransitionSequences.additionCnt(this.currentDecisionVariable)); - if (convergenceResult.converged) { - this.decisionVariable2convergenceResult.put(this.currentDecisionVariable, convergenceResult); - } - - // Process the most recent sampling stage. - final TransitionSequencesAnalyzer samplingStageEvaluator = new TransitionSequencesAnalyzer( - this.allTransitionSequences.getAllTransitionsInInsertionOrder(), this.equilibriumWeight, - this.uniformityWeight); - final SamplingStage samplingStage = samplingStageEvaluator.newOptimalSamplingStage( - this.allTransitionSequences.getTransitions(this.currentDecisionVariable).getLast(), - convergenceResult.finalObjectiveFunctionValue, (this.samplingStages.size() == 0) ? null - : this.samplingStages.get(samplingStages.size() - 1).transition2lastSolutionView()); - this.samplingStages.add(samplingStage); - this.statisticsWriter.writeToFile(samplingStage); - - // Decide what to do next. - this.currentDecisionVariable = samplingStage.drawDecisionVariable(this.rnd); - this.fromState = this.allTransitionSequences.getLastState(this.currentDecisionVariable); - this.fromState.implementInSimulation(); - this.currentDecisionVariable.implementInSimulation(); - - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SamplingStage.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SamplingStage.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SamplingStage.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SamplingStage.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import static java.util.Collections.unmodifiableMap; - -import java.util.Collections; -import java.util.Map; -import java.util.Random; -import java.util.Set; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SamplingStage { - - // -------------------- MEMBERS -------------------- - - private final Vector alphas; - - private final double equilibriumGapWeight; - - private final double uniformityWeight; - - private final double equilibriumGap; - - private final double originalObjectiveFunctionValue; - - private final double surrogateObjectiveFunctionValue; - - private final Map decisionVariable2alphaSum; - - private final U lastDecisionVariable; - - private final double lastObjectiveFunctionValue; - - private final double lastEquilibriumGap; - - private final Double convergedObjectiveFunctionValue; - - private final Map, Double> transition2lastSolutionView; - - // -------------------- CONSTRUCTION -------------------- - - SamplingStage(final Vector alphas, - final TransitionSequencesAnalyzer evaluator, - final Transition lastTransition, - final Double convergedObjectiveFunctionValue, - final Map, Double> transition2lastSolution) { - - this.alphas = alphas.copy(); - this.equilibriumGapWeight = evaluator.getEquilibriumGapWeight(); - this.uniformityWeight = evaluator.getUniformityWeight(); - - this.equilibriumGap = evaluator.equilibriumGap(alphas); - this.originalObjectiveFunctionValue = evaluator - .originalObjectiveFunctionValue(alphas); - this.surrogateObjectiveFunctionValue = evaluator - .surrogateObjectiveFunctionValue(alphas); - this.decisionVariable2alphaSum = evaluator - .decisionVariable2alphaSum(alphas); - - this.lastDecisionVariable = lastTransition.getDecisionVariable(); - this.lastObjectiveFunctionValue = lastTransition - .getToStateObjectiveFunctionValue(); - this.lastEquilibriumGap = lastTransition.getDelta().euclNorm(); - - this.convergedObjectiveFunctionValue = convergedObjectiveFunctionValue; - - this.transition2lastSolutionView = unmodifiableMap(transition2lastSolution); - } - - // -------------------- PACKAGE PRIVATE FUNCTIONALITY -------------------- - - U drawDecisionVariable(final Random rnd) { - return MathHelpers.draw(this.decisionVariable2alphaSum, rnd); - } - - // -------------------- PUBLIC CONTENT ACCESS -------------------- - - public double getEquilibriumGapWeight() { - return this.equilibriumGapWeight; - } - - public double getUniformityGapWeight() { - return this.uniformityWeight; - } - - public double getEquilibriumGap() { - return this.equilibriumGap; - } - - public double getUniformityGap() { - return this.alphas.innerProd(this.alphas); - } - - public double getSurrogateObjectiveFunctionValue() { - return this.surrogateObjectiveFunctionValue; - } - - public double getOriginalObjectiveFunctionValue() { - return this.originalObjectiveFunctionValue; - } - - public double getAlphaSum(final DecisionVariable decisionVariable) { - return this.decisionVariable2alphaSum.get(decisionVariable); - } - - public Set getDecisionVariables() { - return Collections.unmodifiableSet(this.decisionVariable2alphaSum - .keySet()); - } - - public U getLastDecisionVariable() { - return this.lastDecisionVariable; - } - - public double getLastObjectiveFunctionValue() { - return this.lastObjectiveFunctionValue; - } - - public double getLastEquilibriumGap() { - return this.lastEquilibriumGap; - } - - public Double getConvergedObjectiveFunctionValue() { - return this.convergedObjectiveFunctionValue; - } - - Map, Double> transition2lastSolutionView() { - return this.transition2lastSolutionView; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SingleTrajectorySampler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SingleTrajectorySampler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SingleTrajectorySampler.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SingleTrajectorySampler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.Map; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.ObjectiveFunction; -import floetteroed.opdyts.SimulatorState; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterion; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterionResult; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SingleTrajectorySampler implements TrajectorySampler { - - // -------------------- MEMBERS -------------------- - - private final U decisionVariable; - - private final ObjectiveFunction objectiveFunction; - - private final ConvergenceCriterion convergenceCriterion; - - // private boolean initialized = false; - - private ConvergenceCriterionResult convergenceResult = null; - - private SimulatorState fromState = null; - - private TransitionSequence transitionSequence = null; - - private int totalTransitionCnt = 0; - - // -------------------- CONSTRUCTION -------------------- - - public SingleTrajectorySampler(final U decisionVariable, final ObjectiveFunction objectiveFunction, - final ConvergenceCriterion convergenceCriterion) { - this.decisionVariable = decisionVariable; - this.objectiveFunction = objectiveFunction; - this.convergenceCriterion = convergenceCriterion; - } - - // --------------- IMPLEMENTATION OF TrajectorySampler --------------- - - @Override - public ObjectiveFunction getObjectiveFunction() { - return this.objectiveFunction; - } - - @Override - public boolean foundSolution() { - return ((this.convergenceResult != null) && this.convergenceResult.converged); - } - - @Override - public Map getDecisionVariable2convergenceResultView() { - final Map result = new LinkedHashMap<>(); - result.put(this.decisionVariable, this.convergenceResult); - return Collections.unmodifiableMap(result); - } - - @Override - public U getCurrentDecisionVariable() { - return this.decisionVariable; - } - - // @Override - // public void initialize() { - // if (this.initialized) { - // throw new RuntimeException( - // "Create new instance instead of re-initializing."); - // } - // this.initialized = true; - // this.decisionVariable.implementInSimulation(); - // } - - @Override - public void afterIteration(SimulatorState newState) { - this.totalTransitionCnt++; - if (this.fromState != null) { - if (this.transitionSequence == null) { - this.transitionSequence = new TransitionSequence(this.fromState, this.decisionVariable, newState, - this.objectiveFunction.value(newState)); - } else { - this.transitionSequence.addTransition(this.fromState, this.decisionVariable, newState, - this.objectiveFunction.value(newState)); - } - this.convergenceResult = this.convergenceCriterion.evaluate(this.transitionSequence.getTransitions(), - this.transitionSequence.additionCnt()); - } - this.fromState = newState; - this.decisionVariable.implementInSimulation(); - } - - @Override - public int getTotalTransitionCnt() { - return this.totalTransitionCnt; - // if (this.transitionSequence != null) { - // return this.transitionSequence.size(); - // } else { - // return 0; - // } - } - - @Override - public void addStatistic(final String logFileName, final Statistic> statistic) { - throw new UnsupportedOperationException(); - } - - @Override - public void setStandardLogFileName(final String logFileName) { - throw new UnsupportedOperationException(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SurrogateObjectiveFunction.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SurrogateObjectiveFunction.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SurrogateObjectiveFunction.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/SurrogateObjectiveFunction.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,145 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import java.util.List; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.utilities.math.Matrix; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SurrogateObjectiveFunction { - - // -------------------- MEMBERS -------------------- - - private final List> transitions; - - private final Matrix deltaCovariances; - - private final double equilibriumGapWeight; - - private final double uniformityGapWeight; - - // -------------------- CONSTRUCTION -------------------- - - public SurrogateObjectiveFunction(final List> transitions, - final double equilibriumGapWeight, final double uniformityWeight) { - this.transitions = transitions; - this.equilibriumGapWeight = equilibriumGapWeight; - this.uniformityGapWeight = uniformityWeight; - - this.deltaCovariances = new Matrix(transitions.size(), - transitions.size()); - for (int i = 0; i < transitions.size(); i++) { - for (int j = 0; j <= i; j++) { - final double val = transitions.get(i).getDelta() - .innerProd(transitions.get(j).getDelta()); - deltaCovariances.getRow(i).set(j, val); - deltaCovariances.getRow(j).set(i, val); - } - } - } - - // -------------------- PARAMETERS -------------------- - - double getEquilibriumGapWeight() { - return this.equilibriumGapWeight; - } - - double getUniformityWeight() { - return this.uniformityGapWeight; - } - - // -------------------- VALUES -------------------- - - double interpolatedObjectiveFunctionValue(final Vector alphas) { - double result = 0; - for (int i = 0; i < alphas.size(); i++) { - result += alphas.get(i) - * this.transitions.get(i) - .getToStateObjectiveFunctionValue(); - } - return result; - } - - double equilibriumGap(final Vector alphas) { - double result = 0; - for (int i = 0; i < alphas.size(); i++) { - result += alphas.get(i) * alphas.get(i) - * this.deltaCovariances.get(i, i); - for (int j = 0; j < i; j++) { - result += 2.0 * alphas.get(i) * alphas.get(j) - * this.deltaCovariances.get(i, j); - } - } - return Math.sqrt(Math.max(result, 0.0)); - } - - double surrogateObjectiveFunctionValue(final Vector alphas) { - return this.interpolatedObjectiveFunctionValue(alphas) - + this.equilibriumGapWeight * this.equilibriumGap(alphas) - + this.uniformityGapWeight * alphas.innerProd(alphas); - } - - // -------------------- GRADIENTS -------------------- - - Vector dInterpolObjFctVal_dAlpha(final Vector alphas) { - final Vector result = new Vector(alphas.size()); - for (int i = 0; i < alphas.size(); i++) { - result.set(i, this.transitions.get(i) - .getToStateObjectiveFunctionValue()); - } - return result; - } - - Vector dEquilibriumGap_dAlpha(final Vector alphas) { - final Vector result = new Vector(alphas.size()); - final double equilibriumGap = this.equilibriumGap(alphas); - for (int i = 0; i < alphas.size(); i++) { - result.set(i, alphas.innerProd(this.deltaCovariances.getRow(i)) - / (equilibriumGap + 1e-8)); - } - return result; - } - - Vector dUniformityGap_dAlpha(final Vector alphas) { - final Vector result = alphas.copy(); - result.mult(2.0); - return result; - } - - Vector dSurrObjFctVal_dAlpha(final Vector alphas) { - final Vector result = this.dInterpolObjFctVal_dAlpha(alphas); - result.add(this.dEquilibriumGap_dAlpha(alphas), - this.equilibriumGapWeight); - result.add(this.dUniformityGap_dAlpha(alphas), this.uniformityGapWeight); - return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TrajectorySampler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TrajectorySampler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TrajectorySampler.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TrajectorySampler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import java.util.Map; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.ObjectiveFunction; -import floetteroed.opdyts.SimulatorState; -import floetteroed.opdyts.convergencecriteria.ConvergenceCriterionResult; -import floetteroed.utilities.statisticslogging.Statistic; - -/** - * - * @author Gunnar Flötteröd - * - */ -public interface TrajectorySampler { - - /** - * Indicates if there is (no) need to further continue the iterations. - * - * TODO Rename into something more meaningful, perhaps "stopIterations". - */ - public boolean foundSolution(); - - public U getCurrentDecisionVariable(); - - public int getTotalTransitionCnt(); - - public Map getDecisionVariable2convergenceResultView(); - - public void addStatistic(final String logFileName, - final Statistic> statistic); - - public void setStandardLogFileName(String logFileName); - - /** - * To be called once after each simulation iteration. Registers the - * simulation state reached after that iteration and implements a new trial - * decision variable in the simulation. - * - * @param newState - * the newly reached simulator state - */ - public void afterIteration(SimulatorState newState); - - // TODO NEW - public ObjectiveFunction getObjectiveFunction(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/Transition.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/Transition.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/Transition.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/Transition.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.utilities.math.Vector; - -/** - * Represents a simulator transition. - * - * @author Gunnar Flötteröd - * - */ -public class Transition { - - // -------------------- MEMBERS -------------------- - - private final U decisionVariable; - - private final Vector delta; - - private final Vector toState; - - private final double toStateObjectiveFunctionValue; - - // -------------------- CONSTRUCTION -------------------- - - /** - * Memorizes *references* to its parameters. - * - * @param decisionVariable - * the decision variable used in this transition - * @param delta - * the move in vector-valued state space representing this - * transition - * @param toStateObjectiveFunctionValue - * the objective function value of the to-state of this - * transition - */ - Transition(final U decisionVariable, final Vector delta, - final Vector toState, final double toStateObjectiveFunctionValue) { - if (decisionVariable == null) { - throw new IllegalArgumentException("decisionVariable is null"); - } - if (delta == null) { - throw new IllegalArgumentException("delta is null"); - } - this.decisionVariable = decisionVariable; - this.delta = delta; - this.toState = toState; - this.toStateObjectiveFunctionValue = toStateObjectiveFunctionValue; - } - - // -------------------- GETTERS -------------------- - - public U getDecisionVariable() { - return this.decisionVariable; - } - - public Vector getDelta() { - return this.delta; - } - - public Vector getToState() { - return this.toState; - } - - public double getToStateObjectiveFunctionValue() { - return this.toStateObjectiveFunctionValue; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequence.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequence.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequence.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequence.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,129 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import java.util.LinkedList; -import java.util.List; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.SimulatorState; -import floetteroed.utilities.math.Vector; - -/** - * Represents a sequence of simulator transitions. - * - * @author Gunnar Flötteröd - * - */ -class TransitionSequence { - - // -------------------- MEMBERS -------------------- - - private final LinkedList> transitions = new LinkedList>(); - - private SimulatorState lastState = null; - - private int additionCnt = 0; - - // -------------------- CONSTRUCTION -------------------- - - TransitionSequence(final SimulatorState fromState, - final U decisionVariable, final SimulatorState toState, - final double objectiveFunctionValue) { - this.addTransition(fromState, decisionVariable, toState, - objectiveFunctionValue); - } - - // -------------------- SETTERS -------------------- - - void addTransition(final SimulatorState fromState, - final U decisionVariable, final SimulatorState toState, - final double objectiveFunctionValue) { - - if (fromState == null) { - throw new IllegalArgumentException("fromState is null"); - } - if (decisionVariable == null) { - throw new IllegalArgumentException("decisionVariable is null"); - } - if (toState == null) { - throw new IllegalArgumentException("toState is null"); - } - if ((this.size() > 0) - && (!this.getDecisionVariable().equals(decisionVariable))) { - throw new IllegalArgumentException("Cannot add " - + " transition with decision variable " - + this.getDecisionVariable() + " to " - + " transition sequence with decision variable " - + this.getDecisionVariable() + "."); - } - - final Vector delta = toState.getReferenceToVectorRepresentation() - .copy(); - delta.add(fromState.getReferenceToVectorRepresentation(), -1.0); - - // new transitions are added at the end - this.transitions.add(new Transition<>(decisionVariable, delta, toState - .getReferenceToVectorRepresentation(), objectiveFunctionValue)); - this.lastState = toState; - this.additionCnt++; - } - - List> shrinkToMaximumLength(final int maximumLength) { - final List> removed = new LinkedList<>(); - while (this.transitions.size() > maximumLength) { - // old transitions are removed from the front - removed.add(this.transitions.removeFirst()); - } - return removed; - } - - // -------------------- GETTERS -------------------- - - DecisionVariable getDecisionVariable() { - return this.transitions.getFirst().getDecisionVariable(); - } - - SimulatorState getLastState() { - return this.lastState; - } - - LinkedList> getTransitions() { - return this.transitions; - } - - Transition getLastTransition() { - // transitions are added at the end (and removed from the front) - return this.transitions.getLast(); - } - - int size() { - return this.transitions.size(); - } - - int additionCnt() { - return this.additionCnt; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequencesAnalyzer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequencesAnalyzer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequencesAnalyzer.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequencesAnalyzer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,219 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.math3.analysis.MultivariateFunction; -import org.apache.commons.math3.analysis.MultivariateVectorFunction; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.trajectorysampling.FrankWolfe.LineSearch; -import floetteroed.utilities.math.Vector; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class TransitionSequencesAnalyzer { - - // -------------------- CONSTANTS -------------------- - - private final List> transitions; - - private SurrogateObjectiveFunction surrogateObjectiveFunction; - - // -------------------- CONSTRUCTION -------------------- - - public TransitionSequencesAnalyzer(final List> transitions, - final double equilibriumGapWeight, final double uniformityGapWeight) { - if ((transitions == null) || (transitions.size() == 0)) { - throw new IllegalArgumentException( - "there must be at least one transition"); - } - this.transitions = transitions; - this.surrogateObjectiveFunction = new SurrogateObjectiveFunction<>( - transitions, equilibriumGapWeight, Math.max(0.0, - uniformityGapWeight)); - } - - // -------------------- SETTERS AND GETTERS -------------------- - - public double getEquilibriumGapWeight() { - return this.surrogateObjectiveFunction.getEquilibriumGapWeight(); - } - - public double getUniformityWeight() { - return this.surrogateObjectiveFunction.getUniformityWeight(); - } - - // -------------------- GENERAL STATISTICS -------------------- - - public double originalObjectiveFunctionValue(final Vector alphas) { - return this.surrogateObjectiveFunction - .interpolatedObjectiveFunctionValue(alphas); - } - - public double equilibriumGap(final Vector alphas) { - return this.surrogateObjectiveFunction.equilibriumGap(alphas); - } - - public double surrogateObjectiveFunctionValue(final Vector alphas) { - return this.surrogateObjectiveFunction - .surrogateObjectiveFunctionValue(alphas); - } - - public Map decisionVariable2alphaSum(final Vector alphas) { - final Map result = new LinkedHashMap(); - for (int i = 0; i < alphas.size(); i++) { - final U decisionVariable = this.transitions.get(i) - .getDecisionVariable(); - final Double sum = result.get(decisionVariable); - result.put(decisionVariable, sum == null ? alphas.get(i) : sum - + alphas.get(i)); - } - return result; - } - - // -------------------- IMPLEMENTATION -------------------- - - public SamplingStage newOptimalSamplingStage( - final Transition lastTransition, - final Double convergedObjectiveFunctionValue, - final Map, Double> transition2initialSolution) { - final double[] result = this - .newOptimalPoint(transition2initialSolution); - final Vector alphas = new Vector(result); - return new SamplingStage<>(alphas, this, lastTransition, - convergedObjectiveFunctionValue, - this.newTransition2solution(result)); - } - - public double[] newOptimalPoint( - final Map, Double> transition2initialSolution) { - final FrankWolfe fw = new FrankWolfe(new MyObjectiveFunction(), - new MyGradient(), new MyLineSearch(), 1e-6); - fw.run(this.newInitialPoint(this.transitions.size(), - transition2initialSolution)); - return fw.getPoint(); - } - - // -------------------- SOLUTION BOOKKEEPING -------------------- - - private Map, Double> newTransition2solution(double[] point) { - final Map, Double> result = new LinkedHashMap, Double>(); - for (int i = 0; i < this.transitions.size(); i++) { - result.put(this.transitions.get(i), point[i]); - } - return result; - } - - private double[] newInitialPoint(final int targetDim, - final Map, Double> transition2initialSolution) { - final double[] result = new double[targetDim]; - if (transition2initialSolution != null) { - double recycledSum = 0; - for (int i = 0; i < this.transitions.size(); i++) { - final Double val = transition2initialSolution - .get(this.transitions.get(i)); - if (val != null) { - result[i] = val; - recycledSum += val; - } - } - if (recycledSum > 1e-3) { - for (int i = 0; i < result.length; i++) { - result[i] = result[i] / recycledSum; - } - } else { - Arrays.fill(result, 1.0 / result.length); - } - } else { - Arrays.fill(result, 1.0 / result.length); - } - return result; - } - - // -------------------- OPTIMIZATION INTERNALS -------------------- - - private class MyObjectiveFunction implements MultivariateFunction { - @Override - public double value(double[] point) { - final Vector alphas = new Vector(point); - return surrogateObjectiveFunctionValue(alphas); - } - } - - private class MyGradient implements MultivariateVectorFunction { - @Override - public double[] value(double[] point) { - final Vector alphas = new Vector(point); - return surrogateObjectiveFunction.dSurrObjFctVal_dAlpha(alphas) - .toArray(); - } - } - - private class MyLineSearch implements LineSearch { - @Override - public double stepLength(final double[] pnt, final double[] dir) { - - final double v = surrogateObjectiveFunction - .getEquilibriumGapWeight(); - final double w = surrogateObjectiveFunction.getUniformityWeight(); - final double eg = surrogateObjectiveFunction - .equilibriumGap(new Vector(pnt)); - - final Vector deltaSumTimesDir = new Vector(transitions.get(0) - .getDelta().size()); - final Vector deltaSumTimesPnt = new Vector(transitions.get(0) - .getDelta().size()); - for (int i = 0; i < transitions.size(); i++) { - deltaSumTimesDir.add(transitions.get(i).getDelta(), dir[i]); - deltaSumTimesPnt.add(transitions.get(i).getDelta(), pnt[i]); - } - - double num = 0; - for (int i = 0; i < transitions.size(); i++) { - num -= eg * dir[i] - * transitions.get(i).getToStateObjectiveFunctionValue(); - } - num -= v * deltaSumTimesDir.innerProd(deltaSumTimesPnt); - num -= 2.0 * w * eg * FrankWolfe.innerProd(dir, pnt); - - double denom = v * deltaSumTimesDir.innerProd(deltaSumTimesDir); - denom += 2.0 * w * eg * FrankWolfe.innerProd(dir, dir); - - if (Math.abs(num) > 0) { - return (num / denom); - } else { - return 0.0; - } - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequenceSet.java sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequenceSet.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequenceSet.java 2018-12-18 09:58:49.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/opdyts/src/main/java/floetteroed/opdyts/trajectorysampling/TransitionSequenceSet.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/* - * Opdyts - Optimization of dynamic traffic simulations - * - * Copyright 2015, 2016 Gunnar Flötteröd - * - * - * This file is part of Opdyts. - * - * Opdyts 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. - * - * Opdyts 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Opdyts. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.opdyts.trajectorysampling; - -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import floetteroed.opdyts.DecisionVariable; -import floetteroed.opdyts.SimulatorState; - -/** - * - * @author Gunnar Flötteröd - * - */ -class TransitionSequenceSet { - - // -------------------- MEMBERS -------------------- - - private final int maxTotalMemory; - - private final int maxMemoryPerTrajectory; - - private final boolean maintainAllTrajectories; - - private final Map> decisionVariable2transitionSequence = new LinkedHashMap<>(); - - private final LinkedList> transitionsInInsertionOrder = new LinkedList>(); - - // -------------------- CONSTRUCTION -------------------- - - TransitionSequenceSet(final int maxTotalMemory, - final int maxMemoryPerTrajectory, - final boolean maintainAllTrajectories) { - this.maxTotalMemory = maxTotalMemory; - this.maxMemoryPerTrajectory = maxMemoryPerTrajectory; - this.maintainAllTrajectories = maintainAllTrajectories; - } - - // -------------------- SETTERS -------------------- - - void addTransition(final SimulatorState fromState, - final U decisionVariable, final SimulatorState toState, - final double objectiveFunctionValue) { - - /* - * Add the new Transition to the individual TransitionSequence and the - * chronological list of all transitions. - */ - - TransitionSequence transitionSequence = this.decisionVariable2transitionSequence - .get(decisionVariable); - if (transitionSequence == null) { - transitionSequence = new TransitionSequence(fromState, - decisionVariable, toState, objectiveFunctionValue); - this.decisionVariable2transitionSequence.put(decisionVariable, - transitionSequence); - } else { - transitionSequence.addTransition(fromState, decisionVariable, - toState, objectiveFunctionValue); - } - this.transitionsInInsertionOrder.add(transitionSequence - .getLastTransition()); - - /* - * Ensure that the individual TransitionSequence is not too long. If - * necessary, remove also the corresponding elements in the - * chronological list of all transitions. - */ - final List> removed = transitionSequence - .shrinkToMaximumLength(this.maxMemoryPerTrajectory); - this.transitionsInInsertionOrder.removeAll(removed); - - /* - * If the chronological list of all transitions is too long, remove as - * many transitions as necessary and possible. - */ - - final Set> transitionsToMaintain = new LinkedHashSet<>(); - if (this.maintainAllTrajectories) { - for (TransitionSequence sequence : this.decisionVariable2transitionSequence - .values()) { - transitionsToMaintain.add(sequence.getLastTransition()); - } - } - - int candidateRemovalIndex = 0; - while (Math.max(this.maxTotalMemory, candidateRemovalIndex) < this.transitionsInInsertionOrder - .size()) { - final Transition candidateRemovalTransition = this.transitionsInInsertionOrder - .get(candidateRemovalIndex); - if (!transitionsToMaintain.contains(candidateRemovalTransition)) { - this.transitionsInInsertionOrder - .remove(candidateRemovalTransition); - } else { - candidateRemovalIndex++; - } - } - } - - // -------------------- GETTERS -------------------- - - int size() { - return this.transitionsInInsertionOrder.size(); - } - - int additionCnt(final U decisionVariable) { - return this.decisionVariable2transitionSequence.get(decisionVariable) - .additionCnt(); - } - - LinkedList> getTransitions(final U decisionVariable) { - return this.decisionVariable2transitionSequence.get(decisionVariable) - .getTransitions(); - } - - LinkedList> getAllTransitionsInInsertionOrder() { - return this.transitionsInInsertionOrder; - } - - SimulatorState getLastState(final U decisionVariable) { - return this.decisionVariable2transitionSequence.get(decisionVariable) - .getLastState(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/pom.xml sumo-1.2.0+dfsg1/tools/contributed/calibration/pom.xml --- sumo-1.1.0+dfsg1/tools/contributed/calibration/pom.xml 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/pom.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - 4.0.0 - - floetteroed - floetteroed - 1.0 - pom - - - true - - - - cadyts - opdyts - bioroute - utilities - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/pom.xml sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/pom.xml --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/pom.xml 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/pom.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ - - - 4.0.0 - - floetteroed.utilities - floetteroed-utilities - 1.0.0 - - - GNU General Public License - - - - - - bintray - https://api.bintray.com/maven/matsim/matsim/floetteroed-utilities - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - false - false - UTF-8 - - true - 128m - 512m - - 4000 - 100 - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - - - - - org.apache.commons - commons-math3 - 3.4.1 - - - - - \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParserElement.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParserElement.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParserElement.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParserElement.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.commandlineparser; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class CommandLineParserElement implements - Comparable { - - // -------------------- CONSTANTS -------------------- - - private final String key; - - private final String defaultValue; - - private final String explanation; - - private final boolean required; - - // -------------------- CONSTRUCTION -------------------- - - public CommandLineParserElement(final String key, final boolean required, - final String defaultValue, final String explanation) { - if (key == null) { - throw new IllegalArgumentException("key must not be null"); - } - this.key = key.toUpperCase(); - this.defaultValue = defaultValue; - this.explanation = explanation; - this.required = required; - } - - // -------------------- CONTENT ACCESS -------------------- - - public String getKey() { - return this.key; - } - - public String getDefaultValue() { - return this.defaultValue; - } - - public String getExplanation() { - return this.explanation; - } - - public boolean getRequired() { - return this.required; - } - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.key); - if (this.required) { - result.append(" : required; "); - } else { - result.append(" : optional; "); - } - result.append(this.explanation); - result.append("; "); - if (this.defaultValue == null) { - result.append("no default value"); - } else { - result.append("default = "); - result.append(this.defaultValue); - } - return result.toString(); - } - - // -------------------- IMPLEMENTATION OF Comparable -------------------- - - @Override - public int compareTo(CommandLineParserElement arg0) { - return this.getKey().compareTo(arg0.getKey()); - } - - @Override - public boolean equals(Object o) { - if (o == null) { - return false; - } - try { - final CommandLineParserElement otherElement = (CommandLineParserElement) o; - return this.key.equals(otherElement.key); - } catch (ClassCastException e) { - return false; - } - } - - @Override - public int hashCode() { - return this.key.hashCode(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParser.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParser.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParser.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/commandlineparser/CommandLineParser.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.commandlineparser; - -import static java.util.Collections.unmodifiableSet; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; -import java.util.TreeSet; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class CommandLineParser { - - // -------------------- CONSTANTS -------------------- - - public static final String KEY_PREFIX = "-"; - - // -------------------- MEMBERS -------------------- - - private final Map parameters = new HashMap(); - - private final Map elements = new TreeMap(); - - private final Set missingElements = new TreeSet(); - - private boolean isDone = false; - - // -------------------- CONSTRUCTION & SETUP -------------------- - - public CommandLineParser() { - } - - public boolean defineParameter(final String key, final boolean required, - final String defaultValue, final String explanation) { - if (this.isDone) { - return false; - } else { - this.elements.put(key.toUpperCase(), new CommandLineParserElement( - key, required, defaultValue, explanation)); - return true; - } - } - - public boolean parse(final String[] args) { - if (this.isDone) { - return false; - } else { - if (args != null) { - for (int i = 0; i < args.length; i += 2) { - this.put(args[i], args[i + 1]); - } - } - final Map defaults = new HashMap(); - for (CommandLineParserElement element : this.elements.values()) { - if (!this.containsKey(element.getKey())) { - if (element.getRequired()) { - this.missingElements.add(element); - } - if (element.getDefaultValue() != null) { - defaults.put(element.getKey(), element - .getDefaultValue()); - } - } - } - this.parameters.putAll(defaults); - this.isDone = true; - return true; - } - } - - // -------------------- BASIC INTERNAL OPERATIONS -------------------- - - // private boolean isKey(final String s) { - // return (s != null && KEY_PREFIX.equals(s.substring(0, 1))); - // } - - private void put(final String key, final String value) { - this.parameters.put(key.toUpperCase(), value); - } - - private String get(final String key) { - return this.parameters.get(key.toUpperCase()); - } - - public boolean containsKey(final String key) { - return this.parameters.containsKey(key.toUpperCase()); - } - - // -------------------- CONTENT ACCESS -------------------- - - public int size() { - return this.parameters.size(); - } - - public boolean isComplete() { - if (this.isDone) { - return (this.missingElements.size() == 0); - } else { - return false; - } - } - - public Set getMissingElements() { - return unmodifiableSet(this.missingElements); - } - - public Set getElements() { - return unmodifiableSet(new TreeSet( - this.elements.values())); - } - - public boolean containsKeys(final String... keys) { - if (keys != null) { - for (String key : keys) { - if (!containsKey(key)) { - return false; - } - } - } - return true; - } - - public String getString(final String key) { - return this.get(key); - } - - public int getInteger(final String key) { - return Integer.parseInt(this.get(key)); - } - - public long getLong(final String key) { - return Long.parseLong(this.get(key)); - } - - public double getDouble(final String key) { - return Double.parseDouble(this.get(key)); - } - - public boolean getBoolean(final String key) { - return Boolean.parseBoolean(this.get(key)); - } - - @Override - public String toString() { - return this.parameters.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Config.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Config.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Config.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Config.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,221 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.config; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class Config { - - // -------------------- MEMBERS -------------------- - - private final String element; - - private final LinkedList values = new LinkedList(); - - private Map element2child = new LinkedHashMap(); - - private final ConfigPaths configPaths; - - // -------------------- CONSTRUCTION -------------------- - - public Config(final String element, final String configPath) { - if (element == null) { - throw new IllegalArgumentException("element is null"); - } else if ("".equals(element)) { - throw new IllegalArgumentException("element is an empty string"); - } - this.element = element; - if (configPath == null) { - this.configPaths = null; - } else { - this.configPaths = new ConfigPaths(configPath); - } - } - - // -------------------- INTERNALS -------------------- - - private List key(final String... keysAndValue) { - final List result = new ArrayList( - keysAndValue.length - 1); - for (int i = 0; i < keysAndValue.length - 1; i++) { - result.add(keysAndValue[i]); - } - return result; - } - - private String value(final String... keysAndValue) { - return keysAndValue[keysAndValue.length - 1]; - } - - // -------------------- SETTERS -------------------- - - public void clear() { - this.element2child.clear(); - this.values.clear(); - } - - public boolean add(final List key, final String value) { - if (key.size() > 0 && this.element.equals(key.get(0))) { - if (key.size() == 1) { - this.values.addLast(value); - return true; - } else { - final List subKey = key.subList(1, key.size()); - Config child = this.element2child.get(subKey.get(0)); - if (child == null) { - child = new Config(subKey.get(0), this.getConfigPath()); - this.element2child.put(subKey.get(0), child); - } - return child.add(subKey, value); - } - } else { - return false; - } - } - - public void add(final String... keysAndValue) { - this.add(this.key(keysAndValue), this.value(keysAndValue)); - } - - // -------------------- GETTERS -------------------- - - public String getConfigPath() { - if (this.configPaths == null) { - return null; - } else { - return this.configPaths.getAbsolutePathToConfig(); - } - } - - public String absolutePath(final String fileName) { - if (this.configPaths == null) { - return fileName; - } else { - return this.configPaths.getAbsoluteFileName(fileName); - } - } - - public int size() { - int result = this.values.size(); - for (Config child : this.element2child.values()) { - result += child.size(); - } - return result; - } - - public List getList(final List keys) { - if (keys.size() > 0 && this.element.equals(keys.get(0))) { - if (keys.size() == 1) { - return this.values; - } else { - final Config child = this.element2child.get(keys.get(1)); - if (child != null) { - return child.getList(keys.subList(1, keys.size())); - } - } - } - // TODO NEW! - return new ArrayList(0); - // return null; - } - - public List getList(final String... keys) { - return this.getList(Arrays.asList(keys)); - } - - public boolean containsKeys(final String... keys) { - return (this.getList(keys) != null); - } - - public String get(final int index, final List keys) { - final List list = this.getList(keys); - // TODO added size check 2017-08-23 - if ((list != null) && (index < list.size())) { - return list.get(index); - } else { - return null; - } - } - - public String get(final int index, final String... keys) { - return this.get(index, Arrays.asList(keys)); - } - - public String get(final List keys) { - return this.get(0, keys); - } - - public String get(final String... keys) { - return this.get(0, keys); - } - - public Config newSubConfig(final List keys) { - if (keys.size() > 0 && this.element.equals(keys.get(0))) { - if (keys.size() == 1) { - return this; - } else { - final Config child = this.element2child.get(keys.get(1)); - if (child != null) { - return child.newSubConfig(keys.subList(1, keys.size())); - } - } - } - return null; - } - - public Config newSubConfig(final String... parentKeys) { - return this.newSubConfig(Arrays.asList(parentKeys)); - } - - public List toXML(final String prefix, final String indent) { - final ArrayList result = new ArrayList(); - if (this.values.size() == 0) { - result.add(prefix + "<" + this.element + ">"); - for (Config child : this.element2child.values()) { - result.addAll(child.toXML(prefix + indent, indent)); - } - result.add(prefix + ""); - } else { - for (String value : this.values) { - result.add(prefix + "<" + this.element + " value=\"" + value - + "\">"); - for (Config child : this.element2child.values()) { - result.addAll(child.toXML(prefix + indent, indent)); - } - result.add(prefix + ""); - } - } - return result; - } - - public List toXML() { - return this.toXML("", ""); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigPaths.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigPaths.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigPaths.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigPaths.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.config; - -import java.io.File; - -/** - * Completes paths given in a configuration file by - *

    - *
  • maintaining absolute paths; - *
  • evaluating relative paths relative to the configuration file and - * returning the resulting absolute path. - *
- * - * @author Flötteröd - * - */ -public class ConfigPaths { - - // -------------------- MEMBERS -------------------- - - private final File pathToConfig; - - // -------------------- CONSTRUCTION -------------------- - - public ConfigPaths(final String pathToConfig) { - if (pathToConfig == null) { - throw new IllegalArgumentException("path to config is null"); - } - final File absoluteFile = new File(pathToConfig).getAbsoluteFile(); - if (absoluteFile.isDirectory()) { - this.pathToConfig = absoluteFile; - } else if (absoluteFile.isFile()) { - this.pathToConfig = absoluteFile.getParentFile(); - } else { - throw new IllegalArgumentException( - "path to config neither is neither an existing file nor an existing directory"); - } - } - - // -------------------- IMPLEMENTATION -------------------- - - public String getAbsolutePathToConfig() { - return this.pathToConfig.getAbsolutePath(); - } - - public String getAbsoluteFileName(final String fileName) { - final File originalFile = new File(fileName); - if (originalFile.isAbsolute()) { - return fileName; - } else { - return new File(this.pathToConfig, fileName).getAbsolutePath(); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigReader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigReader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigReader.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigReader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.config; - -import java.util.ArrayList; -import java.util.LinkedList; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.Attributes; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.DefaultHandler; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class ConfigReader extends DefaultHandler { - - // -------------------- CONSTANTS -------------------- - - private static final String VALUE_ATTR = "value"; - - // -------------------- MEMBERS -------------------- - - private Config config = null; - - private LinkedList currentKey = null; - - private String configPath = null; - - // -------------------- CONSTRUCTION -------------------- - - public ConfigReader() { - } - - // -------------------- IMPLEMENTATION -------------------- - - public Config read(final String fileName) { - this.configPath = fileName; - this.currentKey = new LinkedList(); - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(false); - factory.setNamespaceAware(false); - final SAXParser parser = factory.newSAXParser(); - final XMLReader reader = parser.getXMLReader(); - reader.setContentHandler(this); - /* - * ignore the DTD declaration - */ - reader.setFeature("http://apache.org/xml/features/" - + "nonvalidating/load-external-dtd", false); - reader.setFeature("http://xml.org/sax/features/" + "validation", - false); - reader.parse(fileName); - } catch (Exception e) { - throw new RuntimeException(e); - } - return this.config; - } - - // -------------------- OVERRIDING OF DefaultHandler -------------------- - - @Override - public void startElement(final String uri, final String lName, - final String qName, final Attributes attrs) { - if (this.config == null) { - this.config = new Config(qName, this.configPath); - } - this.currentKey.add(qName); - final String value = attrs.getValue(VALUE_ATTR); - if (value != null) { - this.config.add(new ArrayList(this.currentKey), value); - } - } - - @Override - public void endElement(final String uri, final String lName, - final String qName) { - this.currentKey.removeLast(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigurableInstantiator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigurableInstantiator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigurableInstantiator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/ConfigurableInstantiator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.config; - -import java.util.Arrays; - -/** - * Instantiates and configures a Configurable class. - * - * @author Gunnar Flötteröd - * - */ -public class ConfigurableInstantiator { - - // -------------------- CONSTRUCTION -------------------- - - private ConfigurableInstantiator() { - // not to be instantiated - } - - // -------------------- IMPLEMENTATION -------------------- - - /** - * Instantiates and configures a class indicated within an element of the - * XML tree represented by config. - *

- * All configuration used here is assumed to be contained in the XML - * sub-tree having the second last entry of elements - * as its root. The class to be instantiated is identified by the the - * value attribute of the last entry of - * elements. - * - * @param config - * object representation of the XML configuration file - * @param elements - * the element sequence until (and including) the element that - * defines the class to be instantiated - * @return a configured instance of Configurable (needs to be cast to a more - * specific type) - * @throws RuntimeException - * encapsulates whatever can go wrong in the process - */ - public static Configurable newConfiguredInstance(final Config config, - final String... elements) { - /* - * (1) instantiate class - */ - final Class clazz; - final Configurable result; - try { - clazz = Class.forName(config.get(elements)); - result = (Configurable) clazz.newInstance(); - } catch (Exception e) { - throw new RuntimeException(e); - } - /* - * (2) configure class - */ - result.configure(config.newSubConfig(Arrays.asList(elements).subList(0, - elements.length - 1))); - return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Configurable.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Configurable.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Configurable.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/config/Configurable.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.config; - - -/** - * BIOROUTE interface. This is the super-interface of all other - * BIOROUTE interfaces. Enables the configuration of reflectively generated - * classes. - * - * @author Gunnar Flötteröd - * - */ -public interface Configurable { - - /** - * Configures this instance. Should be called right after instantiation. - * - * @param config - * object representation of the XML sub-tree defining - * this object and its configuration - */ - public void configure(final Config config); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Discretizer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Discretizer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Discretizer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Discretizer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -package floetteroed.utilities; - -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class Discretizer { - - // -------------------- CONSTRUCTION -------------------- - - private Discretizer() { - // do not instantiate - } - - // -------------------- IMPLEMENTATION -------------------- - - static public List interpolateOrder0(final List times_s, - final List values, final double startTime_s, - final double binSize_s, final int binCnt) { - return interpolate(times_s, values, startTime_s, binSize_s, binCnt, - false); - } - - static public List interpolateOrder1(final List times_s, - final List values, final double startTime_s, - final double binSize_s, final int binCnt) { - return interpolate(times_s, values, startTime_s, binSize_s, binCnt, - true); - } - - static private List interpolate(final List times_s, - final List values, final double startTime_s, - final double binSize_s, final int binCnt, - final boolean interpolatePoints) { - if (times_s == null || times_s.size() == 0) { - throw new IllegalArgumentException("list of times is null or empty"); - } - if (values == null || values.size() == 0) { - throw new IllegalArgumentException( - "list of values is null or empty"); - } - if (times_s.size() != values.size()) { - throw new IllegalArgumentException( - "list sizes of times and values do not match: " - + times_s.size() + " vs. " + values.size()); - } - final List result = new ArrayList(binCnt); - int nextIndex = 0; - for (int bin = 0; bin < binCnt; bin++) { - /* - * (1) compute the time for which to interpolate a value (use an - * outer loop with integer indices to avoid floating point error - * accumulation) - */ - final double currentTime_s = startTime_s + bin * binSize_s; - /* - * (2) try to find the data point right after the current - * interpolation time - */ - while (times_s.get(nextIndex) < currentTime_s - && nextIndex < times_s.size() - 1) { - nextIndex++; - } - /* - * (3) compute and store the interpolated value - */ - if (times_s.size() == 1 || nextIndex == 0 - || times_s.get(nextIndex) < currentTime_s) { - /* - * (3.A) we have just one interpolation point or we are before - * or after all interpolation points - */ - result.add(values.get(nextIndex)); - } else { - /* - * (3.B) we are within the interpolation points - */ - final double w; - if (interpolatePoints) { - w = (times_s.get(nextIndex) - currentTime_s) - / (times_s.get(nextIndex) - times_s - .get(nextIndex - 1)); - } else { - w = 1.0; - } - result.add(w * values.get(nextIndex - 1) + (1.0 - w) - * values.get(nextIndex)); - } - } - return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicData.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicData.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicData.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicData.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,226 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import floetteroed.utilities.math.MathHelpers; - - - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the key type - */ -public class DynamicData implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private final int startTime_s; - - private final int binSize_s; - - private int binCnt; - - // -------------------- MEMBER VARIABLES -------------------- - - protected final Map data = new HashMap(); - - // -------------------- CONSTRUCTION -------------------- - - public DynamicData(final int startTime_s, final int binSize_s, - final int binCnt) { - - // CHECK - - if (binSize_s <= 0) { - throw new IllegalArgumentException( - "binSize_s must be strictly positive"); - } - - if (binCnt <= 0) { - throw new IllegalArgumentException( - "binCnt must be strictly positive"); - } - - // CONTINUE - - this.startTime_s = startTime_s; - this.binSize_s = binSize_s; - this.binCnt = binCnt; - } - - // -------------------- BASIC CONTENT ACCESS -------------------- - - public int getStartTime_s() { - return this.startTime_s; - } - - public int getBinSize_s() { - return this.binSize_s; - } - - public int getBinCnt() { - return this.binCnt; - } - - public int bin(final int time_s) { - return (time_s - this.startTime_s) / this.binSize_s; - } - - public int binStart_s(final int bin) { - return this.startTime_s + bin * this.binSize_s; - } - - protected double[] getNonNullDataArray(final K key) { - double[] dataArray = this.data.get(key); - if (dataArray == null) { - dataArray = new double[this.getBinCnt()]; - this.data.put(key, dataArray); - } - return dataArray; - } - - public void put(final K key, final int bin, final double value) { - this.getNonNullDataArray(key)[bin] = value; - } - - public void add(final K key, final int bin, final double value) { - this.getNonNullDataArray(key)[bin] += value; - } - - public void clear() { - this.data.clear(); - } - - public Set keySet() { - return this.data.keySet(); - } - - public double getBinValue(final K key, final int bin) { - final double[] dataArray = this.data.get(key); - if (dataArray == null) { - return 0; - } else { - return dataArray[bin]; - } - } - - // -------------------- ADVANCED CONTENT ACCESS -------------------- - - /** - * Returns the sum of entry values for all time bins that overlap with the - * given time interval in the following way: For every bin that is entirely - * contained in [startTime_s, endTime_s), its entry value is summed up; for - * every bin that only partially contained in that interval, only a fraction - * that corresponds to the overlap is summed up. - * - * @param key - * the key of the queried time series - * @param startTime_s - * the start time in seconds (inclusive) - * @param endTime_s - * the end time in seconds (exclusive) - * - */ - public double getSum(final K key, final int startTime_s, final int endTime_s) { - - final double[] dataArray = this.data.get(key); - if (dataArray == null) { - return 0; - } - - final int startBin = Math.max(bin(startTime_s), 0); - final int endBin = Math.min(bin(endTime_s - 1), this.getBinCnt() - 1); - - double result = 0; - for (int bin = startBin; bin <= endBin; bin++) { - final double weight = MathHelpers.overlap(binStart_s(bin), - binStart_s(bin) + getBinSize_s(), startTime_s, endTime_s) - / this.getBinSize_s(); - result += weight * dataArray[bin]; - } - return result; - } - - /** - * Returns the average entry value for all time bins that overlap with the - * given time interval. - * - * @param key - * the key of the queried time series - * @param startTime_s - * the start time in seconds (inclusive) - * @param endTime_s - * the end time in seconds (exclusive) - * - */ - public double getAverage(final K key, final int startTime_s, - final int endTime_s) { - final double binCnt = ((double) (endTime_s - startTime_s)) - / this.getBinSize_s(); - return this.getSum(key, startTime_s, endTime_s) / binCnt; - } - - /** - * Overrides all entries in this instance for which other has an entry by - * the latter; all other entries of this remain unchanged. - * - */ - public void overrideWithNonZeros(final DynamicData source) { - for (Map.Entry sourceEntry : source.data.entrySet()) { - final K key = sourceEntry.getKey(); - final double[] newValue = MathHelpers.override(this.data.get(key), - sourceEntry.getValue(), false); - this.data.put(key, newValue); - } - } - - public void resize(final int newBinCnt) { - if (newBinCnt == this.binCnt) { - return; - } - if (newBinCnt <= 0) { - throw new IllegalArgumentException( - "binCnt must be strictly positive"); - } - final List allKeys = new ArrayList(this.data.keySet()); // fast - for (K key : allKeys) { - final double[] oldArray = this.data.get(key); - if (oldArray != null) { - final double[] newArray = new double[newBinCnt]; - System.arraycopy(oldArray, 0, newArray, 0, Math.min( - this.binCnt, newBinCnt)); - this.data.put(key, newArray); - } - } - this.binCnt = newBinCnt; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicDataXMLFileIO.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicDataXMLFileIO.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicDataXMLFileIO.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/DynamicDataXMLFileIO.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import static floetteroed.utilities.XMLHelpers.writeAttr; - -import java.io.File; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Map; -import java.util.logging.Logger; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.Attributes; -import org.xml.sax.helpers.DefaultHandler; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the key type - * - */ -public abstract class DynamicDataXMLFileIO extends DefaultHandler implements - Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - public static final String OUTER_ELEMENT = "dynamicdata"; - - public static final String SUBCLASS_ATTR = "subclass"; - - public static final String STARTTIME_ATTR = "starttime"; - - public static final String BINSIZE_ATTR = "binsize"; - - public static final String BINCOUNT_ATTR = "bincount"; - - public static final String ENTRY_ELEMENT = "entry"; - - public static final String KEY_ATTR = "key"; - - public static final String VALUE_ATTR = "value"; - - // -------------------- MEMBER VARIABLES -------------------- - - private DynamicData result = null; - - // -------------------- CONSTRUCTION -------------------- - - protected DynamicDataXMLFileIO() { - } - - // -------------------- INTERFACE DEFINTION -------------------- - - protected DynamicData newInstance(final int startTime_s, - final int binSize_s, final int binCnt) { - return new DynamicData(startTime_s, binSize_s, binCnt); - } - - protected abstract String key2attrValue(final K key); - - protected abstract K attrValue2key(final String string); - - // -------------------- WRITE IMPLEMENTATION -------------------- - - private String values2string(final double[] entry) { - StringBuffer result = new StringBuffer(); - for (int i = 0; i < entry.length; i++) { - result.append(entry[i] + " "); - } - return result.toString(); - } - - public void write(final String filename, final DynamicData dd) - throws IOException { - - final PrintWriter writer = new PrintWriter(new File(filename)); - - writer.print("<"); - writer.print(OUTER_ELEMENT); - writer.print(" "); - writeAttr(STARTTIME_ATTR, dd.getStartTime_s(), writer); - writeAttr(BINSIZE_ATTR, dd.getBinSize_s(), writer); - writeAttr(BINCOUNT_ATTR, dd.getBinCnt(), writer); - writeAttr(SUBCLASS_ATTR, this.getClass().getName(), writer); - writer.println(">"); - - for (Map.Entry entry : dd.data.entrySet()) { - if (entry.getValue() != null) { - writer.print(" <"); - writer.print(ENTRY_ELEMENT); - writer.print(" "); - writeAttr(KEY_ATTR, key2attrValue(entry.getKey()), writer); - writeAttr(VALUE_ATTR, values2string(entry.getValue()), writer); - writer.println("/>"); - } - } - - writer.print(""); - - writer.flush(); - writer.close(); - } - - // -------------------- READ IMPLEMENTATION -------------------- - - private double[] string2values(final String value) { - if (value == null) { - return null; - } - final double[] entryArray = new double[this.result.getBinCnt()]; - final String[] entryStrings = value.split("\\s"); - if (entryArray.length != entryStrings.length) { - Logger.getLogger(this.getClass().getName()).warning( - "inconsistent data dimensions," + " Skipping this entry: " - + value); - return null; - } - for (int i = 0; i < entryArray.length; i++) { - entryArray[i] = Double.parseDouble(entryStrings[i]); - } - return entryArray; - } - - public DynamicData read(final String file) { - result = null; - try { - SAXParserFactory factory = SAXParserFactory.newInstance(); - SAXParser parser = factory.newSAXParser(); - parser.parse(file, this); - } catch (Exception e) { - Logger.getLogger(this.getClass().getName()).warning( - "exception during file parsing: " + e.toString()); - result = null; - } - return result; - } - - @Override - public void startElement(final String uri, final String localName, - final String qName, final Attributes attributes) { - if (OUTER_ELEMENT.equals(qName)) { - startOuterElement(attributes); - } else if (ENTRY_ELEMENT.equals(qName)) { - startEntryElement(attributes); - } - } - - private void startOuterElement(final Attributes attrs) { - // final String subclass = attrs.getValue(SUBCLASS_ATTR); - // if (!this.getClass().getName().equals(subclass)) { - // Logger.getLogger(this.getClass().getName()).warning( - // "file has been written by " + subclass); - // } - final int startTime_s = Integer - .parseInt(attrs.getValue(STARTTIME_ATTR)); - final int binSize_s = Integer.parseInt(attrs.getValue(BINSIZE_ATTR)); - final int binCnt = Integer.parseInt(attrs.getValue(BINCOUNT_ATTR)); - this.result = newInstance(startTime_s, binSize_s, binCnt); - } - - private void startEntryElement(Attributes attrs) { - final K key = attrValue2key(attrs.getValue(KEY_ATTR)); - final double[] values = string2values(attrs.getValue(VALUE_ATTR)); - this.result.data.put(key, values); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/ErrorMsgPrinter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/ErrorMsgPrinter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/ErrorMsgPrinter.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/ErrorMsgPrinter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.io.PrintStream; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class ErrorMsgPrinter { - - private ErrorMsgPrinter() { - // do note instantiate - } - - public static void toStream(final Exception e, final PrintStream stream) { - stream.println(); - stream.println("The program terminated " - + "because of an unrecoverable error:"); - stream.println(e.getMessage()); - stream.println(); - stream.println("------------------------------" - + "------------------------------"); - stream.println("Stack trace:"); - e.printStackTrace(stream); - } - - public static void toStdOut(final Exception e) { - toStream(e, System.out); - } - - public static void toErrOut(final Exception e) { - toStream(e, System.err); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/IdentifiedElementParser.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/IdentifiedElementParser.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/IdentifiedElementParser.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/IdentifiedElementParser.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.Attributes; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.AttributesImpl; -import org.xml.sax.helpers.DefaultHandler; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class IdentifiedElementParser extends DefaultHandler { - - // -------------------- CONSTANTS -------------------- - - private final String element; - - private final String idAttribute; - - // -------------------- MEMBERS -------------------- - - private Map id2attrs = null; - - // -------------------- CONSTRUCTION -------------------- - - public IdentifiedElementParser(final String element, - final String idAttribute) { - if (element == null || "".equals(element)) { - throw new IllegalArgumentException("element is " + idAttribute - + "."); - } - this.element = element; - this.idAttribute = idAttribute; - } - - // -------------------- IMPLEMENTATION -------------------- - - public Map readId2AttrsMap(final String fileName) { - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(false); - factory.setNamespaceAware(false); - final SAXParser parser = factory.newSAXParser(); - final XMLReader reader = parser.getXMLReader(); - reader.setFeature("http://apache.org/xml/features/" - + "nonvalidating/load-external-dtd", false); - reader.setFeature("http://xml.org/sax/features/" + "validation", - false); - reader.setContentHandler(this); - reader.parse(fileName); - } catch (Exception e) { - throw new RuntimeException(e); - } - return this.id2attrs; - } - - // --------------- IMPLEMENTATION OF DefaultHandler --------------- - - @Override - public void startDocument() { - this.id2attrs = new HashMap(); - } - - @Override - public void startElement(final String namespaceURI, final String sName, - final String qName, final Attributes attrs) { - if (this.element.equals(qName)) { - if (this.idAttribute == null) { - this.id2attrs.put(Integer.toString(this.id2attrs.size()), - new AttributesImpl(attrs)); - } else { - final String id = attrs.getValue(this.idAttribute); - final Attributes attrsCopy = new AttributesImpl(attrs); - this.id2attrs.put(id, attrsCopy); - // this.id2attrs.put(attrs.getValue(this.idAttribute), - // new AttributesImpl(attrs)); - } - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/BasicStatistics.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/BasicStatistics.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/BasicStatistics.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/BasicStatistics.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.Serializable; - -/** - * Calculates recursively the average, variance, minimum, and maximum of a - * number sequence. - * - * @author Gunnar Flötteröd - * - */ -public class BasicStatistics implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBER VARIABLES -------------------- - - private int size; - - private double sum; - - private double sqrSum; - - private double min; - - private double max; - - // -------------------- CONSTRUCTION -------------------- - - public BasicStatistics() { - clear(); - } - - // -------------------- PUBLIC ACCESS -------------------- - - public void clear() { - this.size = 0; - this.sum = 0; - this.sqrSum = 0; - this.min = Double.POSITIVE_INFINITY; - this.max = Double.NEGATIVE_INFINITY; - } - - public void add(final double val) { - this.sum += val; - this.sqrSum += val * val; - this.min = Math.min(this.min, val); - this.max = Math.max(this.max, val); - this.size++; - } - - // TODO NEW - public BasicStatistics(final Iterable iterable) { - this(); - this.addAll(iterable); - } - - // TODO NEW - public void addAll(final Iterable iterable) { - for (double val : iterable) { - this.add(val); - } - } - - public int size() { - return this.size; - } - - public double getAvg() { - return this.sum / this.size; - } - - public double getVar() { - if (this.size() < 2) { - return Double.POSITIVE_INFINITY; - } else { - return (this.sqrSum - this.sum * this.sum / this.size) - / (this.size - 1.0); - } - } - - public double getStddev() { - return Math.sqrt(this.getVar()); - } - - public double getMin() { - return this.min; - } - - public double getMax() { - return this.max; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Covariance.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Covariance.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Covariance.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Covariance.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/* - * Copyright 2015 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class Covariance { - - // -------------------- MEMBERS -------------------- - - private final Matrix xySum; - - private final Vector xSum; - - private final Vector ySum; - - private int n; - - // -------------------- CONSTRUCTION -------------------- - - public Covariance(final int xDim, final int yDim) { - if (xDim < 1) { - throw new IllegalArgumentException("xDim is smaller than one"); - } - if (yDim < 1) { - throw new IllegalArgumentException("yDim is smaller than one"); - } - this.xySum = new Matrix(xDim, yDim); - this.xSum = new Vector(xDim); - this.ySum = new Vector(yDim); - this.n = 0; - } - - // -------------------- IMPLEMENTATION -------------------- - - public void add(final Vector x, final Vector y) { - this.xySum.addOuterProduct(x, y, 1.0); - this.xSum.add(x, 1.0); - this.ySum.add(y, 1.0); - this.n++; - } - - // TODO NEW - public Vector getMeanX() { - final Vector result = this.xSum.copy(); - result.mult(1.0 / this.n); - return result; - } - - // TODO NEW - public Vector getMeanY() { - final Vector result = this.ySum.copy(); - result.mult(1.0 / this.n); - return result; - } - - public Matrix getCovariance() { - final Matrix result = new Matrix(this.xSum.size(), this.ySum.size()); - result.add(this.xySum, 1.0 / (this.n - 1.0)); - result.addOuterProduct(this.xSum, this.ySum, (-1.0) / this.n - / (this.n - 1.0)); - return result; - } - - public static Matrix turnCovarianceIntoCorrelation(final Matrix covariance) { - final Matrix result = covariance; - /* - * (1) compute off-diagonal correlation values - */ - for (int i = 0; i < result.rowSize(); i++) { - for (int j = 0; j < i; j++) { - final double cov = result.getRow(i).get(j); - final double var1 = result.getRow(i).get(i); - final double var2 = result.getRow(j).get(j); - final double corr = cov / Math.sqrt(var1) / Math.sqrt(var2); - result.getRow(i).set(j, corr); - result.getRow(j).set(i, corr); - } - } - /* - * (2) normalize main diagonal values to one - */ - for (int i = 0; i < result.rowSize(); i++) { - result.getRow(i).set(i, 1.0); - } - return result; - } - - // TODO NEW - public Matrix getCorrelation() { - return turnCovarianceIntoCorrelation(this.getCovariance()); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Histogram.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Histogram.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Histogram.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Histogram.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,158 +0,0 @@ -/* - * Copyright 2015 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.util.Arrays; - -/** - * - * TODO new - * - * @author Gunnar Flötteröd - * - */ -public class Histogram { - - // -------------------- MEMBERS -------------------- - - private final double[] bounds; - - private final int[] bins; - - private int totalCount; - - // -------------------- CONSTRUCTION -------------------- - - public Histogram(final double... bounds) { - - if (bounds == null) { - throw new IllegalArgumentException("bounds array must not be null"); - } - - for (int i = 1; i < bounds.length; i++) { - if (bounds[i - 1] >= bounds[i]) { - throw new IllegalArgumentException( - "bounds are not in ascending order"); - } - } - - this.bounds = bounds; - this.bins = new int[bounds.length + 1]; - clear(); - } - - // TODO NEW - public static Histogram newHistogramWithUniformBins( - final double startValue, final double binSize, final int binCnt) { - final double[] bounds = new double[binCnt + 1]; - for (int bin = 0; bin <= binCnt; bin++) { - bounds[bin] = startValue + bin * binSize; - } - return new Histogram(bounds); - } - - // -------------------- WRITE ACCESS -------------------- - - public void clear() { - Arrays.fill(this.bins, 0); - this.totalCount = 0; - } - - public void add(final double value) { - int i = 0; - while (i < this.bounds.length && value >= this.bounds[i]) { - i++; - } - this.bins[i]++; - this.totalCount++; - } - - // TODO NEW - public void makeNonZero() { - for (int i = 0; i < this.bins.length; i++) { - if (this.bins[i] == 0) { - this.bins[i]++; - this.totalCount++; - } - } - } - - // -------------------- READ ACCESS -------------------- - - public int binCnt() { - return this.bins.length; - } - - public double lowerBound(final int bin) { - if (bin == 0) { - return Double.NEGATIVE_INFINITY; - } else { - return this.bounds[bin - 1]; - } - } - - public double upperBound(final int bin) { - if (bin == this.binCnt() - 1) { - return Double.POSITIVE_INFINITY; - } else { - return this.bounds[bin]; - } - } - - public int cnt() { - return this.totalCount; - } - - public int cnt(final int bin) { - return this.bins[bin]; - } - - public double freq(final int bin) { - final double cnt = (double) this.cnt(bin); - if (cnt > 0.0) { - return cnt / this.totalCount; - } else { - return 0.0; - } - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - if (this.binCnt() == 1) { - result.append("(-oo, +oo) : 1.0 (" + totalCount + " of " - + totalCount + ")"); - } else { - result.append("(-oo, " + bounds[0] + ") : " + freq(0) + " (" - + bins[0] + " of " + totalCount + ")\n"); - for (int i = 1; i < bounds.length; i++) { - result.append("[" + bounds[i - 1] + ", " + bounds[i] + ") : " - + freq(i) + " (" + bins[i] + " of " + totalCount - + ")\n"); - } - result.append("[" + bounds[bounds.length - 1] + ", +oo) : " - + freq(bounds.length) + " (" + bins[bounds.length] + " of " - + totalCount + ")"); - } - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MathHelpers.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MathHelpers.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MathHelpers.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MathHelpers.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,267 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.Map; -import java.util.Random; -import java.util.Set; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class MathHelpers { - - // -------------------- PRIVATE CONSTRUCTOR -------------------- - - private MathHelpers() { - } - - // -------------------- STATIC IMPLEMENTATION -------------------- - - public static Double parseDouble(final String s) { - if (s == null) { - return null; - } else { - return Double.parseDouble(s); - } - } - - public static Integer parseInteger(final String s) { - if (s == null) { - return null; - } else { - return Integer.parseInt(s); - } - } - - public static Long parseLong(final String s) { - if (s == null) { - return null; - } else { - return Long.parseLong(s); - } - } - - public static Boolean parseBoolean(final String s) { - if (s == null) { - return null; - } else { - return Boolean.parseBoolean(s); - } - } - - public static double length(final double x1, final double y1, - final double x2, final double y2) { - final double dx = x2 - x1; - final double dy = y2 - y1; - return Math.sqrt(dx * dx + dy * dy); - } - - public static double overlap(final double start1, final double end1, - final double start2, final double end2) { - return Math.max(0, (Math.min(end1, end2) - Math.max(start1, start2))); - } - - public static double round(final double x, final int digits) { - final double fact = Math.pow(10.0, digits); - return Math.round(x * fact) / fact; - } - - public static int round(final double x) { - return (int) round(x, 0); - } - - public static int draw(final Vector probs, final Random rnd) { - final double x = rnd.nextDouble(); - int result = -1; - double pSum = 0; - do { - result++; - pSum += probs.get(result); - } while (pSum < x && result < probs.size() - 1); - return result; - } - - // TODO NEW - public static synchronized Set drawWithoutReplacement(int n, - final Collection collection, final Random rnd) { - final Set result = new LinkedHashSet(); - while ((result.size() < n) && (result.size() < collection.size())) { - result.add(draw(collection, rnd)); - } - return result; - } - - // TODO NEW - public static T draw(final Collection collection, final Random rnd) { - final int index = rnd.nextInt(collection.size()); - Iterator it = collection.iterator(); - for (int i = 0; i < index; i++) { - it.next(); - } - return it.next(); - } - - // TODO NEW - public static T drawAndRemove(final Collection collection, - final Random rnd) { - final T result = draw(collection, rnd); - collection.remove(result); - return result; - } - - public static double draw(final double lower, final double upper, - final Random rnd) { - return lower + rnd.nextDouble() * (upper - lower); - } - - public static double[] override(final double[] dest, final double[] source, - final boolean overrideWithZeros) { - if (source == null) { - if (overrideWithZeros) { - return null; - } else { - return dest; - } - } else { // source != null - if (dest == null) { - final double[] result = new double[source.length]; - System.arraycopy(source, 0, result, 0, source.length); - return result; - } else { // dest != null - for (int i = 0; i < source.length; i++) { - if (overrideWithZeros || source[i] != 0.0) { - dest[i] = source[i]; - } - } - return dest; - } - } - } - - // TODO move this into Vector (also the corresponding unit test) - public static boolean equal(final Vector v1, final Vector v2, - final double tol) { - if (v1 == null || v2 == null || v1.size() != v2.size()) { - return false; - } else { - for (int i = 0; i < v1.size(); i++) { - if (Math.abs(v1.get(i) - v2.get(i)) > tol) { - return false; - } - } - } - return true; - } - - // TODO move this into Matrix (also the corresponding unit test) - public static boolean equal(final Matrix m1, final Matrix m2, - final double tol) { - if (m1 == null || m2 == null || m1.rowSize() != m2.rowSize()) { - return false; - } else { - for (int i = 0; i < m1.rowSize(); i++) { - if (!equal(m1.getRow(i), m2.getRow(i), tol)) { - return false; - } - } - } - return true; - } - - // TODO NEW - public static E draw(final Map event2proba, final Random rnd) { - final double x = rnd.nextDouble(); - double pSum = 0; - final Iterator> it = event2proba.entrySet() - .iterator(); - E result = null; - do { - Map.Entry next = it.next(); - result = next.getKey(); - pSum += next.getValue(); - } while (pSum < x && it.hasNext()); - return result; - } - - // TODO NEW - public static E draw(final Map event2weight, - final double weightSum, final Random rnd) { - final double x = weightSum * rnd.nextDouble(); - double cumulativeWeight = 0; - final Iterator> it = event2weight.entrySet() - .iterator(); - E result = null; - do { - Map.Entry next = it.next(); - result = next.getKey(); - cumulativeWeight += next.getValue(); - } while (cumulativeWeight < x && it.hasNext()); - return result; - } - - // TODO NEW - // the order of the bounds does not matter - public static double projectOnInterval(final double value, - final double bound1, final double bound2) { - double halfBounded = Math.max(value, Math.min(bound1, bound2)); - return Math.min(halfBounded, Math.max(bound1, bound2)); - } - - // TODO NEW, move this into Vector - public static Vector hadamardProduct(final Vector x, final Vector y) { - final Vector result = x.copy(); - for (int i = 0; i < y.size(); i++) { - result.mult(i, y.get(i)); - } - return result; - } - - public static void main(String[] test) { - - Map m = new LinkedHashMap<>(); - m.put("A", 1.0); - m.put("B", 2.0); - m.put("C", 0.0); - - double aFreq = 0; - double bFreq = 0; - double cFreq = 0; - for (int i = 0; i < 1000; i++) { - final String draw = draw(m, 3, new Random()); - if ("A".equals(draw)) { - aFreq++; - } else if ("B".equals(draw)) { - bFreq++; - } else if ("C".equals(draw)) { - cFreq++; - } - } - - System.out.println(aFreq + "\t" + bFreq + "\t" + cFreq); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Matrix.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Matrix.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Matrix.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Matrix.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,479 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.Serializable; - -/** - * - * Represents a matrix. - * - * @author Gunnar Flötteröd - * - */ -public class Matrix implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final Vector[] rows; - - // -------------------- CONSTRUCTION -------------------- - - private Matrix(final Vector[] rows) { - this.rows = rows; - } - - // TODO NEW - public Matrix(final Vector row) { - this(new Vector[] { row.copy() }); - } - - /** - * Creates a matrix with rowCnt rows and colCnt columns. - * - * @param rowCnt - * the number of rows in this matrix; must be strictly positive - * @param colCnt - * the number of columns in this matrix; must be strictly - * positive - */ - public Matrix(final int rowCnt, final int colCnt) { - if (rowCnt < 1) { - throw new IllegalArgumentException( - "matrix must have at least one row"); - } - this.rows = new Vector[rowCnt]; - for (int i = 0; i < rowCnt; i++) - this.rows[i] = new Vector(colCnt); - } - - /** - * Returns a new diagonal Matrix with dim rows and dim columns with the val - * value at its diagonal - * - * @param dim - * the dimension of the new matrix, must be strictly positive - * @param val - * the diagonal value of the new matrix - * - * @return a new diagonal matrix that is filled with val - */ - public static Matrix newDiagonal(final int dim, final double val) { - final Matrix result = new Matrix(dim, dim); - for (int i = 0; i < dim; i++) - result.getRow(i).set(i, val); - return result; - } - - public static Matrix newDiagonal(final Vector diagonal) { - final Matrix result = new Matrix(diagonal.size(), diagonal.size()); - for (int i = 0; i < diagonal.size(); i++) { - result.getRow(i).set(i, diagonal.get(i)); - } - return result; - } - - /** - * Returns a "deep" copy of this matrix the row size of which is increased - * by rowEnlargement and the column size of which is increased by - * columnEnlargement. All additional entries are zeros. - * - * @param rowEnlargement - * increase in row dimension; must not be negative - * @param columnEnlargement - * increase in column dimension; must not be negative - * - * @return a (possibly enlarged) "deep" copy of this matrix - */ - public Matrix copyEnlarged(final int rowEnlargement, - final int columnEnlargement) { - - if (rowEnlargement < 0) { - throw new IllegalArgumentException( - "row enlargement must not be negative"); - } - if (columnEnlargement < 0) { - throw new IllegalArgumentException( - "column enlargement must not be negative"); - } - - final Vector[] newRows = new Vector[this.rows.length + rowEnlargement]; - for (int row = 0; row < this.rows.length; row++) { - newRows[row] = this.rows[row].copyEnlarged(columnEnlargement); - } - for (int row = this.rows.length; row < newRows.length; row++) { - newRows[row] = new Vector(newRows[0].size()); - } - return new Matrix(newRows); - } - - /** - * Returns a "deep" copy of this matrix. - * - * @return a "deep" copy of this matrix - */ - public Matrix copy() { - return this.copyEnlarged(0, 0); - } - - public Matrix newImmutableView() { - final Matrix result = new Matrix(new Vector[this.rowSize()]); - for (int i = 0; i < this.rowSize(); i++) { - result.rows[i] = this.rows[i].newImmutableView(); - } - return result; - } - - // -------------------- IMPLEMENTATION -------------------- - - /** - * Returns the row size of this matrix. - * - * @return the row size of this matrix - */ - public int rowSize() { - return rows.length; - } - - /** - * Returns the column size of this matrix. - * - * @return the column size of this matrix - */ - public int columnSize() { - return rows[0].size(); - } - - /** - * Returns a Vector instance that represents the ith row of this matrix. - * Changes to this vector punch through to the matrix. - * - * @param i - * the desired row - * - * @return a Vector instance that represents the ith row of this matrix - */ - public Vector getRow(final int i) { - return this.rows[i]; - } - - /** - * Returns the Frobenius norm of this matrix. - * - * @return the Frobenius norm of this matrix - */ - public double frobeniusNorm() { - double result = 0; - for (Vector row : this.rows) - result += row.innerProd(row); - return Math.sqrt(result); - } - - /** - * Multiplies every entry of this matrix by value. - * - * @param value - * the value with which this matrix is to be multiplied - */ - public void mult(final double value) { - for (Vector row : this.rows) - row.mult(value); - } - - public void add(final Matrix other, final double weight) { - for (int i = 0; i < this.rowSize(); i++) { - this.rows[i].add(other.rows[i], weight); - } - } - - public void clear() { - for (Vector row : this.rows) { - row.clear(); - } - } - - /** - * Multiplies the the outer product of the vectors other1 and other2 by - * weight and adds it to this matrix. - * - * @param other1 - * the column vector of the outer product; its size must equal - * the row dimension of this matrix - * @param other2 - * the row vector of the outer product; its size must equal the - * column dimension of this matrix - * @param weight - * the value by which the outer product is to be multiplied - * before it is added to this matrix - */ - public void addOuterProduct(final Vector other1, final Vector other2, - final double weight) { - - if (other1.size() != this.rowSize()) { - throw new IllegalArgumentException( - "size of first vector must equal matrix row dimension"); - } - if (other2.size() != this.columnSize()) { - throw new IllegalArgumentException( - "size of second vector must equal matrix column dimension"); - } - - for (int i = 0; i < other1.size(); i++) { - this.getRow(i).add(other2, other1.get(i) * weight); - } - } - - /** - * Multiplies this matrix by vector other from the left and writes the - * result into the result vector. - * - * @param other - * the vector by which this matrix is to be multiplied; its size - * must equal the row dimension of this vector - * @param result - * the vector in which the result is to be written; must be of - * same size as the result vector - * - * @return a reference to the result vector - */ - public Vector timesVectorFromLeft(final Vector other, final Vector result) { - - if (other.size() != this.rowSize()) { - throw new IllegalArgumentException( - "other vector must have same size as row dimension " - + "of this matrix"); - } - if (result.size() != this.columnSize()) { - throw new IllegalArgumentException("result vector must be of same " - + "dimension as column dimension of this matrix"); - } - - for (int l = 0; l < other.size(); l++) - result.add(this.getRow(l), other.get(l)); - return result; - } - - /** - * Returns a new vector that contains the result of multiplying this matrix - * from the left with the other vector. - * - * @param other - * the vector with which this matrix is to be multiplied - * - * @return a new vector that contains the result of multiplying this matrix - * from the left with the other vector - */ - public Vector timesVectorFromLeft(final Vector other) { - return timesVectorFromLeft(other, new Vector(this.columnSize())); - } - - /** - * Rounds the entries of this matrix to decimals positions after the comma. - * If decimals is negative, the rounding is carried over to positions before - * the comma. - * - * @param decimals - * positions after the comma to which to round - */ - public void round(final int decimals) { - for (Vector row : this.rows) { - row.round(decimals); - } - } - - /** - * Returns a textual representation of this matrix. - */ - public String toString() { - final StringBuffer result = new StringBuffer(); - for (int i = 0; i < this.rowSize() - 1; i++) { - result.append(this.rows[i].toString()); - result.append("\n"); - } // no newline after last row! - result.append(this.rows[this.rowSize() - 1].toString()); - return result.toString(); - } - - /** - * Makes this matrix exactly symmetrical. - */ - public void symmetrize() { - for (int i = 0; i < this.rowSize(); i++) { - final Vector iRow = this.getRow(i); - for (int j = 0; j < i; j++) { - final Vector jRow = this.getRow(j); - final double cov = 0.5 * (iRow.get(j) + jRow.get(i)); - iRow.set(j, cov); - jRow.set(i, cov); - } - } - } - - public void setColumn(int j, final Vector column) { - for (int i = 0; i < this.rowSize(); i++) { - this.getRow(i).set(j, column.get(i)); - } - } - - public boolean isAllZeros() { - for (Vector row : this.rows) { - if (!row.isAllZeros()) { - return false; - } - } - return true; - } - - public String toSingleLineString() { - final StringBuffer result = new StringBuffer(); - result.append("["); - for (int i = 0; i < this.rowSize(); i++) { - result.append(this.rows[i].toString()); - } - result.append("]"); - return result.toString(); - } - - public Vector timesVectorFromRight(final Vector other, final Vector result) { - for (int i = 0; i < this.rowSize(); i++) { - result.set(i, this.getRow(i).innerProd(other)); - } - return result; - } - - public Vector timesVectorFromRight(final Vector other) { - return this.timesVectorFromRight(other, new Vector(this.rowSize())); - } - - public Matrix newTransposed() { - final Matrix result = new Matrix(this.columnSize(), this.rowSize()); - for (int i = 0; i < this.rowSize(); i++) { - final Vector fromRow_i = this.getRow(i); - for (int j = 0; j < this.columnSize(); j++) { - result.getRow(j).set(i, fromRow_i.get(j)); - } - } - return result; - } - - public static Matrix product(final Matrix _A, final Matrix _B) { - if (_A.columnSize() != _B.rowSize()) { - throw new IllegalArgumentException( - "column size of first argument does not " - + "equal row size of second argument"); - } - final Matrix _C = new Matrix(_A.rowSize(), _B.columnSize()); - for (int i = 0; i < _C.rowSize(); i++) { - final Vector _A_row_i = _A.getRow(i); - final Vector _C_row_i = _C.getRow(i); - for (int k = 0; k < _A.columnSize(); k++) { - _C_row_i.add(_B.getRow(k), _A_row_i.get(k)); - } - } - return _C; - } - - // TODO NEW - public boolean isNaN() { - for (Vector row : this.rows) { - if (row.isNaN()) { - return true; - } - } - return false; - } - - // TODO NEW - public double absValueSum() { - double result = 0; - for (Vector row : this.rows) { - result += row.absValueSum(); - } - return result; - } - - // TODO NEW - public double max() { - double result = Double.NEGATIVE_INFINITY; - for (Vector row : this.rows) { - result = Math.max(result, row.max()); - } - return result; - } - - // TODO NEW - public void makeProbability() { - double sum = 0; - for (Vector row : this.rows) { - for (int i = 0; i < row.size(); i++) { - if (row.get(i) < 0.0) { - row.set(i, 0.0); - } else if (row.get(i) > 1.0) { - row.set(i, 1.0); - sum += 1.0; - } else { - sum += row.get(i); - } - } - } - this.mult(1.0 / sum); - } - - // TODO NEW - public static double maxAbsDiff(final Matrix a, final Matrix b) { - double result = 0; - for (int i = 0; i < a.rowSize(); i++) { - result = Math.max(result, - Vector.maxAbsDiff(a.getRow(i), b.getRow(i))); - } - return result; - } - - // TODO NEW - public double get(final int row, final int column) { - return this.getRow(row).get(column); - } - - // TODO NEW - public Matrix newLeaveOneRowOut(final int leaveOutRowIndex) { - final Vector[] newRows = new Vector[this.rowSize() - 1]; - int iTo = 0; - for (int iFrom = 0; iFrom < this.rowSize(); iFrom++) { - if (iFrom != leaveOutRowIndex) { - newRows[iTo++] = this.rows[iFrom].copy(); - } - } - return new Matrix(newRows); - } - - // TODO NEW - public Matrix newLeaveOneColumnOut(final int leaveOutColumnIndex) { - final Vector[] newRows = new Vector[this.rowSize()]; - for (int i = 0; i < this.rowSize(); i++) { - newRows[i] = this.rows[i].newLeaveOneOut(leaveOutColumnIndex); - } - return new Matrix(newRows); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixReader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixReader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixReader.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixReader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import floetteroed.utilities.tabularfileparser.TabularFileHandler; -import floetteroed.utilities.tabularfileparser.TabularFileParser; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class MatrixReader implements TabularFileHandler { - - // -------------------- MEMBERS -------------------- - - private List currentRows = null; - - private List matrixList = null; - - // -------------------- CONSTRUCTION -------------------- - - public MatrixReader() { - } - - // -------------------- IMPLEMENTATION -------------------- - - public List read(final String fileName) throws IOException { - - this.matrixList = null; - this.currentRows = null; - - final TabularFileParser parser = new TabularFileParser(); - parser.setDelimiterRegex("\\s"); - parser.parse(fileName, this); - - return this.matrixList; - } - - public List getResult() { - return this.matrixList; - } - - // --------------- IMPLEMENTATION OF TabularFileHandler --------------- - - @Override - public void startDocument() { - this.currentRows = new ArrayList(); - this.matrixList = new ArrayList(); - } - - @Override - public String preprocess(final String line) { - return line; - } - - private Matrix currentRowsToMatrix() { - final Matrix result = new Matrix(this.currentRows.size(), - this.currentRows.get(0).size()); - for (int i = 0; i < result.rowSize(); i++) { - result.getRow(i).copy(this.currentRows.get(i)); - } - return result; - } - - @Override - public void startRow(String[] row) { - if (row.length == 0) { - /* - * done with current matrix - */ - if (this.currentRows.size() > 0) { - this.matrixList.add(this.currentRowsToMatrix()); - this.currentRows = new ArrayList(); - } - } else { - /* - * start a new matrix or continue with a current one - */ - try { - final Vector newRow = new Vector(row.length); - for (int i = 0; i < row.length; i++) { - newRow.set(i, Double.parseDouble(row[i])); - } - this.currentRows.add(newRow); - } catch (NumberFormatException e) { - if (this.currentRows.size() == 0) { - this.matrixList.add(null); - } else { - this.matrixList.add(this.currentRowsToMatrix()); - } - this.currentRows = new ArrayList(); - } - } - } - - @Override - public void endDocument() { - if (this.currentRows.size() > 0) { - this.matrixList.add(this.currentRowsToMatrix()); - } - this.currentRows = null; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixWriter.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MatrixWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.FileNotFoundException; -import java.io.PrintWriter; - - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class MatrixWriter { - - // -------------------- MEMBERS -------------------- - - private PrintWriter writer = null; - - // -------------------- CONSTRUCTION -------------------- - - public MatrixWriter() { - } - - // -------------------- IMPLEMENTATION -------------------- - - public void open(final String fileName) throws FileNotFoundException { - this.writer = new PrintWriter(fileName); - } - - // TODO new: write a 1x1 matrix - public void write(final double m) { - this.writer.println(m); - this.writer.println(); - } - - // TODO new: write a 1xM matrix - public void write(final Vector m) { - this.write(new Matrix(m)); - } - - // TODO new: write a 1xM matrix - public void write(final double... m) { - this.write(new Vector(m)); - } - - public void write(final Matrix m) { - for (int i = 0; i < m.rowSize(); i++) { - final Vector row = m.getRow(i); - for (int j = 0; j < m.columnSize(); j++) { - this.writer.print(row.get(j)); - this.writer.print(" "); - } - this.writer.println(); - } - this.writer.println(); - } - - public void close() { - this.writer.flush(); - this.writer.close(); - } - - // TODO NEW - public static void write(final String fileName, final Matrix m) - throws FileNotFoundException { - final MatrixWriter writer = new MatrixWriter(); - writer.open(fileName); - writer.write(m); - writer.close(); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHAlgorithm.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHAlgorithm.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHAlgorithm.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHAlgorithm.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,166 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math.metropolishastings; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public class MHAlgorithm { - - // -------------------- CONSTANTS -------------------- - - private final MHProposal proposal; - - private final MHWeight weight; - - private final Random rnd; - - // -------------------- MEMBERS -------------------- - - private S initialState = null; - - private List> stateProcessors = new ArrayList>(); - - private int msgInterval = 1; - - private long lastCompTime_ms = 0; - - // -------------------- CONSTRUCTION -------------------- - - public MHAlgorithm(final MHProposal proposal, final MHWeight weight, - final Random rnd) { - if (proposal == null) { - throw new IllegalArgumentException("proposal is null"); - } - if (weight == null) { - throw new IllegalArgumentException("weight is null"); - } - if (rnd == null) { - throw new IllegalArgumentException("rnd is null"); - } - this.proposal = proposal; - this.weight = weight; - this.rnd = rnd; - } - - // -------------------- SETTERS AND GETTERS -------------------- - - public void setInitialState(final S initialState) { - this.initialState = initialState; - } - - public S getInitialState() { - return this.initialState; - } - - public void setMsgInterval(final int msgInterval) { - if (msgInterval < 1) { - throw new IllegalArgumentException("message interval < 1"); - } - this.msgInterval = msgInterval; - } - - public int getMsgInterval() { - return this.msgInterval; - } - - public void addStateProcessor(final MHStateProcessor stateProcessor) { - if (stateProcessor == null) { - throw new IllegalArgumentException("state processor is null"); - } - this.stateProcessors.add(stateProcessor); - } - - public long getLastCompTime_ms() { - return this.lastCompTime_ms; - } - - // -------------------- IMPLEMENTATION -------------------- - - public void run(final int iterations) { - - this.lastCompTime_ms = 0; - - /* - * initialize (iteration 0) - */ - for (MHStateProcessor processor : this.stateProcessors) { - processor.start(); - } - - long tick_ms = System.currentTimeMillis(); - S currentState; - if (this.initialState != null) { - currentState = this.initialState; - } else { - currentState = this.proposal.newInitialState(); - } - double currentLogWeight = this.weight.logWeight(currentState); - this.lastCompTime_ms += System.currentTimeMillis() - tick_ms; - - for (MHStateProcessor processor : this.stateProcessors) { - processor.processState(currentState); - } - - /* - * iterate (iterations 1, 2, ...) - */ - for (int i = 1; i <= iterations; i++) { - - if (i % this.msgInterval == 0) { - System.out.println("MH iteration " + i); - System.out.println(" state = " + currentState); - System.out.println(" weight = " + Math.exp(currentLogWeight)); - } - - tick_ms = System.currentTimeMillis(); - final MHTransition proposalTransition = this.proposal - .newTransition(currentState); - final S proposalState = proposalTransition.getNewState(); - double proposalLogWeight = this.weight.logWeight(proposalState); - final double logAlpha = (proposalLogWeight - currentLogWeight) - + (proposalTransition.getBwdLogProb() - proposalTransition - .getFwdLogProb()); - if (Math.log(this.rnd.nextDouble()) < logAlpha) { - currentState = proposalState; - currentLogWeight = proposalLogWeight; - } - this.lastCompTime_ms += System.currentTimeMillis() - tick_ms; - - for (MHStateProcessor processor : this.stateProcessors) { - processor.processState(currentState); - } - } - - /* - * wrap up - */ - for (MHStateProcessor processor : this.stateProcessors) { - processor.end(); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHProposal.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHProposal.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHProposal.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHProposal.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math.metropolishastings; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public interface MHProposal { - - public S newInitialState(); - - public MHTransition newTransition(final S state); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHStateProcessor.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHStateProcessor.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHStateProcessor.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHStateProcessor.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math.metropolishastings; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public interface MHStateProcessor { - - public void start(); - - public void processState(final S state); - - public void end(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHTransition.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHTransition.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHTransition.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHTransition.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math.metropolishastings; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public class MHTransition { - - // -------------------- CONSTANTS -------------------- - - private final S oldState; - - private final S newState; - - private final double fwdLogProb; - - private final double bwdLogProb; - - // -------------------- CONSTRUCTION -------------------- - - public MHTransition(final S oldState, final S newState, - final double fwdLogProb, final double bwdLogProb) { - this.oldState = oldState; - this.newState = newState; - this.fwdLogProb = fwdLogProb; - this.bwdLogProb = bwdLogProb; - } - - // -------------------- CONTENT ACCESS -------------------- - - public S getOldState() { - return this.oldState; - } - - public S getNewState() { - return this.newState; - } - - public double getFwdLogProb() { - return this.fwdLogProb; - } - - public double getBwdLogProb() { - return this.bwdLogProb; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHWeight.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHWeight.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHWeight.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/metropolishastings/MHWeight.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math.metropolishastings; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public interface MHWeight { - - public double logWeight(final S State); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MultinomialLogit.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MultinomialLogit.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MultinomialLogit.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/MultinomialLogit.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,368 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Random; - - - -/** - * Implements a basic multinomial logit choice model where all alternatives have - * the same coefficients plus an alternative specific constant. - * - * @author Gunnar Flötteröd - * - */ -public class MultinomialLogit { - - // -------------------- CONSTANTS -------------------- - - private final List ALL_ATTRIBUTE_INDICES; - - private final List ALL_ASC_INDICES; - - // -------------------- EXOGENEOUS PARAMETERS -------------------- - - private double utilityScale; - - private final Vector coeff; - - private final Vector asc; - - private final Matrix attr; - - // -------------------- ENDOGENEOUS PARAMETERS -------------------- - - private final Vector utilities; - - private final Vector choiceProbs; - - private final Matrix dProbs_dCoeffs; - - private final Matrix dProbs_dASCs; - - private boolean consistent; - - // -------------------- CONSTRUCTION -------------------- - - public MultinomialLogit(final int choiceSetSize, final int attributeCount) { - - this.utilityScale = 1.0; - this.coeff = new Vector(attributeCount); - this.asc = new Vector(choiceSetSize); - this.attr = new Matrix(choiceSetSize, attributeCount); - this.utilities = new Vector(choiceSetSize); - this.choiceProbs = new Vector(choiceSetSize); - this.dProbs_dCoeffs = new Matrix(choiceSetSize, attributeCount); - this.dProbs_dASCs = new Matrix(choiceSetSize, choiceSetSize); - this.consistent = false; - - final List allAttrInd = new ArrayList(attributeCount); - for (int i = 0; i < attributeCount; i++) { - allAttrInd.add(i); - } - this.ALL_ATTRIBUTE_INDICES = Collections.unmodifiableList(allAttrInd); - - final List allASCInd = new ArrayList(choiceSetSize); - for (int i = attributeCount; i < attributeCount + choiceSetSize; i++) { - allASCInd.add(i); - } - this.ALL_ASC_INDICES = Collections.unmodifiableList(allASCInd); - } - - // -------------------- SETTERS -------------------- - - public void setUtilityScale(final double value) { - this.consistent = false; - this.utilityScale = value; - } - - public void setCoefficient(final int attrIndex, final double value) { - this.consistent = false; - this.coeff.set(attrIndex, value); - } - - public void setASC(final int choiceIndex, final double value) { - this.consistent = false; - this.asc.set(choiceIndex, value); - } - - public void setAttribute(final int choiceIndex, final int attrIndex, - final double value) { - this.consistent = false; - this.attr.getRow(choiceIndex).set(attrIndex, value); - } - - // -------------------- UPDATE -------------------- - - public void enforcedUpdate() { - - /* - * (1) update utilities - */ - double vMax = Double.NEGATIVE_INFINITY; // double vAvg = 0; - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final double v = this.coeff.innerProd(this.attr.getRow(i)) - + this.asc.get(i); - this.utilities.set(i, v); - vMax = Math.max(vMax, v); - } - - /* - * (2) update choice probabilities - */ - double pSum = 0; - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final double p = Math.exp(this.utilityScale - * (this.utilities.get(i) - vMax)); - this.choiceProbs.set(i, p); - pSum += p; - } - this.choiceProbs.mult(1.0 / pSum); - - /* - * (3) update derivatives of choice probabilities w.r.t. coefficients - */ - this.dProbs_dCoeffs.clear(); - final Vector probsTimesAttr = this.attr - .timesVectorFromLeft(this.choiceProbs); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final Vector dProbi_dCoeff = this.dProbs_dCoeffs.getRow(i); - final double probi = this.choiceProbs.get(i); - final Vector attri = this.attr.getRow(i); - for (int j = 0; j < this.getAttrCount(); j++) { - dProbi_dCoeff.set(j, probi - * (attri.get(j) - probsTimesAttr.get(j))); - } - } - this.dProbs_dCoeffs.mult(this.utilityScale); - - /* - * (3) update derivatives of choice probabilities w.r.t. ASCs - */ - this.dProbs_dASCs.clear(); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final double probi = this.choiceProbs.get(i); - final Vector dProbi_dASC = this.dProbs_dASCs.getRow(i); - dProbi_dASC.set(i, probi); - dProbi_dASC.add(this.choiceProbs, -probi); - } - this.dProbs_dASCs.mult(this.utilityScale); - - this.consistent = true; - } - - public void conditionalUpdate() { - if (!this.consistent) { - this.enforcedUpdate(); - } - } - - // -------------------- GETTERS AND THE LIKE -------------------- - - // TODO NEW - public double getUtilityScale() { - return this.utilityScale; - } - - public int getChoiceSetSize() { - return this.choiceProbs.size(); - } - - public int getAttrCount() { - return this.coeff.size(); - } - - public Vector getCoeff() { - return this.coeff.newImmutableView(); - } - - public Vector getASC() { - return this.asc.newImmutableView(); - } - - public Vector getProbs() { - this.conditionalUpdate(); - return this.choiceProbs.newImmutableView(); - } - - public Vector getUtils() { - this.conditionalUpdate(); - return this.utilities.newImmutableView(); - } - - public Matrix get_dProbs_dCoeffs() { - this.conditionalUpdate(); - return this.dProbs_dCoeffs.newImmutableView(); - } - - public Matrix get_dProbs_dASCs() { - this.conditionalUpdate(); - return this.dProbs_dASCs.newImmutableView(); - } - - // -------------------- MISCELLANEOUS -------------------- - - public int draw(final Random rnd) { - return MathHelpers.draw(this.getProbs(), rnd); - } - - // --------------- PARAMETER VECTOR EXTERNALIZATION --------------- - - public int getParameterSize(final List attributeIndices, - final boolean withASC) { - return attributeIndices.size() - + (withASC ? this.getChoiceSetSize() : 0); - } - - public int getParameterSize(final boolean withASC) { - return this.getParameterSize(this.ALL_ATTRIBUTE_INDICES, withASC); - } - - public double getParameter(final int j) { - if (j < this.getAttrCount()) { - return this.getCoeff().get(j); - } else { - return this.getASC().get(j - this.getAttrCount()); - } - } - - public Vector getParameters(final boolean withASC) { - final Vector result = new Vector(this.getParameterSize(withASC)); - for (int j = 0; j < result.size(); j++) { - result.set(j, this.getParameter(j)); - } - return result; - } - - public void setParameter(final int j, final double value) { - this.consistent = false; - if (j < this.getAttrCount()) { - this.setCoefficient(j, value); - } else { - this.setASC(j - this.getAttrCount(), value); - } - } - - public void setParameters(final Vector parameters) { - this.consistent = false; - for (int j = 0; j < parameters.size(); j++) { - this.setParameter(j, parameters.get(j)); - } - } - - public Matrix get_dProb_dParameters(final List attributeIndices, - final boolean withASC) { - this.conditionalUpdate(); - final Matrix result = new Matrix(this.getChoiceSetSize(), this - .getParameterSize(attributeIndices, withASC)); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final Vector resulti = result.getRow(i); - final Vector dProbi_dCoeff = this.get_dProbs_dCoeffs().getRow(i); - final Vector dProbi_dASC = (withASC ? this.get_dProbs_dASCs() - .getRow(i) : null); - int l = 0; - for (int j : attributeIndices) { - resulti.set(l++, dProbi_dCoeff.get(j)); - } - if (withASC) { - for (int i2 = 0; i2 < this.getChoiceSetSize(); i2++) { - resulti.set(l++, dProbi_dASC.get(i2)); - } - } - } - return result; - } - - public Matrix get_dProb_dParameters(final boolean withASC) { - return this.get_dProb_dParameters(this.ALL_ATTRIBUTE_INDICES, withASC); - } - - /** - * Provides a numerical approximation of the Hessian of each choice - * probability with respect to the model parameters. - * - * @param delta - * the step size of the finite differences - * - * @param withASC - * if the alternative specific constants are to be accounted for - * - * @returns a numerical approximation of the Hessian of each choice - * probability with respect to the model parameters - */ - public List get_d2P_dbdb(final double delta, - final List attributeIndices, final boolean withASC) { - - final int paramSize = this.getParameterSize(attributeIndices, withASC); - final List paramIndices = new ArrayList(paramSize); - paramIndices.addAll(attributeIndices); - if (withASC) { - paramIndices.addAll(this.ALL_ASC_INDICES); - } - - final List result = new ArrayList(this - .getChoiceSetSize()); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - result.add(new Matrix(paramSize, paramSize)); - } - - final Matrix dP_db0 = this.get_dProb_dParameters(attributeIndices, - withASC); - int resultIndex = 0; - for (int r : paramIndices) { - final double br0 = this.getParameter(r); - this.setParameter(r, br0 + delta); - final Matrix dP_dbVaried = this.get_dProb_dParameters( - attributeIndices, withASC); - for (int i = 0; i < this.getChoiceSetSize(); i++) { - final Vector d2Pi_dbrdb = result.get(i).getRow(resultIndex); - d2Pi_dbrdb.add(dP_dbVaried.getRow(i), +1.0); - d2Pi_dbrdb.add(dP_db0.getRow(i), -1.0); - d2Pi_dbrdb.mult(1.0 / delta); - } - - this.setParameter(r, br0); - resultIndex++; - } - - return result; - } - - public List get_d2P_dbdb(final double delta, final boolean withASC) { - return this.get_d2P_dbdb(delta, this.ALL_ATTRIBUTE_INDICES, withASC); - } - - // TODO NEW - public Matrix getAttributesView() { - this.conditionalUpdate(); - return this.attr.copy(); - } - - // TODO NEW - public void setAttributes(final Matrix attr) { - this.attr.clear(); - this.attr.add(attr, 1.0); - this.consistent = false; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/PolynomialTrendFilter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/PolynomialTrendFilter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/PolynomialTrendFilter.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/PolynomialTrendFilter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.Serializable; - - -/** - * - * Tracks a signal trend with an arbitrary-degree polynomial. - * - * @author Gunnar Flötteröd - * - */ -public class PolynomialTrendFilter implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final Regression regr; - - private int it = 0; - - // -------------------- CONSTRUCTION -------------------- - - public PolynomialTrendFilter(final double lambda, final int degree) { - this.regr = new Regression(lambda, 1 + degree); - } - - // -------------------- IMPLEMENTATION -------------------- - - private Vector x(final int it) { - final Vector result = new Vector(this.regr.getDimension()); - for (int i = 0; i < result.size(); i++) { - result.set(i, Math.pow(it, i)); - } - return result; - } - - public void setLambda(final double lambda) { - this.regr.setInertia(lambda); - } - - public void add(final double val) { - this.regr.update(x(this.it++), val); - } - - public double predict(final int steps) { - return this.regr.predict(x(this.it - 1 + steps)); - } - - // TODO NEW - public Vector getRegressionCoefficients() { - return this.regr.getCoefficients().copy(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Regression.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Regression.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Regression.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Regression.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,265 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - - - -/** - * A recursive regression. Builds a "full" ordinary regression by incrementally - * accounting for the measurements. Has tracking capabilities. - * - * @author Gunnar Flötteröd - * - * @see http://en.wikipedia.org/wiki/Recursive_least_squares - * - */ -public class Regression implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final List avgInputs; - - private double offset = 0; - - private Vector coefficients; - - private Matrix precisionMatrix; - - private double inertia; - - // -------------------- CONSTRUCTION -------------------- - - /** - * Creates a Regression instance that operates on the passed data - * structures. - * - * @param inertia - * the inertia of this regression; must be in (0,1]; a value of - * 1.0 corresponds to an ordinary regression and lower values - * cause an exponential forgetting of earlier measurements - * @param coefficients - * a vector of initial parameters for this regression; must have - * at least one entry - * @param precisionMatrix - * the precision matrix of this calibration; must have the same - * row and column dimension as the parameters vector - */ - public Regression(final double inertia, final Vector coefficients, - final Matrix precisionMatrix) { - - if (coefficients == null) { - throw new IllegalArgumentException( - "initial coefficent vector is null"); - } - if (precisionMatrix == null) { - throw new IllegalArgumentException("precisionMatrix is null"); - } - if (precisionMatrix.rowSize() != coefficients.size() - || precisionMatrix.columnSize() != coefficients.size()) { - throw new IllegalArgumentException( - "dimension of precision matrix is inconsistent with " - + "size of coefficient vector"); - } - - this.avgInputs = new ArrayList(coefficients.size()); - for (int i = 0; i < coefficients.size(); i++) { - this.avgInputs.add(null); - } - - this.setInertia(inertia); - this.coefficients = coefficients; - this.precisionMatrix = precisionMatrix; - } - - /** - * Creates a dim-dimensional regression with the given intertia and a - * precision matrix only the value of 1e6 only on the main diagonal - * - * @param inertia - * the inertia of this regression; must be in (0,1]; a value of - * 1.0 corresponds to an ordinary regression and lower values - * cause an exponential forgetting of earlier measurements - * @param dim - * the dimension of this regression; must be strictly positive - */ - public Regression(final double inertia, final int dim) { - this(inertia, new Vector(dim), Matrix.newDiagonal(dim, 1e6)); - } - - /** - * Adds enlargement parameters to this regression. The parameters vector is - * initialized with an appropriate number of additional zeros, and the - * precision matrix is initialized with an appropriate number of zero rows - * and columns, where all new main diagonal entries are initialized with the - * value 1e6. - * - * @param enlargement - * by how many parameters this regression is to be enlarged; must - * not be negative - */ - public void appendParameters(final int enlargement) { - this.coefficients = this.coefficients.copyEnlarged(enlargement); - this.precisionMatrix = this.precisionMatrix.copyEnlarged(enlargement, - enlargement); - for (int i = this.coefficients.size() - enlargement; i < this.coefficients - .size(); i++) { - this.precisionMatrix.getRow(i).set(i, 1e6); - } - } - - // -------------------- IMPLEMENTATION -------------------- - - public void enableInputCentering(final int i) { - final SignalSmoother avgInput = new SignalSmoother(1.0 - this.inertia); - if (this.inertia == 1.0) { - avgInput.freeze(); - } - this.avgInputs.set(i, avgInput); - } - - /** - * Returns a reference to the coefficient vector of this regression. - * - * @return a reference to the coefficient vector of this regression - */ - public Vector getCoefficients() { - return this.coefficients; - } - - /** - * Returns a reference to the precision matrix of this regression. This - * matrix is only proportional to the covariance matrix of the parameter - * estimates. The actual parameter covariance matrix can be obtained by - * multiplying the precision matrix with the (estimated) variance of the - * residual error. - * - * @return a reference to the precision matrix of this regression - */ - public Matrix getPrecisionMatrix() { - return this.precisionMatrix; - } - - /** - * Sets the inertia of this regression to the given value. - * - * @param inertia - * the new intertia; must be in (0, 1] - */ - public void setInertia(final double inertia) { - if (inertia <= 0 || inertia > 1) { - throw new IllegalArgumentException("lambda must be in (0,1]"); - } - this.inertia = inertia; - - for (int i = 0; i < this.avgInputs.size(); i++) { - final SignalSmoother avgInput = this.avgInputs.get(i); - if (avgInput != null) { - if (inertia < 1.0) { - avgInput.setInnovationWeight(1.0 - inertia); - } else { - avgInput.freeze(); - } - } - } - } - - /** - * Returns the current intertia of this regression. - * - * @return the current intertia of this regression - */ - public double getInertia() { - return this.inertia; - } - - /** - * Returns the size of this regression's parameter vector. - * - * @return the size of this regression's parameter vector - */ - public int getDimension() { - return getCoefficients().size(); - } - - private Vector input(final Vector x, final boolean update) { - final Vector result = x.copy(); - for (int i = 0; i < this.avgInputs.size(); i++) { - final SignalSmoother avgInput = this.avgInputs.get(i); - if (avgInput != null) { - if (update) { - final double oldAvgInput = avgInput.getSmoothedValue(); - avgInput.addValue(x.get(i)); - this.offset += this.coefficients.get(i) - * (avgInput.getSmoothedValue() - oldAvgInput); - } - result.add(i, -avgInput.getSmoothedValue()); - } - } - return result; - } - - /** - * Applies the model estimated by this regression to the input vector x. - * - * @param x - * input vector for the model; size must be consistent with the - * dimension of this regression - * @return the output of the estimated model given the input x - */ - public double predict(final Vector x) { - return input(x, false).innerProd(this.getCoefficients()) + this.offset; - } - - /** - * Updates the coefficients of this regression with the (input, output) pair - * (x, y). - * - * @param x - * the new input vector; size must be consistent with the - * dimension of this regression - * @param y - * the new output value - */ - public void update(final Vector x, double y) { - - final Vector xCentered = this.input(x, true); - y -= this.offset; - - final Vector xP = this.precisionMatrix.timesVectorFromLeft(xCentered); - final double gScale = 1.0 / (this.inertia + xP.innerProd(xCentered)); - - this.getCoefficients().add(xP, - (y - xCentered.innerProd(this.getCoefficients())) * gScale); - - this.precisionMatrix.addOuterProduct(xP, xP, -gScale); - this.precisionMatrix.mult(1.0 / this.inertia); - - // current Matrix implementation does not exploit symmetry - this.precisionMatrix.symmetrize(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoother.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoother.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoother.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoother.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.Serializable; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SignalSmoother implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBER VARIABLES -------------------- - - private final SignalSmoothingWeight smoothingWeight; - - private double smoothedValue = 0; - - // -------------------- CONSTRUCTION -------------------- - - public SignalSmoother(final double innovationWeight) { - this.smoothingWeight = new SignalSmoothingWeight(innovationWeight); - } - - // -------------------- IMPLEMENTATION -------------------- - - public void setInnovationWeight(final double innovationWeight) { - this.smoothingWeight.setInnovationWeight(innovationWeight); - } - - public void freeze() { - this.smoothingWeight.freeze(); - } - - public boolean isFrozen() { - return this.smoothingWeight.isFrozen(); - } - - public double getLastInnovationWeight() { - return this.smoothingWeight.getLastInnovationWeight(); - } - - public double addValue(final double value) { - final double w = this.smoothingWeight.getNextInnovationWeight(); - this.smoothedValue = (1.0 - w) * this.smoothedValue + w * value; - return this.getSmoothedValue(); - } - - public double getSmoothedValue() { - return this.smoothedValue; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoothingWeight.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoothingWeight.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoothingWeight.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/SignalSmoothingWeight.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.Serializable; -import java.util.logging.Logger; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SignalSmoothingWeight implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBER VARIABLES -------------------- - - private double innovationWeight = 1.0; - - private double freezeIteration = Double.MAX_VALUE; - - private int iteration = 0; - - // -------------------- CONSTRUCTION -------------------- - - public SignalSmoothingWeight(final double innovationWeight) { - this.setInnovationWeight(innovationWeight); - } - - // -------------------- IMPLEMENTATION -------------------- - - public void setInnovationWeight(final double innovationWeight) { - if (Double.isNaN(innovationWeight) || innovationWeight < 0 - || innovationWeight > 1) { - throw new IllegalArgumentException("innovation weight " - + innovationWeight + " is not in [0,1]"); - } - - if (innovationWeight == 0.0) { - Logger.getLogger(this.getClass().getName()).warning( - "innovation is 0.0 (before freezing)"); - } - - if (this.isFrozen()) { - Logger.getLogger(this.getClass().getName()).warning( - "smoothing was already frozen"); - } - this.innovationWeight = innovationWeight; - this.freezeIteration = Double.MAX_VALUE; - } - - public void freeze() { - if (this.innovationWeight > 0) { - this.freezeIteration = this.iteration - 1.0 / this.innovationWeight; - } else { - this.freezeIteration = 0; - Logger.getLogger(this.getClass().getName()).warning( - "freezing from zero innovation weight"); - } - } - - public boolean isFrozen() { - return this.iteration >= this.freezeIteration; - } - - public double getNextInnovationWeight() { - if (this.iteration++ == 0) { - return 1.0; - } else { - if (this.isFrozen()) { - this.innovationWeight = 1.0 / (this.iteration - this.freezeIteration); - } - return this.innovationWeight; - } - } - - public double getLastInnovationWeight() { - if (this.iteration == 0) { - return 1.0; - } else { - return this.innovationWeight; - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Vector.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Vector.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Vector.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/math/Vector.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,667 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.math; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Random; - -/** - * - * Represents a vector. - * - * @author Gunnar Flötteröd - * - */ -public class Vector implements Serializable { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final double[] data; - - private final boolean immutable; - - // -------------------- CONSTRUCTION -------------------- - - private Vector(final double[] data, final boolean immutable) { - if (data == null) { - throw new IllegalArgumentException("data must not be null"); - } - if (data.length < 1) { - throw new IllegalArgumentException("dimension must be strictly positive"); - } - this.data = data; - this.immutable = immutable; - } - - /** - * Creates a vector of dimension dim that is initialized with all zeros. - * - * @param dim - * the dimension of the vector, must be strictly positive - */ - public Vector(final int dim) { - this(dim < 0 ? null : new double[dim], false); - } - - /** - * - * Creates a vector that is internally based on the data array. Changing - * data also changes the state of the Vector instance. - * - * @param data - * the data with which the vector is to be initialized, must not - * be null and have at least one entry - */ - public Vector(final double... data) { - this(data, false); - } - - public Vector(final List data) { - this(data == null ? null : new double[data.size()], false); - if (data != null) { - for (int i = 0; i < data.size(); i++) { - this.data[i] = data.get(i); - } - } - } - - // TODO NEW - public Vector(final int[] data) { - this(data.length); - // not sure if System.arraycopy(..) would do the job.. - for (int i = 0; i < data.length; i++) { - this.set(i, data[i]); - } - } - - /** - * Creates a new dim-dimensional vector that is initialized with independent - * standard normal values (expectation of zero, variance of one). If the rnd - * parameter is null, the vector is initialized with based on an internally - * generated Random instance. - * - * @param dim - * the dimension of the newly created vector; must be strictly - * positive - * @param rnd - * a Random instance that is used to fill the Vector with random - * numbers; may be null - * - * @return a dim-dimensional Vector that is initialized with independent - * standard normal values - */ - public static Vector newGaussian(final int dim, Random rnd) { - if (rnd == null) { - rnd = new Random(); - } - final Vector result = new Vector(dim); - for (int i = 0; i < dim; i++) { - result.set(i, rnd.nextGaussian()); - } - return result; - } - - /** - * Creates a new dim-dimensional vector that is initialized with independent - * standard normal values (expectation of zero, variance of one). - * - * @param dim - * the dimension of the newly created vector; must be strictly - * positive - * - * @return a dim-dimensional vector that is initialized with independent - * standard normal values - */ - public static Vector newGaussian(final int dim) { - return newGaussian(dim, null); - } - - // TODO NEW - public static Vector newBernoulli(final int dim, final Random rnd) { - final Vector result = new Vector(dim); - for (int i = 0; i < dim; i++) { - result.set(i, rnd.nextBoolean() ? +1.0 : -1.0); - } - return result; - } - - // TODO NEW - public static Vector newBernoulli(final int dim) { - return newBernoulli(dim, new Random()); - } - - /** - * Creates a "deep" copy of this vector. If enlargement is greater than - * zero, an appropriate number of zero entries is appended to the result. - * - * @param enlargement - * how many zeros are to be appended to the returned copy of this - * instance; must not be negative - * - * @return a "deep" copy of this instance to which enlargement zeros have - * been appended - */ - public Vector copyEnlarged(final int enlargement) { - if (enlargement < 0) { - throw new IllegalArgumentException("negative enlargment is not possible"); - } - final Vector result = new Vector(this.data.length + enlargement); - System.arraycopy(this.data, 0, result.data, 0, this.data.length); - return result; - } - - /** - * Returns a "deep" copy of this vector. - * - * @return a "deep" copy of this vector - */ - public Vector copy() { - return copyEnlarged(0); - } - - /** - * Returns an immutable view on this vector. - * - * @return a "deep" copy of this vector - */ - public Vector newImmutableView() { - return new Vector(this.data, true); - } - - // -------------------- WRITE ACCESS -------------------- - - private void checkImmutable() { - if (this.immutable) { - throw new UnsupportedOperationException("immutable Vector cannot be changed"); - } - } - - public void copy(final Vector other) { - this.checkImmutable(); - System.arraycopy(other.data, 0, this.data, 0, Math.min(this.size(), other.size())); - } - - public void fill(final double value) { - this.checkImmutable(); - Arrays.fill(this.data, value); - } - - /** - * Clears this vector by setting all of its elements to zero. - */ - public void clear() { - this.checkImmutable(); - this.fill(0.0); - } - - /** - * Writes value at position pos of this vector. - * - * @param pos - * the position at which value is to be written - * - * @param value - * the value that is to be written - */ - public void set(final int pos, final double value) { - this.checkImmutable(); - this.data[pos] = value; - } - - /** - * Adds value to position pos of this vector. - * - * @param pos - * the position at which value is to be added - * - * @param value - * that value that is to be added - */ - public void add(final int pos, final double value) { - this.checkImmutable(); - this.data[pos] += value; - } - - /** - * Adds weight * other to this vector - * - * @param other - * the vector which to add, must not be null and of the same - * dimension as this instance - * - * @param weight - * the value by which to multiply the values of other before - * adding them to this vector - */ - public void add(final Vector other, final double weight) { - this.checkImmutable(); - if (this.size() != other.size()) { - throw new IllegalArgumentException("vectors must be of same dimensions: this.size()=" + this.size() - + ", other.size()=" + other.size()); - } - for (int i = 0; i < this.size(); i++) - this.add(i, weight * other.get(i)); - } - - /** - * Multiplies the entry at position pos by value. - * - * @param pos - * the position at which to multiply - * - * @param value - * the value with which to multiply - */ - public void mult(final int pos, final double value) { - this.checkImmutable(); - this.data[pos] *= value; - } - - /** - * Multiplies every entry of this vector by value. - * - * @param value - * the value with which to multiply this vector - */ - public void mult(final double value) { - this.checkImmutable(); - for (int i = 0; i < size(); i++) { - mult(i, value); - } - } - - /** - * Normalizes this vector to length one. - */ - public void normalize() { - this.checkImmutable(); - this.mult(1.0 / this.euclNorm()); - } - - /** - * Rounds the entries of this vector to decimals positions after the comma. - * If decimals is negative, the rounding is carried over to positions before - * the comma. - * - * @param decimals - * positions after the comma to which to round - */ - public void round(final int decimals) { - this.checkImmutable(); - final double scale = Math.pow(10, decimals); - for (int i = 0; i < this.size(); i++) { - this.data[i] = Math.round(this.data[i] * scale) / scale; - } - } - - public void enforceBounds(final double lower, final double upper) { - this.checkImmutable(); - for (int i = 0; i < this.size(); i++) { - this.data[i] = Math.max(lower, Math.min(upper, this.data[i])); - } - } - - // -------------------- READ ACCESS -------------------- - - public boolean isImmutable() { - return this.immutable; - } - - /** - * Returns the number of elements in this vector. - * - * @return the number of elements in this vector - */ - public int size() { - return this.data.length; - } - - /** - * Returns the entry at position pos of this vector. - * - * @param pos - * the position of the desired entry - * - * @return the entry at position pos of this vector - */ - public double get(final int pos) { - return this.data[pos]; - } - - public double min() { - double result = Double.POSITIVE_INFINITY; - for (double x : this.data) { - result = Math.min(result, x); - } - return result; - } - - public double max() { - double result = Double.NEGATIVE_INFINITY; - for (double x : this.data) { - result = Math.max(result, x); - } - return result; - } - - /** - * Returns the inner product of this vector and other. - * - * @param other - * the vector with which to multiply, must not be null and of the - * same dimension as this instance - * - * @return the inner product of this vector and other - */ - public double innerProd(final Vector other) { - if (this.size() != other.size()) { - throw new IllegalArgumentException("vectors must be of same dimensions"); - } - double result = 0; - for (int i = 0; i < this.size(); i++) { - result += this.get(i) * other.get(i); - } - return result; - } - - /** - * Returns the Euclidean norm of this vector. - * - * @return the Euclidean norm of this vector - */ - public double euclNorm() { - return Math.sqrt(this.innerProd(this)); - } - - public double sum() { - double result = 0.0; - for (double a : this.data) { - result += a; - } - return result; - } - - /** - * Returns the sum of the absolute values of all entries of this vector - * - * @return the sum of the absolute values of all entries of this vector - */ - public double absValueSum() { - double result = 0; - for (int i = 0; i < this.data.length; i++) { - result += Math.abs(this.data[i]); - } - return result; - } - - public boolean isAllZeros() { - for (int i = 0; i < this.data.length; i++) { - if (this.data[i] != 0.0) { - return false; - } - } - return true; - } - - /** - * Returns a textual representation of this vector. - * - * @return a textual representation of this vector - */ - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append("[ "); - for (int i = 0; i < size(); i++) - result.append(get(i) + " "); - result.append("]"); - return result.toString(); - } - - // TODO NEW - public boolean isNaN() { - for (int i = 0; i < this.data.length; i++) { - if (Double.isNaN(this.data[i])) { - return true; - } - } - return false; - } - - // TODO NEW - public List asList() { - final List result = new ArrayList(this.size()); - for (Double x : this.data) { - result.add(x); - } - return result; - } - - // TODO NEW - public void add(final Vector addend) { - this.add(addend, 1.0); - } - - // TODO NEW - /** - * - * @param from - * inclusive - * @param to - * exclusive - * @return a deep (sub)copy - */ - public Vector subVector(final int from, final int to) { - final double[] newData = new double[to - from]; - System.arraycopy(this.data, from, newData, 0, to - from); - return new Vector(newData, false); - } - - // TODO NEW, untested - public static Vector newUniformLowerUpper(final Vector lower, final Vector upper, final Random rnd) { - final Vector result = new Vector(lower.size()); - for (int i = 0; i < result.size(); i++) { - final double u = rnd.nextDouble(); - result.set(i, (1.0 - u) * lower.get(i) + u * upper.get(i)); - } - return result; - } - - public static Vector newUniformCenterWidth(final Vector center, final Vector width, final Random rnd) { - final Vector result = new Vector(center.size()); - for (int i = 0; i < result.size(); i++) { - result.set(i, center.get(i) + (rnd.nextDouble() - 0.5) * width.get(i)); - } - return result; - } - - // TODO NEW - public void makeProbability() { - double sum = 0; - for (int i = 0; i < this.size(); i++) { - if (this.data[i] < 0.0) { - this.data[i] = 0.0; - } else if (this.data[i] > 1.0) { - this.data[i] = 1.0; - sum += 1.0; - } else { - sum += this.data[i]; - } - } - this.mult(1.0 / sum); - } - - // TODO NEW - public static double maxAbsDiff(final Vector a, final Vector b) { - double result = 0; - for (int i = 0; i < a.size(); i++) { - result = Math.max(result, Math.abs(a.get(i) - b.get(i))); - } - return result; - } - - // TODO NEW - public static final double cov(final Vector a, final Vector b) { - final double n = a.size(); - return a.innerProd(b) / (n - 1.0) - a.sum() * b.sum() / n / (n - 1.0); - } - - // TODO NEW - public Vector akf(int maxShift) { - maxShift = Math.min(maxShift, this.size() - 2); - final Vector result = new Vector(maxShift + 1); - for (int shift = 0; shift <= maxShift; shift++) { - final Vector a = this.subVector(0, size() - shift); - final Vector b = this.subVector(shift, this.size()); - result.set(shift, cov(a, b)); - } - return result; - } - - // TODO NEW - public Vector newSample(final double rate) { - final List resultList = new ArrayList(); - for (int i = 0; i < this.data.length; i++) { - if (Math.random() < rate) { - resultList.add(this.data[i]); - } - } - return new Vector(resultList); - } - - // TODO NEW - // public static Vector concat(final Vector a, final Vector b) { - // final double[] resultData = new double[a.size() + b.size()]; - // System.arraycopy(a.data, 0, resultData, 0, a.size()); - // System.arraycopy(b.data, 0, resultData, a.size(), b.size()); - // return new Vector(resultData); - // } - - // TODO NEW - public static Vector newUniformDistr(final int dim) { - final Vector result = new Vector(dim); - result.fill(1.0 / dim); - return result; - } - - // TODO NEW - public Vector newLeaveOneOut(final int leaveOutIndex) { - final double[] newData = new double[this.size() - 1]; - System.arraycopy(this.data, 0, newData, 0, leaveOutIndex); - System.arraycopy(this.data, leaveOutIndex + 1, newData, leaveOutIndex, this.size() - (leaveOutIndex + 1)); - return new Vector(newData); - } - - // TODO NEW - public static Vector concat(final List elements) { - - int size = 0; - for (Vector element : elements) { - size += element.size(); - } - final double[] newData = new double[size]; - - int i = 0; - for (Vector element : elements) { - System.arraycopy(element.data, 0, newData, i, element.size()); - i += element.size(); - } - - return new Vector(newData); - } - - // TODO NEW - public static Vector concat(final Vector... elements) { - return concat(Arrays.asList(elements)); - } - - // TODO NEW - public double mean() { - return this.sum() / this.size(); - } - - // TODO NEW - public static Vector sum(final Vector... addends) { - final Vector result = addends[0].copy(); - for (int i = 1; i < addends.length; i++) { - result.add(addends[i]); - } - return result; - } - - // TODO NEW - public static Vector diff(final Vector a, final Vector b) { - final Vector result = a.copy(); - result.add(b, -1.0); - return result; - } - - // TODO NEW - public static Vector min(final Vector... args) { - final Vector result = args[0].copy(); - for (int argIndex = 1; argIndex < args.length; argIndex++) { - for (int i = 0; i < result.size(); i++) { - result.data[i] = Math.min(result.data[i], args[argIndex].data[i]); - } - } - return result; - } - - // TODO NEW - public static Vector max(final Vector... args) { - final Vector result = args[0].copy(); - for (int argIndex = 1; argIndex < args.length; argIndex++) { - for (int i = 0; i < result.size(); i++) { - result.data[i] = Math.max(result.data[i], args[argIndex].data[i]); - } - } - return result; - } - - // TODO NEW - public void constrain(final Vector min, final Vector max) { - for (int i = 0; i < this.size(); i++) { - this.data[i] = MathHelpers.projectOnInterval(this.data[i], min.data[i], max.data[i]); - } - } - - // TODO NEW - public String toStringCSV() { - final StringBuffer result = new StringBuffer(Double.toString(this.data[0])); - for (int i = 1; i < this.data.length; i++) { - result.append(","); - result.append(Double.toString(this.data[i])); - } - return result.toString(); - } - - // TODO NEW - public double[] toArray() { - final double[] result = new double[this.data.length]; - System.arraycopy(this.data, 0, result, 0, this.data.length); - return result; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicLink.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicLink.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicLink.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicLink.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.basic; - -import floetteroed.utilities.networks.construction.AbstractLink; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class BasicLink extends AbstractLink { - - public BasicLink(String id) { - super(id); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkElement.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkElement.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkElement.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkElement.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.basic; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.xml.sax.Attributes; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class BasicNetworkElement { - - // -------------------- MEMBERS -------------------- - - private final String id; - - private final int hashCode; - - // makes one value available through several keys - private final Map key2key = new LinkedHashMap(); - - private final Map key2attr = new LinkedHashMap(); - - // -------------------- CONSTRUCTION -------------------- - - public BasicNetworkElement(final String id) { - if (id == null) { - throw new IllegalArgumentException("id is null"); - } - this.id = id; - this.hashCode = id.hashCode(); - } - - // TODO new clone constructor - BasicNetworkElement(final BasicNetworkElement parent) { - this.id = parent.id; - this.hashCode = parent.hashCode; - this.key2key.putAll(parent.key2key); - this.key2attr.putAll(parent.key2attr); - } - - // -------------------- INTERNALS -------------------- - - private String finalKey(String key) { - while (this.key2key.containsKey(key)) { - key = this.key2key.get(key); - } - return key; - } - - // -------------------- CONTENT WRITING -------------------- - - // TODO NEW >>>>> - public void setAttrs(final Attributes attrs, final String... exceptionKeys) { - final List exceptionKeyList; - if (exceptionKeys == null) { - exceptionKeyList = new ArrayList(0); - } else { - exceptionKeyList = Arrays.asList(exceptionKeys); - } - for (int i = 0; i < attrs.getLength(); i++) { - final String key = attrs.getQName(i); - if (!exceptionKeyList.contains(key)) { - this.setAttr(key, attrs.getValue(i)); - // System.out.println("SETTING " + "key" + " -> " + - // attrs.getValue(i)); - } - } - // System.out.println(); - } - - // TODO NEW <<<<< - - public void setAttr(final String key, final String value) { - this.key2attr.put(finalKey(key), value); - } - - public void redirectKey(final String newKey, final String existingKey) { - this.key2key.put(newKey, existingKey); - } - - public Map getKey2AttributeView() { - return Collections.unmodifiableMap(this.key2attr); - } - - // -------------------- CONTENT READING -------------------- - - public String getId() { - return this.id; - } - - public String getAttr(final String key) { - return this.key2attr.get(finalKey(key)); - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public boolean equals(final Object o) { - try { - // TODO 2nd condition is new - if (o == null || !o.getClass().equals(this.getClass())) { - return false; - } - final BasicNetworkElement other = (BasicNetworkElement) o; - return this.id.equals(other.id); - } catch (ClassCastException e) { - return false; - } - } - - @Override - public int hashCode() { - return this.hashCode; - } - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.getClass().getSimpleName()); - result.append("(id = "); - result.append(this.id); - result.append(", attributes = "); - result.append(this.key2attr.toString()); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkFactory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkFactory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkFactory.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetworkFactory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.basic; - -import floetteroed.utilities.networks.construction.AbstractNetworkFactory; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class BasicNetworkFactory extends - AbstractNetworkFactory { - - @Override - protected BasicNetwork newNetwork(final String id, final String type) { - return new BasicNetwork(id, type); - } - - @Override - protected BasicNode newNode(String id) { - return new BasicNode(id); - } - - @Override - protected BasicLink newLink(String id) { - return new BasicLink(id); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetwork.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetwork.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetwork.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNetwork.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.basic; - -import floetteroed.utilities.networks.construction.AbstractNetwork; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class BasicNetwork extends AbstractNetwork { - - public BasicNetwork(String id, String type) { - super(id, type); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNode.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNode.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNode.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/basic/BasicNode.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.basic; - -import floetteroed.utilities.networks.construction.AbstractNode; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class BasicNode extends AbstractNode { - - public BasicNode(String id) { - super(id); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractLink.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractLink.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractLink.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractLink.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.construction; - -import java.util.Set; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class AbstractLink, L extends AbstractLink> - extends AttributeContainer { - - // -------------------- MEMBER VARIABLES -------------------- - - private N fromNode = null; - - private N toNode = null; - - // -------------------- CONSTRUCTION -------------------- - - public AbstractLink(final String id) { - super(id); - } - - // BasicLink(final BasicLink parent) { - // super(parent); - // } - - // -------------------- CONTENT WRITING -------------------- - - public void setFromNode(final N node) { - this.fromNode = node; - } - - public void setToNode(final N node) { - this.toNode = node; - } - - // -------------------- CONTENT READING -------------------- - - public N getFromNode() { - return fromNode; - } - - public N getToNode() { - return toNode; - } - - public Set getInLinks() { - if (this.fromNode == null) { - return null; - } else { - return this.fromNode.getInLinks(); - } - } - - public Set getOutLinks() { - if (this.toNode == null) { - return null; - } else { - return this.toNode.getOutLinks(); - } - } - - // -------------------- ADDITIONAL FUNCTIONALITY -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(this.getClass() - .getSimpleName()); - result.append("(id = "); - result.append(this.getId()); - result.append(", fromNode = "); - result.append(this.getFromNode() == null ? "null" : this.getFromNode() - .getId()); - result.append(", toNode = "); - result.append(this.getToNode() == null ? "null" : this.getToNode() - .getId()); - result.append(", super = "); - result.append(super.toString()); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetworkFactory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetworkFactory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetworkFactory.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetworkFactory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.construction; - -import java.util.Map; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the node type - * @param - * the link type - * @param - * the network type - */ -public abstract class AbstractNetworkFactory, L extends AbstractLink, NET extends AbstractNetwork> { - - // -------------------- MEMBERS -------------------- - - private NetworkPostprocessor postProcessor; - - // -------------------- INTERFACE DEFINITION -------------------- - - protected abstract NET newNetwork(final String id, final String type); - - protected abstract N newNode(final String id); - - protected abstract L newLink(final String id); - - // -------------------- SETTERS AND GETTERS -------------------- - - public void setNetworkPostprocessor( - final NetworkPostprocessor postProcessor) { - this.postProcessor = postProcessor; - } - - public NetworkPostprocessor getNetworkPostprocessor() { - return this.postProcessor; - } - - // -------------------- NETWORK CONSTRUCTION -------------------- - - public NET newNetwork(final NetworkContainer container) { - - /* - * (1) create the network - */ - final NET newNetwork = this.newNetwork(container.networkId, - container.networkType); - newNetwork.setAttributes(container.networkAttributes); - newNetwork.setNodesAttributes(container.nodeSetAttributes); - newNetwork.setLinksAttributes(container.linkSetAttributes); - - /* - * (2) create the nodes - */ - for (Map.Entry> nodeId2Attributes : container.nodeId2Attributes - .entrySet()) { - final N newNode = this.newNode(nodeId2Attributes.getKey()); - newNode.setAttributes(nodeId2Attributes.getValue()); - newNetwork.addNode(newNode); - } - - /* - * (3) create the links and establish connectivity - */ - for (Map.Entry> linkId2Attributes : container.linkId2Attributes - .entrySet()) { - /* - * (3a) create the link - */ - final String linkId = linkId2Attributes.getKey(); - final L newLink = this.newLink(linkId); - newLink.setAttributes(linkId2Attributes.getValue()); - newNetwork.addLink(newLink); - /* - * (3b) establish connectivity - */ - final N fromNode = newNetwork.getNode(container.linkId2fromNodeId - .get(linkId)); - final N toNode = newNetwork.getNode(container.linkId2toNodeId - .get(linkId)); - - // System.out.println("connecting " + fromNode + " and " + toNode + - // " with link " + newLink); - // System.err.println("WARNING CHANGED CODE IN AbstractNetworkFactory around line 110"); - // if (fromNode != null && toNode != null) { - NET.connect(fromNode, toNode, newLink); - // } - } - - if (this.postProcessor != null) { - this.postProcessor.run(newNetwork); - } - - return newNetwork; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetwork.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetwork.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetwork.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNetwork.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.construction; - -import java.util.Collection; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class AbstractNetwork, L extends AbstractLink> - extends AttributeContainer { - - // // -------------------- CONSTANTS -------------------- - // - // public static final String TYPE_ATTRIBUTE = "type"; - - // -------------------- MEMBER VARIABLES -------------------- - - private final String type; - - private Map nodesAttr = new LinkedHashMap(); - - private Map linksAttr = new LinkedHashMap(); - - private final Map nodes = new LinkedHashMap(); - - private final Map links = new LinkedHashMap(); - - // -------------------- CONSTRUCTION -------------------- - - public AbstractNetwork(final String id, final String type) { - super(id); - this.type = type; - } - - // public BasicNetwork(final BasicNetwork parent) { - // /* - // * (1) create network clone without nodes and links - // */ - // super(parent); - // this.nodesAttr.putAll(parent.nodesAttr); - // this.linksAttr.putAll(parent.linksAttr); - // /* - // * (2) fill with unconnected node and link clones - // */ - // for (BasicNode node : parent.nodes.values()) { - // this.nodes.put(node.getId(), new BasicNode(node)); - // } - // for (BasicLink link : parent.links.values()) { - // this.links.put(link.getId(), new BasicLink(link)); - // } - // /* - // * (3) establish connectivity of nodes and links - // */ - // for (BasicLink link : parent.links.values()) { - // final BasicLink newLink = this.getLink(link.getId()); - // final BasicNode newFromNode = this.getNode(link.getFromNode().getId()); - // final BasicNode newToNode = this.getNode(link.getToNode().getId()); - // newLink.setFromNode(newFromNode); - // newLink.setToNode(newToNode); - // newFromNode.addOutLink(newLink); - // newToNode.addInLink(newLink); - // } - // } - - // -------------------- CONTENT WRITING -------------------- - - // TODO NEW - protected void setNodesAttributes(final Map nodesAttributes) { - this.nodesAttr = nodesAttributes; - } - - // TODO NEW - protected void setLinksAttributes(final Map linksAttributes) { - this.linksAttr = linksAttributes; - } - - public static , L extends AbstractLink> void connect( - final N fromNode, final N toNode, final L link) { - fromNode.getOutLinks().add(link); - toNode.getInLinks().add(link); - link.setFromNode(fromNode); - link.setToNode(toNode); - } - - // public void remove(final Node node, final boolean removeAdjacentLinks) { - // for (Link link : node.getInLinks()) { - // this.remove(link); - // } - // for (Link link : node.getOutLinks()) { - // this.remove(link); - // } - // } - // - // public void remove(final Link link) { - // this.links.remove(link.getId()); - // } - - public void setNodesAttr(final String key, final String value) { - this.nodesAttr.put(key, value); - } - - public String getNodesAttr(final String key) { - return this.nodesAttr.get(key); - } - - public void setLinksAttr(final String key, final String value) { - this.linksAttr.put(key, value); - } - - public String getLinksAttr(final String key) { - return this.linksAttr.get(key); - } - - // public BasicNode add(final BasicNode node) { - public N addNode(final N node) { - return this.nodes.put(node.getId(), node); - } - - // public BasicLink add(final BasicLink link) { - public L addLink(final L link) { - return this.links.put(link.getId(), link); - } - - public boolean isConsistent() { - /* - * check if all nodes known by the links are existing - */ - for (L link : this.links.values()) { - if (!this.nodes.containsValue(link.getFromNode())) { - return false; - } - if (!this.nodes.containsValue(link.getToNode())) { - return false; - } - } - /* - * check if all links known by the nodes are existing - */ - for (N node : this.nodes.values()) { - for (L link : node.getInLinks()) { - if (!this.links.containsValue(link)) { - return false; - } - } - for (L link : node.getOutLinks()) { - if (!this.links.containsValue(link)) { - return false; - } - } - } - return true; - } - - // -------------------- CONTENT READING -------------------- - - public String getType() { - // return this.getAttr(TYPE_ATTRIBUTE); - return this.type; - } - - // public boolean containsNodeId(final Object nodeId) { - // return this.nodes.containsKey(nodeId); - // } - // - // public boolean containsLinkId(final Object linkId) { - // return this.links.containsKey(linkId); - // } - - public N getNode(final String nodeId) { - return this.nodes.get(nodeId); - } - - public L getLink(final String linkId) { - return this.links.get(linkId); - } - - public L getLink(final String fromNodeId, final String toNodeId) { - final N fromNode = this.getNode(fromNodeId); - if (fromNode == null) { - return null; - } - for (L link : fromNode.getOutLinks()) { - if (link.getToNode().getId().equals(toNodeId)) { - return link; - } - } - return null; - } - - public Collection getNodes() { - return nodes.values(); - } - - public Collection getLinks() { - return links.values(); - } - - // // TODO new - public Map getKey2NodesAttrView() { - return Collections.unmodifiableMap(this.nodesAttr); - } - - // // TODO new - public Map getKey2LinksAttrView() { - return Collections.unmodifiableMap(this.linksAttr); - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(this.getClass() - .getSimpleName()); - result.append("(id = "); - result.append(this.getId()); - result.append(", #nodes = "); - result.append(this.getNodes().size()); - result.append(", #links = "); - result.append(this.getLinks().size()); - result.append(", super = "); - result.append(super.toString()); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNode.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNode.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNode.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AbstractNode.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.construction; - -import java.util.LinkedHashSet; -import java.util.Set; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class AbstractNode, L extends AbstractLink> - extends AttributeContainer { - - // -------------------- MEMBER VARIABLES -------------------- - - private final Set inLinks = new LinkedHashSet(); - - private final Set outLinks = new LinkedHashSet(); - - // -------------------- CONSTRUCTION -------------------- - - public AbstractNode(final String id) { - super(id); - } - - // BasicNode(final BasicNode parent) { - // super(parent); - // } - - // -------------------- CONTENT WRITING -------------------- - - public boolean addInLink(final L link) { - return inLinks.add(link); - } - - public boolean addOutLink(final L link) { - return outLinks.add(link); - } - - // -------------------- CONTENT READING -------------------- - - public Set getInLinks() { - return inLinks; - } - - public Set getOutLinks() { - return outLinks; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(this.getClass() - .getSimpleName()); - result.append("(id = "); - result.append(this.getId()); - result.append(", #inLinks = "); - result.append(this.getInLinks().size()); - result.append(", #outLinks = "); - result.append(this.getOutLinks().size()); - result.append(", super = "); - result.append(super.toString()); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AttributeContainer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AttributeContainer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AttributeContainer.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/AttributeContainer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.construction; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.xml.sax.Attributes; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class AttributeContainer { - - // -------------------- MEMBERS -------------------- - - private final String id; - - private final int hashCode; - - // makes one value available through several keys - // private Map key2key = new LinkedHashMap(); - - private Map key2attr = new LinkedHashMap(); - - // TODO NEW - protected void setAttributes(final Map attributes) { - // this.key2key.clear(); - this.key2attr = attributes; - } - - // -------------------- CONSTRUCTION -------------------- - - public AttributeContainer(final String id) { - if (id == null) { - throw new IllegalArgumentException("id is null"); - } - this.id = id; - this.hashCode = id.hashCode(); - } - - // AttributeContainer(final AttributeContainer parent) { - // this.id = parent.id; - // this.hashCode = parent.hashCode; - // this.key2key.putAll(parent.key2key); - // this.key2attr.putAll(parent.key2attr); - // } - - // -------------------- INTERNALS -------------------- - - private String finalKey(String key) { - // while (this.key2key.containsKey(key)) { - // key = this.key2key.get(key); - // } - return key; - } - - // -------------------- CONTENT WRITING -------------------- - - // TODO NEW >>>>> - public void setAttrs(final Attributes attrs, final String... exceptionKeys) { - final List exceptionKeyList; - if (exceptionKeys == null) { - exceptionKeyList = new ArrayList(0); - } else { - exceptionKeyList = Arrays.asList(exceptionKeys); - } - for (int i = 0; i < attrs.getLength(); i++) { - final String key = attrs.getQName(i); - if (!exceptionKeyList.contains(key)) { - this.setAttr(key, attrs.getValue(i)); - // System.out.println("SETTING " + "key" + " -> " + - // attrs.getValue(i)); - } - } - // System.out.println(); - } - - // TODO NEW <<<<< - - public void setAttr(final String key, final String value) { - this.key2attr.put(finalKey(key), value); - } - - // public void redirectKey(final String newKey, final String existingKey) { - // this.key2key.put(newKey, existingKey); - // } - - public Map getKey2AttributeView() { - return Collections.unmodifiableMap(this.key2attr); - } - - // -------------------- CONTENT READING -------------------- - - public String getId() { - return this.id; - } - - public String getAttr(final String key) { - return this.key2attr.get(finalKey(key)); - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public boolean equals(final Object o) { - try { - // TODO 2nd condition is new - if (o == null || !o.getClass().equals(this.getClass())) { - return false; - } - final AttributeContainer other = (AttributeContainer) o; - return this.id.equals(other.id); - } catch (ClassCastException e) { - return false; - } - } - - @Override - public int hashCode() { - return this.hashCode; - } - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - result.append(this.getClass().getSimpleName()); - result.append("(id = "); - result.append(this.id); - result.append(", attributes = "); - result.append(this.key2attr.toString()); - result.append(")"); - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkContainer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkContainer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkContainer.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkContainer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.construction; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class NetworkContainer { - - // MEMBERS - - protected final String networkId; - - protected final String networkType; - - protected final Map networkAttributes = new LinkedHashMap(); - - protected final Map nodeSetAttributes = new LinkedHashMap(); - - protected final Map linkSetAttributes = new LinkedHashMap(); - - protected final Map> nodeId2Attributes = new HashMap>(); - - protected final Map> linkId2Attributes = new HashMap>(); - - protected final Map linkId2fromNodeId = new LinkedHashMap(); - - protected final Map linkId2toNodeId = new LinkedHashMap(); - - // CONSTRUCTION - - public NetworkContainer(final String networkId, final String networkType) { - this.networkId = networkId; - this.networkType = networkType; - } - - // SETTERS - - public void putNetworkAttribute(final String key, final String value) { - this.networkAttributes.put(key, value); - } - - public void putNodeSetAttribute(final String key, final String value) { - this.nodeSetAttributes.put(key, value); - } - - public void putLinkSetAttribute(final String key, final String value) { - this.linkSetAttributes.put(key, value); - } - - public void putNode(final String nodeId) { - if (!this.nodeId2Attributes.containsKey(nodeId)) { - this.nodeId2Attributes.put(nodeId, - new LinkedHashMap()); - } - } - - public void putLink(final String linkId) { - if (!this.linkId2Attributes.containsKey(linkId)) { - this.linkId2Attributes.put(linkId, - new LinkedHashMap()); - } - } - - public void putNodeAttribute(final String nodeId, final String key, - final String value) { - Map attributes = this.nodeId2Attributes.get(nodeId); - if (attributes == null) { - attributes = new LinkedHashMap(); - this.nodeId2Attributes.put(nodeId, attributes); - } - attributes.put(key, value); - } - - public void putLinkAttribute(final String linkId, final String key, - final String value) { - Map attributes = this.linkId2Attributes.get(linkId); - if (attributes == null) { - attributes = new LinkedHashMap(); - this.linkId2Attributes.put(linkId, attributes); - } - attributes.put(key, value); - } - - public void setFromNode(final String linkId, final String fromNodeId) { - this.linkId2fromNodeId.put(linkId, fromNodeId); - } - - public void setToNode(final String linkId, final String toNodeId) { - this.linkId2toNodeId.put(linkId, toNodeId); - } - - // GETTERS - - public String getNetworkId() { - return this.networkId; - } - - public String getNetworkType() { - return this.networkType; - } - - public String getFromNodeId(final String linkId) { - return this.linkId2fromNodeId.get(linkId); - } - - public String getToNodeId(final String linkId) { - return this.linkId2toNodeId.get(linkId); - } - - public String getNodeAttribute(final String nodeId, final String key) { - return this.nodeId2Attributes.get(nodeId).get(key); - } - - public String getLinkAttribute(final String linkId, final String key) { - return this.linkId2Attributes.get(linkId).get(key); - } - - // TODO NEW - public boolean containsLink(final String linkId) { - return this.linkId2Attributes.containsKey(linkId); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkPostprocessor.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkPostprocessor.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkPostprocessor.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/construction/NetworkPostprocessor.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.construction; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public interface NetworkPostprocessor { - - public void run(final NET network); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/MATSimNetworkContainerLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/MATSimNetworkContainerLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/MATSimNetworkContainerLoader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/MATSimNetworkContainerLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.containerloaders; - -import org.xml.sax.Attributes; - -import floetteroed.utilities.networks.construction.NetworkContainer; - - -/** - * - * TODO This implements only a subset of the respective DTD. - * - * @author Gunnar Flötteröd - * - */ -public class MATSimNetworkContainerLoader extends NetworkContainerLoaderXML { - - // -------------------- CONSTANTS -------------------- - - public static final String MATSIM_NETWORK_TYPE = "MATSim"; - - public static final String NETWORK = "network"; - - public static final String NETWORK_NAME = "name"; - - public static final String NODES = "nodes"; - - public static final String LINKS = "links"; - - public static final String LINKS_CAPPERIOD = "capperiod"; - - public static final String NODE = "node"; - - public static final String NODE_ID = "id"; - - public static final String LINK = "link"; - - public static final String LINK_ID = "id"; - - public static final String LINK_FROM = "from"; - - public static final String LINK_TO = "to"; - - public static final String LINK_LENGTH = "length"; - - public static final String LINK_CAPACITY = "capacity"; - - public static final String LINK_PERMLANES = "permlanes"; - - public static final String LINK_FREESPEED = "freespeed"; - - // -------------------- CONSTRUCTION -------------------- - - public MATSimNetworkContainerLoader() { - super(); - } - - // -------------------- OVERRIDING OF DefaultHandler -------------------- - - @Override - public void startElement(final String namespaceURI, final String sName, - final String qName, final Attributes attrs) { - if (NETWORK.equals(qName)) { - startNetwork(attrs); - } else if (NODES.equals(qName)) { - startNodes(attrs); - } else if (LINKS.equals(qName)) { - startLinks(attrs); - } else if (NODE.equals(qName)) { - startNode(attrs); - } else if (LINK.equals(qName)) { - startLink(attrs); - } - } - - private void startNetwork(final Attributes attrs) { - final String networkId = attrs.getValue(NETWORK_NAME); - this.container = new NetworkContainer(networkId == null ? "" - : networkId, MATSIM_NETWORK_TYPE); - // if (networkId == null) { - // this.net = new BasicNetwork("MATSim network", MATSIM_NETWORK_TYPE); - // } else { - // this.net = new BasicNetwork(networkId, MATSIM_NETWORK_TYPE); - // } - for (int i = 0; i < attrs.getLength(); i++) { - final String name = attrs.getQName(i); - if (!NETWORK_NAME.equals(name)) { - this.container.putNetworkAttribute(name, attrs.getValue(i)); - // this.net.setAttr(name, attrs.getValue(i)); - } - } - } - - private void startNodes(final Attributes attrs) { - for (int i = 0; i < attrs.getLength(); i++) { - this.container.putNodeSetAttribute(attrs.getQName(i), - attrs.getQName(i)); - // this.net.setNodesAttr(attrs.getQName(i), attrs.getValue(i)); - } - } - - private void startLinks(final Attributes attrs) { - for (int i = 0; i < attrs.getLength(); i++) { - this.container.putLinkSetAttribute(attrs.getQName(i), - attrs.getValue(i)); - // this.net.setLinksAttr(attrs.getQName(i), attrs.getValue(i)); - } - } - - private void startNode(final Attributes attrs) { - final String nodeId = attrs.getValue(NODE_ID); - this.container.putNode(nodeId); - // final BasicNode node = new BasicNode(attrs.getValue(NODE_ID)); - for (int i = 0; i < attrs.getLength(); i++) { - final String name = attrs.getQName(i); - if (!NODE_ID.equals(name)) { - this.container - .putNodeAttribute(nodeId, name, attrs.getValue(i)); - // node.setAttr(name, attrs.getValue(i)); - } - } - // this.net.addNode(node); - } - - private void startLink(final Attributes attrs) { - // final BasicLink link = new BasicLink(attrs.getValue(LINK_ID)); - final String linkId = attrs.getValue(LINK_ID); - this.container.putLink(linkId); - - // final BasicNode fromNode = - // this.net.getNode(attrs.getValue(LINK_FROM)); - // if (fromNode == null) { - // throw new RuntimeException("unknown from-node for link " - // + link.getId()); - // } - this.container.setFromNode(linkId, attrs.getValue(LINK_FROM)); - - // final BasicNode toNode = this.net.getNode(attrs.getValue(LINK_TO)); - // if (toNode == null) { - // throw new RuntimeException("unknown to-node for link " - // + link.getId()); - // } - this.container.setToNode(linkId, attrs.getValue(LINK_TO)); - - // link.setFromNode(fromNode); - // link.setToNode(toNode); - // fromNode.addOutLink(link); - // toNode.addInLink(link); - - for (int i = 0; i < attrs.getLength(); i++) { - final String name = attrs.getQName(i); - if (!LINK_ID.equals(name) && !LINK_FROM.equals(name) - && !LINK_TO.equals(name)) { - // link.setAttr(name, attrs.getValue(i)); - this.container - .putLinkAttribute(linkId, name, attrs.getValue(i)); - } - } - // this.net.addLink(link); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/NetworkContainerLoaderXML.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/NetworkContainerLoaderXML.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/NetworkContainerLoaderXML.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/NetworkContainerLoaderXML.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.containerloaders; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.DefaultHandler; - -import floetteroed.utilities.networks.construction.NetworkContainer; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class NetworkContainerLoaderXML extends DefaultHandler { - - // -------------------- MEMBERS -------------------- - - protected NetworkContainer container = null; - - // -------------------- CONSTRUCTION -------------------- - - /** - * Empty default constructor. - */ - public NetworkContainerLoaderXML() { - super(); - } - - // -------------------- IMPLEMENTATION -------------------- - - public NetworkContainer load(final String path) { - this.container = null; - try { - final SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(false); - factory.setNamespaceAware(false); - final SAXParser parser = factory.newSAXParser(); - final XMLReader reader = parser.getXMLReader(); - reader.setContentHandler(this); - // ignore the DTD declaration: - reader.setFeature("http://apache.org/xml/features/" - + "nonvalidating/load-external-dtd", false); - reader.setFeature("http://xml.org/sax/features/" + "validation", - false); - reader.parse(path); - } catch (Exception e) { - throw new RuntimeException(e); - } - return this.container; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/OpenStreetMapNetworkContainerLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/OpenStreetMapNetworkContainerLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/OpenStreetMapNetworkContainerLoader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/OpenStreetMapNetworkContainerLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.containerloaders; - -import org.xml.sax.Attributes; - -import floetteroed.utilities.networks.construction.NetworkContainer; - - -/** - * - * Implements a subset of the OpenStreetMap XML file format. - * - * @author Gunnar Flötteröd - * - */ -public class OpenStreetMapNetworkContainerLoader extends - NetworkContainerLoaderXML { - - // -------------------- CONSTANTS -------------------- - - public static final String OPENSTREETMAP_NETWORK_TYPE = "OpenStreetMap"; - - public static final String NODE = "node"; - - public static final String NODE_ID = "id"; - - public static final String WAY = "way"; - - public static final String WAY_ID = "id"; - - public static final String WAY_ND = "nd"; - - public static final String WAY_ND_ID = "ref"; - - // -------------------- MEMBER VARIABLES -------------------- - - // private BasicLink currentLink = null; - private String currentLinkId = null; - - // -------------------- CONSTRUCTION -------------------- - - public OpenStreetMapNetworkContainerLoader() { - super(); - } - - // -------------------- OVERRIDING OF DefaultHandler -------------------- - - @Override - public void startDocument() { - // this.net = new BasicNetwork("OSM network", - // OPENSTREETMAP_NETWORK_TYPE); - this.container = new NetworkContainer("", OPENSTREETMAP_NETWORK_TYPE); - // this.currentLink = null; - this.currentLinkId = null; - } - - @Override - public void startElement(final String namespaceURI, final String sName, - final String qName, final Attributes attrs) { - if (NODE.equals(qName)) { - this.startNode(attrs); - } else if (WAY.equals(qName)) { - this.startWay(attrs); - } else if (WAY_ND.equals(qName)) { - this.startWayNd(attrs); - } - } - - @Override - public void endElement(String uri, String localName, String qName) { - if (WAY.equals(qName)) { - this.endWay(); - } - } - - private void startNode(final Attributes attrs) { - // final BasicNode node = new BasicNode(attrs.getValue(NODE_ID)); - // this.net.addNode(node); - final String nodeId = attrs.getValue(NODE_ID); - this.container.putNode(nodeId); - - for (int i = 0; i < attrs.getLength(); i++) { - final String name = attrs.getQName(i); - if (!NODE_ID.equals(name)) { - // node.setAttr(name, attrs.getValue(i)); - this.container - .putNodeAttribute(nodeId, name, attrs.getValue(i)); - } - } - } - - private void startWay(final Attributes attrs) { - // this.currentLink = new BasicLink(attrs.getValue(WAY_ID)); - this.currentLinkId = attrs.getValue(WAY_ID); - this.container.putLink(this.currentLinkId); - - for (int i = 0; i < attrs.getLength(); i++) { - final String name = attrs.getQName(i); - if (!WAY_ID.equals(name)) { - // this.currentLink.setAttr(name, attrs.getValue(i)); - this.container.putLinkAttribute(this.currentLinkId, name, - attrs.getValue(i)); - } - } - } - - private void startWayNd(final Attributes attrs) { - // final BasicNode node = this.net.getNode(attrs.getValue(WAY_ND_ID)); - final String nodeId = attrs.getValue(WAY_ND_ID); - // if (this.currentLink.getFromNode() == null) { - // this.currentLink.setFromNode(node); - // node.addOutLink(this.currentLink); - // } else { - // this.currentLink.setToNode(node); - // node.addInLink(this.currentLink); - // } - if (this.container.getFromNodeId(this.currentLinkId) == null) { - // this.currentLink.setFromNode(node); - // node.addOutLink(this.currentLink); - this.container.setFromNode(this.currentLinkId, nodeId); - } else { - // this.currentLink.setToNode(node); - // node.addInLink(this.currentLink); - this.container.setToNode(this.currentLinkId, nodeId); - } - } - - private void endWay() { - // this.net.addLink(this.currentLink); - // this.currentLink = null; - this.currentLinkId = null; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/SUMONetworkContainerLoader.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/SUMONetworkContainerLoader.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/SUMONetworkContainerLoader.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/containerloaders/SUMONetworkContainerLoader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.containerloaders; - -import java.util.Map; - -import org.xml.sax.Attributes; - -import floetteroed.utilities.IdentifiedElementParser; -import floetteroed.utilities.networks.NetworkInverter; -import floetteroed.utilities.networks.construction.NetworkContainer; - - -/** - * - * - * @author Gunnar Flötteröd - * - */ -public class SUMONetworkContainerLoader { - - // -------------------- CONSTANTS -------------------- - - public static final String SUMO_NETWORK_TYPE = "SUMO"; - - public static final String NODE_ELEMENT = "node"; - - public static final String NODE_ID_ATTRIBUTE = "id"; - - public static final String EDGE_ELEMENT = "edge"; - - public static final String EDGE_ID_ATTRIBUTE = "id"; - - public static final String EDGE_FROMNODE_ATTRIBUTE = "fromnode"; - - public static final String EDGE_TONODE_ATTRIBUTE = "tonode"; - - public static final String CONNECTION_ELEMENT = "connection"; - - public static final String CONNECTION_FROM_ATTRIBUTE = "from"; - - public static final String CONNECTION_TO_ATTRIBUTE = "to"; - - // -------------------- CONSTRUCTION -------------------- - - public SUMONetworkContainerLoader() { - } - - // -------------------- IMPLEMENTATION OF NetworkLoader -------------------- - - public NetworkContainer loadNetworkContainer(final String nodeFile, - final String edgeFile, final String connectionFile) { - - /* - * (0) check parameters - */ - if (nodeFile == null) { - throw new IllegalArgumentException("node file is null"); - } - if (edgeFile == null) { - throw new IllegalArgumentException("edge file is null"); - } - - /* - * (1) create network container instance - */ - // final BasicNetwork network = new BasicNetwork("SUMO-Network", - // SUMO_NETWORK_TYPE); - final NetworkContainer container = new NetworkContainer("SUMO-Network", - SUMO_NETWORK_TYPE); - - /* - * (2) load nodes - */ - final Map nodeId2Attrs = (new IdentifiedElementParser( - NODE_ELEMENT, NODE_ID_ATTRIBUTE)).readId2AttrsMap(nodeFile); - for (Map.Entry nodeId2AttrsEntry : nodeId2Attrs - .entrySet()) { - // final BasicNode node = new BasicNode(nodeId2AttrsEntry.getKey()); - final String nodeId = nodeId2AttrsEntry.getKey(); - final Attributes attrs = nodeId2AttrsEntry.getValue(); - container.putNode(nodeId); - for (int i = 0; i < attrs.getLength(); i++) { - container.putNodeAttribute(nodeId, attrs.getQName(i), - attrs.getValue(i)); - } - // node.setAttrs(nodeId2AttrsEntry.getValue()); - // network.addNode(node); - } - - /* - * (3) load links - */ - final Map edgeId2Attrs = (new IdentifiedElementParser( - EDGE_ELEMENT, EDGE_ID_ATTRIBUTE)).readId2AttrsMap(edgeFile); - for (Map.Entry edgeId2AttrsEntry : edgeId2Attrs - .entrySet()) { - // final BasicLink link = new BasicLink(edgeId2AttrsEntry.getKey()); - final String linkId = edgeId2AttrsEntry.getKey(); - final Attributes attrs = edgeId2AttrsEntry.getValue(); - container.putLink(linkId); - // final BasicNode fromNode = network.getNode(link - // .getAttr(EDGE_FROMNODE_ATTRIBUTE)); - // final BasicNode toNode = network.getNode(link - // .getAttr(EDGE_TONODE_ATTRIBUTE)); - container.setFromNode(linkId, - attrs.getValue(EDGE_FROMNODE_ATTRIBUTE)); - container.setToNode(linkId, attrs.getValue(EDGE_TONODE_ATTRIBUTE)); - for (int i = 0; i < attrs.getLength(); i++) { - container.putLinkAttribute(linkId, attrs.getQName(i), - attrs.getValue(i)); - } - // BasicNetwork.connect(fromNode, toNode, link); - // link.setAttrs(edgeId2AttrsEntry.getValue()); - // network.addLink(link); - } - - /* - * (4) load connections (if applicable) - */ - if (connectionFile != null) { - final Map connectionId2Attrs = (new IdentifiedElementParser( - CONNECTION_ELEMENT, null)).readId2AttrsMap(connectionFile); - for (Attributes attrs : connectionId2Attrs.values()) { - // final BasicLink fromLink = network.getLink(attrs - // .getValue(CONNECTION_FROM_ATTRIBUTE)); - final String fromLinkId = attrs - .getValue(CONNECTION_FROM_ATTRIBUTE); - // final String oldSuccessors = fromLink - // .getAttr(NetworkInverter.LINK_SUCCESSORS_ATTRIBUTE); - final String oldSuccessors = container.getLinkAttribute( - fromLinkId, NetworkInverter.LINK_SUCCESSORS_ATTRIBUTE); - // fromLink.setAttr(NetworkInverter.LINK_SUCCESSORS_ATTRIBUTE, - // (oldSuccessors == null ? "" : oldSuccessors + " ") - // + attrs.getValue(CONNECTION_TO_ATTRIBUTE)); - container.putLinkAttribute(fromLinkId, - NetworkInverter.LINK_SUCCESSORS_ATTRIBUTE, - (oldSuccessors == null ? "" : oldSuccessors + " ") - + attrs.getValue(CONNECTION_TO_ATTRIBUTE)); - } - } - return container; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/NetworkInverter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/NetworkInverter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/NetworkInverter.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/NetworkInverter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,182 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNetworkElement; -import floetteroed.utilities.networks.basic.BasicNode; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class NetworkInverter { - - // -------------------- CONSTANTS -------------------- - - // either "true" or "false" string representation of a boolean value - public static final String NETWORK_INVERTED_ATTRIBUTE = "inverted"; - - public static final String NODE_ORIGINALFROMNODE_ID = "originalfromnode"; - - public static final String NODE_ORIGINALTONODE_ID = "originaltonode"; - - public static final String LINK_SUCCESSORS_ATTRIBUTE = "successors"; - - // public static final String LINK_ORIGINALNODEID_ATTRIBUTE = - // "originalnodeid"; - - // -------------------- PRIVATE CONSTRUCTION -------------------- - - private NetworkInverter() { - } - - // -------------------- STATIC IMPLEMENTATION -------------------- - - public static String newConnectionId(final String from, final String to) { - return from + "__-->__" + to; - } - - public static String newConnectionId(final BasicNetworkElement from, - final BasicNetworkElement to) { - return newConnectionId(from.getId(), to.getId()); - } - - private static List successorIds(final BasicLink link) { - List result = new ArrayList(link.getToNode() - .getOutLinks().size()); - if (link.getAttr(LINK_SUCCESSORS_ATTRIBUTE) == null) { - for (BasicLink succ : link.getToNode().getOutLinks()) { - result.add(succ.getId()); - } - } else { - for (String succId : link.getAttr(LINK_SUCCESSORS_ATTRIBUTE).split( - "\\s")) { - result.add(succId.trim()); - } - } - return result; - } - - /** - * Creates an inverted version of originalNetwork. The inverted - * network consists of the following elements: - * - * (1) The new network inherits the id, the NetworkElement - * attributes and the nodes and links attributes of - * originalNetwork. Note that nodes attributes stay - * nodes attributes and links attributes stay links - * attributes. - * - * (2) The new network contains a node for every link in - * originalNetwork. The node inherits only the id of the - * original link. It also receives two new attributes, originalfromnode and - * originaltonode, which contain the IDs of the original upstream and - * downstream node of the original link. - * - * (3) The new network contains a link for every turning move in - * originalNetwork. The link inherits the attributes of the - * upstream link of the original turning move. Its id is composed of the - * respective upstream and downstream link in originalNetwork. - * - * - * @param originalNetwork - * @return - */ - public static BasicNetwork newInvertedNetwork( - final BasicNetwork originalNetwork) { - /* - * (0) checks and preliminaries - */ - if (originalNetwork.getAttr(NETWORK_INVERTED_ATTRIBUTE) != null - && Boolean.parseBoolean(originalNetwork - .getAttr(NETWORK_INVERTED_ATTRIBUTE))) { - System.err.println("The network is already inverted. " - + "Returning the same instance."); - return originalNetwork; - } - final BasicNetwork newNetwork = new BasicNetwork( - originalNetwork.getId(), originalNetwork.getType()); - newNetwork.setAttr(NETWORK_INVERTED_ATTRIBUTE, Boolean.toString(true)); - for (Map.Entry entry : originalNetwork - .getKey2NodesAttrView().entrySet()) { - newNetwork.setNodesAttr(entry.getKey(), entry.getValue()); - } - for (Map.Entry entry : originalNetwork - .getKey2LinksAttrView().entrySet()) { - newNetwork.setLinksAttr(entry.getKey(), entry.getValue()); - } - /* - * (1) create one new node per original link - */ - for (BasicLink originalLink : originalNetwork.getLinks()) { - final BasicNode newNode = new BasicNode(originalLink.getId()); - for (Map.Entry entry : originalLink - .getKey2AttributeView().entrySet()) { - newNode.setAttr(entry.getKey(), entry.getValue()); - } - newNode.setAttr(NODE_ORIGINALFROMNODE_ID, originalLink - .getFromNode().getId()); - newNode.setAttr(NODE_ORIGINALTONODE_ID, originalLink.getToNode() - .getId()); - newNetwork.addNode(newNode); - } - /* - * (2) create one link per turning move - */ - for (BasicNode originalNode : originalNetwork.getNodes()) { - for (BasicLink originalInLink : originalNode.getInLinks()) { - for (String originalOutLinkId : successorIds(originalInLink)) { - final BasicLink originalOutLink = originalNetwork - .getLink(originalOutLinkId); - - // >>>>> TODO No idea why this compiled before. >>>>> - // final BasicLink newLink = new BasicLink(newConnectionId( - // originalInLink, originalOutLink)); - final BasicLink newLink = new BasicLink(newConnectionId( - originalInLink.getId(), originalOutLinkId)); - // <<<<< TODO No idea why this compiled before. <<<<< - - for (Map.Entry entry : originalInLink - .getKey2AttributeView().entrySet()) { - newLink.setAttr(entry.getKey(), entry.getValue()); - } - // newLink.setAttr(LINK_ORIGINALNODEID_ATTRIBUTE, - // originalNode - // .getId()); - final BasicNode newFromNode = newNetwork - .getNode(originalInLink.getId()); - final BasicNode newToNode = newNetwork - .getNode(originalOutLink.getId()); - BasicNetwork.connect(newFromNode, newToNode, newLink); - newNetwork.addLink(newLink); - } - } - } - return newNetwork; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCostExcludingNodes.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCostExcludingNodes.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCostExcludingNodes.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCostExcludingNodes.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.shortestpaths; - -import java.util.Collection; - -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNode; - - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class LinkCostExcludingNodes implements LinkCost { - - // -------------------- CONSTANTS -------------------- - - private final LinkCost linkCost; - - private final Collection excludedNodes; - - // -------------------- CONSTRUCTION -------------------- - - public LinkCostExcludingNodes(final LinkCost linkCost, - final Collection excludedNodes) { - if (linkCost == null) { - throw new IllegalArgumentException("linkCost is null"); - } - if (excludedNodes == null) { - throw new IllegalArgumentException("excludedNodes is null"); - } - this.linkCost = linkCost; - this.excludedNodes = excludedNodes; - } - - // -------------------- IMPLEMENTATION OF LinkCost -------------------- - - @Override - public double getCost(final BasicLink link) { - if (this.excludedNodes.contains(link.getFromNode()) - || this.excludedNodes.contains(link.getToNode())) { - return Double.POSITIVE_INFINITY; - } else { - return this.linkCost.getCost(link); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCost.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCost.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCost.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/LinkCost.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.shortestpaths; - -import floetteroed.utilities.networks.basic.BasicLink; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public interface LinkCost { - - public double getCost(final BasicLink link); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/Router.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/Router.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/Router.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/Router.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,393 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.shortestpaths; - -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import floetteroed.utilities.networks.basic.BasicLink; -import floetteroed.utilities.networks.basic.BasicNetwork; -import floetteroed.utilities.networks.basic.BasicNode; - - -/** - * - * @author Gunnar Flötteröd - * - */ -public class Router { - - // -------------------- CONSTANTS -------------------- - - protected enum Direction { - FWD, BWD - }; - - protected final BasicNetwork network; - - protected final LinkCost linkCost; - - // -------------------- CONSTRUCTION -------------------- - - public Router(final BasicNetwork network, final LinkCost linkCost) { - if (network == null) { - throw new IllegalArgumentException("network is null"); - } - if (linkCost == null) { - throw new IllegalArgumentException("link cost is null"); - } - this.network = network; - this.linkCost = linkCost; - } - - // -------------------- GETTERS -------------------- - - // TODO check if needed -- network is only required internally! - public BasicNetwork getNetwork() { - return this.network; - } - - // -------------------- INTERNALS -------------------- - - static double treeCost(final BasicNode node, final Map treeCost) { - final Double result = treeCost.get(node); - if (result == null) { - return Double.POSITIVE_INFINITY; - } else { - return result; - } - } - - private void expand(final BasicNode currentNode, final BasicNode candidateNode, - final BasicLink connectingLink, final UnsettledNodes unsettled) { - final double oldCost = unsettled.cost(candidateNode); - final double newCost = this.linkCost.getCost(connectingLink) - + unsettled.cost(currentNode); - unsettled.update(candidateNode, Math.min(oldCost, newCost)); - } - - protected Map treeCost(final BasicNode root, - final Set targets, final Direction direction, - UnsettledNodes unsettled, Set settled) { - /* - * (1) define set of feasible targets - */ - final Set targetsLeft; - if (targets == null) { - targetsLeft = new HashSet(); - // TODO NEW >>>>> - targetsLeft.add(new BasicNode(">>>>> NON-EXISTING NODE <<<<<")); - // targetsLeft.add(new Node(new Object())); - // TODO NEW <<<<< - } else { - targetsLeft = new HashSet(targets); - } - /* - * (2) initialize data structures and search loop - */ - BasicNode currentNode; - if (unsettled == null) { - unsettled = new UnsettledNodes(); - currentNode = root; - unsettled.update(root, 0.0); - } else { - currentNode = unsettled.first(); - } - if (settled == null) { - settled = new HashSet(); - } - /* - * (3) search until all reachable targets are found - */ - while (currentNode != null && !targetsLeft.isEmpty()) { - if (Direction.FWD.equals(direction)) { - /* - * (3-A) expand forwards - */ - for (BasicLink outLink : currentNode.getOutLinks()) { - final BasicNode outNode = outLink.getToNode(); - if (!settled.contains(outNode)) { - this.expand(currentNode, outNode, outLink, unsettled); - } - } - } else { - /* - * (3-B) expand backwards - */ - for (BasicLink inLink : currentNode.getInLinks()) { - final BasicNode inNode = inLink.getFromNode(); - if (!settled.contains(inNode)) { - this.expand(currentNode, inNode, inLink, unsettled); - } - } - } - settled.add(currentNode); - unsettled.remove(currentNode); - targetsLeft.remove(currentNode); - if (unsettled.isEmpty()) { - currentNode = null; - } else { - currentNode = unsettled.first(); - } - } - return unsettled.cost(); - } - - private Map treeCost(final BasicNode root, - final Set targets, final Direction direction) { - return this.treeCost(root, targets, direction, null, null); - } - - // -------------------- ROUTING IMPLEMENTATIONS -------------------- - - public Map fwdCost(final BasicNode origin, - final Set destinations) { - return this.treeCost(origin, destinations, Direction.FWD); - } - - public Map bwdCost(final Set origins, - final BasicNode destination) { - return this.treeCost(destination, origins, Direction.BWD); - } - - public Map fwdCost(final BasicNode origin, final BasicNode destination) { - final Set destinations = new HashSet(); - destinations.add(destination); - return this.fwdCost(origin, destinations); - } - - public Map fwdCost(final BasicNode origin) { - return this.fwdCost(origin, new HashSet(this.network.getNodes())); - } - - public Map bwdCost(final BasicNode destination) { - return this.bwdCost(new HashSet(this.network.getNodes()), - destination); - } - - public Map bwdCost(final BasicNode origin, final BasicNode destination) { - final Set origins = new HashSet(); - origins.add(origin); - return this.bwdCost(origins, destination); - } - - private Map> bestRoutes(final Set origins, - final BasicNode destination, final Map bwdCostTree) { - final Map> result = new HashMap>(); - for (BasicNode origin : origins) { - LinkedList route = new LinkedList(); - route.addFirst(origin); - while (route != null && !route.getLast().equals(destination)) { - BasicNode bestNode = null; - double bestCost = Double.POSITIVE_INFINITY; - for (BasicLink candLink : route.getLast().getOutLinks()) { - final BasicNode candNode = candLink.getToNode(); - final double bwdCost = treeCost(candNode, bwdCostTree); - double candCost = this.linkCost.getCost(candLink) + bwdCost; - if (candCost < bestCost) { - bestNode = candNode; - bestCost = candCost; - } - } - if (Double.isInfinite(bestCost)) { - route = null; - } else { - route.addLast(bestNode); - } - } - result.put(origin, route); - } - return result; - } - - private Map> bestRoutes(final BasicNode origin, - final Set destinations, final Map fwdCostTree) { - final Map> result = new HashMap>(); - for (BasicNode destination : destinations) { - LinkedList route = new LinkedList(); - route.addLast(destination); - while (route != null && !route.getFirst().equals(origin)) { - BasicNode bestNode = null; - double bestCost = Double.POSITIVE_INFINITY; - for (BasicLink candLink : route.getFirst().getInLinks()) { - final BasicNode candNode = candLink.getFromNode(); - final double fwdCost = treeCost(candNode, fwdCostTree); - double candCost = this.linkCost.getCost(candLink) + fwdCost; - if (candCost < bestCost) { - bestNode = candNode; - bestCost = candCost; - } - } - if (Double.isInfinite(bestCost)) { - route = null; - } else { - route.addFirst(bestNode); - } - } - result.put(destination, route); - } - return result; - } - - public LinkedList bestRouteBwd(final BasicNode origin, - final BasicNode destination, final Map bwdCost) { - final Set origins = new HashSet(); - origins.add(origin); - return this.bestRoutes(origins, destination, bwdCost).get(origin); - } - - public LinkedList bestRouteFwd(final BasicNode origin, - final BasicNode destination, final Map fwdCost) { - final Set destinations = new HashSet(); - destinations.add(destination); - return this.bestRoutes(origin, destinations, fwdCost).get(destination); - } - - public Map> bestRoutes(final BasicNode origin, - final Set destinations) { - final Map fwdCost = this.fwdCost(origin, destinations); - return this.bestRoutes(origin, destinations, fwdCost); - } - - public Map> bestRoutes(final Set origins, - final BasicNode destination) { - final Map bwdCost = this.bwdCost(origins, destination); - return this.bestRoutes(origins, destination, bwdCost); - } - - public LinkedList bestRoute(final BasicNode origin, final BasicNode destination) { - final Set destinations = new HashSet(); - destinations.add(destination); - return this.bestRoutes(origin, destinations).get(destination); - } - - // public double bestRouteCost(final Node origin, final Node destination) { - // - // - // } - - // -------------------- SUPPLEMENTARY IMPLEMENTATIONS -------------------- - - /** - * TODO End parameter is inclusive! - * - * TODO made this static - */ - public static boolean equals(final List route1, final int start1, - final int end1, List route2, final int start2, final int end2) { - if (end1 - start1 != end2 - start2) { - return false; - } else { - for (int i = 0; i <= end1 - start1; i++) { - if (!route1.get(start1 + i).equals(route2.get(start2 + i))) { - return false; - } - } - } - return true; - } - - private static BasicLink connectingLink(final BasicNode from, final BasicNode to) { - for (BasicLink link : from.getOutLinks()) { - if (link.getToNode().equals(to)) { - return link; - } - } - return null; - } - - public static List toLinkRoute(final List nodeRoute) { - final List linkRoute = new LinkedList(); - for (int i = 0; i < nodeRoute.size() - 1; i++) { - final BasicLink link = Router.connectingLink(nodeRoute.get(i), - nodeRoute.get(i + 1)); - if (link == null) { - return null; - } else { - linkRoute.add(link); - } - } - return linkRoute; - } - - public double cost(final List linkRoute) { - double result = 0; - for (BasicLink link : linkRoute) { - result += this.linkCost.getCost(link); - } - return result; - } - - // -------------------- TODO NEW -------------------- - - public Map costWithoutExcludedNodes(final BasicNode root, - final BasicNode target, final Collection allNodes, - final Collection excludedNodes, - final Map treeCost, final Direction direction) { - /* - * (1) simple case: the root node is excluded - */ - if (excludedNodes.contains(root)) { - throw new IllegalArgumentException( - "trying to compute SP cost tree with forbidden root"); - } - if (excludedNodes.contains(target)) { - throw new IllegalArgumentException( - "trying to compute SP cost tree to forbidden target"); - } - /* - * (2) compute completely new tree cost - */ - final Set targets = new LinkedHashSet(); - targets.add(target); - final LinkCost myLinkCost = new LinkCostExcludingNodes(this.linkCost, - excludedNodes); - final Router myRouter = new Router(this.getNetwork(), myLinkCost); - final Map myTreeCost = myRouter.treeCost(root, targets, - direction, null, null); - /* - * (3) simply return the result - */ - return myTreeCost; - } - - public Map fwdCostWithoutExcludedNodes(final BasicNode origin, - final BasicNode destination, final Collection allNodes, - final Collection excludedNodes, - final Map fwdCost) { - return this.costWithoutExcludedNodes(origin, destination, allNodes, - excludedNodes, fwdCost, Direction.FWD); - } - - public Map bwdCostWithoutExcludedNodes( - final BasicNode destination, final BasicNode origin, - final Collection allNodes, - final Collection excludedNodes, - final Map bwdCost) { - return this.costWithoutExcludedNodes(destination, origin, allNodes, - excludedNodes, bwdCost, Direction.BWD); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/UnsettledNodes.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/UnsettledNodes.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/UnsettledNodes.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/networks/shortestpaths/UnsettledNodes.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.networks.shortestpaths; - -import java.util.Comparator; -import java.util.HashMap; -import java.util.Map; -import java.util.SortedSet; -import java.util.TreeSet; - -import floetteroed.utilities.networks.basic.BasicNode; - - - -/** - * - * @author Gunnar Flötteröd - * - */ -class UnsettledNodes implements Comparator { - - // -------------------- MEMBERS -------------------- - - private final Map treeCost; - - private final SortedSet nodes; - - // -------------------- CONSTRUCTIONS -------------------- - - UnsettledNodes() { - this.treeCost = new HashMap(); - this.nodes = new TreeSet(this); - } - - // -------------------- IMPLEMENTATION -------------------- - - boolean isEmpty() { - return this.nodes.isEmpty(); - } - - int size() { - return this.nodes.size(); - } - - BasicNode first() { - return this.nodes.first(); - } - - void remove(final BasicNode node) { - this.nodes.remove(node); - } - - void update(final BasicNode node, final double cost) { - this.nodes.remove(node); - if (!Double.isInfinite(cost)) { - this.treeCost.put(node, cost); - } - this.nodes.add(node); - } - - Double cost(final BasicNode node) { - return Router.treeCost(node, this.treeCost); - } - - Map cost() { - return this.treeCost; - } - - // -------------------- IMPLEMENTATION OF Comparable -------------------- - - @Override - public int compare(final BasicNode n1, final BasicNode n2) { - final int costResult = Double.compare(this.cost(n1), this.cost(n2)); - if (costResult != 0) { - return costResult; - } else { - // TODO this requires unique string representations of the ids - return n1.getId().toString().compareTo(n2.getId().toString()); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/SimpleLogFormatter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/SimpleLogFormatter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/SimpleLogFormatter.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/SimpleLogFormatter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.logging.Formatter; -import java.util.logging.Level; -import java.util.logging.LogRecord; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class SimpleLogFormatter extends Formatter { - - // -------------------- CONSTANTS -------------------- - - private final SimpleDateFormat sdf = new SimpleDateFormat( - "yyyy-MM-dd HH:mm:ss"); - - // -------------------- MEMBERS -------------------- - - private final String prefix; - - // -------------------- CONSTRUCTION -------------------- - - public SimpleLogFormatter(final String prefix) { - this.prefix = prefix; - } - - // -------------------- OVERRIDING OF Formatter -------------------- - - @Override - public String format(LogRecord rec) { - final StringBuffer buf = new StringBuffer(512); - /* - * (1) say who this is, and when this happened - */ - if (this.prefix != null) { - buf.append(this.prefix); - } - buf.append(this.sdf.format(new Date(rec.getMillis()))); - buf.append(" "); - /* - * (2) say how bad things are - */ - buf.append(rec.getLevel()); - /* - * (3) say what's going on - */ - buf.append(" "); - buf.append(formatMessage(rec)); - /* - * (4) say where this happened only if things are bad - */ - if (rec.getLevel().intValue() >= Level.WARNING.intValue() - || rec.getLevel().intValue() <= Level.FINE.intValue()) { - buf.append(" -> "); - buf.append(rec.getSourceClassName()); - buf.append("."); - buf.append(rec.getSourceMethodName()); - } - buf.append("\n"); - return buf.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/ProgressListener.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/ProgressListener.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/ProgressListener.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/ProgressListener.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.simulatedannealing; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public interface ProgressListener { - - public void notifyCurrentState(final S state, - final double currentObjectiveFunctions, - final double alternativeObjectiveFunction); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SimulatedAnnealing.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SimulatedAnnealing.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SimulatedAnnealing.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SimulatedAnnealing.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,217 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.simulatedannealing; - -import java.util.ArrayList; -import java.util.List; - -import floetteroed.utilities.math.BasicStatistics; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the solution type - */ -public class SimulatedAnnealing { - - // -------------------- CONSTANT MEMBERS -------------------- - - private final SolutionGenerator generator; - - private final SolutionEvaluator evaluator; - - private final List> progressListeners = new ArrayList>(); - - // -------------------- MEMBERS -------------------- - - private boolean verbose = false; - - private boolean recomputeCurrentSolution = false; - - // TODO >>>>> NEW >>>>> - private double successThreshold = Double.NEGATIVE_INFINITY; - // TODO <<<<< NEW <<<<< - - private S xOpt; - - private double xQOpt; - - // -------------------- CONSTRUCTION -------------------- - - public SimulatedAnnealing(final SolutionGenerator generator, - final SolutionEvaluator evaluator) { - if (generator == null) { - throw new IllegalArgumentException("generator is null"); - } - if (evaluator == null) { - throw new IllegalArgumentException("evaluator is null"); - } - this.generator = generator; - this.evaluator = evaluator; - this.reset(); - // this.progressListeners.add(new TextOutputProgressListener()); - } - - // -------------------- SETTERS -------------------- - - public void addListener(final ProgressListener listener) { - if (listener != null) { - this.progressListeners.add(listener); - } - } - - public void setVerbose(final boolean verbose) { - this.verbose = verbose; - } - - public void setRecomputeCurrentSolution( - final boolean recomputeCurrentSolution) { - this.recomputeCurrentSolution = recomputeCurrentSolution; - } - - public void setSuccessThreshold(final double successThreshold) { - this.successThreshold = successThreshold; - } - - // -------------------- GETTERS -------------------- - - public S getOptimalSolution() { - return this.xOpt; - } - - public double getOptimalEvaluation() { - return this.xQOpt; - } - - // -------------------- OPTIMIZATION -------------------- - - private void msg(final int it, final double xQ) { - if (this.verbose) { - System.out.println("it. " + it + ": f(x) = " + xQ + ", fOpt(x) = " - + this.xQOpt + ", xOpt = " + this.xOpt); - } - } - - private S newRandomFeasibleSolution() { - S x = null; - do { - x = this.generator.randomGeneration(); - } while (!this.evaluator.feasible(x)); - return x; - } - - private void updateBestSolution(final S x, final double xQ) { - if (xQ < xQOpt) { - this.xOpt = this.generator.copy(x); - this.xQOpt = xQ; - } - } - - public void reset() { - this.xOpt = null; - this.xQOpt = Double.POSITIVE_INFINITY; - } - - public double proposeGreediness(final int maxPrepIt) { - S x = null; - double xQ = Double.POSITIVE_INFINITY; - final BasicStatistics stats = new BasicStatistics(); - for (int it = 1; it <= maxPrepIt; it++) { - x = this.newRandomFeasibleSolution(); - xQ = this.evaluator.evaluation(x); - this.updateBestSolution(x, xQ); - this.msg(it, xQ); - stats.add(xQ); - } - return 1.0 / stats.getStddev(); - } - - public void run(final S initialSolution, final int maxIt, - final double greediness) { - this.run(initialSolution, maxIt, greediness, maxIt); - } - - public void run(final S initialSolution, final int maxIt, - final double greediness, int maxFailureIterations) { - - int failures = 0; - - S x; - double xQ; - if (initialSolution == null) { - x = this.newRandomFeasibleSolution(); - } else { - x = initialSolution; - } - xQ = this.evaluator.evaluation(x); - this.updateBestSolution(x, xQ); - - msg(1, xQ); - for (ProgressListener progressListener : this.progressListeners) { - progressListener.notifyCurrentState(x, xQ, xQ); - } - - for (int it = 2; (it <= maxIt) && (xQ > this.successThreshold) && (failures < maxFailureIterations); it++) { - // TODO >>>>> NEW >>>>> - S y; - do { - y = this.generator.variation(x); - } while (!this.evaluator.feasible(y)); - // TODO <<<<< NEW <<<<< - - // TODO >>>>> NEW >>>>> - if (this.recomputeCurrentSolution) { - xQ = this.evaluator.evaluation(x); - } - // TODO <<<<< NEW <<<<< - - double yQ = this.evaluator.evaluation(y); - this.updateBestSolution(y, yQ); - - if (Double.isInfinite(greediness)) { - if (yQ < xQ) { - x = y; - xQ = yQ; - failures = 0; - } else { - failures++; - } - } else { - final double lambda = greediness * Math.log(it); - final double alpha = Math.exp(lambda * (xQ - yQ)); - if (Math.random() < alpha) { - x = y; - xQ = yQ; - failures = 0; - } else { - failures++; - } - } - - this.msg(it, xQ); - for (ProgressListener progressListener : this.progressListeners) { - progressListener.notifyCurrentState(x, xQ, yQ); - } - - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionEvaluator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionEvaluator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionEvaluator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionEvaluator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.simulatedannealing; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * the solution type - */ -public interface SolutionEvaluator { - - public boolean feasible(final S solution); - - public double evaluation(final S solution); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionGenerator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionGenerator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionGenerator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/SolutionGenerator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.simulatedannealing; - -/** - * - * @author Gunnar Flötteröd - * - * @param the solution type - */ -public interface SolutionGenerator { - - public S randomGeneration(); - - public S variation(final S original); - - public S copy(final S original); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/TextOutputProgressListener.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/TextOutputProgressListener.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/TextOutputProgressListener.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/simulatedannealing/TextOutputProgressListener.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.simulatedannealing; - -/** - * - * @author Gunnar Flötteröd - * - * @param - */ -public class TextOutputProgressListener implements ProgressListener { - - private int it = 0; - - @Override - public void notifyCurrentState(final S state, - final double currentObjectiveFunction, - final double alternativeObjectiveFunction) { - System.out.println("it. " + (this.it++) + ": f(x) = " - + alternativeObjectiveFunction + ", fOpt(x) = " - + currentObjectiveFunction + ", xOpt = " + state); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/Statistic.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/Statistic.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/Statistic.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/Statistic.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.statisticslogging; - -/** - * - * @author Gunnar Flötteröd - * - * @param D - * the data type from which the statistic is to be extracted - * - */ -public interface Statistic { - - public String label(); - - public String value(D data); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsMultiWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsMultiWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsMultiWriter.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsMultiWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.statisticslogging; - -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * - * @author Gunnar Flötteröd - * - * @param D - * the data type to be logged - */ -public class StatisticsMultiWriter { - - // -------------------- MEMBERS -------------------- - - private Map> fileName2statsWriter = new LinkedHashMap>(); - - private final boolean append; - - // -------------------- CONSTRUCTION AND INITIALIZATION -------------------- - - public StatisticsMultiWriter(final boolean append) { - this.append = append; - } - - // -------------------- SETTERS & GETTERS -------------------- - - public void addStatistic(final String logFileName, - final Statistic statistic) { - StatisticsWriter statsWriter = this.fileName2statsWriter - .get(logFileName); - if (statsWriter == null) { - statsWriter = new StatisticsWriter(logFileName, this.append); - this.fileName2statsWriter.put(logFileName, statsWriter); - } - statsWriter.addSearchStatistic(statistic); - } - - // -------------------- FILE WRITING -------------------- - - public void writeToFile(final D data, - final String... labelOverrideValueSequence) { - for (StatisticsWriter statsWriter : this.fileName2statsWriter - .values()) { - statsWriter.writeToFile(data, labelOverrideValueSequence); - } - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsWriter.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsWriter.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsWriter.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/StatisticsWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.statisticslogging; - -import java.io.BufferedWriter; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * - * @author Gunnar Flötteröd - * - * @param D - * the data type to be logged - */ -public class StatisticsWriter { - - // -------------------- CONSTANTS -------------------- - - private final String fileName; - - private final List> statistics = new ArrayList>(); - - private boolean wroteHeader = false; - - // -------------------- CONSTRUCTION AND INITIALIZATION -------------------- - - public StatisticsWriter(final String fileName, final boolean append) { - this.fileName = fileName; - this.wroteHeader = append; - } - - // -------------------- SETTERS & GETTERS -------------------- - - public void addSearchStatistic(final Statistic statistic) { - this.statistics.add(statistic); - } - - public String getFileName() { - return this.fileName; - } - - // -------------------- FILE WRITING -------------------- - - public void writeToFile(final D data, - final String... labelOverrideValueSequence) { - final Map label2overrideValue = new LinkedHashMap<>(); - if (labelOverrideValueSequence != null) { - for (int i = 0; i < labelOverrideValueSequence.length; i += 2) { - label2overrideValue.put(labelOverrideValueSequence[i], - labelOverrideValueSequence[i + 1]); - } - } - this.writeToFile(data, label2overrideValue); - } - - public void writeToFile(final D data, - final Map label2overrideValue) { - try { - final BufferedWriter writer; - if (!this.wroteHeader) { - writer = new BufferedWriter( - new FileWriter(this.fileName, false)); - for (Statistic stat : this.statistics) { - writer.write(stat.label() + "\t"); - } - writer.newLine(); - this.wroteHeader = true; - } else { - writer = new BufferedWriter(new FileWriter(this.fileName, true)); - } - for (Statistic stat : this.statistics) { - if (label2overrideValue.containsKey(stat.label())) { - writer.write(label2overrideValue.get(stat.label())); - } else { - String value; - try { - value = stat.value(data); - } catch (Exception e) { - value = ""; - } - writer.write(value); - } - writer.write("\t"); - } - writer.newLine(); - writer.flush(); - writer.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/TimeStampStatistic.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/TimeStampStatistic.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/TimeStampStatistic.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/statisticslogging/TimeStampStatistic.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.statisticslogging; - -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class TimeStampStatistic implements Statistic { - - public static final String TIMESTAMP = "Timestamp"; - - private final String label; - - public TimeStampStatistic() { - this.label = TIMESTAMP; - } - - public TimeStampStatistic(final String label) { - this.label = label; - } - - @Override - public String label() { - return TIMESTAMP; - } - - @Override - public String value(final D data) { - return (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(new Date( - System.currentTimeMillis())); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/AbstractTabularFileHandlerWithHeaderLine.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/AbstractTabularFileHandlerWithHeaderLine.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/AbstractTabularFileHandlerWithHeaderLine.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/AbstractTabularFileHandlerWithHeaderLine.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.tabularfileparser; - -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * - * @author Gunnar Flötteröd - * - */ -public abstract class AbstractTabularFileHandlerWithHeaderLine implements - TabularFileHandler { - - // TODO make private - protected final Map label2index = new LinkedHashMap(); - - private boolean parsedFirstRow = false; - - protected int getCurrentRowSize() { - return this.currentRow.length; - } - - protected String getStringValue(final String label) { - return this.currentRow[this.label2index.get(label)]; - } - - protected Integer getIntValue(final String label) { - try { - return Integer - .parseInt(this.currentRow[this.label2index.get(label)]); - } catch (NumberFormatException e) { - return null; - } - } - - protected Double getDoubleValue(final String label) { - try { - return Double.parseDouble(this.currentRow[this.label2index - .get(label)]); - } catch (NumberFormatException e) { - return null; - } - } - - // TODO new and not systematically tested - private String[] currentRow = null; - - @Override - public final void startRow(String[] row) { - this.currentRow = row; - if (!this.parsedFirstRow) { - for (int i = 0; i < row.length; i++) { - this.label2index.put(this.preprocessColumnLabel(row[i]), i); - } - this.parsedFirstRow = true; - } else { - this.startDataRow(row); - this.startCurrentDataRow(); - } - } - - @Override - public void startDocument() { - } - - @Override - public String preprocess(final String line) { - return line; - } - - @Override - public void endDocument() { - } - - protected String preprocessColumnLabel(final String label) { - return label; - } - - protected int index(final String label) { - return this.label2index.get(label); - } - - public void startDataRow(final String[] row) { - } - - // TODO NEW - public void startCurrentDataRow() { - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileHandler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileHandler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileHandler.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileHandler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.tabularfileparser; - -/** - * An implementation of this interface is expected by the - * TabularFileParser for row-by-row handling of parsed files. - * - * @author Gunnar Flötteröd - * - */ -public interface TabularFileHandler { - - public String preprocess(final String line); - - public void startDocument(); - - /** - * Is called by the TabularFileParser whenever a row has been - * parsed - * - * @param row - * a String[] representation of the parsed row's - * columns - */ - public void startRow(String[] row); - - public void endDocument(); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileParser.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileParser.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileParser.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/tabularfileparser/TabularFileParser.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,348 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.tabularfileparser; - -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.List; - -/** - * Parser for plain text files that are structured in columns. - * - * @author Gunnar Flötteröd - * - */ -public class TabularFileParser { - - // -------------------- CLASS VARIABLES -------------------- - - private static final String ANYTHING = ".*"; - - private static final String ANY_SPACE = "\\s*"; - - // -------------------- INSTANCE VARIABLES -------------------- - - private String startRegex = null; - - private String endRegex = null; - - private String commentRegex = null; - - private String delimiterRegex = null; - - private int minRowLength = 0; - - // TODO NEW - private boolean omitEmptyColumns = true; - - // TODO NEW - private String characterEncoding = null; - - // -------------------- CONSTRUCTION -------------------- - - /** - * Empty default constructor. - */ - public TabularFileParser() { - } - - // -------------------- GENERAL CONFIGURATION -------------------- - - public void setMinRowLength(final int minRowLength) { - this.minRowLength = minRowLength; - } - - public int getMinRowLength() { - return this.minRowLength; - } - - // --------------- CONFIGURATION VIA REGULAR EXPRESSIONS --------------- - - /** - * Sets the regular expression that identifies the the first line of the - * file section to be parsed. - * - * @param regex - * the regular expression that identifies the the first line of - * the file section to be parsed - */ - public void setStartRegex(String regex) { - this.startRegex = regex; - } - - public String getStartRegex() { - return startRegex; - } - - /** - * Sets the regular expression that identifies the first line after - * the file section to be parsed. - * - * @param regex - * the regular expression that identifies the first line - * after the file section to be parsed - */ - public void setEndRegex(String regex) { - this.endRegex = regex; - } - - public String getEndRegex() { - return endRegex; - } - - /** - * Sets the regular expression that identifies lines to be ignored during - * parsing. - * - * @param regex - * the regular expression that identifies lines to be ignored - * during parsing - */ - public void setCommentRegex(String regex) { - this.commentRegex = regex; - } - - public String getCommentRegex() { - return commentRegex; - } - - /** - * Sets the regular expression that identifies splitting locations in a - * parsed line. - * - * @param regex - * the regular expression that identifies splitting locations in - * a parsed line - */ - public void setDelimiterRegex(String regex) { - this.delimiterRegex = regex; - } - - public String getDelimiterRegex() { - return delimiterRegex; - } - - // TODO NEW - public void setOmitEmptyColumns(final boolean omitEmptyColumns) { - this.omitEmptyColumns = omitEmptyColumns; - } - - // TODO NEW - public boolean getOmitEmptyColumns() { - return this.omitEmptyColumns; - } - - // TODO NEW - public void setCharacterEncoding(final String characterEncoding) { - this.characterEncoding = characterEncoding; - } - - // TODO NEW - public String getCharacterEncoding() { - return this.characterEncoding; - } - - // -------------------- CONFIGURATION VIA TAGS -------------------- - - private String alternativeExpr(String[] alternatives) { - StringBuffer result = new StringBuffer(); - - if (alternatives != null) - for (int i = 0; i < alternatives.length; i++) { - result.append(quote(alternatives[i])); - if (i < alternatives.length - 1) - result.append("|"); - } - return result.toString(); - } - - private String quote(String expr) { - return "\\Q" + expr + "\\E"; - } - - /** - * Parsing starts with the first occurrence of tag at the - * beginning of a line. - * - * @param tag - * the first line to be parsed begins with this - * String - */ - public void setStartTag(String tag) { - if (tag != null) - startRegex = quote(tag) + ANYTHING; - } - - /** - * Parsing ends with the first occurence of tag at the - * beginning of a line. - * - * @param tag - * the line before which parsing stops begins with this - * String - */ - public void setEndTag(String tag) { - if (tag != null) - endRegex = quote(tag) + ANYTHING; - } - - /** - * All lines that begin with an element in the tags array are - * ignored - * - * @param tags - * an array of line beginnings that are to be ignored - */ - public void setCommentTags(String[] tags) { - commentRegex = alternativeExpr(tags) + ANYTHING; - } - - /** - * A line is split into separate rows wherever the parser encounters an - * element of the tags array, which is be preceded and - * succeeded by zero or more whitespaces. - * - * @param tags - * an array of Strings denoting column delimiters - */ - public void setDelimiterTags(String[] tags) { - if (tags == null || tags.length == 0) - delimiterRegex = null; - else { - // TODO >>>>>>>>>> OLD >>>>>>>>>> - // delimiterRegex = ANY_SPACE + alternativeExpr(tags) + ANY_SPACE; - // TODO >>>>>>>>>> NEW >>>>>>>>>> - delimiterRegex = alternativeExpr(tags); - // TODO <<<<<<<<<< NEW <<<<<<<<<< - } - } - - // -------------------- PARSING -------------------- - - private boolean isStart(String line) { - final String regex = this.startRegex; - if (regex == null) - return true; - else - return line.matches(regex); - } - - private boolean isEnd(String line) { - final String regex = this.endRegex; - if (regex == null) - return false; - else - return line.matches(regex); - } - - private boolean isComment(String line) { - final String regex = this.commentRegex; - if (regex == null) - return false; - else - return line.matches(regex); - } - - private String[] split(String line) { - final String regex = this.delimiterRegex; - if (regex == null) - return new String[] { line }; - else { - final String[] naiveSplit = line.split(regex); - // System.out.println("naiveSplit.length = " + naiveSplit.length); - final List properSplit = new ArrayList( - naiveSplit.length); - for (String c : naiveSplit) { - // if (c != null && c.length() > 0) { - if (!this.omitEmptyColumns || (c != null && c.length() > 0)) { - properSplit.add(c); - } - } - return properSplit.toArray(new String[] {}); - } - } - - /** - * Parses the file. All relevant rows of the file are split into columns and - * then are passed to the handler. - * - * @param file - * name of the file to be parsed - * @param handler - * defines in what way the parsed file is to be treated - * logically - * - * @throws IllegalArgumentException - * if handler is null - * @throws IOException - */ - public void parse(final String file, TabularFileHandler handler) - throws IOException { - - if (handler == null) { - throw new IllegalArgumentException("handler is null"); - } - - boolean started = (this.startRegex == null); - boolean ended = false; - - handler.startDocument(); - - // TODO >>>>> OLD >>>>> - // BufferedReader reader = new BufferedReader(new FileReader(file)); - // TODO >>>>> NEW >>>>> - final BufferedReader reader; - if (this.characterEncoding == null) { - reader = new BufferedReader(new FileReader(file)); - } else { - reader = new BufferedReader(new InputStreamReader( - new FileInputStream(file), this.characterEncoding)); - } - // TODO <<<<< NEW <<<<< - - String line; - while ((line = reader.readLine()) != null && !ended) { - - // TODO >>>>> NEW >>>>> - line = handler.preprocess(line); - // TODO <<<<< NEW <<<<< - - if (started) { - line = line.trim(); - ended = isEnd(line); - if (!ended && !isComment(line)) { - final String[] split = this.split(line); - if (split.length >= this.minRowLength) { - handler.startRow(split); - } - } - } else { - started = isStart(line); - } - } - reader.close(); - - handler.endDocument(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Time.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Time.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Time.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Time.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class Time { - - // -------------------- CLASS VARIABLES -------------------- - - private static final char DEFAULT_SEPARATOR = ':'; - - private static final int SEC_PER_MIN = 60; - - private static final int MIN_PER_HOUR = 60; - - private static final int SEC_PER_HOUR = SEC_PER_MIN * MIN_PER_HOUR; - - // -------------------- PRIVATE CONSTRUCTOR -------------------- - - private Time() { - } - - // -------------------- STRING PARSING -------------------- - - public static int secFromStr(final String timeStr, final char separator) { - if (timeStr.indexOf(separator) < 0) { - return Integer.parseInt(timeStr); - } else { - final String[] elements = timeStr.split("\\Q" + separator + "\\E"); - final int h = Integer.parseInt(elements[0]); - final int m = Integer.parseInt(elements[1]); - final int s = (elements.length > 2) ? Integer.parseInt(elements[2]) - : 0; - return h * SEC_PER_HOUR + m * SEC_PER_MIN + s; - } - } - - public static int secFromStr(String timeStr) { - return secFromStr(timeStr, DEFAULT_SEPARATOR); - } - - // -------------------- STRING FORMATTING -------------------- - - public static String strFromSec(int time_s, final char separator) { - final int h = time_s / 3600; - time_s -= h * 3600; - final int m = time_s / 60; - time_s -= m * 60; - final int s = time_s; - return (h < 10 ? "0" : "") + h + separator + (m < 10 ? "0" : "") + m - + separator + (s < 10 ? "0" : "") + s; - } - - public static String strFromSec(final int time_s) { - return strFromSec(time_s, DEFAULT_SEPARATOR); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Triple.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Triple.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Triple.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Triple.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class Triple { - - // -------------------- MEMBERS -------------------- - - private final Tuple a_b; - - private final C c; - - private final int hashCode; - - // -------------------- CONSTRUCTION -------------------- - - public Triple(final A a, final B b, final C c) { - if (c == null) { - throw new IllegalArgumentException("c is null"); - } - this.a_b = new Tuple(a, b); - this.c = c; - - int hashCode = 1; - hashCode = 31 * hashCode + this.a_b.hashCode(); - hashCode = 31 * hashCode + this.c.hashCode(); - this.hashCode = hashCode; - } - - // -------------------- CONTENT ACCESS -------------------- - - public A getA() { - return a_b.getA(); - } - - public B getB() { - return a_b.getB(); - } - - public C getC() { - return c; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public boolean equals(final Object o) { - try { - if (o == null) { - return false; - } - final Triple other = (Triple) o; - return (this.a_b.equals(other.a_b) && this.c.equals(other.c)); - } catch (ClassCastException e) { - return false; - } - } - - @Override - public int hashCode() { - return this.hashCode; - } - - @Override - public String toString() { - return this.getClass().getSimpleName() + "(" + this.a_b.getA() + ", " - + this.a_b.getB() + ", " + this.c + ")"; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIterator.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIterator.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIterator.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIterator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -/** - * Iterates over all pair-wise combinations of the elements of a given - * collection. This collection must not change during the iteration. - * - * @author Gunnar Flötteröd - * - */ -public class TupleIterator implements Iterator> { - - // -------------------- MEMBERS -------------------- - - private final Collection elements; - - private Iterator firstElementIterator = null; - - private Iterator secondElementIterator = null; - - private E firstElement = null; - - // -------------------- CONSTRUCTION -------------------- - - public TupleIterator(final Collection elements) { - this.elements = elements; - this.firstElementIterator = elements.iterator(); - this.secondElementIterator = elements.iterator(); - if (this.firstElementIterator.hasNext()) { - this.firstElement = this.firstElementIterator.next(); - } - } - - // -------------------- IMPLEMENTATION OF Iterator -------------------- - - @Override - public boolean hasNext() { - // note that this returns false if this.elements is empty - return (this.firstElementIterator.hasNext() || this.secondElementIterator - .hasNext()); - } - - @Override - public Tuple next() { - if (!this.secondElementIterator.hasNext()) { - this.firstElement = this.firstElementIterator.next(); - this.secondElementIterator = this.elements.iterator(); - } - return new Tuple(this.firstElement, - this.secondElementIterator.next()); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - // -------------------- MAIN-FUNCTION, ONLY FOR TESTING -------------------- - - public static void main(String[] args) { - final List elements = Arrays.asList("a", "b", "c"); - for (TupleIterator it = new TupleIterator<>(elements); it - .hasNext();) { - System.out.println(it.next()); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIteratorWithExclusions.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIteratorWithExclusions.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIteratorWithExclusions.java 2018-12-18 09:58:48.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/TupleIteratorWithExclusions.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -/** - * Iterates over all pair-wise combinations of the elements of a given - * collection, apart from a predefined set of excluded tuples. The collection - * must not change during the iteration. - * - * - * @author Gunnar Flötteröd - * - */ -public class TupleIteratorWithExclusions implements Iterator> { - - // -------------------- MEMBERS -------------------- - - private final TupleIterator fullIterator; - - private final Set> exceptions; - - private Tuple next = null; - - // -------------------- CONSTRUCTION -------------------- - - public TupleIteratorWithExclusions(final Collection elements, - Collection> exceptions) { - this.fullIterator = new TupleIterator<>(elements); - this.exceptions = new LinkedHashSet<>(exceptions); - this.advance(); - } - - // -------------------- INTERNALS -------------------- - - private void advance() { - this.next = null; - while ((this.next == null) && this.fullIterator.hasNext()) { - final Tuple candidate = this.fullIterator.next(); - if (!this.exceptions.contains(candidate)) { - this.next = candidate; - } - } - } - - // -------------------- IMPLEMENTATION OF Iterator -------------------- - - @Override - public boolean hasNext() { - return (this.next != null); - } - - @Override - public Tuple next() { - final Tuple result = this.next; - this.advance(); - return result; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - // -------------------- MAIN-FUNCTION, ONLY FOR TESTING -------------------- - - public static void main(String[] args) { - final List elements = Arrays.asList("a", "b", "c"); - final List> exclusions = Arrays.asList( - new Tuple("a", "c"), new Tuple( - "b", "c")); - - for (TupleIteratorWithExclusions it = new TupleIteratorWithExclusions<>( - elements, exclusions); it.hasNext();) { - System.out.println(it.next()); - } - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Tuple.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Tuple.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Tuple.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Tuple.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.io.Serializable; - -/** - * - * @author Gunnar Flötteröd - * - * @param - * @param - */ -public class Tuple implements Serializable { - - // -------------------- MEMBERS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private final A a; - - private final B b; - - private final int hashCode; - - // -------------------- CONSTRUCTION -------------------- - - public Tuple(final A a, final B b) { - if (a == null) { - throw new IllegalArgumentException("a is null"); - } - if (b == null) { - throw new IllegalArgumentException("b is null"); - } - this.a = a; - this.b = b; - - int hashCode = 1; - hashCode = 31 * hashCode + a.hashCode(); - hashCode = 31 * hashCode + b.hashCode(); - this.hashCode = hashCode; - } - - // -------------------- CONTENT ACCESS -------------------- - - public A getA() { - return this.a; - } - - public B getB() { - return this.b; - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public boolean equals(final Object o) { - try { - if (o == null) { - return false; - } - final Tuple other = (Tuple) o; - return (this.a.equals(other.a) && this.b.equals(other.b)); - } catch (ClassCastException e) { - return false; - } - } - - @Override - public int hashCode() { - return this.hashCode; - } - - @Override - public String toString() { - return this.getClass().getSimpleName() + "(" + a + ", " + b + ")"; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Units.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Units.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Units.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/Units.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class Units { - - // --------------------PRIVATE CONSTRUCTION -------------------- - - private Units() { - } - - // -------------------- CONVERSION OF TIME UNITS -------------------- - - public static final double S_PER_H = 3600.0; - - public static final double H_PER_S = 1.0 / S_PER_H; - - public static final double H_PER_D = 24.0; - - public static final double D_PER_H = 1.0 / H_PER_D; - - public static final double S_PER_D = S_PER_H * H_PER_D; - - public static final double D_PER_S = 1 / S_PER_D; - - // TODO NEW - public static final double S_PER_MIN = 60.0; - - // TODO NEW - public static final double MIN_PER_S = 1.0 / S_PER_MIN; - - // TODO NEW - public static final double MIN_PER_H = 60.0; - - // TODO NEW - public static final double H_PER_MIN = 1.0 / MIN_PER_H; - - // -------------------- CONVERSION OF LENGTH UNITS -------------------- - - public static final double M_PER_KM = 1000.0; - - public static final double KM_PER_M = 1 / M_PER_KM; - - // -------------------- CONVERSION OF FLOW UNITS -------------------- - - public static final double VEH_H_PER_VEH_S = 1.0 / H_PER_S; - - public static final double VEH_S_PER_VEH_H = 1.0 / S_PER_H; - - // -------------------- CONVERSION OF DENSITY UNITS -------------------- - - public static final double VEH_KM_PER_VEH_M = 1.0 / KM_PER_M; - - public static final double VEH_M_PER_VEH_KM = 1.0 / M_PER_KM; - - // -------------------- CONVERSION OF VELOCITY UNITS -------------------- - - public static final double M_S_PER_KM_H = M_PER_KM / S_PER_H; - - public static final double KM_H_PER_M_S = KM_PER_M / H_PER_S; - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/AbstractRenderer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/AbstractRenderer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/AbstractRenderer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/AbstractRenderer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Graphics2D; -import java.awt.geom.AffineTransform; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -abstract class AbstractRenderer { - - // -------------------- CONSTANTS -------------------- - - private final VisConfig visConfig; - - private final VisNetwork net; - - // -------------------- MEMBERS -------------------- - - private NetJComponent component; - - private AbstractRenderer prev; - - // -------------------- CONSTRUCTION -------------------- - - AbstractRenderer(final VisConfig visConfig, final VisNetwork net) { - this.visConfig = visConfig; - this.net = net; - this.component = null; - this.prev = null; - } - - // -------------------- IMPLEMENTATION -------------------- - - void append(final AbstractRenderer rendererBelow) { - if (this.prev == null) { - this.prev = rendererBelow; - } else { - this.prev.append(rendererBelow); - } - } - - void render(final Graphics2D display, final AffineTransform boxTransform) { - if (this.prev != null) { - this.prev.render(display, boxTransform); - } - if (this.component != null) { - myRendering(display, boxTransform); - } - } - - void setComponent(final NetJComponent component) { - if (this.prev != null) { - this.prev.setComponent(component); - } - this.component = component; - } - - NetJComponent getComponent() { - return this.component; - } - - VisConfig getVisConfig() { - return visConfig; - } - - VisNetwork getNetwork() { - return this.net; - } - - // -------------------- INTERFACE DEFINITION -------------------- - - abstract void myRendering(final Graphics2D display, - final AffineTransform boxTransform); - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/BackgroundRenderer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/BackgroundRenderer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/BackgroundRenderer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/BackgroundRenderer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Color; -import java.awt.Font; -import java.awt.Graphics2D; -import java.awt.Rectangle; -import java.awt.geom.AffineTransform; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class BackgroundRenderer extends AbstractRenderer { - - // -------------------- CONSTRUCTION -------------------- - - BackgroundRenderer(final VisConfig visConfig, final VisNetwork net) { - super(visConfig, net); - } - - // -------------------- RENDERING -------------------- - - @Override - void myRendering(Graphics2D display, AffineTransform boxTransform) { - - Rectangle visRect = getComponent().getVisibleRect(); - - display.setBackground(Color.WHITE); - display.clearRect(visRect.x, visRect.y, visRect.width, visRect.height); - - final String logo = getVisConfig().getLogo(); - if (logo != null && logo.length() > 0) { - - int targetLogoHeight = visRect.height * 8 / 10; - int targetLogoWidth = visRect.width * 9 / 10; - - display.setFont(new Font(display.getFont().getName(), Font.BOLD, - targetLogoHeight)); - int trueLogoWidth = display.getFontMetrics().stringWidth(logo); - - double scaling = Math.min((double) targetLogoWidth / trueLogoWidth, - 1); - - int scaledLogoHeight = (int) Math.round(scaling * targetLogoHeight); - display.setFont(new Font(display.getFont().getName(), Font.PLAIN, - scaledLogoHeight)); - int scaledLogoWidth = display.getFontMetrics().stringWidth(logo); - - display.setColor(Color.LIGHT_GRAY); - - int xCoord = visRect.x + (visRect.width - scaledLogoWidth) / 2; - int yCoord = visRect.y + (visRect.height + scaledLogoHeight) / 2; - - display.drawString(logo, xCoord, yCoord); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ControlToolbar.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ControlToolbar.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ControlToolbar.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ControlToolbar.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,349 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.awt.event.KeyEvent; -import java.io.IOException; -import java.text.MessageFormat; -import java.util.Timer; - -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JFormattedTextField; -import javax.swing.JLabel; -import javax.swing.JSpinner; -import javax.swing.JTextField; -import javax.swing.JToolBar; -import javax.swing.SpinnerNumberModel; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import floetteroed.utilities.Time; - - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class ControlToolbar extends JToolBar implements ActionListener, ItemListener, - ChangeListener { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private static final String TO_START = "to_start"; - // private static final String STEP_BB = "step_bb"; - private static final String STEP_B = "step_b"; - private static final String PLAY = "play"; - private static final String STEP_F = "step_f"; - // private static final String STEP_FF = "step_ff"; - private static final String TO_END = "to_end"; - private static final String ZOOM_IN = "zoom_in"; - private static final String ZOOM_OUT = "zoom_out"; - private static final String SET_TIME = "set_time"; - - private static final String TOGGLE_NODE_LABELS = "node labels"; - private static final String TOGGLE_LINK_LABELS = "link labels"; - private static final String TOGGLE_ANTIALIAS = "anti-alias"; - - private static final String PRINT = "print"; - - private final NetVis vis; - - private final RenderableDynamicData data; - - private final VisConfig visConfig; - - // -------------------- MEMBERS -------------------- - - private Timer movieTimer = null; - - private JButton playButton = null; - - private JFormattedTextField timeField = null; - - private double scale = 1; - - // -------------------- CONSTRUCTION -------------------- - - ControlToolbar(final NetVis viz, final RenderableDynamicData data, - final VisConfig visConfig) { - - super(); - this.vis = viz; - this.data = data; - this.visConfig = visConfig; - - if (this.data != null) { - this.add(this.createButton("|<", TO_START)); - // add(createButton("<<", STEP_BB)); - this.add(this.createButton("<", STEP_B)); - this.playButton = this.createButton("PLAY", PLAY); - this.add(this.playButton); - this.add(createButton(">", STEP_F)); - // add(createButton(">>", STEP_FF)); - this.add(createButton(">|", TO_END)); - - this.timeField = new JFormattedTextField(new MessageFormat( - "{0,number,00}-{1,number,00}-{2,number,00}")); - this.timeField.setMaximumSize(new Dimension(75, 30)); - this.timeField.setActionCommand(SET_TIME); - this.timeField.setHorizontalAlignment(JTextField.CENTER); - add(timeField); - this.timeField.addActionListener(this); - } - - this.add(this.createButton("--", ZOOM_OUT)); - this.add(this.createButton("+", ZOOM_IN)); - this.add(this.createButton("PRN", PRINT)); - - final JCheckBox nodeLabelBox = new JCheckBox(TOGGLE_NODE_LABELS); - nodeLabelBox.setMnemonic(KeyEvent.VK_N); - nodeLabelBox.setSelected(visConfig.getShowNodeLabels()); - nodeLabelBox.addItemListener(this); - this.add(nodeLabelBox); - - final JCheckBox linkLabelBox = new JCheckBox(TOGGLE_LINK_LABELS); - linkLabelBox.setMnemonic(KeyEvent.VK_L); - linkLabelBox.setSelected(visConfig.getShowLinkLabels()); - linkLabelBox.addItemListener(this); - this.add(linkLabelBox); - - final JCheckBox AABox = new JCheckBox(TOGGLE_ANTIALIAS); - AABox.setMnemonic(KeyEvent.VK_A); - AABox.setSelected(false); - AABox.addItemListener(this); - this.add(AABox); - - final SpinnerNumberModel model = new SpinnerNumberModel(new Integer( - this.visConfig.getLinkWidthFactor()), new Integer(0), - new Integer(2000), new Integer(1)); - JLabel l = new JLabel("link width"); - this.add(l); - JSpinner spin = new JSpinner(model); - l.setLabelFor(spin); - this.add(spin); - spin.setMaximumSize(new Dimension(75, 30)); - spin.addChangeListener(this); - } - - private JButton createButton(final String display, - final String actionCommand) { - final JButton button; - button = new JButton(); - button.setActionCommand(actionCommand); - button.addActionListener(this); - button.setText(display); - return button; - } - - // -------------------- SETTERS & GETTERS -------------------- - - void setScale(double scale) { - this.scale = scale; - } - - double getScale() { - return scale; - } - - // -------------------- IMPLEMENTATION -------------------- - - private void updateTimeLabel() { - if (data != null) { - final int time_s = data.getStartTime_s() + data.currentBin() - * data.getBinSize_s(); - timeField.setText(Time.strFromSec(time_s)); - } - } - - void repaintForMovie() { - this.updateTimeLabel(); - } - - // -------------------- OVERRIDING OF JComponent -------------------- - - @Override - public void paint(Graphics g) { - if (data != null) - updateTimeLabel(); - super.paint(g); - } - - // ---------- IMPLEMENTATION OF ActionListener INTERFACE ---------- - - private void stopMovie() { - if (this.movieTimer != null) { - this.movieTimer.cancel(); - this.movieTimer = null; - this.playButton.setText("PLAY"); - } - } - - private void pressed_TO_START() throws IOException { - stopMovie(); - this.data.toStart(); - } - - // private void pressed_STEP_BB() throws IOException { - // stopMovie(); - // reader.toTimeStep(reader.getCurrentTime_s() - SKIP - // * reader.timeStepLength_s()); - // } - - private void pressed_STEP_B() throws IOException { - stopMovie(); - this.data.bwd(); - } - - private void pressed_PLAY() { - if (this.movieTimer == null) { - this.movieTimer = new Timer(); - MoviePlayer moviePlayer = new MoviePlayer(this.data, this.vis); - this.movieTimer.schedule(moviePlayer, 0, - this.visConfig.getDelay_ms()); - this.playButton.setText("STOP"); - } else - stopMovie(); - } - - private void pressed_STEP_F() throws IOException { - stopMovie(); - this.data.fwd(); - } - - // private void pressed_STEP_FF() throws IOException { - // stopMovie(); - // reader.toTimeStep(reader.getCurrentTime_s() + SKIP - // * reader.timeStepLength_s()); - // } - - private void pressed_TO_END() throws IOException { - stopMovie(); - this.data.toEnd(); - } - - private void pressed_ZOOM_OUT() { - this.scale /= 1.42; - this.vis.scaleNetwork(this.scale); - } - - private void pressed_ZOOM_IN() { - this.scale *= 1.42; - this.vis.scaleNetwork(this.scale); - } - - private void pressed_PRINT() { - (new Printer(this.vis.networkComponent(), this.vis.networkScrollPane() - .getViewport())).run(); - } - - private void changed_SET_TIME(final ActionEvent event) throws IOException { - final String newTime = ((JFormattedTextField) event.getSource()) - .getText(); - stopMovie(); - this.data.toTime(Time.secFromStr(newTime)); - } - - @Override - public void actionPerformed(ActionEvent event) { - final String command = event.getActionCommand(); - try { - if (TO_START.equals(command)) { - this.pressed_TO_START(); - // } else if (STEP_BB.equals(command)) { - // pressed_STEP_BB(); - } else if (STEP_B.equals(command)) { - this.pressed_STEP_B(); - } else if (PLAY.equals(command)) { - this.pressed_PLAY(); - } else if (STEP_F.equals(command)) { - this.pressed_STEP_F(); - // } else if (STEP_FF.equals(command)) { - // pressed_STEP_FF(); - } else if (TO_END.equals(command)) { - this.pressed_TO_END(); - } else if (ZOOM_OUT.equals(command)) { - this.pressed_ZOOM_OUT(); - } else if (ZOOM_IN.equals(command)) { - this.pressed_ZOOM_IN(); - } else if (PRINT.equals(command)) { - this.pressed_PRINT(); - } else if (command.equals(SET_TIME)) { - this.changed_SET_TIME(event); - } - } catch (IOException e) { - System.err.println("ControlToolbar encountered problem: " + e); - } - updateTimeLabel(); - repaint(); - this.vis.paintNow(); - } - - // -------------------- IMPLEMENTATION OF ItemListener -------------------- - - @Override - public void itemStateChanged(final ItemEvent e) { - final JCheckBox source = (JCheckBox) e.getItemSelectable(); - if (source.getText().equals(TOGGLE_NODE_LABELS)) { - if (e.getStateChange() == ItemEvent.DESELECTED) { - this.visConfig.setShowNodeLabels(false); - } else { - this.visConfig.setShowNodeLabels(true); - } - } else if (source.getText().equals(TOGGLE_LINK_LABELS)) { - if (e.getStateChange() == ItemEvent.DESELECTED) { - this.visConfig.setShowLinkLabels(false); - } else { - this.visConfig.setShowLinkLabels(true); - } - } else if (source.getText().equals(TOGGLE_ANTIALIAS)) { - if (e.getStateChange() == ItemEvent.DESELECTED) { - this.visConfig.setUseAntiAliasing(false); - } else { - this.visConfig.setUseAntiAliasing(true); - } - } - repaint(); - this.vis.paintNow(); - } - - // -------------------- IMPLEMENTATION OF ItemListener -------------------- - - @Override - public void stateChanged(final ChangeEvent e) { - final JSpinner spinner = (JSpinner) e.getSource(); - int i = ((SpinnerNumberModel) spinner.getModel()).getNumber() - .intValue(); - this.visConfig.setLinkWidthFactor(i); - repaint(); - this.vis.paintNow(); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LabelRenderer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LabelRenderer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LabelRenderer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LabelRenderer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Color; -import java.awt.Font; -import java.awt.Graphics2D; -import java.awt.geom.AffineTransform; -import java.awt.geom.Point2D; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class LabelRenderer extends AbstractRenderer { - - // -------------------- CONSTANTS -------------------- - - private final VisNetwork network; - - private final int textHeight = 12; - - // -------------------- CONSTRUCTION -------------------- - - LabelRenderer(final VisConfig visConfig, final VisNetwork network) { - super(visConfig, network); - this.network = network; - } - - // -------------------- RENDERING -------------------- - - void myRendering(final Graphics2D display, - final AffineTransform boxTransform) { - - final AffineTransform originalTransform = display.getTransform(); - final NetJComponent comp = getComponent(); - - /* - * (1) node labels - */ - if (getVisConfig().getShowNodeLabels()) { - for (VisNode node : this.network.getNodes()) { - final double x = node.getEasting(); - final double y = node.getNorthing(); - if (comp.checkViewClip(x, y) != 5) { - continue; - } - Point2D point = new Point2D.Double(x, y); - AffineTransform nodeTransform = new AffineTransform( - boxTransform); - nodeTransform.transform(point, point); - nodeTransform = new AffineTransform(originalTransform); - nodeTransform.translate(point.getX(), point.getY()); - display.setTransform(nodeTransform); - display.setFont(new Font(display.getFont().getName(), - Font.PLAIN, textHeight)); - display.setColor(Color.BLACK); - final String label = node.getId().toString(); - if (label != null && !"".equals(label)) { - display.drawString(label, 0, 0); - } - } - } - display.setTransform(originalTransform); - - /* - * (2) link labels - */ - if (getVisConfig().getShowLinkLabels()) { - for (VisLink link : this.network.getLinks()) { - final double startEasting = link.getFromNode().getEasting(); - final double startNorthing = link.getFromNode().getNorthing(); - final double endEasting = link.getToNode().getEasting(); - final double endNorthing = link.getToNode().getNorthing(); - double xpos = startEasting + (endEasting - startEasting) * .42; - double ypos = startNorthing + (endNorthing - startNorthing) - * .42; - if (comp.checkViewClip(xpos, ypos) != 5) { - continue; - } - final Point2D point = new Point2D.Double(xpos, ypos); - final AffineTransform linkTransform = new AffineTransform( - boxTransform); - linkTransform.transform(point, point); - final AffineTransform linkTransform2 = new AffineTransform( - originalTransform); - linkTransform2.translate(point.getX(), point.getY()); - double dx = endEasting - startEasting; - double dy = endNorthing - startNorthing; - double theta = Math.atan2(dx, dy); - if (theta <= 0) { - linkTransform2.rotate(theta + Math.PI / 2.); - } else { - linkTransform2.rotate(theta - Math.PI / 2.); - } - display.setTransform(linkTransform2); - display.setFont(new Font(display.getFont().getName(), - Font.PLAIN, textHeight)); - display.setColor(Color.BLACK); - final String label = link.getId().toString(); - if (label != null && !"".equals(label)) { - final int textWidth = display.getFontMetrics().stringWidth( - label); - final int yoffset = (theta <= 0) ? (int) -textHeight / 2 - : (int) textHeight; - display.drawString(label, (int) -textWidth / 2, yoffset); - } - } - } - - display.setTransform(originalTransform); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkDataIO.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkDataIO.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkDataIO.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkDataIO.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import floetteroed.utilities.DynamicDataXMLFileIO; -import floetteroed.utilities.networks.construction.AbstractLink; -import floetteroed.utilities.networks.construction.AbstractNetwork; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -public class LinkDataIO, NET extends AbstractNetwork> - extends DynamicDataXMLFileIO { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private final NET net; - - // -------------------- CONSTRUCTION -------------------- - - public LinkDataIO(final NET net) { - this.net = net; - } - - // ---------- IMPLEMENTATION OF DynamicDataXMLFileIO INTERFACE ---------- - - @Override - protected L attrValue2key(final String linkID) { - return this.net.getLink(linkID); - } - - @Override - protected String key2attrValue(final L link) { - return link.getId().toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkRenderer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkRenderer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkRenderer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/LinkRenderer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,137 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.BasicStroke; -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.geom.AffineTransform; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class LinkRenderer extends AbstractRenderer { - - // -------------------- CONSTANTS -------------------- - - private final ValueColorizer colorizer; - - private final RenderableDynamicData data; - - // -------------------- CONSTRUCTION -------------------- - - LinkRenderer(final VisConfig visConfig, final VisNetwork network, - final RenderableDynamicData data) { - super(visConfig, network); - this.data = data; - this.colorizer = new ValueColorizer(visConfig.getColorDef()); - } - - // -------------------- RENDERING -------------------- - - @Override - synchronized void myRendering(final Graphics2D display, - final AffineTransform boxTransform) { - this.drawLinks(true, display, boxTransform); - this.drawLinks(false, display, boxTransform); - } - - private void drawLinks(final boolean zeros, final Graphics2D display, - final AffineTransform boxTransform) { - - final double laneWidth = 4.0 * getVisConfig().getLinkWidthFactor(); - final AffineTransform originalTransform = display.getTransform(); - display.setStroke(new BasicStroke(Math.round(0.05 * laneWidth))); - - final NetJComponent comp = getComponent(); - - for (VisLink link : this.getNetwork().getLinks()) { - if (link.getVisible()) { - - final Double value = (this.data == null ? null : this.data - .getCurrentValue(link)); - - if ((value == null) || ((value != 0.0) && !zeros) - || ((value == 0.0) && zeros)) { - - /* - * (1) prepare the rendering - */ - final double startEasting = link.getFromNode().getEasting(); - final double startNorthing = link.getFromNode() - .getNorthing(); - final double endEasting = link.getToNode().getEasting(); - final double endNorthing = link.getToNode().getNorthing(); - if (!comp.checkLineInClip(startEasting, startNorthing, - endEasting, endNorthing)) { - continue; - } - if (startEasting == endEasting - && startNorthing == endNorthing) { - continue; - } - AffineTransform linkTransform = new AffineTransform( - originalTransform); - linkTransform.concatenate(boxTransform); - linkTransform.concatenate(link.getTransform()); - /* - * (2) do the rendering - */ - display.setTransform(linkTransform); - final int lanes; - if (this.getVisConfig().getMultiLane()) { - lanes = link.getLanes(); - } else { - lanes = 1; - } - final int linkLength_m = (int) Math.round(link - .getLength_m()); - final int cellWidth_m = (int) Math.round(laneWidth * lanes); - int cellStart_m = 0; - // if (data != null) { - // final double value = this.data.getCurrentValue(link); - // display.setColor(colorizer.getColor(value)); - // } else { - // display.setColor(Color.WHITE); - // } - if (value != null) { - display.setColor(colorizer.getColor(value)); - } else { - display.setColor(Color.WHITE); - } - display.fillRect(cellStart_m, -cellWidth_m, linkLength_m, - cellWidth_m); - display.setColor(Color.BLACK); - display.drawRect(cellStart_m, -cellWidth_m, linkLength_m, - cellWidth_m); - - } - - } - - } - - display.setTransform(originalTransform); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MATSim2VisNetwork.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MATSim2VisNetwork.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MATSim2VisNetwork.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MATSim2VisNetwork.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import static java.lang.Double.parseDouble; -import static java.lang.Math.max; -import static java.lang.Math.min; -import floetteroed.utilities.networks.construction.NetworkPostprocessor; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -public class MATSim2VisNetwork implements NetworkPostprocessor { - - // -------------------- CONSTANTS -------------------- - - public static final String EASTING_ATTRIBUTE = "x"; - - public static final String NORTHING_ATTRIBUTE = "y"; - - public static final String LANES_ATTRIBUTE = "permlanes"; - - public static final String LENGTH_ATTRIBUTE = "length"; - - public static final String CAPPERIOD_ATTRIBUTE = "capperiod"; - - public static final String CAPACITY_PER_CAPPERIOD_ATTRIBUTE = "capacity"; - - // -------------------- CONSTRUCTION -------------------- - - public MATSim2VisNetwork() { - } - - // -------------------- IMPLEMENTATION -------------------- - - @Override - public void run(final VisNetwork network) { - - // final double capperiod_s = Time.secFromStr(network - // .getLinksAttr(CAPPERIOD_ATTRIBUTE)); - - network.setMinEasting(Double.POSITIVE_INFINITY); - network.setMaxEasting(Double.NEGATIVE_INFINITY); - network.setMinNorthing(Double.POSITIVE_INFINITY); - network.setMaxNorthing(Double.NEGATIVE_INFINITY); - - for (VisNode node : network.getNodes()) { - node.setEasting(parseDouble(node.getAttr(EASTING_ATTRIBUTE))); - node.setNorthing(parseDouble(node.getAttr(NORTHING_ATTRIBUTE))); - network.setMinEasting(min(network.getMinEasting(), - node.getEasting())); - network.setMaxEasting(max(network.getMaxEasting(), - node.getEasting())); - network.setMinNorthing(min(network.getMinNorthing(), - node.getNorthing())); - network.setMaxNorthing(max(network.getMaxNorthing(), - node.getNorthing())); - } - - for (VisLink link : network.getLinks()) { - link.setLanes((int) Math.round(Double.parseDouble(link - .getAttr(LANES_ATTRIBUTE)))); - link.setLength_m(Double.parseDouble(link.getAttr(LENGTH_ATTRIBUTE))); - // final double cap_veh_s = Double.parseDouble(link - // .getAttr(CAPACITY_PER_CAPPERIOD_ATTRIBUTE)) / capperiod_s; - // link.setVisible(true); - link.setVisible(link.getLength_m() > 1); - // linkData.setTransform(NetVis.newLinear2PlaneTransform(link, - // result.getVisNodeData(link.getFromNode()), - // result.getVisNodeData(link.getToNode()), - // linkData.getLength_m())); - link.setTransform(NetVis.newLinear2PlaneTransform(link)); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MoviePlayer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MoviePlayer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MoviePlayer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/MoviePlayer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.util.TimerTask; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class MoviePlayer extends TimerTask { - - // -------------------- CONSTANTS -------------------- - - private final RenderableDynamicData data; - - private final NetVis vis; - - // -------------------- CONSTRUCTION -------------------- - - MoviePlayer(final RenderableDynamicData data, final NetVis viz) { - this.data = data; - this.vis = viz; - } - - // -------------------- IMPLEMENTATION OF TimerTask -------------------- - - public void run() { - this.data.fwd(); - this.vis.repaintForMovie(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetJComponent.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetJComponent.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetJComponent.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetJComponent.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,265 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; -import java.awt.Toolkit; -import java.awt.geom.AffineTransform; -import java.awt.geom.Point2D; - -import javax.swing.JComponent; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class NetJComponent extends JComponent { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private static final double BORDER_FACTOR = 0.0; - - private final AbstractRenderer networkRenderer; - - private final VisConfig visconfig; - - private final int frameDefaultWidth; - - private final int frameDefaultHeight; - - private double viewMinX, viewMinY, viewMaxX, viewMaxY; - - // -------------------- MEMBERS -------------------- - - // -------------------- CONSTRUCTION -------------------- - - NetJComponent(final AbstractRenderer networkRenderer, - final VisConfig visconfig) { - this.networkRenderer = networkRenderer; - this.visconfig = visconfig; - - // calculate size of frame - final Dimension screenSize = Toolkit.getDefaultToolkit() - .getScreenSize(); - double factor = (double) screenSize.getWidth() / networkClippingWidth(); - factor = (double) Math.min(factor, screenSize.getHeight() - / networkClippingHeight()); - factor *= 0.8; - this.frameDefaultWidth = (int) Math.floor(networkClippingWidth() - * factor); - this.frameDefaultHeight = (int) Math.floor(networkClippingHeight() - * factor); - - this.scale(1.0); - this.setViewClipCoords(0, 0, 1, 1); - } - - // -------------------- IMPLEMENTATION -------------------- - - void setViewClipCoords(final double minX, final double minY, - final double maxX, final double maxY) { - this.viewMinX = this.networkClippingMinEasting() + minX - * this.networkClippingWidth(); - this.viewMaxX = this.networkClippingMinEasting() + maxX - * this.networkClippingWidth(); - this.viewMinY = this.networkClippingMinNorthing() + (1.0 - maxY) - * this.networkClippingHeight(); - this.viewMaxY = this.networkClippingMinNorthing() + (1.0 - minY) - * this.networkClippingHeight(); - } - - void moveViewClipCoords(final double deltaX, final double deltaY) { - this.viewMinX += deltaX * this.networkClippingWidth(); - this.viewMaxX += deltaX * this.networkClippingWidth(); - this.viewMinY -= deltaY * this.networkClippingHeight(); - this.viewMaxY -= deltaY * this.networkClippingHeight(); - } - - /*- - * returns something like this - * 0 1 2 - * 4 5 6 - * 8 9 10 - * where 5 means the cord is IN the clipping region - */ - int checkViewClip(final double x, final double y) { - final int xquart = x < viewMinX ? 0 : x > viewMaxX ? 2 : 1; - final int yquart = y < viewMinY ? 0 : y > viewMaxY ? 2 : 1; - return xquart + 4 * yquart; - } - - boolean checkLineInClip(final double sx, final double sy, final double ex, - final double ey) { - final int qstart = checkViewClip(sx, sy); - final int qend = checkViewClip(ex, ey); - // both in same sector, that is not middle sector - if ((qstart == qend) && qstart != 5) { - return false; - } - // both are either left or right and not in the middle - if ((qstart % 4) == (qend % 4) && (qstart % 4) != 1) { - return false; - } - // both are either top or bottom but not in the middle - if ((qstart / 4) == (qend / 4) && (qstart / 4) != 1) { - return false; - } - return true; // all other cases are possibly visible - } - - void scale(final double factor) { - if (factor > 0) { - final int scaledWidth = (int) Math.round(factor - * this.frameDefaultWidth); - final int scaledHeight = (int) Math.round(factor - * this.frameDefaultHeight); - this.setPreferredSize(new Dimension(scaledWidth, scaledHeight)); - } - } - - // -------------------- COORDINATE TRANSFORMATION -------------------- - - // computes some fixed border around linear networks - private double additionalBorder() { - return 0.1 * Math.max(this.networkRenderer.getNetwork().getMaxEasting() - - this.networkRenderer.getNetwork().getMinEasting(), - this.networkRenderer.getNetwork().getMaxNorthing() - - this.networkRenderer.getNetwork().getMinNorthing()); - } - - private double networkClippingEastingBorder() { - return Math - .max(1, - BORDER_FACTOR - * (this.networkRenderer.getNetwork() - .getMaxEasting() - this.networkRenderer - .getNetwork().getMinEasting())) - + additionalBorder(); - } - - private double networkClippingNorthingBorder() { - return Math - .max(1, - BORDER_FACTOR - * (this.networkRenderer.getNetwork() - .getMaxNorthing() - this.networkRenderer - .getNetwork().getMinNorthing())) - + additionalBorder(); - } - - private double networkClippingMinEasting() { - return this.networkRenderer.getNetwork().getMinEasting() - - this.networkClippingEastingBorder(); - } - - private double networkClippingMaxEasting() { - return this.networkRenderer.getNetwork().getMaxEasting() - + this.networkClippingEastingBorder(); - } - - private double networkClippingMinNorthing() { - return this.networkRenderer.getNetwork().getMinNorthing() - - this.networkClippingNorthingBorder(); - } - - private double networkClippingMaxNorthing() { - return this.networkRenderer.getNetwork().getMaxNorthing() - + this.networkClippingNorthingBorder(); - } - - private double networkClippingWidth() { - return this.networkClippingMaxEasting() - - this.networkClippingMinEasting(); - } - - private double networkClippingHeight() { - return this.networkClippingMaxNorthing() - - this.networkClippingMinNorthing(); - } - - private AffineTransform getBoxTransform() { - - // two original extreme coordinates ... - - final double v1 = networkClippingMinEasting(); - final double w1 = networkClippingMinNorthing(); - - final double v2 = networkClippingMaxEasting(); - final double w2 = networkClippingMaxNorthing(); - - // ... mapped onto two extreme picture coordinates ... - - final Dimension prefSize = this.getPreferredSize(); - - final double x1 = 0; - final double y1 = (int) prefSize.getHeight(); - - final double x2 = (int) prefSize.getWidth(); - final double y2 = 0; - - // ... yields a simple affine transformation without shearing: - - final double m00 = (x1 - x2) / (v1 - v2); - final double m02 = x1 - m00 * v1; - - final double m11 = (y1 - y2) / (w1 - w2); - final double m12 = y1 - m11 * w1; - - return new AffineTransform(m00, 0.0, 0.0, m11, m02, m12); - } - - Point2D.Double getNetCoord(final double x, final double y) { - final Point2D.Double result = new Point2D.Double(); - final Dimension prefSize = getPreferredSize(); - result.x = x / prefSize.width; - result.y = 1. - y / prefSize.height; - result.x *= this.networkRenderer.getNetwork().getMaxEasting() - - this.networkRenderer.getNetwork().getMinEasting(); - result.y *= this.networkRenderer.getNetwork().getMaxNorthing() - - this.networkRenderer.getNetwork().getMinNorthing(); - result.x += this.networkRenderer.getNetwork().getMinEasting(); - result.y += this.networkRenderer.getNetwork().getMinNorthing(); - return result; - } - - // -------------------- OVERRIDING OF JComponent -------------------- - - public void paint(final Graphics g) { - final Graphics2D g2 = (Graphics2D) g; - if (this.visconfig.getUseAntiAliasing()) { - g2.addRenderingHints(new RenderingHints( - RenderingHints.KEY_ANTIALIASING, - RenderingHints.VALUE_ANTIALIAS_ON)); - } else { - g2.addRenderingHints(new RenderingHints( - RenderingHints.KEY_ANTIALIASING, - RenderingHints.VALUE_ANTIALIAS_OFF)); - } - this.networkRenderer.render(g2, getBoxTransform()); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetvisFromFileRunner.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetvisFromFileRunner.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetvisFromFileRunner.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetvisFromFileRunner.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,240 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import static floetteroed.utilities.networks.containerloaders.MATSimNetworkContainerLoader.MATSIM_NETWORK_TYPE; -import static floetteroed.utilities.networks.containerloaders.OpenStreetMapNetworkContainerLoader.OPENSTREETMAP_NETWORK_TYPE; -import static floetteroed.utilities.networks.containerloaders.SUMONetworkContainerLoader.SUMO_NETWORK_TYPE; - -import java.awt.FileDialog; -import java.awt.Frame; - -import floetteroed.utilities.DynamicData; -import floetteroed.utilities.ErrorMsgPrinter; -import floetteroed.utilities.config.Config; -import floetteroed.utilities.config.ConfigReader; -import floetteroed.utilities.networks.construction.NetworkContainer; -import floetteroed.utilities.networks.construction.NetworkPostprocessor; -import floetteroed.utilities.networks.containerloaders.MATSimNetworkContainerLoader; -import floetteroed.utilities.networks.containerloaders.OpenStreetMapNetworkContainerLoader; -import floetteroed.utilities.networks.containerloaders.SUMONetworkContainerLoader; - - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -public class NetvisFromFileRunner { - - // -------------------- CONSTANTS -------------------- - - public static final String NETVISCONFIG_ELEMENT = "config"; - - public static final String NETWORKTYPE_ELEMENT = "networktype"; - - // consistent with bioroute.networkloader.AbstractNetworkLoader - public static final String NETWORKFILENAME_ELEMENT = "networkfile"; - - // consistent with bioroute.networkloader.SUMONetworkLoader - public static final String NODEFILE_ELEMENT = "nodefile"; - - // consistent with bioroute.networkloader.SUMONetworkLoader - public static final String EDGEFILE_ELEMENT = "edgefile"; - - // consistent with bioroute.networkloader.SUMONetworkLoader - public static final String CONNECTIONFILE_ELEMENT = "connectionfile"; - - public static final String COLOR_ELEMENT = "color"; - - public static final String DELAY_ELEMENT = "delay"; - - public static final String LINKDATAFILE_ELEMENT = "linkdatafile"; - - public static final String LINKWIDTH_ELEMENT = "linkwidth"; - - public static final String LOGO_ELEMENT = "logo"; - - public static final String MULTILANE_ELEMENT = "multilane"; - - public static final String SHOWLINKLABELS_ELEMENT = "showlinklabels"; - - public static final String SHOWNODELABELS_ELEMENT = "shownodelabels"; - - public static final String ANTIALIASING_ELEMENT = "antialiasing"; - - // -------------------- CONSTRUCTION -------------------- - - protected NetvisFromFileRunner() { - // do not instantiate from outside - } - - protected void run(final String[] args) { - - try { - - /* - * (1) obtain absolute name of config file - */ - final String configFile; - if (args.length == 0) { - final FileDialog fileDialog = new FileDialog(new Frame(), - "Select visualization configuration file."); - fileDialog.setMode(FileDialog.LOAD); - fileDialog.setVisible(true); - if (fileDialog.getFile() == null) { - return; - } - configFile = (fileDialog.getDirectory() == null ? "" - : fileDialog.getDirectory()) + fileDialog.getFile(); - } else { - configFile = args[0]; - } - - /* - * (2) load configuration and network container - */ - final Config config = (new ConfigReader()).read(configFile); - final String netType = config.get(NETVISCONFIG_ELEMENT, - NETWORKTYPE_ELEMENT); - final NetworkContainer container; - if (OPENSTREETMAP_NETWORK_TYPE.equals(netType)) { - container = (new OpenStreetMapNetworkContainerLoader()) - .load(config.absolutePath(config.get( - NETVISCONFIG_ELEMENT, NETWORKFILENAME_ELEMENT))); - } else if (MATSIM_NETWORK_TYPE.equals(netType)) { - container = (new MATSimNetworkContainerLoader()).load(config - .absolutePath(config.get(NETVISCONFIG_ELEMENT, - NETWORKFILENAME_ELEMENT))); - } else if (SUMO_NETWORK_TYPE.equals(netType)) { - final String nodeFile = config.absolutePath(config.get( - NETVISCONFIG_ELEMENT, NODEFILE_ELEMENT)); - final String edgeFile = config.absolutePath(config.get( - NETVISCONFIG_ELEMENT, EDGEFILE_ELEMENT)); - String connectionFile = config.get(NETVISCONFIG_ELEMENT, - CONNECTIONFILE_ELEMENT); - if (connectionFile != null) { - connectionFile = config.absolutePath(connectionFile); - } - container = (new SUMONetworkContainerLoader()) - .loadNetworkContainer(nodeFile, edgeFile, - connectionFile); - } else { - container = this.loadUnknownNetworkContainer(netType, config); - if (container == null) { - throw new IllegalArgumentException("unknown network type"); - } - } - - /* - * (3) create network data structure - */ - final VisNetworkFactory factory = new VisNetworkFactory(); - - if (MATSimNetworkContainerLoader.MATSIM_NETWORK_TYPE - .equals(container.getNetworkType())) { - factory.setNetworkPostprocessor(new MATSim2VisNetwork()); - } else if (OpenStreetMapNetworkContainerLoader.OPENSTREETMAP_NETWORK_TYPE - .equals(container.getNetworkType())) { - factory.setNetworkPostprocessor(new OpenStreetMap2VisNetwork()); - } else if (SUMONetworkContainerLoader.SUMO_NETWORK_TYPE - .equals(container.getNetworkType())) { - factory.setNetworkPostprocessor(new SUMO2VisNetwork()); - } else { - final NetworkPostprocessor postprocessor = this - .getUnknownNetworkPostprocessorHook(); - if (postprocessor != null) { - factory.setNetworkPostprocessor(postprocessor); - } else { - throw new RuntimeException("unknown network type: " - + container.getNetworkType()); - } - } - - final VisNetwork net = factory.newNetwork(container); - - /* - * (4) move data into the "old" vis configuration class - */ - final VisConfig visConfig = new VisConfig(); - visConfig.setColorDef(config.get(NETVISCONFIG_ELEMENT, - COLOR_ELEMENT)); - visConfig.setDelay_ms(Integer.parseInt(config.get( - NETVISCONFIG_ELEMENT, DELAY_ELEMENT))); - if (config.containsKeys(NETVISCONFIG_ELEMENT, LINKDATAFILE_ELEMENT)) { - visConfig.setLinkDataFile(config.absolutePath(config.get( - NETVISCONFIG_ELEMENT, LINKDATAFILE_ELEMENT))); - } - visConfig.setLinkWidthFactor(Integer.parseInt(config.get( - NETVISCONFIG_ELEMENT, LINKWIDTH_ELEMENT))); - visConfig.setLogo(config.get(NETVISCONFIG_ELEMENT, LOGO_ELEMENT)); - visConfig.setMultiLane(Boolean.parseBoolean(config.get( - NETVISCONFIG_ELEMENT, MULTILANE_ELEMENT))); - visConfig.setShowLinkLabels(Boolean.parseBoolean(config.get( - NETVISCONFIG_ELEMENT, SHOWLINKLABELS_ELEMENT))); - visConfig.setShowLinkLabels(Boolean.parseBoolean(config.get( - NETVISCONFIG_ELEMENT, SHOWNODELABELS_ELEMENT))); - visConfig.setUseAntiAliasing(Boolean.parseBoolean(config.get( - NETVISCONFIG_ELEMENT, ANTIALIASING_ELEMENT))); - - /* - * (4) load link data - */ - final RenderableDynamicData renderData; - if (visConfig.getLinkDataFile() != null) { - final LinkDataIO linkDataLoader = new LinkDataIO( - net); - final DynamicData linkData = linkDataLoader - .read(visConfig.getLinkDataFile()); - renderData = new RenderableDynamicData(linkData); - } else { - renderData = null; - } - - /* - * (5) display - */ - final NetVis vis = new NetVis(visConfig, net, renderData); - vis.run(); - - } catch (Exception e) { - ErrorMsgPrinter.toStdOut(e); - ErrorMsgPrinter.toErrOut(e); - } - } - - protected NetworkContainer loadUnknownNetworkContainer( - final String networkType, final Config config) { - return null; - } - - protected NetworkPostprocessor getUnknownNetworkPostprocessorHook() { - return null; - } - - // -------------------- MAIN FUNCTION -------------------- - - public static void main(String[] args) { - final NetvisFromFileRunner runner = new NetvisFromFileRunner(); - runner.run(args); - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVis.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVis.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVis.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVis.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,222 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.geom.AffineTransform; - -import javax.swing.JFrame; -import javax.swing.SwingUtilities; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -public class NetVis { - - // -------------------- MEMBERS -------------------- - - private JFrame vizFrame; - - private NetVisScrollPane networkScrollPane; - - private NetJComponent networkComponent; - - private ControlToolbar buttonComponent; - - // -------------------- CONSTRUCTION -------------------- - - public NetVis(final VisConfig visConfig, final VisNetwork net, - final RenderableDynamicData data) { - - /* - * (1) create renderers - */ - final AbstractRenderer linkSetRenderer = new LinkRenderer(visConfig, - net, data); - final AbstractRenderer backgroundRenderer = new BackgroundRenderer( - visConfig, net); - final NodeRenderer nodeSetRenderer = new NodeRenderer(visConfig, net); - final AbstractRenderer mainRenderer = new LabelRenderer(visConfig, net); - mainRenderer.append(linkSetRenderer); - linkSetRenderer.append(nodeSetRenderer); - nodeSetRenderer.append(backgroundRenderer); - - /* - * (2) create frame - */ - this.vizFrame = new JFrame(net.getId()); - this.vizFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JFrame.setDefaultLookAndFeelDecorated(true); - - /* - * (3) create control bar - */ - this.buttonComponent = new ControlToolbar(this, data, visConfig); - this.vizFrame.getContentPane().add(this.buttonComponent, - BorderLayout.NORTH); - - /* - * (4) create drawing area - */ - this.networkComponent = new NetJComponent(mainRenderer, visConfig); - mainRenderer.setComponent(this.networkComponent); - this.networkScrollPane = new NetVisScrollPane(this.networkComponent); - this.vizFrame.getContentPane().add(this.networkScrollPane, - BorderLayout.CENTER); - final NetVisMouseHandler mouseHandler = new NetVisMouseHandler(this); - this.networkScrollPane.addMouseMotionListener(mouseHandler); - this.networkScrollPane.addMouseListener(mouseHandler); - this.networkScrollPane.getViewport().addChangeListener(mouseHandler); - } - - // -------------------- IMPLEMENTATION ------------------------- - - void scaleNetwork(double scale) { - this.networkScrollPane.scaleNetwork((float) scale); - } - - void repaintForMovie() { - this.networkComponent.repaint(); - this.buttonComponent.repaintForMovie(); - } - - Component networkComponent() { - return this.networkComponent; - } - - NetVisScrollPane networkScrollPane() { - return this.networkScrollPane; - } - - ControlToolbar buttonComponent() { - return this.buttonComponent; - } - - public void paintNow() { - if (this.vizFrame != null) - SwingUtilities.invokeLater(new Runnable() { - public void run() { - vizFrame.paint(vizFrame.getGraphics()); - } - }); - } - - public void run() { - this.vizFrame.pack(); - this.vizFrame.setVisible(true); - } - - // -------------------- STATIC IMPLEMENTATION -------------------- - - // TODO should probably move this elsewhere - - /* - * maps (x,y) onto world coordinates, where x is distance from this link's - * startPoint and y is a normal shift to this link. - * - * this transform allows to draw anything "from left to right" onto the link - * without having to worry about the link's true direction. - */ - static AffineTransform newLinear2PlaneTransform(double offset_m, - double displayedLength_m, double startEasting, - double startNorthing, double endEasting, double endNorthing, - double length_m) { - - // 3. translate link onto original position - double tx = startEasting; - double ty = startNorthing; - AffineTransform result = AffineTransform.getTranslateInstance(tx, ty); - - // 2. rotate link into original direction - double dx = endEasting - startEasting; - double dy = endNorthing - startNorthing; - double theta = Math.atan2(dy, dx); - result.rotate(theta); - - // 1. scale link - double sx = displayedLength_m / length_m; - double sy = 1; - result.scale(sx, sy); - - // 0. translate link by target offset - tx = offset_m * length_m / displayedLength_m; - ty = 0; - result.translate(tx, ty); - - // result = 3.translate o 2.rotate o 1.scale o 0.translate - return result; - } - - public static AffineTransform newLinear2PlaneTransform(final VisLink link) { - - final double startEasting = link.getFromNode().getEasting(); - final double startNorthing = link.getFromNode().getNorthing(); - final double endEasting = link.getToNode().getEasting(); - final double endNorthing = link.getToNode().getNorthing(); - - final double deltaNorthing = endNorthing - startNorthing; - final double deltaEasting = endEasting - startEasting; - double result = deltaNorthing * deltaNorthing; - result += deltaEasting * deltaEasting; - double nodeDist_m = Math.sqrt(result); - - double offset_m = 0; // 5; - double length_m = nodeDist_m - 2.0 * offset_m; - if (length_m <= 0) { - length_m = nodeDist_m / 2.0; - offset_m = (nodeDist_m - length_m) / 2.0; - } - return NetVis.newLinear2PlaneTransform(offset_m, length_m, - startEasting, startNorthing, endEasting, endNorthing, - link.getLength_m()); - } - - // static AffineTransform newLinear2PlaneTransform(final BasicLink link, - // final VisNodeData fromNodeData, final VisNodeData toNodeData, - // final double lengthAttribute_m) { - // - // final double startEasting = fromNodeData.getEasting(); - // final double startNorthing = fromNodeData.getNorthing(); - // final double endEasting = toNodeData.getEasting(); - // final double endNorthing = toNodeData.getNorthing(); - // - // final double deltaNorthing = endNorthing - startNorthing; - // final double deltaEasting = endEasting - startEasting; - // double result = deltaNorthing * deltaNorthing; - // result += deltaEasting * deltaEasting; - // double nodeDist_m = Math.sqrt(result); - // - // double offset_m = 0; // 5; - // double length_m = nodeDist_m - 2.0 * offset_m; - // if (length_m <= 0) { - // length_m = nodeDist_m / 2.0; - // offset_m = (nodeDist_m - length_m) / 2.0; - // } - // return newLinear2PlaneTransform(offset_m, length_m, startEasting, - // startNorthing, endEasting, endNorthing, lengthAttribute_m); - // } - - // -------------------- MAIN - FUNCTION -------------------- - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisMouseHandler.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisMouseHandler.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisMouseHandler.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisMouseHandler.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.event.MouseEvent; - -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.event.MouseInputAdapter; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class NetVisMouseHandler extends MouseInputAdapter implements ChangeListener { - - // -------------------- CONSTANTS -------------------- - - private final NetVis netVis; - - // -------------------- MEMBERS -------------------- - - private Point start = null; - - private Rectangle currentRect = null; - - private int button = 0; - - // -------------------- CONSTRUCTION -------------------- - - NetVisMouseHandler(final NetVis netVis) { - this.netVis = netVis; - } - - // --------------------OVERRIDING OF MouseInputAdapter -------------------- - - void updateSize(final MouseEvent e) { - this.currentRect = new Rectangle(this.start); - this.currentRect.add(e.getX(), e.getY()); - this.netVis.networkScrollPane().getGraphics().drawRect( - this.currentRect.x, this.currentRect.y, this.currentRect.width, - this.currentRect.height); - this.netVis.networkScrollPane().repaint(); - } - - @Override - public void mousePressed(final MouseEvent e) { - int x = e.getX(); - int y = e.getY(); - this.button = e.getButton(); - this.start = new Point(x, y); - } - - @Override - public void mouseDragged(final MouseEvent e) { - if (this.button == MouseEvent.BUTTON1) { - this.updateSize(e); - } else if (this.button == MouseEvent.BUTTON2) { - int deltax = this.start.x - e.getX(); - int deltay = this.start.y - e.getY(); - this.start.x = e.getX(); - this.start.y = e.getY(); - this.netVis.networkScrollPane().moveNetwork(deltax, deltay); - } - } - - @Override - public void mouseReleased(final MouseEvent e) { - if (this.button == MouseEvent.BUTTON1) { - updateSize(e); - if ((this.currentRect.getHeight() > 10) - && (this.currentRect.getWidth() > 10)) { - double scale = this.netVis.buttonComponent().getScale(); - scale = this.netVis.networkScrollPane().scaleNetwork( - this.currentRect, scale); - this.netVis.buttonComponent().setScale(scale); - } - this.currentRect = null; - } - this.button = 0; - } - - // --------------- IMPLEMENTATION OF ChangeListener --------------- - - @Override - public void stateChanged(ChangeEvent e) { - this.netVis.networkScrollPane().updateViewClipRect(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisScrollPane.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisScrollPane.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisScrollPane.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NetVisScrollPane.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Dimension; -import java.awt.Point; -import java.awt.Rectangle; - -import javax.swing.JScrollPane; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class NetVisScrollPane extends JScrollPane { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - private final NetJComponent networkComponent; - - // -------------------- CONSTRUCTION -------------------- - - NetVisScrollPane(final NetJComponent networkComponent) { - super(networkComponent); - this.networkComponent = networkComponent; - } - - // -------------------- IMPLEMENTATION -------------------- - - void updateViewClipRect() { - final Dimension prefSize = this.networkComponent.getPreferredSize(); - final Rectangle rect = getViewport().getViewRect(); - double relX = (double) rect.getX() / prefSize.getWidth(); - double relY = (double) rect.getY() / prefSize.getHeight(); - this.networkComponent.setViewClipCoords(relX, relY, relX - + (double) rect.getWidth() / prefSize.getWidth(), relY - + (double) rect.getHeight() / prefSize.getHeight()); - } - - void moveNetwork(final int deltax, final int deltay) { - final Rectangle rect = getViewport().getViewRect(); - rect.setLocation(rect.x + deltax, rect.y + deltay); - this.getViewport().scrollRectToVisible(rect); - this.getViewport().setViewPosition(rect.getLocation()); - } - - double scaleNetwork(final Rectangle destrect, double factor) { - final Dimension prefSize = this.networkComponent.getPreferredSize(); - final Rectangle rect = getViewport().getViewRect(); - final double relX = (destrect.getX() + rect.getX()) - / prefSize.getWidth(); - final double relY = (destrect.getY() + rect.getY()) - / prefSize.getHeight(); - factor *= Math.min((double) rect.width / destrect.width, - (double) rect.height / destrect.height); - this.networkComponent.scale(factor); - this.networkComponent.revalidate(); - final Dimension prefSize2 = this.networkComponent.getPreferredSize(); - this.networkComponent.setViewClipCoords(relX, relY, relX - + (double) rect.getWidth() / prefSize2.getWidth(), relY - + (double) rect.getHeight() / prefSize2.getHeight()); - final Point result = new Point(); - result.x = (int) (relX * prefSize2.getWidth()); - result.y = (int) (relY * prefSize2.getHeight()); - rect.setLocation(result.x, result.y); - this.getViewport().scrollRectToVisible(rect); - this.getViewport().setViewPosition(result); - this.getViewport().toViewCoordinates(result); - this.revalidate(); - this.repaint(); - return factor; - } - - void scaleNetwork(final double factor) { - final Dimension prefSize = this.networkComponent.getPreferredSize(); - final Rectangle rect = this.getViewport().getViewRect(); - final double relX = rect.getX() / prefSize.getWidth(); - final double relY = rect.getY() / prefSize.getHeight(); - this.networkComponent.scale(factor); - this.networkComponent.revalidate(); - final Dimension prefSize2 = this.networkComponent.getPreferredSize(); - this.networkComponent.setViewClipCoords(relX, relY, relX - + (double) rect.getWidth() / prefSize2.getWidth(), relY - + (double) rect.getHeight() / prefSize2.getHeight()); - rect.x = (int) (relX * prefSize2.getWidth() + 0.5 * (rect.getWidth() * (prefSize2 - .getWidth() - / prefSize.getWidth() - 1.))); - rect.y = (int) (relY * prefSize2.getHeight() + 0.5 * (rect.getHeight() * (prefSize2 - .getHeight() - / prefSize.getHeight() - 1.))); - this.getViewport().setViewPosition(rect.getLocation()); - this.revalidate(); - this.repaint(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NodeRenderer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NodeRenderer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NodeRenderer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/NodeRenderer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.BasicStroke; -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.geom.AffineTransform; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class NodeRenderer extends AbstractRenderer { - - // -------------------- MEMBERS -------------------- - - private boolean renderNodes = false; - - // -------------------- CONSTRUCTION -------------------- - - NodeRenderer(final VisConfig visConfig, final VisNetwork network) { - super(visConfig, network); - } - - void setRenderNodes(final boolean renderNodes) { - this.renderNodes = renderNodes; - } - - // -------------------- RENDERING -------------------- - - @Override - synchronized void myRendering(final Graphics2D display, - final AffineTransform boxTransform) { - - if (!this.renderNodes) { - return; - } - - final double laneWidth = 4.0 * getVisConfig().getLinkWidthFactor(); - final NetJComponent comp = getComponent(); - final AffineTransform originalTransform = display.getTransform(); - display.setStroke(new BasicStroke(Math.round(0.05 * laneWidth))); - - AffineTransform nodeTransform = new AffineTransform(originalTransform); - nodeTransform.concatenate(boxTransform); - display.setTransform(nodeTransform); - - for (VisNode node : this.getNetwork().getNodes()) { - - final double x = node.getEasting(); - final double y = node.getNorthing(); - - if (!comp.checkLineInClip(x, y, x, y)) { - continue; - } - - display.setColor(Color.WHITE); - display.fillOval((int) (x - laneWidth), (int) (y - laneWidth), - (int) (2.0 * laneWidth), (int) (2.0 * laneWidth)); - - display.setColor(Color.BLACK); - display.drawOval((int) (x - laneWidth), (int) (y - laneWidth), - (int) (2.0 * laneWidth), (int) (2.0 * laneWidth)); - } - - display.setTransform(originalTransform); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/OpenStreetMap2VisNetwork.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/OpenStreetMap2VisNetwork.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/OpenStreetMap2VisNetwork.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/OpenStreetMap2VisNetwork.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.geom.Point2D; -import java.util.HashMap; -import java.util.Map; - -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.networks.construction.AbstractNetwork; -import floetteroed.utilities.networks.construction.AbstractNode; -import floetteroed.utilities.networks.construction.NetworkPostprocessor; - - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -public class OpenStreetMap2VisNetwork implements NetworkPostprocessor { - - // -------------------- CONSTANTS -------------------- - - public static final double EARTHRADIUS_M = 6378137; - - public static final String NODE_LONGITUDE_ATTRIBUTE = "lon"; - - public static final String NODE_LATITUDE_ATTRIBUTE = "lat"; - - // -------------------- CONSTRUCTION -------------------- - - public OpenStreetMap2VisNetwork() { - } - - // -------------------- IMPLEMENTATION -------------------- - - @Override - public void run(final VisNetwork network) { - - /* - * (1) extract Euclidean node coordinates - */ - final Map node2xy = node2xy(network); - - /* - * (2) add node attributes and identify network size - */ - double minEasting = Double.POSITIVE_INFINITY; - double maxEasting = Double.NEGATIVE_INFINITY; - double minNorthing = Double.POSITIVE_INFINITY; - double maxNorthing = Double.NEGATIVE_INFINITY; - for (Map.Entry entry : node2xy.entrySet()) { - final double easting = entry.getValue().x; - final double northing = entry.getValue().y; - final VisNode node = entry.getKey(); - node.setEasting(easting); - node.setNorthing(northing); - minEasting = Math.min(minEasting, easting); - maxEasting = Math.max(maxEasting, easting); - minNorthing = Math.min(minNorthing, northing); - maxNorthing = Math.max(maxNorthing, northing); - } - network.setMinEasting(minEasting); - network.setMaxEasting(maxEasting); - network.setMinNorthing(minNorthing); - network.setMaxNorthing(maxNorthing); - - /* - * (3) add link attributes - */ - for (VisLink link : network.getLinks()) { - final VisNode from = link.getFromNode(); - final VisNode to = link.getToNode(); - - link.setLength_m(MathHelpers.length(from.getEasting(), - from.getNorthing(), to.getEasting(), to.getNorthing())); - link.setLanes(1); - link.setVisible(true); - link.setTransform(NetVis.newLinear2PlaneTransform(link)); - } - } - - // ----- STATIC IMPLEMENTATION OF GENERIC OPENSTREETMAP FUNCTIONALITY ----- - - public static , NET extends AbstractNetwork> Map node2LonLat( - final NET network) { - final Map result = new HashMap(); - for (N node : network.getNodes()) { - final double lon = Double.parseDouble(node - .getAttr(NODE_LONGITUDE_ATTRIBUTE)); - final double lat = Double.parseDouble(node - .getAttr(NODE_LATITUDE_ATTRIBUTE)); - result.put(node, new Point2D.Double(lon, lat)); - } - return result; - } - - public static > Point2D.Double min( - final Map node2pnt) { - double minX = Double.POSITIVE_INFINITY; - double minY = Double.POSITIVE_INFINITY; - for (Map.Entry entry : node2pnt.entrySet()) { - minX = Math.min(minX, entry.getValue().x); - minY = Math.min(minY, entry.getValue().y); - } - return new Point2D.Double(minX, minY); - } - - public static > Point2D.Double max( - final Map node2pnt) { - double maxX = Double.NEGATIVE_INFINITY; - double maxY = Double.NEGATIVE_INFINITY; - for (Map.Entry entry : node2pnt.entrySet()) { - maxX = Math.max(maxX, entry.getValue().x); - maxY = Math.max(maxY, entry.getValue().y); - } - return new Point2D.Double(maxX, maxY); - } - - public static > Map node2xy( - final Map node2LonLat) { - final Map result = new HashMap(); - /* - * (1) find extreme latitude and longitude - */ - final Point2D.Double minLonLat = min(node2LonLat); - final double minLon = minLonLat.x; - final double minLat = minLonLat.y; - /* - * (2) project node coordinates onto plane; find extreme coordinates - */ - for (N node : node2LonLat.keySet()) { - final double easting = EARTHRADIUS_M - * Math.tan((node2LonLat.get(node).x - minLon) * Math.PI - / 180.0); - final double northing = EARTHRADIUS_M - * Math.tan((node2LonLat.get(node).y - minLat) * Math.PI - / 180.0); - result.put(node, new Point2D.Double(easting, northing)); - } - return result; - } - - public static Map node2xy(final VisNetwork network) { - return node2xy(node2LonLat(network)); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/Printer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/Printer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/Printer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/Printer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Rectangle; -import java.awt.print.PageFormat; -import java.awt.print.Printable; -import java.awt.print.PrinterException; -import java.awt.print.PrinterJob; - -import javax.swing.JViewport; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class Printer implements Printable { - - // -------------------- CONSTANTS -------------------- - - private final Component frame; - - private final JViewport viewPort; - - // -------------------- CONSTRUCTION -------------------- - - Printer(final Component frame, final JViewport viewPort) { - this.frame = frame; - this.viewPort = viewPort; - } - - // -------------------- IMPLEMENTATION -------------------- - - void run() { - final PrinterJob job = PrinterJob.getPrinterJob(); - job.setPrintable(this); - final boolean ok = job.printDialog(); - if (ok) { - try { - job.print(); - } catch (PrinterException ex) { - // job did not print for some reason - } - } - } - - // -------------------- IMPLEMENTATION OF Printable -------------------- - - public int print(final Graphics g, final PageFormat pf, final int page) - throws PrinterException { - - if (page > 0) { - return NO_SUCH_PAGE; - } - - final Graphics2D g2d = (Graphics2D) g; - final Rectangle viewRect = this.viewPort.getViewRect(); - final double scale = Math.min(pf.getWidth() / viewRect.width, pf - .getHeight() - / viewRect.height); - g2d.scale(scale, scale); - g2d.translate(pf.getImageableX() - viewRect.x, pf.getImageableY() - - viewRect.y); - - this.frame.printAll(g); - return PAGE_EXISTS; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/RenderableDynamicData.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/RenderableDynamicData.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/RenderableDynamicData.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/RenderableDynamicData.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import floetteroed.utilities.DynamicData; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -public class RenderableDynamicData extends DynamicData { - - // -------------------- CONSTANTS -------------------- - - private static final long serialVersionUID = 1L; - - // -------------------- MEMBERS -------------------- - - private int bin = 0; - - // -------------------- CONSTRUCTION -------------------- - - public RenderableDynamicData(int startTime_s, int binSize_s, int binCnt) { - super(startTime_s, binSize_s, binCnt); - this.bin = 0; - } - - public RenderableDynamicData(final DynamicData data) { - this(data.getStartTime_s(), data.getBinSize_s(), data.getBinCnt()); - for (K key : data.keySet()) { - for (int bin = 0; bin < data.getBinCnt(); bin++) { - this.put(key, bin, data.getBinValue(key, bin)); - } - } - } - - // -------------------- IMPLEMENTATION -------------------- - - int currentBin() { - return this.bin; - } - - void toStart() { - this.bin = 0; - } - - void toEnd() { - this.bin = this.getBinCnt() - 1; - } - - void toTime(final int time_s) { - this.bin = bin(time_s); - if (this.bin < 0) { - this.bin = 0; - } else if (this.bin >= this.getBinCnt()) { - this.bin = this.getBinCnt() - 1; - } - } - - void fwd() { - this.bin++; - if (this.bin >= this.getBinCnt()) { - this.bin = 0; - } - } - - void bwd() { - this.bin--; - if (this.bin < 0) { - this.bin = this.getBinCnt() - 1; - } - } - - double getCurrentValue(final K key) { - return this.getBinValue(key, this.bin); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/SUMO2VisNetwork.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/SUMO2VisNetwork.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/SUMO2VisNetwork.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/SUMO2VisNetwork.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import static java.lang.Double.parseDouble; -import static java.lang.Math.max; -import static java.lang.Math.min; -import floetteroed.utilities.math.MathHelpers; -import floetteroed.utilities.networks.construction.NetworkPostprocessor; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -public class SUMO2VisNetwork implements NetworkPostprocessor { - - // -------------------- CONSTANTS -------------------- - - public static final String X_ATTRIBUTE = "x"; - - public static final String Y_ATTRIBUTE = "y"; - - public static final String NOLANES_ATTRIBUTE = "nolanes"; - - // -------------------- CONSTRUCTION -------------------- - - public SUMO2VisNetwork() { - } - - // -------------------- IMPLEMENTATION -------------------- - - @Override - public void run(final VisNetwork network) { - - network.setMinEasting(Double.POSITIVE_INFINITY); - network.setMaxEasting(Double.NEGATIVE_INFINITY); - network.setMinNorthing(Double.POSITIVE_INFINITY); - network.setMaxNorthing(Double.NEGATIVE_INFINITY); - - for (VisNode node : network.getNodes()) { - node.setEasting(parseDouble(node.getAttr(X_ATTRIBUTE))); - node.setNorthing(parseDouble(node.getAttr(Y_ATTRIBUTE))); - network.setMinEasting(min(network.getMinEasting(), - node.getEasting())); - network.setMaxEasting(max(network.getMaxEasting(), - node.getEasting())); - network.setMinNorthing(min(network.getMinNorthing(), - node.getNorthing())); - network.setMaxNorthing(max(network.getMaxNorthing(), - node.getNorthing())); - } - - for (VisLink link : network.getLinks()) { - link.setLanes((int) Math.round(Double.parseDouble(link - .getAttr(NOLANES_ATTRIBUTE)))); - link.setLength_m(MathHelpers.length( - link.getFromNode().getEasting(), link.getFromNode() - .getNorthing(), link.getToNode().getEasting(), link - .getToNode().getNorthing())); - link.setVisible(true); - link.setTransform(NetVis.newLinear2PlaneTransform(link)); - } - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ValueColorizer.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ValueColorizer.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ValueColorizer.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/ValueColorizer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.Color; - -/** - * The entire utilitis.visualization package is experimental! - * - * @author Gunnar Flötteröd - * - */ -class ValueColorizer { - - // -------------------- CONSTANTS -------------------- - - private double[] values; - - private Color[] colors; - - // -------------------- CONSTRUCTION -------------------- - - ValueColorizer(final String colordef) { - try { - final String[] colordefs = colordef.trim().split("\\s"); - this.values = new double[colordefs.length / 2]; - this.colors = new Color[colordefs.length / 2]; - for (int i = 0; i < colordefs.length / 2; i++) { - this.colors[i] = (Color) Color.class.getField(colordefs[2 * i]) - .get(null); - this.values[i] = Double.parseDouble(colordefs[1 + 2 * i]); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - // -------------------- IMPLEMENTATION -------------------- - - private int upperIndex(final double val) { - int result = 0; - while (this.values[result] < val && result < this.values.length - 1) { - result++; - } - return result; - - } - - private int bound(final double x) { - return (int) Math.max(0, Math.min(Math.round(x), 255)); - } - - Color getColor(final double value) { - final int u = upperIndex(value); - if (u == 0) { - return this.colors[0]; - } else { - final double w = (value - this.values[u - 1]) - / (this.values[u] - this.values[u - 1]); - final int r = bound(w * this.colors[u].getRed() + (1 - w) - * this.colors[u - 1].getRed()); - final int g = bound(w * this.colors[u].getGreen() + (1 - w) - * this.colors[u - 1].getGreen()); - final int b = bound(w * this.colors[u].getBlue() + (1 - w) - * this.colors[u - 1].getBlue()); - return (new Color(r, g, b)); - } - } - - // -------------------- OVERRIDING OF Object -------------------- - - @Override - public String toString() { - final StringBuffer result = new StringBuffer(); - for (int i = 0; i < this.values.length; i++) { - result.append(this.colors[i].toString()); - result.append(" "); - result.append(this.values[i]); - result.append(" "); - } - return result.toString(); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisConfig.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisConfig.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisConfig.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisConfig.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import org.xml.sax.helpers.DefaultHandler; - -/** - * The entire utilitis.visualization package is experimental! - * - * TODO This class should disappear in favor of something that is more - * consistent with the utilities.config package. - * - * @author Gunnar Flötteröd - * - */ -public class VisConfig extends DefaultHandler { - - // -------------------- MEMBERS -------------------- - - private String logo = ""; - - private int delay_ms = 1000; - - private int linkWidthFactor = 1; - - private boolean showNodeLabels = false; - - private boolean showLinkLabels = false; - - private boolean useAntiAliasing = false; - - private String colorDef = "BLUE -1 WHITE 0 GREEN 0.1 YELLOW 0.3 RED 1"; - - private String linkDataFile = null; - - private boolean multiLane = false; - - // -------------------- CONSTRUCTION -------------------- - - public VisConfig() { - } - - // -------------------- SETTERS AND GETTERS -------------------- - - public void setLogo(final String logo) { - this.logo = logo; - } - - public String getLogo() { - return this.logo; - } - - public void setDelay_ms(final int delay_ms) { - this.delay_ms = delay_ms; - } - - public int getDelay_ms() { - return this.delay_ms; - } - - public void setLinkWidthFactor(final int linkWidthFactor) { - this.linkWidthFactor = linkWidthFactor; - } - - public int getLinkWidthFactor() { - return this.linkWidthFactor; - } - - public void setShowNodeLabels(final boolean showNodeLabels) { - this.showNodeLabels = showNodeLabels; - } - - public boolean getShowNodeLabels() { - return this.showNodeLabels; - } - - public void setShowLinkLabels(final boolean showLinkLabels) { - this.showLinkLabels = showLinkLabels; - } - - public boolean getShowLinkLabels() { - return this.showLinkLabels; - } - - public void setUseAntiAliasing(final boolean useAntiAliasing) { - this.useAntiAliasing = useAntiAliasing; - } - - public boolean getUseAntiAliasing() { - return this.useAntiAliasing; - } - - public void setColorDef(final String colorDef) { - this.colorDef = colorDef; - } - - public String getColorDef() { - return this.colorDef; - } - - public void setLinkDataFile(final String linkDataFile) { - this.linkDataFile = linkDataFile; - } - - public String getLinkDataFile() { - return this.linkDataFile; - } - - public void setMultiLane(final boolean multiLane) { - this.multiLane = multiLane; - } - - public boolean getMultiLane() { - return this.multiLane; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisLink.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisLink.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisLink.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisLink.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import java.awt.geom.AffineTransform; - -import floetteroed.utilities.networks.construction.AbstractLink; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class VisLink extends AbstractLink { - - // -------------------- MEMBERS -------------------- - - private int lanes; - - private double length_m; - - private boolean visible; - - private AffineTransform transform; - - // -------------------- CONSTRUCTION -------------------- - - public VisLink(String id) { - super(id); - } - - // -------------------- WRITE ACCESS -------------------- - - public void setLanes(final int lanes) { - this.lanes = lanes; - } - - public void setLength_m(final double length_m) { - this.length_m = length_m; - } - - public void setVisible(final boolean visible) { - this.visible = visible; - } - - public void setTransform(final AffineTransform transform) { - this.transform = transform; - } - - // -------------------- READ ACCESS -------------------- - - int getLanes() { - return this.lanes; - } - - double getLength_m() { - return this.length_m; - } - - boolean getVisible() { - return this.visible; - } - - AffineTransform getTransform() { - return this.transform; - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetworkFactory.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetworkFactory.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetworkFactory.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetworkFactory.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import floetteroed.utilities.networks.construction.AbstractNetworkFactory; -import floetteroed.utilities.networks.construction.NetworkContainer; -import floetteroed.utilities.networks.containerloaders.MATSimNetworkContainerLoader; -import floetteroed.utilities.networks.containerloaders.OpenStreetMapNetworkContainerLoader; -import floetteroed.utilities.networks.containerloaders.SUMONetworkContainerLoader; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class VisNetworkFactory extends - AbstractNetworkFactory { - - @Override - protected VisNetwork newNetwork(final String id, final String type) { - return new VisNetwork(id, type); - } - - @Override - protected VisNode newNode(final String id) { - return new VisNode(id); - } - - @Override - protected VisLink newLink(final String id) { - return new VisLink(id); - } - -// @Override -// public VisNetwork newNetwork(final NetworkContainer container) { -// -// final VisNetwork result = super.newNetwork(container); -// -// if (MATSimNetworkContainerLoader.MATSIM_NETWORK_TYPE.equals(result.getType())) { -// (new MATSim2VisNetwork()).run(result); -// } else if (OpenStreetMapNetworkContainerLoader.OPENSTREETMAP_NETWORK_TYPE -// .equals(result.getType())) { -// (new OpenStreetMap2VisNetwork()).run(result); -// } else if (SUMONetworkContainerLoader.SUMO_NETWORK_TYPE.equals(result -// .getType())) { -// (new SUMO2VisNetwork()).run(result); -// } else { -// throw new RuntimeException("unknown network type: " -// + result.getType()); -// } -// -// return result; -// } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetwork.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetwork.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetwork.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNetwork.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import floetteroed.utilities.networks.construction.AbstractNetwork; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class VisNetwork extends AbstractNetwork { - - // -------------------- MEMBERS -------------------- - - private double minEasting; - - private double maxEasting; - - private double minNorthing; - - private double maxNorthing; - - // private final Map nodeData = new - // HashMap(); - - // private final Map linkData = new - // HashMap(); - - // -------------------- CONSTRUCTION -------------------- - - public VisNetwork(String id, String type) { - super(id, type); - } - - // -------------------- WRITE ACCESS -------------------- - - public void setMinEasting(final double minEasting) { - this.minEasting = minEasting; - } - - public void setMaxEasting(final double maxEasting) { - this.maxEasting = maxEasting; - } - - public void setMinNorthing(final double minNorthing) { - this.minNorthing = minNorthing; - } - - public void setMaxNorthing(final double maxNorthing) { - this.maxNorthing = maxNorthing; - } - - // -------------------- READ ACCESS -------------------- - - public double getMinEasting() { - return this.minEasting; - } - - public double getMaxEasting() { - return this.maxEasting; - } - - public double getMinNorthing() { - return this.minNorthing; - } - - public double getMaxNorthing() { - return this.maxNorthing; - } - - // VisNodeData getVisNodeData(final BasicNode node) { - // VisNodeData result = this.nodeData.get(node); - // if (result == null) { - // result = new VisNodeData(); - // this.nodeData.put(node, result); - // } - // return result; - // } - - // VisLinkData getVisLinkData(final BasicLink link) { - // VisLinkData result = this.linkData.get(link); - // if (result == null) { - // result = new VisLinkData(); - // this.linkData.put(link, result); - // } - // return result; - // } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNode.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNode.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNode.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/visualization/VisNode.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities.visualization; - -import floetteroed.utilities.networks.construction.AbstractNode; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class VisNode extends AbstractNode { - - // -------------------- MEMBERS -------------------- - - private double easting; - private double northing; - - // -------------------- CONSTRUCTION -------------------- - - VisNode(final String id) { - super(id); - } - - // -------------------- WRITE ACCESS -------------------- - - public void setEasting(final double easting) { - this.easting = easting; - } - - public void setNorthing(final double northing) { - this.northing = northing; - } - - // -------------------- READ ACCESS -------------------- - - public double getEasting() { - return this.easting; - } - - public double getNorthing() { - return this.northing; - } - -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/XMLHelpers.java sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/XMLHelpers.java --- sumo-1.1.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/XMLHelpers.java 2018-12-18 09:58:47.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/calibration/utilities/src/main/java/floetteroed/utilities/XMLHelpers.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* - * Copyright 2015, 2016 Gunnar Flötteröd - * - * This program 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. - * - * 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 the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * contact: gunnar.floetteroed@abe.kth.se - * - */ -package floetteroed.utilities; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author Gunnar Flötteröd - * - */ -public class XMLHelpers { - - // -------------------- CONSTANTS -------------------- - - public static final Extractor DOUBLE2INT_EXTRACTOR = new Extractor() { - @Override - public Integer extract(final String item) { - return (int) Math.round(Double.parseDouble(item)); - } - }; - - // -------------------- HIDDEN CONSTRUCTOR -------------------- - - private XMLHelpers() { - } - - // -------------------- READING -------------------- - - public static interface Extractor { - /** - * @param item - * contains a String representation of a value of type T - * @return a T representation of item - */ - public T extract(final String item); - } - - public static List extractItems(final String line, - final Extractor extractor) { - final ArrayList result = new ArrayList(); - for (String item : line.split("\\s")) { - final String trimmedItem = item.trim(); - if (trimmedItem.length() > 0) { - result.add(extractor.extract(trimmedItem)); - } - } - result.trimToSize(); - return result; - } - - public static List extractItems(final String line) { - return extractItems(line, new Extractor() { - public String extract(final String item) { - return item; - } - }); - } - - // -------------------- WRITING -------------------- - - public static void writeAttr(final String name, final Object value, - final PrintWriter writer) throws IOException { - writer.print(name); - writer.print("=\""); - writer.print(value.toString()); - writer.print("\" "); - } - - public static void appendAttr(final String name, final Object value, - final StringBuffer result) { - result.append(name); - result.append("=\""); - result.append(value.toString()); - result.append("\" "); - } -} diff -Nru sumo-1.1.0+dfsg1/tools/contributed/lisum-gui/run.bat sumo-1.2.0+dfsg1/tools/contributed/lisum-gui/run.bat --- sumo-1.1.0+dfsg1/tools/contributed/lisum-gui/run.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/lisum-gui/run.bat 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1 @@ +java -jar target/lisum-gui-1.0-SNAPSHOT.jar \ No newline at end of file diff -Nru sumo-1.1.0+dfsg1/tools/contributed/lisum-gui/src/main/java/de/dlr/ts/lisum/gui/menus/MenuAdmin.java sumo-1.2.0+dfsg1/tools/contributed/lisum-gui/src/main/java/de/dlr/ts/lisum/gui/menus/MenuAdmin.java --- sumo-1.1.0+dfsg1/tools/contributed/lisum-gui/src/main/java/de/dlr/ts/lisum/gui/menus/MenuAdmin.java 2018-12-18 09:58:44.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/lisum-gui/src/main/java/de/dlr/ts/lisum/gui/menus/MenuAdmin.java 2019-04-15 14:11:30.000000000 +0000 @@ -338,7 +338,7 @@ { try { - Desktop.getDesktop().browse(new URI("http://sumo.dlr.de/wiki/Tools/LISASUMO")); + Desktop.getDesktop().browse(new URI("https://sumo.dlr.de/wiki/Tools/LISASUMO")); } catch (IOException | URISyntaxException ex) { ex.printStackTrace(System.out); diff -Nru sumo-1.1.0+dfsg1/tools/contributed/lisum-gui/src/main/resources/fxml/Splash.fxml sumo-1.2.0+dfsg1/tools/contributed/lisum-gui/src/main/resources/fxml/Splash.fxml --- sumo-1.1.0+dfsg1/tools/contributed/lisum-gui/src/main/resources/fxml/Splash.fxml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-1.2.0+dfsg1/tools/contributed/lisum-gui/src/main/resources/fxml/Splash.fxml 2019-04-15 14:11:30.000000000 +0000 @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + +